public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* How does gcc link objects to executable?
@ 2019-01-07 20:48 Peng Yu
  2019-01-07 23:36 ` Jonathan Wakely
  0 siblings, 1 reply; 2+ messages in thread
From: Peng Yu @ 2019-01-07 20:48 UTC (permalink / raw)
  To: gcc-help

Does it call the external program ld to do so? Or it has its own code
to perform the link? Thanks.

-- 
Regards,
Peng

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How does gcc link objects to executable?
  2019-01-07 20:48 How does gcc link objects to executable? Peng Yu
@ 2019-01-07 23:36 ` Jonathan Wakely
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2019-01-07 23:36 UTC (permalink / raw)
  To: Peng Yu; +Cc: gcc-help

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-07 23:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-07 20:48 How does gcc link objects to executable? Peng Yu
2019-01-07 23:36 ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).