| Summary: | Gate_enterModule() can't be used outside a module | ||
|---|---|---|---|
| Product: | [Technology] RTSC | Reporter: | Dave Russo <d-russo> |
| Component: | Runtime | Assignee: | Dave Russo <d-russo> |
| Status: | ASSIGNED --- | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | cring, dfriedland |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
xdc.runtime.Main is designed to allow any application code to behave as though it were part of the "Main module"; e.g., all uses of Log and Gate should behave as though they came from xdc.runtime.Main. But if: 1. application code uses Gate_enterModule(), and 2. a configuration is created that is partially linked, and 3. the configuration is whole program optimized you'll get linker errors complaining that, for example, "xdc_runtime_Main_Module_GateProxy_enter__E is undefined" This is is a consequence of the fact that the generated big.c does not declare Main's GateProxy functions are being external entry points; during wpo, these functions are removed because the only references to these functions is in code that is not part of the partial link. If big.c contained the following the problem would be resolved: #ifdef __ti__ #pragma FUNC_EXT_CALLED(xdc_runtime_Main_Module_GateProxy_leave__E); #pragma FUNC_EXT_CALLED(xdc_runtime_Main_Module_GateProxy_enter__E); #pragma FUNC_EXT_CALLED(xdc_runtime_Main_Module_GateProxy_query__E); #endif