This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Getting rid of interrupt vector table for AVR bootloader


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]