aboutsummaryrefslogtreecommitdiffstats
path: root/xen-2.4.16/arch/i386/Makefile
blob: 6778324206e891ac24f743d16f8849da1f9ad02f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
include $(BASEDIR)/Rules.mk

# What happens here? We link monitor object files together, starting
# at MONITOR_BASE (a very high address). But bootloader cannot put
# things there, so we initially load at LOAD_BASE. A hacky little
# tool called `elf-reloc' is used to modify segment offsets from
# MONITOR_BASE-relative to LOAD_BASE-relative.
# (NB. Linux gets round this by turning its image into raw binary, then 
# wrapping that with a low-memory bootstrapper.)
default: boot/boot.o $(OBJS)
	$(LD) -r -o arch.o $(OBJS)
	$(LD) $(LDFLAGS) boot/boot.o $(ALL_OBJS) -o $(TARGET)
	$(BASEDIR)/tools/elf-reloc $(MONITOR_BASE) $(LOAD_BASE) $(TARGET)

clean:
	rm -f *.o *~ core boot/*.o boot/*~ boot/core