This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
ld gas Fake PLT entries and absolute address
- From: "chrima.hercou" <chrima dot hercou at laposte dot net>
- To: binutils at sourceware dot org
- Date: Mon, 22 Feb 2010 21:11:12 +0100 (CET)
- Subject: ld gas Fake PLT entries and absolute address
- Reply-to: "chrima.hercou" <chrima dot hercou at laposte dot net>
Hi Gnu community !
I've got some questions dealing with particular uses of GAS and LD :
I'm working on a code, in assembly X86-64 which must contains absolute
address of PLT entry. The idea is having something like :
label:
.long functionCall@PLT
later, i will load this address in a register, for an absolute call.
My problems are :
* How can i obtained this address ? For now, i compile the code, look at .plt
section, put the address and recompile it.
* How can i create artificial PLT entry ? For now, i use a declaration like the
'label' one, and put the '--unresolved-symbols=ignore-in-object-files' flag.
So, why this ?
The aim is having instrumentations in the code that are only activated when a
LD_PRELOAD is made. Instrumentations's function reside in PLT entries and the
address for the call (absolute PLT address) resides in particular headers.
It would be nice if i could compile without having to give a fake shared object
for having my PLT entries (and it will not resolve the first problem).
Best regards,
Matth
Une messagerie gratuite, garantie à vie et des services en plus, Ãa vous tente ?
Je crÃe ma boÃte mail www.laposte.net