• Ian Lance Taylor's avatar
    cmd/internal/obj, cmd/link: fix st_other field on PPC64 · 5331e7e9
    Ian Lance Taylor authored
    In PPC64 ELF files, the st_other field indicates the number of
    prologue instructions between the global and local entry points.
    We add the instructions in the compiler and assembler if -shared is used.
    We were assuming that the instructions were present when building a
    c-archive or PIE or doing dynamic linking, on the assumption that those
    are the cases where the go tool would be building with -shared.
    That assumption fails when using some other tool, such as Bazel,
    that does not necessarily use -shared in exactly the same way.
    
    This CL records in the object file whether a symbol was compiled
    with -shared (this will be the same for all symbols in a given compilation)
    and uses that information when setting the st_other field.
    
    Fixes #20290.
    
    Change-Id: Ib2b77e16aef38824871102e3c244fcf04a86c6ea
    Reviewed-on: https://go-review.googlesource.com/43051
    Run-TryBot: Ian Lance Taylor <iant@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarMichael Hudson-Doyle <michael.hudson@canonical.com>
    Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
    5331e7e9
Name
Last commit
Last update
..
errors Loading commit data...
fortran Loading commit data...
gmp Loading commit data...
life Loading commit data...
nocgo Loading commit data...
stdio Loading commit data...
test Loading commit data...
testasan Loading commit data...
testcarchive Loading commit data...
testcshared Loading commit data...
testgodefs Loading commit data...
testplugin Loading commit data...
testsanitizers Loading commit data...
testshared Loading commit data...
testsigfwd Loading commit data...
testso Loading commit data...
testsovar Loading commit data...
testtls Loading commit data...