Remove linking to unqualified library name

- SemanticTests accepts fully qualified library name and also unqualifed library name when
the library is defined in the same file for convenience.
- commandline tests are added!

Signed-off-by: soroosh-sdi <soroosh.sardari@gmail.com>
This commit is contained in:
soroosh-sdi
2021-10-20 18:11:58 +03:30
parent 1e630fc584
commit 816d8021e4
33 changed files with 242 additions and 64 deletions
-8
View File
@@ -73,14 +73,6 @@ LinkerObject::matchLibrary(
)
{
auto it = _libraryAddresses.find(_linkRefName);
if (it != _libraryAddresses.end())
return &it->second;
// If the user did not supply a fully qualified library name,
// try to match only the simple library name
size_t colon = _linkRefName.find(':');
if (colon == string::npos)
return nullptr;
it = _libraryAddresses.find(_linkRefName.substr(colon + 1));
if (it != _libraryAddresses.end())
return &it->second;
return nullptr;