tags 270620 +patch thanks This patch adds xgot support to the CRTSTUFF files for Linux/MIPS. Without it, programs using -mxgot tend to segfault in the constructor. For other programs it will cause a slight increase in overall size.
Thiemo
#! /bin/sh -e # DP: xgot support for mips CRTSTUFF dir= if [ $# -eq 3 -a "$2" = '-d' ]; then pdir="-d $3" dir="$3/" elif [ $# -ne 1 ]; then echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" exit 1 fi case "$1" in -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0 ;; -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0 ;; *) echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" exit 1 esac exit 0 --- gcc.orig/gcc/config/mips/t-linux 1970-01-01 01:00:00.000000000 +0100 +++ gcc/gcc/config/mips/t-linux 2004-08-26 18:28:12.000000000 +0200 @@ -0,0 +1,3 @@ +# Compile crtbegin/end with xgot so it works for both +# normal and large GOTs. +CRTSTUFF_T_CFLAGS = -mxgot