RFC: allow a first "=" to mean sysroot for all paths in linker-scripts?

Hans-Peter Nilsson hans-peter.nilsson@axis.com
Wed May 28 13:26:00 GMT 2014


Bump for the request for comments.
Also, tweaked bits in the TL;DR.

> From: Hans-Peter Nilsson <hp@axis.com>
> Date: Tue, 27 May 2014 04:32:30 +0200

> Is there a reason not to allow a first character '=' to mean
> sysroot-prefix for all paths inside linker scripts?  Today, it's
> interpreted that way for SEARCH_DIR, but elsewhere it's a syntax
> error.

(when not quoted)

>  GROUP ( /lib/libc.so.6 /lib/libc_nonshared.a  AS_NEEDED ( /lib/ld.so.1 ) )

(for those who didn't read the original post, the suggestion is to
allow "GROUP ( =/lib/libc.so.6 =/lib/libc_nonshared.a  AS_NEEDED ( =/lib/ld.so.1 ) )"
where the sysroot would be forced as opposed to "it depends".)

> For a non-sysrooted cross-toolchain you make the above line work
> by adjusting those paths manually in the installed script,
> prefixing with the installation prefix.

...but requires the sysroot be replicated within the sysroot
(e.g. by a parent-directory-chasing symlink) so your outermost
sysroot directory path component better not have a name-conflict
with a library. :)

brgds, H-P



More information about the Binutils mailing list