This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patches] Re: [PATCH 2/2] RISC-V: Merge ELF attribute for ld

Hi Jim:

> at the end, why are you passing ARCH_SIZE into riscv_arch_str?  Shouldn't that
> be the xlen_in or xlen_out value that we already parsed from the attributes?,
> the code doesn't require that xlen_in or xlen_out match ARCH_SIZE, maybe it
> should?

Yeah, I should add check xlen_in == xlen_out == ARCH_SIZE.

> PT_RISCV_ATTRIBUTES should be in the riscv-elf-psabi-doc pull request
> Do we really need PT_RISCV_ATTRIBUTES? The ARM port doesn't have one.  It
> doesn't appear that any other target has one either.  This seems unnecessary.

PT_RISCV_ATTRIBUTES was used in linux kernel for easier find attribute
section, it can just parse program header instead of section headers.

That's a mechanism to check ELF executable is safe to execute, however it was
not accepted by most other guys at Linux Plumbers Conference 2018[1],
so I'll remove that until community have consensus on that.

[1] Note for RISC-V micro conf:

> In the bfd ChangeLog entry, I'd suggest "New." instead of "New variable."
> because only the first three are variables, the rest are functions.
> I get 10 extra ld testsuite failures for riscv64-{elf,linux} targets.  It
> looks like the problem is the one I referred to earlier, where ARCH_SIZE is
> used instead of the xlen mentioned in the attributes.
> A more general question, do we want the attribute support enabled for linux
> targets?  It may be more of a distraction than a help there, as we don't
> expect that linux systems will support more than one type of processor.  At
> the moment the attribute support is enabled for linux targets.

Yeah, it sound a good suggestion, ELF attribute also don't consider ifunc yet,
so here is my plan:
1. Add a configure option --with-default-riscv-attribute=[yes|no|default]
to enable/disable default attribute (e.g. Tag_RISCV_arch).
2. Default enable for riscv*-*-elf target
3. Default disable for riscv*-*-linux* target

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]