diff options
author | Zack Weinberg <zackw@panix.com> | 2019-03-14 21:03:23 -0400 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2020-01-08 12:56:33 -0500 |
commit | 86130d1b3749542aba2ac7949b6d2fe270a4a4b8 (patch) | |
tree | ca8a5b6cbed8f878be572b71433a67d5c21bbea2 /elf/noload.c | |
parent | 795eb42e060039b6d624b7e613d8c334ac70580c (diff) | |
download | glibc-86130d1b3749542aba2ac7949b6d2fe270a4a4b8.zip glibc-86130d1b3749542aba2ac7949b6d2fe270a4a4b8.tar.gz glibc-86130d1b3749542aba2ac7949b6d2fe270a4a4b8.tar.bz2 |
Add check-obsolete-constructs checker for nested includes.
As a first step toward minimizing the number of public headers that
include other public headers, add a checker to check-obsolete-constructs
that will error out on any such inclusion that’s not on a whitelist.
The whitelist is initialized to all of the nested inclusions that
already exist; subsequent patches will remove nested inclusions and
shrink the whitelist, hopefully to the point where we only have
nested inclusions as mandated by the relevant standards.
Hurd headers and Sun RPC headers and interface definitions are exempt
from these checks. The former is because minimizing their
cross-inclusions would require making Hurd-specific design decisions,
which I feel is best left to the Hurd maintainers. The latter is
because they are obsolete in glibc; cleanups should be done under the
auspices of TIRPC.
* scripts/check-obsolete-constructs.py
(UNIVERSAL_ALLOWED_INCLUDES, HEADER_ALLOWED_INCLUDES)
(SYSDEP_ALLOWED_INCLUDES, NESTED_INCLUDES_EXEMPT_RE)
(get_allowed_nested, NestedIncludeCheckerWhitelistOnly)
(NestedIncludeChecker): New.
(HeaderChecker): Instantiate and run a NestedIncludeChecker
for each header.
Diffstat (limited to 'elf/noload.c')
0 files changed, 0 insertions, 0 deletions