bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/21562] New: Refs to __start_SCN of non-orphan sections affect --


From: amonakov at gmail dot com
Subject: [Bug ld/21562] New: Refs to __start_SCN of non-orphan sections affect --gc-sections
Date: Fri, 09 Jun 2017 17:33:02 +0000

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]