- 論壇徽章:
- 0
|
大家好,我使用如下參數(shù)編譯和鏈接了一個(gè)動(dòng)態(tài)庫:
riscv64-oe-linux-gcc
-mabi=lp64d -march=rv64imafdc -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now -fstack-protector-strong
-D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security
-O2 -pipe -g -feliminate-unused-debug-types
-fPIC -g -Wall -Wpointer-arith
-O2 -DICP_PARAM_CHECK -fstack-protector -fPIC -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -fno-strict-overflow -fno-delete-null-pointer-checks -fwrapv
-DUSER_SPACE -Wextra -Werror -Wno-missing-field-initializers -fno-strict-aliasing
-DDEBUG=1 -fstack-protector -fPIC -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -fno-strict-overflow -fno-delete-null-pointer-checks -fwrapv
riscv64-oe-linux-ld
-shared -z noexecstack -z relro -z now -z noexecstack -z relro -z now
-lc
在.o文件可以看到gcc的內(nèi)置函數(shù),但是在.so該內(nèi)置函數(shù)并沒有展開到本so里面,導(dǎo)致調(diào)用該so時(shí)提示“未定義的符號(hào)”
請問該如何定位和考慮這個(gè)問題????
|
|