termux / termux/termux-exec-package

Remove all shared library dependencies to support running in both Bionic and glibc

Open
#37 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
265
Forks
87
PR merge metrics
No merged PRs in 30d

Description

Currently using termux-exec as LD_PRELOAD causes things to fail if loading a glibc-based executable with a bionic-based termux-exec preload or viceversa a bionic-based executable with a glibc-based termux-exec preload.

This makes it impossible, for instance, to run, from a glibc-based program, a script using "#!/usr/bin/env node" where node uses bionic, because to run it LD_PRELOAD has to be set to a glibc-based termux-exec, but that will cause a failure to run node.

The solution is to make termux-exec loadable in both glibc and bionic based programs, which should be achievable by not depending on any libc and instead doing raw Linux system calls in termux-exec, and exporting both Bionic-flavored and glibc-flavored exec* functions if they differ.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the termux-exec implementation and its build configuration, then inspect which shared-library and libc dependencies it currently uses. Verify how the exported exec* functions differ between Bionic and glibc. Done means termux-exec can be preloaded by both Bionic- and glibc-based programs without loading failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.