[Bug 229708] Don't require the program header for ELF files fit in the first page
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Wed Jul 11 20:33:50 UTC 2018
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: bugs at FreeBSD.org
Reporter: alex.arslan at 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.
More information about the freebsd-bugs
mailing list