bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Embedding ELFs, Using objcopy and/or xdd


From: Nick Clifton
Subject: Re: Embedding ELFs, Using objcopy and/or xdd
Date: Thu, 20 Nov 2008 11:15:30 +0000
User-agent: Thunderbird 2.0.0.16 (X11/20080723)

Hi mondialeeer,

I am currently trying to embed an ELF into a larger ELF that will manage this
ELF (boostrap it and execute it).

Do you know about the ".incbin" assembler pseudo op which allows you to insert an arbitrary file into a section ? You could use this to embed your small ELF executable into the large ELF executable with symbols defined exactly where you want them.

Extra information is inserted when trying to embed an ELF into a larger ELF. This extra info makes the "start" and "end" labels useless

What "start" and "end" labels are you talking about ?

 if code in the
larger ELF would like to jump to the beginning of the code section in the
embedded ELF.

For instance:
xdd -i small_elf.o small_elf.c

Note - xdd is not a binutils program so we cannot offer you any help with using it.

Is this extra information the binary encoded symbol table of the ELF?

No idea. It is probably the ELF header information though. You should have a look at the ELF standard and read up about the format of the header.

Cheers
  Nick






reply via email to

[Prev in Thread] Current Thread [Next in Thread]