Skip to content

For arm 32bit android build, the "__sync_synchronize" symbol is UNDEFINED in liblkl-hijack.so  #348

@mxi1

Description

@mxi1

Have you ever tried the ARM 32bit build with arm-linux-androideabi-gcc (4.9.x, 5.x, 6.x, whatever)? I am trying to make hijacking work on Android shell.

After the CROSS_PATH, CROSS_COMPILE and SYS_ROOT environmental variables are set, and some endian-related macro redefinitions are removed, the build process looks nice and the liblkl-hijack.so file is generated. Then, I pushed the file to one root-ed Android device, and setup the LD_PRELOAD=/blah/blah/liblkl-hijack.so to run the ip addr show-like commands.

Here, the issues show up with symbols cannot located. Actually, there're more than one UNDEFINED symbols like dpdk and vde-related symbols. I removed all the dpdk and vde-related code blocks because they don't exist on my root-ed android device. Then, the confusing __sync_synchronize comes up.

I searched via Google, and knew that this symbol is gcc-internal, and should not appear in symbol table of the dynamic library. I tried to remove the --nodefaultlibs option, and this symbol is not UDNEFINED, but the segment fault error will show up when hijack is working.

Has anyone met the similar issue on any ARM 32bit platforms? Please give me your hands for this. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions