On 2013-03-06 12:25, Alexandre Julliard wrote: > Alexandre Julliard <julli...@winehq.org> writes: >> Tijl Coosemans <t...@coosemans.org> writes: >>> On 03-03-2013 17:44, André Hentschel wrote: >>>> You would rather call it PLATFORM_FREEBSD >>> >>> Well, the flag isn't FreeBSD specific. It works on all ELF targets >>> (including Linux which then wouldn't need prelink). >> >> Then it should be used by default, and you don't need to add a new >> platform for it. > > Actually, I looked into this and it isn't widely supported at all, so it > can't be the default. Ideally it would need a run-time check to see if > the option works.
Wouldn't a run-time check be too much of a performance hit? Loading a library at a specific address not only depends on the compile-time linker, but also on the run-time loader, so it's probably best to implement -image-base only on PLATFORM_* where the loader supports it. Since a target platform would then have to choose to use PLATFORM_ELF explicitly I think it's reasonable for PLATFORM_ELF to have a dependency on binutils>=2.20 (or compatible) rather than a run-time test for -Ttext-segment support.