[llvm] [llvm-readobj][ELF] Fix broken JSON output with --dynamic-table (PR #95976)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 20 00:50:27 PDT 2024


================
@@ -138,6 +140,314 @@
 # GNU64-NEXT:  0x0000000076543210 (<unknown:>0x76543210) 0x5555666677778888
 # GNU64-NEXT:  0x0000000000000000 (NULL)                 0x0
 
+# JSON64:   "DynamicSection": [
----------------
jh7370 wrote:

```suggestion
#      JSON64:   "DynamicSection": [
```
Do this and you still get the output nicely lined up for ease of reading.

That being said, I'd expect no spaces before "DynamicSection". IIRC, `--strict-whitespace` doesn't check leading and trailing whitespace without `--match-full-lines`, so I'm not sure there's a huge amount of point to having the former without the latter in this context (note that this is what the other cases do too). I'm also not 100% sure if it matters or not really, but I don't think it hurts to check them.

https://github.com/llvm/llvm-project/pull/95976


More information about the llvm-commits mailing list