Skip to content

Revert "[builtins] Disable COMPILER_RT_CRT_USE_EH_FRAME_REGISTRY by d… #84580

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 8, 2024

Conversation

mysterymath
Copy link
Contributor

…efault (#83201)"

This reverts commit 062cfad. See issue #84574.

@llvmbot
Copy link
Member

llvmbot commented Mar 8, 2024

@llvm/pr-subscribers-lldb

Author: Daniel Thornburgh (mysterymath)

Changes

…efault (#83201)"

This reverts commit 062cfad. See issue #84574.


Full diff: https://github.com/llvm/llvm-project/pull/84580.diff

2 Files Affected:

  • (modified) compiler-rt/lib/builtins/CMakeLists.txt (+1-1)
  • (modified) compiler-rt/test/builtins/Unit/ctor_dtor.c (+10)
diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt
index 3f2c0f0436393d..f9611574a562b4 100644
--- a/compiler-rt/lib/builtins/CMakeLists.txt
+++ b/compiler-rt/lib/builtins/CMakeLists.txt
@@ -917,7 +917,7 @@ cmake_dependent_option(COMPILER_RT_BUILD_CRT "Build crtbegin.o/crtend.o" ON "COM
 if (COMPILER_RT_BUILD_CRT)
   add_compiler_rt_component(crt)
 
-  option(COMPILER_RT_CRT_USE_EH_FRAME_REGISTRY "Use eh_frame in crtbegin.o/crtend.o" OFF)
+  option(COMPILER_RT_CRT_USE_EH_FRAME_REGISTRY "Use eh_frame in crtbegin.o/crtend.o" ON)
 
   include(CheckSectionExists)
   check_section_exists(".init_array" COMPILER_RT_HAS_INITFINI_ARRAY
diff --git a/compiler-rt/test/builtins/Unit/ctor_dtor.c b/compiler-rt/test/builtins/Unit/ctor_dtor.c
index 3d5f895a0a1cd1..47560722a9f750 100644
--- a/compiler-rt/test/builtins/Unit/ctor_dtor.c
+++ b/compiler-rt/test/builtins/Unit/ctor_dtor.c
@@ -9,13 +9,23 @@
 
 // Ensure the various startup functions are called in the proper order.
 
+// CHECK: __register_frame_info()
 /// ctor() is here if ld.so/libc supports DT_INIT/DT_FINI
 // CHECK:      main()
 /// dtor() is here if ld.so/libc supports DT_INIT/DT_FINI
+// CHECK:      __deregister_frame_info()
 
 struct object;
 static int counter;
 
+void __register_frame_info(const void *fi, struct object *obj) {
+  printf("__register_frame_info()\n");
+}
+
+void __deregister_frame_info(const void *fi) {
+  printf("__deregister_frame_info()\n");
+}
+
 void __attribute__((constructor)) ctor() {
   printf("ctor()\n");
   ++counter;

@mysterymath mysterymath merged commit c228289 into llvm:main Mar 8, 2024
Gelbpunkt added a commit to Gelbpunkt/llvm-project that referenced this pull request Jan 26, 2025
Gelbpunkt added a commit to Gelbpunkt/llvm-project that referenced this pull request Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants