aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1994-01-24 17:41:21 +0000
committerIan Lance Taylor <ian@airs.com>1994-01-24 17:41:21 +0000
commitca1c6bec7377899f7ad4e0e90f38f046adaee0d5 (patch)
treec4b7d3213d4c0396f40a8154c548ac224fd73ffe /bfd
parent96b6b765fc847223314b35ba29b4941cdce49770 (diff)
downloadgdb-ca1c6bec7377899f7ad4e0e90f38f046adaee0d5.zip
gdb-ca1c6bec7377899f7ad4e0e90f38f046adaee0d5.tar.gz
gdb-ca1c6bec7377899f7ad4e0e90f38f046adaee0d5.tar.bz2
* aoutx.h (translate_symbol_table): The string index 0 has a
special meaning for normal symbols, but not for dynamic symbols.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/aoutx.h10
2 files changed, 14 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 1a92dcd..04efe08 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -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
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
index 4110719..b7d2d44 100644
--- a/bfd/aoutx.h
+++ b/bfd/aoutx.h
@@ -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;