aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/arc/arc.h
diff options
context:
space:
mode:
authorCupertino Miranda <cmiranda@synopsys.com>2016-12-05 11:16:52 +0000
committerClaudiu Zissulescu <claziss@gcc.gnu.org>2016-12-05 12:16:52 +0100
commit62440b4f0e4d6e0dc193d315e79753bb4c5edd99 (patch)
tree51ad367dfbacc610ccfd16d534390397b8fd5860 /gcc/config/arc/arc.h
parent5a5c5784d89008664ab42c17efcab7198b132456 (diff)
downloadgcc-62440b4f0e4d6e0dc193d315e79753bb4c5edd99.zip
gcc-62440b4f0e4d6e0dc193d315e79753bb4c5edd99.tar.gz
gcc-62440b4f0e4d6e0dc193d315e79753bb4c5edd99.tar.bz2
[ARC] Fix PIE.
gcc/ 2016-12-05 Cupertino Miranda <cmiranda@synopsys.com> * config/arc/arc.h (STARTFILE_SPEC): Use default linux specs. (ENDFILE_SPEC): Likewise. libgcc/ 2016-12-05 Cupertino Miranda <cmiranda@synopsys.com> * config.host (arc*-*-linux-uclibc*): Use default extra objects. Include linux-android header. * config/arc/crti.S (_init): Declare symbol as function. (_fini): Likewise. From-SVN: r243245
Diffstat (limited to 'gcc/config/arc/arc.h')
-rw-r--r--gcc/config/arc/arc.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h
index 64bd9e0..f9512c4 100644
--- a/gcc/config/arc/arc.h
+++ b/gcc/config/arc/arc.h
@@ -138,17 +138,15 @@ extern const char *arc_cpu_to_as (int argc, const char **argv);
#define STARTFILE_SPEC "%{!shared:crt0.o%s} crti%O%s %{pg|p:crtg.o%s} " \
"%(arc_tls_extra_start_spec) crtbegin.o%s"
#else
-#define STARTFILE_SPEC "%{!shared:%{!mkernel:crt1.o%s}} crti.o%s \
- %{!shared:%{pg|p|profile:crtg.o%s} crtbegin.o%s} %{shared:crtbeginS.o%s}"
-
+#define STARTFILE_SPEC \
+ LINUX_OR_ANDROID_LD (GNU_USER_TARGET_STARTFILE_SPEC, ANDROID_STARTFILE_SPEC)
#endif
#if DEFAULT_LIBC != LIBC_UCLIBC
#define ENDFILE_SPEC "%{pg|p:crtgend.o%s} crtend.o%s crtn%O%s"
#else
-#define ENDFILE_SPEC "%{!shared:%{pg|p|profile:crtgend.o%s} crtend.o%s} \
- %{shared:crtendS.o%s} crtn.o%s"
-
+#define ENDFILE_SPEC \
+ LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC)
#endif
#if DEFAULT_LIBC == LIBC_UCLIBC