This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: how to implement --push-state/--pop-state in gold?
- From: Matthias Klose <doko at ubuntu dot com>
- To: Cary Coutant <ccoutant at gmail dot com>
- Cc: binutils <binutils at sourceware dot org>
- Date: Fri, 2 Dec 2016 11:39:37 +0100
- Subject: Re: how to implement --push-state/--pop-state in gold?
- Authentication-results: sourceware.org; auth=none
- References: <c6a114c1-dd78-2508-6ddb-bf237c48fbf9@ubuntu.com> <CAJimCsHWwNGur8No3uSwhDYDPcGGsu+cr1vP-zGppBU=XMJkOg@mail.gmail.com>
On 02.12.2016 01:56, Cary Coutant wrote:
>> In Debian and Ubuntu I'm getting bug reports from people trying to use
>> --push-state/--pop-state and then failing with gold. It would be nice to have
>> these options available in gold as well. Could somebody give me pointers
>> where/how to implement these?
>>
>> Looking at the implementation in the bfd linker, I see that push/pop only
>> supports one state, and not a stack. However the documentation reads:
>>
>> The --push-state allows to preserve the current state of the flags
>> which govern the input file handling so that they can all be restored
>> with one corresponding --pop-state option.
>>
>> which I think documents a stack of states. Should the docs be changed?
>
> I've just pushed a commit to implement this in gold. See PR 18989.
>
> https://sourceware.org/bugzilla/show_bug.cgi?id=18989
>
> Thanks for expressing an interest in working on this, but it was easy
> enough to implement, so I just did it.
thanks! now revisiting https://gcc.gnu.org/PR77267, I see that mpx tries to use
'-z bndplt' as well...