/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright (c) 1988 AT&T
* All Rights Reserved
*/
/*
* Copyright (c) 2012, Joyent, Inc. All rights reserved.
*/
/*
* SPARC specific setup routine - relocate ld.so's symbols, setup its
* environment, map in loadable sections of the executable.
*
* structure, address of process environment pointers, address of auxiliary
* vector and * argv[0] (process name).
* If errors occur, send process signal - otherwise
* return executable's entry point to the bootstrap routine.
*/
#include <signal.h>
#include <stdlib.h>
#include <link.h>
#include <dlfcn.h>
#include "_rtld.h"
#include "_audit.h"
#include "msg.h"
#ifdef A_OUT
#include "_a.out.h"
#endif /* A_OUT */
/* VARARGS */
unsigned long
{
#ifdef A_OUT
#endif /* A_OUT */
/*
* Scan the bootstrap structure to pick up the basics.
*/
case EB_DYNAMIC:
#ifdef A_OUT
#endif /* A_OUT */
break;
case EB_LDSO_BASE:
break;
case EB_ARGV:
break;
case EB_ENVP:
break;
case EB_AUXV:
break;
case EB_PAGESIZE:
break;
}
/*
* Search the aux. vector for the information passed by exec.
*/
case AT_EXECFD:
/* this is the old exec that passes a file descriptor */
break;
case AT_FLAGS:
/* processor flags (MAU available, etc) */
break;
case AT_PAGESZ:
/* system page size */
break;
case AT_PHDR:
/* address of the segment table */
break;
case AT_BASE:
/* interpreter base address */
if (ld_base == 0)
break;
case AT_SUN_UID:
/* effective user id for the executable */
break;
case AT_SUN_RUID:
/* real user id for the executable */
break;
case AT_SUN_GID:
/* effective group id for the executable */
break;
case AT_SUN_RGID:
/* real group id for the executable */
break;
case AT_SUN_PLATFORM:
/* platform name */
break;
case AT_SUN_EXECNAME:
/* full pathname of execed object */
break;
case AT_SUN_AUXFLAGS:
/* auxiliary flags */
break;
case AT_SUN_HWCAP:
/* hardware capabilities */
break;
case AT_SUN_HWCAP2:
/* hardware capabilities */
break;
case AT_SUN_EMULATOR:
/* name of emulation library, if any */
break;
}
}
/*
* Get needed info from ld.so's dynamic structure.
*/
/* LINTED */
case DT_RELA:
break;
case DT_RELACOUNT:
break;
case DT_RELAENT:
break;
case DT_STRTAB:
break;
case DT_SONAME:
break;
}
}
/*
* If we don't have a RELAENT, just assume the size.
*/
if (relaent == 0)
/*
* As all global symbol references within ld.so.1 are protected
* (symbolic), only RELATIVE and JMPSLOT relocations should be left
* to process at runtime. Process all relative relocations now.
*/
}
/*
* If an emulation library is being used, use that as the linker's
* effective executable name. The real executable is not linked by this
* linker.
*/
}
/*
* Continue with generic startup processing.
*/
/* BEGIN CSTYLED */
#ifdef A_OUT
#else
/* CSTYLED */
#endif /* A_OUT */
}
/* END CSTYLED */
return (LM_ENTRY_PT(lmp)());
}