re PR sanitizer/55617 (static constructors are not being instrumented correctly on...
authorAlexander Potapenko <glider@google.com>
Mon, 4 Feb 2013 20:08:29 +0000 (20:08 +0000)
committerMike Stump <mrs@gcc.gnu.org>
Mon, 4 Feb 2013 20:08:29 +0000 (20:08 +0000)
commitae526fe5cb554626a0b656c8c13ad1f66844fa43
treec7b15cd7c8f45511faa73368fafacaa92984f621
parent240d63482d9342b7ac8632ded9ec81785be5faa4
re PR sanitizer/55617 (static constructors are not being instrumented correctly on darwin)

2013-02-04  Alexander Potapenko <glider@google.com>
            Jack Howarth  <howarth@bromo.med.uc.edu>
        Jakub Jelinek  <jakub@redhat.com>

PR sanitizer/55617
* config/darwin.c (sort_ctor_records): Stabilized qsort
on constructor priority by using original position.
(finalize_ctors): New routine to sort constructors by
priority before use in assemble_integer.
(machopic_asm_out_constructor): Use finalize_ctors if needed.

Co-Authored-By: Jack Howarth <howarth@bromo.med.uc.edu>
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r195735
gcc/ChangeLog
gcc/config/darwin.c