[PATCH] ld: Don't define section symbols for excluded sections

H.J. Lu hjl.tools@gmail.com
Thu Jul 30 07:17:45 GMT 2026


When the SEC_EXCLUDE bit is set on a section, the contents of the section
are excluded by the linker for non-relocatable output.  Define  __start,
__stop, .startof. and .sizeof. symbols for relocatable link or if the
SEC_EXCLUDE bit on the section is cleared.

PR ld/34448
* ldlang.c (lang_init_start_stop): Call lang_define_start_stop
for relocatable link or if the SEC_EXCLUDE bit on the section
is cleared.


-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ld-Don-t-define-section-symbols-for-excluded-section.patch
Type: text/x-patch
Size: 2416 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20260730/325f0d0d/attachment.bin>


More information about the Binutils mailing list