sync with OpenBSD -current
This commit is contained in:
parent
005bcb25db
commit
bd69b5651c
15 changed files with 217 additions and 133 deletions
|
@ -67,7 +67,9 @@ std::string lld::toString(const InputFile *f) {
|
|||
|
||||
// .gnu.warning.SYMBOL are treated as warning symbols for the given symbol
|
||||
void lld::parseGNUWarning(StringRef name, ArrayRef<char> data, size_t size) {
|
||||
static std::mutex mu;
|
||||
if (!name.empty() && name.startswith(".gnu.warning.")) {
|
||||
std::lock_guard<std::mutex> lock(mu);
|
||||
StringRef wsym = name.substr(13);
|
||||
StringRef s(data.begin());
|
||||
StringRef wng(s.substr(0, size));
|
||||
|
|
|
@ -792,6 +792,7 @@ void elf::reportUndefinedSymbols() {
|
|||
|
||||
static void reportGNUWarning(Symbol &sym, InputSectionBase &sec,
|
||||
uint64_t offset) {
|
||||
std::lock_guard<std::mutex> lock(relocMutex);
|
||||
if (sym.gwarn) {
|
||||
StringRef gnuWarning = gnuWarnings.lookup(sym.getName());
|
||||
// report first occurance only
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue