-
Notifications
You must be signed in to change notification settings - Fork 26
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
llcppsymg:linux compatibility #830
Comments
This was referenced Oct 15, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nm tool
dynamic symbol
using the
nm
tool to examine dynamic libraries, have discovered significant differences between macOS and Linux:On Linux:
-D
flag must be specified to obtain the corresponding symbols.-D
, no symbols are displayed.On macOS:
-D
flag. Thenm
command displays all symbols (including dynamic ones) by default.The reason for this difference is that macOS and Linux use different formats for their executable files and handle symbol tables differently:
Linux uses the ELF format.
macOS uses the Mach-O format.
xtool/nm:flags option & symbol version #829
symbol version
On Linux, symbols may appear with version declarations separated by @@
https://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html
dynamic lib search
pkg-config
On Linux systems, the pkg-config --libs command does not output the -L path for dynamic libraries installed in the system's default search paths
For example:
root@be00d9b1c2c9:/usr/lib/aarch64-linux-gnu# pkg-config --libs lua5.4
-llua5.4
This output only includes the -l flag to specify the library name, but does not include the -L flag to specify the library path. This is because the library is located in the system's default search path.
will search valid path from below conf
/etc/ld.so.conf.d/*.conf
/etc/ld.so.conf
/etc/ld.so.conf.d/*.conf
's fetch , need the os.ReadDirso & dylib
On Linux, dynamic library names end with .so
Related Bugs & Patch
The text was updated successfully, but these errors were encountered: