diff options
| author | Simon Atanasyan <simon@atanasyan.com> | 2015-07-03 11:25:37 +0000 |
|---|---|---|
| committer | Simon Atanasyan <simon@atanasyan.com> | 2015-07-03 11:25:37 +0000 |
| commit | a87c17a2019986614fea015288f4cea4b7b173aa (patch) | |
| tree | f4122facaffec7681d988f7d74988c40b3cd6040 /lld/lib/ReaderWriter/ELF/OutputELFWriter.h | |
| parent | cec93c355a7b2f1a6be436f233b043bd2632d4bd (diff) | |
| download | bcm5719-llvm-a87c17a2019986614fea015288f4cea4b7b173aa.tar.gz bcm5719-llvm-a87c17a2019986614fea015288f4cea4b7b173aa.zip | |
[ELF] Define __start_XXX/__stop_XXX symbols where XXX is a section name
This is GNU ELF linker extension used particularly by LibC code.
If input object files contain section named XXX, and the XXX is a valid C
identifier, and there are undefined or weak symbols __start_XXX/__stop_XXX,
linker should define __start_XXX/__stop_XXX symbols point to the begin/end
of the XXX section correspondingly.
For example, without support of this extension statically linked executables
for X86_64 and Mips (maybe other) targets do not flush IO buffers at the end
of executing.
llvm-svn: 241341
Diffstat (limited to 'lld/lib/ReaderWriter/ELF/OutputELFWriter.h')
| -rw-r--r-- | lld/lib/ReaderWriter/ELF/OutputELFWriter.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lld/lib/ReaderWriter/ELF/OutputELFWriter.h b/lld/lib/ReaderWriter/ELF/OutputELFWriter.h index c7909f5f75d..bb390101063 100644 --- a/lld/lib/ReaderWriter/ELF/OutputELFWriter.h +++ b/lld/lib/ReaderWriter/ELF/OutputELFWriter.h @@ -113,7 +113,7 @@ protected: /// \brief Process undefined symbols that left after resolution step. virtual void processUndefinedSymbol(StringRef symName, - RuntimeFile<ELFT> &file) const {} + RuntimeFile<ELFT> &file) const; /// \brief Assign addresses to atoms marking section's start and end. void updateScopeAtomValues(StringRef sym, StringRef sec); @@ -144,6 +144,7 @@ protected: private: static StringRef maybeGetSOName(Node *node); + void updateScopeAtomValues(StringRef start, StringRef end, StringRef sec); }; } // namespace elf |

