Skip to content

os: Fix C++ exception support for relocatable ELF binaries#7186

Open
pcs1265 wants to merge 2 commits intoSamsung:masterfrom
pcs1265:260304_fix_elf_exception
Open

os: Fix C++ exception support for relocatable ELF binaries#7186
pcs1265 wants to merge 2 commits intoSamsung:masterfrom
pcs1265:260304_fix_elf_exception

Conversation

@pcs1265
Copy link
Copy Markdown
Member

@pcs1265 pcs1265 commented Mar 10, 2026

This commit fixes linker error while build procedure when CONFIG_ELF is enabled and add exception data section handling for ELF binary loader.

The linker error:

LD: tinyara
make[1]: Leaving directory '/root/tizenrt/os/arch/arm/src'
CP: tinyara.bin
Preparing final ../build/output/bin/app1 binary
Verify ../build/output/bin/common
Undefined Symbols in ../build/output/bin/common
         U __exidx_end  unwind-arm.c:0
         U __exidx_start        unwind-arm.c:0
         w __gnu_Unwind_Find_exidx      unwind-arm.c:0
make: *** [post] Error 1
Makefile.unix:542: recipe for target 'post' failed

The section required for exception data is relocated in "R_ARM_TARGET2" type, so added that type relocation support to ELF binary loader.

NOTE : As described in help message of LIBCXX_EXCEPTION can be used with docker version 2.0.0 or later.

@pcs1265 pcs1265 force-pushed the 260304_fix_elf_exception branch 4 times, most recently from 31ff739 to 0f7c42e Compare March 13, 2026 10:38
@pcs1265 pcs1265 changed the title [DO NOT MERGE] os: Fix C++ exception support for ELF binaries os: Fix C++ exception support for relocatable ELF binaries Mar 13, 2026
@pcs1265 pcs1265 marked this pull request as ready for review March 13, 2026 10:39
@pcs1265 pcs1265 force-pushed the 260304_fix_elf_exception branch from 0f7c42e to cb62c1f Compare April 13, 2026 00:10
pcs1265 added 2 commits April 13, 2026 11:19
This commit fixes linker error while build procedure when CONFIG_ELF is enabled and add exception data section handling for ELF binary loader.

The linker error:
```
LD: tinyara
make[1]: Leaving directory '/root/tizenrt/os/arch/arm/src'
CP: tinyara.bin
Preparing final ../build/output/bin/app1 binary
Verify ../build/output/bin/common
Undefined Symbols in ../build/output/bin/common
         U __exidx_end  unwind-arm.c:0
         U __exidx_start        unwind-arm.c:0
         w __gnu_Unwind_Find_exidx      unwind-arm.c:0
make: *** [post] Error 1
Makefile.unix:542: recipe for target 'post' failed
```

The section required for exception data is relocated in "R_ARM_TARGET2" type, so added that type relocation support to ELF binary loader.

NOTE : As described in help message of LIBCXX_EXCEPTION can be used with docker version 2.0.0 or later.
@pcs1265 pcs1265 force-pushed the 260304_fix_elf_exception branch from cb62c1f to 8658203 Compare April 13, 2026 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant