This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
i370 readelf support
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sources dot redhat dot com
- Date: Thu, 15 Aug 2002 21:48:37 +0930
- Subject: i370 readelf support
First we have to get ourselves an i370_reloc_type function.
include/elf/ChangeLog
* i370.h: Define relocs using reloc-macros.h.
bfd/ChangeLog
* elf32-i370.c: Move reloc enum to include/elf/i370.h.
Index: include/elf/i370.h
===================================================================
RCS file: /cvs/src/src/include/elf/i370.h,v
retrieving revision 1.3
diff -u -p -r1.3 i370.h
--- include/elf/i370.h 14 Mar 2001 02:27:44 -0000 1.3
+++ include/elf/i370.h 15 Aug 2002 12:13:36 -0000
@@ -1,5 +1,5 @@
/* i370 ELF support for BFD.
- Copyright 2000 Free Software Foundation, Inc.
+ Copyright 2000, 2002 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -23,6 +23,8 @@ Foundation, Inc., 59 Temple Place - Suit
#ifndef _ELF_I370_H
#define _ELF_I370_H
+#include "elf/reloc-macros.h"
+
/* Processor specific section headers, sh_type field */
#define SHT_ORDERED SHT_HIPROC /* Link editor is to sort the \
@@ -41,6 +43,26 @@ Foundation, Inc., 59 Temple Place - Suit
builds when those objects \
are not to be furhter \
relocated. */
-#endif /* _ELF_I370_H */
+/* i370 relocations
+ Note that there is really just one relocation that we currently
+ support (and only one that we seem to need, at the moment), and
+ that is the 31-bit address relocation. Note that the 370/390
+ only supports a 31-bit (2GB) address space. */
+
+START_RELOC_NUMBERS (i370_reloc_type)
+ RELOC_NUMBER (R_I370_NONE, 0)
+ RELOC_NUMBER (R_I370_ADDR31, 1)
+ RELOC_NUMBER (R_I370_ADDR32, 2)
+ RELOC_NUMBER (R_I370_ADDR16, 3)
+ RELOC_NUMBER (R_I370_REL31, 4)
+ RELOC_NUMBER (R_I370_REL32, 5)
+ RELOC_NUMBER (R_I370_ADDR12, 6)
+ RELOC_NUMBER (R_I370_REL12, 7)
+ RELOC_NUMBER (R_I370_ADDR8, 8)
+ RELOC_NUMBER (R_I370_REL8, 9)
+ RELOC_NUMBER (R_I370_COPY, 10)
+ RELOC_NUMBER (R_I370_RELATIVE, 11)
+END_RELOC_NUMBERS (R_I370_max)
+#endif /* _ELF_I370_H */
Index: bfd/elf32-i370.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-i370.c,v
retrieving revision 1.23
diff -u -p -r1.23 elf32-i370.c
--- bfd/elf32-i370.c 23 Jul 2002 12:29:32 -0000 1.23
+++ bfd/elf32-i370.c 15 Aug 2002 12:16:14 -0000
@@ -34,30 +34,6 @@ Foundation, Inc., 59 Temple Place - Suit
#include "elf-bfd.h"
#include "elf/i370.h"
-/* i370 relocations */
-/* Note that there is really just one relocation that we currently
- * support (and only one that we seem to need, at the moment), and
- * that is the 31-bit address relocation. Note that the 370/390
- * only supports a 31-bit (2GB) address space.
- */
-enum i370_reloc_type
-{
- R_I370_NONE = 0,
- R_I370_ADDR31 = 1,
- R_I370_ADDR32 = 2,
- R_I370_ADDR16 = 3,
- R_I370_REL31 = 4,
- R_I370_REL32 = 5,
- R_I370_ADDR12 = 6,
- R_I370_REL12 = 7,
- R_I370_ADDR8 = 8,
- R_I370_REL8 = 9,
- R_I370_COPY = 10,
- R_I370_RELATIVE = 11,
-
- R_I370_max
-};
-
static reloc_howto_type *i370_elf_howto_table[ (int)R_I370_max ];
static reloc_howto_type i370_elf_howto_raw[] =
--
Alan Modra
IBM OzLabs - Linux Technology Centre