[llvm-bugs] [Bug 30269] New: lld: implement --section-start, aka -Ttext etc.

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Sep 3 10:28:42 PDT 2016


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

            Bug ID: 30269
           Summary: lld: implement --section-start, aka -Ttext etc.
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: ELF
          Assignee: unassignedbugs at nondot.org
          Reporter: emaste at freebsd.org
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

The build for FreeBSD's boot loader components was recently reworked to use a
linker script instead of -N, but we've now encountered another issue in the
lack of -Ttext.

GNU ld documents them as:
       --section-start sectionname=org
           Locate a section in the output file at the absolute address given
           by org.  You may use this option as many times as necessary to
           locate multiple sections in the command line.  org must be a single
           hexadecimal integer; for compatibility with other linkers, you may
           omit the leading 0x usually associated with hexadecimal values.
           Note: there should be no white space between sectionname, the
           equals sign ("="), and org.

       -Tbss org
       -Tdata org
       -Ttext org
           Same as --section-start, with ".bss", ".data" or ".text" as the
           sectionname.

However, see this note about Gold's -Ttext / -Ttext-segment:

Gold's -Ttext option is approximately the same as GNU ld's
-Ttext-segment option.  This patch adds -Ttext-segment to gold as an
alias for -Ttext, so that scripts can use both linkers the same way.
This was prompted in particular by
http://gcc.gnu.org/ml/gcc-patches/2013-02/msg00699.html .

-- 
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/20160903/935c8dfb/attachment.html>


More information about the llvm-bugs mailing list