diff options
author | Ian Lance Taylor <ian@airs.com> | 1995-10-06 22:35:01 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1995-10-06 22:35:01 +0000 |
commit | 4372f33ffb84f4882c5927e20763200c2751a258 (patch) | |
tree | 544e9e6c9d2d74b7bd05b0c10d9268950bbd1bab /bfd/coffgen.c | |
parent | 625559e74241061b25ed000c9d8d0e2e7735f810 (diff) | |
download | gdb-4372f33ffb84f4882c5927e20763200c2751a258.zip gdb-4372f33ffb84f4882c5927e20763200c2751a258.tar.gz gdb-4372f33ffb84f4882c5927e20763200c2751a258.tar.bz2 |
* coffgen.c (coff_fix_symbol_name): Don't try to set up file
auxent if there isn't one.
(coff_write_symbols): If there is no file auxent, use SYMNMLEN
rather than FILNMLEN as the maximum name length.
Diffstat (limited to 'bfd/coffgen.c')
-rw-r--r-- | bfd/coffgen.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bfd/coffgen.c b/bfd/coffgen.c index fe3676b..0df46b7 100644 --- a/bfd/coffgen.c +++ b/bfd/coffgen.c @@ -624,7 +624,8 @@ coff_fix_symbol_name (abfd, symbol, native, string_size_p, } name_length = strlen (name); - if (native->u.syment.n_sclass == C_FILE) + if (native->u.syment.n_sclass == C_FILE + && native->u.syment.n_numaux > 0) { strncpy (native->u.syment._n._n_name, ".file", SYMNMLEN); auxent = &(native + 1)->u.auxent; @@ -652,7 +653,7 @@ coff_fix_symbol_name (abfd, symbol, native, string_size_p, } } else - { /* NOT A C_FILE SYMBOL */ + { if (name_length <= SYMNMLEN) { /* This name will fit into the symbol neatly */ @@ -1024,7 +1025,8 @@ coff_write_symbols (abfd) Don't write it into the string table. */ maxlen = name_length; } - else if (c_symbol->native->u.syment.n_sclass == C_FILE) + else if (c_symbol->native->u.syment.n_sclass == C_FILE + && c_symbol->native->u.syment.n_numaux > 0) maxlen = FILNMLEN; else maxlen = SYMNMLEN; |