Skip to content

Commit d816f85

Browse files
committed
cmd/link/internal/loadelf: set AttrExternal on text section symbols
PPC64 processes external object relocations against the section symbols. This needs to be set correctly to determine the type of PLT stub to generate when both Go and External code make PLT calls. Change-Id: I5abdd5a0473866164083c33e80324dffcc1707f0 Reviewed-on: https://go-review.googlesource.com/c/go/+/488895 Reviewed-by: Than McIntosh <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Run-TryBot: Paul Murphy <[email protected]> Reviewed-by: Cherry Mui <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1 parent 39957b5 commit d816f85

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/cmd/link/internal/loadelf/ldelf.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,7 @@ func Load(l *loader.Loader, arch *sys.Arch, localSymVersion int, f *bio.Reader,
540540
}
541541
if sect.type_ == elf.SHT_PROGBITS {
542542
sb.SetData(sect.base[:sect.size])
543+
sb.SetExternal(true)
543544
}
544545

545546
sb.SetSize(int64(sect.size))

0 commit comments

Comments
 (0)