]> Cypherpunks repositories - gostls13.git/commit
[dev.cc] liblink: resolve bss vs other conflict regardless of order found
authorRuss Cox <rsc@golang.org>
Tue, 11 Nov 2014 06:28:26 +0000 (01:28 -0500)
committerRuss Cox <rsc@golang.org>
Tue, 11 Nov 2014 06:28:26 +0000 (01:28 -0500)
commit0185ba76edce85d2bc5d3da63091774039326dcd
tree740a591674795a917db5678de27c338c1577f1b2
parent729847cf8a8db1c5d64f64539be4f641985e613f
[dev.cc] liblink: resolve bss vs other conflict regardless of order found

If the linker finds the same name given a BSS and a non-BSS
symbol, the assumption is that the non-BSS symbol is the
true one, and the BSS symbol is just the best Go can do toward
an "extern" declaration. This has always been the case,
as long as the object files were read in the right order.

The old code worked when the BSS symbol is found before
the non-BSS symbol. This CL adds equivalent logic for when
the non-BSS symbol is found before the BSS symbol.
This comes up when Go must refer to symbols defined in
host object files.

LGTM=r
R=r
CC=austin, golang-codereviews, iant, khr
https://golang.org/cl/171480043
src/liblink/objfile.c