Print this page
5595 libzpool won't build with a studio primary
*** 21,32 ****
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
- #pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* Given several files containing CTF data, merge and uniquify that data into
* a single CTF section in an output file.
*
* Merges can proceed independently. As such, we perform the merges in parallel
--- 21,30 ----
*** 600,618 ****
unlink(outfile);
}
}
static void
! copy_ctf_data(char *srcfile, char *destfile, int keep_stabs)
{
tdata_t *srctd;
if (read_ctf(&srcfile, 1, NULL, read_ctf_save_cb, &srctd, 1) == 0)
terminate("No CTF data found in source file %s\n", srcfile);
tmpname = mktmpname(destfile, ".ctf");
! write_ctf(srctd, destfile, tmpname, CTF_COMPRESS | keep_stabs);
if (rename(tmpname, destfile) != 0) {
terminate("Couldn't rename temp file %s to %s", tmpname,
destfile);
}
free(tmpname);
--- 598,616 ----
unlink(outfile);
}
}
static void
! copy_ctf_data(char *srcfile, char *destfile)
{
tdata_t *srctd;
if (read_ctf(&srcfile, 1, NULL, read_ctf_save_cb, &srctd, 1) == 0)
terminate("No CTF data found in source file %s\n", srcfile);
tmpname = mktmpname(destfile, ".ctf");
! write_ctf(srctd, destfile, tmpname, CTF_COMPRESS);
if (rename(tmpname, destfile) != 0) {
terminate("Couldn't rename temp file %s to %s", tmpname,
destfile);
}
free(tmpname);
*** 739,760 ****
char *withfile = NULL;
char *label = NULL;
char **ifiles, **tifiles;
int verbose = 0, docopy = 0;
int write_fuzzy_match = 0;
- int keep_stabs = 0;
int require_ctf = 0;
int nifiles, nielems;
int c, i, idx, tidx, err;
progname = basename(argv[0]);
if (getenv("CTFMERGE_DEBUG_LEVEL"))
debug_level = atoi(getenv("CTFMERGE_DEBUG_LEVEL"));
err = 0;
! while ((c = getopt(argc, argv, ":cd:D:fgl:L:o:tvw:s")) != EOF) {
switch (c) {
case 'c':
docopy = 1;
break;
case 'd':
--- 737,757 ----
char *withfile = NULL;
char *label = NULL;
char **ifiles, **tifiles;
int verbose = 0, docopy = 0;
int write_fuzzy_match = 0;
int require_ctf = 0;
int nifiles, nielems;
int c, i, idx, tidx, err;
progname = basename(argv[0]);
if (getenv("CTFMERGE_DEBUG_LEVEL"))
debug_level = atoi(getenv("CTFMERGE_DEBUG_LEVEL"));
err = 0;
! while ((c = getopt(argc, argv, ":cd:D:fl:L:o:tvw:s")) != EOF) {
switch (c) {
case 'c':
docopy = 1;
break;
case 'd':
*** 766,778 ****
uniqlabel = optarg;
break;
case 'f':
write_fuzzy_match = CTF_FUZZY_MATCH;
break;
- case 'g':
- keep_stabs = CTF_KEEP_STABS;
- break;
case 'l':
/* Label merged types with `label' */
label = optarg;
break;
case 'L':
--- 763,772 ----
*** 831,843 ****
if (err) {
usage();
exit(2);
}
- if (getenv("STRIPSTABS_KEEP_STABS") != NULL)
- keep_stabs = CTF_KEEP_STABS;
-
if (uniqfile && access(uniqfile, R_OK) != 0) {
warning("Uniquification file %s couldn't be opened and "
"will be ignored.\n", uniqfile);
uniqfile = NULL;
}
--- 825,834 ----
*** 853,863 ****
* This is ugly, but we don't want to have to have a separate tool
* (yet) just for copying an ELF section with our specific requirements,
* so we shoe-horn a copier into ctfmerge.
*/
if (docopy) {
! copy_ctf_data(argv[optind], argv[optind + 1], keep_stabs);
exit(0);
}
set_terminate_cleanup(terminate_cleanup);
--- 844,854 ----
* This is ugly, but we don't want to have to have a separate tool
* (yet) just for copying an ELF section with our specific requirements,
* so we shoe-horn a copier into ctfmerge.
*/
if (docopy) {
! copy_ctf_data(argv[optind], argv[optind + 1]);
exit(0);
}
set_terminate_cleanup(terminate_cleanup);
*** 997,1007 ****
savetd = mstrtd;
}
tmpname = mktmpname(outfile, ".ctf");
write_ctf(savetd, outfile, tmpname,
! CTF_COMPRESS | write_fuzzy_match | dynsym | keep_stabs);
if (rename(tmpname, outfile) != 0)
terminate("Couldn't rename output temp file %s", tmpname);
free(tmpname);
return (0);
--- 988,998 ----
savetd = mstrtd;
}
tmpname = mktmpname(outfile, ".ctf");
write_ctf(savetd, outfile, tmpname,
! CTF_COMPRESS | write_fuzzy_match | dynsym);
if (rename(tmpname, outfile) != 0)
terminate("Couldn't rename output temp file %s", tmpname);
free(tmpname);
return (0);