Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support build #4

Merged
merged 1 commit into from
May 20, 2024
Merged

support build #4

merged 1 commit into from
May 20, 2024

Conversation

huangqinjin
Copy link
Owner

@huangqinjin huangqinjin commented May 19, 2024

DONE

  • linked to static runtime libraries by -MT to provide missing obj files (some ucrt source code missing, e.g. math library).
  • linked to OneCore_apiset.lib instead of kernel32.lib.
  • corecrt_internal_state_isolation.h reverse-engineered, the core header to support dual state globals (including per-thread-data PTD, actually per-fiber-data).
  • nt.h completed referenced fields of _TEB and _PEB.
  • config.h defined macros required for compiling.
  • oswrappers.cpp defined all twin functions (prefixed with _o_) to access the OS copy of dual state globals.
  • ucrtbase.def exported all symbols.
  • matherr.cpp defined dual_state_global user_matherr. It is needed since static ucrt library does not use global states.

TODO

  • check whether linking to msvcrt is needed other than libcmt.
  • check whether linked static runtime libraries libcurt and libvcruntime contain obj files that defines dual state globals. If yes, the obj files need to be reverse-engineered.

@huangqinjin huangqinjin linked an issue May 19, 2024 that may be closed by this pull request
@huangqinjin huangqinjin removed a link to an issue May 20, 2024
@huangqinjin huangqinjin linked an issue May 20, 2024 that may be closed by this pull request
@huangqinjin huangqinjin merged commit d6e817a into master May 20, 2024
@huangqinjin huangqinjin deleted the build branch May 20, 2024 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to build UCRT
1 participant