public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@bigpond.net.au>
To: binutils@sources.redhat.com
Cc: Olaf Hering <olh@suse.de>
Subject: gc-sections related error on powerpc-linux
Date: Tue, 11 Jan 2005 07:02:00 -0000	[thread overview]
Message-ID: <20050111070238.GI12291@bubble.modra.org> (raw)

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

                 reply	other threads:[~2005-01-11  7:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050111070238.GI12291@bubble.modra.org \
    --to=amodra@bigpond.net.au \
    --cc=binutils@sources.redhat.com \
    --cc=olh@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).