Mercurial > pub > dyncall > dyncall
annotate ToDo @ 250:7cb8a0aaf638
- note about c99 (+ anon struct/union) requirements in doc
author | Tassilo Philipp |
---|---|
date | Sun, 14 May 2017 00:19:15 +0200 |
parents | 75093cde6d10 |
children | 7520e2260097 |
rev | line source |
---|---|
0 | 1 1.0: |
2 ---- | |
201 | 3 - dyncall supports calls to functions where prototype exists (with and without varargs); however not when no |
4 prototype exist (e.g. just calling some pointer), without any declaration... even possible in C, as one has | |
5 to cast to the function type? need to support? | |
6 | |
165
572aff021627
- file name/layout cleanup, removed "-att" from x64 .S filenames, as unnecessary and also misleading
cslag
parents:
159
diff
changeset
|
7 - make sure all assembly files declare (or are built) by setting the noexecstack flag, |
572aff021627
- file name/layout cleanup, removed "-att" from x64 .S filenames, as unnecessary and also misleading
cslag
parents:
159
diff
changeset
|
8 compared to translating code with gcc, it's manual for the assembler; this depends on arch |
169
2fa600ea50e7
- marking off solaris/sparc (32 bit) as completely supported (just tested sparc callbacks on solaris (with gnu toolchain, though), works)
cslag
parents:
165
diff
changeset
|
9 support (currently it's only done for x86/x64 ELF, but doesn't always work I think... e.g. openbsd 4.0, maybe too old?): |
165
572aff021627
- file name/layout cleanup, removed "-att" from x64 .S filenames, as unnecessary and also misleading
cslag
parents:
159
diff
changeset
|
10 |
572aff021627
- file name/layout cleanup, removed "-att" from x64 .S filenames, as unnecessary and also misleading
cslag
parents:
159
diff
changeset
|
11 "When you compile source code normally, gcc takes care of adding the GNU_STACK |
572aff021627
- file name/layout cleanup, removed "-att" from x64 .S filenames, as unnecessary and also misleading
cslag
parents:
159
diff
changeset
|
12 markings so that the final object code is not marked with an executable stack |
572aff021627
- file name/layout cleanup, removed "-att" from x64 .S filenames, as unnecessary and also misleading
cslag
parents:
159
diff
changeset
|
13 unless it actually needs it. However, if you compile assembly code, gcc will |
572aff021627
- file name/layout cleanup, removed "-att" from x64 .S filenames, as unnecessary and also misleading
cslag
parents:
159
diff
changeset
|
14 not automatically add GNU_STACK markings." |
572aff021627
- file name/layout cleanup, removed "-att" from x64 .S filenames, as unnecessary and also misleading
cslag
parents:
159
diff
changeset
|
15 |
155 | 16 - dyncallback's "stack_cleanup" can be removed from non x86 impls... test if they still work |
165
572aff021627
- file name/layout cleanup, removed "-att" from x64 .S filenames, as unnecessary and also misleading
cslag
parents:
159
diff
changeset
|
17 - target a minimum c version, for use with -pedantic, etc.? Right now we use e.g. extensions |
572aff021627
- file name/layout cleanup, removed "-att" from x64 .S filenames, as unnecessary and also misleading
cslag
parents:
159
diff
changeset
|
18 for anon structs, etc. |
86 | 19 - the CallVM-free functions are per VTable, however the latter can be changed out |
20 at runtime... which basically changes potentially the deallocator... | |
21 same goes for functions setting the mode. think about how to make this safer - currently | |
22 we have a higher flexibility and we need to potentially clean up from the mode we are in, | |
23 however, this is open to misuse | |
78 | 24 - check all vararg calling conv implementations if they promote correctly |
25 (e.g. float to double); we used to not care as it was the user's job to | |
26 think of that, but we allow users to use ArgFloat, etc. on "..." now, | |
27 taking care of the promotion; so it should be consistent all across the | |
28 implementations -> also write testcode specifically for that | |
0 | 29 - autovar was never really pushed all the way through and still plays second |
9 | 30 fiddle to dyncall_macros.h, clean this all up, eventually (Tassilo: for now, I |
31 removed out of sync files to avoid confusion; but still probably duped code) | |
0 | 32 - ppc32 callback fixes on bsd |
69 | 33 - add portable "make install" |
34 * make install should also install manpages | |
0 | 35 - mailing list announcements (html email?) |
36 - fix for NDS: | |
69 | 37 * 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
|
38 - 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
|
39 it's stored is probably not zeroed, so half-words, etc., come with garbage |
69 | 40 * THUMB: |
41 - 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
|
42 - callback_plain retval, see above under ARM |
69 | 43 - callf |
24 | 44 - support Solaris11 CFLAGS with -D_FILE_OFFSET_BITS=64 |
45 - make sure selinux works (esp. regarding NX bits, asm might need (or similar): .section .note.GNU-stack,"",@progbits) | |
54 | 46 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 | 47 - support /SAFESEH on cl/win32 |
83
54930a037e8a
- PPC64 single-precision float fixes for more than 13 float args (thanks Masanori!)
cslag
parents:
78
diff
changeset
|
48 - test code functions should be in .so files, optionally, so the suites can directly |
54930a037e8a
- PPC64 single-precision float fixes for more than 13 float args (thanks Masanori!)
cslag
parents:
78
diff
changeset
|
49 be used to test dycnall bindings |
54930a037e8a
- PPC64 single-precision float fixes for more than 13 float args (thanks Masanori!)
cslag
parents:
78
diff
changeset
|
50 - pkg-config support? |
90 | 51 - quadmath support (long double) |
117 | 52 - add tests using alloca(), as this might depend on the frame pointer being correctly |
53 set; we don't check for this, currently, at all | |
146
0ab08c1541f0
- fixed armhf ellipsis calls, were ignoring spill area
cslag
parents:
145
diff
changeset
|
54 - test on OpenBSD 6.0 which comes with W^X by default |
0 | 55 |
56 portasm: | |
57 -------- | |
58 - add solaris support for x64 | |
59 | |
60 dyncall: | |
61 -------- | |
146
0ab08c1541f0
- fixed armhf ellipsis calls, were ignoring spill area
cslag
parents:
145
diff
changeset
|
62 - 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
|
63 - 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
|
64 - dyncall_call_mips_n32.h and dyncall_call_mips_n64.h are pretty much the same, share code |
0 | 65 - support for return values: aggregate return values |
66 - support for argument values: structures, half-precision, vector types, long double | |
67 - consider automatic type-promotion for arguments passed through DC_CALL_C_ELLIPSIS_VARARGS; | |
68 this would make it easier to just pass arguments instead of having to know about the C | |
88 | 69 type promotions (this is partly done, see todo-item above under 1.0) |
0 | 70 - syscalls for x64 |
71 * bsd | |
72 * linux | |
73 - other syscalls | |
110 | 74 - MIPS32 softfloat support (-msoft-float) |
135 | 75 - 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
|
76 - 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
|
77 EdgeRouter lite uses this: https://blog.netbsd.org/tnf/entry/hands_on_experience_with_edgerouter) |
129 | 78 - implement MIPS64 EABI (gcc -mabi=eabi); both, little and big-endian |
141 | 79 - support for Minix/arm |
146
0ab08c1541f0
- fixed armhf ellipsis calls, were ignoring spill area
cslag
parents:
145
diff
changeset
|
80 - improve ellipsis test: |
0ab08c1541f0
- fixed armhf ellipsis calls, were ignoring spill area
cslag
parents:
145
diff
changeset
|
81 * 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
|
82 * test return values |
0ab08c1541f0
- fixed armhf ellipsis calls, were ignoring spill area
cslag
parents:
145
diff
changeset
|
83 * convert from c++ to c, to have it also on plan9, and more portability |
0 | 84 |
85 dynload: | |
86 -------- | |
244 | 87 - dlGetLibraryPath: dl_iterate_phdr() used on OpenBSD, but not available on version < 3.7 |
0 | 88 - bug: test/nm crashes on qemu mips linux o32 debian etch |
89 - test/resolve_self crashes/asserts on windows and bsds | |
90 - rename SymsInit to InitSyms and similar for cleanup function to reflect naming | |
91 in dyncall | |
92 - get rid of Dl_info and friends (_GNU_SOURCE) in dynload/dynload_syms_elf.c | |
93 for implementation of dlSymsNameFromValue(..) | |
94 - check if PSP can support dynload (missing elf.h, dlfcn.h, etc.); fixup readme if successful | |
84 | 95 - some functionality like java's System.mapLibraryName('name') might be helpful? |
0 | 96 |
97 dyncallback: | |
98 ------------ | |
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
|
99 - callback_plain's return value not correct anymore on NDS (maybe just broken testcode?), |
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
|
100 see above under 1.0 items |
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
|
101 * check other platforms also, if asm stub initializes retval space, correctly |
21 | 102 - finish PPC32 callbacks (see bugs section, below, BSD not working) |
110 | 103 - MIPS32 softfloat support (-msoft-float) |
135 | 104 - 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
|
105 - 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
|
106 EdgeRouter lite uses this: https://blog.netbsd.org/tnf/entry/hands_on_experience_with_edgerouter) |
129 | 107 - implement MIPS64 EABI (gcc -mabi=eabi); both, little and big-endian |
141 | 108 - support for Minix/arm |
0 | 109 |
110 bindings: | |
111 --------- | |
112 - release bindings as standalone packages (already done for rbdc as a gem and rdyncall on cran) | |
113 * add note to documentation, where bindings are and that some bindings are svn-only ATM | |
114 - add rdoc documentation to ruby gem | |
115 - add pydoc for python | |
116 - add manpage for shdc | |
117 - expose callf-convenience functions to go | |
118 - add godoc for godc | |
119 - add javadoc to java | |
120 - add more bindings | |
121 - add callback support for erlang, go, java, lua, python and ruby (and shell? how?) | |
122 - add call-conv-mode-support for rbdc through signature | |
123 | |
124 manual: | |
125 ------- | |
201 | 126 - introduce doc overview tables and common vocab for calling convention specifics, following example of table on page 13 of 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. https://developer.apple.com/library/content/documentation/Xcode/Conceptual/iPhoneOSABIReference/Articles/ARMv6FunctionCallingConventions.html#//apple_ref/doc/uid/TP40009021-SW4 |
127 - 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) | |
100
dcb7157392f1
- manual: fixed html output of tables rendered as .png, using tex multirow
cslag
parents:
98
diff
changeset
|
128 - callconv diagrams: |
98 | 129 * good idea to review it all, anyways, if the calling conventions are actually |
100
dcb7157392f1
- manual: fixed html output of tables rendered as .png, using tex multirow
cslag
parents:
98
diff
changeset
|
130 represented correctly (and if they are in sync with the .pdf, we used to have |
dcb7157392f1
- manual: fixed html output of tables rendered as .png, using tex multirow
cslag
parents:
98
diff
changeset
|
131 problems with multirow.4ht) |
0 | 132 - provide more examples on how to use dyncall, dynload and dyncallback |
133 * e.g. enhance manual with a couple of examples (e.g. calling MessageBoxA on windows, etc.) | |
134 - manuals for bindings (as stated in bindings-section, above) | |
117 | 135 - under "dyncall support", in each calling convention appendix, list crucial details of e.g. big/little endian support, etc. |
136 - specify integer models in use, use common ILP32, LLP64, etc. terms | |
0 | 137 |
88 | 138 regressions: |
139 ------------ | |
0 | 140 - Haiku/gmake build doesn't build dynload due to the fact, that elf.h is not found |
141 on default installations (one has to install the system headers) | |
142 * add to doc | |
143 - Solaris/gmake build doesn't build dynload and tests anymore (maybe not even dyncallback) | |
144 - test arm32/ATPCS/THUMB (and then change Status in doc Appendix) | |
145 - look over code and fix TODO or @@@ marks | |
146 - add ppc-support to doc (both, 32 and 64, as well as little and big endian remarks) | |
147 | |
148 nice to have: | |
149 ------------- | |
150 - update: microsoft visual c++ build files - integrate all test suites in solution file | |
151 - consistency: on x64 platforms: make both ABIs available ('win64','sysv') for all x64 OS ports | |
152 - microsoft build enhancement: autodetect assembly via C preprocessor (like with .S gcc files) | |
153 - test/thunk: some platforms do not allow for allocation of executable code on heap and stack -- | |
154 currently this test will crash, maybe we should collect information which platforms allow and which not. | |
155 | |
156 bugs: | |
157 ----- | |
88 | 158 - setting callconv, specifically for platforms that have only one (default)) excepts on some |
6 | 159 platforms, eg. setting X64_sysv on amd64/Linux - keeping cdecl which is the same in |
88 | 160 this case, works (this should work now...) |
0 | 161 - vararg function calls don't work for ARM THUMB mode (Daniel's new interface for modesetting for varag |
162 args should be used); adapt test/ellipsis and/or retest | |
163 | |
164 missing implementations (descending priority): | |
165 ---------------------------------------------- | |
166 - riscv | |
167 - itanium | |
88 | 168 - superh/j-core |
0 | 169 - 68k, 88k, 6502, etc. |
88 | 170 - arc |
0 | 171 - alpha |
172 - cell | |
173 - blackfin | |
88 | 174 - seaforth |
21 | 175 - s/390 |
0 | 176 - z80 |
177 - hppa | |
178 - vax | |
179 - atmel avr | |
180 - propeller | |
181 - amd29k | |
182 |