aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2007-07-02 10:49:42 +0000
committerJoseph Myers <joseph@codesourcery.com>2007-07-02 10:49:42 +0000
commit741d6ea85b096ca043859a71ae022ad160a64eec (patch)
tree25e7aacd60f1dae6eacb8c3bede372b98bdb2995 /bfd
parente205a09915bcf2c75f2b925377eb7ce2da90c43a (diff)
downloadgdb-741d6ea85b096ca043859a71ae022ad160a64eec.zip
gdb-741d6ea85b096ca043859a71ae022ad160a64eec.tar.gz
gdb-741d6ea85b096ca043859a71ae022ad160a64eec.tar.bz2
bfd:
* elfxx-mips.c (mips_elf_calculate_relocation): Handle R_MIPS_TLS_DTPREL32 and R_MIPS_TLS_DTPREL64. * elf64-mips.c (mips_elf64_howto_table_rela): Support R_MIPS_TLS_DTPREL64. gas: * config/tc-mips.c (s_dtprelword, s_dtpreldword, s_dtprel_internal): New. (mips_pseudo_table): Add .dtprelword and .dtpreldword. (md_apply_fix): Handle BFD_RELOC_MIPS_TLS_DTPREL32 and BFD_RELOC_MIPS_TLS_DTPREL64.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/elf64-mips.c15
-rw-r--r--bfd/elfxx-mips.c2
3 files changed, 23 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 5b8bbfd..e006595 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,10 @@
+2007-07-02 Joseph Myers <joseph@codesourcery.com>
+
+ * elfxx-mips.c (mips_elf_calculate_relocation): Handle
+ R_MIPS_TLS_DTPREL32 and R_MIPS_TLS_DTPREL64.
+ * elf64-mips.c (mips_elf64_howto_table_rela): Support
+ R_MIPS_TLS_DTPREL64.
+
2007-07-02 Alan Modra <amodra@bigpond.net.au>
* Makefile.am: Run "make dep-am".
diff --git a/bfd/elf64-mips.c b/bfd/elf64-mips.c
index 608168f..e64b50c 100644
--- a/bfd/elf64-mips.c
+++ b/bfd/elf64-mips.c
@@ -1327,7 +1327,20 @@ static reloc_howto_type mips_elf64_howto_table_rela[] =
EMPTY_HOWTO (R_MIPS_TLS_DTPMOD32),
EMPTY_HOWTO (R_MIPS_TLS_DTPREL32),
EMPTY_HOWTO (R_MIPS_TLS_DTPMOD64),
- EMPTY_HOWTO (R_MIPS_TLS_DTPREL64),
+
+ HOWTO (R_MIPS_TLS_DTPREL64, /* type */
+ 0, /* rightshift */
+ 4, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ _bfd_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_DTPREL64", /* name */
+ TRUE, /* partial_inplace */
+ MINUS_ONE, /* src_mask */
+ MINUS_ONE, /* dst_mask */
+ FALSE), /* pcrel_offset */
/* TLS general dynamic variable reference. */
HOWTO (R_MIPS_TLS_GD, /* type */
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index d368d41..28a4e8b 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -4355,6 +4355,8 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
break;
case R_MIPS_TLS_DTPREL_LO16:
+ case R_MIPS_TLS_DTPREL32:
+ case R_MIPS_TLS_DTPREL64:
value = (symbol + addend - dtprel_base (info)) & howto->dst_mask;
break;