aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorTrevor Smigiel <Trevor_Smigiel@playstation.sony.com>2009-07-24 19:51:27 +0000
committerTrevor Smigiel <Trevor_Smigiel@playstation.sony.com>2009-07-24 19:51:27 +0000
commit8fdcc58daafe1153d2edf18a2f106d2b247e1f01 (patch)
tree12dd0108e2284f8bcf70a761b5e6dcae9f60d7bf /gas
parent309d33736f82fece9dbeae7a4ba096cdc2d77753 (diff)
downloadfsf-binutils-gdb-8fdcc58daafe1153d2edf18a2f106d2b247e1f01.zip
fsf-binutils-gdb-8fdcc58daafe1153d2edf18a2f106d2b247e1f01.tar.gz
fsf-binutils-gdb-8fdcc58daafe1153d2edf18a2f106d2b247e1f01.tar.bz2
include/elf/
* spu.h (R_SPU_ADD_PIC): New. bfd/ * reloc.c (BFD_RELOC_SPU_ADD_PIC): Define. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elf32-spu.c (elf_howto_table): Add entries SPU_ADD_PIC. (spu_elf_bfd_to_reloc_type): Handle SPU_ADD_PIC. (spu_elf_relocate_section): Patch instructions marked by SPU_ADD_PIC. gas/ * config/tc-spu.c (md_apply_fix): Handle SPU_ADD_PIC. * config/tc-spu.h (tc_fix_adjustable): Don't adjust for SPU_ADD_PIC. (TC_FORCE_RELOCATION): Emit relocs for SPU_ADD_PIC. ld/testsuite/ * ld-spu/pic.d: New. * ld-spu/pic.s: New. * ld-spu/picdef.s: New.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config/tc-spu.c3
-rw-r--r--gas/config/tc-spu.h4
3 files changed, 12 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index d798b0a..a321835 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+2009-07-24 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
+ Alan Modra <amodra@bigpond.net.au>
+
+ * config/tc-spu.c (md_apply_fix): Handle SPU_ADD_PIC.
+ * config/tc-spu.h (tc_fix_adjustable): Don't adjust for SPU_ADD_PIC.
+ (TC_FORCE_RELOCATION): Emit relocs for SPU_ADD_PIC.
+
2009-07-24 Jan Beulich <jbeulich@novell.com>
* tc-i386.c (cpu_arch): Add .8087, .287, .387, .no87, .nommx,
diff --git a/gas/config/tc-spu.c b/gas/config/tc-spu.c
index 6fbe4d5..0d94f32 100644
--- a/gas/config/tc-spu.c
+++ b/gas/config/tc-spu.c
@@ -989,7 +989,8 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
fixP->fx_addnumber = val;
if (fixP->fx_r_type == BFD_RELOC_SPU_PPU32
- || fixP->fx_r_type == BFD_RELOC_SPU_PPU64)
+ || fixP->fx_r_type == BFD_RELOC_SPU_PPU64
+ || fixP->fx_r_type == BFD_RELOC_SPU_ADD_PIC)
return;
if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0)
diff --git a/gas/config/tc-spu.h b/gas/config/tc-spu.h
index 11f7dc1..4829fe1 100644
--- a/gas/config/tc-spu.h
+++ b/gas/config/tc-spu.h
@@ -50,7 +50,8 @@ struct tc_fix_info {
#define tc_fix_adjustable(FIXP) \
(!(S_IS_FUNCTION ((FIXP)->fx_addsy) \
|| (FIXP)->fx_r_type == BFD_RELOC_SPU_PPU32 \
- || (FIXP)->fx_r_type == BFD_RELOC_SPU_PPU64))
+ || (FIXP)->fx_r_type == BFD_RELOC_SPU_PPU64 \
+ || (FIXP)->fx_r_type == BFD_RELOC_SPU_ADD_PIC))
/* Keep relocs on calls. Branches to function symbols are tail or
sibling calls. */
@@ -63,6 +64,7 @@ struct tc_fix_info {
&& S_IS_FUNCTION ((FIXP)->fx_addsy)) \
|| (FIXP)->fx_r_type == BFD_RELOC_SPU_PPU32 \
|| (FIXP)->fx_r_type == BFD_RELOC_SPU_PPU64 \
+ || (FIXP)->fx_r_type == BFD_RELOC_SPU_ADD_PIC \
|| generic_force_reloc (FIXP))
/* Values passed to md_apply_fix don't include symbol values. */