LD need word-align to merge every _init into one func.

If it's not word-align, ld will pad zero into the free-space.
That's "bkpt".

The "bkpt" is OK when there is no jtag server connected.
Because linux kernel exception could handle it.

Signed-off-by: Guo Ren <ren_...@c-sky.com>
---
 libc/sysdeps/linux/csky/crti.S | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libc/sysdeps/linux/csky/crti.S b/libc/sysdeps/linux/csky/crti.S
index e7b045f..a2434c0 100644
--- a/libc/sysdeps/linux/csky/crti.S
+++ b/libc/sysdeps/linux/csky/crti.S
@@ -12,9 +12,11 @@
 ENTRY(_init)
        subi    sp, 8
        stw     lr, (sp, 4)
+       nop /* LD need word-align to compile into one func */
 
 .section .fini
 ENTRY(_fini)
        subi    sp, 8
        stw     lr, (sp, 4)
+       nop
 
-- 
2.7.4

_______________________________________________
devel mailing list
devel@uclibc-ng.org
https://mailman.uclibc-ng.org/cgi-bin/mailman/listinfo/devel

Reply via email to