Is there a way to use substitutes of fixup() and _dl_lookup_symbol() in glibc?

J

Jinghao

Hi,

During my research work, I need to call my own functions instead of
calling the runtime function "fixup()" and the internal function
"_dl_lookup_symbol()" in libc.so.

As I know, the address of fixup() was put in each PLT entry at the
beginning of a program execution, and the fixup() will call
_dl_lookup_symbol() to find the address of a function and complete the
relocation process.

I want to change the implementation of _dl_lookup_symbol() so that to
control its behaviors. I was wondering if there is a way to replace
fixup() or _dl_lookup_symbol() for my special programs without change
and recompile libc.so.

Thanks for your time.

Jinghao
 
L

Lawrence Kirby

Hi,

During my research work, I need to call my own functions instead of
calling the runtime function "fixup()" and the internal function
"_dl_lookup_symbol()" in libc.so.

Please note that the internals of glibc are well off-topic for
comp.lang.c. Followups set.

Lawrence
 
G

Giovanni

Hi,

During my research work, I need to call my own functions instead of
calling the runtime function "fixup()" and the internal function
"_dl_lookup_symbol()" in libc.so.

As I know, the address of fixup() was put in each PLT entry at the
beginning of a program execution, and the fixup() will call
_dl_lookup_symbol() to find the address of a function and complete the
relocation process.

I want to change the implementation of _dl_lookup_symbol() so that to
control its behaviors. I was wondering if there is a way to replace
fixup() or _dl_lookup_symbol() for my special programs without change
and recompile libc.so.

Thanks for your time.

Jinghao

Write your own code and include it in your project.
You can also put it in a personal library as long you list it early in
the compiler command line.

Ciao
Giovanni
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top