Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Feb 2013 23:04:07 +0200
From:      Damjan Jovanovic <damjan.jov@gmail.com>
To:        Damjan Jovanovic <damjan.jov@gmail.com>, freebsd-emulation@freebsd.org,  freebsd-hackers@freebsd.org, tijl@coosemans.org
Subject:   Re: [patch] Wine DLL base address patches
Message-ID:  <CAJm2B-=4z5puUr0c96dNin-WOg3YhSTi4xsMY175j-jdXCHm3Q@mail.gmail.com>
In-Reply-To: <20130221213528.GD92116@felucia.tataz.chchile.org>
References:  <CAJm2B-mtXqZn0nQH4B9=fYik9gxSM8KAD5QcrLeqDOjXEnYfmg@mail.gmail.com> <20130221213528.GD92116@felucia.tataz.chchile.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Feb 21, 2013 at 11:35 PM, Jeremie Le Hen <jlh@freebsd.org> wrote:
> Hi Damjan,
>
> On Wed, Feb 20, 2013 at 05:29:01PM +0200, Damjan Jovanovic wrote:
>>
>> Wine needs some of its libraries to be loaded at specific base
>> addresses (https://wiki.freebsd.org/Wine), something FreeBSD currently
>> lacks.
>>
>> I've written a patch to the dynamic loader (/libexec/ld-elf.so.1) that
>> loads libraries at their preferred base addresses
>> (http://www.freebsd.org/cgi/query-pr.cgi?pr=176216), as well as a port
>> of Prelink to FreeBSD which Wine uses to set base addresses
>> (http://www.freebsd.org/cgi/query-pr.cgi?pr=176283). Both work :-),
>> the changed dynamic loader doesn't show any problems in a few days of
>> testing, and prelink works with the --reloc-only option as used by
>> Wine.
>
> Thanks for this work.
>
> Out of curiosity, did you try to run prelink on the whole base system?
> If yes, did you make any measurement of the performance improvement?
>
> Thank you!
> --
> Jeremie Le Hen
>
> Scientists say the world is made up of Protons, Neutrons and Electrons.
> They forgot to mention Morons.

I didn't, please let us know if you do.

IMO it would be a lot better to add -Bdirect support like Solaris has
(http://sourceware.org/ml/binutils/2005-10/msg00436.html), both for
better performance and because it works around ELF's moronic idea of
resolving symbols by searching for them in all libraries in the order
they were loaded, which easily causes memory corruption and crashes if
eg. 2 versions of a library are loaded into the same process.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJm2B-=4z5puUr0c96dNin-WOg3YhSTi4xsMY175j-jdXCHm3Q>