This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH 1/9] [ARC] Avoid creating dynamic relocs when static linked is requested.
- 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 dot Zissulescu at synopsys dot com" <Claudiu dot Zissulescu at synopsys dot com>, "Francois dot Bedard at synopsys dot com" <Francois dot Bedard at synopsys dot com>
- Date: Tue, 6 Jun 2017 16:07:42 +0000
- Subject: Re: [PATCH 1/9] [ARC] Avoid creating dynamic relocs when static linked is requested.
- Authentication-results: sourceware.org; auth=none
- References: <20170523154056.19234-1-cmiranda@synopsys.com> <20170523154056.19234-2-cmiranda@synopsys.com> <72c6dbb8-e3bc-d72d-abe2-65d00f7041aa@redhat.com>
Hi Nick,
If one invokes ADD_RELA when no dynamic sections get created, it would
segmentation fault.
However, invocations to this macro are being done eagerly and that is
the reason for the simple condition fix.
Honestly, thinking about it now I do not find a use case where it would
be helpful to return an error message, but I can be wrong. :-(
Do you have use case in mind?
Cheers,
Cupertino
On 06/06/2017 02:09 PM, Nick Clifton wrote:
> Hi Cupertino,
>
> First of all - sorry for taking so long to look at this patch series.
>
>> * elf32-arc.c (ADD_RELA): Changed to only work when dynamic object is
>> created.
> One thing that struck me about this patch is - what should happen if dynamic
> sections are not being created ? IE is it an error to invoke the ADD_RELA
> macro if dynamic sections are not being emitted ? If so, then maybe this
> macro should be extended to include an error message...
>
> Cheers
> Nick
>
>
>