This is PR34852.
Looks gcc has a bug and produce R_386_GOTPC relocation in '.rel.debug_info':
Only i386 target and all gcc versions atm are affected it seems.
ld.bfd behavior is to silently resolve the relocation. Given the code we have, I think we can try to ignore it in LLD.
// GCC 8.0 or earlier have a bug that it emits R_386_GOTPC relocations against _GLOBAL_OFFSET_TABLE for .debug_info. The bug seems to have been fixed in 2017 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82630), but we need to keep this bug-compatible code for a while.
Also, you should be more explicit on what you are doing. Specifically, you should avoid calling getRelExpr.