* [Bug libdw/29450] New: run-low_high_pc.sh fails on i386 against binutils-2.39
@ 2022-08-06 6:34 slyich at gmail dot com
2022-08-06 6:47 ` [Bug libdw/29450] " slyich at gmail dot com
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: slyich at gmail dot com @ 2022-08-06 6:34 UTC (permalink / raw)
To: elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=29450
Bug ID: 29450
Summary: run-low_high_pc.sh fails on i386 against binutils-2.39
Product: elfutils
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libdw
Assignee: unassigned at sourceware dot org
Reporter: slyich at gmail dot com
CC: elfutils-devel at sourceware dot org
Target Milestone: ---
binutils-2.39 is out:
https://sourceware.org/pipermail/binutils/2022-August/122246.html
I tried to package it in nixpkgs and found a few build or test failures.
elfutils-0.187 and elfutils from git both fail run-low_high_pc.sh as:
FAIL: run-low_high_pc.sh
========================
[b] main.c
[2d] main
[b] ../sysdeps/i386/start.S
[26] _start
[40] ../sysdeps/x86/abi-note.c
[b52] init.c
[b8e] static-reloc.c
[2dba] _dl_relocate_static_pie
[2dd8] ../sysdeps/i386/crti.S
[2def] _init
lowpc: 8049000, highpc: 8049000lx
../sysdeps/i386/crti.S: [2def] '_init' highpc <= lowpc
FAIL run-low_high_pc.sh (exit status: 255)
Extra `lx` prefix looks minor. lowpc == highpc looks real. gdb somehow manages
to detect the PC range for _init. Not sure which of tested files is that.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libdw/29450] run-low_high_pc.sh fails on i386 against binutils-2.39
2022-08-06 6:34 [Bug libdw/29450] New: run-low_high_pc.sh fails on i386 against binutils-2.39 slyich at gmail dot com
@ 2022-08-06 6:47 ` slyich at gmail dot com
2022-08-06 6:58 ` slyich at gmail dot com
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: slyich at gmail dot com @ 2022-08-06 6:47 UTC (permalink / raw)
To: elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=29450
--- Comment #1 from Sergei Trofimovich <slyich at gmail dot com> ---
Created attachment 14257
--> https://sourceware.org/bugzilla/attachment.cgi?id=14257&action=edit
low_high_pc
Attaching the binary itself. It was a failing selftest:
$ LD_LIBRARY_PATH=$PWD/libdw:$PWD/libelf tests/low_high_pc -e tests/low_high_pc
[b] ../sysdeps/i386/start.S
[26] _start
[40] ../sysdeps/x86/abi-note.c
[b52] init.c
[b8e] static-reloc.c
[2dba] _dl_relocate_static_pie
[2dd8] ../sysdeps/i386/crti.S
[2def] _init
lowpc: 8049000, highpc: 8049000
../sysdeps/i386/crti.S: [2def] '_init' highpc <= lowpc
gdb somehow knows the size of the _init:
$ gdb /tmp/low_high_pc
Reading symbols from /tmp/low_high_pc...
(gdb) disassemble _init
Dump of assembler code for function _init:
0x08049000 <+0>: endbr32
0x08049004 <+4>: push %ebx
0x08049005 <+5>: sub $0x8,%esp
0x08049008 <+8>: call 0x8049400 <__x86.get_pc_thunk.bx>
0x0804900d <+13>: add $0x2f93,%ebx
0x08049013 <+19>: mov 0x5c(%ebx),%eax
0x08049019 <+25>: test %eax,%eax
0x0804901b <+27>: je 0x804901f <_init+31>
0x0804901d <+29>: call *%eax
0x0804901f <+31>: add $0x8,%esp
0x08049022 <+34>: pop %ebx
0x08049023 <+35>: ret
End of assembler dump.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libdw/29450] run-low_high_pc.sh fails on i386 against binutils-2.39
2022-08-06 6:34 [Bug libdw/29450] New: run-low_high_pc.sh fails on i386 against binutils-2.39 slyich at gmail dot com
2022-08-06 6:47 ` [Bug libdw/29450] " slyich at gmail dot com
@ 2022-08-06 6:58 ` slyich at gmail dot com
2022-08-06 8:06 ` slyich at gmail dot com
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: slyich at gmail dot com @ 2022-08-06 6:58 UTC (permalink / raw)
To: elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=29450
--- Comment #2 from Sergei Trofimovich <slyich at gmail dot com> ---
Could it be that it's a mild `crti.o` corruption by new binutils? "MIPS
assembler" does not sound right.
```
$ readelf -aW crti.o --debug-dump
...
Contents of the .debug_info section:
Compilation Unit @ offset 0x0:
Length: 0x49 (32-bit)
Version: 2
Abbrev Offset: 0x0
Pointer Size: 4
<0><b>: Abbrev Number: 1 (DW_TAG_compile_unit)
<c> DW_AT_stmt_list : (data4) 0x0
<10> DW_AT_ranges : (data4) 0x0
<14> DW_AT_name : (strp) (offset: 0x0): ../sysdeps/i386/crti.S
<18> DW_AT_comp_dir : (strp) (offset: 0x17): /build/glibc-2.35/csu
<1c> DW_AT_producer : (strp) (offset: 0x2d): GNU AS 2.39
<20> DW_AT_language : (data2) 32769 (MIPS assembler)
<1><22>: Abbrev Number: 2 (DW_TAG_subprogram)
<23> DW_AT_name : (strp) (offset: 0x39): _init
<27> DW_AT_external : (flag) 1
<28> DW_AT_low_pc : (addr) 0x0
<2c> DW_AT_high_pc : (addr) 0x0
<1><30>: Abbrev Number: 2 (DW_TAG_subprogram)
<31> DW_AT_name : (strp) (offset: 0x3f): __x86.get_pc_thunk.bx
<35> DW_AT_external : (flag) 1
<36> DW_AT_low_pc : (addr) 0x0
<3a> DW_AT_high_pc : (addr) 0x4
<1><3e>: Abbrev Number: 2 (DW_TAG_subprogram)
<3f> DW_AT_name : (strp) (offset: 0x55): _fini
<43> DW_AT_external : (flag) 1
<44> DW_AT_low_pc : (addr) 0x0
<48> DW_AT_high_pc : (addr) 0x0
<1><4c>: Abbrev Number: 0
...
```
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libdw/29450] run-low_high_pc.sh fails on i386 against binutils-2.39
2022-08-06 6:34 [Bug libdw/29450] New: run-low_high_pc.sh fails on i386 against binutils-2.39 slyich at gmail dot com
2022-08-06 6:47 ` [Bug libdw/29450] " slyich at gmail dot com
2022-08-06 6:58 ` slyich at gmail dot com
@ 2022-08-06 8:06 ` slyich at gmail dot com
2022-08-06 8:10 ` slyich at gmail dot com
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: slyich at gmail dot com @ 2022-08-06 8:06 UTC (permalink / raw)
To: elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=29450
--- Comment #3 from Sergei Trofimovich <slyich at gmail dot com> ---
gas-2.39 started adding 0-sized DIE for function without a .size marking:
$ cat crti.S.S
.section .init,"ax",@progbits
.p2align 2
.globl _init
.hidden _init
.type _init, @function
_init:
.section
.text.__x86.get_pc_thunk.bx,"axG",@progbits,__x86.get_pc_thunk.bx,comdat
.globl __x86.get_pc_thunk.bx
.hidden __x86.get_pc_thunk.bx
.p2align 4
.type __x86.get_pc_thunk.bx,@function
__x86.get_pc_thunk.bx:
ud2
.size __x86.get_pc_thunk.bx, . - __x86.get_pc_thunk.bx
.previous
ud2
$ as-2.39 --gdwarf2 --32 -o crti.o crti.S.S
$ readelf -aW --debug-dump crti.o
<0><b>: Abbrev Number: 1 (DW_TAG_compile_unit)
<c> DW_AT_stmt_list : (data4) 0x0
<10> DW_AT_ranges : (data4) 0x0
<14> DW_AT_name : (strp) (offset: 0x0): crti.S.S
<18> DW_AT_comp_dir : (strp) (offset: 0x9):
/home/slyfox/dev/bugs/binutils-2.39-crti-size/delta
<1c> DW_AT_producer : (strp) (offset: 0x3d): GNU AS 2.39
<20> DW_AT_language : (data2) 32769 (MIPS assembler)
<1><22>: Abbrev Number: 2 (DW_TAG_subprogram)
<23> DW_AT_name : (strp) (offset: 0x49): _init
<27> DW_AT_external : (flag) 1
<28> DW_AT_low_pc : (addr) 0x0
<2c> DW_AT_high_pc : (addr) 0x0
<1><30>: Abbrev Number: 2 (DW_TAG_subprogram)
<31> DW_AT_name : (strp) (offset: 0x4f): __x86.get_pc_thunk.bx
<35> DW_AT_external : (flag) 1
<36> DW_AT_low_pc : (addr) 0x0
<3a> DW_AT_high_pc : (addr) 0x2
<1><3e>: Abbrev Number: 0
$ as-2.38 --gdwarf2 --32 -o crti.o crti.S.S
$ readelf -aW --debug-dump crti.o
<0><b>: Abbrev Number: 1 (DW_TAG_compile_unit)
<c> DW_AT_stmt_list : (data4) 0x0
<10> DW_AT_ranges : (data4) 0x0
<14> DW_AT_name : (strp) (offset: 0x0): crti.S.S
<18> DW_AT_comp_dir : (strp) (offset: 0x9):
/home/slyfox/dev/bugs/binutils-2.39-crti-size/delta
<1c> DW_AT_producer : (strp) (offset: 0x3d): GNU AS 2.38
<20> DW_AT_language : (data2) 32769 (MIPS assembler)
Not sure if it's a discrepancy in binutils.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libdw/29450] run-low_high_pc.sh fails on i386 against binutils-2.39
2022-08-06 6:34 [Bug libdw/29450] New: run-low_high_pc.sh fails on i386 against binutils-2.39 slyich at gmail dot com
` (2 preceding siblings ...)
2022-08-06 8:06 ` slyich at gmail dot com
@ 2022-08-06 8:10 ` slyich at gmail dot com
2022-08-06 8:10 ` slyich at gmail dot com
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: slyich at gmail dot com @ 2022-08-06 8:10 UTC (permalink / raw)
To: elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=29450
--- Comment #4 from Sergei Trofimovich <slyich at gmail dot com> ---
Filed https://sourceware.org/PR29451 against gas.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libdw/29450] run-low_high_pc.sh fails on i386 against binutils-2.39
2022-08-06 6:34 [Bug libdw/29450] New: run-low_high_pc.sh fails on i386 against binutils-2.39 slyich at gmail dot com
` (3 preceding siblings ...)
2022-08-06 8:10 ` slyich at gmail dot com
@ 2022-08-06 8:10 ` slyich at gmail dot com
2022-08-07 23:30 ` mark at klomp dot org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: slyich at gmail dot com @ 2022-08-06 8:10 UTC (permalink / raw)
To: elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=29450
Sergei Trofimovich <slyich at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://sourceware.org/bugz
| |illa/show_bug.cgi?id=29451
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libdw/29450] run-low_high_pc.sh fails on i386 against binutils-2.39
2022-08-06 6:34 [Bug libdw/29450] New: run-low_high_pc.sh fails on i386 against binutils-2.39 slyich at gmail dot com
` (4 preceding siblings ...)
2022-08-06 8:10 ` slyich at gmail dot com
@ 2022-08-07 23:30 ` mark at klomp dot org
2022-08-10 11:13 ` mark at klomp dot org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: mark at klomp dot org @ 2022-08-07 23:30 UTC (permalink / raw)
To: elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=29450
Mark Wielaard <mark at klomp dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mark at klomp dot org
--- Comment #5 from Mark Wielaard <mark at klomp dot org> ---
(In reply to Sergei Trofimovich from comment #4)
> Filed https://sourceware.org/PR29451 against gas.
Right. I added a comment there. Hopefully it gets fixed in binutils. Because I
believe the elfutils testcase is correct. Adding a low_pc/high_pc attribute
means you are describing a single continuous address range. You cannot do that
by having low_pc == high_pc.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libdw/29450] run-low_high_pc.sh fails on i386 against binutils-2.39
2022-08-06 6:34 [Bug libdw/29450] New: run-low_high_pc.sh fails on i386 against binutils-2.39 slyich at gmail dot com
` (5 preceding siblings ...)
2022-08-07 23:30 ` mark at klomp dot org
@ 2022-08-10 11:13 ` mark at klomp dot org
2022-08-10 11:15 ` mliska at suse dot cz
2022-08-11 9:17 ` slyich at gmail dot com
8 siblings, 0 replies; 10+ messages in thread
From: mark at klomp dot org @ 2022-08-10 11:13 UTC (permalink / raw)
To: elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=29450
--- Comment #6 from Mark Wielaard <mark at klomp dot org> ---
Did the binutils 2.39 commit:
commit e8cf73215187b0c08679d726a5cc7c019fa3ea2e
Author: Jan Beulich <jbeulich@suse.com>
Date: Wed Aug 10 10:34:22 2022 +0200
gas/Dwarf: properly skip zero-size functions
Fix this?
In that case I suggest we close this bug and recommend people upgrade to
binutils 2.39.1 when that gets released
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libdw/29450] run-low_high_pc.sh fails on i386 against binutils-2.39
2022-08-06 6:34 [Bug libdw/29450] New: run-low_high_pc.sh fails on i386 against binutils-2.39 slyich at gmail dot com
` (6 preceding siblings ...)
2022-08-10 11:13 ` mark at klomp dot org
@ 2022-08-10 11:15 ` mliska at suse dot cz
2022-08-11 9:17 ` slyich at gmail dot com
8 siblings, 0 replies; 10+ messages in thread
From: mliska at suse dot cz @ 2022-08-10 11:15 UTC (permalink / raw)
To: elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=29450
--- Comment #7 from Martin Liska <mliska at suse dot cz> ---
(In reply to Mark Wielaard from comment #6)
> Did the binutils 2.39 commit:
>
> commit e8cf73215187b0c08679d726a5cc7c019fa3ea2e
> Author: Jan Beulich <jbeulich@suse.com>
> Date: Wed Aug 10 10:34:22 2022 +0200
>
> gas/Dwarf: properly skip zero-size functions
>
> Fix this?
Yes.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libdw/29450] run-low_high_pc.sh fails on i386 against binutils-2.39
2022-08-06 6:34 [Bug libdw/29450] New: run-low_high_pc.sh fails on i386 against binutils-2.39 slyich at gmail dot com
` (7 preceding siblings ...)
2022-08-10 11:15 ` mliska at suse dot cz
@ 2022-08-11 9:17 ` slyich at gmail dot com
8 siblings, 0 replies; 10+ messages in thread
From: slyich at gmail dot com @ 2022-08-11 9:17 UTC (permalink / raw)
To: elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=29450
Sergei Trofimovich <slyich at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |MOVED
Status|UNCONFIRMED |RESOLVED
--- Comment #8 from Sergei Trofimovich <slyich at gmail dot com> ---
Yeah. The gas fix fixed elfutils test suite for me. Let's mark it
RESOLVED/MOVED.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2022-08-11 9:17 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-06 6:34 [Bug libdw/29450] New: run-low_high_pc.sh fails on i386 against binutils-2.39 slyich at gmail dot com
2022-08-06 6:47 ` [Bug libdw/29450] " slyich at gmail dot com
2022-08-06 6:58 ` slyich at gmail dot com
2022-08-06 8:06 ` slyich at gmail dot com
2022-08-06 8:10 ` slyich at gmail dot com
2022-08-06 8:10 ` slyich at gmail dot com
2022-08-07 23:30 ` mark at klomp dot org
2022-08-10 11:13 ` mark at klomp dot org
2022-08-10 11:15 ` mliska at suse dot cz
2022-08-11 9:17 ` slyich at gmail dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).