[committed 0/4] MIPS/BFD: LA25 stub generation fixes
Maciej W. Rozycki
macro@imgtec.com
Wed Aug 10 21:33:00 GMT 2016
Hi,
A recent change to the MIPS/ELF BFD linker backend, commit 9d862524f6ae
("MIPS: Verify the ISA mode and alignment of branch and jump targets") has
caused a build regression in microMIPS glibc where the `zdump' tool fails
to link:
.../timezone/zdump.o: In function `yeartot':
.../timezone/zdump.c:758:(.text+0x62): Jump to a non-instruction-aligned address
.../timezone/zdump.c:758:(.text+0x76): Jump to a non-instruction-aligned address
.../timezone/zdump.c:768:(.text+0x112): Jump to a non-instruction-aligned address
.../timezone/zdump.c:774:(.text+0x1b8): Jump to a non-instruction-aligned address
.../timezone/zdump.c:774:(.text+0x1cc): Jump to a non-instruction-aligned address
collect2: error: ld returned 1 exit status
make[2]: *** [.../timezone/zdump] Error 1
This has been reported by Faraz and has been missed in the development of
the commit referred as we lack a test case for LA25 stub generation in
microMIPS code.
I have therefore adapted one of the existing test cases aimed at LA25
stubs in regular MIPS code. That test case triggered further 3 bugs, of
which 2 -- for the total of 3 -- are addressed in this small patch series.
The test case then follows as a separate 4th patch only as otherwise it
would initially have to fail, or alternatively accept incorrect output and
then get adjusted with each of the following fixes.
The 4th bug seems very complex to fix and is a missed optimisation rather
than a correctness issue, and then for a corner case only. I have
therefore decided not to address it at this time and filed PR ld/20453
instead, recording a KFAIL in the test suite.
See individual patch descriptions for the details of the problems
addressed.
Maciej
More information about the Binutils
mailing list