This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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]

Including contents of arbitrary files in linker output


Is there an easy way to make the linker include the contents of an
arbitrary file? Like say, a command line option that takes a path and
LMA/VMA? 

The use case is to embed the ELF output for a machine (M1) in the ELF
output for another machine (M2). One "hacky" way I found is to generate a
hex/bin out of the ELF for M1, and generate an ELF for M2 using objcopy
for M2 and the hex/bin file. I then used the linker script to place
everything from the ELF for M2 into an output section at a specific
address.

Will this even work for the general case? Is there a recommended way to 
do this?

Regards
Senthil


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