lkml.org 
[lkml]   [2002]   [Jan]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] C undefined behavior fix
On Thu, Jan 03, 2002 at 02:03:58AM +0100, jtv wrote:
> On Wed, Jan 02, 2002 at 05:29:35PM -0700, Tom Rini wrote:
>
> > > As far as I'm concerned the options are: fix RELOC;
> >
> > How?
>
> That's the EUR 64 * 10^6 question, isn't it? It's likely to cost some
> performance, but I suspect this would be the easiest solution.

I'm partial to Paul's' suggestion of redoing RELOC and friends in asm.

> > > obviate RELOC; use
> > > an appropriate gcc option if available (-fPIC might be it, -ffreestanding
> > > certainly isn't--see above);
> >
> > Maybe for 2.5. Too invasive for 2.4.x (initially at least).
>
> I'm not saying these are attractive or even feasible, just prioritizing
> the options I see. I'm sure I'll have forgotten some, but I'm convinced
> -ffreestanding isn't among them.

Well, Franz Sirl mentioned this before as a possible (or rather, why
aren't we doing it like this?), so maybe later someone will look into
this.

> Let's say RELOC also broke in other places, for the exact same reason but
> without (names familiar from) the standard library come into play. How
> would one recognize those cases? And once diagnosed, how to go about
> working around them? Even worse, what if gcc tries to help but still
> uses the stricter assumptions in some forgotten case?

Well, RELOC _always_ is doing funny arithmetic, and there's not much we
can do about it. At this point in the bootup we aren't running where
things think we are yet, and have to adjust things as such.

--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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