Eljay Love-Jensen wrote: > Try this instead: >gcc -Wl,--gc-sections *.o >Also note: --gc-sections doesn't work in some environments. (Hmmm, I was >under the vague impression that the gc facility was disabled entirely. But >don't quote me on that.) Thanks, the warning was suppressed. (I also had to link crt* objects) But my a.out (which runs fine) still has a definition for func3() - the function which is not referenced by main(). Too bad that the ld man page doesn't specify the hosts on which garbage collection (--gc-sections) does not work. Will retry on a Linux machine where everything is GNU, and see if I have better results there. Cheers, Srikanth Madani