From 5faeafbf189c3f3b4278316eb9fa1cc1042c89f0 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-25) unstable; urgency=medium * Version_2_6_13pre31, kfreebsd and mips64 FTBFS fix Gbp-Pq: Name Version_2_6_13pre32 --- h/elf64_mips_reloc.h | 1 + h/elf64_mips_reloc_special.h | 2 +- o/main.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/h/elf64_mips_reloc.h b/h/elf64_mips_reloc.h index f2ae317..00f5c83 100644 --- a/h/elf64_mips_reloc.h +++ b/h/elf64_mips_reloc.h @@ -1,6 +1,7 @@ case R_MIPS_JALR: break; case R_MIPS_64: + if (ELF_R_FTYPE(r->r_info)==R_MIPS_GPREL32) s-=(ul)got; add_val(where,~0L,s+a); break; case R_MIPS_GPREL32: diff --git a/h/elf64_mips_reloc_special.h b/h/elf64_mips_reloc_special.h index 59a1a5b..b9528fe 100644 --- a/h/elf64_mips_reloc_special.h +++ b/h/elf64_mips_reloc_special.h @@ -3,7 +3,7 @@ static ul ggot,ggote; static Rela *hr; #undef ELF_R_SYM #define ELF_R_SYM(a_) (a_&0xffffffff) #undef ELF_R_TYPE -#define ELF_R_TYPE(a_) (((a_>>40)&0xff) ? ((a_>>40)&0xff) : ((a_>>56)&0xff)) +#define ELF_R_TYPE(a_) (((a_>>40)&0xff) ? ((a_>>40)&0xff) : (((a_>>48)&0xff) ? ((a_>>48)&0xff) : ((a_>>56)&0xff))) #define ELF_R_FTYPE(a_) ((a_>>56)&0xff) typedef struct { diff --git a/o/main.c b/o/main.c index 91de009..3ba647d 100755 --- a/o/main.c +++ b/o/main.c @@ -179,7 +179,7 @@ get_phys_pages_no_malloc(char n) { } -#elif defined(__sun__) +#elif defined(__sun__) || defined(__GNU__) static ufixnum get_phys_pages_no_malloc(char n) { -- 2.30.2