I am trying to compile a project on an aws t4g instance (arm graviton), and everything compiles, except a unit tests project, which dies with the following:
"internal error in update_erratum_insn, at ../../gold/aarch64.cc:1005"
ld.gold --version
GNU gold (GNU Binutils for Ubuntu 2.38) 1.16
I downloaded the ld.gold source, and the dying assert is:
gold_assert(Insn_utilities::aarch64_rd(insn) == Insn_utilities::aarch64_rd(this->erratum_insn()));
I have no idea what this means, and was unable to google it.
I compile an "usual" google test file, containing 5 tests. If I do even as much as replacing an ASSERT_EQ(a, b) with ASSERT_EQ(true, a == b) or ASSERT_TRUE(a == b), where a and b are int64_t. Delete any test, add any new test. Basically do anything that does not result in exactly the same code. So I can't write an example code. The same linking (and running) works with ld instead of ld.gold
What is the meaning of this assert?
Could this be a linker bug?