https://bugs.llvm.org/show_bug.cgi?id=46364
Fangrui Song <i...@maskray.me> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution|--- |WONTFIX
--- Comment #4 from Fangrui Song <i...@maskray.me> ---
% cat a.sh
echo '.section .init,"ax"; .balign 4; ret' > a.s
cc -c a.s
ld.bfd a.o a.o
GNU ld pads the gap with a NOP which may take several forms (90, 66 90, 0f 1f
00, etc):
401000: c3 ret
401001: 0f 1f 00 nop DWORD PTR [rax]
401004: c3 ret
while LLD pads the gap with a sequence of 0xcc.
.init/.fini/.ctors/.dtors/DT_INIT/DT_FINI have been obsoleted for many years.
The replacement .init_array/.fini_array/DT_INIT_ARRAY/DT_FINI_ARRAY have great
support (https://github.com/dlang/dmd/pull/10562 ). libc implementations of
some newer ABIs (aarch64,riscv) don't even support .init/.fini at all. Many
modern glibc configurations don't even run DT_INIT. Working around the
incorrect sh_addralign has very little value and is in contrary with the spirit
of the trap gap patch.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs