[PATCH] [GAS] Fix tight loop on recursively-defined symbols

Alan Modra amodra@gmail.com
Sun May 17 23:04:45 GMT 2020


On Mon, May 18, 2020 at 01:22:51AM +0300, Thomas Backlund wrote:
> This patch broke binutils on aarch64 for us...

Ouch.

> For example building binutils-2.34 with all fixes in the 2.34 branch makes
> it fail with:
> 
> make[2]: Leaving directory
> '/home/iurt/rpmbuild/BUILD/binutils-2.34/objs/intl'
> make[2]: Entering directory
> '/home/iurt/rpmbuild/BUILD/binutils-2.34/objs/zlib'
> aarch64-mageia-linux-gnu-gcc -DPACKAGE_NAME=\"zlib\"
> -DPACKAGE_TARNAME=\"zlib\" -DPACKAGE_VERSION=\"1.1.4\"
> -DPACKAGE_STRING=\"zlib\ 1.1.4\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\"
> -DPACKAGE=\"zlib\" -DVERSION=\"1.1.4\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
> -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1
> -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1
> -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1
> -DHAVE_SYS_PARAM_H=1 -DHAVE_GETPAGESIZE=1 -DHAVE_MMAP=1 -DHAVE_MEMCPY=1
> -DHAVE_STRERROR=1 -DHAVE_UNISTD_H=1 -I. -I../../zlib     -fPIC -O2 -g -pipe
> -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector
> --param=ssp-buffer-size=4 -fasynchronous-unwind-tables -c -o
> libz_a-adler32.o `test -f 'adler32.c' || echo '../../zlib/'`adler32.c
> {standard input}: Assembler messages:
> {standard input}: Error: invalid operands (*ABS* and *GAS `expr' section*
> sections) for `*' when setting `.LVU25'
> {standard input}: Error: can't resolve value for symbol `.LVU25'
> make[2]: *** [Makefile:603: libz_a-adler32.o] Error 1

I did do a binutils-2.34 regression test before committing the patch,
and have cross compilers installed.
aarch64-linux-gcc --version
aarch64-linux-gcc (GCC) 10.0.1 20200321 (experimental)

Not the latest though, and perhaps I'm compiling with different
options.  I'll try to recreate the problem today, but if you can send
me the .s file from the above libz_a-adler32 compile (or any other
failing compile) that would speed things up.

-- 
Alan Modra
Australia Development Lab, IBM


More information about the Binutils mailing list