public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "carlos at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/15794] move AT_* constants definition from elf.h into sysdeps (bits) directory
Date: Mon, 25 Nov 2013 20:58:00 -0000	[thread overview]
Message-ID: <bug-15794-131-FZrHRmuGoK@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-15794-131@http.sourceware.org/bugzilla/>

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

--- Comment #9 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Adam Conrad from comment #7)
> The problem with this patch is that any code that previously included elf.h
> to get the AT_ defines is now broken (*cough*GCC*cough*).  Are you expecting
> that any such code should have an include <sys/auxv.h>, or should elf.h be
> pulling in bits/auxv.h for backward compat?

In my opinion the best way forward is:

(a) Move AT_NULL to AT_ENTRY into sysdeps/generic/bits/auvx-base.h, and
document that these 10 entries are os-independent.

(b) Move all other AT_* entries into sysdeps/unix/sysv/linux/bits/auxv.h. Have
bits/auxv.h include bits/auxv-base.h first. Other OSs can override with their
own bits/auxv.h.

(c) Have elf.h include bits/auxv-base.h (not bits/auxv.h) to provide the
os-independent auxv constants. This should prevent some source breakage and
allow the continued use of AT_NULL to AT_ENTRY Which appear to be the only set
of truly os-independent AT_* constants.

(d) Have sys/auxv.h include bits/auxv.h to make all AT_* constants available
for use with getauxval().

(e) Post those patches to libc-alpha for review, and make sure that you have
gcc, binutils, and gdb patches ready if the changes for (a), (b), and (c) break
any of the core toolchain components.

Once you get consensus from glibc it's easier to go to the other projects and
post patches. If a project uses a constant outside of the general
os-independent range (values 0-10) then you'll need a configure check to
determine if you need to include sys/auxv.h or not. It's probably sufficient to
detect if auxv.h is present, and if it is include it after including elf.h. So
you can crib up a configure check for that and use it for all projects that
need a fix (some of which might already have such a check).

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


  parent reply	other threads:[~2013-11-25 20:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-27  8:21 [Bug libc/15794] New: " Petr.Salinger at seznam dot cz
2013-07-27  9:35 ` [Bug libc/15794] " neleai at seznam dot cz
2013-07-27  9:35 ` [Bug libc/15794] New: " Ondřej Bílka
2013-07-28  6:19 ` [Bug libc/15794] " Petr.Salinger at seznam dot cz
2013-07-28 17:12 ` joseph at codesourcery dot com
2013-07-29  7:28 ` Petr.Salinger at seznam dot cz
2013-07-29  7:32 ` Petr.Salinger at seznam dot cz
2013-11-25 19:44 ` adconrad at 0c3 dot net
2013-11-25 20:03 ` adconrad at 0c3 dot net
2013-11-25 20:58 ` carlos at redhat dot com [this message]
2013-11-25 21:34 ` adconrad at 0c3 dot net
2013-11-27  3:02 ` bugdal at aerifal dot cx
2014-06-13 13:18 ` fweimer at redhat dot com
2023-05-26 15:03 ` cvs-commit at gcc dot gnu.org

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-15794-131-FZrHRmuGoK@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).