aboutsummaryrefslogtreecommitdiff
path: root/include/elf/d10v.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-07-22 22:01:56 +0000
committerUlrich Drepper <drepper@redhat.com>1998-07-22 22:01:56 +0000
commit86b9b00b99d5ac8ed4de39ad7ea6a7a7694051f3 (patch)
tree92ba44bef3990fdb36d709254981b3e948e04069 /include/elf/d10v.h
parent133a451e9f1c3096fb7269cb063a88ce4067850f (diff)
downloadgdb-86b9b00b99d5ac8ed4de39ad7ea6a7a7694051f3.zip
gdb-86b9b00b99d5ac8ed4de39ad7ea6a7a7694051f3.tar.gz
gdb-86b9b00b99d5ac8ed4de39ad7ea6a7a7694051f3.tar.bz2
Rewrite relocation definition using macros.
Diffstat (limited to 'include/elf/d10v.h')
-rw-r--r--include/elf/d10v.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/include/elf/d10v.h b/include/elf/d10v.h
index f0952f2..dff8abd 100644
--- a/include/elf/d10v.h
+++ b/include/elf/d10v.h
@@ -20,12 +20,22 @@
#ifndef _ELF_D10V_H
#define _ELF_D10V_H
-#define R_D10V_NONE 0
-#define R_D10V_10_PCREL_R 1
-#define R_D10V_10_PCREL_L 2
-#define R_D10V_16 3
-#define R_D10V_18 4
-#define R_D10V_18_PCREL 5
-#define R_D10V_32 6
+/* Unless otherwise told we define an enum with the relocation entries. */
+#ifndef START_RELOC_NUMBERS
+# define START_RELOC_NUMBERS(name) enum name {
+# define RELOC_NUMBER(name, number) name = number ,
+# define END_RELOC_NUMBERS };
+#endif
+
+/* Relocation types. */
+START_RELOC_NUMBERS (elf_d10v_reloc_type)
+ RELOC_NUMBER (R_D10V_NONE, 0)
+ RELOC_NUMBER (R_D10V_10_PCREL_R, 1)
+ RELOC_NUMBER (R_D10V_10_PCREL_L, 2)
+ RELOC_NUMBER (R_D10V_16, 3)
+ RELOC_NUMBER (R_D10V_18, 4)
+ RELOC_NUMBER (R_D10V_18_PCREL, 5)
+ RELOC_NUMBER (R_D10V_32, 6)
+END_RELOC_NUMBERS
#endif