[all-commits] [llvm/llvm-project] 062cfa: [builtins] Disable COMPILER_RT_CRT_USE_EH_FRAME_RE...

Fangrui Song via All-commits all-commits at lists.llvm.org
Tue Feb 27 16:33:05 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 062cfada643c1aa48a1bb81894e2920d390fe8cf
      https://github.com/llvm/llvm-project/commit/062cfada643c1aa48a1bb81894e2920d390fe8cf
  Author: Fangrui Song <i at maskray.me>
  Date:   2024-02-27 (Tue, 27 Feb 2024)

  Changed paths:
    M compiler-rt/lib/builtins/CMakeLists.txt
    M compiler-rt/test/builtins/Unit/ctor_dtor.c

  Log Message:
  -----------
  [builtins] Disable COMPILER_RT_CRT_USE_EH_FRAME_REGISTRY by default (#83201)

Most of GCC's Linux targets have a link spec
`%{!static|static-pie:--eh-frame-hdr}` that doesn't pass --eh-frame-hdr
for `-static` links. `-static` links are supposed to utilize
`__register_frame_info` (called by `crtbeginT.o`, not by crtbegin.o or
crtbeginS.o) as a replacement.

compiler-rt crtbegin (not used with GCC) has some ehframe code, which is
not utilized because Clang driver unconditionally passes --eh-frame-hdr
for Linux targets, even for -static. In addition, LLVM libunwind
implements `__register_frame_info` as an empty stub.

Furthermore, in a non-static link, the `__register_frame_info`
references can cause an undesired weak dynamic symbol.

For now, just disable the config by default.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list