This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: FW: [PATCH ARC] bfd/arc: Allow non-instruction relocations within .text sections
- From: Nick Clifton <nickc at redhat dot com>
- To: Cupertino Miranda <Cupertino dot Miranda at synopsys dot com>, "binutils at sourceware dot org" <binutils at sourceware dot org>
- Cc: Claudiu Zissulescu <Claudiu dot Zissulescu at synopsys dot com>, Francois Bedard <Francois dot Bedard at synopsys dot com>
- Date: Tue, 1 Mar 2016 14:53:37 +0000
- Subject: Re: FW: [PATCH ARC] bfd/arc: Allow non-instruction relocations within .text sections
- Authentication-results: sourceware.org; auth=none
- References: <EB86EB452ADE4B44B294F7149B8A27770218E499 at DE02WEMBXB dot internal dot synopsys dot com>
Hi Cupertino,
> Can you please also provide us feedback for this patch as well. ;-)
Certainly...
There are some formatting issues:
* Multi-line expressions connected by boolean or binary operations
should have those operations appear at the start of a line, rather
than the end of a line. Thus:
#define IS_ME(FORMULA,BFD) ((strstr(FORMULA, "ME") != NULL) && \
(!bfd_big_endian (BFD)))
should be:
#define IS_ME(FORMULA,BFD) ((strstr(FORMULA, "ME") != NULL) \
&& (!bfd_big_endian (BFD)))
* A similar rule applies to braces. So:
if (strstr (#FORMULA, " ME ") != NULL) { \
BFD_ASSERT (SIZE == 2); \
}
Should be:
if (strstr (#FORMULA, " ME ") != NULL) \
{ \
BFD_ASSERT (SIZE == 2); \
}
Or even just:
if (strstr (#FORMULA, " ME ") != NULL) \
BFD_ASSERT (SIZE == 2);
If you prefer.
* Also when a function (or macro) is invoked its name should be
separated from the opening parenthesis by a space. Hence:
#define IS_ME(FORMULA,BFD) ((strstr(FORMULA, "ME") != NULL) \
&& (!bfd_big_endian (BFD)))
Should be:
#define IS_ME(FORMULA,BFD) ((strstr (FORMULA, "ME") != NULL) \
&& (!bfd_big_endian (BFD)))
But apart from that the patch looks OK to me.
Cheers
Nick