This is the mail archive of the gcc@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]
Other format: [Raw text]

mips: -G0 vs __dso_handle


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?


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