[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/27391] [readelf] Handle absolute DW_AT_dwo_name
From: |
cvs-commit at gcc dot gnu.org |
Subject: |
[Bug binutils/27391] [readelf] Handle absolute DW_AT_dwo_name |
Date: |
Wed, 10 Feb 2021 16:26:54 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=27391
--- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot
gnu.org> ---
The master branch has been updated by Tom de Vries <vries@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d9d9d8ef8ce984dee45f35a5f00f4cf74bcab1e6
commit d9d9d8ef8ce984dee45f35a5f00f4cf74bcab1e6
Author: Tom de Vries <tdevries@suse.de>
Date: Wed Feb 10 17:26:50 2021 +0100
[binutils] Handle absolute DW_AT_dwo_name
With an exec:
...
$ pwd
/home/vries/tmp
$ gcc /home/vries/tmp/src/hello.c -gsplit-dwarf -c \
-o /home/vries/tmp/obj/hello.o
...
I get:
...
$ readelf -w obj/hello.o > READELF
readelf: Warning: Unable to load dwo file: \
/home/vries/tmp//home/vries/tmp/obj/hello.dwo
...
The dwo file name is listed here:
...
<20> DW_AT_GNU_dwo_name: /home/vries/tmp/obj/hello.dwo
<24> DW_AT_comp_dir : /home/vries/tmp
...
The standard states about the DW_AT_dwo_name attribute:
...
value is a null-terminated string containing the full or relative path name
(relative to the value of the DW_AT_comp_dir attribute, see below) of the
object file that contains the full compilation unit.
...
So, readelf shouldn't try to prefix an absolute path with DW_AT_comp_dir.
Fix this in load_dwo_file by handling the absolute path case.
binutils/ChangeLog:
2021-02-10 Tom de Vries <tdevries@suse.de>
PR binutils/27391
* dwarf.c (load_dwo_file): Handle case that name is absolute path.
--
You are receiving this mail because:
You are on the CC list for the bug.