[PATCH] D21745: [ELF] - Implemented --no-undefined-version flag
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 27 02:57:36 PDT 2016
grimar created this revision.
grimar added reviewers: ruiu, rafael.
grimar added subscribers: llvm-commits, grimar.
The GNU ld option --no-undefined-version is defined as follows:
Normally when a symbol has an undefined version, the linker will
ignore it. This option disallows symbols with undefined version
and a fatal error will be issued instead.
Description in not very clear in my opinion about what it should do.
Fortunately, Ian Lance Tailor leaved a message in binutils maillist
(https://sourceware.org/ml/binutils/2010-01/msg00092.html)
From there:
"what the option actually does is this:
For each version defined in a version script:
for each global symbol pattern in that version listed in the script:
if the pattern is a literal string--not a wildcard pattern:
if the pattern does not match any symbol defined in the link:
give an error.
In other words, the option does not check for symbols with undefined
versions. It checks for cases where a version script explicitly lists
a symbol, but the symbol is not defined."
Patch implements that behavior. This fixes PR27448.
http://reviews.llvm.org/D21745
Files:
ELF/Config.h
ELF/Driver.cpp
ELF/Options.td
ELF/SymbolTable.cpp
test/ELF/version-script-noundef.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21745.61950.patch
Type: text/x-patch
Size: 3691 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160627/4838906b/attachment.bin>
More information about the llvm-commits
mailing list