aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2007-06-29 01:39:54 +0000
committerAlan Modra <amodra@gmail.com>2007-06-29 01:39:54 +0000
commit7d3287cb717540c60f0491587c29d523b4e38dfd (patch)
tree781b78bc013e708ccab7571d1edefa05c4f32164 /bfd
parent36fc76aebb7315571094d66b35e13d69d512fbe2 (diff)
downloadgdb-7d3287cb717540c60f0491587c29d523b4e38dfd.zip
gdb-7d3287cb717540c60f0491587c29d523b4e38dfd.tar.gz
gdb-7d3287cb717540c60f0491587c29d523b4e38dfd.tar.bz2
* elf32-spu.c (spu_elf_fake_sections): New function.
(elf_backend_fake_sections): Define.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf32-spu.c13
2 files changed, 18 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index e3ecc07..e89264f 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,10 @@
2007-06-29 Alan Modra <amodra@bigpond.net.au>
+ * elf32-spu.c (spu_elf_fake_sections): New function.
+ (elf_backend_fake_sections): Define.
+
+2007-06-29 Alan Modra <amodra@bigpond.net.au>
+
* elf.c (assign_file_positions_for_load_sections): Use elf
section header sh_size rather than bfd section size, simplifying
.tbss handling.
diff --git a/bfd/elf32-spu.c b/bfd/elf32-spu.c
index fcda1e3..d652117 100644
--- a/bfd/elf32-spu.c
+++ b/bfd/elf32-spu.c
@@ -3024,6 +3024,18 @@ spu_elf_check_vma (bfd *abfd, bfd_vma lo, bfd_vma hi)
return NULL;
}
+/* Tweak the section type of .note.spu_name. */
+
+static bfd_boolean
+spu_elf_fake_sections (bfd *obfd ATTRIBUTE_UNUSED,
+ Elf_Internal_Shdr *hdr,
+ asection *sec)
+{
+ if (strcmp (sec->name, SPU_PTNOTE_SPUNAME) == 0)
+ hdr->sh_type = SHT_NOTE;
+ return TRUE;
+}
+
/* Tweak phdrs before writing them out. */
static int
@@ -3135,6 +3147,7 @@ spu_elf_modify_program_headers (bfd *abfd, struct bfd_link_info *info)
#define elf_backend_modify_segment_map spu_elf_modify_segment_map
#define elf_backend_modify_program_headers spu_elf_modify_program_headers
#define elf_backend_post_process_headers spu_elf_post_process_headers
+#define elf_backend_fake_sections spu_elf_fake_sections
#define elf_backend_special_sections spu_elf_special_sections
#define bfd_elf32_bfd_final_link spu_elf_final_link