https://sourceware.org/bugzilla/show_bug.cgi?id=21562
Bug ID: 21562
Summary: Refs to __start_SCN of non-orphan sections affect
--gc-sections
Product: binutils
Version: 2.29 (HEAD)
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: amonakov at gmail dot com
Target Milestone: ---
(originally mentioned in bug 21557)
Linker manual explicitly states that __start_SCN symbols are automatically
provided only for orphan sections. However, the following testcase shows that
such symbols appear virtually present when marking reachable sections for
--gc-sections:
cat <<EOF >test.s
.section scnfoo,"aw",@progbits
.zero 1
.globl bar
.data
.align 8
.type bar, @object
.size bar, 8
bar:
.quad __start_scnfoo
EOF
cat <<EOF >lds
SECTIONS {
scnfoo : { *(scnfoo) }
}
EOF
$ ld.bfd -shared -o test.so test.o --gc-sections --print-gc-sections -T lds
<no output, scnfoo not eliminated, __start_scnfoo is undefined>
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils