|
|
385abae |
Description: <short summary of the patch>
|
|
|
385abae |
TODO: Put a short summary on the line above and replace this paragraph
|
|
|
385abae |
with a longer explanation of this change. Complete the meta-information
|
|
|
385abae |
with other relevant fields (see below for details). To make it easier, the
|
|
|
385abae |
information below has been extracted from the changelog. Adjust it or drop
|
|
|
385abae |
it.
|
|
|
385abae |
.
|
|
|
385abae |
gcl (2.6.12-67) unstable; urgency=medium
|
|
|
385abae |
.
|
|
|
385abae |
* Version_2_6_13pre55
|
|
|
385abae |
Author: Camm Maguire <camm@debian.org>
|
|
|
385abae |
|
|
|
385abae |
---
|
|
|
385abae |
The information above should follow the Patch Tagging Guidelines, please
|
|
|
385abae |
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
|
|
|
385abae |
are templates for supplementary fields that you might want to add:
|
|
|
385abae |
|
|
|
385abae |
Origin: <vendor|upstream|other>, <url of original patch>
|
|
|
385abae |
Bug: <url in upstream bugtracker>
|
|
|
385abae |
Bug-Debian: https://bugs.debian.org/<bugnumber>
|
|
|
385abae |
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
|
|
|
385abae |
Forwarded: <no|not-needed|url proving that it has been forwarded>
|
|
|
385abae |
Reviewed-By: <name and email of someone who approved the patch>
|
|
|
385abae |
Last-Update: 2018-03-04
|
|
|
385abae |
|
|
|
385abae |
--- gcl-2.6.12.orig/h/elf64_alpha_reloc.h
|
|
|
385abae |
+++ gcl-2.6.12/h/elf64_alpha_reloc.h
|
|
|
385abae |
@@ -22,16 +22,14 @@
|
|
|
385abae |
store_val(where,MASK(32),s+a);
|
|
|
385abae |
break;
|
|
|
385abae |
case R_ALPHA_LITERAL:
|
|
|
385abae |
- s+=a;
|
|
|
385abae |
- if (a || !(sym->st_other&0x1)) {gotp+=1+(sym->st_other>>1);sym->st_other|=1;}
|
|
|
385abae |
- gote=got+(a ? gotp : sym->st_size)-1;
|
|
|
385abae |
- massert(s);
|
|
|
385abae |
+ gote=got+(a>>32)-1;
|
|
|
385abae |
+ a&=MASK(32);
|
|
|
385abae |
if (s>=ggot1 && s
|
|
|
385abae |
massert(!write_stub(s,got,gote));
|
|
|
385abae |
} else
|
|
|
385abae |
- *gote=s;
|
|
|
385abae |
+ *gote=s+a;
|
|
|
385abae |
s=(gote-got)*sizeof(*got);
|
|
|
385abae |
- massert(!(s&0x8000));
|
|
|
385abae |
+ massert(!(s&~MASK(16)));
|
|
|
385abae |
store_val(where,MASK(16),s);
|
|
|
385abae |
break;
|
|
|
385abae |
case R_ALPHA_GPRELHIGH:
|
|
|
385abae |
--- gcl-2.6.12.orig/h/elf64_alpha_reloc_special.h
|
|
|
385abae |
+++ gcl-2.6.12/h/elf64_alpha_reloc_special.h
|
|
|
385abae |
@@ -1,4 +1,4 @@
|
|
|
385abae |
-static ul ggot1,ggote,gotp;
|
|
|
385abae |
+static ul ggot1,ggote;
|
|
|
385abae |
|
|
|
385abae |
static int
|
|
|
385abae |
write_stub(ul s,ul *got,ul *gote) {
|
|
|
385abae |
@@ -65,12 +65,24 @@ label_got_symbols(void *v1,Shdr *sec1,Sh
|
|
|
385abae |
Sym *sym;
|
|
|
385abae |
Shdr *sec;
|
|
|
385abae |
void *v,*ve;
|
|
|
385abae |
- ul q=0;
|
|
|
385abae |
+ ul q=0,a;
|
|
|
385abae |
|
|
|
385abae |
- gotp=0;
|
|
|
385abae |
for (sym=sym1;sym
|
|
|
385abae |
sym->st_other=sym->st_size=0;
|
|
|
385abae |
|
|
|
385abae |
+ for (sec=sec1;sec
|
|
|
385abae |
+ if (sec->sh_type==SHT_RELA)
|
|
|
385abae |
+ for (v=v1+sec->sh_offset,ve=v+sec->sh_size,r=v;v<ve;v+=sec->sh_entsize,r=v)
|
|
|
385abae |
+ if (ELF_R_TYPE(r->r_info)==R_ALPHA_LITERAL) {
|
|
|
385abae |
+
|
|
|
385abae |
+ sym=sym1+ELF_R_SYM(r->r_info);
|
|
|
385abae |
+
|
|
|
385abae |
+ /*unlikely to save got space by recording possible holes in addend range*/
|
|
|
385abae |
+ if ((a=r->r_addend+1)>sym->st_other)
|
|
|
385abae |
+ sym->st_other=a;
|
|
|
385abae |
+
|
|
|
385abae |
+ }
|
|
|
385abae |
+
|
|
|
385abae |
for (*gs=0,sec=sec1;sec
|
|
|
385abae |
if (sec->sh_type==SHT_RELA)
|
|
|
385abae |
for (v=v1+sec->sh_offset,ve=v+sec->sh_size,r=v;v<ve;v+=sec->sh_entsize,r=v)
|
|
|
385abae |
@@ -78,13 +90,19 @@ label_got_symbols(void *v1,Shdr *sec1,Sh
|
|
|
385abae |
|
|
|
385abae |
sym=sym1+ELF_R_SYM(r->r_info);
|
|
|
385abae |
|
|
|
385abae |
- if (!sym->st_size || r->r_addend) {
|
|
|
385abae |
- q=++*gs;
|
|
|
385abae |
- if (!sym->st_size) sym->st_size=q;
|
|
|
385abae |
+ if (sym->st_other) {
|
|
|
385abae |
+ sym->st_size=++*gs;
|
|
|
385abae |
massert(!make_got_room_for_stub(sec1,sece,sym,st1,gs));
|
|
|
385abae |
- sym->st_other=(*gs-q)<<1;
|
|
|
385abae |
+ massert((*gs-sym->st_size) || !r->r_addend);
|
|
|
385abae |
+ if (sym->st_other>1)
|
|
|
385abae |
+ (*gs)+=sym->st_other-1;
|
|
|
385abae |
+ sym->st_other=0;
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
+ b=sizeof(r->r_addend)*4;
|
|
|
385abae |
+ massert(!(r->r_addend>>b));
|
|
|
385abae |
+ r->r_addend|=((sym->st_size+r->r_addend)<
|
|
|
385abae |
+
|
|
|
385abae |
}
|
|
|
385abae |
|
|
|
385abae |
return 0;
|