From: Alan Modra Date: Tue, 4 Feb 2020 11:04:45 +0000 (+1030) Subject: Minor fix for R_PPC_VLE_ADDR20 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=24872cb30211b650a9360edd2476a6a1dd033cbb;p=binutils-gdb.git Minor fix for R_PPC_VLE_ADDR20 It is incorrect to "continue" in the ppc_elf_relocate_section reloc processing loop except when editing or deleting relocs. The normal loop processing arranges to write the relocs if shuffling them over a deleted entry. Deleting only happens for debug sections currently and those sections won't contain R_PPC_VLE_ADDR20 relocs, so this patch doesn't fix a bug that would trigger with any normal object file. * elf32-ppc.c (ppc_elf_relocate_section): After applying R_PPC_VLE_ADDR20, goto copy_reloc. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index f758f650340..ebe93443309 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2020-02-04 Alan Modra + + * elf32-ppc.c (ppc_elf_relocate_section): After applying + R_PPC_VLE_ADDR20, goto copy_reloc. + 2020-02-02 H.J. Lu * bfd-in2.h: Regenerated. diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index 8c2d3943ac1..839d5ff142a 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -8780,7 +8780,7 @@ ppc_elf_relocate_section (bfd *output_bfd, case R_PPC_VLE_ADDR20: ppc_elf_vle_split20 (output_bfd, contents + rel->r_offset, relocation); - continue; + goto copy_reloc; /* Relocate against the beginning of the section. */ case R_PPC_SECTOFF: