[PATCH 2/4] [ARC] General bug fixes
Cupertino Miranda
Cupertino.Miranda@synopsys.com
Mon Jun 13 14:48:00 GMT 2016
Hi Nick,
I have made a mistake in previous patch.
I forgot to include the condition in the ASSERT itself. :-(
Here is a patch to apply over. Do you approve it?
Best regards,
Cupertino
bfd/ChangeLog:
Cupertino Miranda <cmiranda@synospsy.com>
elf32-arc.c (elf_arc_relocate_section): Fixed condition.
diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
index 38ca116..41d74e8 100644
--- a/bfd/elf32-arc.c
+++ b/bfd/elf32-arc.c
@@ -1673,7 +1673,8 @@ elf_arc_relocate_section (bfd *
output_bfd,
/* Make sure we have with a dynamic linker. In case of GOT and PLT
the sym_section should point to .got or .plt respectively. */
- if (is_reloc_for_GOT (howto) || is_reloc_for_PLT (howto))
+ if ((is_reloc_for_GOT (howto) || is_reloc_for_PLT (howto))
+ && reloc_data.sym_section == NULL)
{
(*_bfd_error_handler)
(_("GOT and PLT relocations cannot be fixed with a non
dynamic linker."));
On 06/13/2016 02:40 PM, Nick Clifton wrote:
> Hi Cupertino,
>
>> + /* Make sure we have with a dynamic linker. In case of GOT and PLT
>> + the sym_section should point to .got or .plt respectively. */
>> + if (is_reloc_for_GOT (howto) || is_reloc_for_PLT (howto))
>> + {
>> + (*_bfd_error_handler)
>> + (_("GOT and PLT relocations cannot be fixed with a non dynamic
>> linker."));
>> + bfd_set_error (bfd_error_bad_value);
>> + return FALSE;
>> + }
>> +
>
> Much better - thanks.
>
> Patch approved - please apply.
>
> Cheers
> Nick
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix.patch
Type: text/x-patch
Size: 622 bytes
Desc: fix.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20160613/e12e58fe/attachment.bin>
More information about the Binutils
mailing list