[PATCH] D72992: [llvm-objdump] - Add column headers for relocation printing

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 29 03:07:20 PST 2020


jhenderson added a comment.

Looks like all my comments have been addressed, but a couple of @grimar's are still outstanding.



================
Comment at: llvm/test/tools/llvm-objdump/relocations-elf.test:211
+  - Name: loc1
+  - Name: loc2
+  - Name:    glob1
----------------
grimar wrote:
> It seems enough to have one local and one global symbol here.
> (the binding does not affect the output anyways it seems).
I think you missed this comment?


================
Comment at: llvm/test/tools/llvm-objdump/relocations-elf.test:218
+  - Name:    glob2
+    Binding: STB_GLOBAL
----------------
grimar wrote:
> It is generally a good practice to minimize the YAML used.
> This one contains excessive parts.
> Also, we often format it to improve readability.
> 
> I think you can use something like this:
> 
> 
> ```
> --- !ELF
> FileHeader:
>   Class:   ELFCLASS32
>   Data:    ELFDATA2LSB
>   Type:    ET_REL
>   Machine: EM_386
> Sections:
> - Name: .text
>   Type: SHT_PROGBITS
> - Name: .rel.text
>   Type: SHT_REL
>   Info: .text
>   Relocations:
>     - Offset: 0x1
>       Symbol: global
>       Type:   R_386_PC32
>     - Offset: 0x2
>       Symbol: loc
>       Type:   R_386_32
> Symbols:
>   - Name:    loc
>   - Name:    global
>     Binding: STB_GLOBAL
> ```
I think you msised this?


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

https://reviews.llvm.org/D72992





More information about the llvm-commits mailing list