For mips-elf builds, crtbegin.o is built with -G 0 ("in case $gp isn't
used").  This makes __dso_handle be put in .data.  However, the
"prototype" created by cp/decl.c is "void *__dso_data" which causes
GPrel addressing if your application is built without -G 0 (i.e. the
default), which causes link problems.  This is causing numerous
testsuite failures like this example:

/dev/shm/ccvHNaHr.o: In function
   `__static_initialization_and_destruction_0(int, int)':
   omit-frame-pointer.C:(.text+0x58): relocation truncated to fit:
   R_MIPS_GPREL16 against `__dso_handle'

Ideas?

Reply via email to