Skip to content

Instantly share code, notes, and snippets.

@pnwamk
Created March 25, 2020 15:51
Show Gist options
  • Select an option

  • Save pnwamk/8d8f40f524ca2ffde4ea655c1887ea18 to your computer and use it in GitHub Desktop.

Select an option

Save pnwamk/8d8f40f524ca2ffde4ea655c1887ea18 to your computer and use it in GitHub Desktop.
test-switch-jump-table.clang.nostdlib.x86_64.re.exe: file format elf64-x86-64
Disassembly of section .text:
00000000004000f0 <mod_5>:
4000f0: e9 0b ff 20 00 jmpq 610000 <__renovate_mod_5>
4000f5: cc int3
4000f6: cc int3
4000f7: cc int3
4000f8: cc int3
4000f9: cc int3
4000fa: cc int3
4000fb: cc int3
4000fc: cc int3
4000fd: cc int3
4000fe: cc int3
4000ff: cc int3
400100: cc int3
400101: cc int3
400102: cc int3
400103: cc int3
400104: cc int3
400105: cc int3
400106: cc int3
400107: cc int3
400108: cc int3
400109: cc int3
40010a: cc int3
40010b: cc int3
40010c: cc int3
40010d: cc int3
40010e: cc int3
40010f: cc int3
400110: cc int3
400111: cc int3
400112: cc int3
400113: cc int3
400114: cc int3
400115: cc int3
400116: cc int3
400117: cc int3
400118: cc int3
400119: cc int3
40011a: cc int3
40011b: cc int3
40011c: cc int3
40011d: cc int3
40011e: cc int3
40011f: cc int3
400120: cc int3
400121: cc int3
400122: cc int3
400123: cc int3
400124: cc int3
400125: cc int3
400126: cc int3
400127: cc int3
400128: cc int3
400129: cc int3
40012a: cc int3
40012b: cc int3
40012c: cc int3
40012d: cc int3
40012e: cc int3
40012f: cc int3
400130: cc int3
400131: cc int3
400132: cc int3
400133: cc int3
400134: cc int3
400135: cc int3
400136: cc int3
400137: cc int3
400138: cc int3
400139: cc int3
40013a: cc int3
40013b: cc int3
40013c: cc int3
40013d: cc int3
40013e: cc int3
40013f: cc int3
400140: cc int3
400141: cc int3
400142: cc int3
400143: cc int3
400144: cc int3
400145: cc int3
400146: cc int3
400147: cc int3
400148: cc int3
400149: cc int3
40014a: cc int3
40014b: 00 00 add %al,(%rax)
40014d: cc int3
40014e: cc int3
40014f: cc int3
400150: cc int3
400151: cc int3
400152: cc int3
400153: cc int3
400154: cc int3
400155: cc int3
400156: cc int3
400157: cc int3
400158: cc int3
400159: cc int3
40015a: cc int3
40015b: cc int3
40015c: cc int3
40015d: cc int3
40015e: cc int3
40015f: cc int3
400160: cc int3
400161: cc int3
400162: cc int3
400163: cc int3
400164: cc int3
400165: 00 00 add %al,(%rax)
400167: cc int3
400168: cc int3
400169: cc int3
40016a: cc int3
40016b: cc int3
40016c: cc int3
40016d: cc int3
40016e: cc int3
40016f: cc int3
400170: cc int3
400171: cc int3
400172: cc int3
400173: cc int3
400174: cc int3
400175: cc int3
400176: cc int3
400177: cc int3
400178: cc int3
400179: cc int3
40017a: cc int3
40017b: cc int3
40017c: cc int3
40017d: cc int3
40017e: cc int3
40017f: 00 00 add %al,(%rax)
400181: cc int3
400182: cc int3
400183: cc int3
400184: cc int3
400185: cc int3
400186: cc int3
400187: cc int3
400188: cc int3
400189: cc int3
40018a: cc int3
40018b: cc int3
40018c: cc int3
40018d: cc int3
40018e: cc int3
40018f: cc int3
400190: cc int3
400191: cc int3
400192: cc int3
400193: cc int3
400194: cc int3
400195: cc int3
400196: cc int3
400197: cc int3
400198: cc int3
400199: 00 00 add %al,(%rax)
40019b: cc int3
40019c: cc int3
40019d: cc int3
40019e: cc int3
40019f: cc int3
4001a0: cc int3
4001a1: cc int3
4001a2: cc int3
4001a3: cc int3
4001a4: cc int3
4001a5: cc int3
4001a6: cc int3
4001a7: cc int3
4001a8: cc int3
4001a9: cc int3
4001aa: cc int3
4001ab: cc int3
4001ac: cc int3
4001ad: cc int3
4001ae: cc int3
4001af: cc int3
4001b0: cc int3
4001b1: cc int3
4001b2: cc int3
4001b3: 00 00 add %al,(%rax)
4001b5: cc int3
4001b6: cc int3
4001b7: cc int3
4001b8: cc int3
4001b9: cc int3
4001ba: cc int3
4001bb: cc int3
4001bc: cc int3
4001bd: cc int3
4001be: cc int3
4001bf: cc int3
4001c0: cc int3
4001c1: cc int3
4001c2: cc int3
4001c3: cc int3
4001c4: cc int3
4001c5: cc int3
4001c6: cc int3
4001c7: cc int3
4001c8: cc int3
4001c9: cc int3
4001ca: cc int3
4001cb: cc int3
4001cc: 0f 1f 40 00 nopl 0x0(%rax)
00000000004001d0 <entry>:
4001d0: e9 3e ff 20 00 jmpq 610113 <__renovate_entry>
4001d5: cc int3
4001d6: cc int3
4001d7: cc int3
4001d8: cc int3
4001d9: cc int3
4001da: cc int3
4001db: cc int3
4001dc: cc int3
4001dd: cc int3
4001de: cc int3
4001df: cc int3
4001e0: cc int3
4001e1: cc int3
4001e2: cc int3
4001e3: cc int3
4001e4: cc int3
4001e5: cc int3
4001e6: cc int3
4001e7: cc int3
4001e8: cc int3
4001e9: cc int3
4001ea: cc int3
4001eb: cc int3
4001ec: cc int3
4001ed: cc int3
4001ee: cc int3
4001ef: cc int3
4001f0: cc int3
4001f1: cc int3
4001f2: cc int3
4001f3: cc int3
4001f4: cc int3
4001f5: cc int3
4001f6: cc int3
4001f7: cc int3
4001f8: cc int3
4001f9: cc int3
4001fa: cc int3
4001fb: cc int3
4001fc: cc int3
4001fd: cc int3
4001fe: cc int3
4001ff: cc int3
400200: cc int3
400201: cc int3
400202: cc int3
400203: cc int3
400204: cc int3
400205: cc int3
400206: cc int3
400207: cc int3
400208: cc int3
400209: cc int3
40020a: cc int3
40020b: cc int3
40020c: cc int3
40020d: cc int3
40020e: cc int3
40020f: cc int3
400210: cc int3
400211: cc int3
400212: cc int3
400213: cc int3
400214: cc int3
400215: cc int3
400216: cc int3
400217: cc int3
400218: cc int3
400219: cc int3
40021a: cc int3
40021b: cc int3
40021c: cc int3
40021d: cc int3
40021e: cc int3
40021f: cc int3
400220: cc int3
400221: cc int3
400222: cc int3
400223: cc int3
400224: cc int3
400225: cc int3
400226: cc int3
400227: cc int3
400228: cc int3
400229: cc int3
40022a: cc int3
40022b: cc int3
40022c: cc int3
40022d: cc int3
40022e: cc int3
40022f: cc int3
400230: cc int3
400231: cc int3
400232: cc int3
400233: cc int3
400234: cc int3
400235: cc int3
400236: cc int3
400237: cc int3
400238: cc int3
400239: cc int3
40023a: cc int3
40023b: cc int3
40023c: cc int3
40023d: cc int3
40023e: cc int3
40023f: cc int3
400240: cc int3
400241: cc int3
400242: cc int3
400243: cc int3
400244: cc int3
400245: cc int3
400246: cc int3
400247: cc int3
400248: cc int3
400249: cc int3
40024a: cc int3
40024b: cc int3
40024c: ff cc dec %esp
40024e: cc int3
40024f: cc int3
400250: cc int3
400251: cc int3
400252: cc int3
400253: cc int3
400254: cc int3
400255: cc int3
400256: cc int3
400257: cc int3
400258: cc int3
400259: cc int3
40025a: cc int3
40025b: cc int3
40025c: cc int3
40025d: c3 retq
40025e: 66 90 xchg %ax,%ax
0000000000400260 <_start>:
400260: e9 3f ff 20 00 jmpq 6101a4 <__renovate__start>
400265: cc int3
400266: cc int3
400267: cc int3
400268: cc int3
400269: cc int3
40026a: cc int3
40026b: cc int3
40026c: cc int3
40026d: cc int3
40026e: cc int3
40026f: cc int3
400270: cc int3
400271: cc int3
400272: cc int3
400273: cc int3
400274: cc int3
400275: cc int3
400276: cc int3
400277: cc int3
400278: cc int3
400279: cc int3
40027a: cc int3
Disassembly of section .extratext:
0000000000610000 <__renovate_mod_5>:
610000: 55 push %rbp
610001: 48 89 e5 mov %rsp,%rbp
610004: 48 89 7d f0 mov %rdi,-0x10(%rbp)
610008: 48 89 75 e8 mov %rsi,-0x18(%rbp)
61000c: 48 89 55 e0 mov %rdx,-0x20(%rbp)
610010: 48 89 4d d8 mov %rcx,-0x28(%rbp)
610014: 4c 89 45 d0 mov %r8,-0x30(%rbp)
610018: 4c 89 4d c8 mov %r9,-0x38(%rbp)
61001c: 0f 1f 44 cc cc nopl -0x34(%rsp,%rcx,8)
610021: 48 8b 45 f0 mov -0x10(%rbp),%rax
610025: 48 89 c1 mov %rax,%rcx
610028: 48 83 e9 04 sub $0x4,%rcx
61002c: 48 89 45 c0 mov %rax,-0x40(%rbp)
610030: 48 89 4d b8 mov %rcx,-0x48(%rbp)
610034: 0f 87 c2 00 00 00 ja 6100fc <__renovate_mod_5+0xfc>
61003a: 0f 1f 44 cc cc nopl -0x34(%rsp,%rcx,8)
61003f: 48 8b 45 c0 mov -0x40(%rbp),%rax
610043: 48 8b 0c c5 80 02 40 mov 0x400280(,%rax,8),%rcx
61004a: 00
61004b: 48 81 f8 00 00 00 00 cmp $0x0,%rax
610052: 0f 84 2c 00 00 00 je 610084 <__renovate_mod_5+0x84>
610058: 48 81 f8 01 00 00 00 cmp $0x1,%rax
61005f: 0f 84 37 00 00 00 je 61009c <__renovate_mod_5+0x9c>
610065: 48 81 f8 02 00 00 00 cmp $0x2,%rax
61006c: 0f 84 42 00 00 00 je 6100b4 <__renovate_mod_5+0xb4>
610072: 48 81 f8 03 00 00 00 cmp $0x3,%rax
610079: 0f 84 4d 00 00 00 je 6100cc <__renovate_mod_5+0xcc>
61007f: e9 60 00 00 00 jmpq 6100e4 <__renovate_mod_5+0xe4>
610084: 48 63 05 18 10 60 00 movslq 0x601018(%rip),%rax # c110a3 <__renovate__start+0x600eff>
61008b: 48 03 45 e8 add -0x18(%rbp),%rax
61008f: 89 c1 mov %eax,%ecx
610091: 89 0d 18 10 60 00 mov %ecx,0x601018(%rip) # c110af <__renovate__start+0x600f0b>
610097: e9 28 01 df ff jmpq 4001c4 <mod_5+0xd4>
61009c: 48 63 05 18 10 60 00 movslq 0x601018(%rip),%rax # c110bb <__renovate__start+0x600f17>
6100a3: 48 03 45 e0 add -0x20(%rbp),%rax
6100a7: 89 c1 mov %eax,%ecx
6100a9: 89 0d 18 10 60 00 mov %ecx,0x601018(%rip) # c110c7 <__renovate__start+0x600f23>
6100af: e9 10 01 df ff jmpq 4001c4 <mod_5+0xd4>
6100b4: 48 63 05 18 10 60 00 movslq 0x601018(%rip),%rax # c110d3 <__renovate__start+0x600f2f>
6100bb: 48 03 45 d8 add -0x28(%rbp),%rax
6100bf: 89 c1 mov %eax,%ecx
6100c1: 89 0d 18 10 60 00 mov %ecx,0x601018(%rip) # c110df <__renovate__start+0x600f3b>
6100c7: e9 f8 00 df ff jmpq 4001c4 <mod_5+0xd4>
6100cc: 48 63 05 18 10 60 00 movslq 0x601018(%rip),%rax # c110eb <__renovate__start+0x600f47>
6100d3: 48 03 45 d0 add -0x30(%rbp),%rax
6100d7: 89 c1 mov %eax,%ecx
6100d9: 89 0d 18 10 60 00 mov %ecx,0x601018(%rip) # c110f7 <__renovate__start+0x600f53>
6100df: e9 e0 00 df ff jmpq 4001c4 <mod_5+0xd4>
6100e4: 48 63 05 18 10 60 00 movslq 0x601018(%rip),%rax # c11103 <__renovate__start+0x600f5f>
6100eb: 48 03 45 c8 add -0x38(%rbp),%rax
6100ef: 89 c1 mov %eax,%ecx
6100f1: 89 0d 18 10 60 00 mov %ecx,0x601018(%rip) # c1110f <__renovate__start+0x600f6b>
6100f7: e9 c8 00 df ff jmpq 4001c4 <mod_5+0xd4>
6100fc: 48 8b 45 f0 mov -0x10(%rbp),%rax
610100: 48 83 e8 05 sub $0x5,%rax
610104: 48 89 45 f0 mov %rax,-0x10(%rbp)
610108: e9 14 ff ff ff jmpq 610021 <__renovate_mod_5+0x21>
61010d: 48 8b 45 f8 mov -0x8(%rbp),%rax
610111: 5d pop %rbp
610112: c3 retq
0000000000610113 <__renovate_entry>:
610113: 55 push %rbp
610114: 48 89 e5 mov %rsp,%rbp
610117: 48 83 ec 30 sub $0x30,%rsp
61011b: 48 b8 08 10 60 00 00 movabs $0x601008,%rax
610122: 00 00 00
610125: 48 b9 0c 10 60 00 00 movabs $0x60100c,%rcx
61012c: 00 00 00
61012f: 48 ba 14 10 60 00 00 movabs $0x601014,%rdx
610136: 00 00 00
610139: 48 be 10 10 60 00 00 movabs $0x601010,%rsi
610140: 00 00 00
610143: 48 bf 04 10 60 00 00 movabs $0x601004,%rdi
61014a: 00 00 00
61014d: 49 b8 00 10 60 00 00 movabs $0x601000,%r8
610154: 00 00 00
610157: 4c 89 45 f8 mov %r8,-0x8(%rbp)
61015b: 48 89 7d f0 mov %rdi,-0x10(%rbp)
61015f: 48 89 75 e8 mov %rsi,-0x18(%rbp)
610163: 48 89 55 e0 mov %rdx,-0x20(%rbp)
610167: 48 89 4d d8 mov %rcx,-0x28(%rbp)
61016b: 48 89 45 d0 mov %rax,-0x30(%rbp)
61016f: 48 63 3d 00 10 60 00 movslq 0x601000(%rip),%rdi # c11176 <__renovate__start+0x600fd2>
610176: 48 8b 75 f0 mov -0x10(%rbp),%rsi
61017a: 48 8b 55 e8 mov -0x18(%rbp),%rdx
61017e: 48 8b 4d e0 mov -0x20(%rbp),%rcx
610182: 4c 8b 45 d8 mov -0x28(%rbp),%r8
610186: 4c 8b 4d d0 mov -0x30(%rbp),%r9
61018a: e8 60 ff de ff callq 4000ef <mod_5-0x1>
61018f: e9 b8 00 df ff jmpq 40024c <entry+0x7c>
610194: 41 89 c2 mov %eax,%r10d
610197: 44 89 15 18 10 60 00 mov %r10d,0x601018(%rip) # c111b6 <__renovate__start+0x601012>
61019e: 48 83 c4 30 add $0x30,%rsp
6101a2: 5d pop %rbp
6101a3: c3 retq
00000000006101a4 <__renovate__start>:
6101a4: 55 push %rbp
6101a5: 48 89 e5 mov %rsp,%rbp
6101a8: e8 66 ff ff ff callq 610113 <__renovate_entry>
6101ad: 0f 1f 44 cc cc nopl -0x34(%rsp,%rcx,8)
6101b2: 48 c7 c7 00 00 00 00 mov $0x0,%rdi
6101b9: 48 c7 c0 3c 00 00 00 mov $0x3c,%rax
6101c0: 0f 05 syscall
6101c2: 0f 1f 44 cc cc nopl -0x34(%rsp,%rcx,8)
6101c7: 5d pop %rbp
6101c8: c3 retq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment