This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How does gcc link objects to executable?


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]