ldlibs.c revision 2926dd2e801916128855cec712d18656be9bd1c5
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * CDDL HEADER START
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * The contents of this file are subject to the terms of the
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * Common Development and Distribution License (the "License").
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * You may not use this file except in compliance with the License.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * or http://www.opensolaris.org/os/licensing.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * See the License for the specific language governing permissions
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * and limitations under the License.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * When distributing Covered Code, include this CDDL HEADER in each
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * If applicable, add the following below this CDDL HEADER, with the
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * fields enclosed by brackets "[]" replaced with your own identifying
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * information: Portions Copyright [yyyy] [name of copyright owner]
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * CDDL HEADER END
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * Copyright (c) 1988 AT&T
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * All Rights Reserved
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * Use is subject to license terms.
ddc0e0b53c661f6e439e3b7072b3ef353eadb4afRichard Lowe#pragma ident "%Z%%M% %I% %E% SMI"
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * Library processing
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * List of support libraries specified (-S option).
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * Function to handle -YL and -YU substitutions in LIBPATH. It's probably
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * very unlikely that the link-editor will ever see this, as any use of these
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * options is normally processed by the compiler driver first and the finished
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * -YP string is sent to us. The fact that these two options are not even
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * documented anymore makes it even more unlikely this processing will occur.
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtiscompat_YL_YU(Ofl_desc *ofl, char *path, int index)
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * User supplied "-YL,libdir", this is the pathname that
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * corresponds for compatibility to -YL (as defined in
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis DBG_CALL(Dbg_libs_ylu(ofl->ofl_lml, Llibdir,
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * User supplied "-YU,libdir", this is the pathname that
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis * corresponds for compatibility to -YU (as defined in
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtis DBG_CALL(Dbg_libs_ylu(ofl->ofl_lml, Ulibdir,
25c28e83beb90e7c80452a7c818c5e6f73a07dc8Piotr Jasiukajtisprocess_lib_path(Ofl_desc *ofl, List *list, char *path, Boolean subsflag)
char *cp;
for (i = YLDIR; i; i++) {
if (seenflg)
return ((char *)S_ERROR);
return ((char *)S_ERROR);
return (cp);
return ((char *)S_ERROR);
return ((char *)S_ERROR);
return ((char *)S_ERROR);
if (seenflg)
return ((char *)S_ERROR);
return (cp);
return (S_ERROR);
insert_lib)) == 0)
return (S_ERROR);
static Ifl_desc *
int fd;
dlen++;
return (ifl);
return (ifl);
char *path;
name);
#if defined(_ELF64)
return (S_ERROR);
if (path) {
++path;
FALSE);
return (S_ERROR);
else if (cp)
return (S_ERROR);
else if (cp) {
return (S_ERROR);