Skip to content
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

can't resolve symbol 'dl_iterate_phdr' #83

Open
arc1986 opened this issue Jan 5, 2022 · 4 comments
Open

can't resolve symbol 'dl_iterate_phdr' #83

arc1986 opened this issue Jan 5, 2022 · 4 comments

Comments

@arc1986
Copy link

arc1986 commented Jan 5, 2022

I tried cross compiled on MIPS and the static lib was generated fine

./mips-linux-gcc --version
mips-linux-xgcc (Realtek RSDK-1.5.6p2) 4.4.6
Copyright (C) 2010 Free Software Foundation, Inc.
ls
../rsdk-1.5.6-5281-EB-2.6.30-0.9.30.3-131105/lib/libbacktrace.a

But getting below error while executing the below 'bt' same code (statically linked with libbacktrace.a)
https://github.com/ErwanLegrand/libbacktrace/blob/master/examples/bt.c

output/bt: ELF 32-bit MSB executable, MIPS, MIPS-I version 1 (SYSV), dynamically linked, interpreter /lib/ld-uClibc.so.0, with debug_info, not stripped
./bt
can't resolve symbol 'dl_iterate_phdr'

@ianlancetaylor
Copy link
Owner

That's odd. The libbacktrace configure script checks whether dl_iterate_phdr exists, and only calls it if it is present on the system. Why does the configure script find dl_iterate_phdr if it is not present on your system?

@arc1986
Copy link
Author

arc1986 commented Jan 6, 2022

Yeah, I re-checked it, 'dl_iterate_phdr' is present in the system. But not sure why I'm getting that error only if I ran 'bt' code,

@arc1986
Copy link
Author

arc1986 commented Jan 6, 2022

the error is gone when I compiled the code with '-static', however now getting a segmentaion fault,

@ianlancetaylor
Copy link
Owner

I have no idea what is happening here. Is this still a problem? Thanks.

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

No branches or pull requests

2 participants