-
🐢 @bgamariYes, that is correct; with your
gcc
invocationmain
isn't a dynamic symbol and consequently the dynamic linker won't be able to resolve it.To fix this you will need to explicitly tell the linker to export the symbols as dynamic using
--export-dynamic
or--dynamic-list
. For instance,$ gcc -ldl -o test.o test.c -Wl,--export-dynamic $ ./test.o fname: ./test.o symbol: main
Edited by Ben Gamari
Please register or sign in to comment