This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit dda5ea8
committed
Fix debuginfo for machO
This only fixes it when using object::write as backend, and not when using faerie.
There were two problems:
* object::write doesn't replace .debug_info with __debug_info, unlike faerie
* machO requires section relative relocations, and not symbol relative
relocations. When using symbol relative relocations, the linker
interprets the relocations as section relative. Thus writing the wrong
values to the debug sections.
Fixes rust-lang#3031 parent 75c24b9 commit dda5ea8
2 files changed
+21
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
125 | 132 | | |
126 | | - | |
127 | 133 | | |
128 | 134 | | |
129 | 135 | | |
| |||
137 | 143 | | |
138 | 144 | | |
139 | 145 | | |
140 | | - | |
141 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
142 | 150 | | |
143 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
144 | 159 | | |
145 | 160 | | |
146 | 161 | | |
| |||
149 | 164 | | |
150 | 165 | | |
151 | 166 | | |
152 | | - | |
| 167 | + | |
153 | 168 | | |
154 | 169 | | |
155 | 170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
| 187 | + | |
191 | 188 | | |
192 | 189 | | |
193 | 190 | | |
| |||
0 commit comments