1
1
mirror of https://github.com/wader/fq.git synced 2024-11-24 11:16:09 +03:00

Merge pull request #368 from wader/xml-allow-procinstr-at-end-better-error

xml: Allow trailing <?procinstr?>
This commit is contained in:
Mattias Wadman 2022-08-12 00:03:48 +02:00 committed by GitHub
commit e387d21a63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
43 changed files with 148 additions and 110 deletions

View File

@ -14,7 +14,7 @@ $ fq dv allDataTypes.avro
0x010|61 |a |
| | | value{}: 0x11-0x3fc.7 (1004)
0x010| d4 0f | .. | length: 1002 0x11-0x12.7 (2)
0x010| 7b 22 66 69 65 6c 64 73 22 3a 5b 7b 22| {"fields":[{"| data: "{\"fields\":[{\"name\":\"null\",\"type\":\"null\"},{\"name\":\""... 0x13-0x3fc.7 (1002)
0x010| 7b 22 66 69 65 6c 64 73 22 3a 5b 7b 22| {"fields":[{"| data: "{\"fields\":[{\"name\":\"null\",\"type\":\"null\"},{\"name..." 0x13-0x3fc.7 (1002)
0x020|6e 61 6d 65 22 3a 22 6e 75 6c 6c 22 2c 22 74 79|name":"null","ty|
* |until 0x3fc.7 (1002) | |
| | | [1]{}: entry 0x3fd-0x40c.7 (16)

View File

@ -21,7 +21,7 @@ $ fq 'dv({array_truncate: 5})' quickstop-deflate.avro
0x000020|68 65 6d 61 |hema |
| | | value{}: 0x24-0x118.7 (245)
0x000020| e6 03 | .. | length: 243 0x24-0x25.7 (2)
0x000020| 7b 22 74 79 70 65 22 3a 22 72| {"type":"r| data: "{\"type\":\"record\",\"name\":\"Person\",\"fields\":[{\"name\""... 0x26-0x118.7 (243)
0x000020| 7b 22 74 79 70 65 22 3a 22 72| {"type":"r| data: "{\"type\":\"record\",\"name\":\"Person\",\"fields\":[{\"na..." 0x26-0x118.7 (243)
0x000030|65 63 6f 72 64 22 2c 22 6e 61 6d 65 22 3a 22 50|ecord","name":"P|
* |until 0x118.7 (243) | |
| | | [1]{}: block 0x119-0x119.7 (1)

View File

@ -14,7 +14,7 @@ $ fq 'dv({array_truncate: 25})' snappy.avro
0x00010|61 |a |
| | | value{}: 0x11-0x3fc.7 (1004)
0x00010| d4 0f | .. | length: 1002 0x11-0x12.7 (2)
0x00010| 7b 22 66 69 65 6c 64 73 22 3a 5b 7b 22| {"fields":[{"| data: "{\"fields\":[{\"name\":\"null\",\"type\":\"null\"},{\"name\":\""... 0x13-0x3fc.7 (1002)
0x00010| 7b 22 66 69 65 6c 64 73 22 3a 5b 7b 22| {"fields":[{"| data: "{\"fields\":[{\"name\":\"null\",\"type\":\"null\"},{\"name..." 0x13-0x3fc.7 (1002)
0x00020|6e 61 6d 65 22 3a 22 6e 75 6c 6c 22 2c 22 74 79|name":"null","ty|
* |until 0x3fc.7 (1002) | |
| | | [1]{}: entry 0x3fd-0x40e.7 (18)

View File

@ -14,7 +14,7 @@ $ fq dv twitter.avro
0x010|61 |a |
| | | value{}: 0x11-0x186.7 (374)
0x010| e8 05 | .. | length: 372 0x11-0x12.7 (2)
0x010| 7b 22 74 79 70 65 22 3a 22 72 65 63 6f| {"type":"reco| data: "{\"type\":\"record\",\"name\":\"twitter_schema\",\"namespac"... 0x13-0x186.7 (372)
0x010| 7b 22 74 79 70 65 22 3a 22 72 65 63 6f| {"type":"reco| data: "{\"type\":\"record\",\"name\":\"twitter_schema\",\"names..." 0x13-0x186.7 (372)
0x020|72 64 22 2c 22 6e 61 6d 65 22 3a 22 74 77 69 74|rd","name":"twit|
* |until 0x186.7 (372) | |
| | | [1]{}: entry 0x187-0x196.7 (16)

View File

@ -181,7 +181,7 @@ $ fq -d bencode dv bbb.torrent
0x01a0| 31 33| 13| length: 13580 0x1ae-0x1b2.7 (5)
0x01b0|35 38 30 |580 |
0x01b0| 3a | : | separator: ":" (valid) 0x1b3-0x1b3.7 (1)
0x01b0| 99 71 9b 2c 2e aa b6 80 df fa 1f 36| .q.,.......6| value: "<22>q<EFBFBD>,.<2E><><EFBFBD><EFBFBD><EFBFBD>\x1f6\x0e<30>LS<4C>x<EFBFBD><78><EFBFBD>)<EFBFBD>>"... 0x1b4-0x36bf.7 (13580)
0x01b0| 99 71 9b 2c 2e aa b6 80 df fa 1f 36| .q.,.......6| value: "<22>q<EFBFBD>,.<2E><><EFBFBD><EFBFBD><EFBFBD>\x1f6\x0e<30>LS<4C>x<EFBFBD><78><EFBFBD>)\xef..." 0x1b4-0x36bf.7 (13580)
0x01c0|0e e0 4c 53 f3 78 bb 84 82 29 c8 3e 98 91 93 f9|..LS.x...).>....|
* |until 0x36bf.7 (13580) | |
| | | [6]{}: pair 0x36c0-0x3700.7 (65)
@ -257,7 +257,7 @@ $ fq -d bencode dv bbb.torrent
0x3700| 39 | 9 | type: "string" ("9") 0x370d-0x370d.7 (1)
0x3700| 39 30 | 90 | length: 90 0x370d-0x370e.7 (2)
0x3700| 3a| :| separator: ":" (valid) 0x370f-0x370f.7 (1)
0x3710|68 74 74 70 3a 2f 2f 64 69 73 74 72 69 62 75 74|http://distribut| value: "http://distribution.bbb3d.renderfarming.net/video/"... 0x3710-0x3769.7 (90)
0x3710|68 74 74 70 3a 2f 2f 64 69 73 74 72 69 62 75 74|http://distribut| value: "http://distribution.bbb3d.renderfarming.net/vid..." 0x3710-0x3769.7 (90)
* |until 0x3769.7 (90) | |
0x3760| 65 | e | end: "e" (valid) 0x376a-0x376a.7 (1)
| | | [8]{}: pair 0x376b-0x3794.7 (42)

View File

@ -5,10 +5,10 @@ $ fq dd genesis.dat
0x000| 1d 01 00 00 | .... | size: 285
| | | header{}:
0x000| 01 00 00 00 | .... | version: 0x1
0x000| 00 00 00 00| ....| previous_block_hash: "00000000000000000000000000000000000000000000000000"... (raw bits)
0x000| 00 00 00 00| ....| previous_block_hash: "00000000000000000000000000000000000000000000000..." (raw bits)
0x010|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................|
0x020|00 00 00 00 00 00 00 00 00 00 00 00 |............ |
0x020| 3b a3 ed fd| ;...| merkle_root: "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2"... (raw bits)
0x020| 3b a3 ed fd| ;...| merkle_root: "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77..." (raw bits)
0x030|7a 7b 12 b2 7a c7 2c 3e 67 76 8f 61 7f c8 1b c3|z{..z.,>gv.a....|
0x040|88 8a 51 32 3a 9f b8 aa 4b 1e 5e 4a |..Q2:...K.^J |
0x040| 29 ab 5f 49| )._I| time: 1231006505 (2009-01-03T18:15:05Z)
@ -21,7 +21,7 @@ $ fq dd genesis.dat
0x050| 01 | . | input_count: 1
| | | inputs[0:1]:
| | | [0]{}: input
0x050| 00 00| ..| txid: "00000000000000000000000000000000000000000000000000"... (raw bits) (coinbase)
0x050| 00 00| ..| txid: "00000000000000000000000000000000000000000000000..." (raw bits) (coinbase)
0x060|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................|
0x070|00 00 00 00 00 00 00 00 00 00 00 00 00 00 |.............. |
0x070| ff ff| ..| vout: 4294967295

View File

@ -464,7 +464,7 @@ $ fq -d elf dv a_dynamic
0x3d60|04 00 00 00 |.... | addralign: 4 0x3d60-0x3d63.7 (4)
0x3d60| 10 00 00 00 | .... | entsize: 16 0x3d64-0x3d67.7 (4)
| | | [5]{}: section_header 0x2c8-0x3d8f.7 (15048)
0x02c0| 00 70 75 74 73 00 5f 5f| .puts.__| string: "\x00puts\x00__cxa_finalize\x00__register_frame_info_bases\x00_"... 0x2c8-0x392.7 (203)
0x02c0| 00 70 75 74 73 00 5f 5f| .puts.__| string: "\x00puts\x00__cxa_finalize\x00__register_frame_info_base..." 0x2c8-0x392.7 (203)
0x02d0|63 78 61 5f 66 69 6e 61 6c 69 7a 65 00 5f 5f 72|cxa_finalize.__r|
* |until 0x392.7 (203) | |
0x3d60| 48 00 00 00 | H... | name: ".dynstr" (72) 0x3d68-0x3d6b.7 (4)
@ -1680,7 +1680,7 @@ $ fq -d elf dv a_dynamic
0x4190| 04 00 00 00 | .... | addralign: 4 0x4198-0x419b.7 (4)
0x4190| 10 00 00 00| ....| entsize: 16 0x419c-0x419f.7 (4)
| | | [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)
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__..." 0x3920-0x3b70.7 (593)
* |until 0x3b70.7 (593) | |
0x41a0|09 00 00 00 |.... | name: ".strtab" (9) 0x41a0-0x41a3.7 (4)
0x41a0| 03 00 00 00 | .... | type: "strtab" (0x3) (String table) 0x41a4-0x41a7.7 (4)
@ -1707,7 +1707,7 @@ $ fq -d elf dv a_dynamic
0x41c0|01 00 00 00 |.... | addralign: 1 0x41c0-0x41c3.7 (4)
0x41c0| 00 00 00 00 | .... | entsize: 0 0x41c4-0x41c7.7 (4)
| | | [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)
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.pr..." 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) | |
0x41c0| 11 00 00 00 | .... | name: ".shstrtab" (17) 0x41c8-0x41cb.7 (4)

View File

@ -457,7 +457,7 @@ $ fq -d elf dv a_static
0x3d70| 04 00 00 00 | .... | addralign: 4 0x3d78-0x3d7b.7 (4)
0x3d70| 10 00 00 00| ....| entsize: 16 0x3d7c-0x3d7f.7 (4)
| | | [5]{}: section_header 0x2b8-0x3da7.7 (15088)
0x02b0| 00 70 75 74 73 00 5f 69| .puts._i| string: "\x00puts\x00_init\x00_fini\x00__cxa_finalize\x00__libc_start_main"... 0x2b8-0x36d.7 (182)
0x02b0| 00 70 75 74 73 00 5f 69| .puts._i| string: "\x00puts\x00_init\x00_fini\x00__cxa_finalize\x00__libc_start_m..." 0x2b8-0x36d.7 (182)
0x02c0|6e 69 74 00 5f 66 69 6e 69 00 5f 5f 63 78 61 5f|nit._fini.__cxa_|
* |until 0x36d.7 (182) | |
0x3d80|48 00 00 00 |H... | name: ".dynstr" (72) 0x3d80-0x3d83.7 (4)
@ -1677,7 +1677,7 @@ $ fq -d elf dv a_static
0x41b0|04 00 00 00 |.... | addralign: 4 0x41b0-0x41b3.7 (4)
0x41b0| 10 00 00 00 | .... | entsize: 16 0x41b4-0x41b7.7 (4)
| | | [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)
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__..." 0x3930-0x3b89.7 (602)
* |until 0x3b89.7 (602) | |
0x41b0| 09 00 00 00 | .... | name: ".strtab" (9) 0x41b8-0x41bb.7 (4)
0x41b0| 03 00 00 00| ....| type: "strtab" (0x3) (String table) 0x41bc-0x41bf.7 (4)
@ -1704,7 +1704,7 @@ $ fq -d elf dv a_static
0x41d0| 01 00 00 00 | .... | addralign: 1 0x41d8-0x41db.7 (4)
0x41d0| 00 00 00 00| ....| entsize: 0 0x41dc-0x41df.7 (4)
| | | [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)
0x3b80| 00 2e 73 79 6d 74| ..symt| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.interp\x00.note.gnu.pr..." 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) | |
0x41e0|11 00 00 00 |.... | name: ".shstrtab" (17) 0x41e0-0x41e3.7 (4)

View File

@ -464,7 +464,7 @@ $ fq -d elf dv a_stripped
0x31e0|04 00 00 00 |.... | addralign: 4 0x31e0-0x31e3.7 (4)
0x31e0| 10 00 00 00 | .... | entsize: 16 0x31e4-0x31e7.7 (4)
| | | [5]{}: section_header 0x2c8-0x320f.7 (12104)
0x02c0| 00 70 75 74 73 00 5f 5f| .puts.__| string: "\x00puts\x00__cxa_finalize\x00__register_frame_info_bases\x00_"... 0x2c8-0x392.7 (203)
0x02c0| 00 70 75 74 73 00 5f 5f| .puts.__| string: "\x00puts\x00__cxa_finalize\x00__register_frame_info_base..." 0x2c8-0x392.7 (203)
0x02d0|63 78 61 5f 66 69 6e 61 6c 69 7a 65 00 5f 5f 72|cxa_finalize.__r|
* |until 0x392.7 (203) | |
0x31e0| 38 00 00 00 | 8... | name: ".dynstr" (56) 0x31e8-0x31eb.7 (4)
@ -1018,7 +1018,7 @@ $ fq -d elf dv a_stripped
0x34b0|01 00 00 00 |.... | addralign: 1 0x34b0-0x34b3.7 (4)
0x34b0| 01 00 00 00 | .... | entsize: 1 0x34b4-0x34b7.7 (4)
| | | [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)
0x3060| 00 2e 73 68 73 74 72 74 61 62| ..shstrtab| string: "\x00.shstrtab\x00.interp\x00.note.gnu.property\x00.gnu.hash..." 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) | |
0x34b0| 01 00 00 00 | .... | name: ".shstrtab" (1) 0x34b8-0x34bb.7 (4)

View File

@ -553,7 +553,7 @@ $ fq -d ar dv libbbb.a
0x590| 04 00 00 00 | .... | addralign: 4 0x596-0x599.7 (4)
0x590| 10 00 00 00 | .... | entsize: 16 0x59a-0x59d.7 (4)
| | | [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)
0x250| 00 6c| .l| string: "\x00libbbb.c\x00libbbb_bbb\x00__x86.get_pc_thunk.ax\x00_GLO..." 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) | |
0x590| 09 00| ..| name: ".strtab" (9) 0x59e-0x5a1.7 (4)
@ -584,7 +584,7 @@ $ fq -d ar dv libbbb.a
0x5c0|00 00 |.. |
0x5c0| 00 00 00 00 | .... | entsize: 0 0x5c2-0x5c5.7 (4)
| | | [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)
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..." 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) | |
0x5c0| 11 00 00 00 | .... | name: ".shstrtab" (17) 0x5c6-0x5c9.7 (4)

View File

@ -372,7 +372,7 @@ $ fq -d elf dv libbbb.so
0x3800| 04 00 00 00 | .... | addralign: 4 0x3808-0x380b.7 (4)
0x3800| 10 00 00 00| ....| entsize: 16 0x380c-0x380f.7 (4)
| | | [3]{}: section_header 0x240-0x3837.7 (13816)
0x0240|00 5f 69 6e 69 74 00 5f 66 69 6e 69 00 5f 49 54|._init._fini._IT| string: "\x00_init\x00_fini\x00_ITM_deregisterTMCloneTable\x00_ITM_regi"... 0x240-0x2ee.7 (175)
0x0240|00 5f 69 6e 69 74 00 5f 66 69 6e 69 00 5f 49 54|._init._fini._IT| string: "\x00_init\x00_fini\x00_ITM_deregisterTMCloneTable\x00_ITM_r..." 0x240-0x2ee.7 (175)
* |until 0x2ee.7 (175) | |
0x3810|2d 00 00 00 |-... | name: ".dynstr" (45) 0x3810-0x3813.7 (4)
0x3810| 03 00 00 00 | .... | type: "strtab" (0x3) (String table) 0x3814-0x3817.7 (4)
@ -1470,7 +1470,7 @@ $ fq -d elf dv libbbb.so
0x3c10| 04 00 00 00 | .... | addralign: 4 0x3c18-0x3c1b.7 (4)
0x3c10| 10 00 00 00| ....| entsize: 16 0x3c1c-0x3c1f.7 (4)
| | | [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)
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_FR..." 0x3470-0x3686.7 (535)
* |until 0x3686.7 (535) | |
0x3c20|09 00 00 00 |.... | name: ".strtab" (9) 0x3c20-0x3c23.7 (4)
0x3c20| 03 00 00 00 | .... | type: "strtab" (0x3) (String table) 0x3c24-0x3c27.7 (4)
@ -1497,7 +1497,7 @@ $ fq -d elf dv libbbb.so
0x3c40|01 00 00 00 |.... | addralign: 1 0x3c40-0x3c43.7 (4)
0x3c40| 00 00 00 00 | .... | entsize: 0 0x3c44-0x3c47.7 (4)
| | | [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)
0x3680| 00 2e 73 79 6d 74 61 62 00| ..symtab.| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.gnu.hash\x00.dynsym\x00.d..." 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) | |
0x3c40| 11 00 00 00 | .... | name: ".shstrtab" (17) 0x3c48-0x3c4b.7 (4)

View File

@ -470,7 +470,7 @@ $ fq -d elf dv a_dynamic
0x3ff0|08 00 00 00 00 00 00 00 |........ | addralign: 8 0x3ff0-0x3ff7.7 (8)
0x3ff0| 18 00 00 00 00 00 00 00| ........| entsize: 24 0x3ff8-0x3fff.7 (8)
| | | [5]{}: section_header 0x468-0x403f.7 (15320)
0x0460| 00 70 75 74 73 00 5f 5f| .puts.__| string: "\x00puts\x00__cxa_finalize\x00__deregister_frame_info\x00_ITM_"... 0x468-0x529.7 (194)
0x0460| 00 70 75 74 73 00 5f 5f| .puts.__| string: "\x00puts\x00__cxa_finalize\x00__deregister_frame_info\x00_I..." 0x468-0x529.7 (194)
0x0470|63 78 61 5f 66 69 6e 61 6c 69 7a 65 00 5f 5f 64|cxa_finalize.__d|
* |until 0x529.7 (194) | |
0x4000|48 00 00 00 |H... | name: ".dynstr" (72) 0x4000-0x4003.7 (4)
@ -1672,7 +1672,7 @@ $ fq -d elf dv a_dynamic
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)
| | | [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)
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__..." 0x3ba0-0x3d8c.7 (493)
* |until 0x3d8c.7 (493) | |
0x46c0|09 00 00 00 |.... | name: ".strtab" (9) 0x46c0-0x46c3.7 (4)
0x46c0| 03 00 00 00 | .... | type: "strtab" (0x3) (String table) 0x46c4-0x46c7.7 (4)
@ -1700,7 +1700,7 @@ $ fq -d elf dv a_dynamic
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)
| | | [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)
0x3d80| 00 2e 73| ..s| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.interp\x00.note.gnu.pr..." 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) | |
0x4700|11 00 00 00 |.... | name: ".shstrtab" (17) 0x4700-0x4703.7 (4)

View File

@ -457,7 +457,7 @@ $ fq -d elf dv a_static
0x4010|08 00 00 00 00 00 00 00 |........ | addralign: 8 0x4010-0x4017.7 (8)
0x4010| 18 00 00 00 00 00 00 00| ........| entsize: 24 0x4018-0x401f.7 (8)
| | | [5]{}: section_header 0x450-0x405f.7 (15376)
0x0450|00 70 75 74 73 00 5f 69 6e 69 74 00 5f 66 69 6e|.puts._init._fin| string: "\x00puts\x00_init\x00_fini\x00__cxa_finalize\x00__libc_start_main"... 0x450-0x4fc.7 (173)
0x0450|00 70 75 74 73 00 5f 69 6e 69 74 00 5f 66 69 6e|.puts._init._fin| string: "\x00puts\x00_init\x00_fini\x00__cxa_finalize\x00__libc_start_m..." 0x450-0x4fc.7 (173)
* |until 0x4fc.7 (173) | |
0x4020|48 00 00 00 |H... | name: ".dynstr" (72) 0x4020-0x4023.7 (4)
0x4020| 03 00 00 00 | .... | type: "strtab" (0x3) (String table) 0x4024-0x4027.7 (4)
@ -1661,7 +1661,7 @@ $ fq -d elf dv a_static
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)
| | | [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)
0x3bb0| 00 53 63 72 74 31 2e 63| .Scrt1.c| string: "\x00Scrt1.c\x00crtstuff.c\x00__CTOR_LIST__\x00__DTOR_LIST__..." 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) | |
0x46e0|09 00 00 00 |.... | name: ".strtab" (9) 0x46e0-0x46e3.7 (4)
@ -1690,7 +1690,7 @@ $ fq -d elf dv a_static
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)
| | | [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)
0x3da0| 00 2e| ..| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.interp\x00.note.gnu.pr..." 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) | |
0x4720|11 00 00 00 |.... | name: ".shstrtab" (17) 0x4720-0x4723.7 (4)

View File

@ -470,7 +470,7 @@ $ fq -d elf dv a_stripped
0x3250| 08 00 00 00 00 00 00 00| ........| addralign: 8 0x3258-0x325f.7 (8)
0x3260|18 00 00 00 00 00 00 00 |........ | entsize: 24 0x3260-0x3267.7 (8)
| | | [5]{}: section_header 0x468-0x32a7.7 (11840)
0x0460| 00 70 75 74 73 00 5f 5f| .puts.__| string: "\x00puts\x00__cxa_finalize\x00__deregister_frame_info\x00_ITM_"... 0x468-0x529.7 (194)
0x0460| 00 70 75 74 73 00 5f 5f| .puts.__| string: "\x00puts\x00__cxa_finalize\x00__deregister_frame_info\x00_I..." 0x468-0x529.7 (194)
0x0470|63 78 61 5f 66 69 6e 61 6c 69 7a 65 00 5f 5f 64|cxa_finalize.__d|
* |until 0x529.7 (194) | |
0x3260| 38 00 00 00 | 8... | name: ".dynstr" (56) 0x3268-0x326b.7 (4)
@ -1040,7 +1040,7 @@ $ fq -d elf dv a_stripped
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)
| | | [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)
0x3060| 00 2e 73 68 73 74| ..shst| string: "\x00.shstrtab\x00.interp\x00.note.gnu.property\x00.gnu.hash..." 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) | |
0x36e0| 01 00 00 00 | .... | name: ".shstrtab" (1) 0x36e8-0x36eb.7 (4)

View File

@ -517,7 +517,7 @@ $ fq -d ar dv libbbb.a
0x630|00 00 00 00 |.... |
0x630| 00 00 00 00 00 00 00 00 | ........ | entsize: 0 0x634-0x63b.7 (8)
| | | [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)
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.bs..." 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) | |
0x630| 11 00 00 00| ....| name: ".shstrtab" (17) 0x63c-0x63f.7 (4)

View File

@ -373,7 +373,7 @@ $ fq -d elf dv libbbb.so
0x3940|08 00 00 00 00 00 00 00 |........ | addralign: 8 0x3940-0x3947.7 (8)
0x3940| 18 00 00 00 00 00 00 00| ........| entsize: 24 0x3948-0x394f.7 (8)
| | | [3]{}: section_header 0x390-0x398f.7 (13824)
0x0390|00 5f 69 6e 69 74 00 5f 66 69 6e 69 00 5f 49 54|._init._fini._IT| string: "\x00_init\x00_fini\x00_ITM_deregisterTMCloneTable\x00_ITM_regi"... 0x390-0x435.7 (166)
0x0390|00 5f 69 6e 69 74 00 5f 66 69 6e 69 00 5f 49 54|._init._fini._IT| string: "\x00_init\x00_fini\x00_ITM_deregisterTMCloneTable\x00_ITM_r..." 0x390-0x435.7 (166)
* |until 0x435.7 (166) | |
0x3950|2d 00 00 00 |-... | name: ".dynstr" (45) 0x3950-0x3953.7 (4)
0x3950| 03 00 00 00 | .... | type: "strtab" (0x3) (String table) 0x3954-0x3957.7 (4)
@ -1460,7 +1460,7 @@ $ fq -d elf dv libbbb.so
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)
| | | [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)
0x35c0| 00 63 72 74 73 74 75 66| .crtstuf| string: "\x00crtstuff.c\x00__CTOR_LIST__\x00__DTOR_LIST__\x00__EH_FR..." 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) | |
0x3fd0|09 00 00 00 |.... | name: ".strtab" (9) 0x3fd0-0x3fd3.7 (4)
@ -1489,7 +1489,7 @@ $ fq -d elf dv libbbb.so
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)
| | | [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)
0x3770| 00 2e 73 79 6d| ..sym| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.gnu.hash\x00.dynsym\x00.d..." 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) | |
0x4010|11 00 00 00 |.... | name: ".shstrtab" (17) 0x4010-0x4013.7 (4)

View File

@ -391,7 +391,7 @@ $ fq -d elf dv a_dynamic
0x2460|08 00 00 00 00 00 00 00 |........ | addralign: 8 0x2460-0x2467.7 (8)
0x2460| 18 00 00 00 00 00 00 00| ........| entsize: 24 0x2468-0x246f.7 (8)
| | | [4]{}: section_header 0x380-0x24af.7 (8496)
0x0380|00 70 75 74 73 00 5f 5f 63 78 61 5f 66 69 6e 61|.puts.__cxa_fina| string: "\x00puts\x00__cxa_finalize\x00__deregister_frame_info\x00_ITM_"... 0x380-0x442.7 (195)
0x0380|00 70 75 74 73 00 5f 5f 63 78 61 5f 66 69 6e 61|.puts.__cxa_fina| string: "\x00puts\x00__cxa_finalize\x00__deregister_frame_info\x00_I..." 0x380-0x442.7 (195)
* |until 0x442.7 (195) | |
0x2470|35 00 00 00 |5... | name: ".dynstr" (53) 0x2470-0x2473.7 (4)
0x2470| 03 00 00 00 | .... | type: "strtab" (0x3) (String table) 0x2474-0x2477.7 (4)
@ -1998,7 +1998,7 @@ $ fq -d elf dv a_dynamic
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)
| | | [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)
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_FR..." 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) | |
0x2af0|09 00 00 00 |.... | name: ".strtab" (9) 0x2af0-0x2af3.7 (4)
@ -2027,7 +2027,7 @@ $ fq -d elf dv a_dynamic
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)
| | | [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)
0x2240| 00 2e 73 79 6d 74| ..symt| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.interp\x00.gnu.hash\x00.d..." 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) | |
0x2b30|11 00 00 00 |.... | name: ".shstrtab" (17) 0x2b30-0x2b33.7 (4)

View File

@ -385,7 +385,7 @@ $ fq -d elf dv a_static
0x24c0| 08 00 00 00 00 00 00 00| ........| addralign: 8 0x24c8-0x24cf.7 (8)
0x24d0|18 00 00 00 00 00 00 00 |........ | entsize: 24 0x24d0-0x24d7.7 (8)
| | | [4]{}: section_header 0x368-0x2517.7 (8624)
0x0360| 00 70 75 74 73 00 5f 69| .puts._i| string: "\x00puts\x00_init\x00_fini\x00__cxa_finalize\x00__libc_start_main"... 0x368-0x415.7 (174)
0x0360| 00 70 75 74 73 00 5f 69| .puts._i| string: "\x00puts\x00_init\x00_fini\x00__cxa_finalize\x00__libc_start_m..." 0x368-0x415.7 (174)
0x0370|6e 69 74 00 5f 66 69 6e 69 00 5f 5f 63 78 61 5f|nit._fini.__cxa_|
* |until 0x415.7 (174) | |
0x24d0| 35 00 00 00 | 5... | name: ".dynstr" (53) 0x24d8-0x24db.7 (4)
@ -2030,7 +2030,7 @@ $ fq -d elf dv a_static
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)
| | | [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)
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_FR..." 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) | |
0x2b50| 09 00 00 00 | .... | name: ".strtab" (9) 0x2b58-0x2b5b.7 (4)
@ -2059,7 +2059,7 @@ $ fq -d elf dv a_static
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)
| | | [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)
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.d..." 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) | |
0x2b90| 11 00 00 00 | .... | name: ".shstrtab" (17) 0x2b98-0x2b9b.7 (4)

View File

@ -391,7 +391,7 @@ $ fq -d elf dv a_stripped
0x1200| 08 00 00 00 00 00 00 00| ........| addralign: 8 0x1208-0x120f.7 (8)
0x1210|18 00 00 00 00 00 00 00 |........ | entsize: 24 0x1210-0x1217.7 (8)
| | | [4]{}: section_header 0x380-0x1257.7 (3800)
0x0380|00 70 75 74 73 00 5f 5f 63 78 61 5f 66 69 6e 61|.puts.__cxa_fina| string: "\x00puts\x00__cxa_finalize\x00__deregister_frame_info\x00_ITM_"... 0x380-0x442.7 (195)
0x0380|00 70 75 74 73 00 5f 5f 63 78 61 5f 66 69 6e 61|.puts.__cxa_fina| string: "\x00puts\x00__cxa_finalize\x00__deregister_frame_info\x00_I..." 0x380-0x442.7 (195)
* |until 0x442.7 (195) | |
0x1210| 25 00 00 00 | %... | name: ".dynstr" (37) 0x1218-0x121b.7 (4)
0x1210| 03 00 00 00| ....| type: "strtab" (0x3) (String table) 0x121c-0x121f.7 (4)
@ -942,7 +942,7 @@ $ fq -d elf dv a_stripped
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)
| | | [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)
0x1060| 00 2e 73 68 73 74| ..shst| string: "\x00.shstrtab\x00.interp\x00.gnu.hash\x00.dynsym\x00.dynstr\x00.r..." 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) | |
0x1650| 01 00 00 00 | .... | name: ".shstrtab" (1) 0x1658-0x165b.7 (4)

View File

@ -552,7 +552,7 @@ $ fq -d ar dv libbbb.a
0x690| 00 00 00 00| ....| entsize: 0 0x69c-0x6a3.7 (8)
0x6a0|00 00 00 00 |.... |
| | | [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)
0x330| 00 2e 73 79| ..sy| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.rela.text\x00.data\x00.bs..." 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) | |
0x6a0| 11 00 00 00 | .... | name: ".shstrtab" (17) 0x6a4-0x6a7.7 (4)

View File

@ -327,7 +327,7 @@ $ fq -d elf dv libbbb.so
0x1cd0| 08 00 00 00 00 00 00 00| ........| addralign: 8 0x1cd8-0x1cdf.7 (8)
0x1ce0|18 00 00 00 00 00 00 00 |........ | entsize: 24 0x1ce0-0x1ce7.7 (8)
| | | [3]{}: section_header 0x2e0-0x1d27.7 (6728)
0x02e0|00 5f 69 6e 69 74 00 5f 66 69 6e 69 00 5f 49 54|._init._fini._IT| string: "\x00_init\x00_fini\x00_ITM_deregisterTMCloneTable\x00_ITM_regi"... 0x2e0-0x386.7 (167)
0x02e0|00 5f 69 6e 69 74 00 5f 66 69 6e 69 00 5f 49 54|._init._fini._IT| string: "\x00_init\x00_fini\x00_ITM_deregisterTMCloneTable\x00_ITM_r..." 0x2e0-0x386.7 (167)
* |until 0x386.7 (167) | |
0x1ce0| 2d 00 00 00 | -... | name: ".dynstr" (45) 0x1ce8-0x1ceb.7 (4)
0x1ce0| 03 00 00 00| ....| type: "strtab" (0x3) (String table) 0x1cec-0x1cef.7 (4)
@ -1715,7 +1715,7 @@ $ fq -d elf dv libbbb.so
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)
| | | [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)
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_BEGI..." 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) | |
0x22e0| 09 00 00 00 | .... | name: ".strtab" (9) 0x22e8-0x22eb.7 (4)
@ -1744,7 +1744,7 @@ $ fq -d elf dv libbbb.so
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)
| | | [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)
0x1b10| 00 2e| ..| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.gnu.hash\x00.dynsym\x00.d..." 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) | |
0x2320| 11 00 00 00 | .... | name: ".shstrtab" (17) 0x2328-0x232b.7 (4)

View File

@ -374,7 +374,7 @@ $ fq -d elf dv a_dynamic
0x2120| 04 00 00 00| ....| addralign: 4 0x212c-0x212f.7 (4)
0x2130|10 00 00 00 |.... | entsize: 16 0x2130-0x2133.7 (4)
| | | [4]{}: section_header 0x220-0x215b.7 (7996)
0x0220|00 70 75 74 73 00 5f 5f 63 78 61 5f 66 69 6e 61|.puts.__cxa_fina| string: "\x00puts\x00__cxa_finalize\x00__deregister_frame_info\x00_ITM_"... 0x220-0x2e0.7 (193)
0x0220|00 70 75 74 73 00 5f 5f 63 78 61 5f 66 69 6e 61|.puts.__cxa_fina| string: "\x00puts\x00__cxa_finalize\x00__deregister_frame_info\x00_I..." 0x220-0x2e0.7 (193)
* |until 0x2e0.7 (193) | |
0x2130| 35 00 00 00 | 5... | name: ".dynstr" (53) 0x2134-0x2137.7 (4)
0x2130| 03 00 00 00 | .... | type: "strtab" (0x3) (String table) 0x2138-0x213b.7 (4)
@ -2089,7 +2089,7 @@ $ fq -d elf dv a_dynamic
0x2530| 04 00 00 00| ....| addralign: 4 0x253c-0x253f.7 (4)
0x2540|10 00 00 00 |.... | entsize: 16 0x2540-0x2543.7 (4)
| | | [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)
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_imp..." 0x1d70-0x1f6d.7 (510)
* |until 0x1f6d.7 (510) | |
0x2540| 09 00 00 00 | .... | name: ".strtab" (9) 0x2544-0x2547.7 (4)
0x2540| 03 00 00 00 | .... | type: "strtab" (0x3) (String table) 0x2548-0x254b.7 (4)
@ -2116,7 +2116,7 @@ $ fq -d elf dv a_dynamic
0x2560| 01 00 00 00 | .... | addralign: 1 0x2564-0x2567.7 (4)
0x2560| 00 00 00 00 | .... | entsize: 0 0x2568-0x256b.7 (4)
| | | [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)
0x1f60| 00 2e| ..| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.interp\x00.gnu.hash\x00.d..." 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) | |
0x2560| 11 00 00 00| ....| name: ".shstrtab" (17) 0x256c-0x256f.7 (4)

View File

@ -364,7 +364,7 @@ $ fq -d elf dv a_static
0x2170| 04 00 00 00 | .... | addralign: 4 0x2174-0x2177.7 (4)
0x2170| 10 00 00 00 | .... | entsize: 16 0x2178-0x217b.7 (4)
| | | [4]{}: section_header 0x210-0x21a3.7 (8084)
0x0210|00 70 75 74 73 00 5f 69 6e 69 74 00 5f 66 69 6e|.puts._init._fin| string: "\x00puts\x00_init\x00_fini\x00__cxa_finalize\x00__libc_start_main"... 0x210-0x2bb.7 (172)
0x0210|00 70 75 74 73 00 5f 69 6e 69 74 00 5f 66 69 6e|.puts._init._fin| string: "\x00puts\x00_init\x00_fini\x00__cxa_finalize\x00__libc_start_m..." 0x210-0x2bb.7 (172)
* |until 0x2bb.7 (172) | |
0x2170| 35 00 00 00| 5...| name: ".dynstr" (53) 0x217c-0x217f.7 (4)
0x2180|03 00 00 00 |.... | type: "strtab" (0x3) (String table) 0x2180-0x2183.7 (4)
@ -2110,7 +2110,7 @@ $ fq -d elf dv a_static
0x2580| 04 00 00 00 | .... | addralign: 4 0x2584-0x2587.7 (4)
0x2580| 10 00 00 00 | .... | entsize: 16 0x2588-0x258b.7 (4)
| | | [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)
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_imp..." 0x1db0-0x1fb6.7 (519)
* |until 0x1fb6.7 (519) | |
0x2580| 09 00 00 00| ....| name: ".strtab" (9) 0x258c-0x258f.7 (4)
0x2590|03 00 00 00 |.... | type: "strtab" (0x3) (String table) 0x2590-0x2593.7 (4)
@ -2137,7 +2137,7 @@ $ fq -d elf dv a_static
0x25a0| 01 00 00 00| ....| addralign: 1 0x25ac-0x25af.7 (4)
0x25b0|00 00 00 00 |.... | entsize: 0 0x25b0-0x25b3.7 (4)
| | | [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)
0x1fb0| 00 2e 73 79 6d 74 61 62 00| ..symtab.| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.interp\x00.gnu.hash\x00.d..." 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) | |
0x25b0| 11 00 00 00 | .... | name: ".shstrtab" (17) 0x25b4-0x25b7.7 (4)

View File

@ -374,7 +374,7 @@ $ fq -d elf dv a_stripped
0x11e0|04 00 00 00 |.... | addralign: 4 0x11e0-0x11e3.7 (4)
0x11e0| 10 00 00 00 | .... | entsize: 16 0x11e4-0x11e7.7 (4)
| | | [4]{}: section_header 0x220-0x120f.7 (4080)
0x0220|00 70 75 74 73 00 5f 5f 63 78 61 5f 66 69 6e 61|.puts.__cxa_fina| string: "\x00puts\x00__cxa_finalize\x00__deregister_frame_info\x00_ITM_"... 0x220-0x2e0.7 (193)
0x0220|00 70 75 74 73 00 5f 5f 63 78 61 5f 66 69 6e 61|.puts.__cxa_fina| string: "\x00puts\x00__cxa_finalize\x00__deregister_frame_info\x00_I..." 0x220-0x2e0.7 (193)
* |until 0x2e0.7 (193) | |
0x11e0| 25 00 00 00 | %... | name: ".dynstr" (37) 0x11e8-0x11eb.7 (4)
0x11e0| 03 00 00 00| ....| type: "strtab" (0x3) (String table) 0x11ec-0x11ef.7 (4)
@ -915,7 +915,7 @@ $ fq -d elf dv a_stripped
0x1480| 01 00 00 00 | .... | addralign: 1 0x1488-0x148b.7 (4)
0x1480| 00 00 00 00| ....| entsize: 0 0x148c-0x148f.7 (4)
| | | [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)
0x1090| 00 2e 73 68 73 74 72| ..shstr| string: "\x00.shstrtab\x00.interp\x00.gnu.hash\x00.dynsym\x00.dynstr\x00.r..." 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) | |
0x1490|01 00 00 00 |.... | name: ".shstrtab" (1) 0x1490-0x1493.7 (4)

View File

@ -473,7 +473,7 @@ $ fq -d ar dv libbbb.a
0x480|01 00 00 00 |.... | addralign: 1 0x480-0x483.7 (4)
0x480| 00 00 00 00 | .... | entsize: 0 0x484-0x487.7 (4)
| | | [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)
0x260| 00 2e 73 79| ..sy| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.rel.text\x00.data\x00.bss..." 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) | |
0x480| 11 00 00 00 | .... | name: ".shstrtab" (17) 0x488-0x48b.7 (4)

View File

@ -305,7 +305,7 @@ $ fq -d elf dv libbbb.so
0x1a80| 04 00 00 00 | .... | addralign: 4 0x1a88-0x1a8b.7 (4)
0x1a80| 10 00 00 00| ....| entsize: 16 0x1a8c-0x1a8f.7 (4)
| | | [3]{}: section_header 0x1c0-0x1ab7.7 (6392)
0x01c0|00 5f 69 6e 69 74 00 5f 66 69 6e 69 00 5f 49 54|._init._fini._IT| string: "\x00_init\x00_fini\x00_ITM_deregisterTMCloneTable\x00_ITM_regi"... 0x1c0-0x264.7 (165)
0x01c0|00 5f 69 6e 69 74 00 5f 66 69 6e 69 00 5f 49 54|._init._fini._IT| string: "\x00_init\x00_fini\x00_ITM_deregisterTMCloneTable\x00_ITM_r..." 0x1c0-0x264.7 (165)
* |until 0x264.7 (165) | |
0x1a90|2d 00 00 00 |-... | name: ".dynstr" (45) 0x1a90-0x1a93.7 (4)
0x1a90| 03 00 00 00 | .... | type: "strtab" (0x3) (String table) 0x1a94-0x1a97.7 (4)
@ -1769,7 +1769,7 @@ $ fq -d elf dv libbbb.so
0x1e40| 04 00 00 00 | .... | addralign: 4 0x1e48-0x1e4b.7 (4)
0x1e40| 10 00 00 00| ....| entsize: 16 0x1e4c-0x1e4f.7 (4)
| | | [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)
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_fbi..." 0x1770-0x1911.7 (418)
* |until 0x1911.7 (418) | |
0x1e50|09 00 00 00 |.... | name: ".strtab" (9) 0x1e50-0x1e53.7 (4)
0x1e50| 03 00 00 00 | .... | type: "strtab" (0x3) (String table) 0x1e54-0x1e57.7 (4)
@ -1796,7 +1796,7 @@ $ fq -d elf dv libbbb.so
0x1e70|01 00 00 00 |.... | addralign: 1 0x1e70-0x1e73.7 (4)
0x1e70| 00 00 00 00 | .... | entsize: 0 0x1e74-0x1e77.7 (4)
| | | [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)
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.d..." 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) | |
0x1e70| 11 00 00 00 | .... | name: ".shstrtab" (17) 0x1e78-0x1e7b.7 (4)

View File

@ -374,7 +374,7 @@ $ fq -d elf dv a_dynamic
0x2120| 04 00 00 00| ....| addralign: 4 0x212c-0x212f.7 (4)
0x2130|10 00 00 00 |.... | entsize: 16 0x2130-0x2133.7 (4)
| | | [4]{}: section_header 0x220-0x215b.7 (7996)
0x0220|00 70 75 74 73 00 5f 5f 63 78 61 5f 66 69 6e 61|.puts.__cxa_fina| string: "\x00puts\x00__cxa_finalize\x00__deregister_frame_info\x00_ITM_"... 0x220-0x2e0.7 (193)
0x0220|00 70 75 74 73 00 5f 5f 63 78 61 5f 66 69 6e 61|.puts.__cxa_fina| string: "\x00puts\x00__cxa_finalize\x00__deregister_frame_info\x00_I..." 0x220-0x2e0.7 (193)
* |until 0x2e0.7 (193) | |
0x2130| 35 00 00 00 | 5... | name: ".dynstr" (53) 0x2134-0x2137.7 (4)
0x2130| 03 00 00 00 | .... | type: "strtab" (0x3) (String table) 0x2138-0x213b.7 (4)
@ -2089,7 +2089,7 @@ $ fq -d elf dv a_dynamic
0x2530| 04 00 00 00| ....| addralign: 4 0x253c-0x253f.7 (4)
0x2540|10 00 00 00 |.... | entsize: 16 0x2540-0x2543.7 (4)
| | | [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)
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_imp..." 0x1d70-0x1f6d.7 (510)
* |until 0x1f6d.7 (510) | |
0x2540| 09 00 00 00 | .... | name: ".strtab" (9) 0x2544-0x2547.7 (4)
0x2540| 03 00 00 00 | .... | type: "strtab" (0x3) (String table) 0x2548-0x254b.7 (4)
@ -2116,7 +2116,7 @@ $ fq -d elf dv a_dynamic
0x2560| 01 00 00 00 | .... | addralign: 1 0x2564-0x2567.7 (4)
0x2560| 00 00 00 00 | .... | entsize: 0 0x2568-0x256b.7 (4)
| | | [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)
0x1f60| 00 2e| ..| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.interp\x00.gnu.hash\x00.d..." 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) | |
0x2560| 11 00 00 00| ....| name: ".shstrtab" (17) 0x256c-0x256f.7 (4)

View File

@ -364,7 +364,7 @@ $ fq -d elf dv a_static
0x2170| 04 00 00 00 | .... | addralign: 4 0x2174-0x2177.7 (4)
0x2170| 10 00 00 00 | .... | entsize: 16 0x2178-0x217b.7 (4)
| | | [4]{}: section_header 0x210-0x21a3.7 (8084)
0x0210|00 70 75 74 73 00 5f 69 6e 69 74 00 5f 66 69 6e|.puts._init._fin| string: "\x00puts\x00_init\x00_fini\x00__cxa_finalize\x00__libc_start_main"... 0x210-0x2bb.7 (172)
0x0210|00 70 75 74 73 00 5f 69 6e 69 74 00 5f 66 69 6e|.puts._init._fin| string: "\x00puts\x00_init\x00_fini\x00__cxa_finalize\x00__libc_start_m..." 0x210-0x2bb.7 (172)
* |until 0x2bb.7 (172) | |
0x2170| 35 00 00 00| 5...| name: ".dynstr" (53) 0x217c-0x217f.7 (4)
0x2180|03 00 00 00 |.... | type: "strtab" (0x3) (String table) 0x2180-0x2183.7 (4)
@ -2110,7 +2110,7 @@ $ fq -d elf dv a_static
0x2580| 04 00 00 00 | .... | addralign: 4 0x2584-0x2587.7 (4)
0x2580| 10 00 00 00 | .... | entsize: 16 0x2588-0x258b.7 (4)
| | | [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)
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_imp..." 0x1db0-0x1fb6.7 (519)
* |until 0x1fb6.7 (519) | |
0x2580| 09 00 00 00| ....| name: ".strtab" (9) 0x258c-0x258f.7 (4)
0x2590|03 00 00 00 |.... | type: "strtab" (0x3) (String table) 0x2590-0x2593.7 (4)
@ -2137,7 +2137,7 @@ $ fq -d elf dv a_static
0x25a0| 01 00 00 00| ....| addralign: 1 0x25ac-0x25af.7 (4)
0x25b0|00 00 00 00 |.... | entsize: 0 0x25b0-0x25b3.7 (4)
| | | [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)
0x1fb0| 00 2e 73 79 6d 74 61 62 00| ..symtab.| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.interp\x00.gnu.hash\x00.d..." 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) | |
0x25b0| 11 00 00 00 | .... | name: ".shstrtab" (17) 0x25b4-0x25b7.7 (4)

View File

@ -374,7 +374,7 @@ $ fq -d elf dv a_stripped
0x11e0|04 00 00 00 |.... | addralign: 4 0x11e0-0x11e3.7 (4)
0x11e0| 10 00 00 00 | .... | entsize: 16 0x11e4-0x11e7.7 (4)
| | | [4]{}: section_header 0x220-0x120f.7 (4080)
0x0220|00 70 75 74 73 00 5f 5f 63 78 61 5f 66 69 6e 61|.puts.__cxa_fina| string: "\x00puts\x00__cxa_finalize\x00__deregister_frame_info\x00_ITM_"... 0x220-0x2e0.7 (193)
0x0220|00 70 75 74 73 00 5f 5f 63 78 61 5f 66 69 6e 61|.puts.__cxa_fina| string: "\x00puts\x00__cxa_finalize\x00__deregister_frame_info\x00_I..." 0x220-0x2e0.7 (193)
* |until 0x2e0.7 (193) | |
0x11e0| 25 00 00 00 | %... | name: ".dynstr" (37) 0x11e8-0x11eb.7 (4)
0x11e0| 03 00 00 00| ....| type: "strtab" (0x3) (String table) 0x11ec-0x11ef.7 (4)
@ -915,7 +915,7 @@ $ fq -d elf dv a_stripped
0x1480| 01 00 00 00 | .... | addralign: 1 0x1488-0x148b.7 (4)
0x1480| 00 00 00 00| ....| entsize: 0 0x148c-0x148f.7 (4)
| | | [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)
0x1090| 00 2e 73 68 73 74 72| ..shstr| string: "\x00.shstrtab\x00.interp\x00.gnu.hash\x00.dynsym\x00.dynstr\x00.r..." 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) | |
0x1490|01 00 00 00 |.... | name: ".shstrtab" (1) 0x1490-0x1493.7 (4)

View File

@ -473,7 +473,7 @@ $ fq -d ar dv libbbb.a
0x480|01 00 00 00 |.... | addralign: 1 0x480-0x483.7 (4)
0x480| 00 00 00 00 | .... | entsize: 0 0x484-0x487.7 (4)
| | | [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)
0x260| 00 2e 73 79| ..sy| string: "\x00.symtab\x00.strtab\x00.shstrtab\x00.rel.text\x00.data\x00.bss..." 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) | |
0x480| 11 00 00 00 | .... | name: ".shstrtab" (17) 0x488-0x48b.7 (4)

View File

@ -305,7 +305,7 @@ $ fq -d elf dv libbbb.so
0x1a80| 04 00 00 00 | .... | addralign: 4 0x1a88-0x1a8b.7 (4)
0x1a80| 10 00 00 00| ....| entsize: 16 0x1a8c-0x1a8f.7 (4)
| | | [3]{}: section_header 0x1c0-0x1ab7.7 (6392)
0x01c0|00 5f 69 6e 69 74 00 5f 66 69 6e 69 00 5f 49 54|._init._fini._IT| string: "\x00_init\x00_fini\x00_ITM_deregisterTMCloneTable\x00_ITM_regi"... 0x1c0-0x264.7 (165)
0x01c0|00 5f 69 6e 69 74 00 5f 66 69 6e 69 00 5f 49 54|._init._fini._IT| string: "\x00_init\x00_fini\x00_ITM_deregisterTMCloneTable\x00_ITM_r..." 0x1c0-0x264.7 (165)
* |until 0x264.7 (165) | |
0x1a90|2d 00 00 00 |-... | name: ".dynstr" (45) 0x1a90-0x1a93.7 (4)
0x1a90| 03 00 00 00 | .... | type: "strtab" (0x3) (String table) 0x1a94-0x1a97.7 (4)
@ -1769,7 +1769,7 @@ $ fq -d elf dv libbbb.so
0x1e40| 04 00 00 00 | .... | addralign: 4 0x1e48-0x1e4b.7 (4)
0x1e40| 10 00 00 00| ....| entsize: 16 0x1e4c-0x1e4f.7 (4)
| | | [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)
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_fbi..." 0x1770-0x1911.7 (418)
* |until 0x1911.7 (418) | |
0x1e50|09 00 00 00 |.... | name: ".strtab" (9) 0x1e50-0x1e53.7 (4)
0x1e50| 03 00 00 00 | .... | type: "strtab" (0x3) (String table) 0x1e54-0x1e57.7 (4)
@ -1796,7 +1796,7 @@ $ fq -d elf dv libbbb.so
0x1e70|01 00 00 00 |.... | addralign: 1 0x1e70-0x1e73.7 (4)
0x1e70| 00 00 00 00 | .... | entsize: 0 0x1e74-0x1e77.7 (4)
| | | [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)
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.d..." 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) | |
0x1e70| 11 00 00 00 | .... | name: ".shstrtab" (17) 0x1e78-0x1e7b.7 (4)

View File

@ -27,7 +27,7 @@ $ fq ddv pssh.mp4
| | | [0]{}: record 0x4a-0x47d.7 (1076)
0x040| 01 00 | .. | type: "Rights management header" (1) 0x4a-0x4b.7 (2)
0x040| 30 04 | 0. | len: 1072 0x4c-0x4d.7 (2)
0x040| 3c 00| <.| xml: "<WRMHEADER xmlns=\"http://schemas.microsoft.com/DRM"... 0x4e-0x47d.7 (1072)
0x040| 3c 00| <.| xml: "<WRMHEADER xmlns=\"http://schemas.microsoft.com/..." 0x4e-0x47d.7 (1072)
0x050|57 00 52 00 4d 00 48 00 45 00 41 00 44 00 45 00|W.R.M.H.E.A.D.E.|
0x060|52 00 20 00 78 00 6d 00 6c 00 6e 00 73 00 3d 00|R. .x.m.l.n.s.=.|
0x070|22 00 68 00 74 00 74 00 70 00 3a 00 2f 00 2f 00|".h.t.t.p.:././.|

View File

@ -313,7 +313,7 @@ $ fq -d pcap dv ipv6_http.pcap
0x002b0| 61 72 70 61 | arpa | value: "arpa" 0x2b1-0x2b4.7 (4)
| | | [34]{}: label 0x2b5-0x2b5.7 (1)
0x002b0| 00 | . | length: 0 0x2b5-0x2b5.7 (1)
| | | value: "1.e.6.0.8.9.e.c.7.d.9.3.9.9.9.0.0.0.0.0.d.2.0.1.8."... 0x2b6-NA (0)
| | | value: "1.e.6.0.8.9.e.c.7.d.9.3.9.9.9.0.0.0.0.0.d.2.0.1..." 0x2b6-NA (0)
0x002b0| 00 ff | .. | type: 255 0x2b6-0x2b7.7 (2)
0x002b0| 00 01 | .. | class: "in" (1) (Internet) 0x2b8-0x2b9.7 (2)
| | | [1]{}: question 0x2ba-0x2ca.7 (17)
@ -461,7 +461,7 @@ $ fq -d pcap dv ipv6_http.pcap
0x002b0| 61 72 70 61 | arpa | value: "arpa" 0x2b1-0x2b4.7 (4)
| | | [34]{}: label 0x2b5-0x2b5.7 (1)
0x002b0| 00 | . | length: 0 0x2b5-0x2b5.7 (1)
| | | value: "1.e.6.0.8.9.e.c.7.d.9.3.9.9.9.0.0.0.0.0.d.2.0.1.8."... 0x2b6-NA (0)
| | | value: "1.e.6.0.8.9.e.c.7.d.9.3.9.9.9.0.0.0.0.0.d.2.0.1..." 0x2b6-NA (0)
| | | ptr{}: 0x2ba-0x2f4.7 (59)
| | | labels[0:3]: 0x2ba-0x2f4.7 (59)
| | | [0]{}: label 0x2ba-0x2f4.7 (59)
@ -762,7 +762,7 @@ $ fq -d pcap dv ipv6_http.pcap
0x00460| 61 72 70 61 | arpa | value: "arpa" 0x464-0x467.7 (4)
| | | [34]{}: label 0x468-0x468.7 (1)
0x00460| 00 | . | length: 0 0x468-0x468.7 (1)
| | | value: "1.e.6.0.8.9.e.c.7.d.9.3.9.9.9.0.0.0.0.0.d.2.0.1.8."... 0x469-NA (0)
| | | value: "1.e.6.0.8.9.e.c.7.d.9.3.9.9.9.0.0.0.0.0.d.2.0.1..." 0x469-NA (0)
0x00460| 00 ff | .. | type: 255 0x469-0x46a.7 (2)
0x00460| 00 01 | .. | class: "in" (1) (Internet) 0x46b-0x46c.7 (2)
| | | [1]{}: question 0x46d-0x47d.7 (17)
@ -911,7 +911,7 @@ $ fq -d pcap dv ipv6_http.pcap
0x00460| 61 72 70 61 | arpa | value: "arpa" 0x464-0x467.7 (4)
| | | [34]{}: label 0x468-0x468.7 (1)
0x00460| 00 | . | length: 0 0x468-0x468.7 (1)
| | | value: "1.e.6.0.8.9.e.c.7.d.9.3.9.9.9.0.0.0.0.0.d.2.0.1.8."... 0x469-NA (0)
| | | value: "1.e.6.0.8.9.e.c.7.d.9.3.9.9.9.0.0.0.0.0.d.2.0.1..." 0x469-NA (0)
| | | ptr{}: 0x46d-0x4a7.7 (59)
| | | labels[0:3]: 0x46d-0x4a7.7 (59)
| | | [0]{}: label 0x46d-0x4a7.7 (59)
@ -1082,7 +1082,7 @@ $ fq -d pcap dv ipv6_http.pcap
0x00540| 61 72 70 61 | arpa | value: "arpa" 0x547-0x54a.7 (4)
| | | [34]{}: label 0x54b-0x54b.7 (1)
0x00540| 00 | . | length: 0 0x54b-0x54b.7 (1)
| | | value: "1.e.6.0.8.9.e.c.7.d.9.3.9.9.9.0.0.0.0.0.d.2.0.1.8."... 0x54c-NA (0)
| | | value: "1.e.6.0.8.9.e.c.7.d.9.3.9.9.9.0.0.0.0.0.d.2.0.1..." 0x54c-NA (0)
0x00540| 00 ff | .. | type: 255 0x54c-0x54d.7 (2)
0x00540| 00 01| ..| class: "in" (1) (Internet) 0x54e-0x54f.7 (2)
| | | [1]{}: question 0x550-0x560.7 (17)
@ -1230,7 +1230,7 @@ $ fq -d pcap dv ipv6_http.pcap
0x00540| 61 72 70 61 | arpa | value: "arpa" 0x547-0x54a.7 (4)
| | | [34]{}: label 0x54b-0x54b.7 (1)
0x00540| 00 | . | length: 0 0x54b-0x54b.7 (1)
| | | value: "1.e.6.0.8.9.e.c.7.d.9.3.9.9.9.0.0.0.0.0.d.2.0.1.8."... 0x54c-NA (0)
| | | value: "1.e.6.0.8.9.e.c.7.d.9.3.9.9.9.0.0.0.0.0.d.2.0.1..." 0x54c-NA (0)
| | | ptr{}: 0x550-0x58a.7 (59)
| | | labels[0:3]: 0x550-0x58a.7 (59)
| | | [0]{}: label 0x550-0x58a.7 (59)
@ -1536,7 +1536,7 @@ $ fq -d pcap dv ipv6_http.pcap
0x006f0| 61 72 70 61 | arpa | value: "arpa" 0x6fa-0x6fd.7 (4)
| | | [34]{}: label 0x6fe-0x6fe.7 (1)
0x006f0| 00 | . | length: 0 0x6fe-0x6fe.7 (1)
| | | value: "1.e.6.0.8.9.e.c.7.d.9.3.9.9.9.0.0.0.0.0.d.2.0.1.8."... 0x6ff-NA (0)
| | | value: "1.e.6.0.8.9.e.c.7.d.9.3.9.9.9.0.0.0.0.0.d.2.0.1..." 0x6ff-NA (0)
0x006f0| 00| .| type: "ptr" (12) 0x6ff-0x700.7 (2)
0x00700|0c |. |
0x00700| 80 01 | .. | class: "unassigned" (32769) (Unassigned) 0x701-0x702.7 (2)
@ -1726,7 +1726,7 @@ $ fq -d pcap dv ipv6_http.pcap
0x007d0| 61 72 70 61 | arpa | value: "arpa" 0x7d1-0x7d4.7 (4)
| | | [34]{}: label 0x7d5-0x7d5.7 (1)
0x007d0| 00 | . | length: 0 0x7d5-0x7d5.7 (1)
| | | value: "1.e.6.0.8.9.e.c.7.d.9.3.9.9.9.0.0.0.0.0.d.2.0.1.8."... 0x7d6-NA (0)
| | | value: "1.e.6.0.8.9.e.c.7.d.9.3.9.9.9.0.0.0.0.0.d.2.0.1..." 0x7d6-NA (0)
0x007d0| 00 0c | .. | type: "ptr" (12) 0x7d6-0x7d7.7 (2)
0x007d0| 80 01 | .. | class: "unassigned" (32769) (Unassigned) 0x7d8-0x7d9.7 (2)
0x007d0| 00 00 00 78 | ...x | ttl: 120 0x7da-0x7dd.7 (4)
@ -1981,7 +1981,7 @@ $ fq -d pcap dv ipv6_http.pcap
0x008f0| 61 72 70 61| arpa| value: "arpa" 0x8fc-0x8ff.7 (4)
| | | [34]{}: label 0x900-0x900.7 (1)
0x00900|00 |. | length: 0 0x900-0x900.7 (1)
| | | value: "1.e.6.0.8.9.e.c.7.d.9.3.9.9.9.0.0.0.0.0.d.2.0.1.8."... 0x901-NA (0)
| | | value: "1.e.6.0.8.9.e.c.7.d.9.3.9.9.9.0.0.0.0.0.d.2.0.1..." 0x901-NA (0)
0x00900| 00 0c | .. | type: "ptr" (12) 0x901-0x902.7 (2)
0x00900| 80 01 | .. | class: "unassigned" (32769) (Unassigned) 0x903-0x904.7 (2)
0x00900| 00 00 00 78 | ...x | ttl: 120 0x905-0x908.7 (4)

View File

@ -21,7 +21,7 @@ $ fq -d pcapng dv many_interfaces.pcapng
| | | [1]{}: option 0x4c-0x83.7 (56)
0x00040| 04 00 | .. | code: "userappl" (4) 0x4c-0x4d.7 (2)
0x00040| 34 00| 4.| length: 52 0x4e-0x4f.7 (2)
0x00050|44 75 6d 70 63 61 70 20 31 2e 31 32 2e 36 20 28|Dumpcap 1.12.6 (| value: "Dumpcap 1.12.6 (v1.12.6-0-gee1fce6 from master-1.1"... 0x50-0x83.7 (52)
0x00050|44 75 6d 70 63 61 70 20 31 2e 31 32 2e 36 20 28|Dumpcap 1.12.6 (| value: "Dumpcap 1.12.6 (v1.12.6-0-gee1fce6 from master-..." 0x50-0x83.7 (52)
* |until 0x83.7 (52) | |
| | | padding: raw bits 0x84-NA (0)
| | | [2]{}: option 0x84-0x87.7 (4)

View File

@ -67,7 +67,7 @@ $ fq -d rtmp 'dv({array_truncate: 10})' client_stream
| | | value{}: 0x96-0xd6.7 (65)
0x009| 02 | . | type: "string" (2) 0x96-0x96.7 (1)
0x009| 00 3e | .> | length: 62 0x97-0x98.7 (2)
0x009| 72 74 6d 70 3a 2f 2f| rtmp://| value: "rtmp://cp70278.edgefcs.net:1935/ondemand/content-v"... 0x99-0xd6.7 (62)
0x009| 72 74 6d 70 3a 2f 2f| rtmp://| value: "rtmp://cp70278.edgefcs.net:1935/ondemand/conten..." 0x99-0xd6.7 (62)
0x00a|63 70 37 30 32 37 38 2e 65 64 67 65 66 63 73 2e|cp70278.edgefcs.|
* |until 0xd6.7 (62) | |
| | | [4]{}: pair 0xd7-0xde.7 (8)

View File

@ -367,7 +367,7 @@ $ fq -d rtmp 'dv({array_truncate: 40})' server_stream
| | | value{}: 0x50-0x8c.7 (61)
0x00005|02 |. | type: "string" (2) 0x50-0x50.7 (1)
0x00005| 00 3a | .: | length: 58 0x51-0x52.7 (2)
0x00005| 50 6c 61 79 69 6e 67 20 61 6e 64 20 72| Playing and r| value: "Playing and resetting 0/1/1/1514/1514287/1_192254_"... 0x53-0x8c.7 (58)
0x00005| 50 6c 61 79 69 6e 67 20 61 6e 64 20 72| Playing and r| value: "Playing and resetting 0/1/1/1514/1514287/1_1922..." 0x53-0x8c.7 (58)
0x00006|65 73 65 74 74 69 6e 67 20 30 2f 31 2f 31 2f 31|esetting 0/1/1/1|
* |until 0x8c.7 (58) | |
| | | [3]{}: pair 0x8d-0xbb.7 (47)
@ -459,7 +459,7 @@ $ fq -d rtmp 'dv({array_truncate: 40})' server_stream
| | | value{}: 0x50-0x86.7 (55)
0x00005|02 |. | type: "string" (2) 0x50-0x50.7 (1)
0x00005| 00 34 | .4 | length: 52 0x51-0x52.7 (2)
0x00005| 53 74 61 72 74 65 64 20 70 6c 61 79 69| Started playi| value: "Started playing 0/1/1/1514/1514287/1_192254_151428"... 0x53-0x86.7 (52)
0x00005| 53 74 61 72 74 65 64 20 70 6c 61 79 69| Started playi| value: "Started playing 0/1/1/1514/1514287/1_192254_151..." 0x53-0x86.7 (52)
0x00006|6e 67 20 30 2f 31 2f 31 2f 31 35 31 34 2f 31 35|ng 0/1/1/1514/15|
* |until 0x86.7 (52) | |
| | | [3]{}: pair 0x87-0x9b.7 (21)

View File

@ -110,7 +110,7 @@ $ fq -d tiff dv 4x4.tiff
0x0a0| 44 00 00 00 | D... | count: 68 0xa2-0xa5.7 (4)
0x0a0| c4 00 00 00 | .... | value_offset: 196 0xa6-0xa9.7 (4)
| | | values[0:1]: 0xc4-0x107.7 (68)
0x0c0| 47 72 61 70 68 69 63 73 4d 61 67 69| GraphicsMagi| [0]: "GraphicsMagick 1.3.35 2020-02-23 Q16 http://www.Gr"... value 0xc4-0x107.7 (68)
0x0c0| 47 72 61 70 68 69 63 73 4d 61 67 69| GraphicsMagi| [0]: "GraphicsMagick 1.3.35 2020-02-23 Q16 http://www..." value 0xc4-0x107.7 (68)
0x0d0|63 6b 20 31 2e 33 2e 33 35 20 32 30 32 30 2d 30|ck 1.3.35 2020-0|
* |until 0x107.7 (end) (68) | |
| | | [13]{}: entry 0xaa-0xb5.7 (12)

View File

@ -16,7 +16,7 @@ $ fq -d vorbis_comment dv vorbis-comment-picture
0x0030|6c 69 62 76 6f 72 62 69 73 |libvorbis |
| | | [1]{}: user_comment 0x39-0x11f.7 (231)
0x0030| e3 00 00 00 | .... | length: 227 0x39-0x3c.7 (4)
0x0030| 4d 45 54| MET| comment: "METADATA_BLOCK_PICTURE=AAAAAAAAAAlpbWFnZS9wbmcAAAA"... 0x3d-0x11f.7 (227)
0x0030| 4d 45 54| MET| comment: "METADATA_BLOCK_PICTURE=AAAAAAAAAAlpbWFnZS9wbmcA..." 0x3d-0x11f.7 (227)
0x0040|41 44 41 54 41 5f 42 4c 4f 43 4b 5f 50 49 43 54|ADATA_BLOCK_PICT|
* |until 0x11f.7 (end) (227) | |
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| picture{}: (flac_picture) 0x0-0x98.7 (153)

View File

@ -1,4 +1,12 @@
$ fq -n '"<a></a> trailing" | fromxml'
exitcode: 5
stderr:
error: error at position 0xa: root element has trailing data
error: error at position 0x7: root element has trailing non-whitespace " trailing"
$ fq -n '"<a></a> <trailingelm>" | fromxml'
exitcode: 5
stderr:
error: error at position 0x8: root element has trailing element <trailingelm>
$ fq -n '"<a></a> <?procinstr?>" | fromxml'
{
"a": ""
}

View File

@ -35,9 +35,9 @@ null> spew("files") | .name, try (.str | fromxml | ., (toxml({indent: 2}) | prin
}
<elm></elm>
"multi_diff.xml"
"error at position 0x10: root element has trailing data"
"error at position 0xe: root element has trailing element <elm2>"
"multi_same.xml"
"error at position 0xe: root element has trailing data"
"error at position 0xc: root element has trailing element <elm>"
"ns.xml"
{
"elm": {
@ -119,9 +119,9 @@ null> spew("files") | .name, try (.str | fromxml({seq: true}) | ., (toxml({inden
}
<elm></elm>
"multi_diff.xml"
"error at position 0x10: root element has trailing data"
"error at position 0xe: root element has trailing element <elm2>"
"multi_same.xml"
"error at position 0xe: root element has trailing data"
"error at position 0xc: root element has trailing element <elm>"
"ns.xml"
{
"elm": {
@ -224,9 +224,9 @@ null> spew("files") | .name, try (.str | fromxml({array: true}) | ., (toxml({ind
]
<elm></elm>
"multi_diff.xml"
"error at position 0x10: root element has trailing data"
"error at position 0xe: root element has trailing element <elm2>"
"multi_same.xml"
"error at position 0xe: root element has trailing data"
"error at position 0xc: root element has trailing element <elm>"
"ns.xml"
[
"elm",

View File

@ -9,7 +9,9 @@ import (
"bytes"
"embed"
"encoding/xml"
"errors"
"html"
"io"
"regexp"
"sort"
"strconv"
@ -18,6 +20,7 @@ import (
"github.com/wader/fq/format"
"github.com/wader/fq/internal/gojqextra"
"github.com/wader/fq/internal/proxysort"
"github.com/wader/fq/internal/stringsextra"
"github.com/wader/fq/pkg/bitio"
"github.com/wader/fq/pkg/decode"
"github.com/wader/fq/pkg/interp"
@ -71,6 +74,13 @@ type xmlNS struct {
url string
}
func elmName(space, local string) string {
if space == "" {
return local
}
return space + ":" + local
}
// xmlNNStack is used to undo namespace url resolving, space is url not the "alias" name
type xmlNNStack []xmlNS
@ -119,14 +129,12 @@ func fromXMLToArray(n xmlNode) any {
nodes = append(nodes, f(c, nss))
}
name, space := n.XMLName.Local, n.XMLName.Space
local, space := n.XMLName.Local, n.XMLName.Space
if space != "" {
space = nss.lookup(n.XMLName)
}
// only add if ns is found and not default ns
if space != "" {
name = space + ":" + name
}
name := elmName(space, local)
elm := []any{name}
if len(attrs) > 0 {
elm = append(elm, attrs)
@ -167,14 +175,11 @@ func fromXMLToObject(n xmlNode, xi format.XMLIn) any {
nSeq = -1
}
local, space := nn.XMLName.Local, nn.XMLName.Space
name := local
if space != "" {
space = nss.lookup(nn.XMLName)
}
// only add if ns is found and not default ns
if space != "" {
name = space + ":" + name
}
name := elmName(space, local)
if e, ok := attrs[name]; ok {
if ea, ok := e.([]any); ok {
attrs[name] = append(ea, f(nn, nSeq, nss))
@ -210,8 +215,6 @@ func fromXMLToObject(n xmlNode, xi format.XMLIn) any {
}
}
var wsRE *regexp.Regexp
func decodeXML(d *decode.D, in any) any {
xi, _ := in.(format.XMLIn)
@ -244,9 +247,27 @@ func decodeXML(d *decode.D, in any) any {
d.Fatalf("root not object or array")
}
d.SeekAbs(xd.InputOffset() * 8)
if d.RE(&wsRE, `^\s*$`) == nil {
d.Fatalf("root element has trailing data")
// continue decode to end and make sure there is only things we want to ignore
for {
d.SeekAbs(xd.InputOffset() * 8)
t, err := xd.Token()
if errors.Is(err, io.EOF) {
break
}
switch t := t.(type) {
case xml.CharData:
if !whitespaceRE.Match([]byte(t)) {
d.Fatalf("root element has trailing non-whitespace %q", stringsextra.TrimN(string(t), 50, "..."))
}
// ignore trailing whitespace
case xml.ProcInst:
// ignore trailing process instructions <?elm?>
case xml.StartElement:
d.Fatalf("root element has trailing element <%s>", elmName(t.Name.Space, t.Name.Local))
default:
d.Fatalf("root element has trailing data")
}
}
d.Value.V = &s

View File

@ -0,0 +1,11 @@
package stringsextra
import "github.com/wader/fq/internal/mathextra"
func TrimN(s string, n int, suffix string) string {
sl, tl := len(s), len(suffix)
if sl+tl <= n {
return s
}
return s[0:mathextra.MaxInt(n-tl, 0)] + suffix
}

View File

@ -6,6 +6,7 @@ import (
"strconv"
"github.com/wader/fq/internal/mathextra"
"github.com/wader/fq/internal/stringsextra"
"github.com/wader/fq/pkg/bitio"
"github.com/wader/fq/pkg/scalar"
)
@ -29,10 +30,7 @@ func previewValue(v any, df scalar.DisplayFormat) string {
// TODO: float32? better truncated to significant digits?
return strconv.FormatFloat(vv, 'g', -1, 64)
case string:
if len(vv) > 50 {
return fmt.Sprintf("%q", vv[0:50]) + "..."
}
return fmt.Sprintf("%q", vv)
return fmt.Sprintf("%q", stringsextra.TrimN(vv, 50, "..."))
case nil:
return "null"
case bitio.Reader: