This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] ld: Keep PREINIT_ARRAY/INIT_ARRAY/FINI_ARRAY sections for -r --gc-section


On Thu, Jan 11, 2018 at 08:57:14AM -0800, H.J. Lu wrote:
> We must keep all PREINIT_ARRAY, INIT_ARRAY as well as FINI_ARRAY sections
> for ld -r --gc-section.
> 
> OK for master?
> 
> H.J.
> ---
> bfd/
> 
> 	PR ld/22677
> 	* elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
> 	INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.

I'm wondering why we need this part

> +  ${RELOCATING+${PREINIT_ARRAY}}
>    ${RELOCATING+${INIT_ARRAY}}
>    ${RELOCATING+${FINI_ARRAY}}

given that if these were not wrapped in ${RELOCATING+} it seems like
KEEP in the script ought to be good enough?

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]