Running GCC as root

Maciej W. Rozycki macro@linux-mips.org
Tue Feb 15 00:12:00 GMT 2005


On Mon, 14 Feb 2005, Ian Lance Taylor wrote:

> >  Actually gas unlinks files itself:
> 
> Well, true, but those are the error cases.  You are certainly right
> that you could unlink /dev/null by assembling an erroneous input file
> with -o /dev/null.

 That has already happened to me.  That's why we use that "-Z" option for 
Linux.

> > $ grep unlink gas/*.c
> > gas/as.c:    unlink (out_file_name);
> > gas/messages.c:    unlink (out_file_name);
> > $ 
> > 
> > The second call is the "funny" one I've mentioned -- if you have a look 
> > there, you'll know what I mean.
> 
> I think both calls are correct, actually, although perhaps they
> shouldn't unlink devices.

 Well, the second one unlinks the file unconditionally regardless of the 
"-Z" option.  But it only does it for the USE_STDARG variation; the file 
is never unlinked in the other variant of as_fatal().  That's a bit 
inconsistent.

  Maciej



More information about the Gcc-patches mailing list