-
Notifications
You must be signed in to change notification settings - Fork 1.4k
bug fix pic:elf do not generate unwind table #17536
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
base: master
Are you sure you want to change the base?
Conversation
modlib_read: Read 64 bytes from offset 192665 modlib_symvalue: ERROR: SHN_UNDEF: Exported symbol "__gnu_Unwind_Find_exidx" not found modlib_relocate: ERROR: Section 2 reloc 12: Failed to get value of symbol[246]: -2 elf_loadbinary: Failed to bind symbols program binary: -2 builtin_loadbinary: Loading file: /pic/hello Signed-off-by: anjiahao <anjiahao@xiaomi.com>
b717f4f to
e02dc0f
Compare
acassis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anjiahao1 nice to fix some ELF usage case, so without ELF .exidx we cannot have backtracing, crash dumps and C++ exception support on ELF binaries, right?
Please add this note to https://nuttx.apache.org/docs/latest/guides/partially_linked_elf.html
cederom
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @anjiahao1 just some minor description update please :-)
- From the description it is unclear what behavior was before and after. Please update git commit and PR description to something like below. This will help users who encounter similar problem to find and apply you fix :-)
arch/arm: Add arm toolchain unwinder configuration option. Nuttx's ELF dynamic loading cannot yet parse ARM exidx. Option is added not generate it yet to fix build/runtime(?). Before: modlib_read: Read 64 bytes from offset 192665 modlib_symvalue: ERROR: SHN_UNDEF: Exported symbol "__gnu_Unwind_Find_exidx" not found modlib_relocate: ERROR: Section 2 reloc 12: Failed to get value of symbol[246]: -2 elf_loadbinary: Failed to bind symbols program binary: -2 After: builtin_loadbinary: Loading file: /pic/hello - I agree with @acassis Documentation needs an update too to stay in sync with the code.
linguini1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please provide some logs for your test?
| CELFFLAGS = $(CFLAGS) -fvisibility=hidden -mlong-calls # --target1-abs | ||
| CXXELFFLAGS = $(CXXFLAGS)-fvisibility=hidden -mlong-calls | ||
|
|
||
| ifeq ($(CONFIG_UNWINDER_ARM),y) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If unwind table support in ELF is not intended to be implemented, supplementary comments can be added. In addition, a statement indicating the lack of support should be included in the ELF chapter, preferably with details specified down to the ELF allocation type level.
Summary
Nuttx's ELF dynamic loading cannot yet parse ARM exidx, so do not generate it yet.
modlib_read: Read 64 bytes from offset 192665
modlib_symvalue: ERROR: SHN_UNDEF: Exported symbol "__gnu_Unwind_Find_exidx" not found
modlib_relocate: ERROR: Section 2 reloc 12: Failed to get value of symbol[246]: -2
elf_loadbinary: Failed to bind symbols program binary: -2
builtin_loadbinary: Loading file: /pic/hello
Impact
ELF compilation on ARM
Testing
mps3-an546 build with pic, load hello elf.