summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Writer.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2015-12-25 07:01:09 +0000
committerRui Ueyama <ruiu@google.com>2015-12-25 07:01:09 +0000
commit89f4ec74c18586b3596b37672fec58afd5cea2c8 (patch)
tree76fa6e6e2a19f9d62c734ad8336aa4bc52968120 /lld/ELF/Writer.cpp
parent7d332f5eb7220cd75d5be53875ec99d55caa81df (diff)
downloadbcm5719-llvm-89f4ec74c18586b3596b37672fec58afd5cea2c8.tar.gz
bcm5719-llvm-89f4ec74c18586b3596b37672fec58afd5cea2c8.zip
Move a function to a file where it is used.
llvm-svn: 256410
Diffstat (limited to 'lld/ELF/Writer.cpp')
-rw-r--r--lld/ELF/Writer.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index 6bc6e6f1a6e..91ce5831600 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -604,6 +604,15 @@ template <class ELFT> static bool includeInSymtab(const SymbolBody &B) {
return true;
}
+static bool includeInDynamicSymtab(const SymbolBody &B) {
+ uint8_t V = B.getVisibility();
+ if (V != STV_DEFAULT && V != STV_PROTECTED)
+ return false;
+ if (Config->ExportDynamic || Config->Shared)
+ return true;
+ return B.isUsedInDynamicReloc();
+}
+
// Create output section objects and add them to OutputSections.
template <class ELFT> void Writer<ELFT>::createSections() {
// .interp needs to be on the first page in the output file.
OpenPOWER on IntegriCloud