Date: Fri, 19 Aug 2016 18:06:09 -0700 From: Adrian Chadd <adrian@freebsd.org> To: Warner Losh <imp@bsdimp.com> Cc: "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org> Subject: Re: kernel using gcc-5.3 fails to boot right Message-ID: <CAJ-VmokLVhgjtJVkB0NMCkAnWxLuC5Gy3dgQMBUVL8238FiLuA@mail.gmail.com> In-Reply-To: <CAJ-Vmon-BNY7W3gvvn5LNnz4GXqYk5WMi6fqJ=-TrJ48y%2BNjZg@mail.gmail.com> References: <CAJ-VmomVS_fmYo2pvTm85x9tqfRnbcggWW9NLa28BJpfjaFozg@mail.gmail.com> <CAJ-Vmon19GF6N-90avR3%2BPeXkSC=BkNt7Cy2CiVY%2BbwFN5iuMQ@mail.gmail.com> <CAJ-Vmo=DAgC7x8FECWu_ne-usU4jdCyojFL2HuAJAFj8hmasMA@mail.gmail.com> <CAJ-Vmon6vKJUb8ZfRZv_v%2BphekH0TsW6Vpia_B_sg2k76wQ6PQ@mail.gmail.com> <CAJ-VmonXi4Ri3KGq1J=ACLHn89tQme6kLcmBcn_8R8FquVu61Q@mail.gmail.com> <CAJ-VmonrT5xwaNQXVyZmK7t=%2BL3VE94xkNZvSSKZC=2PeV0DzQ@mail.gmail.com> <CANCZdfrbYpYvN-cE2Ww5Kgami-e4Ag-ecPj_NjcPaEw=c3yeXg@mail.gmail.com> <CAJ-Vmon-BNY7W3gvvn5LNnz4GXqYk5WMi6fqJ=-TrJ48y%2BNjZg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[snip] http://people.freebsd.org/~adrian/mips/20160819-mips-elf-reloc-gcc-5.3-3.diff This has the debugging output removed and includes the relevant bits from the current "authoritative" (as far as I'm aware) documentation on what MIPS relocations are doing, including the GNU "extensions". I say extensions because binutils says this: /* The combined value is the sum of the HI16 addend, left-shifted by sixteen bits, and the LO16 addend, sign extended. (Usually, the code does a `lui' of the HI16 value, and then an `addiu' of the LO16 value.) Scan ahead to find a matching LO16 relocation. According to the MIPS ELF ABI, the R_MIPS_LO16 relocation must be immediately following. However, for the IRIX6 ABI, the next relocation may be a composed relocation consisting of several relocations for the same address. In that case, the R_MIPS_LO16 relocation may occur as one of these. We permit a similar extension in general, as that is useful for GCC. In some cases GCC dead code elimination removes the LO16 but keeps the corresponding HI16. This is strictly speaking a violation of the ABI but not immediately harmful. */ ... -adrian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmokLVhgjtJVkB0NMCkAnWxLuC5Gy3dgQMBUVL8238FiLuA>