Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Wed, 9 Nov 2022 10:51:37 +0800
From: 王洪亮 <wanghongliang@...ngson.cn>
To: musl@...ts.openwall.com
Subject: A question about if crti.s and crtn.s is not necessary?

Hi,

In LoongArch port, I found build musl and libc-test is OK without 
crt/loongarch64/crti.s and crt/loongarch64/crtn.s,

so I want to ask if crti.s and crtn.s is not necessary in architecture?


 > diff --git a/crt/loongarch64/crti.s b/crt/loongarch64/crti.s
 > new file mode 100644
 > index 00000000..81c43e6e
 > --- /dev/null
 > +++ b/crt/loongarch64/crti.s
 > @@ -0,0 +1,15 @@
 > +.section .init
 > +.global _init
 > +_init:
 > +    addi.d $sp,$sp,-16
 > +    st.d $fp,$sp,0
 > +    st.d $ra,$sp,8
 > +    addi.d $fp,$sp,16
 > +
 > +.section .fini
 > +.global _fini
 > +_fini:
 > +    addi.d $sp,$sp,-16
 > +    st.d $fp,$sp,0
 > +    st.d $ra,$sp,8
 > +    addi.d $fp,$sp,16
 > diff --git a/crt/loongarch64/crtn.s b/crt/loongarch64/crtn.s
 > new file mode 100644
 > index 00000000..ca3fe80e
 > --- /dev/null
 > +++ b/crt/loongarch64/crtn.s
 > @@ -0,0 +1,12 @@
 > +.section .init
 > +    ld.d $fp,$sp,0
 > +    ld.d $ra,$sp,8
 > +    addi.d $sp,$sp,16
 > +    jr $ra
 > +
 > +
 > +.section .fini
 > +    ld.d $fp,$sp,0
 > +    ld.d $ra,$sp,8
 > +    addi.d $sp,$sp,16
 > +    jr $ra

The crt changes shouldn't be necessary at all huh? I didn't see any 
custom asm
for riscv, for example.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.