diff --git a/build.bat b/build.bat index 78bb89b..3af2d2c 100644 --- a/build.bat +++ b/build.bat @@ -3,5 +3,5 @@ set opts=-FC -GR- -EHa- -nologo -Zi set code=%cd% pushd build -cl %opts% %code%\src\example1.c -Feexample1 +cl %opts% %code%\src\example1.c -Feexample1 -link -INCREMENTAL:NO popd diff --git a/build.sh b/build.sh deleted file mode 100644 index 72d064a..0000000 --- a/build.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -code="$PWD" -opts=-g -cd build > /dev/null -g++ $opts $code/example1.c -o example1 -cd $code > /dev/null diff --git a/src/example1.h b/src/example1.h index 512d080..d9324bf 100644 --- a/src/example1.h +++ b/src/example1.h @@ -27,7 +27,7 @@ typedef struct EX1_Command{ #define COMMAND_SCRIPT(N,desc) \ void cmdhook_##N(EX1_Ctx *ctx); \ -SymbolDefine(EX1_CommandSymbols, N) = { str8_lit_const(#N), str8_lit_const(desc), cmdhook_##N }; \ +SymbolDefine(EX1_CommandSymbols, N) = { str8_lit_const(#N), str8_lit_const(desc), cmdhook_##N };\ void cmdhook_##N(EX1_Ctx *ctx) #endif //EXAMPLE1_H diff --git a/src/symbol_set.h b/src/symbol_set.h index 030d43a..bebdef5 100644 --- a/src/symbol_set.h +++ b/src/symbol_set.h @@ -37,7 +37,7 @@ // user interface -#define SymbolDeclare(E,N) SECTION(E##_section) SYMBOL__TYPE(E) SYMBOL__SYM(E,N) +#define SymbolDeclare(E,N) SECTION(E##_section) extern SYMBOL__TYPE(E) SYMBOL__SYM(E,N) #define SymbolDefine(E,N) DO_NOT_ELIMINATE(SYMBOL__SYM(E,N)) SymbolDeclare(E,N) #define SymbolDefineNameless(E) SymbolDefine(E,GLUE(auto,__COUNTER__)) diff --git a/todo.txt b/todo.txt new file mode 100644 index 0000000..156dbd8 --- /dev/null +++ b/todo.txt @@ -0,0 +1,64 @@ + +Example Writing: + +[ ] Think up better introductory examples +[ ] Example of symbol sets with instances that don't need names +[ ] Example of more complex data initialization via the hook + + + +Vetting: + +Compilers: CL, GCC, CLANG +Linkers: LINK, GCC, CLANG +OSs: Win32, Linux, Mac + (COFF) (ELF) (MACHO) + +[ ] Check configurations for accurate section virtual sizes + Win32{ + link: -INCREMENTAL:NO + clang (as linker): -Xlinker -INCREMENTAL:NO + All combinations of CL, LINK, CLANG work so far so long as the above + options are used. + } + Linux{ [ ] GCC CLANG [ ] GCC GCC [ ] CLANG GCC [ ] CLANG CLANG } + Mac { [ ] CLANG CLANG } + +[ ] Check configurations for link time optimization removal of symbols + + + +Development: + +[ ] Small as possible binary parser for "selfimg" purposes + + + +Structure Research: + +[ ] Object file editing for improved memory layout & symbol id references + [ ] Setup count and base pointer symbols + [ ] Learn how to put the symbol data into .data and relink everything + [ ] Setup id symbols & editing to give them values + [ ] Eliminate the "raw" version of symbols + + +[ ] Do I want to maintain a pair of versions one with object file editing + and one without? +[ ] Explore the tradeoff of using the hook for more complex data initialization +[ ] Could Symbol Sets syntax be organized in such a way that it's just a data + section and type wrapped in a macro? +[ ] How does this hold up when multiple DLLs or SOs are involved? + + + +Support Tools: + +[x] see data section size and layout info +[ ] dump binary as hex from a data section +[ ] see symbols inside data sections +[ ] see symbols by name +[ ] count of symbols in symbol set +[ ] display of string and integer data in symbol from symbol set +[ ] size of types +