mirror of
https://github.com/golang/go
synced 2024-11-21 21:14:47 -07:00
parent
ed01ceaf48
commit
f013fb96ac
@ -1107,8 +1107,10 @@ func elfshbits(linkmode LinkMode, sect *sym.Section) *ElfShdr {
|
||||
}
|
||||
sh.Addralign = uint64(sect.Align)
|
||||
sh.Size = sect.Length
|
||||
if sect.Name != ".tbss" {
|
||||
if sh.Type != uint32(elf.SHT_NOBITS) {
|
||||
sh.Off = sect.Seg.Fileoff + sect.Vaddr - sect.Seg.Vaddr
|
||||
} else {
|
||||
sh.Off = sect.Seg.Fileoff + sect.Seg.Filelen
|
||||
}
|
||||
|
||||
return sh
|
||||
|
Loading…
Reference in New Issue
Block a user