mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Jens Gustedt <jens.gustedt@inria.fr>
To: musl@lists.openwall.com
Subject: Re: [PATCH 2/3] Have different definitions of __pthread_tsd_main agree in size
Date: Mon, 11 Feb 2013 08:40:20 +0100	[thread overview]
Message-ID: <1360568420.23424.521.camel@eris.loria.fr> (raw)
In-Reply-To: <20130211003158.GP20323@brightrain.aerifal.cx>

[-- Attachment #1: Type: text/plain, Size: 3908 bytes --]

Am Sonntag, den 10.02.2013, 19:31 -0500 schrieb Rich Felker:
> Nope, that defeats the whole purpose, which is to avoid wasting space
> when it's not needed. This warning is bogus. There's no reason a weak
> symbol can't have different size than a strong one that optionally
> replaces it.

Hm, about wasting space I am not very convinced, but maybe I didn't
understand well enough why you need all these aliases after all, and
why you can't refer to the real symbol directly.

In any case, this is perhaps better done with the tool chain. I have
good experience by having

  -fdata-sections -ffunction-sections

for the compiler options and then

   -Wl, --gc-sections

for the link. In the case of musl, this removes exactly all the dummy
sections :) plus two others (pad and sccp), see below.

Also I observed that the .so when compiled with -O3 and -flto is
smaller than with the default build options.

Jens

/usr/bin/ld: Removing unused section '.rodata.dummy_file.17696.2847' in file '/tmp/ccKGiYdU.ltrans0.ltrans.o'
/usr/bin/ld: Removing unused section '.rodata.dummy.18033.2845' in file '/tmp/ccKGiYdU.ltrans0.ltrans.o'
/usr/bin/ld: Removing unused section '.rodata.dummy.18516.2843' in file '/tmp/ccKGiYdU.ltrans0.ltrans.o'
/usr/bin/ld: Removing unused section '.rodata.dummy_file.24416.2840' in file '/tmp/ccKGiYdU.ltrans0.ltrans.o'
/usr/bin/ld: Removing unused section '.rodata.dummy.24420.2836' in file '/tmp/ccKGiYdU.ltrans0.ltrans.o'
/usr/bin/ld: Removing unused section '.bss.dummy.25545.2834' in file '/tmp/ccKGiYdU.ltrans0.ltrans.o'
/usr/bin/ld: Removing unused section '.text.pad.21403' in file '/tmp/ccKGiYdU.ltrans2.ltrans.o'
/usr/bin/ld: Removing unused section '.text.dummy.16099.2724' in file '/tmp/ccKGiYdU.ltrans8.ltrans.o'
/usr/bin/ld: Removing unused section '.text.dummy_0.14753.2904' in file '/tmp/ccKGiYdU.ltrans8.ltrans.o'
/usr/bin/ld: Removing unused section '.text.dummy_0.14278.2989' in file '/tmp/ccKGiYdU.ltrans8.ltrans.o'
/usr/bin/ld: Removing unused section '.text.dummy.14134.2991' in file '/tmp/ccKGiYdU.ltrans8.ltrans.o'
/usr/bin/ld: Removing unused section '.text.dummy0.11727.2430' in file '/tmp/ccKGiYdU.ltrans13.ltrans.o'
/usr/bin/ld: Removing unused section '.text.dummy1.11721.2433' in file '/tmp/ccKGiYdU.ltrans13.ltrans.o'
/usr/bin/ld: Removing unused section '.text.dummy0.11661.2464' in file '/tmp/ccKGiYdU.ltrans13.ltrans.o'
/usr/bin/ld: Removing unused section '.text.dummy1.11656.2467' in file '/tmp/ccKGiYdU.ltrans13.ltrans.o'
/usr/bin/ld: Removing unused section '.text.dummy_0.20439.2558' in file '/tmp/ccKGiYdU.ltrans17.ltrans.o'
/usr/bin/ld: Removing unused section '.text.dummy_0.24290.2666' in file '/tmp/ccKGiYdU.ltrans20.ltrans.o'
/usr/bin/ld: Removing unused section '.text.dummy.23638.2864' in file '/tmp/ccKGiYdU.ltrans20.ltrans.o'
/usr/bin/ld: Removing unused section '.text.dummy.23456.2867' in file '/tmp/ccKGiYdU.ltrans20.ltrans.o'
/usr/bin/ld: Removing unused section '.text.sccp.23444.2870' in file '/tmp/ccKGiYdU.ltrans20.ltrans.o'
/usr/bin/ld: Removing unused section '.text.dummy_1.26947.2522' in file '/tmp/ccKGiYdU.ltrans22.ltrans.o'
/usr/bin/ld: Removing unused section '.text.dummy.5449.2666' in file '/tmp/ccKGiYdU.ltrans28.ltrans.o'
/usr/bin/ld: Removing unused section '.text.dummy.5419.2669' in file '/tmp/ccKGiYdU.ltrans28.ltrans.o'
/usr/bin/ld: Removing unused section '.text.dummy.5020.2796' in file '/tmp/ccKGiYdU.ltrans28.ltrans.o'
/usr/bin/ld: Removing unused section '.text.dummy.2522.3034' in file '/tmp/ccKGiYdU.ltrans28.ltrans.o'


-- 
:: INRIA Nancy Grand Est :: http://www.loria.fr/~gustedt/   ::
:: AlGorille ::::::::::::::: office Nancy : +33 383593090   ::
:: ICube :::::::::::::: office Strasbourg : +33 368854536   ::
:: ::::::::::::::::::::::::::: gsm France : +33 651400183   ::
:: :::::::::::::::::::: gsm international : +49 15737185122 ::



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2013-02-11  7:40 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-10 22:32 Jens Gustedt
2013-02-11  0:31 ` Rich Felker
2013-02-11  7:40   ` Jens Gustedt [this message]
2013-02-11 11:22     ` Szabolcs Nagy
2013-02-11 12:08       ` Szabolcs Nagy
2013-02-11 12:51         ` Jens Gustedt
2013-02-11 13:09           ` Szabolcs Nagy
2013-02-11 13:38             ` Jens Gustedt
2013-02-11 13:44               ` Rich Felker
2013-02-11 14:07                 ` Jens Gustedt
2013-02-11 14:39                   ` Szabolcs Nagy
2013-02-11 16:30                     ` Jens Gustedt
2013-02-11 17:08                       ` Szabolcs Nagy
2013-02-11 17:21                         ` Jens Gustedt
2013-02-11 21:49                           ` Rich Felker
2013-02-11 21:47                   ` Rich Felker
2013-02-11 21:50                     ` Rich Felker

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=1360568420.23424.521.camel@eris.loria.fr \
    --to=jens.gustedt@inria.fr \
    --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).