exit.c revision e23c41c9edb2294649cde3d370ae755701f3f140
/*
* 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 (c) 1988 AT&T
* All Rights Reserved
*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Utility functions
*/
#include <unistd.h>
#include <signal.h>
#include <locale.h>
#include <string.h>
#include "msg.h"
#include "_libld.h"
/*
* Exit after cleaning up.
*/
int
{
/*
* If we have created an output file remove it.
*/
/*
* Inform any support library that the link-edit has failed.
*/
/*
* Wrap up debug output file if one is open
*/
dbg_cleanup();
return (1);
}
/*
* Establish the signals we're interested in, and the handlers that need to be
* reinstalled should any of these signals occur.
*/
typedef struct {
int signo;
void (* defhdl)();
} Signals;
{ 0, 0 } };
/*
* Define our signal handler.
*/
static void
/* ARGSUSED2 */
{
/*
* Reset all ignore handlers regardless of how we got here.
*/
}
/*
* The model for creating an output file is to ftruncate() it to the
* required size and mmap() a mapping into which the new contents are
* written. Neither of these operations guarantee that the required
* disk blocks exist, and should we run out of disk space a bus error
* is generated.
* Other situations have been reported to result in ld catching a bus
* error (one instance was a stale NFS handle from an unstable server).
* Thus we catch all bus errors and hope we can decode a better error.
*/
}
/*
* This assert(0) causes DEBUG enabled linkers to produce a core file.
*/
assert(0);
}
/*
* Establish a signal handler for all signals we're interested in.
*/
void
{
/*
* For each signal we're interested in set up a signal handler that
* insures we clean up any output file we're in the middle of creating.
*/
}
}
}