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

Andi Kleen
2007-07-23T14:44:38Z

> 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