From: Alan Modra Date: Mon, 9 Aug 2004 06:48:37 +0000 (+0000) Subject: * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Error if X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=40e45c8b6c8500ec4415e644f0d659de14665358;p=binutils-gdb.git * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Error if .toc is too large on relocatable linking. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index f1f45d8c1dd..658ea4afb06 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2004-08-09 Alan Modra + + * emultempl/ppc64elf.em (gld${EMULATION_NAME}_finish): Error if + .toc is too large on relocatable linking. + 2004-08-09 Alan Modra * emultempl/ppc64elf.em (ppc_after_open): Delete. diff --git a/ld/emultempl/ppc64elf.em b/ld/emultempl/ppc64elf.em index 3ddf941bbd2..ffd6a2bcf08 100644 --- a/ld/emultempl/ppc64elf.em +++ b/ld/emultempl/ppc64elf.em @@ -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;