Re: [PATCH v3] driver: Output to a temp file; rename upon success [PR80182]

2024-05-16 Thread Peter0x44
On 2024-05-16 01:29, Richard Biener wrote: On Sun, May 12, 2024 at 3:40 PM Peter Damianov wrote: Currently, commands like: gcc -o file.c -lm will delete the user's code. This patch makes the linker write executables to a temp file, and then renames the temp file if successful. This fixes the

Re: [PATCH v3] driver: Output to a temp file; rename upon success [PR80182]

2024-05-16 Thread Richard Biener
On Sun, May 12, 2024 at 3:40 PM Peter Damianov wrote: > > Currently, commands like: > gcc -o file.c -lm > will delete the user's code. > > This patch makes the linker write executables to a temp file, and then renames > the temp file if successful. This fixes the case above, but has limitations. >

[PATCH v3] driver: Output to a temp file; rename upon success [PR80182]

2024-05-12 Thread Peter Damianov
Currently, commands like: gcc -o file.c -lm will delete the user's code. This patch makes the linker write executables to a temp file, and then renames the temp file if successful. This fixes the case above, but has limitations. The source file will still get overwritten if the link "succeeds", su