* [PATCH, GCC, stage4] Fix type for .init_array.* and .fini_array.* sections
@ 2017-04-11 17:35 Thomas Preudhomme
2017-04-19 9:29 ` Thomas Preudhomme
2017-04-19 10:49 ` Kyrill Tkachov
0 siblings, 2 replies; 4+ messages in thread
From: Thomas Preudhomme @ 2017-04-11 17:35 UTC (permalink / raw)
To: Kyrill Tkachov, Ramana Radhakrishnan, Richard Earnshaw, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 783 bytes --]
Hi,
Several tests started failing for ARM targets (eg. gcc.dg/initpri1.c)
after change 6f9dbcd42f2cf034a9a21f46842c08d2e88449db in binutils. This
is because the non-default priority init_array and fini_array sections
are not created with NOTYPE flag as is the case for default priority
init_array and fini_array sections (see default_section_type_flags in
varasm.c for instance). This patch fixes the issue.
ChangeLog entry is as follows:
*** gcc/ChangeLog ***
2017-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
* config/arm/arm.c (arm_elf_asm_cdtor): Create non-default
priority .init_array and .fini_array section with SECTION_NOTYPE
flag.
Testing: with this patch test gcc.dg/initpri1.c succeeds but fails
without.
Is this ok for stage4?
Best regards,
Thomas
[-- Attachment #2: fix_init_fini_section_type.patch --]
[-- Type: text/x-patch, Size: 573 bytes --]
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index a2d80cfd645928fb8b3178a8e0c7173adce5d598..f3a6b64b16896e82d6e7a66726a929f0572542d9 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -22593,7 +22593,7 @@ arm_elf_asm_cdtor (rtx symbol, int priority, bool is_ctor)
sprintf (buf, "%s.%.5u",
is_ctor ? ".init_array" : ".fini_array",
priority);
- s = get_section (buf, SECTION_WRITE, NULL_TREE);
+ s = get_section (buf, SECTION_WRITE | SECTION_NOTYPE, NULL_TREE);
}
else if (is_ctor)
s = ctors_section;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH, GCC, stage4] Fix type for .init_array.* and .fini_array.* sections
2017-04-11 17:35 [PATCH, GCC, stage4] Fix type for .init_array.* and .fini_array.* sections Thomas Preudhomme
@ 2017-04-19 9:29 ` Thomas Preudhomme
2017-04-19 10:49 ` Kyrill Tkachov
1 sibling, 0 replies; 4+ messages in thread
From: Thomas Preudhomme @ 2017-04-19 9:29 UTC (permalink / raw)
To: Kyrill Tkachov, Ramana Radhakrishnan, Richard Earnshaw, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 919 bytes --]
Stage 4 ping?
Best regards,
Thomas
On 11/04/17 18:35, Thomas Preudhomme wrote:
> Hi,
>
> Several tests started failing for ARM targets (eg. gcc.dg/initpri1.c)
> after change 6f9dbcd42f2cf034a9a21f46842c08d2e88449db in binutils. This
> is because the non-default priority init_array and fini_array sections
> are not created with NOTYPE flag as is the case for default priority
> init_array and fini_array sections (see default_section_type_flags in
> varasm.c for instance). This patch fixes the issue.
>
> ChangeLog entry is as follows:
>
> *** gcc/ChangeLog ***
>
> 2017-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
>
> * config/arm/arm.c (arm_elf_asm_cdtor): Create non-default
> priority .init_array and .fini_array section with SECTION_NOTYPE
> flag.
>
> Testing: with this patch test gcc.dg/initpri1.c succeeds but fails
> without.
>
> Is this ok for stage4?
>
> Best regards,
>
> Thomas
[-- Attachment #2: fix_init_fini_section_type.patch --]
[-- Type: text/x-patch, Size: 573 bytes --]
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index a2d80cfd645928fb8b3178a8e0c7173adce5d598..f3a6b64b16896e82d6e7a66726a929f0572542d9 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -22593,7 +22593,7 @@ arm_elf_asm_cdtor (rtx symbol, int priority, bool is_ctor)
sprintf (buf, "%s.%.5u",
is_ctor ? ".init_array" : ".fini_array",
priority);
- s = get_section (buf, SECTION_WRITE, NULL_TREE);
+ s = get_section (buf, SECTION_WRITE | SECTION_NOTYPE, NULL_TREE);
}
else if (is_ctor)
s = ctors_section;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH, GCC, stage4] Fix type for .init_array.* and .fini_array.* sections
2017-04-11 17:35 [PATCH, GCC, stage4] Fix type for .init_array.* and .fini_array.* sections Thomas Preudhomme
2017-04-19 9:29 ` Thomas Preudhomme
@ 2017-04-19 10:49 ` Kyrill Tkachov
2017-04-20 11:07 ` Thomas Preudhomme
1 sibling, 1 reply; 4+ messages in thread
From: Kyrill Tkachov @ 2017-04-19 10:49 UTC (permalink / raw)
To: Thomas Preudhomme, Ramana Radhakrishnan, Richard Earnshaw, gcc-patches
Hi Thomas,
On 11/04/17 18:35, Thomas Preudhomme wrote:
> Hi,
>
> Several tests started failing for ARM targets (eg. gcc.dg/initpri1.c)
> after change 6f9dbcd42f2cf034a9a21f46842c08d2e88449db in binutils. This
> is because the non-default priority init_array and fini_array sections
> are not created with NOTYPE flag as is the case for default priority
> init_array and fini_array sections (see default_section_type_flags in
> varasm.c for instance). This patch fixes the issue.
>
> ChangeLog entry is as follows:
>
> *** gcc/ChangeLog ***
>
> 2017-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
>
> * config/arm/arm.c (arm_elf_asm_cdtor): Create non-default
> priority .init_array and .fini_array section with SECTION_NOTYPE
> flag.
>
> Testing: with this patch test gcc.dg/initpri1.c succeeds but fails
> without.
>
> Is this ok for stage4?
>
This is ok if a bootstrap and test run on arm-none-linux-gnueabihf shows no problems.
Thanks,
Kyrill
> Best regards,
>
> Thomas
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH, GCC, stage4] Fix type for .init_array.* and .fini_array.* sections
2017-04-19 10:49 ` Kyrill Tkachov
@ 2017-04-20 11:07 ` Thomas Preudhomme
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Preudhomme @ 2017-04-20 11:07 UTC (permalink / raw)
To: Kyrill Tkachov, Ramana Radhakrishnan, Richard Earnshaw, gcc-patches
Hi Kyrill,
On 19/04/17 10:56, Kyrill Tkachov wrote:
> Hi Thomas,
>
> On 11/04/17 18:35, Thomas Preudhomme wrote:
>> Hi,
>>
>> Several tests started failing for ARM targets (eg. gcc.dg/initpri1.c)
>> after change 6f9dbcd42f2cf034a9a21f46842c08d2e88449db in binutils. This
>> is because the non-default priority init_array and fini_array sections
>> are not created with NOTYPE flag as is the case for default priority
>> init_array and fini_array sections (see default_section_type_flags in
>> varasm.c for instance). This patch fixes the issue.
>>
>> ChangeLog entry is as follows:
>>
>> *** gcc/ChangeLog ***
>>
>> 2017-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
>>
>> * config/arm/arm.c (arm_elf_asm_cdtor): Create non-default
>> priority .init_array and .fini_array section with SECTION_NOTYPE
>> flag.
>>
>> Testing: with this patch test gcc.dg/initpri1.c succeeds but fails
>> without.
>>
>> Is this ok for stage4?
>>
>
> This is ok if a bootstrap and test run on arm-none-linux-gnueabihf shows no
> problems.
No issue found, hence committed. Thanks.
Best regards,
Thomas
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-04-20 9:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-11 17:35 [PATCH, GCC, stage4] Fix type for .init_array.* and .fini_array.* sections Thomas Preudhomme
2017-04-19 9:29 ` Thomas Preudhomme
2017-04-19 10:49 ` Kyrill Tkachov
2017-04-20 11:07 ` Thomas Preudhomme
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).