Commit 0f8f4b6
committed
rust: use
When KASAN is enabled, it creates an entry in the `.init_array` section,
for example:
```
RELOCATION RECORDS FOR [.init_array]:
OFFSET TYPE VALUE
00000000 R_ARM_TARGET1 asan.module_ctor
```
When this is compiled into a loadable module that also contains a
`.ctors` section, the kernel fails to load it, for example:
```
[ 27.699160] rust_sync: has both .ctors and .init_array.
insmod: can't insert 'rust_sync.ko': invalid parameter
```
Using `.init_array` for static synchronisation primitives avoids this
error.
Signed-off-by: Wedson Almeida Filho <wedsonaf@google.com>.init_array instead of .ctors in init_static_sync
1 parent 29fd422 commit 0f8f4b6
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
0 commit comments