public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "H. J. Lu" <hjl@lucon.org>
To: binutils@sources.redhat.com
Subject: PATCH: Use "__bss_start" instead of "_edata"
Date: Thu, 05 May 2005 16:38:00 -0000	[thread overview]
Message-ID: <20050505163728.GA29912@lucon.org> (raw)

"_edata" may not be defined due to the elf.sc change. I will check
into this patch to use "__bss_start" instead and document it in
elf.sc.

H.J.
---
bfd/

2005-05-05  H.J. Lu  <hongjiu.lu@intel.com>

	* elflink.c (_bfd_elf_provide_section_bound_symbols): Use
	"__bss_start" instead of "_edata" as fallback.

ld/

2005-05-05  H.J. Lu  <hongjiu.lu@intel.com>

	* scripttempl/elf.sc: Document the usage of __bss_start.

--- binutils/bfd/elflink.c.bss	2005-05-05 07:50:03.000000000 -0700
+++ binutils/bfd/elflink.c	2005-05-05 09:31:17.000000000 -0700
@@ -9911,10 +9911,10 @@ _bfd_elf_provide_section_bound_symbols (
   else
     {
       /* We have to choose those values very carefully.  Some targets,
-	 like alpha, may have relocation overflow with 0. "_edata"
+	 like alpha, may have relocation overflow with 0. "__bss_start"
 	 should be defined in all cases.  */
       struct elf_link_hash_entry *h
-	= elf_link_hash_lookup (elf_hash_table (info), "_edata",
+	= elf_link_hash_lookup (elf_hash_table (info), "__bss_start",
 				FALSE, FALSE, FALSE);
       if (h != NULL && h->root.type == bfd_link_hash_defined)
 	start_val = h->root.u.def.value;
--- binutils/ld/scripttempl/elf.sc.bss	2005-05-05 07:45:30.000000000 -0700
+++ binutils/ld/scripttempl/elf.sc	2005-05-05 09:32:26.000000000 -0700
@@ -376,6 +376,8 @@ cat <<EOF
   ${SDATA}
   ${OTHER_SDATA_SECTIONS}
   ${RELOCATING+${DATA_END_SYMBOLS-_edata = .; PROVIDE (edata = .);}}
+  /* __bss_start is used by _bfd_elf_provide_section_bound_symbols in
+     elflink.c.  */
   ${RELOCATING+__bss_start = .;}
   ${RELOCATING+${OTHER_BSS_SYMBOLS}}
   ${SBSS}

                 reply	other threads:[~2005-05-05 16:37 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=20050505163728.GA29912@lucon.org \
    --to=hjl@lucon.org \
    --cc=binutils@sources.redhat.com \
    /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).