Dear Mike, On 2010-11-17 13:06:49, Mike Frysinger wrote: > On Wednesday, November 17, 2010 08:30:56 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. > > > > The size increase you noted seems to completely go away when adding > > --gc-sections to LDFLAGS, but this option apparently brings its own > > issues when the linker discards important unreferenced bits: > > > > http://www.mail-archive.com/u-boot@lists.denx.de/msg41762.html > > http://www.mail-archive.com/u-boot@lists.denx.de/msg42063.html > > > > These problems can be fixed within linker scripts, but I think it might > > be safer to use --gc-sections for diagnostic purposes only... > > it's really not that hard to fix things to work with --gc-sections (ive been > using it on Blackfin for literally years at this point). people really > should > be driving to have that supported everywhere.
Maybe I was being overly conservative. With --gc-sections, I assume the linker only needs to be told to keep any section that has no external references to it, which would only include startup code and reset vectors. Is that accurate? Is there any other case that may need special handling? I suppose -ffunction-sections and -fdata-sections increase compile time; are they worth it in practice? The few cases I have seen involved whole objects being unused, so just --gc-sections would deal with them. -- Sébastien _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot