Re: [PATCH 00/10] implement DYNAMIC_DEBUG_RELATIVE_POINTERS

From: Segher Boessenkool
Date: Mon May 06 2019 - 10:51:35 EST


On Mon, May 06, 2019 at 09:34:55AM +0200, Rasmus Villemoes wrote:
> I _am_ bending the C rules a bit with the "extern some_var; asm
> volatile(".section some_section\nsome_var: blabla");". I should probably
> ask on the gcc list whether this way of defining a local symbol in
> inline assembly and referring to it from C is supposed to work, or it
> just happens to work by chance.

It only works by chance. There is no way GCC can know the asm needs
that variable. If you make it (or its address) an input of the asm it
should work as far as I can see? (Need exact code to analyse it exactly).


Segher