This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: mips: -G0 vs __dso_handle
- From: Ian Lance Taylor <ian at airs dot com>
- To: DJ Delorie <dj at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: 08 May 2006 22:43:03 -0700
- Subject: Re: mips: -G0 vs __dso_handle
- References: <200605090123.k491NrNm014723@greed.delorie.com>
DJ Delorie <dj@redhat.com> writes:
> 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?
Hack mips_in_small_data_p to check for this magic symbol and return
false for it?
Ian