How does gcc link objects to executable?
Jonathan Wakely
jwakely.gcc@gmail.com
Mon Jan 7 23:36:00 GMT 2019
On Mon, 7 Jan 2019 at 20:48, Peng Yu <pengyu.ut@gmail.com> 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.
More information about the Gcc-help
mailing list