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: PR ld/11133: Static linking with gc-sections deletes sections with __start/__stop reference


On Thu, Jan 07, 2010 at 05:58:52AM -0800, H.J. Lu wrote:
> Updated to use SEC_KEEP.

Yes, that should work.

> +	case bfd_link_hash_undefined:
> +	case bfd_link_hash_undefweak:
> +	  /* __start_XXX and __stop_XXX symbols may reference the start
> +	     address and end address of the orphaned section.  Search
> +	     all input files for section XXX and set gc_mark to 1.  */

Comment needs updating.  I suggest
	  /* To work around a glibc bug, keep all XXX input sections
	     when there is an as yet undefined reference to __start_XXX
	     or __stop_XXX symbols.  The linker will later define such
	     symbols for orphan input sections that have a name
	     representable as a C identifier.  */

OK with that change.

-- 
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]