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

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Untested fix:
2020-02-06  Jakub Jelinek  <ja...@redhat.com>

        PR target/93615
        * config/arm/unwind-arm.h (gnu_Unwind_Find_got): Rename to ...
        (_Unwind_gnu_Find_got): ... this.  Use __asm instead of asm.  Remove
        trailing :s in asm.  Formatting fixes.
        (_Unwind_decode_typeinfo_ptr): Adjust caller.

--- libgcc/config/arm/unwind-arm.h.jj   2020-01-12 11:54:38.616380172 +0100
+++ libgcc/config/arm/unwind-arm.h      2020-02-06 16:16:54.244624408 +0100
@@ -43,19 +43,15 @@ extern "C" {
 #endif
 _Unwind_Ptr __attribute__((weak)) __gnu_Unwind_Find_got (_Unwind_Ptr);

-static inline _Unwind_Ptr gnu_Unwind_Find_got (_Unwind_Ptr ptr)
+static inline _Unwind_Ptr _Unwind_gnu_Find_got (_Unwind_Ptr ptr)
 {
     _Unwind_Ptr res;

     if (__gnu_Unwind_Find_got)
-       res =  __gnu_Unwind_Find_got (ptr);
+       res = __gnu_Unwind_Find_got (ptr);
     else
-      {
-       asm volatile ("mov %[result], r" XSTR(FDPIC_REGNUM)
-                     : [result]"=r" (res)
-                     :
-                     :);
-      }
+       __asm volatile ("mov %[result], r" XSTR(FDPIC_REGNUM)
+                       : [result] "=r" (res));

     return res;
 }
@@ -75,7 +71,7 @@ static inline _Unwind_Ptr gnu_Unwind_Fin
 #if __FDPIC__
       /* For FDPIC, we store the offset of the GOT entry.  */
       /* So, first get GOT from dynamic linker and then use indirect access. 
*/
-      tmp += gnu_Unwind_Find_got (ptr);
+      tmp += _Unwind_gnu_Find_got (ptr);
       tmp = *(_Unwind_Word *) tmp;
 #elif (defined(linux) && !defined(__uClinux__)) || defined(__NetBSD__) \
     || defined(__FreeBSD__) || defined(__fuchsia__)

Reply via email to