"Paulo J. Matos" <pocma...@gmail.com> writes:

> My thought was to fold __function_size still to a special label
> (unique for each function) that would be then generates by as and set
> to the unrelaxed size of the function. Once the linker performs the
> required relaxation it also modifies the label value accordingly.

You don't need to do that, you just need to tell the assembler to not
fully resolve the difference between two text symbols, but to leave it
to the linker as a PC-relative reloc.  In gas you typically do this by
defining DIFF_EXPR_OK in your config/tc-CPU.h file.

Ian

Reply via email to