This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
gc-sections related error on powerpc-linux
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sources dot redhat dot com
- Cc: Olaf Hering <olh at suse dot de>
- Date: Tue, 11 Jan 2005 17:32:38 +1030
- Subject: gc-sections related error on powerpc-linux
Compiling ncpfs-2.2.4 on powerpc-linux gives a string of errors like:
`stderr@@GLIBC_2.0' referenced in section `.text' of nwsfind.o: defined
in discarded section `.dynsbss' of /usr/lib/crt1.o
.dynsbss of course shouldn't be discarded. Fixed with
* elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
.dynsbss flags.
Index: bfd/elf32-ppc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-ppc.c,v
retrieving revision 1.131
diff -u -p -r1.131 elf32-ppc.c
--- bfd/elf32-ppc.c 10 Dec 2004 14:04:56 -0000 1.131
+++ bfd/elf32-ppc.c 11 Jan 2005 07:00:16 -0000
@@ -2820,7 +2820,7 @@ ppc_elf_create_dynamic_sections (bfd *ab
htab->dynbss = bfd_get_section_by_name (abfd, ".dynbss");
htab->dynsbss = s = bfd_make_section (abfd, ".dynsbss");
if (s == NULL
- || ! bfd_set_section_flags (abfd, s, SEC_ALLOC))
+ || ! bfd_set_section_flags (abfd, s, SEC_ALLOC | SEC_LINKER_CREATED))
return FALSE;
if (! info->shared)
--
Alan Modra
IBM OzLabs - Linux Technology Centre