Build environments often invoke commands with huge argument lists. For native builds, the limit on current linux (>2.6.33) is 1/4th of the stack size, typically 2MByte, so this works fine.
For chroots with qemu emulation, the limit currently is set by MAX_ARG_PAGES, i.e. 32*4kByte. Without the patch, the following fails: /usr/bin/qemu-arm -L /var/tmp/build-root/ARM-armv6l/ /var/tmp/build-root/ARM-armv6l/usr/bin/echo `seq 1 314360` | md5sum /usr/bin/echo: Argument list too long With the patch, the output matches the native invocation, argument size is only limited by host stack size. See also: https://bugs.launchpad.net/ubuntu/+source/qemu-linaro/+bug/1036645 https://sourceware.org/bugzilla/show_bug.cgi?id=17169 https://lists.gnu.org/archive/html/bug-binutils/2014-07/msg00096.html Stefan Brüns (1): linux-user: remove MAX_ARG_PAGES, allow dynamic growth of env/argv space linux-user/elfload.c | 29 ++++++++++++++++++----------- linux-user/linuxload.c | 7 ++++--- linux-user/qemu.h | 11 ++--------- linux-user/syscall.c | 4 ++++ 4 files changed, 28 insertions(+), 23 deletions(-) -- 2.1.4