Hello,
Recently came across this project and became an instant fan, so begin with many
thanks to you!
Saw Windows CE was added over the past five years and decided to extend the
support to older ARM-based devices. Wanted to discuss mainlining the changes
required to successfully support them.
1. Want to add Wl,-subsysver=2.11 for example.
* Rationale:
* By default TCC fills PE's subsystem with 4.0. Windows Loader reads
subsystem as ce_major and ce_minor versions. Out of the box without hex editing
these values the tcc generated binary does not run on older devices.
* This is a simple < 15 LOC across a few files and seems minor enough
that I expect others will agree about.
* Leaving out Wl,-subsysver= will default with the 4.0 selection of the
original author, so not expected to break anyone's existing development
environments.
* Also provides advantage to those who may wish to target newer CE
versions than 4.0.
2. Want to align the import and export function names in tccpe.c at runtime
decision based upon linking a windows ce PE for ARM when version is < 4.0.
* Rationale:
* The binary that tcc produces for older windows CE hangs the loader.
* After reshuffling things around in hex editor (can find the thread on
the hpcfactor website) I was able to overcome the hang. The import table
directory function name entries require 4byte alignment to be compatible with
tcc's PE structure is the hypothesis that I drew from the experimentation. The
MSeVC can get away with 2byte alignments, but they have a different arrangement
of sections, ordering, and so forth.
* Might consider a linker flag to control alignment independently
providing the user more flexibility. Thoughts?
3. For future discussion: tcc has self-hosted compiling and linking on a HP
Jornada 820 to execute on itself. hpcfactor thread has the screenshot and more
details.
* These changes are bigger and were made rapidly. I still need to refine
and being very specifically unique from 1&2, immediately above, it deserves its
own future thread and its own future commit.
* Want to hear early thoughts about likelihood of mainlining, so added
to this discussion.
* Re-emphasize: the changes associated with #3 are intended to be kept
separate from the changes for 1&2.
Please let me know any feedback about changing things or issuing a pull request.
Best Regards,
Jason
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel