Not exactly. For example, Ubuntu 10 was perfectly happy accepting libraries in any order. Only with Ubuntu 11 did this "revert" to the old way.

Actually, it looked like that. What happenned behind the doors it was that the linking proceeded with --as-needed and the expansion was on the spot.

Assume that you had libA depending on libB (but also on some other library that you do not use, namely libC).

if you tried to link:

gcc my_program.o -lB -lA (so, in reverse order)

this looked a bit like:

gcc my_program.o -lA -lB

BUT what really happened was that the true link command was now:

gcc my_program.o -lA -lB -lC -lB

where the "-lA -lB -lC" is the expansion of the previous "-lA".



Reply via email to