@@ -2,10 +2,10 @@ use std::fs; |
| 2 | 2 | use std::path::{Path, PathBuf}; |
| 3 | 3 | use std::process::Command; |
| 4 | 4 | |
| 5 | +use afs_ld::layout::Layout; |
| 5 | 6 | use afs_ld::macho::constants::{LC_ID_DYLIB, MH_DYLIB, MH_EXECUTE}; |
| 6 | 7 | use afs_ld::macho::reader::{parse_commands, parse_header, LoadCommand}; |
| 7 | 8 | use afs_ld::macho::writer::write; |
| 8 | | -use afs_ld::section::build_empty_layout; |
| 9 | 9 | use afs_ld::{LinkOptions, OutputKind}; |
| 10 | 10 | |
| 11 | 11 | fn have_tool(name: &str) -> bool { |
@@ -57,7 +57,7 @@ fn run_file(path: &Path) -> Result<String, String> { |
| 57 | 57 | |
| 58 | 58 | #[test] |
| 59 | 59 | fn empty_executable_writer_emits_parseable_macho() { |
| 60 | | - let layout = build_empty_layout(OutputKind::Executable); |
| 60 | + let layout = Layout::empty(OutputKind::Executable, 0); |
| 61 | 61 | let opts = LinkOptions::default(); |
| 62 | 62 | let mut bytes = Vec::new(); |
| 63 | 63 | write(&layout, OutputKind::Executable, &opts, &mut bytes).expect("write executable"); |
@@ -85,7 +85,7 @@ fn empty_executable_writer_emits_parseable_macho() { |
| 85 | 85 | |
| 86 | 86 | #[test] |
| 87 | 87 | fn empty_dylib_writer_emits_parseable_macho() { |
| 88 | | - let layout = build_empty_layout(OutputKind::Dylib); |
| 88 | + let layout = Layout::empty(OutputKind::Dylib, 0); |
| 89 | 89 | let mut opts = LinkOptions { |
| 90 | 90 | kind: OutputKind::Dylib, |
| 91 | 91 | ..LinkOptions::default() |