-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 09/18/12 12:19, Marek Vasut wrote: > Dear Tom Rini, > >> On 09/18/12 11:33, Marek Vasut wrote: >>> Dear Scott Wood, >> >> [snip] >> >>>> I think I got some wires crossed and was thinking about >>>> printf/puts. We want those to be optimized away at compile >>>> time (not pointed to a stub at link time) on an SPL that has >>>> no output support, but once that's done the low level serial >>>> functions shouldn't be referenced anymore, right? >>> >>> But if you point them to stubs, that's OK. The compiler will GC >>> these useless stubs anyway. But wait, we're getting to LTO >>> here, right? >>> >>> So the safest bet really is macro in serial.h ? >> >> Due to the gcc bug I've mentioned before, yes. Dummy functions >> will, I bet, keep the string constants around. do {} while(0) >> will drop them out entirely. > > Damn, not much gain on m28evk (with C functionss/with macros), > using gcc 4.7.1: > > Configuring for m28evk board... text data bss dec hex > filename 418994 7780 288632 715406 aea8e ./u-boot 11773 788 > 12 12573 311d ./spl/u-boot-spl > > Configuring for m28evk board... text data bss dec hex > filename 418998 7780 288628 715406 aea8e ./u-boot 11765 788 > 12 12565 3115 ./spl/u-boot-spl
Right, didn't have many strings. But do you see what I mean now about not needing this patch as it stands currently? - -- Tom -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQIcBAEBAgAGBQJQWMojAAoJENk4IS6UOR1Ws/EP/jx1vvg3N2gIlSVRfl6em3ul VwBi/tLW+mAlF3V/+Ge3h//U9gAef6uDbRlLUngxAvVuHQZZb7gqtf6T9Zw7DDu/ BFLSocaLi99rnEdwEZe4lApJnBP3pZEcLnHiKVvFN+lGSA7G6vEzJemawnxhFdKh B9MgtxgKEe3EUxdKj8rXaXvPUIO+NpQ/BcI2FLQrJfr8nH0mK6m1yNFEe3VYc64y 3dUTxr1ILS6O2uLvf1ErUdSi7YZOnkAwpyw+mTLF6weCJNisrDCrChjZibeBEtVN ZdH5ZkKckXegy3N6HM/tDuLGaO5spvxM797gS1tzqesPrMWy+ng9npFwqk6zxM8Y rtG6G0ddtAk0u6UCEDvoQiYPciNY4F+YhuhesVXZVUe7l09XbZdiDLHXlqR34hVo 9H1qPCfi7DmvRR/mArG4URc9TkbsjsQkZp1s1/3jDFlM6xenM+2SdTy3ncrsMwmx Ri92BjdOE+VQSdgqexV660yjNB3qYn2AC7/dtgNhaZA7/+p7XSip3NnjTmTr7buL xoo8sse/sr8viGDCyyWf8Bv/sOvc5pqR0SYu3187BkgkMlAv3Se/lwNT/r+lPqFd K0w69mMqN+WNEQYHkisE2bKGsuKCWOLt/KTFvDNXQJZsxa4uE2lbNSTXzStsGcAw rh+d7dV2ylpGxRccUYDb =dyAB -----END PGP SIGNATURE----- _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot