Skip to content

libdl replacement that allows to load library from static binary

Notifications You must be signed in to change notification settings

mittorn/custom-linker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Sep 5, 2018
02ab470 · Sep 5, 2018

History

60 Commits
Apr 4, 2013
Apr 4, 2013
Sep 1, 2018
Sep 1, 2018
Aug 24, 2018
Aug 24, 2018
Sep 1, 2018
Sep 1, 2018
Aug 31, 2018
Aug 31, 2018
Aug 19, 2018
Sep 1, 2018
Aug 24, 2018
Aug 24, 2018
Aug 8, 2016
Apr 4, 2013
Aug 19, 2018
Apr 4, 2013
Sep 1, 2018
Aug 24, 2018
Sep 5, 2018
Apr 4, 2013
Aug 19, 2018
Aug 31, 2018

Repository files navigation

Custom bionic-based linker

What works

  • Loading some dynamic libraries from static binary linked with same libc
  • Loading some dynamic binaries and hook it to host libc
  • Hooking exported symbols
  • Generating stubs for undefined symbols
  • Ignoring missing libraries
  • Ignoring library versions

What does not work

  • Loading glibc itself (use linked libc instead)
  • Loading static binaries (is it possible?)
  • Complex multi-thread libraries and applications

Useful scripts

  • Use ./gen.sh [/path/to/lib1] [path/to/lib2] to generate wrappers to host libraries. syms.txt will contain accumulated symbols list

  • Use build.sh to build libdl-compatible loader

  • Use build-main.sh to build linker-like loader

Enviroment variables

  • HYBRIS_LINKER_DEBUG=N

  • CUSTOM_LD_PRELOAD

  • CUSTOM_LD_LIBRARY_PATH

  • Other libhybris envs

About

libdl replacement that allows to load library from static binary

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published