Commit 6652010
committed
avoid 32-bit relocation to __BOOTLOADER_CONFIG
As explained in my comment in rust-osdev#427, the compiler seems to have trouble
emitting relocations for references to global variables in custom
sections. For custom sections, it always emits 32-bit relocations even
when a 64-bit relocation would be required. This patch works around
that by never referencing the global in the custom section directly
from code, but only through a pointer from another global variable in
the non-custom .data section. The relocation used for the pointer in
the global variable will always use a 64-bit relocation.1 parent b394598 commit 6652010
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
123 | 127 | | |
124 | 128 | | |
125 | 129 | | |
126 | 130 | | |
127 | 131 | | |
128 | 132 | | |
129 | | - | |
| 133 | + | |
130 | 134 | | |
131 | 135 | | |
132 | 136 | | |
| |||
0 commit comments