From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from emagii.se (www.emagii.com [185.133.207.17]) by sourceware.org (Postfix) with ESMTPS id D45623858434 for ; Mon, 13 Feb 2023 16:11:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D45623858434 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=emagii.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=emagii.com Received: from valinor.ownit.se (84-55-68-216.customers.ownit.se [84.55.68.216]) by emagii.se (Postfix) with ESMTPSA id 742A7120258; Mon, 13 Feb 2023 17:11:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emagii.com; s=default; t=1676304689; bh=49WzoF4XxymYr2xoAUzgZwMsDWxo76TABs88QDuu1NM=; h=From:To:Subject; b=4DoIp2soecGpq6lFn+3K3fsAPvT/ScTT1iHRrrFWlw41RHLbAQIMaGExf0xu6a+/1 IIbzmqfkj8069zC7CYWzt0kvkfQsswR/Tq4PtLMzqMIGsbJQhv9M4k5oqz4o4Qpmw2 My7g5a0V/7qQXliP4VtoFfhBhJZKjUKgOAyd9dVM= Authentication-Results: emagii.beebytevps.io; spf=pass (sender IP is 84.55.68.216) smtp.mailfrom=binutils@emagii.com smtp.helo=valinor.ownit.se Received-SPF: pass (emagii.beebytevps.io: connection is authenticated) From: binutils@emagii.com To: binutils@sourceware.org Cc: nickc@redhat.com, Ulf Samuelsson Subject: [PATCH v3 3/6] Add ASCIZ to testsuite Date: Mon, 13 Feb 2023 17:11:21 +0100 Message-Id: <20230213161124.15340-4-binutils@emagii.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230213161124.15340-1-binutils@emagii.com> References: <20230213161124.15340-1-binutils@emagii.com> X-PPP-Message-ID: <167630468976.3742971.12491576171392333115@localhost.localdomain> X-PPP-Vhost: emagii.com X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_FAIL,SPF_PASS,TXREP 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: From: Ulf Samuelsson Signed-off-by: Ulf Samuelsson --- ld/testsuite/ld-scripts/asciz.d | 14 ++++++++++++++ ld/testsuite/ld-scripts/asciz.s | 6 ++++++ ld/testsuite/ld-scripts/asciz.t | 23 +++++++++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 ld/testsuite/ld-scripts/asciz.d create mode 100644 ld/testsuite/ld-scripts/asciz.s create mode 100644 ld/testsuite/ld-scripts/asciz.t diff --git a/ld/testsuite/ld-scripts/asciz.d b/ld/testsuite/ld-scripts/asciz.d new file mode 100644 index 00000000000..83cb61d6fb6 --- /dev/null +++ b/ld/testsuite/ld-scripts/asciz.d @@ -0,0 +1,14 @@ +#source: asciz.s +#ld: -T asciz.t +#objdump: -s -j .text +#notarget: [is_aout_format] +#xfail: tic4x-*-* tic54x-*-* + +.*: file format .* + +Contents of section .text: + 10c0 434f4445 54686973 20697320 61207374 CODEThis is a st + 10d0 72696e67 00000000 00000000 00000000 ring............ + 10e0 54686973 20697320 616e6f74 68657220 This is another + 10f0 73747269 6e6700 string. +#pass diff --git a/ld/testsuite/ld-scripts/asciz.s b/ld/testsuite/ld-scripts/asciz.s new file mode 100644 index 00000000000..542dcd1a410 --- /dev/null +++ b/ld/testsuite/ld-scripts/asciz.s @@ -0,0 +1,6 @@ + .section .text + .long 0x45444F43 + .section .data + .long 0x9abcdef0 + .section .bss + .long 0 diff --git a/ld/testsuite/ld-scripts/asciz.t b/ld/testsuite/ld-scripts/asciz.t new file mode 100644 index 00000000000..986e00a1169 --- /dev/null +++ b/ld/testsuite/ld-scripts/asciz.t @@ -0,0 +1,23 @@ +MEMORY { + rom : ORIGIN = 0x00000, LENGTH = 0x10000 + ram : ORIGIN = 0x10000, LENGTH = 0x10000 +} + +_start = 0x000000; +SECTIONS +{ + . = 0x1000 + SIZEOF_HEADERS; + .text ALIGN (0x20) : + { + *(.text) + ASCIZ "This is a string" + . = ALIGN(0x20); + align_label = .; + ASCIZ "This is another string" + unalign_label = .; + } + .data : AT (0x10000) { *(.data) } >ram /* NO default AT>rom */ + . = ALIGN(0x20); + .bss : { *(.bss) } >ram /* NO default AT>rom */ + /DISCARD/ : { *(*) } +} -- 2.17.1