merge from gcc
authorDJ Delorie <dj@redhat.com>
Sun, 14 Nov 2010 21:42:55 +0000 (21:42 +0000)
committerDJ Delorie <dj@redhat.com>
Sun, 14 Nov 2010 21:42:55 +0000 (21:42 +0000)
libiberty/ChangeLog
libiberty/simple-object-coff.c

index 8cd4a2856847e81fd968eb71cf74f091f108a921..4bd5b209bf3634b7716292bd4a142347cf08aa66 100644 (file)
@@ -1,3 +1,8 @@
+2010-11-14  Kai Tietz  <kai.tietz@onevision.com>
+
+       * simple-object-coff.c (simple_object_coff_read_strtab): Fix reading
+       offset.
+
 2010-11-12  Ian Lance Taylor  <iant@google.com>
 
        PR other/46332
index 9ba1dd4bac024df6bd3abf44494e6c2ba253a7dc..ff8fee46b74aa54e7dd8ffd082a2874a65b1650c 100644 (file)
@@ -308,7 +308,8 @@ simple_object_coff_read_strtab (simple_object_read *sobj, size_t *strtab_size,
   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;