Message ID | 20240610123757.1508964-1-chigot@adacore.com |
---|---|
State | New |
Headers |
Return-Path: <newlib-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5FB3B385840F for <patchwork@sourceware.org>; Mon, 10 Jun 2024 12:38:21 +0000 (GMT) X-Original-To: newlib@sourceware.org Delivered-To: newlib@sourceware.org Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by sourceware.org (Postfix) with ESMTPS id AFAA83858D39 for <newlib@sourceware.org>; Mon, 10 Jun 2024 12:38:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AFAA83858D39 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org AFAA83858D39 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::42d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718023085; cv=none; b=lansrouE/qaKD4V0NE5AL+dh9UZTIdZ2fgU0lHMptQ7cSUEvpWnb2e0bqJ4h1Tu/lIQK12rFp1RlYssqne75JUTYZ+smbHYE5jX3zZ+vV+bTbS3Yx9EXOD3ye2c71mhgmmlDY1DCJu49kZVBEarGkXQAcWB4RCWosv7iH1zzBD4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718023085; c=relaxed/simple; bh=h46GYMQluMyta4C6AxlgZBrMOTFN2m0AZfatqsyTCII=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=QqzFk2Uq+AbMO736uRbnKEyP1CmeJ3CglGoiOe1XySlnt7dEpG0CtYsuA4Dk4ogQik+b1Nh4BMz8bZoQFbriiTOTBX52CBwDzTNPUNuS7vJRW+YtE7lHp99XVA7zotoBYQRxublGjL2X868+O5D1ZFPWBWiWy9gowOuaDCChSdQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-35f188e09a8so1350049f8f.2 for <newlib@sourceware.org>; Mon, 10 Jun 2024 05:38:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718023081; x=1718627881; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=jiuBTxio6co7U2ycE35fw6oC3dgleDJYkYC/S9iw1YQ=; b=JqFpzlWh9X0o63i+Ob3HZ4EMzNFk21v8s2YmCbq40yBq8p5/7nTd0vXFnS+ht8cHxr c+weHjA3+VfXuDd4vB+PmSceXUWSGwgyri3EFYviMLDBelQjRQNFqrINO3oiEGXtgyL0 tcQfarjCtVE9+TZGmCkVNqrLq9QxAHTF/JJhUr//7LEwmbBwLx6vqUTePJ/cQMUTTBFV 1YHscGOH/bS8hXkiJZ6PNhzc7wAeNhNhCx/A9mszSvNHO/2XUA0a2TgB03T8W5WewTAU RU5txbyOjx/H70gudyP3Z83YqO/eWEuwUkevRwuwdNgDyD1eW3DBOUQoWM3yBVofgRRW HReg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718023081; x=1718627881; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jiuBTxio6co7U2ycE35fw6oC3dgleDJYkYC/S9iw1YQ=; b=tcmddEBN5+6LZ/LJii9qpAj3H2jXbf6WzUgpOnSW40+28nMVCNXU/UfNLGIW4Kl2S+ GDWoqP7AsJHzoaaR4X/AIPM1J7/5xmtx0QL5JWW06Vecb5WdgGEVp3qzmclzI1tCUxCc I/6lVDnXn/fRVHFAb4MzbqSskOOU/8Rt4KDyz2VAHCMgmHMXHpIcPEmmyA38DIUMP5G8 3Cgna+T7i15GROxB/5dJ9cYrq6aGri65v1ZivqD4aIyWcIds3xe49GvmFutcx5WZ78/Z cfNUYZ/JuF1S89wyVeZcG8hI9dSUKhLkKW7kFatZP65Vv4deulDNeaGy/99igTJXLJHY de7A== X-Gm-Message-State: AOJu0YzLSl8ou4LG7qW86V9KfV3vxe9ndfNBNlauhd1eKAlUOmd1JROS 6GgN0QTfy2GtmJhE1fPioC5m4Q2fzATYvf46AFLqD7H0wvmUGjUxP6TeNyinoALfFpUNVBajGis = X-Google-Smtp-Source: AGHT+IEdtqalQjDDEhVfAfjORXc6qr/2/p2xnIFSgygyQmZ3jpEQ+GMoK3KaYPI0kfyAiQJVqStgNg== X-Received: by 2002:a5d:6c6c:0:b0:35f:29a8:2abc with SMTP id ffacd0b85a97d-35f29a82b17mr485542f8f.56.1718023081104; Mon, 10 Jun 2024 05:38:01 -0700 (PDT) Received: from chigot-Dell.telnowedge.local (lmontsouris-659-1-24-67.w81-250.abo.wanadoo.fr. [81.250.175.67]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35f1f67254csm4038441f8f.56.2024.06.10.05.38.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 05:38:00 -0700 (PDT) From: =?utf-8?q?Cl=C3=A9ment_Chigot?= <chigot@adacore.com> To: newlib@sourceware.org Cc: victor.donascimento@arm.com, =?utf-8?q?Cl=C3=A9ment_Chigot?= <chigot@adacore.com> Subject: [PATCH] libc/arm: add missing .cfi_sections Date: Mon, 10 Jun 2024 14:37:57 +0200 Message-Id: <20240610123757.1508964-1-chigot@adacore.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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 X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Newlib mailing list <newlib.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/newlib>, <mailto:newlib-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/newlib/> List-Post: <mailto:newlib@sourceware.org> List-Help: <mailto:newlib-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/newlib>, <mailto:newlib-request@sourceware.org?subject=subscribe> Errors-To: newlib-bounces+patchwork=sourceware.org@sourceware.org |
Series |
libc/arm: add missing .cfi_sections
|
|
Commit Message
Clément Chigot
June 10, 2024, 12:37 p.m. UTC
The modifications added by the series "M-profile PACBTI-enablement" (see 9d6b00511e50a54d2472d11f75f7c0f2b4a98b24) have introduced a couple of .cfi_* instructions. Like for e6459123e497409a9e3d845c39829a9602ba55a4, these instructions create object files which contain .eh_frame sections. However, ARM uses its own unwind info format, not .eh_frame, which is generated by ARM-specific directives, not .cfi_*. The .eh_frame sections are useless, but also not removed by strip and may be harmful with some linker scripts. Adding ".cfi_sections .debug_frame" (as in glibc) moves the generated directives towards .debug_frame instead of .eh_frame. Making them easier to handle. * libc/machine/arm/aeabi_memmove-thumb2.S: Use .cfi_sections .debug_frame. * libc/machine/arm/aeabi_memset-thumb2.S: Likewise. * libc/machine/arm/memchr.S: Likewise. * libc/machine/arm/memcpy-armv7m.S: Likewise. * libc/machine/arm/setjmp.S: Likewise. * libc/machine/arm/strlen-armv7.S: Likewise. * libc/machine/arm/strlen-thumb2-Os.S: Likewise. --- newlib/libc/machine/arm/aeabi_memmove-thumb2.S | 1 + newlib/libc/machine/arm/aeabi_memset-thumb2.S | 1 + newlib/libc/machine/arm/memchr.S | 1 + newlib/libc/machine/arm/memcpy-armv7m.S | 1 + newlib/libc/machine/arm/setjmp.S | 1 + newlib/libc/machine/arm/strlen-armv7.S | 1 + newlib/libc/machine/arm/strlen-thumb2-Os.S | 1 + 7 files changed, 7 insertions(+)
Comments
On Mon, Jun 10, 2024 at 2:38 PM Clément Chigot <chigot@adacore.com> wrote: > > The modifications added by the series "M-profile PACBTI-enablement" > (see 9d6b00511e50a54d2472d11f75f7c0f2b4a98b24) have introduced a couple > of .cfi_* instructions. > > Like for e6459123e497409a9e3d845c39829a9602ba55a4, these instructions > create object files which contain .eh_frame sections. However, ARM uses > its own unwind info format, not .eh_frame, which is generated by > ARM-specific directives, not .cfi_*. The .eh_frame sections are useless, > but also not removed by strip and may be harmful with some linker > scripts. > > Adding ".cfi_sections .debug_frame" (as in glibc) moves the generated > directives towards .debug_frame instead of .eh_frame. Making them easier > to handle. > > * libc/machine/arm/aeabi_memmove-thumb2.S: Use .cfi_sections > .debug_frame. > * libc/machine/arm/aeabi_memset-thumb2.S: Likewise. > * libc/machine/arm/memchr.S: Likewise. > * libc/machine/arm/memcpy-armv7m.S: Likewise. > * libc/machine/arm/setjmp.S: Likewise. > * libc/machine/arm/strlen-armv7.S: Likewise. > * libc/machine/arm/strlen-thumb2-Os.S: Likewise. Gentle ping > --- > newlib/libc/machine/arm/aeabi_memmove-thumb2.S | 1 + > newlib/libc/machine/arm/aeabi_memset-thumb2.S | 1 + > newlib/libc/machine/arm/memchr.S | 1 + > newlib/libc/machine/arm/memcpy-armv7m.S | 1 + > newlib/libc/machine/arm/setjmp.S | 1 + > newlib/libc/machine/arm/strlen-armv7.S | 1 + > newlib/libc/machine/arm/strlen-thumb2-Os.S | 1 + > 7 files changed, 7 insertions(+) > > diff --git a/newlib/libc/machine/arm/aeabi_memmove-thumb2.S b/newlib/libc/machine/arm/aeabi_memmove-thumb2.S > index 20ca993e5..3018e7412 100644 > --- a/newlib/libc/machine/arm/aeabi_memmove-thumb2.S > +++ b/newlib/libc/machine/arm/aeabi_memmove-thumb2.S > @@ -36,6 +36,7 @@ > ASM_ALIAS __aeabi_memmove8 __aeabi_memmove > __aeabi_memmove: > .fnstart > + .cfi_sections .debug_frame > .cfi_startproc > prologue 4 > cmp r0, r1 > diff --git a/newlib/libc/machine/arm/aeabi_memset-thumb2.S b/newlib/libc/machine/arm/aeabi_memset-thumb2.S > index 6b77d3820..a1b8f0532 100644 > --- a/newlib/libc/machine/arm/aeabi_memset-thumb2.S > +++ b/newlib/libc/machine/arm/aeabi_memset-thumb2.S > @@ -33,6 +33,7 @@ > .global __aeabi_memset > .type __aeabi_memset, %function > .fnstart > + .cfi_sections .debug_frame > .cfi_startproc > ASM_ALIAS __aeabi_memset4 __aeabi_memset > ASM_ALIAS __aeabi_memset8 __aeabi_memset > diff --git a/newlib/libc/machine/arm/memchr.S b/newlib/libc/machine/arm/memchr.S > index d13ef8d65..f0b3650aa 100644 > --- a/newlib/libc/machine/arm/memchr.S > +++ b/newlib/libc/machine/arm/memchr.S > @@ -293,6 +293,7 @@ memchr: > .global memchr > .type memchr,%function > .fnstart > + .cfi_sections .debug_frame > .cfi_startproc > memchr: > @ r0 = start of memory to scan > diff --git a/newlib/libc/machine/arm/memcpy-armv7m.S b/newlib/libc/machine/arm/memcpy-armv7m.S > index ec1ad6485..13ffdb343 100644 > --- a/newlib/libc/machine/arm/memcpy-armv7m.S > +++ b/newlib/libc/machine/arm/memcpy-armv7m.S > @@ -88,6 +88,7 @@ > .thumb > .thumb_func > .fnstart > + .cfi_sections .debug_frame > .cfi_startproc > .type memcpy, %function > memcpy: > diff --git a/newlib/libc/machine/arm/setjmp.S b/newlib/libc/machine/arm/setjmp.S > index 5e5952296..0070f17cd 100644 > --- a/newlib/libc/machine/arm/setjmp.S > +++ b/newlib/libc/machine/arm/setjmp.S > @@ -183,6 +183,7 @@ SYM (.arm_start_of.\name): > MODE > .globl SYM (\name) > .fnstart > + .cfi_sections .debug_frame > .cfi_startproc > TYPE (\name) > SYM (\name): > diff --git a/newlib/libc/machine/arm/strlen-armv7.S b/newlib/libc/machine/arm/strlen-armv7.S > index 6aa122c07..1c2b5c532 100644 > --- a/newlib/libc/machine/arm/strlen-armv7.S > +++ b/newlib/libc/machine/arm/strlen-armv7.S > @@ -106,6 +106,7 @@ > > def_fn strlen p2align=6 > .fnstart > + .cfi_sections .debug_frame > .cfi_startproc > prologue 4 5 push_ip=HAVE_PAC_LEAF > pld [srcin, #0] > diff --git a/newlib/libc/machine/arm/strlen-thumb2-Os.S b/newlib/libc/machine/arm/strlen-thumb2-Os.S > index 4adbc61d2..b8a615a15 100644 > --- a/newlib/libc/machine/arm/strlen-thumb2-Os.S > +++ b/newlib/libc/machine/arm/strlen-thumb2-Os.S > @@ -47,6 +47,7 @@ > > def_fn strlen p2align=1 > .fnstart > + .cfi_sections .debug_frame > .cfi_startproc > prologue > mov r3, r0 > -- > 2.25.1 >
@Richard, any input from arm.com? Thanks, Corinna On Jul 4 13:44, Clément Chigot wrote: > On Mon, Jun 10, 2024 at 2:38 PM Clément Chigot <chigot@adacore.com> wrote: > > > > The modifications added by the series "M-profile PACBTI-enablement" > > (see 9d6b00511e50a54d2472d11f75f7c0f2b4a98b24) have introduced a couple > > of .cfi_* instructions. > > > > Like for e6459123e497409a9e3d845c39829a9602ba55a4, these instructions > > create object files which contain .eh_frame sections. However, ARM uses > > its own unwind info format, not .eh_frame, which is generated by > > ARM-specific directives, not .cfi_*. The .eh_frame sections are useless, > > but also not removed by strip and may be harmful with some linker > > scripts. > > > > Adding ".cfi_sections .debug_frame" (as in glibc) moves the generated > > directives towards .debug_frame instead of .eh_frame. Making them easier > > to handle. > > > > * libc/machine/arm/aeabi_memmove-thumb2.S: Use .cfi_sections > > .debug_frame. > > * libc/machine/arm/aeabi_memset-thumb2.S: Likewise. > > * libc/machine/arm/memchr.S: Likewise. > > * libc/machine/arm/memcpy-armv7m.S: Likewise. > > * libc/machine/arm/setjmp.S: Likewise. > > * libc/machine/arm/strlen-armv7.S: Likewise. > > * libc/machine/arm/strlen-thumb2-Os.S: Likewise. > > Gentle ping > > > --- > > newlib/libc/machine/arm/aeabi_memmove-thumb2.S | 1 + > > newlib/libc/machine/arm/aeabi_memset-thumb2.S | 1 + > > newlib/libc/machine/arm/memchr.S | 1 + > > newlib/libc/machine/arm/memcpy-armv7m.S | 1 + > > newlib/libc/machine/arm/setjmp.S | 1 + > > newlib/libc/machine/arm/strlen-armv7.S | 1 + > > newlib/libc/machine/arm/strlen-thumb2-Os.S | 1 + > > 7 files changed, 7 insertions(+) > > > > diff --git a/newlib/libc/machine/arm/aeabi_memmove-thumb2.S b/newlib/libc/machine/arm/aeabi_memmove-thumb2.S > > index 20ca993e5..3018e7412 100644 > > --- a/newlib/libc/machine/arm/aeabi_memmove-thumb2.S > > +++ b/newlib/libc/machine/arm/aeabi_memmove-thumb2.S > > @@ -36,6 +36,7 @@ > > ASM_ALIAS __aeabi_memmove8 __aeabi_memmove > > __aeabi_memmove: > > .fnstart > > + .cfi_sections .debug_frame > > .cfi_startproc > > prologue 4 > > cmp r0, r1 > > diff --git a/newlib/libc/machine/arm/aeabi_memset-thumb2.S b/newlib/libc/machine/arm/aeabi_memset-thumb2.S > > index 6b77d3820..a1b8f0532 100644 > > --- a/newlib/libc/machine/arm/aeabi_memset-thumb2.S > > +++ b/newlib/libc/machine/arm/aeabi_memset-thumb2.S > > @@ -33,6 +33,7 @@ > > .global __aeabi_memset > > .type __aeabi_memset, %function > > .fnstart > > + .cfi_sections .debug_frame > > .cfi_startproc > > ASM_ALIAS __aeabi_memset4 __aeabi_memset > > ASM_ALIAS __aeabi_memset8 __aeabi_memset > > diff --git a/newlib/libc/machine/arm/memchr.S b/newlib/libc/machine/arm/memchr.S > > index d13ef8d65..f0b3650aa 100644 > > --- a/newlib/libc/machine/arm/memchr.S > > +++ b/newlib/libc/machine/arm/memchr.S > > @@ -293,6 +293,7 @@ memchr: > > .global memchr > > .type memchr,%function > > .fnstart > > + .cfi_sections .debug_frame > > .cfi_startproc > > memchr: > > @ r0 = start of memory to scan > > diff --git a/newlib/libc/machine/arm/memcpy-armv7m.S b/newlib/libc/machine/arm/memcpy-armv7m.S > > index ec1ad6485..13ffdb343 100644 > > --- a/newlib/libc/machine/arm/memcpy-armv7m.S > > +++ b/newlib/libc/machine/arm/memcpy-armv7m.S > > @@ -88,6 +88,7 @@ > > .thumb > > .thumb_func > > .fnstart > > + .cfi_sections .debug_frame > > .cfi_startproc > > .type memcpy, %function > > memcpy: > > diff --git a/newlib/libc/machine/arm/setjmp.S b/newlib/libc/machine/arm/setjmp.S > > index 5e5952296..0070f17cd 100644 > > --- a/newlib/libc/machine/arm/setjmp.S > > +++ b/newlib/libc/machine/arm/setjmp.S > > @@ -183,6 +183,7 @@ SYM (.arm_start_of.\name): > > MODE > > .globl SYM (\name) > > .fnstart > > + .cfi_sections .debug_frame > > .cfi_startproc > > TYPE (\name) > > SYM (\name): > > diff --git a/newlib/libc/machine/arm/strlen-armv7.S b/newlib/libc/machine/arm/strlen-armv7.S > > index 6aa122c07..1c2b5c532 100644 > > --- a/newlib/libc/machine/arm/strlen-armv7.S > > +++ b/newlib/libc/machine/arm/strlen-armv7.S > > @@ -106,6 +106,7 @@ > > > > def_fn strlen p2align=6 > > .fnstart > > + .cfi_sections .debug_frame > > .cfi_startproc > > prologue 4 5 push_ip=HAVE_PAC_LEAF > > pld [srcin, #0] > > diff --git a/newlib/libc/machine/arm/strlen-thumb2-Os.S b/newlib/libc/machine/arm/strlen-thumb2-Os.S > > index 4adbc61d2..b8a615a15 100644 > > --- a/newlib/libc/machine/arm/strlen-thumb2-Os.S > > +++ b/newlib/libc/machine/arm/strlen-thumb2-Os.S > > @@ -47,6 +47,7 @@ > > > > def_fn strlen p2align=1 > > .fnstart > > + .cfi_sections .debug_frame > > .cfi_startproc > > prologue > > mov r3, r0 > > -- > > 2.25.1 > >
I've pushed this. Sorry for the delay: there were some things I needed to check and it then fell off my radar. R. On 09/07/2024 11:49, Corinna Vinschen wrote: > @Richard, any input from arm.com? > > > Thanks, > Corinna > > > On Jul 4 13:44, Clément Chigot wrote: >> On Mon, Jun 10, 2024 at 2:38 PM Clément Chigot <chigot@adacore.com> wrote: >>> >>> The modifications added by the series "M-profile PACBTI-enablement" >>> (see 9d6b00511e50a54d2472d11f75f7c0f2b4a98b24) have introduced a couple >>> of .cfi_* instructions. >>> >>> Like for e6459123e497409a9e3d845c39829a9602ba55a4, these instructions >>> create object files which contain .eh_frame sections. However, ARM uses >>> its own unwind info format, not .eh_frame, which is generated by >>> ARM-specific directives, not .cfi_*. The .eh_frame sections are useless, >>> but also not removed by strip and may be harmful with some linker >>> scripts. >>> >>> Adding ".cfi_sections .debug_frame" (as in glibc) moves the generated >>> directives towards .debug_frame instead of .eh_frame. Making them easier >>> to handle. >>> >>> * libc/machine/arm/aeabi_memmove-thumb2.S: Use .cfi_sections >>> .debug_frame. >>> * libc/machine/arm/aeabi_memset-thumb2.S: Likewise. >>> * libc/machine/arm/memchr.S: Likewise. >>> * libc/machine/arm/memcpy-armv7m.S: Likewise. >>> * libc/machine/arm/setjmp.S: Likewise. >>> * libc/machine/arm/strlen-armv7.S: Likewise. >>> * libc/machine/arm/strlen-thumb2-Os.S: Likewise. >> >> Gentle ping >> >>> --- >>> newlib/libc/machine/arm/aeabi_memmove-thumb2.S | 1 + >>> newlib/libc/machine/arm/aeabi_memset-thumb2.S | 1 + >>> newlib/libc/machine/arm/memchr.S | 1 + >>> newlib/libc/machine/arm/memcpy-armv7m.S | 1 + >>> newlib/libc/machine/arm/setjmp.S | 1 + >>> newlib/libc/machine/arm/strlen-armv7.S | 1 + >>> newlib/libc/machine/arm/strlen-thumb2-Os.S | 1 + >>> 7 files changed, 7 insertions(+) >>> >>> diff --git a/newlib/libc/machine/arm/aeabi_memmove-thumb2.S b/newlib/libc/machine/arm/aeabi_memmove-thumb2.S >>> index 20ca993e5..3018e7412 100644 >>> --- a/newlib/libc/machine/arm/aeabi_memmove-thumb2.S >>> +++ b/newlib/libc/machine/arm/aeabi_memmove-thumb2.S >>> @@ -36,6 +36,7 @@ >>> ASM_ALIAS __aeabi_memmove8 __aeabi_memmove >>> __aeabi_memmove: >>> .fnstart >>> + .cfi_sections .debug_frame >>> .cfi_startproc >>> prologue 4 >>> cmp r0, r1 >>> diff --git a/newlib/libc/machine/arm/aeabi_memset-thumb2.S b/newlib/libc/machine/arm/aeabi_memset-thumb2.S >>> index 6b77d3820..a1b8f0532 100644 >>> --- a/newlib/libc/machine/arm/aeabi_memset-thumb2.S >>> +++ b/newlib/libc/machine/arm/aeabi_memset-thumb2.S >>> @@ -33,6 +33,7 @@ >>> .global __aeabi_memset >>> .type __aeabi_memset, %function >>> .fnstart >>> + .cfi_sections .debug_frame >>> .cfi_startproc >>> ASM_ALIAS __aeabi_memset4 __aeabi_memset >>> ASM_ALIAS __aeabi_memset8 __aeabi_memset >>> diff --git a/newlib/libc/machine/arm/memchr.S b/newlib/libc/machine/arm/memchr.S >>> index d13ef8d65..f0b3650aa 100644 >>> --- a/newlib/libc/machine/arm/memchr.S >>> +++ b/newlib/libc/machine/arm/memchr.S >>> @@ -293,6 +293,7 @@ memchr: >>> .global memchr >>> .type memchr,%function >>> .fnstart >>> + .cfi_sections .debug_frame >>> .cfi_startproc >>> memchr: >>> @ r0 = start of memory to scan >>> diff --git a/newlib/libc/machine/arm/memcpy-armv7m.S b/newlib/libc/machine/arm/memcpy-armv7m.S >>> index ec1ad6485..13ffdb343 100644 >>> --- a/newlib/libc/machine/arm/memcpy-armv7m.S >>> +++ b/newlib/libc/machine/arm/memcpy-armv7m.S >>> @@ -88,6 +88,7 @@ >>> .thumb >>> .thumb_func >>> .fnstart >>> + .cfi_sections .debug_frame >>> .cfi_startproc >>> .type memcpy, %function >>> memcpy: >>> diff --git a/newlib/libc/machine/arm/setjmp.S b/newlib/libc/machine/arm/setjmp.S >>> index 5e5952296..0070f17cd 100644 >>> --- a/newlib/libc/machine/arm/setjmp.S >>> +++ b/newlib/libc/machine/arm/setjmp.S >>> @@ -183,6 +183,7 @@ SYM (.arm_start_of.\name): >>> MODE >>> .globl SYM (\name) >>> .fnstart >>> + .cfi_sections .debug_frame >>> .cfi_startproc >>> TYPE (\name) >>> SYM (\name): >>> diff --git a/newlib/libc/machine/arm/strlen-armv7.S b/newlib/libc/machine/arm/strlen-armv7.S >>> index 6aa122c07..1c2b5c532 100644 >>> --- a/newlib/libc/machine/arm/strlen-armv7.S >>> +++ b/newlib/libc/machine/arm/strlen-armv7.S >>> @@ -106,6 +106,7 @@ >>> >>> def_fn strlen p2align=6 >>> .fnstart >>> + .cfi_sections .debug_frame >>> .cfi_startproc >>> prologue 4 5 push_ip=HAVE_PAC_LEAF >>> pld [srcin, #0] >>> diff --git a/newlib/libc/machine/arm/strlen-thumb2-Os.S b/newlib/libc/machine/arm/strlen-thumb2-Os.S >>> index 4adbc61d2..b8a615a15 100644 >>> --- a/newlib/libc/machine/arm/strlen-thumb2-Os.S >>> +++ b/newlib/libc/machine/arm/strlen-thumb2-Os.S >>> @@ -47,6 +47,7 @@ >>> >>> def_fn strlen p2align=1 >>> .fnstart >>> + .cfi_sections .debug_frame >>> .cfi_startproc >>> prologue >>> mov r3, r0 >>> -- >>> 2.25.1 >>> >
On Tue, Jul 9, 2024 at 5:37 PM Richard Earnshaw (lists) <Richard.Earnshaw@arm.com> wrote: > > I've pushed this. Sorry for the delay: there were some things I needed to check and it then fell off my radar. No worries ! Thanks a lot for the push. Clément > R. > > On 09/07/2024 11:49, Corinna Vinschen wrote: > > @Richard, any input from arm.com? > > > > > > Thanks, > > Corinna > > > > > > On Jul 4 13:44, Clément Chigot wrote: > >> On Mon, Jun 10, 2024 at 2:38 PM Clément Chigot <chigot@adacore.com> wrote: > >>> > >>> The modifications added by the series "M-profile PACBTI-enablement" > >>> (see 9d6b00511e50a54d2472d11f75f7c0f2b4a98b24) have introduced a couple > >>> of .cfi_* instructions. > >>> > >>> Like for e6459123e497409a9e3d845c39829a9602ba55a4, these instructions > >>> create object files which contain .eh_frame sections. However, ARM uses > >>> its own unwind info format, not .eh_frame, which is generated by > >>> ARM-specific directives, not .cfi_*. The .eh_frame sections are useless, > >>> but also not removed by strip and may be harmful with some linker > >>> scripts. > >>> > >>> Adding ".cfi_sections .debug_frame" (as in glibc) moves the generated > >>> directives towards .debug_frame instead of .eh_frame. Making them easier > >>> to handle. > >>> > >>> * libc/machine/arm/aeabi_memmove-thumb2.S: Use .cfi_sections > >>> .debug_frame. > >>> * libc/machine/arm/aeabi_memset-thumb2.S: Likewise. > >>> * libc/machine/arm/memchr.S: Likewise. > >>> * libc/machine/arm/memcpy-armv7m.S: Likewise. > >>> * libc/machine/arm/setjmp.S: Likewise. > >>> * libc/machine/arm/strlen-armv7.S: Likewise. > >>> * libc/machine/arm/strlen-thumb2-Os.S: Likewise. > >> > >> Gentle ping > >> > >>> --- > >>> newlib/libc/machine/arm/aeabi_memmove-thumb2.S | 1 + > >>> newlib/libc/machine/arm/aeabi_memset-thumb2.S | 1 + > >>> newlib/libc/machine/arm/memchr.S | 1 + > >>> newlib/libc/machine/arm/memcpy-armv7m.S | 1 + > >>> newlib/libc/machine/arm/setjmp.S | 1 + > >>> newlib/libc/machine/arm/strlen-armv7.S | 1 + > >>> newlib/libc/machine/arm/strlen-thumb2-Os.S | 1 + > >>> 7 files changed, 7 insertions(+) > >>> > >>> diff --git a/newlib/libc/machine/arm/aeabi_memmove-thumb2.S b/newlib/libc/machine/arm/aeabi_memmove-thumb2.S > >>> index 20ca993e5..3018e7412 100644 > >>> --- a/newlib/libc/machine/arm/aeabi_memmove-thumb2.S > >>> +++ b/newlib/libc/machine/arm/aeabi_memmove-thumb2.S > >>> @@ -36,6 +36,7 @@ > >>> ASM_ALIAS __aeabi_memmove8 __aeabi_memmove > >>> __aeabi_memmove: > >>> .fnstart > >>> + .cfi_sections .debug_frame > >>> .cfi_startproc > >>> prologue 4 > >>> cmp r0, r1 > >>> diff --git a/newlib/libc/machine/arm/aeabi_memset-thumb2.S b/newlib/libc/machine/arm/aeabi_memset-thumb2.S > >>> index 6b77d3820..a1b8f0532 100644 > >>> --- a/newlib/libc/machine/arm/aeabi_memset-thumb2.S > >>> +++ b/newlib/libc/machine/arm/aeabi_memset-thumb2.S > >>> @@ -33,6 +33,7 @@ > >>> .global __aeabi_memset > >>> .type __aeabi_memset, %function > >>> .fnstart > >>> + .cfi_sections .debug_frame > >>> .cfi_startproc > >>> ASM_ALIAS __aeabi_memset4 __aeabi_memset > >>> ASM_ALIAS __aeabi_memset8 __aeabi_memset > >>> diff --git a/newlib/libc/machine/arm/memchr.S b/newlib/libc/machine/arm/memchr.S > >>> index d13ef8d65..f0b3650aa 100644 > >>> --- a/newlib/libc/machine/arm/memchr.S > >>> +++ b/newlib/libc/machine/arm/memchr.S > >>> @@ -293,6 +293,7 @@ memchr: > >>> .global memchr > >>> .type memchr,%function > >>> .fnstart > >>> + .cfi_sections .debug_frame > >>> .cfi_startproc > >>> memchr: > >>> @ r0 = start of memory to scan > >>> diff --git a/newlib/libc/machine/arm/memcpy-armv7m.S b/newlib/libc/machine/arm/memcpy-armv7m.S > >>> index ec1ad6485..13ffdb343 100644 > >>> --- a/newlib/libc/machine/arm/memcpy-armv7m.S > >>> +++ b/newlib/libc/machine/arm/memcpy-armv7m.S > >>> @@ -88,6 +88,7 @@ > >>> .thumb > >>> .thumb_func > >>> .fnstart > >>> + .cfi_sections .debug_frame > >>> .cfi_startproc > >>> .type memcpy, %function > >>> memcpy: > >>> diff --git a/newlib/libc/machine/arm/setjmp.S b/newlib/libc/machine/arm/setjmp.S > >>> index 5e5952296..0070f17cd 100644 > >>> --- a/newlib/libc/machine/arm/setjmp.S > >>> +++ b/newlib/libc/machine/arm/setjmp.S > >>> @@ -183,6 +183,7 @@ SYM (.arm_start_of.\name): > >>> MODE > >>> .globl SYM (\name) > >>> .fnstart > >>> + .cfi_sections .debug_frame > >>> .cfi_startproc > >>> TYPE (\name) > >>> SYM (\name): > >>> diff --git a/newlib/libc/machine/arm/strlen-armv7.S b/newlib/libc/machine/arm/strlen-armv7.S > >>> index 6aa122c07..1c2b5c532 100644 > >>> --- a/newlib/libc/machine/arm/strlen-armv7.S > >>> +++ b/newlib/libc/machine/arm/strlen-armv7.S > >>> @@ -106,6 +106,7 @@ > >>> > >>> def_fn strlen p2align=6 > >>> .fnstart > >>> + .cfi_sections .debug_frame > >>> .cfi_startproc > >>> prologue 4 5 push_ip=HAVE_PAC_LEAF > >>> pld [srcin, #0] > >>> diff --git a/newlib/libc/machine/arm/strlen-thumb2-Os.S b/newlib/libc/machine/arm/strlen-thumb2-Os.S > >>> index 4adbc61d2..b8a615a15 100644 > >>> --- a/newlib/libc/machine/arm/strlen-thumb2-Os.S > >>> +++ b/newlib/libc/machine/arm/strlen-thumb2-Os.S > >>> @@ -47,6 +47,7 @@ > >>> > >>> def_fn strlen p2align=1 > >>> .fnstart > >>> + .cfi_sections .debug_frame > >>> .cfi_startproc > >>> prologue > >>> mov r3, r0 > >>> -- > >>> 2.25.1 > >>> > > >
diff --git a/newlib/libc/machine/arm/aeabi_memmove-thumb2.S b/newlib/libc/machine/arm/aeabi_memmove-thumb2.S index 20ca993e5..3018e7412 100644 --- a/newlib/libc/machine/arm/aeabi_memmove-thumb2.S +++ b/newlib/libc/machine/arm/aeabi_memmove-thumb2.S @@ -36,6 +36,7 @@ ASM_ALIAS __aeabi_memmove8 __aeabi_memmove __aeabi_memmove: .fnstart + .cfi_sections .debug_frame .cfi_startproc prologue 4 cmp r0, r1 diff --git a/newlib/libc/machine/arm/aeabi_memset-thumb2.S b/newlib/libc/machine/arm/aeabi_memset-thumb2.S index 6b77d3820..a1b8f0532 100644 --- a/newlib/libc/machine/arm/aeabi_memset-thumb2.S +++ b/newlib/libc/machine/arm/aeabi_memset-thumb2.S @@ -33,6 +33,7 @@ .global __aeabi_memset .type __aeabi_memset, %function .fnstart + .cfi_sections .debug_frame .cfi_startproc ASM_ALIAS __aeabi_memset4 __aeabi_memset ASM_ALIAS __aeabi_memset8 __aeabi_memset diff --git a/newlib/libc/machine/arm/memchr.S b/newlib/libc/machine/arm/memchr.S index d13ef8d65..f0b3650aa 100644 --- a/newlib/libc/machine/arm/memchr.S +++ b/newlib/libc/machine/arm/memchr.S @@ -293,6 +293,7 @@ memchr: .global memchr .type memchr,%function .fnstart + .cfi_sections .debug_frame .cfi_startproc memchr: @ r0 = start of memory to scan diff --git a/newlib/libc/machine/arm/memcpy-armv7m.S b/newlib/libc/machine/arm/memcpy-armv7m.S index ec1ad6485..13ffdb343 100644 --- a/newlib/libc/machine/arm/memcpy-armv7m.S +++ b/newlib/libc/machine/arm/memcpy-armv7m.S @@ -88,6 +88,7 @@ .thumb .thumb_func .fnstart + .cfi_sections .debug_frame .cfi_startproc .type memcpy, %function memcpy: diff --git a/newlib/libc/machine/arm/setjmp.S b/newlib/libc/machine/arm/setjmp.S index 5e5952296..0070f17cd 100644 --- a/newlib/libc/machine/arm/setjmp.S +++ b/newlib/libc/machine/arm/setjmp.S @@ -183,6 +183,7 @@ SYM (.arm_start_of.\name): MODE .globl SYM (\name) .fnstart + .cfi_sections .debug_frame .cfi_startproc TYPE (\name) SYM (\name): diff --git a/newlib/libc/machine/arm/strlen-armv7.S b/newlib/libc/machine/arm/strlen-armv7.S index 6aa122c07..1c2b5c532 100644 --- a/newlib/libc/machine/arm/strlen-armv7.S +++ b/newlib/libc/machine/arm/strlen-armv7.S @@ -106,6 +106,7 @@ def_fn strlen p2align=6 .fnstart + .cfi_sections .debug_frame .cfi_startproc prologue 4 5 push_ip=HAVE_PAC_LEAF pld [srcin, #0] diff --git a/newlib/libc/machine/arm/strlen-thumb2-Os.S b/newlib/libc/machine/arm/strlen-thumb2-Os.S index 4adbc61d2..b8a615a15 100644 --- a/newlib/libc/machine/arm/strlen-thumb2-Os.S +++ b/newlib/libc/machine/arm/strlen-thumb2-Os.S @@ -47,6 +47,7 @@ def_fn strlen p2align=1 .fnstart + .cfi_sections .debug_frame .cfi_startproc prologue mov r3, r0