From patchwork Thu Aug 1 10:13:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Fedotov X-Patchwork-Id: 170368 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp5214105ile; Thu, 1 Aug 2019 03:14:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqxiFNrdaA0bS7MSlyEij3AQF177s5YvY6yUqAhzdwaTWitgcS4eNZvG+rfeZGKs/RDKUe2b X-Received: by 2002:a17:90a:8c06:: with SMTP id a6mr7972142pjo.45.1564654462595; Thu, 01 Aug 2019 03:14:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564654462; cv=none; d=google.com; s=arc-20160816; b=fxIqKUuAOhLZVE6EwZx/uvPGCebzcOY11B+GcTJroz8ehYo89P3wE+kPXlU4MOoJ6N d/jb5gSeAG1Vjg4OsmttcEqTrRYWiSvUP3ozqspwzJvd8EbVdz+/ScSLHsgCoIrNCtcQ 5B9GgIk04pYt7aJwsrydEqSyWJydBeLLV89E5TD8Oje5uodb5CFAOOJM/6TVhFa20++B fo+7ZnLZ4IGSRQpFYHtH5+Vl+jLtLKAgjBeHgD8l/fNvWdlD8psr0h7hRLZ72uH7gBAK +1BsXcL7Uh6Z0R9yRiqotQBwEpIkjzP9+Cxk5inSl73+GPz5ybHUpMdk732rt+pCzy7F p/2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:delivered-to:sender:list-help:list-post:list-archive :list-subscribe:list-unsubscribe:list-id:precedence:mailing-list :dkim-signature:domainkey-signature; bh=SO6nCUY6/ihAUyyRWtH74/pBtcGKX84BNcFboYthc7A=; b=mzBUjvx814ECjUq1oEoh2Y7Vjzfk4icu6H8lNbrSuAUCDnKzON3obad4Vh+7FyDZkj IRiwVuZ1kaM8w04+avvoqINysUEVXXiWXgEHyW7YUfTZV9j26Tdk797Fh/vzLbxtn3Hx 5MqWG9tbDystMQ/lmcOB34yJiYbZISuERVboNlST/ze61ccRD6W38XgKA5tQqS7idENV rBmv8uYq3XNO//lPFhEJ0HNFPEQbHvrSZeafvwyWdwX0bEC2DLZi77U/UcYYwq8dx7YI vTIqxtRxqIHvq/TEuAP2YGSshaswa6lOimVg7xDxQPxaL3IiJVg71M/XwuQT3i/xJcE/ RU8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=NUE4L9yl; dkim=pass header.i=@gmail.com header.s=20161025 header.b=blsIZb56; spf=pass (google.com: domain of newlib-return-17110-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="newlib-return-17110-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id 131si33608550pfu.165.2019.08.01.03.14.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Aug 2019 03:14:22 -0700 (PDT) Received-SPF: pass (google.com: domain of newlib-return-17110-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=NUE4L9yl; dkim=pass header.i=@gmail.com header.s=20161025 header.b=blsIZb56; spf=pass (google.com: domain of newlib-return-17110-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="newlib-return-17110-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=dWdEuJRezf0vtEU2LXF7fK4uzE8a5uY 8ITxDPHvR2Be2HB6eXdpaaQcjQZEGAbbbdUgBI6FNgmdAMUyW5RWVz7Y/tJ368Pp sP/RfPn1iaa7wHf/YXfPUkkHhxRiXHnOvJcNt6JOZi/ahP8eb0XAt7WeFljy/SrH FDmQjW0L8OXs= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; s=default; bh=MHaX9RpnNgFi0G95+X8EZ0WBas0=; b=NUE4L 9yl+bCTYXSmnBDdYfHJ3GBbPCJm9L94ISRwOQwk4q/r5XvRjfp8SMnYp1pbr+nqT tLSAcWNaA53y8KiZTK8Kybrf0T4C/EtDW6YJ3rE670efLhBbekuYuaYTUjxKI78l cncyoY4udUo2HDaDUI5H8LWoxtoBzHbBGkrT7A= Received: (qmail 94837 invoked by alias); 1 Aug 2019 10:13:50 -0000 Mailing-List: contact newlib-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-owner@sourceware.org Delivered-To: mailing list newlib@sourceware.org Received: (qmail 94747 invoked by uid 89); 1 Aug 2019 10:13:50 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.6 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=H*MI:sk:2019080, H*i:sk:2019080 X-HELO: mail-lf1-f45.google.com Received: from mail-lf1-f45.google.com (HELO mail-lf1-f45.google.com) (209.85.167.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 01 Aug 2019 10:13:48 +0000 Received: by mail-lf1-f45.google.com with SMTP id c9so49765169lfh.4 for ; Thu, 01 Aug 2019 03:13:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SO6nCUY6/ihAUyyRWtH74/pBtcGKX84BNcFboYthc7A=; b=blsIZb56BcDDOG2pkpC3kXybV5+FtFareZFR/qEuMBtfH11cKKNxCbO9wyPIYNJc1y zeIQ/1Dgixw2D+g4zpQyFxhL/BE9lRoN7AHpZZSog135h6MFADJ9E48u49AY6Upcuz80 Hxjjw07visgFm8yCozUYtz1YzwLbo8MbwCIGyhGDn4oxw+9XfLojQuoETeG3fRSbRNk0 MIHVBKdK/qQqX3NlxvwHtznxchn5t22i5AF3Y4dyXIOQnAlQnWZQ4xpOlg581sOgw97+ l89CT2jD/q5tW42bcAngThRb/Ls3nq7NfIVGUqxsBrgJQr4MO3ANyMYO1jKLNHPGS7eW HxhA== Return-Path: Received: from af-ubuntu18-hyperv.cmtknet.ru (relay.cmtk.ru. [195.5.145.226]) by smtp.gmail.com with ESMTPSA id n1sm12221136lfk.19.2019.08.01.03.13.45 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 01 Aug 2019 03:13:45 -0700 (PDT) From: Alexander Fedotov To: newlib@sourceware.org, Richard.Earnshaw@arm.com Cc: Alexander Fedotov Subject: [PATCH v1 3/4] Alignment libgloss/arm and newlib/libc/sys/arm: reflect commit 2404223 Date: Thu, 1 Aug 2019 05:13:33 -0500 Message-Id: <20190801101334.6213-3-alfedotov@gmail.com> In-Reply-To: <20190801101334.6213-1-alfedotov@gmail.com> References: <20190801101334.6213-1-alfedotov@gmail.com> --- newlib/libc/sys/arm/crt0.S | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) -- 2.17.1 diff --git a/newlib/libc/sys/arm/crt0.S b/newlib/libc/sys/arm/crt0.S index a55aa365b..5e677a23c 100644 --- a/newlib/libc/sys/arm/crt0.S +++ b/newlib/libc/sys/arm/crt0.S @@ -518,8 +518,17 @@ __change_mode: for _fini to be called at program exit. */ movs r4, r0 movs r5, r1 +#ifdef _LITE_EXIT + /* Make reference to atexit weak to avoid unconditionally pulling in + support code. Refer to comments in __atexit.c for more details. */ + .weak FUNCTION(atexit) + ldr r0, .Latexit + cmp r0, #0 + beq .Lweak_atexit +#endif ldr r0, .Lfini bl FUNCTION (atexit) +.Lweak_atexit: bl FUNCTION (_init) movs r0, r4 movs r1, r5 @@ -589,6 +598,13 @@ change_back: .LC2: .word __bss_end__ #ifdef __USES_INITFINI__ +#ifdef _LITE_EXIT +.Latexit: + .word FUNCTION(atexit) + + /* Weak reference _fini in case of lite exit. */ + .weak FUNCTION(_fini) +#endif .Lfini: .word FUNCTION(_fini) #endif