crt.s revision 2
2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 2N/A * Initial entry point for the brand emulation library. 2N/A * This platform specific assembly entry point exists just to invoke 2N/A * the common brand library startup routine. That routine expects to 2N/A * be called with the following arguments: 2N/A * brand_init(int argc, char *argv[], char *envp[]) 2N/A * There are no arguments explicitly passed to this entry point, 2N/A * routine, but we do know how our initial stack has been setup by 2N/A * the kernel. The stack format is documented in: 2N/A * So this routine will troll through the stack to setup the argument 2N/A * values for the common brand library startup routine and then invoke 2N/A * it. This routine is modeled after the default crt1.s`_start() 2N/A /* Make stack traces look pretty, build a fake stack frame. */ 2N/A * Calculate the location of the envp array by adding the size of 2N/A * the argv array to the start of the argv array.