[llvm-dev] [RFC] better link error messages

Jonathan Roelofs via llvm-dev
Wed, 29 Mar 2017 19:12:07 -0000

On 3/29/17 12:53 PM, Rui Ueyama via llvm-dev wrote:
> Put it all together, the following error messages should work for
> everybody. I'll create a patch to make this change and send it for
> review. Thank you guys for the inputs!
>
>
> Undefined symbol error:
>
> bin/ld.lld: error: undefined symbol:
>
lld::elf::EhFrameSection<llvm::object::ELFType<(llvm::support::endianness)0,
> true>
> *>>> defined at* Writer.cpp:207
(/ssd/llvm-project/lld/ELF/Writer.cpp:207)
> *>>>*            Writer.cpp.o in archive lib/liblldELF.a

The wording of this one is mildly self contradictory. Undefined symbols
aren't defined, they're... used? referenced?


Jon

>
>
> Duplicate symbol error:
>
> bin/ld.lld: error: duplicate symbol:
> lld::elf::MipsGotSection::addEntry(lld::elf::SymbolBody&, long,
> lld::elf::RelExpr)
> *>>> defined at* Writer.cpp:38
>
(/home/buildslave/buildslave/clang-cmake-aarch64-39vma/llvm/tools/lld/ELF/Writer.cpp:38)
> *>>>*            Writer.cpp.o in archive lib/liblldELF.a
> *>>> defined at* SyntheticSections.cpp:673
>
(/home/buildslave/buildslave/clang-cmake-aarch64-39vma/llvm/tools/lld/ELF/SyntheticSections.cpp:673)
> *>>>*            SyntheticSections.cpp.o in archive
lib/liblldELF.a
>
>


--
Jon Roelofs
jonathan at codesourcery.com
CodeSourcery / Mentor Embedded