1753939 Members
9366 Online
108811 Solutions
New Discussion

-Wl optiion

 
SOLVED
Go to solution

-Wl optiion

Hi

Could you please tell me why we use -Wl,+h,.. and -wl,-b,.. options while linking.

Thanks and Regards,
Pushpa
1 REPLY 1
Dennis Handly
Acclaimed Contributor
Solution

Re: -Wl option

These options tell the driver to pass these options directly to the linker.

That way the driver doesn't have to know all of the various linker options. (It needs those letters for itself. ;-)

Note: -b above must be passed to driver for special handling. Did you mean -Wl,+b...?

Or did you want to know why ld requires +h and +b? Just look at ld(1). +h sets the internal shlib name. +b sets the shlib lookup path.