On Mon, 7 Jan 2019 at 20:48, Peng Yu <pengyu.ut@xxxxxxxxx> wrote: > > Does it call the external program ld to do so? Or it has its own code > to perform the link? Thanks. It calls an external linker (usually called ld, but not necessarily). The GCC executable 'collect2' is used to invoke the linker. Add -v to your GCC commands to see the options used by cc1 and collect2.