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

            Bug ID: 229708
           Summary: Don't require the program header for ELF files fit in
                    the first page
           Product: Base System
           Version: 11.2-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: b...@freebsd.org
          Reporter: alex.ars...@julialang.org

According to a comment in libexec/rtld-elf/map_object.c,

"We rely on the program header being in the first page. This is not strictly
required by the ABI specification, but it seems to always true in practice.
And, it simplifies things considerably."

This assumption is quickly violated when using tools such as patchelf, which
often relocates the program header to the end of the ELF header, causing it to
no longer fit within the first page. While perhaps not the most ideal behavior,
it doesn't appear to violate any ABI specifications.

The build system for the Julia language (https://julialang.org), which supports
FreeBSD, and our new dependency cross-compilation system
(https://github.com/JuliaPackaging/BinaryBuilder.jl), which supports building
for FreeBSD, make heavy use of patchelf for setting RPATHs. That has caused a
number of issues for us on FreeBSD though, because we run into FreeBSD's
incomplete implementation of the ABI specification, making shared libraries
unloadable.

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

Reply via email to