Re: What is the raw ld command called by gcc?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 24 Jan 2019 at 17:13, Peng Yu <pengyu.ut@xxxxxxxxx> wrote:
>
> Hi
>
> I'd like to know the raw ld command is called by gcc. Is there a way
> to figure it out?

Use gcc's -v option.

> Also, why gcc acts like a front end to ld for which people has to use
> options like -Wl?
>
> Why not keep ld and gcc separated, so that if people want to link they
> just call ld? Thanks.

Because gcc adds several things to the linker command, and knows how
to invoke the linker for your target. Using gcc gives a uniform
interface, and is more convenient than adding all the extra arguments
by hand.

If you want to use ld directly, nothing stops you doing that.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux