File: README.md

package info (click to toggle)
emscripten 3.1.69%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 121,860 kB
  • sloc: ansic: 636,110; cpp: 425,974; javascript: 78,401; python: 58,404; sh: 49,154; pascal: 5,237; makefile: 3,366; asm: 2,415; lisp: 1,869
file content (28 lines) | stat: -rw-r--r-- 1,128 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Source code for C/C++ system libaries
=====================================

This directory contains the source code for libc, libc++ and other C/C++ system
libraries.  Where possible these are clones of upstream projects (e.g. musl).
For more details about each library see the individual readme files in the
subdirectoris.

Static constructor ordering
---------------------------

These are several static constructors in the emscripten system libraries and they
are in a specific order.  When adding/remove/updating these please update this
document.

These current set of static constructors in system libraries and their priorities
(lowest run first) are:

- 1: `emscripten_stack_init` (stack_limits.S)
- 47: `initialize_emmalloc_heap` (emmalloc.c)
- 48: `__emscripten_init_main_thread` (pthread/library_pthread.c)
- 49: `init_file_data` (generated by file_packager.py)
- 50: asan init (??)
- 100: `WasmFS wasmFS` (wasmfs/wasmfs.cpp)

Priorities 0 - 100 are reserved for system libraries and user-level
constructors should all run at 101 and above (for example libc++ initializes
its standard I/O streams at priority 101).