[syslinux:elflink] elflink: before chang core/Makefile back
syslinux-bot for Feng Tang
feng.tang at intel.com
Thu Aug 12 21:03:10 PDT 2010
Commit-ID: 58ddf011b33b45676ad8436ae870fa7050c0a228
Gitweb: http://syslinux.zytor.com/commit/58ddf011b33b45676ad8436ae870fa7050c0a228
Author: Feng Tang <feng.tang at intel.com>
AuthorDate: Thu, 3 Jun 2010 13:22:51 +0800
Committer: Feng Tang <feng.tang at intel.com>
CommitDate: Tue, 20 Jul 2010 11:10:03 +0800
elflink: before chang core/Makefile back
---
MCONFIG | 1 +
core/Makefile | 13 +++++++++----
core/diskfs.inc | 6 ++++--
core/extern.inc | 20 ++++++++++++++++++++
core/ui.inc | 26 ++++++++++++++++++++++----
5 files changed, 56 insertions(+), 10 deletions(-)
diff --git a/MCONFIG b/MCONFIG
index c76b591..2177718 100644
--- a/MCONFIG
+++ b/MCONFIG
@@ -49,6 +49,7 @@ gcc_ok = $(shell tmpf=gcc_ok.$$$$.tmp; \
LD = ld
OBJDUMP = objdump
OBJCOPY = objcopy
+STRIP = strip
AR = ar
NM = nm
RANLIB = ranlib
diff --git a/core/Makefile b/core/Makefile
index 166f0e4..66b3fe6 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -50,7 +50,9 @@ COBJ := $(patsubst %.c,%.o,$(CSRC))
SOBJ := $(patsubst %.S,%.o,$(SSRC))
LIB = libcore.a
-LIBS = $(LIB) $(com32)/lib/libcomcore.a $(LIBGCC)
+#LIBS = $(LIB) $(com32)/lib/libcomcore.a $(LIBGCC)
+LIBS = $(LIB) $(LIBGCC) --whole-archive $(com32)/lib/libcom32min.a
+LIBDEP = $(filter-out -% %start%,$(LIBS))
LIBOBJS = $(COBJ) $(SOBJ)
NASMDEBUG = -g -F dwarf
@@ -88,9 +90,12 @@ kwdhash.gen: keywords genhash.pl
-DHEXDATE="$(HEXDATE)" \
-l $(@:.o=.lsr) -o $@ -MP -MD .$@.d $<
-%.elf: %.o $(LIBS) syslinux.ld
- $(LD) $(LDFLAGS) -T syslinux.ld -M -o $@ $< \
- --start-group $(LIBS) --end-group \
+#%.elf: %.o $(LIBS) syslinux.ld
+# $(LD) $(LDFLAGS) -T syslinux.ld -M -o $@ $< \
+# --start-group $(LIBS) --end-group \
+%.elf: %.o $(LIBDEP) syslinux.ld
+ $(LD) $(LDFLAGS) -Bsymbolic -pie -E --hash-style=gnu \
+ -T syslinux.ld -M -o $@ $< $(LIBS) \
> $(@:.elf=.map)
$(OBJDUMP) -h $@ > $(@:.elf=.sec)
$(PERL) lstadjust.pl $(@:.elf=.lsr) $(@:.elf=.sec) $(@:.elf=.lst)
diff --git a/core/diskfs.inc b/core/diskfs.inc
index 9f18c76..19a46cc 100644
--- a/core/diskfs.inc
+++ b/core/diskfs.inc
@@ -97,13 +97,15 @@ trackbuf resb trackbufsize ; Track buffer goes here
;
; Load configuration file
;
- pm_call load_config
- jz no_config_file
+ ;feng
+ ;pm_call load_config
+ ;jz no_config_file
;
; Now we have the config file open. Parse the config file and
; run the user interface.
;
+ pm_call hello
%include "ui.inc"
;
diff --git a/core/extern.inc b/core/extern.inc
index 64edea6..6bbc78c 100644
--- a/core/extern.inc
+++ b/core/extern.inc
@@ -9,6 +9,26 @@
; rllpack.c
extern rllpack, rllunpack
+ ; hello.c
+ extern hello
+
+ ;abort.c
+ extern abort_load_new
+
+ ; elflink/load_env32.c
+ extern load_env32, enter_cmdline
+
+ ; memscan.c
+ extern highmem_init
+
+ extern linux_kernel
+
+ extern mp1, mp2, mp3, mp4, mp5
+
+ extern hexdump, mydump
+
+ extern printf_init
+
; fs.c
extern fs_init, pm_searchdir, getfssec, getfsbytes
extern pm_mangle_name, load_config
diff --git a/core/ui.inc b/core/ui.inc
index 2d44447..41e6fba 100644
--- a/core/ui.inc
+++ b/core/ui.inc
@@ -14,6 +14,17 @@
;
; This file should be entered with the config file open (for getc)
;
+%if 1
+;on_error:
+no_config_file:
+enter_command:
+auto_boot:
+load_kernel:
+kernel_good_saved:
+ pm_call hello
+ pm_call enter_cmdline ; Never return
+
+%else ; comment off the original ui.inc
load_config_file:
call parse_config ; Parse configuration file
no_config_file:
@@ -585,10 +596,6 @@ getchar_timeout:
;
; Anything else is assumed to be a Linux kernel.
;
- section .bss16
- alignb 4
-Kernel_EAX resd 1
-Kernel_SI resw 1
section .text16
kernel_good_saved:
@@ -689,6 +696,14 @@ is_bss_sector equ is_bad_image
is_disk_image equ is_bad_image
%endif
+%endif ; start of replacing ui.inc
+
+ section .bss16
+ alignb 4
+Kernel_EAX resd 1
+Kernel_SI resw 1
+
+
section .data16
boot_prompt db 'boot: ', 0
wipe_char db BS, ' ', BS, 0
@@ -697,6 +712,7 @@ err_notfound db 'Could not find kernel image: ',0
err_notkernel db CR, LF, 'Invalid or corrupt kernel image.', CR, LF, 0
+%if 0
alignz 2
kerneltype_table:
dw is_unknown_filetype ; VK_KERNEL
@@ -708,8 +724,10 @@ kerneltype_table:
dw is_comboot_image ; VK_COMBOOT
dw is_com32_image ; VK_COM32
dw is_config_file ; VK_CONFIG
+%endif
section .bss16
+ global CmdOptPtr
alignb 4
ThisKbdTo resd 1 ; Temporary holder for KbdTimeout
ThisTotalTo resd 1 ; Temporary holder for TotalTimeout
More information about the Syslinux-commits
mailing list