[llvm-bugs] [Bug 46478] -fsanitize=thread and -fsanitize=kernel-address produce unwanted .eh_frame and .init_array.* sections
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Apr 27 20:19:41 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=46478
Fangrui Song <i at maskray.me> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |i at maskray.me
Resolution|--- |FIXED
--- Comment #4 from Fangrui Song <i at maskray.me> ---
The .eh_frame issue was fixed by https://reviews.llvm.org/D100251 (target:
13.0.0).
For .init_array.0, -fsanitize={address,memory,thread,...} instrumentations
create a module constructor which is placed in .init_array.0 .
For memory/thread, the module constructor just calls an init function which is
really small.
For address, the module constructor needs to register global variables (even
under -fsanitize=kernel-address), which cannot be simply ignored.
It is likely that the kernel doesn't need .init_array.0 for memory/thread, but
introducing a new option seems overkill to me.
Ignoring it with the current /DISCARD/ : { ... *(.init_array.*) } works quite
well.
--
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/20210428/df56c49b/attachment-0001.html>
More information about the llvm-bugs
mailing list