public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Cary Coutant <ccoutant@gmail.com>
To: "Bharathi Seshadri (bseshadr)" <bseshadr@cisco.com>
Cc: "Richard Earnshaw (lists)" <Richard.Earnshaw@arm.com>,
		"binutils@sourceware.org" <binutils@sourceware.org>
Subject: Re: [Patch][Gold] BE8 for ARM
Date: Fri, 12 Aug 2016 16:35:00 -0000	[thread overview]
Message-ID: <CAJimCsF24nTYJ_GORNLsxr3q3qNqkRPko1mraquEenfHB=FJfQ@mail.gmail.com> (raw)
In-Reply-To: <926c9132a0364f1b8c6dba6c7a2a46f4@XCH-RTP-013.cisco.com>

> My application is arm only and non-thumb, so I did not include the thumb patch in the initial implementation.  I'm now extending it to cover thumb. I'll post the patch when I'm done with testing.

OK, thanks! Here are my comments on the formatting...

+                   gold_assert(section_address >= view_address
+                               && ((section_address + section_size)
+                               <= (view_address + view_size)));

The indentation isn't right here. The "<=" should line up with the
second '(' in the line above.

   for (size_t i = 0; i < num_first_plt_words - 1; i++)
-    elfcpp::Swap<32, big_endian>::writeval(pov + i * 4, first_plt_entry[i]);
+    if (parameters->options().user_set_be8())
+      elfcpp::Swap<32, false>::writeval(pov + i * 4, first_plt_entry[i]);
+    else
+      elfcpp::Swap<32, big_endian>::writeval(pov + i * 4, first_plt_entry[i]);

(Two places.) I'd prefer to see braces around the body of the for loop
here, since it's a more complex statement.

+  if (parameters->options().user_set_be8())
+    elfcpp::Swap<32, false>::writeval(pov + 16,
+                                        got_address - (plt_address + 16));
+  else
+    elfcpp::Swap<32, big_endian>::writeval(pov + 16,
                                         got_address - (plt_address + 16));

(Two places.) The indentation is off here, too. In each case,
"got_address" should line up under "pov".

+  if (parameters->options().user_set_be8())

Instead of "user_set_be8", you should probably be using just "be8".
The difference is that if --be8 is ever turned on by default,
user_set_be8() will still be true only if the option is explicitly
specified on the command line. (I do see a few other places in arm.cc
where the same argument applies; those should probably get cleaned up
someday.)

+  DEFINE_bool(be8,options::TWO_DASHES, '\0', false,
+              N_("(ARM only) be8 -byte invariant addressing."), NULL);

The hyphen in front of "byte" seems wrong. (For comparison, ld's help
text is simply "Output BE8 format image", but I find that fairly
unhelpful.)

-cary

  reply	other threads:[~2016-08-12 16:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-07 23:25 Bharathi Seshadri (bseshadr)
2016-08-09  9:57 ` Richard Earnshaw (lists)
2016-08-12 15:22   ` Cary Coutant
2016-08-12 15:36     ` Bharathi Seshadri (bseshadr)
2016-08-12 16:35       ` Cary Coutant [this message]
2016-08-15 18:05         ` Bharathi Seshadri (bseshadr)
2016-08-16 14:17           ` Richard Earnshaw (lists)
2016-08-23 21:52           ` Cary Coutant
2017-09-08 11:27             ` Umesh Kalappa
2016-08-09  9:25 Umesh Kalappa
2016-08-12  5:35 ` Sriraman Tallam
2017-09-13  6:25 Umesh Kalappa
2017-09-20 22:30 ` Cary Coutant
2017-09-25 10:58   ` Umesh Kalappa
2017-10-12  9:48     ` Umesh Kalappa
2017-10-20  4:00       ` Cary Coutant
     [not found]         ` <CAGfacvR9Q+n3ScPBUeqyuGuoNHzLTXBDsiUJC65mvwB7VcJpNw@mail.gmail.com>
2017-10-26 15:06           ` Umesh Kalappa

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='CAJimCsF24nTYJ_GORNLsxr3q3qNqkRPko1mraquEenfHB=FJfQ@mail.gmail.com' \
    --to=ccoutant@gmail.com \
    --cc=Richard.Earnshaw@arm.com \
    --cc=binutils@sourceware.org \
    --cc=bseshadr@cisco.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).