mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Moved start.s into the subdirs for x86 and x64.
This commit is contained in:
parent
739b296a95
commit
ab2b14fc16
3 changed files with 56 additions and 4 deletions
|
@ -17,6 +17,7 @@ ifeq ($(CPU),x64)
|
|||
CPULDFLAGS=-melf_x86_64
|
||||
CPUASFLAGS=-64
|
||||
CPUNASMFLAGS=-felf64
|
||||
LIBMAXSI_NO_SHARED=1 # This doesn't work yet
|
||||
endif
|
||||
|
||||
DEFINES=-DLIBMAXSI_LIBRARY -DSORTIX $(CPUDEFINES)
|
||||
|
@ -52,6 +53,7 @@ process.o \
|
|||
thread.o \
|
||||
io.o \
|
||||
init.o \
|
||||
start.o \
|
||||
|
||||
HEADERS=\
|
||||
error.h \
|
||||
|
@ -70,19 +72,25 @@ sortix-keyboard.h \
|
|||
sortix-sound.h \
|
||||
|
||||
OBJS:=$(LIBMAXSIOBJS)
|
||||
BINS:=libmaxsi.so
|
||||
BINS:=
|
||||
|
||||
ifndef LIBMAXSI_NO_SHARED
|
||||
BINS:=$(BINS) libmaxsi.so
|
||||
endif
|
||||
|
||||
ifndef LIBMAXSI_NO_STATIC
|
||||
BINS:=$(BINS) libmaxsi.a
|
||||
endif
|
||||
|
||||
ifndef LIBMAXSI_NO_SORTIX
|
||||
BINS:=$(BINS) libmaxsi-sortix.a start.o
|
||||
BINS:=$(BINS) libmaxsi-sortix.a
|
||||
endif
|
||||
|
||||
ifndef LIBMAXSI_NO_LIBC
|
||||
OBJS:=$(OBJS) $(COBJS)
|
||||
BINS:=$(BINS) libc.so
|
||||
ifndef LIBMAXSI_NO_SHARED
|
||||
BINS:=$(BINS) libc.so
|
||||
endif
|
||||
ifndef LIBMAXSI_NO_STATIC
|
||||
BINS:=$(BINS) libc.a
|
||||
endif
|
||||
|
@ -114,6 +122,9 @@ libc.a: libmaxsi.a
|
|||
libc.so: libmaxsi.so
|
||||
ln -sf $< $@
|
||||
|
||||
start.o: $(CPU)/start.o
|
||||
ln -sf $< $@
|
||||
|
||||
# libmaxsi
|
||||
|
||||
*.cpp: $(HEADERS)
|
||||
|
@ -155,5 +166,5 @@ sortix/%.o: sortix/%.cpp
|
|||
g++ -c $< -o $@ $(SORTIXFLAGS)
|
||||
|
||||
clean:
|
||||
rm -f *.o sortix/*.o c/*.o *.a *.so $(CHEADERS) $(HEADERS)
|
||||
rm -f *.o sortix/*.o c/*.o x86/*.o x64/*.o *.a *.so $(CHEADERS) $(HEADERS)
|
||||
|
||||
|
|
41
libmaxsi/x64/start.s
Normal file
41
libmaxsi/x64/start.s
Normal file
|
@ -0,0 +1,41 @@
|
|||
/******************************************************************************
|
||||
|
||||
COPYRIGHT(C) JONAS 'SORTIE' TERMANSEN 2011.
|
||||
|
||||
This file is part of LibMaxsi.
|
||||
|
||||
LibMaxsi is free software: you can redistribute it and/or modify it under
|
||||
the terms of the GNU Lesser General Public License as published by the Free
|
||||
Software Foundation, either version 3 of the License, or (at your option)
|
||||
any later version.
|
||||
|
||||
LibMaxsi is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
|
||||
more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with LibMaxsi. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
start.s
|
||||
A stub for linking to the C runtime on Sortix.
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
.globl _start
|
||||
|
||||
.section .text
|
||||
|
||||
.type _start, @function
|
||||
_start:
|
||||
|
||||
call initialize_standard_library
|
||||
|
||||
# Run main
|
||||
# TODO: Sortix should set the initial values before this point!
|
||||
call main
|
||||
|
||||
# Terminate the process with main's exit code.
|
||||
movl %eax, %edi
|
||||
call exit
|
||||
|
Loading…
Reference in a new issue