From 8c5728efb95c407440439bf5c33bb14e9a583aaa Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Thu, 22 Apr 2021 21:41:52 +0000 Subject: [PATCH] [cli] Provide `.type` and `.size` annotations for symbols On ELF platforms, `ld` can print out warnings that certain symbols do not have a type or size annotation. This adds the annotations to the `DEBUGINFO` and `EXPORT` helper macros, which are where this information was put for the windows assembler. With this patch, we should eliminate `ld` warnings such as: ``` warning: type and size of dynamic symbol `jl_symbol' are not defined ``` --- cli/trampolines/common.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cli/trampolines/common.h b/cli/trampolines/common.h index 743d697d2467b..06d7b9e236971 100644 --- a/cli/trampolines/common.h +++ b/cli/trampolines/common.h @@ -23,6 +23,9 @@ .ascii STR(-export:##I(name)); \ .ascii " "; \ .section .text +#elif defined(__ELF__) +#define DEBUGINFO(name) .type CNAME(name),@function +#define EXPORT(name) .size CNAME(name), . - CNAME(name) #else #define DEBUGINFO(name) #define EXPORT(name)