Android: Unknown symbol _GLOBAL_OFFSET_TABLE_

[ 1525.047424] bcm4329: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)

I received this error after compiling a custom Android kernel and modules using the arm-linux-androideabi-4.4.3 prebuilt toolchain.

I used arm-linux-androideabi-4.4.3 instead of arm-eabi-4.4.0 because arm-eabi-4.4.0 did not work for me on 64bit ubuntu ( * shrug * )

To fix this and to get my kernel modules loading I opened the Makefile within my kernel source folder and changed this:

MODFLAGS        = -DMODULE -march=armv7-a -mfpu=vfpv3 -ftree-vectorize

to this:

MODFLAGS        = -DMODULE -march=armv7-a -mfpu=vfpv3 -ftree-vectorize -fno-pic

Then re-built the kernel modules:

make clean
make modules

and copied my new module back over to android, away she goes!

————————-

if you cannot find MODFLAGS in the Makefile then look for:

CFLAGS_MODULE   =

and change it to

CFLAGS_MODULE   = -fno-pic

Leave a Reply

Your email address will not be published.