This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/3] Mark __libc_multiple_libcs with attribute_hidden [BZ #18822]


On 08/21/2017 01:16 PM, H.J. Lu wrote:
> On Mon, Aug 21, 2017 at 3:03 AM, Florian Weimer <fweimer@redhat.com> wrote:
>> On 08/20/2017 04:12 PM, H.J. Lu wrote:
>>> +/* Set nonzero if we have to be prepared for more than one libc being
>>> +   used in the process.  */
>>> +extern int __libc_multiple_libcs attribute_hidden;
>>
>> I think the comment gives the wrong impression.  The flag is not always
>> set if there are multiple libcs in the process, and it certainly is not
>> set just because we might end up having multiple libcs in the future
>> (which is why the “have to be prepared” part irks me).
> 
> I copied it from csu/init-first.c:
> 
> /* Set nonzero if we have to be prepared for more than one libc being
>    used in the process.  Safe assumption if initializer never runs.  */
> int __libc_multiple_libcs attribute_hidden = 1;

Ahh, that's only appropriate for this particular definition.

> Should I just leave out the comments?

Yes please, unless someone can describe what the flag actually means (I
tried to use it in the past, and it did not work reliably with inner libcs).

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]