Is it generally sane to append some random data to an executable binary file? What measures should be taken to ensure safe operation of the resulting executable, like padding before appended data or whatever?
A typical C example would be:
gcc -o main.o -c main.c
gcc -o main main.o -lfoo
cat bar.txt >> main
The target system is broadly Unix but a breakdown by system (Mac OS X, Linux, AIX...) is welcome if need be. A Windows point of view is welcome too for the sake of completeness.