Re: [PATCH 00/10] implement DYNAMIC_DEBUG_RELATIVE_POINTERS

Segher Boessenkool
2019-05-06T14:50:54Z

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