mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com, Ondrej Jirman <megous@megous.com>
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	[thread overview]
Message-ID: <20181121152217.GO21289@port70.net> (raw)
In-Reply-To: <20181121150903.GN21289@port70.net>

* Szabolcs Nagy <nsz@port70.net> [2018-11-21 16:09:04 +0100]:

> * megous@megous.com <megous@megous.com> [2018-11-21 15:51:50 +0100]:
> > From: Ondrej Jirman <megous@megous.com>
> > 
> > __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.


  reply	other threads:[~2018-11-21 15:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-21 14:51 megous
2018-11-21 15:09 ` Szabolcs Nagy
2018-11-21 15:22   ` Szabolcs Nagy [this message]
2018-11-21 16:10     ` Rich Felker
2018-11-21 16:15     ` Ondřej Jirman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181121152217.GO21289@port70.net \
    --to=nsz@port70.net \
    --cc=megous@megous.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).