This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] PR ld/15365: Restrict __ehdr_start's export class (was: RE: [COMMITTED PATCH] Use __ehdr_start, if available, as fallback for AT_PHDR.)
- From: Roland McGrath <roland at hack dot frob dot com>
- To: "Maciej W. Rozycki" <macro at codesourcery dot com>
- Cc: Steve Ellcey <Steve dot Ellcey at imgtec dot com>, Richard Sandiford <rdsandiford at googlemail dot com>, Alan Modra <amodra at gmail dot com>, "GNU C. Library" <libc-alpha at sourceware dot org>, <binutils at sourceware dot org>
- Date: Wed, 24 Apr 2013 16:26:37 -0700 (PDT)
- Subject: Re: [PATCH] PR ld/15365: Restrict __ehdr_start's export class (was: RE: [COMMITTED PATCH] Use __ehdr_start, if available, as fallback for AT_PHDR.)
- References: <20130328231733 dot 3F8F12C0A5 at topped-with-meat dot com> <1C0E790D7E4C75418622FD04CC2A1172015DEBEF at bamail02 dot ba dot imgtec dot org> <20130408224718 dot 06CE22C088 at topped-with-meat dot com> <alpine dot DEB dot 1 dot 10 dot 1304222249290 dot 1453 at tp dot orcam dot me dot uk>
I think STV_HIDDEN is fine for __ehdr_start. I made it STV_DEFAULT because
that's what's done for similar magic symbols such as __start_section_name.
IMHO the linker(s) should be consistent and produce STV_HIDDEN for those
too, but that's not my call (and I didn't care to pursue that unrelated
issue when I was implementing __ehdr_start).
The libc change is fine regardless of the resolution of binutils issues.
(It's not a material optimization for any target I understand, since it's
only in code that's compiled non-PIC anyway. But I concur about its
correctness as a documentation of intent.) Go ahead and commit that.