Re: linux-2.6.1 x86_64 : STACK_TOP and text/data

From: dada1
Date: Tue Jan 27 2004 - 13:59:51 EST


Andi Kleen wrote:

STACK_TOP is only for 32bit a.out executables running on x86-64

ELF 32bit and 64bit programs use different defaults.

-Andi




Hi Andi

I'm afraid not Andi

I changed include/asm-x86_64/a.out.h

#define STACK_TOP 0x10c0000000 /* instead of 0xc0000000 */

then, after reboot :

file /sbin/init
/sbin/init: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.4.0, dynamically linked (uses shared libs), stripped


cat /proc/1/maps

00400000-00408000 r-xp 00000000 03:01 556032 /sbin/init
00508000-00509000 rw-p 00008000 03:01 556032 /sbin/init
00509000-0052a000 rwxp 00000000 00:00 0
10bfffe000-10c0000000 rwxp fffffffffffff000 00:00 0
2a95556000-2a95569000 r-xp 00000000 03:01 637734 /lib64/ld-2.3.2.so
2a95569000-2a9556a000 rw-p 00000000 00:00 0
2a95669000-2a9566a000 rw-p 00013000 03:01 637734 /lib64/ld-2.3.2.so
2a9566a000-2a957a2000 r-xp 00000000 03:01 637741 /lib64/libc-2.3.2.so
2a957a2000-2a9586a000 ---p 00138000 03:01 637741 /lib64/libc-2.3.2.so
2a9586a000-2a958a7000 rw-p 00100000 03:01 637741 /lib64/libc-2.3.2.so
2a958a7000-2a958ac000 rw-p 00000000 00:00 0

See you

-
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/