sync ports with The Matrix
This commit is contained in:
parent
ec769495ab
commit
f5034afcba
3108 changed files with 91999 additions and 80269 deletions
31
devel/llvm/16/patches/patch-lld_ELF_Relocations_cpp
Normal file
31
devel/llvm/16/patches/patch-lld_ELF_Relocations_cpp
Normal file
|
@ -0,0 +1,31 @@
|
|||
Index: lld/ELF/Relocations.cpp
|
||||
--- lld/ELF/Relocations.cpp.orig
|
||||
+++ lld/ELF/Relocations.cpp
|
||||
@@ -790,6 +790,18 @@ void elf::reportUndefinedSymbols() {
|
||||
undefs.clear();
|
||||
}
|
||||
|
||||
+static void reportGNUWarning(Symbol &sym, InputSectionBase &sec,
|
||||
+ uint64_t offset) {
|
||||
+ if (sym.gwarn) {
|
||||
+ StringRef gnuWarning = gnuWarnings.lookup(sym.getName());
|
||||
+ // report first occurance only
|
||||
+ sym.gwarn = false;
|
||||
+ if (!gnuWarning.empty())
|
||||
+ message(sec.getSrcMsg(sym, offset) + "(" + sec.getObjMsg(offset) +
|
||||
+ "): warning: " + gnuWarning);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
// Report an undefined symbol if necessary.
|
||||
// Returns true if the undefined symbol will produce an error message.
|
||||
static bool maybeReportUndefined(Undefined &sym, InputSectionBase &sec,
|
||||
@@ -1351,6 +1363,8 @@ template <class ELFT, class RelTy> void RelocationScan
|
||||
uint64_t offset = getter.get(rel.r_offset);
|
||||
if (offset == uint64_t(-1))
|
||||
return;
|
||||
+
|
||||
+ reportGNUWarning(sym, *sec, rel.r_offset);
|
||||
|
||||
RelExpr expr = target->getRelExpr(type, sym, sec->content().data() + offset);
|
||||
int64_t addend = RelTy::IsRela
|
Loading…
Add table
Add a link
Reference in a new issue