COFF: use hash for string table also when copying / stripping

Otherwise the string table may grow and hence e.g. change a final binary
(observed with PE/COFF ones) even if really there's no change. Doing so
in fact reduces the overall amount of code, and in particular the number
of places which need to remain in sync.

Afaics there's no real equivalent to the "traditional_format" field used
when linking, so hashing is always enabled when copying / stripping.
This commit is contained in:
Jan Beulich
2022-05-19 12:45:55 +02:00
parent f0a53c9c89
commit 20bed3bb35
4 changed files with 78 additions and 219 deletions

View File

@@ -325,8 +325,8 @@ extern void coff_mangle_symbols
extern bool coff_write_symbols
(bfd *);
extern bool coff_write_alien_symbol
(bfd *, asymbol *, struct internal_syment *, union internal_auxent *,
bfd_vma *, bfd_size_type *, asection **, bfd_size_type *);
(bfd *, asymbol *, struct internal_syment *, bfd_vma *,
struct bfd_strtab_hash *, bool, asection **, bfd_size_type *);
extern bool coff_write_linenumbers
(bfd *);
extern alent *coff_get_lineno