/usr/ld Not enough room for program headers

Peter Teoh htmldeveloper at gmail.com
Wed Jan 9 07:51:36 EST 2013


On Wed, Jan 9, 2013 at 6:36 AM, horseriver <horserivers at gmail.com> wrote:

> On Wed, Jan 09, 2013 at 01:28:12PM +0800, Peter Teoh wrote:
> > On Sun, Jan 6, 2013 at 11:17 AM, horseriver <horserivers at gmail.com>
> wrote:
> >
> VSYSCALL_BASE = 0xffffe000;
>
> SECTIONS
> {
>   . = VSYSCALL_BASE ;
>
>   .hash           : { *(.hash) }                :text
>   .dynsym         : { *(.dynsym) }
>   .dynstr         : { *(.dynstr) }
>   .gnu.version    : { *(.gnu.version) }
>   .gnu.version_d  : { *(.gnu.version_d) }
>   .gnu.version_r  : { *(.gnu.version_r) }
>


I suspect something wrong with VSYSCALL_BASE + value here.

look at this:

http://marcbug.scc-dc.com/svn/repository/trunk/linuxkernel/linux-2.6.16-mcemu/arch/x86_64/ia32/vsyscall.lds

and doing a diff with your ld script, there is not much diff, except for
the VSYSCALL_BASE + SIZEOF_HEADER

portion.

Read here to understand how SIZEOF_HEADER is calculated:

http://www.math.utah.edu/docs/info/ld_3.html#SEC13

Not sure why do u want to shift the whole section by SIZEOF_HEADER down in
bytes?

-- 
Regards,
Peter Teoh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130109/fdbeb0db/attachment.html 


More information about the Kernelnewbies mailing list