The linker trick has a problem. It doesn't set the non-executable stack bit, so as a result your whole binary will have an executable stack, and therefore be insecure against various stack smashing exploits.
Try running 'readelf -S blob.o' and you won't see any '.note.GNU-stack' in the output.
dupd uses this approach to embed its manpage, and indeed, readelf -lW shows dupd has an executable stack on FreeBSD:
GNU_STACK ... RWE 0x8
Having patched it myself to simply call system("/usr/bin/man dupd") it indeed goes back to:
I came across this earlier: https://news.ycombinator.com/item?id=10816322
dupd uses this approach to embed its manpage, and indeed, readelf -lW shows dupd has an executable stack on FreeBSD:
Having patched it myself to simply call system("/usr/bin/man dupd") it indeed goes back to: