mirror of
https://github.com/golang/go
synced 2024-09-30 08:38:40 -06:00
cmd/link: don't warn about unnamed symbols in .debug_str section
They reportedly occur with LLVM 3.7 on FreeBSD ARM. Fixes #13139. Change-Id: Ia7d053a8662696b1984e81fbd1d908c951c35a98 Reviewed-on: https://go-review.googlesource.com/16667 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Minux Ma <minux@golang.org>
This commit is contained in:
parent
e3b615fd6c
commit
26263354a3
@ -765,6 +765,13 @@ func ldelf(f *obj.Biobuf, pkg string, length int64, pn string) {
|
||||
if strings.HasPrefix(sym.name, ".Linfo_string") { // clang does this
|
||||
continue
|
||||
}
|
||||
|
||||
if sym.name == "" && sym.type_ == 0 && sect.name == ".debug_str" {
|
||||
// This reportedly happens with clang 3.7 on ARM.
|
||||
// See issue 13139.
|
||||
continue
|
||||
}
|
||||
|
||||
Diag("%s: sym#%d: ignoring %s in section %d (type %d)", pn, i, sym.name, sym.shndx, sym.type_)
|
||||
continue
|
||||
}
|
||||
|
@ -1807,7 +1807,7 @@ func genasmsym(put func(*LSym, string, int, int64, int64, int, *LSym)) {
|
||||
}
|
||||
|
||||
for s := Ctxt.Allsym; s != nil; s = s.Allsym {
|
||||
if s.Hide != 0 || (s.Name[0] == '.' && s.Version == 0 && s.Name != ".rathole") {
|
||||
if s.Hide != 0 || ((s.Name == "" || s.Name[0] == '.') && s.Version == 0 && s.Name != ".rathole") {
|
||||
continue
|
||||
}
|
||||
switch s.Type & obj.SMASK {
|
||||
|
Loading…
Reference in New Issue
Block a user