broken linuxulator in -current as of Jan 8 17:51:45 CET
    Tijl Coosemans 
    tijl at ulyssis.org
       
    Wed Jan 10 10:51:56 UTC 2007
    
    
  
On Wednesday 10 January 2007 07:53, Alexander Leidinger wrote:
> That's not possible. The way the linuxulator works is:
>   - the linker in userland calls open("/foo/bar")
>   - kernel looks for "/compat/linux/foo/bar"
>     * it is there -> return it
>     * it is not there -> look for "/foo/bar"
>       + if it is there -> return it
>       + if it is not there -> return error
>   - the userland get's something which may be linux or FreeBSD stuff
>   - the linker read()s this
>   - the linker sees a wrong ELF ABI and bails out
That means the linker tries to open /usr/lib/librt.so.1 instead of
/lib/librt.so.1 which doesn't exist under /compat/linux. So I added a
symlink there.
ln -s ../../lib/librt-2.3.6.so /compat/linux/usr/lib/librt.so.1
And now everything works.
   - the linker in userland calls open("/usr/lib/librt.so.1")
   - kernel looks for "/compat/linux/usr/lib/librt.so.1"
     * it is there -> return it
   - the linker read()s this
   - the linker sees a wrong linux kernel ABI (in case of 2.4.2)
     and calls open("/lib/obsolete/linuxthreads/librt.so.1")
% ldd /compat/linux/bin/ls
/compat/linux/bin/ls:
        librt.so.1 => /lib/obsolete/linuxthreads/librt.so.1 (0x4807c000)
I think this is an easier solution than changing the runtime linker.
    
    
More information about the freebsd-current
mailing list