From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13467 Path: news.gmane.org!.POSTED!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: [RFC PATCH] Fix __libc_start_main prototype in [r]crt1.c to match the caller Date: Wed, 21 Nov 2018 16:22:17 +0100 Message-ID: <20181121152217.GO21289@port70.net> References: <20181121145150.15500-1-megous@megous.com> <20181121150903.GN21289@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1542813626 31570 195.159.176.226 (21 Nov 2018 15:20:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 21 Nov 2018 15:20:26 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) To: musl@lists.openwall.com, Ondrej Jirman Original-X-From: musl-return-13483-gllmg-musl=m.gmane.org@lists.openwall.com Wed Nov 21 16:20:22 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1gPUIf-00084q-3k for gllmg-musl@m.gmane.org; Wed, 21 Nov 2018 16:20:21 +0100 Original-Received: (qmail 1825 invoked by uid 550); 21 Nov 2018 15:22:30 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 1801 invoked from network); 21 Nov 2018 15:22:29 -0000 Mail-Followup-To: musl@lists.openwall.com, Ondrej Jirman Content-Disposition: inline In-Reply-To: <20181121150903.GN21289@port70.net> Xref: news.gmane.org gmane.linux.lib.musl.general:13467 Archived-At: * Szabolcs Nagy [2018-11-21 16:09:04 +0100]: > * megous@megous.com [2018-11-21 15:51:50 +0100]: > > From: Ondrej Jirman > > > > __libc_start_main function is not using the last three arguments. > > GCC in LTO mode complains about mismatch. > > fix it in the other way then. > > > - __libc_start_main(main, argc, argv, _init, _fini, 0); > > + __libc_start_main(main, argc, argv); > > you just completely broke everything there didnt you? > sorry the _init, _fini there is only needed for glibc compat (i.e. executable linked with musl crt1.o, but using glibc to run it, which should not be a common use case) > how will the _init/_fini code of executables with > DT_INIT, DT_FINI dynamic tags run? > > i think gcc still havent fixed weak object symbol alias > bugs with lto so e.g. you will get incorrect environ if > you lto link the libc. > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69271 these lto issues still apply.