As described in riscv-elf-psabi, some attributes in risc-v have been deprecated.
The relevant link is: https://github.com/riscv-non-isa/riscv-elf-psabi-doc/commit/1b197a9f480ebc37835f8ef101a584e8a51fbe23
Details
- Reviewers
jhenderson MaskRay
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
These are deprecated, not removed. lld needs to handle old object files with these attributes. The integrated assembler needs to support the syntax in case there are files using these directives.
I think we can only remove them when the compatibility with these object files/assembly files are deemed unnecessary. I am not sure when we claim to do that.
Okay, I understand what you mean. To be compatible with old elf files, these attributes in risc-v cannot be removed at this time. Perhaps one day in the future, we need to do this work.
This is my first llvm patch, and there will be other patches in the future.
Thank you, Professor Song's comment.
By the way, I am your fan. It's really surprising to have a conversation with you in this way.
Updating D158575: [RISCV] Delete deprecated attributes
I think this patch should be abandoned. We need test coverage for the assembler and the linker. When I added the support to lld/ELF, I intentionally kept the deprecated cases
// Attributes which use the default handling. case RISCVAttrs::PRIV_SPEC: case RISCVAttrs::PRIV_SPEC_MINOR: case RISCVAttrs::PRIV_SPEC_REVISION:
to make it clear we need to support object files using them.