Vineet Gupta <vineetg@xxxxxxxxxxxx> writes:
This implements the elf loader hook to parse RV specificWhy does the kernel care?
.riscv.attributes section. This section is inserted by compilers
(gcc/llvm) with build related information such as -march organized as
tag/value attribute pairs.
It identifies the various attribute tags (and corresponding values) as
currently specified in the psABI specification.
This patch only implements the elf parsing mechanics, leaving out the
recording/usage of the attributes to subsequent patches.
Unless I am mistaken the kind of information you are describing is
typically dealt with by the dynamic linker, rather than the kernel.
As a general strategy I think it is smart to leave as much to
userspace and the dynamic linker and possible intead of asking
the kernel's elf loader to care.
That allows more rapid
prototyping and reduces the impact of parsing bugs.