Prev / Next

2015-08-15 / -fstack-protector とか

いろいろビルドしていると、

- __stack_chk_fail_local
- __stack_chk_guard
- __stack_chk_fail

といった symbol が見つからなくて link できないことがある。

'__stack_chk_fail_local' が出た場合は
gcc に '-fno-stack-protector' を渡せばよいらしい。

'__stack_chk_guard' と '__stack_chk_fail' が出た場合は
gcc に '-fstack-protector' を渡せばよいらしい。

何に起因してこれらの symbol が埋め込まれるのかわかっていないのがつらい。

comments powered by Disqus