Date: Tue, 2 Apr 2019 17:51:28 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345806 - head/contrib/llvm/tools/clang/lib/CodeGen Message-ID: <201904021751.x32HpS8T014694@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Tue Apr 2 17:51:28 2019 New Revision: 345806 URL: https://svnweb.freebsd.org/changeset/base/345806 Log: Pull in r357362 from upstream clang trunk (by David Chisnall): [objc-gnustep] Use .init_array not .ctors when requested. This doesn't make a difference most of the time but FreeBSD/ARM doesn't run anything in the .ctors array. This should help with updating the libobjc2 port for armv7. Requested by: theraven Upstream PR: https://github.com/gnustep/libobjc2/issues/83 MFC after: 3 days Modified: head/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp Modified: head/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp Tue Apr 2 14:46:10 2019 (r345805) +++ head/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp Tue Apr 2 17:51:28 2019 (r345806) @@ -1519,7 +1519,12 @@ class CGObjCGNUstep2 : public CGObjCGNUstep { if (CGM.getTriple().isOSBinFormatCOFF()) InitVar->setSection(".CRT$XCLz"); else - InitVar->setSection(".ctors"); + { + if (CGM.getCodeGenOpts().UseInitArray) + InitVar->setSection(".init_array"); + else + InitVar->setSection(".ctors"); + } InitVar->setVisibility(llvm::GlobalValue::HiddenVisibility); InitVar->setComdat(TheModule.getOrInsertComdat(".objc_ctor")); CGM.addUsedGlobal(InitVar);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904021751.x32HpS8T014694>