* can we append a binary file at the end of output file
@ 2011-03-14 12:42 loody
2011-03-14 13:09 ` Andreas Schwab
0 siblings, 1 reply; 3+ messages in thread
From: loody @ 2011-03-14 12:42 UTC (permalink / raw)
To: binutils
Hi all:
I want linker to append a binary file at the end of output.
Should I use section command?
if so, what the format should I use?
I try below formula but it complain:
mydata.bin: file not recognized: File format not recognized
.mydata 0xbfc10000:
{
mydata.bin
}
--
Regards,
miloody
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: can we append a binary file at the end of output file
2011-03-14 12:42 can we append a binary file at the end of output file loody
@ 2011-03-14 13:09 ` Andreas Schwab
2011-03-15 14:19 ` loody
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Schwab @ 2011-03-14 13:09 UTC (permalink / raw)
To: loody; +Cc: binutils
loody <miloody@gmail.com> writes:
> I want linker to append a binary file at the end of output.
Assemble a file containing .incbin, and link that at the end.
Andreas.
--
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E
"And now for something completely different."
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: can we append a binary file at the end of output file
2011-03-14 13:09 ` Andreas Schwab
@ 2011-03-15 14:19 ` loody
0 siblings, 0 replies; 3+ messages in thread
From: loody @ 2011-03-15 14:19 UTC (permalink / raw)
To: Andreas Schwab; +Cc: binutils
hi andreas:
2011/3/14 Andreas Schwab <schwab@redhat.com>:
> loody <miloody@gmail.com> writes:
>
>> I want linker to append a binary file at the end of output.
>
> Assemble a file containing .incbin, and link that at the end.
It works :-)
I have one question.
Since I use a dummy assembly to include the binary file, the as still
try to generate the text, data and all othere sections of the object
file.
That means I have to use exclude_file in my link script for every
section command to keep the binary that I included intact and make it
whole appended at the fix place of my program.
is there smarter way to do so, such as write exclude_file once some
where in the link script instead of writing it in every section
command?
appreciate your help,
miloody
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-03-15 14:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-14 12:42 can we append a binary file at the end of output file loody
2011-03-14 13:09 ` Andreas Schwab
2011-03-15 14:19 ` loody
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).