diff options
| author | George Rimar <grimar@accesssoftek.com> | 2016-05-10 15:47:57 +0000 |
|---|---|---|
| committer | George Rimar <grimar@accesssoftek.com> | 2016-05-10 15:47:57 +0000 |
| commit | c191acf09769666ee5472e52fc29a2b831e0645b (patch) | |
| tree | 8cd4e73386815cf074c0b8fb6acfa097e069c726 /lld/ELF/OutputSections.h | |
| parent | de1ec037793fbbc44553c2bb45a3d9aa46bb2202 (diff) | |
| download | bcm5719-llvm-c191acf09769666ee5472e52fc29a2b831e0645b.tar.gz bcm5719-llvm-c191acf09769666ee5472e52fc29a2b831e0645b.zip | |
[ELF] - Implemented -z combrelocs/nocombreloc.
This is the option which sorts relocs to optimize dynamic linker performance.
-z combelocs is the default in gold, also it ignores -z nocombreloc,
this patch do the same.
Patch sorts relocations by symbols only and do not create any
DT_REL[A]COUNT entries. That is different with what gold/bfd do.
More information about option is here:
http://www.airs.com/blog/archives/186
http://people.redhat.com/jakub/prelink.pdf, p.2
Differential revision: http://reviews.llvm.org/D19528
llvm-svn: 269066
Diffstat (limited to 'lld/ELF/OutputSections.h')
| -rw-r--r-- | lld/ELF/OutputSections.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lld/ELF/OutputSections.h b/lld/ELF/OutputSections.h index d8c0e5b7484..b94f76588e6 100644 --- a/lld/ELF/OutputSections.h +++ b/lld/ELF/OutputSections.h @@ -274,7 +274,7 @@ class RelocationSection final : public OutputSectionBase<ELFT> { typedef typename ELFT::uint uintX_t; public: - RelocationSection(StringRef Name); + RelocationSection(StringRef Name, bool Sort); void addReloc(const DynamicReloc<ELFT> &Reloc); unsigned getRelocOffset(); void finalize() override; @@ -284,6 +284,7 @@ public: bool Static = false; private: + bool Sort; std::vector<DynamicReloc<ELFT>> Relocs; }; |

