Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

The run-time linker doesn't deal with magic symlinks (or even plain symlinks) for shared objects?

Hash: SHA1

I want to use the @machine magic symlink to be able to install both i386 and amd64 distributions into the same root.

The primary reason is that I run NetBSD/i386 Xen3 in production, which requires a release version, but I'm porting my stuff to NetBSD/amd64 Xen3, which is only available as -current. Being able to choose at boot time which one to run would be *very* convenient, especially for laptops with only one disk.

However, this just plain doesn't work. If I move /lib to a location which is the target of a magic symlink /sbin/init refuses to execute ("Error 2"). Having /sbin itself as /sbin --> /machine/@machine/sbin seems to work fine, though. Leaving /lib alone to allow the machine to reach multiuser the following is an obvious example of the problem:

- -bash-3.2# pwd
- -bash-3.2# uname -m
- -bash-3.2# type uname
uname is hashed (/usr/bin/uname)
- -bash-3.2# mv /usr/lib /usr/machine/amd64/lib
- -bash-3.2# ln -s machine/@machine/lib /usr
- -bash-3.2# uname -m
Shared object "" not found
- -bash-3.2# rm lib
- -bash-3.2# mv machine/amd64/lib /usr
- -bash-3.2# uname -m

Note #1: yes, I've built custom kernels with "options MAGICLINKS", so not doing "sysctl -w vfs.generic.magiclinks=1" early enough is not the problem.

Note #2: I admit that I don't understand where the problem lies. I thought that magic symlink support was entirely inside the kernel and that the run-time linker being a userland process should deal with the magic sylinks just like every other process, i.e. bascially not even noticing. What am I missing?

Note #3: Umm, I just realized that this has nothing to do with magic symlinks as such. It breaks just as nicely with plain ordinary symlinks.

Note #4: yes, I realize that even with the @machine magic symlink working, there may be other stumbling blocks around the corner.



Version: GnuPG v1.4.5 (Darwin)


Home | Main Index | Thread Index | Old Index