bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/21557] __start_SCN not provided if SCN used in linker script


From: amonakov at gmail dot com
Subject: [Bug ld/21557] __start_SCN not provided if SCN used in linker script
Date: Fri, 09 Jun 2017 17:40:52 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=21557

--- Comment #4 from Alexander Monakov <amonakov at gmail dot com> ---
> Please open a new bug report.

Done, bug 21562.

Now I see that to use __start_SCN together with linker scripts and
--gc-sections, one should put the PROVIDE statement inside of the output
section declaration:

SECTIONS {
        scnfoo : {
        PROVIDE_HIDDEN(__start_scnfoo = .);
        *(scnfoo)
        }
}

This looks logical and seems to work with -gc-sections, with both ld.bfd and
Gold. I think the Glibc approach quoted in comment #0 with PROVIDE statements
outside of output groups sets a bad example (and breaks build with
--gc-sections).

-- 
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]