1 /* IA-64 specific symbolic name handling.
2 Copyright (C) 2002-2009 Red Hat, Inc.
3 This file is part of Red Hat elfutils.
4 Written by Ulrich Drepper <drepper@redhat.com>, 2002.
6 Red Hat elfutils is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by the
8 Free Software Foundation; version 2 of the License.
10 Red Hat elfutils is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License along
16 with Red Hat elfutils; if not, write to the Free Software Foundation,
17 Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
19 Red Hat elfutils is an included package of the Open Invention Network.
20 An included package of the Open Invention Network is a package for which
21 Open Invention Network licensees cross-license their patents. No patent
22 license is granted, either expressly or impliedly, by designation as an
23 included package. Should you wish to participate in the Open Invention
24 Network licensing program, please visit www.openinventionnetwork.com
25 <http://www.openinventionnetwork.com>. */
36 #include "libebl_CPU.h"
40 ia64_segment_type_name (int segment, char *buf __attribute__ ((unused)),
41 size_t len __attribute__ ((unused)))
45 case PT_IA_64_ARCHEXT:
46 return "IA_64_ARCHEXT";
48 return "IA_64_UNWIND";
49 case PT_IA_64_HP_OPT_ANOT:
50 return "IA_64_HP_OPT_ANOT";
51 case PT_IA_64_HP_HSL_ANOT:
52 return "IA_64_HP_HSL_ANOT";
53 case PT_IA_64_HP_STACK:
54 return "IA_64_HP_STACK";
62 ia64_dynamic_tag_name (int64_t tag, char *buf __attribute__ ((unused)),
63 size_t len __attribute__ ((unused)))
67 case DT_IA_64_PLT_RESERVE:
68 return "IA_64_PLT_RESERVE";
75 /* Check dynamic tag. */
77 ia64_dynamic_tag_check (int64_t tag)
79 return tag == DT_IA_64_PLT_RESERVE;
82 /* Check whether machine flags are valid. */
84 ia64_machine_flag_check (GElf_Word flags)
86 return ((flags &~ EF_IA_64_ABI64) == 0);
89 /* Check whether SHF_MASKPROC flags are valid. */
91 ia64_machine_section_flag_check (GElf_Xword sh_flags)
93 return (sh_flags &~ (SHF_IA_64_SHORT | SHF_IA_64_NORECOV)) == 0;
96 /* Return symbolic representation of section type. */
98 ia64_section_type_name (int type,
99 char *buf __attribute__ ((unused)),
100 size_t len __attribute__ ((unused)))
106 case SHT_IA_64_UNWIND:
107 return "IA_64_UNWIND";
113 /* Check for the simple reloc types. */
115 ia64_reloc_simple_type (Ebl *ebl, int type)
119 /* The SECREL types when used with non-allocated sections
120 like .debug_* are the same as direct absolute relocs
121 applied to those sections, since a 0 section address is assumed.
122 So we treat them the same here. */
124 case R_IA64_SECREL32MSB:
125 case R_IA64_DIR32MSB:
126 if (ebl->data == ELFDATA2MSB)
129 case R_IA64_SECREL32LSB:
130 case R_IA64_DIR32LSB:
131 if (ebl->data == ELFDATA2LSB)
134 case R_IA64_DIR64MSB:
135 case R_IA64_SECREL64MSB:
136 if (ebl->data == ELFDATA2MSB)
139 case R_IA64_SECREL64LSB:
140 case R_IA64_DIR64LSB:
141 if (ebl->data == ELFDATA2LSB)