Skip to content

elf2bestape: Dynamic linking #3

@dogtopus

Description

@dogtopus

BPABI should allow converting AAELF shared objects to user format DLLs. Figure out how so we can generate DLLs and import tables.

(Specifically look at BPABI32 section 3.6.2 which is more or less exactly what we need to do, and section 4 for more details on the ways of converting ELF/AAELF data to user format)

  • Create an external Export Table format. It must keep track on symbol names, the corresponding export name (which will be symbol name if unspecified) and the ordinal.
  • For import table conversion: elf2bestape should read the Export Table of BPABI shared objects or optionally the DLL themselves and match the BPABI symbol name to both the export name and ordinal. (Also see BPABI32 section 6.2)
  • For export table generation: elf2bestape should read the Export Table and map the export name and the ordinal to the BPABI symbol name. (Also see BPABI32 section 6.2)
    • BPABI dynamic symbols with binding type STB_GLOBAL or STB_WEAK and visibility type STV_INTERNAL or STV_HIDDEN should be excluded from the list of available symbols to export.
  • We might also need to develop another tool that generates both an Export Table file and a stub BPABI shared object from a Besta PE DLL, for compiler interoperability purpose.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions