This is the mail archive of the
mailing list for the glibc project.
Re: PATCH: Mark __dso_handle hidden
On Thu, Jun 16, 2011 at 11:04 AM, Ulrich Drepper <firstname.lastname@example.org> wrote:
> On Thu, Jun 16, 2011 at 09:15, H.J. Lu <email@example.com> wrote:
>> On another platform, bad atexit implementation called from DSO caused
>> weird run-time problems. The same problem can happen with glibc. ?The
>> worse thing can happen with my patch is people will old compilers will
>> get a link-time error, instead of strange run-time problems.
> No. ?If there is no __dso_handle symbol the reference is NULL and
> therefore atexit can work nicely when used in programs. ?It doesn't
> work in DSOs but that was always the case before the introduction of
> You didn't say why you wanted this change to happen. ?Just because of
> this minute code improvement? ?That's not really a reason to
> potentially break some situations.
The result of calling such atexit from DSO is weird run-time
problems, ranging from crash to incorrect result. My patch
will prevent that. As for link-time failure my patch introduces
with the older compilers, the work around is very trivial.