mirror of
https://github.com/rui314/mold.git
synced 2026-11-09 04:49:33 -10:00
Remove unused symbol and endian helpers
This commit is contained in:
1 parent
f7e0ff86a1
commit
2308083712
2 files changed
-25
No files matched your search
@@ -20,7 +20,6 @@ use hashbrown::{Equivalent, HashMap};
|
||||
use rayon::prelude::*;
|
||||
|
||||
use crate::arch::Arch;
|
||||
use crate::chunks::ChunkHeader;
|
||||
use crate::context::Context;
|
||||
use crate::elf::*;
|
||||
use crate::error::demangle_enabled;
|
||||
@@ -832,14 +831,6 @@ impl Symbol {
|
||||
}
|
||||
}
|
||||
|
||||
/// Resolves the output chunk through its owning context.
|
||||
pub fn output_chunk<'a, E: Arch>(&self, ctx: &'a Context<E>) -> Option<&'a ChunkHeader<E>> {
|
||||
match self.origin.get() {
|
||||
OriginValue::OutputChunk(chunk) => Some(ctx.symbol_chunk_header(chunk)),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn symbol_origin(&self) -> Option<SymbolId> {
|
||||
match self.origin.get() {
|
||||
OriginValue::Symbol(symbol) => Some(symbol),
|
||||
|
||||
@@ -65,14 +65,6 @@ pub trait Endian: Copy + Default + Eq + Send + Sync + fmt::Debug + 'static {
|
||||
}
|
||||
}
|
||||
|
||||
fn read_i16(bytes: &[u8]) -> i16 {
|
||||
if Self::IS_LITTLE {
|
||||
read_il16(bytes)
|
||||
} else {
|
||||
read_ib16(bytes)
|
||||
}
|
||||
}
|
||||
|
||||
fn read_i32(bytes: &[u8]) -> i32 {
|
||||
if Self::IS_LITTLE {
|
||||
read_il32(bytes)
|
||||
@@ -113,14 +105,6 @@ pub trait Endian: Copy + Default + Eq + Send + Sync + fmt::Debug + 'static {
|
||||
}
|
||||
}
|
||||
|
||||
fn write_i16(bytes: &mut [u8], value: i16) {
|
||||
if Self::IS_LITTLE {
|
||||
write_il16(bytes, value);
|
||||
} else {
|
||||
write_ib16(bytes, value);
|
||||
}
|
||||
}
|
||||
|
||||
fn write_i32(bytes: &mut [u8], value: i32) {
|
||||
if Self::IS_LITTLE {
|
||||
write_il32(bytes, value);
|
||||
|
||||
Reference in new issue
Block a user