{
info->callbacks->einfo
/* xgettext:c-format */
- (_("%X%C: relocation to \"%s\" references a different segment\n"),
+ (_("%X%H: relocation to \"%s\" references a different segment\n"),
input_bfd, input_section, rel->r_offset, symname);
return false;
}
else
info->callbacks->einfo
/* xgettext:c-format */
- (_("%C: warning: relocation to \"%s\" references a different segment\n"),
+ (_("%H: warning: relocation to \"%s\" references a different segment\n"),
input_bfd, input_section, rel->r_offset, symname);
}
if (info.enclosing_symbol_type == elfcpp::STT_FUNC)
ret += _("function ");
ret += info.enclosing_symbol_name;
- return ret;
+ ret += ":";
}
ret += "(";
# We don't know how the compiler might order these variables, so we
# can't test for the actual offset from .data, hence the regexp.
-check debug_msg.err "debug_msg.o:debug_msg.cc:fn_array: error: undefined reference to 'undef_fn1()'"
-check debug_msg.err "debug_msg.o:debug_msg.cc:fn_array: error: undefined reference to 'undef_fn2()'"
-check debug_msg.err "debug_msg.o:debug_msg.cc:badref1: error: undefined reference to 'undef_int'"
+check debug_msg.err "debug_msg.o:debug_msg.cc:fn_array:(.*): error: undefined reference to 'undef_fn1()'"
+check debug_msg.err "debug_msg.o:debug_msg.cc:fn_array:(.*): error: undefined reference to 'undef_fn2()'"
+check debug_msg.err "debug_msg.o:debug_msg.cc:badref1:(.*): error: undefined reference to 'undef_int'"
# These tests check only for the source file's file name (not the complete
# path) because use of -fdebug-prefix-map may change the path to the source
# Check for the same error messages when using --compressed-debug-sections.
if test -r debug_msg_cdebug.err
then
- check debug_msg_cdebug.err "debug_msg_cdebug.o:debug_msg.cc:fn_array: error: undefined reference to 'undef_fn1()'"
- check debug_msg_cdebug.err "debug_msg_cdebug.o:debug_msg.cc:fn_array: error: undefined reference to 'undef_fn2()'"
- check debug_msg_cdebug.err "debug_msg_cdebug.o:debug_msg.cc:badref1: error: undefined reference to 'undef_int'"
+ check debug_msg_cdebug.err "debug_msg_cdebug.o:debug_msg.cc:fn_array:(.*): error: undefined reference to 'undef_fn1()'"
+ check debug_msg_cdebug.err "debug_msg_cdebug.o:debug_msg.cc:fn_array:(.*): error: undefined reference to 'undef_fn2()'"
+ check debug_msg_cdebug.err "debug_msg_cdebug.o:debug_msg.cc:badref1:(.*): error: undefined reference to 'undef_int'"
check debug_msg_cdebug.err ".*/debug_msg.cc:50: error: undefined reference to 'undef_fn1()'"
check debug_msg_cdebug.err ".*/debug_msg.cc:55: error: undefined reference to 'undef_fn2()'"
check debug_msg_cdebug.err ".*/debug_msg.cc:4[356]: error: undefined reference to 'undef_fn1()'"
# We don't know how the compiler might order these variables, so we
# can't test for the actual offset from .data, hence the regexp.
-check x86_64_overflow_pc32.err "function bar: error: relocation overflow"
+check x86_64_overflow_pc32.err "function bar:(.*): error: relocation overflow"
exit 0
# We don't know how the compiler might order these variables, so we
# can't test for the actual offset from .data, hence the regexp.
-check x86_64_overflow_pc32.err "function bar: error: relocation overflow"
+check x86_64_overflow_pc32.err "function bar:(.*): error: relocation overflow"
exit 0
bfd_vma addend = 0;
if (!bfd_get_section_contents (s->owner, s, buf, rel->address, sizeof (buf)))
- einfo (_("%P: %C: cannot get section contents - auto-import exception\n"),
+ einfo (_("%P: %H: cannot get section contents - auto-import exception\n"),
s->owner, s, rel->address);
else
addend = bfd_get_32 (s->owner, buf);
break;
}
if (!ok)
- einfo (_("%P: %C: cannot get section contents - auto-import exception\n"),
+ einfo (_("%P: %H: cannot get section contents - auto-import exception\n"),
s->owner, s, rel->address);
return addend;
}
in OUTSECNAME. This reloc is from a section which is
mapped into a section from which references to OUTSECNAME
are prohibited. We must report an error. */
- einfo (_("%X%P: %C: prohibited cross reference from %s to `%pT' in %s\n"),
+ einfo (_("%X%P: %H: prohibited cross reference from %s to `%pT' in %s\n"),
abfd, sec, q->address, outsecname,
bfd_asymbol_name (*q->sym_ptr_ptr), outdefsecname);
}
&& strcmp (bfd_asymbol_name (*q->sym_ptr_ptr), info->symbol) == 0)
{
/* We found a reloc for the symbol we are looking for. */
- einfo ("%P: %C: %s%s\n", abfd, sec, q->address, _("warning: "),
+ einfo ("%P: %H: %s%s\n", abfd, sec, q->address, _("warning: "),
info->warning);
info->found = true;
break;
if (error_count < MAX_ERRORS_IN_A_ROW)
{
if (error)
- einfo (_("%X%P: %C: undefined reference to `%pT'\n"),
+ einfo (_("%X%P: %H: undefined reference to `%pT'\n"),
abfd, section, address, name);
else
- einfo (_("%P: %C: warning: undefined reference to `%pT'\n"),
+ einfo (_("%P: %H: warning: undefined reference to `%pT'\n"),
abfd, section, address, name);
}
else if (error_count == MAX_ERRORS_IN_A_ROW)
}
else if (addend != 0)
- einfo (_("%X%P: %C: variable '%pT' can't be auto-imported; please read the documentation for ld's --enable-auto-import for details\n"),
+ einfo (_("%X%P: %H: variable '%pT' can't be auto-imported; please read the documentation for ld's --enable-auto-import for details\n"),
s->owner, s, rel->address, (*rel->sym_ptr_ptr)->name);
}
-# source: start1.s
-# source: stabs1.s
-# target: cris-*-*elf* cris-*-*aout*
-# as: --em=crisaout
-# ld: -mcrisaout
-# error: .o:/blah/foo.c:96: undefined reference to `globsym1'$
+#source: start1.s
+#source: stabs1.s
+#target: cris-*-*elf* cris-*-*aout*
+#as: --em=crisaout
+#ld: -mcrisaout
+#error: .o:/blah/foo.c:96:\(.*\): undefined reference to `globsym1'$
#target: cris-*-*elf* cris-*-*aout*
#as: --em=criself
#ld: -mcriself
-#error: .o:/blah/foo.c:96: undefined reference to `globsym1'$
+#error: .o:/blah/foo.c:96:\(.*\): undefined reference to `globsym1'$
"-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"
[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" ] \
#name: undefined symbol with compressed debug sections
#as: --32
#ld: -e foo -melf_i386 --noinhibit-exec
-#warning: .*/compressed1.c:13: undefined reference to .bar.
+#warning: .*/compressed1.c:13:\(.*\): undefined reference to .bar.
#nm: -n
#failif
}
}
-set ml "undefined.c:9: undefined reference to `*this_function_is_not_defined'"
+set ml {undefined.c:9:(*): undefined reference to `*this_function_is_not_defined'}
checkund $ml $testline
{pr12760b.c} {} "libpr12760.a"] \
[list "PR ld/12760" \
"-O2 -Wl,-e,foo -nostdlib -flto -fuse-linker-plugin tmpdir/pr12760a.o -Wl,--start-group tmpdir/libpr12760.a -Wl,--end-group" "" \
- {dummy.c} {{warning "pr12760a.c:6: warning: Bad \\.?bar"}} \
+ {dummy.c} {{warning {pr12760a.c:6:\(.*\): warning: Bad \.?bar}}} \
"pr12760.exe" "c"] \
[list "PR ld/12975" \
"-shared -O2 -fPIC -flto -fuse-linker-plugin -nostdlib -Wl,-version-script,pr12975.t" "-O2 -flto" \
#setup_xfail "arm*-*-pe*"
}
- set ml "undefined.c:9: undefined reference to `*this_function_is_not_defined'"
+ set ml {undefined.c:9:(*): undefined reference to `*this_function_is_not_defined'}
# With targets that use elf/dwarf2, such as the arm-elf toolchain,
# the code in bfd/elf.c:_bfd_elf_find_nearest_line() is called in
# order to locate the file name/line number where the undefined
#name: undefined symbol with compressed debug sections
#as: --64
#ld: -e foo -melf_x86_64 --noinhibit-exec
-#warning: .*/compressed1.c:13: undefined reference to .bar.
+#warning: .*/compressed1.c:13:\(.*\): undefined reference to .bar.
#nm: -n
#failif
}
}
-set ml "undefined.c:9: undefined reference to `*this_function_is_not_defined'"
+set ml {undefined.c:9:(*): undefined reference to `*this_function_is_not_defined'}
checkund $ml $testline
#...
-.*pr27587/<artificial>:4: undefined reference to `stack_size'
+.*pr27587/<artificial>:4:\(.*\): undefined reference to `stack_size'
#...