Implementation in our code base: bug.h Again, the idea and code hints are from the kernel asm volatile( "1: " __BUG_INSTR "\n" ".section .rodata.str, \"aMS\", %progbits, 1\n" "2:\t.asciz " #__file "\n" ".previous\n" ".section .bug_table, \"a\"\n" ".align 2\n" ".word 1b, 2b\n" ".hword " #__line ", " #__id "\n" ".previous\n");