* Minor changes to crt1.s files to work with clang.
@ 2014-10-07 16:03 Richard Pennington
0 siblings, 0 replies; only message in thread
From: Richard Pennington @ 2014-10-07 16:03 UTC (permalink / raw)
To: musl
[-- Attachment #1: Type: text/plain, Size: 1042 bytes --]
I was looking into replacing crt1.s with crt1.c for ARM, i386,
Microblaze, Mips, PowerPC, and x86_64.
clang had a couple of issues with the ARM and Mips files. I have
attached a small patch for them.
-Rich
Copy of attached patch:
Index: musl/arch/arm/crt_arch.h
===================================================================
--- musl/arch/arm/crt_arch.h (revision 4248)
+++ musl/arch/arm/crt_arch.h (working copy)
@@ -1,4 +1,5 @@
__asm__("\
+.text \n\
.global _start \n\
.type _start,%function \n\
_start: \n\
@@ -5,6 +6,6 @@
mov fp, #0 \n\
mov lr, #0 \n\
mov a1, sp \n\
- and sp, sp, #-16 \n\
+ bic sp, sp, #0xF \n\
bl __cstart \n\
");
Index: musl/arch/mips/crt_arch.h
===================================================================
--- musl/arch/mips/crt_arch.h (revision 4248)
+++ musl/arch/mips/crt_arch.h (working copy)
@@ -1,5 +1,7 @@
__asm__("\n\
.set push\n\
+.text \n\
+.option pic2\n\
.set noreorder\n\
.global __start\n\
.global _start\n\
[-- Attachment #2: musl_patch.txt --]
[-- Type: text/plain, Size: 747 bytes --]
Index: musl/arch/arm/crt_arch.h
===================================================================
--- musl/arch/arm/crt_arch.h (revision 4248)
+++ musl/arch/arm/crt_arch.h (working copy)
@@ -1,4 +1,5 @@
__asm__("\
+.text \n\
.global _start \n\
.type _start,%function \n\
_start: \n\
@@ -5,6 +6,6 @@
mov fp, #0 \n\
mov lr, #0 \n\
mov a1, sp \n\
- and sp, sp, #-16 \n\
+ bic sp, sp, #0xF \n\
bl __cstart \n\
");
Index: musl/arch/mips/crt_arch.h
===================================================================
--- musl/arch/mips/crt_arch.h (revision 4248)
+++ musl/arch/mips/crt_arch.h (working copy)
@@ -1,5 +1,7 @@
__asm__("\n\
.set push\n\
+.text \n\
+.option pic2\n\
.set noreorder\n\
.global __start\n\
.global _start\n\
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-10-07 16:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-07 16:03 Minor changes to crt1.s files to work with clang Richard Pennington
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
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 NNTP newsgroup(s).