Hello! On Tue, Nov 14, 2006 at 04:26:26PM +0100, Samuel Thibault wrote: > Thomas Schwinge, le Tue 14 Nov 2006 16:15:08 +0100, a ?crit : > > Using `-fstack-protector' with GCC 4.1 made it include assembler code > > using ``%gs:0x14'' even with `-ffreestanding'. However, this isn't the > > correct thing to do in kernel > > space (with `-ffreestanding'). I think I've now tracked where this is > > coming from. This is not an issue anymore with GCC 4.2 or a GCC 4.1 that > > is recent enough, > > You mean that gcc now correctly switches to using __stack_chk_guard in > freestanding mode?
It always does that on x86 on GNU/Linux with such a fixed version of GCC, i.e. even in hosted mode. Hm. > > But then, if this was `*-*-*gnu*' instead of `*-*-linux*' in the above > > configure check, I guess that the smashing stack protector wouldn't work > > (and would instead make all compiled programs crash) in user space on > > GNU/Hurd then, as then not `[GCC]/gcc/libgcc/''s generic code would be > > used, but instead the Linux-tls-specific macros. > > Well, we'll have to fix GNU/Hurd's TLS someday anyway. We should, yes. But even then, it's not decided that ``%gs:0x14'' would be the correct thing to use on GNU/Hurd, isn't it? Regards, Thomas
signature.asc
Description: Digital signature
_______________________________________________ Bug-hurd mailing list Bug-hurd@gnu.org http://lists.gnu.org/mailman/listinfo/bug-hurd