Re: improve collect2 to preserve a RO output as the linker does

2012-05-04 Thread Olivier Hainque
>> * collect2.c (may_unlink_output_file): New global. ... > This is OK. Installed, thanks :)

Re: improve collect2 to preserve a RO output as the linker does

2012-05-03 Thread Ian Lance Taylor
Olivier Hainque writes: > 2012-05-03 Olivier Hainque > > * collect2.c (may_unlink_output_file): New global. > (maybe_unlink): Honor it. > * collect2.h: Add extern for it. > * tlink.c (do_tlink): Set it to true if the link succeeded. This is OK. Thanks. Ian

improve collect2 to preserve a RO output as the linker does

2012-05-03 Thread Olivier Hainque
Hello, This is a followup on an old issue first discussed at http://gcc.gnu.org/ml/gcc-patches/2008-05/msg01290.html The original problem is still visible today: << While some target linkers silently replace read-only output files, others report an error in such circumstances. [...] col