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

Allow exporting of variables / constants #24

Open
1 task
OmegaExtern opened this issue Dec 19, 2016 · 3 comments
Open
1 task

Allow exporting of variables / constants #24

OmegaExtern opened this issue Dec 19, 2016 · 3 comments

Comments

@OmegaExtern
Copy link

OmegaExtern commented Dec 19, 2016

Read this comment.


Depends on:

@3F
Copy link
Owner

3F commented Dec 19, 2016

But first we need to improve ILAsm grammar + writer and probably mscorpe
I will look this later with similar task from #23

Today only this:

for(WORD j = 0; (pMD = pClass->m_MethodList.PEEK(j)); j++)
{
...
    EATEntry* pEATE;
    /*
        struct	EATEntry
        {
            DWORD	dwStubRVA;
            DWORD	dwOrdinal;
            char*	szAlias;
        };    
    */
    ...
    m_EATList.PUSH(pEATE);

another interesting, I forgot to implement support of this variables (constants) for Conari engine, hmm...

@3F 3F added the enhancement label Dec 19, 2016
@3F
Copy link
Owner

3F commented Dec 19, 2016

to be clear for '.field' directives:

.field public static literal int32 'MyField' at '@00007400' // RVA: 0x00001CE8

will create field that have RVA associated with it, but that's another story with IMAGE_COR20_HEADER

@Licho1
Copy link

Licho1 commented Jul 27, 2021

This would be super useful. For example NVIDIA and AMD drivers use variable to decide when to switch to dedicated video card.

extern "C" 
{
  __declspec(dllexport) unsigned long NvOptimusEnablement = 0x00000001;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants