kernel using gcc-5.3 fails to boot right

Warner Losh imp at bsdimp.com
Fri Aug 19 04:14:23 UTC 2016


On Wed, Aug 17, 2016 at 8:29 PM, Adrian Chadd <adrian at 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


More information about the freebsd-mips mailing list