1 2007-03-16 Jakub Bogusz <qboosh at pld-linux dot org>
3 * backends/alpha_init.c: Add register_info and machine_section_flag_check hooks.
4 * backends/alpha_regs.c: New file.
5 * backends/alpha_symbol.c: (alpha_machine_section_flag_check) New function.
6 * backends/Makefile.am: Add alpha_regs.c.
8 --- elfutils-0.126/backends/alpha_init.c.orig 2006-07-05 06:09:28.000000000 +0200
9 +++ elfutils-0.126/backends/alpha_init.c 2006-07-22 10:34:36.417909750 +0200
11 HOOK (eh, dynamic_tag_check);
12 HOOK (eh, reloc_simple_type);
13 HOOK (eh, return_value_location);
14 + HOOK (eh, machine_section_flag_check);
15 + HOOK (eh, register_info);
16 eh->sysvhash_entrysize = sizeof (Elf64_Xword);
19 --- elfutils-0.124/backends/alpha_regs.c.orig 1970-01-01 01:00:00.000000000 +0100
20 +++ elfutils-0.124/backends/alpha_regs.c 2006-11-16 21:29:16.824457750 +0100
22 +/* Register names and numbers for ALPHA DWARF.
23 + Based on i386_regs.c, Copyright (C) 2005 Red Hat, Inc.
24 + This file is part of Red Hat elfutils.
26 + Red Hat elfutils is free software; you can redistribute it and/or modify
27 + it under the terms of the GNU General Public License as published by the
28 + Free Software Foundation; version 2 of the License.
30 + Red Hat elfutils is distributed in the hope that it will be useful, but
31 + WITHOUT ANY WARRANTY; without even the implied warranty of
32 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
33 + General Public License for more details.
35 + You should have received a copy of the GNU General Public License along
36 + with Red Hat elfutils; if not, write to the Free Software Foundation,
37 + Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
39 + Red Hat elfutils is an included package of the Open Invention Network.
40 + An included package of the Open Invention Network is a package for which
41 + Open Invention Network licensees cross-license their patents. No patent
42 + license is granted, either expressly or impliedly, by designation as an
43 + included package. Should you wish to participate in the Open Invention
44 + Network licensing program, please visit www.openinventionnetwork.com
45 + <http://www.openinventionnetwork.com>. */
54 +#define BACKEND alpha_
55 +#include "libebl_CPU.h"
58 +alpha_register_info (Ebl *ebl __attribute__ ((unused)),
59 + int regno, char *name, size_t namelen,
60 + const char **prefix, const char **setname,
61 + int *bits, int *type)
66 + if (regno < 0 || regno > 64 || namelen < 5)
72 + *setname = "integer";
73 + if (regno == 26 || regno == 29 || regno == 30) /* ra,gp,sp in alpha ABI */
74 + *type = DW_ATE_address;
76 + *type = DW_ATE_signed;
77 + } else if (regno < 64) {
79 + *type = DW_ATE_float;
82 + *type = DW_ATE_address;
87 + static const char *alpharegs[] =
89 + "v0", "t0", "t1", "t2", "t3", "t4", "t5", "t6",
90 + "t7", "s0", "s1", "s2", "s3", "s4", "s5", "s6",
91 + "a0", "a1", "a2", "a3", "a4", "a5", "t8", "t9",
92 + "t10","t11","ra", "t12","at", "gp", "sp", "zero",
93 + "fv0","fv1","fs0","fs1","fs2","fs3","fs4","fs5",
94 + "fs6","fs7","ft0","ft1","ft2","ft3","ft4","ft5",
95 + "fa0","fa1","fa2","fa3","fa4","fa5","ft6","ft7",
96 + "ft8","ft9","ft10","ft11","ft12","ft13","ft14","fzero",
101 + strcpy(name, alpharegs[regno]);
102 + namelen = strlen(name);
113 --- elfutils-0.126/backends/alpha_symbol.c.orig 2006-04-13 17:04:56.000000000 +0200
114 +++ elfutils-0.126/backends/alpha_symbol.c 2007-03-16 20:11:35.167246761 +0100
116 return tag == DT_ALPHA_PLTRO;
119 +/* Check whether SHF_MASKPROC flags are valid. */
121 +alpha_machine_section_flag_check (GElf_Xword sh_flags)
123 + return (sh_flags &~ SHF_ALPHA_GPREL) == 0;
126 /* Check for the simple reloc types. */
128 alpha_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type)
129 --- elfutils-0.120/backends/Makefile.am.orig 2006-04-16 13:15:56.425192000 +0200
130 +++ elfutils-0.120/backends/Makefile.am 2006-04-16 13:28:26.928096250 +0200
132 libebl_ia64_pic_a_SOURCES = $(ia64_SRCS)
133 am_libebl_ia64_pic_a_OBJECTS = $(ia64_SRCS:.c=.os)
135 -alpha_SRCS = alpha_init.c alpha_symbol.c alpha_retval.c
136 +alpha_SRCS = alpha_init.c alpha_symbol.c alpha_retval.c alpha_regs.c
137 libebl_alpha_pic_a_SOURCES = $(alpha_SRCS)
138 am_libebl_alpha_pic_a_OBJECTS = $(alpha_SRCS:.c=.os)