Description: <short summary of the patch>
TODO: Put a short summary on the line above and replace this paragraph
with a longer explanation of this change. Complete the meta-information
with other relevant fields (see below for details). To make it easier, the
information below has been extracted from the changelog. Adjust it or drop
it.
.
gcl (2.6.12-23) unstable; urgency=medium
.
* Version_2_6_13pre29
Author: Camm Maguire <camm@debian.org>
---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:
Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>
--- gcl-2.6.12.orig/configure
+++ gcl-2.6.12/configure
@@ -4435,6 +4435,10 @@ case $use in
# 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*)
--- gcl-2.6.12.orig/configure.in
+++ gcl-2.6.12/configure.in
@@ -640,6 +640,10 @@ case $use in
# 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*)
--- gcl-2.6.12.orig/h/elf64_mips_reloc_special.h
+++ gcl-2.6.12/h/elf64_mips_reloc_special.h
@@ -6,18 +6,28 @@ static ul ggot,ggote; static Rela *hr;
#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;
-
- *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;
+ 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;
+
+ t->entry=(ul)(gote+2);
+ t->gotoff=s;
+ t->ld_gotoff|=((void *)(gote+1)-(void *)got);
return 0;
@@ -31,7 +41,7 @@ make_got_room_for_stub(Shdr *sec1,Shdr *
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;
--- gcl-2.6.12.orig/o/main.c
+++ gcl-2.6.12/o/main.c
@@ -212,7 +212,7 @@ get_phys_pages_no_malloc(char freep) {
struct sysinfo s;
sysinfo(&s);
- return (freep ? s.freeram : s.totalram)>>PAGEWIDTH;
+ return ((freep ? s.freeram : s.totalram)>>PAGEWIDTH)*s.mem_unit;
}