public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] libitm: sh: avoid absolute relocation in shared library (PR 86712)
@ 2018-07-28  9:45 slyfox.inbox.ru via gcc-patches
  2018-07-28 12:42 ` Andreas Schwab
  0 siblings, 1 reply; 6+ messages in thread
From: slyfox.inbox.ru via gcc-patches @ 2018-07-28  9:45 UTC (permalink / raw)
  To: gcc-patches, Torvald Riegel, Alexandre Oliva, Oleg Endo, Kaz Kojima
  Cc: Sergei Trofimovich

From: Sergei Trofimovich <slyfox@gentoo.org>

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
---
 libitm/config/sh/sjlj.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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
@@ -53,7 +53,7 @@ _ITM_beginTransaction:
 #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
@@ -78,7 +78,7 @@ _ITM_beginTransaction:
 
 	.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-.)
-- 
2.18.0

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

* Re: [PATCH] libitm: sh: avoid absolute relocation in shared library (PR 86712)
  2018-07-28  9:45 [PATCH] libitm: sh: avoid absolute relocation in shared library (PR 86712) slyfox.inbox.ru via gcc-patches
@ 2018-07-28 12:42 ` Andreas Schwab
  2018-07-28 13:04   ` [PATCH v2] " slyfox.inbox.ru via gcc-patches
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Schwab @ 2018-07-28 12:42 UTC (permalink / raw)
  To: slyfox.inbox.ru via gcc-patches
  Cc: Torvald Riegel, Alexandre Oliva, Oleg Endo, Kaz Kojima, slyfox,
	Sergei Trofimovich

On Jul 28 2018, "slyfox.inbox.ru via gcc-patches" <gcc-patches@gcc.gnu.org> wrote:

> 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
> @@ -53,7 +53,7 @@ _ITM_beginTransaction:
>  #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
> @@ -78,7 +78,7 @@ _ITM_beginTransaction:
>  
>  	.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-.)

If those references to hidden symbols cannot be resolved by the linker
then the use of HAVE_ATTRIBUTE_VISIBILITY is pointless.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

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

* [PATCH v2] libitm: sh: avoid absolute relocation in shared library (PR 86712)
  2018-07-28 12:42 ` Andreas Schwab
@ 2018-07-28 13:04   ` slyfox.inbox.ru via gcc-patches
  2018-08-03 20:54     ` Jeff Law
  0 siblings, 1 reply; 6+ messages in thread
From: slyfox.inbox.ru via gcc-patches @ 2018-07-28 13:04 UTC (permalink / raw)
  To: gcc-patches, Andreas Schwab
  Cc: Sergei Trofimovich, Torvald Riegel, Alexandre Oliva, Oleg Endo,
	Kaz Kojima

From: Sergei Trofimovich <slyfox@gentoo.org>

Cc: Andreas Schwab <schwab@linux-m68k.org>
Cc: Torvald Riegel <triegel@redhat.com>
Cc: Alexandre Oliva <aoliva@redhat.com>
Cc: Oleg Endo <olegendo@gcc.gnu.org>
Cc: Kaz Kojima <kkojima@gcc.gnu.org>
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
---
 libitm/config/sh/sjlj.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libitm/config/sh/sjlj.S b/libitm/config/sh/sjlj.S
index 043f36749be..f265ab8f898 100644
--- a/libitm/config/sh/sjlj.S
+++ b/libitm/config/sh/sjlj.S
@@ -53,7 +53,7 @@ _ITM_beginTransaction:
 #else
 	cfi_def_cfa_offset (4*10)
 #endif
-#if defined HAVE_ATTRIBUTE_VISIBILITY || !defined __PIC__
+#if !defined __PIC__
 	mov.l	.Lbegin, r1
 	jsr	@r1
 	 mov	r15, r5
@@ -78,7 +78,7 @@ _ITM_beginTransaction:
 
 	.align  2
 .Lbegin:
-#if defined HAVE_ATTRIBUTE_VISIBILITY || !defined __PIC__
+#if !defined __PIC__
 	.long	GTM_begin_transaction
 #else
 	.long	GTM_begin_transaction@PCREL-(.Lbegin0-.)
-- 
2.18.0

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

* Re: [PATCH v2] libitm: sh: avoid absolute relocation in shared library (PR 86712)
  2018-07-28 13:04   ` [PATCH v2] " slyfox.inbox.ru via gcc-patches
@ 2018-08-03 20:54     ` Jeff Law
  2018-08-04  9:00       ` Oleg Endo
  0 siblings, 1 reply; 6+ messages in thread
From: Jeff Law @ 2018-08-03 20:54 UTC (permalink / raw)
  To: slyfox, gcc-patches, Andreas Schwab
  Cc: Sergei Trofimovich, Torvald Riegel, Alexandre Oliva, Oleg Endo,
	Kaz Kojima

On 07/28/2018 07:04 AM, slyfox.inbox.ru via gcc-patches wrote:
> From: Sergei Trofimovich <slyfox@gentoo.org>
> 
> Cc: Andreas Schwab <schwab@linux-m68k.org>
> Cc: Torvald Riegel <triegel@redhat.com>
> Cc: Alexandre Oliva <aoliva@redhat.com>
> Cc: Oleg Endo <olegendo@gcc.gnu.org>
> Cc: Kaz Kojima <kkojima@gcc.gnu.org>
> Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
> ---
>  libitm/config/sh/sjlj.S | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libitm/config/sh/sjlj.S b/libitm/config/sh/sjlj.S
> index 043f36749be..f265ab8f898 100644
> --- a/libitm/config/sh/sjlj.S
> +++ b/libitm/config/sh/sjlj.S
> @@ -53,7 +53,7 @@ _ITM_beginTransaction:
>  #else
>  	cfi_def_cfa_offset (4*10)
>  #endif
> -#if defined HAVE_ATTRIBUTE_VISIBILITY || !defined __PIC__
> +#if !defined __PIC__
>  	mov.l	.Lbegin, r1
>  	jsr	@r1
>  	 mov	r15, r5
> @@ -78,7 +78,7 @@ _ITM_beginTransaction:
>  
>  	.align  2
>  .Lbegin:
> -#if defined HAVE_ATTRIBUTE_VISIBILITY || !defined __PIC__
> +#if !defined __PIC__
>  	.long	GTM_begin_transaction
>  #else
>  	.long	GTM_begin_transaction@PCREL-(.Lbegin0-.)
> 
THanks.  I installed this version.

jeff

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

* Re: [PATCH v2] libitm: sh: avoid absolute relocation in shared library (PR 86712)
  2018-08-03 20:54     ` Jeff Law
@ 2018-08-04  9:00       ` Oleg Endo
  2019-09-28  9:14         ` Oleg Endo
  0 siblings, 1 reply; 6+ messages in thread
From: Oleg Endo @ 2018-08-04  9:00 UTC (permalink / raw)
  To: Jeff Law, slyfox, gcc-patches, Andreas Schwab
  Cc: Sergei Trofimovich, Torvald Riegel, Alexandre Oliva, Oleg Endo,
	Kaz Kojima

On Fri, 2018-08-03 at 14:54 -0600, Jeff Law wrote:
> On 07/28/2018 07:04 AM, slyfox.inbox.ru via gcc-patches wrote:
> > 
> > From: Sergei Trofimovich <slyfox@gentoo.org>
> > 
> > Cc: Andreas Schwab <schwab@linux-m68k.org>
> > Cc: Torvald Riegel <triegel@redhat.com>
> > Cc: Alexandre Oliva <aoliva@redhat.com>
> > Cc: Oleg Endo <olegendo@gcc.gnu.org>
> > Cc: Kaz Kojima <kkojima@gcc.gnu.org>
> > Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
> > ---
> >  libitm/config/sh/sjlj.S | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/libitm/config/sh/sjlj.S b/libitm/config/sh/sjlj.S
> > index 043f36749be..f265ab8f898 100644
> > --- a/libitm/config/sh/sjlj.S
> > +++ b/libitm/config/sh/sjlj.S
> > @@ -53,7 +53,7 @@ _ITM_beginTransaction:
> >  #else
> >  	cfi_def_cfa_offset (4*10)
> >  #endif
> > -#if defined HAVE_ATTRIBUTE_VISIBILITY || !defined __PIC__
> > +#if !defined __PIC__
> >  	mov.l	.Lbegin, r1
> >  	jsr	@r1
> >  	 mov	r15, r5
> > @@ -78,7 +78,7 @@ _ITM_beginTransaction:
> >  
> >  	.align  2
> >  .Lbegin:
> > -#if defined HAVE_ATTRIBUTE_VISIBILITY || !defined __PIC__
> > +#if !defined __PIC__
> >  	.long	GTM_begin_transaction
> >  #else
> >  	.long	GTM_begin_transaction@PCREL-(.Lbegin0-.)
> > 
> THanks.  I installed this version.
> 

Thanks Jeff.
If there are no objections, I'll backport it to the 7 and 8 branches.

Cheers,
Oleg

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

* Re: [PATCH v2] libitm: sh: avoid absolute relocation in shared library (PR 86712)
  2018-08-04  9:00       ` Oleg Endo
@ 2019-09-28  9:14         ` Oleg Endo
  0 siblings, 0 replies; 6+ messages in thread
From: Oleg Endo @ 2019-09-28  9:14 UTC (permalink / raw)
  To: Jeff Law, slyfox, gcc-patches, Andreas Schwab
  Cc: Sergei Trofimovich, Torvald Riegel, Alexandre Oliva, Oleg Endo,
	Kaz Kojima

On Sat, 2018-08-04 at 18:00 +0900, Oleg Endo wrote:
> On Fri, 2018-08-03 at 14:54 -0600, Jeff Law wrote:
> > On 07/28/2018 07:04 AM, slyfox.inbox.ru via gcc-patches wrote:
> > > 
> > > From: Sergei Trofimovich <slyfox@gentoo.org>
> > > 
> > > Cc: Andreas Schwab <schwab@linux-m68k.org>
> > > Cc: Torvald Riegel <triegel@redhat.com>
> > > Cc: Alexandre Oliva <aoliva@redhat.com>
> > > Cc: Oleg Endo <olegendo@gcc.gnu.org>
> > > Cc: Kaz Kojima <kkojima@gcc.gnu.org>
> > > Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
> > > ---
> > >  libitm/config/sh/sjlj.S | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/libitm/config/sh/sjlj.S b/libitm/config/sh/sjlj.S
> > > index 043f36749be..f265ab8f898 100644
> > > --- a/libitm/config/sh/sjlj.S
> > > +++ b/libitm/config/sh/sjlj.S
> > > @@ -53,7 +53,7 @@ _ITM_beginTransaction:
> > >  #else
> > >  	cfi_def_cfa_offset (4*10)
> > >  #endif
> > > -#if defined HAVE_ATTRIBUTE_VISIBILITY || !defined __PIC__
> > > +#if !defined __PIC__
> > >  	mov.l	.Lbegin, r1
> > >  	jsr	@r1
> > >  	 mov	r15, r5
> > > @@ -78,7 +78,7 @@ _ITM_beginTransaction:
> > >  
> > >  	.align  2
> > >  .Lbegin:
> > > -#if defined HAVE_ATTRIBUTE_VISIBILITY || !defined __PIC__
> > > +#if !defined __PIC__
> > >  	.long	GTM_begin_transaction
> > >  #else
> > >  	.long	GTM_begin_transaction@PCREL-(.Lbegin0-.)
> > > 
> > 
> > THanks.  I installed this version.
> > 
> 
> Thanks Jeff.
> If there are no objections, I'll backport it to the 7 and 8 branches.
> 
> Cheers,
> Oleg


Finally .... committed to GCC 8 as r276246 and to GCC 7 as r276247.

Cheers,
Oleg


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

end of thread, other threads:[~2019-09-28  9:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-28  9:45 [PATCH] libitm: sh: avoid absolute relocation in shared library (PR 86712) slyfox.inbox.ru via gcc-patches
2018-07-28 12:42 ` Andreas Schwab
2018-07-28 13:04   ` [PATCH v2] " slyfox.inbox.ru via gcc-patches
2018-08-03 20:54     ` Jeff Law
2018-08-04  9:00       ` Oleg Endo
2019-09-28  9:14         ` Oleg Endo

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