Skip to content

Instantly share code, notes, and snippets.

@ice799
Created June 16, 2011 18:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ice799/1029857 to your computer and use it in GitHub Desktop.
Save ice799/1029857 to your computer and use it in GitHub Desktop.
On Thu, Jun 16, 2011 at 09:15, H.J. Lu <hjl.tools@gmail.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
__dso_handle.
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment