From 62b628a68db596a2d75a316dc7ffef658079231f Mon Sep 17 00:00:00 2001 From: Ali Bahrami Date: Thu, 18 Jun 2009 13:16:39 -0600 Subject: 6851224 elf_getshnum() and elf_getshstrndx() incompatible with 2002 ELF gABI agreement PSARC/2009/363 replace elf_getphnum, elf_getshnum, and elf_getshstrndx --- usr/src/lib/libelfsign/common/elfsignlib.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'usr/src/lib/libelfsign') diff --git a/usr/src/lib/libelfsign/common/elfsignlib.c b/usr/src/lib/libelfsign/common/elfsignlib.c index d40a8bd0e9..361c83911d 100644 --- a/usr/src/lib/libelfsign/common/elfsignlib.c +++ b/usr/src/lib/libelfsign/common/elfsignlib.c @@ -20,12 +20,10 @@ */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #define ELF_TARGET_ALL /* get definitions of all section flags */ #include @@ -356,7 +354,7 @@ elfsign_begin(const char *filename, enum ES_ACTION action, ELFsign_t *essp) * Call elf_getshstrndx to be sure we have a real ELF object * this is required because elf_begin doesn't check that. */ - if (elf_getshstrndx(ess->es_elf, &ess->es_shstrndx) == 0) { + if (elf_getshdrstrndx(ess->es_elf, &ess->es_shstrndx) == -1) { elfsign_end(ess); cryptodebug("elfsign_begin: elf_getshstrndx failed"); return (ELFSIGN_INVALID_ELFOBJ); -- cgit v1.2.3