Skip to content

Instantly share code, notes, and snippets.

@jdswinbank
Last active August 29, 2015 14:11
Show Gist options
  • Save jdswinbank/3ab659d1ec0c71474f0c to your computer and use it in GitHub Desktop.
Save jdswinbank/3ab659d1ec0c71474f0c to your computer and use it in GitHub Desktop.
[jds@magpie ~]$ cat -n test.c
1 const char s[] = "pqrs";
2
3 int main(void) {
4 const char t[] = "abcd";
5 const char* u = "efgh";
6 return 0;
7 }
[jds@magpie ~]$ gcc -o test-gcc test.c
[jds@magpie ~]$ clang -o test-clang test.c
[jds@magpie ~]$ nm test-gcc
0000000100000000 T __mh_execute_header
0000000100000f85 T _main
0000000100000fa6 S _s
U dyld_stub_binder
[jds@magpie ~]$ nm test-clang
0000000100000000 T __mh_execute_header
0000000100000f70 T _main
0000000100000f92 s _main.t
0000000100000f8d S _s
U dyld_stub_binder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment