Author: trasz Date: Sat Aug 15 17:02:23 2020 New Revision: 364258 URL: https://svnweb.freebsd.org/changeset/base/364258
Log: MFC r351783: Unbreak Linux binaries linked against new glibc, such as the ones from recent Ubuntu versions. Without it they segfault on startup. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/amd64/linux/linux_sysvec.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/linux/linux_sysvec.c ============================================================================== --- stable/12/sys/amd64/linux/linux_sysvec.c Sat Aug 15 16:48:58 2020 (r364257) +++ stable/12/sys/amd64/linux/linux_sysvec.c Sat Aug 15 17:02:23 2020 (r364258) @@ -357,6 +357,12 @@ linux_copyout_strings(struct image_params *imgp) */ vectp -= imgp->args->argc + 1 + imgp->args->envc + 1; + /* + * Starting with 2.24, glibc depends on a 16-byte stack alignment. + * One "long argc" will be prepended later. + */ + vectp = (char **)((((uintptr_t)vectp + 8) & ~0xF) - 8); + /* vectp also becomes our initial stack base. */ stack_base = (register_t *)vectp; _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"