public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] libgcc: Use initarray section type for .init_stack
@ 2023-03-20  6:33 Kewen.Lin
  2023-05-17  6:24 ` PING^1 " Kewen.Lin
  2023-05-25  7:25 ` Andreas Krebbel
  0 siblings, 2 replies; 7+ messages in thread
From: Kewen.Lin @ 2023-03-20  6:33 UTC (permalink / raw)
  To: GCC Patches
  Cc: AlanM, Segher Boessenkool, David Edelsohn, Peter Bergner,
	Uros Bizjak, ian, krebbel

Hi,

One of my workmates found there is a warning like:

  libgcc/config/rs6000/morestack.S:402: Warning: ignoring
    incorrect section type for .init_array.00000

when compiling libgcc/config/rs6000/morestack.S.

Since commit r13-6545 touched that file recently, which was
suspected to be responsible for this warning, I did some
investigation and found this is a warning staying for a long
time.  For section .init_stack*, it's preferred to use
section type SHT_INIT_ARRAY.  So this patch is use
"@init_array" to replace "@progbits".

Although the warning is trivial, Segher suggested me to
post this to fix it, in order to avoid any possible
misunderstanding/confusion on the warning.

As Alan confirmed, this doesn't require a premise check
on if the existing binutils supports "@init_array" or not,
"because if you want split-stack to work, you must link
with gold, any version of binutils that has gold has an
assembler that understands @init_array". (Thanks Alan!)

Bootstrapped and regtested on x86_64-redhat-linux
and powerpc64{,le}-linux-gnu.

Is it ok for trunk when next stage 1 comes?

BR,
Kewen
-----
libgcc/ChangeLog:

	* config/i386/morestack.S: Use @init_array rather than
	@progbits for section type of section .init_array.
	* config/rs6000/morestack.S: Likewise.
	* config/s390/morestack.S: Likewise.
---
 libgcc/config/i386/morestack.S   | 2 +-
 libgcc/config/rs6000/morestack.S | 2 +-
 libgcc/config/s390/morestack.S   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libgcc/config/i386/morestack.S b/libgcc/config/i386/morestack.S
index 7ae99b50cf5..c822b71e2dd 100644
--- a/libgcc/config/i386/morestack.S
+++ b/libgcc/config/i386/morestack.S
@@ -850,7 +850,7 @@ __morestack_make_guard:
 # This is ELF specific.

 #if HAVE_INITFINI_ARRAY_SUPPORT
-	.section	.init_array.00000,"aw",@progbits
+	.section	.init_array.00000,"aw",@init_array
 #else
 	.section	.ctors.65535,"aw",@progbits
 #endif
diff --git a/libgcc/config/rs6000/morestack.S b/libgcc/config/rs6000/morestack.S
index f2fea6abb10..dd1e27cd454 100644
--- a/libgcc/config/rs6000/morestack.S
+++ b/libgcc/config/rs6000/morestack.S
@@ -399,7 +399,7 @@ ENTRY0(__morestack_make_guard)

 # Make __stack_split_initialize a high priority constructor.
 #if HAVE_INITFINI_ARRAY_SUPPORT
-	.section .init_array.00000,"aw",@progbits
+	.section .init_array.00000,"aw",@init_array
 #else
 	.section .ctors.65535,"aw",@progbits
 #endif
diff --git a/libgcc/config/s390/morestack.S b/libgcc/config/s390/morestack.S
index 09a49bb8851..f52e7a6510c 100644
--- a/libgcc/config/s390/morestack.S
+++ b/libgcc/config/s390/morestack.S
@@ -597,7 +597,7 @@ __morestack_make_guard:
 # Make __stack_split_initialize a high priority constructor.

 #if HAVE_INITFINI_ARRAY_SUPPORT
-	.section .init_array.00000,"aw",@progbits
+	.section .init_array.00000,"aw",@init_array
 #else
 	.section .ctors.65535,"aw",@progbits
 #endif
--
2.31.1

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

* PING^1 [PATCH] libgcc: Use initarray section type for .init_stack
  2023-03-20  6:33 [PATCH] libgcc: Use initarray section type for .init_stack Kewen.Lin
@ 2023-05-17  6:24 ` Kewen.Lin
  2023-05-25  7:25 ` Andreas Krebbel
  1 sibling, 0 replies; 7+ messages in thread
From: Kewen.Lin @ 2023-05-17  6:24 UTC (permalink / raw)
  To: GCC Patches
  Cc: AlanM, Segher Boessenkool, David Edelsohn, Peter Bergner,
	Uros Bizjak, ian, krebbel

Hi,

Gentle ping this:

https://gcc.gnu.org/pipermail/gcc-patches/2023-March/614228.html

BR,
Kewen

on 2023/3/20 14:33, Kewen.Lin via Gcc-patches wrote:
> Hi,
> 
> One of my workmates found there is a warning like:
> 
>   libgcc/config/rs6000/morestack.S:402: Warning: ignoring
>     incorrect section type for .init_array.00000
> 
> when compiling libgcc/config/rs6000/morestack.S.
> 
> Since commit r13-6545 touched that file recently, which was
> suspected to be responsible for this warning, I did some
> investigation and found this is a warning staying for a long
> time.  For section .init_stack*, it's preferred to use
> section type SHT_INIT_ARRAY.  So this patch is use
> "@init_array" to replace "@progbits".
> 
> Although the warning is trivial, Segher suggested me to
> post this to fix it, in order to avoid any possible
> misunderstanding/confusion on the warning.
> 
> As Alan confirmed, this doesn't require a premise check
> on if the existing binutils supports "@init_array" or not,
> "because if you want split-stack to work, you must link
> with gold, any version of binutils that has gold has an
> assembler that understands @init_array". (Thanks Alan!)
> 
> Bootstrapped and regtested on x86_64-redhat-linux
> and powerpc64{,le}-linux-gnu.
> 
> Is it ok for trunk when next stage 1 comes?
> 
> BR,
> Kewen
> -----
> libgcc/ChangeLog:
> 
> 	* config/i386/morestack.S: Use @init_array rather than
> 	@progbits for section type of section .init_array.
> 	* config/rs6000/morestack.S: Likewise.
> 	* config/s390/morestack.S: Likewise.
> ---
>  libgcc/config/i386/morestack.S   | 2 +-
>  libgcc/config/rs6000/morestack.S | 2 +-
>  libgcc/config/s390/morestack.S   | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/libgcc/config/i386/morestack.S b/libgcc/config/i386/morestack.S
> index 7ae99b50cf5..c822b71e2dd 100644
> --- a/libgcc/config/i386/morestack.S
> +++ b/libgcc/config/i386/morestack.S
> @@ -850,7 +850,7 @@ __morestack_make_guard:
>  # This is ELF specific.
> 
>  #if HAVE_INITFINI_ARRAY_SUPPORT
> -	.section	.init_array.00000,"aw",@progbits
> +	.section	.init_array.00000,"aw",@init_array
>  #else
>  	.section	.ctors.65535,"aw",@progbits
>  #endif
> diff --git a/libgcc/config/rs6000/morestack.S b/libgcc/config/rs6000/morestack.S
> index f2fea6abb10..dd1e27cd454 100644
> --- a/libgcc/config/rs6000/morestack.S
> +++ b/libgcc/config/rs6000/morestack.S
> @@ -399,7 +399,7 @@ ENTRY0(__morestack_make_guard)
> 
>  # Make __stack_split_initialize a high priority constructor.
>  #if HAVE_INITFINI_ARRAY_SUPPORT
> -	.section .init_array.00000,"aw",@progbits
> +	.section .init_array.00000,"aw",@init_array
>  #else
>  	.section .ctors.65535,"aw",@progbits
>  #endif
> diff --git a/libgcc/config/s390/morestack.S b/libgcc/config/s390/morestack.S
> index 09a49bb8851..f52e7a6510c 100644
> --- a/libgcc/config/s390/morestack.S
> +++ b/libgcc/config/s390/morestack.S
> @@ -597,7 +597,7 @@ __morestack_make_guard:
>  # Make __stack_split_initialize a high priority constructor.
> 
>  #if HAVE_INITFINI_ARRAY_SUPPORT
> -	.section .init_array.00000,"aw",@progbits
> +	.section .init_array.00000,"aw",@init_array
>  #else
>  	.section .ctors.65535,"aw",@progbits
>  #endif
> --
> 2.31.1




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

* Re: [PATCH] libgcc: Use initarray section type for .init_stack
  2023-03-20  6:33 [PATCH] libgcc: Use initarray section type for .init_stack Kewen.Lin
  2023-05-17  6:24 ` PING^1 " Kewen.Lin
@ 2023-05-25  7:25 ` Andreas Krebbel
  2023-05-31  7:39   ` Kewen.Lin
  1 sibling, 1 reply; 7+ messages in thread
From: Andreas Krebbel @ 2023-05-25  7:25 UTC (permalink / raw)
  To: Kewen.Lin, GCC Patches

On 3/20/23 07:33, Kewen.Lin wrote:
> Hi,
> 
> One of my workmates found there is a warning like:
> 
>   libgcc/config/rs6000/morestack.S:402: Warning: ignoring
>     incorrect section type for .init_array.00000
> 
> when compiling libgcc/config/rs6000/morestack.S.
> 
> Since commit r13-6545 touched that file recently, which was
> suspected to be responsible for this warning, I did some
> investigation and found this is a warning staying for a long
> time.  For section .init_stack*, it's preferred to use
> section type SHT_INIT_ARRAY.  So this patch is use
> "@init_array" to replace "@progbits".
> 
> Although the warning is trivial, Segher suggested me to
> post this to fix it, in order to avoid any possible
> misunderstanding/confusion on the warning.
> 
> As Alan confirmed, this doesn't require a premise check
> on if the existing binutils supports "@init_array" or not,
> "because if you want split-stack to work, you must link
> with gold, any version of binutils that has gold has an
> assembler that understands @init_array". (Thanks Alan!)
> 
> Bootstrapped and regtested on x86_64-redhat-linux
> and powerpc64{,le}-linux-gnu.
> 
> Is it ok for trunk when next stage 1 comes?
> 
> BR,
> Kewen
> -----
> libgcc/ChangeLog:
> 
> 	* config/i386/morestack.S: Use @init_array rather than
> 	@progbits for section type of section .init_array.
> 	* config/rs6000/morestack.S: Likewise.
> 	* config/s390/morestack.S: Likewise.

s390 parts are ok. I did run a bootstrap and regression. Looks all good. Thanks!

Andreas


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

* Re: [PATCH] libgcc: Use initarray section type for .init_stack
  2023-05-25  7:25 ` Andreas Krebbel
@ 2023-05-31  7:39   ` Kewen.Lin
  2023-05-31  7:45     ` Uros Bizjak
  2023-05-31 16:57     ` Ian Lance Taylor
  0 siblings, 2 replies; 7+ messages in thread
From: Kewen.Lin @ 2023-05-31  7:39 UTC (permalink / raw)
  To: Andreas Krebbel, Uros Bizjak, ian; +Cc: GCC Patches, Ian Lance Taylor

Hi Andreas,

on 2023/5/25 15:25, Andreas Krebbel wrote:
> On 3/20/23 07:33, Kewen.Lin wrote:
>> Hi,
>>
>> One of my workmates found there is a warning like:
>>
>>   libgcc/config/rs6000/morestack.S:402: Warning: ignoring
>>     incorrect section type for .init_array.00000
>>
>> when compiling libgcc/config/rs6000/morestack.S.
>>
>> Since commit r13-6545 touched that file recently, which was
>> suspected to be responsible for this warning, I did some
>> investigation and found this is a warning staying for a long
>> time.  For section .init_stack*, it's preferred to use
>> section type SHT_INIT_ARRAY.  So this patch is use
>> "@init_array" to replace "@progbits".
>>
>> Although the warning is trivial, Segher suggested me to
>> post this to fix it, in order to avoid any possible
>> misunderstanding/confusion on the warning.
>>
>> As Alan confirmed, this doesn't require a premise check
>> on if the existing binutils supports "@init_array" or not,
>> "because if you want split-stack to work, you must link
>> with gold, any version of binutils that has gold has an
>> assembler that understands @init_array". (Thanks Alan!)
>>
>> Bootstrapped and regtested on x86_64-redhat-linux
>> and powerpc64{,le}-linux-gnu.
>>
>> Is it ok for trunk when next stage 1 comes?
>>
>> BR,
>> Kewen
>> -----
>> libgcc/ChangeLog:
>>
>> 	* config/i386/morestack.S: Use @init_array rather than
>> 	@progbits for section type of section .init_array.
>> 	* config/rs6000/morestack.S: Likewise.
>> 	* config/s390/morestack.S: Likewise.
> 
> s390 parts are ok. I did run a bootstrap and regression. Looks all good. Thanks!

Thanks for testing this on s390, really appreciate!

Hi Ian & Uros,

Do you have any concerns on this, or does it look good to you?

BR,
Kewen

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

* Re: [PATCH] libgcc: Use initarray section type for .init_stack
  2023-05-31  7:39   ` Kewen.Lin
@ 2023-05-31  7:45     ` Uros Bizjak
  2023-05-31 16:57     ` Ian Lance Taylor
  1 sibling, 0 replies; 7+ messages in thread
From: Uros Bizjak @ 2023-05-31  7:45 UTC (permalink / raw)
  To: Kewen.Lin; +Cc: Andreas Krebbel, ian, GCC Patches, Ian Lance Taylor

On Wed, May 31, 2023 at 9:40 AM Kewen.Lin <linkw@linux.ibm.com> wrote:
>
> Hi Andreas,
>
> on 2023/5/25 15:25, Andreas Krebbel wrote:
> > On 3/20/23 07:33, Kewen.Lin wrote:
> >> Hi,
> >>
> >> One of my workmates found there is a warning like:
> >>
> >>   libgcc/config/rs6000/morestack.S:402: Warning: ignoring
> >>     incorrect section type for .init_array.00000
> >>
> >> when compiling libgcc/config/rs6000/morestack.S.
> >>
> >> Since commit r13-6545 touched that file recently, which was
> >> suspected to be responsible for this warning, I did some
> >> investigation and found this is a warning staying for a long
> >> time.  For section .init_stack*, it's preferred to use
> >> section type SHT_INIT_ARRAY.  So this patch is use
> >> "@init_array" to replace "@progbits".
> >>
> >> Although the warning is trivial, Segher suggested me to
> >> post this to fix it, in order to avoid any possible
> >> misunderstanding/confusion on the warning.
> >>
> >> As Alan confirmed, this doesn't require a premise check
> >> on if the existing binutils supports "@init_array" or not,
> >> "because if you want split-stack to work, you must link
> >> with gold, any version of binutils that has gold has an
> >> assembler that understands @init_array". (Thanks Alan!)
> >>
> >> Bootstrapped and regtested on x86_64-redhat-linux
> >> and powerpc64{,le}-linux-gnu.
> >>
> >> Is it ok for trunk when next stage 1 comes?
> >>
> >> BR,
> >> Kewen
> >> -----
> >> libgcc/ChangeLog:
> >>
> >>      * config/i386/morestack.S: Use @init_array rather than
> >>      @progbits for section type of section .init_array.
> >>      * config/rs6000/morestack.S: Likewise.
> >>      * config/s390/morestack.S: Likewise.
> >
> > s390 parts are ok. I did run a bootstrap and regression. Looks all good. Thanks!
>
> Thanks for testing this on s390, really appreciate!
>
> Hi Ian & Uros,
>
> Do you have any concerns on this, or does it look good to you?

LGTM, but morestack.S is mostly used for Go, so I'd defer to Ian for
the final approval.

Uros.

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

* Re: [PATCH] libgcc: Use initarray section type for .init_stack
  2023-05-31  7:39   ` Kewen.Lin
  2023-05-31  7:45     ` Uros Bizjak
@ 2023-05-31 16:57     ` Ian Lance Taylor
  2023-06-05  5:24       ` Kewen.Lin
  1 sibling, 1 reply; 7+ messages in thread
From: Ian Lance Taylor @ 2023-05-31 16:57 UTC (permalink / raw)
  To: Kewen.Lin; +Cc: Andreas Krebbel, Uros Bizjak, ian, GCC Patches

On Wed, May 31, 2023 at 12:41 AM Kewen.Lin via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> >> libgcc/ChangeLog:
> >>
> >>      * config/i386/morestack.S: Use @init_array rather than
> >>      @progbits for section type of section .init_array.
> >>      * config/rs6000/morestack.S: Likewise.
> >>      * config/s390/morestack.S: Likewise.
> >
> > s390 parts are ok. I did run a bootstrap and regression. Looks all good. Thanks!
>
> Thanks for testing this on s390, really appreciate!
>
> Hi Ian & Uros,
>
> Do you have any concerns on this, or does it look good to you?

This is OK.

Thanks.

Ian

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

* Re: [PATCH] libgcc: Use initarray section type for .init_stack
  2023-05-31 16:57     ` Ian Lance Taylor
@ 2023-06-05  5:24       ` Kewen.Lin
  0 siblings, 0 replies; 7+ messages in thread
From: Kewen.Lin @ 2023-06-05  5:24 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: Andreas Krebbel, Uros Bizjak, ian, GCC Patches

on 2023/6/1 00:57, Ian Lance Taylor wrote:
> On Wed, May 31, 2023 at 12:41 AM Kewen.Lin via Gcc-patches
> <gcc-patches@gcc.gnu.org> wrote:
>>
>>>> libgcc/ChangeLog:
>>>>
>>>>      * config/i386/morestack.S: Use @init_array rather than
>>>>      @progbits for section type of section .init_array.
>>>>      * config/rs6000/morestack.S: Likewise.
>>>>      * config/s390/morestack.S: Likewise.
>>>
>>> s390 parts are ok. I did run a bootstrap and regression. Looks all good. Thanks!
>>
>> Thanks for testing this on s390, really appreciate!
>>
>> Hi Ian & Uros,
>>
>> Do you have any concerns on this, or does it look good to you?
> 
> This is OK.

Pushed in r14-1540-g83c3550ee96aa2, thanks all!

BR,
Kewen

> 
> Thanks.
> 
> Ian




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

end of thread, other threads:[~2023-06-05  5:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-20  6:33 [PATCH] libgcc: Use initarray section type for .init_stack Kewen.Lin
2023-05-17  6:24 ` PING^1 " Kewen.Lin
2023-05-25  7:25 ` Andreas Krebbel
2023-05-31  7:39   ` Kewen.Lin
2023-05-31  7:45     ` Uros Bizjak
2023-05-31 16:57     ` Ian Lance Taylor
2023-06-05  5:24       ` Kewen.Lin

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