This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
A section is missing in S-Record
- From: Torsten Mohr <tmohr at s dot netic dot de>
- To: binutils <binutils at sources dot redhat dot com>
- Date: Tue, 17 Dec 2002 23:06:15 +0100
- Subject: A section is missing in S-Record
Hi everybody,
i configured, compiled and installed binutils-2.13 and gcc-3.2.1
for the target v850-unknown-elf on a linux host.
I'd like to use this tool chain for a NEC V850/SF1, an embedded
controller. This controller has its interrupt vectors in the
range 0x0000 to 0x0340, so i wrote a v850.ld:
MEMORY
{
vectors (rx) : ORIGIN = 0, LENGTH = 0x340
rom (rx) : ORIGIN = 0x340, LENGTH = 0x40000
ram (!rx) : ORIGIN = 0xffffb000, LENGTH = 0x2000
}
SECTIONS
{
.vectors : { *(.vectors)} >vectors
.rodata : { *(.rodata) } >rom
.text : { *(.text) } >rom
....
In crt0.s i wrote:
.section .vectors
.offset 0
jr start
When i link it all together i get this in the map file:
Memory Configuration
Name Origin Length Attributes
vectors 0x00000000 0x00000340 xr
rom 0x00000340 0x00040000 xr
ram 0xffffb000 0x00002000 !xr
*default* 0x00000000 0xffffffff
Linker script and memory map
.vectors 0x00000000 0x4
*(.vectors)
.vectors 0x00000000 0x4 out/crt0.o
.rodata
*(.rodata)
So the section vectors made it into the ELF file, but when i
try to generate an S-Record with this command:
v850-unknown-elf-objcopy -O srec --srec-forceS3 qwe.elf qwe.srec
There is NOTHING at address 0x0000, it all starts at 0x340.
Where are the interrupt vectors?
Thank you for any hints,
Torsten.