# if test "$enable_debug" != "yes" ; then TO2FLAGS="-O" ; fi
;;
mips*)
+ case $canonical in
+ mips64*linux*)
+ TLIBS="$TLIBS -Wl,-z -Wl,now";;
+ esac
# if test "$enable_debug" != "yes" ; then TO3FLAGS="-O0" ; fi #FIXME needed asof gcc 4.6.2
;;
ia64*)
# if test "$enable_debug" != "yes" ; then TO2FLAGS="-O" ; fi
;;
mips*)
+ case $canonical in
+ mips64*linux*)
+ TLIBS="$TLIBS -Wl,-z -Wl,now";;
+ esac
# if test "$enable_debug" != "yes" ; then TO3FLAGS="-O0" ; fi #FIXME needed asof gcc 4.6.2
;;
ia64*)
#define ELF_R_TYPE(a_) (((a_>>40)&0xff) ? ((a_>>40)&0xff) : ((a_>>56)&0xff))
#define ELF_R_FTYPE(a_) ((a_>>56)&0xff)
+typedef struct {
+ ul entry,gotoff;
+ unsigned int ld_gotoff,lw,jr,lwcan;
+} call_16_tramp;
+
static int
write_stub(ul s,ul *got,ul *gote) {
- int *goti;
+ static call_16_tramp t1={0,0,
+ (0x37<<26)|(0x1c<<21)|(0x19<<16), /*ld t9,(0)gp*/
+ (0x37<<26)|(0x19<<21)|(0x19<<16), /*ld t9,(0)t9*/
+ 0x03200008, /*jr t9*/
+ 0 /*nop*/
+ };
+ call_16_tramp *t=(void *)gote;
+
+ *t=t1;
+ *got=can_gp;
- *gote=(ul)(goti=(void *)(gote+2));
- *++gote=s;
- s=((void *)gote-(void *)got);
- *goti++=(0x37<<26)|(0x1c<<21)|(0x19<<16)|s;
- *goti++=(0x37<<26)|(0x19<<21)|(0x19<<16)|0;
- *goti++=0x03200008;
- *goti++=0x00200825;
+ t->entry=(ul)(gote+2);
+ t->gotoff=s;
+ t->ld_gotoff|=((void *)(gote+1)-(void *)got);
return 0;
if ((ssec>=sece || !ALLOC_SEC(ssec)) &&
(a=find_sym_ptable(st1+sym->st_name)) &&
a->address>=ggot && a->address<ggote)
- (*gs)+=3;
+ (*gs)+=sizeof(call_16_tramp)/sizeof(ul)-1;
return 0;