This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: merging executables
- From: Ian Lance Taylor <ian at airs dot com>
- To: "Jan Hoogerbrugge" <hoogerbrugge at hotmail dot com>
- Cc: binutils at sources dot redhat dot com
- Date: 15 Feb 2002 11:00:01 -0800
- Subject: Re: merging executables
- References: <F186gbQUm1OP3nTWoUO00008607@hotmail.com>
"Jan Hoogerbrugge" <hoogerbrugge@hotmail.com> writes:
> I want to use libbfd to merge multiple ELF executables into one. Just
> copying the sections of a few input files to an output file. I wrote
> the following code, which does not work for some reason. It core dumps
> in bfd_copy_private_section_data. Any idea why??
I don't know if these are your only problems, but you didn't call
bfd_set_format() on the output file, and you didn't call
bfd_set_section_contents() for any section, so your output sections
are going to be empty.
Ian