placing data into a section
Daniel S. Wilkerson
dsw@cs.berkeley.edu
Tue Jul 11 16:19:00 GMT 2006
This is easy to do. See how we do it in build-interceptor.tigris.org.
Basically, use objcopy --add-section.
Daniel
vamsi krishna wrote:
> Hello
>
> > > When I am linking an elf executable, I would like to place some bulk
> > > data (e.g. a zip file or some other binary file) into a section in the
> > > final executable. How can I achieve this with ld commands and the
> > > linker script?
>
> I suggest you need to add this as a SEGMENT not a SECTION, because in
> a executable the section header table can be stripped off. You may
> need some mechanism to add the bulk file as a PHDR PT_LOAD entry.
>
> Just more curious on how would you refer this in your code?
>
> Thank you,
> Vamsi kundeti
More information about the Binutils
mailing list