From 08dc996fedde9143cda25720961684087b133640 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 22 Nov 2016 18:45:29 +1030 Subject: PR20744, Incorrect PowerPC VLE relocs VLE 16A and 16D relocs were functionally swapped. PR 20744 include/ * opcode/ppc.h: Define VLE insns using 16A and 16D relocs. bfd/ * elf32-ppc.h (struct ppc_elf_params): Add vle_reloc_fixup field. * elf32-ppc.c: Include opcode/ppc.h. (ppc_elf_howto_raw): Correct dst_mask for R_PPC_VLE_LO16A, R_PPC_VLE_LO16D, R_PPC_VLE_HI16A, R_PPC_VLE_HI16D, R_PPC_VLE_HA16A, R_PPC_VLE_HA16D, R_PPC_VLE_SDAREL_LO16A, R_PPC_VLE_SDAREL_LO16D, R_PPC_VLE_SDAREL_HI16A, R_PPC_VLE_SDAREL_HI16D, R_PPC_VLE_SDAREL_HA16A, and R_PPC_VLE_SDAREL_HA16D relocs. (ppc_elf_link_hash_table_create): Update default_params init. (ppc_elf_vle_split16): Correct shift and mask. Add params. Report or fix insn/reloc mismatches. (ppc_elf_relocate_section): Pass input_section, offset and fixup to ppc_elf_vle_split16. binutils/ * NEWS: Mention PowerPC VLE relocation error. gas/ * config/tc-ppc.c: Delete VLE insn defines. (md_assemble): Swap use_a_reloc and use_d_reloc. * testsuite/gas/ppc/vle-reloc.d: Update. ld/ * emultempl/ppc32elf.em (params): Update initializer. Handle --vle-reloc-fixup command line arg. --- binutils/ChangeLog | 5 +++++ binutils/NEWS | 15 ++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) (limited to 'binutils') diff --git a/binutils/ChangeLog b/binutils/ChangeLog index bbeec9c..ef923cb 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2016-11-22 Alan Modra + + PR 20744 + * NEWS: Mention PowerPC VLE relocation error. + 2016-11-16 Mark Wielaard * cxxfilt.c (main): Recognize rust_demangling. diff --git a/binutils/NEWS b/binutils/NEWS index 5d0bc89..4e1aacd 100644 --- a/binutils/NEWS +++ b/binutils/NEWS @@ -1,6 +1,19 @@ -*- text -*- -* The nm program has a new command lien option (--with-version-strings) +* This version of binutils fixes a problem with PowerPC VLE 16A and 16D + relocations which were functionally swapped, for example, + R_PPC_VLE_HA16A performed like R_PPC_VLE_HA16D while R_PPC_VLE_HA16D + performed like R_PPC_VLE_HA16A. This could have been fixed by + renumbering relocations, which would keep object files created by an + older version of gas compatible with a newer ld. However, that would + require an ABI update, affecting other assemblers and linkers that + create and process the relocations correctly. It is recommended that + all VLE object files be recompiled, but ld can modify the relocations + if --vle-reloc-fixup is passed to ld. If the new ld command line + option is not used, ld will ld warn on finding relocations inconsistent + with the instructions being relocated. + +* The nm program has a new command line option (--with-version-strings) which will display a symbol's version information, if any, after the symbol's name. -- cgit v1.1