Re: [patch 1/2] m68k: runtime patching infrastructure

Geert Uytterhoeven
2007-05-30T11:19:56Z

On Wed, 30 May 2007, Joerg Dorchain wrote:
> On Wed, May 30, 2007 at 09:06:08AM +0200, Geert Uytterhoeven wrote:
> [...]
> > > >
> > > > I think it could be tightened up even if it happens not to warn?
> > >
> > >
> > > struct a {
> > > struct not_yet_defined *start, *end;
> > > };
> > >
> > > struct not_yet_defined {
> > > void *foo;
> > > };
> > >
> > > Is a valid and gives no warnings.
> >
> > I was puzzled by this as well, as there were no compiler warnings...
>
> Pointers are (at least on m68k) of known size, so the compiler knows how
> much space the struct occupies.
>
> Type checking is by definition futile with void * pointer, but for all
> other cases the compiler has all types and sizes it needs at this point.
>
> The actual dereferencing of the symbol table is done by the linker,
> which also knows all locations and sizes it needs.

True.

> Actually, this is the only way to define circular referencing
> structures.

No, you have forward declarations for that. These are missing here.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds