This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos 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]

Re: binutils wizardry


"Doyle, Patrick" <WPD@dtccom.com> writes:
> > From: Gary Thomas [mailto:gary@mlbassoc.com]
> >
> > Arrange to have your special data in it's own ELF section.  
> > Then you can
> > use objcopy to adjust the address of that section (and leave the rest 
> > alone).  You should be able to work out the details to get 
> > your program
> > to load one place and the data in a totally different one.
> > 
> It's the "Arrange to have your special data in it's own ELF section" bit
> that I'm looking to get started on.  Starting with the raw binary file, can
> I convince objcopy or ld to wrap the appropriate gizmos around it to turn it
> into an ELF section starting at address 0x80000?

That's how I do an elf file containing section called "section_name"
that contains data from a binary:

$ echo | as -o elf_file
$ objcopy --add-section=section_name=binary_file elf_file

BR,
Sergei.


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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