aboutsummaryrefslogtreecommitdiff
path: root/gdbsupport
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2023-02-09 12:08:10 +1030
committerAlan Modra <amodra@gmail.com>2023-02-09 20:07:55 +1030
commitc920e5cc604c5b20f9af7c75402eea94aa1e11c6 (patch)
treee587f40d85d4a84aa9390b60744dcfb1b74f5811 /gdbsupport
parent0d78a4c40eaa1b709e482044c17ce6d0f05b2f9c (diff)
downloadgdb-c920e5cc604c5b20f9af7c75402eea94aa1e11c6.zip
gdb-c920e5cc604c5b20f9af7c75402eea94aa1e11c6.tar.gz
gdb-c920e5cc604c5b20f9af7c75402eea94aa1e11c6.tar.bz2
coff keep_relocs and keep_contents
keep_relocs is set by pe_ILF_save_relocs but not used anywhere in the coff/pe code. It is tested by the xcoff backend but not set. keep_contents is only used by the xcoff backend when dealing with the .loader section, and it's easy enough to dispense with it there. keep_contents is set in various places but that's fairly useless when the contents aren't freed anyway until later linker support functions, add_dynamic_symbols and check_dynamic_ar_symbols. There the contents were freed if keep_contents wasn't set. I reckon we can free them unconditionally. * coff-bfd.h (struct coff_section_tdata): Delete keep_relocs and keep_contents. * peicode.h (pe_ILF_save_relocs): Don't set keep_relocs. * xcofflink.c (xcoff_get_section_contents): Cache contents. Return the contents. Update callers. (_bfd_xcoff_canonicalize_dynamic_symtab): Don't set keep_contents for .loader. (xcoff_link_add_dynamic_symbols): Free .loader contents unconditionally. (xcoff_link_check_dynamic_ar_symbols): Likewise.
Diffstat (limited to 'gdbsupport')
0 files changed, 0 insertions, 0 deletions