Is there any macro or pointer within ld.so which can give me address range of all the plt sections?

StackOverflow https://stackoverflow.com/questions/22124807

문제

I am modifying the libc6 dynamic linker. For a given program which is run and all the shared libraries which are loaded with it I need the address range(start address + length) of all the respective .plt sections.

Is there any macro or pointers within the linker ld.so code which I can use for this purpose? I am going through the linker code but due to lack of documentation in this perspective I am not able to figure out the exact element for my purpose. Google for it does not give any specific results which are useful for me.

Since linker does the initial loading and relocation it should have these information. Any suggestions are highly appreciated.

EDIT

Is there a way to get section headers through linker? I can use them to get the plt section information.

Thanks

올바른 솔루션이 없습니다

다른 팁

On Linux you probably want to use dl_iterate_phdr(3)

BTW, you should study the source code, and perhaps modify, MUSL libc; it is quite readable and has its own dynamic linker.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top