On Wed, 26.11.14 15:16, Gustavo Sverzut Barbieri (gustavo.barbi...@intel.com) wrote:
> I'm okay with the change to remove gc-sections. > > systemd is pretty good at not leaving crap in its code, then results > are pretty small as we saw. > > My only comment is that we should also remove: > -ffunction-sections > -fdata-sections > those are only useful to enable gc-sections. > > From time to time someone should run a build with > -ffunction-sections > -fdata-sections > -Wl,--gc-sections > -Wl,--print-gc-sections > so we print out sections that are dangling and then we could remove > them from source code if needed. This is not that simple. We have a large set of shared functions in src/shared/*.c, and we link that into pretty much any binary we build, even though each binary only needs a small subset of them. We rely on the GC logic to deal with this and remove the functions that are unused by the specific program. Howver, that is not an indication that we can remove the function, that's simply an indication that that one binary of the 90 or so we build doesn't need it. Other binaries might need it still, but print-gc-sections won't tell you about that. Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel