Mercurial > pub > dyncall > dyncall
annotate ToDo @ 664:64880e3f286c
- test/thunk: disable output buffering (might not be able catch segfaults on stack without SA_ONSTACK, so print maximum for when handler isn't called)
author | Tassilo Philipp |
---|---|
date | Thu, 23 May 2024 16:05:45 +0200 |
parents | a111a62e20fd |
children |
rev | line source |
---|---|
640 | 1 1.5: |
0 | 2 ---- |
364 | 3 - test atpcs thumb on arm and verify if ellipsis and C++ thiscalls work, if so adapt doc appendix |
4 - test eabi thumb on arm and verify if ellipsis and C++ thiscalls work, if so adapt doc appendix | |
5 - new platform matrix | |
6 * check dark green cells and validate in general | |
355 | 7 - test/thunk win/x64 doesn't output anything decent for stack test (neither sigsegv nor output), which can create a problem for test log file as it'll mess with the subsequent test's output) |
8 - remove test/gen-masm alltogether | |
329 | 9 - test code: add sparc tests for when out of register windows, meaning multiple layers deep in the call stack |
256
7520e2260097
- added to configure some detection on how to compile .s/.S with --noexecstack (or similar), as compilers' defaults are often insane
Tassilo Philipp
parents:
250
diff
changeset
|
10 - support platforms without shared libraries so they can be built by just typing `./configure;make` (e.g. minix < 3.2.1) |
7520e2260097
- added to configure some detection on how to compile .s/.S with --noexecstack (or similar), as compilers' defaults are often insane
Tassilo Philipp
parents:
250
diff
changeset
|
11 * also make sure minix with shared library support builds and works in general (>= 3.2.1) as well as ELF on Minix (>= 3.2.0) to begin with (as that's the base, and we only test on 3.1.8 so far) |
155 | 12 - dyncallback's "stack_cleanup" can be removed from non x86 impls... test if they still work |
86 | 13 - the CallVM-free functions are per VTable, however the latter can be changed out |
14 at runtime... which basically changes potentially the deallocator... | |
15 same goes for functions setting the mode. think about how to make this safer - currently | |
16 we have a higher flexibility and we need to potentially clean up from the mode we are in, | |
17 however, this is open to misuse | |
78 | 18 - check all vararg calling conv implementations if they promote correctly |
19 (e.g. float to double); we used to not care as it was the user's job to | |
20 think of that, but we allow users to use ArgFloat, etc. on "..." now, | |
21 taking care of the promotion; so it should be consistent all across the | |
22 implementations -> also write testcode specifically for that | |
0 | 23 - autovar was never really pushed all the way through and still plays second |
9 | 24 fiddle to dyncall_macros.h, clean this all up, eventually (Tassilo: for now, I |
25 removed out of sync files to avoid confusion; but still probably duped code) | |
69 | 26 - add portable "make install" |
27 * make install should also install manpages | |
0 | 28 - fix for NDS: |
69 | 29 * ARM: |
104
dbca6763f2be
- complete, working mips o32 callback (using hardware fp); fixes error from last commit, which ignored first 2 float args
cslag
parents:
100
diff
changeset
|
30 - callback_plain retval wrong (not only platform), area on stack where |
dbca6763f2be
- complete, working mips o32 callback (using hardware fp); fixes error from last commit, which ignored first 2 float args
cslag
parents:
100
diff
changeset
|
31 it's stored is probably not zeroed, so half-words, etc., come with garbage |
69 | 32 * THUMB: |
33 - ellipsis (might be test itself, not respecting fixed part of args) | |
104
dbca6763f2be
- complete, working mips o32 callback (using hardware fp); fixes error from last commit, which ignored first 2 float args
cslag
parents:
100
diff
changeset
|
34 - callback_plain retval, see above under ARM |
69 | 35 - callf |
24 | 36 - support Solaris11 CFLAGS with -D_FILE_OFFSET_BITS=64 |
256
7520e2260097
- added to configure some detection on how to compile .s/.S with --noexecstack (or similar), as compilers' defaults are often insane
Tassilo Philipp
parents:
250
diff
changeset
|
37 - make sure selinux works (esp. regarding NX bits) |
54 | 38 Daniel has a patch for it, if needed, implementing allocwx with two memory blocks, one for w^x, mmaped to one for r|x |
68 | 39 - support /SAFESEH on cl/win32 |
370 | 40 - test code functions should be in .so files, optionally, so the suites can directly be used to test dyncall bindings |
83
54930a037e8a
- PPC64 single-precision float fixes for more than 13 float args (thanks Masanori!)
cslag
parents:
78
diff
changeset
|
41 - pkg-config support? |
329 | 42 - add tests using alloca(), as this might depend on the frame pointer being correctly set (we don't |
43 check for this, currently, at all - but might not affect dyncall's stubs, anyways) - verify | |
0 | 44 |
45 portasm: | |
46 -------- | |
47 - add solaris support for x64 | |
48 | |
49 dyncall: | |
50 -------- | |
370 | 51 - dyncall sparc v7/v8: -xO3 on SunPro segfaults in tests (observed years ago) |
364 | 52 - callbacks and use of CC signature characters (only x86 has any support for different CCs for callbacks): |
53 * support for arm (arm/thumb on same platform) | |
54 * check if ellipsis support is needed (is there any need for calling back into an ellipse function?) | |
55 * check if syscalls support is needed (is there any need for calling back into a syscall?) | |
56 - think about using 'inline' for all/most dyncall_api.c functions? | |
57 - support for where syscalls originate from on OpenBSD: http://undeadly.org/cgi?action=article;sid=20191202105849 | |
288 | 58 - merge arm32_thumb_{gas/apple} and include thumb support for portasm |
59 - x64 verification: return values are passed via RAX and RDX, and XMM0 and XMM1. | |
146
0ab08c1541f0
- fixed armhf ellipsis calls, were ignoring spill area
cslag
parents:
145
diff
changeset
|
60 - find big endian arm box (also hardfloat), e.g. cubietruck: http://blog.netbsd.org/tnf/entry/working_arm_multiprocessor_support |
0ab08c1541f0
- fixed armhf ellipsis calls, were ignoring spill area
cslag
parents:
145
diff
changeset
|
61 - test if armhf/thumb is actually working... pulls in arm mode code in dyncall_callvm.c |
0ab08c1541f0
- fixed armhf ellipsis calls, were ignoring spill area
cslag
parents:
145
diff
changeset
|
62 - dyncall_call_mips_n32.h and dyncall_call_mips_n64.h are pretty much the same, share code |
640 | 63 - support for return values: aggregate return values on non-x64 |
64 - support for argument values: aggregates on non-x64, vector types, long double (c89) | |
65 * make sure that struct support for ellipsis calls are not forgotten (copy everything by value) | |
370 | 66 - support for argument values: _Complex (c99) |
67 - support for argument values: Fixed-width integer types (c99) - could be just aliases but would help abstracting it away from library users | |
0 | 68 - other syscalls |
135 | 69 - test MIPS32 eabi big endian (current port works on psp, which is little endian) |
132
b0cca984c740
- manual update, started splitting platform overview in EP and EL for some platforms
cslag
parents:
129
diff
changeset
|
70 - implement MIPS64 N32 (gcc -mabi=n32); both, little and big-endian (looks like NetNBSD on and |
b0cca984c740
- manual update, started splitting platform overview in EP and EL for some platforms
cslag
parents:
129
diff
changeset
|
71 EdgeRouter lite uses this: https://blog.netbsd.org/tnf/entry/hands_on_experience_with_edgerouter) |
306
9f2aff560fa7
- todo update reflecting mips softfloat status more precisely (as only lacking for mips64/n32 callconv)
Tassilo Philipp
parents:
295
diff
changeset
|
72 - MIPS64 n32 softfloat support (-msoft-float) |
129 | 73 - implement MIPS64 EABI (gcc -mabi=eabi); both, little and big-endian |
141 | 74 - support for Minix/arm |
146
0ab08c1541f0
- fixed armhf ellipsis calls, were ignoring spill area
cslag
parents:
145
diff
changeset
|
75 - improve ellipsis test: |
0ab08c1541f0
- fixed armhf ellipsis calls, were ignoring spill area
cslag
parents:
145
diff
changeset
|
76 * test not just with one fixed arg, to also simulate alignment problems |
0ab08c1541f0
- fixed armhf ellipsis calls, were ignoring spill area
cslag
parents:
145
diff
changeset
|
77 * test return values |
0ab08c1541f0
- fixed armhf ellipsis calls, were ignoring spill area
cslag
parents:
145
diff
changeset
|
78 * convert from c++ to c, to have it also on plan9, and more portability |
0 | 79 |
80 dynload: | |
81 -------- | |
366
ad5f9803f52f
- removal of some unnecessary headers that only contained internally used forward declarations, so no need to have them
Tassilo Philipp
parents:
364
diff
changeset
|
82 - investigate issue where if dlGetLibraryPath() is called from within a .so, |
ad5f9803f52f
- removal of some unnecessary headers that only contained internally used forward declarations, so no need to have them
Tassilo Philipp
parents:
364
diff
changeset
|
83 passing NULL will return .so name, whereas passing result of |
ad5f9803f52f
- removal of some unnecessary headers that only contained internally used forward declarations, so no need to have them
Tassilo Philipp
parents:
364
diff
changeset
|
84 dlLoadLibrary(NULL) returns process' name |
244 | 85 - dlGetLibraryPath: dl_iterate_phdr() used on OpenBSD, but not available on version < 3.7 |
0 | 86 - bug: test/nm crashes on qemu mips linux o32 debian etch |
87 - rename SymsInit to InitSyms and similar for cleanup function to reflect naming | |
88 in dyncall | |
89 - get rid of Dl_info and friends (_GNU_SOURCE) in dynload/dynload_syms_elf.c | |
90 for implementation of dlSymsNameFromValue(..) | |
91 - check if PSP can support dynload (missing elf.h, dlfcn.h, etc.); fixup readme if successful | |
84 | 92 - some functionality like java's System.mapLibraryName('name') might be helpful? |
288 | 93 - Failed On Open Solaris 11: |
94 In file included from dynload_syms.c:28: | |
95 dynload_syms_elf.c:56: error: syntax error before "Elf_Dyn" | |
96 dynload_syms_elf.c:56: warning: data definition has no type or storage class | |
97 dynload_syms_elf.c: In function `dlSymsInit': | |
98 dynload_syms_elf.c:155: error: `pDyn' undeclared (first use in this function) | |
99 dynload_syms_elf.c:155: error: (Each undeclared identifier is reported only once | |
100 dynload_syms_elf.c:155: error: for each function it appears in.) | |
101 dynload_syms_elf.c:155: error: syntax error before ')' token | |
102 dynload_syms_elf.c:160: error: `DT_NULL' undeclared (first use in this function) | |
103 dynload_syms_elf.c:163: error: `DT_STRTAB' undeclared (first use in this function) | |
104 dynload_syms_elf.c:164: error: `DT_SYMTAB' undeclared (first use in this function) | |
105 dynload_syms_elf.c:165: error: `DT_HASH' undeclared (first use in this function) | |
106 make: *** [dynload_syms.o] Error 1 | |
0 | 107 |
108 dyncallback: | |
109 ------------ | |
104
dbca6763f2be
- complete, working mips o32 callback (using hardware fp); fixes error from last commit, which ignored first 2 float args
cslag
parents:
100
diff
changeset
|
110 - callback_plain's return value not correct anymore on NDS (maybe just broken testcode?), |
278 | 111 see above under 1.1 items |
104
dbca6763f2be
- complete, working mips o32 callback (using hardware fp); fixes error from last commit, which ignored first 2 float args
cslag
parents:
100
diff
changeset
|
112 * check other platforms also, if asm stub initializes retval space, correctly |
135 | 113 - test MIPS32 eabi big endian (current port works on psp, which is little endian) |
132
b0cca984c740
- manual update, started splitting platform overview in EP and EL for some platforms
cslag
parents:
129
diff
changeset
|
114 - implement MIPS64 N32 (gcc -mabi=n32); both, little and big-endian (looks like NetNBSD on and |
b0cca984c740
- manual update, started splitting platform overview in EP and EL for some platforms
cslag
parents:
129
diff
changeset
|
115 EdgeRouter lite uses this: https://blog.netbsd.org/tnf/entry/hands_on_experience_with_edgerouter) |
306
9f2aff560fa7
- todo update reflecting mips softfloat status more precisely (as only lacking for mips64/n32 callconv)
Tassilo Philipp
parents:
295
diff
changeset
|
116 - MIPS64 n32 softfloat support (-msoft-float) |
129 | 117 - implement MIPS64 EABI (gcc -mabi=eabi); both, little and big-endian |
141 | 118 - support for Minix/arm |
0 | 119 |
120 bindings: | |
121 --------- | |
122 - release bindings as standalone packages (already done for rbdc as a gem and rdyncall on cran) | |
366
ad5f9803f52f
- removal of some unnecessary headers that only contained internally used forward declarations, so no need to have them
Tassilo Philipp
parents:
364
diff
changeset
|
123 * add note to documentation, where bindings are |
0 | 124 - add rdoc documentation to ruby gem |
125 - add pydoc for python | |
126 - add manpage for shdc | |
366
ad5f9803f52f
- removal of some unnecessary headers that only contained internally used forward declarations, so no need to have them
Tassilo Philipp
parents:
364
diff
changeset
|
127 - expose callf-convenience functions to godc |
0 | 128 - add godoc for godc |
129 - add javadoc to java | |
130 - add more bindings | |
414 | 131 - add callback support for erlang, go, java, lua and ruby (and shell? how?) |
0 | 132 - add call-conv-mode-support for rbdc through signature |
133 | |
134 manual: | |
135 ------- | |
366
ad5f9803f52f
- removal of some unnecessary headers that only contained internally used forward declarations, so no need to have them
Tassilo Philipp
parents:
364
diff
changeset
|
136 - introduce doc overview tables and common vocab for calling convention specifics, following example of table on page 13 of |
ad5f9803f52f
- removal of some unnecessary headers that only contained internally used forward declarations, so no need to have them
Tassilo Philipp
parents:
364
diff
changeset
|
137 https://www.linux-mips.org/pub/linux/mips/doc/ABI/MIPS-N32-ABI-Handbook.pdf; also as inspiration, e.g. user 'preserved' instead of 'permanent', etc. |
ad5f9803f52f
- removal of some unnecessary headers that only contained internally used forward declarations, so no need to have them
Tassilo Philipp
parents:
364
diff
changeset
|
138 https://developer.apple.com/library/content/documentation/Xcode/Conceptual/iPhoneOSABIReference/Articles/ARMv6FunctionCallingConventions.html#//apple_ref/doc/uid/TP40009021-SW4 |
329 | 139 * also, get inspiration for naming for GCC predefs as talked about in https://stffrdhrn.github.io/software/embedded/openrisc/2018/06/08/gcc_stack_frames.html |
201 | 140 - make stack layout diagrams better, e.g. add grow direction (example: https://developer.apple.com/library/content/documentation/Xcode/Conceptual/iPhoneOSABIReference/art/arm_stack.jpg on https://developer.apple.com/library/content/documentation/Xcode/Conceptual/iPhoneOSABIReference/Articles/ARMv6FunctionCallingConventions.html#//apple_ref/doc/uid/TP40009021-SW1) |
332 | 141 * another example, chapter 3 of: ftp://www.sourceware.org/pub/binutils/ppc-docs/ppc-poweropen/ |
0 | 142 - provide more examples on how to use dyncall, dynload and dyncallback |
143 * e.g. enhance manual with a couple of examples (e.g. calling MessageBoxA on windows, etc.) | |
144 - manuals for bindings (as stated in bindings-section, above) | |
117 | 145 - under "dyncall support", in each calling convention appendix, list crucial details of e.g. big/little endian support, etc. |
146 - specify integer models in use, use common ILP32, LLP64, etc. terms | |
0 | 147 |
88 | 148 regressions: |
149 ------------ | |
0 | 150 - Solaris/gmake build doesn't build dynload and tests anymore (maybe not even dyncallback) |
151 - look over code and fix TODO or @@@ marks | |
152 | |
153 nice to have: | |
154 ------------- | |
155 - update: microsoft visual c++ build files - integrate all test suites in solution file | |
156 - consistency: on x64 platforms: make both ABIs available ('win64','sysv') for all x64 OS ports | |
157 - microsoft build enhancement: autodetect assembly via C preprocessor (like with .S gcc files) | |
158 - test/thunk: some platforms do not allow for allocation of executable code on heap and stack -- | |
329 | 159 currently this test will segfault (handled), maybe we should collect information which platforms allow and which not. |
160 - PSP | |
161 - automate ppsspp stuff, seems to print to stdout for callback_suite? but not for call_suite.. (?) | |
162 - fix link with dummy versions of the following for test-bins: | |
163 void __stack_chk_fail(){} | |
164 void __stack_chk_guard(){} | |
0 | 165 |
166 bugs: | |
167 ----- | |
88 | 168 - setting callconv, specifically for platforms that have only one (default)) excepts on some |
6 | 169 platforms, eg. setting X64_sysv on amd64/Linux - keeping cdecl which is the same in |
88 | 170 this case, works (this should work now...) |
0 | 171 |
640 | 172 missing nice-to-have implementations (descending priority): |
173 ----------------------------------------------------------- | |
658 | 174 - riscv32 and riscv128 |
0 | 175 - itanium |
88 | 176 - superh/j-core |
0 | 177 - 68k, 88k, 6502, etc. |
88 | 178 - arc |
0 | 179 - alpha |
180 - cell | |
181 - blackfin | |
88 | 182 - seaforth |
21 | 183 - s/390 |
0 | 184 - z80 |
185 - hppa | |
186 - vax | |
187 - atmel avr | |
188 - propeller | |
189 - amd29k | |
190 |