<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/952334

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-95) unstable; urgency=high

  * Version_2_6_13pre90
  * build under GCL_MEM_MULTIPLE=0.1
  * Bug fix: "FTBFS: Unrecoverable error: Segmentation violation..",
    thanks to Lucas Nussbaum (Closes: #952334).

Gbp-Pq: Name Version_2_6_13pre92

h/elf32_armhf_reloc_special.h

index 56d35a1a5c89dd1a2f4f90b28a0a3cb6c6e36a01..77e8852000a7a142bcbe21495653c24edabaf7c8 100644 (file)
@@ -6,13 +6,15 @@ static ul tz=sizeof(tramp)/sizeof(ul);
 static ul *
 next_plt_entry(ul *p,ul *pe) {
 
-  ul l0=0xe5bef000,/*ldr pc,[ip,#]*/
-     l1=0xe5bcf000;/*ldr pc,[lr,#]*/
-
-  for (;p<pe && (*p&l0)!=l0 && (*p&l1)!=l1;p++);
-  if ((*p&l0)==l0) p++;
-
-  return p+1;
+   /* 4778             bx      pc */ /*optional*/
+   /* e7fd             b.n     20dd0 <__fprintf_chk@plt> */ /*optional*/
+   /*      above when stripped becomes undefined instruction*/
+   /* e28fc601         add     ip, pc, #1048576        ; 0x100000 */
+   /* e28ccab0         add     ip, ip, #176, 20        ; 0xb0000 */
+   /* e5bcf914         ldr     pc, [ip, #2324]!        ; 0x914 */
+
+  for (p=p+2;p<pe && ((*p)>>20)!=0xe28;p++);
+  return p;
 
 }