[lfs-support] can't set dynamic linker in step 6.9

Dave H thegenrlftw at gmail.com
Thu Jan 26 00:00:13 PST 2012


Hi again,

At the stage to change the dynamic linker but for some reason,
cut/pasting didn't seem to work:
=======================================================================
root:/sources/glibc-2.14.1# DL=$(readelf -l /bin/sh | sed -n
's at .*interpret.*/tools\(.*\)]$@\1 at p')
bash: command substitution: line 47: syntax error near unexpected token `)'
bash: command substitution: line 47: `readelf -l /bin/sh | sed -n
's at .*interpret.*/tools\(.*\)]$@\1 at p')'
=======================================================================

So I did this and it appeared to set $DL:
=======================================================================
root:/sources/glibc-2.14.1# readelf -l /bin/sh | sed -n
's at .*interpret.*/tools\(.*\)]$@\1 at p'
/lib64/ld-linux-x86-64.so.2
root:/sources/glibc-2.14.1# DL=/lib64/ld-linux-x86-64.so.2
root:/sources/glibc-2.14.1# echo $DL
/lib64/ld-linux-x86-64.so.2
=======================================================================

However, I don't think it did anything:
=======================================================================
root:/sources/glibc-2.14.1# sed -i "s|libs -o|libs -L/usr/lib
-Wl,-dynamic-linker=$DL -o|" \
> scripts/test-installation.pl
root:/sources/glibc-2.14.1# cat scripts/test-installation.pl | grep
dynamic-linker*
open GCC, "$CC /tmp/test-prg$$.c $link_libs -L/usr/lib
-Wl,-dynamic-linker= -o /tmp/test-prg$$ 2>&1 |"
=======================================================================

Shouldn't
     -dynamic-linker=
now be
     -dynamic-linker=/lib64/ld-linux-x86-64.so.2
?

Thanks again for your time.  I'd be back 2 chapters still if it wern't
for you guys.

Dave



More information about the lfs-support mailing list