On Tue, Feb 24, 2009 at 07:41:30PM +0000, Joseph S. Myers wrote:
>On Mon, 23 Feb 2009, Rob Landley wrote:
>
>> +config HARDWIRED_ABSPATH
>> +    string "Hardwire absolute paths into linker scripts"
>> +    default y
>> +    help
>> +      This prepends absolute paths to the libraries mentioned in linker
>> +      scripts such as libc.so.
>> +
>> +      This is a build time optimization.  It has no impact on dynamic
>> +      linking at runtime, which doesn't use linker scripts.
>> +
>> +      You must disable this to use uClibc with a relocatable toolchain,
>
>I don't think this is an adequate explanation of the option.
>
>My understanding is that with the option enabled the absolute paths 
>embedded will be ones based on RUNTIME_PREFIX (typically /) and 
>DEVEL_PREFIX (typically /usr), while the libraries are installed under 
>PREFIX (the path which gets relocated).  The compiler and linker will be 
>configured to find their sysroot at PREFIX and if the configured 
>--with-sysroot was a subdirectory of the configured --prefix then the 
>whole toolchain can be relocated and the sysroot will still be found.  
>Finally, when the linker is configured with a sysroot it will 
>automatically interpret a path such as /lib/whatever in a linker script as 
>meaning $sysroot/lib/whatever, and so the correct library will be found 
>based on the reference from the linker script.
>
>In summary, references to PREFIX in a linker script are what would cause 
>relocation problems, but references to RUNTIME_PREFIX and DEVEL_PREFIX do 
>not with a properly configured sysrooted toolchain, and this configure 
>option only affects references to RUNTIME_PREFIX and DEVEL_PREFIX; nothing 
>creates references to PREFIX.

This option is imo an inappropriate and dubious hack which is properly
solved via sysroot since a long time now, yes.

I build completely relocatable toolchains and they work just fine if
setup properly so i think that this patch is a bad idea.
_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to