Skip to content

Instantly share code, notes, and snippets.

@vibhavp
Last active August 29, 2015 14:23
Show Gist options
  • Save vibhavp/115f82ee0ba19947f0ec to your computer and use it in GitHub Desktop.
Save vibhavp/115f82ee0ba19947f0ec to your computer and use it in GitHub Desktop.
Optimising stuff
.file "array.c"
.section .text.unlikely,"ax",@progbits
.LCOLDB0:
.section .text.startup,"ax",@progbits
.LHOTB0:
.p2align 4,,15
.globl main
.type main, @function
main:
movl $5, %eax
ret
.size main, .-main
.section .text.unlikely
.LCOLDE0:
.section .text.startup
.LHOTE0:
.ident "GCC: (GNU) 5.1.0"
.section .note.GNU-stack,"",@progbits
int main()
{
int arr[3] = {1,2,3};
arr[0] = 5;
return arr[0];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment