Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107178414
D28876.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D28876.diff
View Options
diff --git a/stand/i386/loader/Makefile b/stand/i386/loader/Makefile
--- a/stand/i386/loader/Makefile
+++ b/stand/i386/loader/Makefile
@@ -89,8 +89,18 @@
FILES+= ${LOADER}
FILESMODE_${LOADER}= ${BINMODE} -b
-# XXX crt0.o needs to be first for pxeboot(8) to work
-OBJS= ${BTXCRT}
+# Note: crt0.o needs to be first for pxeboot(8) to work. It assumes that the
+# startup code is located at the start of the loader and will jump
+# there. Although btx is more flexible than this, the emulated boot2 environment
+# that pxeloader provides has none of that flexibility because it lacks access
+# to the a.out/elf headers and assumes an entry point of 0.
+#
+# We must add it to the LDFLAGS instead of the OBJS becauce the former won't try
+# to clean it. When it is in OBJS, this cleaning can lead to races where
+# btxcrt.o is rebuilt, but boot2 isn't, leading to errors at installation time.
+# LDFLAGS does not have this baggage and will be included first in the list of
+# files.
+LDFLAGS+= ${BTXCRT}
DPADD= ${LDR_INTERP32} ${LIBFIREWIRE} ${LIBI386} ${LIBSA32}
LDADD= ${LDR_INTERP32} ${LIBFIREWIRE} ${LIBI386} ${LIBSA32}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 12, 7:40 AM (17 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15763468
Default Alt Text
D28876.diff (1 KB)
Attached To
Mode
D28876: boot: fix OBJS to not include BTX's crt0.o
Attached
Detach File
Event Timeline
Log In to Comment