sym links to absolute pathnames in /compat/linux
John E Hein
jhein at timing.com
Tue May 1 20:36:40 UTC 2007
John E Hein wrote at 14:11 -0600 on May 1, 2007:
> Eric Anderson wrote at 14:52 -0500 on May 1, 2007:
> > On 05/01/07 14:25, John E Hein wrote:
.
.
> > >
> > > # ln -s /bin/foo /compat/linux/usr/bin/foo
> > > # ls -l /compat/linux/usr/bin/foo
> > > lrwxr-xr-x 1 root wheel 8 May 1 19:17 /compat/linux/usr/bin/foo -> /bin/foo
> > > # cp -p /compat/linux/bin/ls /compat/linux/bin/foo
> > > # cp -p /bin/ls /bin/foo
.
.
And ktrace / linux_kdump shows...
# rm /bin/foo
# ktrace /compat/linux/bin/sh -c '/usr/bin/foo --version'
/compat/linux/bin/sh: line 1: /usr/bin/foo: No such file or directory
Exit 127
# linux_kdump | grep -5 foo
39558 bash CALL linux_rt_sigaction(0x3,0xbfbfdfb0,0xbfbfdf20,0x8)
39558 bash RET linux_rt_sigaction 0
39558 bash CALL linux_rt_sigaction(0x11,0xbfbfdfb0,0xbfbfdf20,0x8)
39558 bash RET linux_rt_sigaction 0
39558 bash CALL linux_execve(0x80ec768,0x80eda08,0x80ed608)
39558 bash NAMI "/compat/linux/usr/bin/foo"
39558 bash NAMI "/usr/bin/foo"
39558 bash RET linux_execve JUSTRETURN
39558 bash CALL linux_stat64(0x80ec768,0xbfbfe170,0x28224b10)
39558 bash NAMI "/compat/linux/usr/bin/foo"
39558 bash NAMI "/usr/bin/foo"
39558 bash RET linux_stat64 JUSTRETURN
39558 bash CALL linux_stat64(0x80ec768,0xbfbfdfd0,0x28224b10)
39558 bash NAMI "/compat/linux/usr/bin/foo"
39558 bash NAMI "/usr/bin/foo"
39558 bash RET linux_stat64 JUSTRETURN
39558 bash CALL write(0x2,0x80e8008,0x46)
39558 bash GIO fd 2 wrote 70 bytes
"/compat/linux/bin/sh: line 1: /usr/bin/foo: No such file or directory
"
39558 bash RET write 70/0x46
39558 bash CALL exit(0x7f)
More information about the freebsd-emulation
mailing list