Skip to content

AssemblyStore documentation needs to be updated #10265

@grendello

Description

@grendello

Android framework version

net10.0-android (Preview)

Description

AssemblyStore format documentation in Documentation/project-docs/AssemblyStores.md is outdated. Update the document while observing the following indications:

  • File format is described in this C++ comment:
    // Assembly store format
    //
    // Each target ABI/architecture has a single assembly store file, composed of the following parts:
    //
    // [HEADER]
    // [INDEX]
    // [ASSEMBLY_DESCRIPTORS]
    // [ASSEMBLY_NAMES]
    // [ASSEMBLY DATA]
    //
    // Formats of the sections above are as follows:
    //
    // HEADER (fixed size)
    // [MAGIC] uint; value: 0x41424158
    // [FORMAT_VERSION] uint; store format version number
    // [ENTRY_COUNT] uint; number of entries in the store
    // [INDEX_ENTRY_COUNT] uint; number of entries in the index
    // [INDEX_SIZE] uint; index size in bytes
    //
    // INDEX (variable size, HEADER.ENTRY_COUNT*2 entries, for assembly names with and without the extension)
    // [NAME_HASH] uint on 32-bit platforms, ulong on 64-bit platforms; xxhash of the assembly name
    // [DESCRIPTOR_INDEX] uint; index into in-store assembly descriptor array
    // [IGNORE] byte; if set to anything other than 0, the assembly is to be ignored when loading
    //
    // ASSEMBLY_DESCRIPTORS (variable size, HEADER.ENTRY_COUNT entries), each entry formatted as follows:
    // [MAPPING_INDEX] uint; index into a runtime array where assembly data pointers are stored
    // [DATA_OFFSET] uint; offset from the beginning of the store to the start of assembly data
    // [DATA_SIZE] uint; size of the stored assembly data
    // [DEBUG_DATA_OFFSET] uint; offset from the beginning of the store to the start of assembly PDB data, 0 if absent
    // [DEBUG_DATA_SIZE] uint; size of the stored assembly PDB data, 0 if absent
    // [CONFIG_DATA_OFFSET] uint; offset from the beginning of the store to the start of assembly .config contents, 0 if absent
    // [CONFIG_DATA_SIZE] uint; size of the stored assembly .config contents, 0 if absent
    //
    // ASSEMBLY_NAMES (variable size, HEADER.ENTRY_COUNT entries), each entry formatted as follows:
    // [NAME_LENGTH] uint: length of assembly name
    // [NAME] byte: UTF-8 bytes of assembly name, without the NUL terminator
  • The following native struct types are relevant to assembly stores: AssemblyStoreHeader, AssemblyStoreIndexEntry, AssemblyStoreEntryDescriptor
  • There exists only one Assembly Store per architecture.
  • Assembly Store file is placed in the architecture-specific lib/ directory in the APK or AAB archives.
  • Assembly Store file in the APK or AAB archive is found inside an ELF shared library
  • Put native struct documentation in Documentation/project-docs/AssemblyStores.md. Place it in a separate document section.

Metadata

Metadata

Assignees

Labels

needs-triageIssues that need to be assigned.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions