1 .section .text@comdatfunc, "x" 2 .linkonce discard 3 .globl comdatfunc 4comdatfunc: 5 leaq .Ljumptable(%rip), %rax 6 movslq (%rax, %rcx, 4), %rcx 7 addq %rcx, %rax 8 jmp *%rax 9 10 .section .rdata, "dr" 11 .long 0xcccccccc 12.Ljumptable: 13 .long .Ltail1-.Ljumptable 14 .long .Ltail2-.Ljumptable 15 .long .Ltail3-.Ljumptable 16 .long 0xdddddddd 17 18 .section .text@comdatfunc, "x" 19# If assembled with binutils, the following line can be kept in: 20# .linkonce discard 21.Ltail1: 22 movl $1, %eax 23 ret 24.Ltail2: 25 movl $2, %eax 26 ret 27.Ltail3: 28 movl $3, %eax 29 ret 30 31 .text 32 .globl otherfunc 33otherfunc: 34 call comdatfunc 35 ret 36