From 8d7f01c86e8b2e60d1d6d888e02da8b40013a977 Mon Sep 17 00:00:00 2001 From: Ales Katona Date: Wed, 23 Dec 2020 17:36:32 -0800 Subject: [PATCH] rename parts to common --- src/{parts.rs => common.rs} | 0 src/{parts => common}/lazy.rs | 0 src/{parts => common}/relocatable.rs | 0 src/{parts => common}/section.rs | 0 src/{parts => common}/storage.rs | 0 src/{parts => common}/symbol.rs | 0 src/formats/elf.rs | 4 ++-- src/formats/elf/section.rs | 2 +- src/formats/elf/section_iter.rs | 2 +- src/linker.rs | 2 +- src/main.rs | 4 ++-- 11 files changed, 7 insertions(+), 7 deletions(-) rename src/{parts.rs => common.rs} (100%) rename src/{parts => common}/lazy.rs (100%) rename src/{parts => common}/relocatable.rs (100%) rename src/{parts => common}/section.rs (100%) rename src/{parts => common}/storage.rs (100%) rename src/{parts => common}/symbol.rs (100%) diff --git a/src/parts.rs b/src/common.rs similarity index 100% rename from src/parts.rs rename to src/common.rs diff --git a/src/parts/lazy.rs b/src/common/lazy.rs similarity index 100% rename from src/parts/lazy.rs rename to src/common/lazy.rs diff --git a/src/parts/relocatable.rs b/src/common/relocatable.rs similarity index 100% rename from src/parts/relocatable.rs rename to src/common/relocatable.rs diff --git a/src/parts/section.rs b/src/common/section.rs similarity index 100% rename from src/parts/section.rs rename to src/common/section.rs diff --git a/src/parts/storage.rs b/src/common/storage.rs similarity index 100% rename from src/parts/storage.rs rename to src/common/storage.rs diff --git a/src/parts/symbol.rs b/src/common/symbol.rs similarity index 100% rename from src/parts/symbol.rs rename to src/common/symbol.rs diff --git a/src/formats/elf.rs b/src/formats/elf.rs index 2129019..2768228 100644 --- a/src/formats/elf.rs +++ b/src/formats/elf.rs @@ -3,9 +3,9 @@ use std::{ path::{Path, PathBuf}, }; +use crate::common::{Lazy, Relocatable, Storage, Symbol}; use crate::linker::LinkState; -use crate::parts::{Lazy, Relocatable, Storage, Symbol}; -use crate::{error::Error, parts::BSI}; +use crate::{common::BSI, error::Error}; use xmas_elf::header::Type as ElfType; use xmas_elf::ElfFile; diff --git a/src/formats/elf/section.rs b/src/formats/elf/section.rs index 5e06e42..174b984 100644 --- a/src/formats/elf/section.rs +++ b/src/formats/elf/section.rs @@ -1,8 +1,8 @@ use std::iter::Cloned; use crate::{ + common::{Section, SectionInfo, SectionIterResult}, error::Error, - parts::{Section, SectionInfo, SectionIterResult}, }; use xmas_elf::{ sections::{SectionData, SectionHeader, SectionIter as ElfIter, ShType}, diff --git a/src/formats/elf/section_iter.rs b/src/formats/elf/section_iter.rs index cccb41a..8b00325 100644 --- a/src/formats/elf/section_iter.rs +++ b/src/formats/elf/section_iter.rs @@ -1,6 +1,6 @@ use crate::{ + common::{Section, SectionIterResult}, error::Error, - parts::{Section, SectionIterResult}, }; use xmas_elf::sections::SectionIter as ElfIter; use xmas_elf::ElfFile; diff --git a/src/linker.rs b/src/linker.rs index 73eb178..d4f80a0 100644 --- a/src/linker.rs +++ b/src/linker.rs @@ -1,6 +1,6 @@ use std::fmt::Display; -use crate::{error::Error, parts::Relocatable}; +use crate::{common::Relocatable, error::Error}; pub struct LinkState<'data> { pub relocatables: Vec>, diff --git a/src/main.rs b/src/main.rs index 3b5b345..9e20f84 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,11 +1,11 @@ +mod common; mod error; mod formats; mod linker; -mod parts; +use common::Storage; use formats::ElfObject; use linker::LinkState; -use parts::Storage; fn main() { let mut args = std::env::args().peekable();