Binutils 2.17 fails `make check` on mipsel-linux-gnu

David Daney ddaney@avtrex.com
Mon Feb 26 21:38:00 GMT 2007


Stuart Longland wrote:
> Andreas Schwab wrote:
>> Stuart Longland <redhatter@gentoo.org> writes:
>>
>>> Hi All,
>>> 	I'm in the process of testing some packages on a little-endian MIPS
>>> machine (Lemote Loongson), and so far, have ran into a few problems with
>>> various packages -- notably Mozilla Firefox and X.org.
>>>
>>> 	Under both Debian/MIPS Etch and Gentoo/MIPS, with vanilla binutils
>>> sources, the build fails at the `make test` step with the following errors:
>> I don't see the failures with a cross-configured binutils.  You'll have to
>> inspect the dejagnu log files for clues.
>>
>> (The test "run stripped executable" is of course skipped in a cross
>> configuration, but all others are self-contained.)
> 
> Hi Andreas,
> 
> 	I'm not completely sure where dejagnu places its logfiles.  That said,
> I discovered I could get verbose output by specifying RUNTESTFLAGS=-v
> whilst running `make check`.
> 
> 	I have a sneaking suspicion, that the tests in question, are not run
> when binutils is cross-compiled.  I at first, suspected the CPU I was
> using (Godson2E is more-or-less a MIPS3 subset) might be the cause,
> however I've since ran the exact same tests on a Cobalt Qube2 (RM5231
> CPU) with the exact same results.  The logfiles for both are attached
> (I've done some string replacement, changing the build directory and
> source directory to BUILDDIR and SRCDIR respectively, for easy
> comparison) -- along with the diff between these two files.  The diff is
> largely whitespace differences.
> 
> The failures that actually show some useful output, are below:
>> gcc -LBUILDDIR/./ld -BBUILDDIR/ld/tmpdir/ld/ -L/usr/mipsel-unknown-linux-gnu/lib -L/usr/local/lib -L/lib -L/usr/lib  -o tmpdir/vnp.so -shared  tmpdir/sh1np.o tmpdir/sh2np.o
>> tmpdir/sh1np.o: In function `visibility_checkfunptr':
>> SRCDIR/ld/testsuite/ld-elfvsb/sh1.c:216: undefined reference to `visibility'
>> tmpdir/sh1np.o: In function `visibility_funptr':
>> SRCDIR/ld/testsuite/ld-elfvsb/sh1.c:246: undefined reference to `visibility'
>> tmpdir/sh1np.o: In function `visibility_checkvarptr':
>> SRCDIR/ld/testsuite/ld-elfvsb/sh1.c:265: undefined reference to `visibility_var'
>> tmpdir/sh1np.o: In function `visibility_checkvar':
>> SRCDIR/ld/testsuite/ld-elfvsb/sh1.c:283: undefined reference to `visibility_var'
>> tmpdir/sh1np.o: In function `visibility_varptr':
>> SRCDIR/ld/testsuite/ld-elfvsb/sh1.c:304: undefined reference to `visibility_var'
>> tmpdir/sh1np.o: In function `visibility_varval':
>> SRCDIR/ld/testsuite/ld-elfvsb/sh1.c:315: undefined reference to `visibility_var'
>> tmpdir/sh1np.o: In function `visibility_check':
>> SRCDIR/ld/testsuite/ld-elfvsb/sh1.c:232: undefined reference to `visibility'
>> BUILDDIR/ld/tmpdir/ld/ld: tmpdir/vnp.so: hidden symbol `visibility_var' isn't defined
>> BUILDDIR/ld/tmpdir/ld/ld: final link failed: Nonrepresentable section on output
>> collect2: ld returned 1 exit status
>> gcc -LBUILDDIR/./ld -BBUILDDIR/ld/tmpdir/ld/ -L/usr/mipsel-unknown-linux-gnu/lib -L/usr/local/lib -L/lib -L/usr/lib  -o tmpdir/vnp.so -shared -T SRCDIR/ld/testsuite/ld-elfvsb/elf-offset.ld tmpdir/sh1np.o tmpdir/sh2np.o
>> BUILDDIR/ld/tmpdir/ld/ld: tmpdir/vnp.so: The first section in the PT_DYNAMIC segment is not the .dynamic section
>> BUILDDIR/ld/tmpdir/ld/ld: final link failed: Bad value
>> collect2: ld returned 1 exit status
>> FAIL: visibility (hidden_undef) (non PIC, load offset)
> 
>> gcc  -BBUILDDIR/ld/tmpdir/gas/ -ISRCDIR/ld/testsuite/ld-elfvsb -g -O2   -LBUILDDIR/./ld -g -g -O2  -DHIDDEN_WEAK_TEST -c SRCDIR/ld/testsuite/ld-elfvsb/sh2.c -o tmpdir/sh2np.o
>> gcc -LBUILDDIR/./ld -BBUILDDIR/ld/tmpdir/ld/ -L/usr/mipsel-unknown-linux-gnu/lib -L/usr/local/lib -L/lib -L/usr/lib  -o tmpdir/vnp.so -shared  tmpdir/sh1np.o tmpdir/sh2np.o
>> gcc -LBUILDDIR/./ld -BBUILDDIR/ld/tmpdir/ld/ -L/usr/mipsel-unknown-linux-gnu/lib -L/usr/local/lib -L/lib -L/usr/lib  -o tmpdir/vnp -Wl,-rpath,tmpdir tmpdir/mainnp.o tmpdir/vnp.so
>> tmpdir/vnp >tmpdir/vnp.out
>> child killed: illegal instruction
>> FAIL: visibility (hidden_weak) (non PIC)
> 
>> gcc -LBUILDDIR/./ld -BBUILDDIR/ld/tmpdir/ld/ -L/usr/mipsel-unknown-linux-gnu/lib -L/usr/local/lib -L/lib -L/usr/lib  -o tmpdir/vp -Wl,-rpath,tmpdir tmpdir/mainnp.o tmpdir/vp.so
>> tmpdir/vp >tmpdir/vp.out
>> child killed: illegal instruction
>> FAIL: visibility (hidden_weak)
> 
>> gcc -LBUILDDIR/./ld -BBUILDDIR/ld/tmpdir/ld/ -L/usr/mipsel-unknown-linux-gnu/lib -L/usr/local/lib -L/lib -L/usr/lib  -o tmpdir/vmpp -Wl,-rpath,tmpdir tmpdir/mainp.o tmpdir/vmpp.so
>> tmpdir/vmpp >tmpdir/vmpp.out
>> child killed: illegal instruction
>> FAIL: visibility (hidden_weak) (PIC main)
> 
>> gcc -LBUILDDIR/./ld -BBUILDDIR/ld/tmpdir/ld/ -L/usr/mipsel-unknown-linux-gnu/lib -L/usr/local/lib -L/lib -L/usr/lib  -o tmpdir/vnp.so -shared -T SRCDIR/ld/testsuite/ld-elfvsb/elf-offset.ld tmpdir/sh1np.o tmpdir/sh2np.o
>> BUILDDIR/ld/tmpdir/ld/ld: tmpdir/vnp.so: The first section in the PT_DYNAMIC segment is not the .dynamic section
>> BUILDDIR/ld/tmpdir/ld/ld: final link failed: Bad value
>> collect2: ld returned 1 exit status
>> FAIL: visibility (protected_undef) (non PIC, load offset)
> 
>> BUILDDIR/ld/ld-new -m elf32ltsmip -o tmpdir/cross3-partial.o -r tmpdir/cross1.o tmpdir/cross4.o
>> BUILDDIR/ld/ld-new  -o tmpdir/cross3 -T SRCDIR/ld/testsuite/ld-scripts/cross3.t tmpdir/cross3-partial.o tmpdir/cross2.o
>> child killed: segmentation violation
>> FAIL: NOCROSSREFS 3
> 

The testsuite results are in files with suffixes .log and .sum

This is what I get for my mipsel-linux system with 2.17:
# egrep -e '^FAIL' ld/ld.sum
FAIL: bootstrap with --static
FAIL: vers24a
FAIL: vers24b
FAIL: vers24c
FAIL: visibility (hidden_undef) (non PIC, load offset)
FAIL: visibility (hidden_weak) (non PIC)
FAIL: visibility (hidden_weak)
FAIL: visibility (hidden_weak) (PIC main, non PIC so)
FAIL: visibility (hidden_weak) (PIC main)
FAIL: visibility (protected_undef) (non PIC, load offset)
FAIL: visibility (protected_weak) (non PIC)
FAIL: visibility (protected_weak)
FAIL: visibility (protected_weak) (PIC main, non PIC so)
FAIL: visibility (protected_weak) (PIC main)
FAIL: NOCROSSREFS 3

I should note that this linker works fine for bootstrapping gcc/g++/gcj.

The results for gas/testsuite/gas.sum and binutils/binutils.sum show no 
failures for me.



More information about the Binutils mailing list