summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Driver.cpp
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2016-03-11 10:07:18 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2016-03-11 10:07:18 +0000
commit56e0d53e922ac1bae2354ec037edbbfbbf7419f5 (patch)
tree44fdceca268fe1e761e50e679df7d55dded2fbfc /lld/ELF/Driver.cpp
parent0ca63ab54499a143abbb90c6220960ea07f9e3d4 (diff)
downloadbcm5719-llvm-56e0d53e922ac1bae2354ec037edbbfbbf7419f5.tar.gz
bcm5719-llvm-56e0d53e922ac1bae2354ec037edbbfbbf7419f5.zip
[ELF] - Move initSymbols() to Driver.cpp. NFC.
That is followup for http://reviews.llvm.org/D18047 patch. initSymbols() moved to Driver.cpp and made static. llvm-svn: 263214
Diffstat (limited to 'lld/ELF/Driver.cpp')
-rw-r--r--lld/ELF/Driver.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp
index 064938abaaa..a010b399f2c 100644
--- a/lld/ELF/Driver.cpp
+++ b/lld/ELF/Driver.cpp
@@ -315,6 +315,14 @@ void LinkerDriver::createFiles(opt::InputArgList &Args) {
error("No input files");
}
+template <class ELFT> static void initSymbols() {
+ ElfSym<ELFT>::Etext.setBinding(STB_GLOBAL);
+ ElfSym<ELFT>::Edata.setBinding(STB_GLOBAL);
+ ElfSym<ELFT>::End.setBinding(STB_GLOBAL);
+ ElfSym<ELFT>::Ignored.setBinding(STB_WEAK);
+ ElfSym<ELFT>::Ignored.setVisibility(STV_HIDDEN);
+}
+
template <class ELFT> void LinkerDriver::link(opt::InputArgList &Args) {
initSymbols<ELFT>();
// For LTO
OpenPOWER on IntegriCloud