Skip to content

Commit c228289

Browse files
authored
Revert "[builtins] Disable COMPILER_RT_CRT_USE_EH_FRAME_REGISTRY by d… (#84580)
…efault (#83201)" This reverts commit 062cfad. See issue #84574.
1 parent cb6ff74 commit c228289

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

compiler-rt/lib/builtins/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ cmake_dependent_option(COMPILER_RT_BUILD_CRT "Build crtbegin.o/crtend.o" ON "COM
917917
if (COMPILER_RT_BUILD_CRT)
918918
add_compiler_rt_component(crt)
919919

920-
option(COMPILER_RT_CRT_USE_EH_FRAME_REGISTRY "Use eh_frame in crtbegin.o/crtend.o" OFF)
920+
option(COMPILER_RT_CRT_USE_EH_FRAME_REGISTRY "Use eh_frame in crtbegin.o/crtend.o" ON)
921921

922922
include(CheckSectionExists)
923923
check_section_exists(".init_array" COMPILER_RT_HAS_INITFINI_ARRAY

compiler-rt/test/builtins/Unit/ctor_dtor.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,23 @@
99

1010
// Ensure the various startup functions are called in the proper order.
1111

12+
// CHECK: __register_frame_info()
1213
/// ctor() is here if ld.so/libc supports DT_INIT/DT_FINI
1314
// CHECK: main()
1415
/// dtor() is here if ld.so/libc supports DT_INIT/DT_FINI
16+
// CHECK: __deregister_frame_info()
1517

1618
struct object;
1719
static int counter;
1820

21+
void __register_frame_info(const void *fi, struct object *obj) {
22+
printf("__register_frame_info()\n");
23+
}
24+
25+
void __deregister_frame_info(const void *fi) {
26+
printf("__deregister_frame_info()\n");
27+
}
28+
1929
void __attribute__((constructor)) ctor() {
2030
printf("ctor()\n");
2131
++counter;

0 commit comments

Comments
 (0)