[llvm-bugs] [Bug 30750] New: symbolizer.o should be buildable with a regular cmake rule
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Oct 20 15:29:12 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=30750
Bug ID: 30750
Summary: symbolizer.o should be buildable with a regular cmake
rule
Product: compiler-rt
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: compiler-rt
Assignee: unassignedbugs at nondot.org
Reporter: peter at pcc.me.uk
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Created attachment 17471
--> https://llvm.org/bugs/attachment.cgi?id=17471&action=edit
attempt
The internal symbolizer.o object is currently built with the script
compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh.
We should really be using a simpler approach to building this object
file, and it should be available as a regular cmake rule. Conceptually, we
want to be doing "ld -r" followed by "objcopy -G" to create a relocatable
object file with only our entry points exposed. Attached is an attempt at doing
this in cmake. However, this does not work at present due to linker and objcopy
bugs:
- the presence of local symbols named the same as global symbols confuses at
least bfd and gold, so we need to rename local symbols
- ld.gold fails to link symbolizer0.o (fails an assertion)
- ld.bfd succeeds, but seemingly creates an invalid .eh_frame section
(segfaults
in the unwinder)
- ld.lld succeeds but creates multiple .eh_frame sections which confuses
objcopy into creating an invalid output file (lld refuses to accept it, gold
creates an invalid .eh_frame, bfd fails assertions)
To the extent that these are bugs in lld and objcopy, we can probably fix the
bugs in lld and write our own llvm-objcopy (perhaps with a nicer interface for
doing this transformation), then call the tools directly from cmake.
--
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/20161020/3e9814e6/attachment.html>
More information about the llvm-bugs
mailing list