labath wrote:

> > Ok, I see now. It's an ld.bfd vs ld.lld thing. You probably have your clang 
> > configured to use lld. LLD does not put relocation addends into the data 
> > section (on both arm and intel). ld.bfd does, which is why this sort of 
> > happens to work there. Was your intention to test with LLD?
> 
> Yep, I run it with lld built together with clang and lldb. Should the 
> condition be narrowed to affect only builds with lld?

No, I think this is fine. I don't believe we have the ability to detect the 
linker used at the moment, and I'd like to avoid adding new dimensions to the 
test suite. Plus, the `PIE` flag captures the problem (that lldb depends on 
linker-specific relocation behavior, at least for ELF) these test expose fairly 
well. To fix this, we'd need to change ObjectFileELF::RelocateSection to 
relocate non-debug info sections as well. It may be worth linking these 
comments to a bug that provides more context.

It's possible this could break some targets (like android) that do not support 
building/running non-PIE executables, but if that happens, we should just get 
those targets to set the PIE flag.

https://github.com/llvm/llvm-project/pull/93808
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to