bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnu ld problem with sparc solaris 2.8 assembler


From: Ted Merrill
Subject: gnu ld problem with sparc solaris 2.8 assembler
Date: Wed, 18 Oct 2000 21:01:26 -0700 (PDT)

Attached are bug report and question re. the gnu "ld" on sparc solaris 2.8,
specifically from binutils-2.9.5.0.22 and binutils-2.10 .

I've cc'd this to several email addresses i saw in email archives
while researching this problem; if this is you and you get this mail
and you know anything... you may find this interesting, or you
might know someone who does, or you might have info you could share with me...

Thanks for your time,
Ted Merrill, ArrayComm, Inc., San Jose, CA USA
address@hidden

-----
Issue 1: In the file install/SPECIFIC in gcc-2.95.2 there is the
warning that has apparently been there for several releases:    
    sparc-sun-solaris*

    binutils 2.9.1 has known bugs on this platform. We recommend to use
    the vendor tools (Sun as, Sun ld) until these have been fixed.
But nowhere have i been able to find what the "known bugs" are.
Are the gcc people exagerating, or are there some real problems,
and if so, then what?

------
Issue 2: with the following program:

void FooBar(void) {;}
int Value=(int)FooBar;
int main(void)
{
    return Value;
}

We had no problem on SunOS5.5.1, but on two different computers with
SunOS5.8 we had a problem when using the combination of the gcc
compiler (gcc-2.95.2), the sun /usr/ccs/bin/as, and the gnu "ld" 
(binutils-2.9.5.0.22).
The problem is that the program linked had the value of "Value" as zero
instead of the address of FooBar.
(This seems to be a generic problem with function addresses initializing
static data).
You can see this clearly in the objdump or from gdb.
The problem does not exist in programs similarly linked under SunOS5.5.1
with an older version of sun's as.
Also, I've seen no problems since we've switched to using the gnu "as"
instead of the sun one.
I'd guess that the SunOS5.8 /usr/ccs/bin/as is emitting an object file
that is either wrong or that the gnu "ld" is confused by...
if i use the sun "ld" instead of gnu "ld" there is no problem, so
i think this has to be considered a bug in "ld" even if the
sun "as" was changed in some wacky way.

The versions of sun "as" are:
SunOS5.5.1: as: WorkShop Compilers 4.2 dev 13 May 1996
SunOS5.8: as: Sun WorkShop 6 99/08/18

uname -a prints:
SunOS5.5.1: SunOS eunice 5.5.1 Generic_103640-33 sun4u sparc SUNW,Ultra-2
SunOS5.8: SunOS gertrude 5.8 Generic_108528-01 sun4u sparc SUNW,Ultra-80

--------
For now i am happy using both the gnu "as" and "ld" although there is
the potential for problems with third party object libraries.
I could switch to using only the sun "as" and "ld" but i'd hate to do that.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]