Do patchelf modify lib's section offset?

158 views Asked by At

I'm trying to check the following issue

mylib.so don't have SONAME.

So, I added SONAME by using patchelf like below command

patchelf --set-soname "libmylib.so" libmylib.so

And i checked elf info by using readelf -a

Next, I used 'prelink' for reducing boot time.

but error occurred with below log

root@:~# prelink -aRm
prelink: /usr/lib/libmylib.so: section file offsets not monotonically increasing

Maybe... I think that patchelf have effects on mylib's elf info, structure

Do patchelf modify lib section offset?

I wonder how patchelf affects elf info.

+) readelf output compare left is patchelf not applied output and another is which patchelf applied.

enter image description here

1

There are 1 answers

3
Employed Russian On BEST ANSWER

I wonder how patchelf affects elf info.

You don't need to wonder -- you could just see.

Compare the output from readelf -WS libmyib.so before and after, and you will observe that patchelf does affect ELF info (it would be pointless if it didn't).