From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A7AD53AF599D; Wed, 5 Jun 2024 15:11:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A7AD53AF599D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1717600316; bh=0W9Cfs2QGFNUrPdqNCAo83cAC3/wVB6TTLbvpN+R9Kk=; h=From:To:Subject:Date:From; b=hQXmMuCBXZIhg3y2Wb1fntgRTBGw7HxzS9kIhxa7Tn0q7uSxYAu8ml4k3pydc0HX7 N99l16JF4pj4ehueNAqoDoDE4eyNNNLJRm5iyIqZmWlwvKF4bFBhXvhtP9v/gYlSmy UsNFcfQ9AWexQWNMfPX67trmmvFelVqWI0TV3LOA= From: "avieira at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/115360] New: cmse_nonsecure_call wrapper missing STT_FUNCTION Date: Wed, 05 Jun 2024 15:11:56 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: avieira at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D115360 Bug ID: 115360 Summary: cmse_nonsecure_call wrapper missing STT_FUNCTION Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: avieira at gcc dot gnu.org Target Milestone: --- The Arm ABI requires a linker to handle calls to 'distant' functions by inserting a wrapper veneer, or trampoline. Such functions need to be given permission to do this by marking them as type STT_FUNC (so that it is clear that there is a scratch register available for use within the veneer).=20 Unfortunately, __gnu_cmse_nonesecure_call is not marked at all (defaulting = to STT_NOTYPE). A separate bug in GNU ld means this problem is not diagnosed = at link time, and the linker silently picks the wrong veneer type into the bargain, leading to run-time crashes when the CPU is asked to switch into A= rm state on a thumb-only processor.=