Locating the Writable Static Area (WSA)
The Writable Static Area (WSA) address is the base address of the
writable static area which is available for all C and C++ programs
except C programs compiled with the NORENT compiler option. If you
have C code compiled with the RENT option or C++ code
(hereafter called RENT code) you must determine the base address of
the WSA if you want to calculate the address of a static or external
variable. Use the following table to determine where to find the WSA
base address:
| If you want the WSA base address for: | Locate the WSA base address in: |
|---|---|
| application code | the WSA address field in the Enclave Control Blocks section |
| a fetched module | the WSA address field of the Fetch() Information section for the fetch() function pointer for which you are interested |
| a DLL | the corresponding WSA address in the DLL Information section |
Use the WSA base address to locate the WSA in the Enclave Storage section.