This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: glibc-2.4 __stack_chk_guard/__pointer_chk_guard
- From: Jakub Jelinek <jakub at redhat dot com>
- To: "Peter S. Mazinger" <ps dot m at gmx dot net>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 7 Mar 2006 10:13:07 +0100
- Subject: Re: glibc-2.4 __stack_chk_guard/__pointer_chk_guard
- References: <Pine.LNX.4.44.0603070946300.25202-100000@lnx.bridge.intra>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Mar 07, 2006 at 09:50:37AM +0100, Peter S. Mazinger wrote:
> Both __stack_chk_guard/__pointer_chk_guard are exported unconditionally
> (elf/Versions), but they are guarded w/ #ifndef
> THREAD_SET_STACK_GUARD/THREAD_SET_POINTER_GUARD in elf/rtld.c and
> csu/libc-start.c.
>
> What is the correct approach?
> 1. Guard them in elf/Versions.
> 2. Define them unconditionally in the mentioned .c files.
3. Leave glibc as is.
The linker does the desirable thing, if the symbol isn't defined
anywhere but in the version script, it of course isn't exported.
Why should we conditionalize it?
Jakub