Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262524AbVESOke (ORCPT ); Thu, 19 May 2005 10:40:34 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262534AbVESOkY (ORCPT ); Thu, 19 May 2005 10:40:24 -0400 Received: from alog0469.analogic.com ([208.224.222.245]:45235 "EHLO chaos.analogic.com") by vger.kernel.org with ESMTP id S262524AbVESOjw (ORCPT ); Thu, 19 May 2005 10:39:52 -0400 Date: Thu, 19 May 2005 10:36:17 -0400 (EDT) From: "Richard B. Johnson" Reply-To: linux-os@analogic.com To: Steven Rostedt cc: Andreas Schwab , linux-kernel@vger.kernel.org, "Gilbert, John" , Kyle Moffett , Adrian Bunk , Arjan van de Ven , "Maciej W. Rozycki" Subject: Re: Illegal use of reserved word in system.h In-Reply-To: <1116512140.15866.42.camel@localhost.localdomain> Message-ID: References: <2692A548B75777458914AC89297DD7DA08B0866F@bronze.dolby.net> <20050518195337.GX5112@stusta.de> <6EA08D88-7C67-48ED-A9EF-FEAAB92D8B8F@mac.com> <20050519112840.GE5112@stusta.de> <1116505655.6027.45.camel@laptopd505.fenrus.org> <1116512140.15866.42.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1738 Lines: 55 On Thu, 19 May 2005, Steven Rostedt wrote: > On Thu, 2005-05-19 at 16:06 +0200, Andreas Schwab wrote: >> "Richard B. Johnson" writes: >> >>> Now, where is that 'auxiliary vevtor'??? I got a pointer to >>> something to be executed before calling exit, I have an >>> argument count, then a bunch of pointers (argv), terminating >>> with a NULL, then another bunch of pointers (envp) terminating >>> with a NULL. Is there something after that??? If so, what's >>> the contents of this thing? >> >> See create_elf_tables. The aux table comes after the environment. > > As I stated earlier, the page size passed in there is ELF_EXEC_PAGESIZE > which may not be the same as PAGE_SIZE. > > -- Steve It's also hard to see what is happening in 'C'. When I execute this: #include #include int main(int cnt, char *argv[], char *env[], char *aux[]) { printf("Aux 0 = %s\n", aux[0]); // printf("Aux 1 = %s\n", aux[1]); } I get: Aux 0 = GLIBC_2.0 The next pointer is a NULL pointer, so 'C' has dorked something. When I play in assembler, (crt.o startup) I get a pointer that points to: bffffb6c - pointer of the stack 00000020 - dereferenced This shows that ld-linux.so, that got called first, didn't preserve the vector. Cheers, Dick Johnson Penguin : Linux version 2.6.11.9 on an i686 machine (5537.79 BogoMips). Notice : All mail here is now cached for review by Dictator Bush. 98.36% of all statistics are fiction. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/