On Wed, 2010-11-03 at 13:38 -0700, Peter Tyser wrote: > I'd guess none of the functions in the SPL binary are referenced in > the > linker script or linker command line, so the linker thinks none of > them > are necessary and removes them. > > Can you try the following patch: > I did a quick compile test, and it seemed to work, as well as stripped > out a few unused functions.
Thanks for your patch, it did work to generate the binary, however, there are two problems: 1. The u-boot size for nand_spl is not cut down as expected. /* before apply your new patch */ 29292 2010-11-04 09:29 nand_spl/u-boot-spl 0 2010-11-04 09:29 nand_spl/u-boot-spl-16k.bin 0 2010-11-04 09:29 nand_spl/u-boot-spl.bin 13931 2010-11-04 09:29 nand_spl/u-boot-spl.map /* After apply your new patch */ 35636 2010-11-04 09:49 nand_spl/u-boot-spl 116912128 2010-11-04 09:49 nand_spl/u-boot-spl-16k.bin 4096 2010-11-04 09:49 nand_spl/u-boot-spl.bin 16381 2010-11-04 09:49 nand_spl/u-boot-spl.map /* Remove your two patches(remove gc-section patch and this new patch */ 34094 2010-11-04 09:51 nand_spl/u-boot-spl 116912128 2010-11-04 09:51 nand_spl/u-boot-spl-16k.bin 4096 2010-11-04 09:51 nand_spl/u-boot-spl.bin 14097 2010-11-04 09:51 nand_spl/u-boot-spl.map 2.the u-boot-spl.bin is 4096 bytes, and u-boot-spl-16.bin which should be padded to 4K bytes is 116912128 bytes. You can take a look at nand_spl/board/freescale/mpc8536ds/Makefile to see how u-boot-spl.bin/u-boot-spl-16k.bin is generated. I don't know which patch(not your gc-section for sure) cause this problem. I just reset my git tree to 2010.06, the size is: 33512 2010-11-04 10:07 nand_spl/u-boot-spl 4096 2010-11-04 10:07 nand_spl/u-boot-spl-16k.bin 4096 2010-11-04 10:07 nand_spl/u-boot-spl.bin 14037 2010-11-04 10:07 nand_spl/u-boot-spl.map So we need to find out the cause for the huge u-boot-spl-16k.bin. Anyway, thanks for taking care of this. Haiying _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot