aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-spu.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-10-05 19:52:55 +0930
committerAlan Modra <amodra@gmail.com>2018-10-05 20:04:10 +0930
commitd1c86cff1ecdd1027bd224d38f2161196e9955fa (patch)
tree08de5cd85d156d37f9ed60450d17f39c2b9f2fa6 /bfd/elf32-spu.c
parentdad0c3bfb5e32ff3f2a03830dc189fe207c7ae00 (diff)
downloadgdb-d1c86cff1ecdd1027bd224d38f2161196e9955fa.zip
gdb-d1c86cff1ecdd1027bd224d38f2161196e9955fa.tar.gz
gdb-d1c86cff1ecdd1027bd224d38f2161196e9955fa.tar.bz2
Set correct SHT_NOTE type for .note.spu_name
* elf32-spu.c (spu_elf_create_sections): Make .note.spu_name SHT_NOTE.
Diffstat (limited to 'bfd/elf32-spu.c')
-rw-r--r--bfd/elf32-spu.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/bfd/elf32-spu.c b/bfd/elf32-spu.c
index c3bfbbd..bb3264f 100644
--- a/bfd/elf32-spu.c
+++ b/bfd/elf32-spu.c
@@ -580,11 +580,16 @@ spu_elf_create_sections (struct bfd_link_info *info)
flagword flags;
ibfd = info->input_bfds;
+ /* This should really be SEC_LINKER_CREATED, but then we'd need
+ to write out the section ourselves. */
flags = SEC_LOAD | SEC_READONLY | SEC_HAS_CONTENTS | SEC_IN_MEMORY;
s = bfd_make_section_anyway_with_flags (ibfd, SPU_PTNOTE_SPUNAME, flags);
if (s == NULL
|| !bfd_set_section_alignment (ibfd, s, 4))
return FALSE;
+ /* Because we didn't set SEC_LINKER_CREATED we need to set the
+ proper section type. */
+ elf_section_type (s) = SHT_NOTE;
name_len = strlen (bfd_get_filename (info->output_bfd)) + 1;
size = 12 + ((sizeof (SPU_PLUGIN_NAME) + 3) & -4);