Richard, >> Try a target like arm-linux (which doesn't use final_end_function), and hack >> the generated auto-host.h so that HAVE_AS_DWARF2_DEBUG_LINE is undefined. > > Trying arm-unknown-linux-gnueabi now...
I just built an ARM compiler and tried it out on my testcase. It generated this code for one of the thunks: .section .text._ZThn8_N1CD1Ev,"ax",%progbits .align 2 .global _ZThn8_N1CD1Ev .type _ZThn8_N1CD1Ev, %function _ZThn8_N1CD1Ev: .fnstart @ thunk.cc:25 .LM21: sub r0, r0, #8 b .LTHUNK0 .fnend .size _ZThn8_N1CD1Ev, .-_ZThn8_N1CD1Ev and further down, in the .debug_line section, this: .byte 0 @ set address *.LM21 .uleb128 0x5 .byte 0x2 .4byte .LM21 .byte 0x2f @ line 25 Same for the other thunk. I think that's all good. Do you still have concerns about the patch? -cary