diff --git a/format/all/all.fqtest b/format/all/all.fqtest index 5ff06185b..301dec3b9 100644 --- a/format/all/all.fqtest +++ b/format/all/all.fqtest @@ -16,6 +16,7 @@ $ fq -n _registry.groups.probe "pcap", "pcapng", "png", + "sqlite3", "tar", "tiff", "webp", diff --git a/format/all/all.go b/format/all/all.go index 2d6d01d46..ef0c090c3 100644 --- a/format/all/all.go +++ b/format/all/all.go @@ -34,6 +34,7 @@ import ( _ "github.com/wader/fq/format/png" _ "github.com/wader/fq/format/protobuf" _ "github.com/wader/fq/format/raw" + _ "github.com/wader/fq/format/sqlite3" _ "github.com/wader/fq/format/tar" _ "github.com/wader/fq/format/tiff" _ "github.com/wader/fq/format/vorbis" diff --git a/format/dns/testdata/cern-rsp.fqtest b/format/dns/testdata/cern-rsp.fqtest index d391d2fa6..6906a791f 100644 --- a/format/dns/testdata/cern-rsp.fqtest +++ b/format/dns/testdata/cern-rsp.fqtest @@ -52,20 +52,20 @@ $ fq -d dns dv /cern-rsp | | | value: "www.cern.ch" 0x19-NA (0) | | | cname{}: 0x10-0x33.7 (36) | | | labels[0:4]: 0x10-0x33.7 (36) - | | | [0]{}: label 0x10-0x33.7 (36) + | | | [0]{}: label 0x29-0x31.7 (9) +0x20| 08 | . | length: 8 0x29-0x29.7 (1) +0x20| 77 65 62 72 6c 62| webrlb| value: "webrlb02" 0x2a-0x31.7 (8) +0x30|30 32 |02 | + | | | [1]{}: label 0x10-0x33.7 (36) 0x10|04 |. | length: 4 0x10-0x10.7 (1) 0x10| 63 65 72 6e | cern | value: "cern" 0x11-0x14.7 (4) 0x30| c0 | . | is_pointer: 3 0x32-0x32.1 (0.2) 0x30| c0 10 | .. | pointer: 16 0x32.2-0x33.7 (1.6) - | | | [1]{}: label 0x15-0x17.7 (3) + | | | [2]{}: label 0x15-0x17.7 (3) 0x10| 02 | . | length: 2 0x15-0x15.7 (1) 0x10| 63 68 | ch | value: "ch" 0x16-0x17.7 (2) - | | | [2]{}: label 0x18-0x18.7 (1) + | | | [3]{}: label 0x18-0x18.7 (1) 0x10| 00 | . | length: 0 0x18-0x18.7 (1) - | | | [3]{}: label 0x29-0x31.7 (9) -0x20| 08 | . | length: 8 0x29-0x29.7 (1) -0x20| 77 65 62 72 6c 62| webrlb| value: "webrlb02" 0x2a-0x31.7 (8) -0x30|30 32 |02 | | | | value: "webrlb02.cern.ch" 0x19-NA (0) 0x10| 00| .| type: "CNAME" (5) 0x1f-0x20.7 (2) 0x20|05 |. | @@ -75,22 +75,22 @@ $ fq -d dns dv /cern-rsp | | | [1]{}: answer 0x10-0x4f.7 (64) | | | name{}: 0x10-0x35.7 (38) | | | labels[0:4]: 0x10-0x35.7 (38) - | | | [0]{}: label 0x10-0x33.7 (36) + | | | [0]{}: label 0x29-0x35.7 (13) +0x20| 08 | . | length: 8 0x29-0x29.7 (1) +0x20| 77 65 62 72 6c 62| webrlb| value: "webrlb02" 0x2a-0x31.7 (8) +0x30|30 32 |02 | +0x30| c0 | . | is_pointer: 3 0x34-0x34.1 (0.2) +0x30| c0 29 | .) | pointer: 41 0x34.2-0x35.7 (1.6) + | | | [1]{}: label 0x10-0x33.7 (36) 0x10|04 |. | length: 4 0x10-0x10.7 (1) 0x10| 63 65 72 6e | cern | value: "cern" 0x11-0x14.7 (4) 0x30| c0 | . | is_pointer: 3 0x32-0x32.1 (0.2) 0x30| c0 10 | .. | pointer: 16 0x32.2-0x33.7 (1.6) - | | | [1]{}: label 0x15-0x17.7 (3) + | | | [2]{}: label 0x15-0x17.7 (3) 0x10| 02 | . | length: 2 0x15-0x15.7 (1) 0x10| 63 68 | ch | value: "ch" 0x16-0x17.7 (2) - | | | [2]{}: label 0x18-0x18.7 (1) + | | | [3]{}: label 0x18-0x18.7 (1) 0x10| 00 | . | length: 0 0x18-0x18.7 (1) - | | | [3]{}: label 0x29-0x35.7 (13) -0x20| 08 | . | length: 8 0x29-0x29.7 (1) -0x20| 77 65 62 72 6c 62| webrlb| value: "webrlb02" 0x2a-0x31.7 (8) -0x30|30 32 |02 | -0x30| c0 | . | is_pointer: 3 0x34-0x34.1 (0.2) -0x30| c0 29 | .) | pointer: 41 0x34.2-0x35.7 (1.6) | | | value: "webrlb02.cern.ch" 0x19-NA (0) 0x30| 00 1c | .. | type: "AAAA" (28) 0x36-0x37.7 (2) 0x30| 00 01 | .. | class: "IN" (1) (Internet) 0x38-0x39.7 (2) diff --git a/format/elf/testdata/linux_386/a_dynamic.fqtest b/format/elf/testdata/linux_386/a_dynamic.fqtest index 7a22394bc..047ca02de 100644 --- a/format/elf/testdata/linux_386/a_dynamic.fqtest +++ b/format/elf/testdata/linux_386/a_dynamic.fqtest @@ -23,40 +23,7 @@ $ fq -d elf dv a_dynamic 0x0030|22 00 |". | shnum: 34 0x30-0x31.7 (2) 0x0030| 21 00 | !. | shstrndx: 33 0x32-0x33.7 (2) | | | program_headers[0:12]: 0x0-0x3003.7 (12292) - | | | [0]{}: program_header 0x0-0x3f3.7 (1012) - | | | program_header{}: 0x0-0x3f3.7 (1012) -0x0000|7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00|.ELF............| data: raw bits 0x0-0x3f3.7 (1012) -* |until 0x3f3.7 (1012) | | -0x0070| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x74-0x77.7 (4) -0x0070| 00 00 00 00 | .... | offset: 0x0 0x78-0x7b.7 (4) -0x0070| 00 00 00 00| ....| vaddr: 0x0 0x7c-0x7f.7 (4) -0x0080|00 00 00 00 |.... | paddr: 0x0 0x80-0x83.7 (4) -0x0080| f4 03 00 00 | .... | filesz: 1012 0x84-0x87.7 (4) -0x0080| f4 03 00 00 | .... | memsz: 1012 0x88-0x8b.7 (4) - | | | flags{}: 0x8c-0x8f.7 (4) -0x0080| 04 | . | unused0: 0 0x8c-0x8c.4 (0.5) -0x0080| 04 | . | r: true 0x8c.5-0x8c.5 (0.1) -0x0080| 04 | . | w: false 0x8c.6-0x8c.6 (0.1) -0x0080| 04 | . | x: false 0x8c.7-0x8c.7 (0.1) -0x0080| 00 00 00| ...| unused1: 0 0x8d-0x8f.7 (3) -0x0090|00 10 00 00 |.... | align: 4096 0x90-0x93.7 (4) - | | | [1]{}: program_header 0x0-0x193.7 (404) - | | | program_header{}: 0x0-0x193.7 (404) - | | | data: raw bits 0x0-NA (0) -0x0170| 51 e5 74 64 | Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0x174-0x177.7 (4) -0x0170| 00 00 00 00 | .... | offset: 0x0 0x178-0x17b.7 (4) -0x0170| 00 00 00 00| ....| vaddr: 0x0 0x17c-0x17f.7 (4) -0x0180|00 00 00 00 |.... | paddr: 0x0 0x180-0x183.7 (4) -0x0180| 00 00 00 00 | .... | filesz: 0 0x184-0x187.7 (4) -0x0180| 00 00 00 00 | .... | memsz: 0 0x188-0x18b.7 (4) - | | | flags{}: 0x18c-0x18f.7 (4) -0x0180| 06 | . | unused0: 0 0x18c-0x18c.4 (0.5) -0x0180| 06 | . | r: true 0x18c.5-0x18c.5 (0.1) -0x0180| 06 | . | w: true 0x18c.6-0x18c.6 (0.1) -0x0180| 06 | . | x: false 0x18c.7-0x18c.7 (0.1) -0x0180| 00 00 00| ...| unused1: 0 0x18d-0x18f.7 (3) -0x0190|10 00 00 00 |.... | align: 16 0x190-0x193.7 (4) - | | | [2]{}: program_header 0x34-0x1b3.7 (384) + | | | [0]{}: program_header 0x34-0x1b3.7 (384) | | | program_header{}: 0x34-0x1b3.7 (384) 0x0030| 06 00 00 00 | .... | type: "phdr" (6) (Program header location and size) 0x34-0x37.7 (4) 0x0030| 06 00 00 00 34 00 00 00 34 00 00 00| ....4...4...| data: raw bits 0x34-0x1b3.7 (384) @@ -74,7 +41,7 @@ $ fq -d elf dv a_dynamic 0x0040| 04 | . | x: false 0x4c.7-0x4c.7 (0.1) 0x0040| 00 00 00| ...| unused1: 0 0x4d-0x4f.7 (3) 0x0050|04 00 00 00 |.... | align: 4 0x50-0x53.7 (4) - | | | [3]{}: program_header 0x54-0x1ca.7 (375) + | | | [1]{}: program_header 0x54-0x1ca.7 (375) | | | program_header{}: 0x54-0x1ca.7 (375) 0x0050| 03 00 00 00 | .... | type: "interp" (3) (Interpreter to invoke) 0x54-0x57.7 (4) 0x0050| b4 01 00 00 | .... | offset: 0x1b4 0x58-0x5b.7 (4) @@ -91,7 +58,24 @@ $ fq -d elf dv a_dynamic 0x0070|01 00 00 00 |.... | align: 1 0x70-0x73.7 (4) 0x01b0| 2f 6c 69 62 2f 6c 64 2d 6d 75 73 6c| /lib/ld-musl| data: raw bits 0x1b4-0x1ca.7 (23) 0x01c0|2d 69 33 38 36 2e 73 6f 2e 31 00 |-i386.so.1. | - | | | [4]{}: program_header 0x94-0x131c.7 (4745) + | | | [2]{}: program_header 0x0-0x3f3.7 (1012) + | | | program_header{}: 0x0-0x3f3.7 (1012) +0x0000|7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00|.ELF............| data: raw bits 0x0-0x3f3.7 (1012) +* |until 0x3f3.7 (1012) | | +0x0070| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x74-0x77.7 (4) +0x0070| 00 00 00 00 | .... | offset: 0x0 0x78-0x7b.7 (4) +0x0070| 00 00 00 00| ....| vaddr: 0x0 0x7c-0x7f.7 (4) +0x0080|00 00 00 00 |.... | paddr: 0x0 0x80-0x83.7 (4) +0x0080| f4 03 00 00 | .... | filesz: 1012 0x84-0x87.7 (4) +0x0080| f4 03 00 00 | .... | memsz: 1012 0x88-0x8b.7 (4) + | | | flags{}: 0x8c-0x8f.7 (4) +0x0080| 04 | . | unused0: 0 0x8c-0x8c.4 (0.5) +0x0080| 04 | . | r: true 0x8c.5-0x8c.5 (0.1) +0x0080| 04 | . | w: false 0x8c.6-0x8c.6 (0.1) +0x0080| 04 | . | x: false 0x8c.7-0x8c.7 (0.1) +0x0080| 00 00 00| ...| unused1: 0 0x8d-0x8f.7 (3) +0x0090|00 10 00 00 |.... | align: 4096 0x90-0x93.7 (4) + | | | [3]{}: program_header 0x94-0x131c.7 (4745) | | | program_header{}: 0x94-0x131c.7 (4745) 0x0090| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x94-0x97.7 (4) 0x0090| 00 10 00 00 | .... | offset: 0x1000 0x98-0x9b.7 (4) @@ -108,7 +92,7 @@ $ fq -d elf dv a_dynamic 0x00b0|00 10 00 00 |.... | align: 4096 0xb0-0xb3.7 (4) 0x1000|83 ec 0c e8 18 02 00 00 e8 c3 02 00 00 83 c4 0c|................| data: raw bits 0x1000-0x131c.7 (797) * |until 0x131c.7 (797) | | - | | | [5]{}: program_header 0xb4-0x20e7.7 (8244) + | | | [4]{}: program_header 0xb4-0x20e7.7 (8244) | | | program_header{}: 0xb4-0x20e7.7 (8244) 0x00b0| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0xb4-0xb7.7 (4) 0x00b0| 00 20 00 00 | . .. | offset: 0x2000 0xb8-0xbb.7 (4) @@ -125,7 +109,7 @@ $ fq -d elf dv a_dynamic 0x00d0|00 10 00 00 |.... | align: 4096 0xd0-0xd3.7 (4) 0x2000|61 61 61 00 01 1b 03 3b 30 00 00 00 05 00 00 00|aaa....;0.......| data: raw bits 0x2000-0x20e7.7 (232) * |until 0x20e7.7 (232) | | - | | | [6]{}: program_header 0xd4-0x3003.7 (12080) + | | | [5]{}: program_header 0xd4-0x3003.7 (12080) | | | program_header{}: 0xd4-0x3003.7 (12080) 0x00d0| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0xd4-0xd7.7 (4) 0x00d0| f0 2e 00 00 | .... | offset: 0x2ef0 0xd8-0xdb.7 (4) @@ -142,7 +126,7 @@ $ fq -d elf dv a_dynamic 0x00f0|00 10 00 00 |.... | align: 4096 0xf0-0xf3.7 (4) 0x2ef0|ff ff ff ff 00 00 00 00 ff ff ff ff 00 00 00 00|................| data: raw bits 0x2ef0-0x3003.7 (276) * |until 0x3003.7 (276) | | - | | | [7]{}: program_header 0xf4-0x2fc7.7 (11988) + | | | [6]{}: program_header 0xf4-0x2fc7.7 (11988) | | | program_header{}: 0xf4-0x2fc7.7 (11988) 0x00f0| 02 00 00 00 | .... | type: "dynamic" (2) (Dynamic linking information) 0xf4-0xf7.7 (4) 0x00f0| 00 2f 00 00 | ./.. | offset: 0x2f00 0xf8-0xfb.7 (4) @@ -159,7 +143,7 @@ $ fq -d elf dv a_dynamic 0x0110|04 00 00 00 |.... | align: 4 0x110-0x113.7 (4) 0x2f00|01 00 00 00 ae 00 00 00 01 00 00 00 b8 00 00 00|................| data: raw bits 0x2f00-0x2fc7.7 (200) * |until 0x2fc7.7 (200) | | - | | | [8]{}: program_header 0x114-0x1f3.7 (224) + | | | [7]{}: program_header 0x114-0x1f3.7 (224) | | | program_header{}: 0x114-0x1f3.7 (224) 0x0110| 04 00 00 00 | .... | type: "note" (4) (Auxiliary information) 0x114-0x117.7 (4) 0x0110| cc 01 00 00 | .... | offset: 0x1cc 0x118-0x11b.7 (4) @@ -177,7 +161,7 @@ $ fq -d elf dv a_dynamic 0x01c0| 04 00 00 00| ....| data: raw bits 0x1cc-0x1f3.7 (40) 0x01d0|18 00 00 00 05 00 00 00 47 4e 55 00 01 00 01 c0|........GNU.....| * |until 0x1f3.7 (40) | | - | | | [9]{}: program_header 0x134-0x1f3.7 (192) + | | | [8]{}: program_header 0x134-0x1f3.7 (192) | | | program_header{}: 0x134-0x1f3.7 (192) 0x0130| 53 e5 74 64 | S.td | type: "os" (1685382483) (Operating system-specific) 0x134-0x137.7 (4) 0x0130| cc 01 00 00 | .... | offset: 0x1cc 0x138-0x13b.7 (4) @@ -195,7 +179,7 @@ $ fq -d elf dv a_dynamic 0x01c0| 04 00 00 00| ....| data: raw bits 0x1cc-0x1f3.7 (40) 0x01d0|18 00 00 00 05 00 00 00 47 4e 55 00 01 00 01 c0|........GNU.....| * |until 0x1f3.7 (40) | | - | | | [10]{}: program_header 0x154-0x2037.7 (7908) + | | | [9]{}: program_header 0x154-0x2037.7 (7908) | | | program_header{}: 0x154-0x2037.7 (7908) 0x0150| 50 e5 74 64 | P.td | type: "gnu_eh_frame" (1685382480) (GNU frame unwind information) 0x154-0x157.7 (4) 0x0150| 04 20 00 00 | . .. | offset: 0x2004 0x158-0x15b.7 (4) @@ -213,6 +197,22 @@ $ fq -d elf dv a_dynamic 0x2000| 01 1b 03 3b 30 00 00 00 05 00 00 00| ...;0.......| data: raw bits 0x2004-0x2037.7 (52) 0x2010|1c f0 ff ff 4c 00 00 00 5c f0 ff ff 70 00 00 00|....L...\...p...| * |until 0x2037.7 (52) | | + | | | [10]{}: program_header 0x0-0x193.7 (404) + | | | program_header{}: 0x0-0x193.7 (404) + | | | data: raw bits 0x0-NA (0) +0x0170| 51 e5 74 64 | Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0x174-0x177.7 (4) +0x0170| 00 00 00 00 | .... | offset: 0x0 0x178-0x17b.7 (4) +0x0170| 00 00 00 00| ....| vaddr: 0x0 0x17c-0x17f.7 (4) +0x0180|00 00 00 00 |.... | paddr: 0x0 0x180-0x183.7 (4) +0x0180| 00 00 00 00 | .... | filesz: 0 0x184-0x187.7 (4) +0x0180| 00 00 00 00 | .... | memsz: 0 0x188-0x18b.7 (4) + | | | flags{}: 0x18c-0x18f.7 (4) +0x0180| 06 | . | unused0: 0 0x18c-0x18c.4 (0.5) +0x0180| 06 | . | r: true 0x18c.5-0x18c.5 (0.1) +0x0180| 06 | . | w: true 0x18c.6-0x18c.6 (0.1) +0x0180| 06 | . | x: false 0x18c.7-0x18c.7 (0.1) +0x0180| 00 00 00| ...| unused1: 0 0x18d-0x18f.7 (3) +0x0190|10 00 00 00 |.... | align: 16 0x190-0x193.7 (4) | | | [11]{}: program_header 0x194-0x2fff.7 (11884) | | | program_header{}: 0x194-0x2fff.7 (11884) 0x0190| 52 e5 74 64 | R.td | type: "gnu_relro" (1685382482) (GNU read-only after relocation) 0x194-0x197.7 (4) @@ -976,7 +976,32 @@ $ fq -d elf dv a_dynamic 0x3fd0| 00 00 00 00| ....| info: 0 0x3fdc-0x3fdf.7 (4) 0x3fe0|04 00 00 00 |.... | addralign: 4 0x3fe0-0x3fe3.7 (4) 0x3fe0| 00 00 00 00 | .... | entsize: 0 0x3fe4-0x3fe7.7 (4) - | | | [21]{}: section_header 0x3004-0x4037.7 (4148) + | | | [21]{}: section_header 0x3fe8-0x400f.7 (40) +0x3fe0| ba 00 00 00 | .... | name: ".bss" (186) 0x3fe8-0x3feb.7 (4) +0x3fe0| 08 00 00 00| ....| type: "nobits" (0x8) (No space in the file) 0x3fec-0x3fef.7 (4) + | | | flags{}: 0x3ff0-0x3ff3.7 (4) +0x3ff0|03 |. | link_order: false 0x3ff0-0x3ff0 (0.1) +0x3ff0|03 |. | info_link: false 0x3ff0.1-0x3ff0.1 (0.1) +0x3ff0|03 |. | strings: false 0x3ff0.2-0x3ff0.2 (0.1) +0x3ff0|03 |. | merge: false 0x3ff0.3-0x3ff0.3 (0.1) +0x3ff0|03 |. | unused0: 0 0x3ff0.4-0x3ff0.4 (0.1) +0x3ff0|03 |. | execinstr: false 0x3ff0.5-0x3ff0.5 (0.1) +0x3ff0|03 |. | alloc: true 0x3ff0.6-0x3ff0.6 (0.1) +0x3ff0|03 |. | write: true 0x3ff0.7-0x3ff0.7 (0.1) +0x3ff0| 00 | . | tls: false 0x3ff1-0x3ff1 (0.1) +0x3ff0| 00 | . | group: false 0x3ff1.1-0x3ff1.1 (0.1) +0x3ff0| 00 | . | os_nonconforming: false 0x3ff1.2-0x3ff1.2 (0.1) +0x3ff0| 00 00 | .. | unused1: 0 0x3ff1.3-0x3ff2.3 (1.1) +0x3ff0| 00 00 | .. | os_specific: 0 0x3ff2.4-0x3ff3.3 (1) +0x3ff0| 00 | . | processor_specific: 0 0x3ff3.4-0x3ff3.7 (0.4) +0x3ff0| 04 40 00 00 | .@.. | addr: 0x4004 0x3ff4-0x3ff7.7 (4) +0x3ff0| 04 30 00 00 | .0.. | offset: 12292 0x3ff8-0x3ffb.7 (4) +0x3ff0| 20 00 00 00| ...| size: 0x20 0x3ffc-0x3fff.7 (4) +0x4000|00 00 00 00 |.... | link: 0 0x4000-0x4003.7 (4) +0x4000| 00 00 00 00 | .... | info: 0 0x4004-0x4007.7 (4) +0x4000| 04 00 00 00 | .... | addralign: 4 0x4008-0x400b.7 (4) +0x4000| 00 00 00 00| ....| entsize: 0 0x400c-0x400f.7 (4) + | | | [22]{}: section_header 0x3004-0x4037.7 (4148) 0x3000| 47 43 43 3a 20 28 41 6c 70 69 6e 65| GCC: (Alpine| data: raw bits 0x3004-0x3065.7 (98) 0x3010|20 31 30 2e 33 2e 31 5f 67 69 74 32 30 32 31 30| 10.3.1_git20210| * |until 0x3065.7 (98) | | @@ -1004,7 +1029,7 @@ $ fq -d elf dv a_dynamic 0x4020| 00 00 00 00| ....| info: 0 0x402c-0x402f.7 (4) 0x4030|01 00 00 00 |.... | addralign: 1 0x4030-0x4033.7 (4) 0x4030| 01 00 00 00 | .... | entsize: 1 0x4034-0x4037.7 (4) - | | | [22]{}: section_header 0x3068-0x405f.7 (4088) + | | | [23]{}: section_header 0x3068-0x405f.7 (4088) 0x3060| 1c 00 00 00 02 00 00 00| ........| data: raw bits 0x3068-0x30d7.7 (112) 0x3070|00 00 04 00 00 00 00 00 9b 10 00 00 37 00 00 00|............7...| * |until 0x30d7.7 (112) | | @@ -1032,7 +1057,7 @@ $ fq -d elf dv a_dynamic 0x4050| 00 00 00 00 | .... | info: 0 0x4054-0x4057.7 (4) 0x4050| 08 00 00 00 | .... | addralign: 8 0x4058-0x405b.7 (4) 0x4050| 00 00 00 00| ....| entsize: 0 0x405c-0x405f.7 (4) - | | | [23]{}: section_header 0x30d8-0x4087.7 (4016) + | | | [24]{}: section_header 0x30d8-0x4087.7 (4016) 0x30d0| c6 00 00 00 04 00 00 00| ........| data: raw bits 0x30d8-0x31e5.7 (270) 0x30e0|00 00 04 01 8b 00 00 00 0c 0d 00 00 00 3f 00 00|.............?..| * |until 0x31e5.7 (270) | | @@ -1060,7 +1085,7 @@ $ fq -d elf dv a_dynamic 0x4070| 00 00 00 00| ....| info: 0 0x407c-0x407f.7 (4) 0x4080|01 00 00 00 |.... | addralign: 1 0x4080-0x4083.7 (4) 0x4080| 00 00 00 00 | .... | entsize: 0 0x4084-0x4087.7 (4) - | | | [24]{}: section_header 0x31e6-0x40af.7 (3786) + | | | [25]{}: section_header 0x31e6-0x40af.7 (3786) 0x31e0| 01 11 01 25 0e 13 0b 03 0e 1b| ...%......| data: raw bits 0x31e6-0x329b.7 (182) 0x31f0|0e 55 17 11 01 10 17 00 00 02 24 00 0b 0b 3e 0b|.U........$...>.| * |until 0x329b.7 (182) | | @@ -1088,7 +1113,7 @@ $ fq -d elf dv a_dynamic 0x40a0| 00 00 00 00 | .... | info: 0 0x40a4-0x40a7.7 (4) 0x40a0| 01 00 00 00 | .... | addralign: 1 0x40a8-0x40ab.7 (4) 0x40a0| 00 00 00 00| ....| entsize: 0 0x40ac-0x40af.7 (4) - | | | [25]{}: section_header 0x329c-0x40d7.7 (3644) + | | | [26]{}: section_header 0x329c-0x40d7.7 (3644) 0x3290| 50 00 00 00| P...| data: raw bits 0x329c-0x3387.7 (236) 0x32a0|03 00 21 00 00 00 01 01 fb 0e 0d 00 01 01 01 01|..!.............| * |until 0x3387.7 (236) | | @@ -1116,7 +1141,7 @@ $ fq -d elf dv a_dynamic 0x40c0| 00 00 00 00| ....| info: 0 0x40cc-0x40cf.7 (4) 0x40d0|01 00 00 00 |.... | addralign: 1 0x40d0-0x40d3.7 (4) 0x40d0| 00 00 00 00 | .... | entsize: 0 0x40d4-0x40d7.7 (4) - | | | [26]{}: section_header 0x3388-0x40ff.7 (3448) + | | | [27]{}: section_header 0x3388-0x40ff.7 (3448) 0x3380| 10 00 00 00 ff ff ff ff| ........| data: raw bits 0x3388-0x33df.7 (88) 0x3390|01 00 01 7c 08 0c 04 04 88 01 00 00 30 00 00 00|...|........0...| * |until 0x33df.7 (88) | | @@ -1144,7 +1169,7 @@ $ fq -d elf dv a_dynamic 0x40f0| 00 00 00 00 | .... | info: 0 0x40f4-0x40f7.7 (4) 0x40f0| 04 00 00 00 | .... | addralign: 4 0x40f8-0x40fb.7 (4) 0x40f0| 00 00 00 00| ....| entsize: 0 0x40fc-0x40ff.7 (4) - | | | [27]{}: section_header 0x33e0-0x4127.7 (3400) + | | | [28]{}: section_header 0x33e0-0x4127.7 (3400) 0x33e0|75 6e 73 69 67 6e 65 64 20 69 6e 74 00 63 72 74|unsigned int.crt| data: raw bits 0x33e0-0x35a2.7 (451) * |until 0x35a2.7 (451) | | 0x4100|0a 01 00 00 |.... | name: ".debug_str" (266) 0x4100-0x4103.7 (4) @@ -1171,7 +1196,7 @@ $ fq -d elf dv a_dynamic 0x4110| 00 00 00 00| ....| info: 0 0x411c-0x411f.7 (4) 0x4120|01 00 00 00 |.... | addralign: 1 0x4120-0x4123.7 (4) 0x4120| 01 00 00 00 | .... | entsize: 1 0x4124-0x4127.7 (4) - | | | [28]{}: section_header 0x35a3-0x414f.7 (2989) + | | | [29]{}: section_header 0x35a3-0x414f.7 (2989) 0x35a0| 00 00 ae 10 00 00 b0 10 00 00 02 00 70| ............p| data: raw bits 0x35a3-0x35ee.7 (76) 0x35b0|00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 ae|................| * |until 0x35ee.7 (76) | | @@ -1199,7 +1224,7 @@ $ fq -d elf dv a_dynamic 0x4140| 00 00 00 00 | .... | info: 0 0x4144-0x4147.7 (4) 0x4140| 01 00 00 00 | .... | addralign: 1 0x4148-0x414b.7 (4) 0x4140| 00 00 00 00| ....| entsize: 0 0x414c-0x414f.7 (4) - | | | [29]{}: section_header 0x35f0-0x4177.7 (2952) + | | | [30]{}: section_header 0x35f0-0x4177.7 (2952) 0x35f0|9b 10 00 00 d2 10 00 00 00 00 00 00 00 00 00 00|................| data: raw bits 0x35f0-0x363f.7 (80) * |until 0x363f.7 (80) | | 0x4150|20 01 00 00 | ... | name: ".debug_ranges" (288) 0x4150-0x4153.7 (4) @@ -1226,7 +1251,7 @@ $ fq -d elf dv a_dynamic 0x4160| 00 00 00 00| ....| info: 0 0x416c-0x416f.7 (4) 0x4170|08 00 00 00 |.... | addralign: 8 0x4170-0x4173.7 (4) 0x4170| 00 00 00 00 | .... | entsize: 0 0x4174-0x4177.7 (4) - | | | [30]{}: section_header 0x3640-0x419f.7 (2912) + | | | [31]{}: section_header 0x3640-0x419f.7 (2912) | | | symbol_table[0:46]: 0x3640-0x391f.7 (736) | | | [0]{}: symbol 0x3640-0x364f.7 (16) 0x3640|00 00 00 00 |.... | name: "" (0) 0x3640-0x3643.7 (4) @@ -1666,7 +1691,7 @@ $ fq -d elf dv a_dynamic 0x4190| 16 00 00 00 | .... | info: 22 0x4194-0x4197.7 (4) 0x4190| 04 00 00 00 | .... | addralign: 4 0x4198-0x419b.7 (4) 0x4190| 10 00 00 00| ....| entsize: 16 0x419c-0x419f.7 (4) - | | | [31]{}: section_header 0x3920-0x41c7.7 (2216) + | | | [32]{}: section_header 0x3920-0x41c7.7 (2216) 0x3920|00 53 63 72 74 31 2e 63 00 63 72 74 73 74 75 66|.Scrt1.c.crtstuf| string: "\x00Scrt1.c\x00crtstuff.c\x00__CTOR_LIST__\x00__DTOR_LIST__\x00__"... 0x3920-0x3b70.7 (593) * |until 0x3b70.7 (593) | | 0x41a0|09 00 00 00 |.... | name: ".strtab" (9) 0x41a0-0x41a3.7 (4) @@ -1693,7 +1718,7 @@ $ fq -d elf dv a_dynamic 0x41b0| 00 00 00 00| ....| info: 0 0x41bc-0x41bf.7 (4) 0x41c0|01 00 00 00 |.... | addralign: 1 0x41c0-0x41c3.7 (4) 0x41c0| 00 00 00 00 | .... | entsize: 0 0x41c4-0x41c7.7 (4) - | | | [32]{}: section_header 0x3b71-0x41ef.7 (1663) + | | | [33]{}: section_header 0x3b71-0x41ef.7 (1663) 0x3b70| 00 2e 73 79 6d 74 61 62 00 2e 73 74 72 74 61| ..symtab..strta| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.interp\x00.note.gnu.prope"... 0x3b71-0x3c9e.7 (302) 0x3b80|62 00 2e 73 68 73 74 72 74 61 62 00 2e 69 6e 74|b..shstrtab..int| * |until 0x3c9e.7 (302) | | @@ -1721,31 +1746,6 @@ $ fq -d elf dv a_dynamic 0x41e0| 00 00 00 00 | .... | info: 0 0x41e4-0x41e7.7 (4) 0x41e0| 01 00 00 00 | .... | addralign: 1 0x41e8-0x41eb.7 (4) 0x41e0| 00 00 00 00| ....| entsize: 0 0x41ec-0x41ef.7 (4) - | | | [33]{}: section_header 0x3fe8-0x400f.7 (40) -0x3fe0| ba 00 00 00 | .... | name: ".bss" (186) 0x3fe8-0x3feb.7 (4) -0x3fe0| 08 00 00 00| ....| type: "nobits" (0x8) (No space in the file) 0x3fec-0x3fef.7 (4) - | | | flags{}: 0x3ff0-0x3ff3.7 (4) -0x3ff0|03 |. | link_order: false 0x3ff0-0x3ff0 (0.1) -0x3ff0|03 |. | info_link: false 0x3ff0.1-0x3ff0.1 (0.1) -0x3ff0|03 |. | strings: false 0x3ff0.2-0x3ff0.2 (0.1) -0x3ff0|03 |. | merge: false 0x3ff0.3-0x3ff0.3 (0.1) -0x3ff0|03 |. | unused0: 0 0x3ff0.4-0x3ff0.4 (0.1) -0x3ff0|03 |. | execinstr: false 0x3ff0.5-0x3ff0.5 (0.1) -0x3ff0|03 |. | alloc: true 0x3ff0.6-0x3ff0.6 (0.1) -0x3ff0|03 |. | write: true 0x3ff0.7-0x3ff0.7 (0.1) -0x3ff0| 00 | . | tls: false 0x3ff1-0x3ff1 (0.1) -0x3ff0| 00 | . | group: false 0x3ff1.1-0x3ff1.1 (0.1) -0x3ff0| 00 | . | os_nonconforming: false 0x3ff1.2-0x3ff1.2 (0.1) -0x3ff0| 00 00 | .. | unused1: 0 0x3ff1.3-0x3ff2.3 (1.1) -0x3ff0| 00 00 | .. | os_specific: 0 0x3ff2.4-0x3ff3.3 (1) -0x3ff0| 00 | . | processor_specific: 0 0x3ff3.4-0x3ff3.7 (0.4) -0x3ff0| 04 40 00 00 | .@.. | addr: 0x4004 0x3ff4-0x3ff7.7 (4) -0x3ff0| 04 30 00 00 | .0.. | offset: 12292 0x3ff8-0x3ffb.7 (4) -0x3ff0| 20 00 00 00| ...| size: 0x20 0x3ffc-0x3fff.7 (4) -0x4000|00 00 00 00 |.... | link: 0 0x4000-0x4003.7 (4) -0x4000| 00 00 00 00 | .... | info: 0 0x4004-0x4007.7 (4) -0x4000| 04 00 00 00 | .... | addralign: 4 0x4008-0x400b.7 (4) -0x4000| 00 00 00 00| ....| entsize: 0 0x400c-0x400f.7 (4) 0x03f0| 00 00 00 00 00 00 00 00 00 00 00 00| ............| unknown0: raw bits 0x3f4-0xfff.7 (3084) 0x0400|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................| * |until 0xfff.7 (3084) | | diff --git a/format/elf/testdata/linux_386/a_static.fqtest b/format/elf/testdata/linux_386/a_static.fqtest index 096522e7c..29d7fb506 100644 --- a/format/elf/testdata/linux_386/a_static.fqtest +++ b/format/elf/testdata/linux_386/a_static.fqtest @@ -23,40 +23,7 @@ $ fq -d elf dv a_static 0x0030|22 00 |". | shnum: 34 0x30-0x31.7 (2) 0x0030| 21 00 | !. | shstrndx: 33 0x32-0x33.7 (2) | | | program_headers[0:12]: 0x0-0x3003.7 (12292) - | | | [0]{}: program_header 0x0-0x3c7.7 (968) - | | | program_header{}: 0x0-0x3c7.7 (968) -0x0000|7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00|.ELF............| data: raw bits 0x0-0x3c7.7 (968) -* |until 0x3c7.7 (968) | | -0x0070| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x74-0x77.7 (4) -0x0070| 00 00 00 00 | .... | offset: 0x0 0x78-0x7b.7 (4) -0x0070| 00 00 00 00| ....| vaddr: 0x0 0x7c-0x7f.7 (4) -0x0080|00 00 00 00 |.... | paddr: 0x0 0x80-0x83.7 (4) -0x0080| c8 03 00 00 | .... | filesz: 968 0x84-0x87.7 (4) -0x0080| c8 03 00 00 | .... | memsz: 968 0x88-0x8b.7 (4) - | | | flags{}: 0x8c-0x8f.7 (4) -0x0080| 04 | . | unused0: 0 0x8c-0x8c.4 (0.5) -0x0080| 04 | . | r: true 0x8c.5-0x8c.5 (0.1) -0x0080| 04 | . | w: false 0x8c.6-0x8c.6 (0.1) -0x0080| 04 | . | x: false 0x8c.7-0x8c.7 (0.1) -0x0080| 00 00 00| ...| unused1: 0 0x8d-0x8f.7 (3) -0x0090|00 10 00 00 |.... | align: 4096 0x90-0x93.7 (4) - | | | [1]{}: program_header 0x0-0x193.7 (404) - | | | program_header{}: 0x0-0x193.7 (404) - | | | data: raw bits 0x0-NA (0) -0x0170| 51 e5 74 64 | Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0x174-0x177.7 (4) -0x0170| 00 00 00 00 | .... | offset: 0x0 0x178-0x17b.7 (4) -0x0170| 00 00 00 00| ....| vaddr: 0x0 0x17c-0x17f.7 (4) -0x0180|00 00 00 00 |.... | paddr: 0x0 0x180-0x183.7 (4) -0x0180| 00 00 00 00 | .... | filesz: 0 0x184-0x187.7 (4) -0x0180| 00 00 00 00 | .... | memsz: 0 0x188-0x18b.7 (4) - | | | flags{}: 0x18c-0x18f.7 (4) -0x0180| 06 | . | unused0: 0 0x18c-0x18c.4 (0.5) -0x0180| 06 | . | r: true 0x18c.5-0x18c.5 (0.1) -0x0180| 06 | . | w: true 0x18c.6-0x18c.6 (0.1) -0x0180| 06 | . | x: false 0x18c.7-0x18c.7 (0.1) -0x0180| 00 00 00| ...| unused1: 0 0x18d-0x18f.7 (3) -0x0190|10 00 00 00 |.... | align: 16 0x190-0x193.7 (4) - | | | [2]{}: program_header 0x34-0x1b3.7 (384) + | | | [0]{}: program_header 0x34-0x1b3.7 (384) | | | program_header{}: 0x34-0x1b3.7 (384) 0x0030| 06 00 00 00 | .... | type: "phdr" (6) (Program header location and size) 0x34-0x37.7 (4) 0x0030| 06 00 00 00 34 00 00 00 34 00 00 00| ....4...4...| data: raw bits 0x34-0x1b3.7 (384) @@ -74,7 +41,7 @@ $ fq -d elf dv a_static 0x0040| 04 | . | x: false 0x4c.7-0x4c.7 (0.1) 0x0040| 00 00 00| ...| unused1: 0 0x4d-0x4f.7 (3) 0x0050|04 00 00 00 |.... | align: 4 0x50-0x53.7 (4) - | | | [3]{}: program_header 0x54-0x1ca.7 (375) + | | | [1]{}: program_header 0x54-0x1ca.7 (375) | | | program_header{}: 0x54-0x1ca.7 (375) 0x0050| 03 00 00 00 | .... | type: "interp" (3) (Interpreter to invoke) 0x54-0x57.7 (4) 0x0050| b4 01 00 00 | .... | offset: 0x1b4 0x58-0x5b.7 (4) @@ -91,7 +58,24 @@ $ fq -d elf dv a_static 0x0070|01 00 00 00 |.... | align: 1 0x70-0x73.7 (4) 0x01b0| 2f 6c 69 62 2f 6c 64 2d 6d 75 73 6c| /lib/ld-musl| data: raw bits 0x1b4-0x1ca.7 (23) 0x01c0|2d 69 33 38 36 2e 73 6f 2e 31 00 |-i386.so.1. | - | | | [4]{}: program_header 0x94-0x133c.7 (4777) + | | | [2]{}: program_header 0x0-0x3c7.7 (968) + | | | program_header{}: 0x0-0x3c7.7 (968) +0x0000|7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00|.ELF............| data: raw bits 0x0-0x3c7.7 (968) +* |until 0x3c7.7 (968) | | +0x0070| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x74-0x77.7 (4) +0x0070| 00 00 00 00 | .... | offset: 0x0 0x78-0x7b.7 (4) +0x0070| 00 00 00 00| ....| vaddr: 0x0 0x7c-0x7f.7 (4) +0x0080|00 00 00 00 |.... | paddr: 0x0 0x80-0x83.7 (4) +0x0080| c8 03 00 00 | .... | filesz: 968 0x84-0x87.7 (4) +0x0080| c8 03 00 00 | .... | memsz: 968 0x88-0x8b.7 (4) + | | | flags{}: 0x8c-0x8f.7 (4) +0x0080| 04 | . | unused0: 0 0x8c-0x8c.4 (0.5) +0x0080| 04 | . | r: true 0x8c.5-0x8c.5 (0.1) +0x0080| 04 | . | w: false 0x8c.6-0x8c.6 (0.1) +0x0080| 04 | . | x: false 0x8c.7-0x8c.7 (0.1) +0x0080| 00 00 00| ...| unused1: 0 0x8d-0x8f.7 (3) +0x0090|00 10 00 00 |.... | align: 4096 0x90-0x93.7 (4) + | | | [3]{}: program_header 0x94-0x133c.7 (4777) | | | program_header{}: 0x94-0x133c.7 (4777) 0x0090| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x94-0x97.7 (4) 0x0090| 00 10 00 00 | .... | offset: 0x1000 0x98-0x9b.7 (4) @@ -108,7 +92,7 @@ $ fq -d elf dv a_static 0x00b0|00 10 00 00 |.... | align: 4096 0xb0-0xb3.7 (4) 0x1000|83 ec 0c e8 08 02 00 00 e8 e3 02 00 00 83 c4 0c|................| data: raw bits 0x1000-0x133c.7 (829) * |until 0x133c.7 (829) | | - | | | [5]{}: program_header 0xb4-0x211f.7 (8300) + | | | [4]{}: program_header 0xb4-0x211f.7 (8300) | | | program_header{}: 0xb4-0x211f.7 (8300) 0x00b0| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0xb4-0xb7.7 (4) 0x00b0| 00 20 00 00 | . .. | offset: 0x2000 0xb8-0xbb.7 (4) @@ -125,7 +109,7 @@ $ fq -d elf dv a_static 0x00d0|00 10 00 00 |.... | align: 4096 0xd0-0xd3.7 (4) 0x2000|61 61 61 00 6c 69 62 62 62 62 5f 62 62 62 00 00|aaa.libbbb_bbb..| data: raw bits 0x2000-0x211f.7 (288) * |until 0x211f.7 (288) | | - | | | [6]{}: program_header 0xd4-0x3003.7 (12080) + | | | [5]{}: program_header 0xd4-0x3003.7 (12080) | | | program_header{}: 0xd4-0x3003.7 (12080) 0x00d0| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0xd4-0xd7.7 (4) 0x00d0| fc 2e 00 00 | .... | offset: 0x2efc 0xd8-0xdb.7 (4) @@ -143,7 +127,7 @@ $ fq -d elf dv a_static 0x2ef0| ff ff ff ff| ....| data: raw bits 0x2efc-0x3003.7 (264) 0x2f00|00 00 00 00 ff ff ff ff 00 00 00 00 01 00 00 00|................| * |until 0x3003.7 (264) | | - | | | [7]{}: program_header 0xf4-0x2fcb.7 (11992) + | | | [6]{}: program_header 0xf4-0x2fcb.7 (11992) | | | program_header{}: 0xf4-0x2fcb.7 (11992) 0x00f0| 02 00 00 00 | .... | type: "dynamic" (2) (Dynamic linking information) 0xf4-0xf7.7 (4) 0x00f0| 0c 2f 00 00 | ./.. | offset: 0x2f0c 0xf8-0xfb.7 (4) @@ -161,7 +145,7 @@ $ fq -d elf dv a_static 0x2f00| 01 00 00 00| ....| data: raw bits 0x2f0c-0x2fcb.7 (192) 0x2f10|33 00 00 00 0c 00 00 00 00 10 00 00 0d 00 00 00|3...............| * |until 0x2fcb.7 (192) | | - | | | [8]{}: program_header 0x114-0x1f3.7 (224) + | | | [7]{}: program_header 0x114-0x1f3.7 (224) | | | program_header{}: 0x114-0x1f3.7 (224) 0x0110| 04 00 00 00 | .... | type: "note" (4) (Auxiliary information) 0x114-0x117.7 (4) 0x0110| cc 01 00 00 | .... | offset: 0x1cc 0x118-0x11b.7 (4) @@ -179,7 +163,7 @@ $ fq -d elf dv a_static 0x01c0| 04 00 00 00| ....| data: raw bits 0x1cc-0x1f3.7 (40) 0x01d0|18 00 00 00 05 00 00 00 47 4e 55 00 01 00 01 c0|........GNU.....| * |until 0x1f3.7 (40) | | - | | | [9]{}: program_header 0x134-0x1f3.7 (192) + | | | [8]{}: program_header 0x134-0x1f3.7 (192) | | | program_header{}: 0x134-0x1f3.7 (192) 0x0130| 53 e5 74 64 | S.td | type: "os" (1685382483) (Operating system-specific) 0x134-0x137.7 (4) 0x0130| cc 01 00 00 | .... | offset: 0x1cc 0x138-0x13b.7 (4) @@ -197,7 +181,7 @@ $ fq -d elf dv a_static 0x01c0| 04 00 00 00| ....| data: raw bits 0x1cc-0x1f3.7 (40) 0x01d0|18 00 00 00 05 00 00 00 47 4e 55 00 01 00 01 c0|........GNU.....| * |until 0x1f3.7 (40) | | - | | | [10]{}: program_header 0x154-0x204b.7 (7928) + | | | [9]{}: program_header 0x154-0x204b.7 (7928) | | | program_header{}: 0x154-0x204b.7 (7928) 0x0150| 50 e5 74 64 | P.td | type: "gnu_eh_frame" (1685382480) (GNU frame unwind information) 0x154-0x157.7 (4) 0x0150| 10 20 00 00 | . .. | offset: 0x2010 0x158-0x15b.7 (4) @@ -214,6 +198,22 @@ $ fq -d elf dv a_static 0x0170|04 00 00 00 |.... | align: 4 0x170-0x173.7 (4) 0x2010|01 1b 03 3b 38 00 00 00 06 00 00 00 10 f0 ff ff|...;8...........| data: raw bits 0x2010-0x204b.7 (60) * |until 0x204b.7 (60) | | + | | | [10]{}: program_header 0x0-0x193.7 (404) + | | | program_header{}: 0x0-0x193.7 (404) + | | | data: raw bits 0x0-NA (0) +0x0170| 51 e5 74 64 | Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0x174-0x177.7 (4) +0x0170| 00 00 00 00 | .... | offset: 0x0 0x178-0x17b.7 (4) +0x0170| 00 00 00 00| ....| vaddr: 0x0 0x17c-0x17f.7 (4) +0x0180|00 00 00 00 |.... | paddr: 0x0 0x180-0x183.7 (4) +0x0180| 00 00 00 00 | .... | filesz: 0 0x184-0x187.7 (4) +0x0180| 00 00 00 00 | .... | memsz: 0 0x188-0x18b.7 (4) + | | | flags{}: 0x18c-0x18f.7 (4) +0x0180| 06 | . | unused0: 0 0x18c-0x18c.4 (0.5) +0x0180| 06 | . | r: true 0x18c.5-0x18c.5 (0.1) +0x0180| 06 | . | w: true 0x18c.6-0x18c.6 (0.1) +0x0180| 06 | . | x: false 0x18c.7-0x18c.7 (0.1) +0x0180| 00 00 00| ...| unused1: 0 0x18d-0x18f.7 (3) +0x0190|10 00 00 00 |.... | align: 16 0x190-0x193.7 (4) | | | [11]{}: program_header 0x194-0x2fff.7 (11884) | | | program_header{}: 0x194-0x2fff.7 (11884) 0x0190| 52 e5 74 64 | R.td | type: "gnu_relro" (1685382482) (GNU read-only after relocation) 0x194-0x197.7 (4) @@ -964,7 +964,32 @@ $ fq -d elf dv a_static 0x3ff0| 00 00 00 00 | .... | info: 0 0x3ff4-0x3ff7.7 (4) 0x3ff0| 04 00 00 00 | .... | addralign: 4 0x3ff8-0x3ffb.7 (4) 0x3ff0| 00 00 00 00| ....| entsize: 0 0x3ffc-0x3fff.7 (4) - | | | [21]{}: section_header 0x3004-0x404f.7 (4172) + | | | [21]{}: section_header 0x4000-0x4027.7 (40) +0x4000|ba 00 00 00 |.... | name: ".bss" (186) 0x4000-0x4003.7 (4) +0x4000| 08 00 00 00 | .... | type: "nobits" (0x8) (No space in the file) 0x4004-0x4007.7 (4) + | | | flags{}: 0x4008-0x400b.7 (4) +0x4000| 03 | . | link_order: false 0x4008-0x4008 (0.1) +0x4000| 03 | . | info_link: false 0x4008.1-0x4008.1 (0.1) +0x4000| 03 | . | strings: false 0x4008.2-0x4008.2 (0.1) +0x4000| 03 | . | merge: false 0x4008.3-0x4008.3 (0.1) +0x4000| 03 | . | unused0: 0 0x4008.4-0x4008.4 (0.1) +0x4000| 03 | . | execinstr: false 0x4008.5-0x4008.5 (0.1) +0x4000| 03 | . | alloc: true 0x4008.6-0x4008.6 (0.1) +0x4000| 03 | . | write: true 0x4008.7-0x4008.7 (0.1) +0x4000| 00 | . | tls: false 0x4009-0x4009 (0.1) +0x4000| 00 | . | group: false 0x4009.1-0x4009.1 (0.1) +0x4000| 00 | . | os_nonconforming: false 0x4009.2-0x4009.2 (0.1) +0x4000| 00 00 | .. | unused1: 0 0x4009.3-0x400a.3 (1.1) +0x4000| 00 00 | .. | os_specific: 0 0x400a.4-0x400b.3 (1) +0x4000| 00 | . | processor_specific: 0 0x400b.4-0x400b.7 (0.4) +0x4000| 04 40 00 00| .@..| addr: 0x4004 0x400c-0x400f.7 (4) +0x4010|04 30 00 00 |.0.. | offset: 12292 0x4010-0x4013.7 (4) +0x4010| 20 00 00 00 | ... | size: 0x20 0x4014-0x4017.7 (4) +0x4010| 00 00 00 00 | .... | link: 0 0x4018-0x401b.7 (4) +0x4010| 00 00 00 00| ....| info: 0 0x401c-0x401f.7 (4) +0x4020|04 00 00 00 |.... | addralign: 4 0x4020-0x4023.7 (4) +0x4020| 00 00 00 00 | .... | entsize: 0 0x4024-0x4027.7 (4) + | | | [22]{}: section_header 0x3004-0x404f.7 (4172) 0x3000| 47 43 43 3a 20 28 41 6c 70 69 6e 65| GCC: (Alpine| data: raw bits 0x3004-0x3065.7 (98) 0x3010|20 31 30 2e 33 2e 31 5f 67 69 74 32 30 32 31 30| 10.3.1_git20210| * |until 0x3065.7 (98) | | @@ -992,7 +1017,7 @@ $ fq -d elf dv a_static 0x4040| 00 00 00 00 | .... | info: 0 0x4044-0x4047.7 (4) 0x4040| 01 00 00 00 | .... | addralign: 1 0x4048-0x404b.7 (4) 0x4040| 01 00 00 00| ....| entsize: 1 0x404c-0x404f.7 (4) - | | | [22]{}: section_header 0x3068-0x4077.7 (4112) + | | | [23]{}: section_header 0x3068-0x4077.7 (4112) 0x3060| 1c 00 00 00 02 00 00 00| ........| data: raw bits 0x3068-0x30d7.7 (112) 0x3070|00 00 04 00 00 00 00 00 8b 10 00 00 37 00 00 00|............7...| * |until 0x30d7.7 (112) | | @@ -1020,7 +1045,7 @@ $ fq -d elf dv a_static 0x4060| 00 00 00 00| ....| info: 0 0x406c-0x406f.7 (4) 0x4070|08 00 00 00 |.... | addralign: 8 0x4070-0x4073.7 (4) 0x4070| 00 00 00 00 | .... | entsize: 0 0x4074-0x4077.7 (4) - | | | [23]{}: section_header 0x30d8-0x409f.7 (4040) + | | | [24]{}: section_header 0x30d8-0x409f.7 (4040) 0x30d0| c6 00 00 00 04 00 00 00| ........| data: raw bits 0x30d8-0x31e5.7 (270) 0x30e0|00 00 04 01 8b 00 00 00 0c 0d 00 00 00 3f 00 00|.............?..| * |until 0x31e5.7 (270) | | @@ -1048,7 +1073,7 @@ $ fq -d elf dv a_static 0x4090| 00 00 00 00 | .... | info: 0 0x4094-0x4097.7 (4) 0x4090| 01 00 00 00 | .... | addralign: 1 0x4098-0x409b.7 (4) 0x4090| 00 00 00 00| ....| entsize: 0 0x409c-0x409f.7 (4) - | | | [24]{}: section_header 0x31e6-0x40c7.7 (3810) + | | | [25]{}: section_header 0x31e6-0x40c7.7 (3810) 0x31e0| 01 11 01 25 0e 13 0b 03 0e 1b| ...%......| data: raw bits 0x31e6-0x329b.7 (182) 0x31f0|0e 55 17 11 01 10 17 00 00 02 24 00 0b 0b 3e 0b|.U........$...>.| * |until 0x329b.7 (182) | | @@ -1076,7 +1101,7 @@ $ fq -d elf dv a_static 0x40b0| 00 00 00 00| ....| info: 0 0x40bc-0x40bf.7 (4) 0x40c0|01 00 00 00 |.... | addralign: 1 0x40c0-0x40c3.7 (4) 0x40c0| 00 00 00 00 | .... | entsize: 0 0x40c4-0x40c7.7 (4) - | | | [25]{}: section_header 0x329c-0x40ef.7 (3668) + | | | [26]{}: section_header 0x329c-0x40ef.7 (3668) 0x3290| 50 00 00 00| P...| data: raw bits 0x329c-0x3387.7 (236) 0x32a0|03 00 21 00 00 00 01 01 fb 0e 0d 00 01 01 01 01|..!.............| * |until 0x3387.7 (236) | | @@ -1104,7 +1129,7 @@ $ fq -d elf dv a_static 0x40e0| 00 00 00 00 | .... | info: 0 0x40e4-0x40e7.7 (4) 0x40e0| 01 00 00 00 | .... | addralign: 1 0x40e8-0x40eb.7 (4) 0x40e0| 00 00 00 00| ....| entsize: 0 0x40ec-0x40ef.7 (4) - | | | [26]{}: section_header 0x3388-0x4117.7 (3472) + | | | [27]{}: section_header 0x3388-0x4117.7 (3472) 0x3380| 10 00 00 00 ff ff ff ff| ........| data: raw bits 0x3388-0x33df.7 (88) 0x3390|01 00 01 7c 08 0c 04 04 88 01 00 00 30 00 00 00|...|........0...| * |until 0x33df.7 (88) | | @@ -1132,7 +1157,7 @@ $ fq -d elf dv a_static 0x4100| 00 00 00 00| ....| info: 0 0x410c-0x410f.7 (4) 0x4110|04 00 00 00 |.... | addralign: 4 0x4110-0x4113.7 (4) 0x4110| 00 00 00 00 | .... | entsize: 0 0x4114-0x4117.7 (4) - | | | [27]{}: section_header 0x33e0-0x413f.7 (3424) + | | | [28]{}: section_header 0x33e0-0x413f.7 (3424) 0x33e0|75 6e 73 69 67 6e 65 64 20 69 6e 74 00 63 72 74|unsigned int.crt| data: raw bits 0x33e0-0x35a2.7 (451) * |until 0x35a2.7 (451) | | 0x4110| 0a 01 00 00 | .... | name: ".debug_str" (266) 0x4118-0x411b.7 (4) @@ -1159,7 +1184,7 @@ $ fq -d elf dv a_static 0x4130| 00 00 00 00 | .... | info: 0 0x4134-0x4137.7 (4) 0x4130| 01 00 00 00 | .... | addralign: 1 0x4138-0x413b.7 (4) 0x4130| 01 00 00 00| ....| entsize: 1 0x413c-0x413f.7 (4) - | | | [28]{}: section_header 0x35a3-0x4167.7 (3013) + | | | [29]{}: section_header 0x35a3-0x4167.7 (3013) 0x35a0| 00 00 9e 10 00 00 a0 10 00 00 02 00 70| ............p| data: raw bits 0x35a3-0x35ee.7 (76) 0x35b0|00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 9e|................| * |until 0x35ee.7 (76) | | @@ -1187,7 +1212,7 @@ $ fq -d elf dv a_static 0x4150| 00 00 00 00| ....| info: 0 0x415c-0x415f.7 (4) 0x4160|01 00 00 00 |.... | addralign: 1 0x4160-0x4163.7 (4) 0x4160| 00 00 00 00 | .... | entsize: 0 0x4164-0x4167.7 (4) - | | | [29]{}: section_header 0x35f0-0x418f.7 (2976) + | | | [30]{}: section_header 0x35f0-0x418f.7 (2976) 0x35f0|8b 10 00 00 c2 10 00 00 00 00 00 00 00 00 00 00|................| data: raw bits 0x35f0-0x363f.7 (80) * |until 0x363f.7 (80) | | 0x4160| 20 01 00 00 | ... | name: ".debug_ranges" (288) 0x4168-0x416b.7 (4) @@ -1214,7 +1239,7 @@ $ fq -d elf dv a_static 0x4180| 00 00 00 00 | .... | info: 0 0x4184-0x4187.7 (4) 0x4180| 08 00 00 00 | .... | addralign: 8 0x4188-0x418b.7 (4) 0x4180| 00 00 00 00| ....| entsize: 0 0x418c-0x418f.7 (4) - | | | [30]{}: section_header 0x3640-0x41b7.7 (2936) + | | | [31]{}: section_header 0x3640-0x41b7.7 (2936) | | | symbol_table[0:47]: 0x3640-0x392f.7 (752) | | | [0]{}: symbol 0x3640-0x364f.7 (16) 0x3640|00 00 00 00 |.... | name: "" (0) 0x3640-0x3643.7 (4) @@ -1663,7 +1688,7 @@ $ fq -d elf dv a_static 0x41a0| 17 00 00 00| ....| info: 23 0x41ac-0x41af.7 (4) 0x41b0|04 00 00 00 |.... | addralign: 4 0x41b0-0x41b3.7 (4) 0x41b0| 10 00 00 00 | .... | entsize: 16 0x41b4-0x41b7.7 (4) - | | | [31]{}: section_header 0x3930-0x41df.7 (2224) + | | | [32]{}: section_header 0x3930-0x41df.7 (2224) 0x3930|00 53 63 72 74 31 2e 63 00 63 72 74 73 74 75 66|.Scrt1.c.crtstuf| string: "\x00Scrt1.c\x00crtstuff.c\x00__CTOR_LIST__\x00__DTOR_LIST__\x00__"... 0x3930-0x3b89.7 (602) * |until 0x3b89.7 (602) | | 0x41b0| 09 00 00 00 | .... | name: ".strtab" (9) 0x41b8-0x41bb.7 (4) @@ -1690,7 +1715,7 @@ $ fq -d elf dv a_static 0x41d0| 00 00 00 00 | .... | info: 0 0x41d4-0x41d7.7 (4) 0x41d0| 01 00 00 00 | .... | addralign: 1 0x41d8-0x41db.7 (4) 0x41d0| 00 00 00 00| ....| entsize: 0 0x41dc-0x41df.7 (4) - | | | [32]{}: section_header 0x3b8a-0x4207.7 (1662) + | | | [33]{}: section_header 0x3b8a-0x4207.7 (1662) 0x3b80| 00 2e 73 79 6d 74| ..symt| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.interp\x00.note.gnu.prope"... 0x3b8a-0x3cb7.7 (302) 0x3b90|61 62 00 2e 73 74 72 74 61 62 00 2e 73 68 73 74|ab..strtab..shst| * |until 0x3cb7.7 (302) | | @@ -1718,31 +1743,6 @@ $ fq -d elf dv a_static 0x41f0| 00 00 00 00| ....| info: 0 0x41fc-0x41ff.7 (4) 0x4200|01 00 00 00 |.... | addralign: 1 0x4200-0x4203.7 (4) 0x4200| 00 00 00 00| | ....| | entsize: 0 0x4204-0x4207.7 (4) - | | | [33]{}: section_header 0x4000-0x4027.7 (40) -0x4000|ba 00 00 00 |.... | name: ".bss" (186) 0x4000-0x4003.7 (4) -0x4000| 08 00 00 00 | .... | type: "nobits" (0x8) (No space in the file) 0x4004-0x4007.7 (4) - | | | flags{}: 0x4008-0x400b.7 (4) -0x4000| 03 | . | link_order: false 0x4008-0x4008 (0.1) -0x4000| 03 | . | info_link: false 0x4008.1-0x4008.1 (0.1) -0x4000| 03 | . | strings: false 0x4008.2-0x4008.2 (0.1) -0x4000| 03 | . | merge: false 0x4008.3-0x4008.3 (0.1) -0x4000| 03 | . | unused0: 0 0x4008.4-0x4008.4 (0.1) -0x4000| 03 | . | execinstr: false 0x4008.5-0x4008.5 (0.1) -0x4000| 03 | . | alloc: true 0x4008.6-0x4008.6 (0.1) -0x4000| 03 | . | write: true 0x4008.7-0x4008.7 (0.1) -0x4000| 00 | . | tls: false 0x4009-0x4009 (0.1) -0x4000| 00 | . | group: false 0x4009.1-0x4009.1 (0.1) -0x4000| 00 | . | os_nonconforming: false 0x4009.2-0x4009.2 (0.1) -0x4000| 00 00 | .. | unused1: 0 0x4009.3-0x400a.3 (1.1) -0x4000| 00 00 | .. | os_specific: 0 0x400a.4-0x400b.3 (1) -0x4000| 00 | . | processor_specific: 0 0x400b.4-0x400b.7 (0.4) -0x4000| 04 40 00 00| .@..| addr: 0x4004 0x400c-0x400f.7 (4) -0x4010|04 30 00 00 |.0.. | offset: 12292 0x4010-0x4013.7 (4) -0x4010| 20 00 00 00 | ... | size: 0x20 0x4014-0x4017.7 (4) -0x4010| 00 00 00 00 | .... | link: 0 0x4018-0x401b.7 (4) -0x4010| 00 00 00 00| ....| info: 0 0x401c-0x401f.7 (4) -0x4020|04 00 00 00 |.... | addralign: 4 0x4020-0x4023.7 (4) -0x4020| 00 00 00 00 | .... | entsize: 0 0x4024-0x4027.7 (4) 0x03c0| 00 00 00 00 00 00 00 00| ........| unknown0: raw bits 0x3c8-0xfff.7 (3128) 0x03d0|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................| * |until 0xfff.7 (3128) | | diff --git a/format/elf/testdata/linux_386/a_stripped.fqtest b/format/elf/testdata/linux_386/a_stripped.fqtest index 2ef7c3119..f29ccebc1 100644 --- a/format/elf/testdata/linux_386/a_stripped.fqtest +++ b/format/elf/testdata/linux_386/a_stripped.fqtest @@ -23,40 +23,7 @@ $ fq -d elf dv a_stripped 0x0030|18 00 |.. | shnum: 24 0x30-0x31.7 (2) 0x0030| 17 00 | .. | shstrndx: 23 0x32-0x33.7 (2) | | | program_headers[0:12]: 0x0-0x3003.7 (12292) - | | | [0]{}: program_header 0x0-0x3f3.7 (1012) - | | | program_header{}: 0x0-0x3f3.7 (1012) -0x0000|7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00|.ELF............| data: raw bits 0x0-0x3f3.7 (1012) -* |until 0x3f3.7 (1012) | | -0x0070| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x74-0x77.7 (4) -0x0070| 00 00 00 00 | .... | offset: 0x0 0x78-0x7b.7 (4) -0x0070| 00 00 00 00| ....| vaddr: 0x0 0x7c-0x7f.7 (4) -0x0080|00 00 00 00 |.... | paddr: 0x0 0x80-0x83.7 (4) -0x0080| f4 03 00 00 | .... | filesz: 1012 0x84-0x87.7 (4) -0x0080| f4 03 00 00 | .... | memsz: 1012 0x88-0x8b.7 (4) - | | | flags{}: 0x8c-0x8f.7 (4) -0x0080| 04 | . | unused0: 0 0x8c-0x8c.4 (0.5) -0x0080| 04 | . | r: true 0x8c.5-0x8c.5 (0.1) -0x0080| 04 | . | w: false 0x8c.6-0x8c.6 (0.1) -0x0080| 04 | . | x: false 0x8c.7-0x8c.7 (0.1) -0x0080| 00 00 00| ...| unused1: 0 0x8d-0x8f.7 (3) -0x0090|00 10 00 00 |.... | align: 4096 0x90-0x93.7 (4) - | | | [1]{}: program_header 0x0-0x193.7 (404) - | | | program_header{}: 0x0-0x193.7 (404) - | | | data: raw bits 0x0-NA (0) -0x0170| 51 e5 74 64 | Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0x174-0x177.7 (4) -0x0170| 00 00 00 00 | .... | offset: 0x0 0x178-0x17b.7 (4) -0x0170| 00 00 00 00| ....| vaddr: 0x0 0x17c-0x17f.7 (4) -0x0180|00 00 00 00 |.... | paddr: 0x0 0x180-0x183.7 (4) -0x0180| 00 00 00 00 | .... | filesz: 0 0x184-0x187.7 (4) -0x0180| 00 00 00 00 | .... | memsz: 0 0x188-0x18b.7 (4) - | | | flags{}: 0x18c-0x18f.7 (4) -0x0180| 06 | . | unused0: 0 0x18c-0x18c.4 (0.5) -0x0180| 06 | . | r: true 0x18c.5-0x18c.5 (0.1) -0x0180| 06 | . | w: true 0x18c.6-0x18c.6 (0.1) -0x0180| 06 | . | x: false 0x18c.7-0x18c.7 (0.1) -0x0180| 00 00 00| ...| unused1: 0 0x18d-0x18f.7 (3) -0x0190|10 00 00 00 |.... | align: 16 0x190-0x193.7 (4) - | | | [2]{}: program_header 0x34-0x1b3.7 (384) + | | | [0]{}: program_header 0x34-0x1b3.7 (384) | | | program_header{}: 0x34-0x1b3.7 (384) 0x0030| 06 00 00 00 | .... | type: "phdr" (6) (Program header location and size) 0x34-0x37.7 (4) 0x0030| 06 00 00 00 34 00 00 00 34 00 00 00| ....4...4...| data: raw bits 0x34-0x1b3.7 (384) @@ -74,7 +41,7 @@ $ fq -d elf dv a_stripped 0x0040| 04 | . | x: false 0x4c.7-0x4c.7 (0.1) 0x0040| 00 00 00| ...| unused1: 0 0x4d-0x4f.7 (3) 0x0050|04 00 00 00 |.... | align: 4 0x50-0x53.7 (4) - | | | [3]{}: program_header 0x54-0x1ca.7 (375) + | | | [1]{}: program_header 0x54-0x1ca.7 (375) | | | program_header{}: 0x54-0x1ca.7 (375) 0x0050| 03 00 00 00 | .... | type: "interp" (3) (Interpreter to invoke) 0x54-0x57.7 (4) 0x0050| b4 01 00 00 | .... | offset: 0x1b4 0x58-0x5b.7 (4) @@ -91,7 +58,24 @@ $ fq -d elf dv a_stripped 0x0070|01 00 00 00 |.... | align: 1 0x70-0x73.7 (4) 0x01b0| 2f 6c 69 62 2f 6c 64 2d 6d 75 73 6c| /lib/ld-musl| data: raw bits 0x1b4-0x1ca.7 (23) 0x01c0|2d 69 33 38 36 2e 73 6f 2e 31 00 |-i386.so.1. | - | | | [4]{}: program_header 0x94-0x131c.7 (4745) + | | | [2]{}: program_header 0x0-0x3f3.7 (1012) + | | | program_header{}: 0x0-0x3f3.7 (1012) +0x0000|7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00|.ELF............| data: raw bits 0x0-0x3f3.7 (1012) +* |until 0x3f3.7 (1012) | | +0x0070| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x74-0x77.7 (4) +0x0070| 00 00 00 00 | .... | offset: 0x0 0x78-0x7b.7 (4) +0x0070| 00 00 00 00| ....| vaddr: 0x0 0x7c-0x7f.7 (4) +0x0080|00 00 00 00 |.... | paddr: 0x0 0x80-0x83.7 (4) +0x0080| f4 03 00 00 | .... | filesz: 1012 0x84-0x87.7 (4) +0x0080| f4 03 00 00 | .... | memsz: 1012 0x88-0x8b.7 (4) + | | | flags{}: 0x8c-0x8f.7 (4) +0x0080| 04 | . | unused0: 0 0x8c-0x8c.4 (0.5) +0x0080| 04 | . | r: true 0x8c.5-0x8c.5 (0.1) +0x0080| 04 | . | w: false 0x8c.6-0x8c.6 (0.1) +0x0080| 04 | . | x: false 0x8c.7-0x8c.7 (0.1) +0x0080| 00 00 00| ...| unused1: 0 0x8d-0x8f.7 (3) +0x0090|00 10 00 00 |.... | align: 4096 0x90-0x93.7 (4) + | | | [3]{}: program_header 0x94-0x131c.7 (4745) | | | program_header{}: 0x94-0x131c.7 (4745) 0x0090| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x94-0x97.7 (4) 0x0090| 00 10 00 00 | .... | offset: 0x1000 0x98-0x9b.7 (4) @@ -108,7 +92,7 @@ $ fq -d elf dv a_stripped 0x00b0|00 10 00 00 |.... | align: 4096 0xb0-0xb3.7 (4) 0x1000|83 ec 0c e8 18 02 00 00 e8 c3 02 00 00 83 c4 0c|................| data: raw bits 0x1000-0x131c.7 (797) * |until 0x131c.7 (797) | | - | | | [5]{}: program_header 0xb4-0x20e7.7 (8244) + | | | [4]{}: program_header 0xb4-0x20e7.7 (8244) | | | program_header{}: 0xb4-0x20e7.7 (8244) 0x00b0| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0xb4-0xb7.7 (4) 0x00b0| 00 20 00 00 | . .. | offset: 0x2000 0xb8-0xbb.7 (4) @@ -125,7 +109,7 @@ $ fq -d elf dv a_stripped 0x00d0|00 10 00 00 |.... | align: 4096 0xd0-0xd3.7 (4) 0x2000|61 61 61 00 01 1b 03 3b 30 00 00 00 05 00 00 00|aaa....;0.......| data: raw bits 0x2000-0x20e7.7 (232) * |until 0x20e7.7 (232) | | - | | | [6]{}: program_header 0xd4-0x3003.7 (12080) + | | | [5]{}: program_header 0xd4-0x3003.7 (12080) | | | program_header{}: 0xd4-0x3003.7 (12080) 0x00d0| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0xd4-0xd7.7 (4) 0x00d0| f0 2e 00 00 | .... | offset: 0x2ef0 0xd8-0xdb.7 (4) @@ -142,7 +126,7 @@ $ fq -d elf dv a_stripped 0x00f0|00 10 00 00 |.... | align: 4096 0xf0-0xf3.7 (4) 0x2ef0|ff ff ff ff 00 00 00 00 ff ff ff ff 00 00 00 00|................| data: raw bits 0x2ef0-0x3003.7 (276) * |until 0x3003.7 (276) | | - | | | [7]{}: program_header 0xf4-0x2fc7.7 (11988) + | | | [6]{}: program_header 0xf4-0x2fc7.7 (11988) | | | program_header{}: 0xf4-0x2fc7.7 (11988) 0x00f0| 02 00 00 00 | .... | type: "dynamic" (2) (Dynamic linking information) 0xf4-0xf7.7 (4) 0x00f0| 00 2f 00 00 | ./.. | offset: 0x2f00 0xf8-0xfb.7 (4) @@ -159,7 +143,7 @@ $ fq -d elf dv a_stripped 0x0110|04 00 00 00 |.... | align: 4 0x110-0x113.7 (4) 0x2f00|01 00 00 00 ae 00 00 00 01 00 00 00 b8 00 00 00|................| data: raw bits 0x2f00-0x2fc7.7 (200) * |until 0x2fc7.7 (200) | | - | | | [8]{}: program_header 0x114-0x1f3.7 (224) + | | | [7]{}: program_header 0x114-0x1f3.7 (224) | | | program_header{}: 0x114-0x1f3.7 (224) 0x0110| 04 00 00 00 | .... | type: "note" (4) (Auxiliary information) 0x114-0x117.7 (4) 0x0110| cc 01 00 00 | .... | offset: 0x1cc 0x118-0x11b.7 (4) @@ -177,7 +161,7 @@ $ fq -d elf dv a_stripped 0x01c0| 04 00 00 00| ....| data: raw bits 0x1cc-0x1f3.7 (40) 0x01d0|18 00 00 00 05 00 00 00 47 4e 55 00 01 00 01 c0|........GNU.....| * |until 0x1f3.7 (40) | | - | | | [9]{}: program_header 0x134-0x1f3.7 (192) + | | | [8]{}: program_header 0x134-0x1f3.7 (192) | | | program_header{}: 0x134-0x1f3.7 (192) 0x0130| 53 e5 74 64 | S.td | type: "os" (1685382483) (Operating system-specific) 0x134-0x137.7 (4) 0x0130| cc 01 00 00 | .... | offset: 0x1cc 0x138-0x13b.7 (4) @@ -195,7 +179,7 @@ $ fq -d elf dv a_stripped 0x01c0| 04 00 00 00| ....| data: raw bits 0x1cc-0x1f3.7 (40) 0x01d0|18 00 00 00 05 00 00 00 47 4e 55 00 01 00 01 c0|........GNU.....| * |until 0x1f3.7 (40) | | - | | | [10]{}: program_header 0x154-0x2037.7 (7908) + | | | [9]{}: program_header 0x154-0x2037.7 (7908) | | | program_header{}: 0x154-0x2037.7 (7908) 0x0150| 50 e5 74 64 | P.td | type: "gnu_eh_frame" (1685382480) (GNU frame unwind information) 0x154-0x157.7 (4) 0x0150| 04 20 00 00 | . .. | offset: 0x2004 0x158-0x15b.7 (4) @@ -213,6 +197,22 @@ $ fq -d elf dv a_stripped 0x2000| 01 1b 03 3b 30 00 00 00 05 00 00 00| ...;0.......| data: raw bits 0x2004-0x2037.7 (52) 0x2010|1c f0 ff ff 4c 00 00 00 5c f0 ff ff 70 00 00 00|....L...\...p...| * |until 0x2037.7 (52) | | + | | | [10]{}: program_header 0x0-0x193.7 (404) + | | | program_header{}: 0x0-0x193.7 (404) + | | | data: raw bits 0x0-NA (0) +0x0170| 51 e5 74 64 | Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0x174-0x177.7 (4) +0x0170| 00 00 00 00 | .... | offset: 0x0 0x178-0x17b.7 (4) +0x0170| 00 00 00 00| ....| vaddr: 0x0 0x17c-0x17f.7 (4) +0x0180|00 00 00 00 |.... | paddr: 0x0 0x180-0x183.7 (4) +0x0180| 00 00 00 00 | .... | filesz: 0 0x184-0x187.7 (4) +0x0180| 00 00 00 00 | .... | memsz: 0 0x188-0x18b.7 (4) + | | | flags{}: 0x18c-0x18f.7 (4) +0x0180| 06 | . | unused0: 0 0x18c-0x18c.4 (0.5) +0x0180| 06 | . | r: true 0x18c.5-0x18c.5 (0.1) +0x0180| 06 | . | w: true 0x18c.6-0x18c.6 (0.1) +0x0180| 06 | . | x: false 0x18c.7-0x18c.7 (0.1) +0x0180| 00 00 00| ...| unused1: 0 0x18d-0x18f.7 (3) +0x0190|10 00 00 00 |.... | align: 16 0x190-0x193.7 (4) | | | [11]{}: program_header 0x194-0x2fff.7 (11884) | | | program_header{}: 0x194-0x2fff.7 (11884) 0x0190| 52 e5 74 64 | R.td | type: "gnu_relro" (1685382482) (GNU read-only after relocation) 0x194-0x197.7 (4) @@ -976,7 +976,32 @@ $ fq -d elf dv a_stripped 0x3450| 00 00 00 00| ....| info: 0 0x345c-0x345f.7 (4) 0x3460|04 00 00 00 |.... | addralign: 4 0x3460-0x3463.7 (4) 0x3460| 00 00 00 00 | .... | entsize: 0 0x3464-0x3467.7 (4) - | | | [21]{}: section_header 0x3004-0x34b7.7 (1204) + | | | [21]{}: section_header 0x3468-0x348f.7 (40) +0x3460| aa 00 00 00 | .... | name: ".bss" (170) 0x3468-0x346b.7 (4) +0x3460| 08 00 00 00| ....| type: "nobits" (0x8) (No space in the file) 0x346c-0x346f.7 (4) + | | | flags{}: 0x3470-0x3473.7 (4) +0x3470|03 |. | link_order: false 0x3470-0x3470 (0.1) +0x3470|03 |. | info_link: false 0x3470.1-0x3470.1 (0.1) +0x3470|03 |. | strings: false 0x3470.2-0x3470.2 (0.1) +0x3470|03 |. | merge: false 0x3470.3-0x3470.3 (0.1) +0x3470|03 |. | unused0: 0 0x3470.4-0x3470.4 (0.1) +0x3470|03 |. | execinstr: false 0x3470.5-0x3470.5 (0.1) +0x3470|03 |. | alloc: true 0x3470.6-0x3470.6 (0.1) +0x3470|03 |. | write: true 0x3470.7-0x3470.7 (0.1) +0x3470| 00 | . | tls: false 0x3471-0x3471 (0.1) +0x3470| 00 | . | group: false 0x3471.1-0x3471.1 (0.1) +0x3470| 00 | . | os_nonconforming: false 0x3471.2-0x3471.2 (0.1) +0x3470| 00 00 | .. | unused1: 0 0x3471.3-0x3472.3 (1.1) +0x3470| 00 00 | .. | os_specific: 0 0x3472.4-0x3473.3 (1) +0x3470| 00 | . | processor_specific: 0 0x3473.4-0x3473.7 (0.4) +0x3470| 04 40 00 00 | .@.. | addr: 0x4004 0x3474-0x3477.7 (4) +0x3470| 04 30 00 00 | .0.. | offset: 12292 0x3478-0x347b.7 (4) +0x3470| 20 00 00 00| ...| size: 0x20 0x347c-0x347f.7 (4) +0x3480|00 00 00 00 |.... | link: 0 0x3480-0x3483.7 (4) +0x3480| 00 00 00 00 | .... | info: 0 0x3484-0x3487.7 (4) +0x3480| 04 00 00 00 | .... | addralign: 4 0x3488-0x348b.7 (4) +0x3480| 00 00 00 00| ....| entsize: 0 0x348c-0x348f.7 (4) + | | | [22]{}: section_header 0x3004-0x34b7.7 (1204) 0x3000| 47 43 43 3a 20 28 41 6c 70 69 6e 65| GCC: (Alpine| data: raw bits 0x3004-0x3065.7 (98) 0x3010|20 31 30 2e 33 2e 31 5f 67 69 74 32 30 32 31 30| 10.3.1_git20210| * |until 0x3065.7 (98) | | @@ -1004,7 +1029,7 @@ $ fq -d elf dv a_stripped 0x34a0| 00 00 00 00| ....| info: 0 0x34ac-0x34af.7 (4) 0x34b0|01 00 00 00 |.... | addralign: 1 0x34b0-0x34b3.7 (4) 0x34b0| 01 00 00 00 | .... | entsize: 1 0x34b4-0x34b7.7 (4) - | | | [22]{}: section_header 0x3066-0x34df.7 (1146) + | | | [23]{}: section_header 0x3066-0x34df.7 (1146) 0x3060| 00 2e 73 68 73 74 72 74 61 62| ..shstrtab| string: "\x00.shstrtab\x00.interp\x00.note.gnu.property\x00.gnu.hash\x00.d"... 0x3066-0x311d.7 (184) 0x3070|00 2e 69 6e 74 65 72 70 00 2e 6e 6f 74 65 2e 67|..interp..note.g| * |until 0x311d.7 (184) | | @@ -1032,31 +1057,6 @@ $ fq -d elf dv a_stripped 0x34d0| 00 00 00 00 | .... | info: 0 0x34d4-0x34d7.7 (4) 0x34d0| 01 00 00 00 | .... | addralign: 1 0x34d8-0x34db.7 (4) 0x34d0| 00 00 00 00| ....| entsize: 0 0x34dc-0x34df.7 (4) - | | | [23]{}: section_header 0x3468-0x348f.7 (40) -0x3460| aa 00 00 00 | .... | name: ".bss" (170) 0x3468-0x346b.7 (4) -0x3460| 08 00 00 00| ....| type: "nobits" (0x8) (No space in the file) 0x346c-0x346f.7 (4) - | | | flags{}: 0x3470-0x3473.7 (4) -0x3470|03 |. | link_order: false 0x3470-0x3470 (0.1) -0x3470|03 |. | info_link: false 0x3470.1-0x3470.1 (0.1) -0x3470|03 |. | strings: false 0x3470.2-0x3470.2 (0.1) -0x3470|03 |. | merge: false 0x3470.3-0x3470.3 (0.1) -0x3470|03 |. | unused0: 0 0x3470.4-0x3470.4 (0.1) -0x3470|03 |. | execinstr: false 0x3470.5-0x3470.5 (0.1) -0x3470|03 |. | alloc: true 0x3470.6-0x3470.6 (0.1) -0x3470|03 |. | write: true 0x3470.7-0x3470.7 (0.1) -0x3470| 00 | . | tls: false 0x3471-0x3471 (0.1) -0x3470| 00 | . | group: false 0x3471.1-0x3471.1 (0.1) -0x3470| 00 | . | os_nonconforming: false 0x3471.2-0x3471.2 (0.1) -0x3470| 00 00 | .. | unused1: 0 0x3471.3-0x3472.3 (1.1) -0x3470| 00 00 | .. | os_specific: 0 0x3472.4-0x3473.3 (1) -0x3470| 00 | . | processor_specific: 0 0x3473.4-0x3473.7 (0.4) -0x3470| 04 40 00 00 | .@.. | addr: 0x4004 0x3474-0x3477.7 (4) -0x3470| 04 30 00 00 | .0.. | offset: 12292 0x3478-0x347b.7 (4) -0x3470| 20 00 00 00| ...| size: 0x20 0x347c-0x347f.7 (4) -0x3480|00 00 00 00 |.... | link: 0 0x3480-0x3483.7 (4) -0x3480| 00 00 00 00 | .... | info: 0 0x3484-0x3487.7 (4) -0x3480| 04 00 00 00 | .... | addralign: 4 0x3488-0x348b.7 (4) -0x3480| 00 00 00 00| ....| entsize: 0 0x348c-0x348f.7 (4) 0x03f0| 00 00 00 00 00 00 00 00 00 00 00 00| ............| unknown0: raw bits 0x3f4-0xfff.7 (3084) 0x0400|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................| * |until 0xfff.7 (3084) | | diff --git a/format/elf/testdata/linux_386/libbbb.a.fqtest b/format/elf/testdata/linux_386/libbbb.a.fqtest index 744c11ac9..6ecf27bc2 100644 --- a/format/elf/testdata/linux_386/libbbb.a.fqtest +++ b/format/elf/testdata/linux_386/libbbb.a.fqtest @@ -141,7 +141,37 @@ $ fq -d ar dv libbbb.a 0x3d0| 01 00| ..| addralign: 1 0x3de-0x3e1.7 (4) 0x3e0|00 00 |.. | 0x3e0| 00 00 00 00 | .... | entsize: 0 0x3e2-0x3e5.7 (4) - | | | [3]{}: section_header 0x115-0x435.7 (801) + | | | [3]{}: section_header 0x2a6-0x40d.7 (360) +0x2a0| 08 00 00 00 02 06 00 00 0d 00| ..........| data: raw bits 0x2a6-0x2c5.7 (32) +0x2b0|00 00 0a 07 00 00 16 00 00 00 09 03 00 00 1e 00|................| +0x2c0|00 00 04 08 00 00 |...... | +0x3e0| 1b 00 00 00 | .... | name: ".rel.text" (27) 0x3e6-0x3e9.7 (4) +0x3e0| 09 00 00 00 | .... | type: "rel" (0x9) (Relocation entries without explicit addends) 0x3ea-0x3ed.7 (4) + | | | flags{}: 0x3ee-0x3f1.7 (4) +0x3e0| 40 | @ | link_order: false 0x3ee-0x3ee (0.1) +0x3e0| 40 | @ | info_link: true 0x3ee.1-0x3ee.1 (0.1) +0x3e0| 40 | @ | strings: false 0x3ee.2-0x3ee.2 (0.1) +0x3e0| 40 | @ | merge: false 0x3ee.3-0x3ee.3 (0.1) +0x3e0| 40 | @ | unused0: 0 0x3ee.4-0x3ee.4 (0.1) +0x3e0| 40 | @ | execinstr: false 0x3ee.5-0x3ee.5 (0.1) +0x3e0| 40 | @ | alloc: false 0x3ee.6-0x3ee.6 (0.1) +0x3e0| 40 | @ | write: false 0x3ee.7-0x3ee.7 (0.1) +0x3e0| 00| .| tls: false 0x3ef-0x3ef (0.1) +0x3e0| 00| .| group: false 0x3ef.1-0x3ef.1 (0.1) +0x3e0| 00| .| os_nonconforming: false 0x3ef.2-0x3ef.2 (0.1) +0x3e0| 00| .| unused1: 0 0x3ef.3-0x3f0.3 (1.1) +0x3f0|00 |. | +0x3f0|00 00 |.. | os_specific: 0 0x3f0.4-0x3f1.3 (1) +0x3f0| 00 | . | processor_specific: 0 0x3f1.4-0x3f1.7 (0.4) +0x3f0| 00 00 00 00 | .... | addr: 0x0 0x3f2-0x3f5.7 (4) +0x3f0| f8 01 00 00 | .... | offset: 504 0x3f6-0x3f9.7 (4) +0x3f0| 20 00 00 00 | ... | size: 0x20 0x3fa-0x3fd.7 (4) +0x3f0| 0d 00| ..| link: 13 0x3fe-0x401.7 (4) +0x400|00 00 |.. | +0x400| 02 00 00 00 | .... | info: 2 0x402-0x405.7 (4) +0x400| 04 00 00 00 | .... | addralign: 4 0x406-0x409.7 (4) +0x400| 08 00 00 00 | .... | entsize: 8 0x40a-0x40d.7 (4) + | | | [4]{}: section_header 0x115-0x435.7 (801) | | | data: raw bits 0x115-NA (0) 0x400| 25 00| %.| name: ".data" (37) 0x40e-0x411.7 (4) 0x410|00 00 |.. | @@ -170,7 +200,34 @@ $ fq -d ar dv libbbb.a 0x420| 01 00| ..| addralign: 1 0x42e-0x431.7 (4) 0x430|00 00 |.. | 0x430| 00 00 00 00 | .... | entsize: 0 0x432-0x435.7 (4) - | | | [4]{}: section_header 0x115-0x485.7 (881) + | | | [5]{}: section_header 0x436-0x45d.7 (40) +0x430| 2b 00 00 00 | +... | name: ".bss" (43) 0x436-0x439.7 (4) +0x430| 08 00 00 00 | .... | type: "nobits" (0x8) (No space in the file) 0x43a-0x43d.7 (4) + | | | flags{}: 0x43e-0x441.7 (4) +0x430| 03 | . | link_order: false 0x43e-0x43e (0.1) +0x430| 03 | . | info_link: false 0x43e.1-0x43e.1 (0.1) +0x430| 03 | . | strings: false 0x43e.2-0x43e.2 (0.1) +0x430| 03 | . | merge: false 0x43e.3-0x43e.3 (0.1) +0x430| 03 | . | unused0: 0 0x43e.4-0x43e.4 (0.1) +0x430| 03 | . | execinstr: false 0x43e.5-0x43e.5 (0.1) +0x430| 03 | . | alloc: true 0x43e.6-0x43e.6 (0.1) +0x430| 03 | . | write: true 0x43e.7-0x43e.7 (0.1) +0x430| 00| .| tls: false 0x43f-0x43f (0.1) +0x430| 00| .| group: false 0x43f.1-0x43f.1 (0.1) +0x430| 00| .| os_nonconforming: false 0x43f.2-0x43f.2 (0.1) +0x430| 00| .| unused1: 0 0x43f.3-0x440.3 (1.1) +0x440|00 |. | +0x440|00 00 |.. | os_specific: 0 0x440.4-0x441.3 (1) +0x440| 00 | . | processor_specific: 0 0x441.4-0x441.7 (0.4) +0x440| 00 00 00 00 | .... | addr: 0x0 0x442-0x445.7 (4) +0x440| 67 00 00 00 | g... | offset: 103 0x446-0x449.7 (4) +0x440| 00 00 00 00 | .... | size: 0x0 0x44a-0x44d.7 (4) +0x440| 00 00| ..| link: 0 0x44e-0x451.7 (4) +0x450|00 00 |.. | +0x450| 00 00 00 00 | .... | info: 0 0x452-0x455.7 (4) +0x450| 01 00 00 00 | .... | addralign: 1 0x456-0x459.7 (4) +0x450| 00 00 00 00 | .... | entsize: 0 0x45a-0x45d.7 (4) + | | | [6]{}: section_header 0x115-0x485.7 (881) 0x110| 6c 69 62 62 62 62 5f 62 62 62 00| libbbb_bbb.| data: raw bits 0x115-0x11f.7 (11) 0x450| 30 00| 0.| name: ".rodata" (48) 0x45e-0x461.7 (4) 0x460|00 00 |.. | @@ -199,7 +256,7 @@ $ fq -d ar dv libbbb.a 0x470| 01 00| ..| addralign: 1 0x47e-0x481.7 (4) 0x480|00 00 |.. | 0x480| 00 00 00 00 | .... | entsize: 0 0x482-0x485.7 (4) - | | | [5]{}: section_header 0x120-0x4ad.7 (910) + | | | [7]{}: section_header 0x120-0x4ad.7 (910) 0x120|8b 04 24 c3 |..$. | data: raw bits 0x120-0x123.7 (4) 0x480| 38 00 00 00 | 8... | name: ".text.__x86.get_pc_thunk.ax" (56) 0x486-0x489.7 (4) 0x480| 01 00 00 00 | .... | type: "progbits" (0x1) (Information defined by the program) 0x48a-0x48d.7 (4) @@ -227,7 +284,7 @@ $ fq -d ar dv libbbb.a 0x4a0| 00 00 00 00 | .... | info: 0 0x4a2-0x4a5.7 (4) 0x4a0| 01 00 00 00 | .... | addralign: 1 0x4a6-0x4a9.7 (4) 0x4a0| 00 00 00 00 | .... | entsize: 0 0x4aa-0x4ad.7 (4) - | | | [6]{}: section_header 0x124-0x4d5.7 (946) + | | | [8]{}: section_header 0x124-0x4d5.7 (946) 0x120| 00 47 43 43 3a 20 28 41 6c 70 69 6e| .GCC: (Alpin| data: raw bits 0x124-0x155.7 (50) 0x130|65 20 31 30 2e 33 2e 31 5f 67 69 74 32 30 32 31|e 10.3.1_git2021| * |until 0x155.7 (50) | | @@ -258,7 +315,7 @@ $ fq -d ar dv libbbb.a 0x4c0| 01 00| ..| addralign: 1 0x4ce-0x4d1.7 (4) 0x4d0|00 00 |.. | 0x4d0| 01 00 00 00 | .... | entsize: 1 0x4d2-0x4d5.7 (4) - | | | [7]{}: section_header 0x156-0x4fd.7 (936) + | | | [9]{}: section_header 0x156-0x4fd.7 (936) | | | data: raw bits 0x156-NA (0) 0x4d0| 5d 00 00 00 | ]... | name: ".note.GNU-stack" (93) 0x4d6-0x4d9.7 (4) 0x4d0| 01 00 00 00 | .... | type: "progbits" (0x1) (Information defined by the program) 0x4da-0x4dd.7 (4) @@ -286,7 +343,7 @@ $ fq -d ar dv libbbb.a 0x4f0| 00 00 00 00 | .... | info: 0 0x4f2-0x4f5.7 (4) 0x4f0| 01 00 00 00 | .... | addralign: 1 0x4f6-0x4f9.7 (4) 0x4f0| 00 00 00 00 | .... | entsize: 0 0x4fa-0x4fd.7 (4) - | | | [8]{}: section_header 0x156-0x525.7 (976) + | | | [10]{}: section_header 0x156-0x525.7 (976) 0x150| 04 00 00 00 18 00 00 00 05 00| ..........| data: raw bits 0x156-0x17d.7 (40) 0x160|00 00 47 4e 55 00 02 00 01 c0 04 00 00 00 00 00|..GNU...........| 0x170|00 00 01 00 01 c0 04 00 00 00 01 00 00 00 |.............. | @@ -317,7 +374,7 @@ $ fq -d ar dv libbbb.a 0x510| 04 00| ..| addralign: 4 0x51e-0x521.7 (4) 0x520|00 00 |.. | 0x520| 00 00 00 00 | .... | entsize: 0 0x522-0x525.7 (4) - | | | [9]{}: section_header 0x17e-0x54d.7 (976) + | | | [11]{}: section_header 0x17e-0x54d.7 (976) 0x170| 14 00| ..| data: raw bits 0x17e-0x1cd.7 (80) 0x180|00 00 00 00 00 00 01 7a 52 00 01 7c 08 01 1b 0c|.......zR..|....| * |until 0x1cd.7 (80) | | @@ -347,7 +404,37 @@ $ fq -d ar dv libbbb.a 0x540| 00 00 00 00 | .... | info: 0 0x542-0x545.7 (4) 0x540| 04 00 00 00 | .... | addralign: 4 0x546-0x549.7 (4) 0x540| 00 00 00 00 | .... | entsize: 0 0x54a-0x54d.7 (4) - | | | [10]{}: section_header 0x1ce-0x59d.7 (976) + | | | [12]{}: section_header 0x2c6-0x575.7 (688) +0x2c0| 20 00 00 00 02 02 00 00 44 00| .......D.| data: raw bits 0x2c6-0x2d5.7 (16) +0x2d0|00 00 02 04 00 00 |...... | +0x540| 80 00| ..| name: ".rel.eh_frame" (128) 0x54e-0x551.7 (4) +0x550|00 00 |.. | +0x550| 09 00 00 00 | .... | type: "rel" (0x9) (Relocation entries without explicit addends) 0x552-0x555.7 (4) + | | | flags{}: 0x556-0x559.7 (4) +0x550| 40 | @ | link_order: false 0x556-0x556 (0.1) +0x550| 40 | @ | info_link: true 0x556.1-0x556.1 (0.1) +0x550| 40 | @ | strings: false 0x556.2-0x556.2 (0.1) +0x550| 40 | @ | merge: false 0x556.3-0x556.3 (0.1) +0x550| 40 | @ | unused0: 0 0x556.4-0x556.4 (0.1) +0x550| 40 | @ | execinstr: false 0x556.5-0x556.5 (0.1) +0x550| 40 | @ | alloc: false 0x556.6-0x556.6 (0.1) +0x550| 40 | @ | write: false 0x556.7-0x556.7 (0.1) +0x550| 00 | . | tls: false 0x557-0x557 (0.1) +0x550| 00 | . | group: false 0x557.1-0x557.1 (0.1) +0x550| 00 | . | os_nonconforming: false 0x557.2-0x557.2 (0.1) +0x550| 00 00 | .. | unused1: 0 0x557.3-0x558.3 (1.1) +0x550| 00 00 | .. | os_specific: 0 0x558.4-0x559.3 (1) +0x550| 00 | . | processor_specific: 0 0x559.4-0x559.7 (0.4) +0x550| 00 00 00 00 | .... | addr: 0x0 0x55a-0x55d.7 (4) +0x550| 18 02| ..| offset: 536 0x55e-0x561.7 (4) +0x560|00 00 |.. | +0x560| 10 00 00 00 | .... | size: 0x10 0x562-0x565.7 (4) +0x560| 0d 00 00 00 | .... | link: 13 0x566-0x569.7 (4) +0x560| 0b 00 00 00 | .... | info: 11 0x56a-0x56d.7 (4) +0x560| 04 00| ..| addralign: 4 0x56e-0x571.7 (4) +0x570|00 00 |.. | +0x570| 08 00 00 00 | .... | entsize: 8 0x572-0x575.7 (4) + | | | [13]{}: section_header 0x1ce-0x59d.7 (976) | | | symbol_table[0:9]: 0x1ce-0x25d.7 (144) | | | [0]{}: symbol 0x1ce-0x1dd.7 (16) 0x1c0| 00 00| ..| name: "" (0) 0x1ce-0x1d1.7 (4) @@ -465,7 +552,7 @@ $ fq -d ar dv libbbb.a 0x590| 05 00 00 00 | .... | info: 5 0x592-0x595.7 (4) 0x590| 04 00 00 00 | .... | addralign: 4 0x596-0x599.7 (4) 0x590| 10 00 00 00 | .... | entsize: 16 0x59a-0x59d.7 (4) - | | | [11]{}: section_header 0x25e-0x5c5.7 (872) + | | | [14]{}: section_header 0x25e-0x5c5.7 (872) 0x250| 00 6c| .l| string: "\x00libbbb.c\x00libbbb_bbb\x00__x86.get_pc_thunk.ax\x00_GLOBAL"... 0x25e-0x2a3.7 (70) 0x260|69 62 62 62 62 2e 63 00 6c 69 62 62 62 62 5f 62|ibbbb.c.libbbb_b| * |until 0x2a3.7 (70) | | @@ -496,67 +583,7 @@ $ fq -d ar dv libbbb.a 0x5b0| 01 00| ..| addralign: 1 0x5be-0x5c1.7 (4) 0x5c0|00 00 |.. | 0x5c0| 00 00 00 00 | .... | entsize: 0 0x5c2-0x5c5.7 (4) - | | | [12]{}: section_header 0x2a6-0x40d.7 (360) -0x2a0| 08 00 00 00 02 06 00 00 0d 00| ..........| data: raw bits 0x2a6-0x2c5.7 (32) -0x2b0|00 00 0a 07 00 00 16 00 00 00 09 03 00 00 1e 00|................| -0x2c0|00 00 04 08 00 00 |...... | -0x3e0| 1b 00 00 00 | .... | name: ".rel.text" (27) 0x3e6-0x3e9.7 (4) -0x3e0| 09 00 00 00 | .... | type: "rel" (0x9) (Relocation entries without explicit addends) 0x3ea-0x3ed.7 (4) - | | | flags{}: 0x3ee-0x3f1.7 (4) -0x3e0| 40 | @ | link_order: false 0x3ee-0x3ee (0.1) -0x3e0| 40 | @ | info_link: true 0x3ee.1-0x3ee.1 (0.1) -0x3e0| 40 | @ | strings: false 0x3ee.2-0x3ee.2 (0.1) -0x3e0| 40 | @ | merge: false 0x3ee.3-0x3ee.3 (0.1) -0x3e0| 40 | @ | unused0: 0 0x3ee.4-0x3ee.4 (0.1) -0x3e0| 40 | @ | execinstr: false 0x3ee.5-0x3ee.5 (0.1) -0x3e0| 40 | @ | alloc: false 0x3ee.6-0x3ee.6 (0.1) -0x3e0| 40 | @ | write: false 0x3ee.7-0x3ee.7 (0.1) -0x3e0| 00| .| tls: false 0x3ef-0x3ef (0.1) -0x3e0| 00| .| group: false 0x3ef.1-0x3ef.1 (0.1) -0x3e0| 00| .| os_nonconforming: false 0x3ef.2-0x3ef.2 (0.1) -0x3e0| 00| .| unused1: 0 0x3ef.3-0x3f0.3 (1.1) -0x3f0|00 |. | -0x3f0|00 00 |.. | os_specific: 0 0x3f0.4-0x3f1.3 (1) -0x3f0| 00 | . | processor_specific: 0 0x3f1.4-0x3f1.7 (0.4) -0x3f0| 00 00 00 00 | .... | addr: 0x0 0x3f2-0x3f5.7 (4) -0x3f0| f8 01 00 00 | .... | offset: 504 0x3f6-0x3f9.7 (4) -0x3f0| 20 00 00 00 | ... | size: 0x20 0x3fa-0x3fd.7 (4) -0x3f0| 0d 00| ..| link: 13 0x3fe-0x401.7 (4) -0x400|00 00 |.. | -0x400| 02 00 00 00 | .... | info: 2 0x402-0x405.7 (4) -0x400| 04 00 00 00 | .... | addralign: 4 0x406-0x409.7 (4) -0x400| 08 00 00 00 | .... | entsize: 8 0x40a-0x40d.7 (4) - | | | [13]{}: section_header 0x2c6-0x575.7 (688) -0x2c0| 20 00 00 00 02 02 00 00 44 00| .......D.| data: raw bits 0x2c6-0x2d5.7 (16) -0x2d0|00 00 02 04 00 00 |...... | -0x540| 80 00| ..| name: ".rel.eh_frame" (128) 0x54e-0x551.7 (4) -0x550|00 00 |.. | -0x550| 09 00 00 00 | .... | type: "rel" (0x9) (Relocation entries without explicit addends) 0x552-0x555.7 (4) - | | | flags{}: 0x556-0x559.7 (4) -0x550| 40 | @ | link_order: false 0x556-0x556 (0.1) -0x550| 40 | @ | info_link: true 0x556.1-0x556.1 (0.1) -0x550| 40 | @ | strings: false 0x556.2-0x556.2 (0.1) -0x550| 40 | @ | merge: false 0x556.3-0x556.3 (0.1) -0x550| 40 | @ | unused0: 0 0x556.4-0x556.4 (0.1) -0x550| 40 | @ | execinstr: false 0x556.5-0x556.5 (0.1) -0x550| 40 | @ | alloc: false 0x556.6-0x556.6 (0.1) -0x550| 40 | @ | write: false 0x556.7-0x556.7 (0.1) -0x550| 00 | . | tls: false 0x557-0x557 (0.1) -0x550| 00 | . | group: false 0x557.1-0x557.1 (0.1) -0x550| 00 | . | os_nonconforming: false 0x557.2-0x557.2 (0.1) -0x550| 00 00 | .. | unused1: 0 0x557.3-0x558.3 (1.1) -0x550| 00 00 | .. | os_specific: 0 0x558.4-0x559.3 (1) -0x550| 00 | . | processor_specific: 0 0x559.4-0x559.7 (0.4) -0x550| 00 00 00 00 | .... | addr: 0x0 0x55a-0x55d.7 (4) -0x550| 18 02| ..| offset: 536 0x55e-0x561.7 (4) -0x560|00 00 |.. | -0x560| 10 00 00 00 | .... | size: 0x10 0x562-0x565.7 (4) -0x560| 0d 00 00 00 | .... | link: 13 0x566-0x569.7 (4) -0x560| 0b 00 00 00 | .... | info: 11 0x56a-0x56d.7 (4) -0x560| 04 00| ..| addralign: 4 0x56e-0x571.7 (4) -0x570|00 00 |.. | -0x570| 08 00 00 00 | .... | entsize: 8 0x572-0x575.7 (4) - | | | [14]{}: section_header 0x2d6-0x5ed.7 (792) + | | | [15]{}: section_header 0x2d6-0x5ed.7 (792) 0x2d0| 00 2e 73 79 6d 74 61 62 00 2e| ..symtab..| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.rel.text\x00.data\x00.bss\x00.r"... 0x2d6-0x36a.7 (149) 0x2e0|73 74 72 74 61 62 00 2e 73 68 73 74 72 74 61 62|strtab..shstrtab| * |until 0x36a.7 (149) | | @@ -586,33 +613,6 @@ $ fq -d ar dv libbbb.a 0x5e0| 00 00 00 00 | .... | info: 0 0x5e2-0x5e5.7 (4) 0x5e0| 01 00 00 00 | .... | addralign: 1 0x5e6-0x5e9.7 (4) 0x5e0| 00 00 00 00| | ....| | entsize: 0 0x5ea-0x5ed.7 (4) - | | | [15]{}: section_header 0x436-0x45d.7 (40) -0x430| 2b 00 00 00 | +... | name: ".bss" (43) 0x436-0x439.7 (4) -0x430| 08 00 00 00 | .... | type: "nobits" (0x8) (No space in the file) 0x43a-0x43d.7 (4) - | | | flags{}: 0x43e-0x441.7 (4) -0x430| 03 | . | link_order: false 0x43e-0x43e (0.1) -0x430| 03 | . | info_link: false 0x43e.1-0x43e.1 (0.1) -0x430| 03 | . | strings: false 0x43e.2-0x43e.2 (0.1) -0x430| 03 | . | merge: false 0x43e.3-0x43e.3 (0.1) -0x430| 03 | . | unused0: 0 0x43e.4-0x43e.4 (0.1) -0x430| 03 | . | execinstr: false 0x43e.5-0x43e.5 (0.1) -0x430| 03 | . | alloc: true 0x43e.6-0x43e.6 (0.1) -0x430| 03 | . | write: true 0x43e.7-0x43e.7 (0.1) -0x430| 00| .| tls: false 0x43f-0x43f (0.1) -0x430| 00| .| group: false 0x43f.1-0x43f.1 (0.1) -0x430| 00| .| os_nonconforming: false 0x43f.2-0x43f.2 (0.1) -0x430| 00| .| unused1: 0 0x43f.3-0x440.3 (1.1) -0x440|00 |. | -0x440|00 00 |.. | os_specific: 0 0x440.4-0x441.3 (1) -0x440| 00 | . | processor_specific: 0 0x441.4-0x441.7 (0.4) -0x440| 00 00 00 00 | .... | addr: 0x0 0x442-0x445.7 (4) -0x440| 67 00 00 00 | g... | offset: 103 0x446-0x449.7 (4) -0x440| 00 00 00 00 | .... | size: 0x0 0x44a-0x44d.7 (4) -0x440| 00 00| ..| link: 0 0x44e-0x451.7 (4) -0x450|00 00 |.. | -0x450| 00 00 00 00 | .... | info: 0 0x452-0x455.7 (4) -0x450| 01 00 00 00 | .... | addralign: 1 0x456-0x459.7 (4) -0x450| 00 00 00 00 | .... | entsize: 0 0x45a-0x45d.7 (4) 0x2a0| 00 00 | .. | unknown0: raw bits 0x2a4-0x2a5.7 (2) 0x360| 00 00 00 | ... | unknown1: raw bits 0x36b-0x36d.7 (3) | | | program_headers[0:0]: 0x5ee-NA (0) diff --git a/format/elf/testdata/linux_386/libbbb.so.fqtest b/format/elf/testdata/linux_386/libbbb.so.fqtest index 390104d28..71a2196a1 100644 --- a/format/elf/testdata/linux_386/libbbb.so.fqtest +++ b/format/elf/testdata/linux_386/libbbb.so.fqtest @@ -40,23 +40,7 @@ $ fq -d elf dv libbbb.so 0x0040| 04 | . | x: false 0x4c.7-0x4c.7 (0.1) 0x0040| 00 00 00| ...| unused1: 0 0x4d-0x4f.7 (3) 0x0050|00 10 00 00 |.... | align: 4096 0x50-0x53.7 (4) - | | | [1]{}: program_header 0x0-0x153.7 (340) - | | | program_header{}: 0x0-0x153.7 (340) - | | | data: raw bits 0x0-NA (0) -0x0130| 51 e5 74 64 | Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0x134-0x137.7 (4) -0x0130| 00 00 00 00 | .... | offset: 0x0 0x138-0x13b.7 (4) -0x0130| 00 00 00 00| ....| vaddr: 0x0 0x13c-0x13f.7 (4) -0x0140|00 00 00 00 |.... | paddr: 0x0 0x140-0x143.7 (4) -0x0140| 00 00 00 00 | .... | filesz: 0 0x144-0x147.7 (4) -0x0140| 00 00 00 00 | .... | memsz: 0 0x148-0x14b.7 (4) - | | | flags{}: 0x14c-0x14f.7 (4) -0x0140| 06 | . | unused0: 0 0x14c-0x14c.4 (0.5) -0x0140| 06 | . | r: true 0x14c.5-0x14c.5 (0.1) -0x0140| 06 | . | w: true 0x14c.6-0x14c.6 (0.1) -0x0140| 06 | . | x: false 0x14c.7-0x14c.7 (0.1) -0x0140| 00 00 00| ...| unused1: 0 0x14d-0x14f.7 (3) -0x0150|10 00 00 00 |.... | align: 16 0x150-0x153.7 (4) - | | | [2]{}: program_header 0x54-0x127c.7 (4649) + | | | [1]{}: program_header 0x54-0x127c.7 (4649) | | | program_header{}: 0x54-0x127c.7 (4649) 0x0050| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x54-0x57.7 (4) 0x0050| 00 10 00 00 | .... | offset: 0x1000 0x58-0x5b.7 (4) @@ -73,7 +57,7 @@ $ fq -d elf dv libbbb.so 0x0070|00 10 00 00 |.... | align: 4096 0x70-0x73.7 (4) 0x1000|83 ec 0c e8 98 01 00 00 e8 23 02 00 00 83 c4 0c|.........#......| data: raw bits 0x1000-0x127c.7 (637) * |until 0x127c.7 (637) | | - | | | [3]{}: program_header 0x74-0x20eb.7 (8312) + | | | [2]{}: program_header 0x74-0x20eb.7 (8312) | | | program_header{}: 0x74-0x20eb.7 (8312) 0x0070| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x74-0x77.7 (4) 0x0070| 00 20 00 00 | . .. | offset: 0x2000 0x78-0x7b.7 (4) @@ -90,7 +74,7 @@ $ fq -d elf dv libbbb.so 0x0090|00 10 00 00 |.... | align: 4096 0x90-0x93.7 (4) 0x2000|6c 69 62 62 62 62 5f 62 62 62 00 00 01 1b 03 3b|libbbb_bbb.....;| data: raw bits 0x2000-0x20eb.7 (236) * |until 0x20eb.7 (236) | | - | | | [4]{}: program_header 0x94-0x3003.7 (12144) + | | | [3]{}: program_header 0x94-0x3003.7 (12144) | | | program_header{}: 0x94-0x3003.7 (12144) 0x0090| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x94-0x97.7 (4) 0x0090| 14 2f 00 00 | ./.. | offset: 0x2f14 0x98-0x9b.7 (4) @@ -108,7 +92,7 @@ $ fq -d elf dv libbbb.so 0x2f10| ff ff ff ff 00 00 00 00 ff ff ff ff| ............| data: raw bits 0x2f14-0x3003.7 (240) 0x2f20|00 00 00 00 01 00 00 00 9c 00 00 00 0c 00 00 00|................| * |until 0x3003.7 (240) | | - | | | [5]{}: program_header 0xb4-0x2fdb.7 (12072) + | | | [4]{}: program_header 0xb4-0x2fdb.7 (12072) | | | program_header{}: 0xb4-0x2fdb.7 (12072) 0x00b0| 02 00 00 00 | .... | type: "dynamic" (2) (Dynamic linking information) 0xb4-0xb7.7 (4) 0x00b0| 24 2f 00 00 | $/.. | offset: 0x2f24 0xb8-0xbb.7 (4) @@ -126,7 +110,7 @@ $ fq -d elf dv libbbb.so 0x2f20| 01 00 00 00 9c 00 00 00 0c 00 00 00| ............| data: raw bits 0x2f24-0x2fdb.7 (184) 0x2f30|00 10 00 00 0d 00 00 00 71 12 00 00 f5 fe ff 6f|........q......o| * |until 0x2fdb.7 (184) | | - | | | [6]{}: program_header 0xd4-0x20eb.7 (8216) + | | | [5]{}: program_header 0xd4-0x20eb.7 (8216) | | | program_header{}: 0xd4-0x20eb.7 (8216) 0x00d0| 04 00 00 00 | .... | type: "note" (4) (Auxiliary information) 0xd4-0xd7.7 (4) 0x00d0| c4 20 00 00 | . .. | offset: 0x20c4 0xd8-0xdb.7 (4) @@ -144,7 +128,7 @@ $ fq -d elf dv libbbb.so 0x20c0| 04 00 00 00 18 00 00 00 05 00 00 00| ............| data: raw bits 0x20c4-0x20eb.7 (40) 0x20d0|47 4e 55 00 01 00 01 c0 04 00 00 00 01 00 00 00|GNU.............| 0x20e0|02 00 01 c0 04 00 00 00 00 00 00 00 |............ | - | | | [7]{}: program_header 0xf4-0x20eb.7 (8184) + | | | [6]{}: program_header 0xf4-0x20eb.7 (8184) | | | program_header{}: 0xf4-0x20eb.7 (8184) 0x00f0| 53 e5 74 64 | S.td | type: "os" (1685382483) (Operating system-specific) 0xf4-0xf7.7 (4) 0x00f0| c4 20 00 00 | . .. | offset: 0x20c4 0xf8-0xfb.7 (4) @@ -162,7 +146,7 @@ $ fq -d elf dv libbbb.so 0x20c0| 04 00 00 00 18 00 00 00 05 00 00 00| ............| data: raw bits 0x20c4-0x20eb.7 (40) 0x20d0|47 4e 55 00 01 00 01 c0 04 00 00 00 01 00 00 00|GNU.............| 0x20e0|02 00 01 c0 04 00 00 00 00 00 00 00 |............ | - | | | [8]{}: program_header 0x114-0x2037.7 (7972) + | | | [7]{}: program_header 0x114-0x2037.7 (7972) | | | program_header{}: 0x114-0x2037.7 (7972) 0x0110| 50 e5 74 64 | P.td | type: "gnu_eh_frame" (1685382480) (GNU frame unwind information) 0x114-0x117.7 (4) 0x0110| 0c 20 00 00 | . .. | offset: 0x200c 0x118-0x11b.7 (4) @@ -180,6 +164,22 @@ $ fq -d elf dv libbbb.so 0x2000| 01 1b 03 3b| ...;| data: raw bits 0x200c-0x2037.7 (44) 0x2010|28 00 00 00 04 00 00 00 14 f0 ff ff 44 00 00 00|(...........D...| * |until 0x2037.7 (44) | | + | | | [8]{}: program_header 0x0-0x153.7 (340) + | | | program_header{}: 0x0-0x153.7 (340) + | | | data: raw bits 0x0-NA (0) +0x0130| 51 e5 74 64 | Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0x134-0x137.7 (4) +0x0130| 00 00 00 00 | .... | offset: 0x0 0x138-0x13b.7 (4) +0x0130| 00 00 00 00| ....| vaddr: 0x0 0x13c-0x13f.7 (4) +0x0140|00 00 00 00 |.... | paddr: 0x0 0x140-0x143.7 (4) +0x0140| 00 00 00 00 | .... | filesz: 0 0x144-0x147.7 (4) +0x0140| 00 00 00 00 | .... | memsz: 0 0x148-0x14b.7 (4) + | | | flags{}: 0x14c-0x14f.7 (4) +0x0140| 06 | . | unused0: 0 0x14c-0x14c.4 (0.5) +0x0140| 06 | . | r: true 0x14c.5-0x14c.5 (0.1) +0x0140| 06 | . | w: true 0x14c.6-0x14c.6 (0.1) +0x0140| 06 | . | x: false 0x14c.7-0x14c.7 (0.1) +0x0140| 00 00 00| ...| unused1: 0 0x14d-0x14f.7 (3) +0x0150|10 00 00 00 |.... | align: 16 0x150-0x153.7 (4) | | | [9]{}: program_header 0x154-0x2fff.7 (11948) | | | program_header{}: 0x154-0x2fff.7 (11948) 0x0150| 52 e5 74 64 | R.td | type: "gnu_relro" (1685382482) (GNU read-only after relocation) 0x154-0x157.7 (4) @@ -901,7 +901,32 @@ $ fq -d elf dv libbbb.so 0x3aa0| 00 00 00 00| ....| info: 0 0x3aac-0x3aaf.7 (4) 0x3ab0|04 00 00 00 |.... | addralign: 4 0x3ab0-0x3ab3.7 (4) 0x3ab0| 00 00 00 00 | .... | entsize: 0 0x3ab4-0x3ab7.7 (4) - | | | [20]{}: section_header 0x3004-0x3b07.7 (2820) + | | | [20]{}: section_header 0x3ab8-0x3adf.7 (40) +0x3ab0| b2 00 00 00 | .... | name: ".bss" (178) 0x3ab8-0x3abb.7 (4) +0x3ab0| 08 00 00 00| ....| type: "nobits" (0x8) (No space in the file) 0x3abc-0x3abf.7 (4) + | | | flags{}: 0x3ac0-0x3ac3.7 (4) +0x3ac0|03 |. | link_order: false 0x3ac0-0x3ac0 (0.1) +0x3ac0|03 |. | info_link: false 0x3ac0.1-0x3ac0.1 (0.1) +0x3ac0|03 |. | strings: false 0x3ac0.2-0x3ac0.2 (0.1) +0x3ac0|03 |. | merge: false 0x3ac0.3-0x3ac0.3 (0.1) +0x3ac0|03 |. | unused0: 0 0x3ac0.4-0x3ac0.4 (0.1) +0x3ac0|03 |. | execinstr: false 0x3ac0.5-0x3ac0.5 (0.1) +0x3ac0|03 |. | alloc: true 0x3ac0.6-0x3ac0.6 (0.1) +0x3ac0|03 |. | write: true 0x3ac0.7-0x3ac0.7 (0.1) +0x3ac0| 00 | . | tls: false 0x3ac1-0x3ac1 (0.1) +0x3ac0| 00 | . | group: false 0x3ac1.1-0x3ac1.1 (0.1) +0x3ac0| 00 | . | os_nonconforming: false 0x3ac1.2-0x3ac1.2 (0.1) +0x3ac0| 00 00 | .. | unused1: 0 0x3ac1.3-0x3ac2.3 (1.1) +0x3ac0| 00 00 | .. | os_specific: 0 0x3ac2.4-0x3ac3.3 (1) +0x3ac0| 00 | . | processor_specific: 0 0x3ac3.4-0x3ac3.7 (0.4) +0x3ac0| 04 40 00 00 | .@.. | addr: 0x4004 0x3ac4-0x3ac7.7 (4) +0x3ac0| 04 30 00 00 | .0.. | offset: 12292 0x3ac8-0x3acb.7 (4) +0x3ac0| 20 00 00 00| ...| size: 0x20 0x3acc-0x3acf.7 (4) +0x3ad0|00 00 00 00 |.... | link: 0 0x3ad0-0x3ad3.7 (4) +0x3ad0| 00 00 00 00 | .... | info: 0 0x3ad4-0x3ad7.7 (4) +0x3ad0| 04 00 00 00 | .... | addralign: 4 0x3ad8-0x3adb.7 (4) +0x3ad0| 00 00 00 00| ....| entsize: 0 0x3adc-0x3adf.7 (4) + | | | [21]{}: section_header 0x3004-0x3b07.7 (2820) 0x3000| 47 43 43 3a 20 28 41 6c 70 69 6e 65| GCC: (Alpine| data: raw bits 0x3004-0x3034.7 (49) 0x3010|20 31 30 2e 33 2e 31 5f 67 69 74 32 30 32 31 31| 10.3.1_git20211| * |until 0x3034.7 (49) | | @@ -929,7 +954,7 @@ $ fq -d elf dv libbbb.so 0x3af0| 00 00 00 00| ....| info: 0 0x3afc-0x3aff.7 (4) 0x3b00|01 00 00 00 |.... | addralign: 1 0x3b00-0x3b03.7 (4) 0x3b00| 01 00 00 00 | .... | entsize: 1 0x3b04-0x3b07.7 (4) - | | | [21]{}: section_header 0x3038-0x3b2f.7 (2808) + | | | [22]{}: section_header 0x3038-0x3b2f.7 (2808) 0x3030| 24 00 00 00 02 00 00 00| $.......| data: raw bits 0x3038-0x3087.7 (80) 0x3040|00 00 04 00 00 00 00 00 00 10 00 00 03 00 00 00|................| * |until 0x3087.7 (80) | | @@ -957,7 +982,7 @@ $ fq -d elf dv libbbb.so 0x3b20| 00 00 00 00 | .... | info: 0 0x3b24-0x3b27.7 (4) 0x3b20| 08 00 00 00 | .... | addralign: 8 0x3b28-0x3b2b.7 (4) 0x3b20| 00 00 00 00| ....| entsize: 0 0x3b2c-0x3b2f.7 (4) - | | | [22]{}: section_header 0x3088-0x3b57.7 (2768) + | | | [23]{}: section_header 0x3088-0x3b57.7 (2768) 0x3080| 1e 00 00 00 02 00 00 00| ........| data: raw bits 0x3088-0x30cb.7 (68) 0x3090|00 00 04 01 00 00 00 00 00 00 00 00 00 00 00 00|................| * |until 0x30cb.7 (68) | | @@ -985,7 +1010,7 @@ $ fq -d elf dv libbbb.so 0x3b40| 00 00 00 00| ....| info: 0 0x3b4c-0x3b4f.7 (4) 0x3b50|01 00 00 00 |.... | addralign: 1 0x3b50-0x3b53.7 (4) 0x3b50| 00 00 00 00 | .... | entsize: 0 0x3b54-0x3b57.7 (4) - | | | [23]{}: section_header 0x30cc-0x3b7f.7 (2740) + | | | [24]{}: section_header 0x30cc-0x3b7f.7 (2740) 0x30c0| 01 11 00 10| ....| data: raw bits 0x30cc-0x30ef.7 (36) 0x30d0|06 55 06 03 0e 1b 0e 25 0e 13 05 00 00 00 01 11|.U.....%........| 0x30e0|00 10 06 55 06 03 0e 1b 0e 25 0e 13 05 00 00 00|...U.....%......| @@ -1013,7 +1038,7 @@ $ fq -d elf dv libbbb.so 0x3b70| 00 00 00 00 | .... | info: 0 0x3b74-0x3b77.7 (4) 0x3b70| 01 00 00 00 | .... | addralign: 1 0x3b78-0x3b7b.7 (4) 0x3b70| 00 00 00 00| ....| entsize: 0 0x3b7c-0x3b7f.7 (4) - | | | [24]{}: section_header 0x30f0-0x3ba7.7 (2744) + | | | [25]{}: section_header 0x30f0-0x3ba7.7 (2744) 0x30f0|48 00 00 00 03 00 26 00 00 00 01 01 fb 0e 0d 00|H.....&.........| data: raw bits 0x30f0-0x3187.7 (152) * |until 0x3187.7 (152) | | 0x3b80|e9 00 00 00 |.... | name: ".debug_line" (233) 0x3b80-0x3b83.7 (4) @@ -1040,7 +1065,7 @@ $ fq -d elf dv libbbb.so 0x3b90| 00 00 00 00| ....| info: 0 0x3b9c-0x3b9f.7 (4) 0x3ba0|01 00 00 00 |.... | addralign: 1 0x3ba0-0x3ba3.7 (4) 0x3ba0| 00 00 00 00 | .... | entsize: 0 0x3ba4-0x3ba7.7 (4) - | | | [25]{}: section_header 0x3188-0x3bcf.7 (2632) + | | | [26]{}: section_header 0x3188-0x3bcf.7 (2632) 0x3180| 63 72 74 2f 69 33 38 36| crt/i386| data: raw bits 0x3188-0x31df.7 (88) 0x3190|2f 63 72 74 69 2e 73 00 2f 68 6f 6d 65 2f 62 75|/crti.s./home/bu| * |until 0x31df.7 (88) | | @@ -1068,7 +1093,7 @@ $ fq -d elf dv libbbb.so 0x3bc0| 00 00 00 00 | .... | info: 0 0x3bc4-0x3bc7.7 (4) 0x3bc0| 01 00 00 00 | .... | addralign: 1 0x3bc8-0x3bcb.7 (4) 0x3bc0| 01 00 00 00| ....| entsize: 1 0x3bcc-0x3bcf.7 (4) - | | | [26]{}: section_header 0x31e0-0x3bf7.7 (2584) + | | | [27]{}: section_header 0x31e0-0x3bf7.7 (2584) 0x31e0|ff ff ff ff 00 00 00 00 00 10 00 00 03 10 00 00|................| data: raw bits 0x31e0-0x321f.7 (64) * |until 0x321f.7 (64) | | 0x3bd0|00 01 00 00 |.... | name: ".debug_ranges" (256) 0x3bd0-0x3bd3.7 (4) @@ -1095,7 +1120,7 @@ $ fq -d elf dv libbbb.so 0x3be0| 00 00 00 00| ....| info: 0 0x3bec-0x3bef.7 (4) 0x3bf0|08 00 00 00 |.... | addralign: 8 0x3bf0-0x3bf3.7 (4) 0x3bf0| 00 00 00 00 | .... | entsize: 0 0x3bf4-0x3bf7.7 (4) - | | | [27]{}: section_header 0x3220-0x3c1f.7 (2560) + | | | [28]{}: section_header 0x3220-0x3c1f.7 (2560) | | | symbol_table[0:37]: 0x3220-0x346f.7 (592) | | | [0]{}: symbol 0x3220-0x322f.7 (16) 0x3220|00 00 00 00 |.... | name: "" (0) 0x3220-0x3223.7 (4) @@ -1454,7 +1479,7 @@ $ fq -d elf dv libbbb.so 0x3c10| 1c 00 00 00 | .... | info: 28 0x3c14-0x3c17.7 (4) 0x3c10| 04 00 00 00 | .... | addralign: 4 0x3c18-0x3c1b.7 (4) 0x3c10| 10 00 00 00| ....| entsize: 16 0x3c1c-0x3c1f.7 (4) - | | | [28]{}: section_header 0x3470-0x3c47.7 (2008) + | | | [29]{}: section_header 0x3470-0x3c47.7 (2008) 0x3470|00 63 72 74 73 74 75 66 66 2e 63 00 5f 5f 43 54|.crtstuff.c.__CT| string: "\x00crtstuff.c\x00__CTOR_LIST__\x00__DTOR_LIST__\x00__EH_FRAME"... 0x3470-0x3686.7 (535) * |until 0x3686.7 (535) | | 0x3c20|09 00 00 00 |.... | name: ".strtab" (9) 0x3c20-0x3c23.7 (4) @@ -1481,7 +1506,7 @@ $ fq -d elf dv libbbb.so 0x3c30| 00 00 00 00| ....| info: 0 0x3c3c-0x3c3f.7 (4) 0x3c40|01 00 00 00 |.... | addralign: 1 0x3c40-0x3c43.7 (4) 0x3c40| 00 00 00 00 | .... | entsize: 0 0x3c44-0x3c47.7 (4) - | | | [29]{}: section_header 0x3687-0x3c6f.7 (1513) + | | | [30]{}: section_header 0x3687-0x3c6f.7 (1513) 0x3680| 00 2e 73 79 6d 74 61 62 00| ..symtab.| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.gnu.hash\x00.dynsym\x00.dyns"... 0x3687-0x3794.7 (270) 0x3690|2e 73 74 72 74 61 62 00 2e 73 68 73 74 72 74 61|.strtab..shstrta| * |until 0x3794.7 (270) | | @@ -1509,31 +1534,6 @@ $ fq -d elf dv libbbb.so 0x3c60| 00 00 00 00 | .... | info: 0 0x3c64-0x3c67.7 (4) 0x3c60| 01 00 00 00 | .... | addralign: 1 0x3c68-0x3c6b.7 (4) 0x3c60| 00 00 00 00| ....| entsize: 0 0x3c6c-0x3c6f.7 (4) - | | | [30]{}: section_header 0x3ab8-0x3adf.7 (40) -0x3ab0| b2 00 00 00 | .... | name: ".bss" (178) 0x3ab8-0x3abb.7 (4) -0x3ab0| 08 00 00 00| ....| type: "nobits" (0x8) (No space in the file) 0x3abc-0x3abf.7 (4) - | | | flags{}: 0x3ac0-0x3ac3.7 (4) -0x3ac0|03 |. | link_order: false 0x3ac0-0x3ac0 (0.1) -0x3ac0|03 |. | info_link: false 0x3ac0.1-0x3ac0.1 (0.1) -0x3ac0|03 |. | strings: false 0x3ac0.2-0x3ac0.2 (0.1) -0x3ac0|03 |. | merge: false 0x3ac0.3-0x3ac0.3 (0.1) -0x3ac0|03 |. | unused0: 0 0x3ac0.4-0x3ac0.4 (0.1) -0x3ac0|03 |. | execinstr: false 0x3ac0.5-0x3ac0.5 (0.1) -0x3ac0|03 |. | alloc: true 0x3ac0.6-0x3ac0.6 (0.1) -0x3ac0|03 |. | write: true 0x3ac0.7-0x3ac0.7 (0.1) -0x3ac0| 00 | . | tls: false 0x3ac1-0x3ac1 (0.1) -0x3ac0| 00 | . | group: false 0x3ac1.1-0x3ac1.1 (0.1) -0x3ac0| 00 | . | os_nonconforming: false 0x3ac1.2-0x3ac1.2 (0.1) -0x3ac0| 00 00 | .. | unused1: 0 0x3ac1.3-0x3ac2.3 (1.1) -0x3ac0| 00 00 | .. | os_specific: 0 0x3ac2.4-0x3ac3.3 (1) -0x3ac0| 00 | . | processor_specific: 0 0x3ac3.4-0x3ac3.7 (0.4) -0x3ac0| 04 40 00 00 | .@.. | addr: 0x4004 0x3ac4-0x3ac7.7 (4) -0x3ac0| 04 30 00 00 | .0.. | offset: 12292 0x3ac8-0x3acb.7 (4) -0x3ac0| 20 00 00 00| ...| size: 0x20 0x3acc-0x3acf.7 (4) -0x3ad0|00 00 00 00 |.... | link: 0 0x3ad0-0x3ad3.7 (4) -0x3ad0| 00 00 00 00 | .... | info: 0 0x3ad4-0x3ad7.7 (4) -0x3ad0| 04 00 00 00 | .... | addralign: 4 0x3ad8-0x3adb.7 (4) -0x3ad0| 00 00 00 00| ....| entsize: 0 0x3adc-0x3adf.7 (4) 0x0320| 00 00 00 00 00 00 00 00| ........| unknown0: raw bits 0x328-0xfff.7 (3288) 0x0330|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................| * |until 0xfff.7 (3288) | | diff --git a/format/elf/testdata/linux_amd64/a_dynamic.fqtest b/format/elf/testdata/linux_amd64/a_dynamic.fqtest index 31b49fa69..a78ae35d0 100644 --- a/format/elf/testdata/linux_amd64/a_dynamic.fqtest +++ b/format/elf/testdata/linux_amd64/a_dynamic.fqtest @@ -23,40 +23,7 @@ $ fq -d elf dv a_dynamic 0x0030| 22 00 | ". | shnum: 34 0x3c-0x3d.7 (2) 0x0030| 21 00| !.| shstrndx: 33 0x3e-0x3f.7 (2) | | | program_headers[0:12]: 0x0-0x3007.7 (12296) - | | | [0]{}: program_header 0x0-0x607.7 (1544) - | | | program_header{}: 0x0-0x607.7 (1544) -0x0000|7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00|.ELF............| data: raw bits 0x0-0x607.7 (1544) -* |until 0x607.7 (1544) | | -0x00b0|01 00 00 00 |.... | type: "load" (1) (Loadable segment) 0xb0-0xb3.7 (4) - | | | flags{}: 0xb4-0xb7.7 (4) -0x00b0| 04 | . | unused0: 0 0xb4-0xb4.4 (0.5) -0x00b0| 04 | . | r: true 0xb4.5-0xb4.5 (0.1) -0x00b0| 04 | . | w: false 0xb4.6-0xb4.6 (0.1) -0x00b0| 04 | . | x: false 0xb4.7-0xb4.7 (0.1) -0x00b0| 00 00 00 | ... | unused1: 0 0xb5-0xb7.7 (3) -0x00b0| 00 00 00 00 00 00 00 00| ........| offset: 0x0 0xb8-0xbf.7 (8) -0x00c0|00 00 00 00 00 00 00 00 |........ | vaddr: 0x0 0xc0-0xc7.7 (8) -0x00c0| 00 00 00 00 00 00 00 00| ........| paddr: 0x0 0xc8-0xcf.7 (8) -0x00d0|08 06 00 00 00 00 00 00 |........ | filesz: 1544 0xd0-0xd7.7 (8) -0x00d0| 08 06 00 00 00 00 00 00| ........| memsz: 1544 0xd8-0xdf.7 (8) -0x00e0|00 10 00 00 00 00 00 00 |........ | align: 4096 0xe0-0xe7.7 (8) - | | | [1]{}: program_header 0x0-0x2a7.7 (680) - | | | program_header{}: 0x0-0x2a7.7 (680) - | | | data: raw bits 0x0-NA (0) -0x0270|51 e5 74 64 |Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0x270-0x273.7 (4) - | | | flags{}: 0x274-0x277.7 (4) -0x0270| 06 | . | unused0: 0 0x274-0x274.4 (0.5) -0x0270| 06 | . | r: true 0x274.5-0x274.5 (0.1) -0x0270| 06 | . | w: true 0x274.6-0x274.6 (0.1) -0x0270| 06 | . | x: false 0x274.7-0x274.7 (0.1) -0x0270| 00 00 00 | ... | unused1: 0 0x275-0x277.7 (3) -0x0270| 00 00 00 00 00 00 00 00| ........| offset: 0x0 0x278-0x27f.7 (8) -0x0280|00 00 00 00 00 00 00 00 |........ | vaddr: 0x0 0x280-0x287.7 (8) -0x0280| 00 00 00 00 00 00 00 00| ........| paddr: 0x0 0x288-0x28f.7 (8) -0x0290|00 00 00 00 00 00 00 00 |........ | filesz: 0 0x290-0x297.7 (8) -0x0290| 00 00 00 00 00 00 00 00| ........| memsz: 0 0x298-0x29f.7 (8) -0x02a0|10 00 00 00 00 00 00 00 |........ | align: 16 0x2a0-0x2a7.7 (8) - | | | [2]{}: program_header 0x40-0x2df.7 (672) + | | | [0]{}: program_header 0x40-0x2df.7 (672) | | | program_header{}: 0x40-0x2df.7 (672) 0x0040|06 00 00 00 |.... | type: "phdr" (6) (Program header location and size) 0x40-0x43.7 (4) 0x0040|06 00 00 00 04 00 00 00 40 00 00 00 00 00 00 00|........@.......| data: raw bits 0x40-0x2df.7 (672) @@ -73,7 +40,7 @@ $ fq -d elf dv a_dynamic 0x0060|a0 02 00 00 00 00 00 00 |........ | filesz: 672 0x60-0x67.7 (8) 0x0060| a0 02 00 00 00 00 00 00| ........| memsz: 672 0x68-0x6f.7 (8) 0x0070|08 00 00 00 00 00 00 00 |........ | align: 8 0x70-0x77.7 (8) - | | | [3]{}: program_header 0x78-0x2f8.7 (641) + | | | [1]{}: program_header 0x78-0x2f8.7 (641) | | | program_header{}: 0x78-0x2f8.7 (641) 0x0070| 03 00 00 00 | .... | type: "interp" (3) (Interpreter to invoke) 0x78-0x7b.7 (4) | | | flags{}: 0x7c-0x7f.7 (4) @@ -90,7 +57,24 @@ $ fq -d elf dv a_dynamic 0x00a0| 01 00 00 00 00 00 00 00| ........| align: 1 0xa8-0xaf.7 (8) 0x02e0|2f 6c 69 62 2f 6c 64 2d 6d 75 73 6c 2d 78 38 36|/lib/ld-musl-x86| data: raw bits 0x2e0-0x2f8.7 (25) 0x02f0|5f 36 34 2e 73 6f 2e 31 00 |_64.so.1. | - | | | [4]{}: program_header 0xe8-0x1288.7 (4513) + | | | [2]{}: program_header 0x0-0x607.7 (1544) + | | | program_header{}: 0x0-0x607.7 (1544) +0x0000|7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00|.ELF............| data: raw bits 0x0-0x607.7 (1544) +* |until 0x607.7 (1544) | | +0x00b0|01 00 00 00 |.... | type: "load" (1) (Loadable segment) 0xb0-0xb3.7 (4) + | | | flags{}: 0xb4-0xb7.7 (4) +0x00b0| 04 | . | unused0: 0 0xb4-0xb4.4 (0.5) +0x00b0| 04 | . | r: true 0xb4.5-0xb4.5 (0.1) +0x00b0| 04 | . | w: false 0xb4.6-0xb4.6 (0.1) +0x00b0| 04 | . | x: false 0xb4.7-0xb4.7 (0.1) +0x00b0| 00 00 00 | ... | unused1: 0 0xb5-0xb7.7 (3) +0x00b0| 00 00 00 00 00 00 00 00| ........| offset: 0x0 0xb8-0xbf.7 (8) +0x00c0|00 00 00 00 00 00 00 00 |........ | vaddr: 0x0 0xc0-0xc7.7 (8) +0x00c0| 00 00 00 00 00 00 00 00| ........| paddr: 0x0 0xc8-0xcf.7 (8) +0x00d0|08 06 00 00 00 00 00 00 |........ | filesz: 1544 0xd0-0xd7.7 (8) +0x00d0| 08 06 00 00 00 00 00 00| ........| memsz: 1544 0xd8-0xdf.7 (8) +0x00e0|00 10 00 00 00 00 00 00 |........ | align: 4096 0xe0-0xe7.7 (8) + | | | [3]{}: program_header 0xe8-0x1288.7 (4513) | | | program_header{}: 0xe8-0x1288.7 (4513) 0x00e0| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0xe8-0xeb.7 (4) | | | flags{}: 0xec-0xef.7 (4) @@ -107,7 +91,7 @@ $ fq -d elf dv a_dynamic 0x0110| 00 10 00 00 00 00 00 00| ........| align: 4096 0x118-0x11f.7 (8) 0x1000|50 e8 ca 01 00 00 e8 35 02 00 00 58 c3 00 00 00|P......5...X....| data: raw bits 0x1000-0x1288.7 (649) * |until 0x1288.7 (649) | | - | | | [5]{}: program_header 0x120-0x20cb.7 (8108) + | | | [4]{}: program_header 0x120-0x20cb.7 (8108) | | | program_header{}: 0x120-0x20cb.7 (8108) 0x0120|01 00 00 00 |.... | type: "load" (1) (Loadable segment) 0x120-0x123.7 (4) | | | flags{}: 0x124-0x127.7 (4) @@ -124,7 +108,7 @@ $ fq -d elf dv a_dynamic 0x0150|00 10 00 00 00 00 00 00 |........ | align: 4096 0x150-0x157.7 (8) 0x2000|61 61 61 00 01 1b 03 3b 28 00 00 00 04 00 00 00|aaa....;(.......| data: raw bits 0x2000-0x20cb.7 (204) * |until 0x20cb.7 (204) | | - | | | [6]{}: program_header 0x158-0x3007.7 (11952) + | | | [5]{}: program_header 0x158-0x3007.7 (11952) | | | program_header{}: 0x158-0x3007.7 (11952) 0x0150| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x158-0x15b.7 (4) | | | flags{}: 0x15c-0x15f.7 (4) @@ -142,7 +126,7 @@ $ fq -d elf dv a_dynamic 0x2df0| ff ff ff ff ff ff ff ff| ........| data: raw bits 0x2df8-0x3007.7 (528) 0x2e00|00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff|................| * |until 0x3007.7 (528) | | - | | | [7]{}: program_header 0x190-0x2fa7.7 (11800) + | | | [6]{}: program_header 0x190-0x2fa7.7 (11800) | | | program_header{}: 0x190-0x2fa7.7 (11800) 0x0190|02 00 00 00 |.... | type: "dynamic" (2) (Dynamic linking information) 0x190-0x193.7 (4) | | | flags{}: 0x194-0x197.7 (4) @@ -160,7 +144,7 @@ $ fq -d elf dv a_dynamic 0x2e10| 01 00 00 00 00 00 00 00| ........| data: raw bits 0x2e18-0x2fa7.7 (400) 0x2e20|a2 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00|................| * |until 0x2fa7.7 (400) | | - | | | [8]{}: program_header 0x1c8-0x32f.7 (360) + | | | [7]{}: program_header 0x1c8-0x32f.7 (360) | | | program_header{}: 0x1c8-0x32f.7 (360) 0x01c0| 04 00 00 00 | .... | type: "note" (4) (Auxiliary information) 0x1c8-0x1cb.7 (4) | | | flags{}: 0x1cc-0x1cf.7 (4) @@ -177,7 +161,7 @@ $ fq -d elf dv a_dynamic 0x01f0| 08 00 00 00 00 00 00 00| ........| align: 8 0x1f8-0x1ff.7 (8) 0x0300|04 00 00 00 20 00 00 00 05 00 00 00 47 4e 55 00|.... .......GNU.| data: raw bits 0x300-0x32f.7 (48) * |until 0x32f.7 (48) | | - | | | [9]{}: program_header 0x200-0x32f.7 (304) + | | | [8]{}: program_header 0x200-0x32f.7 (304) | | | program_header{}: 0x200-0x32f.7 (304) 0x0200|53 e5 74 64 |S.td | type: "os" (1685382483) (Operating system-specific) 0x200-0x203.7 (4) | | | flags{}: 0x204-0x207.7 (4) @@ -194,7 +178,7 @@ $ fq -d elf dv a_dynamic 0x0230|08 00 00 00 00 00 00 00 |........ | align: 8 0x230-0x237.7 (8) 0x0300|04 00 00 00 20 00 00 00 05 00 00 00 47 4e 55 00|.... .......GNU.| data: raw bits 0x300-0x32f.7 (48) * |until 0x32f.7 (48) | | - | | | [10]{}: program_header 0x238-0x202f.7 (7672) + | | | [9]{}: program_header 0x238-0x202f.7 (7672) | | | program_header{}: 0x238-0x202f.7 (7672) 0x0230| 50 e5 74 64 | P.td | type: "gnu_eh_frame" (1685382480) (GNU frame unwind information) 0x238-0x23b.7 (4) | | | flags{}: 0x23c-0x23f.7 (4) @@ -212,6 +196,22 @@ $ fq -d elf dv a_dynamic 0x2000| 01 1b 03 3b 28 00 00 00 04 00 00 00| ...;(.......| data: raw bits 0x2004-0x202f.7 (44) 0x2010|0c f0 ff ff 44 00 00 00 4c f0 ff ff 6c 00 00 00|....D...L...l...| 0x2020|01 f2 ff ff 84 00 00 00 14 f2 ff ff a4 00 00 00|................| + | | | [10]{}: program_header 0x0-0x2a7.7 (680) + | | | program_header{}: 0x0-0x2a7.7 (680) + | | | data: raw bits 0x0-NA (0) +0x0270|51 e5 74 64 |Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0x270-0x273.7 (4) + | | | flags{}: 0x274-0x277.7 (4) +0x0270| 06 | . | unused0: 0 0x274-0x274.4 (0.5) +0x0270| 06 | . | r: true 0x274.5-0x274.5 (0.1) +0x0270| 06 | . | w: true 0x274.6-0x274.6 (0.1) +0x0270| 06 | . | x: false 0x274.7-0x274.7 (0.1) +0x0270| 00 00 00 | ... | unused1: 0 0x275-0x277.7 (3) +0x0270| 00 00 00 00 00 00 00 00| ........| offset: 0x0 0x278-0x27f.7 (8) +0x0280|00 00 00 00 00 00 00 00 |........ | vaddr: 0x0 0x280-0x287.7 (8) +0x0280| 00 00 00 00 00 00 00 00| ........| paddr: 0x0 0x288-0x28f.7 (8) +0x0290|00 00 00 00 00 00 00 00 |........ | filesz: 0 0x290-0x297.7 (8) +0x0290| 00 00 00 00 00 00 00 00| ........| memsz: 0 0x298-0x29f.7 (8) +0x02a0|10 00 00 00 00 00 00 00 |........ | align: 16 0x2a0-0x2a7.7 (8) | | | [11]{}: program_header 0x2a8-0x2fff.7 (11608) | | | program_header{}: 0x2a8-0x2fff.7 (11608) 0x02a0| 52 e5 74 64 | R.td | type: "gnu_relro" (1685382482) (GNU read-only after relocation) 0x2a8-0x2ab.7 (4) @@ -996,7 +996,33 @@ $ fq -d elf dv a_dynamic 0x43e0| 00 00 00 00| ....| info: 0 0x43ec-0x43ef.7 (4) 0x43f0|08 00 00 00 00 00 00 00 |........ | addralign: 8 0x43f0-0x43f7.7 (8) 0x43f0| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x43f8-0x43ff.7 (8) - | | | [21]{}: section_header 0x3008-0x447f.7 (5240) + | | | [21]{}: section_header 0x4400-0x443f.7 (64) +0x4400|bc 00 00 00 |.... | name: ".bss" (188) 0x4400-0x4403.7 (4) +0x4400| 08 00 00 00 | .... | type: "nobits" (0x8) (No space in the file) 0x4404-0x4407.7 (4) + | | | flags{}: 0x4408-0x440f.7 (8) +0x4400| 03 | . | link_order: false 0x4408-0x4408 (0.1) +0x4400| 03 | . | info_link: false 0x4408.1-0x4408.1 (0.1) +0x4400| 03 | . | strings: false 0x4408.2-0x4408.2 (0.1) +0x4400| 03 | . | merge: false 0x4408.3-0x4408.3 (0.1) +0x4400| 03 | . | unused0: 0 0x4408.4-0x4408.4 (0.1) +0x4400| 03 | . | execinstr: false 0x4408.5-0x4408.5 (0.1) +0x4400| 03 | . | alloc: true 0x4408.6-0x4408.6 (0.1) +0x4400| 03 | . | write: true 0x4408.7-0x4408.7 (0.1) +0x4400| 00 | . | tls: false 0x4409-0x4409 (0.1) +0x4400| 00 | . | group: false 0x4409.1-0x4409.1 (0.1) +0x4400| 00 | . | os_nonconforming: false 0x4409.2-0x4409.2 (0.1) +0x4400| 00 00 | .. | unused1: 0 0x4409.3-0x440a.3 (1.1) +0x4400| 00 00 | .. | os_specific: 0 0x440a.4-0x440b.3 (1) +0x4400| 00 | . | processor_specific: 0 0x440b.4-0x440b.7 (0.4) +0x4400| 00 00 00 00| ....| unused2: 0 0x440c-0x440f.7 (4) +0x4410|20 40 00 00 00 00 00 00 | @...... | addr: 0x4020 0x4410-0x4417.7 (8) +0x4410| 08 30 00 00 00 00 00 00| .0......| offset: 0x3008 0x4418-0x441f.7 (8) +0x4420|50 00 00 00 00 00 00 00 |P....... | size: 80 0x4420-0x4427.7 (8) +0x4420| 00 00 00 00 | .... | link: 0 0x4428-0x442b.7 (4) +0x4420| 00 00 00 00| ....| info: 0 0x442c-0x442f.7 (4) +0x4430|20 00 00 00 00 00 00 00 | ....... | addralign: 32 0x4430-0x4437.7 (8) +0x4430| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x4438-0x443f.7 (8) + | | | [22]{}: section_header 0x3008-0x447f.7 (5240) 0x3000| 47 43 43 3a 20 28 41 6c| GCC: (Al| data: raw bits 0x3008-0x3069.7 (98) 0x3010|70 69 6e 65 20 31 30 2e 33 2e 31 5f 67 69 74 32|pine 10.3.1_git2| * |until 0x3069.7 (98) | | @@ -1025,7 +1051,7 @@ $ fq -d elf dv a_dynamic 0x4460| 00 00 00 00| ....| info: 0 0x446c-0x446f.7 (4) 0x4470|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x4470-0x4477.7 (8) 0x4470| 01 00 00 00 00 00 00 00| ........| entsize: 1 0x4478-0x447f.7 (8) - | | | [22]{}: section_header 0x3070-0x44bf.7 (5200) + | | | [23]{}: section_header 0x3070-0x44bf.7 (5200) 0x3070|2c 00 00 00 02 00 00 00 00 00 08 00 00 00 00 00|,...............| data: raw bits 0x3070-0x311f.7 (176) * |until 0x311f.7 (176) | | 0x4480|ca 00 00 00 |.... | name: ".debug_aranges" (202) 0x4480-0x4483.7 (4) @@ -1053,7 +1079,7 @@ $ fq -d elf dv a_dynamic 0x44a0| 00 00 00 00| ....| info: 0 0x44ac-0x44af.7 (4) 0x44b0|10 00 00 00 00 00 00 00 |........ | addralign: 16 0x44b0-0x44b7.7 (8) 0x44b0| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x44b8-0x44bf.7 (8) - | | | [23]{}: section_header 0x3120-0x44ff.7 (5088) + | | | [24]{}: section_header 0x3120-0x44ff.7 (5088) 0x3120|f1 00 00 00 04 00 00 00 00 00 08 01 53 00 00 00|............S...| data: raw bits 0x3120-0x3258.7 (313) * |until 0x3258.7 (313) | | 0x44c0|d9 00 00 00 |.... | name: ".debug_info" (217) 0x44c0-0x44c3.7 (4) @@ -1081,7 +1107,7 @@ $ fq -d elf dv a_dynamic 0x44e0| 00 00 00 00| ....| info: 0 0x44ec-0x44ef.7 (4) 0x44f0|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x44f0-0x44f7.7 (8) 0x44f0| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x44f8-0x44ff.7 (8) - | | | [24]{}: section_header 0x3259-0x453f.7 (4839) + | | | [25]{}: section_header 0x3259-0x453f.7 (4839) 0x3250| 01 11 01 25 0e 13 0b| ...%...| data: raw bits 0x3259-0x3320.7 (200) 0x3260|03 0e 1b 0e 55 17 11 01 10 17 00 00 02 24 00 0b|....U........$..| * |until 0x3320.7 (200) | | @@ -1110,7 +1136,7 @@ $ fq -d elf dv a_dynamic 0x4520| 00 00 00 00| ....| info: 0 0x452c-0x452f.7 (4) 0x4530|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x4530-0x4537.7 (8) 0x4530| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x4538-0x453f.7 (8) - | | | [25]{}: section_header 0x3321-0x457f.7 (4703) + | | | [26]{}: section_header 0x3321-0x457f.7 (4703) 0x3320| 4c 00 00 00 03 00 21 00 00 00 01 01 fb 0e 0d| L.....!........| data: raw bits 0x3321-0x341c.7 (252) 0x3330|00 01 01 01 01 00 00 00 01 00 00 01 63 72 74 00|............crt.| * |until 0x341c.7 (252) | | @@ -1139,7 +1165,7 @@ $ fq -d elf dv a_dynamic 0x4560| 00 00 00 00| ....| info: 0 0x456c-0x456f.7 (4) 0x4570|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x4570-0x4577.7 (8) 0x4570| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x4578-0x457f.7 (8) - | | | [26]{}: section_header 0x3420-0x45bf.7 (4512) + | | | [27]{}: section_header 0x3420-0x45bf.7 (4512) 0x3420|14 00 00 00 ff ff ff ff 01 00 01 78 10 0c 07 08|...........x....| data: raw bits 0x3420-0x344f.7 (48) * |until 0x344f.7 (48) | | 0x4580|ff 00 00 00 |.... | name: ".debug_frame" (255) 0x4580-0x4583.7 (4) @@ -1167,7 +1193,7 @@ $ fq -d elf dv a_dynamic 0x45a0| 00 00 00 00| ....| info: 0 0x45ac-0x45af.7 (4) 0x45b0|08 00 00 00 00 00 00 00 |........ | addralign: 8 0x45b0-0x45b7.7 (8) 0x45b0| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x45b8-0x45bf.7 (8) - | | | [27]{}: section_header 0x3450-0x45ff.7 (4528) + | | | [28]{}: section_header 0x3450-0x45ff.7 (4528) 0x3450|6c 6f 6e 67 20 6c 6f 6e 67 20 69 6e 74 00 63 72|long long int.cr| data: raw bits 0x3450-0x361d.7 (462) * |until 0x361d.7 (462) | | 0x45c0|0c 01 00 00 |.... | name: ".debug_str" (268) 0x45c0-0x45c3.7 (4) @@ -1195,7 +1221,7 @@ $ fq -d elf dv a_dynamic 0x45e0| 00 00 00 00| ....| info: 0 0x45ec-0x45ef.7 (4) 0x45f0|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x45f0-0x45f7.7 (8) 0x45f0| 01 00 00 00 00 00 00 00| ........| entsize: 1 0x45f8-0x45ff.7 (8) - | | | [28]{}: section_header 0x361e-0x463f.7 (4130) + | | | [29]{}: section_header 0x361e-0x463f.7 (4130) 0x3610| 00 00| ..| data: raw bits 0x361e-0x3703.7 (230) 0x3620|00 00 00 00 86 10 00 00 00 00 00 00 a5 10 00 00|................| * |until 0x3703.7 (230) | | @@ -1224,7 +1250,7 @@ $ fq -d elf dv a_dynamic 0x4620| 00 00 00 00| ....| info: 0 0x462c-0x462f.7 (4) 0x4630|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x4630-0x4637.7 (8) 0x4630| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x4638-0x463f.7 (8) - | | | [29]{}: section_header 0x3710-0x467f.7 (3952) + | | | [30]{}: section_header 0x3710-0x467f.7 (3952) 0x3710|86 10 00 00 00 00 00 00 aa 10 00 00 00 00 00 00|................| data: raw bits 0x3710-0x37af.7 (160) * |until 0x37af.7 (160) | | 0x4640|22 01 00 00 |"... | name: ".debug_ranges" (290) 0x4640-0x4643.7 (4) @@ -1252,7 +1278,7 @@ $ fq -d elf dv a_dynamic 0x4660| 00 00 00 00| ....| info: 0 0x466c-0x466f.7 (4) 0x4670|10 00 00 00 00 00 00 00 |........ | addralign: 16 0x4670-0x4677.7 (8) 0x4670| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x4678-0x467f.7 (8) - | | | [30]{}: section_header 0x37b0-0x46bf.7 (3856) + | | | [31]{}: section_header 0x37b0-0x46bf.7 (3856) | | | symbol_table[0:42]: 0x37b0-0x3b9f.7 (1008) | | | [0]{}: symbol 0x37b0-0x37c7.7 (24) 0x37b0|00 00 00 00 |.... | name: "" (0) 0x37b0-0x37b3.7 (4) @@ -1657,7 +1683,7 @@ $ fq -d elf dv a_dynamic 0x46a0| 16 00 00 00| ....| info: 22 0x46ac-0x46af.7 (4) 0x46b0|08 00 00 00 00 00 00 00 |........ | addralign: 8 0x46b0-0x46b7.7 (8) 0x46b0| 18 00 00 00 00 00 00 00| ........| entsize: 24 0x46b8-0x46bf.7 (8) - | | | [31]{}: section_header 0x3ba0-0x46ff.7 (2912) + | | | [32]{}: section_header 0x3ba0-0x46ff.7 (2912) 0x3ba0|00 53 63 72 74 31 2e 63 00 63 72 74 73 74 75 66|.Scrt1.c.crtstuf| string: "\x00Scrt1.c\x00crtstuff.c\x00__CTOR_LIST__\x00__DTOR_LIST__\x00__"... 0x3ba0-0x3d8c.7 (493) * |until 0x3d8c.7 (493) | | 0x46c0|09 00 00 00 |.... | name: ".strtab" (9) 0x46c0-0x46c3.7 (4) @@ -1685,7 +1711,7 @@ $ fq -d elf dv a_dynamic 0x46e0| 00 00 00 00| ....| info: 0 0x46ec-0x46ef.7 (4) 0x46f0|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x46f0-0x46f7.7 (8) 0x46f0| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x46f8-0x46ff.7 (8) - | | | [32]{}: section_header 0x3d8d-0x473f.7 (2483) + | | | [33]{}: section_header 0x3d8d-0x473f.7 (2483) 0x3d80| 00 2e 73| ..s| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.interp\x00.note.gnu.prope"... 0x3d8d-0x3ebc.7 (304) 0x3d90|79 6d 74 61 62 00 2e 73 74 72 74 61 62 00 2e 73|ymtab..strtab..s| * |until 0x3ebc.7 (304) | | @@ -1714,32 +1740,6 @@ $ fq -d elf dv a_dynamic 0x4720| 00 00 00 00| ....| info: 0 0x472c-0x472f.7 (4) 0x4730|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x4730-0x4737.7 (8) 0x4730| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x4738-0x473f.7 (8) - | | | [33]{}: section_header 0x4400-0x443f.7 (64) -0x4400|bc 00 00 00 |.... | name: ".bss" (188) 0x4400-0x4403.7 (4) -0x4400| 08 00 00 00 | .... | type: "nobits" (0x8) (No space in the file) 0x4404-0x4407.7 (4) - | | | flags{}: 0x4408-0x440f.7 (8) -0x4400| 03 | . | link_order: false 0x4408-0x4408 (0.1) -0x4400| 03 | . | info_link: false 0x4408.1-0x4408.1 (0.1) -0x4400| 03 | . | strings: false 0x4408.2-0x4408.2 (0.1) -0x4400| 03 | . | merge: false 0x4408.3-0x4408.3 (0.1) -0x4400| 03 | . | unused0: 0 0x4408.4-0x4408.4 (0.1) -0x4400| 03 | . | execinstr: false 0x4408.5-0x4408.5 (0.1) -0x4400| 03 | . | alloc: true 0x4408.6-0x4408.6 (0.1) -0x4400| 03 | . | write: true 0x4408.7-0x4408.7 (0.1) -0x4400| 00 | . | tls: false 0x4409-0x4409 (0.1) -0x4400| 00 | . | group: false 0x4409.1-0x4409.1 (0.1) -0x4400| 00 | . | os_nonconforming: false 0x4409.2-0x4409.2 (0.1) -0x4400| 00 00 | .. | unused1: 0 0x4409.3-0x440a.3 (1.1) -0x4400| 00 00 | .. | os_specific: 0 0x440a.4-0x440b.3 (1) -0x4400| 00 | . | processor_specific: 0 0x440b.4-0x440b.7 (0.4) -0x4400| 00 00 00 00| ....| unused2: 0 0x440c-0x440f.7 (4) -0x4410|20 40 00 00 00 00 00 00 | @...... | addr: 0x4020 0x4410-0x4417.7 (8) -0x4410| 08 30 00 00 00 00 00 00| .0......| offset: 0x3008 0x4418-0x441f.7 (8) -0x4420|50 00 00 00 00 00 00 00 |P....... | size: 80 0x4420-0x4427.7 (8) -0x4420| 00 00 00 00 | .... | link: 0 0x4428-0x442b.7 (4) -0x4420| 00 00 00 00| ....| info: 0 0x442c-0x442f.7 (4) -0x4430|20 00 00 00 00 00 00 00 | ....... | addralign: 32 0x4430-0x4437.7 (8) -0x4430| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x4438-0x443f.7 (8) 0x0600| 00 00 00 00 00 00 00 00| ........| unknown0: raw bits 0x608-0xfff.7 (2552) 0x0610|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................| * |until 0xfff.7 (2552) | | diff --git a/format/elf/testdata/linux_amd64/a_static.fqtest b/format/elf/testdata/linux_amd64/a_static.fqtest index ca684e52f..e88280f5e 100644 --- a/format/elf/testdata/linux_amd64/a_static.fqtest +++ b/format/elf/testdata/linux_amd64/a_static.fqtest @@ -23,40 +23,7 @@ $ fq -d elf dv a_static 0x0030| 22 00 | ". | shnum: 34 0x3c-0x3d.7 (2) 0x0030| 21 00| !.| shstrndx: 33 0x3e-0x3f.7 (2) | | | program_headers[0:12]: 0x0-0x3007.7 (12296) - | | | [0]{}: program_header 0x0-0x5bf.7 (1472) - | | | program_header{}: 0x0-0x5bf.7 (1472) -0x0000|7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00|.ELF............| data: raw bits 0x0-0x5bf.7 (1472) -* |until 0x5bf.7 (1472) | | -0x00b0|01 00 00 00 |.... | type: "load" (1) (Loadable segment) 0xb0-0xb3.7 (4) - | | | flags{}: 0xb4-0xb7.7 (4) -0x00b0| 04 | . | unused0: 0 0xb4-0xb4.4 (0.5) -0x00b0| 04 | . | r: true 0xb4.5-0xb4.5 (0.1) -0x00b0| 04 | . | w: false 0xb4.6-0xb4.6 (0.1) -0x00b0| 04 | . | x: false 0xb4.7-0xb4.7 (0.1) -0x00b0| 00 00 00 | ... | unused1: 0 0xb5-0xb7.7 (3) -0x00b0| 00 00 00 00 00 00 00 00| ........| offset: 0x0 0xb8-0xbf.7 (8) -0x00c0|00 00 00 00 00 00 00 00 |........ | vaddr: 0x0 0xc0-0xc7.7 (8) -0x00c0| 00 00 00 00 00 00 00 00| ........| paddr: 0x0 0xc8-0xcf.7 (8) -0x00d0|c0 05 00 00 00 00 00 00 |........ | filesz: 1472 0xd0-0xd7.7 (8) -0x00d0| c0 05 00 00 00 00 00 00| ........| memsz: 1472 0xd8-0xdf.7 (8) -0x00e0|00 10 00 00 00 00 00 00 |........ | align: 4096 0xe0-0xe7.7 (8) - | | | [1]{}: program_header 0x0-0x2a7.7 (680) - | | | program_header{}: 0x0-0x2a7.7 (680) - | | | data: raw bits 0x0-NA (0) -0x0270|51 e5 74 64 |Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0x270-0x273.7 (4) - | | | flags{}: 0x274-0x277.7 (4) -0x0270| 06 | . | unused0: 0 0x274-0x274.4 (0.5) -0x0270| 06 | . | r: true 0x274.5-0x274.5 (0.1) -0x0270| 06 | . | w: true 0x274.6-0x274.6 (0.1) -0x0270| 06 | . | x: false 0x274.7-0x274.7 (0.1) -0x0270| 00 00 00 | ... | unused1: 0 0x275-0x277.7 (3) -0x0270| 00 00 00 00 00 00 00 00| ........| offset: 0x0 0x278-0x27f.7 (8) -0x0280|00 00 00 00 00 00 00 00 |........ | vaddr: 0x0 0x280-0x287.7 (8) -0x0280| 00 00 00 00 00 00 00 00| ........| paddr: 0x0 0x288-0x28f.7 (8) -0x0290|00 00 00 00 00 00 00 00 |........ | filesz: 0 0x290-0x297.7 (8) -0x0290| 00 00 00 00 00 00 00 00| ........| memsz: 0 0x298-0x29f.7 (8) -0x02a0|10 00 00 00 00 00 00 00 |........ | align: 16 0x2a0-0x2a7.7 (8) - | | | [2]{}: program_header 0x40-0x2df.7 (672) + | | | [0]{}: program_header 0x40-0x2df.7 (672) | | | program_header{}: 0x40-0x2df.7 (672) 0x0040|06 00 00 00 |.... | type: "phdr" (6) (Program header location and size) 0x40-0x43.7 (4) 0x0040|06 00 00 00 04 00 00 00 40 00 00 00 00 00 00 00|........@.......| data: raw bits 0x40-0x2df.7 (672) @@ -73,7 +40,7 @@ $ fq -d elf dv a_static 0x0060|a0 02 00 00 00 00 00 00 |........ | filesz: 672 0x60-0x67.7 (8) 0x0060| a0 02 00 00 00 00 00 00| ........| memsz: 672 0x68-0x6f.7 (8) 0x0070|08 00 00 00 00 00 00 00 |........ | align: 8 0x70-0x77.7 (8) - | | | [3]{}: program_header 0x78-0x2f8.7 (641) + | | | [1]{}: program_header 0x78-0x2f8.7 (641) | | | program_header{}: 0x78-0x2f8.7 (641) 0x0070| 03 00 00 00 | .... | type: "interp" (3) (Interpreter to invoke) 0x78-0x7b.7 (4) | | | flags{}: 0x7c-0x7f.7 (4) @@ -90,7 +57,24 @@ $ fq -d elf dv a_static 0x00a0| 01 00 00 00 00 00 00 00| ........| align: 1 0xa8-0xaf.7 (8) 0x02e0|2f 6c 69 62 2f 6c 64 2d 6d 75 73 6c 2d 78 38 36|/lib/ld-musl-x86| data: raw bits 0x2e0-0x2f8.7 (25) 0x02f0|5f 36 34 2e 73 6f 2e 31 00 |_64.so.1. | - | | | [4]{}: program_header 0xe8-0x1288.7 (4513) + | | | [2]{}: program_header 0x0-0x5bf.7 (1472) + | | | program_header{}: 0x0-0x5bf.7 (1472) +0x0000|7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00|.ELF............| data: raw bits 0x0-0x5bf.7 (1472) +* |until 0x5bf.7 (1472) | | +0x00b0|01 00 00 00 |.... | type: "load" (1) (Loadable segment) 0xb0-0xb3.7 (4) + | | | flags{}: 0xb4-0xb7.7 (4) +0x00b0| 04 | . | unused0: 0 0xb4-0xb4.4 (0.5) +0x00b0| 04 | . | r: true 0xb4.5-0xb4.5 (0.1) +0x00b0| 04 | . | w: false 0xb4.6-0xb4.6 (0.1) +0x00b0| 04 | . | x: false 0xb4.7-0xb4.7 (0.1) +0x00b0| 00 00 00 | ... | unused1: 0 0xb5-0xb7.7 (3) +0x00b0| 00 00 00 00 00 00 00 00| ........| offset: 0x0 0xb8-0xbf.7 (8) +0x00c0|00 00 00 00 00 00 00 00 |........ | vaddr: 0x0 0xc0-0xc7.7 (8) +0x00c0| 00 00 00 00 00 00 00 00| ........| paddr: 0x0 0xc8-0xcf.7 (8) +0x00d0|c0 05 00 00 00 00 00 00 |........ | filesz: 1472 0xd0-0xd7.7 (8) +0x00d0| c0 05 00 00 00 00 00 00| ........| memsz: 1472 0xd8-0xdf.7 (8) +0x00e0|00 10 00 00 00 00 00 00 |........ | align: 4096 0xe0-0xe7.7 (8) + | | | [3]{}: program_header 0xe8-0x1288.7 (4513) | | | program_header{}: 0xe8-0x1288.7 (4513) 0x00e0| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0xe8-0xeb.7 (4) | | | flags{}: 0xec-0xef.7 (4) @@ -107,7 +91,7 @@ $ fq -d elf dv a_static 0x0110| 00 10 00 00 00 00 00 00| ........| align: 4096 0x118-0x11f.7 (8) 0x1000|50 e8 ba 01 00 00 e8 35 02 00 00 58 c3 00 00 00|P......5...X....| data: raw bits 0x1000-0x1288.7 (649) * |until 0x1288.7 (649) | | - | | | [5]{}: program_header 0x120-0x2103.7 (8164) + | | | [4]{}: program_header 0x120-0x2103.7 (8164) | | | program_header{}: 0x120-0x2103.7 (8164) 0x0120|01 00 00 00 |.... | type: "load" (1) (Loadable segment) 0x120-0x123.7 (4) | | | flags{}: 0x124-0x127.7 (4) @@ -124,7 +108,7 @@ $ fq -d elf dv a_static 0x0150|00 10 00 00 00 00 00 00 |........ | align: 4096 0x150-0x157.7 (8) 0x2000|61 61 61 00 6c 69 62 62 62 62 5f 62 62 62 00 00|aaa.libbbb_bbb..| data: raw bits 0x2000-0x2103.7 (260) * |until 0x2103.7 (260) | | - | | | [6]{}: program_header 0x158-0x3007.7 (11952) + | | | [5]{}: program_header 0x158-0x3007.7 (11952) | | | program_header{}: 0x158-0x3007.7 (11952) 0x0150| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x158-0x15b.7 (4) | | | flags{}: 0x15c-0x15f.7 (4) @@ -141,7 +125,7 @@ $ fq -d elf dv a_static 0x0180| 00 10 00 00 00 00 00 00| ........| align: 4096 0x188-0x18f.7 (8) 0x2e10|ff ff ff ff ff ff ff ff 00 00 00 00 00 00 00 00|................| data: raw bits 0x2e10-0x3007.7 (504) * |until 0x3007.7 (504) | | - | | | [7]{}: program_header 0x190-0x2faf.7 (11808) + | | | [6]{}: program_header 0x190-0x2faf.7 (11808) | | | program_header{}: 0x190-0x2faf.7 (11808) 0x0190|02 00 00 00 |.... | type: "dynamic" (2) (Dynamic linking information) 0x190-0x193.7 (4) | | | flags{}: 0x194-0x197.7 (4) @@ -158,7 +142,7 @@ $ fq -d elf dv a_static 0x01c0|08 00 00 00 00 00 00 00 |........ | align: 8 0x1c0-0x1c7.7 (8) 0x2e30|01 00 00 00 00 00 00 00 33 00 00 00 00 00 00 00|........3.......| data: raw bits 0x2e30-0x2faf.7 (384) * |until 0x2faf.7 (384) | | - | | | [8]{}: program_header 0x1c8-0x32f.7 (360) + | | | [7]{}: program_header 0x1c8-0x32f.7 (360) | | | program_header{}: 0x1c8-0x32f.7 (360) 0x01c0| 04 00 00 00 | .... | type: "note" (4) (Auxiliary information) 0x1c8-0x1cb.7 (4) | | | flags{}: 0x1cc-0x1cf.7 (4) @@ -175,7 +159,7 @@ $ fq -d elf dv a_static 0x01f0| 08 00 00 00 00 00 00 00| ........| align: 8 0x1f8-0x1ff.7 (8) 0x0300|04 00 00 00 20 00 00 00 05 00 00 00 47 4e 55 00|.... .......GNU.| data: raw bits 0x300-0x32f.7 (48) * |until 0x32f.7 (48) | | - | | | [9]{}: program_header 0x200-0x32f.7 (304) + | | | [8]{}: program_header 0x200-0x32f.7 (304) | | | program_header{}: 0x200-0x32f.7 (304) 0x0200|53 e5 74 64 |S.td | type: "os" (1685382483) (Operating system-specific) 0x200-0x203.7 (4) | | | flags{}: 0x204-0x207.7 (4) @@ -192,7 +176,7 @@ $ fq -d elf dv a_static 0x0230|08 00 00 00 00 00 00 00 |........ | align: 8 0x230-0x237.7 (8) 0x0300|04 00 00 00 20 00 00 00 05 00 00 00 47 4e 55 00|.... .......GNU.| data: raw bits 0x300-0x32f.7 (48) * |until 0x32f.7 (48) | | - | | | [10]{}: program_header 0x238-0x2043.7 (7692) + | | | [9]{}: program_header 0x238-0x2043.7 (7692) | | | program_header{}: 0x238-0x2043.7 (7692) 0x0230| 50 e5 74 64 | P.td | type: "gnu_eh_frame" (1685382480) (GNU frame unwind information) 0x238-0x23b.7 (4) | | | flags{}: 0x23c-0x23f.7 (4) @@ -209,6 +193,22 @@ $ fq -d elf dv a_static 0x0260| 04 00 00 00 00 00 00 00| ........| align: 4 0x268-0x26f.7 (8) 0x2010|01 1b 03 3b 34 00 00 00 05 00 00 00 00 f0 ff ff|...;4...........| data: raw bits 0x2010-0x2043.7 (52) * |until 0x2043.7 (52) | | + | | | [10]{}: program_header 0x0-0x2a7.7 (680) + | | | program_header{}: 0x0-0x2a7.7 (680) + | | | data: raw bits 0x0-NA (0) +0x0270|51 e5 74 64 |Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0x270-0x273.7 (4) + | | | flags{}: 0x274-0x277.7 (4) +0x0270| 06 | . | unused0: 0 0x274-0x274.4 (0.5) +0x0270| 06 | . | r: true 0x274.5-0x274.5 (0.1) +0x0270| 06 | . | w: true 0x274.6-0x274.6 (0.1) +0x0270| 06 | . | x: false 0x274.7-0x274.7 (0.1) +0x0270| 00 00 00 | ... | unused1: 0 0x275-0x277.7 (3) +0x0270| 00 00 00 00 00 00 00 00| ........| offset: 0x0 0x278-0x27f.7 (8) +0x0280|00 00 00 00 00 00 00 00 |........ | vaddr: 0x0 0x280-0x287.7 (8) +0x0280| 00 00 00 00 00 00 00 00| ........| paddr: 0x0 0x288-0x28f.7 (8) +0x0290|00 00 00 00 00 00 00 00 |........ | filesz: 0 0x290-0x297.7 (8) +0x0290| 00 00 00 00 00 00 00 00| ........| memsz: 0 0x298-0x29f.7 (8) +0x02a0|10 00 00 00 00 00 00 00 |........ | align: 16 0x2a0-0x2a7.7 (8) | | | [11]{}: program_header 0x2a8-0x2fff.7 (11608) | | | program_header{}: 0x2a8-0x2fff.7 (11608) 0x02a0| 52 e5 74 64 | R.td | type: "gnu_relro" (1685382482) (GNU read-only after relocation) 0x2a8-0x2ab.7 (4) @@ -976,7 +976,33 @@ $ fq -d elf dv a_static 0x4400| 00 00 00 00| ....| info: 0 0x440c-0x440f.7 (4) 0x4410|08 00 00 00 00 00 00 00 |........ | addralign: 8 0x4410-0x4417.7 (8) 0x4410| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x4418-0x441f.7 (8) - | | | [21]{}: section_header 0x3008-0x449f.7 (5272) + | | | [21]{}: section_header 0x4420-0x445f.7 (64) +0x4420|bc 00 00 00 |.... | name: ".bss" (188) 0x4420-0x4423.7 (4) +0x4420| 08 00 00 00 | .... | type: "nobits" (0x8) (No space in the file) 0x4424-0x4427.7 (4) + | | | flags{}: 0x4428-0x442f.7 (8) +0x4420| 03 | . | link_order: false 0x4428-0x4428 (0.1) +0x4420| 03 | . | info_link: false 0x4428.1-0x4428.1 (0.1) +0x4420| 03 | . | strings: false 0x4428.2-0x4428.2 (0.1) +0x4420| 03 | . | merge: false 0x4428.3-0x4428.3 (0.1) +0x4420| 03 | . | unused0: 0 0x4428.4-0x4428.4 (0.1) +0x4420| 03 | . | execinstr: false 0x4428.5-0x4428.5 (0.1) +0x4420| 03 | . | alloc: true 0x4428.6-0x4428.6 (0.1) +0x4420| 03 | . | write: true 0x4428.7-0x4428.7 (0.1) +0x4420| 00 | . | tls: false 0x4429-0x4429 (0.1) +0x4420| 00 | . | group: false 0x4429.1-0x4429.1 (0.1) +0x4420| 00 | . | os_nonconforming: false 0x4429.2-0x4429.2 (0.1) +0x4420| 00 00 | .. | unused1: 0 0x4429.3-0x442a.3 (1.1) +0x4420| 00 00 | .. | os_specific: 0 0x442a.4-0x442b.3 (1) +0x4420| 00 | . | processor_specific: 0 0x442b.4-0x442b.7 (0.4) +0x4420| 00 00 00 00| ....| unused2: 0 0x442c-0x442f.7 (4) +0x4430|20 40 00 00 00 00 00 00 | @...... | addr: 0x4020 0x4430-0x4437.7 (8) +0x4430| 08 30 00 00 00 00 00 00| .0......| offset: 0x3008 0x4438-0x443f.7 (8) +0x4440|50 00 00 00 00 00 00 00 |P....... | size: 80 0x4440-0x4447.7 (8) +0x4440| 00 00 00 00 | .... | link: 0 0x4448-0x444b.7 (4) +0x4440| 00 00 00 00| ....| info: 0 0x444c-0x444f.7 (4) +0x4450|20 00 00 00 00 00 00 00 | ....... | addralign: 32 0x4450-0x4457.7 (8) +0x4450| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x4458-0x445f.7 (8) + | | | [22]{}: section_header 0x3008-0x449f.7 (5272) 0x3000| 47 43 43 3a 20 28 41 6c| GCC: (Al| data: raw bits 0x3008-0x3069.7 (98) 0x3010|70 69 6e 65 20 31 30 2e 33 2e 31 5f 67 69 74 32|pine 10.3.1_git2| * |until 0x3069.7 (98) | | @@ -1005,7 +1031,7 @@ $ fq -d elf dv a_static 0x4480| 00 00 00 00| ....| info: 0 0x448c-0x448f.7 (4) 0x4490|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x4490-0x4497.7 (8) 0x4490| 01 00 00 00 00 00 00 00| ........| entsize: 1 0x4498-0x449f.7 (8) - | | | [22]{}: section_header 0x3070-0x44df.7 (5232) + | | | [23]{}: section_header 0x3070-0x44df.7 (5232) 0x3070|2c 00 00 00 02 00 00 00 00 00 08 00 00 00 00 00|,...............| data: raw bits 0x3070-0x311f.7 (176) * |until 0x311f.7 (176) | | 0x44a0|ca 00 00 00 |.... | name: ".debug_aranges" (202) 0x44a0-0x44a3.7 (4) @@ -1033,7 +1059,7 @@ $ fq -d elf dv a_static 0x44c0| 00 00 00 00| ....| info: 0 0x44cc-0x44cf.7 (4) 0x44d0|10 00 00 00 00 00 00 00 |........ | addralign: 16 0x44d0-0x44d7.7 (8) 0x44d0| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x44d8-0x44df.7 (8) - | | | [23]{}: section_header 0x3120-0x451f.7 (5120) + | | | [24]{}: section_header 0x3120-0x451f.7 (5120) 0x3120|f1 00 00 00 04 00 00 00 00 00 08 01 53 00 00 00|............S...| data: raw bits 0x3120-0x3258.7 (313) * |until 0x3258.7 (313) | | 0x44e0|d9 00 00 00 |.... | name: ".debug_info" (217) 0x44e0-0x44e3.7 (4) @@ -1061,7 +1087,7 @@ $ fq -d elf dv a_static 0x4500| 00 00 00 00| ....| info: 0 0x450c-0x450f.7 (4) 0x4510|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x4510-0x4517.7 (8) 0x4510| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x4518-0x451f.7 (8) - | | | [24]{}: section_header 0x3259-0x455f.7 (4871) + | | | [25]{}: section_header 0x3259-0x455f.7 (4871) 0x3250| 01 11 01 25 0e 13 0b| ...%...| data: raw bits 0x3259-0x3320.7 (200) 0x3260|03 0e 1b 0e 55 17 11 01 10 17 00 00 02 24 00 0b|....U........$..| * |until 0x3320.7 (200) | | @@ -1090,7 +1116,7 @@ $ fq -d elf dv a_static 0x4540| 00 00 00 00| ....| info: 0 0x454c-0x454f.7 (4) 0x4550|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x4550-0x4557.7 (8) 0x4550| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x4558-0x455f.7 (8) - | | | [25]{}: section_header 0x3321-0x459f.7 (4735) + | | | [26]{}: section_header 0x3321-0x459f.7 (4735) 0x3320| 4c 00 00 00 03 00 21 00 00 00 01 01 fb 0e 0d| L.....!........| data: raw bits 0x3321-0x341c.7 (252) 0x3330|00 01 01 01 01 00 00 00 01 00 00 01 63 72 74 00|............crt.| * |until 0x341c.7 (252) | | @@ -1119,7 +1145,7 @@ $ fq -d elf dv a_static 0x4580| 00 00 00 00| ....| info: 0 0x458c-0x458f.7 (4) 0x4590|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x4590-0x4597.7 (8) 0x4590| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x4598-0x459f.7 (8) - | | | [26]{}: section_header 0x3420-0x45df.7 (4544) + | | | [27]{}: section_header 0x3420-0x45df.7 (4544) 0x3420|14 00 00 00 ff ff ff ff 01 00 01 78 10 0c 07 08|...........x....| data: raw bits 0x3420-0x344f.7 (48) * |until 0x344f.7 (48) | | 0x45a0|ff 00 00 00 |.... | name: ".debug_frame" (255) 0x45a0-0x45a3.7 (4) @@ -1147,7 +1173,7 @@ $ fq -d elf dv a_static 0x45c0| 00 00 00 00| ....| info: 0 0x45cc-0x45cf.7 (4) 0x45d0|08 00 00 00 00 00 00 00 |........ | addralign: 8 0x45d0-0x45d7.7 (8) 0x45d0| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x45d8-0x45df.7 (8) - | | | [27]{}: section_header 0x3450-0x461f.7 (4560) + | | | [28]{}: section_header 0x3450-0x461f.7 (4560) 0x3450|6c 6f 6e 67 20 6c 6f 6e 67 20 69 6e 74 00 63 72|long long int.cr| data: raw bits 0x3450-0x361d.7 (462) * |until 0x361d.7 (462) | | 0x45e0|0c 01 00 00 |.... | name: ".debug_str" (268) 0x45e0-0x45e3.7 (4) @@ -1175,7 +1201,7 @@ $ fq -d elf dv a_static 0x4600| 00 00 00 00| ....| info: 0 0x460c-0x460f.7 (4) 0x4610|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x4610-0x4617.7 (8) 0x4610| 01 00 00 00 00 00 00 00| ........| entsize: 1 0x4618-0x461f.7 (8) - | | | [28]{}: section_header 0x361e-0x465f.7 (4162) + | | | [29]{}: section_header 0x361e-0x465f.7 (4162) 0x3610| 00 00| ..| data: raw bits 0x361e-0x3703.7 (230) 0x3620|00 00 00 00 76 10 00 00 00 00 00 00 95 10 00 00|....v...........| * |until 0x3703.7 (230) | | @@ -1204,7 +1230,7 @@ $ fq -d elf dv a_static 0x4640| 00 00 00 00| ....| info: 0 0x464c-0x464f.7 (4) 0x4650|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x4650-0x4657.7 (8) 0x4650| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x4658-0x465f.7 (8) - | | | [29]{}: section_header 0x3710-0x469f.7 (3984) + | | | [30]{}: section_header 0x3710-0x469f.7 (3984) 0x3710|76 10 00 00 00 00 00 00 9a 10 00 00 00 00 00 00|v...............| data: raw bits 0x3710-0x37af.7 (160) * |until 0x37af.7 (160) | | 0x4660|22 01 00 00 |"... | name: ".debug_ranges" (290) 0x4660-0x4663.7 (4) @@ -1232,7 +1258,7 @@ $ fq -d elf dv a_static 0x4680| 00 00 00 00| ....| info: 0 0x468c-0x468f.7 (4) 0x4690|10 00 00 00 00 00 00 00 |........ | addralign: 16 0x4690-0x4697.7 (8) 0x4690| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x4698-0x469f.7 (8) - | | | [30]{}: section_header 0x37b0-0x46df.7 (3888) + | | | [31]{}: section_header 0x37b0-0x46df.7 (3888) | | | symbol_table[0:43]: 0x37b0-0x3bb7.7 (1032) | | | [0]{}: symbol 0x37b0-0x37c7.7 (24) 0x37b0|00 00 00 00 |.... | name: "" (0) 0x37b0-0x37b3.7 (4) @@ -1646,7 +1672,7 @@ $ fq -d elf dv a_static 0x46c0| 17 00 00 00| ....| info: 23 0x46cc-0x46cf.7 (4) 0x46d0|08 00 00 00 00 00 00 00 |........ | addralign: 8 0x46d0-0x46d7.7 (8) 0x46d0| 18 00 00 00 00 00 00 00| ........| entsize: 24 0x46d8-0x46df.7 (8) - | | | [31]{}: section_header 0x3bb8-0x471f.7 (2920) + | | | [32]{}: section_header 0x3bb8-0x471f.7 (2920) 0x3bb0| 00 53 63 72 74 31 2e 63| .Scrt1.c| string: "\x00Scrt1.c\x00crtstuff.c\x00__CTOR_LIST__\x00__DTOR_LIST__\x00__"... 0x3bb8-0x3dad.7 (502) 0x3bc0|00 63 72 74 73 74 75 66 66 2e 63 00 5f 5f 43 54|.crtstuff.c.__CT| * |until 0x3dad.7 (502) | | @@ -1675,7 +1701,7 @@ $ fq -d elf dv a_static 0x4700| 00 00 00 00| ....| info: 0 0x470c-0x470f.7 (4) 0x4710|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x4710-0x4717.7 (8) 0x4710| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x4718-0x471f.7 (8) - | | | [32]{}: section_header 0x3dae-0x475f.7 (2482) + | | | [33]{}: section_header 0x3dae-0x475f.7 (2482) 0x3da0| 00 2e| ..| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.interp\x00.note.gnu.prope"... 0x3dae-0x3edd.7 (304) 0x3db0|73 79 6d 74 61 62 00 2e 73 74 72 74 61 62 00 2e|symtab..strtab..| * |until 0x3edd.7 (304) | | @@ -1704,32 +1730,6 @@ $ fq -d elf dv a_static 0x4740| 00 00 00 00| ....| info: 0 0x474c-0x474f.7 (4) 0x4750|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x4750-0x4757.7 (8) 0x4750| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x4758-0x475f.7 (8) - | | | [33]{}: section_header 0x4420-0x445f.7 (64) -0x4420|bc 00 00 00 |.... | name: ".bss" (188) 0x4420-0x4423.7 (4) -0x4420| 08 00 00 00 | .... | type: "nobits" (0x8) (No space in the file) 0x4424-0x4427.7 (4) - | | | flags{}: 0x4428-0x442f.7 (8) -0x4420| 03 | . | link_order: false 0x4428-0x4428 (0.1) -0x4420| 03 | . | info_link: false 0x4428.1-0x4428.1 (0.1) -0x4420| 03 | . | strings: false 0x4428.2-0x4428.2 (0.1) -0x4420| 03 | . | merge: false 0x4428.3-0x4428.3 (0.1) -0x4420| 03 | . | unused0: 0 0x4428.4-0x4428.4 (0.1) -0x4420| 03 | . | execinstr: false 0x4428.5-0x4428.5 (0.1) -0x4420| 03 | . | alloc: true 0x4428.6-0x4428.6 (0.1) -0x4420| 03 | . | write: true 0x4428.7-0x4428.7 (0.1) -0x4420| 00 | . | tls: false 0x4429-0x4429 (0.1) -0x4420| 00 | . | group: false 0x4429.1-0x4429.1 (0.1) -0x4420| 00 | . | os_nonconforming: false 0x4429.2-0x4429.2 (0.1) -0x4420| 00 00 | .. | unused1: 0 0x4429.3-0x442a.3 (1.1) -0x4420| 00 00 | .. | os_specific: 0 0x442a.4-0x442b.3 (1) -0x4420| 00 | . | processor_specific: 0 0x442b.4-0x442b.7 (0.4) -0x4420| 00 00 00 00| ....| unused2: 0 0x442c-0x442f.7 (4) -0x4430|20 40 00 00 00 00 00 00 | @...... | addr: 0x4020 0x4430-0x4437.7 (8) -0x4430| 08 30 00 00 00 00 00 00| .0......| offset: 0x3008 0x4438-0x443f.7 (8) -0x4440|50 00 00 00 00 00 00 00 |P....... | size: 80 0x4440-0x4447.7 (8) -0x4440| 00 00 00 00 | .... | link: 0 0x4448-0x444b.7 (4) -0x4440| 00 00 00 00| ....| info: 0 0x444c-0x444f.7 (4) -0x4450|20 00 00 00 00 00 00 00 | ....... | addralign: 32 0x4450-0x4457.7 (8) -0x4450| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x4458-0x445f.7 (8) 0x05c0|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................| unknown0: raw bits 0x5c0-0xfff.7 (2624) * |until 0xfff.7 (2624) | | 0x1280| 00 00 00 00 00 00 00| .......| unknown1: raw bits 0x1289-0x1fff.7 (3447) diff --git a/format/elf/testdata/linux_amd64/a_stripped.fqtest b/format/elf/testdata/linux_amd64/a_stripped.fqtest index 959a4da9d..7b2f635b4 100644 --- a/format/elf/testdata/linux_amd64/a_stripped.fqtest +++ b/format/elf/testdata/linux_amd64/a_stripped.fqtest @@ -23,40 +23,7 @@ $ fq -d elf dv a_stripped 0x0030| 18 00 | .. | shnum: 24 0x3c-0x3d.7 (2) 0x0030| 17 00| ..| shstrndx: 23 0x3e-0x3f.7 (2) | | | program_headers[0:12]: 0x0-0x3007.7 (12296) - | | | [0]{}: program_header 0x0-0x607.7 (1544) - | | | program_header{}: 0x0-0x607.7 (1544) -0x0000|7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00|.ELF............| data: raw bits 0x0-0x607.7 (1544) -* |until 0x607.7 (1544) | | -0x00b0|01 00 00 00 |.... | type: "load" (1) (Loadable segment) 0xb0-0xb3.7 (4) - | | | flags{}: 0xb4-0xb7.7 (4) -0x00b0| 04 | . | unused0: 0 0xb4-0xb4.4 (0.5) -0x00b0| 04 | . | r: true 0xb4.5-0xb4.5 (0.1) -0x00b0| 04 | . | w: false 0xb4.6-0xb4.6 (0.1) -0x00b0| 04 | . | x: false 0xb4.7-0xb4.7 (0.1) -0x00b0| 00 00 00 | ... | unused1: 0 0xb5-0xb7.7 (3) -0x00b0| 00 00 00 00 00 00 00 00| ........| offset: 0x0 0xb8-0xbf.7 (8) -0x00c0|00 00 00 00 00 00 00 00 |........ | vaddr: 0x0 0xc0-0xc7.7 (8) -0x00c0| 00 00 00 00 00 00 00 00| ........| paddr: 0x0 0xc8-0xcf.7 (8) -0x00d0|08 06 00 00 00 00 00 00 |........ | filesz: 1544 0xd0-0xd7.7 (8) -0x00d0| 08 06 00 00 00 00 00 00| ........| memsz: 1544 0xd8-0xdf.7 (8) -0x00e0|00 10 00 00 00 00 00 00 |........ | align: 4096 0xe0-0xe7.7 (8) - | | | [1]{}: program_header 0x0-0x2a7.7 (680) - | | | program_header{}: 0x0-0x2a7.7 (680) - | | | data: raw bits 0x0-NA (0) -0x0270|51 e5 74 64 |Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0x270-0x273.7 (4) - | | | flags{}: 0x274-0x277.7 (4) -0x0270| 06 | . | unused0: 0 0x274-0x274.4 (0.5) -0x0270| 06 | . | r: true 0x274.5-0x274.5 (0.1) -0x0270| 06 | . | w: true 0x274.6-0x274.6 (0.1) -0x0270| 06 | . | x: false 0x274.7-0x274.7 (0.1) -0x0270| 00 00 00 | ... | unused1: 0 0x275-0x277.7 (3) -0x0270| 00 00 00 00 00 00 00 00| ........| offset: 0x0 0x278-0x27f.7 (8) -0x0280|00 00 00 00 00 00 00 00 |........ | vaddr: 0x0 0x280-0x287.7 (8) -0x0280| 00 00 00 00 00 00 00 00| ........| paddr: 0x0 0x288-0x28f.7 (8) -0x0290|00 00 00 00 00 00 00 00 |........ | filesz: 0 0x290-0x297.7 (8) -0x0290| 00 00 00 00 00 00 00 00| ........| memsz: 0 0x298-0x29f.7 (8) -0x02a0|10 00 00 00 00 00 00 00 |........ | align: 16 0x2a0-0x2a7.7 (8) - | | | [2]{}: program_header 0x40-0x2df.7 (672) + | | | [0]{}: program_header 0x40-0x2df.7 (672) | | | program_header{}: 0x40-0x2df.7 (672) 0x0040|06 00 00 00 |.... | type: "phdr" (6) (Program header location and size) 0x40-0x43.7 (4) 0x0040|06 00 00 00 04 00 00 00 40 00 00 00 00 00 00 00|........@.......| data: raw bits 0x40-0x2df.7 (672) @@ -73,7 +40,7 @@ $ fq -d elf dv a_stripped 0x0060|a0 02 00 00 00 00 00 00 |........ | filesz: 672 0x60-0x67.7 (8) 0x0060| a0 02 00 00 00 00 00 00| ........| memsz: 672 0x68-0x6f.7 (8) 0x0070|08 00 00 00 00 00 00 00 |........ | align: 8 0x70-0x77.7 (8) - | | | [3]{}: program_header 0x78-0x2f8.7 (641) + | | | [1]{}: program_header 0x78-0x2f8.7 (641) | | | program_header{}: 0x78-0x2f8.7 (641) 0x0070| 03 00 00 00 | .... | type: "interp" (3) (Interpreter to invoke) 0x78-0x7b.7 (4) | | | flags{}: 0x7c-0x7f.7 (4) @@ -90,7 +57,24 @@ $ fq -d elf dv a_stripped 0x00a0| 01 00 00 00 00 00 00 00| ........| align: 1 0xa8-0xaf.7 (8) 0x02e0|2f 6c 69 62 2f 6c 64 2d 6d 75 73 6c 2d 78 38 36|/lib/ld-musl-x86| data: raw bits 0x2e0-0x2f8.7 (25) 0x02f0|5f 36 34 2e 73 6f 2e 31 00 |_64.so.1. | - | | | [4]{}: program_header 0xe8-0x1288.7 (4513) + | | | [2]{}: program_header 0x0-0x607.7 (1544) + | | | program_header{}: 0x0-0x607.7 (1544) +0x0000|7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00|.ELF............| data: raw bits 0x0-0x607.7 (1544) +* |until 0x607.7 (1544) | | +0x00b0|01 00 00 00 |.... | type: "load" (1) (Loadable segment) 0xb0-0xb3.7 (4) + | | | flags{}: 0xb4-0xb7.7 (4) +0x00b0| 04 | . | unused0: 0 0xb4-0xb4.4 (0.5) +0x00b0| 04 | . | r: true 0xb4.5-0xb4.5 (0.1) +0x00b0| 04 | . | w: false 0xb4.6-0xb4.6 (0.1) +0x00b0| 04 | . | x: false 0xb4.7-0xb4.7 (0.1) +0x00b0| 00 00 00 | ... | unused1: 0 0xb5-0xb7.7 (3) +0x00b0| 00 00 00 00 00 00 00 00| ........| offset: 0x0 0xb8-0xbf.7 (8) +0x00c0|00 00 00 00 00 00 00 00 |........ | vaddr: 0x0 0xc0-0xc7.7 (8) +0x00c0| 00 00 00 00 00 00 00 00| ........| paddr: 0x0 0xc8-0xcf.7 (8) +0x00d0|08 06 00 00 00 00 00 00 |........ | filesz: 1544 0xd0-0xd7.7 (8) +0x00d0| 08 06 00 00 00 00 00 00| ........| memsz: 1544 0xd8-0xdf.7 (8) +0x00e0|00 10 00 00 00 00 00 00 |........ | align: 4096 0xe0-0xe7.7 (8) + | | | [3]{}: program_header 0xe8-0x1288.7 (4513) | | | program_header{}: 0xe8-0x1288.7 (4513) 0x00e0| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0xe8-0xeb.7 (4) | | | flags{}: 0xec-0xef.7 (4) @@ -107,7 +91,7 @@ $ fq -d elf dv a_stripped 0x0110| 00 10 00 00 00 00 00 00| ........| align: 4096 0x118-0x11f.7 (8) 0x1000|50 e8 ca 01 00 00 e8 35 02 00 00 58 c3 00 00 00|P......5...X....| data: raw bits 0x1000-0x1288.7 (649) * |until 0x1288.7 (649) | | - | | | [5]{}: program_header 0x120-0x20cb.7 (8108) + | | | [4]{}: program_header 0x120-0x20cb.7 (8108) | | | program_header{}: 0x120-0x20cb.7 (8108) 0x0120|01 00 00 00 |.... | type: "load" (1) (Loadable segment) 0x120-0x123.7 (4) | | | flags{}: 0x124-0x127.7 (4) @@ -124,7 +108,7 @@ $ fq -d elf dv a_stripped 0x0150|00 10 00 00 00 00 00 00 |........ | align: 4096 0x150-0x157.7 (8) 0x2000|61 61 61 00 01 1b 03 3b 28 00 00 00 04 00 00 00|aaa....;(.......| data: raw bits 0x2000-0x20cb.7 (204) * |until 0x20cb.7 (204) | | - | | | [6]{}: program_header 0x158-0x3007.7 (11952) + | | | [5]{}: program_header 0x158-0x3007.7 (11952) | | | program_header{}: 0x158-0x3007.7 (11952) 0x0150| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x158-0x15b.7 (4) | | | flags{}: 0x15c-0x15f.7 (4) @@ -142,7 +126,7 @@ $ fq -d elf dv a_stripped 0x2df0| ff ff ff ff ff ff ff ff| ........| data: raw bits 0x2df8-0x3007.7 (528) 0x2e00|00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff|................| * |until 0x3007.7 (528) | | - | | | [7]{}: program_header 0x190-0x2fa7.7 (11800) + | | | [6]{}: program_header 0x190-0x2fa7.7 (11800) | | | program_header{}: 0x190-0x2fa7.7 (11800) 0x0190|02 00 00 00 |.... | type: "dynamic" (2) (Dynamic linking information) 0x190-0x193.7 (4) | | | flags{}: 0x194-0x197.7 (4) @@ -160,7 +144,7 @@ $ fq -d elf dv a_stripped 0x2e10| 01 00 00 00 00 00 00 00| ........| data: raw bits 0x2e18-0x2fa7.7 (400) 0x2e20|a2 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00|................| * |until 0x2fa7.7 (400) | | - | | | [8]{}: program_header 0x1c8-0x32f.7 (360) + | | | [7]{}: program_header 0x1c8-0x32f.7 (360) | | | program_header{}: 0x1c8-0x32f.7 (360) 0x01c0| 04 00 00 00 | .... | type: "note" (4) (Auxiliary information) 0x1c8-0x1cb.7 (4) | | | flags{}: 0x1cc-0x1cf.7 (4) @@ -177,7 +161,7 @@ $ fq -d elf dv a_stripped 0x01f0| 08 00 00 00 00 00 00 00| ........| align: 8 0x1f8-0x1ff.7 (8) 0x0300|04 00 00 00 20 00 00 00 05 00 00 00 47 4e 55 00|.... .......GNU.| data: raw bits 0x300-0x32f.7 (48) * |until 0x32f.7 (48) | | - | | | [9]{}: program_header 0x200-0x32f.7 (304) + | | | [8]{}: program_header 0x200-0x32f.7 (304) | | | program_header{}: 0x200-0x32f.7 (304) 0x0200|53 e5 74 64 |S.td | type: "os" (1685382483) (Operating system-specific) 0x200-0x203.7 (4) | | | flags{}: 0x204-0x207.7 (4) @@ -194,7 +178,7 @@ $ fq -d elf dv a_stripped 0x0230|08 00 00 00 00 00 00 00 |........ | align: 8 0x230-0x237.7 (8) 0x0300|04 00 00 00 20 00 00 00 05 00 00 00 47 4e 55 00|.... .......GNU.| data: raw bits 0x300-0x32f.7 (48) * |until 0x32f.7 (48) | | - | | | [10]{}: program_header 0x238-0x202f.7 (7672) + | | | [9]{}: program_header 0x238-0x202f.7 (7672) | | | program_header{}: 0x238-0x202f.7 (7672) 0x0230| 50 e5 74 64 | P.td | type: "gnu_eh_frame" (1685382480) (GNU frame unwind information) 0x238-0x23b.7 (4) | | | flags{}: 0x23c-0x23f.7 (4) @@ -212,6 +196,22 @@ $ fq -d elf dv a_stripped 0x2000| 01 1b 03 3b 28 00 00 00 04 00 00 00| ...;(.......| data: raw bits 0x2004-0x202f.7 (44) 0x2010|0c f0 ff ff 44 00 00 00 4c f0 ff ff 6c 00 00 00|....D...L...l...| 0x2020|01 f2 ff ff 84 00 00 00 14 f2 ff ff a4 00 00 00|................| + | | | [10]{}: program_header 0x0-0x2a7.7 (680) + | | | program_header{}: 0x0-0x2a7.7 (680) + | | | data: raw bits 0x0-NA (0) +0x0270|51 e5 74 64 |Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0x270-0x273.7 (4) + | | | flags{}: 0x274-0x277.7 (4) +0x0270| 06 | . | unused0: 0 0x274-0x274.4 (0.5) +0x0270| 06 | . | r: true 0x274.5-0x274.5 (0.1) +0x0270| 06 | . | w: true 0x274.6-0x274.6 (0.1) +0x0270| 06 | . | x: false 0x274.7-0x274.7 (0.1) +0x0270| 00 00 00 | ... | unused1: 0 0x275-0x277.7 (3) +0x0270| 00 00 00 00 00 00 00 00| ........| offset: 0x0 0x278-0x27f.7 (8) +0x0280|00 00 00 00 00 00 00 00 |........ | vaddr: 0x0 0x280-0x287.7 (8) +0x0280| 00 00 00 00 00 00 00 00| ........| paddr: 0x0 0x288-0x28f.7 (8) +0x0290|00 00 00 00 00 00 00 00 |........ | filesz: 0 0x290-0x297.7 (8) +0x0290| 00 00 00 00 00 00 00 00| ........| memsz: 0 0x298-0x29f.7 (8) +0x02a0|10 00 00 00 00 00 00 00 |........ | align: 16 0x2a0-0x2a7.7 (8) | | | [11]{}: program_header 0x2a8-0x2fff.7 (11608) | | | program_header{}: 0x2a8-0x2fff.7 (11608) 0x02a0| 52 e5 74 64 | R.td | type: "gnu_relro" (1685382482) (GNU read-only after relocation) 0x2a8-0x2ab.7 (4) @@ -996,7 +996,33 @@ $ fq -d elf dv a_stripped 0x3650| 00 00 00 00 | .... | info: 0 0x3654-0x3657.7 (4) 0x3650| 08 00 00 00 00 00 00 00| ........| addralign: 8 0x3658-0x365f.7 (8) 0x3660|00 00 00 00 00 00 00 00 |........ | entsize: 0 0x3660-0x3667.7 (8) - | | | [21]{}: section_header 0x3008-0x36e7.7 (1760) + | | | [21]{}: section_header 0x3668-0x36a7.7 (64) +0x3660| ac 00 00 00 | .... | name: ".bss" (172) 0x3668-0x366b.7 (4) +0x3660| 08 00 00 00| ....| type: "nobits" (0x8) (No space in the file) 0x366c-0x366f.7 (4) + | | | flags{}: 0x3670-0x3677.7 (8) +0x3670|03 |. | link_order: false 0x3670-0x3670 (0.1) +0x3670|03 |. | info_link: false 0x3670.1-0x3670.1 (0.1) +0x3670|03 |. | strings: false 0x3670.2-0x3670.2 (0.1) +0x3670|03 |. | merge: false 0x3670.3-0x3670.3 (0.1) +0x3670|03 |. | unused0: 0 0x3670.4-0x3670.4 (0.1) +0x3670|03 |. | execinstr: false 0x3670.5-0x3670.5 (0.1) +0x3670|03 |. | alloc: true 0x3670.6-0x3670.6 (0.1) +0x3670|03 |. | write: true 0x3670.7-0x3670.7 (0.1) +0x3670| 00 | . | tls: false 0x3671-0x3671 (0.1) +0x3670| 00 | . | group: false 0x3671.1-0x3671.1 (0.1) +0x3670| 00 | . | os_nonconforming: false 0x3671.2-0x3671.2 (0.1) +0x3670| 00 00 | .. | unused1: 0 0x3671.3-0x3672.3 (1.1) +0x3670| 00 00 | .. | os_specific: 0 0x3672.4-0x3673.3 (1) +0x3670| 00 | . | processor_specific: 0 0x3673.4-0x3673.7 (0.4) +0x3670| 00 00 00 00 | .... | unused2: 0 0x3674-0x3677.7 (4) +0x3670| 20 40 00 00 00 00 00 00| @......| addr: 0x4020 0x3678-0x367f.7 (8) +0x3680|08 30 00 00 00 00 00 00 |.0...... | offset: 0x3008 0x3680-0x3687.7 (8) +0x3680| 50 00 00 00 00 00 00 00| P.......| size: 80 0x3688-0x368f.7 (8) +0x3690|00 00 00 00 |.... | link: 0 0x3690-0x3693.7 (4) +0x3690| 00 00 00 00 | .... | info: 0 0x3694-0x3697.7 (4) +0x3690| 20 00 00 00 00 00 00 00| .......| addralign: 32 0x3698-0x369f.7 (8) +0x36a0|00 00 00 00 00 00 00 00 |........ | entsize: 0 0x36a0-0x36a7.7 (8) + | | | [22]{}: section_header 0x3008-0x36e7.7 (1760) 0x3000| 47 43 43 3a 20 28 41 6c| GCC: (Al| data: raw bits 0x3008-0x3069.7 (98) 0x3010|70 69 6e 65 20 31 30 2e 33 2e 31 5f 67 69 74 32|pine 10.3.1_git2| * |until 0x3069.7 (98) | | @@ -1025,7 +1051,7 @@ $ fq -d elf dv a_stripped 0x36d0| 00 00 00 00 | .... | info: 0 0x36d4-0x36d7.7 (4) 0x36d0| 01 00 00 00 00 00 00 00| ........| addralign: 1 0x36d8-0x36df.7 (8) 0x36e0|01 00 00 00 00 00 00 00 |........ | entsize: 1 0x36e0-0x36e7.7 (8) - | | | [22]{}: section_header 0x306a-0x3727.7 (1726) + | | | [23]{}: section_header 0x306a-0x3727.7 (1726) 0x3060| 00 2e 73 68 73 74| ..shst| string: "\x00.shstrtab\x00.interp\x00.note.gnu.property\x00.gnu.hash\x00.d"... 0x306a-0x3123.7 (186) 0x3070|72 74 61 62 00 2e 69 6e 74 65 72 70 00 2e 6e 6f|rtab..interp..no| * |until 0x3123.7 (186) | | @@ -1054,32 +1080,6 @@ $ fq -d elf dv a_stripped 0x3710| 00 00 00 00 | .... | info: 0 0x3714-0x3717.7 (4) 0x3710| 01 00 00 00 00 00 00 00| ........| addralign: 1 0x3718-0x371f.7 (8) 0x3720|00 00 00 00 00 00 00 00| |........| | entsize: 0 0x3720-0x3727.7 (8) - | | | [23]{}: section_header 0x3668-0x36a7.7 (64) -0x3660| ac 00 00 00 | .... | name: ".bss" (172) 0x3668-0x366b.7 (4) -0x3660| 08 00 00 00| ....| type: "nobits" (0x8) (No space in the file) 0x366c-0x366f.7 (4) - | | | flags{}: 0x3670-0x3677.7 (8) -0x3670|03 |. | link_order: false 0x3670-0x3670 (0.1) -0x3670|03 |. | info_link: false 0x3670.1-0x3670.1 (0.1) -0x3670|03 |. | strings: false 0x3670.2-0x3670.2 (0.1) -0x3670|03 |. | merge: false 0x3670.3-0x3670.3 (0.1) -0x3670|03 |. | unused0: 0 0x3670.4-0x3670.4 (0.1) -0x3670|03 |. | execinstr: false 0x3670.5-0x3670.5 (0.1) -0x3670|03 |. | alloc: true 0x3670.6-0x3670.6 (0.1) -0x3670|03 |. | write: true 0x3670.7-0x3670.7 (0.1) -0x3670| 00 | . | tls: false 0x3671-0x3671 (0.1) -0x3670| 00 | . | group: false 0x3671.1-0x3671.1 (0.1) -0x3670| 00 | . | os_nonconforming: false 0x3671.2-0x3671.2 (0.1) -0x3670| 00 00 | .. | unused1: 0 0x3671.3-0x3672.3 (1.1) -0x3670| 00 00 | .. | os_specific: 0 0x3672.4-0x3673.3 (1) -0x3670| 00 | . | processor_specific: 0 0x3673.4-0x3673.7 (0.4) -0x3670| 00 00 00 00 | .... | unused2: 0 0x3674-0x3677.7 (4) -0x3670| 20 40 00 00 00 00 00 00| @......| addr: 0x4020 0x3678-0x367f.7 (8) -0x3680|08 30 00 00 00 00 00 00 |.0...... | offset: 0x3008 0x3680-0x3687.7 (8) -0x3680| 50 00 00 00 00 00 00 00| P.......| size: 80 0x3688-0x368f.7 (8) -0x3690|00 00 00 00 |.... | link: 0 0x3690-0x3693.7 (4) -0x3690| 00 00 00 00 | .... | info: 0 0x3694-0x3697.7 (4) -0x3690| 20 00 00 00 00 00 00 00| .......| addralign: 32 0x3698-0x369f.7 (8) -0x36a0|00 00 00 00 00 00 00 00 |........ | entsize: 0 0x36a0-0x36a7.7 (8) 0x0600| 00 00 00 00 00 00 00 00| ........| unknown0: raw bits 0x608-0xfff.7 (2552) 0x0610|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................| * |until 0xfff.7 (2552) | | diff --git a/format/elf/testdata/linux_amd64/libbbb.a.fqtest b/format/elf/testdata/linux_amd64/libbbb.a.fqtest index 7d2502832..920b7f027 100644 --- a/format/elf/testdata/linux_amd64/libbbb.a.fqtest +++ b/format/elf/testdata/linux_amd64/libbbb.a.fqtest @@ -114,7 +114,39 @@ $ fq -d ar dv libbbb.a 0x360| 01 00 00 00| ....| addralign: 1 0x36c-0x373.7 (8) 0x370|00 00 00 00 |.... | 0x370| 00 00 00 00 00 00 00 00 | ........ | entsize: 0 0x374-0x37b.7 (8) - | | | [2]{}: section_header 0xe7-0x3fb.7 (789) + | | | [2]{}: section_header 0x23c-0x3bb.7 (384) +0x230| 07 00 00 00| ....| data: raw bits 0x23c-0x26b.7 (48) +0x240|00 00 00 00 02 00 00 00 03 00 00 00 fc ff ff ff|................| +* |until 0x26b.7 (48) | | +0x370| 1b 00 00 00| ....| name: ".rela.text" (27) 0x37c-0x37f.7 (4) +0x380|04 00 00 00 |.... | type: "rela" (0x4) (Relocation entries with explicit addends) 0x380-0x383.7 (4) + | | | flags{}: 0x384-0x38b.7 (8) +0x380| 40 | @ | link_order: false 0x384-0x384 (0.1) +0x380| 40 | @ | info_link: true 0x384.1-0x384.1 (0.1) +0x380| 40 | @ | strings: false 0x384.2-0x384.2 (0.1) +0x380| 40 | @ | merge: false 0x384.3-0x384.3 (0.1) +0x380| 40 | @ | unused0: 0 0x384.4-0x384.4 (0.1) +0x380| 40 | @ | execinstr: false 0x384.5-0x384.5 (0.1) +0x380| 40 | @ | alloc: false 0x384.6-0x384.6 (0.1) +0x380| 40 | @ | write: false 0x384.7-0x384.7 (0.1) +0x380| 00 | . | tls: false 0x385-0x385 (0.1) +0x380| 00 | . | group: false 0x385.1-0x385.1 (0.1) +0x380| 00 | . | os_nonconforming: false 0x385.2-0x385.2 (0.1) +0x380| 00 00 | .. | unused1: 0 0x385.3-0x386.3 (1.1) +0x380| 00 00 | .. | os_specific: 0 0x386.4-0x387.3 (1) +0x380| 00 | . | processor_specific: 0 0x387.4-0x387.7 (0.4) +0x380| 00 00 00 00 | .... | unused2: 0 0x388-0x38b.7 (4) +0x380| 00 00 00 00| ....| addr: 0x0 0x38c-0x393.7 (8) +0x390|00 00 00 00 |.... | +0x390| a8 01 00 00 00 00 00 00 | ........ | offset: 0x1a8 0x394-0x39b.7 (8) +0x390| 30 00 00 00| 0...| size: 48 0x39c-0x3a3.7 (8) +0x3a0|00 00 00 00 |.... | +0x3a0| 0b 00 00 00 | .... | link: 11 0x3a4-0x3a7.7 (4) +0x3a0| 01 00 00 00 | .... | info: 1 0x3a8-0x3ab.7 (4) +0x3a0| 08 00 00 00| ....| addralign: 8 0x3ac-0x3b3.7 (8) +0x3b0|00 00 00 00 |.... | +0x3b0| 18 00 00 00 00 00 00 00 | ........ | entsize: 24 0x3b4-0x3bb.7 (8) + | | | [3]{}: section_header 0xe7-0x3fb.7 (789) | | | data: raw bits 0xe7-NA (0) 0x3b0| 26 00 00 00| &...| name: ".data" (38) 0x3bc-0x3bf.7 (4) 0x3c0|01 00 00 00 |.... | type: "progbits" (0x1) (Information defined by the program) 0x3c0-0x3c3.7 (4) @@ -144,7 +176,36 @@ $ fq -d ar dv libbbb.a 0x3e0| 01 00 00 00| ....| addralign: 1 0x3ec-0x3f3.7 (8) 0x3f0|00 00 00 00 |.... | 0x3f0| 00 00 00 00 00 00 00 00 | ........ | entsize: 0 0x3f4-0x3fb.7 (8) - | | | [3]{}: section_header 0xe7-0x47b.7 (917) + | | | [4]{}: section_header 0x3fc-0x43b.7 (64) +0x3f0| 2c 00 00 00| ,...| name: ".bss" (44) 0x3fc-0x3ff.7 (4) +0x400|08 00 00 00 |.... | type: "nobits" (0x8) (No space in the file) 0x400-0x403.7 (4) + | | | flags{}: 0x404-0x40b.7 (8) +0x400| 03 | . | link_order: false 0x404-0x404 (0.1) +0x400| 03 | . | info_link: false 0x404.1-0x404.1 (0.1) +0x400| 03 | . | strings: false 0x404.2-0x404.2 (0.1) +0x400| 03 | . | merge: false 0x404.3-0x404.3 (0.1) +0x400| 03 | . | unused0: 0 0x404.4-0x404.4 (0.1) +0x400| 03 | . | execinstr: false 0x404.5-0x404.5 (0.1) +0x400| 03 | . | alloc: true 0x404.6-0x404.6 (0.1) +0x400| 03 | . | write: true 0x404.7-0x404.7 (0.1) +0x400| 00 | . | tls: false 0x405-0x405 (0.1) +0x400| 00 | . | group: false 0x405.1-0x405.1 (0.1) +0x400| 00 | . | os_nonconforming: false 0x405.2-0x405.2 (0.1) +0x400| 00 00 | .. | unused1: 0 0x405.3-0x406.3 (1.1) +0x400| 00 00 | .. | os_specific: 0 0x406.4-0x407.3 (1) +0x400| 00 | . | processor_specific: 0 0x407.4-0x407.7 (0.4) +0x400| 00 00 00 00 | .... | unused2: 0 0x408-0x40b.7 (4) +0x400| 00 00 00 00| ....| addr: 0x0 0x40c-0x413.7 (8) +0x410|00 00 00 00 |.... | +0x410| 53 00 00 00 00 00 00 00 | S....... | offset: 0x53 0x414-0x41b.7 (8) +0x410| 00 00 00 00| ....| size: 0 0x41c-0x423.7 (8) +0x420|00 00 00 00 |.... | +0x420| 00 00 00 00 | .... | link: 0 0x424-0x427.7 (4) +0x420| 00 00 00 00 | .... | info: 0 0x428-0x42b.7 (4) +0x420| 01 00 00 00| ....| addralign: 1 0x42c-0x433.7 (8) +0x430|00 00 00 00 |.... | +0x430| 00 00 00 00 00 00 00 00 | ........ | entsize: 0 0x434-0x43b.7 (8) + | | | [5]{}: section_header 0xe7-0x47b.7 (917) 0x0e0| 6c 69 62 62 62 62 5f 62 62| libbbb_bb| data: raw bits 0xe7-0xf1.7 (11) 0x0f0|62 00 |b. | 0x430| 31 00 00 00| 1...| name: ".rodata" (49) 0x43c-0x43f.7 (4) @@ -175,7 +236,7 @@ $ fq -d ar dv libbbb.a 0x460| 01 00 00 00| ....| addralign: 1 0x46c-0x473.7 (8) 0x470|00 00 00 00 |.... | 0x470| 00 00 00 00 00 00 00 00 | ........ | entsize: 0 0x474-0x47b.7 (8) - | | | [4]{}: section_header 0xf2-0x4bb.7 (970) + | | | [6]{}: section_header 0xf2-0x4bb.7 (970) 0x0f0| 00 47 43 43 3a 20 28 41 6c 70 69 6e 65 20| .GCC: (Alpine | data: raw bits 0xf2-0x123.7 (50) 0x100|31 30 2e 33 2e 31 5f 67 69 74 32 30 32 31 31 30|10.3.1_git202110| * |until 0x123.7 (50) | | @@ -207,7 +268,7 @@ $ fq -d ar dv libbbb.a 0x4a0| 01 00 00 00| ....| addralign: 1 0x4ac-0x4b3.7 (8) 0x4b0|00 00 00 00 |.... | 0x4b0| 01 00 00 00 00 00 00 00 | ........ | entsize: 1 0x4b4-0x4bb.7 (8) - | | | [5]{}: section_header 0x124-0x4fb.7 (984) + | | | [7]{}: section_header 0x124-0x4fb.7 (984) | | | data: raw bits 0x124-NA (0) 0x4b0| 42 00 00 00| B...| name: ".note.GNU-stack" (66) 0x4bc-0x4bf.7 (4) 0x4c0|01 00 00 00 |.... | type: "progbits" (0x1) (Information defined by the program) 0x4c0-0x4c3.7 (4) @@ -237,7 +298,7 @@ $ fq -d ar dv libbbb.a 0x4e0| 01 00 00 00| ....| addralign: 1 0x4ec-0x4f3.7 (8) 0x4f0|00 00 00 00 |.... | 0x4f0| 00 00 00 00 00 00 00 00 | ........ | entsize: 0 0x4f4-0x4fb.7 (8) - | | | [6]{}: section_header 0x124-0x53b.7 (1048) + | | | [8]{}: section_header 0x124-0x53b.7 (1048) 0x120| 04 00 00 00 20 00 00 00 05 00 00 00| .... .......| data: raw bits 0x124-0x153.7 (48) 0x130|47 4e 55 00 02 00 01 c0 04 00 00 00 00 00 00 00|GNU.............| * |until 0x153.7 (48) | | @@ -269,7 +330,7 @@ $ fq -d ar dv libbbb.a 0x520| 08 00 00 00| ....| addralign: 8 0x52c-0x533.7 (8) 0x530|00 00 00 00 |.... | 0x530| 00 00 00 00 00 00 00 00 | ........ | entsize: 0 0x534-0x53b.7 (8) - | | | [7]{}: section_header 0x154-0x57b.7 (1064) + | | | [9]{}: section_header 0x154-0x57b.7 (1064) 0x150| 14 00 00 00 00 00 00 00 01 7a 52 00| .........zR.| data: raw bits 0x154-0x18b.7 (56) 0x160|01 78 10 01 1b 0c 07 08 90 01 00 00 1c 00 00 00|.x..............| * |until 0x18b.7 (56) | | @@ -301,7 +362,39 @@ $ fq -d ar dv libbbb.a 0x560| 08 00 00 00| ....| addralign: 8 0x56c-0x573.7 (8) 0x570|00 00 00 00 |.... | 0x570| 00 00 00 00 00 00 00 00 | ........ | entsize: 0 0x574-0x57b.7 (8) - | | | [8]{}: section_header 0x18c-0x5fb.7 (1136) + | | | [10]{}: section_header 0x26c-0x5bb.7 (848) +0x260| 20 00 00 00| ...| data: raw bits 0x26c-0x283.7 (24) +0x270|00 00 00 00 02 00 00 00 02 00 00 00 00 00 00 00|................| +0x280|00 00 00 00 |.... | +0x570| 65 00 00 00| e...| name: ".rela.eh_frame" (101) 0x57c-0x57f.7 (4) +0x580|04 00 00 00 |.... | type: "rela" (0x4) (Relocation entries with explicit addends) 0x580-0x583.7 (4) + | | | flags{}: 0x584-0x58b.7 (8) +0x580| 40 | @ | link_order: false 0x584-0x584 (0.1) +0x580| 40 | @ | info_link: true 0x584.1-0x584.1 (0.1) +0x580| 40 | @ | strings: false 0x584.2-0x584.2 (0.1) +0x580| 40 | @ | merge: false 0x584.3-0x584.3 (0.1) +0x580| 40 | @ | unused0: 0 0x584.4-0x584.4 (0.1) +0x580| 40 | @ | execinstr: false 0x584.5-0x584.5 (0.1) +0x580| 40 | @ | alloc: false 0x584.6-0x584.6 (0.1) +0x580| 40 | @ | write: false 0x584.7-0x584.7 (0.1) +0x580| 00 | . | tls: false 0x585-0x585 (0.1) +0x580| 00 | . | group: false 0x585.1-0x585.1 (0.1) +0x580| 00 | . | os_nonconforming: false 0x585.2-0x585.2 (0.1) +0x580| 00 00 | .. | unused1: 0 0x585.3-0x586.3 (1.1) +0x580| 00 00 | .. | os_specific: 0 0x586.4-0x587.3 (1) +0x580| 00 | . | processor_specific: 0 0x587.4-0x587.7 (0.4) +0x580| 00 00 00 00 | .... | unused2: 0 0x588-0x58b.7 (4) +0x580| 00 00 00 00| ....| addr: 0x0 0x58c-0x593.7 (8) +0x590|00 00 00 00 |.... | +0x590| d8 01 00 00 00 00 00 00 | ........ | offset: 0x1d8 0x594-0x59b.7 (8) +0x590| 18 00 00 00| ....| size: 24 0x59c-0x5a3.7 (8) +0x5a0|00 00 00 00 |.... | +0x5a0| 0b 00 00 00 | .... | link: 11 0x5a4-0x5a7.7 (4) +0x5a0| 09 00 00 00 | .... | info: 9 0x5a8-0x5ab.7 (4) +0x5a0| 08 00 00 00| ....| addralign: 8 0x5ac-0x5b3.7 (8) +0x5b0|00 00 00 00 |.... | +0x5b0| 18 00 00 00 00 00 00 00 | ........ | entsize: 24 0x5b4-0x5bb.7 (8) + | | | [11]{}: section_header 0x18c-0x5fb.7 (1136) | | | symbol_table[0:6]: 0x18c-0x21b.7 (144) | | | [0]{}: symbol 0x18c-0x1a3.7 (24) 0x180| 00 00 00 00| ....| name: "" (0) 0x18c-0x18f.7 (4) @@ -391,7 +484,7 @@ $ fq -d ar dv libbbb.a 0x5e0| 08 00 00 00| ....| addralign: 8 0x5ec-0x5f3.7 (8) 0x5f0|00 00 00 00 |.... | 0x5f0| 18 00 00 00 00 00 00 00 | ........ | entsize: 24 0x5f4-0x5fb.7 (8) - | | | [9]{}: section_header 0x21c-0x63b.7 (1056) + | | | [12]{}: section_header 0x21c-0x63b.7 (1056) 0x210| 00 6c 69 62| .lib| string: "\x00libbbb.c\x00libbbb_bbb\x00puts\x00" 0x21c-0x235.7 (26) 0x220|62 62 62 2e 63 00 6c 69 62 62 62 62 5f 62 62 62|bbb.c.libbbb_bbb| 0x230|00 70 75 74 73 00 |.puts. | @@ -423,71 +516,7 @@ $ fq -d ar dv libbbb.a 0x620| 01 00 00 00| ....| addralign: 1 0x62c-0x633.7 (8) 0x630|00 00 00 00 |.... | 0x630| 00 00 00 00 00 00 00 00 | ........ | entsize: 0 0x634-0x63b.7 (8) - | | | [10]{}: section_header 0x23c-0x3bb.7 (384) -0x230| 07 00 00 00| ....| data: raw bits 0x23c-0x26b.7 (48) -0x240|00 00 00 00 02 00 00 00 03 00 00 00 fc ff ff ff|................| -* |until 0x26b.7 (48) | | -0x370| 1b 00 00 00| ....| name: ".rela.text" (27) 0x37c-0x37f.7 (4) -0x380|04 00 00 00 |.... | type: "rela" (0x4) (Relocation entries with explicit addends) 0x380-0x383.7 (4) - | | | flags{}: 0x384-0x38b.7 (8) -0x380| 40 | @ | link_order: false 0x384-0x384 (0.1) -0x380| 40 | @ | info_link: true 0x384.1-0x384.1 (0.1) -0x380| 40 | @ | strings: false 0x384.2-0x384.2 (0.1) -0x380| 40 | @ | merge: false 0x384.3-0x384.3 (0.1) -0x380| 40 | @ | unused0: 0 0x384.4-0x384.4 (0.1) -0x380| 40 | @ | execinstr: false 0x384.5-0x384.5 (0.1) -0x380| 40 | @ | alloc: false 0x384.6-0x384.6 (0.1) -0x380| 40 | @ | write: false 0x384.7-0x384.7 (0.1) -0x380| 00 | . | tls: false 0x385-0x385 (0.1) -0x380| 00 | . | group: false 0x385.1-0x385.1 (0.1) -0x380| 00 | . | os_nonconforming: false 0x385.2-0x385.2 (0.1) -0x380| 00 00 | .. | unused1: 0 0x385.3-0x386.3 (1.1) -0x380| 00 00 | .. | os_specific: 0 0x386.4-0x387.3 (1) -0x380| 00 | . | processor_specific: 0 0x387.4-0x387.7 (0.4) -0x380| 00 00 00 00 | .... | unused2: 0 0x388-0x38b.7 (4) -0x380| 00 00 00 00| ....| addr: 0x0 0x38c-0x393.7 (8) -0x390|00 00 00 00 |.... | -0x390| a8 01 00 00 00 00 00 00 | ........ | offset: 0x1a8 0x394-0x39b.7 (8) -0x390| 30 00 00 00| 0...| size: 48 0x39c-0x3a3.7 (8) -0x3a0|00 00 00 00 |.... | -0x3a0| 0b 00 00 00 | .... | link: 11 0x3a4-0x3a7.7 (4) -0x3a0| 01 00 00 00 | .... | info: 1 0x3a8-0x3ab.7 (4) -0x3a0| 08 00 00 00| ....| addralign: 8 0x3ac-0x3b3.7 (8) -0x3b0|00 00 00 00 |.... | -0x3b0| 18 00 00 00 00 00 00 00 | ........ | entsize: 24 0x3b4-0x3bb.7 (8) - | | | [11]{}: section_header 0x26c-0x5bb.7 (848) -0x260| 20 00 00 00| ...| data: raw bits 0x26c-0x283.7 (24) -0x270|00 00 00 00 02 00 00 00 02 00 00 00 00 00 00 00|................| -0x280|00 00 00 00 |.... | -0x570| 65 00 00 00| e...| name: ".rela.eh_frame" (101) 0x57c-0x57f.7 (4) -0x580|04 00 00 00 |.... | type: "rela" (0x4) (Relocation entries with explicit addends) 0x580-0x583.7 (4) - | | | flags{}: 0x584-0x58b.7 (8) -0x580| 40 | @ | link_order: false 0x584-0x584 (0.1) -0x580| 40 | @ | info_link: true 0x584.1-0x584.1 (0.1) -0x580| 40 | @ | strings: false 0x584.2-0x584.2 (0.1) -0x580| 40 | @ | merge: false 0x584.3-0x584.3 (0.1) -0x580| 40 | @ | unused0: 0 0x584.4-0x584.4 (0.1) -0x580| 40 | @ | execinstr: false 0x584.5-0x584.5 (0.1) -0x580| 40 | @ | alloc: false 0x584.6-0x584.6 (0.1) -0x580| 40 | @ | write: false 0x584.7-0x584.7 (0.1) -0x580| 00 | . | tls: false 0x585-0x585 (0.1) -0x580| 00 | . | group: false 0x585.1-0x585.1 (0.1) -0x580| 00 | . | os_nonconforming: false 0x585.2-0x585.2 (0.1) -0x580| 00 00 | .. | unused1: 0 0x585.3-0x586.3 (1.1) -0x580| 00 00 | .. | os_specific: 0 0x586.4-0x587.3 (1) -0x580| 00 | . | processor_specific: 0 0x587.4-0x587.7 (0.4) -0x580| 00 00 00 00 | .... | unused2: 0 0x588-0x58b.7 (4) -0x580| 00 00 00 00| ....| addr: 0x0 0x58c-0x593.7 (8) -0x590|00 00 00 00 |.... | -0x590| d8 01 00 00 00 00 00 00 | ........ | offset: 0x1d8 0x594-0x59b.7 (8) -0x590| 18 00 00 00| ....| size: 24 0x59c-0x5a3.7 (8) -0x5a0|00 00 00 00 |.... | -0x5a0| 0b 00 00 00 | .... | link: 11 0x5a4-0x5a7.7 (4) -0x5a0| 09 00 00 00 | .... | info: 9 0x5a8-0x5ab.7 (4) -0x5a0| 08 00 00 00| ....| addralign: 8 0x5ac-0x5b3.7 (8) -0x5b0|00 00 00 00 |.... | -0x5b0| 18 00 00 00 00 00 00 00 | ........ | entsize: 24 0x5b4-0x5bb.7 (8) - | | | [12]{}: section_header 0x284-0x67b.7 (1016) + | | | [13]{}: section_header 0x284-0x67b.7 (1016) 0x280| 00 2e 73 79 6d 74 61 62 00 2e 73 74| ..symtab..st| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.rela.text\x00.data\x00.bss\x00."... 0x284-0x2f7.7 (116) 0x290|72 74 61 62 00 2e 73 68 73 74 72 74 61 62 00 2e|rtab..shstrtab..| * |until 0x2f7.7 (116) | | @@ -519,35 +548,6 @@ $ fq -d ar dv libbbb.a 0x660| 01 00 00 00| ....| addralign: 1 0x66c-0x673.7 (8) 0x670|00 00 00 00 |.... | 0x670| 00 00 00 00 00 00 00 00| | ........| | entsize: 0 0x674-0x67b.7 (8) - | | | [13]{}: section_header 0x3fc-0x43b.7 (64) -0x3f0| 2c 00 00 00| ,...| name: ".bss" (44) 0x3fc-0x3ff.7 (4) -0x400|08 00 00 00 |.... | type: "nobits" (0x8) (No space in the file) 0x400-0x403.7 (4) - | | | flags{}: 0x404-0x40b.7 (8) -0x400| 03 | . | link_order: false 0x404-0x404 (0.1) -0x400| 03 | . | info_link: false 0x404.1-0x404.1 (0.1) -0x400| 03 | . | strings: false 0x404.2-0x404.2 (0.1) -0x400| 03 | . | merge: false 0x404.3-0x404.3 (0.1) -0x400| 03 | . | unused0: 0 0x404.4-0x404.4 (0.1) -0x400| 03 | . | execinstr: false 0x404.5-0x404.5 (0.1) -0x400| 03 | . | alloc: true 0x404.6-0x404.6 (0.1) -0x400| 03 | . | write: true 0x404.7-0x404.7 (0.1) -0x400| 00 | . | tls: false 0x405-0x405 (0.1) -0x400| 00 | . | group: false 0x405.1-0x405.1 (0.1) -0x400| 00 | . | os_nonconforming: false 0x405.2-0x405.2 (0.1) -0x400| 00 00 | .. | unused1: 0 0x405.3-0x406.3 (1.1) -0x400| 00 00 | .. | os_specific: 0 0x406.4-0x407.3 (1) -0x400| 00 | . | processor_specific: 0 0x407.4-0x407.7 (0.4) -0x400| 00 00 00 00 | .... | unused2: 0 0x408-0x40b.7 (4) -0x400| 00 00 00 00| ....| addr: 0x0 0x40c-0x413.7 (8) -0x410|00 00 00 00 |.... | -0x410| 53 00 00 00 00 00 00 00 | S....... | offset: 0x53 0x414-0x41b.7 (8) -0x410| 00 00 00 00| ....| size: 0 0x41c-0x423.7 (8) -0x420|00 00 00 00 |.... | -0x420| 00 00 00 00 | .... | link: 0 0x424-0x427.7 (4) -0x420| 00 00 00 00 | .... | info: 0 0x428-0x42b.7 (4) -0x420| 01 00 00 00| ....| addralign: 1 0x42c-0x433.7 (8) -0x430|00 00 00 00 |.... | -0x430| 00 00 00 00 00 00 00 00 | ........ | entsize: 0 0x434-0x43b.7 (8) 0x230| 00 00 00 00 00 00 | ...... | unknown0: raw bits 0x236-0x23b.7 (6) 0x2f0| 00 00 00 00 | .... | unknown1: raw bits 0x2f8-0x2fb.7 (4) | | | program_headers[0:0]: 0x67c-NA (0) diff --git a/format/elf/testdata/linux_amd64/libbbb.so.fqtest b/format/elf/testdata/linux_amd64/libbbb.so.fqtest index e05828485..76f6c8982 100644 --- a/format/elf/testdata/linux_amd64/libbbb.so.fqtest +++ b/format/elf/testdata/linux_amd64/libbbb.so.fqtest @@ -40,23 +40,7 @@ $ fq -d elf dv libbbb.so 0x0060|e0 04 00 00 00 00 00 00 |........ | filesz: 1248 0x60-0x67.7 (8) 0x0060| e0 04 00 00 00 00 00 00| ........| memsz: 1248 0x68-0x6f.7 (8) 0x0070|00 10 00 00 00 00 00 00 |........ | align: 4096 0x70-0x77.7 (8) - | | | [1]{}: program_header 0x0-0x237.7 (568) - | | | program_header{}: 0x0-0x237.7 (568) - | | | data: raw bits 0x0-NA (0) -0x0200|51 e5 74 64 |Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0x200-0x203.7 (4) - | | | flags{}: 0x204-0x207.7 (4) -0x0200| 06 | . | unused0: 0 0x204-0x204.4 (0.5) -0x0200| 06 | . | r: true 0x204.5-0x204.5 (0.1) -0x0200| 06 | . | w: true 0x204.6-0x204.6 (0.1) -0x0200| 06 | . | x: false 0x204.7-0x204.7 (0.1) -0x0200| 00 00 00 | ... | unused1: 0 0x205-0x207.7 (3) -0x0200| 00 00 00 00 00 00 00 00| ........| offset: 0x0 0x208-0x20f.7 (8) -0x0210|00 00 00 00 00 00 00 00 |........ | vaddr: 0x0 0x210-0x217.7 (8) -0x0210| 00 00 00 00 00 00 00 00| ........| paddr: 0x0 0x218-0x21f.7 (8) -0x0220|00 00 00 00 00 00 00 00 |........ | filesz: 0 0x220-0x227.7 (8) -0x0220| 00 00 00 00 00 00 00 00| ........| memsz: 0 0x228-0x22f.7 (8) -0x0230|10 00 00 00 00 00 00 00 |........ | align: 16 0x230-0x237.7 (8) - | | | [2]{}: program_header 0x78-0x1208.7 (4497) + | | | [1]{}: program_header 0x78-0x1208.7 (4497) | | | program_header{}: 0x78-0x1208.7 (4497) 0x0070| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x78-0x7b.7 (4) | | | flags{}: 0x7c-0x7f.7 (4) @@ -73,7 +57,7 @@ $ fq -d elf dv libbbb.so 0x00a0| 00 10 00 00 00 00 00 00| ........| align: 4096 0xa8-0xaf.7 (8) 0x1000|50 e8 6a 01 00 00 e8 b5 01 00 00 58 c3 00 00 00|P.j........X....| data: raw bits 0x1000-0x1208.7 (521) * |until 0x1208.7 (521) | | - | | | [3]{}: program_header 0xb0-0x20df.7 (8240) + | | | [2]{}: program_header 0xb0-0x20df.7 (8240) | | | program_header{}: 0xb0-0x20df.7 (8240) 0x00b0|01 00 00 00 |.... | type: "load" (1) (Loadable segment) 0xb0-0xb3.7 (4) | | | flags{}: 0xb4-0xb7.7 (4) @@ -90,7 +74,7 @@ $ fq -d elf dv libbbb.so 0x00e0|00 10 00 00 00 00 00 00 |........ | align: 4096 0xe0-0xe7.7 (8) 0x2000|6c 69 62 62 62 62 5f 62 62 62 00 00 01 1b 03 3b|libbbb_bbb.....;| data: raw bits 0x2000-0x20df.7 (224) * |until 0x20df.7 (224) | | - | | | [4]{}: program_header 0xe8-0x3007.7 (12064) + | | | [3]{}: program_header 0xe8-0x3007.7 (12064) | | | program_header{}: 0xe8-0x3007.7 (12064) 0x00e0| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0xe8-0xeb.7 (4) | | | flags{}: 0xec-0xef.7 (4) @@ -108,7 +92,7 @@ $ fq -d elf dv libbbb.so 0x2e20| ff ff ff ff ff ff ff ff| ........| data: raw bits 0x2e28-0x3007.7 (480) 0x2e30|00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff|................| * |until 0x3007.7 (480) | | - | | | [5]{}: program_header 0x120-0x2fb7.7 (11928) + | | | [4]{}: program_header 0x120-0x2fb7.7 (11928) | | | program_header{}: 0x120-0x2fb7.7 (11928) 0x0120|02 00 00 00 |.... | type: "dynamic" (2) (Dynamic linking information) 0x120-0x123.7 (4) | | | flags{}: 0x124-0x127.7 (4) @@ -126,7 +110,7 @@ $ fq -d elf dv libbbb.so 0x2e40| 01 00 00 00 00 00 00 00| ........| data: raw bits 0x2e48-0x2fb7.7 (368) 0x2e50|90 00 00 00 00 00 00 00 0c 00 00 00 00 00 00 00|................| * |until 0x2fb7.7 (368) | | - | | | [6]{}: program_header 0x158-0x20df.7 (8072) + | | | [5]{}: program_header 0x158-0x20df.7 (8072) | | | program_header{}: 0x158-0x20df.7 (8072) 0x0150| 04 00 00 00 | .... | type: "note" (4) (Auxiliary information) 0x158-0x15b.7 (4) | | | flags{}: 0x15c-0x15f.7 (4) @@ -143,7 +127,7 @@ $ fq -d elf dv libbbb.so 0x0180| 08 00 00 00 00 00 00 00| ........| align: 8 0x188-0x18f.7 (8) 0x20b0|04 00 00 00 20 00 00 00 05 00 00 00 47 4e 55 00|.... .......GNU.| data: raw bits 0x20b0-0x20df.7 (48) * |until 0x20df.7 (48) | | - | | | [7]{}: program_header 0x190-0x20df.7 (8016) + | | | [6]{}: program_header 0x190-0x20df.7 (8016) | | | program_header{}: 0x190-0x20df.7 (8016) 0x0190|53 e5 74 64 |S.td | type: "os" (1685382483) (Operating system-specific) 0x190-0x193.7 (4) | | | flags{}: 0x194-0x197.7 (4) @@ -160,7 +144,7 @@ $ fq -d elf dv libbbb.so 0x01c0|08 00 00 00 00 00 00 00 |........ | align: 8 0x1c0-0x1c7.7 (8) 0x20b0|04 00 00 00 20 00 00 00 05 00 00 00 47 4e 55 00|.... .......GNU.| data: raw bits 0x20b0-0x20df.7 (48) * |until 0x20df.7 (48) | | - | | | [8]{}: program_header 0x1c8-0x202f.7 (7784) + | | | [7]{}: program_header 0x1c8-0x202f.7 (7784) | | | program_header{}: 0x1c8-0x202f.7 (7784) 0x01c0| 50 e5 74 64 | P.td | type: "gnu_eh_frame" (1685382480) (GNU frame unwind information) 0x1c8-0x1cb.7 (4) | | | flags{}: 0x1cc-0x1cf.7 (4) @@ -178,6 +162,22 @@ $ fq -d elf dv libbbb.so 0x2000| 01 1b 03 3b| ...;| data: raw bits 0x200c-0x202f.7 (36) 0x2010|20 00 00 00 03 00 00 00 04 f0 ff ff 3c 00 00 00| ...........<...| 0x2020|24 f0 ff ff 64 00 00 00 99 f1 ff ff 7c 00 00 00|$...d.......|...| + | | | [8]{}: program_header 0x0-0x237.7 (568) + | | | program_header{}: 0x0-0x237.7 (568) + | | | data: raw bits 0x0-NA (0) +0x0200|51 e5 74 64 |Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0x200-0x203.7 (4) + | | | flags{}: 0x204-0x207.7 (4) +0x0200| 06 | . | unused0: 0 0x204-0x204.4 (0.5) +0x0200| 06 | . | r: true 0x204.5-0x204.5 (0.1) +0x0200| 06 | . | w: true 0x204.6-0x204.6 (0.1) +0x0200| 06 | . | x: false 0x204.7-0x204.7 (0.1) +0x0200| 00 00 00 | ... | unused1: 0 0x205-0x207.7 (3) +0x0200| 00 00 00 00 00 00 00 00| ........| offset: 0x0 0x208-0x20f.7 (8) +0x0210|00 00 00 00 00 00 00 00 |........ | vaddr: 0x0 0x210-0x217.7 (8) +0x0210| 00 00 00 00 00 00 00 00| ........| paddr: 0x0 0x218-0x21f.7 (8) +0x0220|00 00 00 00 00 00 00 00 |........ | filesz: 0 0x220-0x227.7 (8) +0x0220| 00 00 00 00 00 00 00 00| ........| memsz: 0 0x228-0x22f.7 (8) +0x0230|10 00 00 00 00 00 00 00 |........ | align: 16 0x230-0x237.7 (8) | | | [9]{}: program_header 0x238-0x2fff.7 (11720) | | | program_header{}: 0x238-0x2fff.7 (11720) 0x0230| 52 e5 74 64 | R.td | type: "gnu_relro" (1685382482) (GNU read-only after relocation) 0x238-0x23b.7 (4) @@ -919,7 +919,33 @@ $ fq -d elf dv libbbb.so 0x3d70| 00 00 00 00| ....| info: 0 0x3d7c-0x3d7f.7 (4) 0x3d80|08 00 00 00 00 00 00 00 |........ | addralign: 8 0x3d80-0x3d87.7 (8) 0x3d80| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x3d88-0x3d8f.7 (8) - | | | [20]{}: section_header 0x3008-0x3e0f.7 (3592) + | | | [20]{}: section_header 0x3d90-0x3dcf.7 (64) +0x3d90|b4 00 00 00 |.... | name: ".bss" (180) 0x3d90-0x3d93.7 (4) +0x3d90| 08 00 00 00 | .... | type: "nobits" (0x8) (No space in the file) 0x3d94-0x3d97.7 (4) + | | | flags{}: 0x3d98-0x3d9f.7 (8) +0x3d90| 03 | . | link_order: false 0x3d98-0x3d98 (0.1) +0x3d90| 03 | . | info_link: false 0x3d98.1-0x3d98.1 (0.1) +0x3d90| 03 | . | strings: false 0x3d98.2-0x3d98.2 (0.1) +0x3d90| 03 | . | merge: false 0x3d98.3-0x3d98.3 (0.1) +0x3d90| 03 | . | unused0: 0 0x3d98.4-0x3d98.4 (0.1) +0x3d90| 03 | . | execinstr: false 0x3d98.5-0x3d98.5 (0.1) +0x3d90| 03 | . | alloc: true 0x3d98.6-0x3d98.6 (0.1) +0x3d90| 03 | . | write: true 0x3d98.7-0x3d98.7 (0.1) +0x3d90| 00 | . | tls: false 0x3d99-0x3d99 (0.1) +0x3d90| 00 | . | group: false 0x3d99.1-0x3d99.1 (0.1) +0x3d90| 00 | . | os_nonconforming: false 0x3d99.2-0x3d99.2 (0.1) +0x3d90| 00 00 | .. | unused1: 0 0x3d99.3-0x3d9a.3 (1.1) +0x3d90| 00 00 | .. | os_specific: 0 0x3d9a.4-0x3d9b.3 (1) +0x3d90| 00 | . | processor_specific: 0 0x3d9b.4-0x3d9b.7 (0.4) +0x3d90| 00 00 00 00| ....| unused2: 0 0x3d9c-0x3d9f.7 (4) +0x3da0|20 40 00 00 00 00 00 00 | @...... | addr: 0x4020 0x3da0-0x3da7.7 (8) +0x3da0| 08 30 00 00 00 00 00 00| .0......| offset: 0x3008 0x3da8-0x3daf.7 (8) +0x3db0|50 00 00 00 00 00 00 00 |P....... | size: 80 0x3db0-0x3db7.7 (8) +0x3db0| 00 00 00 00 | .... | link: 0 0x3db8-0x3dbb.7 (4) +0x3db0| 00 00 00 00| ....| info: 0 0x3dbc-0x3dbf.7 (4) +0x3dc0|20 00 00 00 00 00 00 00 | ....... | addralign: 32 0x3dc0-0x3dc7.7 (8) +0x3dc0| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x3dc8-0x3dcf.7 (8) + | | | [21]{}: section_header 0x3008-0x3e0f.7 (3592) 0x3000| 47 43 43 3a 20 28 41 6c| GCC: (Al| data: raw bits 0x3008-0x3038.7 (49) 0x3010|70 69 6e 65 20 31 30 2e 33 2e 31 5f 67 69 74 32|pine 10.3.1_git2| * |until 0x3038.7 (49) | | @@ -948,7 +974,7 @@ $ fq -d elf dv libbbb.so 0x3df0| 00 00 00 00| ....| info: 0 0x3dfc-0x3dff.7 (4) 0x3e00|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x3e00-0x3e07.7 (8) 0x3e00| 01 00 00 00 00 00 00 00| ........| entsize: 1 0x3e08-0x3e0f.7 (8) - | | | [21]{}: section_header 0x3040-0x3e4f.7 (3600) + | | | [22]{}: section_header 0x3040-0x3e4f.7 (3600) 0x3040|3c 00 00 00 02 00 00 00 00 00 08 00 00 00 00 00|<...............| data: raw bits 0x3040-0x30bf.7 (128) * |until 0x30bf.7 (128) | | 0x3e10|c2 00 00 00 |.... | name: ".debug_aranges" (194) 0x3e10-0x3e13.7 (4) @@ -976,7 +1002,7 @@ $ fq -d elf dv libbbb.so 0x3e30| 00 00 00 00| ....| info: 0 0x3e3c-0x3e3f.7 (4) 0x3e40|10 00 00 00 00 00 00 00 |........ | addralign: 16 0x3e40-0x3e47.7 (8) 0x3e40| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x3e48-0x3e4f.7 (8) - | | | [22]{}: section_header 0x30c0-0x3e8f.7 (3536) + | | | [23]{}: section_header 0x30c0-0x3e8f.7 (3536) 0x30c0|1e 00 00 00 02 00 00 00 00 00 08 01 00 00 00 00|................| data: raw bits 0x30c0-0x3103.7 (68) * |until 0x3103.7 (68) | | 0x3e50|d1 00 00 00 |.... | name: ".debug_info" (209) 0x3e50-0x3e53.7 (4) @@ -1004,7 +1030,7 @@ $ fq -d elf dv libbbb.so 0x3e70| 00 00 00 00| ....| info: 0 0x3e7c-0x3e7f.7 (4) 0x3e80|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x3e80-0x3e87.7 (8) 0x3e80| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x3e88-0x3e8f.7 (8) - | | | [23]{}: section_header 0x3104-0x3ecf.7 (3532) + | | | [24]{}: section_header 0x3104-0x3ecf.7 (3532) 0x3100| 01 11 00 10 06 55 06 03 0e 1b 0e 25| .....U.....%| data: raw bits 0x3104-0x3127.7 (36) 0x3110|0e 13 05 00 00 00 01 11 00 10 06 55 06 03 0e 1b|...........U....| 0x3120|0e 25 0e 13 05 00 00 00 |.%...... | @@ -1033,7 +1059,7 @@ $ fq -d elf dv libbbb.so 0x3eb0| 00 00 00 00| ....| info: 0 0x3ebc-0x3ebf.7 (4) 0x3ec0|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x3ec0-0x3ec7.7 (8) 0x3ec0| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x3ec8-0x3ecf.7 (8) - | | | [24]{}: section_header 0x3128-0x3f0f.7 (3560) + | | | [25]{}: section_header 0x3128-0x3f0f.7 (3560) 0x3120| 52 00 00 00 03 00 28 00| R.....(.| data: raw bits 0x3128-0x31d3.7 (172) 0x3130|00 00 01 01 fb 0e 0d 00 01 01 01 01 00 00 00 01|................| * |until 0x31d3.7 (172) | | @@ -1062,7 +1088,7 @@ $ fq -d elf dv libbbb.so 0x3ef0| 00 00 00 00| ....| info: 0 0x3efc-0x3eff.7 (4) 0x3f00|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x3f00-0x3f07.7 (8) 0x3f00| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x3f08-0x3f0f.7 (8) - | | | [25]{}: section_header 0x31d4-0x3f4f.7 (3452) + | | | [26]{}: section_header 0x31d4-0x3f4f.7 (3452) 0x31d0| 63 72 74 2f 78 38 36 5f 36 34 2f 63| crt/x86_64/c| data: raw bits 0x31d4-0x322f.7 (92) 0x31e0|72 74 69 2e 73 00 2f 68 6f 6d 65 2f 62 75 69 6c|rti.s./home/buil| * |until 0x322f.7 (92) | | @@ -1091,7 +1117,7 @@ $ fq -d elf dv libbbb.so 0x3f30| 00 00 00 00| ....| info: 0 0x3f3c-0x3f3f.7 (4) 0x3f40|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x3f40-0x3f47.7 (8) 0x3f40| 01 00 00 00 00 00 00 00| ........| entsize: 1 0x3f48-0x3f4f.7 (8) - | | | [26]{}: section_header 0x3230-0x3f8f.7 (3424) + | | | [27]{}: section_header 0x3230-0x3f8f.7 (3424) 0x3230|ff ff ff ff ff ff ff ff 00 00 00 00 00 00 00 00|................| data: raw bits 0x3230-0x32af.7 (128) * |until 0x32af.7 (128) | | 0x3f50|02 01 00 00 |.... | name: ".debug_ranges" (258) 0x3f50-0x3f53.7 (4) @@ -1119,7 +1145,7 @@ $ fq -d elf dv libbbb.so 0x3f70| 00 00 00 00| ....| info: 0 0x3f7c-0x3f7f.7 (4) 0x3f80|10 00 00 00 00 00 00 00 |........ | addralign: 16 0x3f80-0x3f87.7 (8) 0x3f80| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x3f88-0x3f8f.7 (8) - | | | [27]{}: section_header 0x32b0-0x3fcf.7 (3360) + | | | [28]{}: section_header 0x32b0-0x3fcf.7 (3360) | | | symbol_table[0:33]: 0x32b0-0x35c7.7 (792) | | | [0]{}: symbol 0x32b0-0x32c7.7 (24) 0x32b0|00 00 00 00 |.... | name: "" (0) 0x32b0-0x32b3.7 (4) @@ -1443,7 +1469,7 @@ $ fq -d elf dv libbbb.so 0x3fb0| 18 00 00 00| ....| info: 24 0x3fbc-0x3fbf.7 (4) 0x3fc0|08 00 00 00 00 00 00 00 |........ | addralign: 8 0x3fc0-0x3fc7.7 (8) 0x3fc0| 18 00 00 00 00 00 00 00| ........| entsize: 24 0x3fc8-0x3fcf.7 (8) - | | | [28]{}: section_header 0x35c8-0x400f.7 (2632) + | | | [29]{}: section_header 0x35c8-0x400f.7 (2632) 0x35c0| 00 63 72 74 73 74 75 66| .crtstuf| string: "\x00crtstuff.c\x00__CTOR_LIST__\x00__DTOR_LIST__\x00__EH_FRAME"... 0x35c8-0x377a.7 (435) 0x35d0|66 2e 63 00 5f 5f 43 54 4f 52 5f 4c 49 53 54 5f|f.c.__CTOR_LIST_| * |until 0x377a.7 (435) | | @@ -1472,7 +1498,7 @@ $ fq -d elf dv libbbb.so 0x3ff0| 00 00 00 00| ....| info: 0 0x3ffc-0x3fff.7 (4) 0x4000|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x4000-0x4007.7 (8) 0x4000| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x4008-0x400f.7 (8) - | | | [29]{}: section_header 0x377b-0x404f.7 (2261) + | | | [30]{}: section_header 0x377b-0x404f.7 (2261) 0x3770| 00 2e 73 79 6d| ..sym| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.gnu.hash\x00.dynsym\x00.dyns"... 0x377b-0x388a.7 (272) 0x3780|74 61 62 00 2e 73 74 72 74 61 62 00 2e 73 68 73|tab..strtab..shs| * |until 0x388a.7 (272) | | @@ -1501,32 +1527,6 @@ $ fq -d elf dv libbbb.so 0x4030| 00 00 00 00| ....| info: 0 0x403c-0x403f.7 (4) 0x4040|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x4040-0x4047.7 (8) 0x4040| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x4048-0x404f.7 (8) - | | | [30]{}: section_header 0x3d90-0x3dcf.7 (64) -0x3d90|b4 00 00 00 |.... | name: ".bss" (180) 0x3d90-0x3d93.7 (4) -0x3d90| 08 00 00 00 | .... | type: "nobits" (0x8) (No space in the file) 0x3d94-0x3d97.7 (4) - | | | flags{}: 0x3d98-0x3d9f.7 (8) -0x3d90| 03 | . | link_order: false 0x3d98-0x3d98 (0.1) -0x3d90| 03 | . | info_link: false 0x3d98.1-0x3d98.1 (0.1) -0x3d90| 03 | . | strings: false 0x3d98.2-0x3d98.2 (0.1) -0x3d90| 03 | . | merge: false 0x3d98.3-0x3d98.3 (0.1) -0x3d90| 03 | . | unused0: 0 0x3d98.4-0x3d98.4 (0.1) -0x3d90| 03 | . | execinstr: false 0x3d98.5-0x3d98.5 (0.1) -0x3d90| 03 | . | alloc: true 0x3d98.6-0x3d98.6 (0.1) -0x3d90| 03 | . | write: true 0x3d98.7-0x3d98.7 (0.1) -0x3d90| 00 | . | tls: false 0x3d99-0x3d99 (0.1) -0x3d90| 00 | . | group: false 0x3d99.1-0x3d99.1 (0.1) -0x3d90| 00 | . | os_nonconforming: false 0x3d99.2-0x3d99.2 (0.1) -0x3d90| 00 00 | .. | unused1: 0 0x3d99.3-0x3d9a.3 (1.1) -0x3d90| 00 00 | .. | os_specific: 0 0x3d9a.4-0x3d9b.3 (1) -0x3d90| 00 | . | processor_specific: 0 0x3d9b.4-0x3d9b.7 (0.4) -0x3d90| 00 00 00 00| ....| unused2: 0 0x3d9c-0x3d9f.7 (4) -0x3da0|20 40 00 00 00 00 00 00 | @...... | addr: 0x4020 0x3da0-0x3da7.7 (8) -0x3da0| 08 30 00 00 00 00 00 00| .0......| offset: 0x3008 0x3da8-0x3daf.7 (8) -0x3db0|50 00 00 00 00 00 00 00 |P....... | size: 80 0x3db0-0x3db7.7 (8) -0x3db0| 00 00 00 00 | .... | link: 0 0x3db8-0x3dbb.7 (4) -0x3db0| 00 00 00 00| ....| info: 0 0x3dbc-0x3dbf.7 (4) -0x3dc0|20 00 00 00 00 00 00 00 | ....... | addralign: 32 0x3dc0-0x3dc7.7 (8) -0x3dc0| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x3dc8-0x3dcf.7 (8) 0x04e0|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................| unknown0: raw bits 0x4e0-0xfff.7 (2848) * |until 0xfff.7 (2848) | | 0x1200| 00 00 00 00 00 00 00| .......| unknown1: raw bits 0x1209-0x1fff.7 (3575) diff --git a/format/elf/testdata/linux_arm64/a_dynamic.fqtest b/format/elf/testdata/linux_arm64/a_dynamic.fqtest index a624938e5..24133d20f 100644 --- a/format/elf/testdata/linux_arm64/a_dynamic.fqtest +++ b/format/elf/testdata/linux_arm64/a_dynamic.fqtest @@ -23,40 +23,7 @@ $ fq -d elf dv a_dynamic 0x0030| 20 00 | . | shnum: 32 0x3c-0x3d.7 (2) 0x0030| 1f 00| ..| shstrndx: 31 0x3e-0x3f.7 (2) | | | program_headers[0:8]: 0x0-0x1007.7 (4104) - | | | [0]{}: program_header 0x0-0x913.7 (2324) - | | | program_header{}: 0x0-0x913.7 (2324) -0x0000|7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00|.ELF............| data: raw bits 0x0-0x913.7 (2324) -* |until 0x913.7 (2324) | | -0x00b0|01 00 00 00 |.... | type: "load" (1) (Loadable segment) 0xb0-0xb3.7 (4) - | | | flags{}: 0xb4-0xb7.7 (4) -0x00b0| 05 | . | unused0: 0 0xb4-0xb4.4 (0.5) -0x00b0| 05 | . | r: true 0xb4.5-0xb4.5 (0.1) -0x00b0| 05 | . | w: false 0xb4.6-0xb4.6 (0.1) -0x00b0| 05 | . | x: true 0xb4.7-0xb4.7 (0.1) -0x00b0| 00 00 00 | ... | unused1: 0 0xb5-0xb7.7 (3) -0x00b0| 00 00 00 00 00 00 00 00| ........| offset: 0x0 0xb8-0xbf.7 (8) -0x00c0|00 00 00 00 00 00 00 00 |........ | vaddr: 0x0 0xc0-0xc7.7 (8) -0x00c0| 00 00 00 00 00 00 00 00| ........| paddr: 0x0 0xc8-0xcf.7 (8) -0x00d0|14 09 00 00 00 00 00 00 |........ | filesz: 2324 0xd0-0xd7.7 (8) -0x00d0| 14 09 00 00 00 00 00 00| ........| memsz: 2324 0xd8-0xdf.7 (8) -0x00e0|00 00 01 00 00 00 00 00 |........ | align: 65536 0xe0-0xe7.7 (8) - | | | [1]{}: program_header 0x0-0x1c7.7 (456) - | | | program_header{}: 0x0-0x1c7.7 (456) - | | | data: raw bits 0x0-NA (0) -0x0190|51 e5 74 64 |Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0x190-0x193.7 (4) - | | | flags{}: 0x194-0x197.7 (4) -0x0190| 06 | . | unused0: 0 0x194-0x194.4 (0.5) -0x0190| 06 | . | r: true 0x194.5-0x194.5 (0.1) -0x0190| 06 | . | w: true 0x194.6-0x194.6 (0.1) -0x0190| 06 | . | x: false 0x194.7-0x194.7 (0.1) -0x0190| 00 00 00 | ... | unused1: 0 0x195-0x197.7 (3) -0x0190| 00 00 00 00 00 00 00 00| ........| offset: 0x0 0x198-0x19f.7 (8) -0x01a0|00 00 00 00 00 00 00 00 |........ | vaddr: 0x0 0x1a0-0x1a7.7 (8) -0x01a0| 00 00 00 00 00 00 00 00| ........| paddr: 0x0 0x1a8-0x1af.7 (8) -0x01b0|00 00 00 00 00 00 00 00 |........ | filesz: 0 0x1b0-0x1b7.7 (8) -0x01b0| 00 00 00 00 00 00 00 00| ........| memsz: 0 0x1b8-0x1bf.7 (8) -0x01c0|10 00 00 00 00 00 00 00 |........ | align: 16 0x1c0-0x1c7.7 (8) - | | | [2]{}: program_header 0x40-0x1ff.7 (448) + | | | [0]{}: program_header 0x40-0x1ff.7 (448) | | | program_header{}: 0x40-0x1ff.7 (448) 0x0040|06 00 00 00 |.... | type: "phdr" (6) (Program header location and size) 0x40-0x43.7 (4) 0x0040|06 00 00 00 04 00 00 00 40 00 00 00 00 00 00 00|........@.......| data: raw bits 0x40-0x1ff.7 (448) @@ -73,7 +40,7 @@ $ fq -d elf dv a_dynamic 0x0060|c0 01 00 00 00 00 00 00 |........ | filesz: 448 0x60-0x67.7 (8) 0x0060| c0 01 00 00 00 00 00 00| ........| memsz: 448 0x68-0x6f.7 (8) 0x0070|08 00 00 00 00 00 00 00 |........ | align: 8 0x70-0x77.7 (8) - | | | [3]{}: program_header 0x78-0x219.7 (418) + | | | [1]{}: program_header 0x78-0x219.7 (418) | | | program_header{}: 0x78-0x219.7 (418) 0x0070| 03 00 00 00 | .... | type: "interp" (3) (Interpreter to invoke) 0x78-0x7b.7 (4) | | | flags{}: 0x7c-0x7f.7 (4) @@ -90,7 +57,24 @@ $ fq -d elf dv a_dynamic 0x00a0| 01 00 00 00 00 00 00 00| ........| align: 1 0xa8-0xaf.7 (8) 0x0200|2f 6c 69 62 2f 6c 64 2d 6d 75 73 6c 2d 61 61 72|/lib/ld-musl-aar| data: raw bits 0x200-0x219.7 (26) 0x0210|63 68 36 34 2e 73 6f 2e 31 00 |ch64.so.1. | - | | | [4]{}: program_header 0xe8-0x1007.7 (3872) + | | | [2]{}: program_header 0x0-0x913.7 (2324) + | | | program_header{}: 0x0-0x913.7 (2324) +0x0000|7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00|.ELF............| data: raw bits 0x0-0x913.7 (2324) +* |until 0x913.7 (2324) | | +0x00b0|01 00 00 00 |.... | type: "load" (1) (Loadable segment) 0xb0-0xb3.7 (4) + | | | flags{}: 0xb4-0xb7.7 (4) +0x00b0| 05 | . | unused0: 0 0xb4-0xb4.4 (0.5) +0x00b0| 05 | . | r: true 0xb4.5-0xb4.5 (0.1) +0x00b0| 05 | . | w: false 0xb4.6-0xb4.6 (0.1) +0x00b0| 05 | . | x: true 0xb4.7-0xb4.7 (0.1) +0x00b0| 00 00 00 | ... | unused1: 0 0xb5-0xb7.7 (3) +0x00b0| 00 00 00 00 00 00 00 00| ........| offset: 0x0 0xb8-0xbf.7 (8) +0x00c0|00 00 00 00 00 00 00 00 |........ | vaddr: 0x0 0xc0-0xc7.7 (8) +0x00c0| 00 00 00 00 00 00 00 00| ........| paddr: 0x0 0xc8-0xcf.7 (8) +0x00d0|14 09 00 00 00 00 00 00 |........ | filesz: 2324 0xd0-0xd7.7 (8) +0x00d0| 14 09 00 00 00 00 00 00| ........| memsz: 2324 0xd8-0xdf.7 (8) +0x00e0|00 00 01 00 00 00 00 00 |........ | align: 65536 0xe0-0xe7.7 (8) + | | | [3]{}: program_header 0xe8-0x1007.7 (3872) | | | program_header{}: 0xe8-0x1007.7 (3872) 0x00e0| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0xe8-0xeb.7 (4) | | | flags{}: 0xec-0xef.7 (4) @@ -107,7 +91,7 @@ $ fq -d elf dv a_dynamic 0x0110| 00 00 01 00 00 00 00 00| ........| align: 65536 0x118-0x11f.7 (8) 0x0d90|90 07 00 00 00 00 00 00 30 07 00 00 00 00 00 00|........0.......| data: raw bits 0xd90-0x1007.7 (632) * |until 0x1007.7 (632) | | - | | | [5]{}: program_header 0x120-0xf6f.7 (3664) + | | | [4]{}: program_header 0x120-0xf6f.7 (3664) | | | program_header{}: 0x120-0xf6f.7 (3664) 0x0120|02 00 00 00 |.... | type: "dynamic" (2) (Dynamic linking information) 0x120-0x123.7 (4) | | | flags{}: 0x124-0x127.7 (4) @@ -124,7 +108,7 @@ $ fq -d elf dv a_dynamic 0x0150|08 00 00 00 00 00 00 00 |........ | align: 8 0x150-0x157.7 (8) 0x0da0|01 00 00 00 00 00 00 00 a2 00 00 00 00 00 00 00|................| data: raw bits 0xda0-0xf6f.7 (464) * |until 0xf6f.7 (464) | | - | | | [6]{}: program_header 0x158-0x84f.7 (1784) + | | | [5]{}: program_header 0x158-0x84f.7 (1784) | | | program_header{}: 0x158-0x84f.7 (1784) 0x0150| 50 e5 74 64 | P.td | type: "gnu_eh_frame" (1685382480) (GNU frame unwind information) 0x158-0x15b.7 (4) | | | flags{}: 0x15c-0x15f.7 (4) @@ -142,6 +126,22 @@ $ fq -d elf dv a_dynamic 0x0810| 01 1b 03 3b 38 00 00 00 06 00 00 00| ...;8.......| data: raw bits 0x814-0x84f.7 (60) 0x0820|ac fe ff ff 50 00 00 00 dc fe ff ff 64 00 00 00|....P.......d...| * |until 0x84f.7 (60) | | + | | | [6]{}: program_header 0x0-0x1c7.7 (456) + | | | program_header{}: 0x0-0x1c7.7 (456) + | | | data: raw bits 0x0-NA (0) +0x0190|51 e5 74 64 |Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0x190-0x193.7 (4) + | | | flags{}: 0x194-0x197.7 (4) +0x0190| 06 | . | unused0: 0 0x194-0x194.4 (0.5) +0x0190| 06 | . | r: true 0x194.5-0x194.5 (0.1) +0x0190| 06 | . | w: true 0x194.6-0x194.6 (0.1) +0x0190| 06 | . | x: false 0x194.7-0x194.7 (0.1) +0x0190| 00 00 00 | ... | unused1: 0 0x195-0x197.7 (3) +0x0190| 00 00 00 00 00 00 00 00| ........| offset: 0x0 0x198-0x19f.7 (8) +0x01a0|00 00 00 00 00 00 00 00 |........ | vaddr: 0x0 0x1a0-0x1a7.7 (8) +0x01a0| 00 00 00 00 00 00 00 00| ........| paddr: 0x0 0x1a8-0x1af.7 (8) +0x01b0|00 00 00 00 00 00 00 00 |........ | filesz: 0 0x1b0-0x1b7.7 (8) +0x01b0| 00 00 00 00 00 00 00 00| ........| memsz: 0 0x1b8-0x1bf.7 (8) +0x01c0|10 00 00 00 00 00 00 00 |........ | align: 16 0x1c0-0x1c7.7 (8) | | | [7]{}: program_header 0x1c8-0xfff.7 (3640) | | | program_header{}: 0x1c8-0xfff.7 (3640) 0x01c0| 52 e5 74 64 | R.td | type: "gnu_relro" (1685382482) (GNU read-only after relocation) 0x1c8-0x1cb.7 (4) @@ -894,7 +894,33 @@ $ fq -d elf dv a_dynamic 0x2810| 00 00 00 00| ....| info: 0 0x281c-0x281f.7 (4) 0x2820|08 00 00 00 00 00 00 00 |........ | addralign: 8 0x2820-0x2827.7 (8) 0x2820| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x2828-0x282f.7 (8) - | | | [19]{}: section_header 0x1008-0x28af.7 (6312) + | | | [19]{}: section_header 0x2830-0x286f.7 (64) +0x2830|af 00 00 00 |.... | name: ".bss" (175) 0x2830-0x2833.7 (4) +0x2830| 08 00 00 00 | .... | type: "nobits" (0x8) (No space in the file) 0x2834-0x2837.7 (4) + | | | flags{}: 0x2838-0x283f.7 (8) +0x2830| 03 | . | link_order: false 0x2838-0x2838 (0.1) +0x2830| 03 | . | info_link: false 0x2838.1-0x2838.1 (0.1) +0x2830| 03 | . | strings: false 0x2838.2-0x2838.2 (0.1) +0x2830| 03 | . | merge: false 0x2838.3-0x2838.3 (0.1) +0x2830| 03 | . | unused0: 0 0x2838.4-0x2838.4 (0.1) +0x2830| 03 | . | execinstr: false 0x2838.5-0x2838.5 (0.1) +0x2830| 03 | . | alloc: true 0x2838.6-0x2838.6 (0.1) +0x2830| 03 | . | write: true 0x2838.7-0x2838.7 (0.1) +0x2830| 00 | . | tls: false 0x2839-0x2839 (0.1) +0x2830| 00 | . | group: false 0x2839.1-0x2839.1 (0.1) +0x2830| 00 | . | os_nonconforming: false 0x2839.2-0x2839.2 (0.1) +0x2830| 00 00 | .. | unused1: 0 0x2839.3-0x283a.3 (1.1) +0x2830| 00 00 | .. | os_specific: 0 0x283a.4-0x283b.3 (1) +0x2830| 00 | . | processor_specific: 0 0x283b.4-0x283b.7 (0.4) +0x2830| 00 00 00 00| ....| unused2: 0 0x283c-0x283f.7 (4) +0x2840|08 10 01 00 00 00 00 00 |........ | addr: 0x11008 0x2840-0x2847.7 (8) +0x2840| 08 10 00 00 00 00 00 00| ........| offset: 0x1008 0x2848-0x284f.7 (8) +0x2850|38 00 00 00 00 00 00 00 |8....... | size: 56 0x2850-0x2857.7 (8) +0x2850| 00 00 00 00 | .... | link: 0 0x2858-0x285b.7 (4) +0x2850| 00 00 00 00| ....| info: 0 0x285c-0x285f.7 (4) +0x2860|08 00 00 00 00 00 00 00 |........ | addralign: 8 0x2860-0x2867.7 (8) +0x2860| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x2868-0x286f.7 (8) + | | | [20]{}: section_header 0x1008-0x28af.7 (6312) 0x1000| 47 43 43 3a 20 28 41 6c| GCC: (Al| data: raw bits 0x1008-0x1069.7 (98) 0x1010|70 69 6e 65 20 31 30 2e 33 2e 31 5f 67 69 74 32|pine 10.3.1_git2| * |until 0x1069.7 (98) | | @@ -923,7 +949,7 @@ $ fq -d elf dv a_dynamic 0x2890| 00 00 00 00| ....| info: 0 0x289c-0x289f.7 (4) 0x28a0|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x28a0-0x28a7.7 (8) 0x28a0| 01 00 00 00 00 00 00 00| ........| entsize: 1 0x28a8-0x28af.7 (8) - | | | [20]{}: section_header 0x1070-0x28ef.7 (6272) + | | | [21]{}: section_header 0x1070-0x28ef.7 (6272) 0x1070|2c 00 00 00 02 00 00 00 00 00 08 00 00 00 00 00|,...............| data: raw bits 0x1070-0x111f.7 (176) * |until 0x111f.7 (176) | | 0x28b0|bd 00 00 00 |.... | name: ".debug_aranges" (189) 0x28b0-0x28b3.7 (4) @@ -951,7 +977,7 @@ $ fq -d elf dv a_dynamic 0x28d0| 00 00 00 00| ....| info: 0 0x28dc-0x28df.7 (4) 0x28e0|10 00 00 00 00 00 00 00 |........ | addralign: 16 0x28e0-0x28e7.7 (8) 0x28e0| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x28e8-0x28ef.7 (8) - | | | [21]{}: section_header 0x1120-0x292f.7 (6160) + | | | [22]{}: section_header 0x1120-0x292f.7 (6160) 0x1120|f1 00 00 00 04 00 00 00 00 00 08 01 00 00 00 00|................| data: raw bits 0x1120-0x1258.7 (313) * |until 0x1258.7 (313) | | 0x28f0|cc 00 00 00 |.... | name: ".debug_info" (204) 0x28f0-0x28f3.7 (4) @@ -979,7 +1005,7 @@ $ fq -d elf dv a_dynamic 0x2910| 00 00 00 00| ....| info: 0 0x291c-0x291f.7 (4) 0x2920|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x2920-0x2927.7 (8) 0x2920| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x2928-0x292f.7 (8) - | | | [22]{}: section_header 0x1259-0x296f.7 (5911) + | | | [23]{}: section_header 0x1259-0x296f.7 (5911) 0x1250| 01 11 01 25 0e 13 0b| ...%...| data: raw bits 0x1259-0x1320.7 (200) 0x1260|03 0e 1b 0e 55 17 11 01 10 17 00 00 02 24 00 0b|....U........$..| * |until 0x1320.7 (200) | | @@ -1008,7 +1034,7 @@ $ fq -d elf dv a_dynamic 0x2950| 00 00 00 00| ....| info: 0 0x295c-0x295f.7 (4) 0x2960|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x2960-0x2967.7 (8) 0x2960| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x2968-0x296f.7 (8) - | | | [23]{}: section_header 0x1321-0x29af.7 (5775) + | | | [24]{}: section_header 0x1321-0x29af.7 (5775) 0x1320| 4e 00 00 00 03 00 21 00 00 00 04 01 fb 0e 0d| N.....!........| data: raw bits 0x1321-0x1422.7 (258) 0x1330|00 01 01 01 01 00 00 00 01 00 00 01 63 72 74 00|............crt.| * |until 0x1422.7 (258) | | @@ -1037,7 +1063,7 @@ $ fq -d elf dv a_dynamic 0x2990| 00 00 00 00| ....| info: 0 0x299c-0x299f.7 (4) 0x29a0|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x29a0-0x29a7.7 (8) 0x29a0| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x29a8-0x29af.7 (8) - | | | [24]{}: section_header 0x1428-0x29ef.7 (5576) + | | | [25]{}: section_header 0x1428-0x29ef.7 (5576) 0x1420| 0c 00 00 00 ff ff ff ff| ........| data: raw bits 0x1428-0x144f.7 (40) 0x1430|01 00 04 78 1e 0c 1f 00 14 00 00 00 00 00 00 00|...x............| 0x1440|8c 06 00 00 00 00 00 00 28 00 00 00 00 00 00 00|........(.......| @@ -1066,7 +1092,7 @@ $ fq -d elf dv a_dynamic 0x29d0| 00 00 00 00| ....| info: 0 0x29dc-0x29df.7 (4) 0x29e0|08 00 00 00 00 00 00 00 |........ | addralign: 8 0x29e0-0x29e7.7 (8) 0x29e0| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x29e8-0x29ef.7 (8) - | | | [25]{}: section_header 0x1450-0x2a2f.7 (5600) + | | | [26]{}: section_header 0x1450-0x2a2f.7 (5600) 0x1450|47 4e 55 20 43 39 39 20 31 30 2e 33 2e 31 20 32|GNU C99 10.3.1 2| data: raw bits 0x1450-0x1617.7 (456) * |until 0x1617.7 (456) | | 0x29f0|ff 00 00 00 |.... | name: ".debug_str" (255) 0x29f0-0x29f3.7 (4) @@ -1094,7 +1120,7 @@ $ fq -d elf dv a_dynamic 0x2a10| 00 00 00 00| ....| info: 0 0x2a1c-0x2a1f.7 (4) 0x2a20|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x2a20-0x2a27.7 (8) 0x2a20| 01 00 00 00 00 00 00 00| ........| entsize: 1 0x2a28-0x2a2f.7 (8) - | | | [26]{}: section_header 0x1618-0x2a6f.7 (5208) + | | | [27]{}: section_header 0x1618-0x2a6f.7 (5208) 0x1610| 00 00 00 00 00 00 00 00| ........| data: raw bits 0x1618-0x173f.7 (296) 0x1620|8c 06 00 00 00 00 00 00 9c 06 00 00 00 00 00 00|................| * |until 0x173f.7 (296) | | @@ -1123,7 +1149,7 @@ $ fq -d elf dv a_dynamic 0x2a50| 00 00 00 00| ....| info: 0 0x2a5c-0x2a5f.7 (4) 0x2a60|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x2a60-0x2a67.7 (8) 0x2a60| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x2a68-0x2a6f.7 (8) - | | | [27]{}: section_header 0x1740-0x2aaf.7 (4976) + | | | [28]{}: section_header 0x1740-0x2aaf.7 (4976) 0x1740|8c 06 00 00 00 00 00 00 b4 06 00 00 00 00 00 00|................| data: raw bits 0x1740-0x17df.7 (160) * |until 0x17df.7 (160) | | 0x2a70|15 01 00 00 |.... | name: ".debug_ranges" (277) 0x2a70-0x2a73.7 (4) @@ -1151,7 +1177,7 @@ $ fq -d elf dv a_dynamic 0x2a90| 00 00 00 00| ....| info: 0 0x2a9c-0x2a9f.7 (4) 0x2aa0|10 00 00 00 00 00 00 00 |........ | addralign: 16 0x2aa0-0x2aa7.7 (8) 0x2aa0| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x2aa8-0x2aaf.7 (8) - | | | [28]{}: section_header 0x17e0-0x2aef.7 (4880) + | | | [29]{}: section_header 0x17e0-0x2aef.7 (4880) | | | symbol_table[0:89]: 0x17e0-0x2037.7 (2136) | | | [0]{}: symbol 0x17e0-0x17f7.7 (24) 0x17e0|00 00 00 00 |.... | name: "" (0) 0x17e0-0x17e3.7 (4) @@ -1979,7 +2005,7 @@ $ fq -d elf dv a_dynamic 0x2ad0| 42 00 00 00| B...| info: 66 0x2adc-0x2adf.7 (4) 0x2ae0|08 00 00 00 00 00 00 00 |........ | addralign: 8 0x2ae0-0x2ae7.7 (8) 0x2ae0| 18 00 00 00 00 00 00 00| ........| entsize: 24 0x2ae8-0x2aef.7 (8) - | | | [29]{}: section_header 0x2038-0x2b2f.7 (2808) + | | | [30]{}: section_header 0x2038-0x2b2f.7 (2808) 0x2030| 00 53 63 72 74 31 2e 63| .Scrt1.c| string: "\x00Scrt1.c\x00$x\x00crti.o\x00crtn.o\x00crtstuff.c\x00$d\x00__EH_FRAME"... 0x2038-0x2249.7 (530) 0x2040|00 24 78 00 63 72 74 69 2e 6f 00 63 72 74 6e 2e|.$x.crti.o.crtn.| * |until 0x2249.7 (530) | | @@ -2008,7 +2034,7 @@ $ fq -d elf dv a_dynamic 0x2b10| 00 00 00 00| ....| info: 0 0x2b1c-0x2b1f.7 (4) 0x2b20|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x2b20-0x2b27.7 (8) 0x2b20| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x2b28-0x2b2f.7 (8) - | | | [30]{}: section_header 0x224a-0x2b6f.7 (2342) + | | | [31]{}: section_header 0x224a-0x2b6f.7 (2342) 0x2240| 00 2e 73 79 6d 74| ..symt| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.interp\x00.gnu.hash\x00.dyns"... 0x224a-0x236c.7 (291) 0x2250|61 62 00 2e 73 74 72 74 61 62 00 2e 73 68 73 74|ab..strtab..shst| * |until 0x236c.7 (291) | | @@ -2037,32 +2063,6 @@ $ fq -d elf dv a_dynamic 0x2b50| 00 00 00 00| ....| info: 0 0x2b5c-0x2b5f.7 (4) 0x2b60|01 00 00 00 00 00 00 00 |........ | addralign: 1 0x2b60-0x2b67.7 (8) 0x2b60| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x2b68-0x2b6f.7 (8) - | | | [31]{}: section_header 0x2830-0x286f.7 (64) -0x2830|af 00 00 00 |.... | name: ".bss" (175) 0x2830-0x2833.7 (4) -0x2830| 08 00 00 00 | .... | type: "nobits" (0x8) (No space in the file) 0x2834-0x2837.7 (4) - | | | flags{}: 0x2838-0x283f.7 (8) -0x2830| 03 | . | link_order: false 0x2838-0x2838 (0.1) -0x2830| 03 | . | info_link: false 0x2838.1-0x2838.1 (0.1) -0x2830| 03 | . | strings: false 0x2838.2-0x2838.2 (0.1) -0x2830| 03 | . | merge: false 0x2838.3-0x2838.3 (0.1) -0x2830| 03 | . | unused0: 0 0x2838.4-0x2838.4 (0.1) -0x2830| 03 | . | execinstr: false 0x2838.5-0x2838.5 (0.1) -0x2830| 03 | . | alloc: true 0x2838.6-0x2838.6 (0.1) -0x2830| 03 | . | write: true 0x2838.7-0x2838.7 (0.1) -0x2830| 00 | . | tls: false 0x2839-0x2839 (0.1) -0x2830| 00 | . | group: false 0x2839.1-0x2839.1 (0.1) -0x2830| 00 | . | os_nonconforming: false 0x2839.2-0x2839.2 (0.1) -0x2830| 00 00 | .. | unused1: 0 0x2839.3-0x283a.3 (1.1) -0x2830| 00 00 | .. | os_specific: 0 0x283a.4-0x283b.3 (1) -0x2830| 00 | . | processor_specific: 0 0x283b.4-0x283b.7 (0.4) -0x2830| 00 00 00 00| ....| unused2: 0 0x283c-0x283f.7 (4) -0x2840|08 10 01 00 00 00 00 00 |........ | addr: 0x11008 0x2840-0x2847.7 (8) -0x2840| 08 10 00 00 00 00 00 00| ........| offset: 0x1008 0x2848-0x284f.7 (8) -0x2850|38 00 00 00 00 00 00 00 |8....... | size: 56 0x2850-0x2857.7 (8) -0x2850| 00 00 00 00 | .... | link: 0 0x2858-0x285b.7 (4) -0x2850| 00 00 00 00| ....| info: 0 0x285c-0x285f.7 (4) -0x2860|08 00 00 00 00 00 00 00 |........ | addralign: 8 0x2860-0x2867.7 (8) -0x2860| 00 00 00 00 00 00 00 00| ........| entsize: 0 0x2868-0x286f.7 (8) 0x0910| 00 00 00 00 00 00 00 00 00 00 00 00| ............| unknown0: raw bits 0x914-0xd8f.7 (1148) 0x0920|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................| * |until 0xd8f.7 (1148) | | diff --git a/format/elf/testdata/linux_arm64/a_static.fqtest b/format/elf/testdata/linux_arm64/a_static.fqtest index 29f90d459..3007857fd 100644 --- a/format/elf/testdata/linux_arm64/a_static.fqtest +++ b/format/elf/testdata/linux_arm64/a_static.fqtest @@ -23,40 +23,7 @@ $ fq -d elf dv a_static 0x0030| 20 00 | . | shnum: 32 0x3c-0x3d.7 (2) 0x0030| 1f 00| ..| shstrndx: 31 0x3e-0x3f.7 (2) | | | program_headers[0:8]: 0x0-0x1007.7 (4104) - | | | [0]{}: program_header 0x0-0x91b.7 (2332) - | | | program_header{}: 0x0-0x91b.7 (2332) -0x0000|7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00|.ELF............| data: raw bits 0x0-0x91b.7 (2332) -* |until 0x91b.7 (2332) | | -0x00b0|01 00 00 00 |.... | type: "load" (1) (Loadable segment) 0xb0-0xb3.7 (4) - | | | flags{}: 0xb4-0xb7.7 (4) -0x00b0| 05 | . | unused0: 0 0xb4-0xb4.4 (0.5) -0x00b0| 05 | . | r: true 0xb4.5-0xb4.5 (0.1) -0x00b0| 05 | . | w: false 0xb4.6-0xb4.6 (0.1) -0x00b0| 05 | . | x: true 0xb4.7-0xb4.7 (0.1) -0x00b0| 00 00 00 | ... | unused1: 0 0xb5-0xb7.7 (3) -0x00b0| 00 00 00 00 00 00 00 00| ........| offset: 0x0 0xb8-0xbf.7 (8) -0x00c0|00 00 00 00 00 00 00 00 |........ | vaddr: 0x0 0xc0-0xc7.7 (8) -0x00c0| 00 00 00 00 00 00 00 00| ........| paddr: 0x0 0xc8-0xcf.7 (8) -0x00d0|1c 09 00 00 00 00 00 00 |........ | filesz: 2332 0xd0-0xd7.7 (8) -0x00d0| 1c 09 00 00 00 00 00 00| ........| memsz: 2332 0xd8-0xdf.7 (8) -0x00e0|00 00 01 00 00 00 00 00 |........ | align: 65536 0xe0-0xe7.7 (8) - | | | [1]{}: program_header 0x0-0x1c7.7 (456) - | | | program_header{}: 0x0-0x1c7.7 (456) - | | | data: raw bits 0x0-NA (0) -0x0190|51 e5 74 64 |Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0x190-0x193.7 (4) - | | | flags{}: 0x194-0x197.7 (4) -0x0190| 06 | . | unused0: 0 0x194-0x194.4 (0.5) -0x0190| 06 | . | r: true 0x194.5-0x194.5 (0.1) -0x0190| 06 | . | w: true 0x194.6-0x194.6 (0.1) -0x0190| 06 | . | x: false 0x194.7-0x194.7 (0.1) -0x0190| 00 00 00 | ... | unused1: 0 0x195-0x197.7 (3) -0x0190| 00 00 00 00 00 00 00 00| ........| offset: 0x0 0x198-0x19f.7 (8) -0x01a0|00 00 00 00 00 00 00 00 |........ | vaddr: 0x0 0x1a0-0x1a7.7 (8) -0x01a0| 00 00 00 00 00 00 00 00| ........| paddr: 0x0 0x1a8-0x1af.7 (8) -0x01b0|00 00 00 00 00 00 00 00 |........ | filesz: 0 0x1b0-0x1b7.7 (8) -0x01b0| 00 00 00 00 00 00 00 00| ........| memsz: 0 0x1b8-0x1bf.7 (8) -0x01c0|10 00 00 00 00 00 00 00 |........ | align: 16 0x1c0-0x1c7.7 (8) - | | | [2]{}: program_header 0x40-0x1ff.7 (448) + | | | [0]{}: program_header 0x40-0x1ff.7 (448) | | | program_header{}: 0x40-0x1ff.7 (448) 0x0040|06 00 00 00 |.... | type: "phdr" (6) (Program header location and size) 0x40-0x43.7 (4) 0x0040|06 00 00 00 04 00 00 00 40 00 00 00 00 00 00 00|........@.......| data: raw bits 0x40-0x1ff.7 (448) @@ -73,7 +40,7 @@ $ fq -d elf dv a_static 0x0060|c0 01 00 00 00 00 00 00 |........ | filesz: 448 0x60-0x67.7 (8) 0x0060| c0 01 00 00 00 00 00 00| ........| memsz: 448 0x68-0x6f.7 (8) 0x0070|08 00 00 00 00 00 00 00 |........ | align: 8 0x70-0x77.7 (8) - | | | [3]{}: program_header 0x78-0x219.7 (418) + | | | [1]{}: program_header 0x78-0x219.7 (418) | | | program_header{}: 0x78-0x219.7 (418) 0x0070| 03 00 00 00 | .... | type: "interp" (3) (Interpreter to invoke) 0x78-0x7b.7 (4) | | | flags{}: 0x7c-0x7f.7 (4) @@ -90,7 +57,24 @@ $ fq -d elf dv a_static 0x00a0| 01 00 00 00 00 00 00 00| ........| align: 1 0xa8-0xaf.7 (8) 0x0200|2f 6c 69 62 2f 6c 64 2d 6d 75 73 6c 2d 61 61 72|/lib/ld-musl-aar| data: raw bits 0x200-0x219.7 (26) 0x0210|63 68 36 34 2e 73 6f 2e 31 00 |ch64.so.1. | - | | | [4]{}: program_header 0xe8-0x1007.7 (3872) + | | | [2]{}: program_header 0x0-0x91b.7 (2332) + | | | program_header{}: 0x0-0x91b.7 (2332) +0x0000|7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00|.ELF............| data: raw bits 0x0-0x91b.7 (2332) +* |until 0x91b.7 (2332) | | +0x00b0|01 00 00 00 |.... | type: "load" (1) (Loadable segment) 0xb0-0xb3.7 (4) + | | | flags{}: 0xb4-0xb7.7 (4) +0x00b0| 05 | . | unused0: 0 0xb4-0xb4.4 (0.5) +0x00b0| 05 | . | r: true 0xb4.5-0xb4.5 (0.1) +0x00b0| 05 | . | w: false 0xb4.6-0xb4.6 (0.1) +0x00b0| 05 | . | x: true 0xb4.7-0xb4.7 (0.1) +0x00b0| 00 00 00 | ... | unused1: 0 0xb5-0xb7.7 (3) +0x00b0| 00 00 00 00 00 00 00 00| ........| offset: 0x0 0xb8-0xbf.7 (8) +0x00c0|00 00 00 00 00 00 00 00 |........ | vaddr: 0x0 0xc0-0xc7.7 (8) +0x00c0| 00 00 00 00 00 00 00 00| ........| paddr: 0x0 0xc8-0xcf.7 (8) +0x00d0|1c 09 00 00 00 00 00 00 |........ | filesz: 2332 0xd0-0xd7.7 (8) +0x00d0| 1c 09 00 00 00 00 00 00| ........| memsz: 2332 0xd8-0xdf.7 (8) +0x00e0|00 00 01 00 00 00 00 00 |........ | align: 65536 0xe0-0xe7.7 (8) + | | | [3]{}: program_header 0xe8-0x1007.7 (3872) | | | program_header{}: 0xe8-0x1007.7 (3872) 0x00e0| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0xe8-0xeb.7 (4) | | | flags{}: 0xec-0xef.7 (4) @@ -108,7 +92,7 @@ $ fq -d elf dv a_static 0x0da0| 40 07 00 00 00 00 00 00| @.......| data: raw bits 0xda8-0x1007.7 (608) 0x0db0|e0 06 00 00 00 00 00 00 01 00 00 00 00 00 00 00|................| * |until 0x1007.7 (608) | | - | | | [5]{}: program_header 0x120-0xf77.7 (3672) + | | | [4]{}: program_header 0x120-0xf77.7 (3672) | | | program_header{}: 0x120-0xf77.7 (3672) 0x0120|02 00 00 00 |.... | type: "dynamic" (2) (Dynamic linking information) 0x120-0x123.7 (4) | | | flags{}: 0x124-0x127.7 (4) @@ -126,7 +110,7 @@ $ fq -d elf dv a_static 0x0db0| 01 00 00 00 00 00 00 00| ........| data: raw bits 0xdb8-0xf77.7 (448) 0x0dc0|33 00 00 00 00 00 00 00 0c 00 00 00 00 00 00 00|3...............| * |until 0xf77.7 (448) | | - | | | [6]{}: program_header 0x158-0x837.7 (1760) + | | | [5]{}: program_header 0x158-0x837.7 (1760) | | | program_header{}: 0x158-0x837.7 (1760) 0x0150| 50 e5 74 64 | P.td | type: "gnu_eh_frame" (1685382480) (GNU frame unwind information) 0x158-0x15b.7 (4) | | | flags{}: 0x15c-0x15f.7 (4) @@ -144,6 +128,22 @@ $ fq -d elf dv a_static 0x07f0| 01 1b 03 3b 40 00 00 00 07 00 00 00| ...;@.......| data: raw bits 0x7f4-0x837.7 (68) 0x0800|7c fe ff ff 58 00 00 00 ac fe ff ff 6c 00 00 00||...X.......l...| * |until 0x837.7 (68) | | + | | | [6]{}: program_header 0x0-0x1c7.7 (456) + | | | program_header{}: 0x0-0x1c7.7 (456) + | | | data: raw bits 0x0-NA (0) +0x0190|51 e5 74 64 |Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0x190-0x193.7 (4) + | | | flags{}: 0x194-0x197.7 (4) +0x0190| 06 | . | unused0: 0 0x194-0x194.4 (0.5) +0x0190| 06 | . | r: true 0x194.5-0x194.5 (0.1) +0x0190| 06 | . | w: true 0x194.6-0x194.6 (0.1) +0x0190| 06 | . | x: false 0x194.7-0x194.7 (0.1) +0x0190| 00 00 00 | ... | unused1: 0 0x195-0x197.7 (3) +0x0190| 00 00 00 00 00 00 00 00| ........| offset: 0x0 0x198-0x19f.7 (8) +0x01a0|00 00 00 00 00 00 00 00 |........ | vaddr: 0x0 0x1a0-0x1a7.7 (8) +0x01a0| 00 00 00 00 00 00 00 00| ........| paddr: 0x0 0x1a8-0x1af.7 (8) +0x01b0|00 00 00 00 00 00 00 00 |........ | filesz: 0 0x1b0-0x1b7.7 (8) +0x01b0| 00 00 00 00 00 00 00 00| ........| memsz: 0 0x1b8-0x1bf.7 (8) +0x01c0|10 00 00 00 00 00 00 00 |........ | align: 16 0x1c0-0x1c7.7 (8) | | | [7]{}: program_header 0x1c8-0xfff.7 (3640) | | | program_header{}: 0x1c8-0xfff.7 (3640) 0x01c0| 52 e5 74 64 | R.td | type: "gnu_relro" (1685382482) (GNU read-only after relocation) 0x1c8-0x1cb.7 (4) @@ -890,7 +890,33 @@ $ fq -d elf dv a_static 0x2880| 00 00 00 00 | .... | info: 0 0x2884-0x2887.7 (4) 0x2880| 08 00 00 00 00 00 00 00| ........| addralign: 8 0x2888-0x288f.7 (8) 0x2890|00 00 00 00 00 00 00 00 |........ | entsize: 0 0x2890-0x2897.7 (8) - | | | [19]{}: section_header 0x1008-0x2917.7 (6416) + | | | [19]{}: section_header 0x2898-0x28d7.7 (64) +0x2890| af 00 00 00 | .... | name: ".bss" (175) 0x2898-0x289b.7 (4) +0x2890| 08 00 00 00| ....| type: "nobits" (0x8) (No space in the file) 0x289c-0x289f.7 (4) + | | | flags{}: 0x28a0-0x28a7.7 (8) +0x28a0|03 |. | link_order: false 0x28a0-0x28a0 (0.1) +0x28a0|03 |. | info_link: false 0x28a0.1-0x28a0.1 (0.1) +0x28a0|03 |. | strings: false 0x28a0.2-0x28a0.2 (0.1) +0x28a0|03 |. | merge: false 0x28a0.3-0x28a0.3 (0.1) +0x28a0|03 |. | unused0: 0 0x28a0.4-0x28a0.4 (0.1) +0x28a0|03 |. | execinstr: false 0x28a0.5-0x28a0.5 (0.1) +0x28a0|03 |. | alloc: true 0x28a0.6-0x28a0.6 (0.1) +0x28a0|03 |. | write: true 0x28a0.7-0x28a0.7 (0.1) +0x28a0| 00 | . | tls: false 0x28a1-0x28a1 (0.1) +0x28a0| 00 | . | group: false 0x28a1.1-0x28a1.1 (0.1) +0x28a0| 00 | . | os_nonconforming: false 0x28a1.2-0x28a1.2 (0.1) +0x28a0| 00 00 | .. | unused1: 0 0x28a1.3-0x28a2.3 (1.1) +0x28a0| 00 00 | .. | os_specific: 0 0x28a2.4-0x28a3.3 (1) +0x28a0| 00 | . | processor_specific: 0 0x28a3.4-0x28a3.7 (0.4) +0x28a0| 00 00 00 00 | .... | unused2: 0 0x28a4-0x28a7.7 (4) +0x28a0| 08 10 01 00 00 00 00 00| ........| addr: 0x11008 0x28a8-0x28af.7 (8) +0x28b0|08 10 00 00 00 00 00 00 |........ | offset: 0x1008 0x28b0-0x28b7.7 (8) +0x28b0| 38 00 00 00 00 00 00 00| 8.......| size: 56 0x28b8-0x28bf.7 (8) +0x28c0|00 00 00 00 |.... | link: 0 0x28c0-0x28c3.7 (4) +0x28c0| 00 00 00 00 | .... | info: 0 0x28c4-0x28c7.7 (4) +0x28c0| 08 00 00 00 00 00 00 00| ........| addralign: 8 0x28c8-0x28cf.7 (8) +0x28d0|00 00 00 00 00 00 00 00 |........ | entsize: 0 0x28d0-0x28d7.7 (8) + | | | [20]{}: section_header 0x1008-0x2917.7 (6416) 0x1000| 47 43 43 3a 20 28 41 6c| GCC: (Al| data: raw bits 0x1008-0x1069.7 (98) 0x1010|70 69 6e 65 20 31 30 2e 33 2e 31 5f 67 69 74 32|pine 10.3.1_git2| * |until 0x1069.7 (98) | | @@ -919,7 +945,7 @@ $ fq -d elf dv a_static 0x2900| 00 00 00 00 | .... | info: 0 0x2904-0x2907.7 (4) 0x2900| 01 00 00 00 00 00 00 00| ........| addralign: 1 0x2908-0x290f.7 (8) 0x2910|01 00 00 00 00 00 00 00 |........ | entsize: 1 0x2910-0x2917.7 (8) - | | | [20]{}: section_header 0x1070-0x2957.7 (6376) + | | | [21]{}: section_header 0x1070-0x2957.7 (6376) 0x1070|2c 00 00 00 02 00 00 00 00 00 08 00 00 00 00 00|,...............| data: raw bits 0x1070-0x111f.7 (176) * |until 0x111f.7 (176) | | 0x2910| bd 00 00 00 | .... | name: ".debug_aranges" (189) 0x2918-0x291b.7 (4) @@ -947,7 +973,7 @@ $ fq -d elf dv a_static 0x2940| 00 00 00 00 | .... | info: 0 0x2944-0x2947.7 (4) 0x2940| 10 00 00 00 00 00 00 00| ........| addralign: 16 0x2948-0x294f.7 (8) 0x2950|00 00 00 00 00 00 00 00 |........ | entsize: 0 0x2950-0x2957.7 (8) - | | | [21]{}: section_header 0x1120-0x2997.7 (6264) + | | | [22]{}: section_header 0x1120-0x2997.7 (6264) 0x1120|f1 00 00 00 04 00 00 00 00 00 08 01 00 00 00 00|................| data: raw bits 0x1120-0x1258.7 (313) * |until 0x1258.7 (313) | | 0x2950| cc 00 00 00 | .... | name: ".debug_info" (204) 0x2958-0x295b.7 (4) @@ -975,7 +1001,7 @@ $ fq -d elf dv a_static 0x2980| 00 00 00 00 | .... | info: 0 0x2984-0x2987.7 (4) 0x2980| 01 00 00 00 00 00 00 00| ........| addralign: 1 0x2988-0x298f.7 (8) 0x2990|00 00 00 00 00 00 00 00 |........ | entsize: 0 0x2990-0x2997.7 (8) - | | | [22]{}: section_header 0x1259-0x29d7.7 (6015) + | | | [23]{}: section_header 0x1259-0x29d7.7 (6015) 0x1250| 01 11 01 25 0e 13 0b| ...%...| data: raw bits 0x1259-0x1320.7 (200) 0x1260|03 0e 1b 0e 55 17 11 01 10 17 00 00 02 24 00 0b|....U........$..| * |until 0x1320.7 (200) | | @@ -1004,7 +1030,7 @@ $ fq -d elf dv a_static 0x29c0| 00 00 00 00 | .... | info: 0 0x29c4-0x29c7.7 (4) 0x29c0| 01 00 00 00 00 00 00 00| ........| addralign: 1 0x29c8-0x29cf.7 (8) 0x29d0|00 00 00 00 00 00 00 00 |........ | entsize: 0 0x29d0-0x29d7.7 (8) - | | | [23]{}: section_header 0x1321-0x2a17.7 (5879) + | | | [24]{}: section_header 0x1321-0x2a17.7 (5879) 0x1320| 4e 00 00 00 03 00 21 00 00 00 04 01 fb 0e 0d| N.....!........| data: raw bits 0x1321-0x1422.7 (258) 0x1330|00 01 01 01 01 00 00 00 01 00 00 01 63 72 74 00|............crt.| * |until 0x1422.7 (258) | | @@ -1033,7 +1059,7 @@ $ fq -d elf dv a_static 0x2a00| 00 00 00 00 | .... | info: 0 0x2a04-0x2a07.7 (4) 0x2a00| 01 00 00 00 00 00 00 00| ........| addralign: 1 0x2a08-0x2a0f.7 (8) 0x2a10|00 00 00 00 00 00 00 00 |........ | entsize: 0 0x2a10-0x2a17.7 (8) - | | | [24]{}: section_header 0x1428-0x2a57.7 (5680) + | | | [25]{}: section_header 0x1428-0x2a57.7 (5680) 0x1420| 0c 00 00 00 ff ff ff ff| ........| data: raw bits 0x1428-0x144f.7 (40) 0x1430|01 00 04 78 1e 0c 1f 00 14 00 00 00 00 00 00 00|...x............| 0x1440|3c 06 00 00 00 00 00 00 28 00 00 00 00 00 00 00|<.......(.......| @@ -1062,7 +1088,7 @@ $ fq -d elf dv a_static 0x2a40| 00 00 00 00 | .... | info: 0 0x2a44-0x2a47.7 (4) 0x2a40| 08 00 00 00 00 00 00 00| ........| addralign: 8 0x2a48-0x2a4f.7 (8) 0x2a50|00 00 00 00 00 00 00 00 |........ | entsize: 0 0x2a50-0x2a57.7 (8) - | | | [25]{}: section_header 0x1450-0x2a97.7 (5704) + | | | [26]{}: section_header 0x1450-0x2a97.7 (5704) 0x1450|47 4e 55 20 43 39 39 20 31 30 2e 33 2e 31 20 32|GNU C99 10.3.1 2| data: raw bits 0x1450-0x1617.7 (456) * |until 0x1617.7 (456) | | 0x2a50| ff 00 00 00 | .... | name: ".debug_str" (255) 0x2a58-0x2a5b.7 (4) @@ -1090,7 +1116,7 @@ $ fq -d elf dv a_static 0x2a80| 00 00 00 00 | .... | info: 0 0x2a84-0x2a87.7 (4) 0x2a80| 01 00 00 00 00 00 00 00| ........| addralign: 1 0x2a88-0x2a8f.7 (8) 0x2a90|01 00 00 00 00 00 00 00 |........ | entsize: 1 0x2a90-0x2a97.7 (8) - | | | [26]{}: section_header 0x1618-0x2ad7.7 (5312) + | | | [27]{}: section_header 0x1618-0x2ad7.7 (5312) 0x1610| 00 00 00 00 00 00 00 00| ........| data: raw bits 0x1618-0x173f.7 (296) 0x1620|3c 06 00 00 00 00 00 00 4c 06 00 00 00 00 00 00|<.......L.......| * |until 0x173f.7 (296) | | @@ -1119,7 +1145,7 @@ $ fq -d elf dv a_static 0x2ac0| 00 00 00 00 | .... | info: 0 0x2ac4-0x2ac7.7 (4) 0x2ac0| 01 00 00 00 00 00 00 00| ........| addralign: 1 0x2ac8-0x2acf.7 (8) 0x2ad0|00 00 00 00 00 00 00 00 |........ | entsize: 0 0x2ad0-0x2ad7.7 (8) - | | | [27]{}: section_header 0x1740-0x2b17.7 (5080) + | | | [28]{}: section_header 0x1740-0x2b17.7 (5080) 0x1740|3c 06 00 00 00 00 00 00 64 06 00 00 00 00 00 00|<.......d.......| data: raw bits 0x1740-0x17df.7 (160) * |until 0x17df.7 (160) | | 0x2ad0| 15 01 00 00 | .... | name: ".debug_ranges" (277) 0x2ad8-0x2adb.7 (4) @@ -1147,7 +1173,7 @@ $ fq -d elf dv a_static 0x2b00| 00 00 00 00 | .... | info: 0 0x2b04-0x2b07.7 (4) 0x2b00| 10 00 00 00 00 00 00 00| ........| addralign: 16 0x2b08-0x2b0f.7 (8) 0x2b10|00 00 00 00 00 00 00 00 |........ | entsize: 0 0x2b10-0x2b17.7 (8) - | | | [28]{}: section_header 0x17e0-0x2b57.7 (4984) + | | | [29]{}: section_header 0x17e0-0x2b57.7 (4984) | | | symbol_table[0:93]: 0x17e0-0x2097.7 (2232) | | | [0]{}: symbol 0x17e0-0x17f7.7 (24) 0x17e0|00 00 00 00 |.... | name: "" (0) 0x17e0-0x17e3.7 (4) @@ -2011,7 +2037,7 @@ $ fq -d elf dv a_static 0x2b40| 46 00 00 00 | F... | info: 70 0x2b44-0x2b47.7 (4) 0x2b40| 08 00 00 00 00 00 00 00| ........| addralign: 8 0x2b48-0x2b4f.7 (8) 0x2b50|18 00 00 00 00 00 00 00 |........ | entsize: 24 0x2b50-0x2b57.7 (8) - | | | [29]{}: section_header 0x2098-0x2b97.7 (2816) + | | | [30]{}: section_header 0x2098-0x2b97.7 (2816) 0x2090| 00 53 63 72 74 31 2e 63| .Scrt1.c| string: "\x00Scrt1.c\x00$x\x00crti.o\x00crtn.o\x00crtstuff.c\x00$d\x00__EH_FRAME"... 0x2098-0x22b2.7 (539) 0x20a0|00 24 78 00 63 72 74 69 2e 6f 00 63 72 74 6e 2e|.$x.crti.o.crtn.| * |until 0x22b2.7 (539) | | @@ -2040,7 +2066,7 @@ $ fq -d elf dv a_static 0x2b80| 00 00 00 00 | .... | info: 0 0x2b84-0x2b87.7 (4) 0x2b80| 01 00 00 00 00 00 00 00| ........| addralign: 1 0x2b88-0x2b8f.7 (8) 0x2b90|00 00 00 00 00 00 00 00 |........ | entsize: 0 0x2b90-0x2b97.7 (8) - | | | [30]{}: section_header 0x22b3-0x2bd7.7 (2341) + | | | [31]{}: section_header 0x22b3-0x2bd7.7 (2341) 0x22b0| 00 2e 73 79 6d 74 61 62 00 2e 73 74 72| ..symtab..str| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.interp\x00.gnu.hash\x00.dyns"... 0x22b3-0x23d5.7 (291) 0x22c0|74 61 62 00 2e 73 68 73 74 72 74 61 62 00 2e 69|tab..shstrtab..i| * |until 0x23d5.7 (291) | | @@ -2069,32 +2095,6 @@ $ fq -d elf dv a_static 0x2bc0| 00 00 00 00 | .... | info: 0 0x2bc4-0x2bc7.7 (4) 0x2bc0| 01 00 00 00 00 00 00 00| ........| addralign: 1 0x2bc8-0x2bcf.7 (8) 0x2bd0|00 00 00 00 00 00 00 00| |........| | entsize: 0 0x2bd0-0x2bd7.7 (8) - | | | [31]{}: section_header 0x2898-0x28d7.7 (64) -0x2890| af 00 00 00 | .... | name: ".bss" (175) 0x2898-0x289b.7 (4) -0x2890| 08 00 00 00| ....| type: "nobits" (0x8) (No space in the file) 0x289c-0x289f.7 (4) - | | | flags{}: 0x28a0-0x28a7.7 (8) -0x28a0|03 |. | link_order: false 0x28a0-0x28a0 (0.1) -0x28a0|03 |. | info_link: false 0x28a0.1-0x28a0.1 (0.1) -0x28a0|03 |. | strings: false 0x28a0.2-0x28a0.2 (0.1) -0x28a0|03 |. | merge: false 0x28a0.3-0x28a0.3 (0.1) -0x28a0|03 |. | unused0: 0 0x28a0.4-0x28a0.4 (0.1) -0x28a0|03 |. | execinstr: false 0x28a0.5-0x28a0.5 (0.1) -0x28a0|03 |. | alloc: true 0x28a0.6-0x28a0.6 (0.1) -0x28a0|03 |. | write: true 0x28a0.7-0x28a0.7 (0.1) -0x28a0| 00 | . | tls: false 0x28a1-0x28a1 (0.1) -0x28a0| 00 | . | group: false 0x28a1.1-0x28a1.1 (0.1) -0x28a0| 00 | . | os_nonconforming: false 0x28a1.2-0x28a1.2 (0.1) -0x28a0| 00 00 | .. | unused1: 0 0x28a1.3-0x28a2.3 (1.1) -0x28a0| 00 00 | .. | os_specific: 0 0x28a2.4-0x28a3.3 (1) -0x28a0| 00 | . | processor_specific: 0 0x28a3.4-0x28a3.7 (0.4) -0x28a0| 00 00 00 00 | .... | unused2: 0 0x28a4-0x28a7.7 (4) -0x28a0| 08 10 01 00 00 00 00 00| ........| addr: 0x11008 0x28a8-0x28af.7 (8) -0x28b0|08 10 00 00 00 00 00 00 |........ | offset: 0x1008 0x28b0-0x28b7.7 (8) -0x28b0| 38 00 00 00 00 00 00 00| 8.......| size: 56 0x28b8-0x28bf.7 (8) -0x28c0|00 00 00 00 |.... | link: 0 0x28c0-0x28c3.7 (4) -0x28c0| 00 00 00 00 | .... | info: 0 0x28c4-0x28c7.7 (4) -0x28c0| 08 00 00 00 00 00 00 00| ........| addralign: 8 0x28c8-0x28cf.7 (8) -0x28d0|00 00 00 00 00 00 00 00 |........ | entsize: 0 0x28d0-0x28d7.7 (8) 0x0910| 00 00 00 00| ....| unknown0: raw bits 0x91c-0xda7.7 (1164) 0x0920|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................| * |until 0xda7.7 (1164) | | diff --git a/format/elf/testdata/linux_arm64/a_stripped.fqtest b/format/elf/testdata/linux_arm64/a_stripped.fqtest index 97b77bf12..d53199e27 100644 --- a/format/elf/testdata/linux_arm64/a_stripped.fqtest +++ b/format/elf/testdata/linux_arm64/a_stripped.fqtest @@ -23,40 +23,7 @@ $ fq -d elf dv a_stripped 0x0030| 16 00 | .. | shnum: 22 0x3c-0x3d.7 (2) 0x0030| 15 00| ..| shstrndx: 21 0x3e-0x3f.7 (2) | | | program_headers[0:8]: 0x0-0x1007.7 (4104) - | | | [0]{}: program_header 0x0-0x913.7 (2324) - | | | program_header{}: 0x0-0x913.7 (2324) -0x0000|7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00|.ELF............| data: raw bits 0x0-0x913.7 (2324) -* |until 0x913.7 (2324) | | -0x00b0|01 00 00 00 |.... | type: "load" (1) (Loadable segment) 0xb0-0xb3.7 (4) - | | | flags{}: 0xb4-0xb7.7 (4) -0x00b0| 05 | . | unused0: 0 0xb4-0xb4.4 (0.5) -0x00b0| 05 | . | r: true 0xb4.5-0xb4.5 (0.1) -0x00b0| 05 | . | w: false 0xb4.6-0xb4.6 (0.1) -0x00b0| 05 | . | x: true 0xb4.7-0xb4.7 (0.1) -0x00b0| 00 00 00 | ... | unused1: 0 0xb5-0xb7.7 (3) -0x00b0| 00 00 00 00 00 00 00 00| ........| offset: 0x0 0xb8-0xbf.7 (8) -0x00c0|00 00 00 00 00 00 00 00 |........ | vaddr: 0x0 0xc0-0xc7.7 (8) -0x00c0| 00 00 00 00 00 00 00 00| ........| paddr: 0x0 0xc8-0xcf.7 (8) -0x00d0|14 09 00 00 00 00 00 00 |........ | filesz: 2324 0xd0-0xd7.7 (8) -0x00d0| 14 09 00 00 00 00 00 00| ........| memsz: 2324 0xd8-0xdf.7 (8) -0x00e0|00 00 01 00 00 00 00 00 |........ | align: 65536 0xe0-0xe7.7 (8) - | | | [1]{}: program_header 0x0-0x1c7.7 (456) - | | | program_header{}: 0x0-0x1c7.7 (456) - | | | data: raw bits 0x0-NA (0) -0x0190|51 e5 74 64 |Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0x190-0x193.7 (4) - | | | flags{}: 0x194-0x197.7 (4) -0x0190| 06 | . | unused0: 0 0x194-0x194.4 (0.5) -0x0190| 06 | . | r: true 0x194.5-0x194.5 (0.1) -0x0190| 06 | . | w: true 0x194.6-0x194.6 (0.1) -0x0190| 06 | . | x: false 0x194.7-0x194.7 (0.1) -0x0190| 00 00 00 | ... | unused1: 0 0x195-0x197.7 (3) -0x0190| 00 00 00 00 00 00 00 00| ........| offset: 0x0 0x198-0x19f.7 (8) -0x01a0|00 00 00 00 00 00 00 00 |........ | vaddr: 0x0 0x1a0-0x1a7.7 (8) -0x01a0| 00 00 00 00 00 00 00 00| ........| paddr: 0x0 0x1a8-0x1af.7 (8) -0x01b0|00 00 00 00 00 00 00 00 |........ | filesz: 0 0x1b0-0x1b7.7 (8) -0x01b0| 00 00 00 00 00 00 00 00| ........| memsz: 0 0x1b8-0x1bf.7 (8) -0x01c0|10 00 00 00 00 00 00 00 |........ | align: 16 0x1c0-0x1c7.7 (8) - | | | [2]{}: program_header 0x40-0x1ff.7 (448) + | | | [0]{}: program_header 0x40-0x1ff.7 (448) | | | program_header{}: 0x40-0x1ff.7 (448) 0x0040|06 00 00 00 |.... | type: "phdr" (6) (Program header location and size) 0x40-0x43.7 (4) 0x0040|06 00 00 00 04 00 00 00 40 00 00 00 00 00 00 00|........@.......| data: raw bits 0x40-0x1ff.7 (448) @@ -73,7 +40,7 @@ $ fq -d elf dv a_stripped 0x0060|c0 01 00 00 00 00 00 00 |........ | filesz: 448 0x60-0x67.7 (8) 0x0060| c0 01 00 00 00 00 00 00| ........| memsz: 448 0x68-0x6f.7 (8) 0x0070|08 00 00 00 00 00 00 00 |........ | align: 8 0x70-0x77.7 (8) - | | | [3]{}: program_header 0x78-0x219.7 (418) + | | | [1]{}: program_header 0x78-0x219.7 (418) | | | program_header{}: 0x78-0x219.7 (418) 0x0070| 03 00 00 00 | .... | type: "interp" (3) (Interpreter to invoke) 0x78-0x7b.7 (4) | | | flags{}: 0x7c-0x7f.7 (4) @@ -90,7 +57,24 @@ $ fq -d elf dv a_stripped 0x00a0| 01 00 00 00 00 00 00 00| ........| align: 1 0xa8-0xaf.7 (8) 0x0200|2f 6c 69 62 2f 6c 64 2d 6d 75 73 6c 2d 61 61 72|/lib/ld-musl-aar| data: raw bits 0x200-0x219.7 (26) 0x0210|63 68 36 34 2e 73 6f 2e 31 00 |ch64.so.1. | - | | | [4]{}: program_header 0xe8-0x1007.7 (3872) + | | | [2]{}: program_header 0x0-0x913.7 (2324) + | | | program_header{}: 0x0-0x913.7 (2324) +0x0000|7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00|.ELF............| data: raw bits 0x0-0x913.7 (2324) +* |until 0x913.7 (2324) | | +0x00b0|01 00 00 00 |.... | type: "load" (1) (Loadable segment) 0xb0-0xb3.7 (4) + | | | flags{}: 0xb4-0xb7.7 (4) +0x00b0| 05 | . | unused0: 0 0xb4-0xb4.4 (0.5) +0x00b0| 05 | . | r: true 0xb4.5-0xb4.5 (0.1) +0x00b0| 05 | . | w: false 0xb4.6-0xb4.6 (0.1) +0x00b0| 05 | . | x: true 0xb4.7-0xb4.7 (0.1) +0x00b0| 00 00 00 | ... | unused1: 0 0xb5-0xb7.7 (3) +0x00b0| 00 00 00 00 00 00 00 00| ........| offset: 0x0 0xb8-0xbf.7 (8) +0x00c0|00 00 00 00 00 00 00 00 |........ | vaddr: 0x0 0xc0-0xc7.7 (8) +0x00c0| 00 00 00 00 00 00 00 00| ........| paddr: 0x0 0xc8-0xcf.7 (8) +0x00d0|14 09 00 00 00 00 00 00 |........ | filesz: 2324 0xd0-0xd7.7 (8) +0x00d0| 14 09 00 00 00 00 00 00| ........| memsz: 2324 0xd8-0xdf.7 (8) +0x00e0|00 00 01 00 00 00 00 00 |........ | align: 65536 0xe0-0xe7.7 (8) + | | | [3]{}: program_header 0xe8-0x1007.7 (3872) | | | program_header{}: 0xe8-0x1007.7 (3872) 0x00e0| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0xe8-0xeb.7 (4) | | | flags{}: 0xec-0xef.7 (4) @@ -107,7 +91,7 @@ $ fq -d elf dv a_stripped 0x0110| 00 00 01 00 00 00 00 00| ........| align: 65536 0x118-0x11f.7 (8) 0x0d90|90 07 00 00 00 00 00 00 30 07 00 00 00 00 00 00|........0.......| data: raw bits 0xd90-0x1007.7 (632) * |until 0x1007.7 (632) | | - | | | [5]{}: program_header 0x120-0xf6f.7 (3664) + | | | [4]{}: program_header 0x120-0xf6f.7 (3664) | | | program_header{}: 0x120-0xf6f.7 (3664) 0x0120|02 00 00 00 |.... | type: "dynamic" (2) (Dynamic linking information) 0x120-0x123.7 (4) | | | flags{}: 0x124-0x127.7 (4) @@ -124,7 +108,7 @@ $ fq -d elf dv a_stripped 0x0150|08 00 00 00 00 00 00 00 |........ | align: 8 0x150-0x157.7 (8) 0x0da0|01 00 00 00 00 00 00 00 a2 00 00 00 00 00 00 00|................| data: raw bits 0xda0-0xf6f.7 (464) * |until 0xf6f.7 (464) | | - | | | [6]{}: program_header 0x158-0x84f.7 (1784) + | | | [5]{}: program_header 0x158-0x84f.7 (1784) | | | program_header{}: 0x158-0x84f.7 (1784) 0x0150| 50 e5 74 64 | P.td | type: "gnu_eh_frame" (1685382480) (GNU frame unwind information) 0x158-0x15b.7 (4) | | | flags{}: 0x15c-0x15f.7 (4) @@ -142,6 +126,22 @@ $ fq -d elf dv a_stripped 0x0810| 01 1b 03 3b 38 00 00 00 06 00 00 00| ...;8.......| data: raw bits 0x814-0x84f.7 (60) 0x0820|ac fe ff ff 50 00 00 00 dc fe ff ff 64 00 00 00|....P.......d...| * |until 0x84f.7 (60) | | + | | | [6]{}: program_header 0x0-0x1c7.7 (456) + | | | program_header{}: 0x0-0x1c7.7 (456) + | | | data: raw bits 0x0-NA (0) +0x0190|51 e5 74 64 |Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0x190-0x193.7 (4) + | | | flags{}: 0x194-0x197.7 (4) +0x0190| 06 | . | unused0: 0 0x194-0x194.4 (0.5) +0x0190| 06 | . | r: true 0x194.5-0x194.5 (0.1) +0x0190| 06 | . | w: true 0x194.6-0x194.6 (0.1) +0x0190| 06 | . | x: false 0x194.7-0x194.7 (0.1) +0x0190| 00 00 00 | ... | unused1: 0 0x195-0x197.7 (3) +0x0190| 00 00 00 00 00 00 00 00| ........| offset: 0x0 0x198-0x19f.7 (8) +0x01a0|00 00 00 00 00 00 00 00 |........ | vaddr: 0x0 0x1a0-0x1a7.7 (8) +0x01a0| 00 00 00 00 00 00 00 00| ........| paddr: 0x0 0x1a8-0x1af.7 (8) +0x01b0|00 00 00 00 00 00 00 00 |........ | filesz: 0 0x1b0-0x1b7.7 (8) +0x01b0| 00 00 00 00 00 00 00 00| ........| memsz: 0 0x1b8-0x1bf.7 (8) +0x01c0|10 00 00 00 00 00 00 00 |........ | align: 16 0x1c0-0x1c7.7 (8) | | | [7]{}: program_header 0x1c8-0xfff.7 (3640) | | | program_header{}: 0x1c8-0xfff.7 (3640) 0x01c0| 52 e5 74 64 | R.td | type: "gnu_relro" (1685382482) (GNU read-only after relocation) 0x1c8-0x1cb.7 (4) @@ -894,7 +894,33 @@ $ fq -d elf dv a_stripped 0x15c0| 00 00 00 00 | .... | info: 0 0x15c4-0x15c7.7 (4) 0x15c0| 08 00 00 00 00 00 00 00| ........| addralign: 8 0x15c8-0x15cf.7 (8) 0x15d0|00 00 00 00 00 00 00 00 |........ | entsize: 0 0x15d0-0x15d7.7 (8) - | | | [19]{}: section_header 0x1008-0x1657.7 (1616) + | | | [19]{}: section_header 0x15d8-0x1617.7 (64) +0x15d0| 9f 00 00 00 | .... | name: ".bss" (159) 0x15d8-0x15db.7 (4) +0x15d0| 08 00 00 00| ....| type: "nobits" (0x8) (No space in the file) 0x15dc-0x15df.7 (4) + | | | flags{}: 0x15e0-0x15e7.7 (8) +0x15e0|03 |. | link_order: false 0x15e0-0x15e0 (0.1) +0x15e0|03 |. | info_link: false 0x15e0.1-0x15e0.1 (0.1) +0x15e0|03 |. | strings: false 0x15e0.2-0x15e0.2 (0.1) +0x15e0|03 |. | merge: false 0x15e0.3-0x15e0.3 (0.1) +0x15e0|03 |. | unused0: 0 0x15e0.4-0x15e0.4 (0.1) +0x15e0|03 |. | execinstr: false 0x15e0.5-0x15e0.5 (0.1) +0x15e0|03 |. | alloc: true 0x15e0.6-0x15e0.6 (0.1) +0x15e0|03 |. | write: true 0x15e0.7-0x15e0.7 (0.1) +0x15e0| 00 | . | tls: false 0x15e1-0x15e1 (0.1) +0x15e0| 00 | . | group: false 0x15e1.1-0x15e1.1 (0.1) +0x15e0| 00 | . | os_nonconforming: false 0x15e1.2-0x15e1.2 (0.1) +0x15e0| 00 00 | .. | unused1: 0 0x15e1.3-0x15e2.3 (1.1) +0x15e0| 00 00 | .. | os_specific: 0 0x15e2.4-0x15e3.3 (1) +0x15e0| 00 | . | processor_specific: 0 0x15e3.4-0x15e3.7 (0.4) +0x15e0| 00 00 00 00 | .... | unused2: 0 0x15e4-0x15e7.7 (4) +0x15e0| 08 10 01 00 00 00 00 00| ........| addr: 0x11008 0x15e8-0x15ef.7 (8) +0x15f0|08 10 00 00 00 00 00 00 |........ | offset: 0x1008 0x15f0-0x15f7.7 (8) +0x15f0| 38 00 00 00 00 00 00 00| 8.......| size: 56 0x15f8-0x15ff.7 (8) +0x1600|00 00 00 00 |.... | link: 0 0x1600-0x1603.7 (4) +0x1600| 00 00 00 00 | .... | info: 0 0x1604-0x1607.7 (4) +0x1600| 08 00 00 00 00 00 00 00| ........| addralign: 8 0x1608-0x160f.7 (8) +0x1610|00 00 00 00 00 00 00 00 |........ | entsize: 0 0x1610-0x1617.7 (8) + | | | [20]{}: section_header 0x1008-0x1657.7 (1616) 0x1000| 47 43 43 3a 20 28 41 6c| GCC: (Al| data: raw bits 0x1008-0x1069.7 (98) 0x1010|70 69 6e 65 20 31 30 2e 33 2e 31 5f 67 69 74 32|pine 10.3.1_git2| * |until 0x1069.7 (98) | | @@ -923,7 +949,7 @@ $ fq -d elf dv a_stripped 0x1640| 00 00 00 00 | .... | info: 0 0x1644-0x1647.7 (4) 0x1640| 01 00 00 00 00 00 00 00| ........| addralign: 1 0x1648-0x164f.7 (8) 0x1650|01 00 00 00 00 00 00 00 |........ | entsize: 1 0x1650-0x1657.7 (8) - | | | [20]{}: section_header 0x106a-0x1697.7 (1582) + | | | [21]{}: section_header 0x106a-0x1697.7 (1582) 0x1060| 00 2e 73 68 73 74| ..shst| string: "\x00.shstrtab\x00.interp\x00.gnu.hash\x00.dynsym\x00.dynstr\x00.rela"... 0x106a-0x1116.7 (173) 0x1070|72 74 61 62 00 2e 69 6e 74 65 72 70 00 2e 67 6e|rtab..interp..gn| * |until 0x1116.7 (173) | | @@ -952,32 +978,6 @@ $ fq -d elf dv a_stripped 0x1680| 00 00 00 00 | .... | info: 0 0x1684-0x1687.7 (4) 0x1680| 01 00 00 00 00 00 00 00| ........| addralign: 1 0x1688-0x168f.7 (8) 0x1690|00 00 00 00 00 00 00 00| |........| | entsize: 0 0x1690-0x1697.7 (8) - | | | [21]{}: section_header 0x15d8-0x1617.7 (64) -0x15d0| 9f 00 00 00 | .... | name: ".bss" (159) 0x15d8-0x15db.7 (4) -0x15d0| 08 00 00 00| ....| type: "nobits" (0x8) (No space in the file) 0x15dc-0x15df.7 (4) - | | | flags{}: 0x15e0-0x15e7.7 (8) -0x15e0|03 |. | link_order: false 0x15e0-0x15e0 (0.1) -0x15e0|03 |. | info_link: false 0x15e0.1-0x15e0.1 (0.1) -0x15e0|03 |. | strings: false 0x15e0.2-0x15e0.2 (0.1) -0x15e0|03 |. | merge: false 0x15e0.3-0x15e0.3 (0.1) -0x15e0|03 |. | unused0: 0 0x15e0.4-0x15e0.4 (0.1) -0x15e0|03 |. | execinstr: false 0x15e0.5-0x15e0.5 (0.1) -0x15e0|03 |. | alloc: true 0x15e0.6-0x15e0.6 (0.1) -0x15e0|03 |. | write: true 0x15e0.7-0x15e0.7 (0.1) -0x15e0| 00 | . | tls: false 0x15e1-0x15e1 (0.1) -0x15e0| 00 | . | group: false 0x15e1.1-0x15e1.1 (0.1) -0x15e0| 00 | . | os_nonconforming: false 0x15e1.2-0x15e1.2 (0.1) -0x15e0| 00 00 | .. | unused1: 0 0x15e1.3-0x15e2.3 (1.1) -0x15e0| 00 00 | .. | os_specific: 0 0x15e2.4-0x15e3.3 (1) -0x15e0| 00 | . | processor_specific: 0 0x15e3.4-0x15e3.7 (0.4) -0x15e0| 00 00 00 00 | .... | unused2: 0 0x15e4-0x15e7.7 (4) -0x15e0| 08 10 01 00 00 00 00 00| ........| addr: 0x11008 0x15e8-0x15ef.7 (8) -0x15f0|08 10 00 00 00 00 00 00 |........ | offset: 0x1008 0x15f0-0x15f7.7 (8) -0x15f0| 38 00 00 00 00 00 00 00| 8.......| size: 56 0x15f8-0x15ff.7 (8) -0x1600|00 00 00 00 |.... | link: 0 0x1600-0x1603.7 (4) -0x1600| 00 00 00 00 | .... | info: 0 0x1604-0x1607.7 (4) -0x1600| 08 00 00 00 00 00 00 00| ........| addralign: 8 0x1608-0x160f.7 (8) -0x1610|00 00 00 00 00 00 00 00 |........ | entsize: 0 0x1610-0x1617.7 (8) 0x0910| 00 00 00 00 00 00 00 00 00 00 00 00| ............| unknown0: raw bits 0x914-0xd8f.7 (1148) 0x0920|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................| * |until 0xd8f.7 (1148) | | diff --git a/format/elf/testdata/linux_arm64/libbbb.a.fqtest b/format/elf/testdata/linux_arm64/libbbb.a.fqtest index ac774ff4e..408c41001 100644 --- a/format/elf/testdata/linux_arm64/libbbb.a.fqtest +++ b/format/elf/testdata/linux_arm64/libbbb.a.fqtest @@ -113,7 +113,38 @@ $ fq -d ar dv libbbb.a 0x410| 04 00 00 00 00 00 00 00 | ........ | addralign: 4 0x414-0x41b.7 (8) 0x410| 00 00 00 00| ....| entsize: 0 0x41c-0x423.7 (8) 0x420|00 00 00 00 |.... | - | | | [2]{}: section_header 0xf4-0x4a3.7 (944) + | | | [2]{}: section_header 0x2dc-0x463.7 (392) +0x2d0| 08 00 00 00| ....| data: raw bits 0x2dc-0x323.7 (72) +0x2e0|00 00 00 00 13 01 00 00 05 00 00 00 00 00 00 00|................| +* |until 0x323.7 (72) | | +0x420| 1b 00 00 00 | .... | name: ".rela.text" (27) 0x424-0x427.7 (4) +0x420| 04 00 00 00 | .... | type: "rela" (0x4) (Relocation entries with explicit addends) 0x428-0x42b.7 (4) + | | | flags{}: 0x42c-0x433.7 (8) +0x420| 40 | @ | link_order: false 0x42c-0x42c (0.1) +0x420| 40 | @ | info_link: true 0x42c.1-0x42c.1 (0.1) +0x420| 40 | @ | strings: false 0x42c.2-0x42c.2 (0.1) +0x420| 40 | @ | merge: false 0x42c.3-0x42c.3 (0.1) +0x420| 40 | @ | unused0: 0 0x42c.4-0x42c.4 (0.1) +0x420| 40 | @ | execinstr: false 0x42c.5-0x42c.5 (0.1) +0x420| 40 | @ | alloc: false 0x42c.6-0x42c.6 (0.1) +0x420| 40 | @ | write: false 0x42c.7-0x42c.7 (0.1) +0x420| 00 | . | tls: false 0x42d-0x42d (0.1) +0x420| 00 | . | group: false 0x42d.1-0x42d.1 (0.1) +0x420| 00 | . | os_nonconforming: false 0x42d.2-0x42d.2 (0.1) +0x420| 00 00 | .. | unused1: 0 0x42d.3-0x42e.3 (1.1) +0x420| 00 00| ..| os_specific: 0 0x42e.4-0x42f.3 (1) +0x420| 00| .| processor_specific: 0 0x42f.4-0x42f.7 (0.4) +0x430|00 00 00 00 |.... | unused2: 0 0x430-0x433.7 (4) +0x430| 00 00 00 00 00 00 00 00 | ........ | addr: 0x0 0x434-0x43b.7 (8) +0x430| 48 02 00 00| H...| offset: 0x248 0x43c-0x443.7 (8) +0x440|00 00 00 00 |.... | +0x440| 48 00 00 00 00 00 00 00 | H....... | size: 72 0x444-0x44b.7 (8) +0x440| 0a 00 00 00| ....| link: 10 0x44c-0x44f.7 (4) +0x450|01 00 00 00 |.... | info: 1 0x450-0x453.7 (4) +0x450| 08 00 00 00 00 00 00 00 | ........ | addralign: 8 0x454-0x45b.7 (8) +0x450| 18 00 00 00| ....| entsize: 24 0x45c-0x463.7 (8) +0x460|00 00 00 00 |.... | + | | | [3]{}: section_header 0xf4-0x4a3.7 (944) | | | data: raw bits 0xf4-NA (0) 0x460| 26 00 00 00 | &... | name: ".data" (38) 0x464-0x467.7 (4) 0x460| 01 00 00 00 | .... | type: "progbits" (0x1) (Information defined by the program) 0x468-0x46b.7 (4) @@ -142,7 +173,35 @@ $ fq -d ar dv libbbb.a 0x490| 01 00 00 00 00 00 00 00 | ........ | addralign: 1 0x494-0x49b.7 (8) 0x490| 00 00 00 00| ....| entsize: 0 0x49c-0x4a3.7 (8) 0x4a0|00 00 00 00 |.... | - | | | [3]{}: section_header 0xf4-0x523.7 (1072) + | | | [4]{}: section_header 0x4a4-0x4e3.7 (64) +0x4a0| 2c 00 00 00 | ,... | name: ".bss" (44) 0x4a4-0x4a7.7 (4) +0x4a0| 08 00 00 00 | .... | type: "nobits" (0x8) (No space in the file) 0x4a8-0x4ab.7 (4) + | | | flags{}: 0x4ac-0x4b3.7 (8) +0x4a0| 03 | . | link_order: false 0x4ac-0x4ac (0.1) +0x4a0| 03 | . | info_link: false 0x4ac.1-0x4ac.1 (0.1) +0x4a0| 03 | . | strings: false 0x4ac.2-0x4ac.2 (0.1) +0x4a0| 03 | . | merge: false 0x4ac.3-0x4ac.3 (0.1) +0x4a0| 03 | . | unused0: 0 0x4ac.4-0x4ac.4 (0.1) +0x4a0| 03 | . | execinstr: false 0x4ac.5-0x4ac.5 (0.1) +0x4a0| 03 | . | alloc: true 0x4ac.6-0x4ac.6 (0.1) +0x4a0| 03 | . | write: true 0x4ac.7-0x4ac.7 (0.1) +0x4a0| 00 | . | tls: false 0x4ad-0x4ad (0.1) +0x4a0| 00 | . | group: false 0x4ad.1-0x4ad.1 (0.1) +0x4a0| 00 | . | os_nonconforming: false 0x4ad.2-0x4ad.2 (0.1) +0x4a0| 00 00 | .. | unused1: 0 0x4ad.3-0x4ae.3 (1.1) +0x4a0| 00 00| ..| os_specific: 0 0x4ae.4-0x4af.3 (1) +0x4a0| 00| .| processor_specific: 0 0x4af.4-0x4af.7 (0.4) +0x4b0|00 00 00 00 |.... | unused2: 0 0x4b0-0x4b3.7 (4) +0x4b0| 00 00 00 00 00 00 00 00 | ........ | addr: 0x0 0x4b4-0x4bb.7 (8) +0x4b0| 60 00 00 00| `...| offset: 0x60 0x4bc-0x4c3.7 (8) +0x4c0|00 00 00 00 |.... | +0x4c0| 00 00 00 00 00 00 00 00 | ........ | size: 0 0x4c4-0x4cb.7 (8) +0x4c0| 00 00 00 00| ....| link: 0 0x4cc-0x4cf.7 (4) +0x4d0|00 00 00 00 |.... | info: 0 0x4d0-0x4d3.7 (4) +0x4d0| 01 00 00 00 00 00 00 00 | ........ | addralign: 1 0x4d4-0x4db.7 (8) +0x4d0| 00 00 00 00| ....| entsize: 0 0x4dc-0x4e3.7 (8) +0x4e0|00 00 00 00 |.... | + | | | [5]{}: section_header 0xf4-0x523.7 (1072) 0x0f0| 6c 69 62 62 62 62 5f 62 62 62 00 | libbbb_bbb. | data: raw bits 0xf4-0xfe.7 (11) 0x4e0| 31 00 00 00 | 1... | name: ".rodata" (49) 0x4e4-0x4e7.7 (4) 0x4e0| 01 00 00 00 | .... | type: "progbits" (0x1) (Information defined by the program) 0x4e8-0x4eb.7 (4) @@ -171,7 +230,7 @@ $ fq -d ar dv libbbb.a 0x510| 08 00 00 00 00 00 00 00 | ........ | addralign: 8 0x514-0x51b.7 (8) 0x510| 00 00 00 00| ....| entsize: 0 0x51c-0x523.7 (8) 0x520|00 00 00 00 |.... | - | | | [4]{}: section_header 0xff-0x563.7 (1125) + | | | [6]{}: section_header 0xff-0x563.7 (1125) 0x0f0| 00| .| data: raw bits 0xff-0x130.7 (50) 0x100|47 43 43 3a 20 28 41 6c 70 69 6e 65 20 31 30 2e|GCC: (Alpine 10.| * |until 0x130.7 (50) | | @@ -202,7 +261,7 @@ $ fq -d ar dv libbbb.a 0x550| 01 00 00 00 00 00 00 00 | ........ | addralign: 1 0x554-0x55b.7 (8) 0x550| 01 00 00 00| ....| entsize: 1 0x55c-0x563.7 (8) 0x560|00 00 00 00 |.... | - | | | [5]{}: section_header 0x131-0x5a3.7 (1139) + | | | [7]{}: section_header 0x131-0x5a3.7 (1139) | | | data: raw bits 0x131-NA (0) 0x560| 42 00 00 00 | B... | name: ".note.GNU-stack" (66) 0x564-0x567.7 (4) 0x560| 01 00 00 00 | .... | type: "progbits" (0x1) (Information defined by the program) 0x568-0x56b.7 (4) @@ -231,7 +290,7 @@ $ fq -d ar dv libbbb.a 0x590| 01 00 00 00 00 00 00 00 | ........ | addralign: 1 0x594-0x59b.7 (8) 0x590| 00 00 00 00| ....| entsize: 0 0x59c-0x5a3.7 (8) 0x5a0|00 00 00 00 |.... | - | | | [6]{}: section_header 0x134-0x5e3.7 (1200) + | | | [8]{}: section_header 0x134-0x5e3.7 (1200) 0x130| 10 00 00 00 00 00 00 00 01 7a 52 00| .........zR.| data: raw bits 0x134-0x16b.7 (56) 0x140|04 78 1e 01 1b 0c 1f 00 20 00 00 00 18 00 00 00|.x...... .......| * |until 0x16b.7 (56) | | @@ -262,7 +321,37 @@ $ fq -d ar dv libbbb.a 0x5d0| 08 00 00 00 00 00 00 00 | ........ | addralign: 8 0x5d4-0x5db.7 (8) 0x5d0| 00 00 00 00| ....| entsize: 0 0x5dc-0x5e3.7 (8) 0x5e0|00 00 00 00 |.... | - | | | [7]{}: section_header 0x16c-0x663.7 (1272) + | | | [9]{}: section_header 0x324-0x623.7 (768) +0x320| 1c 00 00 00 00 00 00 00 05 01 00 00| ............| data: raw bits 0x324-0x33b.7 (24) +0x330|02 00 00 00 00 00 00 00 00 00 00 00 |............ | +0x5e0| 52 00 00 00 | R... | name: ".rela.eh_frame" (82) 0x5e4-0x5e7.7 (4) +0x5e0| 04 00 00 00 | .... | type: "rela" (0x4) (Relocation entries with explicit addends) 0x5e8-0x5eb.7 (4) + | | | flags{}: 0x5ec-0x5f3.7 (8) +0x5e0| 40 | @ | link_order: false 0x5ec-0x5ec (0.1) +0x5e0| 40 | @ | info_link: true 0x5ec.1-0x5ec.1 (0.1) +0x5e0| 40 | @ | strings: false 0x5ec.2-0x5ec.2 (0.1) +0x5e0| 40 | @ | merge: false 0x5ec.3-0x5ec.3 (0.1) +0x5e0| 40 | @ | unused0: 0 0x5ec.4-0x5ec.4 (0.1) +0x5e0| 40 | @ | execinstr: false 0x5ec.5-0x5ec.5 (0.1) +0x5e0| 40 | @ | alloc: false 0x5ec.6-0x5ec.6 (0.1) +0x5e0| 40 | @ | write: false 0x5ec.7-0x5ec.7 (0.1) +0x5e0| 00 | . | tls: false 0x5ed-0x5ed (0.1) +0x5e0| 00 | . | group: false 0x5ed.1-0x5ed.1 (0.1) +0x5e0| 00 | . | os_nonconforming: false 0x5ed.2-0x5ed.2 (0.1) +0x5e0| 00 00 | .. | unused1: 0 0x5ed.3-0x5ee.3 (1.1) +0x5e0| 00 00| ..| os_specific: 0 0x5ee.4-0x5ef.3 (1) +0x5e0| 00| .| processor_specific: 0 0x5ef.4-0x5ef.7 (0.4) +0x5f0|00 00 00 00 |.... | unused2: 0 0x5f0-0x5f3.7 (4) +0x5f0| 00 00 00 00 00 00 00 00 | ........ | addr: 0x0 0x5f4-0x5fb.7 (8) +0x5f0| 90 02 00 00| ....| offset: 0x290 0x5fc-0x603.7 (8) +0x600|00 00 00 00 |.... | +0x600| 18 00 00 00 00 00 00 00 | ........ | size: 24 0x604-0x60b.7 (8) +0x600| 0a 00 00 00| ....| link: 10 0x60c-0x60f.7 (4) +0x610|08 00 00 00 |.... | info: 8 0x610-0x613.7 (4) +0x610| 08 00 00 00 00 00 00 00 | ........ | addralign: 8 0x614-0x61b.7 (8) +0x610| 18 00 00 00| ....| entsize: 24 0x61c-0x623.7 (8) +0x620|00 00 00 00 |.... | + | | | [10]{}: section_header 0x16c-0x663.7 (1272) | | | symbol_table[0:14]: 0x16c-0x2bb.7 (336) | | | [0]{}: symbol 0x16c-0x183.7 (24) 0x160| 00 00 00 00| ....| name: "" (0) 0x16c-0x16f.7 (4) @@ -431,7 +520,7 @@ $ fq -d ar dv libbbb.a 0x650| 08 00 00 00 00 00 00 00 | ........ | addralign: 8 0x654-0x65b.7 (8) 0x650| 18 00 00 00| ....| entsize: 24 0x65c-0x663.7 (8) 0x660|00 00 00 00 |.... | - | | | [8]{}: section_header 0x2bc-0x6a3.7 (1000) + | | | [11]{}: section_header 0x2bc-0x6a3.7 (1000) 0x2b0| 00 6c 69 62| .lib| string: "\x00libbbb.c\x00$d\x00$x\x00libbbb_bbb\x00puts\x00" 0x2bc-0x2db.7 (32) 0x2c0|62 62 62 2e 63 00 24 64 00 24 78 00 6c 69 62 62|bbb.c.$d.$x.libb| 0x2d0|62 62 5f 62 62 62 00 70 75 74 73 00 |bb_bbb.puts. | @@ -462,68 +551,7 @@ $ fq -d ar dv libbbb.a 0x690| 01 00 00 00 00 00 00 00 | ........ | addralign: 1 0x694-0x69b.7 (8) 0x690| 00 00 00 00| ....| entsize: 0 0x69c-0x6a3.7 (8) 0x6a0|00 00 00 00 |.... | - | | | [9]{}: section_header 0x2dc-0x463.7 (392) -0x2d0| 08 00 00 00| ....| data: raw bits 0x2dc-0x323.7 (72) -0x2e0|00 00 00 00 13 01 00 00 05 00 00 00 00 00 00 00|................| -* |until 0x323.7 (72) | | -0x420| 1b 00 00 00 | .... | name: ".rela.text" (27) 0x424-0x427.7 (4) -0x420| 04 00 00 00 | .... | type: "rela" (0x4) (Relocation entries with explicit addends) 0x428-0x42b.7 (4) - | | | flags{}: 0x42c-0x433.7 (8) -0x420| 40 | @ | link_order: false 0x42c-0x42c (0.1) -0x420| 40 | @ | info_link: true 0x42c.1-0x42c.1 (0.1) -0x420| 40 | @ | strings: false 0x42c.2-0x42c.2 (0.1) -0x420| 40 | @ | merge: false 0x42c.3-0x42c.3 (0.1) -0x420| 40 | @ | unused0: 0 0x42c.4-0x42c.4 (0.1) -0x420| 40 | @ | execinstr: false 0x42c.5-0x42c.5 (0.1) -0x420| 40 | @ | alloc: false 0x42c.6-0x42c.6 (0.1) -0x420| 40 | @ | write: false 0x42c.7-0x42c.7 (0.1) -0x420| 00 | . | tls: false 0x42d-0x42d (0.1) -0x420| 00 | . | group: false 0x42d.1-0x42d.1 (0.1) -0x420| 00 | . | os_nonconforming: false 0x42d.2-0x42d.2 (0.1) -0x420| 00 00 | .. | unused1: 0 0x42d.3-0x42e.3 (1.1) -0x420| 00 00| ..| os_specific: 0 0x42e.4-0x42f.3 (1) -0x420| 00| .| processor_specific: 0 0x42f.4-0x42f.7 (0.4) -0x430|00 00 00 00 |.... | unused2: 0 0x430-0x433.7 (4) -0x430| 00 00 00 00 00 00 00 00 | ........ | addr: 0x0 0x434-0x43b.7 (8) -0x430| 48 02 00 00| H...| offset: 0x248 0x43c-0x443.7 (8) -0x440|00 00 00 00 |.... | -0x440| 48 00 00 00 00 00 00 00 | H....... | size: 72 0x444-0x44b.7 (8) -0x440| 0a 00 00 00| ....| link: 10 0x44c-0x44f.7 (4) -0x450|01 00 00 00 |.... | info: 1 0x450-0x453.7 (4) -0x450| 08 00 00 00 00 00 00 00 | ........ | addralign: 8 0x454-0x45b.7 (8) -0x450| 18 00 00 00| ....| entsize: 24 0x45c-0x463.7 (8) -0x460|00 00 00 00 |.... | - | | | [10]{}: section_header 0x324-0x623.7 (768) -0x320| 1c 00 00 00 00 00 00 00 05 01 00 00| ............| data: raw bits 0x324-0x33b.7 (24) -0x330|02 00 00 00 00 00 00 00 00 00 00 00 |............ | -0x5e0| 52 00 00 00 | R... | name: ".rela.eh_frame" (82) 0x5e4-0x5e7.7 (4) -0x5e0| 04 00 00 00 | .... | type: "rela" (0x4) (Relocation entries with explicit addends) 0x5e8-0x5eb.7 (4) - | | | flags{}: 0x5ec-0x5f3.7 (8) -0x5e0| 40 | @ | link_order: false 0x5ec-0x5ec (0.1) -0x5e0| 40 | @ | info_link: true 0x5ec.1-0x5ec.1 (0.1) -0x5e0| 40 | @ | strings: false 0x5ec.2-0x5ec.2 (0.1) -0x5e0| 40 | @ | merge: false 0x5ec.3-0x5ec.3 (0.1) -0x5e0| 40 | @ | unused0: 0 0x5ec.4-0x5ec.4 (0.1) -0x5e0| 40 | @ | execinstr: false 0x5ec.5-0x5ec.5 (0.1) -0x5e0| 40 | @ | alloc: false 0x5ec.6-0x5ec.6 (0.1) -0x5e0| 40 | @ | write: false 0x5ec.7-0x5ec.7 (0.1) -0x5e0| 00 | . | tls: false 0x5ed-0x5ed (0.1) -0x5e0| 00 | . | group: false 0x5ed.1-0x5ed.1 (0.1) -0x5e0| 00 | . | os_nonconforming: false 0x5ed.2-0x5ed.2 (0.1) -0x5e0| 00 00 | .. | unused1: 0 0x5ed.3-0x5ee.3 (1.1) -0x5e0| 00 00| ..| os_specific: 0 0x5ee.4-0x5ef.3 (1) -0x5e0| 00| .| processor_specific: 0 0x5ef.4-0x5ef.7 (0.4) -0x5f0|00 00 00 00 |.... | unused2: 0 0x5f0-0x5f3.7 (4) -0x5f0| 00 00 00 00 00 00 00 00 | ........ | addr: 0x0 0x5f4-0x5fb.7 (8) -0x5f0| 90 02 00 00| ....| offset: 0x290 0x5fc-0x603.7 (8) -0x600|00 00 00 00 |.... | -0x600| 18 00 00 00 00 00 00 00 | ........ | size: 24 0x604-0x60b.7 (8) -0x600| 0a 00 00 00| ....| link: 10 0x60c-0x60f.7 (4) -0x610|08 00 00 00 |.... | info: 8 0x610-0x613.7 (4) -0x610| 08 00 00 00 00 00 00 00 | ........ | addralign: 8 0x614-0x61b.7 (8) -0x610| 18 00 00 00| ....| entsize: 24 0x61c-0x623.7 (8) -0x620|00 00 00 00 |.... | - | | | [11]{}: section_header 0x33c-0x6e3.7 (936) + | | | [12]{}: section_header 0x33c-0x6e3.7 (936) 0x330| 00 2e 73 79| ..sy| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.rela.text\x00.data\x00.bss\x00."... 0x33c-0x39c.7 (97) 0x340|6d 74 61 62 00 2e 73 74 72 74 61 62 00 2e 73 68|mtab..strtab..sh| * |until 0x39c.7 (97) | | @@ -554,34 +582,6 @@ $ fq -d ar dv libbbb.a 0x6d0| 01 00 00 00 00 00 00 00 | ........ | addralign: 1 0x6d4-0x6db.7 (8) 0x6d0| 00 00 00 00| ....| entsize: 0 0x6dc-0x6e3.7 (8) 0x6e0|00 00 00 00| |....| | - | | | [12]{}: section_header 0x4a4-0x4e3.7 (64) -0x4a0| 2c 00 00 00 | ,... | name: ".bss" (44) 0x4a4-0x4a7.7 (4) -0x4a0| 08 00 00 00 | .... | type: "nobits" (0x8) (No space in the file) 0x4a8-0x4ab.7 (4) - | | | flags{}: 0x4ac-0x4b3.7 (8) -0x4a0| 03 | . | link_order: false 0x4ac-0x4ac (0.1) -0x4a0| 03 | . | info_link: false 0x4ac.1-0x4ac.1 (0.1) -0x4a0| 03 | . | strings: false 0x4ac.2-0x4ac.2 (0.1) -0x4a0| 03 | . | merge: false 0x4ac.3-0x4ac.3 (0.1) -0x4a0| 03 | . | unused0: 0 0x4ac.4-0x4ac.4 (0.1) -0x4a0| 03 | . | execinstr: false 0x4ac.5-0x4ac.5 (0.1) -0x4a0| 03 | . | alloc: true 0x4ac.6-0x4ac.6 (0.1) -0x4a0| 03 | . | write: true 0x4ac.7-0x4ac.7 (0.1) -0x4a0| 00 | . | tls: false 0x4ad-0x4ad (0.1) -0x4a0| 00 | . | group: false 0x4ad.1-0x4ad.1 (0.1) -0x4a0| 00 | . | os_nonconforming: false 0x4ad.2-0x4ad.2 (0.1) -0x4a0| 00 00 | .. | unused1: 0 0x4ad.3-0x4ae.3 (1.1) -0x4a0| 00 00| ..| os_specific: 0 0x4ae.4-0x4af.3 (1) -0x4a0| 00| .| processor_specific: 0 0x4af.4-0x4af.7 (0.4) -0x4b0|00 00 00 00 |.... | unused2: 0 0x4b0-0x4b3.7 (4) -0x4b0| 00 00 00 00 00 00 00 00 | ........ | addr: 0x0 0x4b4-0x4bb.7 (8) -0x4b0| 60 00 00 00| `...| offset: 0x60 0x4bc-0x4c3.7 (8) -0x4c0|00 00 00 00 |.... | -0x4c0| 00 00 00 00 00 00 00 00 | ........ | size: 0 0x4c4-0x4cb.7 (8) -0x4c0| 00 00 00 00| ....| link: 0 0x4cc-0x4cf.7 (4) -0x4d0|00 00 00 00 |.... | info: 0 0x4d0-0x4d3.7 (4) -0x4d0| 01 00 00 00 00 00 00 00 | ........ | addralign: 1 0x4d4-0x4db.7 (8) -0x4d0| 00 00 00 00| ....| entsize: 0 0x4dc-0x4e3.7 (8) -0x4e0|00 00 00 00 |.... | 0x130| 00 00 00 | ... | unknown0: raw bits 0x131-0x133.7 (3) 0x390| 00 00 00| ...| unknown1: raw bits 0x39d-0x3a3.7 (7) 0x3a0|00 00 00 00 |.... | diff --git a/format/elf/testdata/linux_arm64/libbbb.so.fqtest b/format/elf/testdata/linux_arm64/libbbb.so.fqtest index 2014a2700..3274ed469 100644 --- a/format/elf/testdata/linux_arm64/libbbb.so.fqtest +++ b/format/elf/testdata/linux_arm64/libbbb.so.fqtest @@ -40,23 +40,7 @@ $ fq -d elf dv libbbb.so 0x0060|3c 07 00 00 00 00 00 00 |<....... | filesz: 1852 0x60-0x67.7 (8) 0x0060| 3c 07 00 00 00 00 00 00| <.......| memsz: 1852 0x68-0x6f.7 (8) 0x0070|00 00 01 00 00 00 00 00 |........ | align: 65536 0x70-0x77.7 (8) - | | | [1]{}: program_header 0x0-0x157.7 (344) - | | | program_header{}: 0x0-0x157.7 (344) - | | | data: raw bits 0x0-NA (0) -0x0120|51 e5 74 64 |Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0x120-0x123.7 (4) - | | | flags{}: 0x124-0x127.7 (4) -0x0120| 06 | . | unused0: 0 0x124-0x124.4 (0.5) -0x0120| 06 | . | r: true 0x124.5-0x124.5 (0.1) -0x0120| 06 | . | w: true 0x124.6-0x124.6 (0.1) -0x0120| 06 | . | x: false 0x124.7-0x124.7 (0.1) -0x0120| 00 00 00 | ... | unused1: 0 0x125-0x127.7 (3) -0x0120| 00 00 00 00 00 00 00 00| ........| offset: 0x0 0x128-0x12f.7 (8) -0x0130|00 00 00 00 00 00 00 00 |........ | vaddr: 0x0 0x130-0x137.7 (8) -0x0130| 00 00 00 00 00 00 00 00| ........| paddr: 0x0 0x138-0x13f.7 (8) -0x0140|00 00 00 00 00 00 00 00 |........ | filesz: 0 0x140-0x147.7 (8) -0x0140| 00 00 00 00 00 00 00 00| ........| memsz: 0 0x148-0x14f.7 (8) -0x0150|10 00 00 00 00 00 00 00 |........ | align: 16 0x150-0x157.7 (8) - | | | [2]{}: program_header 0x78-0x1007.7 (3984) + | | | [1]{}: program_header 0x78-0x1007.7 (3984) | | | program_header{}: 0x78-0x1007.7 (3984) 0x0070| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x78-0x7b.7 (4) | | | flags{}: 0x7c-0x7f.7 (4) @@ -74,7 +58,7 @@ $ fq -d elf dv libbbb.so 0x0dd0| f0 05 00 00 00 00 00 00| ........| data: raw bits 0xdd8-0x1007.7 (560) 0x0de0|90 05 00 00 00 00 00 00 01 00 00 00 00 00 00 00|................| * |until 0x1007.7 (560) | | - | | | [3]{}: program_header 0xb0-0xf97.7 (3816) + | | | [2]{}: program_header 0xb0-0xf97.7 (3816) | | | program_header{}: 0xb0-0xf97.7 (3816) 0x00b0|02 00 00 00 |.... | type: "dynamic" (2) (Dynamic linking information) 0xb0-0xb3.7 (4) | | | flags{}: 0xb4-0xb7.7 (4) @@ -92,7 +76,7 @@ $ fq -d elf dv libbbb.so 0x0de0| 01 00 00 00 00 00 00 00| ........| data: raw bits 0xde8-0xf97.7 (432) 0x0df0|90 00 00 00 00 00 00 00 0c 00 00 00 00 00 00 00|................| * |until 0xf97.7 (432) | | - | | | [4]{}: program_header 0xe8-0x697.7 (1456) + | | | [3]{}: program_header 0xe8-0x697.7 (1456) | | | program_header{}: 0xe8-0x697.7 (1456) 0x00e0| 50 e5 74 64 | P.td | type: "gnu_eh_frame" (1685382480) (GNU frame unwind information) 0xe8-0xeb.7 (4) | | | flags{}: 0xec-0xef.7 (4) @@ -110,6 +94,22 @@ $ fq -d elf dv libbbb.so 0x0660| 01 1b 03 3b 30 00 00 00 05 00 00 00| ...;0.......| data: raw bits 0x664-0x697.7 (52) 0x0670|bc fe ff ff 48 00 00 00 ec fe ff ff 5c 00 00 00|....H.......\...| * |until 0x697.7 (52) | | + | | | [4]{}: program_header 0x0-0x157.7 (344) + | | | program_header{}: 0x0-0x157.7 (344) + | | | data: raw bits 0x0-NA (0) +0x0120|51 e5 74 64 |Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0x120-0x123.7 (4) + | | | flags{}: 0x124-0x127.7 (4) +0x0120| 06 | . | unused0: 0 0x124-0x124.4 (0.5) +0x0120| 06 | . | r: true 0x124.5-0x124.5 (0.1) +0x0120| 06 | . | w: true 0x124.6-0x124.6 (0.1) +0x0120| 06 | . | x: false 0x124.7-0x124.7 (0.1) +0x0120| 00 00 00 | ... | unused1: 0 0x125-0x127.7 (3) +0x0120| 00 00 00 00 00 00 00 00| ........| offset: 0x0 0x128-0x12f.7 (8) +0x0130|00 00 00 00 00 00 00 00 |........ | vaddr: 0x0 0x130-0x137.7 (8) +0x0130| 00 00 00 00 00 00 00 00| ........| paddr: 0x0 0x138-0x13f.7 (8) +0x0140|00 00 00 00 00 00 00 00 |........ | filesz: 0 0x140-0x147.7 (8) +0x0140| 00 00 00 00 00 00 00 00| ........| memsz: 0 0x148-0x14f.7 (8) +0x0150|10 00 00 00 00 00 00 00 |........ | align: 16 0x150-0x157.7 (8) | | | [5]{}: program_header 0x158-0xfff.7 (3752) | | | program_header{}: 0x158-0xfff.7 (3752) 0x0150| 52 e5 74 64 | R.td | type: "gnu_relro" (1685382482) (GNU read-only after relocation) 0x158-0x15b.7 (4) @@ -828,7 +828,33 @@ $ fq -d elf dv libbbb.so 0x2090| 00 00 00 00 | .... | info: 0 0x2094-0x2097.7 (4) 0x2090| 08 00 00 00 00 00 00 00| ........| addralign: 8 0x2098-0x209f.7 (8) 0x20a0|00 00 00 00 00 00 00 00 |........ | entsize: 0 0x20a0-0x20a7.7 (8) - | | | [18]{}: section_header 0x1008-0x2127.7 (4384) + | | | [18]{}: section_header 0x20a8-0x20e7.7 (64) +0x20a0| a7 00 00 00 | .... | name: ".bss" (167) 0x20a8-0x20ab.7 (4) +0x20a0| 08 00 00 00| ....| type: "nobits" (0x8) (No space in the file) 0x20ac-0x20af.7 (4) + | | | flags{}: 0x20b0-0x20b7.7 (8) +0x20b0|03 |. | link_order: false 0x20b0-0x20b0 (0.1) +0x20b0|03 |. | info_link: false 0x20b0.1-0x20b0.1 (0.1) +0x20b0|03 |. | strings: false 0x20b0.2-0x20b0.2 (0.1) +0x20b0|03 |. | merge: false 0x20b0.3-0x20b0.3 (0.1) +0x20b0|03 |. | unused0: 0 0x20b0.4-0x20b0.4 (0.1) +0x20b0|03 |. | execinstr: false 0x20b0.5-0x20b0.5 (0.1) +0x20b0|03 |. | alloc: true 0x20b0.6-0x20b0.6 (0.1) +0x20b0|03 |. | write: true 0x20b0.7-0x20b0.7 (0.1) +0x20b0| 00 | . | tls: false 0x20b1-0x20b1 (0.1) +0x20b0| 00 | . | group: false 0x20b1.1-0x20b1.1 (0.1) +0x20b0| 00 | . | os_nonconforming: false 0x20b1.2-0x20b1.2 (0.1) +0x20b0| 00 00 | .. | unused1: 0 0x20b1.3-0x20b2.3 (1.1) +0x20b0| 00 00 | .. | os_specific: 0 0x20b2.4-0x20b3.3 (1) +0x20b0| 00 | . | processor_specific: 0 0x20b3.4-0x20b3.7 (0.4) +0x20b0| 00 00 00 00 | .... | unused2: 0 0x20b4-0x20b7.7 (4) +0x20b0| 08 10 01 00 00 00 00 00| ........| addr: 0x11008 0x20b8-0x20bf.7 (8) +0x20c0|08 10 00 00 00 00 00 00 |........ | offset: 0x1008 0x20c0-0x20c7.7 (8) +0x20c0| 38 00 00 00 00 00 00 00| 8.......| size: 56 0x20c8-0x20cf.7 (8) +0x20d0|00 00 00 00 |.... | link: 0 0x20d0-0x20d3.7 (4) +0x20d0| 00 00 00 00 | .... | info: 0 0x20d4-0x20d7.7 (4) +0x20d0| 08 00 00 00 00 00 00 00| ........| addralign: 8 0x20d8-0x20df.7 (8) +0x20e0|00 00 00 00 00 00 00 00 |........ | entsize: 0 0x20e0-0x20e7.7 (8) + | | | [19]{}: section_header 0x1008-0x2127.7 (4384) 0x1000| 47 43 43 3a 20 28 41 6c| GCC: (Al| data: raw bits 0x1008-0x1038.7 (49) 0x1010|70 69 6e 65 20 31 30 2e 33 2e 31 5f 67 69 74 32|pine 10.3.1_git2| * |until 0x1038.7 (49) | | @@ -857,7 +883,7 @@ $ fq -d elf dv libbbb.so 0x2110| 00 00 00 00 | .... | info: 0 0x2114-0x2117.7 (4) 0x2110| 01 00 00 00 00 00 00 00| ........| addralign: 1 0x2118-0x211f.7 (8) 0x2120|01 00 00 00 00 00 00 00 |........ | entsize: 1 0x2120-0x2127.7 (8) - | | | [19]{}: section_header 0x1040-0x2167.7 (4392) + | | | [20]{}: section_header 0x1040-0x2167.7 (4392) 0x1040|3c 00 00 00 02 00 00 00 00 00 08 00 00 00 00 00|<...............| data: raw bits 0x1040-0x10bf.7 (128) * |until 0x10bf.7 (128) | | 0x2120| b5 00 00 00 | .... | name: ".debug_aranges" (181) 0x2128-0x212b.7 (4) @@ -885,7 +911,7 @@ $ fq -d elf dv libbbb.so 0x2150| 00 00 00 00 | .... | info: 0 0x2154-0x2157.7 (4) 0x2150| 10 00 00 00 00 00 00 00| ........| addralign: 16 0x2158-0x215f.7 (8) 0x2160|00 00 00 00 00 00 00 00 |........ | entsize: 0 0x2160-0x2167.7 (8) - | | | [20]{}: section_header 0x10c0-0x21a7.7 (4328) + | | | [21]{}: section_header 0x10c0-0x21a7.7 (4328) 0x10c0|1e 00 00 00 02 00 00 00 00 00 08 01 00 00 00 00|................| data: raw bits 0x10c0-0x1103.7 (68) * |until 0x1103.7 (68) | | 0x2160| c4 00 00 00 | .... | name: ".debug_info" (196) 0x2168-0x216b.7 (4) @@ -913,7 +939,7 @@ $ fq -d elf dv libbbb.so 0x2190| 00 00 00 00 | .... | info: 0 0x2194-0x2197.7 (4) 0x2190| 01 00 00 00 00 00 00 00| ........| addralign: 1 0x2198-0x219f.7 (8) 0x21a0|00 00 00 00 00 00 00 00 |........ | entsize: 0 0x21a0-0x21a7.7 (8) - | | | [21]{}: section_header 0x1104-0x21e7.7 (4324) + | | | [22]{}: section_header 0x1104-0x21e7.7 (4324) 0x1100| 01 11 00 10 06 55 06 03 0e 1b 0e 25| .....U.....%| data: raw bits 0x1104-0x1127.7 (36) 0x1110|0e 13 05 00 00 00 01 11 00 10 06 55 06 03 0e 1b|...........U....| 0x1120|0e 25 0e 13 05 00 00 00 |.%...... | @@ -942,7 +968,7 @@ $ fq -d elf dv libbbb.so 0x21d0| 00 00 00 00 | .... | info: 0 0x21d4-0x21d7.7 (4) 0x21d0| 01 00 00 00 00 00 00 00| ........| addralign: 1 0x21d8-0x21df.7 (8) 0x21e0|00 00 00 00 00 00 00 00 |........ | entsize: 0 0x21e0-0x21e7.7 (8) - | | | [22]{}: section_header 0x1128-0x2227.7 (4352) + | | | [23]{}: section_header 0x1128-0x2227.7 (4352) 0x1120| 55 00 00 00 03 00 29 00| U.....).| data: raw bits 0x1128-0x11d7.7 (176) 0x1130|00 00 04 01 fb 0e 0d 00 01 01 01 01 00 00 00 01|................| * |until 0x11d7.7 (176) | | @@ -971,7 +997,7 @@ $ fq -d elf dv libbbb.so 0x2210| 00 00 00 00 | .... | info: 0 0x2214-0x2217.7 (4) 0x2210| 01 00 00 00 00 00 00 00| ........| addralign: 1 0x2218-0x221f.7 (8) 0x2220|00 00 00 00 00 00 00 00 |........ | entsize: 0 0x2220-0x2227.7 (8) - | | | [23]{}: section_header 0x11d8-0x2267.7 (4240) + | | | [24]{}: section_header 0x11d8-0x2267.7 (4240) 0x11d0| 63 72 74 2f 61 61 72 63| crt/aarc| data: raw bits 0x11d8-0x1235.7 (94) 0x11e0|68 36 34 2f 63 72 74 69 2e 73 00 2f 68 6f 6d 65|h64/crti.s./home| * |until 0x1235.7 (94) | | @@ -1000,7 +1026,7 @@ $ fq -d elf dv libbbb.so 0x2250| 00 00 00 00 | .... | info: 0 0x2254-0x2257.7 (4) 0x2250| 01 00 00 00 00 00 00 00| ........| addralign: 1 0x2258-0x225f.7 (8) 0x2260|01 00 00 00 00 00 00 00 |........ | entsize: 1 0x2260-0x2267.7 (8) - | | | [24]{}: section_header 0x1240-0x22a7.7 (4200) + | | | [25]{}: section_header 0x1240-0x22a7.7 (4200) 0x1240|ff ff ff ff ff ff ff ff 00 00 00 00 00 00 00 00|................| data: raw bits 0x1240-0x12bf.7 (128) * |until 0x12bf.7 (128) | | 0x2260| f5 00 00 00 | .... | name: ".debug_ranges" (245) 0x2268-0x226b.7 (4) @@ -1028,7 +1054,7 @@ $ fq -d elf dv libbbb.so 0x2290| 00 00 00 00 | .... | info: 0 0x2294-0x2297.7 (4) 0x2290| 10 00 00 00 00 00 00 00| ........| addralign: 16 0x2298-0x229f.7 (8) 0x22a0|00 00 00 00 00 00 00 00 |........ | entsize: 0 0x22a0-0x22a7.7 (8) - | | | [25]{}: section_header 0x12c0-0x22e7.7 (4136) + | | | [26]{}: section_header 0x12c0-0x22e7.7 (4136) | | | symbol_table[0:71]: 0x12c0-0x1967.7 (1704) | | | [0]{}: symbol 0x12c0-0x12d7.7 (24) 0x12c0|00 00 00 00 |.... | name: "" (0) 0x12c0-0x12c3.7 (4) @@ -1694,7 +1720,7 @@ $ fq -d elf dv libbbb.so 0x22d0| 3e 00 00 00 | >... | info: 62 0x22d4-0x22d7.7 (4) 0x22d0| 08 00 00 00 00 00 00 00| ........| addralign: 8 0x22d8-0x22df.7 (8) 0x22e0|18 00 00 00 00 00 00 00 |........ | entsize: 24 0x22e0-0x22e7.7 (8) - | | | [26]{}: section_header 0x1968-0x2327.7 (2496) + | | | [27]{}: section_header 0x1968-0x2327.7 (2496) 0x1960| 00 63 72 74 69 2e 6f 00| .crti.o.| string: "\x00crti.o\x00$x\x00crtn.o\x00crtstuff.c\x00$d\x00__EH_FRAME_BEGIN__"... 0x1968-0x1b1d.7 (438) 0x1970|24 78 00 63 72 74 6e 2e 6f 00 63 72 74 73 74 75|$x.crtn.o.crtstu| * |until 0x1b1d.7 (438) | | @@ -1723,7 +1749,7 @@ $ fq -d elf dv libbbb.so 0x2310| 00 00 00 00 | .... | info: 0 0x2314-0x2317.7 (4) 0x2310| 01 00 00 00 00 00 00 00| ........| addralign: 1 0x2318-0x231f.7 (8) 0x2320|00 00 00 00 00 00 00 00 |........ | entsize: 0 0x2320-0x2327.7 (8) - | | | [27]{}: section_header 0x1b1e-0x2367.7 (2122) + | | | [28]{}: section_header 0x1b1e-0x2367.7 (2122) 0x1b10| 00 2e| ..| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.gnu.hash\x00.dynsym\x00.dyns"... 0x1b1e-0x1c20.7 (259) 0x1b20|73 79 6d 74 61 62 00 2e 73 74 72 74 61 62 00 2e|symtab..strtab..| * |until 0x1c20.7 (259) | | @@ -1752,32 +1778,6 @@ $ fq -d elf dv libbbb.so 0x2350| 00 00 00 00 | .... | info: 0 0x2354-0x2357.7 (4) 0x2350| 01 00 00 00 00 00 00 00| ........| addralign: 1 0x2358-0x235f.7 (8) 0x2360|00 00 00 00 00 00 00 00| |........| | entsize: 0 0x2360-0x2367.7 (8) - | | | [28]{}: section_header 0x20a8-0x20e7.7 (64) -0x20a0| a7 00 00 00 | .... | name: ".bss" (167) 0x20a8-0x20ab.7 (4) -0x20a0| 08 00 00 00| ....| type: "nobits" (0x8) (No space in the file) 0x20ac-0x20af.7 (4) - | | | flags{}: 0x20b0-0x20b7.7 (8) -0x20b0|03 |. | link_order: false 0x20b0-0x20b0 (0.1) -0x20b0|03 |. | info_link: false 0x20b0.1-0x20b0.1 (0.1) -0x20b0|03 |. | strings: false 0x20b0.2-0x20b0.2 (0.1) -0x20b0|03 |. | merge: false 0x20b0.3-0x20b0.3 (0.1) -0x20b0|03 |. | unused0: 0 0x20b0.4-0x20b0.4 (0.1) -0x20b0|03 |. | execinstr: false 0x20b0.5-0x20b0.5 (0.1) -0x20b0|03 |. | alloc: true 0x20b0.6-0x20b0.6 (0.1) -0x20b0|03 |. | write: true 0x20b0.7-0x20b0.7 (0.1) -0x20b0| 00 | . | tls: false 0x20b1-0x20b1 (0.1) -0x20b0| 00 | . | group: false 0x20b1.1-0x20b1.1 (0.1) -0x20b0| 00 | . | os_nonconforming: false 0x20b1.2-0x20b1.2 (0.1) -0x20b0| 00 00 | .. | unused1: 0 0x20b1.3-0x20b2.3 (1.1) -0x20b0| 00 00 | .. | os_specific: 0 0x20b2.4-0x20b3.3 (1) -0x20b0| 00 | . | processor_specific: 0 0x20b3.4-0x20b3.7 (0.4) -0x20b0| 00 00 00 00 | .... | unused2: 0 0x20b4-0x20b7.7 (4) -0x20b0| 08 10 01 00 00 00 00 00| ........| addr: 0x11008 0x20b8-0x20bf.7 (8) -0x20c0|08 10 00 00 00 00 00 00 |........ | offset: 0x1008 0x20c0-0x20c7.7 (8) -0x20c0| 38 00 00 00 00 00 00 00| 8.......| size: 56 0x20c8-0x20cf.7 (8) -0x20d0|00 00 00 00 |.... | link: 0 0x20d0-0x20d3.7 (4) -0x20d0| 00 00 00 00 | .... | info: 0 0x20d4-0x20d7.7 (4) -0x20d0| 08 00 00 00 00 00 00 00| ........| addralign: 8 0x20d8-0x20df.7 (8) -0x20e0|00 00 00 00 00 00 00 00 |........ | entsize: 0 0x20e0-0x20e7.7 (8) 0x0730| 00 00 00 00| ....| unknown0: raw bits 0x73c-0xdd7.7 (1692) 0x0740|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................| * |until 0xdd7.7 (1692) | | diff --git a/format/elf/testdata/linux_arm_v6/a_dynamic.fqtest b/format/elf/testdata/linux_arm_v6/a_dynamic.fqtest index 2d51b34bd..5960966cf 100644 --- a/format/elf/testdata/linux_arm_v6/a_dynamic.fqtest +++ b/format/elf/testdata/linux_arm_v6/a_dynamic.fqtest @@ -23,40 +23,7 @@ $ fq -d elf dv a_dynamic 0x0030|20 00 | . | shnum: 32 0x30-0x31.7 (2) 0x0030| 1f 00 | .. | shstrndx: 31 0x32-0x33.7 (2) | | | program_headers[0:7]: 0x0-0x1003.7 (4100) - | | | [0]{}: program_header 0x0-0x73b.7 (1852) - | | | program_header{}: 0x0-0x73b.7 (1852) -0x0000|7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00|.ELF............| data: raw bits 0x0-0x73b.7 (1852) -* |until 0x73b.7 (1852) | | -0x0070| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x74-0x77.7 (4) -0x0070| 00 00 00 00 | .... | offset: 0x0 0x78-0x7b.7 (4) -0x0070| 00 00 00 00| ....| vaddr: 0x0 0x7c-0x7f.7 (4) -0x0080|00 00 00 00 |.... | paddr: 0x0 0x80-0x83.7 (4) -0x0080| 3c 07 00 00 | <... | filesz: 1852 0x84-0x87.7 (4) -0x0080| 3c 07 00 00 | <... | memsz: 1852 0x88-0x8b.7 (4) - | | | flags{}: 0x8c-0x8f.7 (4) -0x0080| 05 | . | unused0: 0 0x8c-0x8c.4 (0.5) -0x0080| 05 | . | r: true 0x8c.5-0x8c.5 (0.1) -0x0080| 05 | . | w: false 0x8c.6-0x8c.6 (0.1) -0x0080| 05 | . | x: true 0x8c.7-0x8c.7 (0.1) -0x0080| 00 00 00| ...| unused1: 0 0x8d-0x8f.7 (3) -0x0090|00 00 01 00 |.... | align: 65536 0x90-0x93.7 (4) - | | | [1]{}: program_header 0x0-0xf3.7 (244) - | | | program_header{}: 0x0-0xf3.7 (244) - | | | data: raw bits 0x0-NA (0) -0x00d0| 51 e5 74 64 | Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0xd4-0xd7.7 (4) -0x00d0| 00 00 00 00 | .... | offset: 0x0 0xd8-0xdb.7 (4) -0x00d0| 00 00 00 00| ....| vaddr: 0x0 0xdc-0xdf.7 (4) -0x00e0|00 00 00 00 |.... | paddr: 0x0 0xe0-0xe3.7 (4) -0x00e0| 00 00 00 00 | .... | filesz: 0 0xe4-0xe7.7 (4) -0x00e0| 00 00 00 00 | .... | memsz: 0 0xe8-0xeb.7 (4) - | | | flags{}: 0xec-0xef.7 (4) -0x00e0| 06 | . | unused0: 0 0xec-0xec.4 (0.5) -0x00e0| 06 | . | r: true 0xec.5-0xec.5 (0.1) -0x00e0| 06 | . | w: true 0xec.6-0xec.6 (0.1) -0x00e0| 06 | . | x: false 0xec.7-0xec.7 (0.1) -0x00e0| 00 00 00| ...| unused1: 0 0xed-0xef.7 (3) -0x00f0|10 00 00 00 |.... | align: 16 0xf0-0xf3.7 (4) - | | | [2]{}: program_header 0x34-0x113.7 (224) + | | | [0]{}: program_header 0x34-0x113.7 (224) | | | program_header{}: 0x34-0x113.7 (224) 0x0030| 06 00 00 00 | .... | type: "phdr" (6) (Program header location and size) 0x34-0x37.7 (4) 0x0030| 06 00 00 00 34 00 00 00 34 00 00 00| ....4...4...| data: raw bits 0x34-0x113.7 (224) @@ -74,7 +41,7 @@ $ fq -d elf dv a_dynamic 0x0040| 04 | . | x: false 0x4c.7-0x4c.7 (0.1) 0x0040| 00 00 00| ...| unused1: 0 0x4d-0x4f.7 (3) 0x0050|04 00 00 00 |.... | align: 4 0x50-0x53.7 (4) - | | | [3]{}: program_header 0x54-0x12b.7 (216) + | | | [1]{}: program_header 0x54-0x12b.7 (216) | | | program_header{}: 0x54-0x12b.7 (216) 0x0050| 03 00 00 00 | .... | type: "interp" (3) (Interpreter to invoke) 0x54-0x57.7 (4) 0x0050| 14 01 00 00 | .... | offset: 0x114 0x58-0x5b.7 (4) @@ -91,7 +58,24 @@ $ fq -d elf dv a_dynamic 0x0070|01 00 00 00 |.... | align: 1 0x70-0x73.7 (4) 0x0110| 2f 6c 69 62 2f 6c 64 2d 6d 75 73 6c| /lib/ld-musl| data: raw bits 0x114-0x12b.7 (24) 0x0120|2d 61 72 6d 68 66 2e 73 6f 2e 31 00 |-armhf.so.1. | - | | | [4]{}: program_header 0x94-0x1003.7 (3952) + | | | [2]{}: program_header 0x0-0x73b.7 (1852) + | | | program_header{}: 0x0-0x73b.7 (1852) +0x0000|7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00|.ELF............| data: raw bits 0x0-0x73b.7 (1852) +* |until 0x73b.7 (1852) | | +0x0070| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x74-0x77.7 (4) +0x0070| 00 00 00 00 | .... | offset: 0x0 0x78-0x7b.7 (4) +0x0070| 00 00 00 00| ....| vaddr: 0x0 0x7c-0x7f.7 (4) +0x0080|00 00 00 00 |.... | paddr: 0x0 0x80-0x83.7 (4) +0x0080| 3c 07 00 00 | <... | filesz: 1852 0x84-0x87.7 (4) +0x0080| 3c 07 00 00 | <... | memsz: 1852 0x88-0x8b.7 (4) + | | | flags{}: 0x8c-0x8f.7 (4) +0x0080| 05 | . | unused0: 0 0x8c-0x8c.4 (0.5) +0x0080| 05 | . | r: true 0x8c.5-0x8c.5 (0.1) +0x0080| 05 | . | w: false 0x8c.6-0x8c.6 (0.1) +0x0080| 05 | . | x: true 0x8c.7-0x8c.7 (0.1) +0x0080| 00 00 00| ...| unused1: 0 0x8d-0x8f.7 (3) +0x0090|00 00 01 00 |.... | align: 65536 0x90-0x93.7 (4) + | | | [3]{}: program_header 0x94-0x1003.7 (3952) | | | program_header{}: 0x94-0x1003.7 (3952) 0x0090| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x94-0x97.7 (4) 0x0090| cc 0e 00 00 | .... | offset: 0xecc 0x98-0x9b.7 (4) @@ -109,7 +93,7 @@ $ fq -d elf dv a_dynamic 0x0ec0| 7c 05 00 00| |...| data: raw bits 0xecc-0x1003.7 (312) 0x0ed0|f0 04 00 00 01 00 00 00 a2 00 00 00 01 00 00 00|................| * |until 0x1003.7 (312) | | - | | | [5]{}: program_header 0xb4-0xfbb.7 (3848) + | | | [4]{}: program_header 0xb4-0xfbb.7 (3848) | | | program_header{}: 0xb4-0xfbb.7 (3848) 0x00b0| 02 00 00 00 | .... | type: "dynamic" (2) (Dynamic linking information) 0xb4-0xb7.7 (4) 0x00b0| d4 0e 00 00 | .... | offset: 0xed4 0xb8-0xbb.7 (4) @@ -127,6 +111,22 @@ $ fq -d elf dv a_dynamic 0x0ed0| 01 00 00 00 a2 00 00 00 01 00 00 00| ............| data: raw bits 0xed4-0xfbb.7 (232) 0x0ee0|ac 00 00 00 0c 00 00 00 6c 03 00 00 0d 00 00 00|........l.......| * |until 0xfbb.7 (232) | | + | | | [5]{}: program_header 0x0-0xf3.7 (244) + | | | program_header{}: 0x0-0xf3.7 (244) + | | | data: raw bits 0x0-NA (0) +0x00d0| 51 e5 74 64 | Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0xd4-0xd7.7 (4) +0x00d0| 00 00 00 00 | .... | offset: 0x0 0xd8-0xdb.7 (4) +0x00d0| 00 00 00 00| ....| vaddr: 0x0 0xdc-0xdf.7 (4) +0x00e0|00 00 00 00 |.... | paddr: 0x0 0xe0-0xe3.7 (4) +0x00e0| 00 00 00 00 | .... | filesz: 0 0xe4-0xe7.7 (4) +0x00e0| 00 00 00 00 | .... | memsz: 0 0xe8-0xeb.7 (4) + | | | flags{}: 0xec-0xef.7 (4) +0x00e0| 06 | . | unused0: 0 0xec-0xec.4 (0.5) +0x00e0| 06 | . | r: true 0xec.5-0xec.5 (0.1) +0x00e0| 06 | . | w: true 0xec.6-0xec.6 (0.1) +0x00e0| 06 | . | x: false 0xec.7-0xec.7 (0.1) +0x00e0| 00 00 00| ...| unused1: 0 0xed-0xef.7 (3) +0x00f0|10 00 00 00 |.... | align: 16 0xf0-0xf3.7 (4) | | | [6]{}: program_header 0xf4-0xfff.7 (3852) | | | program_header{}: 0xf4-0xfff.7 (3852) 0x00f0| 52 e5 74 64 | R.td | type: "gnu_relro" (1685382482) (GNU read-only after relocation) 0xf4-0xf7.7 (4) @@ -840,7 +840,32 @@ $ fq -d elf dv a_dynamic 0x2350| 00 00 00 00 | .... | info: 0 0x2358-0x235b.7 (4) 0x2350| 04 00 00 00| ....| addralign: 4 0x235c-0x235f.7 (4) 0x2360|00 00 00 00 |.... | entsize: 0 0x2360-0x2363.7 (4) - | | | [18]{}: section_header 0x1004-0x23b3.7 (5040) + | | | [18]{}: section_header 0x2364-0x238b.7 (40) +0x2360| 9f 00 00 00 | .... | name: ".bss" (159) 0x2364-0x2367.7 (4) +0x2360| 08 00 00 00 | .... | type: "nobits" (0x8) (No space in the file) 0x2368-0x236b.7 (4) + | | | flags{}: 0x236c-0x236f.7 (4) +0x2360| 03 | . | link_order: false 0x236c-0x236c (0.1) +0x2360| 03 | . | info_link: false 0x236c.1-0x236c.1 (0.1) +0x2360| 03 | . | strings: false 0x236c.2-0x236c.2 (0.1) +0x2360| 03 | . | merge: false 0x236c.3-0x236c.3 (0.1) +0x2360| 03 | . | unused0: 0 0x236c.4-0x236c.4 (0.1) +0x2360| 03 | . | execinstr: false 0x236c.5-0x236c.5 (0.1) +0x2360| 03 | . | alloc: true 0x236c.6-0x236c.6 (0.1) +0x2360| 03 | . | write: true 0x236c.7-0x236c.7 (0.1) +0x2360| 00 | . | tls: false 0x236d-0x236d (0.1) +0x2360| 00 | . | group: false 0x236d.1-0x236d.1 (0.1) +0x2360| 00 | . | os_nonconforming: false 0x236d.2-0x236d.2 (0.1) +0x2360| 00 00 | .. | unused1: 0 0x236d.3-0x236e.3 (1.1) +0x2360| 00 00| ..| os_specific: 0 0x236e.4-0x236f.3 (1) +0x2360| 00| .| processor_specific: 0 0x236f.4-0x236f.7 (0.4) +0x2370|04 10 01 00 |.... | addr: 0x11004 0x2370-0x2373.7 (4) +0x2370| 04 10 00 00 | .... | offset: 4100 0x2374-0x2377.7 (4) +0x2370| 1c 00 00 00 | .... | size: 0x1c 0x2378-0x237b.7 (4) +0x2370| 00 00 00 00| ....| link: 0 0x237c-0x237f.7 (4) +0x2380|00 00 00 00 |.... | info: 0 0x2380-0x2383.7 (4) +0x2380| 04 00 00 00 | .... | addralign: 4 0x2384-0x2387.7 (4) +0x2380| 00 00 00 00 | .... | entsize: 0 0x2388-0x238b.7 (4) + | | | [19]{}: section_header 0x1004-0x23b3.7 (5040) 0x1000| 47 43 43 3a 20 28 41 6c 70 69 6e 65| GCC: (Alpine| data: raw bits 0x1004-0x1065.7 (98) 0x1010|20 31 30 2e 33 2e 31 5f 67 69 74 32 30 32 31 30| 10.3.1_git20210| * |until 0x1065.7 (98) | | @@ -868,7 +893,7 @@ $ fq -d elf dv a_dynamic 0x23a0| 00 00 00 00 | .... | info: 0 0x23a8-0x23ab.7 (4) 0x23a0| 01 00 00 00| ....| addralign: 1 0x23ac-0x23af.7 (4) 0x23b0|01 00 00 00 |.... | entsize: 1 0x23b0-0x23b3.7 (4) - | | | [19]{}: section_header 0x1066-0x23db.7 (4982) + | | | [20]{}: section_header 0x1066-0x23db.7 (4982) 0x1060| 41 32 00 00 00 61 65 61 62 69| A2...aeabi| data: raw bits 0x1066-0x1098.7 (51) 0x1070|00 01 28 00 00 00 05 36 5a 4b 00 06 07 08 01 09|..(....6ZK......| * |until 0x1098.7 (51) | | @@ -896,7 +921,7 @@ $ fq -d elf dv a_dynamic 0x23d0|00 00 00 00 |.... | info: 0 0x23d0-0x23d3.7 (4) 0x23d0| 01 00 00 00 | .... | addralign: 1 0x23d4-0x23d7.7 (4) 0x23d0| 00 00 00 00 | .... | entsize: 0 0x23d8-0x23db.7 (4) - | | | [20]{}: section_header 0x10a0-0x2403.7 (4964) + | | | [21]{}: section_header 0x10a0-0x2403.7 (4964) 0x10a0|1c 00 00 00 02 00 00 00 00 00 04 00 00 00 00 00|................| data: raw bits 0x10a0-0x110f.7 (112) * |until 0x110f.7 (112) | | 0x23d0| bd 00 00 00| ....| name: ".debug_aranges" (189) 0x23dc-0x23df.7 (4) @@ -923,7 +948,7 @@ $ fq -d elf dv a_dynamic 0x23f0| 00 00 00 00 | .... | info: 0 0x23f8-0x23fb.7 (4) 0x23f0| 08 00 00 00| ....| addralign: 8 0x23fc-0x23ff.7 (4) 0x2400|00 00 00 00 |.... | entsize: 0 0x2400-0x2403.7 (4) - | | | [21]{}: section_header 0x1110-0x242b.7 (4892) + | | | [22]{}: section_header 0x1110-0x242b.7 (4892) 0x1110|e9 00 00 00 04 00 00 00 00 00 04 01 6b 00 00 00|............k...| data: raw bits 0x1110-0x1240.7 (305) * |until 0x1240.7 (305) | | 0x2400| cc 00 00 00 | .... | name: ".debug_info" (204) 0x2404-0x2407.7 (4) @@ -950,7 +975,7 @@ $ fq -d elf dv a_dynamic 0x2420|00 00 00 00 |.... | info: 0 0x2420-0x2423.7 (4) 0x2420| 01 00 00 00 | .... | addralign: 1 0x2424-0x2427.7 (4) 0x2420| 00 00 00 00 | .... | entsize: 0 0x2428-0x242b.7 (4) - | | | [22]{}: section_header 0x1241-0x2453.7 (4627) + | | | [23]{}: section_header 0x1241-0x2453.7 (4627) 0x1240| 01 11 01 25 0e 13 0b 03 0e 1b 0e 55 17 11 01| ...%.......U...| data: raw bits 0x1241-0x1305.7 (197) 0x1250|10 17 00 00 02 24 00 0b 0b 3e 0b 03 0e 00 00 03|.....$...>......| * |until 0x1305.7 (197) | | @@ -978,7 +1003,7 @@ $ fq -d elf dv a_dynamic 0x2440| 00 00 00 00 | .... | info: 0 0x2448-0x244b.7 (4) 0x2440| 01 00 00 00| ....| addralign: 1 0x244c-0x244f.7 (4) 0x2450|00 00 00 00 |.... | entsize: 0 0x2450-0x2453.7 (4) - | | | [23]{}: section_header 0x1306-0x247b.7 (4470) + | | | [24]{}: section_header 0x1306-0x247b.7 (4470) 0x1300| 51 00 00 00 03 00 21 00 00 00| Q.....!...| data: raw bits 0x1306-0x13f0.7 (235) 0x1310|02 01 fb 0e 0d 00 01 01 01 01 00 00 00 01 00 00|................| * |until 0x13f0.7 (235) | | @@ -1006,7 +1031,7 @@ $ fq -d elf dv a_dynamic 0x2470|00 00 00 00 |.... | info: 0 0x2470-0x2473.7 (4) 0x2470| 01 00 00 00 | .... | addralign: 1 0x2474-0x2477.7 (4) 0x2470| 00 00 00 00 | .... | entsize: 0 0x2478-0x247b.7 (4) - | | | [24]{}: section_header 0x13f4-0x24a3.7 (4272) + | | | [25]{}: section_header 0x13f4-0x24a3.7 (4272) 0x13f0| 0c 00 00 00 ff ff ff ff 01 00 02 7c| ...........|| data: raw bits 0x13f4-0x141b.7 (40) 0x1400|0e 0c 0d 00 14 00 00 00 00 00 00 00 f8 03 00 00|................| 0x1410|64 00 00 00 42 0e 18 8e 01 66 0e 04 |d...B....f.. | @@ -1034,7 +1059,7 @@ $ fq -d elf dv a_dynamic 0x2490| 00 00 00 00 | .... | info: 0 0x2498-0x249b.7 (4) 0x2490| 04 00 00 00| ....| addralign: 4 0x249c-0x249f.7 (4) 0x24a0|00 00 00 00 |.... | entsize: 0 0x24a0-0x24a3.7 (4) - | | | [25]{}: section_header 0x141c-0x24cb.7 (4272) + | | | [26]{}: section_header 0x141c-0x24cb.7 (4272) 0x1410| 75 6e 73 69| unsi| data: raw bits 0x141c-0x162c.7 (529) 0x1420|67 6e 65 64 20 69 6e 74 00 63 72 74 2f 53 63 72|gned int.crt/Scr| * |until 0x162c.7 (529) | | @@ -1062,7 +1087,7 @@ $ fq -d elf dv a_dynamic 0x24c0|00 00 00 00 |.... | info: 0 0x24c0-0x24c3.7 (4) 0x24c0| 01 00 00 00 | .... | addralign: 1 0x24c4-0x24c7.7 (4) 0x24c0| 01 00 00 00 | .... | entsize: 1 0x24c8-0x24cb.7 (4) - | | | [26]{}: section_header 0x162d-0x24f3.7 (3783) + | | | [27]{}: section_header 0x162d-0x24f3.7 (3783) 0x1620| 00 00 00| ...| data: raw bits 0x162d-0x16ac.7 (128) 0x1630|00 00 00 f8 03 00 00 40 04 00 00 01 00 50 40 04|.......@.....P@.| * |until 0x16ac.7 (128) | | @@ -1090,7 +1115,7 @@ $ fq -d elf dv a_dynamic 0x24e0| 00 00 00 00 | .... | info: 0 0x24e8-0x24eb.7 (4) 0x24e0| 01 00 00 00| ....| addralign: 1 0x24ec-0x24ef.7 (4) 0x24f0|00 00 00 00 |.... | entsize: 0 0x24f0-0x24f3.7 (4) - | | | [27]{}: section_header 0x16b0-0x251b.7 (3692) + | | | [28]{}: section_header 0x16b0-0x251b.7 (3692) 0x16b0|f8 03 00 00 5c 04 00 00 00 00 00 00 00 00 00 00|....\...........| data: raw bits 0x16b0-0x16ff.7 (80) * |until 0x16ff.7 (80) | | 0x24f0| 15 01 00 00 | .... | name: ".debug_ranges" (277) 0x24f4-0x24f7.7 (4) @@ -1117,7 +1142,7 @@ $ fq -d elf dv a_dynamic 0x2510|00 00 00 00 |.... | info: 0 0x2510-0x2513.7 (4) 0x2510| 08 00 00 00 | .... | addralign: 8 0x2514-0x2517.7 (4) 0x2510| 00 00 00 00 | .... | entsize: 0 0x2518-0x251b.7 (4) - | | | [28]{}: section_header 0x1700-0x2543.7 (3652) + | | | [29]{}: section_header 0x1700-0x2543.7 (3652) | | | symbol_table[0:103]: 0x1700-0x1d6f.7 (1648) | | | [0]{}: symbol 0x1700-0x170f.7 (16) 0x1700|00 00 00 00 |.... | name: "" (0) 0x1700-0x1703.7 (4) @@ -2070,7 +2095,7 @@ $ fq -d elf dv a_dynamic 0x2530| 50 00 00 00 | P... | info: 80 0x2538-0x253b.7 (4) 0x2530| 04 00 00 00| ....| addralign: 4 0x253c-0x253f.7 (4) 0x2540|10 00 00 00 |.... | entsize: 16 0x2540-0x2543.7 (4) - | | | [29]{}: section_header 0x1d70-0x256b.7 (2044) + | | | [30]{}: section_header 0x1d70-0x256b.7 (2044) 0x1d70|00 53 63 72 74 31 2e 63 00 24 61 00 24 64 00 63|.Scrt1.c.$a.$d.c| string: "\x00Scrt1.c\x00$a\x00$d\x00crti.o\x00crtn.o\x00crtstuff.c\x00all_implie"... 0x1d70-0x1f6d.7 (510) * |until 0x1f6d.7 (510) | | 0x2540| 09 00 00 00 | .... | name: ".strtab" (9) 0x2544-0x2547.7 (4) @@ -2097,7 +2122,7 @@ $ fq -d elf dv a_dynamic 0x2560|00 00 00 00 |.... | info: 0 0x2560-0x2563.7 (4) 0x2560| 01 00 00 00 | .... | addralign: 1 0x2564-0x2567.7 (4) 0x2560| 00 00 00 00 | .... | entsize: 0 0x2568-0x256b.7 (4) - | | | [30]{}: section_header 0x1f6e-0x2593.7 (1574) + | | | [31]{}: section_header 0x1f6e-0x2593.7 (1574) 0x1f60| 00 2e| ..| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.interp\x00.gnu.hash\x00.dyns"... 0x1f6e-0x2090.7 (291) 0x1f70|73 79 6d 74 61 62 00 2e 73 74 72 74 61 62 00 2e|symtab..strtab..| * |until 0x2090.7 (291) | | @@ -2125,31 +2150,6 @@ $ fq -d elf dv a_dynamic 0x2580| 00 00 00 00 | .... | info: 0 0x2588-0x258b.7 (4) 0x2580| 01 00 00 00| ....| addralign: 1 0x258c-0x258f.7 (4) 0x2590|00 00 00 00| |....| | entsize: 0 0x2590-0x2593.7 (4) - | | | [31]{}: section_header 0x2364-0x238b.7 (40) -0x2360| 9f 00 00 00 | .... | name: ".bss" (159) 0x2364-0x2367.7 (4) -0x2360| 08 00 00 00 | .... | type: "nobits" (0x8) (No space in the file) 0x2368-0x236b.7 (4) - | | | flags{}: 0x236c-0x236f.7 (4) -0x2360| 03 | . | link_order: false 0x236c-0x236c (0.1) -0x2360| 03 | . | info_link: false 0x236c.1-0x236c.1 (0.1) -0x2360| 03 | . | strings: false 0x236c.2-0x236c.2 (0.1) -0x2360| 03 | . | merge: false 0x236c.3-0x236c.3 (0.1) -0x2360| 03 | . | unused0: 0 0x236c.4-0x236c.4 (0.1) -0x2360| 03 | . | execinstr: false 0x236c.5-0x236c.5 (0.1) -0x2360| 03 | . | alloc: true 0x236c.6-0x236c.6 (0.1) -0x2360| 03 | . | write: true 0x236c.7-0x236c.7 (0.1) -0x2360| 00 | . | tls: false 0x236d-0x236d (0.1) -0x2360| 00 | . | group: false 0x236d.1-0x236d.1 (0.1) -0x2360| 00 | . | os_nonconforming: false 0x236d.2-0x236d.2 (0.1) -0x2360| 00 00 | .. | unused1: 0 0x236d.3-0x236e.3 (1.1) -0x2360| 00 00| ..| os_specific: 0 0x236e.4-0x236f.3 (1) -0x2360| 00| .| processor_specific: 0 0x236f.4-0x236f.7 (0.4) -0x2370|04 10 01 00 |.... | addr: 0x11004 0x2370-0x2373.7 (4) -0x2370| 04 10 00 00 | .... | offset: 4100 0x2374-0x2377.7 (4) -0x2370| 1c 00 00 00 | .... | size: 0x1c 0x2378-0x237b.7 (4) -0x2370| 00 00 00 00| ....| link: 0 0x237c-0x237f.7 (4) -0x2380|00 00 00 00 |.... | info: 0 0x2380-0x2383.7 (4) -0x2380| 04 00 00 00 | .... | addralign: 4 0x2384-0x2387.7 (4) -0x2380| 00 00 00 00 | .... | entsize: 0 0x2388-0x238b.7 (4) 0x0730| 00 00 00 00| ....| unknown0: raw bits 0x73c-0xecb.7 (1936) 0x0740|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................| * |until 0xecb.7 (1936) | | diff --git a/format/elf/testdata/linux_arm_v6/a_static.fqtest b/format/elf/testdata/linux_arm_v6/a_static.fqtest index 290c7b820..2053f81f9 100644 --- a/format/elf/testdata/linux_arm_v6/a_static.fqtest +++ b/format/elf/testdata/linux_arm_v6/a_static.fqtest @@ -23,40 +23,7 @@ $ fq -d elf dv a_static 0x0030|20 00 | . | shnum: 32 0x30-0x31.7 (2) 0x0030| 1f 00 | .. | shstrndx: 31 0x32-0x33.7 (2) | | | program_headers[0:7]: 0x0-0x1003.7 (4100) - | | | [0]{}: program_header 0x0-0x72f.7 (1840) - | | | program_header{}: 0x0-0x72f.7 (1840) -0x0000|7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00|.ELF............| data: raw bits 0x0-0x72f.7 (1840) -* |until 0x72f.7 (1840) | | -0x0070| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x74-0x77.7 (4) -0x0070| 00 00 00 00 | .... | offset: 0x0 0x78-0x7b.7 (4) -0x0070| 00 00 00 00| ....| vaddr: 0x0 0x7c-0x7f.7 (4) -0x0080|00 00 00 00 |.... | paddr: 0x0 0x80-0x83.7 (4) -0x0080| 30 07 00 00 | 0... | filesz: 1840 0x84-0x87.7 (4) -0x0080| 30 07 00 00 | 0... | memsz: 1840 0x88-0x8b.7 (4) - | | | flags{}: 0x8c-0x8f.7 (4) -0x0080| 05 | . | unused0: 0 0x8c-0x8c.4 (0.5) -0x0080| 05 | . | r: true 0x8c.5-0x8c.5 (0.1) -0x0080| 05 | . | w: false 0x8c.6-0x8c.6 (0.1) -0x0080| 05 | . | x: true 0x8c.7-0x8c.7 (0.1) -0x0080| 00 00 00| ...| unused1: 0 0x8d-0x8f.7 (3) -0x0090|00 00 01 00 |.... | align: 65536 0x90-0x93.7 (4) - | | | [1]{}: program_header 0x0-0xf3.7 (244) - | | | program_header{}: 0x0-0xf3.7 (244) - | | | data: raw bits 0x0-NA (0) -0x00d0| 51 e5 74 64 | Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0xd4-0xd7.7 (4) -0x00d0| 00 00 00 00 | .... | offset: 0x0 0xd8-0xdb.7 (4) -0x00d0| 00 00 00 00| ....| vaddr: 0x0 0xdc-0xdf.7 (4) -0x00e0|00 00 00 00 |.... | paddr: 0x0 0xe0-0xe3.7 (4) -0x00e0| 00 00 00 00 | .... | filesz: 0 0xe4-0xe7.7 (4) -0x00e0| 00 00 00 00 | .... | memsz: 0 0xe8-0xeb.7 (4) - | | | flags{}: 0xec-0xef.7 (4) -0x00e0| 06 | . | unused0: 0 0xec-0xec.4 (0.5) -0x00e0| 06 | . | r: true 0xec.5-0xec.5 (0.1) -0x00e0| 06 | . | w: true 0xec.6-0xec.6 (0.1) -0x00e0| 06 | . | x: false 0xec.7-0xec.7 (0.1) -0x00e0| 00 00 00| ...| unused1: 0 0xed-0xef.7 (3) -0x00f0|10 00 00 00 |.... | align: 16 0xf0-0xf3.7 (4) - | | | [2]{}: program_header 0x34-0x113.7 (224) + | | | [0]{}: program_header 0x34-0x113.7 (224) | | | program_header{}: 0x34-0x113.7 (224) 0x0030| 06 00 00 00 | .... | type: "phdr" (6) (Program header location and size) 0x34-0x37.7 (4) 0x0030| 06 00 00 00 34 00 00 00 34 00 00 00| ....4...4...| data: raw bits 0x34-0x113.7 (224) @@ -74,7 +41,7 @@ $ fq -d elf dv a_static 0x0040| 04 | . | x: false 0x4c.7-0x4c.7 (0.1) 0x0040| 00 00 00| ...| unused1: 0 0x4d-0x4f.7 (3) 0x0050|04 00 00 00 |.... | align: 4 0x50-0x53.7 (4) - | | | [3]{}: program_header 0x54-0x12b.7 (216) + | | | [1]{}: program_header 0x54-0x12b.7 (216) | | | program_header{}: 0x54-0x12b.7 (216) 0x0050| 03 00 00 00 | .... | type: "interp" (3) (Interpreter to invoke) 0x54-0x57.7 (4) 0x0050| 14 01 00 00 | .... | offset: 0x114 0x58-0x5b.7 (4) @@ -91,7 +58,24 @@ $ fq -d elf dv a_static 0x0070|01 00 00 00 |.... | align: 1 0x70-0x73.7 (4) 0x0110| 2f 6c 69 62 2f 6c 64 2d 6d 75 73 6c| /lib/ld-musl| data: raw bits 0x114-0x12b.7 (24) 0x0120|2d 61 72 6d 68 66 2e 73 6f 2e 31 00 |-armhf.so.1. | - | | | [4]{}: program_header 0x94-0x1003.7 (3952) + | | | [2]{}: program_header 0x0-0x72f.7 (1840) + | | | program_header{}: 0x0-0x72f.7 (1840) +0x0000|7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00|.ELF............| data: raw bits 0x0-0x72f.7 (1840) +* |until 0x72f.7 (1840) | | +0x0070| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x74-0x77.7 (4) +0x0070| 00 00 00 00 | .... | offset: 0x0 0x78-0x7b.7 (4) +0x0070| 00 00 00 00| ....| vaddr: 0x0 0x7c-0x7f.7 (4) +0x0080|00 00 00 00 |.... | paddr: 0x0 0x80-0x83.7 (4) +0x0080| 30 07 00 00 | 0... | filesz: 1840 0x84-0x87.7 (4) +0x0080| 30 07 00 00 | 0... | memsz: 1840 0x88-0x8b.7 (4) + | | | flags{}: 0x8c-0x8f.7 (4) +0x0080| 05 | . | unused0: 0 0x8c-0x8c.4 (0.5) +0x0080| 05 | . | r: true 0x8c.5-0x8c.5 (0.1) +0x0080| 05 | . | w: false 0x8c.6-0x8c.6 (0.1) +0x0080| 05 | . | x: true 0x8c.7-0x8c.7 (0.1) +0x0080| 00 00 00| ...| unused1: 0 0x8d-0x8f.7 (3) +0x0090|00 00 01 00 |.... | align: 65536 0x90-0x93.7 (4) + | | | [3]{}: program_header 0x94-0x1003.7 (3952) | | | program_header{}: 0x94-0x1003.7 (3952) 0x0090| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x94-0x97.7 (4) 0x0090| d8 0e 00 00 | .... | offset: 0xed8 0x98-0x9b.7 (4) @@ -109,7 +93,7 @@ $ fq -d elf dv a_static 0x0ed0| 40 05 00 00 b4 04 00 00| @.......| data: raw bits 0xed8-0x1003.7 (300) 0x0ee0|01 00 00 00 33 00 00 00 0c 00 00 00 3c 03 00 00|....3.......<...| * |until 0x1003.7 (300) | | - | | | [5]{}: program_header 0xb4-0xfbf.7 (3852) + | | | [4]{}: program_header 0xb4-0xfbf.7 (3852) | | | program_header{}: 0xb4-0xfbf.7 (3852) 0x00b0| 02 00 00 00 | .... | type: "dynamic" (2) (Dynamic linking information) 0xb4-0xb7.7 (4) 0x00b0| e0 0e 00 00 | .... | offset: 0xee0 0xb8-0xbb.7 (4) @@ -126,6 +110,22 @@ $ fq -d elf dv a_static 0x00d0|04 00 00 00 |.... | align: 4 0xd0-0xd3.7 (4) 0x0ee0|01 00 00 00 33 00 00 00 0c 00 00 00 3c 03 00 00|....3.......<...| data: raw bits 0xee0-0xfbf.7 (224) * |until 0xfbf.7 (224) | | + | | | [5]{}: program_header 0x0-0xf3.7 (244) + | | | program_header{}: 0x0-0xf3.7 (244) + | | | data: raw bits 0x0-NA (0) +0x00d0| 51 e5 74 64 | Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0xd4-0xd7.7 (4) +0x00d0| 00 00 00 00 | .... | offset: 0x0 0xd8-0xdb.7 (4) +0x00d0| 00 00 00 00| ....| vaddr: 0x0 0xdc-0xdf.7 (4) +0x00e0|00 00 00 00 |.... | paddr: 0x0 0xe0-0xe3.7 (4) +0x00e0| 00 00 00 00 | .... | filesz: 0 0xe4-0xe7.7 (4) +0x00e0| 00 00 00 00 | .... | memsz: 0 0xe8-0xeb.7 (4) + | | | flags{}: 0xec-0xef.7 (4) +0x00e0| 06 | . | unused0: 0 0xec-0xec.4 (0.5) +0x00e0| 06 | . | r: true 0xec.5-0xec.5 (0.1) +0x00e0| 06 | . | w: true 0xec.6-0xec.6 (0.1) +0x00e0| 06 | . | x: false 0xec.7-0xec.7 (0.1) +0x00e0| 00 00 00| ...| unused1: 0 0xed-0xef.7 (3) +0x00f0|10 00 00 00 |.... | align: 16 0xf0-0xf3.7 (4) | | | [6]{}: program_header 0xf4-0xfff.7 (3852) | | | program_header{}: 0xf4-0xfff.7 (3852) 0x00f0| 52 e5 74 64 | R.td | type: "gnu_relro" (1685382482) (GNU read-only after relocation) 0xf4-0xf7.7 (4) @@ -825,7 +825,32 @@ $ fq -d elf dv a_static 0x23a0|00 00 00 00 |.... | info: 0 0x23a0-0x23a3.7 (4) 0x23a0| 04 00 00 00 | .... | addralign: 4 0x23a4-0x23a7.7 (4) 0x23a0| 00 00 00 00 | .... | entsize: 0 0x23a8-0x23ab.7 (4) - | | | [18]{}: section_header 0x1004-0x23fb.7 (5112) + | | | [18]{}: section_header 0x23ac-0x23d3.7 (40) +0x23a0| 9f 00 00 00| ....| name: ".bss" (159) 0x23ac-0x23af.7 (4) +0x23b0|08 00 00 00 |.... | type: "nobits" (0x8) (No space in the file) 0x23b0-0x23b3.7 (4) + | | | flags{}: 0x23b4-0x23b7.7 (4) +0x23b0| 03 | . | link_order: false 0x23b4-0x23b4 (0.1) +0x23b0| 03 | . | info_link: false 0x23b4.1-0x23b4.1 (0.1) +0x23b0| 03 | . | strings: false 0x23b4.2-0x23b4.2 (0.1) +0x23b0| 03 | . | merge: false 0x23b4.3-0x23b4.3 (0.1) +0x23b0| 03 | . | unused0: 0 0x23b4.4-0x23b4.4 (0.1) +0x23b0| 03 | . | execinstr: false 0x23b4.5-0x23b4.5 (0.1) +0x23b0| 03 | . | alloc: true 0x23b4.6-0x23b4.6 (0.1) +0x23b0| 03 | . | write: true 0x23b4.7-0x23b4.7 (0.1) +0x23b0| 00 | . | tls: false 0x23b5-0x23b5 (0.1) +0x23b0| 00 | . | group: false 0x23b5.1-0x23b5.1 (0.1) +0x23b0| 00 | . | os_nonconforming: false 0x23b5.2-0x23b5.2 (0.1) +0x23b0| 00 00 | .. | unused1: 0 0x23b5.3-0x23b6.3 (1.1) +0x23b0| 00 00 | .. | os_specific: 0 0x23b6.4-0x23b7.3 (1) +0x23b0| 00 | . | processor_specific: 0 0x23b7.4-0x23b7.7 (0.4) +0x23b0| 04 10 01 00 | .... | addr: 0x11004 0x23b8-0x23bb.7 (4) +0x23b0| 04 10 00 00| ....| offset: 4100 0x23bc-0x23bf.7 (4) +0x23c0|1c 00 00 00 |.... | size: 0x1c 0x23c0-0x23c3.7 (4) +0x23c0| 00 00 00 00 | .... | link: 0 0x23c4-0x23c7.7 (4) +0x23c0| 00 00 00 00 | .... | info: 0 0x23c8-0x23cb.7 (4) +0x23c0| 04 00 00 00| ....| addralign: 4 0x23cc-0x23cf.7 (4) +0x23d0|00 00 00 00 |.... | entsize: 0 0x23d0-0x23d3.7 (4) + | | | [19]{}: section_header 0x1004-0x23fb.7 (5112) 0x1000| 47 43 43 3a 20 28 41 6c 70 69 6e 65| GCC: (Alpine| data: raw bits 0x1004-0x1065.7 (98) 0x1010|20 31 30 2e 33 2e 31 5f 67 69 74 32 30 32 31 30| 10.3.1_git20210| * |until 0x1065.7 (98) | | @@ -853,7 +878,7 @@ $ fq -d elf dv a_static 0x23f0|00 00 00 00 |.... | info: 0 0x23f0-0x23f3.7 (4) 0x23f0| 01 00 00 00 | .... | addralign: 1 0x23f4-0x23f7.7 (4) 0x23f0| 01 00 00 00 | .... | entsize: 1 0x23f8-0x23fb.7 (4) - | | | [19]{}: section_header 0x1066-0x2423.7 (5054) + | | | [20]{}: section_header 0x1066-0x2423.7 (5054) 0x1060| 41 32 00 00 00 61 65 61 62 69| A2...aeabi| data: raw bits 0x1066-0x1098.7 (51) 0x1070|00 01 28 00 00 00 05 36 5a 4b 00 06 07 08 01 09|..(....6ZK......| * |until 0x1098.7 (51) | | @@ -881,7 +906,7 @@ $ fq -d elf dv a_static 0x2410| 00 00 00 00 | .... | info: 0 0x2418-0x241b.7 (4) 0x2410| 01 00 00 00| ....| addralign: 1 0x241c-0x241f.7 (4) 0x2420|00 00 00 00 |.... | entsize: 0 0x2420-0x2423.7 (4) - | | | [20]{}: section_header 0x10a0-0x244b.7 (5036) + | | | [21]{}: section_header 0x10a0-0x244b.7 (5036) 0x10a0|1c 00 00 00 02 00 00 00 00 00 04 00 00 00 00 00|................| data: raw bits 0x10a0-0x110f.7 (112) * |until 0x110f.7 (112) | | 0x2420| bd 00 00 00 | .... | name: ".debug_aranges" (189) 0x2424-0x2427.7 (4) @@ -908,7 +933,7 @@ $ fq -d elf dv a_static 0x2440|00 00 00 00 |.... | info: 0 0x2440-0x2443.7 (4) 0x2440| 08 00 00 00 | .... | addralign: 8 0x2444-0x2447.7 (4) 0x2440| 00 00 00 00 | .... | entsize: 0 0x2448-0x244b.7 (4) - | | | [21]{}: section_header 0x1110-0x2473.7 (4964) + | | | [22]{}: section_header 0x1110-0x2473.7 (4964) 0x1110|e9 00 00 00 04 00 00 00 00 00 04 01 6b 00 00 00|............k...| data: raw bits 0x1110-0x1240.7 (305) * |until 0x1240.7 (305) | | 0x2440| cc 00 00 00| ....| name: ".debug_info" (204) 0x244c-0x244f.7 (4) @@ -935,7 +960,7 @@ $ fq -d elf dv a_static 0x2460| 00 00 00 00 | .... | info: 0 0x2468-0x246b.7 (4) 0x2460| 01 00 00 00| ....| addralign: 1 0x246c-0x246f.7 (4) 0x2470|00 00 00 00 |.... | entsize: 0 0x2470-0x2473.7 (4) - | | | [22]{}: section_header 0x1241-0x249b.7 (4699) + | | | [23]{}: section_header 0x1241-0x249b.7 (4699) 0x1240| 01 11 01 25 0e 13 0b 03 0e 1b 0e 55 17 11 01| ...%.......U...| data: raw bits 0x1241-0x1305.7 (197) 0x1250|10 17 00 00 02 24 00 0b 0b 3e 0b 03 0e 00 00 03|.....$...>......| * |until 0x1305.7 (197) | | @@ -963,7 +988,7 @@ $ fq -d elf dv a_static 0x2490|00 00 00 00 |.... | info: 0 0x2490-0x2493.7 (4) 0x2490| 01 00 00 00 | .... | addralign: 1 0x2494-0x2497.7 (4) 0x2490| 00 00 00 00 | .... | entsize: 0 0x2498-0x249b.7 (4) - | | | [23]{}: section_header 0x1306-0x24c3.7 (4542) + | | | [24]{}: section_header 0x1306-0x24c3.7 (4542) 0x1300| 51 00 00 00 03 00 21 00 00 00| Q.....!...| data: raw bits 0x1306-0x13f0.7 (235) 0x1310|02 01 fb 0e 0d 00 01 01 01 01 00 00 00 01 00 00|................| * |until 0x13f0.7 (235) | | @@ -991,7 +1016,7 @@ $ fq -d elf dv a_static 0x24b0| 00 00 00 00 | .... | info: 0 0x24b8-0x24bb.7 (4) 0x24b0| 01 00 00 00| ....| addralign: 1 0x24bc-0x24bf.7 (4) 0x24c0|00 00 00 00 |.... | entsize: 0 0x24c0-0x24c3.7 (4) - | | | [24]{}: section_header 0x13f4-0x24eb.7 (4344) + | | | [25]{}: section_header 0x13f4-0x24eb.7 (4344) 0x13f0| 0c 00 00 00 ff ff ff ff 01 00 02 7c| ...........|| data: raw bits 0x13f4-0x141b.7 (40) 0x1400|0e 0c 0d 00 14 00 00 00 00 00 00 00 bc 03 00 00|................| 0x1410|64 00 00 00 42 0e 18 8e 01 66 0e 04 |d...B....f.. | @@ -1019,7 +1044,7 @@ $ fq -d elf dv a_static 0x24e0|00 00 00 00 |.... | info: 0 0x24e0-0x24e3.7 (4) 0x24e0| 04 00 00 00 | .... | addralign: 4 0x24e4-0x24e7.7 (4) 0x24e0| 00 00 00 00 | .... | entsize: 0 0x24e8-0x24eb.7 (4) - | | | [25]{}: section_header 0x141c-0x2513.7 (4344) + | | | [26]{}: section_header 0x141c-0x2513.7 (4344) 0x1410| 75 6e 73 69| unsi| data: raw bits 0x141c-0x162c.7 (529) 0x1420|67 6e 65 64 20 69 6e 74 00 63 72 74 2f 53 63 72|gned int.crt/Scr| * |until 0x162c.7 (529) | | @@ -1047,7 +1072,7 @@ $ fq -d elf dv a_static 0x2500| 00 00 00 00 | .... | info: 0 0x2508-0x250b.7 (4) 0x2500| 01 00 00 00| ....| addralign: 1 0x250c-0x250f.7 (4) 0x2510|01 00 00 00 |.... | entsize: 1 0x2510-0x2513.7 (4) - | | | [26]{}: section_header 0x162d-0x253b.7 (3855) + | | | [27]{}: section_header 0x162d-0x253b.7 (3855) 0x1620| 00 00 00| ...| data: raw bits 0x162d-0x16ac.7 (128) 0x1630|00 00 00 bc 03 00 00 04 04 00 00 01 00 50 04 04|.............P..| * |until 0x16ac.7 (128) | | @@ -1075,7 +1100,7 @@ $ fq -d elf dv a_static 0x2530|00 00 00 00 |.... | info: 0 0x2530-0x2533.7 (4) 0x2530| 01 00 00 00 | .... | addralign: 1 0x2534-0x2537.7 (4) 0x2530| 00 00 00 00 | .... | entsize: 0 0x2538-0x253b.7 (4) - | | | [27]{}: section_header 0x16b0-0x2563.7 (3764) + | | | [28]{}: section_header 0x16b0-0x2563.7 (3764) 0x16b0|bc 03 00 00 20 04 00 00 00 00 00 00 00 00 00 00|.... ...........| data: raw bits 0x16b0-0x16ff.7 (80) * |until 0x16ff.7 (80) | | 0x2530| 15 01 00 00| ....| name: ".debug_ranges" (277) 0x253c-0x253f.7 (4) @@ -1102,7 +1127,7 @@ $ fq -d elf dv a_static 0x2550| 00 00 00 00 | .... | info: 0 0x2558-0x255b.7 (4) 0x2550| 08 00 00 00| ....| addralign: 8 0x255c-0x255f.7 (4) 0x2560|00 00 00 00 |.... | entsize: 0 0x2560-0x2563.7 (4) - | | | [28]{}: section_header 0x1700-0x258b.7 (3724) + | | | [29]{}: section_header 0x1700-0x258b.7 (3724) | | | symbol_table[0:107]: 0x1700-0x1daf.7 (1712) | | | [0]{}: symbol 0x1700-0x170f.7 (16) 0x1700|00 00 00 00 |.... | name: "" (0) 0x1700-0x1703.7 (4) @@ -2091,7 +2116,7 @@ $ fq -d elf dv a_static 0x2580|54 00 00 00 |T... | info: 84 0x2580-0x2583.7 (4) 0x2580| 04 00 00 00 | .... | addralign: 4 0x2584-0x2587.7 (4) 0x2580| 10 00 00 00 | .... | entsize: 16 0x2588-0x258b.7 (4) - | | | [29]{}: section_header 0x1db0-0x25b3.7 (2052) + | | | [30]{}: section_header 0x1db0-0x25b3.7 (2052) 0x1db0|00 53 63 72 74 31 2e 63 00 24 61 00 24 64 00 63|.Scrt1.c.$a.$d.c| string: "\x00Scrt1.c\x00$a\x00$d\x00crti.o\x00crtn.o\x00crtstuff.c\x00all_implie"... 0x1db0-0x1fb6.7 (519) * |until 0x1fb6.7 (519) | | 0x2580| 09 00 00 00| ....| name: ".strtab" (9) 0x258c-0x258f.7 (4) @@ -2118,7 +2143,7 @@ $ fq -d elf dv a_static 0x25a0| 00 00 00 00 | .... | info: 0 0x25a8-0x25ab.7 (4) 0x25a0| 01 00 00 00| ....| addralign: 1 0x25ac-0x25af.7 (4) 0x25b0|00 00 00 00 |.... | entsize: 0 0x25b0-0x25b3.7 (4) - | | | [30]{}: section_header 0x1fb7-0x25db.7 (1573) + | | | [31]{}: section_header 0x1fb7-0x25db.7 (1573) 0x1fb0| 00 2e 73 79 6d 74 61 62 00| ..symtab.| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.interp\x00.gnu.hash\x00.dyns"... 0x1fb7-0x20d9.7 (291) 0x1fc0|2e 73 74 72 74 61 62 00 2e 73 68 73 74 72 74 61|.strtab..shstrta| * |until 0x20d9.7 (291) | | @@ -2146,31 +2171,6 @@ $ fq -d elf dv a_static 0x25d0|00 00 00 00 |.... | info: 0 0x25d0-0x25d3.7 (4) 0x25d0| 01 00 00 00 | .... | addralign: 1 0x25d4-0x25d7.7 (4) 0x25d0| 00 00 00 00| | ....| | entsize: 0 0x25d8-0x25db.7 (4) - | | | [31]{}: section_header 0x23ac-0x23d3.7 (40) -0x23a0| 9f 00 00 00| ....| name: ".bss" (159) 0x23ac-0x23af.7 (4) -0x23b0|08 00 00 00 |.... | type: "nobits" (0x8) (No space in the file) 0x23b0-0x23b3.7 (4) - | | | flags{}: 0x23b4-0x23b7.7 (4) -0x23b0| 03 | . | link_order: false 0x23b4-0x23b4 (0.1) -0x23b0| 03 | . | info_link: false 0x23b4.1-0x23b4.1 (0.1) -0x23b0| 03 | . | strings: false 0x23b4.2-0x23b4.2 (0.1) -0x23b0| 03 | . | merge: false 0x23b4.3-0x23b4.3 (0.1) -0x23b0| 03 | . | unused0: 0 0x23b4.4-0x23b4.4 (0.1) -0x23b0| 03 | . | execinstr: false 0x23b4.5-0x23b4.5 (0.1) -0x23b0| 03 | . | alloc: true 0x23b4.6-0x23b4.6 (0.1) -0x23b0| 03 | . | write: true 0x23b4.7-0x23b4.7 (0.1) -0x23b0| 00 | . | tls: false 0x23b5-0x23b5 (0.1) -0x23b0| 00 | . | group: false 0x23b5.1-0x23b5.1 (0.1) -0x23b0| 00 | . | os_nonconforming: false 0x23b5.2-0x23b5.2 (0.1) -0x23b0| 00 00 | .. | unused1: 0 0x23b5.3-0x23b6.3 (1.1) -0x23b0| 00 00 | .. | os_specific: 0 0x23b6.4-0x23b7.3 (1) -0x23b0| 00 | . | processor_specific: 0 0x23b7.4-0x23b7.7 (0.4) -0x23b0| 04 10 01 00 | .... | addr: 0x11004 0x23b8-0x23bb.7 (4) -0x23b0| 04 10 00 00| ....| offset: 4100 0x23bc-0x23bf.7 (4) -0x23c0|1c 00 00 00 |.... | size: 0x1c 0x23c0-0x23c3.7 (4) -0x23c0| 00 00 00 00 | .... | link: 0 0x23c4-0x23c7.7 (4) -0x23c0| 00 00 00 00 | .... | info: 0 0x23c8-0x23cb.7 (4) -0x23c0| 04 00 00 00| ....| addralign: 4 0x23cc-0x23cf.7 (4) -0x23d0|00 00 00 00 |.... | entsize: 0 0x23d0-0x23d3.7 (4) 0x0730|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................| unknown0: raw bits 0x730-0xed7.7 (1960) * |until 0xed7.7 (1960) | | 0x1090| 00 00 00 00 00 00 00| .......| unknown1: raw bits 0x1099-0x109f.7 (7) diff --git a/format/elf/testdata/linux_arm_v6/a_stripped.fqtest b/format/elf/testdata/linux_arm_v6/a_stripped.fqtest index e9b70d52f..bf3be731f 100644 --- a/format/elf/testdata/linux_arm_v6/a_stripped.fqtest +++ b/format/elf/testdata/linux_arm_v6/a_stripped.fqtest @@ -23,40 +23,7 @@ $ fq -d elf dv a_stripped 0x0030|16 00 |.. | shnum: 22 0x30-0x31.7 (2) 0x0030| 15 00 | .. | shstrndx: 21 0x32-0x33.7 (2) | | | program_headers[0:7]: 0x0-0x1003.7 (4100) - | | | [0]{}: program_header 0x0-0x73b.7 (1852) - | | | program_header{}: 0x0-0x73b.7 (1852) -0x0000|7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00|.ELF............| data: raw bits 0x0-0x73b.7 (1852) -* |until 0x73b.7 (1852) | | -0x0070| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x74-0x77.7 (4) -0x0070| 00 00 00 00 | .... | offset: 0x0 0x78-0x7b.7 (4) -0x0070| 00 00 00 00| ....| vaddr: 0x0 0x7c-0x7f.7 (4) -0x0080|00 00 00 00 |.... | paddr: 0x0 0x80-0x83.7 (4) -0x0080| 3c 07 00 00 | <... | filesz: 1852 0x84-0x87.7 (4) -0x0080| 3c 07 00 00 | <... | memsz: 1852 0x88-0x8b.7 (4) - | | | flags{}: 0x8c-0x8f.7 (4) -0x0080| 05 | . | unused0: 0 0x8c-0x8c.4 (0.5) -0x0080| 05 | . | r: true 0x8c.5-0x8c.5 (0.1) -0x0080| 05 | . | w: false 0x8c.6-0x8c.6 (0.1) -0x0080| 05 | . | x: true 0x8c.7-0x8c.7 (0.1) -0x0080| 00 00 00| ...| unused1: 0 0x8d-0x8f.7 (3) -0x0090|00 00 01 00 |.... | align: 65536 0x90-0x93.7 (4) - | | | [1]{}: program_header 0x0-0xf3.7 (244) - | | | program_header{}: 0x0-0xf3.7 (244) - | | | data: raw bits 0x0-NA (0) -0x00d0| 51 e5 74 64 | Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0xd4-0xd7.7 (4) -0x00d0| 00 00 00 00 | .... | offset: 0x0 0xd8-0xdb.7 (4) -0x00d0| 00 00 00 00| ....| vaddr: 0x0 0xdc-0xdf.7 (4) -0x00e0|00 00 00 00 |.... | paddr: 0x0 0xe0-0xe3.7 (4) -0x00e0| 00 00 00 00 | .... | filesz: 0 0xe4-0xe7.7 (4) -0x00e0| 00 00 00 00 | .... | memsz: 0 0xe8-0xeb.7 (4) - | | | flags{}: 0xec-0xef.7 (4) -0x00e0| 06 | . | unused0: 0 0xec-0xec.4 (0.5) -0x00e0| 06 | . | r: true 0xec.5-0xec.5 (0.1) -0x00e0| 06 | . | w: true 0xec.6-0xec.6 (0.1) -0x00e0| 06 | . | x: false 0xec.7-0xec.7 (0.1) -0x00e0| 00 00 00| ...| unused1: 0 0xed-0xef.7 (3) -0x00f0|10 00 00 00 |.... | align: 16 0xf0-0xf3.7 (4) - | | | [2]{}: program_header 0x34-0x113.7 (224) + | | | [0]{}: program_header 0x34-0x113.7 (224) | | | program_header{}: 0x34-0x113.7 (224) 0x0030| 06 00 00 00 | .... | type: "phdr" (6) (Program header location and size) 0x34-0x37.7 (4) 0x0030| 06 00 00 00 34 00 00 00 34 00 00 00| ....4...4...| data: raw bits 0x34-0x113.7 (224) @@ -74,7 +41,7 @@ $ fq -d elf dv a_stripped 0x0040| 04 | . | x: false 0x4c.7-0x4c.7 (0.1) 0x0040| 00 00 00| ...| unused1: 0 0x4d-0x4f.7 (3) 0x0050|04 00 00 00 |.... | align: 4 0x50-0x53.7 (4) - | | | [3]{}: program_header 0x54-0x12b.7 (216) + | | | [1]{}: program_header 0x54-0x12b.7 (216) | | | program_header{}: 0x54-0x12b.7 (216) 0x0050| 03 00 00 00 | .... | type: "interp" (3) (Interpreter to invoke) 0x54-0x57.7 (4) 0x0050| 14 01 00 00 | .... | offset: 0x114 0x58-0x5b.7 (4) @@ -91,7 +58,24 @@ $ fq -d elf dv a_stripped 0x0070|01 00 00 00 |.... | align: 1 0x70-0x73.7 (4) 0x0110| 2f 6c 69 62 2f 6c 64 2d 6d 75 73 6c| /lib/ld-musl| data: raw bits 0x114-0x12b.7 (24) 0x0120|2d 61 72 6d 68 66 2e 73 6f 2e 31 00 |-armhf.so.1. | - | | | [4]{}: program_header 0x94-0x1003.7 (3952) + | | | [2]{}: program_header 0x0-0x73b.7 (1852) + | | | program_header{}: 0x0-0x73b.7 (1852) +0x0000|7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00|.ELF............| data: raw bits 0x0-0x73b.7 (1852) +* |until 0x73b.7 (1852) | | +0x0070| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x74-0x77.7 (4) +0x0070| 00 00 00 00 | .... | offset: 0x0 0x78-0x7b.7 (4) +0x0070| 00 00 00 00| ....| vaddr: 0x0 0x7c-0x7f.7 (4) +0x0080|00 00 00 00 |.... | paddr: 0x0 0x80-0x83.7 (4) +0x0080| 3c 07 00 00 | <... | filesz: 1852 0x84-0x87.7 (4) +0x0080| 3c 07 00 00 | <... | memsz: 1852 0x88-0x8b.7 (4) + | | | flags{}: 0x8c-0x8f.7 (4) +0x0080| 05 | . | unused0: 0 0x8c-0x8c.4 (0.5) +0x0080| 05 | . | r: true 0x8c.5-0x8c.5 (0.1) +0x0080| 05 | . | w: false 0x8c.6-0x8c.6 (0.1) +0x0080| 05 | . | x: true 0x8c.7-0x8c.7 (0.1) +0x0080| 00 00 00| ...| unused1: 0 0x8d-0x8f.7 (3) +0x0090|00 00 01 00 |.... | align: 65536 0x90-0x93.7 (4) + | | | [3]{}: program_header 0x94-0x1003.7 (3952) | | | program_header{}: 0x94-0x1003.7 (3952) 0x0090| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x94-0x97.7 (4) 0x0090| cc 0e 00 00 | .... | offset: 0xecc 0x98-0x9b.7 (4) @@ -109,7 +93,7 @@ $ fq -d elf dv a_stripped 0x0ec0| 7c 05 00 00| |...| data: raw bits 0xecc-0x1003.7 (312) 0x0ed0|f0 04 00 00 01 00 00 00 a2 00 00 00 01 00 00 00|................| * |until 0x1003.7 (312) | | - | | | [5]{}: program_header 0xb4-0xfbb.7 (3848) + | | | [4]{}: program_header 0xb4-0xfbb.7 (3848) | | | program_header{}: 0xb4-0xfbb.7 (3848) 0x00b0| 02 00 00 00 | .... | type: "dynamic" (2) (Dynamic linking information) 0xb4-0xb7.7 (4) 0x00b0| d4 0e 00 00 | .... | offset: 0xed4 0xb8-0xbb.7 (4) @@ -127,6 +111,22 @@ $ fq -d elf dv a_stripped 0x0ed0| 01 00 00 00 a2 00 00 00 01 00 00 00| ............| data: raw bits 0xed4-0xfbb.7 (232) 0x0ee0|ac 00 00 00 0c 00 00 00 6c 03 00 00 0d 00 00 00|........l.......| * |until 0xfbb.7 (232) | | + | | | [5]{}: program_header 0x0-0xf3.7 (244) + | | | program_header{}: 0x0-0xf3.7 (244) + | | | data: raw bits 0x0-NA (0) +0x00d0| 51 e5 74 64 | Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0xd4-0xd7.7 (4) +0x00d0| 00 00 00 00 | .... | offset: 0x0 0xd8-0xdb.7 (4) +0x00d0| 00 00 00 00| ....| vaddr: 0x0 0xdc-0xdf.7 (4) +0x00e0|00 00 00 00 |.... | paddr: 0x0 0xe0-0xe3.7 (4) +0x00e0| 00 00 00 00 | .... | filesz: 0 0xe4-0xe7.7 (4) +0x00e0| 00 00 00 00 | .... | memsz: 0 0xe8-0xeb.7 (4) + | | | flags{}: 0xec-0xef.7 (4) +0x00e0| 06 | . | unused0: 0 0xec-0xec.4 (0.5) +0x00e0| 06 | . | r: true 0xec.5-0xec.5 (0.1) +0x00e0| 06 | . | w: true 0xec.6-0xec.6 (0.1) +0x00e0| 06 | . | x: false 0xec.7-0xec.7 (0.1) +0x00e0| 00 00 00| ...| unused1: 0 0xed-0xef.7 (3) +0x00f0|10 00 00 00 |.... | align: 16 0xf0-0xf3.7 (4) | | | [6]{}: program_header 0xf4-0xfff.7 (3852) | | | program_header{}: 0xf4-0xfff.7 (3852) 0x00f0| 52 e5 74 64 | R.td | type: "gnu_relro" (1685382482) (GNU read-only after relocation) 0xf4-0xf7.7 (4) @@ -840,7 +840,32 @@ $ fq -d elf dv a_stripped 0x1400| 00 00 00 00| ....| info: 0 0x140c-0x140f.7 (4) 0x1410|04 00 00 00 |.... | addralign: 4 0x1410-0x1413.7 (4) 0x1410| 00 00 00 00 | .... | entsize: 0 0x1414-0x1417.7 (4) - | | | [18]{}: section_header 0x1004-0x1467.7 (1124) + | | | [18]{}: section_header 0x1418-0x143f.7 (40) +0x1410| 8f 00 00 00 | .... | name: ".bss" (143) 0x1418-0x141b.7 (4) +0x1410| 08 00 00 00| ....| type: "nobits" (0x8) (No space in the file) 0x141c-0x141f.7 (4) + | | | flags{}: 0x1420-0x1423.7 (4) +0x1420|03 |. | link_order: false 0x1420-0x1420 (0.1) +0x1420|03 |. | info_link: false 0x1420.1-0x1420.1 (0.1) +0x1420|03 |. | strings: false 0x1420.2-0x1420.2 (0.1) +0x1420|03 |. | merge: false 0x1420.3-0x1420.3 (0.1) +0x1420|03 |. | unused0: 0 0x1420.4-0x1420.4 (0.1) +0x1420|03 |. | execinstr: false 0x1420.5-0x1420.5 (0.1) +0x1420|03 |. | alloc: true 0x1420.6-0x1420.6 (0.1) +0x1420|03 |. | write: true 0x1420.7-0x1420.7 (0.1) +0x1420| 00 | . | tls: false 0x1421-0x1421 (0.1) +0x1420| 00 | . | group: false 0x1421.1-0x1421.1 (0.1) +0x1420| 00 | . | os_nonconforming: false 0x1421.2-0x1421.2 (0.1) +0x1420| 00 00 | .. | unused1: 0 0x1421.3-0x1422.3 (1.1) +0x1420| 00 00 | .. | os_specific: 0 0x1422.4-0x1423.3 (1) +0x1420| 00 | . | processor_specific: 0 0x1423.4-0x1423.7 (0.4) +0x1420| 04 10 01 00 | .... | addr: 0x11004 0x1424-0x1427.7 (4) +0x1420| 04 10 00 00 | .... | offset: 4100 0x1428-0x142b.7 (4) +0x1420| 1c 00 00 00| ....| size: 0x1c 0x142c-0x142f.7 (4) +0x1430|00 00 00 00 |.... | link: 0 0x1430-0x1433.7 (4) +0x1430| 00 00 00 00 | .... | info: 0 0x1434-0x1437.7 (4) +0x1430| 04 00 00 00 | .... | addralign: 4 0x1438-0x143b.7 (4) +0x1430| 00 00 00 00| ....| entsize: 0 0x143c-0x143f.7 (4) + | | | [19]{}: section_header 0x1004-0x1467.7 (1124) 0x1000| 47 43 43 3a 20 28 41 6c 70 69 6e 65| GCC: (Alpine| data: raw bits 0x1004-0x1065.7 (98) 0x1010|20 31 30 2e 33 2e 31 5f 67 69 74 32 30 32 31 30| 10.3.1_git20210| * |until 0x1065.7 (98) | | @@ -868,7 +893,7 @@ $ fq -d elf dv a_stripped 0x1450| 00 00 00 00| ....| info: 0 0x145c-0x145f.7 (4) 0x1460|01 00 00 00 |.... | addralign: 1 0x1460-0x1463.7 (4) 0x1460| 01 00 00 00 | .... | entsize: 1 0x1464-0x1467.7 (4) - | | | [19]{}: section_header 0x1066-0x148f.7 (1066) + | | | [20]{}: section_header 0x1066-0x148f.7 (1066) 0x1060| 41 32 00 00 00 61 65 61 62 69| A2...aeabi| data: raw bits 0x1066-0x1098.7 (51) 0x1070|00 01 28 00 00 00 05 36 5a 4b 00 06 07 08 01 09|..(....6ZK......| * |until 0x1098.7 (51) | | @@ -896,7 +921,7 @@ $ fq -d elf dv a_stripped 0x1480| 00 00 00 00 | .... | info: 0 0x1484-0x1487.7 (4) 0x1480| 01 00 00 00 | .... | addralign: 1 0x1488-0x148b.7 (4) 0x1480| 00 00 00 00| ....| entsize: 0 0x148c-0x148f.7 (4) - | | | [20]{}: section_header 0x1099-0x14b7.7 (1055) + | | | [21]{}: section_header 0x1099-0x14b7.7 (1055) 0x1090| 00 2e 73 68 73 74 72| ..shstr| string: "\x00.shstrtab\x00.interp\x00.gnu.hash\x00.dynsym\x00.dynstr\x00.rel."... 0x1099-0x1145.7 (173) 0x10a0|74 61 62 00 2e 69 6e 74 65 72 70 00 2e 67 6e 75|tab..interp..gnu| * |until 0x1145.7 (173) | | @@ -924,31 +949,6 @@ $ fq -d elf dv a_stripped 0x14a0| 00 00 00 00| ....| info: 0 0x14ac-0x14af.7 (4) 0x14b0|01 00 00 00 |.... | addralign: 1 0x14b0-0x14b3.7 (4) 0x14b0| 00 00 00 00| | ....| | entsize: 0 0x14b4-0x14b7.7 (4) - | | | [21]{}: section_header 0x1418-0x143f.7 (40) -0x1410| 8f 00 00 00 | .... | name: ".bss" (143) 0x1418-0x141b.7 (4) -0x1410| 08 00 00 00| ....| type: "nobits" (0x8) (No space in the file) 0x141c-0x141f.7 (4) - | | | flags{}: 0x1420-0x1423.7 (4) -0x1420|03 |. | link_order: false 0x1420-0x1420 (0.1) -0x1420|03 |. | info_link: false 0x1420.1-0x1420.1 (0.1) -0x1420|03 |. | strings: false 0x1420.2-0x1420.2 (0.1) -0x1420|03 |. | merge: false 0x1420.3-0x1420.3 (0.1) -0x1420|03 |. | unused0: 0 0x1420.4-0x1420.4 (0.1) -0x1420|03 |. | execinstr: false 0x1420.5-0x1420.5 (0.1) -0x1420|03 |. | alloc: true 0x1420.6-0x1420.6 (0.1) -0x1420|03 |. | write: true 0x1420.7-0x1420.7 (0.1) -0x1420| 00 | . | tls: false 0x1421-0x1421 (0.1) -0x1420| 00 | . | group: false 0x1421.1-0x1421.1 (0.1) -0x1420| 00 | . | os_nonconforming: false 0x1421.2-0x1421.2 (0.1) -0x1420| 00 00 | .. | unused1: 0 0x1421.3-0x1422.3 (1.1) -0x1420| 00 00 | .. | os_specific: 0 0x1422.4-0x1423.3 (1) -0x1420| 00 | . | processor_specific: 0 0x1423.4-0x1423.7 (0.4) -0x1420| 04 10 01 00 | .... | addr: 0x11004 0x1424-0x1427.7 (4) -0x1420| 04 10 00 00 | .... | offset: 4100 0x1428-0x142b.7 (4) -0x1420| 1c 00 00 00| ....| size: 0x1c 0x142c-0x142f.7 (4) -0x1430|00 00 00 00 |.... | link: 0 0x1430-0x1433.7 (4) -0x1430| 00 00 00 00 | .... | info: 0 0x1434-0x1437.7 (4) -0x1430| 04 00 00 00 | .... | addralign: 4 0x1438-0x143b.7 (4) -0x1430| 00 00 00 00| ....| entsize: 0 0x143c-0x143f.7 (4) 0x0730| 00 00 00 00| ....| unknown0: raw bits 0x73c-0xecb.7 (1936) 0x0740|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................| * |until 0xecb.7 (1936) | | diff --git a/format/elf/testdata/linux_arm_v6/libbbb.a.fqtest b/format/elf/testdata/linux_arm_v6/libbbb.a.fqtest index b84508bef..e255fba72 100644 --- a/format/elf/testdata/linux_arm_v6/libbbb.a.fqtest +++ b/format/elf/testdata/linux_arm_v6/libbbb.a.fqtest @@ -105,7 +105,34 @@ $ fq -d ar dv libbbb.a 0x310| 00 00 00 00 | .... | info: 0 0x314-0x317.7 (4) 0x310| 04 00 00 00 | .... | addralign: 4 0x318-0x31b.7 (4) 0x310| 00 00 00 00| ....| entsize: 0 0x31c-0x31f.7 (4) - | | | [2]{}: section_header 0xec-0x36f.7 (644) + | | | [2]{}: section_header 0x25c-0x347.7 (236) +0x250| 14 00 00 00| ....| data: raw bits 0x25c-0x26b.7 (16) +0x260|1c 0d 00 00 20 00 00 00 03 05 00 00 |.... ....... | +0x320|1b 00 00 00 |.... | name: ".rel.text" (27) 0x320-0x323.7 (4) +0x320| 09 00 00 00 | .... | type: "rel" (0x9) (Relocation entries without explicit addends) 0x324-0x327.7 (4) + | | | flags{}: 0x328-0x32b.7 (4) +0x320| 40 | @ | link_order: false 0x328-0x328 (0.1) +0x320| 40 | @ | info_link: true 0x328.1-0x328.1 (0.1) +0x320| 40 | @ | strings: false 0x328.2-0x328.2 (0.1) +0x320| 40 | @ | merge: false 0x328.3-0x328.3 (0.1) +0x320| 40 | @ | unused0: 0 0x328.4-0x328.4 (0.1) +0x320| 40 | @ | execinstr: false 0x328.5-0x328.5 (0.1) +0x320| 40 | @ | alloc: false 0x328.6-0x328.6 (0.1) +0x320| 40 | @ | write: false 0x328.7-0x328.7 (0.1) +0x320| 00 | . | tls: false 0x329-0x329 (0.1) +0x320| 00 | . | group: false 0x329.1-0x329.1 (0.1) +0x320| 00 | . | os_nonconforming: false 0x329.2-0x329.2 (0.1) +0x320| 00 00 | .. | unused1: 0 0x329.3-0x32a.3 (1.1) +0x320| 00 00 | .. | os_specific: 0 0x32a.4-0x32b.3 (1) +0x320| 00 | . | processor_specific: 0 0x32b.4-0x32b.7 (0.4) +0x320| 00 00 00 00| ....| addr: 0x0 0x32c-0x32f.7 (4) +0x330|c8 01 00 00 |.... | offset: 456 0x330-0x333.7 (4) +0x330| 10 00 00 00 | .... | size: 0x10 0x334-0x337.7 (4) +0x330| 09 00 00 00 | .... | link: 9 0x338-0x33b.7 (4) +0x330| 01 00 00 00| ....| info: 1 0x33c-0x33f.7 (4) +0x340|04 00 00 00 |.... | addralign: 4 0x340-0x343.7 (4) +0x340| 08 00 00 00 | .... | entsize: 8 0x344-0x347.7 (4) + | | | [3]{}: section_header 0xec-0x36f.7 (644) | | | data: raw bits 0xec-NA (0) 0x340| 25 00 00 00 | %... | name: ".data" (37) 0x348-0x34b.7 (4) 0x340| 01 00 00 00| ....| type: "progbits" (0x1) (Information defined by the program) 0x34c-0x34f.7 (4) @@ -131,7 +158,32 @@ $ fq -d ar dv libbbb.a 0x360| 00 00 00 00 | .... | info: 0 0x364-0x367.7 (4) 0x360| 01 00 00 00 | .... | addralign: 1 0x368-0x36b.7 (4) 0x360| 00 00 00 00| ....| entsize: 0 0x36c-0x36f.7 (4) - | | | [3]{}: section_header 0xec-0x3bf.7 (724) + | | | [4]{}: section_header 0x370-0x397.7 (40) +0x370|2b 00 00 00 |+... | name: ".bss" (43) 0x370-0x373.7 (4) +0x370| 08 00 00 00 | .... | type: "nobits" (0x8) (No space in the file) 0x374-0x377.7 (4) + | | | flags{}: 0x378-0x37b.7 (4) +0x370| 03 | . | link_order: false 0x378-0x378 (0.1) +0x370| 03 | . | info_link: false 0x378.1-0x378.1 (0.1) +0x370| 03 | . | strings: false 0x378.2-0x378.2 (0.1) +0x370| 03 | . | merge: false 0x378.3-0x378.3 (0.1) +0x370| 03 | . | unused0: 0 0x378.4-0x378.4 (0.1) +0x370| 03 | . | execinstr: false 0x378.5-0x378.5 (0.1) +0x370| 03 | . | alloc: true 0x378.6-0x378.6 (0.1) +0x370| 03 | . | write: true 0x378.7-0x378.7 (0.1) +0x370| 00 | . | tls: false 0x379-0x379 (0.1) +0x370| 00 | . | group: false 0x379.1-0x379.1 (0.1) +0x370| 00 | . | os_nonconforming: false 0x379.2-0x379.2 (0.1) +0x370| 00 00 | .. | unused1: 0 0x379.3-0x37a.3 (1.1) +0x370| 00 00 | .. | os_specific: 0 0x37a.4-0x37b.3 (1) +0x370| 00 | . | processor_specific: 0 0x37b.4-0x37b.7 (0.4) +0x370| 00 00 00 00| ....| addr: 0x0 0x37c-0x37f.7 (4) +0x380|58 00 00 00 |X... | offset: 88 0x380-0x383.7 (4) +0x380| 00 00 00 00 | .... | size: 0x0 0x384-0x387.7 (4) +0x380| 00 00 00 00 | .... | link: 0 0x388-0x38b.7 (4) +0x380| 00 00 00 00| ....| info: 0 0x38c-0x38f.7 (4) +0x390|01 00 00 00 |.... | addralign: 1 0x390-0x393.7 (4) +0x390| 00 00 00 00 | .... | entsize: 0 0x394-0x397.7 (4) + | | | [5]{}: section_header 0xec-0x3bf.7 (724) 0x0e0| 6c 69 62 62| libb| data: raw bits 0xec-0xf6.7 (11) 0x0f0|62 62 5f 62 62 62 00 |bb_bbb. | 0x390| 30 00 00 00 | 0... | name: ".rodata" (48) 0x398-0x39b.7 (4) @@ -158,7 +210,7 @@ $ fq -d ar dv libbbb.a 0x3b0| 00 00 00 00 | .... | info: 0 0x3b4-0x3b7.7 (4) 0x3b0| 04 00 00 00 | .... | addralign: 4 0x3b8-0x3bb.7 (4) 0x3b0| 00 00 00 00| ....| entsize: 0 0x3bc-0x3bf.7 (4) - | | | [4]{}: section_header 0xf7-0x3e7.7 (753) + | | | [6]{}: section_header 0xf7-0x3e7.7 (753) 0x0f0| 00 47 43 43 3a 20 28 41 6c| .GCC: (Al| data: raw bits 0xf7-0x128.7 (50) 0x100|70 69 6e 65 20 31 30 2e 33 2e 31 5f 67 69 74 32|pine 10.3.1_git2| * |until 0x128.7 (50) | | @@ -186,7 +238,7 @@ $ fq -d ar dv libbbb.a 0x3d0| 00 00 00 00| ....| info: 0 0x3dc-0x3df.7 (4) 0x3e0|01 00 00 00 |.... | addralign: 1 0x3e0-0x3e3.7 (4) 0x3e0| 01 00 00 00 | .... | entsize: 1 0x3e4-0x3e7.7 (4) - | | | [5]{}: section_header 0x129-0x40f.7 (743) + | | | [7]{}: section_header 0x129-0x40f.7 (743) | | | data: raw bits 0x129-NA (0) 0x3e0| 41 00 00 00 | A... | name: ".note.GNU-stack" (65) 0x3e8-0x3eb.7 (4) 0x3e0| 01 00 00 00| ....| type: "progbits" (0x1) (Information defined by the program) 0x3ec-0x3ef.7 (4) @@ -212,7 +264,7 @@ $ fq -d ar dv libbbb.a 0x400| 00 00 00 00 | .... | info: 0 0x404-0x407.7 (4) 0x400| 01 00 00 00 | .... | addralign: 1 0x408-0x40b.7 (4) 0x400| 00 00 00 00| ....| entsize: 0 0x40c-0x40f.7 (4) - | | | [6]{}: section_header 0x129-0x437.7 (783) + | | | [8]{}: section_header 0x129-0x437.7 (783) 0x120| 41 32 00 00 00 61 65| A2...ae| data: raw bits 0x129-0x15b.7 (51) 0x130|61 62 69 00 01 28 00 00 00 05 36 5a 4b 00 06 07|abi..(....6ZK...| * |until 0x15b.7 (51) | | @@ -240,7 +292,7 @@ $ fq -d ar dv libbbb.a 0x420| 00 00 00 00| ....| info: 0 0x42c-0x42f.7 (4) 0x430|01 00 00 00 |.... | addralign: 1 0x430-0x433.7 (4) 0x430| 00 00 00 00 | .... | entsize: 0 0x434-0x437.7 (4) - | | | [7]{}: section_header 0x15c-0x45f.7 (772) + | | | [9]{}: section_header 0x15c-0x45f.7 (772) | | | symbol_table[0:14]: 0x15c-0x23b.7 (224) | | | [0]{}: symbol 0x15c-0x16b.7 (16) 0x150| 00 00 00 00| ....| name: "" (0) 0x15c-0x15f.7 (4) @@ -392,7 +444,7 @@ $ fq -d ar dv libbbb.a 0x450| 0c 00 00 00 | .... | info: 12 0x454-0x457.7 (4) 0x450| 04 00 00 00 | .... | addralign: 4 0x458-0x45b.7 (4) 0x450| 10 00 00 00| ....| entsize: 16 0x45c-0x45f.7 (4) - | | | [8]{}: section_header 0x23c-0x487.7 (588) + | | | [10]{}: section_header 0x23c-0x487.7 (588) 0x230| 00 6c 69 62| .lib| string: "\x00libbbb.c\x00$d\x00$a\x00libbbb_bbb\x00puts\x00" 0x23c-0x25b.7 (32) 0x240|62 62 62 2e 63 00 24 64 00 24 61 00 6c 69 62 62|bbb.c.$d.$a.libb| 0x250|62 62 5f 62 62 62 00 70 75 74 73 00 |bb_bbb.puts. | @@ -420,34 +472,7 @@ $ fq -d ar dv libbbb.a 0x470| 00 00 00 00| ....| info: 0 0x47c-0x47f.7 (4) 0x480|01 00 00 00 |.... | addralign: 1 0x480-0x483.7 (4) 0x480| 00 00 00 00 | .... | entsize: 0 0x484-0x487.7 (4) - | | | [9]{}: section_header 0x25c-0x347.7 (236) -0x250| 14 00 00 00| ....| data: raw bits 0x25c-0x26b.7 (16) -0x260|1c 0d 00 00 20 00 00 00 03 05 00 00 |.... ....... | -0x320|1b 00 00 00 |.... | name: ".rel.text" (27) 0x320-0x323.7 (4) -0x320| 09 00 00 00 | .... | type: "rel" (0x9) (Relocation entries without explicit addends) 0x324-0x327.7 (4) - | | | flags{}: 0x328-0x32b.7 (4) -0x320| 40 | @ | link_order: false 0x328-0x328 (0.1) -0x320| 40 | @ | info_link: true 0x328.1-0x328.1 (0.1) -0x320| 40 | @ | strings: false 0x328.2-0x328.2 (0.1) -0x320| 40 | @ | merge: false 0x328.3-0x328.3 (0.1) -0x320| 40 | @ | unused0: 0 0x328.4-0x328.4 (0.1) -0x320| 40 | @ | execinstr: false 0x328.5-0x328.5 (0.1) -0x320| 40 | @ | alloc: false 0x328.6-0x328.6 (0.1) -0x320| 40 | @ | write: false 0x328.7-0x328.7 (0.1) -0x320| 00 | . | tls: false 0x329-0x329 (0.1) -0x320| 00 | . | group: false 0x329.1-0x329.1 (0.1) -0x320| 00 | . | os_nonconforming: false 0x329.2-0x329.2 (0.1) -0x320| 00 00 | .. | unused1: 0 0x329.3-0x32a.3 (1.1) -0x320| 00 00 | .. | os_specific: 0 0x32a.4-0x32b.3 (1) -0x320| 00 | . | processor_specific: 0 0x32b.4-0x32b.7 (0.4) -0x320| 00 00 00 00| ....| addr: 0x0 0x32c-0x32f.7 (4) -0x330|c8 01 00 00 |.... | offset: 456 0x330-0x333.7 (4) -0x330| 10 00 00 00 | .... | size: 0x10 0x334-0x337.7 (4) -0x330| 09 00 00 00 | .... | link: 9 0x338-0x33b.7 (4) -0x330| 01 00 00 00| ....| info: 1 0x33c-0x33f.7 (4) -0x340|04 00 00 00 |.... | addralign: 4 0x340-0x343.7 (4) -0x340| 08 00 00 00 | .... | entsize: 8 0x344-0x347.7 (4) - | | | [10]{}: section_header 0x26c-0x4af.7 (580) + | | | [11]{}: section_header 0x26c-0x4af.7 (580) 0x260| 00 2e 73 79| ..sy| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.rel.text\x00.data\x00.bss\x00.r"... 0x26c-0x2cc.7 (97) 0x270|6d 74 61 62 00 2e 73 74 72 74 61 62 00 2e 73 68|mtab..strtab..sh| * |until 0x2cc.7 (97) | | @@ -475,30 +500,5 @@ $ fq -d ar dv libbbb.a 0x4a0| 00 00 00 00 | .... | info: 0 0x4a4-0x4a7.7 (4) 0x4a0| 01 00 00 00 | .... | addralign: 1 0x4a8-0x4ab.7 (4) 0x4a0| 00 00 00 00| ....| entsize: 0 0x4ac-0x4af.7 (4) - | | | [11]{}: section_header 0x370-0x397.7 (40) -0x370|2b 00 00 00 |+... | name: ".bss" (43) 0x370-0x373.7 (4) -0x370| 08 00 00 00 | .... | type: "nobits" (0x8) (No space in the file) 0x374-0x377.7 (4) - | | | flags{}: 0x378-0x37b.7 (4) -0x370| 03 | . | link_order: false 0x378-0x378 (0.1) -0x370| 03 | . | info_link: false 0x378.1-0x378.1 (0.1) -0x370| 03 | . | strings: false 0x378.2-0x378.2 (0.1) -0x370| 03 | . | merge: false 0x378.3-0x378.3 (0.1) -0x370| 03 | . | unused0: 0 0x378.4-0x378.4 (0.1) -0x370| 03 | . | execinstr: false 0x378.5-0x378.5 (0.1) -0x370| 03 | . | alloc: true 0x378.6-0x378.6 (0.1) -0x370| 03 | . | write: true 0x378.7-0x378.7 (0.1) -0x370| 00 | . | tls: false 0x379-0x379 (0.1) -0x370| 00 | . | group: false 0x379.1-0x379.1 (0.1) -0x370| 00 | . | os_nonconforming: false 0x379.2-0x379.2 (0.1) -0x370| 00 00 | .. | unused1: 0 0x379.3-0x37a.3 (1.1) -0x370| 00 00 | .. | os_specific: 0 0x37a.4-0x37b.3 (1) -0x370| 00 | . | processor_specific: 0 0x37b.4-0x37b.7 (0.4) -0x370| 00 00 00 00| ....| addr: 0x0 0x37c-0x37f.7 (4) -0x380|58 00 00 00 |X... | offset: 88 0x380-0x383.7 (4) -0x380| 00 00 00 00 | .... | size: 0x0 0x384-0x387.7 (4) -0x380| 00 00 00 00 | .... | link: 0 0x388-0x38b.7 (4) -0x380| 00 00 00 00| ....| info: 0 0x38c-0x38f.7 (4) -0x390|01 00 00 00 |.... | addralign: 1 0x390-0x393.7 (4) -0x390| 00 00 00 00 | .... | entsize: 0 0x394-0x397.7 (4) 0x2c0| 00 00 00| ...| unknown0: raw bits 0x2cd-0x2cf.7 (3) | | | program_headers[0:0]: 0x4b0-NA (0) diff --git a/format/elf/testdata/linux_arm_v6/libbbb.so.fqtest b/format/elf/testdata/linux_arm_v6/libbbb.so.fqtest index 4a4c42c3c..f7cdf15fd 100644 --- a/format/elf/testdata/linux_arm_v6/libbbb.so.fqtest +++ b/format/elf/testdata/linux_arm_v6/libbbb.so.fqtest @@ -40,23 +40,7 @@ $ fq -d elf dv libbbb.so 0x0040| 05 | . | x: true 0x4c.7-0x4c.7 (0.1) 0x0040| 00 00 00| ...| unused1: 0 0x4d-0x4f.7 (3) 0x0050|00 00 01 00 |.... | align: 65536 0x50-0x53.7 (4) - | | | [1]{}: program_header 0x0-0xb3.7 (180) - | | | program_header{}: 0x0-0xb3.7 (180) - | | | data: raw bits 0x0-NA (0) -0x0090| 51 e5 74 64 | Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0x94-0x97.7 (4) -0x0090| 00 00 00 00 | .... | offset: 0x0 0x98-0x9b.7 (4) -0x0090| 00 00 00 00| ....| vaddr: 0x0 0x9c-0x9f.7 (4) -0x00a0|00 00 00 00 |.... | paddr: 0x0 0xa0-0xa3.7 (4) -0x00a0| 00 00 00 00 | .... | filesz: 0 0xa4-0xa7.7 (4) -0x00a0| 00 00 00 00 | .... | memsz: 0 0xa8-0xab.7 (4) - | | | flags{}: 0xac-0xaf.7 (4) -0x00a0| 06 | . | unused0: 0 0xac-0xac.4 (0.5) -0x00a0| 06 | . | r: true 0xac.5-0xac.5 (0.1) -0x00a0| 06 | . | w: true 0xac.6-0xac.6 (0.1) -0x00a0| 06 | . | x: false 0xac.7-0xac.7 (0.1) -0x00a0| 00 00 00| ...| unused1: 0 0xad-0xaf.7 (3) -0x00b0|10 00 00 00 |.... | align: 16 0xb0-0xb3.7 (4) - | | | [2]{}: program_header 0x54-0x1003.7 (4016) + | | | [1]{}: program_header 0x54-0x1003.7 (4016) | | | program_header{}: 0x54-0x1003.7 (4016) 0x0050| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x54-0x57.7 (4) 0x0050| f0 0e 00 00 | .... | offset: 0xef0 0x58-0x5b.7 (4) @@ -73,7 +57,7 @@ $ fq -d elf dv libbbb.so 0x0070|00 00 01 00 |.... | align: 65536 0x70-0x73.7 (4) 0x0ef0|38 04 00 00 ac 03 00 00 01 00 00 00 90 00 00 00|8...............| data: raw bits 0xef0-0x1003.7 (276) * |until 0x1003.7 (276) | | - | | | [3]{}: program_header 0x74-0xfcf.7 (3932) + | | | [2]{}: program_header 0x74-0xfcf.7 (3932) | | | program_header{}: 0x74-0xfcf.7 (3932) 0x0070| 02 00 00 00 | .... | type: "dynamic" (2) (Dynamic linking information) 0x74-0x77.7 (4) 0x0070| f8 0e 00 00 | .... | offset: 0xef8 0x78-0x7b.7 (4) @@ -91,6 +75,22 @@ $ fq -d elf dv libbbb.so 0x0ef0| 01 00 00 00 90 00 00 00| ........| data: raw bits 0xef8-0xfcf.7 (216) 0x0f00|0c 00 00 00 c8 02 00 00 0d 00 00 00 a8 04 00 00|................| * |until 0xfcf.7 (216) | | + | | | [3]{}: program_header 0x0-0xb3.7 (180) + | | | program_header{}: 0x0-0xb3.7 (180) + | | | data: raw bits 0x0-NA (0) +0x0090| 51 e5 74 64 | Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0x94-0x97.7 (4) +0x0090| 00 00 00 00 | .... | offset: 0x0 0x98-0x9b.7 (4) +0x0090| 00 00 00 00| ....| vaddr: 0x0 0x9c-0x9f.7 (4) +0x00a0|00 00 00 00 |.... | paddr: 0x0 0xa0-0xa3.7 (4) +0x00a0| 00 00 00 00 | .... | filesz: 0 0xa4-0xa7.7 (4) +0x00a0| 00 00 00 00 | .... | memsz: 0 0xa8-0xab.7 (4) + | | | flags{}: 0xac-0xaf.7 (4) +0x00a0| 06 | . | unused0: 0 0xac-0xac.4 (0.5) +0x00a0| 06 | . | r: true 0xac.5-0xac.5 (0.1) +0x00a0| 06 | . | w: true 0xac.6-0xac.6 (0.1) +0x00a0| 06 | . | x: false 0xac.7-0xac.7 (0.1) +0x00a0| 00 00 00| ...| unused1: 0 0xad-0xaf.7 (3) +0x00b0|10 00 00 00 |.... | align: 16 0xb0-0xb3.7 (4) | | | [4]{}: program_header 0xb4-0xfff.7 (3916) | | | program_header{}: 0xb4-0xfff.7 (3916) 0x00b0| 52 e5 74 64 | R.td | type: "gnu_relro" (1685382482) (GNU read-only after relocation) 0xb4-0xb7.7 (4) @@ -762,7 +762,32 @@ $ fq -d elf dv libbbb.so 0x1cb0| 00 00 00 00 | .... | info: 0 0x1cb4-0x1cb7.7 (4) 0x1cb0| 04 00 00 00 | .... | addralign: 4 0x1cb8-0x1cbb.7 (4) 0x1cb0| 00 00 00 00| ....| entsize: 0 0x1cbc-0x1cbf.7 (4) - | | | [17]{}: section_header 0x1004-0x1d0f.7 (3340) + | | | [17]{}: section_header 0x1cc0-0x1ce7.7 (40) +0x1cc0|97 00 00 00 |.... | name: ".bss" (151) 0x1cc0-0x1cc3.7 (4) +0x1cc0| 08 00 00 00 | .... | type: "nobits" (0x8) (No space in the file) 0x1cc4-0x1cc7.7 (4) + | | | flags{}: 0x1cc8-0x1ccb.7 (4) +0x1cc0| 03 | . | link_order: false 0x1cc8-0x1cc8 (0.1) +0x1cc0| 03 | . | info_link: false 0x1cc8.1-0x1cc8.1 (0.1) +0x1cc0| 03 | . | strings: false 0x1cc8.2-0x1cc8.2 (0.1) +0x1cc0| 03 | . | merge: false 0x1cc8.3-0x1cc8.3 (0.1) +0x1cc0| 03 | . | unused0: 0 0x1cc8.4-0x1cc8.4 (0.1) +0x1cc0| 03 | . | execinstr: false 0x1cc8.5-0x1cc8.5 (0.1) +0x1cc0| 03 | . | alloc: true 0x1cc8.6-0x1cc8.6 (0.1) +0x1cc0| 03 | . | write: true 0x1cc8.7-0x1cc8.7 (0.1) +0x1cc0| 00 | . | tls: false 0x1cc9-0x1cc9 (0.1) +0x1cc0| 00 | . | group: false 0x1cc9.1-0x1cc9.1 (0.1) +0x1cc0| 00 | . | os_nonconforming: false 0x1cc9.2-0x1cc9.2 (0.1) +0x1cc0| 00 00 | .. | unused1: 0 0x1cc9.3-0x1cca.3 (1.1) +0x1cc0| 00 00 | .. | os_specific: 0 0x1cca.4-0x1ccb.3 (1) +0x1cc0| 00 | . | processor_specific: 0 0x1ccb.4-0x1ccb.7 (0.4) +0x1cc0| 04 10 01 00| ....| addr: 0x11004 0x1ccc-0x1ccf.7 (4) +0x1cd0|04 10 00 00 |.... | offset: 4100 0x1cd0-0x1cd3.7 (4) +0x1cd0| 1c 00 00 00 | .... | size: 0x1c 0x1cd4-0x1cd7.7 (4) +0x1cd0| 00 00 00 00 | .... | link: 0 0x1cd8-0x1cdb.7 (4) +0x1cd0| 00 00 00 00| ....| info: 0 0x1cdc-0x1cdf.7 (4) +0x1ce0|04 00 00 00 |.... | addralign: 4 0x1ce0-0x1ce3.7 (4) +0x1ce0| 00 00 00 00 | .... | entsize: 0 0x1ce4-0x1ce7.7 (4) + | | | [18]{}: section_header 0x1004-0x1d0f.7 (3340) 0x1000| 47 43 43 3a 20 28 41 6c 70 69 6e 65| GCC: (Alpine| data: raw bits 0x1004-0x1034.7 (49) 0x1010|20 31 30 2e 33 2e 31 5f 67 69 74 32 30 32 31 31| 10.3.1_git20211| * |until 0x1034.7 (49) | | @@ -790,7 +815,7 @@ $ fq -d elf dv libbbb.so 0x1d00| 00 00 00 00 | .... | info: 0 0x1d04-0x1d07.7 (4) 0x1d00| 01 00 00 00 | .... | addralign: 1 0x1d08-0x1d0b.7 (4) 0x1d00| 01 00 00 00| ....| entsize: 1 0x1d0c-0x1d0f.7 (4) - | | | [18]{}: section_header 0x1035-0x1d37.7 (3331) + | | | [19]{}: section_header 0x1035-0x1d37.7 (3331) 0x1030| 41 2e 00 00 00 61 65 61 62 69 00| A....aeabi.| data: raw bits 0x1035-0x1063.7 (47) 0x1040|01 24 00 00 00 05 36 5a 4b 00 06 07 08 01 09 01|.$....6ZK.......| * |until 0x1063.7 (47) | | @@ -818,7 +843,7 @@ $ fq -d elf dv libbbb.so 0x1d20| 00 00 00 00| ....| info: 0 0x1d2c-0x1d2f.7 (4) 0x1d30|01 00 00 00 |.... | addralign: 1 0x1d30-0x1d33.7 (4) 0x1d30| 00 00 00 00 | .... | entsize: 0 0x1d34-0x1d37.7 (4) - | | | [19]{}: section_header 0x1068-0x1d5f.7 (3320) + | | | [20]{}: section_header 0x1068-0x1d5f.7 (3320) 0x1060| 24 00 00 00 02 00 00 00| $.......| data: raw bits 0x1068-0x10b7.7 (80) 0x1070|00 00 04 00 00 00 00 00 c8 02 00 00 04 00 00 00|................| * |until 0x10b7.7 (80) | | @@ -846,7 +871,7 @@ $ fq -d elf dv libbbb.so 0x1d50| 00 00 00 00 | .... | info: 0 0x1d54-0x1d57.7 (4) 0x1d50| 08 00 00 00 | .... | addralign: 8 0x1d58-0x1d5b.7 (4) 0x1d50| 00 00 00 00| ....| entsize: 0 0x1d5c-0x1d5f.7 (4) - | | | [20]{}: section_header 0x10b8-0x1d87.7 (3280) + | | | [21]{}: section_header 0x10b8-0x1d87.7 (3280) 0x10b0| 1e 00 00 00 02 00 00 00| ........| data: raw bits 0x10b8-0x10fb.7 (68) 0x10c0|00 00 04 01 00 00 00 00 00 00 00 00 00 00 00 00|................| * |until 0x10fb.7 (68) | | @@ -874,7 +899,7 @@ $ fq -d elf dv libbbb.so 0x1d70| 00 00 00 00| ....| info: 0 0x1d7c-0x1d7f.7 (4) 0x1d80|01 00 00 00 |.... | addralign: 1 0x1d80-0x1d83.7 (4) 0x1d80| 00 00 00 00 | .... | entsize: 0 0x1d84-0x1d87.7 (4) - | | | [21]{}: section_header 0x10fc-0x1daf.7 (3252) + | | | [22]{}: section_header 0x10fc-0x1daf.7 (3252) 0x10f0| 01 11 00 10| ....| data: raw bits 0x10fc-0x111f.7 (36) 0x1100|06 55 06 03 0e 1b 0e 25 0e 13 05 00 00 00 01 11|.U.....%........| 0x1110|00 10 06 55 06 03 0e 1b 0e 25 0e 13 05 00 00 00|...U.....%......| @@ -902,7 +927,7 @@ $ fq -d elf dv libbbb.so 0x1da0| 00 00 00 00 | .... | info: 0 0x1da4-0x1da7.7 (4) 0x1da0| 01 00 00 00 | .... | addralign: 1 0x1da8-0x1dab.7 (4) 0x1da0| 00 00 00 00| ....| entsize: 0 0x1dac-0x1daf.7 (4) - | | | [22]{}: section_header 0x1120-0x1dd7.7 (3256) + | | | [23]{}: section_header 0x1120-0x1dd7.7 (3256) 0x1120|47 00 00 00 03 00 25 00 00 00 02 01 fb 0e 0d 00|G.....%.........| data: raw bits 0x1120-0x11b5.7 (150) * |until 0x11b5.7 (150) | | 0x1db0|de 00 00 00 |.... | name: ".debug_line" (222) 0x1db0-0x1db3.7 (4) @@ -929,7 +954,7 @@ $ fq -d elf dv libbbb.so 0x1dc0| 00 00 00 00| ....| info: 0 0x1dcc-0x1dcf.7 (4) 0x1dd0|01 00 00 00 |.... | addralign: 1 0x1dd0-0x1dd3.7 (4) 0x1dd0| 00 00 00 00 | .... | entsize: 0 0x1dd4-0x1dd7.7 (4) - | | | [23]{}: section_header 0x11b6-0x1dff.7 (3146) + | | | [24]{}: section_header 0x11b6-0x1dff.7 (3146) 0x11b0| 63 72 74 2f 61 72 6d 2f 63 72| crt/arm/cr| data: raw bits 0x11b6-0x120b.7 (86) 0x11c0|74 69 2e 73 00 2f 68 6f 6d 65 2f 62 75 69 6c 64|ti.s./home/build| * |until 0x120b.7 (86) | | @@ -957,7 +982,7 @@ $ fq -d elf dv libbbb.so 0x1df0| 00 00 00 00 | .... | info: 0 0x1df4-0x1df7.7 (4) 0x1df0| 01 00 00 00 | .... | addralign: 1 0x1df8-0x1dfb.7 (4) 0x1df0| 01 00 00 00| ....| entsize: 1 0x1dfc-0x1dff.7 (4) - | | | [24]{}: section_header 0x1210-0x1e27.7 (3096) + | | | [25]{}: section_header 0x1210-0x1e27.7 (3096) 0x1210|ff ff ff ff 00 00 00 00 c8 02 00 00 cc 02 00 00|................| data: raw bits 0x1210-0x124f.7 (64) * |until 0x124f.7 (64) | | 0x1e00|f5 00 00 00 |.... | name: ".debug_ranges" (245) 0x1e00-0x1e03.7 (4) @@ -984,7 +1009,7 @@ $ fq -d elf dv libbbb.so 0x1e10| 00 00 00 00| ....| info: 0 0x1e1c-0x1e1f.7 (4) 0x1e20|08 00 00 00 |.... | addralign: 8 0x1e20-0x1e23.7 (4) 0x1e20| 00 00 00 00 | .... | entsize: 0 0x1e24-0x1e27.7 (4) - | | | [25]{}: section_header 0x1250-0x1e4f.7 (3072) + | | | [26]{}: section_header 0x1250-0x1e4f.7 (3072) | | | symbol_table[0:82]: 0x1250-0x176f.7 (1312) | | | [0]{}: symbol 0x1250-0x125f.7 (16) 0x1250|00 00 00 00 |.... | name: "" (0) 0x1250-0x1253.7 (4) @@ -1748,7 +1773,7 @@ $ fq -d elf dv libbbb.so 0x1e40| 49 00 00 00 | I... | info: 73 0x1e44-0x1e47.7 (4) 0x1e40| 04 00 00 00 | .... | addralign: 4 0x1e48-0x1e4b.7 (4) 0x1e40| 10 00 00 00| ....| entsize: 16 0x1e4c-0x1e4f.7 (4) - | | | [26]{}: section_header 0x1770-0x1e77.7 (1800) + | | | [27]{}: section_header 0x1770-0x1e77.7 (1800) 0x1770|00 63 72 74 69 2e 6f 00 24 61 00 63 72 74 6e 2e|.crti.o.$a.crtn.| string: "\x00crti.o\x00$a\x00crtn.o\x00crtstuff.c\x00$d\x00all_implied_fbits\x00"... 0x1770-0x1911.7 (418) * |until 0x1911.7 (418) | | 0x1e50|09 00 00 00 |.... | name: ".strtab" (9) 0x1e50-0x1e53.7 (4) @@ -1775,7 +1800,7 @@ $ fq -d elf dv libbbb.so 0x1e60| 00 00 00 00| ....| info: 0 0x1e6c-0x1e6f.7 (4) 0x1e70|01 00 00 00 |.... | addralign: 1 0x1e70-0x1e73.7 (4) 0x1e70| 00 00 00 00 | .... | entsize: 0 0x1e74-0x1e77.7 (4) - | | | [27]{}: section_header 0x1912-0x1e9f.7 (1422) + | | | [28]{}: section_header 0x1912-0x1e9f.7 (1422) 0x1910| 00 2e 73 79 6d 74 61 62 00 2e 73 74 72 74| ..symtab..strt| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.gnu.hash\x00.dynsym\x00.dyns"... 0x1912-0x1a14.7 (259) 0x1920|61 62 00 2e 73 68 73 74 72 74 61 62 00 2e 67 6e|ab..shstrtab..gn| * |until 0x1a14.7 (259) | | @@ -1803,31 +1828,6 @@ $ fq -d elf dv libbbb.so 0x1e90| 00 00 00 00 | .... | info: 0 0x1e94-0x1e97.7 (4) 0x1e90| 01 00 00 00 | .... | addralign: 1 0x1e98-0x1e9b.7 (4) 0x1e90| 00 00 00 00| ....| entsize: 0 0x1e9c-0x1e9f.7 (4) - | | | [28]{}: section_header 0x1cc0-0x1ce7.7 (40) -0x1cc0|97 00 00 00 |.... | name: ".bss" (151) 0x1cc0-0x1cc3.7 (4) -0x1cc0| 08 00 00 00 | .... | type: "nobits" (0x8) (No space in the file) 0x1cc4-0x1cc7.7 (4) - | | | flags{}: 0x1cc8-0x1ccb.7 (4) -0x1cc0| 03 | . | link_order: false 0x1cc8-0x1cc8 (0.1) -0x1cc0| 03 | . | info_link: false 0x1cc8.1-0x1cc8.1 (0.1) -0x1cc0| 03 | . | strings: false 0x1cc8.2-0x1cc8.2 (0.1) -0x1cc0| 03 | . | merge: false 0x1cc8.3-0x1cc8.3 (0.1) -0x1cc0| 03 | . | unused0: 0 0x1cc8.4-0x1cc8.4 (0.1) -0x1cc0| 03 | . | execinstr: false 0x1cc8.5-0x1cc8.5 (0.1) -0x1cc0| 03 | . | alloc: true 0x1cc8.6-0x1cc8.6 (0.1) -0x1cc0| 03 | . | write: true 0x1cc8.7-0x1cc8.7 (0.1) -0x1cc0| 00 | . | tls: false 0x1cc9-0x1cc9 (0.1) -0x1cc0| 00 | . | group: false 0x1cc9.1-0x1cc9.1 (0.1) -0x1cc0| 00 | . | os_nonconforming: false 0x1cc9.2-0x1cc9.2 (0.1) -0x1cc0| 00 00 | .. | unused1: 0 0x1cc9.3-0x1cca.3 (1.1) -0x1cc0| 00 00 | .. | os_specific: 0 0x1cca.4-0x1ccb.3 (1) -0x1cc0| 00 | . | processor_specific: 0 0x1ccb.4-0x1ccb.7 (0.4) -0x1cc0| 04 10 01 00| ....| addr: 0x11004 0x1ccc-0x1ccf.7 (4) -0x1cd0|04 10 00 00 |.... | offset: 4100 0x1cd0-0x1cd3.7 (4) -0x1cd0| 1c 00 00 00 | .... | size: 0x1c 0x1cd4-0x1cd7.7 (4) -0x1cd0| 00 00 00 00 | .... | link: 0 0x1cd8-0x1cdb.7 (4) -0x1cd0| 00 00 00 00| ....| info: 0 0x1cdc-0x1cdf.7 (4) -0x1ce0|04 00 00 00 |.... | addralign: 4 0x1ce0-0x1ce3.7 (4) -0x1ce0| 00 00 00 00 | .... | entsize: 0 0x1ce4-0x1ce7.7 (4) 0x05e0| 00 00 00 00 00 00 00 00 00 00 00 00| ............| unknown0: raw bits 0x5e4-0xeef.7 (2316) 0x05f0|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................| * |until 0xeef.7 (2316) | | diff --git a/format/elf/testdata/linux_arm_v7/a_dynamic.fqtest b/format/elf/testdata/linux_arm_v7/a_dynamic.fqtest index 2d51b34bd..5960966cf 100644 --- a/format/elf/testdata/linux_arm_v7/a_dynamic.fqtest +++ b/format/elf/testdata/linux_arm_v7/a_dynamic.fqtest @@ -23,40 +23,7 @@ $ fq -d elf dv a_dynamic 0x0030|20 00 | . | shnum: 32 0x30-0x31.7 (2) 0x0030| 1f 00 | .. | shstrndx: 31 0x32-0x33.7 (2) | | | program_headers[0:7]: 0x0-0x1003.7 (4100) - | | | [0]{}: program_header 0x0-0x73b.7 (1852) - | | | program_header{}: 0x0-0x73b.7 (1852) -0x0000|7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00|.ELF............| data: raw bits 0x0-0x73b.7 (1852) -* |until 0x73b.7 (1852) | | -0x0070| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x74-0x77.7 (4) -0x0070| 00 00 00 00 | .... | offset: 0x0 0x78-0x7b.7 (4) -0x0070| 00 00 00 00| ....| vaddr: 0x0 0x7c-0x7f.7 (4) -0x0080|00 00 00 00 |.... | paddr: 0x0 0x80-0x83.7 (4) -0x0080| 3c 07 00 00 | <... | filesz: 1852 0x84-0x87.7 (4) -0x0080| 3c 07 00 00 | <... | memsz: 1852 0x88-0x8b.7 (4) - | | | flags{}: 0x8c-0x8f.7 (4) -0x0080| 05 | . | unused0: 0 0x8c-0x8c.4 (0.5) -0x0080| 05 | . | r: true 0x8c.5-0x8c.5 (0.1) -0x0080| 05 | . | w: false 0x8c.6-0x8c.6 (0.1) -0x0080| 05 | . | x: true 0x8c.7-0x8c.7 (0.1) -0x0080| 00 00 00| ...| unused1: 0 0x8d-0x8f.7 (3) -0x0090|00 00 01 00 |.... | align: 65536 0x90-0x93.7 (4) - | | | [1]{}: program_header 0x0-0xf3.7 (244) - | | | program_header{}: 0x0-0xf3.7 (244) - | | | data: raw bits 0x0-NA (0) -0x00d0| 51 e5 74 64 | Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0xd4-0xd7.7 (4) -0x00d0| 00 00 00 00 | .... | offset: 0x0 0xd8-0xdb.7 (4) -0x00d0| 00 00 00 00| ....| vaddr: 0x0 0xdc-0xdf.7 (4) -0x00e0|00 00 00 00 |.... | paddr: 0x0 0xe0-0xe3.7 (4) -0x00e0| 00 00 00 00 | .... | filesz: 0 0xe4-0xe7.7 (4) -0x00e0| 00 00 00 00 | .... | memsz: 0 0xe8-0xeb.7 (4) - | | | flags{}: 0xec-0xef.7 (4) -0x00e0| 06 | . | unused0: 0 0xec-0xec.4 (0.5) -0x00e0| 06 | . | r: true 0xec.5-0xec.5 (0.1) -0x00e0| 06 | . | w: true 0xec.6-0xec.6 (0.1) -0x00e0| 06 | . | x: false 0xec.7-0xec.7 (0.1) -0x00e0| 00 00 00| ...| unused1: 0 0xed-0xef.7 (3) -0x00f0|10 00 00 00 |.... | align: 16 0xf0-0xf3.7 (4) - | | | [2]{}: program_header 0x34-0x113.7 (224) + | | | [0]{}: program_header 0x34-0x113.7 (224) | | | program_header{}: 0x34-0x113.7 (224) 0x0030| 06 00 00 00 | .... | type: "phdr" (6) (Program header location and size) 0x34-0x37.7 (4) 0x0030| 06 00 00 00 34 00 00 00 34 00 00 00| ....4...4...| data: raw bits 0x34-0x113.7 (224) @@ -74,7 +41,7 @@ $ fq -d elf dv a_dynamic 0x0040| 04 | . | x: false 0x4c.7-0x4c.7 (0.1) 0x0040| 00 00 00| ...| unused1: 0 0x4d-0x4f.7 (3) 0x0050|04 00 00 00 |.... | align: 4 0x50-0x53.7 (4) - | | | [3]{}: program_header 0x54-0x12b.7 (216) + | | | [1]{}: program_header 0x54-0x12b.7 (216) | | | program_header{}: 0x54-0x12b.7 (216) 0x0050| 03 00 00 00 | .... | type: "interp" (3) (Interpreter to invoke) 0x54-0x57.7 (4) 0x0050| 14 01 00 00 | .... | offset: 0x114 0x58-0x5b.7 (4) @@ -91,7 +58,24 @@ $ fq -d elf dv a_dynamic 0x0070|01 00 00 00 |.... | align: 1 0x70-0x73.7 (4) 0x0110| 2f 6c 69 62 2f 6c 64 2d 6d 75 73 6c| /lib/ld-musl| data: raw bits 0x114-0x12b.7 (24) 0x0120|2d 61 72 6d 68 66 2e 73 6f 2e 31 00 |-armhf.so.1. | - | | | [4]{}: program_header 0x94-0x1003.7 (3952) + | | | [2]{}: program_header 0x0-0x73b.7 (1852) + | | | program_header{}: 0x0-0x73b.7 (1852) +0x0000|7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00|.ELF............| data: raw bits 0x0-0x73b.7 (1852) +* |until 0x73b.7 (1852) | | +0x0070| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x74-0x77.7 (4) +0x0070| 00 00 00 00 | .... | offset: 0x0 0x78-0x7b.7 (4) +0x0070| 00 00 00 00| ....| vaddr: 0x0 0x7c-0x7f.7 (4) +0x0080|00 00 00 00 |.... | paddr: 0x0 0x80-0x83.7 (4) +0x0080| 3c 07 00 00 | <... | filesz: 1852 0x84-0x87.7 (4) +0x0080| 3c 07 00 00 | <... | memsz: 1852 0x88-0x8b.7 (4) + | | | flags{}: 0x8c-0x8f.7 (4) +0x0080| 05 | . | unused0: 0 0x8c-0x8c.4 (0.5) +0x0080| 05 | . | r: true 0x8c.5-0x8c.5 (0.1) +0x0080| 05 | . | w: false 0x8c.6-0x8c.6 (0.1) +0x0080| 05 | . | x: true 0x8c.7-0x8c.7 (0.1) +0x0080| 00 00 00| ...| unused1: 0 0x8d-0x8f.7 (3) +0x0090|00 00 01 00 |.... | align: 65536 0x90-0x93.7 (4) + | | | [3]{}: program_header 0x94-0x1003.7 (3952) | | | program_header{}: 0x94-0x1003.7 (3952) 0x0090| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x94-0x97.7 (4) 0x0090| cc 0e 00 00 | .... | offset: 0xecc 0x98-0x9b.7 (4) @@ -109,7 +93,7 @@ $ fq -d elf dv a_dynamic 0x0ec0| 7c 05 00 00| |...| data: raw bits 0xecc-0x1003.7 (312) 0x0ed0|f0 04 00 00 01 00 00 00 a2 00 00 00 01 00 00 00|................| * |until 0x1003.7 (312) | | - | | | [5]{}: program_header 0xb4-0xfbb.7 (3848) + | | | [4]{}: program_header 0xb4-0xfbb.7 (3848) | | | program_header{}: 0xb4-0xfbb.7 (3848) 0x00b0| 02 00 00 00 | .... | type: "dynamic" (2) (Dynamic linking information) 0xb4-0xb7.7 (4) 0x00b0| d4 0e 00 00 | .... | offset: 0xed4 0xb8-0xbb.7 (4) @@ -127,6 +111,22 @@ $ fq -d elf dv a_dynamic 0x0ed0| 01 00 00 00 a2 00 00 00 01 00 00 00| ............| data: raw bits 0xed4-0xfbb.7 (232) 0x0ee0|ac 00 00 00 0c 00 00 00 6c 03 00 00 0d 00 00 00|........l.......| * |until 0xfbb.7 (232) | | + | | | [5]{}: program_header 0x0-0xf3.7 (244) + | | | program_header{}: 0x0-0xf3.7 (244) + | | | data: raw bits 0x0-NA (0) +0x00d0| 51 e5 74 64 | Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0xd4-0xd7.7 (4) +0x00d0| 00 00 00 00 | .... | offset: 0x0 0xd8-0xdb.7 (4) +0x00d0| 00 00 00 00| ....| vaddr: 0x0 0xdc-0xdf.7 (4) +0x00e0|00 00 00 00 |.... | paddr: 0x0 0xe0-0xe3.7 (4) +0x00e0| 00 00 00 00 | .... | filesz: 0 0xe4-0xe7.7 (4) +0x00e0| 00 00 00 00 | .... | memsz: 0 0xe8-0xeb.7 (4) + | | | flags{}: 0xec-0xef.7 (4) +0x00e0| 06 | . | unused0: 0 0xec-0xec.4 (0.5) +0x00e0| 06 | . | r: true 0xec.5-0xec.5 (0.1) +0x00e0| 06 | . | w: true 0xec.6-0xec.6 (0.1) +0x00e0| 06 | . | x: false 0xec.7-0xec.7 (0.1) +0x00e0| 00 00 00| ...| unused1: 0 0xed-0xef.7 (3) +0x00f0|10 00 00 00 |.... | align: 16 0xf0-0xf3.7 (4) | | | [6]{}: program_header 0xf4-0xfff.7 (3852) | | | program_header{}: 0xf4-0xfff.7 (3852) 0x00f0| 52 e5 74 64 | R.td | type: "gnu_relro" (1685382482) (GNU read-only after relocation) 0xf4-0xf7.7 (4) @@ -840,7 +840,32 @@ $ fq -d elf dv a_dynamic 0x2350| 00 00 00 00 | .... | info: 0 0x2358-0x235b.7 (4) 0x2350| 04 00 00 00| ....| addralign: 4 0x235c-0x235f.7 (4) 0x2360|00 00 00 00 |.... | entsize: 0 0x2360-0x2363.7 (4) - | | | [18]{}: section_header 0x1004-0x23b3.7 (5040) + | | | [18]{}: section_header 0x2364-0x238b.7 (40) +0x2360| 9f 00 00 00 | .... | name: ".bss" (159) 0x2364-0x2367.7 (4) +0x2360| 08 00 00 00 | .... | type: "nobits" (0x8) (No space in the file) 0x2368-0x236b.7 (4) + | | | flags{}: 0x236c-0x236f.7 (4) +0x2360| 03 | . | link_order: false 0x236c-0x236c (0.1) +0x2360| 03 | . | info_link: false 0x236c.1-0x236c.1 (0.1) +0x2360| 03 | . | strings: false 0x236c.2-0x236c.2 (0.1) +0x2360| 03 | . | merge: false 0x236c.3-0x236c.3 (0.1) +0x2360| 03 | . | unused0: 0 0x236c.4-0x236c.4 (0.1) +0x2360| 03 | . | execinstr: false 0x236c.5-0x236c.5 (0.1) +0x2360| 03 | . | alloc: true 0x236c.6-0x236c.6 (0.1) +0x2360| 03 | . | write: true 0x236c.7-0x236c.7 (0.1) +0x2360| 00 | . | tls: false 0x236d-0x236d (0.1) +0x2360| 00 | . | group: false 0x236d.1-0x236d.1 (0.1) +0x2360| 00 | . | os_nonconforming: false 0x236d.2-0x236d.2 (0.1) +0x2360| 00 00 | .. | unused1: 0 0x236d.3-0x236e.3 (1.1) +0x2360| 00 00| ..| os_specific: 0 0x236e.4-0x236f.3 (1) +0x2360| 00| .| processor_specific: 0 0x236f.4-0x236f.7 (0.4) +0x2370|04 10 01 00 |.... | addr: 0x11004 0x2370-0x2373.7 (4) +0x2370| 04 10 00 00 | .... | offset: 4100 0x2374-0x2377.7 (4) +0x2370| 1c 00 00 00 | .... | size: 0x1c 0x2378-0x237b.7 (4) +0x2370| 00 00 00 00| ....| link: 0 0x237c-0x237f.7 (4) +0x2380|00 00 00 00 |.... | info: 0 0x2380-0x2383.7 (4) +0x2380| 04 00 00 00 | .... | addralign: 4 0x2384-0x2387.7 (4) +0x2380| 00 00 00 00 | .... | entsize: 0 0x2388-0x238b.7 (4) + | | | [19]{}: section_header 0x1004-0x23b3.7 (5040) 0x1000| 47 43 43 3a 20 28 41 6c 70 69 6e 65| GCC: (Alpine| data: raw bits 0x1004-0x1065.7 (98) 0x1010|20 31 30 2e 33 2e 31 5f 67 69 74 32 30 32 31 30| 10.3.1_git20210| * |until 0x1065.7 (98) | | @@ -868,7 +893,7 @@ $ fq -d elf dv a_dynamic 0x23a0| 00 00 00 00 | .... | info: 0 0x23a8-0x23ab.7 (4) 0x23a0| 01 00 00 00| ....| addralign: 1 0x23ac-0x23af.7 (4) 0x23b0|01 00 00 00 |.... | entsize: 1 0x23b0-0x23b3.7 (4) - | | | [19]{}: section_header 0x1066-0x23db.7 (4982) + | | | [20]{}: section_header 0x1066-0x23db.7 (4982) 0x1060| 41 32 00 00 00 61 65 61 62 69| A2...aeabi| data: raw bits 0x1066-0x1098.7 (51) 0x1070|00 01 28 00 00 00 05 36 5a 4b 00 06 07 08 01 09|..(....6ZK......| * |until 0x1098.7 (51) | | @@ -896,7 +921,7 @@ $ fq -d elf dv a_dynamic 0x23d0|00 00 00 00 |.... | info: 0 0x23d0-0x23d3.7 (4) 0x23d0| 01 00 00 00 | .... | addralign: 1 0x23d4-0x23d7.7 (4) 0x23d0| 00 00 00 00 | .... | entsize: 0 0x23d8-0x23db.7 (4) - | | | [20]{}: section_header 0x10a0-0x2403.7 (4964) + | | | [21]{}: section_header 0x10a0-0x2403.7 (4964) 0x10a0|1c 00 00 00 02 00 00 00 00 00 04 00 00 00 00 00|................| data: raw bits 0x10a0-0x110f.7 (112) * |until 0x110f.7 (112) | | 0x23d0| bd 00 00 00| ....| name: ".debug_aranges" (189) 0x23dc-0x23df.7 (4) @@ -923,7 +948,7 @@ $ fq -d elf dv a_dynamic 0x23f0| 00 00 00 00 | .... | info: 0 0x23f8-0x23fb.7 (4) 0x23f0| 08 00 00 00| ....| addralign: 8 0x23fc-0x23ff.7 (4) 0x2400|00 00 00 00 |.... | entsize: 0 0x2400-0x2403.7 (4) - | | | [21]{}: section_header 0x1110-0x242b.7 (4892) + | | | [22]{}: section_header 0x1110-0x242b.7 (4892) 0x1110|e9 00 00 00 04 00 00 00 00 00 04 01 6b 00 00 00|............k...| data: raw bits 0x1110-0x1240.7 (305) * |until 0x1240.7 (305) | | 0x2400| cc 00 00 00 | .... | name: ".debug_info" (204) 0x2404-0x2407.7 (4) @@ -950,7 +975,7 @@ $ fq -d elf dv a_dynamic 0x2420|00 00 00 00 |.... | info: 0 0x2420-0x2423.7 (4) 0x2420| 01 00 00 00 | .... | addralign: 1 0x2424-0x2427.7 (4) 0x2420| 00 00 00 00 | .... | entsize: 0 0x2428-0x242b.7 (4) - | | | [22]{}: section_header 0x1241-0x2453.7 (4627) + | | | [23]{}: section_header 0x1241-0x2453.7 (4627) 0x1240| 01 11 01 25 0e 13 0b 03 0e 1b 0e 55 17 11 01| ...%.......U...| data: raw bits 0x1241-0x1305.7 (197) 0x1250|10 17 00 00 02 24 00 0b 0b 3e 0b 03 0e 00 00 03|.....$...>......| * |until 0x1305.7 (197) | | @@ -978,7 +1003,7 @@ $ fq -d elf dv a_dynamic 0x2440| 00 00 00 00 | .... | info: 0 0x2448-0x244b.7 (4) 0x2440| 01 00 00 00| ....| addralign: 1 0x244c-0x244f.7 (4) 0x2450|00 00 00 00 |.... | entsize: 0 0x2450-0x2453.7 (4) - | | | [23]{}: section_header 0x1306-0x247b.7 (4470) + | | | [24]{}: section_header 0x1306-0x247b.7 (4470) 0x1300| 51 00 00 00 03 00 21 00 00 00| Q.....!...| data: raw bits 0x1306-0x13f0.7 (235) 0x1310|02 01 fb 0e 0d 00 01 01 01 01 00 00 00 01 00 00|................| * |until 0x13f0.7 (235) | | @@ -1006,7 +1031,7 @@ $ fq -d elf dv a_dynamic 0x2470|00 00 00 00 |.... | info: 0 0x2470-0x2473.7 (4) 0x2470| 01 00 00 00 | .... | addralign: 1 0x2474-0x2477.7 (4) 0x2470| 00 00 00 00 | .... | entsize: 0 0x2478-0x247b.7 (4) - | | | [24]{}: section_header 0x13f4-0x24a3.7 (4272) + | | | [25]{}: section_header 0x13f4-0x24a3.7 (4272) 0x13f0| 0c 00 00 00 ff ff ff ff 01 00 02 7c| ...........|| data: raw bits 0x13f4-0x141b.7 (40) 0x1400|0e 0c 0d 00 14 00 00 00 00 00 00 00 f8 03 00 00|................| 0x1410|64 00 00 00 42 0e 18 8e 01 66 0e 04 |d...B....f.. | @@ -1034,7 +1059,7 @@ $ fq -d elf dv a_dynamic 0x2490| 00 00 00 00 | .... | info: 0 0x2498-0x249b.7 (4) 0x2490| 04 00 00 00| ....| addralign: 4 0x249c-0x249f.7 (4) 0x24a0|00 00 00 00 |.... | entsize: 0 0x24a0-0x24a3.7 (4) - | | | [25]{}: section_header 0x141c-0x24cb.7 (4272) + | | | [26]{}: section_header 0x141c-0x24cb.7 (4272) 0x1410| 75 6e 73 69| unsi| data: raw bits 0x141c-0x162c.7 (529) 0x1420|67 6e 65 64 20 69 6e 74 00 63 72 74 2f 53 63 72|gned int.crt/Scr| * |until 0x162c.7 (529) | | @@ -1062,7 +1087,7 @@ $ fq -d elf dv a_dynamic 0x24c0|00 00 00 00 |.... | info: 0 0x24c0-0x24c3.7 (4) 0x24c0| 01 00 00 00 | .... | addralign: 1 0x24c4-0x24c7.7 (4) 0x24c0| 01 00 00 00 | .... | entsize: 1 0x24c8-0x24cb.7 (4) - | | | [26]{}: section_header 0x162d-0x24f3.7 (3783) + | | | [27]{}: section_header 0x162d-0x24f3.7 (3783) 0x1620| 00 00 00| ...| data: raw bits 0x162d-0x16ac.7 (128) 0x1630|00 00 00 f8 03 00 00 40 04 00 00 01 00 50 40 04|.......@.....P@.| * |until 0x16ac.7 (128) | | @@ -1090,7 +1115,7 @@ $ fq -d elf dv a_dynamic 0x24e0| 00 00 00 00 | .... | info: 0 0x24e8-0x24eb.7 (4) 0x24e0| 01 00 00 00| ....| addralign: 1 0x24ec-0x24ef.7 (4) 0x24f0|00 00 00 00 |.... | entsize: 0 0x24f0-0x24f3.7 (4) - | | | [27]{}: section_header 0x16b0-0x251b.7 (3692) + | | | [28]{}: section_header 0x16b0-0x251b.7 (3692) 0x16b0|f8 03 00 00 5c 04 00 00 00 00 00 00 00 00 00 00|....\...........| data: raw bits 0x16b0-0x16ff.7 (80) * |until 0x16ff.7 (80) | | 0x24f0| 15 01 00 00 | .... | name: ".debug_ranges" (277) 0x24f4-0x24f7.7 (4) @@ -1117,7 +1142,7 @@ $ fq -d elf dv a_dynamic 0x2510|00 00 00 00 |.... | info: 0 0x2510-0x2513.7 (4) 0x2510| 08 00 00 00 | .... | addralign: 8 0x2514-0x2517.7 (4) 0x2510| 00 00 00 00 | .... | entsize: 0 0x2518-0x251b.7 (4) - | | | [28]{}: section_header 0x1700-0x2543.7 (3652) + | | | [29]{}: section_header 0x1700-0x2543.7 (3652) | | | symbol_table[0:103]: 0x1700-0x1d6f.7 (1648) | | | [0]{}: symbol 0x1700-0x170f.7 (16) 0x1700|00 00 00 00 |.... | name: "" (0) 0x1700-0x1703.7 (4) @@ -2070,7 +2095,7 @@ $ fq -d elf dv a_dynamic 0x2530| 50 00 00 00 | P... | info: 80 0x2538-0x253b.7 (4) 0x2530| 04 00 00 00| ....| addralign: 4 0x253c-0x253f.7 (4) 0x2540|10 00 00 00 |.... | entsize: 16 0x2540-0x2543.7 (4) - | | | [29]{}: section_header 0x1d70-0x256b.7 (2044) + | | | [30]{}: section_header 0x1d70-0x256b.7 (2044) 0x1d70|00 53 63 72 74 31 2e 63 00 24 61 00 24 64 00 63|.Scrt1.c.$a.$d.c| string: "\x00Scrt1.c\x00$a\x00$d\x00crti.o\x00crtn.o\x00crtstuff.c\x00all_implie"... 0x1d70-0x1f6d.7 (510) * |until 0x1f6d.7 (510) | | 0x2540| 09 00 00 00 | .... | name: ".strtab" (9) 0x2544-0x2547.7 (4) @@ -2097,7 +2122,7 @@ $ fq -d elf dv a_dynamic 0x2560|00 00 00 00 |.... | info: 0 0x2560-0x2563.7 (4) 0x2560| 01 00 00 00 | .... | addralign: 1 0x2564-0x2567.7 (4) 0x2560| 00 00 00 00 | .... | entsize: 0 0x2568-0x256b.7 (4) - | | | [30]{}: section_header 0x1f6e-0x2593.7 (1574) + | | | [31]{}: section_header 0x1f6e-0x2593.7 (1574) 0x1f60| 00 2e| ..| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.interp\x00.gnu.hash\x00.dyns"... 0x1f6e-0x2090.7 (291) 0x1f70|73 79 6d 74 61 62 00 2e 73 74 72 74 61 62 00 2e|symtab..strtab..| * |until 0x2090.7 (291) | | @@ -2125,31 +2150,6 @@ $ fq -d elf dv a_dynamic 0x2580| 00 00 00 00 | .... | info: 0 0x2588-0x258b.7 (4) 0x2580| 01 00 00 00| ....| addralign: 1 0x258c-0x258f.7 (4) 0x2590|00 00 00 00| |....| | entsize: 0 0x2590-0x2593.7 (4) - | | | [31]{}: section_header 0x2364-0x238b.7 (40) -0x2360| 9f 00 00 00 | .... | name: ".bss" (159) 0x2364-0x2367.7 (4) -0x2360| 08 00 00 00 | .... | type: "nobits" (0x8) (No space in the file) 0x2368-0x236b.7 (4) - | | | flags{}: 0x236c-0x236f.7 (4) -0x2360| 03 | . | link_order: false 0x236c-0x236c (0.1) -0x2360| 03 | . | info_link: false 0x236c.1-0x236c.1 (0.1) -0x2360| 03 | . | strings: false 0x236c.2-0x236c.2 (0.1) -0x2360| 03 | . | merge: false 0x236c.3-0x236c.3 (0.1) -0x2360| 03 | . | unused0: 0 0x236c.4-0x236c.4 (0.1) -0x2360| 03 | . | execinstr: false 0x236c.5-0x236c.5 (0.1) -0x2360| 03 | . | alloc: true 0x236c.6-0x236c.6 (0.1) -0x2360| 03 | . | write: true 0x236c.7-0x236c.7 (0.1) -0x2360| 00 | . | tls: false 0x236d-0x236d (0.1) -0x2360| 00 | . | group: false 0x236d.1-0x236d.1 (0.1) -0x2360| 00 | . | os_nonconforming: false 0x236d.2-0x236d.2 (0.1) -0x2360| 00 00 | .. | unused1: 0 0x236d.3-0x236e.3 (1.1) -0x2360| 00 00| ..| os_specific: 0 0x236e.4-0x236f.3 (1) -0x2360| 00| .| processor_specific: 0 0x236f.4-0x236f.7 (0.4) -0x2370|04 10 01 00 |.... | addr: 0x11004 0x2370-0x2373.7 (4) -0x2370| 04 10 00 00 | .... | offset: 4100 0x2374-0x2377.7 (4) -0x2370| 1c 00 00 00 | .... | size: 0x1c 0x2378-0x237b.7 (4) -0x2370| 00 00 00 00| ....| link: 0 0x237c-0x237f.7 (4) -0x2380|00 00 00 00 |.... | info: 0 0x2380-0x2383.7 (4) -0x2380| 04 00 00 00 | .... | addralign: 4 0x2384-0x2387.7 (4) -0x2380| 00 00 00 00 | .... | entsize: 0 0x2388-0x238b.7 (4) 0x0730| 00 00 00 00| ....| unknown0: raw bits 0x73c-0xecb.7 (1936) 0x0740|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................| * |until 0xecb.7 (1936) | | diff --git a/format/elf/testdata/linux_arm_v7/a_static.fqtest b/format/elf/testdata/linux_arm_v7/a_static.fqtest index 290c7b820..2053f81f9 100644 --- a/format/elf/testdata/linux_arm_v7/a_static.fqtest +++ b/format/elf/testdata/linux_arm_v7/a_static.fqtest @@ -23,40 +23,7 @@ $ fq -d elf dv a_static 0x0030|20 00 | . | shnum: 32 0x30-0x31.7 (2) 0x0030| 1f 00 | .. | shstrndx: 31 0x32-0x33.7 (2) | | | program_headers[0:7]: 0x0-0x1003.7 (4100) - | | | [0]{}: program_header 0x0-0x72f.7 (1840) - | | | program_header{}: 0x0-0x72f.7 (1840) -0x0000|7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00|.ELF............| data: raw bits 0x0-0x72f.7 (1840) -* |until 0x72f.7 (1840) | | -0x0070| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x74-0x77.7 (4) -0x0070| 00 00 00 00 | .... | offset: 0x0 0x78-0x7b.7 (4) -0x0070| 00 00 00 00| ....| vaddr: 0x0 0x7c-0x7f.7 (4) -0x0080|00 00 00 00 |.... | paddr: 0x0 0x80-0x83.7 (4) -0x0080| 30 07 00 00 | 0... | filesz: 1840 0x84-0x87.7 (4) -0x0080| 30 07 00 00 | 0... | memsz: 1840 0x88-0x8b.7 (4) - | | | flags{}: 0x8c-0x8f.7 (4) -0x0080| 05 | . | unused0: 0 0x8c-0x8c.4 (0.5) -0x0080| 05 | . | r: true 0x8c.5-0x8c.5 (0.1) -0x0080| 05 | . | w: false 0x8c.6-0x8c.6 (0.1) -0x0080| 05 | . | x: true 0x8c.7-0x8c.7 (0.1) -0x0080| 00 00 00| ...| unused1: 0 0x8d-0x8f.7 (3) -0x0090|00 00 01 00 |.... | align: 65536 0x90-0x93.7 (4) - | | | [1]{}: program_header 0x0-0xf3.7 (244) - | | | program_header{}: 0x0-0xf3.7 (244) - | | | data: raw bits 0x0-NA (0) -0x00d0| 51 e5 74 64 | Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0xd4-0xd7.7 (4) -0x00d0| 00 00 00 00 | .... | offset: 0x0 0xd8-0xdb.7 (4) -0x00d0| 00 00 00 00| ....| vaddr: 0x0 0xdc-0xdf.7 (4) -0x00e0|00 00 00 00 |.... | paddr: 0x0 0xe0-0xe3.7 (4) -0x00e0| 00 00 00 00 | .... | filesz: 0 0xe4-0xe7.7 (4) -0x00e0| 00 00 00 00 | .... | memsz: 0 0xe8-0xeb.7 (4) - | | | flags{}: 0xec-0xef.7 (4) -0x00e0| 06 | . | unused0: 0 0xec-0xec.4 (0.5) -0x00e0| 06 | . | r: true 0xec.5-0xec.5 (0.1) -0x00e0| 06 | . | w: true 0xec.6-0xec.6 (0.1) -0x00e0| 06 | . | x: false 0xec.7-0xec.7 (0.1) -0x00e0| 00 00 00| ...| unused1: 0 0xed-0xef.7 (3) -0x00f0|10 00 00 00 |.... | align: 16 0xf0-0xf3.7 (4) - | | | [2]{}: program_header 0x34-0x113.7 (224) + | | | [0]{}: program_header 0x34-0x113.7 (224) | | | program_header{}: 0x34-0x113.7 (224) 0x0030| 06 00 00 00 | .... | type: "phdr" (6) (Program header location and size) 0x34-0x37.7 (4) 0x0030| 06 00 00 00 34 00 00 00 34 00 00 00| ....4...4...| data: raw bits 0x34-0x113.7 (224) @@ -74,7 +41,7 @@ $ fq -d elf dv a_static 0x0040| 04 | . | x: false 0x4c.7-0x4c.7 (0.1) 0x0040| 00 00 00| ...| unused1: 0 0x4d-0x4f.7 (3) 0x0050|04 00 00 00 |.... | align: 4 0x50-0x53.7 (4) - | | | [3]{}: program_header 0x54-0x12b.7 (216) + | | | [1]{}: program_header 0x54-0x12b.7 (216) | | | program_header{}: 0x54-0x12b.7 (216) 0x0050| 03 00 00 00 | .... | type: "interp" (3) (Interpreter to invoke) 0x54-0x57.7 (4) 0x0050| 14 01 00 00 | .... | offset: 0x114 0x58-0x5b.7 (4) @@ -91,7 +58,24 @@ $ fq -d elf dv a_static 0x0070|01 00 00 00 |.... | align: 1 0x70-0x73.7 (4) 0x0110| 2f 6c 69 62 2f 6c 64 2d 6d 75 73 6c| /lib/ld-musl| data: raw bits 0x114-0x12b.7 (24) 0x0120|2d 61 72 6d 68 66 2e 73 6f 2e 31 00 |-armhf.so.1. | - | | | [4]{}: program_header 0x94-0x1003.7 (3952) + | | | [2]{}: program_header 0x0-0x72f.7 (1840) + | | | program_header{}: 0x0-0x72f.7 (1840) +0x0000|7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00|.ELF............| data: raw bits 0x0-0x72f.7 (1840) +* |until 0x72f.7 (1840) | | +0x0070| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x74-0x77.7 (4) +0x0070| 00 00 00 00 | .... | offset: 0x0 0x78-0x7b.7 (4) +0x0070| 00 00 00 00| ....| vaddr: 0x0 0x7c-0x7f.7 (4) +0x0080|00 00 00 00 |.... | paddr: 0x0 0x80-0x83.7 (4) +0x0080| 30 07 00 00 | 0... | filesz: 1840 0x84-0x87.7 (4) +0x0080| 30 07 00 00 | 0... | memsz: 1840 0x88-0x8b.7 (4) + | | | flags{}: 0x8c-0x8f.7 (4) +0x0080| 05 | . | unused0: 0 0x8c-0x8c.4 (0.5) +0x0080| 05 | . | r: true 0x8c.5-0x8c.5 (0.1) +0x0080| 05 | . | w: false 0x8c.6-0x8c.6 (0.1) +0x0080| 05 | . | x: true 0x8c.7-0x8c.7 (0.1) +0x0080| 00 00 00| ...| unused1: 0 0x8d-0x8f.7 (3) +0x0090|00 00 01 00 |.... | align: 65536 0x90-0x93.7 (4) + | | | [3]{}: program_header 0x94-0x1003.7 (3952) | | | program_header{}: 0x94-0x1003.7 (3952) 0x0090| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x94-0x97.7 (4) 0x0090| d8 0e 00 00 | .... | offset: 0xed8 0x98-0x9b.7 (4) @@ -109,7 +93,7 @@ $ fq -d elf dv a_static 0x0ed0| 40 05 00 00 b4 04 00 00| @.......| data: raw bits 0xed8-0x1003.7 (300) 0x0ee0|01 00 00 00 33 00 00 00 0c 00 00 00 3c 03 00 00|....3.......<...| * |until 0x1003.7 (300) | | - | | | [5]{}: program_header 0xb4-0xfbf.7 (3852) + | | | [4]{}: program_header 0xb4-0xfbf.7 (3852) | | | program_header{}: 0xb4-0xfbf.7 (3852) 0x00b0| 02 00 00 00 | .... | type: "dynamic" (2) (Dynamic linking information) 0xb4-0xb7.7 (4) 0x00b0| e0 0e 00 00 | .... | offset: 0xee0 0xb8-0xbb.7 (4) @@ -126,6 +110,22 @@ $ fq -d elf dv a_static 0x00d0|04 00 00 00 |.... | align: 4 0xd0-0xd3.7 (4) 0x0ee0|01 00 00 00 33 00 00 00 0c 00 00 00 3c 03 00 00|....3.......<...| data: raw bits 0xee0-0xfbf.7 (224) * |until 0xfbf.7 (224) | | + | | | [5]{}: program_header 0x0-0xf3.7 (244) + | | | program_header{}: 0x0-0xf3.7 (244) + | | | data: raw bits 0x0-NA (0) +0x00d0| 51 e5 74 64 | Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0xd4-0xd7.7 (4) +0x00d0| 00 00 00 00 | .... | offset: 0x0 0xd8-0xdb.7 (4) +0x00d0| 00 00 00 00| ....| vaddr: 0x0 0xdc-0xdf.7 (4) +0x00e0|00 00 00 00 |.... | paddr: 0x0 0xe0-0xe3.7 (4) +0x00e0| 00 00 00 00 | .... | filesz: 0 0xe4-0xe7.7 (4) +0x00e0| 00 00 00 00 | .... | memsz: 0 0xe8-0xeb.7 (4) + | | | flags{}: 0xec-0xef.7 (4) +0x00e0| 06 | . | unused0: 0 0xec-0xec.4 (0.5) +0x00e0| 06 | . | r: true 0xec.5-0xec.5 (0.1) +0x00e0| 06 | . | w: true 0xec.6-0xec.6 (0.1) +0x00e0| 06 | . | x: false 0xec.7-0xec.7 (0.1) +0x00e0| 00 00 00| ...| unused1: 0 0xed-0xef.7 (3) +0x00f0|10 00 00 00 |.... | align: 16 0xf0-0xf3.7 (4) | | | [6]{}: program_header 0xf4-0xfff.7 (3852) | | | program_header{}: 0xf4-0xfff.7 (3852) 0x00f0| 52 e5 74 64 | R.td | type: "gnu_relro" (1685382482) (GNU read-only after relocation) 0xf4-0xf7.7 (4) @@ -825,7 +825,32 @@ $ fq -d elf dv a_static 0x23a0|00 00 00 00 |.... | info: 0 0x23a0-0x23a3.7 (4) 0x23a0| 04 00 00 00 | .... | addralign: 4 0x23a4-0x23a7.7 (4) 0x23a0| 00 00 00 00 | .... | entsize: 0 0x23a8-0x23ab.7 (4) - | | | [18]{}: section_header 0x1004-0x23fb.7 (5112) + | | | [18]{}: section_header 0x23ac-0x23d3.7 (40) +0x23a0| 9f 00 00 00| ....| name: ".bss" (159) 0x23ac-0x23af.7 (4) +0x23b0|08 00 00 00 |.... | type: "nobits" (0x8) (No space in the file) 0x23b0-0x23b3.7 (4) + | | | flags{}: 0x23b4-0x23b7.7 (4) +0x23b0| 03 | . | link_order: false 0x23b4-0x23b4 (0.1) +0x23b0| 03 | . | info_link: false 0x23b4.1-0x23b4.1 (0.1) +0x23b0| 03 | . | strings: false 0x23b4.2-0x23b4.2 (0.1) +0x23b0| 03 | . | merge: false 0x23b4.3-0x23b4.3 (0.1) +0x23b0| 03 | . | unused0: 0 0x23b4.4-0x23b4.4 (0.1) +0x23b0| 03 | . | execinstr: false 0x23b4.5-0x23b4.5 (0.1) +0x23b0| 03 | . | alloc: true 0x23b4.6-0x23b4.6 (0.1) +0x23b0| 03 | . | write: true 0x23b4.7-0x23b4.7 (0.1) +0x23b0| 00 | . | tls: false 0x23b5-0x23b5 (0.1) +0x23b0| 00 | . | group: false 0x23b5.1-0x23b5.1 (0.1) +0x23b0| 00 | . | os_nonconforming: false 0x23b5.2-0x23b5.2 (0.1) +0x23b0| 00 00 | .. | unused1: 0 0x23b5.3-0x23b6.3 (1.1) +0x23b0| 00 00 | .. | os_specific: 0 0x23b6.4-0x23b7.3 (1) +0x23b0| 00 | . | processor_specific: 0 0x23b7.4-0x23b7.7 (0.4) +0x23b0| 04 10 01 00 | .... | addr: 0x11004 0x23b8-0x23bb.7 (4) +0x23b0| 04 10 00 00| ....| offset: 4100 0x23bc-0x23bf.7 (4) +0x23c0|1c 00 00 00 |.... | size: 0x1c 0x23c0-0x23c3.7 (4) +0x23c0| 00 00 00 00 | .... | link: 0 0x23c4-0x23c7.7 (4) +0x23c0| 00 00 00 00 | .... | info: 0 0x23c8-0x23cb.7 (4) +0x23c0| 04 00 00 00| ....| addralign: 4 0x23cc-0x23cf.7 (4) +0x23d0|00 00 00 00 |.... | entsize: 0 0x23d0-0x23d3.7 (4) + | | | [19]{}: section_header 0x1004-0x23fb.7 (5112) 0x1000| 47 43 43 3a 20 28 41 6c 70 69 6e 65| GCC: (Alpine| data: raw bits 0x1004-0x1065.7 (98) 0x1010|20 31 30 2e 33 2e 31 5f 67 69 74 32 30 32 31 30| 10.3.1_git20210| * |until 0x1065.7 (98) | | @@ -853,7 +878,7 @@ $ fq -d elf dv a_static 0x23f0|00 00 00 00 |.... | info: 0 0x23f0-0x23f3.7 (4) 0x23f0| 01 00 00 00 | .... | addralign: 1 0x23f4-0x23f7.7 (4) 0x23f0| 01 00 00 00 | .... | entsize: 1 0x23f8-0x23fb.7 (4) - | | | [19]{}: section_header 0x1066-0x2423.7 (5054) + | | | [20]{}: section_header 0x1066-0x2423.7 (5054) 0x1060| 41 32 00 00 00 61 65 61 62 69| A2...aeabi| data: raw bits 0x1066-0x1098.7 (51) 0x1070|00 01 28 00 00 00 05 36 5a 4b 00 06 07 08 01 09|..(....6ZK......| * |until 0x1098.7 (51) | | @@ -881,7 +906,7 @@ $ fq -d elf dv a_static 0x2410| 00 00 00 00 | .... | info: 0 0x2418-0x241b.7 (4) 0x2410| 01 00 00 00| ....| addralign: 1 0x241c-0x241f.7 (4) 0x2420|00 00 00 00 |.... | entsize: 0 0x2420-0x2423.7 (4) - | | | [20]{}: section_header 0x10a0-0x244b.7 (5036) + | | | [21]{}: section_header 0x10a0-0x244b.7 (5036) 0x10a0|1c 00 00 00 02 00 00 00 00 00 04 00 00 00 00 00|................| data: raw bits 0x10a0-0x110f.7 (112) * |until 0x110f.7 (112) | | 0x2420| bd 00 00 00 | .... | name: ".debug_aranges" (189) 0x2424-0x2427.7 (4) @@ -908,7 +933,7 @@ $ fq -d elf dv a_static 0x2440|00 00 00 00 |.... | info: 0 0x2440-0x2443.7 (4) 0x2440| 08 00 00 00 | .... | addralign: 8 0x2444-0x2447.7 (4) 0x2440| 00 00 00 00 | .... | entsize: 0 0x2448-0x244b.7 (4) - | | | [21]{}: section_header 0x1110-0x2473.7 (4964) + | | | [22]{}: section_header 0x1110-0x2473.7 (4964) 0x1110|e9 00 00 00 04 00 00 00 00 00 04 01 6b 00 00 00|............k...| data: raw bits 0x1110-0x1240.7 (305) * |until 0x1240.7 (305) | | 0x2440| cc 00 00 00| ....| name: ".debug_info" (204) 0x244c-0x244f.7 (4) @@ -935,7 +960,7 @@ $ fq -d elf dv a_static 0x2460| 00 00 00 00 | .... | info: 0 0x2468-0x246b.7 (4) 0x2460| 01 00 00 00| ....| addralign: 1 0x246c-0x246f.7 (4) 0x2470|00 00 00 00 |.... | entsize: 0 0x2470-0x2473.7 (4) - | | | [22]{}: section_header 0x1241-0x249b.7 (4699) + | | | [23]{}: section_header 0x1241-0x249b.7 (4699) 0x1240| 01 11 01 25 0e 13 0b 03 0e 1b 0e 55 17 11 01| ...%.......U...| data: raw bits 0x1241-0x1305.7 (197) 0x1250|10 17 00 00 02 24 00 0b 0b 3e 0b 03 0e 00 00 03|.....$...>......| * |until 0x1305.7 (197) | | @@ -963,7 +988,7 @@ $ fq -d elf dv a_static 0x2490|00 00 00 00 |.... | info: 0 0x2490-0x2493.7 (4) 0x2490| 01 00 00 00 | .... | addralign: 1 0x2494-0x2497.7 (4) 0x2490| 00 00 00 00 | .... | entsize: 0 0x2498-0x249b.7 (4) - | | | [23]{}: section_header 0x1306-0x24c3.7 (4542) + | | | [24]{}: section_header 0x1306-0x24c3.7 (4542) 0x1300| 51 00 00 00 03 00 21 00 00 00| Q.....!...| data: raw bits 0x1306-0x13f0.7 (235) 0x1310|02 01 fb 0e 0d 00 01 01 01 01 00 00 00 01 00 00|................| * |until 0x13f0.7 (235) | | @@ -991,7 +1016,7 @@ $ fq -d elf dv a_static 0x24b0| 00 00 00 00 | .... | info: 0 0x24b8-0x24bb.7 (4) 0x24b0| 01 00 00 00| ....| addralign: 1 0x24bc-0x24bf.7 (4) 0x24c0|00 00 00 00 |.... | entsize: 0 0x24c0-0x24c3.7 (4) - | | | [24]{}: section_header 0x13f4-0x24eb.7 (4344) + | | | [25]{}: section_header 0x13f4-0x24eb.7 (4344) 0x13f0| 0c 00 00 00 ff ff ff ff 01 00 02 7c| ...........|| data: raw bits 0x13f4-0x141b.7 (40) 0x1400|0e 0c 0d 00 14 00 00 00 00 00 00 00 bc 03 00 00|................| 0x1410|64 00 00 00 42 0e 18 8e 01 66 0e 04 |d...B....f.. | @@ -1019,7 +1044,7 @@ $ fq -d elf dv a_static 0x24e0|00 00 00 00 |.... | info: 0 0x24e0-0x24e3.7 (4) 0x24e0| 04 00 00 00 | .... | addralign: 4 0x24e4-0x24e7.7 (4) 0x24e0| 00 00 00 00 | .... | entsize: 0 0x24e8-0x24eb.7 (4) - | | | [25]{}: section_header 0x141c-0x2513.7 (4344) + | | | [26]{}: section_header 0x141c-0x2513.7 (4344) 0x1410| 75 6e 73 69| unsi| data: raw bits 0x141c-0x162c.7 (529) 0x1420|67 6e 65 64 20 69 6e 74 00 63 72 74 2f 53 63 72|gned int.crt/Scr| * |until 0x162c.7 (529) | | @@ -1047,7 +1072,7 @@ $ fq -d elf dv a_static 0x2500| 00 00 00 00 | .... | info: 0 0x2508-0x250b.7 (4) 0x2500| 01 00 00 00| ....| addralign: 1 0x250c-0x250f.7 (4) 0x2510|01 00 00 00 |.... | entsize: 1 0x2510-0x2513.7 (4) - | | | [26]{}: section_header 0x162d-0x253b.7 (3855) + | | | [27]{}: section_header 0x162d-0x253b.7 (3855) 0x1620| 00 00 00| ...| data: raw bits 0x162d-0x16ac.7 (128) 0x1630|00 00 00 bc 03 00 00 04 04 00 00 01 00 50 04 04|.............P..| * |until 0x16ac.7 (128) | | @@ -1075,7 +1100,7 @@ $ fq -d elf dv a_static 0x2530|00 00 00 00 |.... | info: 0 0x2530-0x2533.7 (4) 0x2530| 01 00 00 00 | .... | addralign: 1 0x2534-0x2537.7 (4) 0x2530| 00 00 00 00 | .... | entsize: 0 0x2538-0x253b.7 (4) - | | | [27]{}: section_header 0x16b0-0x2563.7 (3764) + | | | [28]{}: section_header 0x16b0-0x2563.7 (3764) 0x16b0|bc 03 00 00 20 04 00 00 00 00 00 00 00 00 00 00|.... ...........| data: raw bits 0x16b0-0x16ff.7 (80) * |until 0x16ff.7 (80) | | 0x2530| 15 01 00 00| ....| name: ".debug_ranges" (277) 0x253c-0x253f.7 (4) @@ -1102,7 +1127,7 @@ $ fq -d elf dv a_static 0x2550| 00 00 00 00 | .... | info: 0 0x2558-0x255b.7 (4) 0x2550| 08 00 00 00| ....| addralign: 8 0x255c-0x255f.7 (4) 0x2560|00 00 00 00 |.... | entsize: 0 0x2560-0x2563.7 (4) - | | | [28]{}: section_header 0x1700-0x258b.7 (3724) + | | | [29]{}: section_header 0x1700-0x258b.7 (3724) | | | symbol_table[0:107]: 0x1700-0x1daf.7 (1712) | | | [0]{}: symbol 0x1700-0x170f.7 (16) 0x1700|00 00 00 00 |.... | name: "" (0) 0x1700-0x1703.7 (4) @@ -2091,7 +2116,7 @@ $ fq -d elf dv a_static 0x2580|54 00 00 00 |T... | info: 84 0x2580-0x2583.7 (4) 0x2580| 04 00 00 00 | .... | addralign: 4 0x2584-0x2587.7 (4) 0x2580| 10 00 00 00 | .... | entsize: 16 0x2588-0x258b.7 (4) - | | | [29]{}: section_header 0x1db0-0x25b3.7 (2052) + | | | [30]{}: section_header 0x1db0-0x25b3.7 (2052) 0x1db0|00 53 63 72 74 31 2e 63 00 24 61 00 24 64 00 63|.Scrt1.c.$a.$d.c| string: "\x00Scrt1.c\x00$a\x00$d\x00crti.o\x00crtn.o\x00crtstuff.c\x00all_implie"... 0x1db0-0x1fb6.7 (519) * |until 0x1fb6.7 (519) | | 0x2580| 09 00 00 00| ....| name: ".strtab" (9) 0x258c-0x258f.7 (4) @@ -2118,7 +2143,7 @@ $ fq -d elf dv a_static 0x25a0| 00 00 00 00 | .... | info: 0 0x25a8-0x25ab.7 (4) 0x25a0| 01 00 00 00| ....| addralign: 1 0x25ac-0x25af.7 (4) 0x25b0|00 00 00 00 |.... | entsize: 0 0x25b0-0x25b3.7 (4) - | | | [30]{}: section_header 0x1fb7-0x25db.7 (1573) + | | | [31]{}: section_header 0x1fb7-0x25db.7 (1573) 0x1fb0| 00 2e 73 79 6d 74 61 62 00| ..symtab.| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.interp\x00.gnu.hash\x00.dyns"... 0x1fb7-0x20d9.7 (291) 0x1fc0|2e 73 74 72 74 61 62 00 2e 73 68 73 74 72 74 61|.strtab..shstrta| * |until 0x20d9.7 (291) | | @@ -2146,31 +2171,6 @@ $ fq -d elf dv a_static 0x25d0|00 00 00 00 |.... | info: 0 0x25d0-0x25d3.7 (4) 0x25d0| 01 00 00 00 | .... | addralign: 1 0x25d4-0x25d7.7 (4) 0x25d0| 00 00 00 00| | ....| | entsize: 0 0x25d8-0x25db.7 (4) - | | | [31]{}: section_header 0x23ac-0x23d3.7 (40) -0x23a0| 9f 00 00 00| ....| name: ".bss" (159) 0x23ac-0x23af.7 (4) -0x23b0|08 00 00 00 |.... | type: "nobits" (0x8) (No space in the file) 0x23b0-0x23b3.7 (4) - | | | flags{}: 0x23b4-0x23b7.7 (4) -0x23b0| 03 | . | link_order: false 0x23b4-0x23b4 (0.1) -0x23b0| 03 | . | info_link: false 0x23b4.1-0x23b4.1 (0.1) -0x23b0| 03 | . | strings: false 0x23b4.2-0x23b4.2 (0.1) -0x23b0| 03 | . | merge: false 0x23b4.3-0x23b4.3 (0.1) -0x23b0| 03 | . | unused0: 0 0x23b4.4-0x23b4.4 (0.1) -0x23b0| 03 | . | execinstr: false 0x23b4.5-0x23b4.5 (0.1) -0x23b0| 03 | . | alloc: true 0x23b4.6-0x23b4.6 (0.1) -0x23b0| 03 | . | write: true 0x23b4.7-0x23b4.7 (0.1) -0x23b0| 00 | . | tls: false 0x23b5-0x23b5 (0.1) -0x23b0| 00 | . | group: false 0x23b5.1-0x23b5.1 (0.1) -0x23b0| 00 | . | os_nonconforming: false 0x23b5.2-0x23b5.2 (0.1) -0x23b0| 00 00 | .. | unused1: 0 0x23b5.3-0x23b6.3 (1.1) -0x23b0| 00 00 | .. | os_specific: 0 0x23b6.4-0x23b7.3 (1) -0x23b0| 00 | . | processor_specific: 0 0x23b7.4-0x23b7.7 (0.4) -0x23b0| 04 10 01 00 | .... | addr: 0x11004 0x23b8-0x23bb.7 (4) -0x23b0| 04 10 00 00| ....| offset: 4100 0x23bc-0x23bf.7 (4) -0x23c0|1c 00 00 00 |.... | size: 0x1c 0x23c0-0x23c3.7 (4) -0x23c0| 00 00 00 00 | .... | link: 0 0x23c4-0x23c7.7 (4) -0x23c0| 00 00 00 00 | .... | info: 0 0x23c8-0x23cb.7 (4) -0x23c0| 04 00 00 00| ....| addralign: 4 0x23cc-0x23cf.7 (4) -0x23d0|00 00 00 00 |.... | entsize: 0 0x23d0-0x23d3.7 (4) 0x0730|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................| unknown0: raw bits 0x730-0xed7.7 (1960) * |until 0xed7.7 (1960) | | 0x1090| 00 00 00 00 00 00 00| .......| unknown1: raw bits 0x1099-0x109f.7 (7) diff --git a/format/elf/testdata/linux_arm_v7/a_stripped.fqtest b/format/elf/testdata/linux_arm_v7/a_stripped.fqtest index e9b70d52f..bf3be731f 100644 --- a/format/elf/testdata/linux_arm_v7/a_stripped.fqtest +++ b/format/elf/testdata/linux_arm_v7/a_stripped.fqtest @@ -23,40 +23,7 @@ $ fq -d elf dv a_stripped 0x0030|16 00 |.. | shnum: 22 0x30-0x31.7 (2) 0x0030| 15 00 | .. | shstrndx: 21 0x32-0x33.7 (2) | | | program_headers[0:7]: 0x0-0x1003.7 (4100) - | | | [0]{}: program_header 0x0-0x73b.7 (1852) - | | | program_header{}: 0x0-0x73b.7 (1852) -0x0000|7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00|.ELF............| data: raw bits 0x0-0x73b.7 (1852) -* |until 0x73b.7 (1852) | | -0x0070| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x74-0x77.7 (4) -0x0070| 00 00 00 00 | .... | offset: 0x0 0x78-0x7b.7 (4) -0x0070| 00 00 00 00| ....| vaddr: 0x0 0x7c-0x7f.7 (4) -0x0080|00 00 00 00 |.... | paddr: 0x0 0x80-0x83.7 (4) -0x0080| 3c 07 00 00 | <... | filesz: 1852 0x84-0x87.7 (4) -0x0080| 3c 07 00 00 | <... | memsz: 1852 0x88-0x8b.7 (4) - | | | flags{}: 0x8c-0x8f.7 (4) -0x0080| 05 | . | unused0: 0 0x8c-0x8c.4 (0.5) -0x0080| 05 | . | r: true 0x8c.5-0x8c.5 (0.1) -0x0080| 05 | . | w: false 0x8c.6-0x8c.6 (0.1) -0x0080| 05 | . | x: true 0x8c.7-0x8c.7 (0.1) -0x0080| 00 00 00| ...| unused1: 0 0x8d-0x8f.7 (3) -0x0090|00 00 01 00 |.... | align: 65536 0x90-0x93.7 (4) - | | | [1]{}: program_header 0x0-0xf3.7 (244) - | | | program_header{}: 0x0-0xf3.7 (244) - | | | data: raw bits 0x0-NA (0) -0x00d0| 51 e5 74 64 | Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0xd4-0xd7.7 (4) -0x00d0| 00 00 00 00 | .... | offset: 0x0 0xd8-0xdb.7 (4) -0x00d0| 00 00 00 00| ....| vaddr: 0x0 0xdc-0xdf.7 (4) -0x00e0|00 00 00 00 |.... | paddr: 0x0 0xe0-0xe3.7 (4) -0x00e0| 00 00 00 00 | .... | filesz: 0 0xe4-0xe7.7 (4) -0x00e0| 00 00 00 00 | .... | memsz: 0 0xe8-0xeb.7 (4) - | | | flags{}: 0xec-0xef.7 (4) -0x00e0| 06 | . | unused0: 0 0xec-0xec.4 (0.5) -0x00e0| 06 | . | r: true 0xec.5-0xec.5 (0.1) -0x00e0| 06 | . | w: true 0xec.6-0xec.6 (0.1) -0x00e0| 06 | . | x: false 0xec.7-0xec.7 (0.1) -0x00e0| 00 00 00| ...| unused1: 0 0xed-0xef.7 (3) -0x00f0|10 00 00 00 |.... | align: 16 0xf0-0xf3.7 (4) - | | | [2]{}: program_header 0x34-0x113.7 (224) + | | | [0]{}: program_header 0x34-0x113.7 (224) | | | program_header{}: 0x34-0x113.7 (224) 0x0030| 06 00 00 00 | .... | type: "phdr" (6) (Program header location and size) 0x34-0x37.7 (4) 0x0030| 06 00 00 00 34 00 00 00 34 00 00 00| ....4...4...| data: raw bits 0x34-0x113.7 (224) @@ -74,7 +41,7 @@ $ fq -d elf dv a_stripped 0x0040| 04 | . | x: false 0x4c.7-0x4c.7 (0.1) 0x0040| 00 00 00| ...| unused1: 0 0x4d-0x4f.7 (3) 0x0050|04 00 00 00 |.... | align: 4 0x50-0x53.7 (4) - | | | [3]{}: program_header 0x54-0x12b.7 (216) + | | | [1]{}: program_header 0x54-0x12b.7 (216) | | | program_header{}: 0x54-0x12b.7 (216) 0x0050| 03 00 00 00 | .... | type: "interp" (3) (Interpreter to invoke) 0x54-0x57.7 (4) 0x0050| 14 01 00 00 | .... | offset: 0x114 0x58-0x5b.7 (4) @@ -91,7 +58,24 @@ $ fq -d elf dv a_stripped 0x0070|01 00 00 00 |.... | align: 1 0x70-0x73.7 (4) 0x0110| 2f 6c 69 62 2f 6c 64 2d 6d 75 73 6c| /lib/ld-musl| data: raw bits 0x114-0x12b.7 (24) 0x0120|2d 61 72 6d 68 66 2e 73 6f 2e 31 00 |-armhf.so.1. | - | | | [4]{}: program_header 0x94-0x1003.7 (3952) + | | | [2]{}: program_header 0x0-0x73b.7 (1852) + | | | program_header{}: 0x0-0x73b.7 (1852) +0x0000|7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00|.ELF............| data: raw bits 0x0-0x73b.7 (1852) +* |until 0x73b.7 (1852) | | +0x0070| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x74-0x77.7 (4) +0x0070| 00 00 00 00 | .... | offset: 0x0 0x78-0x7b.7 (4) +0x0070| 00 00 00 00| ....| vaddr: 0x0 0x7c-0x7f.7 (4) +0x0080|00 00 00 00 |.... | paddr: 0x0 0x80-0x83.7 (4) +0x0080| 3c 07 00 00 | <... | filesz: 1852 0x84-0x87.7 (4) +0x0080| 3c 07 00 00 | <... | memsz: 1852 0x88-0x8b.7 (4) + | | | flags{}: 0x8c-0x8f.7 (4) +0x0080| 05 | . | unused0: 0 0x8c-0x8c.4 (0.5) +0x0080| 05 | . | r: true 0x8c.5-0x8c.5 (0.1) +0x0080| 05 | . | w: false 0x8c.6-0x8c.6 (0.1) +0x0080| 05 | . | x: true 0x8c.7-0x8c.7 (0.1) +0x0080| 00 00 00| ...| unused1: 0 0x8d-0x8f.7 (3) +0x0090|00 00 01 00 |.... | align: 65536 0x90-0x93.7 (4) + | | | [3]{}: program_header 0x94-0x1003.7 (3952) | | | program_header{}: 0x94-0x1003.7 (3952) 0x0090| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x94-0x97.7 (4) 0x0090| cc 0e 00 00 | .... | offset: 0xecc 0x98-0x9b.7 (4) @@ -109,7 +93,7 @@ $ fq -d elf dv a_stripped 0x0ec0| 7c 05 00 00| |...| data: raw bits 0xecc-0x1003.7 (312) 0x0ed0|f0 04 00 00 01 00 00 00 a2 00 00 00 01 00 00 00|................| * |until 0x1003.7 (312) | | - | | | [5]{}: program_header 0xb4-0xfbb.7 (3848) + | | | [4]{}: program_header 0xb4-0xfbb.7 (3848) | | | program_header{}: 0xb4-0xfbb.7 (3848) 0x00b0| 02 00 00 00 | .... | type: "dynamic" (2) (Dynamic linking information) 0xb4-0xb7.7 (4) 0x00b0| d4 0e 00 00 | .... | offset: 0xed4 0xb8-0xbb.7 (4) @@ -127,6 +111,22 @@ $ fq -d elf dv a_stripped 0x0ed0| 01 00 00 00 a2 00 00 00 01 00 00 00| ............| data: raw bits 0xed4-0xfbb.7 (232) 0x0ee0|ac 00 00 00 0c 00 00 00 6c 03 00 00 0d 00 00 00|........l.......| * |until 0xfbb.7 (232) | | + | | | [5]{}: program_header 0x0-0xf3.7 (244) + | | | program_header{}: 0x0-0xf3.7 (244) + | | | data: raw bits 0x0-NA (0) +0x00d0| 51 e5 74 64 | Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0xd4-0xd7.7 (4) +0x00d0| 00 00 00 00 | .... | offset: 0x0 0xd8-0xdb.7 (4) +0x00d0| 00 00 00 00| ....| vaddr: 0x0 0xdc-0xdf.7 (4) +0x00e0|00 00 00 00 |.... | paddr: 0x0 0xe0-0xe3.7 (4) +0x00e0| 00 00 00 00 | .... | filesz: 0 0xe4-0xe7.7 (4) +0x00e0| 00 00 00 00 | .... | memsz: 0 0xe8-0xeb.7 (4) + | | | flags{}: 0xec-0xef.7 (4) +0x00e0| 06 | . | unused0: 0 0xec-0xec.4 (0.5) +0x00e0| 06 | . | r: true 0xec.5-0xec.5 (0.1) +0x00e0| 06 | . | w: true 0xec.6-0xec.6 (0.1) +0x00e0| 06 | . | x: false 0xec.7-0xec.7 (0.1) +0x00e0| 00 00 00| ...| unused1: 0 0xed-0xef.7 (3) +0x00f0|10 00 00 00 |.... | align: 16 0xf0-0xf3.7 (4) | | | [6]{}: program_header 0xf4-0xfff.7 (3852) | | | program_header{}: 0xf4-0xfff.7 (3852) 0x00f0| 52 e5 74 64 | R.td | type: "gnu_relro" (1685382482) (GNU read-only after relocation) 0xf4-0xf7.7 (4) @@ -840,7 +840,32 @@ $ fq -d elf dv a_stripped 0x1400| 00 00 00 00| ....| info: 0 0x140c-0x140f.7 (4) 0x1410|04 00 00 00 |.... | addralign: 4 0x1410-0x1413.7 (4) 0x1410| 00 00 00 00 | .... | entsize: 0 0x1414-0x1417.7 (4) - | | | [18]{}: section_header 0x1004-0x1467.7 (1124) + | | | [18]{}: section_header 0x1418-0x143f.7 (40) +0x1410| 8f 00 00 00 | .... | name: ".bss" (143) 0x1418-0x141b.7 (4) +0x1410| 08 00 00 00| ....| type: "nobits" (0x8) (No space in the file) 0x141c-0x141f.7 (4) + | | | flags{}: 0x1420-0x1423.7 (4) +0x1420|03 |. | link_order: false 0x1420-0x1420 (0.1) +0x1420|03 |. | info_link: false 0x1420.1-0x1420.1 (0.1) +0x1420|03 |. | strings: false 0x1420.2-0x1420.2 (0.1) +0x1420|03 |. | merge: false 0x1420.3-0x1420.3 (0.1) +0x1420|03 |. | unused0: 0 0x1420.4-0x1420.4 (0.1) +0x1420|03 |. | execinstr: false 0x1420.5-0x1420.5 (0.1) +0x1420|03 |. | alloc: true 0x1420.6-0x1420.6 (0.1) +0x1420|03 |. | write: true 0x1420.7-0x1420.7 (0.1) +0x1420| 00 | . | tls: false 0x1421-0x1421 (0.1) +0x1420| 00 | . | group: false 0x1421.1-0x1421.1 (0.1) +0x1420| 00 | . | os_nonconforming: false 0x1421.2-0x1421.2 (0.1) +0x1420| 00 00 | .. | unused1: 0 0x1421.3-0x1422.3 (1.1) +0x1420| 00 00 | .. | os_specific: 0 0x1422.4-0x1423.3 (1) +0x1420| 00 | . | processor_specific: 0 0x1423.4-0x1423.7 (0.4) +0x1420| 04 10 01 00 | .... | addr: 0x11004 0x1424-0x1427.7 (4) +0x1420| 04 10 00 00 | .... | offset: 4100 0x1428-0x142b.7 (4) +0x1420| 1c 00 00 00| ....| size: 0x1c 0x142c-0x142f.7 (4) +0x1430|00 00 00 00 |.... | link: 0 0x1430-0x1433.7 (4) +0x1430| 00 00 00 00 | .... | info: 0 0x1434-0x1437.7 (4) +0x1430| 04 00 00 00 | .... | addralign: 4 0x1438-0x143b.7 (4) +0x1430| 00 00 00 00| ....| entsize: 0 0x143c-0x143f.7 (4) + | | | [19]{}: section_header 0x1004-0x1467.7 (1124) 0x1000| 47 43 43 3a 20 28 41 6c 70 69 6e 65| GCC: (Alpine| data: raw bits 0x1004-0x1065.7 (98) 0x1010|20 31 30 2e 33 2e 31 5f 67 69 74 32 30 32 31 30| 10.3.1_git20210| * |until 0x1065.7 (98) | | @@ -868,7 +893,7 @@ $ fq -d elf dv a_stripped 0x1450| 00 00 00 00| ....| info: 0 0x145c-0x145f.7 (4) 0x1460|01 00 00 00 |.... | addralign: 1 0x1460-0x1463.7 (4) 0x1460| 01 00 00 00 | .... | entsize: 1 0x1464-0x1467.7 (4) - | | | [19]{}: section_header 0x1066-0x148f.7 (1066) + | | | [20]{}: section_header 0x1066-0x148f.7 (1066) 0x1060| 41 32 00 00 00 61 65 61 62 69| A2...aeabi| data: raw bits 0x1066-0x1098.7 (51) 0x1070|00 01 28 00 00 00 05 36 5a 4b 00 06 07 08 01 09|..(....6ZK......| * |until 0x1098.7 (51) | | @@ -896,7 +921,7 @@ $ fq -d elf dv a_stripped 0x1480| 00 00 00 00 | .... | info: 0 0x1484-0x1487.7 (4) 0x1480| 01 00 00 00 | .... | addralign: 1 0x1488-0x148b.7 (4) 0x1480| 00 00 00 00| ....| entsize: 0 0x148c-0x148f.7 (4) - | | | [20]{}: section_header 0x1099-0x14b7.7 (1055) + | | | [21]{}: section_header 0x1099-0x14b7.7 (1055) 0x1090| 00 2e 73 68 73 74 72| ..shstr| string: "\x00.shstrtab\x00.interp\x00.gnu.hash\x00.dynsym\x00.dynstr\x00.rel."... 0x1099-0x1145.7 (173) 0x10a0|74 61 62 00 2e 69 6e 74 65 72 70 00 2e 67 6e 75|tab..interp..gnu| * |until 0x1145.7 (173) | | @@ -924,31 +949,6 @@ $ fq -d elf dv a_stripped 0x14a0| 00 00 00 00| ....| info: 0 0x14ac-0x14af.7 (4) 0x14b0|01 00 00 00 |.... | addralign: 1 0x14b0-0x14b3.7 (4) 0x14b0| 00 00 00 00| | ....| | entsize: 0 0x14b4-0x14b7.7 (4) - | | | [21]{}: section_header 0x1418-0x143f.7 (40) -0x1410| 8f 00 00 00 | .... | name: ".bss" (143) 0x1418-0x141b.7 (4) -0x1410| 08 00 00 00| ....| type: "nobits" (0x8) (No space in the file) 0x141c-0x141f.7 (4) - | | | flags{}: 0x1420-0x1423.7 (4) -0x1420|03 |. | link_order: false 0x1420-0x1420 (0.1) -0x1420|03 |. | info_link: false 0x1420.1-0x1420.1 (0.1) -0x1420|03 |. | strings: false 0x1420.2-0x1420.2 (0.1) -0x1420|03 |. | merge: false 0x1420.3-0x1420.3 (0.1) -0x1420|03 |. | unused0: 0 0x1420.4-0x1420.4 (0.1) -0x1420|03 |. | execinstr: false 0x1420.5-0x1420.5 (0.1) -0x1420|03 |. | alloc: true 0x1420.6-0x1420.6 (0.1) -0x1420|03 |. | write: true 0x1420.7-0x1420.7 (0.1) -0x1420| 00 | . | tls: false 0x1421-0x1421 (0.1) -0x1420| 00 | . | group: false 0x1421.1-0x1421.1 (0.1) -0x1420| 00 | . | os_nonconforming: false 0x1421.2-0x1421.2 (0.1) -0x1420| 00 00 | .. | unused1: 0 0x1421.3-0x1422.3 (1.1) -0x1420| 00 00 | .. | os_specific: 0 0x1422.4-0x1423.3 (1) -0x1420| 00 | . | processor_specific: 0 0x1423.4-0x1423.7 (0.4) -0x1420| 04 10 01 00 | .... | addr: 0x11004 0x1424-0x1427.7 (4) -0x1420| 04 10 00 00 | .... | offset: 4100 0x1428-0x142b.7 (4) -0x1420| 1c 00 00 00| ....| size: 0x1c 0x142c-0x142f.7 (4) -0x1430|00 00 00 00 |.... | link: 0 0x1430-0x1433.7 (4) -0x1430| 00 00 00 00 | .... | info: 0 0x1434-0x1437.7 (4) -0x1430| 04 00 00 00 | .... | addralign: 4 0x1438-0x143b.7 (4) -0x1430| 00 00 00 00| ....| entsize: 0 0x143c-0x143f.7 (4) 0x0730| 00 00 00 00| ....| unknown0: raw bits 0x73c-0xecb.7 (1936) 0x0740|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................| * |until 0xecb.7 (1936) | | diff --git a/format/elf/testdata/linux_arm_v7/libbbb.a.fqtest b/format/elf/testdata/linux_arm_v7/libbbb.a.fqtest index b84508bef..e255fba72 100644 --- a/format/elf/testdata/linux_arm_v7/libbbb.a.fqtest +++ b/format/elf/testdata/linux_arm_v7/libbbb.a.fqtest @@ -105,7 +105,34 @@ $ fq -d ar dv libbbb.a 0x310| 00 00 00 00 | .... | info: 0 0x314-0x317.7 (4) 0x310| 04 00 00 00 | .... | addralign: 4 0x318-0x31b.7 (4) 0x310| 00 00 00 00| ....| entsize: 0 0x31c-0x31f.7 (4) - | | | [2]{}: section_header 0xec-0x36f.7 (644) + | | | [2]{}: section_header 0x25c-0x347.7 (236) +0x250| 14 00 00 00| ....| data: raw bits 0x25c-0x26b.7 (16) +0x260|1c 0d 00 00 20 00 00 00 03 05 00 00 |.... ....... | +0x320|1b 00 00 00 |.... | name: ".rel.text" (27) 0x320-0x323.7 (4) +0x320| 09 00 00 00 | .... | type: "rel" (0x9) (Relocation entries without explicit addends) 0x324-0x327.7 (4) + | | | flags{}: 0x328-0x32b.7 (4) +0x320| 40 | @ | link_order: false 0x328-0x328 (0.1) +0x320| 40 | @ | info_link: true 0x328.1-0x328.1 (0.1) +0x320| 40 | @ | strings: false 0x328.2-0x328.2 (0.1) +0x320| 40 | @ | merge: false 0x328.3-0x328.3 (0.1) +0x320| 40 | @ | unused0: 0 0x328.4-0x328.4 (0.1) +0x320| 40 | @ | execinstr: false 0x328.5-0x328.5 (0.1) +0x320| 40 | @ | alloc: false 0x328.6-0x328.6 (0.1) +0x320| 40 | @ | write: false 0x328.7-0x328.7 (0.1) +0x320| 00 | . | tls: false 0x329-0x329 (0.1) +0x320| 00 | . | group: false 0x329.1-0x329.1 (0.1) +0x320| 00 | . | os_nonconforming: false 0x329.2-0x329.2 (0.1) +0x320| 00 00 | .. | unused1: 0 0x329.3-0x32a.3 (1.1) +0x320| 00 00 | .. | os_specific: 0 0x32a.4-0x32b.3 (1) +0x320| 00 | . | processor_specific: 0 0x32b.4-0x32b.7 (0.4) +0x320| 00 00 00 00| ....| addr: 0x0 0x32c-0x32f.7 (4) +0x330|c8 01 00 00 |.... | offset: 456 0x330-0x333.7 (4) +0x330| 10 00 00 00 | .... | size: 0x10 0x334-0x337.7 (4) +0x330| 09 00 00 00 | .... | link: 9 0x338-0x33b.7 (4) +0x330| 01 00 00 00| ....| info: 1 0x33c-0x33f.7 (4) +0x340|04 00 00 00 |.... | addralign: 4 0x340-0x343.7 (4) +0x340| 08 00 00 00 | .... | entsize: 8 0x344-0x347.7 (4) + | | | [3]{}: section_header 0xec-0x36f.7 (644) | | | data: raw bits 0xec-NA (0) 0x340| 25 00 00 00 | %... | name: ".data" (37) 0x348-0x34b.7 (4) 0x340| 01 00 00 00| ....| type: "progbits" (0x1) (Information defined by the program) 0x34c-0x34f.7 (4) @@ -131,7 +158,32 @@ $ fq -d ar dv libbbb.a 0x360| 00 00 00 00 | .... | info: 0 0x364-0x367.7 (4) 0x360| 01 00 00 00 | .... | addralign: 1 0x368-0x36b.7 (4) 0x360| 00 00 00 00| ....| entsize: 0 0x36c-0x36f.7 (4) - | | | [3]{}: section_header 0xec-0x3bf.7 (724) + | | | [4]{}: section_header 0x370-0x397.7 (40) +0x370|2b 00 00 00 |+... | name: ".bss" (43) 0x370-0x373.7 (4) +0x370| 08 00 00 00 | .... | type: "nobits" (0x8) (No space in the file) 0x374-0x377.7 (4) + | | | flags{}: 0x378-0x37b.7 (4) +0x370| 03 | . | link_order: false 0x378-0x378 (0.1) +0x370| 03 | . | info_link: false 0x378.1-0x378.1 (0.1) +0x370| 03 | . | strings: false 0x378.2-0x378.2 (0.1) +0x370| 03 | . | merge: false 0x378.3-0x378.3 (0.1) +0x370| 03 | . | unused0: 0 0x378.4-0x378.4 (0.1) +0x370| 03 | . | execinstr: false 0x378.5-0x378.5 (0.1) +0x370| 03 | . | alloc: true 0x378.6-0x378.6 (0.1) +0x370| 03 | . | write: true 0x378.7-0x378.7 (0.1) +0x370| 00 | . | tls: false 0x379-0x379 (0.1) +0x370| 00 | . | group: false 0x379.1-0x379.1 (0.1) +0x370| 00 | . | os_nonconforming: false 0x379.2-0x379.2 (0.1) +0x370| 00 00 | .. | unused1: 0 0x379.3-0x37a.3 (1.1) +0x370| 00 00 | .. | os_specific: 0 0x37a.4-0x37b.3 (1) +0x370| 00 | . | processor_specific: 0 0x37b.4-0x37b.7 (0.4) +0x370| 00 00 00 00| ....| addr: 0x0 0x37c-0x37f.7 (4) +0x380|58 00 00 00 |X... | offset: 88 0x380-0x383.7 (4) +0x380| 00 00 00 00 | .... | size: 0x0 0x384-0x387.7 (4) +0x380| 00 00 00 00 | .... | link: 0 0x388-0x38b.7 (4) +0x380| 00 00 00 00| ....| info: 0 0x38c-0x38f.7 (4) +0x390|01 00 00 00 |.... | addralign: 1 0x390-0x393.7 (4) +0x390| 00 00 00 00 | .... | entsize: 0 0x394-0x397.7 (4) + | | | [5]{}: section_header 0xec-0x3bf.7 (724) 0x0e0| 6c 69 62 62| libb| data: raw bits 0xec-0xf6.7 (11) 0x0f0|62 62 5f 62 62 62 00 |bb_bbb. | 0x390| 30 00 00 00 | 0... | name: ".rodata" (48) 0x398-0x39b.7 (4) @@ -158,7 +210,7 @@ $ fq -d ar dv libbbb.a 0x3b0| 00 00 00 00 | .... | info: 0 0x3b4-0x3b7.7 (4) 0x3b0| 04 00 00 00 | .... | addralign: 4 0x3b8-0x3bb.7 (4) 0x3b0| 00 00 00 00| ....| entsize: 0 0x3bc-0x3bf.7 (4) - | | | [4]{}: section_header 0xf7-0x3e7.7 (753) + | | | [6]{}: section_header 0xf7-0x3e7.7 (753) 0x0f0| 00 47 43 43 3a 20 28 41 6c| .GCC: (Al| data: raw bits 0xf7-0x128.7 (50) 0x100|70 69 6e 65 20 31 30 2e 33 2e 31 5f 67 69 74 32|pine 10.3.1_git2| * |until 0x128.7 (50) | | @@ -186,7 +238,7 @@ $ fq -d ar dv libbbb.a 0x3d0| 00 00 00 00| ....| info: 0 0x3dc-0x3df.7 (4) 0x3e0|01 00 00 00 |.... | addralign: 1 0x3e0-0x3e3.7 (4) 0x3e0| 01 00 00 00 | .... | entsize: 1 0x3e4-0x3e7.7 (4) - | | | [5]{}: section_header 0x129-0x40f.7 (743) + | | | [7]{}: section_header 0x129-0x40f.7 (743) | | | data: raw bits 0x129-NA (0) 0x3e0| 41 00 00 00 | A... | name: ".note.GNU-stack" (65) 0x3e8-0x3eb.7 (4) 0x3e0| 01 00 00 00| ....| type: "progbits" (0x1) (Information defined by the program) 0x3ec-0x3ef.7 (4) @@ -212,7 +264,7 @@ $ fq -d ar dv libbbb.a 0x400| 00 00 00 00 | .... | info: 0 0x404-0x407.7 (4) 0x400| 01 00 00 00 | .... | addralign: 1 0x408-0x40b.7 (4) 0x400| 00 00 00 00| ....| entsize: 0 0x40c-0x40f.7 (4) - | | | [6]{}: section_header 0x129-0x437.7 (783) + | | | [8]{}: section_header 0x129-0x437.7 (783) 0x120| 41 32 00 00 00 61 65| A2...ae| data: raw bits 0x129-0x15b.7 (51) 0x130|61 62 69 00 01 28 00 00 00 05 36 5a 4b 00 06 07|abi..(....6ZK...| * |until 0x15b.7 (51) | | @@ -240,7 +292,7 @@ $ fq -d ar dv libbbb.a 0x420| 00 00 00 00| ....| info: 0 0x42c-0x42f.7 (4) 0x430|01 00 00 00 |.... | addralign: 1 0x430-0x433.7 (4) 0x430| 00 00 00 00 | .... | entsize: 0 0x434-0x437.7 (4) - | | | [7]{}: section_header 0x15c-0x45f.7 (772) + | | | [9]{}: section_header 0x15c-0x45f.7 (772) | | | symbol_table[0:14]: 0x15c-0x23b.7 (224) | | | [0]{}: symbol 0x15c-0x16b.7 (16) 0x150| 00 00 00 00| ....| name: "" (0) 0x15c-0x15f.7 (4) @@ -392,7 +444,7 @@ $ fq -d ar dv libbbb.a 0x450| 0c 00 00 00 | .... | info: 12 0x454-0x457.7 (4) 0x450| 04 00 00 00 | .... | addralign: 4 0x458-0x45b.7 (4) 0x450| 10 00 00 00| ....| entsize: 16 0x45c-0x45f.7 (4) - | | | [8]{}: section_header 0x23c-0x487.7 (588) + | | | [10]{}: section_header 0x23c-0x487.7 (588) 0x230| 00 6c 69 62| .lib| string: "\x00libbbb.c\x00$d\x00$a\x00libbbb_bbb\x00puts\x00" 0x23c-0x25b.7 (32) 0x240|62 62 62 2e 63 00 24 64 00 24 61 00 6c 69 62 62|bbb.c.$d.$a.libb| 0x250|62 62 5f 62 62 62 00 70 75 74 73 00 |bb_bbb.puts. | @@ -420,34 +472,7 @@ $ fq -d ar dv libbbb.a 0x470| 00 00 00 00| ....| info: 0 0x47c-0x47f.7 (4) 0x480|01 00 00 00 |.... | addralign: 1 0x480-0x483.7 (4) 0x480| 00 00 00 00 | .... | entsize: 0 0x484-0x487.7 (4) - | | | [9]{}: section_header 0x25c-0x347.7 (236) -0x250| 14 00 00 00| ....| data: raw bits 0x25c-0x26b.7 (16) -0x260|1c 0d 00 00 20 00 00 00 03 05 00 00 |.... ....... | -0x320|1b 00 00 00 |.... | name: ".rel.text" (27) 0x320-0x323.7 (4) -0x320| 09 00 00 00 | .... | type: "rel" (0x9) (Relocation entries without explicit addends) 0x324-0x327.7 (4) - | | | flags{}: 0x328-0x32b.7 (4) -0x320| 40 | @ | link_order: false 0x328-0x328 (0.1) -0x320| 40 | @ | info_link: true 0x328.1-0x328.1 (0.1) -0x320| 40 | @ | strings: false 0x328.2-0x328.2 (0.1) -0x320| 40 | @ | merge: false 0x328.3-0x328.3 (0.1) -0x320| 40 | @ | unused0: 0 0x328.4-0x328.4 (0.1) -0x320| 40 | @ | execinstr: false 0x328.5-0x328.5 (0.1) -0x320| 40 | @ | alloc: false 0x328.6-0x328.6 (0.1) -0x320| 40 | @ | write: false 0x328.7-0x328.7 (0.1) -0x320| 00 | . | tls: false 0x329-0x329 (0.1) -0x320| 00 | . | group: false 0x329.1-0x329.1 (0.1) -0x320| 00 | . | os_nonconforming: false 0x329.2-0x329.2 (0.1) -0x320| 00 00 | .. | unused1: 0 0x329.3-0x32a.3 (1.1) -0x320| 00 00 | .. | os_specific: 0 0x32a.4-0x32b.3 (1) -0x320| 00 | . | processor_specific: 0 0x32b.4-0x32b.7 (0.4) -0x320| 00 00 00 00| ....| addr: 0x0 0x32c-0x32f.7 (4) -0x330|c8 01 00 00 |.... | offset: 456 0x330-0x333.7 (4) -0x330| 10 00 00 00 | .... | size: 0x10 0x334-0x337.7 (4) -0x330| 09 00 00 00 | .... | link: 9 0x338-0x33b.7 (4) -0x330| 01 00 00 00| ....| info: 1 0x33c-0x33f.7 (4) -0x340|04 00 00 00 |.... | addralign: 4 0x340-0x343.7 (4) -0x340| 08 00 00 00 | .... | entsize: 8 0x344-0x347.7 (4) - | | | [10]{}: section_header 0x26c-0x4af.7 (580) + | | | [11]{}: section_header 0x26c-0x4af.7 (580) 0x260| 00 2e 73 79| ..sy| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.rel.text\x00.data\x00.bss\x00.r"... 0x26c-0x2cc.7 (97) 0x270|6d 74 61 62 00 2e 73 74 72 74 61 62 00 2e 73 68|mtab..strtab..sh| * |until 0x2cc.7 (97) | | @@ -475,30 +500,5 @@ $ fq -d ar dv libbbb.a 0x4a0| 00 00 00 00 | .... | info: 0 0x4a4-0x4a7.7 (4) 0x4a0| 01 00 00 00 | .... | addralign: 1 0x4a8-0x4ab.7 (4) 0x4a0| 00 00 00 00| ....| entsize: 0 0x4ac-0x4af.7 (4) - | | | [11]{}: section_header 0x370-0x397.7 (40) -0x370|2b 00 00 00 |+... | name: ".bss" (43) 0x370-0x373.7 (4) -0x370| 08 00 00 00 | .... | type: "nobits" (0x8) (No space in the file) 0x374-0x377.7 (4) - | | | flags{}: 0x378-0x37b.7 (4) -0x370| 03 | . | link_order: false 0x378-0x378 (0.1) -0x370| 03 | . | info_link: false 0x378.1-0x378.1 (0.1) -0x370| 03 | . | strings: false 0x378.2-0x378.2 (0.1) -0x370| 03 | . | merge: false 0x378.3-0x378.3 (0.1) -0x370| 03 | . | unused0: 0 0x378.4-0x378.4 (0.1) -0x370| 03 | . | execinstr: false 0x378.5-0x378.5 (0.1) -0x370| 03 | . | alloc: true 0x378.6-0x378.6 (0.1) -0x370| 03 | . | write: true 0x378.7-0x378.7 (0.1) -0x370| 00 | . | tls: false 0x379-0x379 (0.1) -0x370| 00 | . | group: false 0x379.1-0x379.1 (0.1) -0x370| 00 | . | os_nonconforming: false 0x379.2-0x379.2 (0.1) -0x370| 00 00 | .. | unused1: 0 0x379.3-0x37a.3 (1.1) -0x370| 00 00 | .. | os_specific: 0 0x37a.4-0x37b.3 (1) -0x370| 00 | . | processor_specific: 0 0x37b.4-0x37b.7 (0.4) -0x370| 00 00 00 00| ....| addr: 0x0 0x37c-0x37f.7 (4) -0x380|58 00 00 00 |X... | offset: 88 0x380-0x383.7 (4) -0x380| 00 00 00 00 | .... | size: 0x0 0x384-0x387.7 (4) -0x380| 00 00 00 00 | .... | link: 0 0x388-0x38b.7 (4) -0x380| 00 00 00 00| ....| info: 0 0x38c-0x38f.7 (4) -0x390|01 00 00 00 |.... | addralign: 1 0x390-0x393.7 (4) -0x390| 00 00 00 00 | .... | entsize: 0 0x394-0x397.7 (4) 0x2c0| 00 00 00| ...| unknown0: raw bits 0x2cd-0x2cf.7 (3) | | | program_headers[0:0]: 0x4b0-NA (0) diff --git a/format/elf/testdata/linux_arm_v7/libbbb.so.fqtest b/format/elf/testdata/linux_arm_v7/libbbb.so.fqtest index 4a4c42c3c..f7cdf15fd 100644 --- a/format/elf/testdata/linux_arm_v7/libbbb.so.fqtest +++ b/format/elf/testdata/linux_arm_v7/libbbb.so.fqtest @@ -40,23 +40,7 @@ $ fq -d elf dv libbbb.so 0x0040| 05 | . | x: true 0x4c.7-0x4c.7 (0.1) 0x0040| 00 00 00| ...| unused1: 0 0x4d-0x4f.7 (3) 0x0050|00 00 01 00 |.... | align: 65536 0x50-0x53.7 (4) - | | | [1]{}: program_header 0x0-0xb3.7 (180) - | | | program_header{}: 0x0-0xb3.7 (180) - | | | data: raw bits 0x0-NA (0) -0x0090| 51 e5 74 64 | Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0x94-0x97.7 (4) -0x0090| 00 00 00 00 | .... | offset: 0x0 0x98-0x9b.7 (4) -0x0090| 00 00 00 00| ....| vaddr: 0x0 0x9c-0x9f.7 (4) -0x00a0|00 00 00 00 |.... | paddr: 0x0 0xa0-0xa3.7 (4) -0x00a0| 00 00 00 00 | .... | filesz: 0 0xa4-0xa7.7 (4) -0x00a0| 00 00 00 00 | .... | memsz: 0 0xa8-0xab.7 (4) - | | | flags{}: 0xac-0xaf.7 (4) -0x00a0| 06 | . | unused0: 0 0xac-0xac.4 (0.5) -0x00a0| 06 | . | r: true 0xac.5-0xac.5 (0.1) -0x00a0| 06 | . | w: true 0xac.6-0xac.6 (0.1) -0x00a0| 06 | . | x: false 0xac.7-0xac.7 (0.1) -0x00a0| 00 00 00| ...| unused1: 0 0xad-0xaf.7 (3) -0x00b0|10 00 00 00 |.... | align: 16 0xb0-0xb3.7 (4) - | | | [2]{}: program_header 0x54-0x1003.7 (4016) + | | | [1]{}: program_header 0x54-0x1003.7 (4016) | | | program_header{}: 0x54-0x1003.7 (4016) 0x0050| 01 00 00 00 | .... | type: "load" (1) (Loadable segment) 0x54-0x57.7 (4) 0x0050| f0 0e 00 00 | .... | offset: 0xef0 0x58-0x5b.7 (4) @@ -73,7 +57,7 @@ $ fq -d elf dv libbbb.so 0x0070|00 00 01 00 |.... | align: 65536 0x70-0x73.7 (4) 0x0ef0|38 04 00 00 ac 03 00 00 01 00 00 00 90 00 00 00|8...............| data: raw bits 0xef0-0x1003.7 (276) * |until 0x1003.7 (276) | | - | | | [3]{}: program_header 0x74-0xfcf.7 (3932) + | | | [2]{}: program_header 0x74-0xfcf.7 (3932) | | | program_header{}: 0x74-0xfcf.7 (3932) 0x0070| 02 00 00 00 | .... | type: "dynamic" (2) (Dynamic linking information) 0x74-0x77.7 (4) 0x0070| f8 0e 00 00 | .... | offset: 0xef8 0x78-0x7b.7 (4) @@ -91,6 +75,22 @@ $ fq -d elf dv libbbb.so 0x0ef0| 01 00 00 00 90 00 00 00| ........| data: raw bits 0xef8-0xfcf.7 (216) 0x0f00|0c 00 00 00 c8 02 00 00 0d 00 00 00 a8 04 00 00|................| * |until 0xfcf.7 (216) | | + | | | [3]{}: program_header 0x0-0xb3.7 (180) + | | | program_header{}: 0x0-0xb3.7 (180) + | | | data: raw bits 0x0-NA (0) +0x0090| 51 e5 74 64 | Q.td | type: "gnu_stack" (1685382481) (GNU stack permission) 0x94-0x97.7 (4) +0x0090| 00 00 00 00 | .... | offset: 0x0 0x98-0x9b.7 (4) +0x0090| 00 00 00 00| ....| vaddr: 0x0 0x9c-0x9f.7 (4) +0x00a0|00 00 00 00 |.... | paddr: 0x0 0xa0-0xa3.7 (4) +0x00a0| 00 00 00 00 | .... | filesz: 0 0xa4-0xa7.7 (4) +0x00a0| 00 00 00 00 | .... | memsz: 0 0xa8-0xab.7 (4) + | | | flags{}: 0xac-0xaf.7 (4) +0x00a0| 06 | . | unused0: 0 0xac-0xac.4 (0.5) +0x00a0| 06 | . | r: true 0xac.5-0xac.5 (0.1) +0x00a0| 06 | . | w: true 0xac.6-0xac.6 (0.1) +0x00a0| 06 | . | x: false 0xac.7-0xac.7 (0.1) +0x00a0| 00 00 00| ...| unused1: 0 0xad-0xaf.7 (3) +0x00b0|10 00 00 00 |.... | align: 16 0xb0-0xb3.7 (4) | | | [4]{}: program_header 0xb4-0xfff.7 (3916) | | | program_header{}: 0xb4-0xfff.7 (3916) 0x00b0| 52 e5 74 64 | R.td | type: "gnu_relro" (1685382482) (GNU read-only after relocation) 0xb4-0xb7.7 (4) @@ -762,7 +762,32 @@ $ fq -d elf dv libbbb.so 0x1cb0| 00 00 00 00 | .... | info: 0 0x1cb4-0x1cb7.7 (4) 0x1cb0| 04 00 00 00 | .... | addralign: 4 0x1cb8-0x1cbb.7 (4) 0x1cb0| 00 00 00 00| ....| entsize: 0 0x1cbc-0x1cbf.7 (4) - | | | [17]{}: section_header 0x1004-0x1d0f.7 (3340) + | | | [17]{}: section_header 0x1cc0-0x1ce7.7 (40) +0x1cc0|97 00 00 00 |.... | name: ".bss" (151) 0x1cc0-0x1cc3.7 (4) +0x1cc0| 08 00 00 00 | .... | type: "nobits" (0x8) (No space in the file) 0x1cc4-0x1cc7.7 (4) + | | | flags{}: 0x1cc8-0x1ccb.7 (4) +0x1cc0| 03 | . | link_order: false 0x1cc8-0x1cc8 (0.1) +0x1cc0| 03 | . | info_link: false 0x1cc8.1-0x1cc8.1 (0.1) +0x1cc0| 03 | . | strings: false 0x1cc8.2-0x1cc8.2 (0.1) +0x1cc0| 03 | . | merge: false 0x1cc8.3-0x1cc8.3 (0.1) +0x1cc0| 03 | . | unused0: 0 0x1cc8.4-0x1cc8.4 (0.1) +0x1cc0| 03 | . | execinstr: false 0x1cc8.5-0x1cc8.5 (0.1) +0x1cc0| 03 | . | alloc: true 0x1cc8.6-0x1cc8.6 (0.1) +0x1cc0| 03 | . | write: true 0x1cc8.7-0x1cc8.7 (0.1) +0x1cc0| 00 | . | tls: false 0x1cc9-0x1cc9 (0.1) +0x1cc0| 00 | . | group: false 0x1cc9.1-0x1cc9.1 (0.1) +0x1cc0| 00 | . | os_nonconforming: false 0x1cc9.2-0x1cc9.2 (0.1) +0x1cc0| 00 00 | .. | unused1: 0 0x1cc9.3-0x1cca.3 (1.1) +0x1cc0| 00 00 | .. | os_specific: 0 0x1cca.4-0x1ccb.3 (1) +0x1cc0| 00 | . | processor_specific: 0 0x1ccb.4-0x1ccb.7 (0.4) +0x1cc0| 04 10 01 00| ....| addr: 0x11004 0x1ccc-0x1ccf.7 (4) +0x1cd0|04 10 00 00 |.... | offset: 4100 0x1cd0-0x1cd3.7 (4) +0x1cd0| 1c 00 00 00 | .... | size: 0x1c 0x1cd4-0x1cd7.7 (4) +0x1cd0| 00 00 00 00 | .... | link: 0 0x1cd8-0x1cdb.7 (4) +0x1cd0| 00 00 00 00| ....| info: 0 0x1cdc-0x1cdf.7 (4) +0x1ce0|04 00 00 00 |.... | addralign: 4 0x1ce0-0x1ce3.7 (4) +0x1ce0| 00 00 00 00 | .... | entsize: 0 0x1ce4-0x1ce7.7 (4) + | | | [18]{}: section_header 0x1004-0x1d0f.7 (3340) 0x1000| 47 43 43 3a 20 28 41 6c 70 69 6e 65| GCC: (Alpine| data: raw bits 0x1004-0x1034.7 (49) 0x1010|20 31 30 2e 33 2e 31 5f 67 69 74 32 30 32 31 31| 10.3.1_git20211| * |until 0x1034.7 (49) | | @@ -790,7 +815,7 @@ $ fq -d elf dv libbbb.so 0x1d00| 00 00 00 00 | .... | info: 0 0x1d04-0x1d07.7 (4) 0x1d00| 01 00 00 00 | .... | addralign: 1 0x1d08-0x1d0b.7 (4) 0x1d00| 01 00 00 00| ....| entsize: 1 0x1d0c-0x1d0f.7 (4) - | | | [18]{}: section_header 0x1035-0x1d37.7 (3331) + | | | [19]{}: section_header 0x1035-0x1d37.7 (3331) 0x1030| 41 2e 00 00 00 61 65 61 62 69 00| A....aeabi.| data: raw bits 0x1035-0x1063.7 (47) 0x1040|01 24 00 00 00 05 36 5a 4b 00 06 07 08 01 09 01|.$....6ZK.......| * |until 0x1063.7 (47) | | @@ -818,7 +843,7 @@ $ fq -d elf dv libbbb.so 0x1d20| 00 00 00 00| ....| info: 0 0x1d2c-0x1d2f.7 (4) 0x1d30|01 00 00 00 |.... | addralign: 1 0x1d30-0x1d33.7 (4) 0x1d30| 00 00 00 00 | .... | entsize: 0 0x1d34-0x1d37.7 (4) - | | | [19]{}: section_header 0x1068-0x1d5f.7 (3320) + | | | [20]{}: section_header 0x1068-0x1d5f.7 (3320) 0x1060| 24 00 00 00 02 00 00 00| $.......| data: raw bits 0x1068-0x10b7.7 (80) 0x1070|00 00 04 00 00 00 00 00 c8 02 00 00 04 00 00 00|................| * |until 0x10b7.7 (80) | | @@ -846,7 +871,7 @@ $ fq -d elf dv libbbb.so 0x1d50| 00 00 00 00 | .... | info: 0 0x1d54-0x1d57.7 (4) 0x1d50| 08 00 00 00 | .... | addralign: 8 0x1d58-0x1d5b.7 (4) 0x1d50| 00 00 00 00| ....| entsize: 0 0x1d5c-0x1d5f.7 (4) - | | | [20]{}: section_header 0x10b8-0x1d87.7 (3280) + | | | [21]{}: section_header 0x10b8-0x1d87.7 (3280) 0x10b0| 1e 00 00 00 02 00 00 00| ........| data: raw bits 0x10b8-0x10fb.7 (68) 0x10c0|00 00 04 01 00 00 00 00 00 00 00 00 00 00 00 00|................| * |until 0x10fb.7 (68) | | @@ -874,7 +899,7 @@ $ fq -d elf dv libbbb.so 0x1d70| 00 00 00 00| ....| info: 0 0x1d7c-0x1d7f.7 (4) 0x1d80|01 00 00 00 |.... | addralign: 1 0x1d80-0x1d83.7 (4) 0x1d80| 00 00 00 00 | .... | entsize: 0 0x1d84-0x1d87.7 (4) - | | | [21]{}: section_header 0x10fc-0x1daf.7 (3252) + | | | [22]{}: section_header 0x10fc-0x1daf.7 (3252) 0x10f0| 01 11 00 10| ....| data: raw bits 0x10fc-0x111f.7 (36) 0x1100|06 55 06 03 0e 1b 0e 25 0e 13 05 00 00 00 01 11|.U.....%........| 0x1110|00 10 06 55 06 03 0e 1b 0e 25 0e 13 05 00 00 00|...U.....%......| @@ -902,7 +927,7 @@ $ fq -d elf dv libbbb.so 0x1da0| 00 00 00 00 | .... | info: 0 0x1da4-0x1da7.7 (4) 0x1da0| 01 00 00 00 | .... | addralign: 1 0x1da8-0x1dab.7 (4) 0x1da0| 00 00 00 00| ....| entsize: 0 0x1dac-0x1daf.7 (4) - | | | [22]{}: section_header 0x1120-0x1dd7.7 (3256) + | | | [23]{}: section_header 0x1120-0x1dd7.7 (3256) 0x1120|47 00 00 00 03 00 25 00 00 00 02 01 fb 0e 0d 00|G.....%.........| data: raw bits 0x1120-0x11b5.7 (150) * |until 0x11b5.7 (150) | | 0x1db0|de 00 00 00 |.... | name: ".debug_line" (222) 0x1db0-0x1db3.7 (4) @@ -929,7 +954,7 @@ $ fq -d elf dv libbbb.so 0x1dc0| 00 00 00 00| ....| info: 0 0x1dcc-0x1dcf.7 (4) 0x1dd0|01 00 00 00 |.... | addralign: 1 0x1dd0-0x1dd3.7 (4) 0x1dd0| 00 00 00 00 | .... | entsize: 0 0x1dd4-0x1dd7.7 (4) - | | | [23]{}: section_header 0x11b6-0x1dff.7 (3146) + | | | [24]{}: section_header 0x11b6-0x1dff.7 (3146) 0x11b0| 63 72 74 2f 61 72 6d 2f 63 72| crt/arm/cr| data: raw bits 0x11b6-0x120b.7 (86) 0x11c0|74 69 2e 73 00 2f 68 6f 6d 65 2f 62 75 69 6c 64|ti.s./home/build| * |until 0x120b.7 (86) | | @@ -957,7 +982,7 @@ $ fq -d elf dv libbbb.so 0x1df0| 00 00 00 00 | .... | info: 0 0x1df4-0x1df7.7 (4) 0x1df0| 01 00 00 00 | .... | addralign: 1 0x1df8-0x1dfb.7 (4) 0x1df0| 01 00 00 00| ....| entsize: 1 0x1dfc-0x1dff.7 (4) - | | | [24]{}: section_header 0x1210-0x1e27.7 (3096) + | | | [25]{}: section_header 0x1210-0x1e27.7 (3096) 0x1210|ff ff ff ff 00 00 00 00 c8 02 00 00 cc 02 00 00|................| data: raw bits 0x1210-0x124f.7 (64) * |until 0x124f.7 (64) | | 0x1e00|f5 00 00 00 |.... | name: ".debug_ranges" (245) 0x1e00-0x1e03.7 (4) @@ -984,7 +1009,7 @@ $ fq -d elf dv libbbb.so 0x1e10| 00 00 00 00| ....| info: 0 0x1e1c-0x1e1f.7 (4) 0x1e20|08 00 00 00 |.... | addralign: 8 0x1e20-0x1e23.7 (4) 0x1e20| 00 00 00 00 | .... | entsize: 0 0x1e24-0x1e27.7 (4) - | | | [25]{}: section_header 0x1250-0x1e4f.7 (3072) + | | | [26]{}: section_header 0x1250-0x1e4f.7 (3072) | | | symbol_table[0:82]: 0x1250-0x176f.7 (1312) | | | [0]{}: symbol 0x1250-0x125f.7 (16) 0x1250|00 00 00 00 |.... | name: "" (0) 0x1250-0x1253.7 (4) @@ -1748,7 +1773,7 @@ $ fq -d elf dv libbbb.so 0x1e40| 49 00 00 00 | I... | info: 73 0x1e44-0x1e47.7 (4) 0x1e40| 04 00 00 00 | .... | addralign: 4 0x1e48-0x1e4b.7 (4) 0x1e40| 10 00 00 00| ....| entsize: 16 0x1e4c-0x1e4f.7 (4) - | | | [26]{}: section_header 0x1770-0x1e77.7 (1800) + | | | [27]{}: section_header 0x1770-0x1e77.7 (1800) 0x1770|00 63 72 74 69 2e 6f 00 24 61 00 63 72 74 6e 2e|.crti.o.$a.crtn.| string: "\x00crti.o\x00$a\x00crtn.o\x00crtstuff.c\x00$d\x00all_implied_fbits\x00"... 0x1770-0x1911.7 (418) * |until 0x1911.7 (418) | | 0x1e50|09 00 00 00 |.... | name: ".strtab" (9) 0x1e50-0x1e53.7 (4) @@ -1775,7 +1800,7 @@ $ fq -d elf dv libbbb.so 0x1e60| 00 00 00 00| ....| info: 0 0x1e6c-0x1e6f.7 (4) 0x1e70|01 00 00 00 |.... | addralign: 1 0x1e70-0x1e73.7 (4) 0x1e70| 00 00 00 00 | .... | entsize: 0 0x1e74-0x1e77.7 (4) - | | | [27]{}: section_header 0x1912-0x1e9f.7 (1422) + | | | [28]{}: section_header 0x1912-0x1e9f.7 (1422) 0x1910| 00 2e 73 79 6d 74 61 62 00 2e 73 74 72 74| ..symtab..strt| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.gnu.hash\x00.dynsym\x00.dyns"... 0x1912-0x1a14.7 (259) 0x1920|61 62 00 2e 73 68 73 74 72 74 61 62 00 2e 67 6e|ab..shstrtab..gn| * |until 0x1a14.7 (259) | | @@ -1803,31 +1828,6 @@ $ fq -d elf dv libbbb.so 0x1e90| 00 00 00 00 | .... | info: 0 0x1e94-0x1e97.7 (4) 0x1e90| 01 00 00 00 | .... | addralign: 1 0x1e98-0x1e9b.7 (4) 0x1e90| 00 00 00 00| ....| entsize: 0 0x1e9c-0x1e9f.7 (4) - | | | [28]{}: section_header 0x1cc0-0x1ce7.7 (40) -0x1cc0|97 00 00 00 |.... | name: ".bss" (151) 0x1cc0-0x1cc3.7 (4) -0x1cc0| 08 00 00 00 | .... | type: "nobits" (0x8) (No space in the file) 0x1cc4-0x1cc7.7 (4) - | | | flags{}: 0x1cc8-0x1ccb.7 (4) -0x1cc0| 03 | . | link_order: false 0x1cc8-0x1cc8 (0.1) -0x1cc0| 03 | . | info_link: false 0x1cc8.1-0x1cc8.1 (0.1) -0x1cc0| 03 | . | strings: false 0x1cc8.2-0x1cc8.2 (0.1) -0x1cc0| 03 | . | merge: false 0x1cc8.3-0x1cc8.3 (0.1) -0x1cc0| 03 | . | unused0: 0 0x1cc8.4-0x1cc8.4 (0.1) -0x1cc0| 03 | . | execinstr: false 0x1cc8.5-0x1cc8.5 (0.1) -0x1cc0| 03 | . | alloc: true 0x1cc8.6-0x1cc8.6 (0.1) -0x1cc0| 03 | . | write: true 0x1cc8.7-0x1cc8.7 (0.1) -0x1cc0| 00 | . | tls: false 0x1cc9-0x1cc9 (0.1) -0x1cc0| 00 | . | group: false 0x1cc9.1-0x1cc9.1 (0.1) -0x1cc0| 00 | . | os_nonconforming: false 0x1cc9.2-0x1cc9.2 (0.1) -0x1cc0| 00 00 | .. | unused1: 0 0x1cc9.3-0x1cca.3 (1.1) -0x1cc0| 00 00 | .. | os_specific: 0 0x1cca.4-0x1ccb.3 (1) -0x1cc0| 00 | . | processor_specific: 0 0x1ccb.4-0x1ccb.7 (0.4) -0x1cc0| 04 10 01 00| ....| addr: 0x11004 0x1ccc-0x1ccf.7 (4) -0x1cd0|04 10 00 00 |.... | offset: 4100 0x1cd0-0x1cd3.7 (4) -0x1cd0| 1c 00 00 00 | .... | size: 0x1c 0x1cd4-0x1cd7.7 (4) -0x1cd0| 00 00 00 00 | .... | link: 0 0x1cd8-0x1cdb.7 (4) -0x1cd0| 00 00 00 00| ....| info: 0 0x1cdc-0x1cdf.7 (4) -0x1ce0|04 00 00 00 |.... | addralign: 4 0x1ce0-0x1ce3.7 (4) -0x1ce0| 00 00 00 00 | .... | entsize: 0 0x1ce4-0x1ce7.7 (4) 0x05e0| 00 00 00 00 00 00 00 00 00 00 00 00| ............| unknown0: raw bits 0x5e4-0xeef.7 (2316) 0x05f0|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................| * |until 0xeef.7 (2316) | | diff --git a/format/format.go b/format/format.go index 80d0c48d1..262628fae 100644 --- a/format/format.go +++ b/format/format.go @@ -82,6 +82,7 @@ const ( RAW = "raw" SLL_PACKET = "sll_packet" SLL2_PACKET = "sll2_packet" + SQLITE3 = "sqlite3" TAR = "tar" TCP_SEGMENT = "tcp_segment" TIFF = "tiff" diff --git a/format/pcap/testdata/many_interfaces.fqtest b/format/pcap/testdata/many_interfaces.fqtest index 6dce476f4..3734af5cb 100644 --- a/format/pcap/testdata/many_interfaces.fqtest +++ b/format/pcap/testdata/many_interfaces.fqtest @@ -1596,20 +1596,20 @@ $ fq -d pcapng dv /many_interfaces.pcapng | | | value: "253.12.253.17.in-addr.arpa" 0xf3e-NA (0) | | | ptr{}: 0xf65-0xf82.7 (30) | | | labels[0:4]: 0xf65-0xf82.7 (30) - | | | [0]{}: label 0xf65-0xf82.7 (30) -0x0f60| 03 | . | length: 3 0xf65-0xf65.7 (1) -0x0f60| 63 6f 6d | com | value: "com" 0xf66-0xf68.7 (3) -0x0f80| c0 | . | is_pointer: 3 0xf81-0xf81.1 (0.2) -0x0f80| c0 4f | .O | pointer: 79 0xf81.2-0xf82.7 (1.6) - | | | [1]{}: label 0xf69-0xf69.7 (1) -0x0f60| 00 | . | length: 0 0xf69-0xf69.7 (1) - | | | [2]{}: label 0xf76-0xf7a.7 (5) + | | | [0]{}: label 0xf76-0xf7a.7 (5) 0x0f70| 04 | . | length: 4 0xf76-0xf76.7 (1) 0x0f70| 74 69 6d 65 | time | value: "time" 0xf77-0xf7a.7 (4) - | | | [3]{}: label 0xf7b-0xf80.7 (6) + | | | [1]{}: label 0xf7b-0xf80.7 (6) 0x0f70| 05 | . | length: 5 0xf7b-0xf7b.7 (1) 0x0f70| 61 70 70 6c| appl| value: "apple" 0xf7c-0xf80.7 (5) 0x0f80|65 |e | + | | | [2]{}: label 0xf65-0xf82.7 (30) +0x0f60| 03 | . | length: 3 0xf65-0xf65.7 (1) +0x0f60| 63 6f 6d | com | value: "com" 0xf66-0xf68.7 (3) +0x0f80| c0 | . | is_pointer: 3 0xf81-0xf81.1 (0.2) +0x0f80| c0 4f | .O | pointer: 79 0xf81.2-0xf82.7 (1.6) + | | | [3]{}: label 0xf69-0xf69.7 (1) +0x0f60| 00 | . | length: 0 0xf69-0xf69.7 (1) | | | value: "time.apple.com" 0xf6a-NA (0) 0x0f60| 00 0c | .. | type: "PTR" (12) 0xf6c-0xf6d.7 (2) 0x0f60| 00 01| ..| class: "IN" (1) (Internet) 0xf6e-0xf6f.7 (2) @@ -2205,23 +2205,23 @@ $ fq -d pcapng dv /many_interfaces.pcapng | | | value: "clients6.google.com" 0x1273-NA (0) | | | cname{}: 0x1267-0x128e.7 (40) | | | labels[0:5]: 0x1267-0x128e.7 (40) - | | | [0]{}: label 0x1267-0x128e.7 (40) + | | | [0]{}: label 0x1283-0x128a.7 (8) +0x1280| 07 | . | length: 7 0x1283-0x1283.7 (1) +0x1280| 63 6c 69 65 6e 74 73 | clients | value: "clients" 0x1284-0x128a.7 (7) + | | | [1]{}: label 0x128b-0x128c.7 (2) +0x1280| 01 | . | length: 1 0x128b-0x128b.7 (1) +0x1280| 6c | l | value: "l" 0x128c-0x128c.7 (1) + | | | [2]{}: label 0x1267-0x128e.7 (40) 0x1260| 06 | . | length: 6 0x1267-0x1267.7 (1) 0x1260| 67 6f 6f 67 6c 65 | google | value: "google" 0x1268-0x126d.7 (6) 0x1280| c0 | . | is_pointer: 3 0x128d-0x128d.1 (0.2) 0x1280| c0 15 | .. | pointer: 21 0x128d.2-0x128e.7 (1.6) - | | | [1]{}: label 0x126e-0x1271.7 (4) + | | | [3]{}: label 0x126e-0x1271.7 (4) 0x1260| 03 | . | length: 3 0x126e-0x126e.7 (1) 0x1260| 63| c| value: "com" 0x126f-0x1271.7 (3) 0x1270|6f 6d |om | - | | | [2]{}: label 0x1272-0x1272.7 (1) + | | | [4]{}: label 0x1272-0x1272.7 (1) 0x1270| 00 | . | length: 0 0x1272-0x1272.7 (1) - | | | [3]{}: label 0x1283-0x128a.7 (8) -0x1280| 07 | . | length: 7 0x1283-0x1283.7 (1) -0x1280| 63 6c 69 65 6e 74 73 | clients | value: "clients" 0x1284-0x128a.7 (7) - | | | [4]{}: label 0x128b-0x128c.7 (2) -0x1280| 01 | . | length: 1 0x128b-0x128b.7 (1) -0x1280| 6c | l | value: "l" 0x128c-0x128c.7 (1) | | | value: "clients.l.google.com" 0x1273-NA (0) 0x1270| 00 05 | .. | type: "CNAME" (5) 0x1279-0x127a.7 (2) 0x1270| 00 01 | .. | class: "IN" (1) (Internet) 0x127b-0x127c.7 (2) @@ -2231,26 +2231,26 @@ $ fq -d pcapng dv /many_interfaces.pcapng | | | [1]{}: answer 0x1267-0x129e.7 (56) | | | name{}: 0x1267-0x1290.7 (42) | | | labels[0:5]: 0x1267-0x1290.7 (42) - | | | [0]{}: label 0x1267-0x128e.7 (40) + | | | [0]{}: label 0x1283-0x1290.7 (14) +0x1280| 07 | . | length: 7 0x1283-0x1283.7 (1) +0x1280| 63 6c 69 65 6e 74 73 | clients | value: "clients" 0x1284-0x128a.7 (7) +0x1280| c0| .| is_pointer: 3 0x128f-0x128f.1 (0.2) +0x1280| c0| .| pointer: 49 0x128f.2-0x1290.7 (1.6) +0x1290|31 |1 | + | | | [1]{}: label 0x128b-0x128c.7 (2) +0x1280| 01 | . | length: 1 0x128b-0x128b.7 (1) +0x1280| 6c | l | value: "l" 0x128c-0x128c.7 (1) + | | | [2]{}: label 0x1267-0x128e.7 (40) 0x1260| 06 | . | length: 6 0x1267-0x1267.7 (1) 0x1260| 67 6f 6f 67 6c 65 | google | value: "google" 0x1268-0x126d.7 (6) 0x1280| c0 | . | is_pointer: 3 0x128d-0x128d.1 (0.2) 0x1280| c0 15 | .. | pointer: 21 0x128d.2-0x128e.7 (1.6) - | | | [1]{}: label 0x126e-0x1271.7 (4) + | | | [3]{}: label 0x126e-0x1271.7 (4) 0x1260| 03 | . | length: 3 0x126e-0x126e.7 (1) 0x1260| 63| c| value: "com" 0x126f-0x1271.7 (3) 0x1270|6f 6d |om | - | | | [2]{}: label 0x1272-0x1272.7 (1) + | | | [4]{}: label 0x1272-0x1272.7 (1) 0x1270| 00 | . | length: 0 0x1272-0x1272.7 (1) - | | | [3]{}: label 0x1283-0x1290.7 (14) -0x1280| 07 | . | length: 7 0x1283-0x1283.7 (1) -0x1280| 63 6c 69 65 6e 74 73 | clients | value: "clients" 0x1284-0x128a.7 (7) -0x1280| c0| .| is_pointer: 3 0x128f-0x128f.1 (0.2) -0x1280| c0| .| pointer: 49 0x128f.2-0x1290.7 (1.6) -0x1290|31 |1 | - | | | [4]{}: label 0x128b-0x128c.7 (2) -0x1280| 01 | . | length: 1 0x128b-0x128b.7 (1) -0x1280| 6c | l | value: "l" 0x128c-0x128c.7 (1) | | | value: "clients.l.google.com" 0x1273-NA (0) 0x1290| 00 01 | .. | type: "A" (1) 0x1291-0x1292.7 (2) 0x1290| 00 01 | .. | class: "IN" (1) (Internet) 0x1293-0x1294.7 (2) @@ -2260,26 +2260,26 @@ $ fq -d pcapng dv /many_interfaces.pcapng | | | [2]{}: answer 0x1267-0x12ae.7 (72) | | | name{}: 0x1267-0x12a0.7 (58) | | | labels[0:5]: 0x1267-0x12a0.7 (58) - | | | [0]{}: label 0x1267-0x128e.7 (40) + | | | [0]{}: label 0x1283-0x12a0.7 (30) +0x1280| 07 | . | length: 7 0x1283-0x1283.7 (1) +0x1280| 63 6c 69 65 6e 74 73 | clients | value: "clients" 0x1284-0x128a.7 (7) +0x1290| c0| .| is_pointer: 3 0x129f-0x129f.1 (0.2) +0x1290| c0| .| pointer: 49 0x129f.2-0x12a0.7 (1.6) +0x12a0|31 |1 | + | | | [1]{}: label 0x128b-0x128c.7 (2) +0x1280| 01 | . | length: 1 0x128b-0x128b.7 (1) +0x1280| 6c | l | value: "l" 0x128c-0x128c.7 (1) + | | | [2]{}: label 0x1267-0x128e.7 (40) 0x1260| 06 | . | length: 6 0x1267-0x1267.7 (1) 0x1260| 67 6f 6f 67 6c 65 | google | value: "google" 0x1268-0x126d.7 (6) 0x1280| c0 | . | is_pointer: 3 0x128d-0x128d.1 (0.2) 0x1280| c0 15 | .. | pointer: 21 0x128d.2-0x128e.7 (1.6) - | | | [1]{}: label 0x126e-0x1271.7 (4) + | | | [3]{}: label 0x126e-0x1271.7 (4) 0x1260| 03 | . | length: 3 0x126e-0x126e.7 (1) 0x1260| 63| c| value: "com" 0x126f-0x1271.7 (3) 0x1270|6f 6d |om | - | | | [2]{}: label 0x1272-0x1272.7 (1) + | | | [4]{}: label 0x1272-0x1272.7 (1) 0x1270| 00 | . | length: 0 0x1272-0x1272.7 (1) - | | | [3]{}: label 0x1283-0x12a0.7 (30) -0x1280| 07 | . | length: 7 0x1283-0x1283.7 (1) -0x1280| 63 6c 69 65 6e 74 73 | clients | value: "clients" 0x1284-0x128a.7 (7) -0x1290| c0| .| is_pointer: 3 0x129f-0x129f.1 (0.2) -0x1290| c0| .| pointer: 49 0x129f.2-0x12a0.7 (1.6) -0x12a0|31 |1 | - | | | [4]{}: label 0x128b-0x128c.7 (2) -0x1280| 01 | . | length: 1 0x128b-0x128b.7 (1) -0x1280| 6c | l | value: "l" 0x128c-0x128c.7 (1) | | | value: "clients.l.google.com" 0x1273-NA (0) 0x12a0| 00 01 | .. | type: "A" (1) 0x12a1-0x12a2.7 (2) 0x12a0| 00 01 | .. | class: "IN" (1) (Internet) 0x12a3-0x12a4.7 (2) @@ -2289,26 +2289,26 @@ $ fq -d pcapng dv /many_interfaces.pcapng | | | [3]{}: answer 0x1267-0x12be.7 (88) | | | name{}: 0x1267-0x12b0.7 (74) | | | labels[0:5]: 0x1267-0x12b0.7 (74) - | | | [0]{}: label 0x1267-0x128e.7 (40) + | | | [0]{}: label 0x1283-0x12b0.7 (46) +0x1280| 07 | . | length: 7 0x1283-0x1283.7 (1) +0x1280| 63 6c 69 65 6e 74 73 | clients | value: "clients" 0x1284-0x128a.7 (7) +0x12a0| c0| .| is_pointer: 3 0x12af-0x12af.1 (0.2) +0x12a0| c0| .| pointer: 49 0x12af.2-0x12b0.7 (1.6) +0x12b0|31 |1 | + | | | [1]{}: label 0x128b-0x128c.7 (2) +0x1280| 01 | . | length: 1 0x128b-0x128b.7 (1) +0x1280| 6c | l | value: "l" 0x128c-0x128c.7 (1) + | | | [2]{}: label 0x1267-0x128e.7 (40) 0x1260| 06 | . | length: 6 0x1267-0x1267.7 (1) 0x1260| 67 6f 6f 67 6c 65 | google | value: "google" 0x1268-0x126d.7 (6) 0x1280| c0 | . | is_pointer: 3 0x128d-0x128d.1 (0.2) 0x1280| c0 15 | .. | pointer: 21 0x128d.2-0x128e.7 (1.6) - | | | [1]{}: label 0x126e-0x1271.7 (4) + | | | [3]{}: label 0x126e-0x1271.7 (4) 0x1260| 03 | . | length: 3 0x126e-0x126e.7 (1) 0x1260| 63| c| value: "com" 0x126f-0x1271.7 (3) 0x1270|6f 6d |om | - | | | [2]{}: label 0x1272-0x1272.7 (1) + | | | [4]{}: label 0x1272-0x1272.7 (1) 0x1270| 00 | . | length: 0 0x1272-0x1272.7 (1) - | | | [3]{}: label 0x1283-0x12b0.7 (46) -0x1280| 07 | . | length: 7 0x1283-0x1283.7 (1) -0x1280| 63 6c 69 65 6e 74 73 | clients | value: "clients" 0x1284-0x128a.7 (7) -0x12a0| c0| .| is_pointer: 3 0x12af-0x12af.1 (0.2) -0x12a0| c0| .| pointer: 49 0x12af.2-0x12b0.7 (1.6) -0x12b0|31 |1 | - | | | [4]{}: label 0x128b-0x128c.7 (2) -0x1280| 01 | . | length: 1 0x128b-0x128b.7 (1) -0x1280| 6c | l | value: "l" 0x128c-0x128c.7 (1) | | | value: "clients.l.google.com" 0x1273-NA (0) 0x12b0| 00 01 | .. | type: "A" (1) 0x12b1-0x12b2.7 (2) 0x12b0| 00 01 | .. | class: "IN" (1) (Internet) 0x12b3-0x12b4.7 (2) @@ -2318,26 +2318,26 @@ $ fq -d pcapng dv /many_interfaces.pcapng | | | [4]{}: answer 0x1267-0x12ce.7 (104) | | | name{}: 0x1267-0x12c0.7 (90) | | | labels[0:5]: 0x1267-0x12c0.7 (90) - | | | [0]{}: label 0x1267-0x128e.7 (40) + | | | [0]{}: label 0x1283-0x12c0.7 (62) +0x1280| 07 | . | length: 7 0x1283-0x1283.7 (1) +0x1280| 63 6c 69 65 6e 74 73 | clients | value: "clients" 0x1284-0x128a.7 (7) +0x12b0| c0| .| is_pointer: 3 0x12bf-0x12bf.1 (0.2) +0x12b0| c0| .| pointer: 49 0x12bf.2-0x12c0.7 (1.6) +0x12c0|31 |1 | + | | | [1]{}: label 0x128b-0x128c.7 (2) +0x1280| 01 | . | length: 1 0x128b-0x128b.7 (1) +0x1280| 6c | l | value: "l" 0x128c-0x128c.7 (1) + | | | [2]{}: label 0x1267-0x128e.7 (40) 0x1260| 06 | . | length: 6 0x1267-0x1267.7 (1) 0x1260| 67 6f 6f 67 6c 65 | google | value: "google" 0x1268-0x126d.7 (6) 0x1280| c0 | . | is_pointer: 3 0x128d-0x128d.1 (0.2) 0x1280| c0 15 | .. | pointer: 21 0x128d.2-0x128e.7 (1.6) - | | | [1]{}: label 0x126e-0x1271.7 (4) + | | | [3]{}: label 0x126e-0x1271.7 (4) 0x1260| 03 | . | length: 3 0x126e-0x126e.7 (1) 0x1260| 63| c| value: "com" 0x126f-0x1271.7 (3) 0x1270|6f 6d |om | - | | | [2]{}: label 0x1272-0x1272.7 (1) + | | | [4]{}: label 0x1272-0x1272.7 (1) 0x1270| 00 | . | length: 0 0x1272-0x1272.7 (1) - | | | [3]{}: label 0x1283-0x12c0.7 (62) -0x1280| 07 | . | length: 7 0x1283-0x1283.7 (1) -0x1280| 63 6c 69 65 6e 74 73 | clients | value: "clients" 0x1284-0x128a.7 (7) -0x12b0| c0| .| is_pointer: 3 0x12bf-0x12bf.1 (0.2) -0x12b0| c0| .| pointer: 49 0x12bf.2-0x12c0.7 (1.6) -0x12c0|31 |1 | - | | | [4]{}: label 0x128b-0x128c.7 (2) -0x1280| 01 | . | length: 1 0x128b-0x128b.7 (1) -0x1280| 6c | l | value: "l" 0x128c-0x128c.7 (1) | | | value: "clients.l.google.com" 0x1273-NA (0) 0x12c0| 00 01 | .. | type: "A" (1) 0x12c1-0x12c2.7 (2) 0x12c0| 00 01 | .. | class: "IN" (1) (Internet) 0x12c3-0x12c4.7 (2) @@ -2347,26 +2347,26 @@ $ fq -d pcapng dv /many_interfaces.pcapng | | | [5]{}: answer 0x1267-0x12de.7 (120) | | | name{}: 0x1267-0x12d0.7 (106) | | | labels[0:5]: 0x1267-0x12d0.7 (106) - | | | [0]{}: label 0x1267-0x128e.7 (40) + | | | [0]{}: label 0x1283-0x12d0.7 (78) +0x1280| 07 | . | length: 7 0x1283-0x1283.7 (1) +0x1280| 63 6c 69 65 6e 74 73 | clients | value: "clients" 0x1284-0x128a.7 (7) +0x12c0| c0| .| is_pointer: 3 0x12cf-0x12cf.1 (0.2) +0x12c0| c0| .| pointer: 49 0x12cf.2-0x12d0.7 (1.6) +0x12d0|31 |1 | + | | | [1]{}: label 0x128b-0x128c.7 (2) +0x1280| 01 | . | length: 1 0x128b-0x128b.7 (1) +0x1280| 6c | l | value: "l" 0x128c-0x128c.7 (1) + | | | [2]{}: label 0x1267-0x128e.7 (40) 0x1260| 06 | . | length: 6 0x1267-0x1267.7 (1) 0x1260| 67 6f 6f 67 6c 65 | google | value: "google" 0x1268-0x126d.7 (6) 0x1280| c0 | . | is_pointer: 3 0x128d-0x128d.1 (0.2) 0x1280| c0 15 | .. | pointer: 21 0x128d.2-0x128e.7 (1.6) - | | | [1]{}: label 0x126e-0x1271.7 (4) + | | | [3]{}: label 0x126e-0x1271.7 (4) 0x1260| 03 | . | length: 3 0x126e-0x126e.7 (1) 0x1260| 63| c| value: "com" 0x126f-0x1271.7 (3) 0x1270|6f 6d |om | - | | | [2]{}: label 0x1272-0x1272.7 (1) + | | | [4]{}: label 0x1272-0x1272.7 (1) 0x1270| 00 | . | length: 0 0x1272-0x1272.7 (1) - | | | [3]{}: label 0x1283-0x12d0.7 (78) -0x1280| 07 | . | length: 7 0x1283-0x1283.7 (1) -0x1280| 63 6c 69 65 6e 74 73 | clients | value: "clients" 0x1284-0x128a.7 (7) -0x12c0| c0| .| is_pointer: 3 0x12cf-0x12cf.1 (0.2) -0x12c0| c0| .| pointer: 49 0x12cf.2-0x12d0.7 (1.6) -0x12d0|31 |1 | - | | | [4]{}: label 0x128b-0x128c.7 (2) -0x1280| 01 | . | length: 1 0x128b-0x128b.7 (1) -0x1280| 6c | l | value: "l" 0x128c-0x128c.7 (1) | | | value: "clients.l.google.com" 0x1273-NA (0) 0x12d0| 00 01 | .. | type: "A" (1) 0x12d1-0x12d2.7 (2) 0x12d0| 00 01 | .. | class: "IN" (1) (Internet) 0x12d3-0x12d4.7 (2) @@ -2376,26 +2376,26 @@ $ fq -d pcapng dv /many_interfaces.pcapng | | | [6]{}: answer 0x1267-0x12ee.7 (136) | | | name{}: 0x1267-0x12e0.7 (122) | | | labels[0:5]: 0x1267-0x12e0.7 (122) - | | | [0]{}: label 0x1267-0x128e.7 (40) + | | | [0]{}: label 0x1283-0x12e0.7 (94) +0x1280| 07 | . | length: 7 0x1283-0x1283.7 (1) +0x1280| 63 6c 69 65 6e 74 73 | clients | value: "clients" 0x1284-0x128a.7 (7) +0x12d0| c0| .| is_pointer: 3 0x12df-0x12df.1 (0.2) +0x12d0| c0| .| pointer: 49 0x12df.2-0x12e0.7 (1.6) +0x12e0|31 |1 | + | | | [1]{}: label 0x128b-0x128c.7 (2) +0x1280| 01 | . | length: 1 0x128b-0x128b.7 (1) +0x1280| 6c | l | value: "l" 0x128c-0x128c.7 (1) + | | | [2]{}: label 0x1267-0x128e.7 (40) 0x1260| 06 | . | length: 6 0x1267-0x1267.7 (1) 0x1260| 67 6f 6f 67 6c 65 | google | value: "google" 0x1268-0x126d.7 (6) 0x1280| c0 | . | is_pointer: 3 0x128d-0x128d.1 (0.2) 0x1280| c0 15 | .. | pointer: 21 0x128d.2-0x128e.7 (1.6) - | | | [1]{}: label 0x126e-0x1271.7 (4) + | | | [3]{}: label 0x126e-0x1271.7 (4) 0x1260| 03 | . | length: 3 0x126e-0x126e.7 (1) 0x1260| 63| c| value: "com" 0x126f-0x1271.7 (3) 0x1270|6f 6d |om | - | | | [2]{}: label 0x1272-0x1272.7 (1) + | | | [4]{}: label 0x1272-0x1272.7 (1) 0x1270| 00 | . | length: 0 0x1272-0x1272.7 (1) - | | | [3]{}: label 0x1283-0x12e0.7 (94) -0x1280| 07 | . | length: 7 0x1283-0x1283.7 (1) -0x1280| 63 6c 69 65 6e 74 73 | clients | value: "clients" 0x1284-0x128a.7 (7) -0x12d0| c0| .| is_pointer: 3 0x12df-0x12df.1 (0.2) -0x12d0| c0| .| pointer: 49 0x12df.2-0x12e0.7 (1.6) -0x12e0|31 |1 | - | | | [4]{}: label 0x128b-0x128c.7 (2) -0x1280| 01 | . | length: 1 0x128b-0x128b.7 (1) -0x1280| 6c | l | value: "l" 0x128c-0x128c.7 (1) | | | value: "clients.l.google.com" 0x1273-NA (0) 0x12e0| 00 01 | .. | type: "A" (1) 0x12e1-0x12e2.7 (2) 0x12e0| 00 01 | .. | class: "IN" (1) (Internet) 0x12e3-0x12e4.7 (2) @@ -2405,26 +2405,26 @@ $ fq -d pcapng dv /many_interfaces.pcapng | | | [7]{}: answer 0x1267-0x12fe.7 (152) | | | name{}: 0x1267-0x12f0.7 (138) | | | labels[0:5]: 0x1267-0x12f0.7 (138) - | | | [0]{}: label 0x1267-0x128e.7 (40) + | | | [0]{}: label 0x1283-0x12f0.7 (110) +0x1280| 07 | . | length: 7 0x1283-0x1283.7 (1) +0x1280| 63 6c 69 65 6e 74 73 | clients | value: "clients" 0x1284-0x128a.7 (7) +0x12e0| c0| .| is_pointer: 3 0x12ef-0x12ef.1 (0.2) +0x12e0| c0| .| pointer: 49 0x12ef.2-0x12f0.7 (1.6) +0x12f0|31 |1 | + | | | [1]{}: label 0x128b-0x128c.7 (2) +0x1280| 01 | . | length: 1 0x128b-0x128b.7 (1) +0x1280| 6c | l | value: "l" 0x128c-0x128c.7 (1) + | | | [2]{}: label 0x1267-0x128e.7 (40) 0x1260| 06 | . | length: 6 0x1267-0x1267.7 (1) 0x1260| 67 6f 6f 67 6c 65 | google | value: "google" 0x1268-0x126d.7 (6) 0x1280| c0 | . | is_pointer: 3 0x128d-0x128d.1 (0.2) 0x1280| c0 15 | .. | pointer: 21 0x128d.2-0x128e.7 (1.6) - | | | [1]{}: label 0x126e-0x1271.7 (4) + | | | [3]{}: label 0x126e-0x1271.7 (4) 0x1260| 03 | . | length: 3 0x126e-0x126e.7 (1) 0x1260| 63| c| value: "com" 0x126f-0x1271.7 (3) 0x1270|6f 6d |om | - | | | [2]{}: label 0x1272-0x1272.7 (1) + | | | [4]{}: label 0x1272-0x1272.7 (1) 0x1270| 00 | . | length: 0 0x1272-0x1272.7 (1) - | | | [3]{}: label 0x1283-0x12f0.7 (110) -0x1280| 07 | . | length: 7 0x1283-0x1283.7 (1) -0x1280| 63 6c 69 65 6e 74 73 | clients | value: "clients" 0x1284-0x128a.7 (7) -0x12e0| c0| .| is_pointer: 3 0x12ef-0x12ef.1 (0.2) -0x12e0| c0| .| pointer: 49 0x12ef.2-0x12f0.7 (1.6) -0x12f0|31 |1 | - | | | [4]{}: label 0x128b-0x128c.7 (2) -0x1280| 01 | . | length: 1 0x128b-0x128b.7 (1) -0x1280| 6c | l | value: "l" 0x128c-0x128c.7 (1) | | | value: "clients.l.google.com" 0x1273-NA (0) 0x12f0| 00 01 | .. | type: "A" (1) 0x12f1-0x12f2.7 (2) 0x12f0| 00 01 | .. | class: "IN" (1) (Internet) 0x12f3-0x12f4.7 (2) @@ -2434,26 +2434,26 @@ $ fq -d pcapng dv /many_interfaces.pcapng | | | [8]{}: answer 0x1267-0x130e.7 (168) | | | name{}: 0x1267-0x1300.7 (154) | | | labels[0:5]: 0x1267-0x1300.7 (154) - | | | [0]{}: label 0x1267-0x128e.7 (40) + | | | [0]{}: label 0x1283-0x1300.7 (126) +0x1280| 07 | . | length: 7 0x1283-0x1283.7 (1) +0x1280| 63 6c 69 65 6e 74 73 | clients | value: "clients" 0x1284-0x128a.7 (7) +0x12f0| c0| .| is_pointer: 3 0x12ff-0x12ff.1 (0.2) +0x12f0| c0| .| pointer: 49 0x12ff.2-0x1300.7 (1.6) +0x1300|31 |1 | + | | | [1]{}: label 0x128b-0x128c.7 (2) +0x1280| 01 | . | length: 1 0x128b-0x128b.7 (1) +0x1280| 6c | l | value: "l" 0x128c-0x128c.7 (1) + | | | [2]{}: label 0x1267-0x128e.7 (40) 0x1260| 06 | . | length: 6 0x1267-0x1267.7 (1) 0x1260| 67 6f 6f 67 6c 65 | google | value: "google" 0x1268-0x126d.7 (6) 0x1280| c0 | . | is_pointer: 3 0x128d-0x128d.1 (0.2) 0x1280| c0 15 | .. | pointer: 21 0x128d.2-0x128e.7 (1.6) - | | | [1]{}: label 0x126e-0x1271.7 (4) + | | | [3]{}: label 0x126e-0x1271.7 (4) 0x1260| 03 | . | length: 3 0x126e-0x126e.7 (1) 0x1260| 63| c| value: "com" 0x126f-0x1271.7 (3) 0x1270|6f 6d |om | - | | | [2]{}: label 0x1272-0x1272.7 (1) + | | | [4]{}: label 0x1272-0x1272.7 (1) 0x1270| 00 | . | length: 0 0x1272-0x1272.7 (1) - | | | [3]{}: label 0x1283-0x1300.7 (126) -0x1280| 07 | . | length: 7 0x1283-0x1283.7 (1) -0x1280| 63 6c 69 65 6e 74 73 | clients | value: "clients" 0x1284-0x128a.7 (7) -0x12f0| c0| .| is_pointer: 3 0x12ff-0x12ff.1 (0.2) -0x12f0| c0| .| pointer: 49 0x12ff.2-0x1300.7 (1.6) -0x1300|31 |1 | - | | | [4]{}: label 0x128b-0x128c.7 (2) -0x1280| 01 | . | length: 1 0x128b-0x128b.7 (1) -0x1280| 6c | l | value: "l" 0x128c-0x128c.7 (1) | | | value: "clients.l.google.com" 0x1273-NA (0) 0x1300| 00 01 | .. | type: "A" (1) 0x1301-0x1302.7 (2) 0x1300| 00 01 | .. | class: "IN" (1) (Internet) 0x1303-0x1304.7 (2) @@ -2463,26 +2463,26 @@ $ fq -d pcapng dv /many_interfaces.pcapng | | | [9]{}: answer 0x1267-0x131e.7 (184) | | | name{}: 0x1267-0x1310.7 (170) | | | labels[0:5]: 0x1267-0x1310.7 (170) - | | | [0]{}: label 0x1267-0x128e.7 (40) + | | | [0]{}: label 0x1283-0x1310.7 (142) +0x1280| 07 | . | length: 7 0x1283-0x1283.7 (1) +0x1280| 63 6c 69 65 6e 74 73 | clients | value: "clients" 0x1284-0x128a.7 (7) +0x1300| c0| .| is_pointer: 3 0x130f-0x130f.1 (0.2) +0x1300| c0| .| pointer: 49 0x130f.2-0x1310.7 (1.6) +0x1310|31 |1 | + | | | [1]{}: label 0x128b-0x128c.7 (2) +0x1280| 01 | . | length: 1 0x128b-0x128b.7 (1) +0x1280| 6c | l | value: "l" 0x128c-0x128c.7 (1) + | | | [2]{}: label 0x1267-0x128e.7 (40) 0x1260| 06 | . | length: 6 0x1267-0x1267.7 (1) 0x1260| 67 6f 6f 67 6c 65 | google | value: "google" 0x1268-0x126d.7 (6) 0x1280| c0 | . | is_pointer: 3 0x128d-0x128d.1 (0.2) 0x1280| c0 15 | .. | pointer: 21 0x128d.2-0x128e.7 (1.6) - | | | [1]{}: label 0x126e-0x1271.7 (4) + | | | [3]{}: label 0x126e-0x1271.7 (4) 0x1260| 03 | . | length: 3 0x126e-0x126e.7 (1) 0x1260| 63| c| value: "com" 0x126f-0x1271.7 (3) 0x1270|6f 6d |om | - | | | [2]{}: label 0x1272-0x1272.7 (1) + | | | [4]{}: label 0x1272-0x1272.7 (1) 0x1270| 00 | . | length: 0 0x1272-0x1272.7 (1) - | | | [3]{}: label 0x1283-0x1310.7 (142) -0x1280| 07 | . | length: 7 0x1283-0x1283.7 (1) -0x1280| 63 6c 69 65 6e 74 73 | clients | value: "clients" 0x1284-0x128a.7 (7) -0x1300| c0| .| is_pointer: 3 0x130f-0x130f.1 (0.2) -0x1300| c0| .| pointer: 49 0x130f.2-0x1310.7 (1.6) -0x1310|31 |1 | - | | | [4]{}: label 0x128b-0x128c.7 (2) -0x1280| 01 | . | length: 1 0x128b-0x128b.7 (1) -0x1280| 6c | l | value: "l" 0x128c-0x128c.7 (1) | | | value: "clients.l.google.com" 0x1273-NA (0) 0x1310| 00 01 | .. | type: "A" (1) 0x1311-0x1312.7 (2) 0x1310| 00 01 | .. | class: "IN" (1) (Internet) 0x1313-0x1314.7 (2) @@ -2492,26 +2492,26 @@ $ fq -d pcapng dv /many_interfaces.pcapng | | | [10]{}: answer 0x1267-0x132e.7 (200) | | | name{}: 0x1267-0x1320.7 (186) | | | labels[0:5]: 0x1267-0x1320.7 (186) - | | | [0]{}: label 0x1267-0x128e.7 (40) + | | | [0]{}: label 0x1283-0x1320.7 (158) +0x1280| 07 | . | length: 7 0x1283-0x1283.7 (1) +0x1280| 63 6c 69 65 6e 74 73 | clients | value: "clients" 0x1284-0x128a.7 (7) +0x1310| c0| .| is_pointer: 3 0x131f-0x131f.1 (0.2) +0x1310| c0| .| pointer: 49 0x131f.2-0x1320.7 (1.6) +0x1320|31 |1 | + | | | [1]{}: label 0x128b-0x128c.7 (2) +0x1280| 01 | . | length: 1 0x128b-0x128b.7 (1) +0x1280| 6c | l | value: "l" 0x128c-0x128c.7 (1) + | | | [2]{}: label 0x1267-0x128e.7 (40) 0x1260| 06 | . | length: 6 0x1267-0x1267.7 (1) 0x1260| 67 6f 6f 67 6c 65 | google | value: "google" 0x1268-0x126d.7 (6) 0x1280| c0 | . | is_pointer: 3 0x128d-0x128d.1 (0.2) 0x1280| c0 15 | .. | pointer: 21 0x128d.2-0x128e.7 (1.6) - | | | [1]{}: label 0x126e-0x1271.7 (4) + | | | [3]{}: label 0x126e-0x1271.7 (4) 0x1260| 03 | . | length: 3 0x126e-0x126e.7 (1) 0x1260| 63| c| value: "com" 0x126f-0x1271.7 (3) 0x1270|6f 6d |om | - | | | [2]{}: label 0x1272-0x1272.7 (1) + | | | [4]{}: label 0x1272-0x1272.7 (1) 0x1270| 00 | . | length: 0 0x1272-0x1272.7 (1) - | | | [3]{}: label 0x1283-0x1320.7 (158) -0x1280| 07 | . | length: 7 0x1283-0x1283.7 (1) -0x1280| 63 6c 69 65 6e 74 73 | clients | value: "clients" 0x1284-0x128a.7 (7) -0x1310| c0| .| is_pointer: 3 0x131f-0x131f.1 (0.2) -0x1310| c0| .| pointer: 49 0x131f.2-0x1320.7 (1.6) -0x1320|31 |1 | - | | | [4]{}: label 0x128b-0x128c.7 (2) -0x1280| 01 | . | length: 1 0x128b-0x128b.7 (1) -0x1280| 6c | l | value: "l" 0x128c-0x128c.7 (1) | | | value: "clients.l.google.com" 0x1273-NA (0) 0x1320| 00 01 | .. | type: "A" (1) 0x1321-0x1322.7 (2) 0x1320| 00 01 | .. | class: "IN" (1) (Internet) 0x1323-0x1324.7 (2) @@ -2521,26 +2521,26 @@ $ fq -d pcapng dv /many_interfaces.pcapng | | | [11]{}: answer 0x1267-0x133e.7 (216) | | | name{}: 0x1267-0x1330.7 (202) | | | labels[0:5]: 0x1267-0x1330.7 (202) - | | | [0]{}: label 0x1267-0x128e.7 (40) + | | | [0]{}: label 0x1283-0x1330.7 (174) +0x1280| 07 | . | length: 7 0x1283-0x1283.7 (1) +0x1280| 63 6c 69 65 6e 74 73 | clients | value: "clients" 0x1284-0x128a.7 (7) +0x1320| c0| .| is_pointer: 3 0x132f-0x132f.1 (0.2) +0x1320| c0| .| pointer: 49 0x132f.2-0x1330.7 (1.6) +0x1330|31 |1 | + | | | [1]{}: label 0x128b-0x128c.7 (2) +0x1280| 01 | . | length: 1 0x128b-0x128b.7 (1) +0x1280| 6c | l | value: "l" 0x128c-0x128c.7 (1) + | | | [2]{}: label 0x1267-0x128e.7 (40) 0x1260| 06 | . | length: 6 0x1267-0x1267.7 (1) 0x1260| 67 6f 6f 67 6c 65 | google | value: "google" 0x1268-0x126d.7 (6) 0x1280| c0 | . | is_pointer: 3 0x128d-0x128d.1 (0.2) 0x1280| c0 15 | .. | pointer: 21 0x128d.2-0x128e.7 (1.6) - | | | [1]{}: label 0x126e-0x1271.7 (4) + | | | [3]{}: label 0x126e-0x1271.7 (4) 0x1260| 03 | . | length: 3 0x126e-0x126e.7 (1) 0x1260| 63| c| value: "com" 0x126f-0x1271.7 (3) 0x1270|6f 6d |om | - | | | [2]{}: label 0x1272-0x1272.7 (1) + | | | [4]{}: label 0x1272-0x1272.7 (1) 0x1270| 00 | . | length: 0 0x1272-0x1272.7 (1) - | | | [3]{}: label 0x1283-0x1330.7 (174) -0x1280| 07 | . | length: 7 0x1283-0x1283.7 (1) -0x1280| 63 6c 69 65 6e 74 73 | clients | value: "clients" 0x1284-0x128a.7 (7) -0x1320| c0| .| is_pointer: 3 0x132f-0x132f.1 (0.2) -0x1320| c0| .| pointer: 49 0x132f.2-0x1330.7 (1.6) -0x1330|31 |1 | - | | | [4]{}: label 0x128b-0x128c.7 (2) -0x1280| 01 | . | length: 1 0x128b-0x128b.7 (1) -0x1280| 6c | l | value: "l" 0x128c-0x128c.7 (1) | | | value: "clients.l.google.com" 0x1273-NA (0) 0x1330| 00 01 | .. | type: "A" (1) 0x1331-0x1332.7 (2) 0x1330| 00 01 | .. | class: "IN" (1) (Internet) 0x1333-0x1334.7 (2) diff --git a/format/sqlite3/sqlite3.go b/format/sqlite3/sqlite3.go new file mode 100644 index 000000000..28f26b072 --- /dev/null +++ b/format/sqlite3/sqlite3.go @@ -0,0 +1,436 @@ +package sqlite3 + +// https://www.sqlite.org/fileformat.html +// https://sqlite.org/src/file?name=src/btreeInt.h&ci=trunk +// https://sqlite.org/schematab.html +// showdb from sqlite tools is also very helpful +// Note that sqlite count pages start at 1 which is at byte 0 to pagesize-1 + +// . as $r | sqlite3_schema.message.sql | [capture("\\((?.*)\\)").s | split(", ")[] | split(" ")[0] | ascii_downcase] as $c | $r | torepr.message[0] as $m | [$c,$m] | transpose | map({key: .[0], value: .[1]}) | from_entries +// fqlite: +// go run fq.go --arg name "R.E.M." 'torepr as $db | first($db.Artist[] | select(.[1]==$name)) as $artist | $db.Album[] | select(.[2] == $artist[0]) | .[1] | tovalue' format/sqlite3/testdata/chinook.db + +// TODO: dont sort array or need "external" decode values? +// TODO: lower case? +// TODO: tovalue? +// TODO: split out cell decode? deep now +// TODO: dummy 0 page to get page 0 at [1] to follow sqlite documentation +// TODO: array/struct external to get sorting correct? +// TODO: overflow pages, two pass? +// TODO: format version +// TODO: table/column names +// TODO: assert version and schema version? +// TODO: ptrmap +// TDOO: wal/journal files? combine? +// TODO: header.unused_space + +// > A table with the name "sqlite_sequence" that is used to keep track of the maximum historical INTEGER PRIMARY KEY for a table using AUTOINCREMENT. +// CREATE TABLE sqlite_sequence(name,seq); +// > Tables with names of the form "sqlite_statN" where N is an integer. Such tables store database statistics gathered by the ANALYZE command and used by the query planner to help determine the best algorithm to use for each query. +// CREATE TABLE sqlite_stat1(tbl,idx,stat); +// Only if compiled with SQLITE_ENABLE_STAT2: +// CREATE TABLE sqlite_stat2(tbl,idx,sampleno,sample); +// Only if compiled with SQLITE_ENABLE_STAT3: +// CREATE TABLE sqlite_stat3(tbl,idx,nEq,nLt,nDLt,sample); +// Only if compiled with SQLITE_ENABLE_STAT4: +// CREATE TABLE sqlite_stat4(tbl,idx,nEq,nLt,nDLt,sample); +// TODO: sqlite_autoindex_TABLE_N index + +import ( + "bytes" + "embed" + + "github.com/wader/fq/format" + "github.com/wader/fq/format/registry" + "github.com/wader/fq/internal/mathextra" + "github.com/wader/fq/pkg/bitio" + "github.com/wader/fq/pkg/decode" + "github.com/wader/fq/pkg/scalar" +) + +//go:embed *.jq +var sqlite3FS embed.FS + +func init() { + registry.MustRegister(decode.Format{ + Name: format.SQLITE3, + Description: "SQLite v3 database", + Groups: []string{format.PROBE}, + DecodeFn: sqlite3Decode, + ToRepr: "_sqlite3_torepr", + Files: sqlite3FS, + }) +} + +const sqlite3HeaderSize = 100 + +const ( + serialTypeNULL = 0 + serialTypeS8 = 1 + serialTypeSBE16 = 2 + serialTypeSBE24 = 3 + serialTypeSBE32 = 4 + serialTypeSBE48 = 5 + serialTypeSBE64 = 6 + serialTypeFloatBE64 = 7 + serialTypeInteger0 = 8 + serialTypeInteger1 = 9 + serialTypeInternal10 = 10 + serialTypeInternal11 = 11 +) + +var serialTypeMap = scalar.SToSymStr{ + serialTypeNULL: "null", + serialTypeS8: "int8", + serialTypeSBE16: "int16", + serialTypeSBE24: "int24", + serialTypeSBE32: "int32", + serialTypeSBE48: "int48", + serialTypeSBE64: "int64", + serialTypeFloatBE64: "float64", + serialTypeInteger0: "zero", + serialTypeInteger1: "one", + serialTypeInternal10: "internal10", + serialTypeInternal11: "internal11", +} + +var serialTypeMapper = scalar.Fn(func(s scalar.S) (scalar.S, error) { + typ := s.ActualS() + if st, ok := serialTypeMap[typ]; ok { + s.Description = st + } else if typ >= 12 && typ%2 == 0 { + s.Description = "blob" + } else if typ >= 13 && typ%2 != 0 { + s.Description = "text" + } + return s, nil +}) + +const ( + pageTypePtrmap = 0x00 + pageTypeBTreeIndexInterior = 0x02 + pageTypeBTreeTableInterior = 0x05 + pageTypeBTreeIndexLeaf = 0x0a + pageTypeBTreeTableLeaf = 0x0d +) + +var pageTypeMap = scalar.UToSymStr{ + // pageTypePtrmap: "ptrmap", + pageTypeBTreeIndexInterior: "index_interior", + pageTypeBTreeTableInterior: "table_interior", + pageTypeBTreeIndexLeaf: "index_leaf", + pageTypeBTreeTableLeaf: "table_leaf", +} + +var ptrmapTypeMap = scalar.UToSymStr{ + 1: "rootpage", + 2: "freepage", + 3: "overflow1", + 4: "overflow2", + 5: "btree", +} + +const ( + textEncodingUTF8 = 1 + textEncodingUTF16LE = 2 + textEncodingUTF16BE = 3 +) + +var textEncodingMap = scalar.UToSymStr{ + textEncodingUTF8: "utf8", + textEncodingUTF16LE: "utf16le", + textEncodingUTF16BE: "utf16be", +} + +var versionMap = scalar.UToSymStr{ + 1: "legacy", + 2: "wal", +} + +type sqlite3Header struct { + pageSize int64 + databaseSizePages int + textEncoding int +} + +// TODO: all bits if nine bytes? +// TODO: two complement on bit read count +func varintDecode(d *decode.D) int64 { + var n uint64 + for i := 0; i < 9; i++ { + v := d.U8() + n = n<<7 | v&0b0111_1111 + if v&0b1000_0000 == 0 { + break + } + } + return mathextra.TwosComplement(64, n) +} + +func sqlite3DecodeSerialType(d *decode.D, h sqlite3Header, typ int64) { + switch typ { + case serialTypeNULL: + d.FieldValueNil("value") + case serialTypeS8: + d.FieldS8("value") + case serialTypeSBE16: + d.FieldS16("value") + case serialTypeSBE24: + d.FieldS24("value") + case serialTypeSBE32: + d.FieldS32("value") + case serialTypeSBE48: + d.FieldS48("value") + case serialTypeSBE64: + d.FieldS64("value") + case serialTypeFloatBE64: + d.FieldF64("value") + case serialTypeInteger0: + d.FieldValueU("value", 0) + case serialTypeInteger1: + d.FieldValueU("value", 1) + case 10, 11: + // internal, should not appear in wellformed file + default: + if typ%2 == 0 { + // N => 12 and even: (N-12)/2 bytes blob. + d.FieldRawLen("value", (typ-12)/2*8) + } else { + // N => 13 and odd: (N-13)/2 bytes text + l := int(typ-13) / 2 + switch h.textEncoding { + case textEncodingUTF8: + d.FieldUTF8("value", l) + case textEncodingUTF16LE: + d.FieldUTF16LE("value", l) + case textEncodingUTF16BE: + d.FieldUTF16BE("value", l) + } + } + } +} + +func sqlite3DecodeCellFreeblock(d *decode.D) uint64 { + nextOffset := d.FieldU16("next_offset") + if nextOffset == 0 { + return 0 + } + // TODO: "header" is size bytes or offset+size? seems to be just size + // "size of the freeblock in bytes, including the 4-byte header" + size := d.FieldU16("size") + // TODO: really? + if size == 0 { + return 0 + } + d.FieldRawLen("space", int64(size-4)*8) + return nextOffset +} + +func sqlite3CellPayloadDecode(d *decode.D, h sqlite3Header) { + lengthStart := d.Pos() + length := d.FieldSFn("length", varintDecode) + lengthBits := d.Pos() - lengthStart + var serialTypes []int64 + d.FramedFn((length)*8-lengthBits, func(d *decode.D) { + d.FieldArray("serials", func(d *decode.D) { + for !d.End() { + serialTypes = append( + serialTypes, + d.FieldSFn("serial", varintDecode, serialTypeMapper), + ) + } + }) + }) + d.FieldArray("contents", func(d *decode.D) { + for _, s := range serialTypes { + sqlite3DecodeSerialType(d, h, s) + } + }) +} + +func sqlite3DecodeTreePage(d *decode.D, h sqlite3Header, x int64, payLoadLen int64) { + // formulas from sqlite format spec + u := h.pageSize + p := payLoadLen + m := ((u - 12) * 32 / 255) - 23 + k := m + ((p - m) % (u - 4)) + + var firstPayLoadLen int64 + if k <= x { + firstPayLoadLen = k + } else { + firstPayLoadLen = m + } + + if p <= x { + // payload fits in page + d.FramedFn(firstPayLoadLen*8, func(d *decode.D) { + d.FieldStruct("payload", func(d *decode.D) { sqlite3CellPayloadDecode(d, h) }) + }) + } else { + // payload overflows, collect payload parts + payLoadBB := &bytes.Buffer{} + + d.FieldArray("overflow_pages", func(d *decode.D) { + var nextPage int64 + d.FieldStruct("overflow_page", func(d *decode.D) { + br := d.FieldRawLen("data", firstPayLoadLen*8) + nextPage = d.FieldS32("next_page") + d.MustCopyBits(payLoadBB, br) + }) + + payLoadLenLeft := payLoadLen - firstPayLoadLen + for nextPage != 0 { + d.SeekAbs(((nextPage - 1) * h.pageSize) * 8) + d.FieldStruct("overflow_page", func(d *decode.D) { + nextPage = d.FieldS32("next_page") + overflowSize := mathextra.MinInt64(h.pageSize-4, payLoadLenLeft) + br := d.FieldRawLen("data", overflowSize*8) + payLoadLenLeft -= overflowSize + d.MustCopyBits(payLoadBB, br) + }) + } + }) + + d.FieldStructRootBitBufFn("payload", + bitio.NewBitReader(payLoadBB.Bytes(), -1), + func(d *decode.D) { sqlite3CellPayloadDecode(d, h) }, + ) + } +} + +func sqlite3Decode(d *decode.D, in interface{}) interface{} { + var h sqlite3Header + + d.FieldStruct("header", func(d *decode.D) { + d.FieldUTF8("magic", 16, d.AssertStr("SQLite format 3\x00")) + pageSizeS := d.FieldScalarU16("page_size", scalar.UToSymU{1: 65536}) // in bytes. Must be a power of two between 512 and 32768 inclusive, or the value 1 representing a page size of 65536. + d.FieldU8("write_version", versionMap) // 1 for legacy; 2 for WAL. + d.FieldU8("read_version", versionMap) // . 1 for legacy; 2 for WAL. + d.FieldU8("unused_space") // at the end of each page. Usually 0. + d.FieldU8("maximum_embedded_payload_fraction") // . Must be 64. + d.FieldU8("minimum_embedded_payload_fraction") // . Must be 32. + d.FieldU8("leaf_payload_fraction") // . Must be 32. + d.FieldU32("file_change_counter") // + databaseSizePages := int(d.FieldU32("database_size_pages")) // . The "in-header database size". + d.FieldU32("page_number_freelist") // of the first freelist trunk page. + d.FieldU32("total_number_freelist") // pages. + d.FieldU32("schema_cookie") // . + d.FieldU32("schema_format_number") // . Supported schema formats are 1, 2, 3, and 4. + d.FieldU32("default_page_cache_size") // . + d.FieldU32("page_number_largest_root_btree") // page when in auto-vacuum or incremental-vacuum modes, or zero otherwise. + textEncoding := int(d.FieldU32("text_encoding", textEncodingMap)) + d.FieldU32("user_version") // " as read and set by the user_version pragma. + d.FieldU32("incremental_vacuum_mode") // False (zero) otherwise. + d.FieldU32("application_id") // " set by PRAGMA application_id. + d.FieldRawLen("reserved", 160, d.BitBufIsZero()) // for expansion. Must be zero. + d.FieldU32("version_valid_for") // number. + d.FieldU32("sqlite_version_number") // + + // TODO: nicer API for fallback? + pageSize := int64(pageSizeS.ActualU()) + if pageSizeS.Sym != nil { + pageSize = int64(pageSizeS.SymU()) + } + + h = sqlite3Header{ + pageSize: pageSize, + databaseSizePages: databaseSizePages, + textEncoding: textEncoding, + } + }) + + d.FieldArray("pages", func(d *decode.D) { + // add a filler entry to make real pages start at index 1 + d.FieldStruct("page", func(d *decode.D) { + d.FieldValueStr("type", "page0_index_fill") + }) + + for i := 0; i < h.databaseSizePages; i++ { + pageOffset := h.pageSize * int64(i) + d.SeekAbs(pageOffset * 8) + // skip header for first page + if i == 0 { + d.SeekRel(sqlite3HeaderSize * 8) + } + + d.FieldStruct("page", func(d *decode.D) { + typ := d.FieldU8("type", pageTypeMap) + switch typ { + // case pageTypePtrmap: + // TODO: how to know if just a overflow page? + // log.Printf("ptrmap i: %#+v\n", i) + // d.FieldArray("entries", func(d *decode.D) { + // for j := int64(0); j < h.pageSize/5; j++ { + // d.FieldStruct("entry", func(d *decode.D) { + // d.FieldU8("type", ptrmapTypeMap) + // d.FieldU32("page_number") + // }) + // } + // }) + default: + d.FieldRawLen("data", (h.pageSize-4)*8) + + case pageTypeBTreeIndexInterior, + pageTypeBTreeIndexLeaf, + pageTypeBTreeTableInterior, + pageTypeBTreeTableLeaf: + startFreeblocks := d.FieldU16("start_freeblocks") // The two-byte integer at offset 1 gives the start of the first freeblock on the page, or is zero if there are no freeblocks. + pageCells := d.FieldU16("page_cells") // The two-byte integer at offset 3 gives the number of cells on the page. + d.FieldU16("cell_start") // sThe two-byte integer at offset 5 designates the start of the cell content area. A zero value for this integer is interpreted as 65536. + d.FieldU8("cell_fragments") // The one-byte integer at offset 7 gives the number of fragmented free bytes within the cell content area. + + switch typ { + case pageTypeBTreeIndexInterior, + pageTypeBTreeTableInterior: + d.FieldU32("right_pointer") // The four-byte page number at offset 8 is the right-most pointer. This value appears in the header of interior b-tree pages only and is omitted from all other pages. + } + var cellPointers []uint64 + d.FieldArray("cells_pointers", func(d *decode.D) { + for j := uint64(0); j < pageCells; j++ { + cellPointers = append(cellPointers, d.FieldU16("pointer")) + } + }) + if startFreeblocks != 0 { + d.FieldArray("freeblocks", func(d *decode.D) { + nextOffset := startFreeblocks + for nextOffset != 0 { + d.SeekAbs((pageOffset + int64(nextOffset)) * 8) + d.FieldStruct("freeblock", func(d *decode.D) { + nextOffset = sqlite3DecodeCellFreeblock(d) + }) + } + }) + } + d.FieldArray("cells", func(d *decode.D) { + for _, p := range cellPointers { + d.FieldStruct("cell", func(d *decode.D) { + // TODO: SeekAbs with fn later? + d.SeekAbs((pageOffset + int64(p)) * 8) + switch typ { + case pageTypeBTreeIndexInterior: + d.FieldU32("left_child") + payLoadLen := d.FieldSFn("payload_len", varintDecode) + // formula for x from sqlite format spec + sqlite3DecodeTreePage(d, h, ((h.pageSize-12)*64/255)-23, payLoadLen) + case pageTypeBTreeTableInterior: + d.FieldU32("left_child") + d.FieldSFn("rowid", varintDecode) + case pageTypeBTreeIndexLeaf: + payLoadLen := d.FieldSFn("payload_len", varintDecode) + sqlite3DecodeTreePage(d, h, ((h.pageSize-12)*64/255)-23, payLoadLen) + case pageTypeBTreeTableLeaf: + payLoadLen := d.FieldSFn("payload_len", varintDecode) + d.FieldSFn("rowid", varintDecode) + sqlite3DecodeTreePage(d, h, h.pageSize-35, payLoadLen) + } + }) + } + }) + } + }) + } + }) + + return nil +} diff --git a/format/sqlite3/sqlite3.jq b/format/sqlite3/sqlite3.jq new file mode 100644 index 000000000..d7a9ebcba --- /dev/null +++ b/format/sqlite3/sqlite3.jq @@ -0,0 +1,53 @@ +def sqlite3_btree_walk($page): + ( . as $root + | ( def _t: + if .type == "table_interior" or .type == "index_interior" then + ($root.pages[.cells[].left_child, .right_pointer] | _t) + elif .type == "table_leaf" or .type == "index_leaf" then + .cells[] + else + error("unknown page type \(.type)") + end; + ($page | _t) + ) + ); + +# CREATE TABLE sqlite_schema( +# type text, +# name text, +# tbl_name text, +# rootpage integer, +# sql text +# ); +def sqlite3_schema: + ( [ sqlite3_btree_walk(.pages[1]) + | .payload.contents as [$type, $name, $tbl_name, $rootpage, $sql] + | { key: $name, + value: {$type, $name, $tbl_name, $rootpage, $sql} + } + ] + | from_entries + ); + +def sqlite3_rows($name): + ( sqlite3_schema[$name] as $s + | if $s == null then error("could not find name") end + | sqlite3_btree_walk(.pages[$s.rootpage]) + | . as {rowid: $rowid, payload: {$contents}} + | $contents + | tovalue + | if .[0] == null then .[0] = $rowid end + ); + +def _sqlite3_torepr: + ( . as $root + | sqlite3_schema + | map( + ( select(.type == "table") as $t + | { key: $t.name, + value: [$root | sqlite3_rows($t.name)] + } + ) + ) + | from_entries + ); diff --git a/format/sqlite3/testdata/test.db b/format/sqlite3/testdata/test.db new file mode 100644 index 000000000..a6bc9ba53 Binary files /dev/null and b/format/sqlite3/testdata/test.db differ diff --git a/format/sqlite3/testdata/test.sh b/format/sqlite3/testdata/test.sh new file mode 100755 index 000000000..8663f8e38 --- /dev/null +++ b/format/sqlite3/testdata/test.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +cat test.sql | sqlite3 test.db diff --git a/format/sqlite3/testdata/test.sql b/format/sqlite3/testdata/test.sql new file mode 100644 index 000000000..98cfd8e55 --- /dev/null +++ b/format/sqlite3/testdata/test.sql @@ -0,0 +1,18 @@ +CREATE TABLE aaa ( + cint int primary key, + cvarchar varchar(30), + ctext text, + creal real, + cblob blob +); +INSERT INTO "aaa" VALUES(0, 'var1', 'text1', 0, "blob1"); +INSERT INTO "aaa" VALUES(1, 'var2', 'test2', 1, "blob2"); +INSERT INTO "aaa" VALUES(128, 'var3', 'test3', 128, "blob3"); +INSERT INTO "aaa" VALUES(-128, 'var3', 'test3', -128, "blob3"); +INSERT INTO "aaa" VALUES(9223372036854775807, 'var4', 'test4', 9223372036854775807, "blob4"); +INSERT INTO "aaa" VALUES(-9223372036854775808, 'var5', 'test5', -9223372036854775808, "blob5"); + +-- CREATE TABLE aaa ( +-- cint int primary key +-- ); +-- INSERT INTO "aaa" VALUES(123); diff --git a/pkg/decode/value.go b/pkg/decode/value.go index 4fba6c066..10e707baa 100644 --- a/pkg/decode/value.go +++ b/pkg/decode/value.go @@ -205,9 +205,11 @@ func (v *Value) postProcess() { // TODO: really sort array? if sort it needs to be stable to keep the order // of value with same range start, think null values etc - sort.SliceStable(vv.Children, func(i, j int) bool { - return (vv.Children)[i].Range.Start < (vv.Children)[j].Range.Start - }) + if !vv.IsArray { + sort.SliceStable(vv.Children, func(i, j int) bool { + return (vv.Children)[i].Range.Start < (vv.Children)[j].Range.Start + }) + } v.Index = -1 if vv.IsArray { diff --git a/pkg/interp/testdata/args.fqtest b/pkg/interp/testdata/args.fqtest index e7148eb8f..890f2b370 100644 --- a/pkg/interp/testdata/args.fqtest +++ b/pkg/interp/testdata/args.fqtest @@ -164,6 +164,7 @@ pssh_playready PlayReady PSSH raw Raw bits sll2_packet Linux cooked capture encapsulation v2 sll_packet Linux cooked capture encapsulation +sqlite3 SQLite v3 database tar Tar archive tcp_segment Transmission control protocol segment tiff Tag Image File Format