Explain checkLinker errors a bit more.

For an end user hitting these errors, the most likely reason is that
they have mixed up linker and crtbegin_dynamic.o from different builds
in their out tree.

Test: Build a linux_bionic executable in a tree exhibiting b/157549171.
Test: m nothing
Bug: 157549171
Change-Id: I64bee0848ed61226da6654caf3bafb51cf46d923
This commit is contained in:
Martin Stjernholm
2020-05-27 21:19:09 +01:00
parent 43527e1f31
commit 321bbe92b1

View File

@@ -105,7 +105,9 @@ func parseElf(r io.ReaderAt, linker *elf.File) (uint64, error) {
err = checkLinker(file, linker, symbols)
if err != nil {
return 0, err
return 0, fmt.Errorf("Linker executable failed verification against app embedded linker: %s\n"+
"linker might not be in sync with crtbegin_dynamic.o.",
err)
}
start, err := findSymbol(symbols, "_start")