diff options
author | Florian Weimer <fweimer@redhat.com> | 2022-09-22 12:10:41 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2022-09-22 12:10:41 +0200 |
commit | 340097d0b50eff9d3058e06c6989ae398c653d4a (patch) | |
tree | 6d1b62d28a6b5bf0e2748bbc9936ea4f6704cddf /localedata | |
parent | e6e6184bed490403811771fa527eb95b4ae53c7c (diff) | |
download | glibc-340097d0b50eff9d3058e06c6989ae398c653d4a.zip glibc-340097d0b50eff9d3058e06c6989ae398c653d4a.tar.gz glibc-340097d0b50eff9d3058e06c6989ae398c653d4a.tar.bz2 |
elf: Extract glibcelf constants from <elf.h>
The need to maintain elf/elf.h and scripts/glibcelf.py in parallel
results in a backporting hazard: they need to be kept in sync to
avoid elf/tst-glibcelf consistency check failures. glibcelf (unlike
tst-glibcelf) does not use the C implementation to extract constants.
This applies the additional glibcpp syntax checks to <elf.h>.
This changereplaces the types derived from Python enum types with
custom types _TypedConstant, _IntConstant, and _FlagConstant. These
types have fewer safeguards, but this also allows incremental
construction and greater flexibility for grouping constants among
the types. Architectures-specific named constants are now added
as members into their superclasses (but value-based lookup is
still restricted to generic constants only).
Consequently, check_duplicates in elf/tst-glibcelf has been adjusted
to accept differently-named constants of the same value if their
subtypes are distinct. The ordering check for named constants
has been dropped because they are no longer strictly ordered.
Further test adjustments: Some of the type names are different.
The new types do not support iteration (because it is unclear
whether iteration should cover the all named values (including
architecture-specific constants), or only the generic named values),
so elf/tst-glibcelf now uses by_name explicit (to get all constants).
PF_HP_SBP and PF_PARISC_SBP are now of distinct types (PfHP and
PfPARISC), so they are how both present on the Python side. EM_NUM
and PT_NUM are filtered (which was an oversight in the old
conversion).
The new version of glibcelf should also be compatible with earlier
Python versions because it no longer depends on the enum module and its
advanced features.
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'localedata')
0 files changed, 0 insertions, 0 deletions