I am working on adding LTO support to the new ELF lld.
In order to do that, it will be necessary to represent defined and undefined symbols that are not from ELF files. One way to do it is to change the symbol hierarchy to look like
Defined : SymbolBody
Undefined : SymbolBody
DefinedElf<ELFT> : Defined
UndefinedElf<ELFT> : Undefined
Another option would be to use bogus Elf_Sym, but I think that is getting a bit too hackish.
The attached patch does the Undefined/UndefinedElf. Split. The next one will do the Defined/DefinedElf split.