aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>1999-07-08 16:01:06 +0000
committerRichard Henderson <rth@redhat.com>1999-07-08 16:01:06 +0000
commitfeb90132a0041e9a0fa9fb338c8f7214039d0f18 (patch)
treeda0c171c64ceb866101590f8ddb4fb4534683167 /include
parent351b4b401bafdccd2b2e7be3f2e8da7e1391c77c (diff)
downloadgdb-feb90132a0041e9a0fa9fb338c8f7214039d0f18.zip
gdb-feb90132a0041e9a0fa9fb338c8f7214039d0f18.tar.gz
gdb-feb90132a0041e9a0fa9fb338c8f7214039d0f18.tar.bz2
* sparc.h (ELF64_R_TYPE_DATA): Sign extend the value.
(ELF64_R_TYPE_INFO): Mask out all but low 24 bits of data. (DT_SPARC_PLTFMT): Delete.
Diffstat (limited to 'include')
-rw-r--r--include/elf/ChangeLog7
-rw-r--r--include/elf/sparc.h22
2 files changed, 15 insertions, 14 deletions
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog
index 46d4ddd..bbfd2b0 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -1,3 +1,10 @@
+1999-07-08 Richard Henderson <rth@cygnus.com>
+
+ * sparc.h (ELF64_R_TYPE_DATA): Sign extend the value.
+ (ELF64_R_TYPE_INFO): Mask out all but low 24 bits of data.
+ (DT_SPARC_PLTFMT): Delete.
+ Based on a patch from Jakub Jelinek.
+
Mon Jun 21 16:36:02 1999 Jeffrey A Law (law@cygnus.com)
* hppa.h (elf_hppa_reloc_type): Renamed from elf32_hppa_reloc_type.
diff --git a/include/elf/sparc.h b/include/elf/sparc.h
index 89d00be..ad3e1e5 100644
--- a/include/elf/sparc.h
+++ b/include/elf/sparc.h
@@ -138,21 +138,15 @@ END_RELOC_NUMBERS
/* Relocation macros. */
-#define ELF64_R_TYPE_DATA(info) (((bfd_vma) (info) << 32) >> 40)
-#define ELF64_R_TYPE_ID(info) (((bfd_vma) (info) << 56) >> 56)
-#define ELF64_R_TYPE_INFO(data, type) (((bfd_vma) (data) << 8) \
- + (bfd_vma) (type))
+#define ELF64_R_TYPE_DATA(info) \
+ (((bfd_signed_vma)((info) >> 8) ^ 0x800000) - 0x800000)
+#define ELF64_R_TYPE_ID(info) \
+ ((info) & 0xff)
+#define ELF64_R_TYPE_INFO(data, type) \
+ (((bfd_vma) ((data) & 0xffffff) << 8) | (bfd_vma) (type))
-#define DT_SPARC_REGISTER 0x70000001
-
-/*
- * FIXME: NOT ABI -- GET RID OF THIS
- * Defines the format used by the .plt. Currently defined values are
- * 0 -- reserved to SI
- * 1 -- absolute address in .got.plt
- * 2 -- got-relative address in .got.plt
- */
+/* Values for Elf64_Dyn.d_tag. */
-#define DT_SPARC_PLTFMT 0x70000001
+#define DT_SPARC_REGISTER 0x70000001
#endif /* _ELF_SPARC_H */