Message ID | a6d864f8-bbd4-4941-a74d-8b661d6e70fa@gjlay.de |
---|---|
State | Not Applicable |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp2351288dyd; Mon, 12 Feb 2024 02:51:37 -0800 (PST) X-Forwarded-Encrypted: i=4; AJvYcCWBE49CERlf6i/rV51MomJScB20tB1RX8L/GklWkfJmaZUBLyIwAG9/zeyQxjUgKHHBTyQlNsnPADe8Ixh39/GPNIuKQA== X-Google-Smtp-Source: AGHT+IHwWYEzalnexjAeE3EYq5HZNFBtaJJ+REiXyZED2e8eHZWpx65V4jhOKybkMQaTjrK69p+z X-Received: by 2002:ac8:5991:0:b0:42d:a70d:6df3 with SMTP id e17-20020ac85991000000b0042da70d6df3mr46889qte.32.1707735097693; Mon, 12 Feb 2024 02:51:37 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1707735097; cv=pass; d=google.com; s=arc-20160816; b=TNwtiA5A4O68OnRLh29vtCDMir2b0OvLG1bSP6Y3m786xn9GVS/QxQaVG+m5qLowUF 3ckaZQeQmgJYYnnbAoSssZeqkR/ZteaxvHSu7wEmPiMYiKusbcLXXXPbvMdbEyGhAXD2 W020QTUSKUcz1mT5L1MT1DRD02NO5GWAVTz56nhe71aHg7kXuAoFYSW8X+dEQw4u6P/T BhMo/swjpz2BFNPYC9jsd0rhcsFdHhkZxv7sAY+A4GxEj2OMh+hA+74Ga+EcmZay76zv DL3BqKjuMPsXDT2OhPiBXH+FS2SpHynmMichVEwvsqV/jsQDAiMoHGmvuOV8uF+NNR+W DiGg== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :subject:to:from:content-language:user-agent:mime-version:date :message-id:dkim-signature:dkim-signature:arc-filter:dmarc-filter :delivered-to; bh=ExQKf5fdaZzicKilqVK+Gdmk/UYnbXLGKb2dIdBemPY=; fh=+BKOo954u8/H783jLZLYb7AHs76WMh5sSjvabODa00o=; b=oAszXNSBoSEUHRmxepmIPzbUiBpSVI+a9YMVaIC2CkrZeOR0yPE4w3AdLEjVrxBj3z QE/1QMyAwrRUP47AbqS+8P+scgQ642QHwwUog4La9FdXeQlmQFBjVyNXE64l9ZqI4Hkc x372Qc1Twe9Vww8Fh6GQV0oQbfe41xEw686dEb3bjIgLuge19EKp6MbnKjyItiahTkDw zCNYtHAUL6ka//jr/iXqeCtt26Pu+vbflcWcNd1X01yD7m6C0Ir23pmwEklat+ZzWSuz BAj3/fvF6Hw9yn+xaH/5rA+rDIzrj2uTRO3F9aPmmwsxxKiVjx7++1rMuERjANgT8Q3b L9aA==; dara=google.com ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@gjlay.de header.s=strato-dkim-0002 header.b=nWUfWmKD; dkim=neutral (no key) header.i=@gjlay.de header.s=strato-dkim-0003; arc=pass (i=2); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" X-Forwarded-Encrypted: i=3; AJvYcCULacQTXPf3cFCgZ+evVzeeHUTA5AdULq4g+RBEHN4li3QkF2hKSC6aG8v/V8U8lSaO0Gt55O0pswX+2wbrmvRxC3Unlg== Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id 9-20020ac85649000000b0042c350051b2si86858qtt.370.2024.02.12.02.51.37 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 02:51:37 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gjlay.de header.s=strato-dkim-0002 header.b=nWUfWmKD; dkim=neutral (no key) header.i=@gjlay.de header.s=strato-dkim-0003; arc=pass (i=2); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 671283858C41 for <ouuuleilei@gmail.com>; Mon, 12 Feb 2024 10:51:37 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [81.169.146.220]) by sourceware.org (Postfix) with ESMTPS id 52C853858D32 for <gcc-patches@gcc.gnu.org>; Mon, 12 Feb 2024 10:50:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 52C853858D32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gjlay.de Authentication-Results: sourceware.org; spf=none smtp.mailfrom=gjlay.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 52C853858D32 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=81.169.146.220 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1707735059; cv=pass; b=HSTMLviGb6sqCFXYfi7COy03/zZPIPkAW1fDmlyud6t7IwOqVFAf682EhSyOSGUgNBTi6ad2JQ6kp+gVtRQ4SYrtbNVSZNU/srenm/IUv1jNNVZbrWnaKpwDU564u9U9yRM648vzSyMK4YX/+u8Z7zApSCGvPBM4EBHS0cXtrHc= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1707735059; c=relaxed/simple; bh=T16cKRSj2bKXMZwlrLId4lDhp3yAj0XH+S6pWauaL4Y=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:MIME-Version:From: To:Subject; b=b+pD5kuU3M8XUVuC56CAoiwG9p3eAqSevKaPA3WLdTojkvPj1b+HDBAa/cpQuSVnAcXX7hNrlHaZgr8ybHn6tNjm4r0TSAE2jP6EFvnjYiu3l1UZg4+5a0wo52BMkd+Dv4iRO/OFGz/A6GSG+JLvfNGcbbEE/8BZkr2sWqi2kRo= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; t=1707735056; cv=none; d=strato.com; s=strato-dkim-0002; b=rXaZuvNgpVQAUhKNlKXgtMovXSI9aMpLLrAWeah5N1XrGO07MSsR3ho0No6iE4ND8W XNzPOz+gZNwhAQ1o7ZZP1Au41Xs9XIGY1ZZO1Yc34MrAe4b1lsi4c9eh8o5JG9UZjPRI im8Otx+/3v5UveubIr0WCe8RhiBRJmO80Is2SFXJdcB0J2Do8S3t4Vi92Br+mrmV1iS2 6JQux/Orl8M8mDy5o5AUjKYQ6/yIAqSYEl0Jh6AxnTFy1m1iwDHcHlBkAE3WC1ELcFOf ojJkt1nWGCDAMuSIZG/zu4++BgdsuF1zAx2K4pX0oO37n7jNnwPPsfPX7q8JnvX1da5n QA9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1707735056; s=strato-dkim-0002; d=strato.com; h=Subject:To:From:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=ExQKf5fdaZzicKilqVK+Gdmk/UYnbXLGKb2dIdBemPY=; b=kuX5BdIs7+aO4QcdYyBd50aB4dStT2f+zsJi5Lpm8to75AaWijblcP0poendYGvr8Z kMjUPTSxoK+euImH5Fs7VO7xdByjt9XrTQxxE7YGY2tdLFpVepKFR5ycVICASBB2K34h P4Zvj080zVjhmqfYRLYyyuuvPRy1mECuJjLmzhdT/Q5SBuOOaqqCsurbVQ+EbJvO406p BLa3rUFw3p2BJMnSS86EjleOfOEGJe23cnTi4GoeqE6UBIEsSRYWOyij52t8+rj9mlqS V+F2219Aiy9Z7mibYvoFLYH2Afp94npmcGmGLncyWGIA2Zr1rpfLmO7kFFnvm+VaBo0J xkMQ== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1707735056; s=strato-dkim-0002; d=gjlay.de; h=Subject:To:From:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=ExQKf5fdaZzicKilqVK+Gdmk/UYnbXLGKb2dIdBemPY=; b=nWUfWmKDMGV+Ao8B1zQui3X07rO1EFw/MmH5owxSArTOsge5WxMzGLETz1+GJSPSO+ F8D2mjBlJU+1G52Z/RGvuh4dSmWcYIK9VBsVD6yy2UcPb25gbQ3/MnkERupbR8eCn72W MuSu1VjzCs+9VQA845j39sVlmYCtJbDHM1gm0Pj/wzyBt34bG+PtS9BnClEAMaugCHcG URFBdT3E0fNrqLhbY4JEbvS8Zpjf15tb/qq+JHYfwg9vaOiK2xwRcZg0V/s3Qe+lpSu5 RaDDwCdk0hCejdKGVfaOyxR15FygF7LTi3QiQBAEzuXCn+0xJR3GfESfNj1v4ZaiYrBe jOCA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1707735056; s=strato-dkim-0003; d=gjlay.de; h=Subject:To:From:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=ExQKf5fdaZzicKilqVK+Gdmk/UYnbXLGKb2dIdBemPY=; b=5LBOtjKcNz1+6p7juOTvqulqhTb80ILXbRwe/6ZybECIhgi/SbS0syNsHBClk5To27 OrpR8FfA8XYU+LXikyDw== X-RZG-AUTH: ":LXoWVUeid/7A29J/hMvvT3koxZnKT7Qq0xotTetVnKkSgcSjpmy9KwoMJ/K0VA==" Received: from [192.168.2.102] by smtp.strato.de (RZmta 49.11.2 DYNA|AUTH) with ESMTPSA id Lb68c601CAotjuy (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate) for <gcc-patches@gcc.gnu.org>; Mon, 12 Feb 2024 11:50:55 +0100 (CET) Message-ID: <a6d864f8-bbd4-4941-a74d-8b661d6e70fa@gjlay.de> Date: Mon, 12 Feb 2024 11:50:55 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US From: Georg-Johann Lay <avr@gjlay.de> To: gcc-patches@gcc.gnu.org Subject: [patch,avr,applied] Addendum to target/112944: Initialize FLMAP as needed Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790690037694819830 X-GMAIL-MSGID: 1790690037694819830 |
Series |
[avr,applied] Addendum to target/112944: Initialize FLMAP as needed
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | fail | Git am fail log |
Commit Message
Georg-Johann Lay
Feb. 12, 2024, 10:50 a.m. UTC
This code will link against parts of the startup code from AVR-LibC when it is needed to init bit-field FLMAP. Johann -- AVR: target/112944 - Addendum: Link code to initialize NVMCTRL_CTRLB.FLMAP For devices that see a part for the flash memory in the RAM address space, bit-field NVMCTRL_CTRLB.FLMAP must match the value of symbol __flmap. This is achieved by dragging in startup code from lib<mcu>.a. The mechanism is the same like for libgcc's __do_copy_data and __do_clear_bss. The code is implemented in AVR-LibC #931 and can be dragged by referencing __do_flmap_init. In addition to setting FLMAP, that code also sets bit FLMAPLOCK provided symbol __flmap_lock has a non-zero value. This protects FLMAP from future changes. When the __do_flmap_init code is not wanted, the symbol can be satisfied by linking with -Wl,--defsym,__do_flmap_init=0 gcc/ PR target/112944 * config/avr/gen-avr-mmcu-specs.cc (print_mcu) [have_flmap]: <*link_rodata_in_ram>: Spec undefs symbol __do_flmap_init when not linked with -mrodata-in-ram.
diff --git a/gcc/config/avr/gen-avr-mmcu-specs.cc b/gcc/config/avr/gen-avr-mmcu-specs.cc index ea69145d404..bb94bea12b0 100644 --- a/gcc/config/avr/gen-avr-mmcu-specs.cc +++ b/gcc/config/avr/gen-avr-mmcu-specs.cc @@ -369,7 +369,10 @@ print_mcu (const avr_mcu_t *mcu, const McuInfo &mi) } // -m[no-]rodata-in-ram affects linking. Sanity check its usage. - fprintf (f, "*link_rodata_in_ram:\n\t%%(check_rodata_in_ram)\n\n"); + fprintf (f, "*link_rodata_in_ram:\n\t%%(check_rodata_in_ram)"); + if (mi.is_device && mi.have_flmap) + fprintf (f, " %%{!mrodata-in-ram:-u __do_flmap_init}"); + fprintf (f, "\n\n"); // Specs known to GCC.