<short summary of the patch>
authorCamm Maguire <camm@debian.org>
Thu, 11 Aug 2022 17:16:42 +0000 (18:16 +0100)
committerCamm Maguire <camm@debian.org>
Thu, 11 Aug 2022 17:16:42 +0000 (18:16 +0100)
Bug-Debian: https://bugs.debian.org/942312
Bug-Debian: https://bugs.debian.org/944651

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-89) unstable; urgency=medium

  * Bug fix: "gcl - FTBFS on ppc64el - invalid relocation type 31", thanks
    to thierry.fauck@fr.ibm.com</a>; (Closes: #942312).
  * Bug fix: "FTBFS on ppc64el", thanks to Ivo De Decker (Closes:
    #944651).

Gbp-Pq: Name Version_2_6_13pre87

h/elf64_ppcle_reloc.h
h/elf64_ppcle_reloc_special.h

index 965f19667a1ceceee82c0e1f2fefa79c0eb554a9..87c45087ade21d3a1949bc8373a33e5171f65100 100644 (file)
     case R_PPC64_PLT16_HA:
       gote=got+sym->st_size-1;
       *gote=s+a;
+      massert(toc);
       store_val(where,MASK(16),ha((ul)gote-toc->st_value));
       break;
     case R_PPC64_PLT16_LO_DS:
       gote=got+sym->st_size-1;
       *gote=s+a;
+      massert(toc);
       store_val(where,MASK(16),lo((ul)gote-toc->st_value));/*>>2*/
       break;
     case R_PPC64_PLTSEQ:
     case R_PPC64_PLTCALL:
       break;
     case R_PPC64_TOC16_HA: 
+      massert(toc);
       store_val(where,MASK(16),ha(s+a-toc->st_value));
       break;
     case R_PPC64_TOC16_LO_DS: 
+      massert(toc);
       store_val(where,MASK(16),lo(s+a-toc->st_value));/*>>2*/
       break;
     case R_PPC64_REL16_LO:
       store_val(where,MASK(16),lo(s+a-p));
       break;
     case R_PPC64_TOC16_LO:
+      massert(toc);
       store_val(where,MASK(16),lo(s+a-toc->st_value));
       break;
     case R_PPC64_ADDR64:
       store_val(where,~0L,(s+a));
       break;
     case R_PPC64_TOC:
+      massert(toc);
       store_val(where,~0L,toc->st_value);
       break;
     case R_PPC64_REL32:
index 26cb672f41fff490624647fbf53761fecd75efdd..12c9f792f7d0d17c064515c8887c4fb01bd86e1b 100644 (file)
@@ -60,13 +60,12 @@ label_got_symbols(void *v1,Shdr *sec1,Shdr *sece,Sym *sym1,Sym *syme,const char
   Shdr *sec;
   Sym *sym;
   
-  massert(sec=get_section(".toc",sec1,sece,sn));
-
-  for (sym=sym1;sym<syme;sym++) {
+  for (toc=NULL,sym=sym1;sym<syme;sym++) {
     const char *s=st1+sym->st_name;
     if (!strcmp(s,".TOC.") || !strcmp(s,".toc.")) {
       toc=sym;
       toc->st_info=ELF_ST_INFO(STB_LOCAL,ELF_ST_TYPE(sym->st_info));
+      massert((sec=get_section(".bss",sec1,sece,sn)));
       toc->st_shndx=sec-sec1;
     }
   }