Discussion:
[PATCH] Fix v850 target for RTEMS
Sebastian Huber
2018-11-08 05:56:48 UTC
Permalink
Do not define __ATTRIBUTE_IMPURE_PTR__ for RTMES on the v850 target.
The previous definition lead to the following linker error in
combination with -fdata-sections:

relocation truncated to fit: R_V810_GPWLO_1 against symbol
`_global_impure_ptr' defined in .rodata._global_impure_ptr section in
libc.a(lib_a-impure.o)

relocation truncated to fit: R_V810_GPWLO_1 against symbol `_impure_ptr'
defined in .data._impure_ptr section in libc.a(lib_a-impure.o)

Signed-off-by: Sebastian Huber <***@embedded-brains.de>
---
newlib/libc/include/sys/config.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/newlib/libc/include/sys/config.h b/newlib/libc/include/sys/config.h
index 2082dfdb1..49b62ebf6 100644
--- a/newlib/libc/include/sys/config.h
+++ b/newlib/libc/include/sys/config.h
@@ -108,7 +108,7 @@
#define _POINTER_INT short
#endif

-#ifdef __v850
+#if defined(__v850) && !defined(__rtems__)
#define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__sda__))
#endif
--
2.16.4
Corinna Vinschen
2018-11-08 09:09:30 UTC
Permalink
Post by Sebastian Huber
Do not define __ATTRIBUTE_IMPURE_PTR__ for RTMES on the v850 target.
The previous definition lead to the following linker error in
relocation truncated to fit: R_V810_GPWLO_1 against symbol
`_global_impure_ptr' defined in .rodata._global_impure_ptr section in
libc.a(lib_a-impure.o)
relocation truncated to fit: R_V810_GPWLO_1 against symbol `_impure_ptr'
defined in .data._impure_ptr section in libc.a(lib_a-impure.o)
---
newlib/libc/include/sys/config.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/newlib/libc/include/sys/config.h b/newlib/libc/include/sys/config.h
index 2082dfdb1..49b62ebf6 100644
--- a/newlib/libc/include/sys/config.h
+++ b/newlib/libc/include/sys/config.h
@@ -108,7 +108,7 @@
#define _POINTER_INT short
#endif
-#ifdef __v850
+#if defined(__v850) && !defined(__rtems__)
#define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__sda__))
#endif
--
2.16.4
PLease push.


Thanks,
Corinna
--
Corinna Vinschen
Cygwin Maintainer
Red Hat
Loading...