Commit 9cb120c
committed
ci: assert that an optional interface is referenced weakly
The defect fixed in 0.3.5 shipped, and nothing in this repository saw
it. A strong reference to `kal_random_fill` in the dispatcher made an
optional interface mandatory, and it was found one repository
downstream, by a bare-metal program in openkal-llvm-runtime linking over
openkal-opensbi:
ld.lld: error: undefined symbol: kal_random_fill
Reproducing that here would need a bare-metal toolchain and a backend
that declines the interface. The symbol class needs neither and states
the invariant more directly than a link would.
⭐ The check carries its own control. Asserting only that
`kal_random_fill` is weak would pass just as well if the symbol had
vanished or the object had not been built, so a required interface
beside it must still be an undefined strong reference — that is what
makes a backend failing to provide one a link error rather than a
silently missing call.
Measured on the object from a bare-metal build, both ways:
with the weak declaration w kal_random_fill U kal_time_sleep → ok
with it removed U kal_random_fill U kal_time_sleep → red1 parent cdf550a commit 9cb120c
1 file changed
Lines changed: 39 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
91 | 130 | | |
92 | 131 | | |
93 | 132 | | |
| |||
0 commit comments