bfd: don't produce corrupt COFF symbol table due to long ELF file name symbols
authorJan Beulich <jbeulich@novell.com>
Tue, 15 Dec 2015 13:31:25 +0000 (14:31 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 15 Dec 2015 13:31:25 +0000 (14:31 +0100)
commit270f824531ceef276616a5d2f3027fa9f537c10b
tree3f20d74a1748d2da2516da51fa9afc63430f35e0
parent1d19cae752a7b032b8253feb4fa3b9f1dc162823
bfd: don't produce corrupt COFF symbol table due to long ELF file name symbols

The re-writing logic in _bfd_coff_final_link() overwrote the ".file"
part of the symbol table entry, due to not coping with the auxiliary
entry generated in all cases.

Note that while I would have wanted to add a test case,
(a) I didn't spot any one testing the base functionality here, and
(b) I wasn't able to figure out proper conditionals to use in e.g.
    ld-elf/elf.exp to check for the necessary PE/PE+ support (which
    varies by target).
bfd/ChangeLog
bfd/coffgen.c
bfd/cofflink.c
bfd/libcoff-in.h
bfd/libcoff.h