http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46275
--- Comment #7 from Uros Bizjak <ubizjak at gmail dot com> 2010-11-03 08:47:48
UTC ---
For some reason, the addend in R_386_GOTPC reloc is missing when compiled with
-masm=intel. The objdump difference between -masm=att [hello.o] that works and
-masm=intel [hello_.o] that fails is:
@@ -1,5 +1,5 @@
-hello.o: file format elf32-i386
+hello_.o: file format elf32-i386
Disassembly of section .text:
@@ -12,7 +12,7 @@
7: 83 ec 1c sub $0x1c,%esp
a: e8 fc ff ff ff call b <main+0xb>
b: R_386_PC32 __i686.get_pc_thunk.bx
- f: 81 c3 02 00 00 00 add $0x2,%ebx
+ f: 81 c3 00 00 00 00 add $0x0,%ebx
11: R_386_GOTPC _GLOBAL_OFFSET_TABLE_
15: 8d 83 00 00 00 00 lea 0x0(%ebx),%eax
17: R_386_GOTOFF .rodata