[Bug default/27603] New: [dwz, clang-11] FAIL: testsuite/dwz.tests/pr24747.sh

vries at gcc dot gnu.org sourceware-bugzilla@sourceware.org
Thu Mar 18 11:23:26 GMT 2021


https://sourceware.org/bugzilla/show_bug.cgi?id=27603

            Bug ID: 27603
           Summary: [dwz, clang-11] FAIL: testsuite/dwz.tests/pr24747.sh
           Product: dwz
           Version: unspecified
            Status: NEW
          Severity: minor
          Priority: P2
         Component: default
          Assignee: nobody at sourceware dot org
          Reporter: vries at gcc dot gnu.org
                CC: dwz at sourceware dot org
  Target Milestone: ---

With clang-11, I run into:
...
Running testsuite/dwz.tests/dwz-tests.exp ...
+ exec=start-gold
+ cp start-gold 1
+ dwz 1
+ smaller-than.sh 1 start-gold
FAIL: testsuite/dwz.tests/pr24747.sh
...

The files are the same size:
...
$ ls -l start-gold tmp.pr24747.sh/1
-rwxr-xr-x 1 vries users 2024 Mar 18 11:58 start-gold
-rwxr-xr-x 1 vries users 2024 Mar 18 11:58 tmp.pr24747.sh/1
...

However:
...
$ readelf -S -W start-gold tmp.pr24747.sh/1
File: start-gold

Section Headers:
  [Nr] Name              Type            Address          Off    Size   ES Flg
Lk Inf Al
  [ 0]                   NULL            0000000000000000 000000 000000 00     
0   0  0
  [ 1] .note.gnu.build-id NOTE            0000000000400120 000120 000024 00   A
 0   0  4
  [ 2] .text             PROGBITS        0000000000400150 000150 000006 00  AX 
0   0 16
  [ 3] .eh_frame         X86_64_UNWIND   0000000000400158 000158 000038 00   A 
0   0  8
  [ 4] .eh_frame_hdr     X86_64_UNWIND   0000000000400190 000190 000014 00   A 
0   0  4
  [ 5] .debug_abbrev     PROGBITS        0000000000000000 0001a4 000029 00     
0   0  1
  [ 6] .debug_info       PROGBITS        0000000000000000 0001cd 000040 00     
0   0  1
  [ 7] .debug_str        PROGBITS        0000000000000000 00020d 000066 01  MS 
0   0  1
  [ 8] .comment          PROGBITS        0000000000000000 000273 000016 01  MS 
0   0  1
  [ 9] .debug_line       PROGBITS        0000000000000000 000289 00006a 00     
0   0  1
  [10] .note.gnu.gold-version NOTE            0000000000000000 0002f4 00001c 00
     0   0  4
  [11] .symtab           SYMTAB          0000000000000000 000310 000090 18    
12   2  8
  [12] .strtab           STRTAB          0000000000000000 0003a0 000028 00     
0   0  1
  [13] .shstrtab         STRTAB          0000000000000000 0003c8 00009d 00     
0   0  1

File: tmp.pr24747.sh/1

Section Headers:
  [Nr] Name              Type            Address          Off    Size   ES Flg
Lk Inf Al
  [ 0]                   NULL            0000000000000000 000000 000000 00     
0   0  0
  [ 1] .note.gnu.build-id NOTE            0000000000400120 000120 000024 00   A
 0   0  4
  [ 2] .text             PROGBITS        0000000000400150 000150 000006 00  AX 
0   0 16
  [ 3] .eh_frame         X86_64_UNWIND   0000000000400158 000158 000038 00   A 
0   0  8
  [ 4] .eh_frame_hdr     X86_64_UNWIND   0000000000400190 000190 000014 00   A 
0   0  4
  [ 5] .debug_abbrev     PROGBITS        0000000000000000 0001a4 000029 00     
0   0  1
  [ 6] .debug_info       PROGBITS        0000000000000000 0001cd 00003a 00     
0   0  1
  [ 7] .debug_str        PROGBITS        0000000000000000 000207 000066 01  MS 
0   0  1
  [ 8] .comment          PROGBITS        0000000000000000 00026d 000016 01  MS 
0   0  1
  [ 9] .debug_line       PROGBITS        0000000000000000 000283 00006a 00     
0   0  1
  [10] .note.gnu.gold-version NOTE            0000000000000000 0002f0 00001c 00
     0   0  4
  [11] .symtab           SYMTAB          0000000000000000 000310 000090 18    
12   2  8
  [12] .strtab           STRTAB          0000000000000000 0003a0 000028 00     
0   0  1
  [13] .shstrtab         STRTAB          0000000000000000 0003c8 00009d 00     
0   0  1
...

The sizes of the sections are either the same, or smaller (.debug_info 0x40 ->
0x3a, reduction of 6 bytes).

However, AFAIU due to the alignment requirement of 8 bytes of the .symtab
section, that doesn't actually result in a smaller file.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Dwz mailing list