PATCH: PR ld/11133: Static linking with gc-sections deletes sections with __start/__stop reference

H.J. Lu hjl.tools@gmail.com
Thu Jan 7 13:59:00 GMT 2010


On Tue, Jan 5, 2010 at 9:46 AM, H.J. Lu <hongjiu.lu@intel.com> wrote:
> On Tue, Jan 05, 2010 at 09:32:21AM -0800, H.J. Lu wrote:
>> Hi,
>>
>>
>> __start_XXX and __stop_XXX symbols may reference the start address and
>> end address of the orphaned section.  We need to search all input files
>> for section XXX.  OK to install?
>>
>> Thanks.
>>
>>
>> H.J.
>> ---
>> bfd/
>>
>> 2010-01-05  H.J. Lu  <hongjiu.lu@intel.com>
>>
>>       PR ld/11133
>>       * elflink.c (_bfd_elf_gc_mark_hook): Check section XXX for
>>       undefined __start_XXX/__stop_XXX in all input files.
>>
>> ld/testsuite/
>>
>> 2010-01-05  H.J. Lu  <hongjiu.lu@intel.com>
>>
>>       PR ld/11133
>>       * ld-gc/gc.exp: Run start.
>>
>>       * ld-gc/start.d: New.
>>       * ld-gc/start.s: Likewise.
>>
>
> An updated patch to check empty section name.
>
>

Updated to use SEC_KEEP.

-- 
H.J.
--
bfd/

2010-01-05  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/11133
	* elflink.c (_bfd_elf_gc_mark_hook): Check section XXX for
	undefined __start_XXX/__stop_XXX in all input files and set
	its gc_mark to 1.

ld/testsuite/

2010-01-05  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/11133
	* ld-gc/gc.exp: Run start.

	* ld-gc/start.d: New.
	* ld-gc/start.s: Likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: binutils-pr11133-3.patch
Type: text/x-csrc
Size: 2562 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20100107/de5a520c/attachment.bin>


More information about the Binutils mailing list