diff options
author | Alan Modra <amodra@gmail.com> | 2008-05-07 14:46:44 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2008-05-07 14:46:44 +0000 |
commit | 8374f9d4b51c7bb4464875756b1a4b4e9ce742f0 (patch) | |
tree | 9be50c50e3c11f9a155a9f243921b8d79bf67ae7 /binutils | |
parent | 8c0848b5090141528fc24baa8f869252e63b8598 (diff) | |
download | gdb-8374f9d4b51c7bb4464875756b1a4b4e9ce742f0.zip gdb-8374f9d4b51c7bb4464875756b1a4b4e9ce742f0.tar.gz gdb-8374f9d4b51c7bb4464875756b1a4b4e9ce742f0.tar.bz2 |
bfd/
* elf32-spu.c (spu_elf_special_sections): Add "._ea".
(spu_elf_relocate_section): Handle relocations against symbols
defined in ._ea specially.
binutils/
* embedspu.sh: Take note of R_SPU_PPU32/64 relocs without a symbol,
and if present, put image in ".data.speelf". Put program handle
in ".data.spehandle".
ld/emulparams/
* elf32_spu.sh (OTHER_SECTIONS): Add "._ea".
* elf32ppc.sh: If building with spu support, put ".data.spehandle"
sections at the start of ".data" and provide a symbol to locate
the directory of embedded spe programs.
ld/testsuite/
* ld-spu/ear.s: Align various sections.
* ld-spu/embed.rd: Update.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 6 | ||||
-rw-r--r-- | binutils/embedspu.sh | 12 |
2 files changed, 14 insertions, 4 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index a45b6e0..9ee4875 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,9 @@ +2008-05-08 Alan Modra <amodra@bigpond.net.au> + + * embedspu.sh: Take note of R_SPU_PPU32/64 relocs without a symbol, + and if present, put image in ".data.speelf". Put program handle + in ".data.spehandle". + 2008-05-01 Nick Clifton <nickc@redhat.com> * readelf.c (print_symbol): Add code to display non-printing diff --git a/binutils/embedspu.sh b/binutils/embedspu.sh index d438ed9..f44d665 100644 --- a/binutils/embedspu.sh +++ b/binutils/embedspu.sh @@ -1,7 +1,7 @@ #! /bin/sh # Embed an SPU ELF executable into a PowerPC object file. # -# Copyright 2006, 2007 Free Software Foundation, Inc. +# Copyright 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is part of GNU Binutils. # @@ -138,7 +138,7 @@ main () # sections. # Find all _EAR_ symbols in .toe using readelf, sort by address, and # write the address of the corresponding PowerPC symbol in a table - # built in .data.spetoe. For _EAE_ symbols not in .toe, create + # built in .data.spetoe. For _EAR_ symbols not in .toe, create # .reloc commands to relocate their location directly. # 3. Look for R_SPU_PPU32 and R_SPU_PPU64 relocations in the SPU ELF image # and create .reloc commands for them. @@ -202,6 +202,7 @@ $3 ~ /R_SPU_PPU/ { \ print "#else"; \ print " .reloc __speelf__+" strtonum ("0x" $1) + sec_off[rela[sec]] + (substr($3, 10) == "64" ? 4 : 0)", R_PPC_ADDR32, " ($5 != "" ? $5 "+0x" $7 : "__speelf__ + 0x" $4); \ print "#endif"; \ + if (!has_ea && $5 == "") { print "#define HAS_EA 1"; has_ea = 1; }; \ if (!donedef) { print "#define HAS_RELOCS 1"; donedef = 1; }; \ } \ $3 ~ /unrecognized:/ { \ @@ -210,10 +211,13 @@ $3 ~ /unrecognized:/ { \ print "#else"; \ print " .reloc __speelf__+" strtonum ("0x" $1) + sec_off[rela[sec]] + ($4 == "f" ? 4 : 0)", R_PPC_ADDR32, " ($6 != "" ? $6 "+0x" $8 : "__speelf__ + 0x" $5); \ print "#endif"; \ + if (!has_ea && $5 == "") { print "#define HAS_EA 1"; has_ea = 1; }; \ if (!donedef) { print "#define HAS_RELOCS 1"; donedef = 1; }; \ } \ '` -#if defined (HAS_RELOCS) && (defined (__PIC__) || defined (__PIE__)) +#ifdef HAS_EA + .section .data.speelf,"aw",@progbits +#elif defined (HAS_RELOCS) && (defined (__PIC__) || defined (__PIE__)) .section .data.rel.ro.speelf,"a",@progbits #else .section .rodata.speelf,"a",@progbits @@ -222,7 +226,7 @@ $3 ~ /unrecognized:/ { \ __speelf__: .incbin "${INFILE}" - .section .data,"aw",@progbits + .section .data.spehandle,"aw",@progbits .globl ${SYMBOL} .type ${SYMBOL}, @object # fill in a struct spe_program_handle |