[llvm-bugs] [Bug 25188] New: [elf2] implement __start_SECNAME and __stop_SECNAME

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Oct 14 17:41:14 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=25188

            Bug ID: 25188
           Summary: [elf2] implement __start_SECNAME and __stop_SECNAME
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: chisophugis at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

This is required by D13329 (r250200).

In D13329, the following quote from Ian Taylor:

"When a section name is a valid C identifier, the linker automatically provides
__start and __stop symbols set to the addresses of the beginning and end of the
section.  The symbols are __start_SECNAME and __stop_SECNAME where SECNAME is
the name of the section.

This is not defined by the ELF ABI, but it is completely reliable on
GNU/Linux.  In fact it is reliable on any ELF system except possibly
Solaris, and it probably works on Solaris too.  This is definitely
what you should do instead of using a linker script.  It's more
reliable and more efficient, and it's what everybody else does"

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20151015/684b5fe9/attachment.html>


More information about the llvm-bugs mailing list