From 8878595fcb30298d8ee1db0aee6e69e4dc15b318 Mon Sep 17 00:00:00 2001 From: Richard Lowe Date: Tue, 6 Aug 2013 17:09:22 -0400 Subject: [PATCH] 3999 libld extended section handling is broken Reviewed by: Jason King Reviewed by: Josef 'Jeff' Sipek Approved by: Robert Mustacchi --- usr/src/cmd/sgs/libld/common/syms.c | 4 ++-- usr/src/cmd/sgs/packages/common/SUNWonld-README | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/usr/src/cmd/sgs/libld/common/syms.c b/usr/src/cmd/sgs/libld/common/syms.c index 3f43efe3f5..14455dfc42 100644 --- a/usr/src/cmd/sgs/libld/common/syms.c +++ b/usr/src/cmd/sgs/libld/common/syms.c @@ -2053,7 +2053,7 @@ ld_sym_process(Is_desc *isc, Ifl_desc *ifl, Ofl_desc *ofl) 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; } @@ -2368,7 +2368,7 @@ ld_sym_process(Is_desc *isc, Ifl_desc *ifl, Ofl_desc *ofl) 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; } diff --git a/usr/src/cmd/sgs/packages/common/SUNWonld-README b/usr/src/cmd/sgs/packages/common/SUNWonld-README index 389f8706b6..bd4314d9e3 100644 --- a/usr/src/cmd/sgs/packages/common/SUNWonld-README +++ b/usr/src/cmd/sgs/packages/common/SUNWonld-README @@ -1648,3 +1648,4 @@ Bugid Risk Synopsis 3709 need sloppy relocation for GNU .debug_macro 3722 link-editor is over restrictive of R_AMD64_32 addends 3926 multiple extern map file definitions corrupt symbol table entry +3999 libld extended section handling is broken -- 2.11.4.GIT