public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/ARM/heads/morello)] Fix use of unmangled names in unwinding info
@ 2022-02-28 12:08 Matthew Malcomson
  0 siblings, 0 replies; only message in thread
From: Matthew Malcomson @ 2022-02-28 12:08 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:c9fb2c79e32f61f89d351f3a9772a9213480963d

commit c9fb2c79e32f61f89d351f3a9772a9213480963d
Author: Alex Coplan <alex.coplan@arm.com>
Date:   Tue Feb 8 10:02:21 2022 +0000

    Fix use of unmangled names in unwinding info
    
    Commit dbc45b10e6 introduced assembly failures for purecap and fakecap
    by emitting unmangled names in assembly. As it stands, the code builds a
    SYMBOL_REF of current_function_name (), but this is the raw unmangled
    name and is not suitable for use in assembly. This patch simply changes
    the call to get_fnname_from_decl (current_function_decl) which gets the
    mangled name from the decl's DECL_RTL.
    
    Note that the code later calls switch_to_exception_section (name), and
    indeed by inspecting other call sites of this function in the file, we
    can see that they get the function name using the pattern above (with
    get_fnname_from_decl).
    
    There is a separate issue where we use the new exception table scheme
    even for fakecap (we should just do it for purecap), but that should be
    fixed separately.

Diff:
---
 gcc/except.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/except.c b/gcc/except.c
index d1b99c14570..22715ce06e1 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -2907,7 +2907,7 @@ dw2_output_call_site_table (int cs_format, int section)
 
 	      /* First create SYMBOL_REFs to the function name, the label at
 		 the start of the function, and the landing pad label.  */
-	      const char * name = ggc_strdup (current_function_name());
+	      const char * name = get_fnname_from_decl (current_function_decl);
 	      rtx named_function_symbol = gen_rtx_SYMBOL_REF (Pmode, name);
 	      SYMBOL_REF_FLAGS (named_function_symbol) = SYMBOL_FLAG_LOCAL;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-28 12:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-28 12:08 [gcc(refs/vendors/ARM/heads/morello)] Fix use of unmangled names in unwinding info Matthew Malcomson

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).