Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Aug 2016 20:41:30 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org>
Subject:   Re: kernel using gcc-5.3 fails to boot right
Message-ID:  <CANCZdfrbYpYvN-cE2Ww5Kgami-e4Ag-ecPj_NjcPaEw=c3yeXg@mail.gmail.com>
In-Reply-To: <CAJ-VmonrT5xwaNQXVyZmK7t=%2BL3VE94xkNZvSSKZC=2PeV0DzQ@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>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Aug 17, 2016 at 8:29 PM, Adrian Chadd <adrian@freebsd.org> wrote:
> thanks to warner, I went looking at relocation tables.
>
> It stems from how we're doing LO16/HI16 - we expect HI first, then LO
> - then we update where_hi16. This .. doesn't work in the new world.
>
> eg:
>
> 0000bf9c R_MIPS_HI16       ctl3_lock
> 0000bfa0 R_MIPS_LO16       ctl3_lock
> 0000bfa8 R_MIPS_HI16       M_IPFW
> 0000bfac R_MIPS_LO16       M_IPFW
> 0000bfb8 R_MIPS_LO16       .bss
> 0000bfa4 R_MIPS_HI16       __mtx_unlock_flags
> 0000bfcc R_MIPS_LO16       __mtx_unlock_flags

A grep suggests we implement them for efl_machdep.c:

sys/mips/mips/elf_machdep.c: case R_MIPS_HI16: /* ((AHL + S) -
((short)(AHL + S)) >> 16 */
sys/mips/mips/elf_machdep.c: case R_MIPS_LO16: /* AHL + S */

Might see if you can debug fro there.

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfrbYpYvN-cE2Ww5Kgami-e4Ag-ecPj_NjcPaEw=c3yeXg>