Files
Philip Craig eb58357f93 Delete format specific variants in RelocationKind
Replace uses of these variants with read::Relocation::flags
and write::Relocation::flags.

Additionally, for write::Relocation, move the kind/encoding/size
fields into RelocationFlags::Generic, since these are not
required when using format specific variants.
2023-12-24 13:24:44 +10:00

37 lines
3.2 KiB
Plaintext

Format: Xcoff Big-endian 64-bit
Kind: Relocatable
Architecture: PowerPc64
Flags: Xcoff { f_flags: 0 }
Relative Address Base: 0
Entry Address: 0
1: Section { name: ".text", address: 0, size: 68, align: 4, kind: Text, flags: Xcoff { s_flags: 20 } }
2: Section { name: ".data", address: 68, size: 20, align: 4, kind: Data, flags: Xcoff { s_flags: 40 } }
Symbols
0: Symbol { name: "base.c", address: 0, size: 0, kind: File, section: None, scope: Compilation, weak: false, flags: Xcoff { n_sclass: 67, x_smtyp: 0, x_smclas: 0, containing_csect: None } }
3: Symbol { name: ".printf", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 0, x_smclas: 0, containing_csect: None } }
5: Symbol { name: "printf", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 0, x_smclas: a, containing_csect: None } }
7: Symbol { name: ".text", address: 0, size: 57, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 29, x_smclas: 0, containing_csect: None } }
9: Symbol { name: ".main", address: 0, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 2, x_smclas: 0, containing_csect: Some(SymbolIndex(7)) } }
11: Symbol { name: ".rodata.str1.1L...str", address: 58, size: d, kind: Data, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 1, containing_csect: None } }
13: Symbol { name: "main", address: 68, size: 18, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 19, x_smclas: a, containing_csect: None } }
15: Symbol { name: "TOC", address: 80, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 19, x_smclas: f, containing_csect: None } }
17: Symbol { name: ".rodata.str1.1L...str", address: 80, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 19, x_smclas: 3, containing_csect: None } }
.text relocations
(1e, Relocation { kind: Got, encoding: Generic, size: 10, target: Symbol(SymbolIndex(11)), addend: 0, implicit_addend: true, flags: Xcoff { r_rtype: 3, r_rsize: f } })
(20, Relocation { kind: Relative, encoding: Generic, size: 1a, target: Symbol(SymbolIndex(3)), addend: fffffffffffffffc, implicit_addend: true, flags: Xcoff { r_rtype: 1a, r_rsize: 99 } })
.data relocations
(68, Relocation { kind: Absolute, encoding: Generic, size: 40, target: Symbol(SymbolIndex(9)), addend: 0, implicit_addend: true, flags: Xcoff { r_rtype: 0, r_rsize: 3f } })
(70, Relocation { kind: Absolute, encoding: Generic, size: 40, target: Symbol(SymbolIndex(f)), addend: 0, implicit_addend: true, flags: Xcoff { r_rtype: 0, r_rsize: 3f } })
(80, Relocation { kind: Absolute, encoding: Generic, size: 40, target: Symbol(SymbolIndex(b)), addend: 0, implicit_addend: true, flags: Xcoff { r_rtype: 0, r_rsize: 3f } })
Dynamic symbols
Symbol map
0x0 ".main"
0x58 ".rodata.str1.1L...str"
0x68 "main"
0x80 ".rodata.str1.1L...str"