aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elf
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2023-07-15 19:47:10 +0930
committerAlan Modra <amodra@gmail.com>2023-07-17 08:17:44 +0930
commit02d2a36902c7b0fefe05e8d9bdbf11e846ac71fe (patch)
tree259e2d70c3d929d26f948c6ca9c658fa3dc8e898 /ld/testsuite/ld-elf
parent63e8fb86255ac97c31d368221be18850ad53039d (diff)
downloadgdb-02d2a36902c7b0fefe05e8d9bdbf11e846ac71fe.zip
gdb-02d2a36902c7b0fefe05e8d9bdbf11e846ac71fe.tar.gz
gdb-02d2a36902c7b0fefe05e8d9bdbf11e846ac71fe.tar.bz2
PR10957, Missing option to really print section+offset
Many of the reloc error messages have already been converted from using %C to using %H in ld.bfd, to print section+offset as well as file/line/function. This catches a few remaining, and changes gold to do the same. PR 10957 bfd/ * elf32-sh.c (sh_elf_relocate_section): Use %H in error messages. gold/ * object.cc (Relocate_info::location): Always report section+offset. * testsuite/debug_msg.sh: Adjust to suit. * testsuite/x32_overflow_pc32.sh: Likewise. * testsuite/x86_64_overflow_pc32.sh: Likewise. ld/ * emultempl/pe.em (read_addend): Use %H in error message. * emultempl/pep.em (read_addend): Likewise. * ldcref.c (check_reloc_refs): Likewise. * ldmain.c (warning_find_reloc, undefined_symbol): Likewise. * pe-dll.c (pe_create_import_fixup): Likewise. * testsuite/ld-cris/undef2.d: Adjust expected output to suit. * testsuite/ld-cris/undef3.d: Likewise. * testsuite/ld-elf/shared.exp: Likewise. * testsuite/ld-i386/compressed1.d: Likewise. * testsuite/ld-ia64/line.exp: Likewise. * testsuite/ld-plugin/lto.exp: Likewise. * testsuite/ld-undefined/undefined.exp: Likewise. * testsuite/ld-x86-64/compressed1.d: Likewise. * testsuite/ld-x86-64/line.exp: Likewise. * testsuite/ld-x86-64/pr27587.err: Likewise.
Diffstat (limited to 'ld/testsuite/ld-elf')
-rw-r--r--ld/testsuite/ld-elf/shared.exp4
1 files changed, 2 insertions, 2 deletions
diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp
index 1eef9f4..cf010e5 100644
--- a/ld/testsuite/ld-elf/shared.exp
+++ b/ld/testsuite/ld-elf/shared.exp
@@ -554,7 +554,7 @@ set build_tests {
"-shared" "-fPIC"
{beginwarn.c end.c}
{{readelf {-S --wide} libbarw.rd}
- {warning "^.*beginwarn.c:7: warning: function foo is deprecated\n?$"}}
+ {warning {^.*beginwarn.c:7:\(.*\): warning: function foo is deprecated\n?$}}}
"libbarw.so" "c"}
{"Build hidden libbar.so"
"-shared" "-fPIC"
@@ -1017,7 +1017,7 @@ set run_tests [list \
[list "Run warn with versioned libfoo.so" \
"-Wl,--no-as-needed tmpdir/beginwarn.o tmpdir/libfoov.so" "" \
{main.c} "warn" "warn.out" \
- "" "c" {^.*beginwarn.c:7: warning: function foo is deprecated\n?$} ] \
+ "" "c" {^.*beginwarn.c:7:\(.*\): warning: function foo is deprecated\n?$} ] \
[list "Run protected with versioned libfoo.so" \
"-Wl,--no-as-needed tmpdir/begin.o tmpdir/libfoov.so tmpdir/endprotected.o" "" \
{main.c} "protected" "normal.out" ] \