[fpc-devel] Is there a less clumsy way to define a weak procedure?

Michael Ring mail at michael-ring.org
Sun Apr 26 20:48:36 CEST 2020

I have to define a weak procedure in implementation of a unit to make 
the linker happy in a special case:

procedure vPortFree; external name 'vPortFree';

procedure vPortFreeStub; assembler; nostackframe;
   .long vPortFree
   .weak vPortFree
   .set  vPortFree,vPortFreeStub

is there a more elegant way to do this? My target is arm-freertos. The 
function is actually never called, this is why it consists of a bkpt.


More information about the fpc-devel mailing list