pub fn write(
text: &Text,
data: &Data,
aliases: &[Alias],
target: &TargetInfo,
output: Output,
) -> Result<Vec<u8>, Error>Expand description
One text section and the variables beside it, as a relocatable object in the target’s format.
§Errors
Error::Format for a machine or a platform this does not write, and Error::Refused for
anything the writer underneath objected to, which would be a bug here. An alias whose target
this file does not define is refused the same way, since the front end is what reports that as
a program’s mistake and one reaching here means it did not. So is anything the target’s format
has no way to write, which for COFF is a thread-local variable, a reference through a table the
platform does not have, a record of where a patcher’s room is and a section the startup code is
expected to gather. See Error.