[PATCH] ld/testsuite: add missing definition to PDB test
Jan Beulich
jbeulich@suse.com
Mon Jul 15 06:22:46 GMT 2024
On 13.07.2024 16:53, Mark Harmstone wrote:
> The file pdb-syms1a.s was missing a definition for T_VOID, which was
> causing some types not to be deduplicated. It also meant that the test
> couldn't be run against LLVM's lld, which throws an error for this.
If there was a lack of de-duplication, could you shed some light on ...
> --- a/ld/testsuite/ld-pe/pdb-syms1-records.d
> +++ b/ld/testsuite/ld-pe/pdb-syms1-records.d
> @@ -27,7 +27,7 @@ Contents of section .data:
> 0160 1a002711 00000000 98020000 0200666f ..'...........fo
> 0170 6f3a3a6d 6574686f 64330000 1a002711 o::method3....'.
> 0180 00000000 d0020000 0200666f 6f3a3a6d ..........foo::m
> - 0190 6574686f 64340000 0a000811 0a100000 ethod4..........
> + 0190 6574686f 64340000 0a000811 09100000 ethod4..........
> 01a0 666f6f00 12000711 75000000 2a00616e foo.....u...*.an
> 01b0 73776572 00f3f2f1 1a000711 23000000 swer........#...
> 01c0 0a80efcd ab896745 2301616e 73776572 ......gE#.answer
> --- a/ld/testsuite/ld-pe/pdb-syms1-symbols2.d
> +++ b/ld/testsuite/ld-pe/pdb-syms1-symbols2.d
> @@ -9,46 +9,46 @@ Contents of section .data:
> 0040 12000c11 00100000 00000000 03006c76 ..............lv
> 0050 61723200 2e001011 00000000 84000000 ar2.............
> 0060 00000000 01000000 00000000 00000000 ................
> - 0070 05100000 0c000000 03000070 726f6331 ...........proc1
> + 0070 02100000 0c000000 03000070 726f6331 ...........proc1
> 0080 00f3f2f1 02000600 2e001011 00000000 ................
> 0090 ec000000 00000000 01000000 00000000 ................
> - 00a0 00000000 05100000 06000000 01000070 ...............p
> + 00a0 00000000 02100000 06000000 01000070 ...............p
> 00b0 726f6332 00f3f2f1 0a000811 04100000 roc2............
> 00c0 62617200 12000c11 00100000 10000000 bar.............
> 00d0 02006c76 61723300 12001211 00100000 ..lvar3.........
> 00e0 14000000 02006c76 61723400 02000600 ......lvar4.....
> 00f0 2e000f11 00000000 20010000 00000000 ........ .......
> - 0100 01000000 00000000 00000000 05100000 ................
> + 0100 01000000 00000000 00000000 02100000 ................
> 0110 0d000000 03000070 726f6333 00f3f2f1 .......proc3....
> 0120 02000600 2e000f11 00000000 54010000 ............T...
> 0130 00000000 01000000 00000000 00000000 ................
> - 0140 05100000 07000000 01000070 726f6334 ...........proc4
> + 0140 02100000 07000000 01000070 726f6334 ...........proc4
> 0150 00f3f2f1 02000600 2e001011 00000000 ................
> 0160 88010000 00000000 01000000 00000000 ................
> - 0170 00000000 05100000 0e000000 03000070 ...............p
> + 0170 00000000 02100000 0e000000 03000070 ...............p
> 0180 726f6335 00f3f2f1 02000600 2e001011 roc5............
> 0190 00000000 bc010000 00000000 01000000 ................
> - 01a0 00000000 00000000 05100000 08000000 ................
> + 01a0 00000000 00000000 02100000 08000000 ................
> 01b0 01000070 726f6336 00f3f2f1 02000600 ...proc6........
> 01c0 32001011 00000000 f4010000 00000000 2...............
> - 01d0 01000000 00000000 00000000 05100000 ................
> + 01d0 01000000 00000000 00000000 02100000 ................
> 01e0 0f000000 03000066 6f6f3a3a 6d657468 .......foo::meth
> 01f0 6f6400f1 02000600 32001011 00000000 od......2.......
> 0200 2c020000 00000000 01000000 00000000 ,...............
> - 0210 00000000 05100000 09000000 01000066 ...............f
> + 0210 00000000 02100000 09000000 01000066 ...............f
> 0220 6f6f3a3a 6d657468 6f643200 02000600 oo::method2.....
> 0230 2e000f11 00000000 60020000 00000000 ........`.......
> - 0240 01000000 00000000 00000000 05100000 ................
> + 0240 01000000 00000000 00000000 02100000 ................
> 0250 10000000 03000070 726f6339 00f3f2f1 .......proc9....
> 0260 02000600 2e001011 00000000 94020000 ................
> 0270 00000000 01000000 00000000 00000000 ................
> - 0280 05100000 0a000000 01000070 726f6331 ...........proc1
> + 0280 02100000 0a000000 01000070 726f6331 ...........proc1
> 0290 3000f2f1 02000600 32000f11 00000000 0.......2.......
> 02a0 cc020000 00000000 01000000 00000000 ................
> - 02b0 00000000 05100000 11000000 03000066 ...............f
> + 02b0 00000000 02100000 11000000 03000066 ...............f
> 02c0 6f6f3a3a 6d657468 6f643300 02000600 oo::method3.....
> 02d0 32000f11 00000000 04030000 00000000 2...............
> - 02e0 01000000 00000000 00000000 05100000 ................
> + 02e0 01000000 00000000 00000000 02100000 ................
> 02f0 0b000000 01000066 6f6f3a3a 6d657468 .......foo::meth
> 0300 6f643400 02000600 12001211 00100000 od4.............
> 0310 20000000 02006c76 61723500 12001211 .....lvar5.....
... these all being in-place changes? More de-duplication would make
at least me expect there's an actual "shift" of content, presumably
leading to a reduction in binary size (or individual pieces, not
necessarily the entire container). In principle ...
> --- a/ld/testsuite/ld-pe/pdb-syms1a.s
> +++ b/ld/testsuite/ld-pe/pdb-syms1a.s
> @@ -1,6 +1,7 @@
> .equ CV_SIGNATURE_C13, 4
> .equ DEBUG_S_SYMBOLS, 0xf1
>
> +.equ T_VOID, 0x0003
> .equ T_UINT4, 0x0075
>
> .equ LF_MODIFIER, 0x1001
... such an addition ought to of course be fine to make.
Jan
More information about the Binutils
mailing list