https://github.com/DavidSpickett commented:

My understanding:
* The ELF describes which extensions it is using.
* As the LLDB being used may not be linked with an LLVM that understands them 
all, we have an allowlist of features we will read from the ELF.

And now I'm wondering what happens when there's a mismatch and whether we can 
check at build time whether llvm MC knows about the extension?

Anyway, continuing:
* This is added to whatever the default feature list is, which is nothing for 
riscv.
* User features either provided by `-Y` or the target feature setting are then 
added to this.
* In the case of the user disabling a feature, that wins over anything else.

As someone who handles 0 RISC-V binaries, this makes sense at a high level.

My main worries are:
* The semantics of the user enabling and disabling and potentially enabling 
**again** a feature. I'd prefer it matched llvm-mc -mattr, but maybe that is 
not user friendly in this case.
* How we manage the fact that we don't want to add features the linked llvm 
doesn't know about, and making sure that it does in fact know about features 
that we **assume** that it knows about.



https://github.com/llvm/llvm-project/pull/147990
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to