Print this page
3999 libld extended section handling is broken

@@ -2051,11 +2051,11 @@
                          */
                         if (symshndx && (sym->st_shndx == SHN_XINDEX)) {
                                 shndx = symshndx[ndx];
                         } else if ((shndx = sym->st_shndx) >= SHN_LORESERVE) {
                                 sdflags |= FLG_SY_SPECSEC;
-                        } else if (shndx > ifl->ifl_ehdr->e_shnum) {
+                        } else if (shndx > ifl->ifl_shnum) {
                                 /* We need the name before we can issue error */
                                 shndx_bad = 1;
                         }
 
                         /*

@@ -2366,11 +2366,11 @@
                  */
                 if (symshndx && (nsym->st_shndx == SHN_XINDEX)) {
                         shndx = symshndx[ndx];
                 } else if ((shndx = nsym->st_shndx) >= SHN_LORESERVE) {
                         sdflags |= FLG_SY_SPECSEC;
-                } else if (shndx > ifl->ifl_ehdr->e_shnum) {
+                } else if (shndx > ifl->ifl_shnum) {
                         /* We need the name before we can issue error */
                         shndx_bad = 1;
                 }
 
                 /*