how to implement --push-state/--pop-state in gold?

Matthias Klose doko@ubuntu.com
Thu Dec 1 15:50:00 GMT 2016


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?

Matthias



More information about the Binutils mailing list