Print this page
10925 remove 32-bit krtld
Reviewed by: Andy Stormont <astormont@racktopsystems.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/intel/ia32/krtld/doreloc.c
          +++ new/usr/src/uts/intel/ia32/krtld/doreloc.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  /*
  23   23   * Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
  24   24   */
  25   25  
  26      -#if     defined(_KERNEL)
  27      -#include        <sys/types.h>
  28      -#include        "reloc.h"
  29      -#else
       26 +/*
       27 + * Copyright 2019 Joyent, Inc.
       28 + */
       29 +
       30 +/*
       31 + * While this is no longer relevant to the kernel, we keep it in its
       32 + * traditional location to match the other variants, used from the ld
       33 + * code.
       34 + */
       35 +
  30   36  #define ELF_TARGET_386
  31   37  #if defined(DO_RELOC_LIBLD)
  32   38  #undef DO_RELOC_LIBLD
  33   39  #define DO_RELOC_LIBLD_X86
  34   40  #endif
  35   41  #include        <stdio.h>
  36   42  #include        "sgs.h"
  37   43  #include        "machdep.h"
  38   44  #include        "libld.h"
  39   45  #include        "reloc.h"
  40   46  #include        "conv.h"
  41   47  #include        "msg.h"
  42      -#endif
  43   48  
  44   49  /*
  45   50   * We need to build this code differently when it is used for
  46   51   * cross linking:
  47   52   *      - Data alignment requirements can differ from those
  48   53   *              of the running system, so we can't access data
  49   54   *              in units larger than a byte
  50   55   *      - We have to include code to do byte swapping when the
  51   56   *              target and linker host use different byte ordering,
  52   57   *              but such code is a waste when running natively.
↓ open down ↓ 121 lines elided ↑ open up ↑
 174  179   *      @dtpoff(x): calculate the tlsoffset relative to the TLS block.
 175  180   *
 176  181   *      @tpoff(x): calculate the tlsoffset relative to the TLS block.
 177  182   *
 178  183   *      @dtpmod(x): calculate the module id of the object containing symbol x.
 179  184   *
 180  185   * The calculations in the CALCULATION column are assumed to have
 181  186   * been performed before calling this function except for the addition of
 182  187   * the addresses in the instructions.
 183  188   */
 184      -#if defined(_KERNEL)
 185      -#define lml     0               /* Needed by arglist of REL_ERR_* macros */
 186      -int
 187      -do_reloc_krtld(uchar_t rtype, uchar_t *off, Xword *value, const char *sym,
 188      -    const char *file)
 189      -#elif defined(DO_RELOC_LIBLD)
      189 +#if defined(DO_RELOC_LIBLD)
 190  190  /*ARGSUSED5*/
 191  191  int
 192  192  do_reloc_ld(Rel_desc *rdesc, uchar_t *off, Xword *value,
 193  193      rel_desc_sname_func_t rel_desc_sname_func,
 194  194      const char *file, int bswap, void *lml)
 195  195  #else
 196  196  int
 197  197  do_reloc_rtld(uchar_t rtype, uchar_t *off, Xword *value, const char *sym,
 198  198      const char *file, void *lml)
 199  199  #endif
↓ open down ↓ 71 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX