This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

linker warning when mixing cc and gcc on alphaev{56,6}-dec-osf5.0


The system linker spits out a warning when linking a file compiled
with gcc and a file compiled with the system compiler if debugging is
enabled (via -g).

The warning is:

   gccfunc.o: Bad proc symbol (gccfunc), index (0) should be a valid
   symref or indexNil

The problem exists on alphaev6-dec-osf5.0 with Compaq cc 6.1-011 and
alphaev56-dec-osf5.0 with Compaq cc 6.3-120.

Drew


$ gcc -v
Reading specs from /usr/local/lib/gcc-lib/alphaev6-dec-osf5.0/2.96/specs
gcc version 2.96 20000712 (experimental)

$ sizer -v
Digital UNIX V5.0 (Rev. 910); Wed Jun  7 16:05:23 EDT 2000

$ cat t.c
int
main(int argc, char *argv[]) {
  return gccfunc();
}

$ cat gccfunc.c 
int
gccfunc() {
  return 1;
}

$ cc -g -c t.c 
$ gcc -v --save-temps -g -c gccfunc.c        
Reading specs from /usr/local/lib/gcc-lib/alphaev6-dec-osf5.0/2.96/specs
gcc version 2.96 20000712 (experimental)
 /usr/local/lib/gcc-lib/alphaev6-dec-osf5.0/2.96/cpp -lang-c -v -D__GNUC__=2 -D__GNUC_MINOR__=96 -D__GNUC_PATCHLEVEL__=0 -Dunix -D__osf__ -D_LONGLONG -DSYSTYPE_BSD -D_SYSTYPE_BSD -D__unix__ -D__osf__ -D_LONGLONG -D__SYSTYPE_BSD__ -D_SYSTYPE_BSD -D__unix -D__SYSTYPE_BSD -Asystem(unix) -Asystem(xpg4) -g -D__LANGUAGE_C__ -D__LANGUAGE_C -DLANGUAGE_C -Acpu(alpha) -Amachine(alpha) -D__alpha -D__alpha__ -D__alpha_ev6__ -Acpu(ev6) -D__alpha_bwx__ -Acpu(bwx) -D__alpha_max__ -Acpu(max) -D__alpha_fix__ -Acpu(fix) gccfunc.c gccfunc.i
GNU CPP version 2.96 20000712 (experimental) (cpplib)

#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/local/lib/gcc-lib/alphaev6-dec-osf5.0/2.96/include
 /usr/local/alphaev6-dec-osf5.0/include
 /usr/include
End of search list.
 /usr/local/lib/gcc-lib/alphaev6-dec-osf5.0/2.96/cc1 gccfunc.i -quiet -dumpbase gccfunc.c -g -version -o gccfunc.s
GNU C version 2.96 20000712 (experimental) (alphaev6-dec-osf5.0) compiled by GNU C version 2.96 20000712 (experimental).
 as -g -nocpp -O0 -o gccfunc.o gccfunc.s
 /usr/local/lib/gcc-lib/alphaev6-dec-osf5.0/2.96/mips-tfile -v -I gccfunc.o~ -o gccfunc.o gccfunc.s
mips-tfile version 2.96 20000712 (experimental)

$ cc -v -g -o t t.o gccfunc.o 


/usr/lib/cmplrs/cc/ld -o t -g2 -O1 -call_shared /usr/lib/cmplrs/cc/crt0.o t.o gccfunc.o -lc 
ld:
gccfunc.o: Bad proc symbol (gccfunc), index (0) should be a valid symref or indexNil
/usr/lib/cmplrs/cc/ld: 
0.00u 0.00s 0:00 0% 0+0k 0+9io 0pf+0w 0stk+1248mem


$ cc -v -o t t.o gccfunc.o


/usr/lib/cmplrs/cc/ld -o t -g0 -O1 -call_shared /usr/lib/cmplrs/cc/crt0.o t.o gccfunc.o -lc 
/usr/lib/cmplrs/cc/ld: 
0.00u 0.00s 0:00 0% 0+0k 0+5io 0pf+0w 0stk+1248mem

$ cc -V |head -1
Compaq C V6.1-011 on Digital UNIX V5.0 (Rev. 910)

$ /usr/lib/cmplrs/cc/ld -V
/usr/lib/cmplrs/cc/ld version 5.0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]