From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by sourceware.org (Postfix) with ESMTPS id AA0E83858D20 for ; Wed, 12 Jul 2023 01:39:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AA0E83858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-66872d4a141so4445480b3a.1 for ; Tue, 11 Jul 2023 18:39:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689125994; x=1691717994; h=content-disposition:mime-version:message-id:subject:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=fSBdprEYnLKHtarEM6gEPPA/X4z0HbBQJ2sZ+LWxspU=; b=Y7wtiQ9zOhgBlCs20M8vBQXbgkMqzKWojtIXRpq84dxPAu7FdQp2hDAivKnqkTEbgY n8ojDW0wLrh93pndxu3GFi58CFYtmwFB91OwG8QCLa1awumvhBgXL5BISi0O5BsI5Ur7 Ym+0+daPAoU0Hj0ru6bm8wdAYzjFKvF8cFVxMpeRTJ5RGDwq4Elql1bHgsrA8ydy32Ba A4MRQ/2XtaMrzbF7sYkwknGfJM5hQm+IR4mnkMzeVxwJzTRkEt2fpf82KW13XeY5f8Ib Ot3G7OM8vDgJYTRVNfqrsAipjQQe9FRfP1tKmEH1yqmCTWNP2KBteK6UmEEwKl/2SfDb 7dmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689125994; x=1691717994; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=fSBdprEYnLKHtarEM6gEPPA/X4z0HbBQJ2sZ+LWxspU=; b=jpehhA1nGbXx2jpqhq51ErPt8eERPstP8S4D2TeiubxBk2BgPTmaTtQxTZQruXTS3M G9yawcm2j0SkEOWV66q+LH7td+hYKMQjFWosLx4fFb9XyMMPO2FFCJCwUjSbH0ZGfLjK Ao07FzHS1w2bHoxEFdcibZ/CS4mqOY1A0GH9XWm/+Tv5CEbkLEDm1FcvvKRIHIt/+Tzr FbfnWr61upH+1Z41s/eXkmeQ/tIAT0kF/Iq1rFP0+72GGo/7yFsZmQlj2ueF0dnprRng iglz8b2sIIlZkQPzP8lHaDh0K2q4fSZsXf4Trc9cso6PTWngs8gc3IozJJA6/m5u44iB spQg== X-Gm-Message-State: ABy/qLanV1Z7K/SgymwqQS8sDgAqaORGZoG0UO3FilsKF/IJJg0sQsyB OsVYnRQh8Nu4A6lSf0U8UZ5o3i7/JGE= X-Google-Smtp-Source: APBJJlGWZGP/gYvfS0JPcTDdaWwFPRYFAHVObkVJFPAEYPozH2bgwUSeBli0aHENCM0Hgr3ZOX/ulQ== X-Received: by 2002:a05:6a20:2450:b0:110:5141:dc8d with SMTP id t16-20020a056a20245000b001105141dc8dmr15768338pzc.25.1689125994041; Tue, 11 Jul 2023 18:39:54 -0700 (PDT) Received: from squeak.grove.modra.org ([2406:3400:51d:8cc0:80d7:5d82:afc0:aec1]) by smtp.gmail.com with ESMTPSA id p12-20020a1709028a8c00b001b9c960ff9bsm2597113plo.78.2023.07.11.18.39.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jul 2023 18:39:53 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 770181142BB9; Wed, 12 Jul 2023 11:09:51 +0930 (ACST) Date: Wed, 12 Jul 2023 11:09:51 +0930 From: Alan Modra To: binutils@sourceware.org Subject: .noinit and .persistent for msp430 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3033.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 List-Id: Similar to the previous patch, but also tidy a few more sections. * scripttempl/elf32msp430.sc (.text, .rodata, .data, .bss, .noinit), (.persistent): Align the section rather than aligning inside. diff --git a/ld/scripttempl/elf32msp430.sc b/ld/scripttempl/elf32msp430.sc index 6edc908a2a0..7d5391d9f8c 100644 --- a/ld/scripttempl/elf32msp430.sc +++ b/ld/scripttempl/elf32msp430.sc @@ -137,9 +137,9 @@ SECTIONS .rela.plt ${RELOCATING-0} : { *(.rela.plt) } /* Internal text space. */ - .text ${RELOCATING-0} : + .text ${RELOCATING-0} : ${RELOCATING+ALIGN(2)} { - ${RELOCATING+. = ALIGN(2); + ${RELOCATING+ *(SORT_NONE(.init)) *(SORT_NONE(.init0)) /* Start here after reset. */ *(SORT_NONE(.init1)) @@ -189,9 +189,9 @@ SECTIONS _etext = .;} } ${RELOCATING+ > text} - .rodata ${RELOCATING-0} : + .rodata ${RELOCATING-0} : ${RELOCATING+ALIGN(2)} { - ${RELOCATING+. = ALIGN(2); + ${RELOCATING+ *(.lower.rodata.* .lower.rodata) . = ALIGN(2); @@ -254,11 +254,11 @@ SECTIONS ${RELOCATING+ _vectors_end = . ; } } ${RELOCATING+ > vectors} - .data ${RELOCATING-0} : + .data ${RELOCATING-0} : ${RELOCATING+ALIGN(2)} { - ${RELOCATING+ PROVIDE (__data_start = .) ; } - ${RELOCATING+ PROVIDE (__datastart = .) ; } - ${RELOCATING+. = ALIGN(2); + ${RELOCATING+ + PROVIDE (__data_start = .) ; + PROVIDE (__datastart = .) ; KEEP (*(.jcr)) *(.data.rel.ro.local) *(.data.rel.ro*) @@ -287,9 +287,8 @@ SECTIONS ${RELOCATING+__romdatastart = LOADADDR(.data); __romdatacopysize = SIZEOF(.data);} - .bss ${RELOCATING-0}${RELOCATING+SIZEOF(.data) + ADDR(.data)} : + .bss ${RELOCATING-0}${RELOCATING+ALIGN(SIZEOF(.data) + ADDR(.data), 2)} : { - ${RELOCATING+. = ALIGN(2);} ${RELOCATING+ PROVIDE (__bss_start = .); } ${RELOCATING+ PROVIDE (__bssstart = .); *(.lower.bss.* .lower.bss) @@ -304,9 +303,8 @@ SECTIONS /* This section contains data that is not initialized during load, or during the application's initialization sequence. */ - .noinit ${RELOCATING-0}${RELOCATING+SIZEOF(.bss) + ADDR(.bss)} : + .noinit ${RELOCATING-0}${RELOCATING+ALIGN(SIZEOF(.bss) + ADDR(.bss), 2)} : { - ${RELOCATING+. = ALIGN(2);} ${RELOCATING+ PROVIDE (__noinit_start = .) ; } *(.noinit${RELOCATING+ .noinit.* .gnu.linkonce.n.*}) ${RELOCATING+. = ALIGN(2);} @@ -315,9 +313,8 @@ SECTIONS /* This section contains data that is initialized during load, but not during the application's initialization sequence. */ - .persistent ${RELOCATING-0}${RELOCATING+SIZEOF(.noinit) + ADDR(.noinit)} : + .persistent ${RELOCATING-0}${RELOCATING+ALIGN(SIZEOF(.noinit) + ADDR(.noinit), 2)} : { - ${RELOCATING+. = ALIGN(2);} ${RELOCATING+ PROVIDE (__persistent_start = .) ; } *(.persistent${RELOCATING+ .persistent.* .gnu.linkonce.p.*}) ${RELOCATING+. = ALIGN(2);} -- Alan Modra Australia Development Lab, IBM