[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/29819] ld testsuite of --version-script relies on -L optio
From: |
nickc at redhat dot com |
Subject: |
[Bug binutils/29819] ld testsuite of --version-script relies on -L option |
Date: |
Fri, 02 Dec 2022 10:23:01 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=29819
--- Comment #3 from Nick Clifton <nickc at redhat dot com> ---
(In reply to Martin Liska from comment #2)
> That means my example in comment 0 should fail because 'aaa.map' is in 'aaa'
> folder (sorry for the bad names) as -Laaa should be ignored when
> --version-script=aaa.map is searched. Or do I miss something?
I think that you have missed something. The command succeeds because the -Laaa
option lets the linker know that is should search for the aaa.map file in the
aaa directory.
Maybe this will help:
% strace ld [...] -Laaa [...] --version-script=aaa.map >& fred
% grep openat fred | grep aaa.map
openat(AT_FDCWD, "aaa.map", O_RDONLY) = -1 ENOENT (No such file or
directory)
openat(AT_FDCWD, "aaa/aaa.map", O_RDONLY) = 3
So the linker tries twice to find the aaa.map file. Once in the current
directory and then a second time in the aaa/ directory.
The --version-script option tells the linker the name of a version control file
that it should use. The -L option provides a directory location where the
linker might be able to find the file.
--
You are receiving this mail because:
You are on the CC list for the bug.