https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68178
Richard Earnshaw <rearnsha at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #3 from Richard Earnshaw <rearnsha at gcc dot gnu.org> --- This is an assembler bug and it only affects ARM state (thumb2 is OK). In Thumb2 code we get: 00000000 <foo>: 0: 4770 bx lr 2: bf00 nop 00000004 <bar>: 4: 4801 ldr r0, [pc, #4] ; (c <bar+0x8>) 6: 4478 add r0, pc 8: 4770 bx lr a: bf00 nop c: 00000002 .word 0x00000002 c: R_ARM_REL32 foo While in ARM code we get: 00000000 <foo>: 0: e12fff1e bx lr 00000004 <bar>: 4: e59f0004 ldr r0, [pc, #4] ; 10 <bar+0xc> 8: e08f0000 add r0, pc, r0 c: e12fff1e bx lr 10: fffffff0 .word 0xfffffff0 (no relocation generated). even though the assembly output is equivalent. (resolving as invalid because this isn't a GCC problem but a GAS problem).