public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Bernd Schmidt <bernds@codesourcery.com>
To: "Joseph S. Myers" <joseph@codesourcery.com>
Cc: binutils@sources.redhat.com, Paul Brook <paul@codesourcery.com>
Subject: Re: Patch: Add c6x-uclinux support
Date: Tue, 29 Mar 2011 22:59:00 -0000	[thread overview]
Message-ID: <4D9263BC.7080309@codesourcery.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1103291609050.30259@digraph.polyomino.org.uk>

On 03/29/2011 06:13 PM, Joseph S. Myers wrote:
> On Tue, 29 Mar 2011, Bernd Schmidt wrote:
> 
>> On 03/29/2011 12:33 AM, Joseph S. Myers wrote:
>>> On Fri, 11 Mar 2011, Bernd Schmidt wrote:
>>>
>>>> Also included in this patch is support for a new assembler directive,
>>>> ".scomm", used to better support small-data common symbols as required
>>>> by the ABI. There's also a small assembler bugfix for -mgenerate-rel.
>>>
>>> Why exactly is a .scommon section needed in addition to .bss and .far - 
>>> how does it differ from those two sections?
>>
>> What happens on other targets is that the linker decides, based on size,
>> whether a common symbol goes into near or far BSS. That doesn't work for
>> the C6X ABI where considerations such as symbol type come into play.
>> Hence, the compiler must make the decision.
> 
> I'm happy with the directive, and given your other comments with the 
> section index (though it appears there must have been an omission to put 
> this index into the latest ABI version, which postdates the discussion you 
> mention).  But why is the additional section *name* needed?  How does it 
> differ from .bss?

Oh, ok. To be honest - all this code is just copied from other ports, so
I think "precedent" would be the reason. I'd prefer not to diverge
unnecessarily from existing practice.

Looking at it now, it seems to me that common symbols require the
behavior enabled by
.  {* The section contains common symbols (symbols may be defined
.     multiple times, the value of a symbol is the amount of
.     space it requires, and the largest symbol value is the one
.     used).  Most targets have exactly one of these (which we
.     translate to bfd_com_section_ptr), but ECOFF has two.  *}
.#define SEC_IS_COMMON 0x1000

This is tested in a few places in elflink.c for example.

Are you specifically worried about code in the assembler or the linker,
or both?


Bernd

  reply	other threads:[~2011-03-29 22:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-11 11:42 Bernd Schmidt
2011-03-28 22:34 ` Joseph S. Myers
2011-03-28 23:18   ` Bernd Schmidt
2011-03-29 16:13     ` Joseph S. Myers
2011-03-29 22:59       ` Bernd Schmidt [this message]
2011-03-29 23:42         ` Joseph S. Myers
2011-03-30  8:23           ` Bernd Schmidt
2011-03-30 10:14             ` Joseph S. Myers
2011-03-30 11:12               ` Bernd Schmidt
2011-03-30 11:19                 ` Joseph S. Myers
2011-03-30 18:46                   ` Bernd Schmidt
2011-03-30 19:34                     ` Joseph S. Myers
2011-03-31 14:40                     ` Tristan Gingold
2011-03-31 16:14                       ` Bernd Schmidt

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=4D9263BC.7080309@codesourcery.com \
    --to=bernds@codesourcery.com \
    --cc=binutils@sources.redhat.com \
    --cc=joseph@codesourcery.com \
    --cc=paul@codesourcery.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).