public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Fuhler, Rich" <rich@mips.com>
To: Ian Lance Taylor <iant@google.com>,
	       "Simeonov, Aleksandar (c)"	<asimeonov@mips.com>
Cc: "mips-compiler@rt-rk.com" <mips-compiler@rt-rk.com>,
	       "binutils@sourceware.org" <binutils@sourceware.org>
Subject: RE: Initial MIPS patch for GOLD - version 3
Date: Wed, 07 Mar 2012 19:46:00 -0000	[thread overview]
Message-ID: <222C3EEE08C3114591C6101A9C18F3FE012322A00E@exchdb03.mips.com> (raw)
In-Reply-To: <mcrboo88nse.fsf@dhcp-172-18-216-180.mtv.corp.google.com>

Hi Ian, I've been out with pneumonia and the corporate assignment wasn't updated while I was out. I'll get it done next day or so.
________________________________________
From: Ian Lance Taylor [iant@google.com]
Sent: Wednesday, March 07, 2012 06:54
To: Simeonov, Aleksandar (c)
Cc: Fuhler, Rich; mips-compiler@rt-rk.com; binutils@sourceware.org
Subject: Re: Initial MIPS patch for GOLD - version 3

"Simeonov, Aleksandar (c)" <asimeonov@mips.com> writes:

> Do you have any comments on proposals from my previous mail?

I'm not crazy about those proposals, because they in effect add highly
specialized cases to the Target structure.  One of the problems with the
GNU linker is the function pointers in the elf_backend_data structure.
Many of the function pointers are very specific and hard to understand
and use correctly, which becomes an issue when the code changes.
Unfortunately I have to some extent recreated that in gold's Target
structure.  I'm not sure what to do in this area.

I've been postponing more serious consideration of your patch until the
coypright issues are sorted out.  Also I'm in the middle of overlapping
release cycles and simply haven't had time to do any gold work.  Sorry.

Ian

> ________________________________________
> From: Simeonov, Aleksandar (c)
> Sent: Friday, February 03, 2012 4:40 PM
> To: Ian Lance Taylor
> Cc: Fuhler, Rich; mips-compiler@rt-rk.com; binutils@sourceware.org
> Subject: Re: Initial MIPS patch for GOLD - version 3
>
> Hi Ian,
> I agree with you that processor specific stuff should be in CPU.cc. Because of that I would like to suggest following:
>
> - reloc.cc (Sized_relobj_file<size, big_endian>::write_sections)
>
> Instead of having direct compare of section types in code:
> // For MIPS .reginfo section there is no need to do anything
> if (shdr.get_sh_type() == elfcpp::SHT_MIPS_REGINFO)
>   continue;
>
> To have something like:
> // Sections that need special handling (target specific)
> if(parameters->target().section_needs_spec_handling(shdr.get_sh_type()))
>  continue;
>
> Where section_needs_spec_handling should be defined in Target as a virtual function that returns false by default and can be implemented as needed.
>
>
> - layout.cc (Layout::segment_precedes)
>
> Instead of having function segment_precedes in Layout class, to move it to Target class. Make virtual default implementation as it was originally and allow different architectures to make their own implementation.
>
> Maybe some other proposals?
>
> Greetings,
> Aleksandar
>
> On 28/01/2012 02:54, Ian Lance Taylor wrote:
>> Aleksandar Simeonov <Aleksandar.Simeonov@RT-RK.com> writes:
>>
>>> * reloc.cc (Sized_relobj_file<size, big_endian>::write_sections): Special
>>> handling of MIPS .reginfo section.
>>> - .reginfo section is generated by linker and needs special handling.
>>
>> I haven't thought about everything, but I can see that this patch is not
>> going to work as is.  It will fail when linking a non-MIPS object which
>> happens to have a section type == SHT_MIPS_REGINFO.  We can't use
>> processor-specific values like SHT_MIPS_REGINFO outside of the CPU.cc
>> file.
>>
>>> * layout.cc (Layout::segment_precedes): Fixed order of MIPS specific
>>> segments.
>>> - MIPS needs to have PT_MIPS_REGINFO segment before any loadable segment.
>>
>> This is similarly troubling, though probably less serious.
>>
>>> - MIPS needs to have PT_NULL segment to be last in list of segments.
>>
>> Why would we ever have a PT_NULL segment?
>>
>> Ian
>>

  reply	other threads:[~2012-03-07 19:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-03 15:40 Simeonov, Aleksandar (c)
2012-03-07 14:26 ` Simeonov, Aleksandar (c)
2012-03-07 14:54   ` Ian Lance Taylor
2012-03-07 19:46     ` Fuhler, Rich [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-01-24 15:39 Aleksandar Simeonov
2012-01-28  1:06 ` Ian Lance Taylor
2012-01-28  1:48 ` Ian Lance Taylor
2012-01-28  1:55 ` Ian Lance Taylor
2012-01-28  2:11   ` John Reiser
2012-01-29 12:13     ` Richard Sandiford

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=222C3EEE08C3114591C6101A9C18F3FE012322A00E@exchdb03.mips.com \
    --to=rich@mips.com \
    --cc=asimeonov@mips.com \
    --cc=binutils@sourceware.org \
    --cc=iant@google.com \
    --cc=mips-compiler@rt-rk.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).