[LLVMbugs] [Bug 22906] New: lld does not seem to support __start and __stop

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Mar 14 08:00:51 PDT 2015


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

            Bug ID: 22906
           Summary: lld does not seem to support __start and __stop
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: ed at 80386.nl
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

GNU ld supports the magic __start and __stop symbols as markers for the
beginning/end of sections. For example:

int var1 __attribute__((__section__("foo")));
int var2 __attribute__((__section__("foo")));

extern int __start_foo[0];
extern int __stop_foo[0];

GNU ld automatically adds these symbols if undefined. They will point to the
beginning/end of the section "foo". Couple of important things to keep in mind
when implementing this:

- Don't let --gc-sections reap these sections if __start_foo and __stop_foo are
being used.
- Don't inject these symbols if the section itself does not exist.

GNU ld also doesn't do this.

-- 
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/20150314/86c69fb7/attachment.html>


More information about the llvm-bugs mailing list