From ac7974acef22b357e790be418b750987e86cb386 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Fri, 23 Apr 2021 13:59:06 -0700 Subject: [PATCH] [cli] Provide `.type` and `.size` annotations for symbols (#40575) 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)