[PATCH] D81148: [MC] Fix DWARF forms for 64-bit DWARFv3 files [6/7]
Igor Kudrin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 8 03:46:47 PDT 2020
ikudrin added inline comments.
================
Comment at: llvm/test/MC/ELF/gen-dwarf64.s:18
# REL5-NEXT: R_X86_64_64 .debug_rnglists 0x14
# REL: Section ({{[0-9]+}}) .rela.debug_aranges {
# REL-NEXT: R_X86_64_64 .debug_info 0x0
----------------
jhenderson wrote:
> ikudrin wrote:
> > dblaikie wrote:
> > > ikudrin wrote:
> > > > MaskRay wrote:
> > > > > This `REL` can be `REL-NEXT` to prevent the accidental omission of `check-prefixes=REL,REL3`
> > > > There are other relocations for the `.debug_info` section which I did not want to check because they are irrelevant to the changes of these patches. So, I probably would not add the `-NEXT` suffix, if you do not mind.
> > > At least a "REL-NOT: }" to check that you haven't accidentally jumped into another section's relocations might be useful? But really that'd have to go between every one of these check lines.
> > >
> > > Perhaps llvm-readobj has flags that specify which sections to dump - and if you only dump the relocations for the sections you're interested in, then you could use an --implicit-check-not: Section, for instance - to ensure you didn't jump over any section headers.
> > You probably meant "REL-NOT: {", but that still would not have helped with missed `,REL3`.
> You could add a `REL: }` check to mark the end of the .rela.debug_info, which would allow for the next bit to be `REL-NEXT`, but that also wouldn't solve the problem.
>
> This sounds like one of those FileCheck gotchas, and I can't see much we can do in the test to avoid it in this case. You could maybe use something like `--implicit-check-not=.debug` to show that there are no relocations targeting debug sections in the output except for those explicitly checked, maybe?
That's a marvellous idea, thanks! I'll add `--implicit-check-not="R_{{.*}} .debug_"` to D81146 and D81148.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81148/new/
https://reviews.llvm.org/D81148
More information about the llvm-commits
mailing list