mirror of https://github.com/golang/go.git
1.3 KiB
1.3 KiB
The [debug/elf] package adds several new constants, types, and methods to add support for handling dynamic versions and version flags in ELF (Executable and Linkable Format) files:
Several new types have been introduced:
- [DynamicVersion] struct represents a dynamic version entry in the ELF file.
- [DynamicVersionDep] struct represents a dependency of a dynamic version.
- [DynamicVersionNeed] struct represents a required dynamic version in the ELF file.
- [DynamicVersionFlag] is a new type defined as uint16, representing flags for dynamic versions.
- [VER_FLG_BASE] version definition of the file.
- [VER_FLG_WEAK] weak version identifier.
- [VER_FLG_INFO] reference exists for informational purposes.
- [SymbolVersionFlag] is a new type defined as uint8, representing version flags for ELF symbols.
- [VerFlagNone] no flags.
- [VerFlagLocal] symbol has local scope.
- [VerFlagGlobal] symbol has global scope.
- [VerFlagHidden] symbol is hidden.
The following methods have been added:
- [File.DynamicVersionNeeds] method returns a list of dynamic version needs in the ELF file, representing dependencies required by the executable.
- [File.DynamicVersions] retrieves a list of dynamic versions defined in the ELF file.