This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
RE: how to add the contents of an elf file into another elf file?
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'??'" <yanmiaobest at gmail dot com>, <binutils at sourceware dot org>
- Date: Tue, 11 Dec 2007 11:09:30 -0000
- Subject: RE: how to add the contents of an elf file into another elf file?
- References: <844375050712101933h6b764b18ofea4272a1755dc0e@mail.gmail.com>
On 11 December 2007 03:34, ?? wrote:
> Hi all,
>
> I have 2 .o files: a.o, b.o, which will be linked with other libs
> to generate an exeutable file.
> I would like the contents of b.o as a whole to be an independant
> part of the executable file. b.o contains data and instructions which
> will be created as a process at runtime( embedded target ).
> How can I do this?
One solution would be to use objcopy to rename the sections in b.o to some new
names, then use a custom linker script to group them in a single output section
together, bracketed by start and end symbols.
cheers,
DaveK
--
Can't think of a witty .sigline today....