[fpc-devel] Proposal: Supporting initial references for weakexternal

Jonas Maebe jonas.maebe at elis.ugent.be
Wed Jan 12 12:42:20 CET 2011


On 12 Jan 2011, at 06:29, Jeppe Johansen wrote:

> While trying to find a nice solution for generating interrupt vector  
> tables on ARM, I found that the usually employed solution is to  
> generate weak references to symbols, that are initialized to a  
> single handler. This way an application can override the weak  
> reference, by declaring a new symbol with the same name. While it's  
> possible to do that currently by using some external assembler code,  
> I think a simpler solution could be made by using the weakexternal  
> directive. The infrastructure is already there, but it's used in a  
> slightly different way.

How is it normally done in C? At first sight, using the weakexternal  
directive to /define/ symbols seems like a wrong approach.


Jonas



More information about the fpc-devel mailing list