ppc476 workaround sizing

* elf32-ppc.c (ppc_elf_relax_section): Correct ppc476 workaround
	alignment calculation.
This commit is contained in:
Alan Modra 2014-11-20 21:07:58 +10:30
parent 005e2509a1
commit 1e269e9b8f
2 changed files with 6 additions and 1 deletions

View 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 Terry Guo <terry.guo@arm.com>
* elf32-arm.c (elf32_arm_merge_eabi_attributes): Skip if input bfd

View 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)
{