diff --git a/musl_template.gni b/musl_template.gni index f25f0d9fc68c9dd57c742b99782095264c3f5da0..369bdac6f711ec0b88d9e7384dbe6a1fb9267cfd 100644 --- a/musl_template.gni +++ b/musl_template.gni @@ -149,17 +149,10 @@ template("musl_libs") { "-Wno-int-conversion", ] - if (is_llvm_build) { - cflags_auto += [ - "-fno-unwind-tables", - "-fno-asynchronous-unwind-tables", - ] - } else { - cflags_auto += [ - "-funwind-tables", - "-fasynchronous-unwind-tables", - ] - } + cflags_auto += [ + "-funwind-tables", + "-fasynchronous-unwind-tables", + ] if (is_asan && use_hwasan) { cflags_auto += [ "-DENABLE_HWASAN" ] @@ -325,11 +318,7 @@ template("musl_libs") { "-DOHOS_TCACHE_NSLOTS_LARGE=16", ] - if (is_llvm_build) { - cflags += [ "-fno-unwind-tables" ] - } else { - cflags += [ "-funwind-tables" ] - } + cflags += [ "-funwind-tables" ] if (is_debug || musl_secure_level > 1) { cflags += [ "-DOHOS_TCACHE_NSLOTS_RANDOM" ] diff --git a/porting/linux/user/arch/generic/crtbrand.s b/porting/linux/user/arch/generic/crtbrand.s index 2974ec6aa01c6a09890d35da940649f6b6ffa545..a59a9ffdb0f91a1629b14a8ec0d139e2c6d4ba15 100644 --- a/porting/linux/user/arch/generic/crtbrand.s +++ b/porting/linux/user/arch/generic/crtbrand.s @@ -1,12 +1,12 @@ - .section .note.ohos.ident,"a",%note - .balign 4 - .type abitag, %object -abitag: - .long 2f-1f // int32_t namesz - .long 3f-2f // int32_t descsz - .long 4f-3f -1:.ascii "OHOS\0" // char name[] -2:.long 1 // int32_t ohos_api -3: -4: - .size abitag, .-abitag + .section .note.ohos.ident,"a",%note + .balign 4 + .type abitag, %object +abitag: + .long 2f-1f // int32_t namesz + .long 3f-2f // int32_t descsz + .long 1 // should be the "type" according to the elf spec +1:.ascii "OHOS\0" // char name[] + .balign 4 +2:.long 1 // int32_t ohos_api +3: + .size abitag, .-abitag