[strace/strace] strace fails to build on binutils-2.36 (readelf output change) (#180)

Sergei Trofimovich notifications at github.com
Tue Mar 30 20:46:38 UTC 2021


```
# this works:
$ READELF=/usr/x86_64-pc-linux-gnu/binutils-bin/2.35.2/readelf ./configure

#this fails:
$ READELF=/usr/x86_64-pc-linux-gnu/binutils-bin/2.36.1/readelf ./configure
...
checking for m32 personality compile support (using x86_64-pc-linux-gnu-gcc  -I./bundled/linux/arch/x86/include/uapi -I./bundled/linux/include/uapi  -m32)... yes
checking for m32 personality runtime support... yes
checking whether mpers.sh m32 -m32 works... mpers-m32/sample_struct.d2: index [                ] without special
no
checking whether to enable m32 personality support... no
configure: error: Cannot enable m32 personality support
```

Looking at the diff of `mpers-m32/sample_struct.d1` of lod and new readelf now provides a bit of extra info:

```
$ head -n 20 mpers-m32/sample_struct.d1_2.35.2
Contents of the .debug_info section:

  Compilation Unit @ offset 0x0:
   Length:        0x39c (32-bit)
   Version:       2
   Abbrev Offset: 0x0
   Pointer Size:  4
 <0><b>: Abbrev Number: 1 (DW_TAG_compile_unit)
    <c>   DW_AT_producer    : (indirect string, offset: 0x61): GNU C17 11.0.1 20210314 (experimental) -m32 -mtune=generic -march=x86-64 -gdwarf-2
    <10>   DW_AT_language    : 12	(ANSI C99)
    <11>   DW_AT_name        : (indirect string, offset: 0x174): mpers-m32/sample_struct.c
    <15>   DW_AT_comp_dir    : (indirect string, offset: 0x3e): /home/slyfox/dev/git/strace
    <19>   DW_AT_stmt_list   : 0x0
 <1><1d>: Abbrev Number: 2 (DW_TAG_base_type)
    <1e>   DW_AT_byte_size   : 1
    <1f>   DW_AT_encoding    : 8	(unsigned char)
    <20>   DW_AT_name        : (indirect string, offset: 0xb4): unsigned char
 <1><24>: Abbrev Number: 2 (DW_TAG_base_type)
    <25>   DW_AT_byte_size   : 2
    <26>   DW_AT_encoding    : 7	(unsigned)
```
```
$ head -n 20 mpers-m32/sample_struct.d1_2.36.1
Contents of the .debug_info section:

  Compilation Unit @ offset 0x0:
   Length:        0x39c (32-bit)
   Version:       2
   Abbrev Offset: 0x0
   Pointer Size:  4
 <0><b>: Abbrev Number: 1 (DW_TAG_compile_unit)
    <c>   DW_AT_producer    : (strp) (offset: 0x61): GNU C17 11.0.1 20210314 (experimental) -m32 -mtune=generic -march=x86-64 -gdwarf-2
    <10>   DW_AT_language    : (data1) 12	(ANSI C99)
    <11>   DW_AT_name        : (strp) (offset: 0x174): mpers-m32/sample_struct.c
    <15>   DW_AT_comp_dir    : (strp) (offset: 0x3e): /home/slyfox/dev/git/strace
    <19>   DW_AT_stmt_list   : (data4) 0x0
 <1><1d>: Abbrev Number: 2 (DW_TAG_base_type)
    <1e>   DW_AT_byte_size   : (data1) 1
    <1f>   DW_AT_encoding    : (data1) 8	(unsigned char)
    <20>   DW_AT_name        : (strp) (offset: 0xb4): unsigned char
 <1><24>: Abbrev Number: 2 (DW_TAG_base_type)
    <25>   DW_AT_byte_size   : (data1) 2
    <26>   DW_AT_encoding    : (data1) 7	(unsigned)
```

Note the extra `data1`, `strp`, `indirect string` annotations.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/strace/strace/issues/180
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20210330/ec98c9fd/attachment.htm>


More information about the Strace-devel mailing list