https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86712
--- Comment #1 from Sergei Trofimovich <slyfox at inbox dot ru> --- This fix seems to be enough to not encode absolute address into _ITM_beginTransaction: diff --git a/libitm/config/sh/sjlj.S b/libitm/config/sh/sjlj.S index 043f36749be..80a810d8360 100644 --- a/libitm/config/sh/sjlj.S +++ b/libitm/config/sh/sjlj.S @@ -46,21 +46,21 @@ _ITM_beginTransaction: mov.l r12, @-r15 mov.l r11, @-r15 mov.l r10, @-r15 mov.l r9, @-r15 mov.l r8, @-r15 #ifdef __SH_FPU_ANY__ cfi_def_cfa_offset (4*15) #else cfi_def_cfa_offset (4*10) #endif -#if defined HAVE_ATTRIBUTE_VISIBILITY || !defined __PIC__ +#if defined HAVE_ATTRIBUTE_VISIBILITY && !defined __PIC__ mov.l .Lbegin, r1 jsr @r1 mov r15, r5 #else mov.l .Lbegin, r1 bsrf r1 mov r15, r5 .Lbegin0: mov.l @(4*4,r15), r12 #endif @@ -71,21 +71,21 @@ _ITM_beginTransaction: #else add #(10*5), r15 #endif cfi_def_cfa_offset (0) rts nop cfi_endproc .align 2 .Lbegin: -#if defined HAVE_ATTRIBUTE_VISIBILITY || !defined __PIC__ +#if defined HAVE_ATTRIBUTE_VISIBILITY && !defined __PIC__ .long GTM_begin_transaction #else .long GTM_begin_transaction@PCREL-(.Lbegin0-.) #endif .size _ITM_beginTransaction, . - _ITM_beginTransaction .global GTM_longjmp .hidden GTM_longjmp .type GTM_longjmp, %function