From: Iain Sandoe <developer@sandoe-acoustics.co.uk>
To: Tristan Gingold <gingold@adacore.com>
Cc: binutils Development <binutils@sourceware.org>
Subject: Re: [Patch mach-o/gas] make section type names target-dependent.
Date: Mon, 19 Dec 2011 12:40:00 -0000 [thread overview]
Message-ID: <2349BC73-8C31-4496-8AEA-61A053D629DB@sandoe-acoustics.co.uk> (raw)
In-Reply-To: <68673077-0730-4F30-AF67-ED0BFB910551@adacore.com>
On 19 Dec 2011, at 12:28, Tristan Gingold wrote:
>
> On Dec 19, 2011, at 1:20 PM, Iain Sandoe wrote:
>
>>
>> On 19 Dec 2011, at 09:58, Tristan Gingold wrote:
>>> On Dec 16, 2011, at 9:34 PM, Iain Sandoe wrote:
>>>
>>>> I am trying to test the four main Darwin targets as I implement
>>>> things ..
>>>> .. the Idea being that, one day, we will simply be able to enable
>>>> them all in configure...
>>>>
>>>> Testing my current stuff (for symbol type qualifiers) reminded me
>>>> that some section types are not applicable to all targets.
>>>> (At present, specifically, that means that x86-64 doesn't support
>>>> symbol stubs, or {non,}lazy_symbol_stubs).
>>>>
>>>> The patch below checks for a target-specific table ahead of the
>>>> generic one.
>>>> I followed the current style of printing in binutils/od-macho.c
>>>> and parsing in bfd/mach-o.c although I wonder if it might be more
>>>> obvious to put them both back into bfd/mach-o.c and just publish
>>>> the accessor routines.
>>>
>>> Thank you for working on that.
>>>
>>> May I suggest a slightly different approach (feel free to discuss
>>> it) ?
>>>
>>> These section types are defined independently of the targets. So
>>> I think they must stay in bfd_mach_o_section_type_name.
>>> I agree that some are not valid on some targets. So just add a
>>> subtarget hook that returns FALSE if the section type is not
>>> supported by
>>> the target.
>>
>> Seems reasonable - I suppose we can work on the principle that the
>> section type can't be in an object unless it's supported - so we
>> only need to check when creating/writing.
>>
>> new version,
>> OK?
>
> Almost OK for me. I don't understand the reordering of
> bfd_mach_o_section type. They were ordering by values. What is the
> new criteria ?
Well, the expensive search is on the text when running gas. I was
thinking that, ideally, the tables would be ordered so that the most-
often-used types are near the beginning (a dup value had also crept in).
> OK without these reordering chunks.
presumably it's OK to remove the dup - or have I missed something?
> Should I commit ?
I suppose I should do this one.. and see if I have everything in place
correctly...
cheers
Iain
next prev parent reply other threads:[~2011-12-19 12:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-16 20:34 Iain Sandoe
2011-12-17 12:22 ` revised : " Iain Sandoe
2011-12-19 9:59 ` Tristan Gingold
2011-12-19 12:20 ` Iain Sandoe
2011-12-19 12:28 ` Tristan Gingold
2011-12-19 12:40 ` Iain Sandoe [this message]
2011-12-19 12:46 ` Tristan Gingold
2011-12-19 15:44 ` Iain Sandoe
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=2349BC73-8C31-4496-8AEA-61A053D629DB@sandoe-acoustics.co.uk \
--to=developer@sandoe-acoustics.co.uk \
--cc=binutils@sourceware.org \
--cc=gingold@adacore.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).