Print this page
5595 libzpool won't build with a studio primary

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/ctf/cvt/ctfconvert.c
          +++ new/usr/src/tools/ctf/cvt/ctfconvert.c
↓ open down ↓ 15 lines elided ↑ open up ↑
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   */
  25   25  
  26      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  27      -
  28   26  /*
  29   27   * Given a file containing sections with stabs data, convert the stabs data to
  30   28   * CTF data, and replace the stabs sections with a CTF section.
  31   29   */
  32   30  
  33   31  #include <stdio.h>
  34   32  #include <stdlib.h>
  35   33  #include <unistd.h>
  36   34  #include <signal.h>
  37   35  #include <string.h>
↓ open down ↓ 105 lines elided ↑ open up ↑
 143  141          return (rc);
 144  142  }
 145  143  
 146  144  int
 147  145  main(int argc, char **argv)
 148  146  {
 149  147          tdata_t *filetd, *mstrtd;
 150  148          char *label = NULL;
 151  149          int verbose = 0;
 152  150          int ignore_non_c = 0;
 153      -        int keep_stabs = 0;
 154  151          int c;
 155  152  
 156  153          sighold(SIGINT);
 157  154          sighold(SIGQUIT);
 158  155          sighold(SIGTERM);
 159  156  
 160  157          progname = basename(argv[0]);
 161  158  
 162  159          if (getenv("CTFCONVERT_DEBUG_LEVEL"))
 163  160                  debug_level = atoi(getenv("CTFCONVERT_DEBUG_LEVEL"));
 164  161          if (getenv("CTFCONVERT_DEBUG_PARSE"))
 165  162                  debug_parse = atoi(getenv("CTFCONVERT_DEBUG_PARSE"));
 166  163  
 167      -        while ((c = getopt(argc, argv, ":l:L:o:givs")) != EOF) {
      164 +        while ((c = getopt(argc, argv, ":l:L:o:ivs")) != EOF) {
 168  165                  switch (c) {
 169  166                  case 'l':
 170  167                          label = optarg;
 171  168                          break;
 172  169                  case 'L':
 173  170                          if ((label = getenv(optarg)) == NULL)
 174  171                                  label = CTF_DEFAULT_LABEL;
 175  172                          break;
 176  173                  case 'o':
 177  174                          outfile = optarg;
 178  175                          break;
 179  176                  case 's':
 180  177                          dynsym = CTF_USE_DYNSYM;
 181  178                          break;
 182  179                  case 'i':
 183  180                          ignore_non_c = 1;
 184  181                          break;
 185      -                case 'g':
 186      -                        keep_stabs = CTF_KEEP_STABS;
 187      -                        break;
 188  182                  case 'v':
 189  183                          verbose = 1;
 190  184                          break;
 191  185                  default:
 192  186                          usage();
 193  187                          exit(2);
 194  188                  }
 195  189          }
 196  190  
 197      -        if (getenv("STRIPSTABS_KEEP_STABS") != NULL)
 198      -                keep_stabs = CTF_KEEP_STABS;
 199      -
 200  191          if (argc - optind != 1 || label == NULL) {
 201  192                  usage();
 202  193                  exit(2);
 203  194          }
 204  195  
 205  196          infile = argv[optind];
 206  197          if (access(infile, R_OK) != 0)
 207  198                  terminate("Can't access %s", infile);
 208  199  
 209  200          /*
↓ open down ↓ 23 lines elided ↑ open up ↑
 233  224          merge_into_master(filetd, mstrtd, NULL, 1);
 234  225  
 235  226          tdata_label_add(mstrtd, label, CTF_LABEL_LASTIDX);
 236  227  
 237  228          /*
 238  229           * If the user supplied an output file that is different from the
 239  230           * input file, write directly to the output file.  Otherwise, write
 240  231           * to a temporary file, and replace the input file when we're done.
 241  232           */
 242  233          if (outfile && strcmp(infile, outfile) != 0) {
 243      -                write_ctf(mstrtd, infile, outfile, dynsym | keep_stabs);
      234 +                write_ctf(mstrtd, infile, outfile, dynsym);
 244  235          } else {
 245  236                  char *tmpname = mktmpname(infile, ".ctf");
 246  237  
 247      -                write_ctf(mstrtd, infile, tmpname, dynsym | keep_stabs);
      238 +                write_ctf(mstrtd, infile, tmpname, dynsym);
 248  239                  if (rename(tmpname, infile) != 0)
 249  240                          terminate("Couldn't rename temp file %s", tmpname);
 250  241                  free(tmpname);
 251  242          }
 252  243  
 253  244          return (0);
 254  245  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX