This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Getting rid of interrupt vector table for AVR bootloader
- From: Nick Clifton <nickc at redhat dot com>
- To: "Mark van de Veerdonk" <uhuh at vianetworks dot nl>
- Cc: <binutils at sources dot redhat dot com>
- Date: 24 Feb 2003 16:58:15 +0000
- Subject: Re: Getting rid of interrupt vector table for AVR bootloader
- References: <001e01c2dbf4$a22879e0$6400a8c0@PCMARK>
Hi Mark,
> I've created a linker script that tells ld that text section starts at
> address 0xf800 and which has a modified text section description. It leaves
> out the all C++ related initialization and finilization code (just to be
> sure) and the .vectors section.
>
> The result is partially successful. Much to my surprise, it seems
> the linker has now moved the interrupt vector table to the end of
> the image!
The problem is that you need to tell the linker explicitly to discard
the .vectors section. If a section is not mentioned in the linker
script it will be treated as an "orphan" section and appended after
all the other sections. Try adding a line like this to your script:
/DISCARD/ : { *(.vectors); }
You will probably want to have similar lines for the C++ sections as
well, assume that you do not want them either. See the linker manual
for more information.
Cheers
Nick