Operating System - HP-UX
1833777 Members
2190 Online
110063 Solutions
New Discussion

aCC passing linker flag (ld +k)

 
SOLVED
Go to solution
Allan Stirrett
Occasional Advisor

aCC passing linker flag (ld +k)

Hi,

My apologies if this is really simple and I'm just missing the trees for the forest.

I want to pass the +k option to the linker, so that it will NOT create an executable if there are missing symbols, etc.

From what I can gather, the -Xlinker option of gcc is not available in aCC, and the +k option means something different to aCC itself.

Is there a simple way to pass options to the linker from aCC, OR is there an aCC option that I've missed that will do what I want? I'd like to avoid calling "ld" directly if I can. Thanks in advance.

Allan Stirrett.
1 REPLY 1
Steven Gillard_2
Honored Contributor
Solution

Re: aCC passing linker flag (ld +k)

To pass arguments to the linker you need to use the -Wl argument, with commas to separate the linker arguments instead of spaces.

Eg to pass +k you would specify:

$ aCC -Wl,+k ......

Regards,
Steve