* still problems linking plain data into an application (arm-elf)
@ 2001-05-28 9:35 Andreas Bürgel
2001-05-29 0:56 ` Nick Clifton
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Bürgel @ 2001-05-28 9:35 UTC (permalink / raw)
To: binutils
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1519 bytes --]
Hi folks,
I want to link a plain data file - hex format or binary - into my application. Currently I'm using a linker script with an input-command "INPUT (<DATAFILE>)". Unfortunately the only format the linker pretends to recognize ist "Intel Hex", using other formats I get a " File format not recognized"-error.
1.) My arm-elf binutils claim to support even texhex and binary format. But why do they complain when using something other than Intel-hex?
2.) Is there an additional option for the "INPUT" command describing the input file format?
3.) When using Intel-hex (ihex) as data file format, the data file is linked into the ".sec1"-section of the application, but both nibbles in every byte seem to be exchanged with their companion mysteriously excluding the first 32-bit-word of the data. Can I suppress this manipulation of my data?
host-system is Intel-Linux, target system is arm-elf.
binutils version is 2.10.1
Thanks in advance,
-----------------------------------------------------
i.A. Andreas Bürgel GenoLogic GmbH
Software Engineer Joseph-von-Fraunhofer-Str. 13
D-44227 DORTMUND
Germany
ab@genologic.de phone +49 (0) 231/477349-0
fax +49 (0) 231/4761234
______________________________________________________________________________
Ferienklick.de - Jede Menge Urlaub auf einen Blick!
Hier geht's zu Ihrem Traumstrand: http://ferienklick.de/?PP=2-0-100-105-1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: still problems linking plain data into an application (arm-elf)
2001-05-28 9:35 still problems linking plain data into an application (arm-elf) Andreas Bürgel
@ 2001-05-29 0:56 ` Nick Clifton
0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2001-05-29 0:56 UTC (permalink / raw)
To: Andreas Bürgel; +Cc: binutils
Hi Andreas,
> I want to link a plain data file - hex format or binary - into my
> application. Currently I'm using a linker script with an
> input-command "INPUT (<DATAFILE>)". Unfortunately the only format
> the linker pretends to recognize ist "Intel Hex", using other
> formats I get a " File format not recognized"-error.
Another way to solve this problem is to use objcopy to convert the
data file into an ELF format file and then just link it in. For
example:
objcopy -I binary -O elf32-little-arm data_file new_object.o
You may get an error message "Warning: Output file cannot represent
architecture UNKNOWN!" in which case add a -B option like this:
objcopy -I binary -O elf32-little-arm -B arm data_file new_object.o
This will create an object file with the data in a .data section. If
this is unsuitable you can then use the linker and a small little
script to rename the section to something else, as in:
ld -T convert.ls new_object.o -o resectioned_object.o
and the linker script looks like:
SECTIONS
{
.new_section_name : { *(.data) }
}
Cheers
Nick
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-05-29 0:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-28 9:35 still problems linking plain data into an application (arm-elf) Andreas Bürgel
2001-05-29 0:56 ` Nick Clifton
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).