Hi Jonathan,
The assembly generated in case of clang-3.5 is
indirect_call:
.fnstart
.Leh_func_begin0:
ldr r0, .LCPI0_0
ldr r1, .LCPI0_1
.LPC0_0:
add r0, pc, r0
ldr r0, [r1, r0]
ldr r0, [r0]
bx r0
.align 2
.LCPI0_0:
.long _GLOBAL_OFFSET_TABLE_-(.LPC0_0+8)
.LCPI0_1:
.long indirect_func(GOT)
.Ltmp0:
.size indirect_call, .Ltmp0-indirect_call
.Leh_func_end0:
.fnend
Hmm, never mind. This looks correct. This is tail call optimization, which is possible because indirect_call() doesn't have anything in its frame.
Cheers,
Jon