https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207631

            Bug ID: 207631
           Summary: rtld requires the first PT_LOAD segment to be .text
                    and is incompatible with output produced by lld
           Product: Base System
           Version: 11.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: misc
          Assignee: [email protected]
          Reporter: [email protected]

The first PT_LOAD segment is traditionally mapped with R+X permission and
contains the .text section. rtld assumes this is the case and the temporarily
maps this segment RWX while applying non-plt relocations.

The LLVM linker lld currently puts .rodata in the first PT_LOAD with only R
permission and .text in the second PT_LOAD with RX.

rtld then segfaults while trying to apply relocations to .text which has not
been updated with write permission.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to