diff options
| author | Richard Lowe <richlowe@richlowe.net> | 2015-02-13 12:31:45 -0500 |
|---|---|---|
| committer | Richard Lowe <richlowe@richlowe.net> | 2015-02-26 14:19:39 -0500 |
| commit | 495021bdf7d49b2cc9a6e6981b5ec4110264741b (patch) | |
| tree | d2a64019642d8debda7842ab61c5b69a3c4ce3a2 /usr/src/tools/ctf | |
| parent | 6ddb3373ce2752b5535cbbda4370c8c550876098 (diff) | |
| download | illumos-joyent-495021bdf7d49b2cc9a6e6981b5ec4110264741b.tar.gz | |
5595 libzpool won't build with a studio primary
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Diffstat (limited to 'usr/src/tools/ctf')
| -rw-r--r-- | usr/src/tools/ctf/cvt/ctfconvert.c | 15 | ||||
| -rw-r--r-- | usr/src/tools/ctf/cvt/ctfmerge.c | 19 | ||||
| -rw-r--r-- | usr/src/tools/ctf/cvt/ctftools.h | 1 | ||||
| -rw-r--r-- | usr/src/tools/ctf/cvt/output.c | 7 |
4 files changed, 8 insertions, 34 deletions
diff --git a/usr/src/tools/ctf/cvt/ctfconvert.c b/usr/src/tools/ctf/cvt/ctfconvert.c index 756549e545..e5c3fffff0 100644 --- a/usr/src/tools/ctf/cvt/ctfconvert.c +++ b/usr/src/tools/ctf/cvt/ctfconvert.c @@ -23,8 +23,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Given a file containing sections with stabs data, convert the stabs data to * CTF data, and replace the stabs sections with a CTF section. @@ -150,7 +148,6 @@ main(int argc, char **argv) char *label = NULL; int verbose = 0; int ignore_non_c = 0; - int keep_stabs = 0; int c; sighold(SIGINT); @@ -164,7 +161,7 @@ main(int argc, char **argv) if (getenv("CTFCONVERT_DEBUG_PARSE")) debug_parse = atoi(getenv("CTFCONVERT_DEBUG_PARSE")); - while ((c = getopt(argc, argv, ":l:L:o:givs")) != EOF) { + while ((c = getopt(argc, argv, ":l:L:o:ivs")) != EOF) { switch (c) { case 'l': label = optarg; @@ -182,9 +179,6 @@ main(int argc, char **argv) case 'i': ignore_non_c = 1; break; - case 'g': - keep_stabs = CTF_KEEP_STABS; - break; case 'v': verbose = 1; break; @@ -194,9 +188,6 @@ main(int argc, char **argv) } } - if (getenv("STRIPSTABS_KEEP_STABS") != NULL) - keep_stabs = CTF_KEEP_STABS; - if (argc - optind != 1 || label == NULL) { usage(); exit(2); @@ -240,11 +231,11 @@ main(int argc, char **argv) * to a temporary file, and replace the input file when we're done. */ if (outfile && strcmp(infile, outfile) != 0) { - write_ctf(mstrtd, infile, outfile, dynsym | keep_stabs); + write_ctf(mstrtd, infile, outfile, dynsym); } else { char *tmpname = mktmpname(infile, ".ctf"); - write_ctf(mstrtd, infile, tmpname, dynsym | keep_stabs); + write_ctf(mstrtd, infile, tmpname, dynsym); if (rename(tmpname, infile) != 0) terminate("Couldn't rename temp file %s", tmpname); free(tmpname); diff --git a/usr/src/tools/ctf/cvt/ctfmerge.c b/usr/src/tools/ctf/cvt/ctfmerge.c index 2d00a566be..33a4f16cfe 100644 --- a/usr/src/tools/ctf/cvt/ctfmerge.c +++ b/usr/src/tools/ctf/cvt/ctfmerge.c @@ -23,8 +23,6 @@ * 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. @@ -602,7 +600,7 @@ terminate_cleanup(void) } static void -copy_ctf_data(char *srcfile, char *destfile, int keep_stabs) +copy_ctf_data(char *srcfile, char *destfile) { tdata_t *srctd; @@ -610,7 +608,7 @@ copy_ctf_data(char *srcfile, char *destfile, int keep_stabs) terminate("No CTF data found in source file %s\n", srcfile); tmpname = mktmpname(destfile, ".ctf"); - write_ctf(srctd, destfile, tmpname, CTF_COMPRESS | keep_stabs); + write_ctf(srctd, destfile, tmpname, CTF_COMPRESS); if (rename(tmpname, destfile) != 0) { terminate("Couldn't rename temp file %s to %s", tmpname, destfile); @@ -741,7 +739,6 @@ main(int argc, char **argv) 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; @@ -752,7 +749,7 @@ main(int argc, char **argv) debug_level = atoi(getenv("CTFMERGE_DEBUG_LEVEL")); err = 0; - while ((c = getopt(argc, argv, ":cd:D:fgl:L:o:tvw:s")) != EOF) { + while ((c = getopt(argc, argv, ":cd:D:fl:L:o:tvw:s")) != EOF) { switch (c) { case 'c': docopy = 1; @@ -768,9 +765,6 @@ main(int argc, char **argv) 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; @@ -833,9 +827,6 @@ main(int argc, char **argv) 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); @@ -855,7 +846,7 @@ main(int argc, char **argv) * so we shoe-horn a copier into ctfmerge. */ if (docopy) { - copy_ctf_data(argv[optind], argv[optind + 1], keep_stabs); + copy_ctf_data(argv[optind], argv[optind + 1]); exit(0); } @@ -999,7 +990,7 @@ main(int argc, char **argv) tmpname = mktmpname(outfile, ".ctf"); write_ctf(savetd, outfile, tmpname, - CTF_COMPRESS | write_fuzzy_match | dynsym | keep_stabs); + CTF_COMPRESS | write_fuzzy_match | dynsym); if (rename(tmpname, outfile) != 0) terminate("Couldn't rename output temp file %s", tmpname); free(tmpname); diff --git a/usr/src/tools/ctf/cvt/ctftools.h b/usr/src/tools/ctf/cvt/ctftools.h index a9519dc06c..708dfd82ef 100644 --- a/usr/src/tools/ctf/cvt/ctftools.h +++ b/usr/src/tools/ctf/cvt/ctftools.h @@ -390,7 +390,6 @@ void merge_into_master(tdata_t *, tdata_t *, tdata_t *, int); #define CTF_FUZZY_MATCH 0x1 /* match local symbols to global CTF */ #define CTF_USE_DYNSYM 0x2 /* use .dynsym not .symtab */ #define CTF_COMPRESS 0x4 /* compress CTF output */ -#define CTF_KEEP_STABS 0x8 /* keep .stabs sections */ void write_ctf(tdata_t *, const char *, const char *, int); diff --git a/usr/src/tools/ctf/cvt/output.c b/usr/src/tools/ctf/cvt/output.c index 90c87dabf3..f23aa7394c 100644 --- a/usr/src/tools/ctf/cvt/output.c +++ b/usr/src/tools/ctf/cvt/output.c @@ -456,7 +456,6 @@ write_file(Elf *src, const char *srcname, Elf *dst, const char *dstname, off_t new_offset = 0; off_t ctfnameoff = 0; int dynsym = (flags & CTF_USE_DYNSYM); - int keep_stabs = (flags & CTF_KEEP_STABS); int *secxlate; int srcidx, dstidx; int curnmoff = 0; @@ -506,12 +505,6 @@ write_file(Elf *src, const char *srcname, Elf *dst, const char *dstname, if (strcmp(sname, CTF_ELF_SCN_NAME) == 0) { secxlate[srcidx] = -1; - } else if (!keep_stabs && - (strncmp(sname, ".stab", 5) == 0 || - strncmp(sname, ".debug", 6) == 0 || - strncmp(sname, ".rel.debug", 10) == 0 || - strncmp(sname, ".rela.debug", 11) == 0)) { - secxlate[srcidx] = -1; } else if (dynsym && shdr.sh_type == SHT_SYMTAB) { /* * If we're building CTF against the dynsym, |
