dietlibc ia64 port
Hello,
the upstream source of the diet libc includes a port for ia64 which
currently doesn't compile on merulo. Though the port is not yet complete
and most probably includes some bugs, I would like to make the package
available on ia64 for further development and testing.
Here is a buildlog compiling dietlibc-0.21 on merulo without changes,
not that informative:
http://people.debian.org/~pape/dietlibc/log.1
I think I have tracked down the problem to be in the start.S code for
ia64. The bin-ia64/diet program (compiled and linked with the dietlibc
while building) tries to exec gcc with a wrong envp:
pape@merulo:$ strace bin-ia64/diet /bin/true 2>&1 |head -2
execve("bin-ia64/diet", ["bin-ia64/diet", "/bin/true"], [/* 15 vars */]) = 0
execve("/bin/true", ["/bin/true"], [/* 0 vars */]) = 0
pape@merulo:$ strace bin-ia64/diet /bin/true foo 2>&1 |head -2
execve("bin-ia64/diet", ["bin-ia64/diet", "/bin/true", "foo"], [/* 15 vars */]) = 0
execve("/bin/true", ["/bin/true", "foo"], [/* 1 var */]) = 0
pape@merulo:$ strace bin-ia64/diet /bin/true foo bar 2>&1 |head -2
execve("bin-ia64/diet", ["bin-ia64/diet", "/bin/true", "foo", "bar"], [/* 15 vars */]) = 0
execve("/bin/true", ["/bin/true", "foo", "bar"], [/* 2 vars */]) = 0
>From dietlibc-0.21.orig/ia64/start.S:
> _start:
> alloc r2 = ar.pfs,0,0,7,0
> adds out1 = 16, sp /* base arguments */
> movl gp = @gprel(0f) /* base offset */
> ;;
> adds out2 = 24, out1 /* get offset to environ/envp */
^^^^^^^^
This seems to be the problem, the offset depends on argc, if I
understand all this correctly, so this can't work. I don't know the
assembler language, and was not able to fix this. Can you ia64
specialists give me some advise?
Thanks, Gerrit.
Reply to: