asm: Add missing section directives
diff --git a/common/efi_thunk.asm_uefi_aarch64 b/common/efi_thunk.asm_uefi_aarch64
index 5d0559bb..64822fa0 100644
--- a/common/efi_thunk.asm_uefi_aarch64
+++ b/common/efi_thunk.asm_uefi_aarch64
@@ -1,3 +1,5 @@
+.section .text
+
.global efi_main
.extern uefi_entry
diff --git a/common/efi_thunk.asm_uefi_ia32 b/common/efi_thunk.asm_uefi_ia32
index 4b36b934..ced76921 100644
--- a/common/efi_thunk.asm_uefi_ia32
+++ b/common/efi_thunk.asm_uefi_ia32
@@ -1,3 +1,5 @@
+section .text
+
global efi_main
extern uefi_entry
efi_main:
diff --git a/common/efi_thunk.asm_uefi_riscv64 b/common/efi_thunk.asm_uefi_riscv64
index 507cc06c..9cfd4eee 100644
--- a/common/efi_thunk.asm_uefi_riscv64
+++ b/common/efi_thunk.asm_uefi_riscv64
@@ -1,3 +1,4 @@
+.section .text
.global efi_main
.extern uefi_entry
diff --git a/common/efi_thunk.asm_uefi_x86_64 b/common/efi_thunk.asm_uefi_x86_64
index 88e7b64f..0bed8ca7 100644
--- a/common/efi_thunk.asm_uefi_x86_64
+++ b/common/efi_thunk.asm_uefi_x86_64
@@ -1,3 +1,5 @@
+section .text
+
global efi_main
extern uefi_entry
efi_main:
diff --git a/common/lib/mem.s2.asm_ia32 b/common/lib/mem.s2.asm_ia32
index 3c960dff..dc0b8d92 100644
--- a/common/lib/mem.s2.asm_ia32
+++ b/common/lib/mem.s2.asm_ia32
@@ -1,3 +1,5 @@
+section .text
+
global memcpy32to64
memcpy32to64:
push ebp
diff --git a/common/lib/spinup.asm_aarch64 b/common/lib/spinup.asm_aarch64
index 68a02686..d315db53 100644
--- a/common/lib/spinup.asm_aarch64
+++ b/common/lib/spinup.asm_aarch64
@@ -1,5 +1,7 @@
#include <lib/macros.aarch64_asm.h>
+.section .text
+
// noreturn void enter_in_current_el(uint64_t entry, uint64_t sp, uint64_t sctlr,
// uint64_t target_x0)
// Configure current EL state and jump to kernel. Used for Linux hence
diff --git a/common/menu_thunk.asm_ia32 b/common/menu_thunk.asm_ia32
index 54e160fa..e8de5daa 100644
--- a/common/menu_thunk.asm_ia32
+++ b/common/menu_thunk.asm_ia32
@@ -1,3 +1,5 @@
+section .text
+
global menu
extern _menu
menu:
diff --git a/common/sys/dummy_isr.asm_ia32 b/common/sys/dummy_isr.asm_ia32
index 48cc17d3..9c724a0a 100644
--- a/common/sys/dummy_isr.asm_ia32
+++ b/common/sys/dummy_isr.asm_ia32
@@ -1,3 +1,5 @@
+section .text
+
extern lapic_eoi
global dummy_isr
diff --git a/common/sys/dummy_isr.asm_x86_64 b/common/sys/dummy_isr.asm_x86_64
index fd3f0518..61aabb37 100644
--- a/common/sys/dummy_isr.asm_x86_64
+++ b/common/sys/dummy_isr.asm_x86_64
@@ -1,3 +1,5 @@
+section .text
+
extern lapic_eoi
global dummy_isr
diff --git a/common/sys/sbi.asm_riscv64 b/common/sys/sbi.asm_riscv64
index df1851a5..f37c7391 100644
--- a/common/sys/sbi.asm_riscv64
+++ b/common/sys/sbi.asm_riscv64
@@ -1,3 +1,4 @@
+.section .text
.global sbicall
sbicall:
diff --git a/common/sys/smp_trampoline.asm_aarch64 b/common/sys/smp_trampoline.asm_aarch64
index 0c631ec8..087a674d 100644
--- a/common/sys/smp_trampoline.asm_aarch64
+++ b/common/sys/smp_trampoline.asm_aarch64
@@ -8,6 +8,8 @@
.set tpl_sctlr, -16
.set tpl_info_struct, -8
+.section .text
+
.global smp_trampoline_start
smp_trampoline_start:
bl .L_entry
@@ -94,6 +96,8 @@ smp_trampoline_start:
smp_trampoline_end:
+.section .rodata
+
.global smp_trampoline_size
smp_trampoline_size:
.quad smp_trampoline_end - smp_trampoline_start
diff --git a/common/sys/smp_trampoline.asm_riscv64 b/common/sys/smp_trampoline.asm_riscv64
index 5e98ab38..24fd30e9 100644
--- a/common/sys/smp_trampoline.asm_riscv64
+++ b/common/sys/smp_trampoline.asm_riscv64
@@ -1,3 +1,4 @@
+.section .text
.global smp_trampoline_start
smp_trampoline_start:
