From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4306 invoked by alias); 25 Nov 2013 20:58:12 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org Received: (qmail 4264 invoked by uid 48); 25 Nov 2013 20:58:09 -0000 From: "carlos at redhat dot com" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: carlos at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-11/txt/msg00278.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=15794 --- Comment #9 from Carlos O'Donell --- (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 , 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.