public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "i at maskray dot me" <sourceware-bugzilla@sourceware.org>
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	[thread overview]
Message-ID: <bug-27220-131@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=27220

            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 
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 readability
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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

             reply	other threads:[~2021-01-20 19:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-20 19:33 i at maskray dot me [this message]
2021-01-20 20:04 ` [Bug dynamic-link/27220] " carlos at redhat dot com
2021-01-21 18:23 ` stanshebs at earthlink dot net
2021-01-21 19:39 ` carlos at redhat dot com
2021-01-22 14:21 ` tbaeder at redhat dot com
2021-08-23  4:37 ` i at maskray dot me
2022-04-12 17:55 ` carlos at redhat dot com
2023-04-13 20:22 ` carlos at redhat dot com
2023-04-13 20:37 ` adhemerval.zanella at linaro dot org
2023-04-13 23:02 ` i at maskray dot me

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-27220-131@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).