Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [BUG] With --disable-dynamic-nss, not all functions calls are protected



On Fri, Sep 17, 2021 at 3:45 PM Axel Beckert <abe@xxxxxxxxxxxxxxx> wrote:
>
> Hi,
>
> On Fri, Sep 17, 2021 at 05:45:37PM +0900, Jun T wrote:
> > > I guess the problem is getlogin() called from createparamtable().
> >
> > Yes, this can be confirmed by statically linking a test program
> > (just call getlogin() and exit). I _hope_ there are no other places
> > where NSS-functions are indirectly called.
> >
> > Revised the Axel's patch (also attached a file):
>
> Yay, this patch works for me! zsh-static built on Debian Unstable
> (glibc 2.32) no more segfaults when copied to and executed on Debian
> 11 Bullseye (glibc 2.31) for me.

If your goal is to create a binary that runs on any Linux x64 box
regardless of libc runtimes that may or may not be available on it,
link against musl libc. Static linking against glibc is a lost cause.
Zsh can link against musl libc out of the box. This is how I build
mine.

Roman.




Messages sorted by: Reverse Date, Date, Thread, Author