public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/115360] New: cmse_nonsecure_call wrapper missing STT_FUNCTION
@ 2024-06-05 15:11 avieira at gcc dot gnu.org
  2024-06-05 15:14 ` [Bug target/115360] cmse_nonsecure_call wrapper on arm " rearnsha at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: avieira at gcc dot gnu.org @ 2024-06-05 15:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115360

            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). 
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 Arm
state on a thumb-only processor.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-06-12 14:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-05 15:11 [Bug target/115360] New: cmse_nonsecure_call wrapper missing STT_FUNCTION avieira at gcc dot gnu.org
2024-06-05 15:14 ` [Bug target/115360] cmse_nonsecure_call wrapper on arm " rearnsha at gcc dot gnu.org
2024-06-06 15:03 ` cvs-commit at gcc dot gnu.org
2024-06-12 14:09 ` cvs-commit at gcc dot gnu.org
2024-06-12 14:11 ` cvs-commit at gcc dot gnu.org
2024-06-12 14:12 ` cvs-commit at gcc dot gnu.org
2024-06-12 14:13 ` cvs-commit at gcc dot gnu.org
2024-06-12 14:15 ` avieira at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).