diff options
| author | Rui Ueyama <ruiu@google.com> | 2016-12-21 08:40:09 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2016-12-21 08:40:09 +0000 |
| commit | 4f2f50dc648028fb1e464ee94e5e040cccfc0cea (patch) | |
| tree | add814e03ae7dc487b60a46b17b424b6f9fbac7b /lld/ELF/Writer.cpp | |
| parent | 3b95157090110e8e9f41903ec2d04db372470b03 (diff) | |
| download | bcm5719-llvm-4f2f50dc648028fb1e464ee94e5e040cccfc0cea.tar.gz bcm5719-llvm-4f2f50dc648028fb1e464ee94e5e040cccfc0cea.zip | |
De-template DefinedSynthetic.
DefinedSynthetic is not created for a real ELF object, so it doesn't
have to be a template function. It has a virtual st_value, which is
either 32 bit or 64 bit, but we can simply use 64 bit.
llvm-svn: 290241
Diffstat (limited to 'lld/ELF/Writer.cpp')
| -rw-r--r-- | lld/ELF/Writer.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 491f4f7bcbe..2d8daad4f7d 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -1089,9 +1089,9 @@ template <class ELFT> void Writer<ELFT>::addPredefinedSections() { template <class ELFT> void Writer<ELFT>::addStartEndSymbols() { auto Define = [&](StringRef Start, StringRef End, OutputSectionBase *OS) { // These symbols resolve to the image base if the section does not exist. + // A special value -1 indicates end of the section. addOptionalSynthetic<ELFT>(Start, OS, 0); - addOptionalSynthetic<ELFT>(End, OS, - OS ? DefinedSynthetic<ELFT>::SectionEnd : 0); + addOptionalSynthetic<ELFT>(End, OS, OS ? -1 : 0); }; Define("__preinit_array_start", "__preinit_array_end", @@ -1114,8 +1114,7 @@ void Writer<ELFT>::addStartStopSymbols(OutputSectionBase *Sec) { if (!isValidCIdentifier(S)) return; addOptionalSynthetic<ELFT>(Saver.save("__start_" + S), Sec, 0, STV_DEFAULT); - addOptionalSynthetic<ELFT>(Saver.save("__stop_" + S), Sec, - DefinedSynthetic<ELFT>::SectionEnd, STV_DEFAULT); + addOptionalSynthetic<ELFT>(Saver.save("__stop_" + S), Sec, -1, STV_DEFAULT); } template <class ELFT> |

