30da143285931291f495cc20b5a1b8869f0618a6ahl * CDDL HEADER START
30da143285931291f495cc20b5a1b8869f0618a6ahl * The contents of this file are subject to the terms of the
62b628a68db596a2d75a316dc7ffef658079231fAli Bahrami * Common Development and Distribution License (the "License").
62b628a68db596a2d75a316dc7ffef658079231fAli Bahrami * You may not use this file except in compliance with the License.
30da143285931291f495cc20b5a1b8869f0618a6ahl * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
30da143285931291f495cc20b5a1b8869f0618a6ahl * See the License for the specific language governing permissions
30da143285931291f495cc20b5a1b8869f0618a6ahl * and limitations under the License.
30da143285931291f495cc20b5a1b8869f0618a6ahl * When distributing Covered Code, include this CDDL HEADER in each
30da143285931291f495cc20b5a1b8869f0618a6ahl * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30da143285931291f495cc20b5a1b8869f0618a6ahl * If applicable, add the following below this CDDL HEADER, with the
30da143285931291f495cc20b5a1b8869f0618a6ahl * fields enclosed by brackets "[]" replaced with your own identifying
30da143285931291f495cc20b5a1b8869f0618a6ahl * information: Portions Copyright [yyyy] [name of copyright owner]
30da143285931291f495cc20b5a1b8869f0618a6ahl * CDDL HEADER END
62b628a68db596a2d75a316dc7ffef658079231fAli Bahrami * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
30da143285931291f495cc20b5a1b8869f0618a6ahl * Use is subject to license terms.
62b628a68db596a2d75a316dc7ffef658079231fAli Bahrami * Return number of entries in the program header array, taking
62b628a68db596a2d75a316dc7ffef658079231fAli Bahrami * extended headers into account.
62b628a68db596a2d75a316dc7ffef658079231fAli Bahrami * elf_getphnum() was defined based on the definition of the earlier
62b628a68db596a2d75a316dc7ffef658079231fAli Bahrami * elf_getshnum(). It returns 0 for failure, and 1 for success.
62b628a68db596a2d75a316dc7ffef658079231fAli Bahrami * elf_getphdrnum() supercedes elf_getphnum(), which is now considered
62b628a68db596a2d75a316dc7ffef658079231fAli Bahrami * obsolete. It returns -1 for failure and 0 for success, matching
62b628a68db596a2d75a316dc7ffef658079231fAli Bahrami * elf_getshdrnum(), and bringing us into alignment with the interface
62b628a68db596a2d75a316dc7ffef658079231fAli Bahrami * agreed to in the 2002 gABI meeting.
62b628a68db596a2d75a316dc7ffef658079231fAli Bahrami * See the comment in getshnum.c for additional information.
62b628a68db596a2d75a316dc7ffef658079231fAli Bahrami return (-1);
62b628a68db596a2d75a316dc7ffef658079231fAli Bahrami return (-1);