[PATCH 1/3] Mark __libc_multiple_libcs with attribute_hidden [BZ #18822]
H.J. Lu
hjl.tools@gmail.com
Mon Aug 21 11:48:00 GMT 2017
On Mon, Aug 21, 2017 at 4:19 AM, Florian Weimer <fweimer@redhat.com> wrote:
> 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).
>
Here is the updated patch. I will check it in shortly.
Thanks.
--
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Mark-__libc_multiple_libcs-with-attribute_hidden-BZ-.patch
Type: text/x-patch
Size: 3002 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20170821/287c9b81/attachment.bin>
More information about the Libc-alpha
mailing list