aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2012-05-19 06:58:48 +0000
committerAlan Modra <amodra@gmail.com>2012-05-19 06:58:48 +0000
commit94caa966375d53b07f39beac80f1f9af4cac18da (patch)
treef76c215bcf08b7a259a206770a2889d61b3887e4 /opcodes
parentd791e1550cc8fbf4454437815e4193b6990d1014 (diff)
downloadbinutils-94caa966375d53b07f39beac80f1f9af4cac18da.zip
binutils-94caa966375d53b07f39beac80f1f9af4cac18da.tar.gz
binutils-94caa966375d53b07f39beac80f1f9af4cac18da.tar.bz2
bfd/
* elf32-ppc.h (has_vle_insns, is_ppc_vle): Delete. (has_tls_reloc, has_tls_get_addr_call): Move back to.. * elf32-ppc.c: ..here. (ppc_elf_section_flags, elf_backend_section_flags): Delete. (ppc_elf_modify_segment_map): Use ELF sh_flags to detect VLE sections. opcodes/ * ppc-dis.c: Don't include elf32-ppc.h, do include elf/ppc.h. (get_powerpc_dialect): Detect VLE sections from ELF sh_flags. ld/testsuite/ * ld-powerpc/vle.ld: New. * ld-powerpc/powerpc.exp (vle reloc tests): Link using vle.ld.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog5
-rw-r--r--opcodes/ppc-dis.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 0be7941..b108430 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,8 @@
+2012-05-19 Alan Modra <amodra@gmail.com>
+
+ * ppc-dis.c: Don't include elf32-ppc.h, do include elf/ppc.h.
+ (get_powerpc_dialect): Detect VLE sections from ELF sh_flags.
+
2012-05-18 Alan Modra <amodra@gmail.com>
* ia64-opc.c: Remove #include "ansidecl.h".
diff --git a/opcodes/ppc-dis.c b/opcodes/ppc-dis.c
index bbf3978..0905744 100644
--- a/opcodes/ppc-dis.c
+++ b/opcodes/ppc-dis.c
@@ -24,7 +24,7 @@
#include <stdio.h>
#include "dis-asm.h"
#include "elf-bfd.h"
-#include "elf32-ppc.h"
+#include "elf/ppc.h"
#include "opintl.h"
#include "opcode/ppc.h"
@@ -199,7 +199,10 @@ get_powerpc_dialect (struct disassemble_info *info)
/* Disassemble according to the section headers flags for VLE-mode. */
if (dialect & PPC_OPCODE_VLE
- && is_ppc_vle (info->section))
+ && info->section->owner != NULL
+ && bfd_get_flavour (info->section->owner) == bfd_target_elf_flavour
+ && elf_object_id (info->section->owner) == PPC32_ELF_DATA
+ && (elf_section_flags (info->section) & SHF_PPC_VLE) != 0)
return dialect;
else
return dialect & ~ PPC_OPCODE_VLE;