[llvm-bugs] [Bug 28040] ELF executable generated with lld crashes when reading DYNAMIC link_map on x86-64
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Jun 13 10:23:49 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=28040
Carlo Kok <ck at remobjects.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID
--- Comment #7 from Carlo Kok <ck at remobjects.com> ---
So this ended up being a user error. Below code isn't supposed to work at all,
from the glibc mailing list:
> The l_addr is a *relocation*, or a delta between first PT_LOAD
> .p_vaddr and the actual load address.
> For non-PIE ET_EXEC, this delta is always 0. For non-prelinked ET_DYN
> (which are normally linked with first PT_LOAD .p_vaddr == 0) it's the
> actual load address (this is why it works most of the time).
> But for any prelinked ET_DYN binary with first PT_LOAD .p_vaddr != 0,
> this will crash and burn. See also "man prelink".
The reason this hit at all for me is because my compiler didn't emit version
records in the dummy .so files so weak dl_iterate_phdr wouldn't be resolved by
the loader. libGC (boehm) used the code above as a fallback.
closed the issue as invalid.
--
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/20160613/a5116c49/attachment.html>
More information about the llvm-bugs
mailing list