Print this page
10138 smatch fixes for usr/src/cmd/sgs

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/sgs/libld/common/ldentry.c
          +++ new/usr/src/cmd/sgs/libld/common/ldentry.c
↓ open down ↓ 18 lines elided ↑ open up ↑
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   *      Copyright (c) 1988 AT&T
  24   24   *        All Rights Reserved
  25   25   *
  26   26   * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
  27   27   */
  28   28  
       29 +/*
       30 + * Copyright (c) 2018, Joyent, Inc.
       31 + */
       32 +
  29   33  #include        <stdio.h>
  30   34  #include        <string.h>
  31   35  #include        "msg.h"
  32   36  #include        "_libld.h"
  33   37  
  34   38  
  35   39  /*
  36   40   * Print a virtual address map of input and output sections together with
  37   41   * multiple symbol definitions (if they exist).
  38   42   */
↓ open down ↓ 110 lines elided ↑ open up ↑
 149  153                          continue;
 150  154  
 151  155                  /*
 152  156                   * Files that define a symbol are saved on the `sa_dfiles' list.
 153  157                   * Ignore symbols that aren't needed, and any special symbols
 154  158                   * that the link editor may produce (symbols of type ABS and
 155  159                   * COMMON are not recorded in the first place, however functions
 156  160                   * like _init() and _fini() commonly have multiple occurrences).
 157  161                   */
 158  162                  if ((sdp->sd_ref == REF_DYN_SEEN) ||
 159      -                    (sdp->sd_aux && sdp->sd_aux->sa_symspec) ||
      163 +                    (sdp->sd_aux->sa_symspec) ||
 160  164                      (strcmp(MSG_ORIG(MSG_SYM_FINI_U), name) == 0) ||
 161  165                      (strcmp(MSG_ORIG(MSG_SYM_INIT_U), name) == 0) ||
 162  166                      (strcmp(MSG_ORIG(MSG_SYM_LIBVER_U), name) == 0))
 163  167                          continue;
 164  168  
 165  169                  if (symbol_title)
 166  170                          sym_muldef_title();
 167  171  
 168  172                  ducp = sdp->sd_file->ifl_name;
 169  173                  (void) printf(MSG_INTL(MSG_ENT_MUL_ENTRY_1), demangle(name),
↓ open down ↓ 51 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX