* 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.
This commit is contained in:
Alan Modra
2012-05-19 06:58:48 +00:00
parent d791e1550c
commit 94caa96637
8 changed files with 51 additions and 40 deletions

View File

@@ -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;