From 79d9ba605b94e394c9df2eb01153b4c89a880334 Mon Sep 17 00:00:00 2001 From: Camm Maguire Date: Sun, 13 Nov 2022 12:55:14 +0000 Subject: [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-70) unstable; urgency=medium * Version_2_6_13pre59 Gbp-Pq: Name Version_2_6_13pre60 --- h/elf64_alpha_reloc.h | 2 +- h/elf64_alpha_reloc_special.h | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/h/elf64_alpha_reloc.h b/h/elf64_alpha_reloc.h index 9c5e8f8..03a3357 100644 --- a/h/elf64_alpha_reloc.h +++ b/h/elf64_alpha_reloc.h @@ -29,7 +29,7 @@ } else *gote=s+a; s=(gote-got)*sizeof(*got); - massert(!(s&~MASK(16))); + massert(!(s&~MASK(15))); store_val(where,MASK(16),s); break; case R_ALPHA_GPRELHIGH: diff --git a/h/elf64_alpha_reloc_special.h b/h/elf64_alpha_reloc_special.h index 3126499..726a9d2 100644 --- a/h/elf64_alpha_reloc_special.h +++ b/h/elf64_alpha_reloc_special.h @@ -62,7 +62,6 @@ static int label_got_symbols(void *v1,Shdr *sec1,Shdr *sece,Sym *sym1,Sym *syme,const char *st1,const char *sn,ul *gs) { Rela *r,*rr; - Sym *sym; Shdr *sec; void *v,*ve,*vv; ul b,q; @@ -80,8 +79,12 @@ label_got_symbols(void *v1,Shdr *sec1,Shdr *sece,Sym *sym1,Sym *syme,const char vv-=sec->sh_entsize,rr=vv); b=sizeof(r->r_addend)*4; - q=vv>=v1 ? (rr->r_addend>>b) : ++*gs; - massert(!make_got_room_for_stub(sec1,sece,sym,st1,gs)); + if (vv>=v1) + q=rr->r_addend>>b; + else { + q=++*gs; + massert(!make_got_room_for_stub(sec1,sece,sym1+ELF_R_SYM(r->r_info),st1,gs)); + } massert(*gs==q || !r->r_addend); massert(!(r->r_addend>>b)); r->r_addend|=(q<