public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@google.com>
To: Viktor Kutuzov <vkutuzov@accesssoftek.com>
Cc: <binutils@sourceware.org>
Subject: Re: [PATCH Take 2] Gold: Added R_ARM_ABS8 relocation
Date: Fri, 11 Sep 2009 18:39:00 -0000	[thread overview]
Message-ID: <m34or9milr.fsf@google.com> (raw)
In-Reply-To: <E8062E6BA84940B8AA2541E62384E3B1@andreic6e7fe55> (Viktor Kutuzov's message of "Fri\, 11 Sep 2009 10\:49\:58 -0700")

Viktor Kutuzov <vkutuzov@accesssoftek.com> writes:

> Ping. Can somebody commit this patch?

Sorry--I've been busy and have not had time to review this set of
patches.  I will get to them soon.  Sorry for the delay.

Ian

> ----- Original Message ----- 
> From: "Viktor Kutuzov" <vkutuzov@accesssoftek.com>
> To: <binutils@sourceware.org>
> Sent: Thursday, September 03, 2009 11:02 AM
> Subject: Re: [PATCH Take 2] Gold: Added R_ARM_ABS8 relocation
>
>
> Is this patch Ok?
>
> Best regards,
> Viktor
>
> ----- Original Message ----- 
> From: "Viktor Kutuzov" <vkutuzov@accesssoftek.com>
> To: <binutils@sourceware.org>
> Sent: Tuesday, September 01, 2009 12:52 PM
> Subject: [PATCH Take 2] Gold: Added R_ARM_ABS8 relocation
>
>
> Thanks, Ian, for the review.
>
> Please find attached the updated patch.
>
> By the way, I notice that there is a mix of spaces and tabs used in the source code for indents.
> I have done my best trying to follow the original stile.
> But it might be a formal policy I should follow?
>
> Best regards,
> Viktor
>
> * gold/arm.cc: Added R_ARM_ABS8 relocation
>
> ----- Original Message ----- 
> From: "Ian Lance Taylor" <iant@google.com>
> To: "Viktor Kutuzov" <vkutuzov@accesssoftek.com>
> Cc: <binutils@sourceware.org>
> Sent: Monday, August 31, 2009 5:56 PM
> Subject: Re: [PATCH] Gold: Added R_ARM_ABS8 relocation
>
>
> Viktor Kutuzov <vkutuzov@accesssoftek.com> writes:
>
>> +  template<int min_no_bits, int max_no_bits>
>> +  static inline bool has_overflow(uint32_t bits) {
>> +  gold_assert(max_no_bits >= 0 && max_no_bits <= 32);
>> +  gold_assert(min_no_bits >= 0 && min_no_bits <= 32);
>> +  gold_assert(min_no_bits <= max_no_bits);
>> +  if (min_no_bits == 32)
>> +  return false;
>> +  int32_t max = (1 << (max_no_bits - 1)) - 1;
>> +  int32_t min = -(1 << (min_no_bits - 1));
>> +  int32_t as_signed = static_cast<int32_t> (bits);
>> +  return as_signed > max || as_signed < min;
>> +  }
>
> Passing both MIN_NO_BITS and MAX_NO_BITS is not the way to go.  What you
> are really testing here is that the value must fit in either a signed or
> unsigned value.  You should write it like that.  The function should not
> be named has_overflow--that overloads an existing function.  The
> function needs a comment.
>
> (Of course this relocation stuff should move to generic code anyhow, but
> that is not your problem.)
>
>
>> + case elfcpp::R_ARM_ABS8:
>> +   //FIXME: This should handles properly the dynamic linking against the shared object.
>> +   break;
>
> This comment does not make sense as written.  There should be a space
> after the "//".  It may be appropriate to warn if the symbol would
> normally require a dynamic relocation.  The same may be true in
> scan::local.
>
>> + case elfcpp::R_ARM_ABS8:
>> +   if (should_apply_static_reloc(gsym, Symbol::ABSOLUTE_REF, false,
>> + output_section))
>> +   reloc_status = Arm_relocate_functions::abs8(view, object, psymval,
>> + has_thumb_bit);
>> +   break;
>
> Testing should_apply_static_reloc here only makes sense if we warn in
> scan::local and scan::global.  Otherwise we will in effect silently
> ignore the relocation.
>
> Thanks for sending the patch.
>
> Ian

  reply	other threads:[~2009-09-11 18:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-11 17:50 Viktor Kutuzov
2009-09-11 18:39 ` Ian Lance Taylor [this message]
2009-09-11 18:46   ` Viktor Kutuzov
  -- strict thread matches above, loose matches on Subject: below --
2009-09-03 18:02 Viktor Kutuzov
2009-09-18  0:48 ` Ian Lance Taylor
2009-08-13 15:09 [PATCH] gold: add cast to gold_unreachable to workaround gcc giving invalid "no return statement" warnings Mikolaj Zalewski
2009-08-31 21:49 ` [PATCH] Gold: Added R_ARM_ABS8 relocation Viktor Kutuzov
2009-09-01  0:56   ` Ian Lance Taylor
2009-09-01 19:53     ` [PATCH Take 2] " Viktor Kutuzov
2009-09-01 21:24       ` Ian Lance Taylor

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=m34or9milr.fsf@google.com \
    --to=iant@google.com \
    --cc=binutils@sourceware.org \
    --cc=vkutuzov@accesssoftek.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).