From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.eu.adacore.com (mel.act-europe.fr [IPv6:2a02:2ab8:224:1::a0a:d2]) by sourceware.org (Postfix) with ESMTPS id 6DB0E385B831 for ; Mon, 6 Apr 2020 09:47:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6DB0E385B831 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=hainque@adacore.com Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 2C28981339; Mon, 6 Apr 2020 11:47:36 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at eu.adacore.com Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VqtlPIT4wrhb; Mon, 6 Apr 2020 11:47:36 +0200 (CEST) Received: from [IPv6:2a01:e35:2e47:ec00:1520:3e0e:adde:2c19] (unknown [IPv6:2a01:e35:2e47:ec00:1520:3e0e:adde:2c19]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id AD54F8134C; Mon, 6 Apr 2020 11:47:35 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: issue with behavior change of gcc -r between gcc-8 and gcc-9 From: Olivier Hainque In-Reply-To: <4229934.LvFx2qVVIh@twilight> Date: Mon, 6 Apr 2020 11:47:34 +0200 Cc: GCC Patches , Joel Brobecker Content-Transfer-Encoding: quoted-printable Message-Id: <681ED6AD-3B65-4B3F-AF9A-0CF7160C1C09@adacore.com> References: <4B424DF9-6181-42AE-BB29-86420442E6CA@adacore.com> <4229934.LvFx2qVVIh@twilight> To: Allan Sandfeld Jensen X-Mailer: Apple Mail (2.2104) X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_NUMSUBJECT, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2020 09:47:38 -0000 Hello Allan, Thanks for following up. > On 02 Apr 2020, at 10:37, Allan Sandfeld Jensen = wrote: > -r is used for relinking. The idea behind the change was to make it = directly=20 > suitable for that. In my mind, it was just a means to convey "I will relink this somehow later on, don't complain if the closure is incomplete", while you = control what goes in the closure or not through means intended for that = (-nostdlib, -nostartfiles). > It takes object files and relinks them into a new object=20 > file. It gives the caller complete control. It's true that the caller can resort to -Wl if he doesn't like what -r now does, which is more than before. > It sounds like you are missing some way to add startfiles? A reverse = of=20 > -nostartfiles? Sort of, but I'm not sure this would be a better way out than using -Wl.=20 > But hopefully you can just use the linker directly? I don't know yet. > Unless you have LTO=20 > enabled object files you dont need the compiler to link. Part of the issue is all the scripts, makefiles and IDEs driving operations that might implicitly or explicitly rely on a behavior which suddenly changes. Or pieces of documentation here and there. I'm afraid we might have no other choice but to arrange to come back to the previous behavior somehow, at least for VxWorks. I still have at least a few experiments to conduct.=20 Olivier