]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
ppc476 workaround sizing
authorAlan Modra <amodra@gmail.com>
Thu, 20 Nov 2014 10:37:58 +0000 (21:07 +1030)
committerAlan Modra <amodra@gmail.com>
Thu, 20 Nov 2014 11:08:27 +0000 (21:38 +1030)
* elf32-ppc.c (ppc_elf_relax_section): Correct ppc476 workaround
alignment calculation.

bfd/ChangeLog
bfd/elf32-ppc.c

index 8ac4034d549d29420001c0284e8e4197427e09e1..bbfb46c1c39a9020f060399e31557c0fa71ccdd4 100644 (file)
@@ -1,3 +1,8 @@
+2014-11-20  Alan Modra  <amodra@gmail.com>
+
+       * elf32-ppc.c (ppc_elf_relax_section): Correct ppc476 workaround
+       alignment calculation.
+
 2014-11-20  Alan Modra  <amodra@gmail.com>
 
        * elf64-ppc.c (ppc64_elf_size_stubs): Add __go_go to thread_starters.
index 04c2d6ad60b4122eb1727e932cfcda035feeac68..b4d20753cf7b7efffd17015010a164e41b735031 100644 (file)
@@ -7174,7 +7174,7 @@ ppc_elf_relax_section (bfd *abfd,
          /* Keep space aligned, to ensure the patch code itself does
             not cross a page.  Don't decrease size calculated on a
             previous pass as otherwise we might never settle on a layout.  */
-         newsize = 15 - (end_addr & 15);
+         newsize = 15 - ((end_addr - 1) & 15);
          newsize += crossings * 16;
          if (relax_info->workaround_size < newsize)
            {