aboutsummaryrefslogtreecommitdiff
path: root/bfd/coffgen.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>1999-05-11 21:05:44 +0000
committerDJ Delorie <dj@redhat.com>1999-05-11 21:05:44 +0000
commitec0ef80e9f48ae59958cfe0ff8a998881833ca12 (patch)
tree49e5eabeda00d3d94f7b8658e6154502d69a066f /bfd/coffgen.c
parent69f868fa5d9e1847c9d73b92da32eec8d8821650 (diff)
downloadfsf-binutils-gdb-ec0ef80e9f48ae59958cfe0ff8a998881833ca12.zip
fsf-binutils-gdb-ec0ef80e9f48ae59958cfe0ff8a998881833ca12.tar.gz
fsf-binutils-gdb-ec0ef80e9f48ae59958cfe0ff8a998881833ca12.tar.bz2
* ecoff.c (_bfd_ecoff_write_armap): give the symtab element a
reasonable mode until "ar x" is smart enough to skip it (fixes gcc/libgcc.a builds on mips-ecoff targets * coffcode.h (styp_to_sec_flags): Explain how COMDATs are supposed to work. Hack to support MS import libraries, which use different COMDAT types than GNU. (coff_slurp_symbol_table): C_SECTION symbols are local; they refer to implied zero-length sections (see peicode below) * coffgen.c (coff_get_normalized_symtab): Properly read long MS filename symbols, which use one *or more* auxents. * coffswap.h (coff_swap_aux_in): ditto * peicode.h (coff_swap_sym_in): Build the implied zero-length sections
Diffstat (limited to 'bfd/coffgen.c')
-rw-r--r--bfd/coffgen.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/bfd/coffgen.c b/bfd/coffgen.c
index df41383..a06ed66 100644
--- a/bfd/coffgen.c
+++ b/bfd/coffgen.c
@@ -1747,9 +1747,19 @@ coff_get_normalized_symtab (abfd)
else
{
/* ordinary short filename, put into memory anyway */
- internal_ptr->u.syment._n._n_n._n_offset = (long)
- copy_name (abfd, (internal_ptr + 1)->u.auxent.x_file.x_fname,
- FILNMLEN);
+ if (internal_ptr->u.syment.n_numaux > 1
+ && coff_data (abfd)->pe)
+ {
+ internal_ptr->u.syment._n._n_n._n_offset = (long)
+ copy_name (abfd, (internal_ptr + 1)->u.auxent.x_file.x_fname,
+ internal_ptr->u.syment.n_numaux * symesz);
+ }
+ else
+ {
+ internal_ptr->u.syment._n._n_n._n_offset = (long)
+ copy_name (abfd, (internal_ptr + 1)->u.auxent.x_file.x_fname,
+ FILNMLEN);
+ }
}
}
else