[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] [Patch, avr] Shrink interrupt vector table down to la
From: |
Georg-Johann Lay |
Subject: |
Re: [avr-gcc-list] [Patch, avr] Shrink interrupt vector table down to last used entry |
Date: |
Fri, 01 Mar 2013 16:05:53 +0100 |
User-agent: |
Thunderbird 2.0.0.24 (X11/20100302) |
Senthil Kumar Selvaraj wrote:
>> Granted, the (saved memory) reward for the effort is small, but if the
>> user would specify the number of the highest used vector, then gas
>> conditional assembly, in a "bad vector" macro does handle the task:
>
> Ah, but right now, the vector table is defined in avr-libc
> (crt1/gcrt1.S) and gets built into crtxxx.o at avr-libc build time. It
> is then linked into the final executable automatically by the gcc
> driver. I guess that rules out conditional assembly?
It is reasonable that gcrt1.S is contained in a distribution so that users can
assemble an use it directly. There's already an issue for this: #38125.
http://savannah.nongnu.org/bugs/?38125
With that, it's straight forward to accomplish a small vector table:
Just -nostartfiles, add gcrt1.S to the project and define _VECTORS_SIZE.
That way it is flexible and freely adjustable without binutils hacks.
Johann