[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] argument length limt for scripts?
From: |
Thomas Preud'homme |
Subject: |
Re: [Tinycc-devel] argument length limt for scripts? |
Date: |
Wed, 12 Jun 2013 10:46:50 +0200 |
User-agent: |
KMail/1.13.7 (Linux/3.2.0-4-amd64; KDE/4.8.4; x86_64; ; ) |
Le mardi 11 juin 2013 21:12:15, Stephan Beal a écrit :
> On Tue, Jun 11, 2013 at 8:41 PM, Stevie G. Messervey
<address@hidden>wrote:
> > #!/usr/local/bin/tcc -run -Iinclude -Llib -lccgi -luuid -lgmp -lcrypt
> > -lsqlite3 -lmagic -lgd -lcurl -lquickmail -lgif -lfoo -lbar
> >
> > Take note the space between -lfoo and -lbar; if there is only a single
> > space between
> > -lfoo and -lbar, tcc complains it cannot find -lb.
>
> You're hitting a limit of the shell. You can work around it by using a
> shorter path to tcc, but that's of very limited use.
Not a shell limit. The shell is not involved here. The kernel reads the elf
interpreter, sees the shebang and call the interpreter specified in the shebang
directly. There is a limit in the kernel though:
/* sizeof(linux_binprm->buf) */
#define BINPRM_BUF_SIZE 128
Cf include/uapi/linux/binfmts.h for this definition and fs/binfmt_script.c for
its usage.
With the space the truncation is done just after the hyphen in -lbar. Hence
tcc is waiting for input on STDIN. Without extra space it truncates after the
'b' in -lbar, hence the error that it cannot find -lb.
Best regards,
Thomas
signature.asc
Description: This is a digitally signed message part.
- [Tinycc-devel] argument length limt for scripts?, Stevie G. Messervey, 2013/06/11
- Re: [Tinycc-devel] argument length limt for scripts?, Stephan Beal, 2013/06/11
- Re: [Tinycc-devel] argument length limt for scripts?, Stephan Beal, 2013/06/11
- Re: [Tinycc-devel] argument length limt for scripts?,
Thomas Preud'homme <=
- Re: [Tinycc-devel] argument length limt for scripts?, Stephan Beal, 2013/06/12
- Re: [Tinycc-devel] argument length limt for scripts?, Stevie G. Messervey, 2013/06/13
- Re: [Tinycc-devel] argument length limt for scripts?, Stephan Beal, 2013/06/13
- Re: [Tinycc-devel] argument length limt for scripts?, David Mertens, 2013/06/13
- Re: [Tinycc-devel] argument length limt for scripts?, Stephan Beal, 2013/06/13
- Re: [Tinycc-devel] argument length limt for scripts?, Stevie G. Messervey, 2013/06/13
- Re: [Tinycc-devel] argument length limt for scripts?, David Mertens, 2013/06/13