<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7653.38">
<TITLE>Binaries from CLFS toolchain do not execute in Linux.</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Hey all,<BR>
<BR>
I just finished building a toolchain from the PowerPC 32 book. I followed it almost exactly, except I substituted Binutils 2.19 so I wouldn't need the branch update patch.<BR>
<BR>
Anyways, everything came out nice and clean and I was able to compile u-boot, Linux and all my userspace applications with it. Both u-boot and the kernel are running fine, but nothing within userspace is working at all, it's really strange. I loaded a root filesystem with busybox and glibc 2.3.6 which I had built from a previous cross compiler and it is working with the kernel built from the clfs toolchain. when I try and drop a binary built from clfs (like libc-2.7.so or just a simple 'hello world') on this filesystem i get "not found" as an error from the shell:<BR>
<BR>
root: # ls -l<BR>
-rwxr-xr-x    1 root     root        10406 Nov 24 02:20 hello<BR>
root: # ./hello<BR>
-ash: ./hello: not found<BR>
root: # strace ./hello<BR>
execve("./hello", ["./hello"], [/* 16 vars */]) = -1 ENOENT (No such file or directory)<BR>
dup(2)                                  = 3<BR>
fcntl64(3, F_GETFL)                     = 0x2 (flags O_RDWR)<BR>
fstat64(3, {st_mode=S_IFCHR|0600, st_rdev=makedev(4, 71), ...}) = 0<BR>
ioctl(3, TCGETS, {B115200 opost isig icanon echo ...}) = 0<BR>
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x48017000<BR>
_llseek(3, 0, 0xbfa2ca38, SEEK_CUR)     = -1 ESPIPE (Illegal seek)<BR>
write(3, "strace: exec: No such file or dir"..., 40strace: exec: No such file or directory<BR>
) = 40<BR>
close(3)                                = 0<BR>
munmap(0x48017000, 4096)                = 0<BR>
exit_group(1)                           = ?<BR>
<BR>
I'm completely lost...I don't get the ENOENT error from execve at all. If I try to load an executable built for the wrong architecture (like x86) I at least get a meaningful ENOEXEC return value. Anyone seen anything like this?<BR>
<BR>
Also, on a second note, is there any need for pulling and building the ports addon to glibc if I'm on a PPC405 or PPC440 without an fpu? The guide makes no mention of this or any other flags that might be used for gcc.<BR>
<BR>
-thanks!<BR>
<BR>
Brian Szmyd | Software Engineer | Quantum Corporation | Office: 720.249.5827 | Mobile: 303.601.0300 | brian.szmyd@quantum.com<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML><BR/><hr><b>
The information contained in this transmission may be confidential. Any disclosure, copying, or further distribution of confidential information is not permitted unless such privilege is explicitly granted in writing by Quantum Corporation. Furthermore, Quantum Corporation is not responsible for the proper and complete transmission of the substance of this communication or for any delay in its receipt.<b><hr>