This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Export stack_used as __stack_used
- From: Florian Weimer <fweimer at redhat dot com>
- To: Gary Benson <gbenson at redhat dot com>
- Cc: libc-alpha at sourceware dot org, Pedro Alves <palves at redhat dot com>
- Date: Fri, 17 Jun 2016 22:17:33 +0200
- Subject: Re: [PATCH] Export stack_used as __stack_used
- Authentication-results: sourceware.org; auth=none
- References: <20160613112351 dot GA655 at blade dot nx> <1466163476-10459-1-git-send-email-gbenson at redhat dot com> <f6867d8f-3532-1ac2-cc7f-e7bb6ea12202 at redhat dot com> <20160617195018 dot GA20374 at blade dot nx>
On 06/17/2016 09:50 PM, Gary Benson wrote:
Florian Weimer wrote:
On 06/17/2016 01:37 PM, Gary Benson wrote:
This commit renames "stack_used" as "__stack_used" and changes it
from a static variable in allocatestack.c to an internally
exported symbol available to all nptl source files. This fixes
bug 17629 (and thus GDB PR 9635).
What do you mean by âexportâ? The __ prefix suggests that you want
to export it as a symbol (probably GLIBC_PRIVATE), but I think you'd
need to update nptl/Versions in this case.
No, I don't need that, it needs to be visible outside allocatestack.c
but it doesn't need to be visible in, e.g., the output of "objdump -T".
Okay, then please declare it attribute_hidden.
If the variable remains nptl-internal, I expect that you could turn
it into a hidden symbol, and keep its current name.
I may be wrong but I think its the rename that fixes the GDB bug.
Only if GDB explicitly searches for __stack_used (and that with the help
of debugging information because it's not exported).
There isn't even a reference from libthread_db.
If it's visible outside of allocatestack.c (i.e. it's not "static")
then it should be named with a double-underscore, no?
Hmm, yes for the benefit of static linking and namespace cleanliness.
So perhaps keep __stack_used, but make it hidden as well. (I don't
understand the nocommon business and what this addresses.)
Florian