Skip to content

Commit

Permalink
[cli] Provide .type and .size annotations for symbols (JuliaLang#…
Browse files Browse the repository at this point in the history
…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
```
  • Loading branch information
staticfloat committed Apr 23, 2021
1 parent d7d2b0c commit ac7974a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cli/trampolines/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ac7974a

Please sign in to comment.