--with-as=/opt/csw/bin/gas --without-gnu-ld --with-ld=/
usr/ccs/bin/ld --enable-nls --with-included-gettext --with-libiconv-
prefix=/opt/
csw --with-x --with-mpfr=/opt/csw --with-gmp=/opt/csw --enable-java-
awt=xlib --e
nable-libada --enable-libssp --enable-objc-gc --enable-threads=posix
--enable-st
age1-languages=c --enable-languages=ada,c,c++,fortran,java,objc
Thread model: posix
gcc version 4.3.3 (GCC)
/opt/csw/gcc4/bin/g++ 1.cpp -fPIC -S -m64
"1.s", line 117 : Warning: Illegal subtraction - symbols from
different sections: ".LFB2", ".DOT-2"
"1.s", line 120 : Warning: Illegal subtraction - symbols from
different sections: ".LLSDA2", ".DOT-3"
void F1();
void F2()
{
try { F1(); } catch(...) {F2(); }
}
/usr/ccs/bin/as -xarch=amd64 1.s
or similar:
-bash-4.1$ cat 2.c
void F1() { }
/opt/csw/gcc4/bin/gcc -fPIC -S -funwind-tables -m64 2.c
/usr/ccs/bin/as -xarch=amd64 2.s
Assembler: 2.c
"2.s", line 38 : Warning: Illegal subtraction - symbols from
different sections: ".LFB2", ".DOT-1"
I'm aware of this thread:
http://gcc.gnu.org/ml/gcc-patches/2006-07/msg00908.html
I think I'll switch to GNU as, or omit -funwind-tables for now.
Or see if 4.5.0 fixes it.
Sparc32, sparc64, x86 work.
-gstabs+ also generated .stabd that Sun assembler didn't like.
I switched to -gstabs.
Maybe I messed up something though, as it looks like gcc is aware
not to output .stabd to non-gas.
More reason to use GNU assembler, understood.
http://gcc.gnu.org/install/specific.html#ix86-x-solaris210
could be a bit more precise:
Recent versions of the Sun assembler in /usr/ccs/bin/as work
almost as well, though.
"almost as well"?
Maybe that should say more, like, use -g or -gstabs instead of -
gstabs+, don't use 64bit+pic+unwind-tables or 64bit+pic+exceptions
I switched to Sun assembler because I'm seeing GNU as installed in
different places on different machines.
Some people don't install /usr/sfw and the install elsewhere.
- Jay