[llvm] [llvm-readobj][ELF] Fix broken JSON output with --dynamic-table (PR #95976)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 20 14:57:04 PDT 2024
================
@@ -138,6 +140,335 @@
# GNU64-NEXT: 0x0000000076543210 (<unknown:>0x76543210) 0x5555666677778888
# GNU64-NEXT: 0x0000000000000000 (NULL) 0x0
+# JSON64:"DynamicSection": [
+# JSON64-NEXT: {
+# JSON64-NEXT: "Tag": 1,
+# JSON64-NEXT: "Value": 1,
+# JSON64-NEXT: "Libraries": [
+# JSON64-NEXT: "D"
+# JSON64-NEXT: ],
+# JSON64-NEXT: "Type": "NEEDED"
+# JSON64-NEXT: },
+# JSON64-NEXT: {
+# JSON64-NEXT: "Tag": 2,
+# JSON64-NEXT: "Value": 16,
+# JSON64-NEXT: "Type": "PLTRELSZ"
+# JSON64-NEXT: },
+# JSON64-NEXT: {
+# JSON64-NEXT: "Tag": 3,
+# JSON64-NEXT: "Value": 4096,
+# JSON64-NEXT: "Type": "PLTGOT"
+# JSON64-NEXT: },
+# JSON64-NEXT: {
+# JSON64-NEXT: "Tag": 4,
+# JSON64-NEXT: "Value": 4096,
+# JSON64-NEXT: "Type": "HASH"
+# JSON64-NEXT: },
+# JSON64-NEXT: {
+# JSON64-NEXT: "Tag": 5,
+# JSON64-NEXT: "Value": 4096,
+# JSON64-NEXT: "Type": "STRTAB"
+# JSON64-NEXT: },
+# JSON64-NEXT: {
+# JSON64-NEXT: "Tag": 6,
+# JSON64-NEXT: "Value": 4096,
+# JSON64-NEXT: "Type": "SYMTAB"
+# JSON64-NEXT: },
+# JSON64-NEXT: {
+# JSON64-NEXT: "Tag": 7,
+# JSON64-NEXT: "Value": 4096,
+# JSON64-NEXT: "Type": "RELA"
+# JSON64-NEXT: },
+# JSON64-NEXT: {
+# JSON64-NEXT: "Tag": 8,
+# JSON64-NEXT: "Value": 16,
+# JSON64-NEXT: "Type": "RELASZ"
+# JSON64-NEXT: },
+# JSON64-NEXT: {
+# JSON64-NEXT: "Tag": 9,
+# JSON64-NEXT: "Value": 1929,
+# JSON64-NEXT: "Type": "RELAENT"
+# JSON64-NEXT: },
+# JSON64-NEXT: {
+# JSON64-NEXT: "Tag": 10,
+# JSON64-NEXT: "Value": 16,
+# JSON64-NEXT: "Type": "STRSZ"
+# JSON64-NEXT: },
+# JSON64-NEXT: {
+# JSON64-NEXT: "Tag": 11,
+# JSON64-NEXT: "Value": 2439,
+# JSON64-NEXT: "Type": "SYMENT"
+# JSON64-NEXT: },
+# JSON64-NEXT: {
+# JSON64-NEXT: "Tag": 12,
+# JSON64-NEXT: "Value": 4096,
+# JSON64-NEXT: "Type": "INIT"
+# JSON64-NEXT: },
+# JSON64-NEXT: {
+# JSON64-NEXT: "Tag": 13,
+# JSON64-NEXT: "Value": 4096,
+# JSON64-NEXT: "Type": "FINI"
+# JSON64-NEXT: },
+# JSON64-NEXT: {
+# JSON64-NEXT: "Tag": 14,
+# JSON64-NEXT: "Value": 3,
+# JSON64-NEXT: "Name": "U",
+# JSON64-NEXT: "Type": "SONAME"
+# JSON64-NEXT: },
+# JSON64-NEXT: {
+# JSON64-NEXT: "Tag": 15,
+# JSON64-NEXT: "Value": 5,
+# JSON64-NEXT: "Path": [
+# JSON64-NEXT: "f"
+# JSON64-NEXT: ],
+# JSON64-NEXT: "Type": "RPATH"
+# JSON64-NEXT: },
+# JSON64-NEXT: {
+# JSON64-NEXT: "Tag": 16,
+# JSON64-NEXT: "Value": 1311768467294899695,
+# JSON64-NEXT: "Type": "SYMBOLIC"
+# JSON64-NEXT: },
+# JSON64-NEXT: {
+# JSON64-NEXT: "Tag": 17,
+# JSON64-NEXT: "Value": 4096,
+# JSON64-NEXT: "Type": "REL"
+# JSON64-NEXT: },
+# JSON64-NEXT: {
+# JSON64-NEXT: "Tag": 18,
+# JSON64-NEXT: "Value": 16,
+# JSON64-NEXT: "Type": "RELSZ"
+# JSON64-NEXT: },
+# JSON64-NEXT: {
+# JSON64-NEXT: "Tag": 19,
+# JSON64-NEXT: "Value": 291,
+# JSON64-NEXT: "Type": "RELENT"
+# JSON64-NEXT: },
+# JSON64-NEXT: {
+# JSON64-NEXT: "Tag": 20,
+# JSON64-NEXT: "Value": 7,
+# JSON64-NEXT: "Type": "PLTREL"
+# JSON64-NEXT: },
+# JSON64-NEXT: {
+# JSON64-NEXT: "Tag": 21,
+# JSON64-NEXT: "Value": 18364757930599072545,
+# JSON64-NEXT: "Type": "DEBUG"
+# JSON64-NEXT: },
+# JSON64-NEXT: {
+# JSON64-NEXT: "Tag": 22,
+# JSON64-NEXT: "Value": 1234605616436508552,
+# JSON64-NEXT: "Type": "TEXTREL"
+# JSON64-NEXT: },
+# JSON64-NEXT: {
+# JSON64-NEXT: "Tag": 23,
+# JSON64-NEXT: "Value": 4096,
+# JSON64-NEXT: "Type": "JMPREL"
+# JSON64-NEXT: },
+# JSON64-NEXT: {
+# JSON64-NEXT: "Tag": 24,
+# JSON64-NEXT: "Value": 9833440827789222417,
+# JSON64-NEXT: "Type": "BIND_NOW"
+# JSON64-NEXT: },
+# JSON64-NEXT: {
+# JSON64-NEXT: "Tag": 25,
+# JSON64-NEXT: "Value": 4096,
+# JSON64-NEXT: "Type": "INIT_ARRAY"
+# JSON64-NEXT: },
+# JSON64-NEXT: {
+# JSON64-NEXT: "Tag": 26,
+# JSON64-NEXT: "Value": 4096,
+# JSON64-NEXT: "Type": "FINI_ARRAY"
+# JSON64-NEXT: },
+# JSON64-NEXT: {
+# JSON64-NEXT: "Tag": 27,
+# JSON64-NEXT: "Value": 16,
+# JSON64-NEXT: "Type": "INIT_ARRAYSZ"
+# JSON64-NEXT: },
+# JSON64-NEXT: {
+# JSON64-NEXT: "Tag": 28,
+# JSON64-NEXT: "Value": 16,
+# JSON64-NEXT: "Type": "FINI_ARRAYSZ"
+# JSON64-NEXT: },
+# JSON64-NEXT: {
+# JSON64-NEXT: "Tag": 29,
+# JSON64-NEXT: "Value": 7,
+# JSON64-NEXT: "Path": [
+# JSON64-NEXT: "w"
+# JSON64-NEXT: ],
+# JSON64-NEXT: "Type": "RUNPATH"
+# JSON64-NEXT: },
+# JSON64-NEXT: {
+# JSON64-NEXT: "Tag": 30,
+# JSON64-NEXT: "Value": 18446744073709551615,
+# JSON64-NEXT: "Flags": "ORIGIN SYMBOLIC TEXTREL BIND_NOW STATIC_TLS ",
----------------
MaskRay wrote:
trailing space may look strange
https://github.com/llvm/llvm-project/pull/95976
More information about the llvm-commits
mailing list