diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2021-03-01 05:34:34 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2021-03-01 05:34:47 -0800 |
commit | ecd65684f542be614adc56321c118d8985d35409 (patch) | |
tree | f1dbd3ff9c0df14b52d30372dc3cc54f0a07b186 /binutils/testsuite | |
parent | 8ee10e86093150c70360d9e26b29e6d9b6398f33 (diff) | |
download | binutils-gdb-ecd65684f542be614adc56321c118d8985d35409.tar.gz |
Warn for missing separate debug files only if needed
We shouldn't warn missing separate debug files when debug info isn't
needed.
PR binutils/27486
* dwarf.c (load_separate_debug_info): Issue warning only if
do_debug_links is set.
* testsuite/binutils-all/compress.exp: Run objdump and readelf
with missing debug file.
Diffstat (limited to 'binutils/testsuite')
-rw-r--r-- | binutils/testsuite/binutils-all/compress.exp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/binutils/testsuite/binutils-all/compress.exp b/binutils/testsuite/binutils-all/compress.exp index 98daf671552..88fef269905 100644 --- a/binutils/testsuite/binutils-all/compress.exp +++ b/binutils/testsuite/binutils-all/compress.exp @@ -676,6 +676,7 @@ proc test_gnu_debuglink {} { global STRIP global OBJCOPY global OBJDUMP + global READELF global gcc_gas_flag set test "gnu-debuglink" @@ -757,6 +758,20 @@ proc test_gnu_debuglink {} { } else { pass "$test (objdump 2)" } + + remote_file host delete tmpdir/testprog.compress + set got [remote_exec host [concat sh -c [list "$OBJDUMP --syms tmpdir/testprog > /dev/null"]]] + if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { + fail "$test (objdump with missing link)" + } else { + pass "$test (objdump with missing link)" + } + set got [remote_exec host [concat sh -c [list "$READELF -S tmpdir/testprog > /dev/null"]]] + if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { + fail "$test (readelf with missing link)" + } else { + pass "$test (readelf with missing link)" + } } if {[is_elf_format]} then { |