Whonix forked [bindp](https://github.com/yongboy/bindp). Was required for uwt (T561) (bindp.c).
Compilation:
gcc -nostartfiles -fpic -shared bindp.c -o libindp.so -ldl -D_GNU_SOURCE -D_FORTIFY_SOURCE=2 -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -fPIE -pie -Wl,-z,relro -Wl,-z,now
TODO:
- check and fix
- Bonus nice to have:
- Fix the ld warning
- /usr/bin/ld.bfd.real: warning: cannot find entry symbol _start; defaulting to 0000000000000660 - https://github.com/yongboy/bindp/issues/2
- Fix the ld warning
- Bonus nice to have:
- Make the stack canary work - https://github.com/yongboy/bindp/issues/3
https://github.com/slimm609/checksec.sh
/path/to/checksec.sh --file /path/to/libindp.so
RELRO STACK CANARY NX PIE RPATH RUNPATH FILE Full RELRO No canary found NX enabled PIE enabled No RPATH No RUNPATH libindp.so
This ticket is based on @marmarek's feedback in T561#11378.