From mboxrd@z Thu Jan 1 00:00:00 1970 From: Detlev Zundel Date: Tue, 16 Nov 2010 15:58:48 +0100 Subject: [U-Boot] [PATCH v4] Switch from archive libraries to partial linking In-Reply-To: <201011150739.57541.vapier@gentoo.org> (Mike Frysinger's message of "Mon, 15 Nov 2010 07:39:56 -0500") References: <1289253872-16891-1-git-send-email-sebastien.carlier@gmail.com> <20101115105407.2A24714EA7E@gemini.denx.de> <20101115121303.GD26767@safe.home.local> <201011150739.57541.vapier@gentoo.org> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, > On Monday, November 15, 2010 07:13:03 Sebastien Carlier wrote: >> On 2010-11-15 11:54:07, Wolfgang Denk wrote: >> > I notice that the patch affects the size of the resulting U-Boot >> > images. >> > >> > For example: >> > >> > Configuring for MiniFAP - Board: TQM5200, Options: MINIFAP >> > >> > text data bss dec hex filename >> > >> > 358144 35208 303248 696600 aa118 ./u-boot before >> > 361340 35824 303332 700496 ab050 ./u-boot after >> > >> > ------------------------------- >> > >> > Delta: +3896 Bytes >> > >> > For other boards it's only a few hundred bytes, but why do we see >> > such big increase here? >> >> In this case, these libraries contribute 3260 bytes in unused >> definitions: >> >> In each case, a whole object file contains exactly the unused >> definitions, and could be excluded in the respective Makefile. > > or just use -ffunction-sections/-fdata-sections/-Wl,--gc-sections and dont > worry about it. which is what we do for the Blackfin port. If you do worry, you can use the "--gc-sections" together with "--print-gc-sections" to actually find out what is unused[1]. Cheers Detlev [1] http://article.gmane.org/gmane.comp.boot-loaders.u-boot/84971/ -- "Oh, didn't you know, the Lord did the original programming of the universe in COBOL." - "That's why the world is the evil work of Satan. A true divine being would have used Scheme." - "And, if so, Jesus would have been crucified on a big lambda symbol." -- K. Chafin, K. Schilling & D. Hanley, on comp.lang.lisp -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de