Quoting Boris Samorodov <bsam_at_ipt.ru> (from Wed, 10 Jan 2007 00:42:49 +0300): > On Tue, 9 Jan 2007 22:01:53 +0100 Divacky Roman wrote: >> On Tue, Jan 09, 2007 at 11:57:08PM +0300, Boris Samorodov wrote: >> > On Tue, 09 Jan 2007 23:51:01 +0300 Boris Samorodov wrote: >> > >> > > for i in (linux,freebsd) do >> > > for y in (/usr,/usr/local,etc) do >> > >> > I ment if linux, use '/compat/linux + y' prefix. >> > >> > > find_a_library >> > > done >> > > done >> > >> > Hm, even if we can implement it, the (potential) problem with linux >> > ports installed to /usr/local remains... > >> how does this solve the problem? I might misunderstand whats going on > > All possible linux paths are searched fistly. 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 What you describe would require changing the linker to set a flag which let's the kernel know it has to search in the linux or in the FreeBSD path, and the linker has to search the complete path list twice. This is out of question. Another approach would be to teach the linker to not bail out on ELF ABI errors and continue searching the right lib. This would also need a change in the linker, but it is a change which the glibc people may accept (compared to the search twice and set a flag solution). This would not be an immediate solution, but after a while the new linker would hit every linux distribution and it would arrive in FreeBSD (yes, we can replace the linker with a self-made one, and this would be the solution in the mean time, but so far no such change is done in glibc). Anyone up to implement this and to convince the glibc people that it is a good idea to include this behavior in the runtime linker? Bye, Alexander. -- Computer Science is the only discipline in which we view adding a new wing to a building as being maintenance -- Jim Horning http://www.Leidinger.net Alexander _at_ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild _at_ FreeBSD.org : PGP ID = 72077137Received on Wed Jan 10 2007 - 05:53:21 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:04 UTC