Print this page
8509 ld has a trouble linking c++ code built by GCC 7.1

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/sgs/libld/common/relocate.c
          +++ new/usr/src/cmd/sgs/libld/common/relocate.c
↓ open down ↓ 16 lines elided ↑ open up ↑
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  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) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
       27 + * Copyright 2017 RackTop Systems.
  27   28   */
  28   29  
  29   30  /*
  30   31   * set-up for relocations
  31   32   */
  32   33  
  33   34  #define ELF_TARGET_AMD64
  34   35  #define ELF_TARGET_SPARC
  35   36  
  36   37  #include        <string.h>
↓ open down ↓ 1969 lines elided ↑ open up ↑
2006 2007                                   * ignore this relocation.  Determine whether
2007 2008                                   * or not to issue a warning.
2008 2009                                   * Warnings are always issued under -z verbose,
2009 2010                                   * but otherwise, we will follow the lead of
2010 2011                                   * the GNU ld and suppress them for certain
2011 2012                                   * cases:
2012 2013                                   *
2013 2014                                   *  -   It is a non-allocable debug section.
2014 2015                                   *      The GNU ld tests for these by name,
2015 2016                                   *      but we are willing to extend it to
2016      -                                 *      any non-allocable section.
     2017 +                                 *      any non-allocable/read-only section.
2017 2018                                   *  -   The target section is excluded from
2018 2019                                   *      sloppy relocations by policy.
2019 2020                                   */
2020 2021                                  if (((ofl->ofl_flags & FLG_OF_VERBOSE) != 0) ||
2021 2022                                      ((is_shdr->sh_flags & SHF_ALLOC) &&
     2023 +                                    (is_shdr->sh_flags & SHF_WRITE) &&
2022 2024                                      (reject != RLXREL_REJ_TARGET)))
2023 2025                                          ld_eprintf(ofl, ERR_WARNING,
2024 2026                                              MSG_INTL(MSG_REL_SLOPCDATNOSYM),
2025 2027                                              conv_reloc_type(
2026 2028                                              ifl->ifl_ehdr->e_machine,
2027 2029                                              reld->rel_rtype, 0, &inv_buf),
2028 2030                                              ifl->ifl_name,
2029 2031                                              EC_WORD(isp->is_scnndx),
2030 2032                                              isp->is_name,
2031 2033                                              ld_reloc_sym_name(reld),
↓ open down ↓ 1129 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX