On Thu, 2020-04-02 at 18:18 +0200, Wolfgang Lux wrote: > On Thu, 2020-04-02 at 11:06 +0100, David Chisnall wrote: > > Hello, > > > > For various reasons, I have been reading the binutils ld > > documentation > > and there is a note that -Ur is needed instead of -r for > > incremental > > linking of C++ programs that contain constructors. I suspect that > > this > > is just badly written documentation - can someone try patching > > -make > > to > > use -Ur instead of -r and see if Additions links correctly with BFD > > ld? > > > > David > > I did give it a quick try by recompiling the Additions library with > messages=yes to see the commands being executed by make and then > reexecuted the link command with -Wl,-Ur instead of -Wl,-r. > Unfortunately, that doesn't help for me (Ubuntu 18.04 with clang-9 > and > bfd). Programs still segfault. :-(
And just adding on that, it doesn't look like an issue of using the correct flags or not. GNUstep-base works fine for me on a Debian system with Testing, i.e., the upcoming version 11, installed. But there the binutils package is at version 2.34 already. On the other hand, on Debian 10, where I get segfaults when using bfd for the linker, binutils is at 2.31. So it seems likely there was bug in binutils that got fixed somewhere in between those releases. Wolfgang