aboutsummaryrefslogtreecommitdiff
path: root/resolv/arpa
AgeCommit message (Expand)AuthorFilesLines
2000-07-19Update.Ulrich Drepper2-5/+11
1999-12-04Update.Ulrich Drepper2-234/+620
1999-06-08Update.Ulrich Drepper1-4/+0
1999-05-12Update.Ulrich Drepper1-0/+4
1998-10-16Update.Ulrich Drepper1-50/+4
1997-06-21Update.cvs/libc-ud-970620cvs/libc-970802cvs/libc-970801cvs/libc-970731cvs/libc-970730cvs/libc-970729cvs/libc-970728cvs/libc-970727cvs/libc-970726cvs/libc-970725cvs/libc-970724cvs/libc-970723cvs/libc-970722cvs/libc-970721cvs/libc-970720cvs/libc-970719cvs/libc-970718cvs/libc-970717cvs/libc-970715cvs/libc-970713cvs/libc-970710cvs/libc-970709cvs/libc-970708cvs/libc-970707cvs/libc-970705cvs/libc-970704cvs/libc-970703cvs/libc-970702cvs/libc-970701cvs/libc-970630cvs/libc-970629cvs/libc-970628cvs/libc-970627cvs/libc-970626cvs/libc-970625cvs/libc-970624cvs/libc-970622cvs/libc-970621Ulrich Drepper1-3/+3
1996-12-20Update from main archive 961219cvs/libc-961220Ulrich Drepper1-2/+2
1996-10-12update from main archive 961011Ulrich Drepper1-4/+3
1996-09-22update from main archive 960921Ulrich Drepper1-1/+1
1996-08-29update from main archive 960828glibc-1.93cvs/libc-960829cvs/libc-1-93Ulrich Drepper1-27/+5
1996-08-14Update.Ulrich Drepper1-18/+87
1996-05-23Wed May 22 22:10:01 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>Roland McGrath1-6/+7
1995-07-26* asia, backward, europe, leapseconds, southamerica: New data fromRoland McGrath1-5/+3
1995-02-18initial importRoland McGrath1-0/+347
ef='#n41'>41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196
/* ARC-specific header file for PLT support.
   Copyright (C) 2016-2017 Free Software Foundation, Inc.
   Contributed by Cupertino Miranda (cmiranda@synopsys.com).

   This file is part of BFD, the Binary File Descriptor library.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 3 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
   MA 02110-1301, USA.  */

#ifndef ARC_PLT_H
#define ARC_PLT_H

#include <stdint.h>

/* Instructions appear in memory as a sequence of half-words (16 bit);
   individual half-words are represented on the target in target byte order.
   We use 'unsigned short' on the host to represent the PLT templates,
   and translate to target byte order as we copy to the target.  */
typedef uint16_t insn_hword;

enum plt_reloc_symbol
{
  LAST_RELOC = 0,

  SGOT = 1,

  RELATIVE = (1 << 8),
  RELATIVE_INSN_32 = (1 << 9),
  RELATIVE_INSN_24 = (1 << 10),

  MIDDLE_ENDIAN = (1 << 11)
};

#define IS_RELATIVE(S)      ((S & (RELATIVE | RELATIVE_INSN_24 | RELATIVE_INSN_32)) != 0)
#define IS_INSN_32(S)       ((S & RELATIVE_INSN_32) != 0)
#define IS_INSN_24(S)       ((S & RELATIVE_INSN_24) != 0)
#define IS_MIDDLE_ENDIAN(S) ((S & MIDDLE_ENDIAN) != 0)
#define SYM_ONLY(S)         (S & 0xFF)

struct plt_reloc
{
  bfd_vma	  offset;
  bfd_vma	  size;
  bfd_vma	  mask;
  enum plt_reloc_symbol symbol;
  bfd_vma	  addend;
};


#define PLT_TYPE_START(NAME) NAME,
#define PLT_TYPE_END(NAME)
#define PLT_ENTRY(...)
#define PLT_ELEM(...)
#define ENTRY_RELOC(...)
#define ELEM_RELOC(...)

enum plt_types_enum
{
  PLT_START = -1,
#include "arc-plt.def"
  PLT_MAX
};

#undef PLT_TYPE_START
#undef PLT_TYPE_END
#undef PLT_ENTRY
#undef PLT_ELEM
#undef ENTRY_RELOC
#undef ELEM_RELOC

typedef insn_hword insn_hword_array[];

struct plt_version_t
{
  const insn_hword_array *entry;
  const bfd_vma		  entry_size;
  const insn_hword_array *elem;
  const bfd_vma		  elem_size;

  const struct plt_reloc *entry_relocs;
  const struct plt_reloc *elem_relocs;
};

#define PLT_TYPE_START(NAME) \
  const insn_hword NAME##_plt_entry[] = {
#define PLT_TYPE_END(NAME) };
#define PLT_ENTRY(...) __VA_ARGS__,
#define PLT_ELEM(...)
#define ENTRY_RELOC(...)
#define ELEM_RELOC(...)

#include "arc-plt.def"

#undef PLT_TYPE_START
#undef PLT_TYPE_END
#undef PLT_ENTRY
#undef PLT_ELEM
#undef ENTRY_RELOC
#undef ELEM_RELOC

#define PLT_TYPE_START(NAME) \
  const struct plt_reloc NAME##_plt_entry_relocs[] = {
#define PLT_TYPE_END(NAME) \
    {0, 0, 0, LAST_RELOC, 0} \
  };
#define PLT_ENTRY(...) 
#define PLT_ELEM(...)
#define ENTRY_RELOC(...) { __VA_ARGS__ },
#define ELEM_RELOC(...)

#include "arc-plt.def"

#undef PLT_TYPE_START
#undef PLT_TYPE_END
#undef PLT_ENTRY
#undef PLT_ELEM
#undef ENTRY_RELOC
#undef ELEM_RELOC


#define PLT_TYPE_START(NAME) \
  const insn_hword NAME##_plt_elem[] = {
#define PLT_TYPE_END(NAME) };
#define PLT_ENTRY(...)
#define PLT_ELEM(...) __VA_ARGS__,
#define ENTRY_RELOC(...)
#define ELEM_RELOC(...)

#include "arc-plt.def"

#undef PLT_TYPE_START
#undef PLT_TYPE_END
#undef PLT_ENTRY
#undef PLT_ELEM
#undef ENTRY_RELOC
#undef ELEM_RELOC

#define PLT_TYPE_START(NAME) \
  const struct plt_reloc NAME##_plt_elem_relocs[] = {
#define PLT_TYPE_END(NAME) \
    {0, 0, 0, LAST_RELOC, 0} \
  };
#define PLT_ENTRY(...) 
#define PLT_ELEM(...)
#define ENTRY_RELOC(...)
#define ELEM_RELOC(...) { __VA_ARGS__ },

#include "arc-plt.def"

#undef PLT_TYPE_START
#undef PLT_TYPE_END
#undef PLT_ENTRY
#undef PLT_ELEM
#undef ENTRY_RELOC
#undef ELEM_RELOC


#define PLT_TYPE_START(NAME) \
  { \
    .entry = &NAME##_plt_entry, \
    .entry_size = sizeof (NAME##_plt_entry), \
    .elem = &NAME##_plt_elem, \
    .elem_size = sizeof (NAME##_plt_elem),  \
    .entry_relocs = NAME##_plt_entry_relocs, \
    .elem_relocs = NAME##_plt_elem_relocs
#define PLT_TYPE_END(NAME) },
#define PLT_ENTRY(...)
#define PLT_ELEM(...)
#define ENTRY_RELOC(...)
#define ELEM_RELOC(...)
struct plt_version_t plt_versions[PLT_MAX] = {

#include "arc-plt.def"

};
#undef PLT_TYPE_START
#undef PLT_TYPE_END
#undef PLT_ENTRY
#undef PLT_ELEM
#undef ENTRY_RELOC
#undef ELEM_RELOC


#endif /* ARC_PLT_H */