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

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/ctf/cvt/output.c
          +++ new/usr/src/tools/ctf/cvt/output.c
↓ open down ↓ 448 lines elided ↑ open up ↑
 449  449  {
 450  450          GElf_Ehdr sehdr, dehdr;
 451  451          Elf_Scn *sscn, *dscn;
 452  452          Elf_Data *sdata, *ddata;
 453  453          GElf_Shdr shdr;
 454  454          GElf_Word symtab_type;
 455  455          int symtab_idx = -1;
 456  456          off_t new_offset = 0;
 457  457          off_t ctfnameoff = 0;
 458  458          int dynsym = (flags & CTF_USE_DYNSYM);
 459      -        int keep_stabs = (flags & CTF_KEEP_STABS);
 460  459          int *secxlate;
 461  460          int srcidx, dstidx;
 462  461          int curnmoff = 0;
 463  462          int changing = 0;
 464  463          int pad;
 465  464          int i;
 466  465  
 467  466          if (gelf_newehdr(dst, gelf_getclass(src)) == 0)
 468  467                  elfterminate(dstname, "Cannot copy ehdr to temp file");
 469  468          gelf_getehdr(src, &sehdr);
↓ open down ↓ 29 lines elided ↑ open up ↑
 499  498  
 500  499                  gelf_getshdr(scn, &shdr);
 501  500                  sname = elf_strptr(src, sehdr.e_shstrndx, shdr.sh_name);
 502  501                  if (sname == NULL) {
 503  502                          elfterminate(srcname, "Can't find string at %u",
 504  503                              shdr.sh_name);
 505  504                  }
 506  505  
 507  506                  if (strcmp(sname, CTF_ELF_SCN_NAME) == 0) {
 508  507                          secxlate[srcidx] = -1;
 509      -                } else if (!keep_stabs &&
 510      -                    (strncmp(sname, ".stab", 5) == 0 ||
 511      -                    strncmp(sname, ".debug", 6) == 0 ||
 512      -                    strncmp(sname, ".rel.debug", 10) == 0 ||
 513      -                    strncmp(sname, ".rela.debug", 11) == 0)) {
 514      -                        secxlate[srcidx] = -1;
 515  508                  } else if (dynsym && shdr.sh_type == SHT_SYMTAB) {
 516  509                          /*
 517  510                           * If we're building CTF against the dynsym,
 518  511                           * we'll rip out the symtab so debuggers aren't
 519  512                           * confused.
 520  513                           */
 521  514                          secxlate[srcidx] = -1;
 522  515                  } else {
 523  516                          secxlate[srcidx] = dstidx++;
 524  517                          curnmoff += strlen(sname) + 1;
↓ open down ↓ 196 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX