support.c revision 57ef7aa924e4bfdf3118d9b5b4285dfc94b632f3
824N/A * The contents of this file are subject to the terms of the 824N/A * Common Development and Distribution License (the "License"). 824N/A * You may not use this file except in compliance with the License. 824N/A * See the License for the specific language governing permissions 824N/A * and limitations under the License. 824N/A * When distributing Covered Code, include this CDDL HEADER in each 824N/A * If applicable, add the following below this CDDL HEADER, with the 824N/A * fields enclosed by brackets "[]" replaced with your own identifying 824N/A * information: Portions Copyright [yyyy] [name of copyright owner] 824N/A * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 824N/A * Use is subject to license terms. 824N/A * Table which defines the default functions to be called by the library 824N/A * SUPPORT (-S <libname>). These functions can be redefined by the 824N/A * ld_support_loadso() routine. 824N/A * Loads in a support shared object specified using the SGS_SUPPORT environment 824N/A * variable or the -S ld option, and determines which interface functions are 824N/A * provided by that object. * Load the required support library. If we are unable to load it fail * If version is LD_SUP_VNONE, unload the support * library and act as if it was never requested. * This provides the support library with a mechanism * for opting out of the process. * Note that this depends on LDS_VERSION being the * first item in support[]. If this were not true, * then other functions from the library might be * entered into the function lists, and unloading * the object would cause corruption. * If the support library has a version higher * than we support, we are unable to accept it. * Wrapper routines for the ld support library calls. * This interface was introduced in VERSION3. Only call this * function for libraries reporting support for version 3 or * If the present object is an extracted archive member, make * sure the archive offset is reset so that the caller can * obtain an ELF descriptor to the same member (an elf_begin() * moves the offset to the next member). * If the file descriptor, ELF descriptor, or file names have * been modified, then diagnose the differences and return the * new data. As a basic test, make sure the support library * hasn't nulled out data ld(1) will try and dereference. * This interface was introduced in VERSION2. Only call this * function for libraries reporting support for version 2 or * If the section header has been re-allocated (known to occur * difference and return the new section header. * This interface was introduced in VERSION2. Only call this * function for libraries reporting support for version 2 or