Complain on ppc64 ld -r toc overflow
Alan Modra
amodra@bigpond.net.au
Mon Aug 9 06:48:00 GMT 2004
* 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
More information about the Binutils
mailing list