[PATCH] bfd: ensure that symbols targeted by DWARF relocations are kept in XCOFF

Alan Modra amodra@gmail.com
Fri Jul 30 03:44:08 GMT 2021


On Thu, Jul 29, 2021 at 12:52:42PM +0000, CHIGOT, CLEMENT via Binutils wrote:
> This patch improves XCOFF garbage collector pass, in order to keep
> symbols being referenced only by special sections like DWARF sections.
> 
> bfd/
> 	* xcofflink.c (xcoff_mark): Replace SEC_MARK by gc_mark.
> 	Look through relocations even if xcoff_section_data is NULL.
> 	(xcoff_sweep): Check if any sections of a file is kept before
> 	adding its special sections.
> 	Call xcoff_mark for special sessions being kept instead of just
> 	marking them.
> 	(SEC_MARK): Remove
> 	(xcoff_mark_symbol): Replace SEC_MARK by gc_mark.
> 	(xcoff_keep_symbol_p): Likewise.
> 	(bfd_xcoff_size_dynamic_sections): Likewise.
> 	(xcoff_find_tc0): Likewise.

OK.

-- 
Alan Modra
Australia Development Lab, IBM


More information about the Binutils mailing list