Date: Tue, 03 Sep 2019 14:06:22 -0000 From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345952 - in stable: 11/contrib/llvm/tools/clang/lib/CodeGen 12/contrib/llvm/tools/clang/lib/CodeGen Message-ID: <201904051609.x35G9N20080059@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Fri Apr 5 16:09:23 2019 New Revision: 345952 URL: https://svnweb.freebsd.org/changeset/base/345952 Log: MFC r345806: 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 Modified: stable/12/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp Directory Properties: stable/11/ (props changed) Modified: stable/12/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp ============================================================================== --- stable/12/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp Fri Apr 5 15:53:27 2019 (r345951) +++ stable/12/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp Fri Apr 5 16:09:23 2019 (r345952) @@ -1508,7 +1508,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?201904051609.x35G9N20080059>