[PATCH] D66291: [test/Object] - Move/rewrite 2 more test cases.
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 15 09:09:02 PDT 2019
jhenderson added inline comments.
================
Comment at: test/tools/llvm-objdump/relocations-in-nonreloc.test:25
+ Type: SHT_RELA
+ Flags: [ SHF_ALLOC, SHF_INFO_LINK ]
+ Relocations:
----------------
I don't think SHF_INFO_LINK is needed in any of these inputs.
================
Comment at: test/tools/llvm-objdump/relocations-in-nonreloc.test:29
+ Type: R_X86_64_IRELATIVE
+ Addend: 0
+
----------------
MaskRay wrote:
> Nit: non-zero r_offset & r_addend for IRELATIVE will be more realistic. At runtime, image_base + r_addend will be called as a function. r_addend should be non-zero.
I don't think we need this test to be particularly realistic. It just needs to have a relocation in it (I say R_X86_64_NONE to show it's suitably arbitrary), and show whether or not that relocation is printed.
================
Comment at: test/tools/llvm-readobj/elf-reloc-no-sym.test:19
+ Machine: EM_X86_64
+ Entry: 0x0000000000400140
+Sections:
----------------
Entry address isn't significant to this test.
================
Comment at: test/tools/llvm-readobj/elf-reloc-no-sym.test:23
+ Type: SHT_RELA
+ Flags: [ SHF_ALLOC, SHF_INFO_LINK ]
+ Relocations:
----------------
I don't think SHF_INFO_LINK is needed.
================
Comment at: test/tools/llvm-readobj/elf-reloc-no-sym.test:25-27
+ - Offset: 0x00000000004011D8
+ Type: R_X86_64_IRELATIVE
+ Addend: 4194592
----------------
I'd just simplify this. The numbers look like they're significant in some way, when really they can just be arbitrary (e.g. 0x12345678 would be more clearly arbitrary, I think).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66291/new/
https://reviews.llvm.org/D66291
More information about the llvm-commits
mailing list