[PATCH] D83801: [MC] Pass the section to onSymbolStart() for more context

Ronak Chauhan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 15 00:47:23 PDT 2020


rochauha added a comment.

In D83801#2152551 <https://reviews.llvm.org/D83801#2152551>, @jhenderson wrote:

> In D83801#2152452 <https://reviews.llvm.org/D83801#2152452>, @rochauha wrote:
>
> > In D83801#2152421 <https://reviews.llvm.org/D83801#2152421>, @MaskRay wrote:
> >
> > > Can you demonstrate how you are going to use the new interface?
> >
> >
> > The note section in AMDGPU ELF objects contains metadata. But we need to know whether the section is note section to deal with it.
>
>
> I'm not sure I follow. Are you saying you need information from the note section to disassemble other sections? Or are you saying you need it to disassemble the note section? If the former, there's already code in the ELFDumper of llvm-readobj for parsing AMDGPU note sections, which you could reuse (it would need moving somewhere outside the llvm-readobj tool into one of the libraries, maybe in the ELFObjectFile stuff, I'm not sure). If the latter, there's still opposition to adding the functionality to the disassembler (the previous concerns haven't been addressed), given that llvm-readobj already provides this functionality.


There is AMDGPU metadata stored in the note section, which needs to be disassembled. The `SectionRef` passed here is just to check whether the section is a note section. There is no iterating over the note section.

This work doesn't fundamentally alter the the infrastructure. It just provides //additional context// to `onSymbolStart` (which some other target might probably find useful in the future too?).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83801/new/

https://reviews.llvm.org/D83801





More information about the llvm-commits mailing list