This is the mail archive of the
mailing list for the binutils project.
[committed 0/4] MIPS/BFD: LA25 stub generation fixes
- From: "Maciej W. Rozycki" <macro at imgtec dot com>
- To: <binutils at sourceware dot org>
- Cc: Faraz Shahbazker <faraz dot shahbazker at imgtec dot com>
- Date: Wed, 10 Aug 2016 22:32:43 +0100
- Subject: [committed 0/4] MIPS/BFD: LA25 stub generation fixes
- Authentication-results: sourceware.org; auth=none
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
.../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: *** [.../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
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