public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@bigpond.net.au>
To: "H. J. Lu" <hjl@lucon.org>
Cc: binutils@sources.redhat.com
Subject: Re: Yet another unnecessary powerpc section
Date: Tue, 22 Mar 2005 12:06:00 -0000	[thread overview]
Message-ID: <20050322050314.GE27445@bubble.modra.org> (raw)
In-Reply-To: <20050322041855.GA22732@lucon.org>

On Mon, Mar 21, 2005 at 08:18:55PM -0800, H. J. Lu wrote:
> On Tue, Mar 22, 2005 at 01:46:17PM +1030, Alan Modra wrote:
> > On Tue, Mar 22, 2005 at 12:30:03AM +1030, Alan Modra wrote:
> > > 	* scripttempl/elf.sc (SBSS): Don't provide sbss start and end syms.
> > 
> > Sigh.  It appears my search through source wasn't comprehensive enough.
> > libgloss uses __sbss_start and __sbss_end.
> > 
> > 	 * elf32-ppc.c (set_linker_sym): New function, extracted from..
> > 	 (ppc_elf_set_sdata_syms): ..here.  Expand comment.  Set .sbss
> > 	 start and end syms.
> > 
> > +/* Set _SDA_BASE_, _SDA2_BASE, and sbss start and end syms.  They are
> > +   set here rather than via PROVIDE in the default linker script,
> > +   because using PROVIDE inside an output section statement results in
> > +   unnecessary output sections.  Using PROVIDE outside an output section
> > +   statement runs the risk of section alignment affecting where the
> > +   section starts.  */
> >  
> 
> We had the same problem with __XXX_array_start/__XXX_array_end. I am
> running into the same problem for a different issue. Can we can make
> this a generic ELF function:
> 
> void bfd_elf_provide_symbol (struct bfd_link_info *,
> 			     const char *sym_name,
> 			     asection *sec,
> 			     bfd_vma val);
> 
> It will define a hidden data symbol NAME defined in SEC with value VAL
> if it is undefined.

If you need it, go ahead and steal it.  :)  The function probably ought
to start with '_' to indicate that it's not part of the public bfd
interface.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

  reply	other threads:[~2005-03-22  5:03 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-21 15:42 Alan Modra
2005-03-22  8:16 ` Alan Modra
2005-03-22 11:48   ` H. J. Lu
2005-03-22 12:06     ` Alan Modra [this message]
2005-03-22 17:37       ` PATCH: Add _bfd_elf_provide_symbol H. J. Lu
2005-03-23  4:19         ` H. J. Lu
2005-03-23  5:37           ` H. J. Lu
2005-03-23  9:28             ` Alan Modra
2005-03-23  9:31               ` Daniel Jacobowitz
2005-03-23  9:33                 ` H. J. Lu
2005-04-25  4:53                   ` Michael Matz
2005-04-25 14:55                     ` H. J. Lu
2005-04-25 15:17                       ` Michael Matz
2005-04-25 17:31                         ` PATCH: Fix alpha relocation overflow (Re: PATCH: Add _bfd_elf_provide_symbol) H. J. Lu
2005-04-25 17:46                           ` H. J. Lu
2005-04-26 12:01                             ` Michael Matz
2005-04-26 13:47                               ` H. J. Lu
2005-04-27 19:35                                 ` H. J. Lu
2005-05-03  1:27                                   ` Alan Modra
2005-05-03  1:35                                     ` H. J. Lu
2005-05-03  5:31                                       ` Alan Modra
2005-05-03 21:40                                         ` H. J. Lu
2005-05-04  6:18                                           ` Alan Modra
2005-05-04  6:50                                             ` H. J. Lu
2005-05-04 10:17                                               ` Alan Modra

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=20050322050314.GE27445@bubble.modra.org \
    --to=amodra@bigpond.net.au \
    --cc=binutils@sources.redhat.com \
    --cc=hjl@lucon.org \
    /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).