sync ports with The Matrix

This commit is contained in:
purplerain 2023-09-08 05:21:37 +00:00
parent ec769495ab
commit f5034afcba
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
3108 changed files with 91999 additions and 80269 deletions

View file

@ -0,0 +1,15 @@
- Don't create IBT .plt if there are no PLT entries. Cherry picked from
upstream.
Index: lld/ELF/SyntheticSections.cpp
--- lld/ELF/SyntheticSections.cpp.orig
+++ lld/ELF/SyntheticSections.cpp
@@ -2729,6 +2729,8 @@ size_t IBTPltSection::getSize() const {
return 16 + in.plt->getNumEntries() * target->pltEntrySize;
}
+bool IBTPltSection::isNeeded() const { return in.plt->getNumEntries() > 0; }
+
// The string hash function for .gdb_index.
static uint32_t computeGdbHash(StringRef s) {
uint32_t h = 0;