[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gold/25309] New: Certain source lines when debugging with GDB are n
From: |
ciro.santilli at gmail dot com |
Subject: |
[Bug gold/25309] New: Certain source lines when debugging with GDB are not found for an executable using gold linker, but are found if regular ld is used instead |
Date: |
Mon, 23 Dec 2019 16:13:13 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=25309
Bug ID: 25309
Summary: Certain source lines when debugging with GDB are not
found for an executable using gold linker, but are
found if regular ld is used instead
Product: binutils
Version: 2.30
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gold
Assignee: ccoutant at gmail dot com
Reporter: ciro.santilli at gmail dot com
CC: ian at airs dot com
Target Milestone: ---
I don't have a fully minimized example, but here is a fully reproducible setup
within a more or less complex build of a big project:
https://github.com/cirosantilli/linux-kernel-module-cheat/issues/109 running in
Ubuntu 18.04.
The project uses partial linking.
The compilation, partial link, and final link commands for one particular file
for which the source lines could not be found was as follows. Do you see
anything suspicious?
compile.tmp.sh
```
g++ \
-o out/gem5/upstream-master/build/ARM/cpu/o3/cpu.do \
-c \
-std=c++11 \
-pipe \
-fno-strict-aliasing \
-Wall \
-Wundef \
-Wextra \
-Wno-sign-compare \
-Wno-unused-parameter \
-Werror \
-Wno-error=deprecated-declarations \
-Wno-error=deprecated \
-pthread \
-fno-builtin-malloc \
-fno-builtin-calloc \
-fno-builtin-realloc \
-fno-builtin-free \
-DPROTOBUF_INLINE_NOT_IN_HEADERS=0 \
-ggdb3 \
-O0 \
-DNUMBER_BITS_PER_SET=64 \
-DDEBUG \
-DTRACING_ON=1 \
-Iext/pybind11/include \
-Iout/gem5/upstream-master/build/drampower/src \
-Iout/gem5/upstream-master/build/nomali/include \
-Iout/gem5/upstream-master/build/iostream3 \
-Iout/gem5/upstream-master/build/libfdt \
-Iout/gem5/upstream-master/build/libelf \
-Iout/gem5/upstream-master/build/fputils/include \
-Iinclude \
-Iext \
-I/usr/include/python2.7 \
-I/usr/include/x86_64-linux-gnu/python2.7 \
-I/usr/include/hdf5/serial \
-Iext/googletest/googletest/include \
-Iext/googletest/googlemock/include \
-Iout/gem5/upstream-master/build/ARM \
-Iout/gem5/upstream-master/build/ARM/systemc/ext \
out/gem5/upstream-master/build/ARM/cpu/o3/cpu.cc
```
intermediate-link.tmp.sh
```
g++ \
-o out/gem5/upstream-master/build/ARM/cpu/o3/lib.do.partial \
-fuse-ld=gold \
-r \
-nostdlib \
-flinker-output=rel \
out/gem5/upstream-master/build/ARM/cpu/o3/base_dyn_inst.do \
out/gem5/upstream-master/build/ARM/cpu/o3/commit.do \
out/gem5/upstream-master/build/ARM/cpu/o3/cpu.do \
out/gem5/upstream-master/build/ARM/cpu/o3/deriv.do \
out/gem5/upstream-master/build/ARM/cpu/o3/decode.do \
out/gem5/upstream-master/build/ARM/cpu/o3/dyn_inst.do \
out/gem5/upstream-master/build/ARM/cpu/o3/fetch.do \
out/gem5/upstream-master/build/ARM/cpu/o3/free_list.do \
out/gem5/upstream-master/build/ARM/cpu/o3/fu_pool.do \
out/gem5/upstream-master/build/ARM/cpu/o3/iew.do \
out/gem5/upstream-master/build/ARM/cpu/o3/inst_queue.do \
out/gem5/upstream-master/build/ARM/cpu/o3/lsq.do \
out/gem5/upstream-master/build/ARM/cpu/o3/lsq_unit.do \
out/gem5/upstream-master/build/ARM/cpu/o3/mem_dep_unit.do \
out/gem5/upstream-master/build/ARM/cpu/o3/regfile.do \
out/gem5/upstream-master/build/ARM/cpu/o3/rename.do \
out/gem5/upstream-master/build/ARM/cpu/o3/rename_map.do \
out/gem5/upstream-master/build/ARM/cpu/o3/rob.do \
out/gem5/upstream-master/build/ARM/cpu/o3/scoreboard.do \
out/gem5/upstream-master/build/ARM/cpu/o3/store_set.do \
out/gem5/upstream-master/build/ARM/cpu/o3/thread_context.do \
out/gem5/upstream-master/build/ARM/cpu/o3/checker.do \
-Lout/gem5/upstream-master/build/drampower \
-Lout/gem5/upstream-master/build/nomali \
-Lout/gem5/upstream-master/build/iostream3 \
-Lout/gem5/upstream-master/build/libfdt \
-Lout/gem5/upstream-master/build/libelf \
-Lout/gem5/upstream-master/build/fputils \
-L/usr/lib/x86_64-linux-gnu/hdf5/serial \
-Lout/gem5/upstream-master/build/googletest
```
link.tmp.sh
```
g++ \
-o out/gem5/upstream-master/build/ARM/gem5.debug \
-fuse-ld=gold \
-pthread \
-L/usr/lib/python2.7/config-x86_64-linux-gnu \
-L/usr/lib \
-Xlinker \
-export-dynamic \
-Wl,-O1 \
-Wl,-Bsymbolic-functions \
-z origin \
-O0 \
out/gem5/upstream-master/build/ARM/sim/main.do \
out/gem5/upstream-master/build/ARM/dev/pci/lib.do.partial \
out/gem5/upstream-master/build/ARM/mem/ruby/network/lib.do.partial \
out/gem5/upstream-master/build/ARM/dev/ps2/lib.do.partial \
out/gem5/upstream-master/build/ARM/cpu/o3/probe/lib.do.partial \
out/gem5/upstream-master/build/ARM/systemc/dt/lib.do.partial \
out/gem5/upstream-master/build/ARM/mem/protocol/lib.do.partial \
out/gem5/upstream-master/build/ARM/kern/lib.do.partial \
out/gem5/upstream-master/build/ARM/cpu/minor/lib.do.partial \
out/gem5/upstream-master/build/ARM/mem/ruby/network/fault_model/lib.do.partial
\
out/gem5/upstream-master/build/ARM/sim/probe/lib.do.partial \
out/gem5/upstream-master/build/ARM/base/vnc/lib.do.partial \
out/gem5/upstream-master/build/ARM/systemc/tlm_core/2/generic_payload/lib.do.partial
\
out/gem5/upstream-master/build/ARM/arch/arm/lib.do.partial \
out/gem5/upstream-master/build/ARM/dev/i2c/lib.do.partial \
out/gem5/upstream-master/build/ARM/mem/ruby/network/garnet2.0/lib.do.partial
\
out/gem5/upstream-master/build/ARM/mem/ruby/common/lib.do.partial \
out/gem5/upstream-master/build/ARM/sim/lib.do.partial \
out/gem5/upstream-master/build/ARM/cpu/testers/directedtest/lib.do.partial \
out/gem5/upstream-master/build/ARM/systemc/dt/misc/lib.do.partial \
out/gem5/upstream-master/build/ARM/learning_gem5/part2/lib.do.partial \
out/gem5/upstream-master/build/ARM/cpu/lib.do.partial \
out/gem5/upstream-master/build/ARM/cpu/o3/lib.do.partial \
out/gem5/upstream-master/build/ARM/systemc/dt/fx/lib.do.partial \
out/gem5/upstream-master/build/ARM/mem/qos/lib.do.partial \
out/gem5/upstream-master/build/ARM/mem/ruby/slicc_interface/lib.do.partial \
out/gem5/upstream-master/build/ARM/mem/cache/compressors/lib.do.partial \
out/gem5/upstream-master/build/ARM/mem/ruby/system/lib.do.partial \
out/gem5/upstream-master/build/ARM/arch/generic/lib.do.partial \
out/gem5/upstream-master/build/ARM/python/lib.do.partial \
out/gem5/upstream-master/build/ARM/mem/cache/prefetch/lib.do.partial \
out/gem5/upstream-master/build/ARM/mem/cache/tags/indexing_policies/lib.do.partial
\
out/gem5/upstream-master/build/ARM/mem/lib.do.partial \
out/gem5/upstream-master/build/ARM/mem/ruby/profiler/lib.do.partial \
out/gem5/upstream-master/build/ARM/dev/virtio/lib.do.partial \
out/gem5/upstream-master/build/ARM/dev/net/lib.do.partial \
out/gem5/upstream-master/build/ARM/mem/ruby/protocol/lib.do.partial \
out/gem5/upstream-master/build/ARM/systemc/tlm_core/2/quantum/lib.do.partial
\
out/gem5/upstream-master/build/ARM/cpu/testers/memtest/lib.do.partial \
out/gem5/upstream-master/build/ARM/mem/ruby/structures/lib.do.partial \
out/gem5/upstream-master/build/ARM/systemc/core/lib.do.partial \
out/gem5/upstream-master/build/ARM/arch/arm/tracers/lib.do.partial \
out/gem5/upstream-master/build/ARM/systemc/dt/int/lib.do.partial \
out/gem5/upstream-master/build/ARM/proto/lib.do.partial \
out/gem5/upstream-master/build/ARM/systemc/dt/bit/lib.do.partial \
out/gem5/upstream-master/build/ARM/systemc/tlm_bridge/lib.do.partial \
out/gem5/upstream-master/build/ARM/cpu/testers/garnet_synthetic_traffic/lib.do.partial
\
out/gem5/upstream-master/build/ARM/cpu/testers/traffic_gen/lib.do.partial \
out/gem5/upstream-master/build/ARM/sim/power/lib.do.partial \
out/gem5/upstream-master/build/ARM/systemc/utils/lib.do.partial \
out/gem5/upstream-master/build/ARM/base/lib.do.partial \
out/gem5/upstream-master/build/ARM/mem/cache/tags/lib.do.partial \
out/gem5/upstream-master/build/ARM/systemc/channel/lib.do.partial \
out/gem5/upstream-master/build/ARM/dev/arm/lib.do.partial \
out/gem5/upstream-master/build/ARM/dev/storage/lib.do.partial \
out/gem5/upstream-master/build/ARM/dev/serial/lib.do.partial \
out/gem5/upstream-master/build/ARM/cpu/pred/lib.do.partial \
out/gem5/upstream-master/build/ARM/unittest/lib.do.partial \
out/gem5/upstream-master/build/ARM/mem/probes/lib.do.partial \
out/gem5/upstream-master/build/ARM/cpu/trace/lib.do.partial \
out/gem5/upstream-master/build/ARM/base/filters/lib.do.partial \
out/gem5/upstream-master/build/ARM/cpu/testers/rubytest/lib.do.partial \
out/gem5/upstream-master/build/ARM/systemc/tlm_utils/lib.do.partial \
out/gem5/upstream-master/build/ARM/dev/lib.do.partial \
out/gem5/upstream-master/build/ARM/mem/cache/replacement_policies/lib.do.partial
\
out/gem5/upstream-master/build/ARM/cpu/simple/lib.do.partial \
out/gem5/upstream-master/build/ARM/mem/cache/lib.do.partial \
out/gem5/upstream-master/build/ARM/mem/ruby/network/simple/lib.do.partial \
out/gem5/upstream-master/build/ARM/cpu/simple/probes/lib.do.partial \
out/gem5/upstream-master/build/ARM/base/date.do \
-Lout/gem5/upstream-master/build/drampower \
-Lout/gem5/upstream-master/build/nomali \
-Lout/gem5/upstream-master/build/iostream3 \
-Lout/gem5/upstream-master/build/libfdt \
-Lout/gem5/upstream-master/build/libelf \
-Lout/gem5/upstream-master/build/fputils \
-L/usr/lib/x86_64-linux-gnu/hdf5/serial \
-Lout/gem5/upstream-master/build/googletest \
-lpython2.7 \
-lpthread \
-ldl \
-lutil \
-lm \
-lz \
-lprotobuf \
-lrt \
-ltcmalloc \
-lhdf5 \
-lhdf5_cpp \
-lfputils \
-lelf \
-lfdt \
-liostream3 \
-lnomali \
-ldrampower \
-lpng
```
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug gold/25309] New: Certain source lines when debugging with GDB are not found for an executable using gold linker, but are found if regular ld is used instead,
ciro.santilli at gmail dot com <=
- [Bug gold/25309] Certain source lines when debugging with GDB are not found for an executable using gold linker, but are found if regular ld is used instead, ciro.santilli at gmail dot com, 2019/12/23
- [Bug gold/25309] Certain source lines when debugging with GDB are not found for an executable using gold linker, but are found if regular ld is used instead, ciro.santilli at gmail dot com, 2019/12/23
- [Bug gold/25309] Certain source lines when debugging with GDB are not found for an executable using gold linker, but are found if regular ld is used instead, ciro.santilli at gmail dot com, 2019/12/23
- [Bug gold/25309] Certain source lines when debugging with GDB are not found for an executable using gold linker, but are found if regular ld is used instead, ciro.santilli at gmail dot com, 2019/12/23
- [Bug gold/25309] Certain source lines when debugging with GDB are not found for an executable using gold linker, but are found if regular ld is used instead, ciro.santilli at gmail dot com, 2019/12/23