This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH 2/4] [ARC] General bug fixes
- From: Cupertino Miranda <Cupertino dot Miranda at synopsys dot com>
- To: Nick Clifton <nickc at redhat dot com>, 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: Mon, 13 Jun 2016 14:47:50 +0000
- Subject: Re: [PATCH 2/4] [ARC] General bug fixes
- Authentication-results: sourceware.org; auth=none
- References: <EB86EB452ADE4B44B294F7149B8A2777021DE520 at DE02WEMBXB dot internal dot synopsys dot com> <c54c1e85-4465-422b-b79c-6d8bffdacb51 at redhat dot com> <EB86EB452ADE4B44B294F7149B8A2777021DE6CA at DE02WEMBXB dot internal dot synopsys dot com> <9e2a3633-c77b-5055-7b2e-08f1d7e9b0bd at redhat dot com>
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
>
>
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."));