:: [DNG] gcc can link garbage into an …
Top Page
Delete this message
Reply to this message
Author: Edward Bartolo
Date:  
To: dng
Subject: [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