[commiited, PATCH] x86: Add VERIFY_COPY_RELOC
H.J. Lu
hjl.tools@gmail.com
Fri Oct 6 12:51:00 GMT 2017
On 10/6/17, Pedro Alves <palves@redhat.com> wrote:
> On 10/06/2017 08:52 AM, H.J. Lu wrote:
>>
>> +/* Verify that the symbol supports copy relocation. */
>> +#define VERIFY_COPY_RELOC(H, HTAB) \
>> + if ((H)->dynindx == -1 \
>> + || ((H)->root.type != bfd_link_hash_defined \
>> + && (H)->root.type != bfd_link_hash_defweak) \
>> + || (HTAB)->elf.srelbss == NULL \
>> + || (HTAB)->elf.sreldynrelro == NULL) \
>> + abort ();
>> +
>
> I'd suggest at least wrapping macros such as this
> one with do/while(0) to avoid potential dangling
> else problems.
>
I am checking in this patch.
--
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-do-while-0-to-COPY_INPUT_RELOC_P-VERIFY_COPY_REL.patch
Type: text/x-patch
Size: 2608 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20171006/fcf5b4fc/attachment.bin>
More information about the Binutils
mailing list