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]

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


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