From mboxrd@z Thu Jan 1 00:00:00 1970 From: Graeme Russ Date: Sat, 05 Feb 2011 09:45:09 +1100 Subject: [U-Boot] [PATCH 02/32] x86: Align config.mk and linker scripts with other arches In-Reply-To: <20110204144210.15266133@udp111988uds> References: <1296822959-3927-1-git-send-email-graeme.russ@gmail.com> <1296822959-3927-3-git-send-email-graeme.russ@gmail.com> <20110204144210.15266133@udp111988uds> Message-ID: <4D4C8175.3020607@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 05/02/11 07:42, Scott Wood wrote: > On Fri, 4 Feb 2011 23:35:29 +1100 > Graeme Russ wrote: > >> LDFLAGS += --cref >> -LDFLAGS_u-boot += --gc-sections >> -PLATFORM_RELFLAGS += -ffunction-sections >> +LDFLAGS_u-boot += --gc-sections -pie >> +LDSCRIPT := $(SRCTREE)/$(CPUDIR)/u-boot.lds > > The use of --cref came up recently (see > http://lists.denx.de/pipermail/u-boot/2011-February/086698.html). > > During what link phase is --cref supposed to be used? Currently it is being > used during partial links only, and not the final link, as a result of > commit 8aba9dceebb14144e07d19593111ee3a999c37fc. As the toplevel > config.mk currently stands, it would have to go in PLATFORM_LDFLAGS to > be used in all link phases, or LDFLAGS_u-boot to be used when linking > the final image only. > > BTW, is it really enabled because of something to do with i386? Or just > maintainer preference (in which case it should probably be a non-arch config, > or in this case just enabled unconditionally, since I don't think there's > any harm to it). I think --cref is historical. I have just performed a build without it and it runs fine, so I think it can be safely removed. Maybe it might be worth starting a separate discussion thread with the goal of unifying and documenting the linker, make and config.mk files? Regards, Graeme