Gcc inline asm embedding pointer to .rodata in .text, x86?

The same thing happens using clang, probably because the code generator doesn't know the operand is bing used in a . Long rather than as an immediate instruction operand. You code try something like: const char str = "bar"; #define string(str) __asm__ __volatile__ \ ( \ "jmp 0f\n\t" \ ".

Long " #str "\n\t" \ "0:" \ ) int main() { string(str); return 0; } (I had to remove the "static" on str because the compiler optimized it out as not being referenced. ).

That does fix the example I posted, but not the actual use case unfortunately. Was actually using FILE, etc, so the gcc was generating temporary symbols like . LC0, then getting link errors looking for $.

LC0. Want to avoid generating symbol names in a macro, so as to avoid possible clashes (even with LINE appeneded). Think I have just found a solution though... the $ is being added because of the AT&T syntax, adding -masm=intel works correctly.

Thanks for having a look at this Richard, much appreciated. – luke h Jan 28 at 11:24 No problem. It distracted me from real work.

;-) – Richard Pennington Jan 28 at 11:32.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions