On Tue, Sep 16, 2025 at 9:27 AM William Roberts
<
bill.c....@gmail.com> wrote:
>
> Thanks again Cherry, your responses have been very helpful in
> clarifying the linking process. I have one, hopefully final, question.
> With all these objects hanging around in the cache, is there a
> possibility that changes introduced into the tool chain could be
> linked against incompatible objects from a previous version of the
> tool chain?
>
> For instance, since this was all predicated on me looking at BTI
> support, is there a possibility that an object built without BTI
> support could be linked with an object with BTI support?
That can't happen for changes in the Go toolchain. For the C toolchain
part of the cache key for a package that uses cgo includes the C
compiler version number. So if you update the C toolchain _and change
version numbers_ then there won't be any problems, as all cgo packages
will be rebuilt. Also the flags passed to the C compiler are part of
the hash. But if you reconfigure the C toolchain in some way without
changing the version number or changing the flags that you pass, then,
yes, it is possible for there to be inconsistencies.
Ian