FW: [PATCH ARC] bfd/arc: Allow non-instruction relocations within .text sections
Nick Clifton
nickc@redhat.com
Tue Mar 1 14:53:00 GMT 2016
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
More information about the Binutils
mailing list