clarify the purpose of this project
[nyanglibc.git] / debug / getwd_chk.s
blob8214fa7829117896c45e49e09cb755bcc60f9f92
1 .text
2 #APP
3 .section .gnu.warning.getwd
4 .previous
5 #NO_APP
6 .p2align 4,,15
7 .globl __getwd_chk
8 .type __getwd_chk, @function
9 __getwd_chk:
10 subq $8, %rsp
11 call __getcwd
12 testq %rax, %rax
13 je .L5
14 .L1:
15 addq $8, %rsp
16 ret
17 .p2align 4,,10
18 .p2align 3
19 .L5:
20 movq __libc_errno@gottpoff(%rip), %rdx
21 cmpl $34, %fs:(%rdx)
22 jne .L1
23 call __chk_fail
24 .size __getwd_chk, .-__getwd_chk
25 .section .gnu.warning.getwd
26 #,"a",@progbits
27 .align 32
28 .type __evoke_link_warning_getwd, @object
29 .size __evoke_link_warning_getwd, 58
30 __evoke_link_warning_getwd:
31 .string "the `getwd' function is dangerous and should not be used."
32 .hidden __chk_fail
33 .hidden __getcwd