This is the mail archive of the binutils@sources.redhat.com 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]

Complain on ppc64 ld -r toc overflow


	* emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Error if
	.toc is too large on relocatable linking.

Index: ld/emultempl/ppc64elf.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/ppc64elf.em,v
retrieving revision 1.29
diff -u -p -r1.29 ppc64elf.em
--- ld/emultempl/ppc64elf.em	9 Aug 2004 03:14:12 -0000	1.29
+++ ld/emultempl/ppc64elf.em	9 Aug 2004 06:26:56 -0000
@@ -352,6 +352,14 @@ gld${EMULATION_NAME}_finish (void)
   if (need_laying_out)
     ppc_layout_sections_again ();
 
+  if (link_info.relocatable)
+    {
+      asection *toc = bfd_get_section_by_name (output_bfd, ".toc");
+      if (toc != NULL
+	  && bfd_section_size (output_bfd, toc) > 0x10000)
+	einfo ("%X%P: TOC section size exceeds 64k\n");
+    }
+
   if (stub_added)
     {
       char *msg = NULL;

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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