Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Dec 2014 22:43:36 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-arm@FreeBSD.org
Subject:   [Bug 196407] New: kernel modules fail on arm after r276047
Message-ID:  <bug-196407-7@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196407

            Bug ID: 196407
           Summary: kernel modules fail on arm after r276047
           Product: Base System
           Version: 11.0-CURRENT
          Hardware: arm
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: arm
          Assignee: freebsd-arm@FreeBSD.org
          Reporter: ian@FreeBSD.org

r276047 added -march=armv7 to the default arm compile options.  Among other
things, this allows the compiler to generate movw/movt sequences to load a
constant into a register.  Using those instructions results in relocation types
R_ARM_MOVW_ABS_NC and R_ARM_MOVT_ABS being emitted, and when those types appear
in a .ko module they are not being handled correctly by ld.  The lower 16 bits
of the relocated value are correct, but the upper 16 bits (used in the movt
instruction) are always zero.  This leads to a variety of wild-pointer crashes
in the loaded module.

This problem may affect shared libraries in userland too, but we don't
currently add the -march=armv7 flag there, it's used only for kernel and module
builds now.

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-196407-7>