Does ld/gold-l always simply add files to the command line

Niklas Hambüchen mail@nh2.me
Wed Jul 26 20:44:00 GMT 2017


Hi,

is the -l flag to ld and gold guaranteed to have the same effect as
passing the found library file (.so or .a) directly on the command line?

In other words, is it just "lookup convenience", or are there cases
where -l might do something different than passing the relevant file
directly?

(I'm asking this for the GHC Haskell compiler, specifically for this
linker related issue: https://ghc.haskell.org/trac/ghc/ticket/14031)

Thanks!



More information about the Binutils mailing list