Getting rid of interrupt vector table for AVR bootloader

Nick Clifton nickc@redhat.com
Mon Feb 24 16:55:00 GMT 2003


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



More information about the Binutils mailing list