(Normal people can ignore this message!)
hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -I/Applications/arduino/arduino-0016/hardware/cores/arduino /tmp/build6607.tmp/Temporary_6327_9221.cpp -o/tmp/build6607.tmp/Temporary_6327_9221.cpp.o
hardware/tools/avr/bin/avr-gcc -Os -Wl,--gc-sections -mmcu=atmega168 -o /tmp/build6607.tmp/fastwrite.elf /tmp/build6607.tmp/Temporary_6327_9221.cpp.o /tmp/build6607.tmp/core.a -L/tmp/build6607.tmp -lm
hardware/tools/avr/bin/avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 /tmp/build6607.tmp/fastwrite.elf /tmp/build6607.tmp/fastwrite.eep
Here are representative compile and link commands from the Arduino IDE build process. The pieces your eclipse build is missing are probably the pieces that I've made bold. In the compile "-ffunction-sections" causes each function to be put in its own linker section, and in the link I'm pretty sure that "-gc-sections" causes the linker to garbage collect (omit) any section that isn't referenced from somewhere else.