The short answer is that gcc builds symbol tables on the fly by parsing your code into required symbols (a "myfile".o file plus the crt1.o file (where _start() lives) ), then invoking ld against those symbols.
Try nm on a.o file.
nm has to read an ELF file, then resolve the symbols. Every entry point and variable (except those optimized away) constitutes something nm has to re-engineer. If you are on linux or have support ELF image files, then you can get the readelf utility. Try it.
Or download readelf.c and check out what nm has to deal with.
rpm: file/src/readelf.c Source File
If you ever build large database programs, example: Oracle Pro*C, you will find it takes a while to build one.