:: [DNG] gcc can link garbage into an …
Góra strony
Delete this message
Reply to this message
Autor: Edward Bartolo
Data:  
Dla: dng
Temat: [DNG] gcc can link garbage into an executable.
Hi,

While dissecting the sysvinits (/sbin/init) internals I found that gcc
can link garbage into an executable file. Attempting to run the
resultant garbage results in unknown executable format or something
similar.

I used the -c directive directly on the source code. The command is this:
gcc -ansi -O2 -W -Wall -D_GNU_SOURCE -c startos.init.c -o startos.init

Edward