I am unsure if we should add these asserts, so I am putting this up for discussions.
The impetus for this was https://github.com/JuliaLang/julia/pull/37842#issuecomment-706651005
IIUC we map many relocations to the symbol name "". (See https://github.com/llvm/llvm-project/blame/176249bd6732a8044d457092ed932768724a6f06/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp#L1199)
and https://github.com/llvm/llvm-project/blob/176249bd6732a8044d457092ed932768724a6f06/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp#L929 looks at GlobalSymbolTable to determine whether or not
this is an absolute relocation. If someone happens to insert a symbol that has a "" as the name, all the absolute relocations will now be treated wrong.
So my question is: We are using "" as a sentinel value for absolute relocations. Should we ensure that actually is a sentinel value, or is there a platform were "" is a valid symbol name,
and we should use a different sentinel, like the original NULL pointer?
For JuliaLang I am currently filterting out the wrong relocation, after I was unable to find the producer of it.