Skip to contentSkip to conversation

ld --relax should be on by default

Linux-ia64 Jack Carter 2 participants 4 messages May 2, 2001

lore
Share & tools
lore
#0 lore raw

Users of our IA64 compiler which uses the Cygnus/GNU linker keep hitting a link overflow problem which is fixed by using --relax.

Why is this not on by default?

At a very minimum the linker should itself suggest using the option when the overflow occurs.

Thanks,

Jack Carter [email protected]

#1 lore raw
Quoted 1 line

Why is this not on by default?

There isn't enough people or enough time to fix all known IA-64 toolchain problems quickly.

I don't know what the ramifications are of turning this on by default. Someone needs to investigate this. I will do so eventually, but I have more important problems to look at.

This problem doesn't occur very often in my experience, and is easy to work around, so I haven't considered it an important problem, just a very annoying one.

Jim

#2 lore raw
In reply to Jack Carter

Are you running into this problem using the SGI compiler with the GNU linker? That wasn't clear from your message. That effects the kind of solution we need, since fixing gcc to always pass --relax to the linker isn't going to fix your problem.

Jim

#3 lore raw
In reply to Jack Carter

Yes, it is the SGI compiler with the GNU linker.

The request was not to have the frontend always pass the the flag to the linker, but have the linker do the right thing and handle these legal cases without error. Many people with big projects invoke the linker independantly from the rest of the compiler.

I do not know what the "relax" option does exactly, but if it is to relax an optimization then the correct behavior would to be to have a flag to enable the optimization and have the relax be the default, not the other way around. Currently the gentle user has now way of knowing what's going on and how to get his/her code linked.

Unless of course there is something inherently wrong with the user code that is tripping this error. I don't believe this is the case.

If changing the behavior of the IA64 Linux targeting linker is not an option, then at a minimum the message should suggest using the "relax" option.

Regards,

Jack

Quoted 8 lines · Jim Wilson

Subject: Re: [Linux-ia64] ld --relax should be on by default
Are you running into this problem using the SGI compiler with the GNU linker? That wasn't clear from your message. That effects the kind of solution we need, since fixing gcc to always pass --relax to the linker isn't going to fix your problem.

Jim
-- End of excerpt from Jim Wilson