/*
* 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 2012 Nexenta Systems, Inc. All rights reserved.
*
* Copyright (c) 1988 AT&T
* All Rights Reserved
*
*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include "stdlib.h"
#include "conv.h"
#include "mcs.h"
#include "extern.h"
/*
* Function prototypes.
*/
static void usage(int);
static void sigexit(int);
static int setup_sectname(char *, int);
static void queue(int, char *);
int
{
const char *opt;
char *str;
int c, i, my_prog;
/*
* Check for a binary that better fits this architecture.
*/
/*
* mcs(1) and strip() are hard linked together, determine which command
* was invoked.
*/
str++;
else
opt = "a:cdn:pVz?";
opt = "lxV?";
} else
#if !defined(TEXT_DOMAIN)
#endif
(void) textdomain(TEXT_DOMAIN);
for (i = 0; signum[i]; i++)
if ((Action =
}
/*
* Allocate command info structure
*/
}
switch (c) {
case 'a':
optcnt++;
break;
case 'c':
optcnt++;
break;
case 'd':
optcnt++;
break;
case 'z':
optcnt++;
break;
case 'n':
num_sect++;
break;
case 'l':
optcnt++;
break;
case 'p':
optcnt++;
break;
case 'x':
optcnt++;
break;
case 'V':
break;
case '?':
errflag++;
break;
default:
break;
}
}
if (errflag) {
}
/*
* strip command may not take any options.
*/
argc == 1))
}
/*
* This version only allows multiple section names
* only for -d option.
*/
}
/*
* If no -n was specified,
* set the default, ".comment".
* This is for mcs only.
*/
}
/*
* If I am strip command, then add needed
* section names.
*/
}
}
}
(void) elf_version(EV_NONE);
}
}
}
/*NOTREACHED*/
return (0);
}
/*
* Supplementary functions
*/
static void
{
}
}
actmax++;
}
/*
* Reset a temporary file descriptor for reuse.
* If the file requires unlinking, that is done first.
*/
void
{
}
/*ARGSUSED0*/
static void
sigexit(int i)
{
exit(100);
}
static void
{
"usage: %s [-cdpVz] [-a string] [-n name] file ...\n"), prog);
else
"usage: %s [-lVx] file ...\n"), prog);
}
void
{
}
/*
* Insert the section name 'name' into the
* section list.
*/
static int
{
/*
* Check if the name is already specified or not.
*/
return (0);
/*
* Allocate one
*/
}
}
/*
* Put this one in the list
*/
return (0);
}
/*
* Check if the 'name' exists in the section list.
*
* If found
* return 0;
* else
* return 1
*/
int
{
/*
* Check if the name is already specified or not.
*/
return (0);
return (0); /* silently ignore */
}
}
}
return (1);
}