Go to file
Hans-Peter Nilsson a8a48c756c mmix bfd: fix bfd_assert for R_MMIX_PUSHJ_STUBBABLE against undef'd symbol
Spotted when inspecting gcc testsuite logs, but this already is
covered by the ld-mmix testsuite, it's just that the assert is ignored
since the regexp match is for a substring and not anchored.

With the anchors added but not the bugfix, the ld.log shows that the
asserts cause a non-match as intended:

Executing on host: sh -c {./ld-new   -LX/src/ld/testsuite/ld-mmix  -m elf64mmix -o tmpdir/dump tmpdir/undef-2.o tmpdir/start.o  2>&1}  /dev/null dump.tmp (timeout = 300)
./ld-new: BFD (GNU Binutils) 2.34.50.20200629 assertion fail X/src/bfd/elf64-mmix.c:2845
./ld-new: BFD (GNU Binutils) 2.34.50.20200629 assertion fail X/src/bfd/elf64-mmix.c:2845
./ld-new: BFD (GNU Binutils) 2.34.50.20200629 assertion fail X/src/bfd/elf64-mmix.c:2845
./ld-new: tmpdir/undef-2.o:(.text+0x0): undefined reference to `undefd'
failed with: <./ld-new: BFD (GNU Binutils) 2.34.50.20200629 assertion fail X/src/bfd/elf64-mmix.c:2845
./ld-new: BFD (GNU Binutils) 2.34.50.20200629 assertion fail X/src/bfd/elf64-mmix.c:2845
./ld-new: BFD (GNU Binutils) 2.34.50.20200629 assertion fail X/src/bfd/elf64-mmix.c:2845
./ld-new: tmpdir/undef-2.o:(.text+0x0): undefined reference to `undefd'>, expected: <\A[^\n\r]*undefined reference to `undefd'\Z>
FAIL: ld-mmix/undef-2

Gone with the fix of course, leaving just the intended "undefined
reference" like.

I'm not going to add anchors manually for all the "error:" strings in
the test-suite, not even in the mmix parts.  Sorry, but I'll just do
it for *these* specific undefined-reference tests.

Just a thought: maybe the run_dump_test "error:" string should
*automatically* get anchor marks prepended and appended for a single
line match as in the patch, "\A[^\n\r]*" prepended and \Z appended
unless either anchor mark or \r or \n is present in the regexp?

Committed.

bfd:
	* elf64-mmix.c (mmix_elf_relax_section): Improve accounting for
	R_MMIX_PUSHJ_STUBBABLE relocs against undefined symbols.

ld/testsuite:
	* testsuite/ld-mmix/undef-1.d, testsuite/ld-mmix/undef-1m.d,
	testsuite/ld-mmix/undef-2.d, testsuite/ld-mmix/undef-2m.d: Add
	start- and end-anchors to error-string to match just a
	single-line error-message.
2020-07-15 06:22:28 +02:00
bfd mmix bfd: fix bfd_assert for R_MMIX_PUSHJ_STUBBABLE against undef'd symbol 2020-07-15 06:22:28 +02:00
binutils arc: Detect usage of illegal double register pairs 2020-07-14 14:51:15 +03:00
config Add markers for binutils 2.35 branch 2020-07-04 10:16:22 +01:00
contrib
cpu Add markers for binutils 2.35 branch 2020-07-04 10:16:22 +01:00
elfcpp Add markers for binutils 2.35 branch 2020-07-04 10:16:22 +01:00
etc
gas x86-64: Zero-extend lower 32 bits displacement to 64 bits 2020-07-14 09:58:07 -07:00
gdb gdb/testsuite/lib/dwarf.exp: fix addr_size parameter comments 2020-07-14 23:18:30 -04:00
gdbserver gdbserver: fix memory leak when handling qsupported packet 2020-07-13 22:27:01 -04:00
gdbsupport Do not define basic_string_view::to_string 2020-06-30 07:53:03 -06:00
gnulib
gold Commit: Fix GOLD testsuite failures for 2.35 branch. 2020-07-08 11:08:05 +01:00
gprof Update Turkish translation in the gprof sub-directory 2020-07-09 14:25:11 +01:00
include x86: Support GNU_PROPERTY_X86_FEATURE_2_TMM 2020-07-11 04:04:20 -07:00
intl
ld mmix bfd: fix bfd_assert for R_MMIX_PUSHJ_STUBBABLE against undef'd symbol 2020-07-15 06:22:28 +02:00
libctf Add markers for binutils 2.35 branch 2020-07-04 10:16:22 +01:00
libdecnumber
libiberty Sync config, include and libiberty with GCC 2020-06-24 16:52:48 -07:00
opcodes x86-64: Zero-extend lower 32 bits displacement to 64 bits 2020-07-14 09:58:07 -07:00
readline Update readline/README to mention patchlevel 2020-06-30 15:17:07 -06:00
sim sim/igen: Fix linker error with -fno-common 2020-07-03 21:03:47 +02:00
texinfo
zlib
.cvsignore
.gitattributes
.gitignore
ar-lib
ChangeLog Add markers for binutils 2.35 branch 2020-07-04 10:16:22 +01:00
compile
config-ml.in
config.guess
config.rpath
config.sub
configure
configure.ac
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.LIBGLOSS
COPYING.NEWLIB
depcomp
djunpack.bat
install-sh
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS
Makefile.def
Makefile.in
Makefile.tpl
makefile.vms
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
README-maintainer-mode
setup.com
src-release.sh
symlink-tree
test-driver
ylwrap

		   README for GNU development tools

This directory contains various GNU compilers, assemblers, linkers, 
debuggers, etc., plus their support routines, definitions, and documentation.

If you are receiving this as part of a GDB release, see the file gdb/README.
If with a binutils release, see binutils/README;  if with a libg++ release,
see libg++/README, etc.  That'll give you info about this
package -- supported targets, how to use it, how to report bugs, etc.

It is now possible to automatically configure and build a variety of
tools with one command.  To build all of the tools contained herein,
run the ``configure'' script here, e.g.:

	./configure 
	make

To install them (by default in /usr/local/bin, /usr/local/lib, etc),
then do:
	make install

(If the configure script can't determine your type of computer, give it
the name as an argument, for instance ``./configure sun4''.  You can
use the script ``config.sub'' to test whether a name is recognized; if
it is, config.sub translates it to a triplet specifying CPU, vendor,
and OS.)

If you have more than one compiler on your system, it is often best to
explicitly set CC in the environment before running configure, and to
also set CC when running make.  For example (assuming sh/bash/ksh):

	CC=gcc ./configure
	make

A similar example using csh:

	setenv CC gcc
	./configure
	make

Much of the code and documentation enclosed is copyright by
the Free Software Foundation, Inc.  See the file COPYING or
COPYING.LIB in the various directories, for a description of the
GNU General Public License terms under which you can copy the files.

REPORTING BUGS: Again, see gdb/README, binutils/README, etc., for info
on where and how to report problems.