Re: vdso.so mislinked by buggy linker was Re: Linus 2.6.23-rc1

From: Andi Kleen
Date: Mon Jul 23 2007 - 10:44:39 EST



> Looking at vdso.lds.S, if you change just VDSO_TEXT_OFFSET to 0xc00 and
> don't tweak the linker script, then you jump backwards with the dot, you
> should even get a linker warning about it:
>
> . = VDSO_PRELINK + VDSO_TEXT_OFFSET;
>
> .text : { *(.text) } :text
> .text.ptr : { *(.text.ptr) } :text
> . = VDSO_PRELINK + 0x900;
>
> Guess that 0x900 should have been VDSO_TEXT_OFFSET + 0x400 or something
> similar. Also note that it is highly desirable to fit the whole vdso into
> one page, so increasing VDSO_TEXT_OFFSET etc. offsets too much is just
> wasting memory. From the above dump, VDSO_TEXT_OFFSET 0x500 is too low,
> but 0x600 should work,

The reporter reported only 0xc00 worked, which is mysterious.

Also how do we get rid of the 1MB padding on those binutils?

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