https://sourceware.org/bugzilla/show_bug.cgi?id=33723
David Abdurachmanov <david.abdurachmanov at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |david.abdurachmanov at gmail
dot c
| |om
--- Comment #2 from David Abdurachmanov <david.abdurachmanov at gmail dot com>
---
My estimation is that ~200 in total packages are affected in Fedora 43 for
riscv64. Probably half of them being OCaml.
We have noticed the following messages:
[..]
/usr/bin/ld: /lib64/lp64d/../lib64/lp64d/libiberty.a(cplus-dem.o): access
beyond end of merged section (338)
/usr/bin/ld: /lib64/lp64d/../lib64/lp64d/libiberty.a(cplus-dem.o): access
beyond end of merged section (347)
/usr/bin/ld: /lib64/lp64d/../lib64/lp64d/libiberty.a(d-demangle.o): access
beyond end of merged section (318)
/usr/bin/ld: /lib64/lp64d/../lib64/lp64d/libiberty.a(d-demangle.o): access
beyond end of merged section (331)
[..]
In most cases these are just warning and do not cause issue with building
packages, but Nick assumes these are probably related to the next problem.
Note, these problems go away once relaxation is disabled, but does not solve
the next problem AFAIK (I probably need to re-test).
We have tested ld.bfd, lld and mold in Fedora 43 and all of them produced
broken DWARF5 information.
One of the smallest test cases is tcl + environment-modules. Note, that tcl has
"access beyond end of merged section" warnings. environment-modules has a
single C files, which links to libtclstub.a. Based on DWARF size it seems to be
tclStubLib.o. So we are basically linking two object files here, and the final
shared library has 2 CUs in DWARF5 dump.
It's tclStubLib.o DWARF5 information that gets a wrong pointer/offeset for the
filename. The string itself is available in .debug_line_str section, but
offsets are wrong in DWARF5.
Note, that all "access beyond end of merged section" messages that I seen in
the logs are only from static libraries.
I have some information saved.
debugedit fails because of these offsets being wrong.
$ readelf -p .debug_line_str libtclenvmodules.so | less
String dump of section '.debug_line_str':
[ 0] tclPlatDecls.h
[ f] time_t.h
[ 18] time.h
[ 1f] unistd.h
[ 28] tclInt.h
[ 31] /usr/include
[ 3e] string.h
[ 47] stddef.h
[ 50] tclIntPlatDecls.h
[ 62] tcl.h
[ 68] pwd.h
[ 6e]
/usr/src/debug/tcl-9.0.2-1.davidlt0.fc43.riscv64/generic/tclStubLib.c
[ b4] envmodules.c
[ c1] unistd-decl.h
[ cf] /usr/lib/gcc/riscv64-redhat-linux/15/include
[ fc] /usr/src/debug/tcl-9.0.2-1.davidlt0.fc43.riscv64/generic
[ 135] /usr/src/debug/tcl-9.0.2-1.davidlt0.fc43.riscv64/unix
[ 16b] string_fortified.h
[ 17e] struct_stat.h
[ 18c] fcntl2.h
[ 195] types.h
[ 19d] dirent.h
[ 1a6] stdlib.h
[ 1af] <built-in>
[ 1ba] stdio2.h
[ 1c3] /usr/include/bits
[ 1d5] grp.h
[ 1db] tclDecls.h
[ 1e6] /usr/include/bits/types
[ 1fe] tclIntDecls.h
[ 20c] struct_timespec.h
[ 21e] errno.h
[ 226]
/home/fedora/rpmbuild/BUILD/environment-modules-5.6.0-build/modules-5.6.0/lib
[ 274] utime.h
[ 27c] struct_tm.h
[ 288] struct_FILE.h
### -fuse-ld=bfd ####
Compilation Unit @ offset 0x94ce:
Length: 0xb1c8 (32-bit)
Version: 5
Unit Type: DW_UT_compile (1)
Abbrev Offset: 0x57d
Pointer Size: 8
<0><94da>: Abbrev Number: 43 (DW_TAG_compile_unit)
<94db> DW_AT_producer : (indirect string, offset: 0x67b0): GNU C23
15.2.1 20251111 (Red Hat 15.2.1-4) -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3
-mno-omit-leaf-frame-pointer -mno-relax -mabi=lp64d -misa-spec=20191213
-mtls-dialect=trad -march=rv64imafdc_zicsr_zifencei_zmmul_zaamo_zalrsc_zca_zcd
-g -O2 -fexceptions -fstack-protector-strong -fasynchronous-unwind-tables
-fno-omit-frame-pointer -fno-merge-constants -fextended-identifiers -fPIC
-fno-common -fno-lto -fplugin=gcc-annobin
<94df> DW_AT_language : 29 (C11)
<94e0> Unknown AT value: 90: 3
<94e1> Unknown AT value: 91: 0x31647
<94e5> DW_AT_name : (indirect line string, offset: 0xffffffd4):
<offset is too big>
<94e9> DW_AT_comp_dir : (indirect line string, offset: 0x259):
/usr/src/debug/tcl-9.0.2-1.davidlt0.fc43.riscv64/unix
<94ed> DW_AT_low_pc : 0x124c
<94f5> DW_AT_high_pc : 0x2e8
<94fd> DW_AT_stmt_list : 0x1945
### -fuse-ld=lld ###
Compilation Unit @ offset 0x94ce:
Length: 0xb1c8 (32-bit)
Version: 5
Unit Type: DW_UT_compile (1)
Abbrev Offset: 0x57d
Pointer Size: 8
<0><94da>: Abbrev Number: 43 (DW_TAG_compile_unit)
<94db> DW_AT_producer : (indirect string, offset: 0x14de): GNU C23
15.2.1 20251111 (Red Hat 15.2.1-4) -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3
-mno-omit-leaf-frame-pointer -mno-relax -mabi=lp64d -misa-spec=20191213
-mtls-dialect=trad -march=rv64imafdc_zicsr_zifencei_zmmul_zaamo_zalrsc_zca_zcd
-g -O2 -fexceptions -fstack-protector-strong -fasynchronous-unwind-tables
-fno-omit-frame-pointer -fno-merge-constants -fextended-identifiers -fPIC
-fno-common -fno-lto -fplugin=gcc-annobin
<94df> DW_AT_language : 29 (C11)
<94e0> Unknown AT value: 90: 3
<94e1> Unknown AT value: 91: 0x31647
<94e5> DW_AT_name : (indirect line string, offset: 0xb9):
g/tcl-9.0.2-1.davidlt0.fc43.riscv64/generic
<94e9> DW_AT_comp_dir : (indirect line string, offset: 0x1e9):
/usr/src/debug/tcl-9.0.2-1.davidlt0.fc43.riscv64/unix
### -fuse-ld=mold ###
Compilation Unit @ offset 0x94ce:
Length: 0xb1c8 (32-bit)
Version: 5
Unit Type: DW_UT_compile (1)
Abbrev Offset: 0x57d
Pointer Size: 8
<0><94da>: Abbrev Number: 43 (DW_TAG_compile_unit)
<94db> DW_AT_producer : (indirect string, offset: 0x888): GNU C23
15.2.1 20251111 (Red Hat 15.2.1-4) -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3
-mno-omit-leaf-frame-pointer -mno-relax -mabi=lp64d -misa-spec=20191213
-mtls-dialect=trad -march=rv64imafdc_zicsr_zifencei_zmmul_zaamo_zalrsc_zca_zcd
-g -O2 -fexceptions -fstack-protector-strong -fasynchronous-unwind-tables
-fno-omit-frame-pointer -fno-merge-constants -fextended-identifiers -fPIC
-fno-common -fno-lto -fplugin=gcc-annobin
<94df> DW_AT_language : 29 (C11)
<94e0> Unknown AT value: 90: 3
<94e1> Unknown AT value: 91: 0x31647
<94e5> DW_AT_name : (indirect line string, offset: 0xffffff6f):
<offset is too big>
<94e9> DW_AT_comp_dir : (indirect line string, offset: 0x135):
/usr/src/debug/tcl-9.0.2-1.davidlt0.fc43.riscv64/unix
<94ed> DW_AT_low_pc : 0x318c
<94f5> DW_AT_high_pc : 0x2e8
<94fd> DW_AT_stmt_list : 0x1945
--
You are receiving this mail because:
You are on the CC list for the bug.