<short summary of the patch>
authorCamm Maguire <camm@debian.org>
Sun, 13 Nov 2022 12:55:14 +0000 (12:55 +0000)
committerCamm Maguire <camm@debian.org>
Sun, 13 Nov 2022 12:55:14 +0000 (12:55 +0000)
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
h/elf64_mips_reloc_special.h
o/main.c

index f2ae317dc6a2aadd2bdc06c419ee00aba021069e..00f5c8347e9cf1daf86b2a7208950cbd0dfa796b 100644 (file)
@@ -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:
index 59a1a5b0ecf3f6a25ce3990a4c7bb64717524d12..b9528fe78026d9963de312c1e388413ef8229481 100644 (file)
@@ -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 {
index 91de00974df13f005bc2679219ad6a75cda96cbb..3ba647dcdf2c71d7c68379d4ab7f07293b6f5d38 100755 (executable)
--- 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) {