mirror of
https://github.com/golang/go
synced 2024-11-23 14:26:17 +00:00
2e97c30d8d
Fixes #63952 Change-Id: Icf93e57e62243d9c3306d4e1c5dadb3f62747710 GitHub-Last-Rev: 5c2952760063474f3aac338fe5bdb65bde238ab6 GitHub-Pull-Request: golang/go#69850 Reviewed-on: https://go-review.googlesource.com/c/go/+/619077 Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
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.