"ld" and "QCC" hang trying to link valid object file

Colin Burgess wrote:

I think that nagle_g in this case is probably a corrupt file, and that
ld is crashing somehow.

I agree. This whole problem revolves around the compiler
emitting bad object files, which then crash “ld”.

What does file nagle_g say?

“data”.

Did you try the -gstabs+?

That’s not a documented QCC option on the
QCC manual page. Should I go back to standard
“gcc”, rather than trying use QCC, so I can use
all the FSF “gcc” options?

John Nagle
Animats

John Nagle <nagle@downside.com> wrote:

Colin Burgess wrote:

I think that nagle_g in this case is probably a corrupt file, and that
ld is crashing somehow.

I agree. This whole problem revolves around the compiler
emitting bad object files, which then crash “ld”.

What does file nagle_g say?

“data”.

Did you try the -gstabs+?

That’s not a documented QCC option on the
QCC manual page. Should I go back to standard
“gcc”, rather than trying use QCC, so I can use
all the FSF “gcc” options?

No, use QCC. -gstabs+ will work, I guess the docs for QCC are a little
light…


cburgess@qnx.com

Now that’s a usable workaround. “QCC -gstabs+” is
getting me valid compiles, usable debug info, and correct
error messages on undefined symbols.

So the documentation for “QCC” needs an update. While
somebody is doing that, it would be good to clarify whether the
valid form for a target is “-Vgcc_ntox86” or “-V gcc_ntox86”.
The documentation is ambiguous on that, and QCC
happily accepts both, although it’s not clear what actually
happens.


John Nagle
Animats

Colin Burgess wrote:

No, use QCC. -gstabs+ will work, I guess the docs for QCC are a little
light…

John Nagle <nagle@downside.com> wrote:

So the documentation for “QCC” needs an update. While
somebody is doing that, it would be good to clarify whether the
valid form for a target is “-Vgcc_ntox86” or “-V gcc_ntox86”.
The documentation is ambiguous on that, and QCC
happily accepts both, although it’s not clear what actually
happens.

Actually, both should be equally valid. Similarly “pidin -p6” and
“pidin -p 6” are both equally valid, and should have the same result.

(And, if QCC/qcc use getopt(), they won’t normally be able to tell which way
you typed it.)

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.