Re: Linking order question

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

 



On Wed, Nov 13, 2013 at 7:26 AM, Riccardo Manfrin
<riccardomanfrin@xxxxxxxxx> wrote:
> A library *BAR* is composed of the object file *bar**.o* that contains the
> symbol *foo* and *qux*.
> A *FOO* library depends on symbol *foo*.
> A *QUX* library depends on symbol *qux***.
>
> Can I assert the following linking orders outcomes?
>
>     -lFOO -lQUX -lBAR     : OK and logically right
>
>     -lFOO -lBAR -lQUX     : OK <-- this still works because FOO brought in
> bar.o so QUX still finds the qux symbol.
>
>     -lBAR -lQUX           : FAIL bar.o is excluded because it was not found
> to be useful to anyone preceeding -lBAR.
>
> Is this correct?

Looks correct.

(Not really a GCC question.)

Ian




[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