|
From: | Georg-Johann Lay |
Subject: | Re: [avr-libc-dev] Possible hole in the assembler interrupt documentation |
Date: | Thu, 01 Nov 2012 18:31:11 +0100 |
User-agent: | Thunderbird 2.0.0.24 (Windows/20100228) |
Joerg Wunsch schrieb:
As Dale wrote:The issue then is the case of a library that contains an ISR.That's correct. In this case, you have to cause an explicit undefined reference to it, in order to make the linker even consider pulling the library module.
Doesn't the linker look in the libraries if it finds a non-weak definition for a weak symbol?
__vector_8 is defined weak in .vectors (gcrt1.S, i,e, crt*.o) and defined there as __bad_interrupt. Is that sufficient to stop the linker from dearching for overrides of __vector_8?
Johann
In addition to placing another (referenced) symbol into the same module, this might be done using the -u linker option: suppose, my __vector_8 function where placed in a library, the respective (compiler) commandline switch would be "-Wl,-u,__vector_8". This makes the symbol "__vector_8" a "global undefined" straight from the beginning, so pulling the library module in satisfies that reference to the linker.
[Prev in Thread] | Current Thread | [Next in Thread] |