This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ppc476 workaround sizing


I can't believe I missed this when changing end_addr in 6128f9cf.

	* elf32-ppc.c (ppc_elf_relax_section): Correct ppc476 workaround
	alignment calculation.

diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 04c2d6a..b4d2075 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -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)
 	    {

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]