|
Message-ID: <1360568420.23424.521.camel@eris.loria.fr>
Date: Mon, 11 Feb 2013 08:40:20 +0100
From: Jens Gustedt <jens.gustedt@...ia.fr>
To: musl@...ts.openwall.com
Subject: Re: [PATCH 2/3] Have different definitions of
__pthread_tsd_main agree in size
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 ::
Download attachment "signature.asc" of type "application/pgp-signature" (199 bytes)
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.