|
|
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-69) unstable; urgency=medium
|
|
|
385abae |
.
|
|
|
385abae |
* Version_2_6_13pre58
|
|
|
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-12
|
|
|
385abae |
|
|
|
385abae |
--- gcl-2.6.12.orig/h/elf64_alpha_reloc_special.h
|
|
|
385abae |
+++ gcl-2.6.12/h/elf64_alpha_reloc_special.h
|
|
|
385abae |
@@ -61,47 +61,30 @@ find_special_params(void *v,Shdr *sec1,S
|
|
|
385abae |
static int
|
|
|
385abae |
label_got_symbols(void *v1,Shdr *sec1,Shdr *sece,Sym *sym1,Sym *syme,const char *st1,const char *sn,ul *gs) {
|
|
|
385abae |
|
|
|
385abae |
- Rela *r;
|
|
|
385abae |
+ Rela *r,*rr;
|
|
|
385abae |
Sym *sym;
|
|
|
385abae |
Shdr *sec;
|
|
|
385abae |
- void *v,*ve;
|
|
|
385abae |
- ul a,b;
|
|
|
385abae |
-
|
|
|
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 |
+ void *v,*ve,*vv;
|
|
|
385abae |
+ ul b,q;
|
|
|
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 |
if (ELF_R_TYPE(r->r_info)==R_ALPHA_LITERAL) {
|
|
|
385abae |
|
|
|
385abae |
- sym=sym1+ELF_R_SYM(r->r_info);
|
|
|
385abae |
-
|
|
|
385abae |
- if (sym->st_other) {
|
|
|
385abae |
- sym->st_size=++*gs;
|
|
|
385abae |
- massert(!make_got_room_for_stub(sec1,sece,sym,st1,gs));
|
|
|
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 |
+ for (rr=vv=v-sec->sh_entsize;
|
|
|
385abae |
+ vv>=v1 &&
|
|
|
385abae |
+ (ELF_R_TYPE(rr->r_info)!=ELF_R_TYPE(r->r_info) ||
|
|
|
385abae |
+ ELF_R_SYM(rr->r_info)!=ELF_R_SYM(r->r_info) ||
|
|
|
385abae |
+ rr->r_addend!=r->r_addend);
|
|
|
385abae |
+ vv-=sec->sh_entsize,rr=vv);
|
|
|
385abae |
|
|
|
385abae |
b=sizeof(r->r_addend)*4;
|
|
|
385abae |
+ q=vv>=v1 ? (rr->r_addend>>b) : ++*gs;
|
|
|
385abae |
+ massert(!make_got_room_for_stub(sec1,sece,sym,st1,gs));
|
|
|
385abae |
+ massert(*gs==q || !r->r_addend);
|
|
|
385abae |
massert(!(r->r_addend>>b));
|
|
|
385abae |
- r->r_addend|=((sym->st_size+r->r_addend)<
|
|
|
385abae |
+ r->r_addend|=(q<
|
|
|
385abae |
|
|
|
385abae |
}
|
|
|
385abae |
|