mirror of
https://github.com/encounter/decomp-toolkit.git
synced 2025-12-15 16:16:20 +00:00
Write .splitmeta section in split objects
This enables showing the original address of symbols in objdiff, as well as `elf disasm` on split objects retaining the original addresses.
This commit is contained in:
@@ -10,6 +10,7 @@ use std::{
|
||||
};
|
||||
|
||||
use anyhow::{anyhow, bail, ensure, Result};
|
||||
use objdiff_core::obj::split_meta::SplitMeta;
|
||||
pub use relocations::{ObjReloc, ObjRelocKind, ObjRelocations};
|
||||
pub use sections::{ObjSection, ObjSectionKind, ObjSections};
|
||||
pub use splits::{ObjSplit, ObjSplits};
|
||||
@@ -55,6 +56,7 @@ pub struct ObjInfo {
|
||||
pub sections: ObjSections,
|
||||
pub entry: Option<u64>,
|
||||
pub mw_comment: Option<MWComment>,
|
||||
pub split_meta: Option<SplitMeta>,
|
||||
|
||||
// Linker generated
|
||||
pub sda2_base: Option<u32>,
|
||||
@@ -94,6 +96,7 @@ impl ObjInfo {
|
||||
sections: ObjSections::new(kind, sections),
|
||||
entry: None,
|
||||
mw_comment: Default::default(),
|
||||
split_meta: None,
|
||||
sda2_base: None,
|
||||
sda_base: None,
|
||||
stack_address: None,
|
||||
|
||||
@@ -28,7 +28,7 @@ pub struct ObjSection {
|
||||
/// REL files reference the original ELF section indices
|
||||
pub elf_index: usize,
|
||||
pub relocations: ObjRelocations,
|
||||
pub original_address: u64,
|
||||
pub virtual_address: Option<u64>,
|
||||
pub file_offset: u64,
|
||||
pub section_known: bool,
|
||||
pub splits: ObjSplits,
|
||||
|
||||
Reference in New Issue
Block a user