Commit 62440b4f by Cupertino Miranda Committed by Claudiu Zissulescu

[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
parent 5a5c5784
2016-12-05 Cupertino Miranda <cmiranda@synopsys.com>
* config/arc/arc.h (STARTFILE_SPEC): Use default linux specs.
(ENDFILE_SPEC): Likewise.
2016-12-05 Claudiu Zissulescu <claziss@synopsys.com> 2016-12-05 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc-protos.h (insn_is_tls_gd_dispatch): Remove. * config/arc/arc-protos.h (insn_is_tls_gd_dispatch): Remove.
...@@ -1023,7 +1023,7 @@ arc*-*-elf*) ...@@ -1023,7 +1023,7 @@ arc*-*-elf*)
;; ;;
arc*-*-linux-uclibc*) arc*-*-linux-uclibc*)
extra_headers="arc-simd.h" extra_headers="arc-simd.h"
tm_file="arc/arc-arch.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file}" tm_file="arc/arc-arch.h dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h ${tm_file}"
tmake_file="${tmake_file} arc/t-uClibc arc/t-arc" tmake_file="${tmake_file} arc/t-uClibc arc/t-arc"
tm_defines="${tm_defines} TARGET_SDATA_DEFAULT=0" tm_defines="${tm_defines} TARGET_SDATA_DEFAULT=0"
tm_defines="${tm_defines} TARGET_MMEDIUM_CALLS_DEFAULT=1" tm_defines="${tm_defines} TARGET_MMEDIUM_CALLS_DEFAULT=1"
......
...@@ -138,17 +138,15 @@ extern const char *arc_cpu_to_as (int argc, const char **argv); ...@@ -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} " \ #define STARTFILE_SPEC "%{!shared:crt0.o%s} crti%O%s %{pg|p:crtg.o%s} " \
"%(arc_tls_extra_start_spec) crtbegin.o%s" "%(arc_tls_extra_start_spec) crtbegin.o%s"
#else #else
#define STARTFILE_SPEC "%{!shared:%{!mkernel:crt1.o%s}} crti.o%s \ #define STARTFILE_SPEC \
%{!shared:%{pg|p|profile:crtg.o%s} crtbegin.o%s} %{shared:crtbeginS.o%s}" LINUX_OR_ANDROID_LD (GNU_USER_TARGET_STARTFILE_SPEC, ANDROID_STARTFILE_SPEC)
#endif #endif
#if DEFAULT_LIBC != LIBC_UCLIBC #if DEFAULT_LIBC != LIBC_UCLIBC
#define ENDFILE_SPEC "%{pg|p:crtgend.o%s} crtend.o%s crtn%O%s" #define ENDFILE_SPEC "%{pg|p:crtgend.o%s} crtend.o%s crtn%O%s"
#else #else
#define ENDFILE_SPEC "%{!shared:%{pg|p|profile:crtgend.o%s} crtend.o%s} \ #define ENDFILE_SPEC \
%{shared:crtendS.o%s} crtn.o%s" LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC)
#endif #endif
#if DEFAULT_LIBC == LIBC_UCLIBC #if DEFAULT_LIBC == LIBC_UCLIBC
......
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.
2016-12-03 Thomas Koenig <tkoenig@gcc.gnu.org> 2016-12-03 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/78379 PR fortran/78379
......
...@@ -374,8 +374,8 @@ arc*-*-elf*) ...@@ -374,8 +374,8 @@ arc*-*-elf*)
;; ;;
arc*-*-linux-uclibc*) arc*-*-linux-uclibc*)
tmake_file="${tmake_file} t-slibgcc-libgcc t-slibgcc-nolc-override arc/t-arc700-uClibc arc/t-arc" tmake_file="${tmake_file} t-slibgcc-libgcc t-slibgcc-nolc-override arc/t-arc700-uClibc arc/t-arc"
extra_parts="crti.o crtn.o crtend.o crtbegin.o crtendS.o crtbeginS.o libgmon.a crtg.o crtgend.o" extra_parts="$extra_parts crti.o crtn.o libgmon.a crtg.o crtgend.o"
extra_parts="${extra_parts} crttls.o" extra_parts="$extra_parts crttls.o"
;; ;;
arm-wrs-vxworks) arm-wrs-vxworks)
tmake_file="$tmake_file arm/t-arm arm/t-elf t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp" tmake_file="$tmake_file arm/t-arm arm/t-elf t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
......
...@@ -31,11 +31,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ...@@ -31,11 +31,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
.section .init .section .init
.global _init .global _init
.word 0 .word 0
.type _init,@function
_init: _init:
push_s blink push_s blink
.section .fini .section .fini
.global _fini .global _fini
.word 0 .word 0
.type _fini,@function
_fini: _fini:
push_s blink push_s blink
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment