[Bug 196407] New: kernel modules fail on arm after r276047

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Dec 31 22:43:36 UTC 2014


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 at FreeBSD.org
          Reporter: ian at 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.


More information about the freebsd-arm mailing list