* aoutx.h (translate_symbol_table): The string index 0 has a
authorIan Lance Taylor <ian@airs.com>
Mon, 24 Jan 1994 17:41:21 +0000 (17:41 +0000)
committerIan Lance Taylor <ian@airs.com>
Mon, 24 Jan 1994 17:41:21 +0000 (17:41 +0000)
special meaning for normal symbols, but not for dynamic symbols.

bfd/ChangeLog
bfd/aoutx.h

index 1a92dcd104ffe542bb82b99e8bc2624062ada359..04efe083e341e2158310acafa36cbbb74698031f 100644 (file)
@@ -1,3 +1,8 @@
+Mon Jan 24 12:38:54 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+       * aoutx.h (translate_symbol_table): The string index 0 has a
+       special meaning for normal symbols, but not for dynamic symbols.
+
 Sat Jan 22 12:26:01 1994  Stu Grossman  (grossman at cygnus.com)
 
        * sparclynx.c:  Setup appropriate macros to enable core file
index 41107193dad30a8b33ae3d60d5b1ba6fdbb95799..b7d2d44ab0e97aaa3b1f64929f02dff1e0afaeee 100644 (file)
@@ -1410,7 +1410,15 @@ translate_symbol_table (abfd, in, ext, count, str, strsize, dynamic)
 
       x = GET_WORD (abfd, ext->e_strx);
       in->symbol.the_bfd = abfd;
-      if (x < strsize)
+
+      /* For the normal symbols, the zero index points at the number
+        of bytes in the string table but is to be interpreted as the
+        null string.  For the dynamic symbols, the number of bytes in
+        the string table is stored in the __DYNAMIC structure and the
+        zero index points at an actual string.  */
+      if (x == 0 && ! dynamic)
+       in->symbol.name = "";
+      else if (x < strsize)
        in->symbol.name = str + x;
       else
        return false;