問題:fileappender.o relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPI
解決:
- 使用 ar -x liblog4cplus.a 解包
- readelf --relocs fileappender.o | egrep '(GOT|PLT|JU?MP_SLOT)' 如果輸出為空,則該靜態庫沒有position-independent,需要在該靜態庫的編譯腳本添加 -fPIC