diff mbox series

libgcc: rs6000: tramp.S: fix placement of .cfi_endproc for __trampoline_setup

Message ID 20181212074341.8894-1-rv@rasmusvillemoes.dk
State New
Headers show
Series libgcc: rs6000: tramp.S: fix placement of .cfi_endproc for __trampoline_setup | expand

Commit Message

Rasmus Villemoes Dec. 12, 2018, 7:43 a.m. UTC
Currently, .cfi_endproc and FUNC_END(__trampoline_setup) are placed
inside the #else branch of an "#if defined (__VXWORKS__) ...", so
non-pic vxworks does not get proper CFI nor a .size directive for
__trampoline_setup. I assume there's no magic reason for that (which
would warrant a comment), so move them outside.

== changelog ==

libgcc/

	* config/rs6000/tramp.S (__trampoline_setup): Also emit .size
        and .cfi_endproc directives for VxWorks targets.
---
 libgcc/config/rs6000/tramp.S | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Alan Modra Dec. 12, 2018, 9 a.m. UTC | #1
On Wed, Dec 12, 2018 at 08:43:41AM +0100, Rasmus Villemoes wrote:
> diff --git a/libgcc/config/rs6000/tramp.S b/libgcc/config/rs6000/tramp.S
> index 637f4510146..a9f0f3826dc 100644
> --- a/libgcc/config/rs6000/tramp.S
> +++ b/libgcc/config/rs6000/tramp.S
> @@ -114,11 +114,10 @@ FUNC_START(__trampoline_setup)
>  	addi	r30,r30,_GLOBAL_OFFSET_TABLE_-1b@l
>  #endif
>  	bl	JUMP_TARGET(abort)
> +#endif
>  	.cfi_endproc
>  FUNC_END(__trampoline_setup)
>  
> -#endif
> -
>  #elif _CALL_ELF == 2
>  	.type	trampoline_initial,@object
>  	.align	3

Looks good to me.  I hadn't noticed the bad #endif placement with
respect to FUNC_END when I added .cfi_endproc, which naturally goes
with FUNC_END.
Segher Boessenkool Dec. 13, 2018, 1:18 a.m. UTC | #2
On Wed, Dec 12, 2018 at 07:30:08PM +1030, Alan Modra wrote:
> On Wed, Dec 12, 2018 at 08:43:41AM +0100, Rasmus Villemoes wrote:
> > diff --git a/libgcc/config/rs6000/tramp.S b/libgcc/config/rs6000/tramp.S
> > index 637f4510146..a9f0f3826dc 100644
> > --- a/libgcc/config/rs6000/tramp.S
> > +++ b/libgcc/config/rs6000/tramp.S
> > @@ -114,11 +114,10 @@ FUNC_START(__trampoline_setup)
> >  	addi	r30,r30,_GLOBAL_OFFSET_TABLE_-1b@l
> >  #endif
> >  	bl	JUMP_TARGET(abort)
> > +#endif
> >  	.cfi_endproc
> >  FUNC_END(__trampoline_setup)
> >  
> > -#endif
> > -
> >  #elif _CALL_ELF == 2
> >  	.type	trampoline_initial,@object
> >  	.align	3
> 
> Looks good to me.  I hadn't noticed the bad #endif placement with
> respect to FUNC_END when I added .cfi_endproc, which naturally goes
> with FUNC_END.

Yes, this is fine for trunk.  Or commit it as obvious ;-)


Segher
diff mbox series

Patch

diff --git a/libgcc/config/rs6000/tramp.S b/libgcc/config/rs6000/tramp.S
index 637f4510146..a9f0f3826dc 100644
--- a/libgcc/config/rs6000/tramp.S
+++ b/libgcc/config/rs6000/tramp.S
@@ -114,11 +114,10 @@  FUNC_START(__trampoline_setup)
 	addi	r30,r30,_GLOBAL_OFFSET_TABLE_-1b@l
 #endif
 	bl	JUMP_TARGET(abort)
+#endif
 	.cfi_endproc
 FUNC_END(__trampoline_setup)
 
-#endif
-
 #elif _CALL_ELF == 2
 	.type	trampoline_initial,@object
 	.align	3