public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [Bug libdw/24856] New: dwarf_diename() cannot get correct name
@ 2019-07-27 13:40 changbin.du at gmail dot com
  2019-07-27 13:46 ` [Bug libdw/24856] " changbin.du at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: changbin.du at gmail dot com @ 2019-07-27 13:40 UTC (permalink / raw)
  To: elfutils-devel

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

            Bug ID: 24856
           Summary: dwarf_diename() cannot get correct name
           Product: elfutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: libdw
          Assignee: unassigned at sourceware dot org
          Reporter: changbin.du at gmail dot com
                CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

Created attachment 11923
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11923&action=edit
object file

The allfcts get all symbols as the same name.
elfutils/tests$ ./allfcts ../../linux/kernel/iomem.o 
kernel/iomem.c:162:x86_coreid_bits
kernel/iomem.c:139:x86_coreid_bits
kernel/iomem.c:134:x86_coreid_bits
kernel/iomem.c:129:x86_coreid_bits
kernel/iomem.c:122:x86_coreid_bits
kernel/iomem.c:71:x86_coreid_bits
kernel/iomem.c:30:x86_coreid_bits
kernel/iomem.c:16:x86_coreid_bits
./include/linux/mm.h:626:x86_coreid_bits
./include/linux/device.h:1105:x86_coreid_bits
./include/linux/mmzone.h:1297:x86_coreid_bits
./include/linux/mmzone.h:1262:x86_coreid_bits
./include/linux/mmzone.h:1212:x86_coreid_bits
./include/linux/mmzone.h:1151:x86_coreid_bits
./include/linux/page-flags.h:372:x86_coreid_bits
./include/linux/err.h:24:x86_coreid_bits

But dwfl API works:
elfutils/tests$ ./funcretval -e ../../linux/kernel/iomem.o 
() devm_memunmap: returns no value
() devm_memremap: return value location: {0x50, 0}
() devm_memremap_match: return value location: {0x50, 0}
() devm_memremap_release: returns no value
() memunmap: returns no value
() memremap: return value location: {0x50, 0}
() try_ram_remap: return value location: {0x50, 0}
() arch_memremap_wb: return value location: {0x50, 0}
() is_vmalloc_addr: return value location: {0x50, 0}
() dev_to_node: return value location: {0x50, 0}
() pfn_valid: return value location: {0x50, 0}
() valid_section: return value location: {0x50, 0}
() __nr_to_section: return value location: {0x50, 0}
() pfn_to_section_nr: return value location: {0x50, 0}
() PageHighMem: return value location: {0x50, 0}
() ERR_PTR: return value location: {0x50, 0}

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libdw/24856] dwarf_diename() cannot get correct name
  2019-07-27 13:40 [Bug libdw/24856] New: dwarf_diename() cannot get correct name changbin.du at gmail dot com
@ 2019-07-27 13:46 ` changbin.du at gmail dot com
  2019-07-27 14:28 ` mark at klomp dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: changbin.du at gmail dot com @ 2019-07-27 13:46 UTC (permalink / raw)
  To: elfutils-devel

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

--- Comment #1 from Changbin Du <changbin.du at gmail dot com> ---
BTW, the latest master branch has build failure.

  CCLD     libebl_sparc.so
  CCLD     libebl_ppc.so
  CCLD     libebl_ppc64.so
  CCLD     libebl_s390.so
  CCLD     libebl_tilegx.so
  CCLD     libebl_m68k.so
  CCLD     libebl_bpf.so
  AR       libebl_riscv_pic.a
  CCLD     libebl_riscv.so
/usr/bin/ld: libebl_riscv_pic.a(riscv_init.os): relocation R_X86_64_PC32
against undefined hidden symbol `riscv64_core_note' can not be used when making
a shared object
/usr/bin/ld: final link failed: nonrepresentable section on output
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:1299: libebl_riscv.so] Error 1
make[1]: *** [Makefile:486: all-recursive] Error 1
make: *** [Makefile:402: all] Error 2

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libdw/24856] dwarf_diename() cannot get correct name
  2019-07-27 13:40 [Bug libdw/24856] New: dwarf_diename() cannot get correct name changbin.du at gmail dot com
  2019-07-27 13:46 ` [Bug libdw/24856] " changbin.du at gmail dot com
@ 2019-07-27 14:28 ` mark at klomp dot org
  2019-07-27 14:29 ` mark at klomp dot org
  2020-01-10 15:14 ` fche at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: mark at klomp dot org @ 2019-07-27 14:28 UTC (permalink / raw)
  To: elfutils-devel

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

Mark Wielaard <mark at klomp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mark at klomp dot org

--- Comment #2 from Mark Wielaard <mark at klomp dot org> ---
(In reply to Changbin Du from comment #0)
> The allfcts get all symbols as the same name.
> elfutils/tests$ ./allfcts ../../linux/kernel/iomem.o 
> [...]
> But dwfl API works:
> elfutils/tests$ ./funcretval -e ../../linux/kernel/iomem.o 

This is because the iomem.o ET_REL file has relocations between the debug
sections. When using libdwfl those relocations are resolved automatically. If
the relocations aren't resolved before using the plain libdw interfaces it
looks like all references into the .debug_str section look like pointing to the
"zero string" (which happens to be  [   0]  "x86_coreid_bits").

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libdw/24856] dwarf_diename() cannot get correct name
  2019-07-27 13:40 [Bug libdw/24856] New: dwarf_diename() cannot get correct name changbin.du at gmail dot com
  2019-07-27 13:46 ` [Bug libdw/24856] " changbin.du at gmail dot com
  2019-07-27 14:28 ` mark at klomp dot org
@ 2019-07-27 14:29 ` mark at klomp dot org
  2020-01-10 15:14 ` fche at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: mark at klomp dot org @ 2019-07-27 14:29 UTC (permalink / raw)
  To: elfutils-devel

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

--- Comment #3 from Mark Wielaard <mark at klomp dot org> ---
(In reply to Changbin Du from comment #1)
> BTW, the latest master branch has build failure.
> 
>   CCLD     libebl_sparc.so
>   CCLD     libebl_ppc.so
>   CCLD     libebl_ppc64.so
>   CCLD     libebl_s390.so
>   CCLD     libebl_tilegx.so
>   CCLD     libebl_m68k.so
>   CCLD     libebl_bpf.so
>   AR       libebl_riscv_pic.a
>   CCLD     libebl_riscv.so
> /usr/bin/ld: libebl_riscv_pic.a(riscv_init.os): relocation R_X86_64_PC32
> against undefined hidden symbol `riscv64_core_note' can not be used when
> making a shared object
> /usr/bin/ld: final link failed: nonrepresentable section on output
> collect2: error: ld returned 1 exit status
> make[2]: *** [Makefile:1299: libebl_riscv.so] Error 1
> make[1]: *** [Makefile:486: all-recursive] Error 1
> make: *** [Makefile:402: all] Error 2

That is surprising, obviously that doesn't happen on any of the buildbots. You
might want to open a different bug for this issue (because it seems totally
unrelated to this issue) explaining how you configured, which gcc and ld
versions you are using and maybe the output of make V=1 to show the command
line flags (also make sure you make distclean first).

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libdw/24856] dwarf_diename() cannot get correct name
  2019-07-27 13:40 [Bug libdw/24856] New: dwarf_diename() cannot get correct name changbin.du at gmail dot com
                   ` (2 preceding siblings ...)
  2019-07-27 14:29 ` mark at klomp dot org
@ 2020-01-10 15:14 ` fche at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: fche at redhat dot com @ 2020-01-10 15:14 UTC (permalink / raw)
  To: elfutils-devel

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

Frank Ch. Eigler <fche at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |fche at redhat dot com
         Resolution|---                         |INVALID

--- Comment #4 from Frank Ch. Eigler <fche at redhat dot com> ---
as per comment #3, the test was based on a misunderstanding of the libdw api

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-01-10 15:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-27 13:40 [Bug libdw/24856] New: dwarf_diename() cannot get correct name changbin.du at gmail dot com
2019-07-27 13:46 ` [Bug libdw/24856] " changbin.du at gmail dot com
2019-07-27 14:28 ` mark at klomp dot org
2019-07-27 14:29 ` mark at klomp dot org
2020-01-10 15:14 ` fche at redhat 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).