Commit 2ece847
Luca Toniolo
build: Filter undefined symbols from rtapi module version scripts
rtapi_app.h unconditionally declares EXPORT_SYMBOL for both
rtapi_app_main and rtapi_app_exit, so every module's .rtapi_export
section lists both names even when the module only implements
rtapi_app_main (e.g. hal/components/enum.c). LLD 17+ defaults to
--no-undefined-version (LLVM D135402) and then refuses to link:
ld.lld: error: version script assignment of 'global' to symbol
'rtapi_app_exit' failed: symbol not defined
Drop the -j .rtapi_export filter from the objdump call so the same
pass sees the full symbol table, and extend the awk script to track
both the exported names and the actually-defined symbols, emitting
only their intersection. GNU ld behaviour is unchanged (the new
global list is a strict subset of the old one) and LLD is happy.
Fixes #3191.1 parent 568354c commit 2ece847
2 files changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1254 | 1254 | | |
1255 | 1255 | | |
1256 | 1256 | | |
1257 | | - | |
1258 | | - | |
| 1257 | + | |
| 1258 | + | |
1259 | 1259 | | |
1260 | 1260 | | |
1261 | 1261 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
124 | | - | |
| 123 | + | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| |||
0 commit comments