Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333932 - Gate_enterModule() can't be used outside a module
Summary: Gate_enterModule() can't be used outside a module
Status: ASSIGNED
Alias: None
Product: RTSC
Classification: Technology
Component: Runtime (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Dave Russo CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-10 21:24 EST by Dave Russo CLA
Modified: 2011-11-24 12:58 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Russo CLA 2011-01-10 21:24:51 EST
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