start a todo.txt; tweaks to example1; fix section size bug by disabling incremental linking

main
Allen Webster 2025-04-24 17:01:06 -07:00
parent 642f3db19b
commit 6c7c13f93b
5 changed files with 67 additions and 10 deletions

View File

@ -3,5 +3,5 @@
set opts=-FC -GR- -EHa- -nologo -Zi set opts=-FC -GR- -EHa- -nologo -Zi
set code=%cd% set code=%cd%
pushd build pushd build
cl %opts% %code%\src\example1.c -Feexample1 cl %opts% %code%\src\example1.c -Feexample1 -link -INCREMENTAL:NO
popd popd

View File

@ -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

View File

@ -37,7 +37,7 @@
// user interface // 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 SymbolDefine(E,N) DO_NOT_ELIMINATE(SYMBOL__SYM(E,N)) SymbolDeclare(E,N)
#define SymbolDefineNameless(E) SymbolDefine(E,GLUE(auto,__COUNTER__)) #define SymbolDefineNameless(E) SymbolDefine(E,GLUE(auto,__COUNTER__))

64
todo.txt Normal file
View File

@ -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