Indicates that the text section has been written completely and this will finish appending it to the original object. Note that this will also write out the unwind information sections if necessary.
(mut self, postprocess_text: impl FnOnce(&mut [u8]))
| 219 | /// Note that this will also write out the unwind information sections if |
| 220 | /// necessary. |
| 221 | pub fn finish(mut self, postprocess_text: impl FnOnce(&mut [u8])) { |
| 222 | // Finish up the text section now that we're done adding functions. |
| 223 | let mut text = self.text.finish(&mut self.ctrl_plane); |
| 224 | |
| 225 | postprocess_text(&mut text[..]); |
| 226 | |
| 227 | self.obj |
| 228 | .section_mut(self.text_section) |
| 229 | .set_data(text, text_align(self.compiler)); |
| 230 | |
| 231 | // Append the unwind information for all our functions, if necessary. |
| 232 | self.unwind_info |
| 233 | .append_section(self.compiler, self.obj, self.text_section); |
| 234 | } |
| 235 | } |
| 236 | |
| 237 | /// Builder used to create unwind information for a set of functions added to a |