This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ELF executable relinking


Hi all,
I have a simple question I couldn't answer searching the archives or
googling the
web or groups, so here I am.

Basically, I want to add new unrelated code to an existing ELF executable
ET_EXEC), by relinking it with a relocatable object (ET_REL).
Is it possible to input an executable and one or more relocatable
object to the link
editor and generate a new executable with code and data from all objects?

I tried it but it didn't work, I get 'multiple definition errors'
(related to symbols which
marks the .dynamic and .got sections). I also tried preserving the relocation
information within the executable, stripping the duplicate symbols,
link with/without
libc (already linked to the old executable). Nothing seems to work.
The best result I got is a "successfull" relink and segmentation fault.

Please CC me as I'm not subscribed to the list. Thank you.

Regards,
Francesco Casadei


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]