diff options
Diffstat (limited to 'src/config/Config.lb')
-rw-r--r-- | src/config/Config.lb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/config/Config.lb b/src/config/Config.lb index 70fc96de41..096044ae50 100644 --- a/src/config/Config.lb +++ b/src/config/Config.lb @@ -63,12 +63,29 @@ makerule linuxbios_ram.rom action "cp $(LINUXBIOS_RAM-1) linuxbios_ram.rom" end +if CONFIG_USE_INIT +makerule init.o + depends "$(INIT-OBJECTS)" + action "$(LD) -melf_i386 -r -o init.pre.o $(INIT-OBJECTS)" + action "$(OBJCOPY) --rename-section .text=.init.text --rename-section .data=.init.data --rename-section .rodata=.init.rodata --rename-section .rodata.str1.1=.init.rodata.str1.1 init.pre.o init.o" +end + +makerule linuxbios + depends "crt0.o init.o linuxbios_ram.rom ldscript.ld" + action "$(CC) -nostdlib -nostartfiles -static -o $@ -T ldscript.ld crt0.o init.o" + action "$(CROSS_COMPILE)nm -n linuxbios | sort > linuxbios.map" +end + +else + makerule linuxbios depends "crt0.o $(INIT-OBJECTS) linuxbios_ram.rom ldscript.ld" action "$(CC) -nostdlib -nostartfiles -static -o $@ -T ldscript.ld crt0.o $(INIT-OBJECTS)" action "$(CROSS_COMPILE)nm -n linuxbios | sort > linuxbios.map" end +end + makerule linuxbios.a depends "$(OBJECTS)" action "rm -f linuxbios.a" |