diff --git a/src/sys/compile/Makefile b/src/sys/compile/Makefile index 2b04d46..c18c4bd 100644 --- a/src/sys/compile/Makefile +++ b/src/sys/compile/Makefile @@ -14,7 +14,8 @@ # Link the kernel statically with fixed text+data address @1M $(KERNEL) : $(OBJS) - $(LD) -nostdlib -nostdinc -o $@ $(OBJS) $(KPARTS) -Ttext 0x30000 -Tdata 0x20000 + #$(LD) -nostdlib -nostdinc --warn-section-align -o $@ $(OBJS) $(KPARTS) -Ttext 0x30000 -Tdata 0x20000 + $(LD) -T ./ldscript.i386 -o $@ $(OBJS) $(KPARTS) /usr/bin/strip $@ # Compile the source files diff --git a/src/sys/compile/ldscript.i386 b/src/sys/compile/ldscript.i386 new file mode 100644 index 0000000..b86bc7b --- /dev/null +++ b/src/sys/compile/ldscript.i386 @@ -0,0 +1,65 @@ +OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") +OUTPUT_ARCH(i386) + +ENTRY(_start) +SEARCH_DIR("libgcc"); +SECTIONS +{ + . = 0x30000 + SIZEOF_HEADERS; + + .interp : { *(.interp) } + .hash : { *(.hash) } + .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } + .rel.text : { *(.rel.text) *(.rel.gnu.linkonce.t*) } + .rela.text : { *(.rela.text) *(.rela.gnu.linkonce.t*) } + .rel.data : { *(.rel.data) *(.rel.gnu.linkonce.d*) } + .rela.data : { *(.rela.data) *(.rela.gnu.linkonce.d*) } + .rel.rodata : { *(.rel.rodata) *(.rel.gnu.linkonce.r*) } + .rela.rodata : { *(.rela.rodata) *(.rela.gnu.linkonce.r*) } + .rel.got : { *(.rel.got) } + .rela.got : { *(.rela.got) } + .rel.ctors : { *(.rel.ctors) } + .rela.ctors : { *(.rela.ctors) } + .rel.dtors : { *(.rel.dtors) } + .rela.dtors : { *(.rela.dtors) } + .rel.init : { *(.rel.init) } + .rela.init : { *(.rela.init) } + .rel.fini : { *(.rel.fini) } + .rela.fini : { *(.rela.fini) } + .rel.bss : { *(.rel.bss) } + .rela.bss : { *(.rela.bss) } + .rel.plt : { *(.rel.plt) } + .rela.plt : { *(.rela.plt) } + .init : { *(.init) } =0x9090 + .plt : { *(.plt) } + + /* text/read-only data */ + .text : { *(.text .gnu.linkonce.t.*) } =0x9090 + + .rodata : { *(.rodata) } + + /* writable data */ + . = ALIGN(0x1000); + __data_start = .; + .data : { *(.data .gnu.linkonce.d.*) } + + __ctor_list = .; + .ctors : { *(.ctors) } + __ctor_end = .; + __dtor_list = .; + .dtors : { *(.dtors) } + __dtor_end = .; + .got : { *(.got.plt) *(.got) } + .dynamic : { *(.dynamic) } + + /* unintialized data (in same segment as writable data) */ + __bss_start = .; + .bss : { *(.bss) } + + . = ALIGN(0x1000); + _end = . ; + + /* Strip unnecessary stuff */ + /DISCARD/ : { *(.comment .note .eh_frame) } +} diff --git a/src/sys/lib/Makefile b/src/sys/lib/Makefile index 99cd4d9..94de836 100644 --- a/src/sys/lib/Makefile +++ b/src/sys/lib/Makefile @@ -16,7 +16,7 @@ .cpp.o: $(CXX) -Wall -DNOBOOL $(CFLAGS) -fno-rtti $(INCLUDES) -g -c -o $@ $< .cc.o: - $(CXX) -Wall -DNOBOOL -D__UBIXOS_KERNEL__ -O $(CFLAGS) -fno-rtti $(INCLUDES) -c -o $@ $< + $(CXX) -Wall -DNOBOOL -D__UBIXOS_KERNEL__ $(CFLAGS) -fno-rtti $(INCLUDES) -c -o $@ $< .cc.s: $(CXX) -Wall -O $(CFLAGS) $(INCLUDES) -S -o $@ $< .c.o: diff --git a/src/sys/lib/ogprintf.cc b/src/sys/lib/ogprintf.cc index 9b53f59..f11d39a 100644 --- a/src/sys/lib/ogprintf.cc +++ b/src/sys/lib/ogprintf.cc @@ -24,6 +24,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. $Log$ + Revision 1.5 2004/05/23 23:30:34 reddawg + Fixens + Revision 1.4 2004/05/23 01:40:19 reddawg Spinlock @@ -47,7 +50,6 @@ #include #include -#include #include extern "C" { @@ -98,32 +100,11 @@ } /* switch */ ++screenCol; ++i; -#if 0 - if (screenRow > (int)((screen->GetMaxY()+1) / font->GetHeight())) { - screen->CopyBuf(0, 0, - *screen, - 0, font->GetHeight(), - screen->GetMaxX(), screen->GetMaxY()); - screen->FillRect(0, screen->GetMaxY() - font->GetHeight(), - screen->GetMaxX(), screen->GetMaxY(), - screen->Pack(122, 140, 163)); - --screenRow; - } /* if */ -#endif } /* while */ -#if 0 - screen->ScaleBuf(screen->GetMaxX() - (screen->GetMaxX() / 4), - screen->GetMaxY() - (screen->GetMaxY() / 4), - screen->GetMaxX(), - screen->GetMaxY(), - *screen, - 0, 0, - screen->GetMaxX() / 2, - screen->GetMaxY()); -#endif return 0; } // ogPrintf + } /*** diff --git a/src/sys/sde/Makefile b/src/sys/sde/Makefile index f45dd70..e81b997 100644 --- a/src/sys/sde/Makefile +++ b/src/sys/sde/Makefile @@ -12,7 +12,8 @@ REMOVE = rm -fr # Objects -OBJS = ogFont.o ogPixelFmt.o ogPixCon.o objgfx40.o ogDisplay_UbixOS.o main.o sde.o colours.o +OBJS = ogFont.o ogPixelFmt.o ogPixCon.o objgfx40.o ogDisplay_UbixOS.o main.o sde.o +# colours.o CFLAGS += -fno-rtti