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

Support for roslyn #4

Closed
3F opened this issue Jul 17, 2016 · 4 comments
Closed

Support for roslyn #4

3F opened this issue Jul 17, 2016 · 4 comments

Comments

@3F
Copy link
Owner

3F commented Jul 17, 2016

the request about official support of this feature, here:

and:

If you prepare a pull request, please call it to my attention and I will shepherd it.

so, TODO

@den-run-ai
Copy link

Does this include .NET Core and non-Windows platforms?

@3F
Copy link
Owner Author

3F commented Sep 18, 2016

well, it probably should include some changes also for coreclr if you meant this.

I did not look this feature in details 'what and where' we should change, however, mainly I don't want to use this important feature via ILAsm only o_o

I already wrote to Robert that's crazy why the MS do not want to support this initially, or why this only as part of ILasm (the features via .export directive from ILAsm, seems starting with 2.0)

The current DllExport as flexible option instead of manual changing, but it still requires a few ugly things: the any modifying of references (to remove our assembly from final dll), external executable ildasm/ilasm, and generally the external dependency at all.

Therefore, I have more priority task to develop the new way to avoid all of this inconvenience: Improvements for roslyn & coreclr and/or the any direct modifying of assemblies instead of ildasm/ilasm.

currently I have no time for this :( so it will be considered only later

updated:

I also added short info in readme.md where to look implementation of this features (ILAsm .export directive)

source code:

see grammar from asmparse and move to writer:

...
if(PASM->m_pCurMethod->m_dwExportOrdinal == 0xFFFFFFFF)
{
  PASM->m_pCurMethod->m_dwExportOrdinal = $3;
  PASM->m_pCurMethod->m_szExportAlias = $6;
  if(PASM->m_pCurMethod->m_wVTEntry == 0) PASM->m_pCurMethod->m_wVTEntry = 1;
  if(PASM->m_pCurMethod->m_wVTSlot  == 0) PASM->m_pCurMethod->m_wVTSlot = $3 + 0x8000;
}
...
EATEntry*   pEATE = new EATEntry;
pEATE->dwOrdinal = pMD->m_dwExportOrdinal;
pEATE->szAlias = pMD->m_szExportAlias ? pMD->m_szExportAlias : pMD->m_szName;
pEATE->dwStubRVA = EmitExportStub(pGlobalLabel->m_GlobalOffset+dwDelta);
m_EATList.PUSH(pEATE);
...
// logic of definition of records into EXPORT_DIRECTORY (see details from PE format)
HRESULT Assembler::CreateExportDirectory()  
{
...
    IMAGE_EXPORT_DIRECTORY  exportDirIDD;
    DWORD                   exportDirDataSize;
    BYTE                   *exportDirData;
    EATEntry               *pEATE;
    unsigned                i, L, ordBase = 0xFFFFFFFF, Ldllname;
    ...

@WillFM
Copy link

WillFM commented Feb 17, 2018

ping.

@3F
Copy link
Owner Author

3F commented Aug 16, 2021

Despite #193 (comment) this task is no longer relevant

@3F 3F closed this as completed Aug 16, 2021
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