Messages in this thread | | | Date | Thu, 19 May 2005 10:36:17 -0400 (EDT) | From | "Richard B. Johnson" <> | Subject | Re: Illegal use of reserved word in system.h |
| |
On Thu, 19 May 2005, Steven Rostedt wrote:
> On Thu, 2005-05-19 at 16:06 +0200, Andreas Schwab wrote: >> "Richard B. Johnson" <linux-os@analogic.com> 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 <stdio.h> #include <stdlib.h>
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/
| |