https://sourceware.org/bugzilla/show_bug.cgi?id=27495
Bug ID: 27495 Summary: -z start_stop_gc isn't compatible with --gc-sections Product: binutils Version: 2.37 (HEAD) Status: NEW Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: hjl.tools at gmail dot com CC: amodra at gmail dot com, i at maskray dot me Blocks: 11133, 19161, 19167, 20022, 21562 Target Milestone: --- On Linux/x86-64, with diff --git a/ld/ldmain.c b/ld/ldmain.c index 7a3c02aeaa6..3b2ebe168c6 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -357,7 +357,7 @@ main (int argc, char **argv) #ifdef DEFAULT_NEW_DTAGS link_info.new_dtags = DEFAULT_NEW_DTAGS; #endif - link_info.start_stop_gc = FALSE; + link_info.start_stop_gc = TRUE; link_info.start_stop_visibility = STV_PROTECTED; ldfile_add_arch (""); I got FAIL: ld-elf/pr21562a FAIL: ld-elf/pr21562b FAIL: ld-elf/pr21562c FAIL: ld-elf/pr21562d FAIL: ld-elf/pr21562i FAIL: ld-elf/pr21562j FAIL: ld-elf/pr21562k FAIL: ld-elf/pr21562l FAIL: ld-elf/pr21562m FAIL: ld-elf/pr21562n FAIL: --gc-sections with __start_ FAIL: ld-gc/pr19167 FAIL: pr20022 FAIL: --gc-sections with __start_SECTIONNAME Referenced Bugs: https://sourceware.org/bugzilla/show_bug.cgi?id=11133 [Bug 11133] gc-sections deletes sections with __start/__stop reference https://sourceware.org/bugzilla/show_bug.cgi?id=19161 [Bug 19161] GNU ld wrongly garbage collects section referenced via __start_SECTIONNAME https://sourceware.org/bugzilla/show_bug.cgi?id=19167 [Bug 19167] --gc-sections is broken with __start_ https://sourceware.org/bugzilla/show_bug.cgi?id=20022 [Bug 20022] --gc-sections is broken with __start_ and shared library https://sourceware.org/bugzilla/show_bug.cgi?id=21562 [Bug 21562] Refs to __start_SCN of non-orphan sections affect --gc-sections -- You are receiving this mail because: You are on the CC list for the bug.