Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamar Christina <tamar.christina@arm.com>2017-08-08 17:47:54 +0300
committerCorinna Vinschen <corinna@vinschen.de>2017-08-09 15:50:13 +0300
commit61ddc7a436dee9ef40782400ba618be8dee9a0e8 (patch)
tree26b3b3ecf0e78dbaedc6f27e586a9cf235a8ae98 /libgloss/aarch64
parentd7821c045e4d8e54244522b4a6f3ab86063c6500 (diff)
Fix crt0 overwriting.
On AArch64 we currently always link in crt0 regardless of if another one is being provided by something else, like rdimon.a. This was never an issue before as nosys was not supported on AArch64. This updates the specs to supply a different crt0 when a semihosting call is required. Signed-off-by: Tamar Christina <tamar.christina@arm.com>
Diffstat (limited to 'libgloss/aarch64')
-rw-r--r--libgloss/aarch64/Makefile.in2
-rw-r--r--libgloss/aarch64/elf-aem-validation.specs3
-rw-r--r--libgloss/aarch64/elf-aem-ve.specs3
-rw-r--r--libgloss/aarch64/elf-rdimon.specs3
4 files changed, 10 insertions, 1 deletions
diff --git a/libgloss/aarch64/Makefile.in b/libgloss/aarch64/Makefile.in
index 8111f262c..546557e3c 100644
--- a/libgloss/aarch64/Makefile.in
+++ b/libgloss/aarch64/Makefile.in
@@ -118,7 +118,7 @@ test:
#
crt0.o: crt0.S
- $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
+ $(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -o $@ -c $<
rdimon-crt0${${MULTILIBNAME}}.o: crt0.S
$(CC) $(CFLAGS_FOR_TARGET) $($(MULTI_FLAGS_FOR_TARGET)) $(CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
diff --git a/libgloss/aarch64/elf-aem-validation.specs b/libgloss/aarch64/elf-aem-validation.specs
index 800791ac1..db31441e4 100644
--- a/libgloss/aarch64/elf-aem-validation.specs
+++ b/libgloss/aarch64/elf-aem-validation.specs
@@ -10,3 +10,6 @@
*lib:
cpu-init/rdimon-aem-el3.o%s --start-group %(libc) %(libgloss) --end-group
+
+*startfile:
+crti%O%s crtbegin%O%s %{!pg:rdimon-crt0%O%s} %{pg:rdimon-crt0%O%s} \ No newline at end of file
diff --git a/libgloss/aarch64/elf-aem-ve.specs b/libgloss/aarch64/elf-aem-ve.specs
index 8d86de1be..d5c48edf8 100644
--- a/libgloss/aarch64/elf-aem-ve.specs
+++ b/libgloss/aarch64/elf-aem-ve.specs
@@ -17,3 +17,6 @@
*lib:
cpu-init/rdimon-aem-el3.o%s --start-group %(libc) %(libgloss) --end-group
+
+*startfile:
+crti%O%s crtbegin%O%s %{!pg:rdimon-crt0%O%s} %{pg:rdimon-crt0%O%s} \ No newline at end of file
diff --git a/libgloss/aarch64/elf-rdimon.specs b/libgloss/aarch64/elf-rdimon.specs
index a1d84c2bb..be2373556 100644
--- a/libgloss/aarch64/elf-rdimon.specs
+++ b/libgloss/aarch64/elf-rdimon.specs
@@ -10,3 +10,6 @@
*lib:
--start-group %(libc) %(libgloss) --end-group
+
+*startfile:
+crti%O%s crtbegin%O%s %{!pg:rdimon-crt0%O%s} %{pg:rdimon-crt0%O%s} \ No newline at end of file