[llvm-bugs] [Bug 26814] New: lld needs to set DF_TEXTREL if the output contains relocations in non-writable segments

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Mar 2 07:53:31 PST 2016


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

            Bug ID: 26814
           Summary: lld needs to set DF_TEXTREL if the output contains
                    relocations in non-writable segments
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: emaste at freebsd.org
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

PR 26813 reports an issue where an lld-linked FreeBSD libc contains .text
relocations, which should not be the case.

However, if the output does contain .text relocations the DF_TEXTREL flag needs
to be set (and perhaps the DT_TEXTREL tag).

Split into a separate PR for tracking.

See http://www.sco.com/developers/gabi/2007-03-26/ch5.dynamic.html#df_textrel

> DF_TEXTREL
>
> If this flag is not set, no relocation entry should cause a modification
> to a non-writable segment, as specified by the segment permissions in the
> program header table. If this flag is set, one or more relocation entries
> might request modifications to a non-writable segment, and the dynamic 
> linker can prepare accordingly.

-- 
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/20160302/837ace83/attachment.html>


More information about the llvm-bugs mailing list