just downloaded klibc 0.72 and took a look. first thing i found was that the URL for latest version is out of date: klibc is archived at: ftp://ftp.zytor.com/pub/linux/libs/klibc/ the `libs/' is superfluous. more importantly, this piece of code in klibc/arch/README is wrong: #if STACK_GROWS_UP argc = (int)*argptr--; argv = (char **)argptr; envp = argv-(argc+1); #else argc = (int)*argptr++; argv = (char **)argptr; envp = argv+(argc+1); #endif i'm not sure why people think that having an upwards-growing stack means that argc, argv & envp all change places, but they don't. see include/asm-parisc/processor.h for complete details of the stack layout. -- "It's not Hollywood. War is real, war is primarily not about defeat or victory, it is about death. I've seen thousands and thousands of dead bodies. Do you think I want to have an academic debate on this subject?" -- Robert Fisk
Matthew Wilcox wrote:> just downloaded klibc 0.72 and took a look. first thing i found was that > the URL for latest version is out of date: > > klibc is archived at: > > ftp://ftp.zytor.com/pub/linux/libs/klibc/ > > the `libs/' is superfluous. > > more importantly, this piece of code in klibc/arch/README is wrong: > > #if STACK_GROWS_UP > argc = (int)*argptr--; > argv = (char **)argptr; > envp = argv-(argc+1); > #else > argc = (int)*argptr++; > argv = (char **)argptr; > envp = argv+(argc+1); > #endif > > i'm not sure why people think that having an upwards-growing stack > means that argc, argv & envp all change places, but they don't. see > include/asm-parisc/processor.h for complete details of the stack layout. >As we discussed at LCA, the README is indeed wrong in much more than the above code. I have updated it in the CVS tree. -hpa
Apparently Analagous Threads
- [LLVMdev] Intrinsic prototype has incorrect number of arguments!
- [PATCH] for win_utf8_io.c
- [LLVMdev] Intrinsic prototype has incorrect number of arguments!
- [patch] fix for "refuse options" ignored due to popt
- [LLVMdev] Intrinsic prototype has incorrect number of arguments!