Chameleon

Chameleon Commit Details

Date:2010-08-08 02:12:20 (8 years 11 months ago)
Author:Evan Lojewski
Commit:324
Parents: 323
Message:Removed -static flag. Fixed MODULE_START, added lias for start
Changes:
M/branches/meklort/i386/modules/Symbols/Symbols.c
M/branches/meklort/i386/modules/Symbols/Makefile
M/branches/meklort/i386/modules/HelloWorld/Makefile

File differences

branches/meklort/i386/modules/Symbols/Symbols.c
2121
2222
2323
24
24
2525
2626
2727
......
3636
3737
3838
39
39
4040
4141
4242
......
4848
4949
5050
51
51
5252
5353
5454
unsigned int lookup_symbol(const char* symbol)
{
int upperLimit = sizeof(symbolList) / sizeof(symbolList[0]) - 1;
int upperLimit = sizeof(symbolList) / sizeof(symbolList[0]) - 1;
int lowerLimit = 0;
int compareIndex = (upperLimit - lowerLimit) >> 1; // Midpoint
int result;
}
else
{
return 0xFFFFFFFF;
return 0xFFFFFFFF;// Symbol not found
}
compareIndex = (upperLimit + lowerLimit + 1) >> 1;// Midpoint, round up
}
}
else
{
return 0xFFFFFFFF;
return 0xFFFFFFFF;// Symbol not found
}
compareIndex = (upperLimit + lowerLimit) >> 1;// Midpoint, round down
}
branches/meklort/i386/modules/Symbols/Makefile
11
22
33
4
4
55
66
77
......
2020
2121
2222
23
23
2424
2525
2626
......
5959
6060
6161
62
63
6462
6563
64
6665
6766
6867
6968
7069
7170
72
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
7386
7487
7588
MODULE_NAME = Symbols
MODULE_VERSION = "1.0.0"
MODULE_START = $(MODULE_NAME)_start
MODULE_START = _$(MODULE_NAME)_start
MODULE_DEPENDENCIES =
DIR = HelloWorld
CFLAGS= $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost \
-D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER \
-DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \
-fno-builtin -static $(OMIT_FRAME_POINTER_CFLAG) \
-fno-builtin $(OMIT_FRAME_POINTER_CFLAG) \
-mpreferred-stack-boundary=2 -fno-align-functions -fno-stack-protector \
-march=pentium4 -msse2 -mfpmath=sse -msoft-float -fno-common
ld -flat_namespace -arch i386 \
-undefined suppress \
-alias $(MODULE_START) start \
-e $(MODULE_START) \
-w \
-dylib -read_only_relocs suppress \
-S -x -dead_strip_dylibs \
-no_uuid \
-current_version $(MODULE_VERSION) -compatibility_version `svn info ../../ | grep Revision | awk '{print $$2}'` \
-final_output $(MODULE_NAME) \
$(OBJROOT)/$(MODULE_NAME)Init.o $(OBJROOT)/Symbols.o -o $(SYMROOT)/$(MODULE_NAME).dylib \
Symbols.o: Symbols.h
Symbols.o: #Symbols.h
@rm -rf Symbols.h
@echo "typedef struct {" >> Symbols.h
@echo "char*symbol;" >> Symbols.h
@echo "unsigned intaddr;" >> Symbols.h
@echo "} symbol_t;" >> Symbols.h
@echo "" >> Symbols.h
@nm -g $(SYMROOT)/boot.sys | tr . _ | awk '{print "static char "$$3"_string[] = \""$$3"\";"}' >> Symbols.h
@echo "symbol_t symbolList[] = {" >> Symbols.h
@nm -g $(SYMROOT)/boot.sys | tr . _ | awk '{print "{.symbol = "$$3"_string, .addr = 0x"$$1"},";}' >> Symbols.h
@echo "};" >> Symbols.h
rm -rf $(MODULE_NAME)Init.c
echo "extern int load_dependency(const char*);" >> $(MODULE_NAME)Init.c
echo "" >> $(MODULE_NAME)Init.c
branches/meklort/i386/modules/HelloWorld/Makefile
33
44
55
6
6
77
88
99
......
2727
2828
2929
30
30
3131
3232
3333
......
6565
6666
6767
68
6869
6970
71
7072
7173
7274
MODULE_VERSION = "1.0.0"
MODULE_COMPAT_VERSION = "1.0.0"
MODULE_START = _$(MODULE_NAME)_start
MODULE_DEPENDENCIES = Symbols
MODULE_DEPENDENCIES =
DIR = HelloWorld
CFLAGS= $(RC_CFLAGS) $(OPTIM) $(MORECPP) -arch i386 -g -Wmost \
-D__ARCHITECTURE__=\"i386\" -DSAIO_INTERNAL_USER \
-DRCZ_COMPRESSED_FILE_SUPPORT $(DEBUG) \
-fno-builtin -static $(OMIT_FRAME_POINTER_CFLAG) \
-fno-builtin $(OMIT_FRAME_POINTER_CFLAG) \
-mpreferred-stack-boundary=2 -fno-align-functions -fno-stack-protector \
-march=pentium4 -msse2 -mfpmath=sse -msoft-float -fno-common
dylib: ${HELLO_WORLD_OBJS}
ld -flat_namespace -arch i386 \
-undefined suppress \
-alias $(MODULE_START) start \
-dylib -read_only_relocs suppress \
-S -x -dead_strip_dylibs \
-no_uuid \
-current_version $(MODULE_VERSION) -compatibility_version $(MODULE_COMPAT_VERSION) \
-final_output $(MODULE_NAME) \
$(OBJROOT)/$(MODULE_NAME)Init.o \

Archive Download the corresponding diff file

Revision: 324