public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][ARM][testsuite] Fix address of sg stubs in CMSE tests
@ 2019-07-02 14:42 Christophe Lyon
  2019-07-08 14:41 ` Christophe Lyon
  2019-07-09  9:29 ` Kyrill Tkachov
  0 siblings, 2 replies; 3+ messages in thread
From: Christophe Lyon @ 2019-07-02 14:42 UTC (permalink / raw)
  To: gcc Patches

[-- Attachment #1: Type: text/plain, Size: 570 bytes --]

Hi,

While running the GCC testsuite with an armv8-m target, I noticed that
a few tests where causing the BFD linker to crash. I opened  PR
ld/24709 for this [1], but fixing it properly is tricky and not worth
the headache.

I "fixed" the linker so that it emits a useful error message instead
of crashing, and on the GCC side the "fix" is simply to avoid placing
the sg stubs section too far from the destination.

This is what this patch does, by replacing
--section-start,.gnu.sgstubs=0x20400000
with
--section-start,.gnu.sgstubs=0x00400000

OK?

Thanks,

Christophe

[-- Attachment #2: cmse.chlog.txt --]
[-- Type: text/plain, Size: 300 bytes --]

gcc/testsuite/ChangeLog:

2019-07-02  Christophe Lyon  <christophe.lyon@linaro.org>

	* gcc.target/arm/cmse/bitfield-1.c: Fix address of .gnu.sgstubs
	section.
	* gcc.target/arm/cmse/bitfield-2.c: Likewise.
	* gcc.target/arm/cmse/bitfield-3.c: Likewise.
	* gcc.target/arm/cmse/struct-1.c: Likewise.


[-- Attachment #3: cmse.patch.txt --]
[-- Type: text/plain, Size: 1908 bytes --]

diff --git a/gcc/testsuite/gcc.target/arm/cmse/bitfield-1.c b/gcc/testsuite/gcc.target/arm/cmse/bitfield-1.c
index fccc51d..0fc191e 100644
--- a/gcc/testsuite/gcc.target/arm/cmse/bitfield-1.c
+++ b/gcc/testsuite/gcc.target/arm/cmse/bitfield-1.c
@@ -1,5 +1,5 @@
 /* { dg-do run } */
-/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=0x20400000" } */
+/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=0x00400000" } */
 
 typedef struct
 {
diff --git a/gcc/testsuite/gcc.target/arm/cmse/bitfield-2.c b/gcc/testsuite/gcc.target/arm/cmse/bitfield-2.c
index e6aee3c..f8327c8 100644
--- a/gcc/testsuite/gcc.target/arm/cmse/bitfield-2.c
+++ b/gcc/testsuite/gcc.target/arm/cmse/bitfield-2.c
@@ -1,5 +1,5 @@
 /* { dg-do run } */
-/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=0x20400000" } */
+/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=0x00400000" } */
 
 typedef struct
 {
diff --git a/gcc/testsuite/gcc.target/arm/cmse/bitfield-3.c b/gcc/testsuite/gcc.target/arm/cmse/bitfield-3.c
index 285a2b9..d0550db 100644
--- a/gcc/testsuite/gcc.target/arm/cmse/bitfield-3.c
+++ b/gcc/testsuite/gcc.target/arm/cmse/bitfield-3.c
@@ -1,5 +1,5 @@
 /* { dg-do run } */
-/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=0x20400000" } */
+/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=0x00400000" } */
 
 typedef struct
 {
diff --git a/gcc/testsuite/gcc.target/arm/cmse/struct-1.c b/gcc/testsuite/gcc.target/arm/cmse/struct-1.c
index 2d366a9..874da3c 100644
--- a/gcc/testsuite/gcc.target/arm/cmse/struct-1.c
+++ b/gcc/testsuite/gcc.target/arm/cmse/struct-1.c
@@ -1,5 +1,5 @@
 /* { dg-do run } */
-/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=0x20400000" } */
+/* { dg-options "--save-temps -mcmse -Wl,--section-start,.gnu.sgstubs=0x00400000" } */
 
 typedef struct
 {

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

* Re: [PATCH][ARM][testsuite] Fix address of sg stubs in CMSE tests
  2019-07-02 14:42 [PATCH][ARM][testsuite] Fix address of sg stubs in CMSE tests Christophe Lyon
@ 2019-07-08 14:41 ` Christophe Lyon
  2019-07-09  9:29 ` Kyrill Tkachov
  1 sibling, 0 replies; 3+ messages in thread
From: Christophe Lyon @ 2019-07-08 14:41 UTC (permalink / raw)
  To: gcc Patches

ping?
I think that's almost obvious?
And maybe should be applied to release branches.

Christophe

On Tue, 2 Jul 2019 at 16:41, Christophe Lyon <christophe.lyon@linaro.org> wrote:
>
> Hi,
>
> While running the GCC testsuite with an armv8-m target, I noticed that
> a few tests where causing the BFD linker to crash. I opened  PR
> ld/24709 for this [1], but fixing it properly is tricky and not worth
> the headache.
>
> I "fixed" the linker so that it emits a useful error message instead
> of crashing, and on the GCC side the "fix" is simply to avoid placing
> the sg stubs section too far from the destination.
>
> This is what this patch does, by replacing
> --section-start,.gnu.sgstubs=0x20400000
> with
> --section-start,.gnu.sgstubs=0x00400000
>
> OK?
>
> Thanks,
>
> Christophe

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

* Re: [PATCH][ARM][testsuite] Fix address of sg stubs in CMSE tests
  2019-07-02 14:42 [PATCH][ARM][testsuite] Fix address of sg stubs in CMSE tests Christophe Lyon
  2019-07-08 14:41 ` Christophe Lyon
@ 2019-07-09  9:29 ` Kyrill Tkachov
  1 sibling, 0 replies; 3+ messages in thread
From: Kyrill Tkachov @ 2019-07-09  9:29 UTC (permalink / raw)
  To: Christophe Lyon, gcc Patches

Hi Christophe,

On 7/2/19 3:41 PM, Christophe Lyon wrote:
> Hi,
>
> While running the GCC testsuite with an armv8-m target, I noticed that
> a few tests where causing the BFD linker to crash. I opened PR
> ld/24709 for this [1], but fixing it properly is tricky and not worth
> the headache.
>
> I "fixed" the linker so that it emits a useful error message instead
> of crashing, and on the GCC side the "fix" is simply to avoid placing
> the sg stubs section too far from the destination.
>
> This is what this patch does, by replacing
> --section-start,.gnu.sgstubs=0x20400000
> with
> --section-start,.gnu.sgstubs=0x00400000
>
> OK?


Ok.

Thanks,

Kyrill


>
> Thanks,
>
> Christophe

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-02 14:42 [PATCH][ARM][testsuite] Fix address of sg stubs in CMSE tests Christophe Lyon
2019-07-08 14:41 ` Christophe Lyon
2019-07-09  9:29 ` Kyrill Tkachov

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