[PATCH 0/2] RISC-V: Fix the conflicting priv spec problems

Nelson Chu nelson.chu@sifive.com
Fri Jun 5 05:41:19 GMT 2020


On Fri, Jun 5, 2020 at 6:23 AM Palmer Dabbelt <palmer@dabbelt.com> wrote:
> These fix the obvious problem, so consider them approved,

Thank you very much :)

> Specifically, I don't think it's reasonable to expect
> the linker to be able to determine whether or not objects that are built for
> different version of the privelege spec are compatible with each other.  At any rate
> minimum we'd need a way to force linking, but I think we should start by just
> annotating

Kito had discussed with me that we might need a linker option to
choose the link compatibility levels.  And supporting three levels
might be enough,

-Wl,--link-attrs-mode=[strict? median? loose?]
* Strict: the linked objects must have the same privilege version.
* Median: Allow compatibility, but consider all conflicts  when we
link objects with different versions of specs.
* Loose: Force to link all objects without checking attrs.  Users must
be responsible when they use this option.
(The naming is just temporary.)

> Presumably the other priv instructions should also be triggering the attribute?

Thanks for the reminder.  This looks good.  I will add it in the future patches.

Nelson


More information about the Binutils mailing list