]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gas/config/tc-ppc.c
PowerPC VLE sh_flags and p_flags
authorAlan Modra <amodra@gmail.com>
Wed, 31 Aug 2016 03:48:34 +0000 (13:18 +0930)
committerAlan Modra <amodra@gmail.com>
Wed, 31 Aug 2016 03:48:34 +0000 (13:18 +0930)
commitf7d69005fb97f0d90c9eb414944a5035bfd67b36
tree29b5bebb2f94c6c7c8cbc2fd957050514738bdb5
parentafe002dd6619560c569ac0e080cbf220c826f989
PowerPC VLE sh_flags and p_flags

ELF section sh_flags SHF_PPC_VLE was being set based on arch/mach,
which meant all code sections in an object file has the flag or all
lacked it.  We can do better than that.  Only those code sections
where VLE is enabled ought to have the flag, allowing an object file
to contain both VLE and non-VLE code.

Also, ELF header p_flags PF_PPC_VLE wasn't being set, and segments
were being split unnecessarily.

bfd/
* elf32-ppc.c (ppc_elf_section_processing): Delete.
(elf_backend_section_processing): Don't define.
(ppc_elf_modify_segment_map): Set p_flags and mark valid.  Don't
split on non-exec sections differing in SHF_PPC_VLE.  When
splitting segments, mark size invalid.
gas/
* config/tc-ppc.c (md_assemble): Set sh_flags for VLE.  Test
ppc_cpu rather than calling ppc_mach to determine VLE mode.
(ppc_frag_check, ppc_handle_align): Likewise use ppc_cpu.
bfd/ChangeLog
bfd/elf32-ppc.c
gas/ChangeLog
gas/config/tc-ppc.c