This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: binutils wizardry
- From: Sergei Organov <osv at topconrd dot ru>
- To: "Doyle, Patrick" <WPD at dtccom dot com>
- Cc: "'Gary Thomas'" <gary at mlbassoc dot com>, ecos discuss list <ecos-discuss at sources dot redhat dot com>
- Date: 30 Jul 2004 17:48:05 +0400
- Subject: Re: [ECOS] binutils wizardry
- References: <F18ED44D2778844592DFB732956B66510225C609@DTCNT40S4>
"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