https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68626

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to john.frankish from comment #8)
> Ah...
> 
> $strace nm test.o
> ...
> lstat("/usr/local/bin/nm", {st_mode=S_IFLNK|0777, st_size=37, ...}) = 0
> readlink("/usr/local/bin/nm", "/tmp/tcloop/binutils/usr/local/b"..., 4095) =
> 37
> lstat("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=240, ...}) = 0
> lstat("/tmp/tcloop", {st_mode=S_IFDIR|0775, st_size=2660, ...}) = 0
> lstat("/tmp/tcloop/binutils", {st_mode=S_IFDIR|0755, st_size=26, ...}) = 0
> lstat("/tmp/tcloop/binutils/usr", {st_mode=S_IFDIR|0755, st_size=28, ...}) =
> 0
> lstat("/tmp/tcloop/binutils/usr/local", {st_mode=S_IFDIR|0755, st_size=85,
> ...}) = 0
> lstat("/tmp/tcloop/binutils/usr/local/bin", {st_mode=S_IFDIR|0755,
> st_size=228, ...}) = 0
> lstat("/tmp/tcloop/binutils/usr/local/bin/nm", {st_mode=S_IFREG|0755,
> st_size=37088, ...}) = 0
> openat(AT_FDCWD,
> "/tmp/tcloop/binutils/usr/local/bin/../bin/../lib/bfd-plugins",
> O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 ENOENT (No such file or
> directory)
> 
> $ sudo cp /tmp/tcloop/binutils/usr/local/bin/nm /usr/local/bin
> $ nm test.o
> 00000000 T f
> 
> Is that the expected result?
> 
> In this distro, packages are loop mounted squashfs symlinked to the root
> file system...

You need to install the linker script in relative to where binutils is
installed and not relative to where the symbol link is located.  So the correct
location for the linker script is in the
/tmp/tcloop/binutils/usr/local/bin/../bin/../lib/bfd-plugins directory.

Reply via email to