Skip to content

Instantly share code, notes, and snippets.

@mrdomino
Created June 21, 2016 00:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrdomino/2a0025d8c53a97d1493d0a24be9422be to your computer and use it in GitHub Desktop.
Save mrdomino/2a0025d8c53a97d1493d0a24be9422be to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main() {
while (1) puts("whee");
}
.file "a.c"
.section .rodata
.LC0:
.string "whee"
.text
.globl main
.type main, @function
main:
.LFB0:
.cfi_startproc
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
movq %rsp, %rbp
.cfi_def_cfa_register 6
.L2:
movl $.LC0, %edi
call puts
jmp .L2
.cfi_endproc
.LFE0:
.size main, .-main
.ident "GCC: (GNU) 4.9.3"
.section .note.GNU-stack,"",@progbits
--- a.s 2016-06-20 20:13:27.523667291 -0400
+++ b.s 2016-06-20 20:13:28.844667329 -0400
@@ -1,4 +1,4 @@
- .file "a.c"
+ .file "b.c"
.section .rodata
.LC0:
.string "whee"
#include <stdio.h>
int main() {
for (;;) puts("whee");
}
.file "b.c"
.section .rodata
.LC0:
.string "whee"
.text
.globl main
.type main, @function
main:
.LFB0:
.cfi_startproc
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
movq %rsp, %rbp
.cfi_def_cfa_register 6
.L2:
movl $.LC0, %edi
call puts
jmp .L2
.cfi_endproc
.LFE0:
.size main, .-main
.ident "GCC: (GNU) 4.9.3"
.section .note.GNU-stack,"",@progbits
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment