Skip to content

Commit ac7974a

Browse files
authored
[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 ```
1 parent d7d2b0c commit ac7974a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cli/trampolines/common.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
.ascii STR(-export:##I(name)); \
2424
.ascii " "; \
2525
.section .text
26+
#elif defined(__ELF__)
27+
#define DEBUGINFO(name) .type CNAME(name),@function
28+
#define EXPORT(name) .size CNAME(name), . - CNAME(name)
2629
#else
2730
#define DEBUGINFO(name)
2831
#define EXPORT(name)

0 commit comments

Comments
 (0)