Function csx64::asm::link[][src]

pub fn link(
    objs: Vec<(String, ObjectFile)>,
    entry_point: Option<(&str, &str)>
) -> Result<Executable, LinkError>

Attempts to link one or more (named) object files into an executable. The first object file, objs[0] is known as the “start file”. The start file’s text segment (starting at the beginning) is the first thing to execute upon running the resulting executable. For very basic programs this is fine, but using a higher-level framework might require setup prior to running the “main” logic. Typically, this is denoted by a generic symbol such as “start” (hence, start file). If entry_point is Some((from, to)), the linker will perform a renaming operation for identifiers in the start file (only). For example, a typical C-like program would use Some(("start", "main")) - any occurence of start would be replaced by main.