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
* [Bug target/115360] cmse_nonsecure_call wrapper on arm missing STT_FUNCTION
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 ` rearnsha at gcc dot gnu.org
2024-06-06 15:03 ` cvs-commit at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rearnsha at gcc dot gnu.org @ 2024-06-05 15:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115360
Richard Earnshaw <rearnsha at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2024-06-05
Summary|cmse_nonsecure_call wrapper |cmse_nonsecure_call wrapper
|missing STT_FUNCTION |on arm missing STT_FUNCTION
--- Comment #1 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
Confirmed by observation.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/115360] cmse_nonsecure_call wrapper on arm missing STT_FUNCTION
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
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-06-06 15:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115360
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Andre Simoes Dias Vieira
<avieira@gcc.gnu.org>:
https://gcc.gnu.org/g:c559353af49fe5743d226ac3112a285b27a50f6a
commit r15-1073-gc559353af49fe5743d226ac3112a285b27a50f6a
Author: Andre Vieira <andre.simoesdiasvieira@arm.com>
Date: Thu Jun 6 16:02:50 2024 +0100
arm: Add .type and .size to __gnu_cmse_nonsecure_call [PR115360]
This patch adds missing assembly directives to the CMSE library wrapper to
call
functions with attribute cmse_nonsecure_call. Without the .type directive
the
linker will fail to produce the correct veneer if a call to this wrapper
function is to far from the wrapper itself. The .size was added for
completeness, though we don't necessarily have a usecase for it.
libgcc/ChangeLog:
PR target/115360
* config/arm/cmse_nonsecure_call.S: Add .type and .size directives.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/115360] cmse_nonsecure_call wrapper on arm missing STT_FUNCTION
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
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-06-12 14:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115360
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Andre Simoes Dias Vieira
<avieira@gcc.gnu.org>:
https://gcc.gnu.org/g:7593dae69ba06ffe63bc22d26c16b19aa9ab24e8
commit r14-10308-g7593dae69ba06ffe63bc22d26c16b19aa9ab24e8
Author: Andre Vieira <andre.simoesdiasvieira@arm.com>
Date: Thu Jun 6 16:02:50 2024 +0100
arm: Add .type and .size to __gnu_cmse_nonsecure_call [PR115360]
This patch adds missing assembly directives to the CMSE library wrapper to
call
functions with attribute cmse_nonsecure_call. Without the .type directive
the
linker will fail to produce the correct veneer if a call to this wrapper
function is to far from the wrapper itself. The .size was added for
completeness, though we don't necessarily have a usecase for it.
libgcc/ChangeLog:
PR target/115360
* config/arm/cmse_nonsecure_call.S: Add .type and .size directives.
(cherry picked from commit c559353af49fe5743d226ac3112a285b27a50f6a)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/115360] cmse_nonsecure_call wrapper on arm missing STT_FUNCTION
2024-06-05 15:11 [Bug target/115360] New: cmse_nonsecure_call wrapper missing STT_FUNCTION avieira at gcc dot gnu.org
` (2 preceding siblings ...)
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
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-06-12 14:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115360
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Andre Simoes Dias Vieira
<avieira@gcc.gnu.org>:
https://gcc.gnu.org/g:113a104edb5c31fbaa767ba8526f0da4dcf39ebe
commit r13-8846-g113a104edb5c31fbaa767ba8526f0da4dcf39ebe
Author: Andre Vieira <andre.simoesdiasvieira@arm.com>
Date: Thu Jun 6 16:02:50 2024 +0100
arm: Add .type and .size to __gnu_cmse_nonsecure_call [PR115360]
This patch adds missing assembly directives to the CMSE library wrapper to
call
functions with attribute cmse_nonsecure_call. Without the .type directive
the
linker will fail to produce the correct veneer if a call to this wrapper
function is to far from the wrapper itself. The .size was added for
completeness, though we don't necessarily have a usecase for it.
libgcc/ChangeLog:
PR target/115360
* config/arm/cmse_nonsecure_call.S: Add .type and .size directives.
(cherry picked from commit c559353af49fe5743d226ac3112a285b27a50f6a)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/115360] cmse_nonsecure_call wrapper on arm missing STT_FUNCTION
2024-06-05 15:11 [Bug target/115360] New: cmse_nonsecure_call wrapper missing STT_FUNCTION avieira at gcc dot gnu.org
` (3 preceding siblings ...)
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
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-06-12 14:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115360
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Andre Simoes Dias Vieira
<avieira@gcc.gnu.org>:
https://gcc.gnu.org/g:448dd002a07aa268c00318066bfe843adebe7292
commit r12-10556-g448dd002a07aa268c00318066bfe843adebe7292
Author: Andre Vieira <andre.simoesdiasvieira@arm.com>
Date: Thu Jun 6 16:02:50 2024 +0100
arm: Add .type and .size to __gnu_cmse_nonsecure_call [PR115360]
This patch adds missing assembly directives to the CMSE library wrapper to
call
functions with attribute cmse_nonsecure_call. Without the .type directive
the
linker will fail to produce the correct veneer if a call to this wrapper
function is to far from the wrapper itself. The .size was added for
completeness, though we don't necessarily have a usecase for it.
libgcc/ChangeLog:
PR target/115360
* config/arm/cmse_nonsecure_call.S: Add .type and .size directives.
(cherry picked from commit c559353af49fe5743d226ac3112a285b27a50f6a)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/115360] cmse_nonsecure_call wrapper on arm missing STT_FUNCTION
2024-06-05 15:11 [Bug target/115360] New: cmse_nonsecure_call wrapper missing STT_FUNCTION avieira at gcc dot gnu.org
` (4 preceding siblings ...)
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
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-06-12 14:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115360
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Andre Simoes Dias Vieira
<avieira@gcc.gnu.org>:
https://gcc.gnu.org/g:e8d2679c0163f190984c6e5c20f17fe0ceec77fd
commit r11-11479-ge8d2679c0163f190984c6e5c20f17fe0ceec77fd
Author: Andre Vieira <andre.simoesdiasvieira@arm.com>
Date: Thu Jun 6 16:02:50 2024 +0100
arm: Add .type and .size to __gnu_cmse_nonsecure_call [PR115360]
This patch adds missing assembly directives to the CMSE library wrapper to
call
functions with attribute cmse_nonsecure_call. Without the .type directive
the
linker will fail to produce the correct veneer if a call to this wrapper
function is to far from the wrapper itself. The .size was added for
completeness, though we don't necessarily have a usecase for it.
libgcc/ChangeLog:
PR target/115360
* config/arm/cmse_nonsecure_call.S: Add .type and .size directives.
(cherry picked from commit c559353af49fe5743d226ac3112a285b27a50f6a)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/115360] cmse_nonsecure_call wrapper on arm missing STT_FUNCTION
2024-06-05 15:11 [Bug target/115360] New: cmse_nonsecure_call wrapper missing STT_FUNCTION avieira at gcc dot gnu.org
` (5 preceding siblings ...)
2024-06-12 14:13 ` cvs-commit at gcc dot gnu.org
@ 2024-06-12 14:15 ` avieira at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: avieira at gcc dot gnu.org @ 2024-06-12 14:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115360
avieira at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
Known to work| |11.0, 12.0, 13.0, 15.0
--- Comment #7 from avieira at gcc dot gnu.org ---
Fix first applied on gcc-15 and backported up to gcc-11.
^ 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).