projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
96cf00d
)
Add a comment about ELF spec and the symbol table's sh_info.
author
Rui Ueyama
<ruiu@google.com>
Thu, 15 Mar 2018 17:10:50 +0000
(17:10 +0000)
committer
Rui Ueyama
<ruiu@google.com>
Thu, 15 Mar 2018 17:10:50 +0000
(17:10 +0000)
llvm-svn: 327645
lld/ELF/InputFiles.cpp
patch
|
blob
|
history
diff --git
a/lld/ELF/InputFiles.cpp
b/lld/ELF/InputFiles.cpp
index
1aa60f7
..
d69a40c
100644
(file)
--- a/
lld/ELF/InputFiles.cpp
+++ b/
lld/ELF/InputFiles.cpp
@@
-866,6
+866,10
@@
template <class ELFT> void SharedFile<ELFT>::parseRest() {
continue;
}
+ // ELF spec requires that all local symbols precede weak or global
+ // symbols in each symbol table, and the index of first non-local symbol
+ // is stored to sh_info. If a local symbol appears after some non-local
+ // symbol, that's a violation of the spec.
if (Sym.getBinding() == STB_LOCAL) {
warn("found local symbol '" + Name +
"' in global part of symbol table in file " + toString(this));