From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B63653858D29; Wed, 20 Jan 2021 19:33:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B63653858D29 From: "i at maskray dot me" To: glibc-bugs@sourceware.org Subject: [Bug dynamic-link/27220] New: Migrate away from nested functions Date: Wed, 20 Jan 2021 19:33:17 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: dynamic-link X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: i at maskray dot me X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2021 19:33:17 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27220 Bug ID: 27220 Summary: Migrate away from nested functions Product: glibc Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: dynamic-link Assignee: unassigned at sourceware dot org Reporter: i at maskray dot me Target Milestone: --- Some files use this obscure GCC feature=20 https://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html Most of them are loader code. These instances are likely the biggest problem preventing glibc from being built with Clang. posix/regcomp.c nss/makedb.c elf/do-rel.h elf/dynamic-link.h elf/get-dynamic-info.h elf/dl-reloc-static-pie.c elf/dl-reloc.c elf/dl-conflict.c elf/rtld.c sysdeps/aarch64/dl-machine.h sysdeps/x86_64/dl-machine.h sysdeps/powerpc/powerpc64/dl-machine.h For many instances, migrating away from nested functions is a clear readabi= lity win, even for GCC, e.g. a #include "dynamic-link.h" in the middle of elf/dl-reloc.c , which uses RESOLVE_MAP/RESOLVE/RESOLVE_CONFLICT_FIND_MAP defined above. --=20 You are receiving this mail because: You are on the CC list for the bug.=