diff options
author | Alan Modra <amodra@bigpond.net.au> | 2012-05-19 06:58:44 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2012-05-19 06:58:44 +0000 |
commit | 5a660903f6882ccbeebabde0f22badd8b68d26be (patch) | |
tree | 8c4a30f4ca256e1d7b5dfa85b5f676b08c0231ef /opcodes | |
parent | ae41a1660054bef9160b3d0dc4437f710cd2fdb1 (diff) | |
download | binutils-redhat-5a660903f6882ccbeebabde0f22badd8b68d26be.tar.gz |
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/ChangeLog | 5 | ||||
-rw-r--r-- | opcodes/ppc-dis.c | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 0be79416a9..b1084300f2 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 bbf3978298..090574451c 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; |