From patchwork Sat Nov 13 18:37:11 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai Tietz X-Patchwork-Id: 71067 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 677D2B7113 for ; Sun, 14 Nov 2010 05:37:58 +1100 (EST) Received: (qmail 27972 invoked by alias); 13 Nov 2010 18:37:56 -0000 Received: (qmail 27962 invoked by uid 22791); 13 Nov 2010 18:37:54 -0000 X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-qw0-f47.google.com (HELO mail-qw0-f47.google.com) (209.85.216.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 13 Nov 2010 18:37:13 +0000 Received: by qwd6 with SMTP id 6so994061qwd.20 for ; Sat, 13 Nov 2010 10:37:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.84.135 with SMTP id j7mr3288045qcl.180.1289673431200; Sat, 13 Nov 2010 10:37:11 -0800 (PST) Received: by 10.229.85.195 with HTTP; Sat, 13 Nov 2010 10:37:11 -0800 (PST) Date: Sat, 13 Nov 2010 19:37:11 +0100 Message-ID: Subject: [patch libiberty]: Fix long-section name handling for coff in simple-object-coff From: Kai Tietz To: GCC Patches Cc: Dave Korn , DJ Delorie X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hello, this patch adds the missing object offset for reading strtab data from object. ChangeLog 2010-11-13 Kai Tietz * simple-object-coff.c (simple_object_coff_read_strtab): Fix reading offset. Tested for x86_64-w64-mingw32, i686-w64-mingw32, and i686-pc-cygwin. If there are no objections, I will apply this tomorrow. Regards, Kai Index: simple-object-coff.c =================================================================== --- simple-object-coff.c (revision 166701) +++ simple-object-coff.c (working copy) @@ -308,7 +308,8 @@ size_t strsize; char *strtab; - strtab_offset = ocr->symptr + ocr->nsyms * sizeof (struct external_syment); + strtab_offset = sobj->offset + ocr->symptr + + ocr->nsyms * sizeof (struct external_syment); if (!simple_object_internal_read (sobj->descriptor, strtab_offset, strsizebuf, 4, errmsg, err)) return NULL;