[coreboot] [PATCH] v3: Explain the ld options for initram
Carl-Daniel Hailfinger
c-d.hailfinger.devel.2006 at gmx.net
Fri Nov 7 02:44:18 CET 2008
initram is linked with very special options to ld. It is not immediately
obvious that they are needed, so a comment to that effect will hopefully
prevent accidental "cleanups" in the future when nobody remembers the
history of that makefile rule anymore.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
Index: corebootv3-makefile_ld_xip_comments/arch/x86/Makefile
===================================================================
--- corebootv3-makefile_ld_xip_comments/arch/x86/Makefile (Revision 986)
+++ corebootv3-makefile_ld_xip_comments/arch/x86/Makefile (Arbeitskopie)
@@ -274,6 +274,8 @@
$(Q)$(AS) $(obj)/initram_picwrapper.s -o $(obj)/initram_picwrapper.o
$(Q)# initram links against stage0
$(Q)printf " LD $(subst $(shell pwd)/,,$(@))\n"
+ $(Q)# WARNING: Using -N (and not -n or others) for ld is essential to
+ $(Q)# get all important stuff into one segment!
$(Q)$(LD) -Ttext 0 --entry main -N -R $(obj)/stage0-prefixed.o \
$(obj)/coreboot.initram_partiallylinked.o \
$(obj)/initram_picwrapper.o -o $(obj)/coreboot.initram
--
http://www.hailfinger.org/
More information about the coreboot
mailing list