[llvm-commits] [compiler-rt] r146529 - in /compiler-rt/trunk/lib/asan: Makefile.old asan_rtl.cc

Kostya Serebryany kcc at google.com
Thu Dec 15 15:11:41 PST 2011


Done. r146703


On Thu, Dec 15, 2011 at 1:52 AM, Alexander Potapenko <glider at google.com>wrote:

> I suggest to revert the asan_rtl.cc part, because we can't use
> ASAN_OPTIONS now.
>
> On Wed, Dec 14, 2011 at 4:19 AM, Kostya Serebryany <kcc at google.com> wrote:
> > Author: kcc
> > Date: Tue Dec 13 18:19:03 2011
> > New Revision: 146529
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=146529&view=rev
> > Log:
> > [asan] insert __asan_init into ".preinit_array" section. Linux-only.
> >
> > Modified:
> >    compiler-rt/trunk/lib/asan/Makefile.old
> >    compiler-rt/trunk/lib/asan/asan_rtl.cc
> >
> > Modified: compiler-rt/trunk/lib/asan/Makefile.old
> > URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/Makefile.old?rev=146529&r1=146528&r2=146529&view=diff
> >
> ==============================================================================
> > --- compiler-rt/trunk/lib/asan/Makefile.old (original)
> > +++ compiler-rt/trunk/lib/asan/Makefile.old Tue Dec 13 18:19:03 2011
> > @@ -287,8 +287,6 @@
> >  $(LIBASAN_A): $(BIN) $(LIBASAN_OBJ) $(MAKEFILE)
> >        mkdir -p $(LIBASAN_INST_DIR)
> >        ar ru $@ $(LIBASAN_OBJ)
> > -       $(CXX) -shared $(CFLAGS) $(LIBASAN_OBJ) $(LD_FLAGS) -o
> $(BIN)/libasan$(SUFF).so
> > -
> >
> >  TEST_OBJECTS_COMMON=\
> >             $(BIN)/asan_test$(SUFF).o \
> >
> > Modified: compiler-rt/trunk/lib/asan/asan_rtl.cc
> > URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_rtl.cc?rev=146529&r1=146528&r2=146529&view=diff
> >
> ==============================================================================
> > --- compiler-rt/trunk/lib/asan/asan_rtl.cc (original)
> > +++ compiler-rt/trunk/lib/asan/asan_rtl.cc Tue Dec 13 18:19:03 2011
> > @@ -774,3 +774,11 @@
> >     Report("AddressSanitizer Init done\n");
> >   }
> >  }
> > +
> > +#ifdef __linux__
> > +// On Linux, we force __asan_init to be called before anyone else
> > +// by placing it into .preinit_array section.
> > +// FIXME: do we have anything like this on Mac?
> > +__attribute__((section(".preinit_array")))
> > +  typeof(__asan_init) *__asan_preinit =__asan_init;
> > +#endif
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
>
> --
> Alexander Potapenko
> Software Engineer
> Google Moscow
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111215/5530c390/attachment.html>


More information about the llvm-commits mailing list