public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Ian Lance Taylor <iant@google.com>
Cc: binutils@sourceware.org
Subject: Re: PATCH: PR gold/13507: Gold assumes GOT entry size is the same as ELF class size
Date: Fri, 16 Dec 2011 22:10:00 -0000	[thread overview]
Message-ID: <CAMe9rOoXyFv6ArEW1KWBkocTuh7a_52+7hOi1KaW-vepJm=wXg@mail.gmail.com> (raw)
In-Reply-To: <mcrhb10gx5o.fsf@dhcp-172-18-216-180.mtv.corp.google.com>

On Fri, Dec 16, 2011 at 10:59 AM, Ian Lance Taylor <iant@google.com> wrote:
>
>>
>> Unless we can remove all dependencies on the ELF class from
>> Output_data_got, I don't see how it will work.
>
> I agree.  That is exactly what I am suggesting.
>
>
>> Considering there are codes in Output_data_got like
>>
>>             Sized_symbol<size>* sgsym;
>>             // This cast is a bit ugly.  We don't want to put a
>>             // virtual method in Symbol, because we want Symbol to be
>>             // as small as possible.
>>             sgsym = static_cast<Sized_symbol<size>*>(gsym);
>>             val = sgsym->value();
>>
>> add another template parameter for GOT entry size is less intrusive.
>> FWIW, I enclosed a new patch without adding a template parameter for
>> GOT entry size.  If it isn't acceptable, I will work on a patch to add
>> a new template parameter, which will be added to most of template
>> classes.
>
> My goal is not the least intrusive change.  My goal is the change which
> gives us the best source code going forward.  I'm fairly sure that
> passing in the GOT size as a parameter is not the best change.
>

Given that it is very unlikely I can remove all dependencies on the ELF
class from Output_data_got, I will prepare a patch to add a new
parameter to class templates for GOT entry size.

-- 
H.J.

  reply	other threads:[~2011-12-16 22:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-15 23:09 H.J. Lu
2011-12-16  2:38 ` Ian Lance Taylor
2011-12-16  2:58   ` H.J. Lu
2011-12-16  5:53     ` Ian Lance Taylor
2011-12-16 15:39       ` H.J. Lu
2011-12-16 16:43         ` Ian Lance Taylor
2011-12-16 17:08           ` H.J. Lu
2011-12-16 19:00             ` Ian Lance Taylor
2011-12-16 22:10               ` H.J. Lu [this message]
2011-12-17  6:33                 ` Ian Lance Taylor
2011-12-17 17:11                   ` H.J. Lu
     [not found]                     ` <CAKOQZ8zjAStMvF0Di2V0tmbXSaJYgOx9uE3tYCW_CDS2n5-AkA@mail.gmail.com>
2012-01-02 17:09                       ` H.J. Lu
2012-01-02 18:27                         ` Ian Lance Taylor
2012-01-03 23:24                           ` Cary Coutant
2012-01-04  0:01                             ` Ian Lance Taylor
2012-01-04  0:25                               ` Cary Coutant
2011-12-16  3:19 ` H.J. Lu

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='CAMe9rOoXyFv6ArEW1KWBkocTuh7a_52+7hOi1KaW-vepJm=wXg@mail.gmail.com' \
    --to=hjl.tools@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=iant@google.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).