2012/10/24 Jonathan Nieder <jrnie...@gmail.com>:
> Thanks.  Indeed, ideally fakechroot's execve should look up the
> interpreter filename from the ELF .interp section, map it according to
> the faked chroot, and set argv[0].  The hard part is the ELF parsing.

It doesn't work correctly:

1. The glibc dynamic loader can't change argv[0] to other value than
the file name. It means that some apps are broken, ie. busybox. See
https://sourceware.org/bugzilla/show_bug.cgi?id=16124

2. Using dynamic loader directly from command line is possible but the
loader is less stable and coredumps sometimes.

You can test it already, eg. calling

FAKECHROOT_ELFLOADER=/lib64/ld-linux-x86-64.so.2

from test directory of fakechroot source. You should expect that
debootstrap environment can be created but calling debian/rules or
even ./configure in such environment fails.

Perhaps there is another possibility: to change .interp section for
every binary file in fake chroot environment: off-line or even
on-the-fly. I think about similar to chrpath tool which can change
another ELF section.


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to