lkml.org 
[lkml]   [2000]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [pre-2.3.51-2] memset problem on IA32
Date
From
Philipp Thomas <pthomas@suse.de> said:

[...]

> Well, there is a possible solution at the horizon for a freestanding
> environment such as the kernel, -ffreestanding. Currently this just
> implies -fno-builtin, i.e. disables builtins that don't begin with
> __builtin_. But at the moment does not effect the libcalls the block
> mover generates. It would be relatively easy to change gcc to also
> inhibit those, resulting in an abort on such structure copies by
> assignment.

Why not abort when adding two ints then? Just as much a part of C then
assigning structures...

> My reasoning would be to use -ffreestanding, as we don't have a standard
> C library around and baning all 'struct_a = struct_b' from kernel code,
> mandating either the use of struct_cpy() (which would have to be added to
> all arcs other than i386) or the direct use of memcpy(), which would then
> be inlined via the linux/string.h macro versions.

Adding a memcpy() in a library for the kernel's use is much less intrusive.
OTOH, I don't know what a freestanding compiler is allowed to assume in
terms of availability of libc functions. There are two parties to be fixed:
The kernel must provide a freestanding environment (whatever that means)
and the compiler has to abide by it.
--
Dr. Horst H. von Brand mailto:vonbrand@inf.utfsm.cl
Departamento de Informatica Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria +56 32 654239
Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.038 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site