Skip to content

Commit

Permalink
[docs] disbale canary protection
Browse files Browse the repository at this point in the history
The newer version clang enables canary protection even if the -nostdlib is specified. lld complains about symbol  '__stack_chk_guard' and  '__stack_chk_fail'. We force clang to disable canary by '-fno-stack-protector'
  • Loading branch information
floatshadow committed Jun 4, 2024
1 parent aaddbd8 commit e94ea49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ make test
```
对于 riscv:
```bash
make NO_LIBC=1 ADD_CFLAGS="-target riscv64-unknown-linux-elf -march=rv64im -mabi=lp64" test
make NO_LIBC=1 ADD_CFLAGS="-fno-stack-protector -target riscv64-unknown-linux-elf -march=rv64im -mabi=lp64" test
qemu-riscv64-static ./build/test < test/test.in
```
你应当会看到类似如下输出
Expand Down

0 comments on commit e94ea49

Please sign in to comment.