[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Find out what symbols in dynamic library have not been compiled with -fPIC



On 24/12/2014 23:25, Mike Hommey wrote:
> Install the elfutils package and use eu-findtextrel, it's sometimes
> wrong, but it should get you started. The manual way to do this is to
> crossreference the output of readelf -r with the symbol table and
> readelf -l.

Thanks, Mike, that helped a lot.

P.S. For someone looking for complete solution to locate violating
symbols and search for static libraries they came from:

> eu-findtextrel libtest.so | sort -u | perl -ne 'while (<>) { while (/the function \x27(\w+)\x27/g) { print "$1\n"} }' | while read i; do scanelf -l -A -s $i | grep $i; done


-- 
With best regards,
Dmitry


Reply to: