[PATCH] D95505: [yaml2obj] Initial support for 32-bit XCOFF in yaml2obj.
EsmeYi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 31 02:37:39 PDT 2021
Esme added inline comments.
================
Comment at: llvm/test/tools/yaml2obj/XCOFF/basic-doc.yaml:16
+ Relocations:
+ - Address: 0x3A
+ Type: 0x02
----------------
shchenz wrote:
> Esme wrote:
> > shchenz wrote:
> > > Is it ok that the relocation address is not in the range of `.data` section?
> > In general, yaml2obj will not report an error even though the user explicitly specifies an invalid values, which allows for things like error handling testing.
> >
> > Also after getting more familiar with yaml2obj, I think it's reasonable to set more fields to optional, and these omitted values will be filled in with the default zero or values derived from contents. So I set the relocation address optional now and 0 is the default value for it.
> >
> Do you mean we setting the address as `0x3A` on purpose? The address of the `.data` section is 0x8 and its size is 0x8, so if the relocation is valid, the address the relocation entry wants to resolve should be in 0x8 and 0x10.
I just set a random value, as this value isn't relevant for testing purposes here. Use a valid address now.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95505/new/
https://reviews.llvm.org/D95505
More information about the llvm-commits
mailing list