0

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

rewyear
  • 3
  • 3

1 Answers1

0

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).

Employed Russian
  • 199,314
  • 34
  • 295
  • 362
  • I checked readelf output like your comment. section header offset was changed like attached output in origin post. So, ```prelink: /usr/lib/libmylib.so: section file offsets not monotonically increasing``` was printed.... Is there a way to solve this problem? – rewyear Jun 25 '21 at 02:47
  • @rewyear You want two answers for the price of one? Accept this one -- it answered your question. Ask a new one, with your actual question. http://xyproblem.info may be relevant here as well. – Employed Russian Jun 25 '21 at 04:49
  • Oh I'm Sorry for my mistake.... I apologize it. I take your advice and will ask question in new post Thanks – rewyear Jun 25 '21 at 06:15