Bug 231882 - multiple toolchain issues with statically linked binaries
Summary: multiple toolchain issues with statically linked binaries
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on: 232176
Blocks: 231027
  Show dependency treegraph
 
Reported: 2018-10-02 18:09 UTC by Ed Maste
Modified: 2018-10-11 13:22 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer 2018-10-02 18:09:09 UTC
Attempting to make use of some WIP with statically linked binaries (i386 / amd64) has uncovered a number of tool chain issues which will be tracked in this PR.

* elfcopy/strip removes ifunc, probably other relocations

Found by kib@, with userland ifunc stripped statically linked binaries segfault. strip removed the .rela.plt section header; file content at the expected relocation site has been zeroed.

See LLVM PR 37538 for an initial part of this issue - lld is writing 0 in sh_info and sh_link on the .rela.plt section. https://bugs.llvm.org/show_bug.cgi?id=37538

This likely also affects static PIE.
Comment 1 Ed Maste freebsd_committer 2018-10-02 23:03:00 UTC
Another llvm PR that may be related: https://bugs.llvm.org/show_bug.cgi?id=38074
Comment 2 Ed Maste freebsd_committer 2018-10-11 13:22:09 UTC
lld issue fixed in r339304