Created
February 22, 2012 21:19
-
-
Save aycanirican/1887363 to your computer and use it in GitHub Desktop.
dragonflybsd v.s. linux - errno access.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| aycan: ~$ uname -sm | |
| Linux x86_64 | |
| aycan: ~$ cat t.c | |
| #include <errno.h> | |
| f() { return errno; } | |
| aycan: ~$ gcc -c t.c -o t.o | |
| aycan: ~$ objdump -r t.o | |
| t.o: file format elf64-x86-64 | |
| RELOCATION RECORDS FOR [.text]: | |
| OFFSET TYPE VALUE | |
| 0000000000000005 R_X86_64_PC32 __errno_location-0x0000000000000004 | |
| RELOCATION RECORDS FOR [.eh_frame]: | |
| OFFSET TYPE VALUE | |
| 0000000000000020 R_X86_64_PC32 .text | |
| *************************** | |
| % uname -sm | |
| DragonFly x86_64 | |
| % cat t.c | |
| #include <errno.h> | |
| f() { return errno; } | |
| % gcc -c t.c -o t.o | |
| % objdump -r t.o | |
| t.o: file format elf64-x86-64 | |
| RELOCATION RECORDS FOR [.text]: | |
| OFFSET TYPE VALUE | |
| 0000000000000010 R_X86_64_GOTTPOFF errno+0xfffffffffffffffc | |
| RELOCATION RECORDS FOR [.eh_frame]: | |
| OFFSET TYPE VALUE | |
| 0000000000000020 R_X86_64_PC32 .text | |
| 000000000000003c R_X86_64_PC32 .text+0x000000000000001a | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment