diff --git a/crates/examples/src/objcopy.rs b/crates/examples/src/objcopy.rs index 6d1bdfc..9196ba2 100644 --- a/crates/examples/src/objcopy.rs +++ b/crates/examples/src/objcopy.rs @@ -85,19 +85,17 @@ pub fn copy(in_data: &[u8]) -> Vec { let flags = match in_symbol.flags() { SymbolFlags::None => SymbolFlags::None, SymbolFlags::Elf { st_info, st_other } => SymbolFlags::Elf { st_info, st_other }, - SymbolFlags::MachO { n_desc } => SymbolFlags::MachO { n_desc }, - SymbolFlags::CoffSection { - selection, - associative_section, + SymbolFlags::MachO { n_type, n_desc } => SymbolFlags::MachO { n_type, n_desc }, + SymbolFlags::Coff { typ, storage_class } + | SymbolFlags::CoffSection { + typ, storage_class, .. } => { - let associative_section = - associative_section.map(|index| *out_sections.get(&index).unwrap()); - SymbolFlags::CoffSection { - selection, - associative_section, - } + // The write module doesn't support SymbolFlags::CoffSection; + // those section flags are handled via the comdat support instead. + SymbolFlags::Coff { typ, storage_class } } SymbolFlags::Xcoff { + n_type, n_sclass, x_smtyp, x_smclas, @@ -106,6 +104,7 @@ pub fn copy(in_data: &[u8]) -> Vec { let containing_csect = containing_csect.map(|index| *out_symbols.get(&index).unwrap()); SymbolFlags::Xcoff { + n_type, n_sclass, x_smtyp, x_smclas, diff --git a/crates/examples/testfiles/coff/import_msvc.lib.objdump b/crates/examples/testfiles/coff/import_msvc.lib.objdump index ccc470a..a345d8e 100644 --- a/crates/examples/testfiles/coff/import_msvc.lib.objdump +++ b/crates/examples/testfiles/coff/import_msvc.lib.objdump @@ -47,8 +47,8 @@ Segment { name: ".idata$4", address: 0, size: 0, permissions: RW- } 3: Section { name: ".idata$4", address: 0, size: 8, align: 8, kind: Data, flags: Coff { characteristics: c0400040 } } Symbols -0: Symbol { name: "@comp.id", address: 0, size: 0, kind: Data, section: Absolute, scope: Compilation, weak: false, flags: None } -1: Symbol { name: "\u{7f}test_x64_NULL_THUNK_DATA", address: 0, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Linkage, weak: false, flags: None } +0: Symbol { name: "@comp.id", address: 0, size: 0, kind: Data, section: Absolute, scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 3 } } +1: Symbol { name: "\u{7f}test_x64_NULL_THUNK_DATA", address: 0, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Linkage, weak: false, flags: Coff { typ: 0, storage_class: 2 } } Dynamic symbols @@ -68,8 +68,8 @@ Segment { name: ".idata$3", address: 0, size: 0, permissions: RW- } 2: Section { name: ".idata$3", address: 0, size: 14, align: 4, kind: Data, flags: Coff { characteristics: c0300040 } } Symbols -0: Symbol { name: "@comp.id", address: 0, size: 0, kind: Data, section: Absolute, scope: Compilation, weak: false, flags: None } -1: Symbol { name: "__NULL_IMPORT_DESCRIPTOR", address: 0, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Linkage, weak: false, flags: None } +0: Symbol { name: "@comp.id", address: 0, size: 0, kind: Data, section: Absolute, scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 3 } } +1: Symbol { name: "__NULL_IMPORT_DESCRIPTOR", address: 0, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Linkage, weak: false, flags: Coff { typ: 0, storage_class: 2 } } Dynamic symbols @@ -91,14 +91,14 @@ Segment { name: ".idata$6", address: 0, size: 0, permissions: RW- } 3: Section { name: ".idata$6", address: 0, size: e, align: 2, kind: Data, flags: Coff { characteristics: c0200040 } } Symbols -0: Symbol { name: "@comp.id", address: 0, size: 0, kind: Data, section: Absolute, scope: Compilation, weak: false, flags: None } -1: Symbol { name: "__IMPORT_DESCRIPTOR_test_x64", address: 0, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Linkage, weak: false, flags: None } -2: Symbol { name: ".idata$2", address: 0, size: 0, kind: Section, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: None } -3: Symbol { name: ".idata$6", address: 0, size: 0, kind: Data, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: None } -4: Symbol { name: ".idata$4", address: 0, size: 0, kind: Section, section: Undefined, scope: Compilation, weak: false, flags: None } -5: Symbol { name: ".idata$5", address: 0, size: 0, kind: Section, section: Undefined, scope: Compilation, weak: false, flags: None } -6: Symbol { name: "__NULL_IMPORT_DESCRIPTOR", address: 0, size: 0, kind: Data, section: Undefined, scope: Linkage, weak: false, flags: None } -7: Symbol { name: "\u{7f}test_x64_NULL_THUNK_DATA", address: 0, size: 0, kind: Data, section: Undefined, scope: Linkage, weak: false, flags: None } +0: Symbol { name: "@comp.id", address: 0, size: 0, kind: Data, section: Absolute, scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 3 } } +1: Symbol { name: "__IMPORT_DESCRIPTOR_test_x64", address: 0, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Linkage, weak: false, flags: Coff { typ: 0, storage_class: 2 } } +2: Symbol { name: ".idata$2", address: 0, size: 0, kind: Section, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 68 } } +3: Symbol { name: ".idata$6", address: 0, size: 0, kind: Data, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 3 } } +4: Symbol { name: ".idata$4", address: 0, size: 0, kind: Section, section: Undefined, scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 68 } } +5: Symbol { name: ".idata$5", address: 0, size: 0, kind: Section, section: Undefined, scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 68 } } +6: Symbol { name: "__NULL_IMPORT_DESCRIPTOR", address: 0, size: 0, kind: Data, section: Undefined, scope: Linkage, weak: false, flags: Coff { typ: 0, storage_class: 2 } } +7: Symbol { name: "\u{7f}test_x64_NULL_THUNK_DATA", address: 0, size: 0, kind: Data, section: Undefined, scope: Linkage, weak: false, flags: Coff { typ: 0, storage_class: 2 } } .idata$2 relocations (c, Relocation { kind: ImageOffset, encoding: Generic, size: 20, target: Symbol(SymbolIndex(3)), addend: 0, implicit_addend: true, flags: Coff { typ: 3 } }) @@ -133,8 +133,8 @@ Segment { name: ".idata$4", address: 0, size: 0, permissions: RW- } 3: Section { name: ".idata$4", address: 0, size: 4, align: 4, kind: Data, flags: Coff { characteristics: c0300040 } } Symbols -0: Symbol { name: "@comp.id", address: 0, size: 0, kind: Data, section: Absolute, scope: Compilation, weak: false, flags: None } -1: Symbol { name: "\u{7f}test_x86_NULL_THUNK_DATA", address: 0, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Linkage, weak: false, flags: None } +0: Symbol { name: "@comp.id", address: 0, size: 0, kind: Data, section: Absolute, scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 3 } } +1: Symbol { name: "\u{7f}test_x86_NULL_THUNK_DATA", address: 0, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Linkage, weak: false, flags: Coff { typ: 0, storage_class: 2 } } Dynamic symbols @@ -154,8 +154,8 @@ Segment { name: ".idata$3", address: 0, size: 0, permissions: RW- } 2: Section { name: ".idata$3", address: 0, size: 14, align: 4, kind: Data, flags: Coff { characteristics: c0300040 } } Symbols -0: Symbol { name: "@comp.id", address: 0, size: 0, kind: Data, section: Absolute, scope: Compilation, weak: false, flags: None } -1: Symbol { name: "__NULL_IMPORT_DESCRIPTOR", address: 0, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Linkage, weak: false, flags: None } +0: Symbol { name: "@comp.id", address: 0, size: 0, kind: Data, section: Absolute, scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 3 } } +1: Symbol { name: "__NULL_IMPORT_DESCRIPTOR", address: 0, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Linkage, weak: false, flags: Coff { typ: 0, storage_class: 2 } } Dynamic symbols @@ -177,14 +177,14 @@ Segment { name: ".idata$6", address: 0, size: 0, permissions: RW- } 3: Section { name: ".idata$6", address: 0, size: e, align: 2, kind: Data, flags: Coff { characteristics: c0200040 } } Symbols -0: Symbol { name: "@comp.id", address: 0, size: 0, kind: Data, section: Absolute, scope: Compilation, weak: false, flags: None } -1: Symbol { name: "__IMPORT_DESCRIPTOR_test_x86", address: 0, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Linkage, weak: false, flags: None } -2: Symbol { name: ".idata$2", address: 0, size: 0, kind: Section, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: None } -3: Symbol { name: ".idata$6", address: 0, size: 0, kind: Data, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: None } -4: Symbol { name: ".idata$4", address: 0, size: 0, kind: Section, section: Undefined, scope: Compilation, weak: false, flags: None } -5: Symbol { name: ".idata$5", address: 0, size: 0, kind: Section, section: Undefined, scope: Compilation, weak: false, flags: None } -6: Symbol { name: "__NULL_IMPORT_DESCRIPTOR", address: 0, size: 0, kind: Data, section: Undefined, scope: Linkage, weak: false, flags: None } -7: Symbol { name: "\u{7f}test_x86_NULL_THUNK_DATA", address: 0, size: 0, kind: Data, section: Undefined, scope: Linkage, weak: false, flags: None } +0: Symbol { name: "@comp.id", address: 0, size: 0, kind: Data, section: Absolute, scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 3 } } +1: Symbol { name: "__IMPORT_DESCRIPTOR_test_x86", address: 0, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Linkage, weak: false, flags: Coff { typ: 0, storage_class: 2 } } +2: Symbol { name: ".idata$2", address: 0, size: 0, kind: Section, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 68 } } +3: Symbol { name: ".idata$6", address: 0, size: 0, kind: Data, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 3 } } +4: Symbol { name: ".idata$4", address: 0, size: 0, kind: Section, section: Undefined, scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 68 } } +5: Symbol { name: ".idata$5", address: 0, size: 0, kind: Section, section: Undefined, scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 68 } } +6: Symbol { name: "__NULL_IMPORT_DESCRIPTOR", address: 0, size: 0, kind: Data, section: Undefined, scope: Linkage, weak: false, flags: Coff { typ: 0, storage_class: 2 } } +7: Symbol { name: "\u{7f}test_x86_NULL_THUNK_DATA", address: 0, size: 0, kind: Data, section: Undefined, scope: Linkage, weak: false, flags: Coff { typ: 0, storage_class: 2 } } .idata$2 relocations (c, Relocation { kind: ImageOffset, encoding: Generic, size: 20, target: Symbol(SymbolIndex(3)), addend: 0, implicit_addend: true, flags: Coff { typ: 7 } }) @@ -220,8 +220,8 @@ Segment { name: ".idata$4", address: 0, size: 0, permissions: RW- } 3: Section { name: ".idata$4", address: 0, size: 8, align: 8, kind: Data, flags: Coff { characteristics: c0400040 } } Symbols -0: Symbol { name: "@comp.id", address: 0, size: 0, kind: Data, section: Absolute, scope: Compilation, weak: false, flags: None } -1: Symbol { name: "\u{7f}test_arm64ec_NULL_THUNK_DATA", address: 0, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Linkage, weak: false, flags: None } +0: Symbol { name: "@comp.id", address: 0, size: 0, kind: Data, section: Absolute, scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 3 } } +1: Symbol { name: "\u{7f}test_arm64ec_NULL_THUNK_DATA", address: 0, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Linkage, weak: false, flags: Coff { typ: 0, storage_class: 2 } } Dynamic symbols @@ -241,8 +241,8 @@ Segment { name: ".idata$3", address: 0, size: 0, permissions: RW- } 2: Section { name: ".idata$3", address: 0, size: 14, align: 4, kind: Data, flags: Coff { characteristics: c0300040 } } Symbols -0: Symbol { name: "@comp.id", address: 0, size: 0, kind: Data, section: Absolute, scope: Compilation, weak: false, flags: None } -1: Symbol { name: "__NULL_IMPORT_DESCRIPTOR", address: 0, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Linkage, weak: false, flags: None } +0: Symbol { name: "@comp.id", address: 0, size: 0, kind: Data, section: Absolute, scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 3 } } +1: Symbol { name: "__NULL_IMPORT_DESCRIPTOR", address: 0, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Linkage, weak: false, flags: Coff { typ: 0, storage_class: 2 } } Dynamic symbols @@ -264,14 +264,14 @@ Segment { name: ".idata$6", address: 0, size: 0, permissions: RW- } 3: Section { name: ".idata$6", address: 0, size: 12, align: 2, kind: Data, flags: Coff { characteristics: c0200040 } } Symbols -0: Symbol { name: "@comp.id", address: 0, size: 0, kind: Data, section: Absolute, scope: Compilation, weak: false, flags: None } -1: Symbol { name: "__IMPORT_DESCRIPTOR_test_arm64ec", address: 0, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Linkage, weak: false, flags: None } -2: Symbol { name: ".idata$2", address: 0, size: 0, kind: Section, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: None } -3: Symbol { name: ".idata$6", address: 0, size: 0, kind: Data, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: None } -4: Symbol { name: ".idata$4", address: 0, size: 0, kind: Section, section: Undefined, scope: Compilation, weak: false, flags: None } -5: Symbol { name: ".idata$5", address: 0, size: 0, kind: Section, section: Undefined, scope: Compilation, weak: false, flags: None } -6: Symbol { name: "__NULL_IMPORT_DESCRIPTOR", address: 0, size: 0, kind: Data, section: Undefined, scope: Linkage, weak: false, flags: None } -7: Symbol { name: "\u{7f}test_arm64ec_NULL_THUNK_DATA", address: 0, size: 0, kind: Data, section: Undefined, scope: Linkage, weak: false, flags: None } +0: Symbol { name: "@comp.id", address: 0, size: 0, kind: Data, section: Absolute, scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 3 } } +1: Symbol { name: "__IMPORT_DESCRIPTOR_test_arm64ec", address: 0, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Linkage, weak: false, flags: Coff { typ: 0, storage_class: 2 } } +2: Symbol { name: ".idata$2", address: 0, size: 0, kind: Section, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 68 } } +3: Symbol { name: ".idata$6", address: 0, size: 0, kind: Data, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 3 } } +4: Symbol { name: ".idata$4", address: 0, size: 0, kind: Section, section: Undefined, scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 68 } } +5: Symbol { name: ".idata$5", address: 0, size: 0, kind: Section, section: Undefined, scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 68 } } +6: Symbol { name: "__NULL_IMPORT_DESCRIPTOR", address: 0, size: 0, kind: Data, section: Undefined, scope: Linkage, weak: false, flags: Coff { typ: 0, storage_class: 2 } } +7: Symbol { name: "\u{7f}test_arm64ec_NULL_THUNK_DATA", address: 0, size: 0, kind: Data, section: Undefined, scope: Linkage, weak: false, flags: Coff { typ: 0, storage_class: 2 } } .idata$2 relocations (c, Relocation { kind: ImageOffset, encoding: Generic, size: 20, target: Symbol(SymbolIndex(3)), addend: 0, implicit_addend: true, flags: Coff { typ: 2 } }) diff --git a/crates/examples/testfiles/macho/base-aarch64-debug.o.objdump b/crates/examples/testfiles/macho/base-aarch64-debug.o.objdump index 041bd34..0e7b05c 100644 --- a/crates/examples/testfiles/macho/base-aarch64-debug.o.objdump +++ b/crates/examples/testfiles/macho/base-aarch64-debug.o.objdump @@ -18,12 +18,12 @@ Segment { name: "", address: 0, size: 2ca, permissions: RWX } 11: Section { segment: "__DWARF", name: "__debug_line", address: 288, size: 42, align: 1, kind: Debug, flags: MachO { flags: 2000000 } } Symbols -0: Symbol { name: "ltmp0", address: 0, size: 0, kind: Section, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: MachO { n_desc: 0 } } -1: Symbol { name: "l_.str", address: 34, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: MachO { n_desc: 0 } } -2: Symbol { name: "ltmp1", address: 34, size: 0, kind: Section, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: MachO { n_desc: 0 } } -3: Symbol { name: "ltmp2", address: 268, size: 0, kind: Section, section: Section(SectionIndex(a)), scope: Compilation, weak: false, flags: MachO { n_desc: 0 } } -4: Symbol { name: "_main", address: 0, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: MachO { n_desc: 0 } } -5: Symbol { name: "_printf", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: MachO { n_desc: 0 } } +0: Symbol { name: "ltmp0", address: 0, size: 0, kind: Section, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: MachO { n_type: e, n_desc: 0 } } +1: Symbol { name: "l_.str", address: 34, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: MachO { n_type: e, n_desc: 0 } } +2: Symbol { name: "ltmp1", address: 34, size: 0, kind: Section, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: MachO { n_type: e, n_desc: 0 } } +3: Symbol { name: "ltmp2", address: 268, size: 0, kind: Section, section: Section(SectionIndex(a)), scope: Compilation, weak: false, flags: MachO { n_type: e, n_desc: 0 } } +4: Symbol { name: "_main", address: 0, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: MachO { n_type: f, n_desc: 0 } } +5: Symbol { name: "_printf", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: MachO { n_type: 1, n_desc: 0 } } __text relocations (20, Relocation { kind: PltRelative, encoding: AArch64Call, size: 1a, target: Symbol(SymbolIndex(5)), addend: 0, implicit_addend: true, flags: MachO { r_type: 2, r_pcrel: true, r_length: 2 } }) diff --git a/crates/examples/testfiles/macho/base-aarch64.o.objdump b/crates/examples/testfiles/macho/base-aarch64.o.objdump index 297fe87..afab296 100644 --- a/crates/examples/testfiles/macho/base-aarch64.o.objdump +++ b/crates/examples/testfiles/macho/base-aarch64.o.objdump @@ -10,12 +10,12 @@ Segment { name: "", address: 0, size: 68, permissions: RWX } 3: Section { segment: "__LD", name: "__compact_unwind", address: 48, size: 20, align: 8, kind: Unknown, flags: MachO { flags: 2000000 } } Symbols -0: Symbol { name: "ltmp0", address: 0, size: 0, kind: Section, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: MachO { n_desc: 0 } } -1: Symbol { name: "l_.str", address: 34, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: MachO { n_desc: 0 } } -2: Symbol { name: "ltmp1", address: 34, size: 0, kind: Section, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: MachO { n_desc: 0 } } -3: Symbol { name: "ltmp2", address: 48, size: 0, kind: Section, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: MachO { n_desc: 0 } } -4: Symbol { name: "_main", address: 0, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: MachO { n_desc: 0 } } -5: Symbol { name: "_printf", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: MachO { n_desc: 0 } } +0: Symbol { name: "ltmp0", address: 0, size: 0, kind: Section, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: MachO { n_type: e, n_desc: 0 } } +1: Symbol { name: "l_.str", address: 34, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: MachO { n_type: e, n_desc: 0 } } +2: Symbol { name: "ltmp1", address: 34, size: 0, kind: Section, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: MachO { n_type: e, n_desc: 0 } } +3: Symbol { name: "ltmp2", address: 48, size: 0, kind: Section, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: MachO { n_type: e, n_desc: 0 } } +4: Symbol { name: "_main", address: 0, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: MachO { n_type: f, n_desc: 0 } } +5: Symbol { name: "_printf", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: MachO { n_type: 1, n_desc: 0 } } __text relocations (20, Relocation { kind: PltRelative, encoding: AArch64Call, size: 1a, target: Symbol(SymbolIndex(5)), addend: 0, implicit_addend: true, flags: MachO { r_type: 2, r_pcrel: true, r_length: 2 } }) diff --git a/crates/examples/testfiles/macho/base-aarch64.objdump b/crates/examples/testfiles/macho/base-aarch64.objdump index c5c6248..2493efa 100644 --- a/crates/examples/testfiles/macho/base-aarch64.objdump +++ b/crates/examples/testfiles/macho/base-aarch64.objdump @@ -16,9 +16,9 @@ Segment { name: "__LINKEDIT", address: 100008000, size: 4000, permissions: R-- } 5: Section { segment: "__DATA_CONST", name: "__got", address: 100004000, size: 8, align: 8, kind: Unknown, flags: MachO { flags: 6 } } Symbols -0: Symbol { name: "__mh_execute_header", address: 100000000, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: MachO { n_desc: 10 } } -1: Symbol { name: "_main", address: 100003f68, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: MachO { n_desc: 0 } } -2: Symbol { name: "_printf", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: MachO { n_desc: 100 } } +0: Symbol { name: "__mh_execute_header", address: 100000000, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: MachO { n_type: f, n_desc: 10 } } +1: Symbol { name: "_main", address: 100003f68, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: MachO { n_type: f, n_desc: 0 } } +2: Symbol { name: "_printf", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: MachO { n_type: 1, n_desc: 100 } } Dynamic symbols diff --git a/crates/examples/testfiles/macho/base-x86_64-debug.o.objdump b/crates/examples/testfiles/macho/base-x86_64-debug.o.objdump index 38239ea..6c3d051 100644 --- a/crates/examples/testfiles/macho/base-x86_64-debug.o.objdump +++ b/crates/examples/testfiles/macho/base-x86_64-debug.o.objdump @@ -19,8 +19,8 @@ Segment { name: "", address: 0, size: 2f6, permissions: RWX } 12: Section { segment: "__DWARF", name: "__debug_line", address: 2b8, size: 3e, align: 1, kind: Debug, flags: MachO { flags: 2000000 } } Symbols -0: Symbol { name: "_main", address: 0, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: MachO { n_desc: 0 } } -1: Symbol { name: "_printf", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: MachO { n_desc: 0 } } +0: Symbol { name: "_main", address: 0, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: MachO { n_type: f, n_desc: 0 } } +1: Symbol { name: "_printf", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: MachO { n_type: 1, n_desc: 0 } } __text relocations (19, Relocation { kind: PltRelative, encoding: X86Branch, size: 20, target: Symbol(SymbolIndex(1)), addend: fffffffffffffffc, implicit_addend: true, flags: MachO { r_type: 2, r_pcrel: true, r_length: 2 } }) diff --git a/crates/examples/testfiles/macho/base-x86_64.o.objdump b/crates/examples/testfiles/macho/base-x86_64.o.objdump index 7620bd8..340d52c 100644 --- a/crates/examples/testfiles/macho/base-x86_64.o.objdump +++ b/crates/examples/testfiles/macho/base-x86_64.o.objdump @@ -11,8 +11,8 @@ Segment { name: "", address: 0, size: 98, permissions: RWX } 4: Section { segment: "__TEXT", name: "__eh_frame", address: 58, size: 40, align: 8, kind: ReadOnlyData, flags: MachO { flags: 6800000b } } Symbols -0: Symbol { name: "_main", address: 0, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: MachO { n_desc: 0 } } -1: Symbol { name: "_printf", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: MachO { n_desc: 0 } } +0: Symbol { name: "_main", address: 0, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: MachO { n_type: f, n_desc: 0 } } +1: Symbol { name: "_printf", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: MachO { n_type: 1, n_desc: 0 } } __text relocations (19, Relocation { kind: PltRelative, encoding: X86Branch, size: 20, target: Symbol(SymbolIndex(1)), addend: fffffffffffffffc, implicit_addend: true, flags: MachO { r_type: 2, r_pcrel: true, r_length: 2 } }) diff --git a/crates/examples/testfiles/macho/base-x86_64.objdump b/crates/examples/testfiles/macho/base-x86_64.objdump index 030154e..5b70ae0 100644 --- a/crates/examples/testfiles/macho/base-x86_64.objdump +++ b/crates/examples/testfiles/macho/base-x86_64.objdump @@ -20,11 +20,11 @@ Segment { name: "__LINKEDIT", address: 10000c000, size: 4000, permissions: R-- } 8: Section { segment: "__DATA", name: "__data", address: 100008008, size: 8, align: 8, kind: Data, flags: MachO { flags: 0 } } Symbols -0: Symbol { name: "__dyld_private", address: 100008008, size: 0, kind: Data, section: Section(SectionIndex(8)), scope: Compilation, weak: false, flags: MachO { n_desc: 0 } } -1: Symbol { name: "__mh_execute_header", address: 100000000, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: MachO { n_desc: 10 } } -2: Symbol { name: "_main", address: 100003f60, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: MachO { n_desc: 0 } } -3: Symbol { name: "_printf", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: MachO { n_desc: 100 } } -4: Symbol { name: "dyld_stub_binder", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: MachO { n_desc: 100 } } +0: Symbol { name: "__dyld_private", address: 100008008, size: 0, kind: Data, section: Section(SectionIndex(8)), scope: Compilation, weak: false, flags: MachO { n_type: e, n_desc: 0 } } +1: Symbol { name: "__mh_execute_header", address: 100000000, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: MachO { n_type: f, n_desc: 10 } } +2: Symbol { name: "_main", address: 100003f60, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: MachO { n_type: f, n_desc: 0 } } +3: Symbol { name: "_printf", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: MachO { n_type: 1, n_desc: 100 } } +4: Symbol { name: "dyld_stub_binder", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: MachO { n_type: 1, n_desc: 100 } } Dynamic symbols diff --git a/crates/examples/testfiles/macho/reloc-aarch64.o.objdump b/crates/examples/testfiles/macho/reloc-aarch64.o.objdump index 4cc9a5c..4624f27 100644 --- a/crates/examples/testfiles/macho/reloc-aarch64.o.objdump +++ b/crates/examples/testfiles/macho/reloc-aarch64.o.objdump @@ -9,11 +9,11 @@ Segment { name: "", address: 0, size: 48, permissions: RWX } 2: Section { segment: "__DATA", name: "__data", address: 28, size: 20, align: 1, kind: Data, flags: MachO { flags: 0 } } Symbols -0: Symbol { name: "ltmp0", address: 0, size: 0, kind: Section, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: MachO { n_desc: 0 } } -1: Symbol { name: "ltmp1", address: 28, size: 0, kind: Section, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: MachO { n_desc: 0 } } -2: Symbol { name: "_data", address: 28, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: MachO { n_desc: 0 } } -3: Symbol { name: "_g0", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: MachO { n_desc: 0 } } -4: Symbol { name: "_g1", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: MachO { n_desc: 0 } } +0: Symbol { name: "ltmp0", address: 0, size: 0, kind: Section, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: MachO { n_type: e, n_desc: 0 } } +1: Symbol { name: "ltmp1", address: 28, size: 0, kind: Section, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: MachO { n_type: e, n_desc: 0 } } +2: Symbol { name: "_data", address: 28, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: MachO { n_type: e, n_desc: 0 } } +3: Symbol { name: "_g0", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: MachO { n_type: 1, n_desc: 0 } } +4: Symbol { name: "_g1", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: MachO { n_type: 1, n_desc: 0 } } __text relocations (24, Relocation { kind: Unknown, encoding: Unknown, size: 20, target: Symbol(SymbolIndex(3)), addend: 0, implicit_addend: true, flags: MachO { r_type: 9, r_pcrel: false, r_length: 2 } }) diff --git a/crates/examples/testfiles/macho/reloc-arm.o.objdump b/crates/examples/testfiles/macho/reloc-arm.o.objdump index 7d17614..9c583af 100644 --- a/crates/examples/testfiles/macho/reloc-arm.o.objdump +++ b/crates/examples/testfiles/macho/reloc-arm.o.objdump @@ -9,10 +9,10 @@ Segment { name: "", address: 0, size: 3c, permissions: RWX } 2: Section { segment: "__DATA", name: "__data", address: 28, size: 14, align: 1, kind: Data, flags: MachO { flags: 0 } } Symbols -0: Symbol { name: "_g1", address: 0, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: MachO { n_desc: 0 } } -1: Symbol { name: "_g3", address: 14, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: MachO { n_desc: 0 } } -2: Symbol { name: "_g2", address: 14, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: MachO { n_desc: 0 } } -3: Symbol { name: "_g0", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: MachO { n_desc: 0 } } +0: Symbol { name: "_g1", address: 0, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: MachO { n_type: e, n_desc: 0 } } +1: Symbol { name: "_g3", address: 14, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: MachO { n_type: e, n_desc: 0 } } +2: Symbol { name: "_g2", address: 14, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: MachO { n_type: f, n_desc: 0 } } +3: Symbol { name: "_g0", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: MachO { n_type: 1, n_desc: 0 } } __text relocations (24, Relocation { kind: Unknown, encoding: Unknown, size: 40, target: Symbol(SymbolIndex(3)), addend: 0, implicit_addend: true, flags: MachO { r_type: 8, r_pcrel: false, r_length: 3 } }) diff --git a/crates/examples/testfiles/macho/reloc-i386.o.objdump b/crates/examples/testfiles/macho/reloc-i386.o.objdump index eb7419c..e29db3a 100644 --- a/crates/examples/testfiles/macho/reloc-i386.o.objdump +++ b/crates/examples/testfiles/macho/reloc-i386.o.objdump @@ -9,10 +9,10 @@ Segment { name: "", address: 0, size: 25, permissions: RWX } 2: Section { segment: "__DATA", name: "__data", address: 11, size: 14, align: 1, kind: Data, flags: MachO { flags: 0 } } Symbols -0: Symbol { name: "_g1", address: 0, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: MachO { n_desc: 0 } } -1: Symbol { name: "_g3", address: 10, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: MachO { n_desc: 0 } } -2: Symbol { name: "_g2", address: 10, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: MachO { n_desc: 0 } } -3: Symbol { name: "_g0", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: MachO { n_desc: 0 } } +0: Symbol { name: "_g1", address: 0, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: MachO { n_type: e, n_desc: 0 } } +1: Symbol { name: "_g3", address: 10, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: MachO { n_type: e, n_desc: 0 } } +2: Symbol { name: "_g2", address: 10, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: MachO { n_type: f, n_desc: 0 } } +3: Symbol { name: "_g0", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: MachO { n_type: 1, n_desc: 0 } } __text relocations (6, Relocation { kind: Unknown, encoding: Unknown, size: 20, target: Section(SectionIndex(1)), addend: fffffffffffffffc, implicit_addend: true, flags: MachO { r_type: 0, r_pcrel: true, r_length: 2 } }) diff --git a/crates/examples/testfiles/macho/reloc-x86_64.o.objdump b/crates/examples/testfiles/macho/reloc-x86_64.o.objdump index df59163..468ffb8 100644 --- a/crates/examples/testfiles/macho/reloc-x86_64.o.objdump +++ b/crates/examples/testfiles/macho/reloc-x86_64.o.objdump @@ -9,8 +9,8 @@ Segment { name: "", address: 0, size: 6b, permissions: RWX } 2: Section { segment: "__DATA", name: "__data", address: 53, size: 18, align: 1, kind: Data, flags: MachO { flags: 0 } } Symbols -0: Symbol { name: "_g1", address: 0, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: MachO { n_desc: 0 } } -1: Symbol { name: "_g2", address: 5, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: MachO { n_desc: 0 } } +0: Symbol { name: "_g1", address: 0, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: MachO { n_type: e, n_desc: 0 } } +1: Symbol { name: "_g2", address: 5, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: MachO { n_type: e, n_desc: 0 } } __text relocations (4f, Relocation { kind: Unknown, encoding: Unknown, size: 20, target: Symbol(SymbolIndex(0)), addend: fffffffffffffffc, implicit_addend: true, flags: MachO { r_type: 9, r_pcrel: true, r_length: 2 } }) diff --git a/crates/examples/testfiles/pe/base-bigobj.o.objdump b/crates/examples/testfiles/pe/base-bigobj.o.objdump index 37aa107..878faa6 100644 --- a/crates/examples/testfiles/pe/base-bigobj.o.objdump +++ b/crates/examples/testfiles/pe/base-bigobj.o.objdump @@ -20,19 +20,19 @@ Segment { name: ".rdata$zzz", address: 0, size: 0, permissions: R-- } 7: Section { name: ".rdata$zzz", address: 0, size: 30, align: 10, kind: ReadOnlyData, flags: Coff { characteristics: 40500040 } } Symbols -0: Symbol { name: "base.c", address: 0, size: 0, kind: File, section: None, scope: Compilation, weak: false, flags: None } -2: Symbol { name: "printf", address: 0, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: None } -4: Symbol { name: "main", address: 51, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Linkage, weak: false, flags: None } -5: Symbol { name: ".text", address: 0, size: 75, kind: Section, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: CoffSection { selection: 0, associative_section: None } } -7: Symbol { name: ".data", address: 0, size: 0, kind: Section, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: CoffSection { selection: 0, associative_section: None } } -9: Symbol { name: ".bss", address: 0, size: 0, kind: Section, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: CoffSection { selection: 0, associative_section: None } } -11: Symbol { name: ".xdata", address: 0, size: 18, kind: Section, section: Section(SectionIndex(4)), scope: Compilation, weak: false, flags: CoffSection { selection: 0, associative_section: None } } -13: Symbol { name: ".pdata", address: 0, size: 18, kind: Section, section: Section(SectionIndex(5)), scope: Compilation, weak: false, flags: CoffSection { selection: 0, associative_section: None } } -15: Symbol { name: ".rdata", address: 0, size: d, kind: Section, section: Section(SectionIndex(6)), scope: Compilation, weak: false, flags: CoffSection { selection: 0, associative_section: None } } -17: Symbol { name: ".rdata$zzz", address: 0, size: 2b, kind: Section, section: Section(SectionIndex(7)), scope: Compilation, weak: false, flags: CoffSection { selection: 0, associative_section: None } } -19: Symbol { name: "__imp___acrt_iob_func", address: 0, size: 0, kind: Data, section: Undefined, scope: Linkage, weak: false, flags: None } -20: Symbol { name: "__main", address: 0, size: 0, kind: Text, section: Undefined, scope: Linkage, weak: false, flags: None } -21: Symbol { name: "__mingw_vfprintf", address: 0, size: 0, kind: Text, section: Undefined, scope: Linkage, weak: false, flags: None } +0: Symbol { name: "base.c", address: 0, size: 0, kind: File, section: None, scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 67 } } +2: Symbol { name: "printf", address: 0, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Coff { typ: 20, storage_class: 3 } } +4: Symbol { name: "main", address: 51, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Linkage, weak: false, flags: Coff { typ: 20, storage_class: 2 } } +5: Symbol { name: ".text", address: 0, size: 75, kind: Section, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 0, associative_section: None } } +7: Symbol { name: ".data", address: 0, size: 0, kind: Section, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 0, associative_section: None } } +9: Symbol { name: ".bss", address: 0, size: 0, kind: Section, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 0, associative_section: None } } +11: Symbol { name: ".xdata", address: 0, size: 18, kind: Section, section: Section(SectionIndex(4)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 0, associative_section: None } } +13: Symbol { name: ".pdata", address: 0, size: 18, kind: Section, section: Section(SectionIndex(5)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 0, associative_section: None } } +15: Symbol { name: ".rdata", address: 0, size: d, kind: Section, section: Section(SectionIndex(6)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 0, associative_section: None } } +17: Symbol { name: ".rdata$zzz", address: 0, size: 2b, kind: Section, section: Section(SectionIndex(7)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 0, associative_section: None } } +19: Symbol { name: "__imp___acrt_iob_func", address: 0, size: 0, kind: Data, section: Undefined, scope: Linkage, weak: false, flags: Coff { typ: 0, storage_class: 2 } } +20: Symbol { name: "__main", address: 0, size: 0, kind: Text, section: Undefined, scope: Linkage, weak: false, flags: Coff { typ: 20, storage_class: 2 } } +21: Symbol { name: "__mingw_vfprintf", address: 0, size: 0, kind: Text, section: Undefined, scope: Linkage, weak: false, flags: Coff { typ: 20, storage_class: 2 } } .text relocations (2f, Relocation { kind: Relative, encoding: Generic, size: 20, target: Symbol(SymbolIndex(13)), addend: fffffffffffffffc, implicit_addend: true, flags: Coff { typ: 4 } }) diff --git a/crates/examples/testfiles/pe/base-bigobj.obj.objdump b/crates/examples/testfiles/pe/base-bigobj.obj.objdump index 5718b9f..299fc84 100644 --- a/crates/examples/testfiles/pe/base-bigobj.obj.objdump +++ b/crates/examples/testfiles/pe/base-bigobj.obj.objdump @@ -25,24 +25,24 @@ Comdat { symbol: SymbolIndex(17), name: "__vfprintf_l", kind: Any } Sections: 5 Comdat { symbol: SymbolIndex(18), name: "_printf", kind: Any } Sections: 6 Symbols -0: Symbol { name: "@comp.id", address: 0, size: 0, kind: Data, section: Absolute, scope: Compilation, weak: false, flags: None } -1: Symbol { name: "@feat.00", address: 0, size: 0, kind: Data, section: Absolute, scope: Compilation, weak: false, flags: None } -2: Symbol { name: ".drectve", address: 0, size: 2f, kind: Section, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: CoffSection { selection: 0, associative_section: None } } -4: Symbol { name: ".debug$S", address: 0, size: 7c, kind: Section, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: CoffSection { selection: 0, associative_section: None } } -6: Symbol { name: ".text$mn", address: 0, size: 14, kind: Section, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: CoffSection { selection: 0, associative_section: None } } -8: Symbol { name: ".text$mn", address: 0, size: a, kind: Section, section: Section(SectionIndex(4)), scope: Compilation, weak: false, flags: CoffSection { selection: 2, associative_section: None } } -10: Symbol { name: ".text$mn", address: 0, size: 29, kind: Section, section: Section(SectionIndex(5)), scope: Compilation, weak: false, flags: CoffSection { selection: 2, associative_section: None } } -12: Symbol { name: ".text$mn", address: 0, size: 3a, kind: Section, section: Section(SectionIndex(6)), scope: Compilation, weak: false, flags: CoffSection { selection: 2, associative_section: None } } -14: Symbol { name: "___local_stdio_printf_options", address: 0, size: 0, kind: Text, section: Section(SectionIndex(4)), scope: Linkage, weak: false, flags: None } -15: Symbol { name: "___acrt_iob_func", address: 0, size: 0, kind: Text, section: Undefined, scope: Linkage, weak: false, flags: None } -16: Symbol { name: "___stdio_common_vfprintf", address: 0, size: 0, kind: Text, section: Undefined, scope: Linkage, weak: false, flags: None } -17: Symbol { name: "__vfprintf_l", address: 0, size: 0, kind: Text, section: Section(SectionIndex(5)), scope: Linkage, weak: false, flags: None } -18: Symbol { name: "_printf", address: 0, size: 0, kind: Text, section: Section(SectionIndex(6)), scope: Linkage, weak: false, flags: None } -19: Symbol { name: "_main", address: 0, size: 0, kind: Text, section: Section(SectionIndex(3)), scope: Linkage, weak: false, flags: None } -20: Symbol { name: "?_OptionsStorage@?1??__local_stdio_printf_options@@9@9", address: 0, size: 8, kind: Data, section: Common, scope: Linkage, weak: false, flags: None } -21: Symbol { name: ".data", address: 0, size: d, kind: Section, section: Section(SectionIndex(7)), scope: Compilation, weak: false, flags: CoffSection { selection: 0, associative_section: None } } -23: Symbol { name: "$SG9248", address: 0, size: 0, kind: Data, section: Section(SectionIndex(7)), scope: Compilation, weak: false, flags: None } -24: Symbol { name: ".chks64", address: 0, size: 40, kind: Section, section: Section(SectionIndex(8)), scope: Compilation, weak: false, flags: CoffSection { selection: 0, associative_section: None } } +0: Symbol { name: "@comp.id", address: 0, size: 0, kind: Data, section: Absolute, scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 3 } } +1: Symbol { name: "@feat.00", address: 0, size: 0, kind: Data, section: Absolute, scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 3 } } +2: Symbol { name: ".drectve", address: 0, size: 2f, kind: Section, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 0, associative_section: None } } +4: Symbol { name: ".debug$S", address: 0, size: 7c, kind: Section, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 0, associative_section: None } } +6: Symbol { name: ".text$mn", address: 0, size: 14, kind: Section, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 0, associative_section: None } } +8: Symbol { name: ".text$mn", address: 0, size: a, kind: Section, section: Section(SectionIndex(4)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 2, associative_section: None } } +10: Symbol { name: ".text$mn", address: 0, size: 29, kind: Section, section: Section(SectionIndex(5)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 2, associative_section: None } } +12: Symbol { name: ".text$mn", address: 0, size: 3a, kind: Section, section: Section(SectionIndex(6)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 2, associative_section: None } } +14: Symbol { name: "___local_stdio_printf_options", address: 0, size: 0, kind: Text, section: Section(SectionIndex(4)), scope: Linkage, weak: false, flags: Coff { typ: 20, storage_class: 2 } } +15: Symbol { name: "___acrt_iob_func", address: 0, size: 0, kind: Text, section: Undefined, scope: Linkage, weak: false, flags: Coff { typ: 20, storage_class: 2 } } +16: Symbol { name: "___stdio_common_vfprintf", address: 0, size: 0, kind: Text, section: Undefined, scope: Linkage, weak: false, flags: Coff { typ: 20, storage_class: 2 } } +17: Symbol { name: "__vfprintf_l", address: 0, size: 0, kind: Text, section: Section(SectionIndex(5)), scope: Linkage, weak: false, flags: Coff { typ: 20, storage_class: 2 } } +18: Symbol { name: "_printf", address: 0, size: 0, kind: Text, section: Section(SectionIndex(6)), scope: Linkage, weak: false, flags: Coff { typ: 20, storage_class: 2 } } +19: Symbol { name: "_main", address: 0, size: 0, kind: Text, section: Section(SectionIndex(3)), scope: Linkage, weak: false, flags: Coff { typ: 20, storage_class: 2 } } +20: Symbol { name: "?_OptionsStorage@?1??__local_stdio_printf_options@@9@9", address: 0, size: 8, kind: Data, section: Common, scope: Linkage, weak: false, flags: Coff { typ: 0, storage_class: 2 } } +21: Symbol { name: ".data", address: 0, size: d, kind: Section, section: Section(SectionIndex(7)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 0, associative_section: None } } +23: Symbol { name: "$SG9248", address: 0, size: 0, kind: Data, section: Section(SectionIndex(7)), scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 3 } } +24: Symbol { name: ".chks64", address: 0, size: 40, kind: Section, section: Section(SectionIndex(8)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 0, associative_section: None } } .text$mn relocations (4, Relocation { kind: Absolute, encoding: Generic, size: 20, target: Symbol(SymbolIndex(17)), addend: 0, implicit_addend: true, flags: Coff { typ: 6 } }) diff --git a/crates/examples/testfiles/pe/base-gnu.exe.objdump-partial b/crates/examples/testfiles/pe/base-gnu.exe.objdump-partial index ff88ff3..696434e 100644 --- a/crates/examples/testfiles/pe/base-gnu.exe.objdump-partial +++ b/crates/examples/testfiles/pe/base-gnu.exe.objdump-partial @@ -44,25 +44,25 @@ Segment { name: ".debug_ranges", address: 140049000, size: 14f0, permissions: R- 19: Section { name: ".debug_ranges", address: 140049000, size: 14f0, align: 1000, kind: Other, flags: Coff { characteristics: 42100040 } } Symbols -0: Symbol { name: "crtexe.c", address: 0, size: 0, kind: File, section: None, scope: Compilation, weak: false, flags: None } -2: Symbol { name: "__mingw_invalidParameterHandler", address: 140001000, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: None } -4: Symbol { name: "pre_c_init", address: 140001010, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: None } -5: Symbol { name: ".rdata$.refptr.__mingw_initltsdrot_force", address: 140009740, size: 8, kind: Section, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: CoffSection { selection: 2, associative_section: None } } -7: Symbol { name: ".rdata$.refptr.__mingw_initltsdyn_force", address: 140009750, size: 8, kind: Section, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: CoffSection { selection: 2, associative_section: None } } -9: Symbol { name: ".rdata$.refptr.__mingw_initltssuo_force", address: 140009760, size: 8, kind: Section, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: CoffSection { selection: 2, associative_section: None } } -11: Symbol { name: ".rdata$.refptr.__image_base__", address: 1400096e0, size: 8, kind: Section, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: CoffSection { selection: 2, associative_section: None } } -13: Symbol { name: ".rdata$.refptr.__mingw_app_type", address: 140009730, size: 8, kind: Section, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: CoffSection { selection: 2, associative_section: None } } -15: Symbol { name: "managedapp", address: 14000c020, size: 0, kind: Data, section: Section(SectionIndex(6)), scope: Compilation, weak: false, flags: None } -16: Symbol { name: ".rdata$.refptr._fmode", address: 140009810, size: 8, kind: Section, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: CoffSection { selection: 2, associative_section: None } } -18: Symbol { name: ".rdata$.refptr._commode", address: 1400097f0, size: 8, kind: Section, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: CoffSection { selection: 2, associative_section: None } } -20: Symbol { name: ".rdata$.refptr._MINGW_INSTALL_DEBUG_MATHERR", address: 140009690, size: 8, kind: Section, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: CoffSection { selection: 2, associative_section: None } } -22: Symbol { name: "pre_cpp_init", address: 140001130, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: None } -23: Symbol { name: ".rdata$.refptr._newmode", address: 140009840, size: 8, kind: Section, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: CoffSection { selection: 2, associative_section: None } } -25: Symbol { name: "envp", address: 14000c028, size: 0, kind: Data, section: Section(SectionIndex(6)), scope: Compilation, weak: false, flags: None } -26: Symbol { name: "argv", address: 14000c030, size: 0, kind: Data, section: Section(SectionIndex(6)), scope: Compilation, weak: false, flags: None } -27: Symbol { name: "argc", address: 14000c038, size: 0, kind: Data, section: Section(SectionIndex(6)), scope: Compilation, weak: false, flags: None } -28: Symbol { name: "startinfo", address: 14000c018, size: 0, kind: Data, section: Section(SectionIndex(6)), scope: Compilation, weak: false, flags: None } -29: Symbol { name: ".rdata$.refptr._dowildcard", address: 140009800, size: 8, kind: Section, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: CoffSection { selection: 2, associative_section: None } } +0: Symbol { name: "crtexe.c", address: 0, size: 0, kind: File, section: None, scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 67 } } +2: Symbol { name: "__mingw_invalidParameterHandler", address: 140001000, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Coff { typ: 20, storage_class: 3 } } +4: Symbol { name: "pre_c_init", address: 140001010, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Coff { typ: 20, storage_class: 3 } } +5: Symbol { name: ".rdata$.refptr.__mingw_initltsdrot_force", address: 140009740, size: 8, kind: Section, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 2, associative_section: None } } +7: Symbol { name: ".rdata$.refptr.__mingw_initltsdyn_force", address: 140009750, size: 8, kind: Section, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 2, associative_section: None } } +9: Symbol { name: ".rdata$.refptr.__mingw_initltssuo_force", address: 140009760, size: 8, kind: Section, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 2, associative_section: None } } +11: Symbol { name: ".rdata$.refptr.__image_base__", address: 1400096e0, size: 8, kind: Section, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 2, associative_section: None } } +13: Symbol { name: ".rdata$.refptr.__mingw_app_type", address: 140009730, size: 8, kind: Section, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 2, associative_section: None } } +15: Symbol { name: "managedapp", address: 14000c020, size: 0, kind: Data, section: Section(SectionIndex(6)), scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 3 } } +16: Symbol { name: ".rdata$.refptr._fmode", address: 140009810, size: 8, kind: Section, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 2, associative_section: None } } +18: Symbol { name: ".rdata$.refptr._commode", address: 1400097f0, size: 8, kind: Section, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 2, associative_section: None } } +20: Symbol { name: ".rdata$.refptr._MINGW_INSTALL_DEBUG_MATHERR", address: 140009690, size: 8, kind: Section, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 2, associative_section: None } } +22: Symbol { name: "pre_cpp_init", address: 140001130, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Coff { typ: 20, storage_class: 3 } } +23: Symbol { name: ".rdata$.refptr._newmode", address: 140009840, size: 8, kind: Section, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 2, associative_section: None } } +25: Symbol { name: "envp", address: 14000c028, size: 0, kind: Data, section: Section(SectionIndex(6)), scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 3 } } +26: Symbol { name: "argv", address: 14000c030, size: 0, kind: Data, section: Section(SectionIndex(6)), scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 3 } } +27: Symbol { name: "argc", address: 14000c038, size: 0, kind: Data, section: Section(SectionIndex(6)), scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 3 } } +28: Symbol { name: "startinfo", address: 14000c018, size: 0, kind: Data, section: Section(SectionIndex(6)), scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 3 } } +29: Symbol { name: ".rdata$.refptr._dowildcard", address: 140009800, size: 8, kind: Section, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 2, associative_section: None } } Dynamic symbols diff --git a/crates/examples/testfiles/pe/base.o.objdump b/crates/examples/testfiles/pe/base.o.objdump index 38dd156..69d87b5 100644 --- a/crates/examples/testfiles/pe/base.o.objdump +++ b/crates/examples/testfiles/pe/base.o.objdump @@ -20,19 +20,19 @@ Segment { name: ".rdata$zzz", address: 0, size: 0, permissions: R-- } 7: Section { name: ".rdata$zzz", address: 0, size: 30, align: 10, kind: ReadOnlyData, flags: Coff { characteristics: 40500040 } } Symbols -0: Symbol { name: "base.c", address: 0, size: 0, kind: File, section: None, scope: Compilation, weak: false, flags: None } -2: Symbol { name: "printf", address: 0, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: None } -4: Symbol { name: "main", address: 51, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Linkage, weak: false, flags: None } -5: Symbol { name: ".text", address: 0, size: 75, kind: Section, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: CoffSection { selection: 0, associative_section: None } } -7: Symbol { name: ".data", address: 0, size: 0, kind: Section, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: CoffSection { selection: 0, associative_section: None } } -9: Symbol { name: ".bss", address: 0, size: 0, kind: Section, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: CoffSection { selection: 0, associative_section: None } } -11: Symbol { name: ".xdata", address: 0, size: 18, kind: Section, section: Section(SectionIndex(4)), scope: Compilation, weak: false, flags: CoffSection { selection: 0, associative_section: None } } -13: Symbol { name: ".pdata", address: 0, size: 18, kind: Section, section: Section(SectionIndex(5)), scope: Compilation, weak: false, flags: CoffSection { selection: 0, associative_section: None } } -15: Symbol { name: ".rdata", address: 0, size: d, kind: Section, section: Section(SectionIndex(6)), scope: Compilation, weak: false, flags: CoffSection { selection: 0, associative_section: None } } -17: Symbol { name: ".rdata$zzz", address: 0, size: 2b, kind: Section, section: Section(SectionIndex(7)), scope: Compilation, weak: false, flags: CoffSection { selection: 0, associative_section: None } } -19: Symbol { name: "__imp___acrt_iob_func", address: 0, size: 0, kind: Data, section: Undefined, scope: Linkage, weak: false, flags: None } -20: Symbol { name: "__main", address: 0, size: 0, kind: Text, section: Undefined, scope: Linkage, weak: false, flags: None } -21: Symbol { name: "__mingw_vfprintf", address: 0, size: 0, kind: Text, section: Undefined, scope: Linkage, weak: false, flags: None } +0: Symbol { name: "base.c", address: 0, size: 0, kind: File, section: None, scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 67 } } +2: Symbol { name: "printf", address: 0, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Coff { typ: 20, storage_class: 3 } } +4: Symbol { name: "main", address: 51, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Linkage, weak: false, flags: Coff { typ: 20, storage_class: 2 } } +5: Symbol { name: ".text", address: 0, size: 75, kind: Section, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 0, associative_section: None } } +7: Symbol { name: ".data", address: 0, size: 0, kind: Section, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 0, associative_section: None } } +9: Symbol { name: ".bss", address: 0, size: 0, kind: Section, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 0, associative_section: None } } +11: Symbol { name: ".xdata", address: 0, size: 18, kind: Section, section: Section(SectionIndex(4)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 0, associative_section: None } } +13: Symbol { name: ".pdata", address: 0, size: 18, kind: Section, section: Section(SectionIndex(5)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 0, associative_section: None } } +15: Symbol { name: ".rdata", address: 0, size: d, kind: Section, section: Section(SectionIndex(6)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 0, associative_section: None } } +17: Symbol { name: ".rdata$zzz", address: 0, size: 2b, kind: Section, section: Section(SectionIndex(7)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 0, associative_section: None } } +19: Symbol { name: "__imp___acrt_iob_func", address: 0, size: 0, kind: Data, section: Undefined, scope: Linkage, weak: false, flags: Coff { typ: 0, storage_class: 2 } } +20: Symbol { name: "__main", address: 0, size: 0, kind: Text, section: Undefined, scope: Linkage, weak: false, flags: Coff { typ: 20, storage_class: 2 } } +21: Symbol { name: "__mingw_vfprintf", address: 0, size: 0, kind: Text, section: Undefined, scope: Linkage, weak: false, flags: Coff { typ: 20, storage_class: 2 } } .text relocations (2f, Relocation { kind: Relative, encoding: Generic, size: 20, target: Symbol(SymbolIndex(13)), addend: fffffffffffffffc, implicit_addend: true, flags: Coff { typ: 4 } }) diff --git a/crates/examples/testfiles/pe/base.obj.objdump b/crates/examples/testfiles/pe/base.obj.objdump index 5718b9f..299fc84 100644 --- a/crates/examples/testfiles/pe/base.obj.objdump +++ b/crates/examples/testfiles/pe/base.obj.objdump @@ -25,24 +25,24 @@ Comdat { symbol: SymbolIndex(17), name: "__vfprintf_l", kind: Any } Sections: 5 Comdat { symbol: SymbolIndex(18), name: "_printf", kind: Any } Sections: 6 Symbols -0: Symbol { name: "@comp.id", address: 0, size: 0, kind: Data, section: Absolute, scope: Compilation, weak: false, flags: None } -1: Symbol { name: "@feat.00", address: 0, size: 0, kind: Data, section: Absolute, scope: Compilation, weak: false, flags: None } -2: Symbol { name: ".drectve", address: 0, size: 2f, kind: Section, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: CoffSection { selection: 0, associative_section: None } } -4: Symbol { name: ".debug$S", address: 0, size: 7c, kind: Section, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: CoffSection { selection: 0, associative_section: None } } -6: Symbol { name: ".text$mn", address: 0, size: 14, kind: Section, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: CoffSection { selection: 0, associative_section: None } } -8: Symbol { name: ".text$mn", address: 0, size: a, kind: Section, section: Section(SectionIndex(4)), scope: Compilation, weak: false, flags: CoffSection { selection: 2, associative_section: None } } -10: Symbol { name: ".text$mn", address: 0, size: 29, kind: Section, section: Section(SectionIndex(5)), scope: Compilation, weak: false, flags: CoffSection { selection: 2, associative_section: None } } -12: Symbol { name: ".text$mn", address: 0, size: 3a, kind: Section, section: Section(SectionIndex(6)), scope: Compilation, weak: false, flags: CoffSection { selection: 2, associative_section: None } } -14: Symbol { name: "___local_stdio_printf_options", address: 0, size: 0, kind: Text, section: Section(SectionIndex(4)), scope: Linkage, weak: false, flags: None } -15: Symbol { name: "___acrt_iob_func", address: 0, size: 0, kind: Text, section: Undefined, scope: Linkage, weak: false, flags: None } -16: Symbol { name: "___stdio_common_vfprintf", address: 0, size: 0, kind: Text, section: Undefined, scope: Linkage, weak: false, flags: None } -17: Symbol { name: "__vfprintf_l", address: 0, size: 0, kind: Text, section: Section(SectionIndex(5)), scope: Linkage, weak: false, flags: None } -18: Symbol { name: "_printf", address: 0, size: 0, kind: Text, section: Section(SectionIndex(6)), scope: Linkage, weak: false, flags: None } -19: Symbol { name: "_main", address: 0, size: 0, kind: Text, section: Section(SectionIndex(3)), scope: Linkage, weak: false, flags: None } -20: Symbol { name: "?_OptionsStorage@?1??__local_stdio_printf_options@@9@9", address: 0, size: 8, kind: Data, section: Common, scope: Linkage, weak: false, flags: None } -21: Symbol { name: ".data", address: 0, size: d, kind: Section, section: Section(SectionIndex(7)), scope: Compilation, weak: false, flags: CoffSection { selection: 0, associative_section: None } } -23: Symbol { name: "$SG9248", address: 0, size: 0, kind: Data, section: Section(SectionIndex(7)), scope: Compilation, weak: false, flags: None } -24: Symbol { name: ".chks64", address: 0, size: 40, kind: Section, section: Section(SectionIndex(8)), scope: Compilation, weak: false, flags: CoffSection { selection: 0, associative_section: None } } +0: Symbol { name: "@comp.id", address: 0, size: 0, kind: Data, section: Absolute, scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 3 } } +1: Symbol { name: "@feat.00", address: 0, size: 0, kind: Data, section: Absolute, scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 3 } } +2: Symbol { name: ".drectve", address: 0, size: 2f, kind: Section, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 0, associative_section: None } } +4: Symbol { name: ".debug$S", address: 0, size: 7c, kind: Section, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 0, associative_section: None } } +6: Symbol { name: ".text$mn", address: 0, size: 14, kind: Section, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 0, associative_section: None } } +8: Symbol { name: ".text$mn", address: 0, size: a, kind: Section, section: Section(SectionIndex(4)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 2, associative_section: None } } +10: Symbol { name: ".text$mn", address: 0, size: 29, kind: Section, section: Section(SectionIndex(5)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 2, associative_section: None } } +12: Symbol { name: ".text$mn", address: 0, size: 3a, kind: Section, section: Section(SectionIndex(6)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 2, associative_section: None } } +14: Symbol { name: "___local_stdio_printf_options", address: 0, size: 0, kind: Text, section: Section(SectionIndex(4)), scope: Linkage, weak: false, flags: Coff { typ: 20, storage_class: 2 } } +15: Symbol { name: "___acrt_iob_func", address: 0, size: 0, kind: Text, section: Undefined, scope: Linkage, weak: false, flags: Coff { typ: 20, storage_class: 2 } } +16: Symbol { name: "___stdio_common_vfprintf", address: 0, size: 0, kind: Text, section: Undefined, scope: Linkage, weak: false, flags: Coff { typ: 20, storage_class: 2 } } +17: Symbol { name: "__vfprintf_l", address: 0, size: 0, kind: Text, section: Section(SectionIndex(5)), scope: Linkage, weak: false, flags: Coff { typ: 20, storage_class: 2 } } +18: Symbol { name: "_printf", address: 0, size: 0, kind: Text, section: Section(SectionIndex(6)), scope: Linkage, weak: false, flags: Coff { typ: 20, storage_class: 2 } } +19: Symbol { name: "_main", address: 0, size: 0, kind: Text, section: Section(SectionIndex(3)), scope: Linkage, weak: false, flags: Coff { typ: 20, storage_class: 2 } } +20: Symbol { name: "?_OptionsStorage@?1??__local_stdio_printf_options@@9@9", address: 0, size: 8, kind: Data, section: Common, scope: Linkage, weak: false, flags: Coff { typ: 0, storage_class: 2 } } +21: Symbol { name: ".data", address: 0, size: d, kind: Section, section: Section(SectionIndex(7)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 0, associative_section: None } } +23: Symbol { name: "$SG9248", address: 0, size: 0, kind: Data, section: Section(SectionIndex(7)), scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 3 } } +24: Symbol { name: ".chks64", address: 0, size: 40, kind: Section, section: Section(SectionIndex(8)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 0, associative_section: None } } .text$mn relocations (4, Relocation { kind: Absolute, encoding: Generic, size: 20, target: Symbol(SymbolIndex(17)), addend: 0, implicit_addend: true, flags: Coff { typ: 6 } }) diff --git a/crates/examples/testfiles/pe/weak-extern.o.objdump b/crates/examples/testfiles/pe/weak-extern.o.objdump index 01b0c59..a3f51bf 100644 --- a/crates/examples/testfiles/pe/weak-extern.o.objdump +++ b/crates/examples/testfiles/pe/weak-extern.o.objdump @@ -18,15 +18,15 @@ Segment { name: ".rdata$zzz", address: 0, size: 0, permissions: R-- } 6: Section { name: ".rdata$zzz", address: 0, size: 40, align: 10, kind: ReadOnlyData, flags: Coff { characteristics: 40500040 } } Symbols -0: Symbol { name: "weak-extern.c", address: 0, size: 0, kind: File, section: None, scope: Compilation, weak: false, flags: None } -2: Symbol { name: ".text", address: 0, size: 7, kind: Section, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: CoffSection { selection: 0, associative_section: None } } -4: Symbol { name: ".data", address: 0, size: 0, kind: Section, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: CoffSection { selection: 0, associative_section: None } } -6: Symbol { name: ".bss", address: 0, size: 0, kind: Section, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: CoffSection { selection: 0, associative_section: None } } -8: Symbol { name: ".xdata", address: 0, size: 8, kind: Section, section: Section(SectionIndex(4)), scope: Compilation, weak: false, flags: CoffSection { selection: 0, associative_section: None } } -10: Symbol { name: ".pdata", address: 0, size: c, kind: Section, section: Section(SectionIndex(5)), scope: Compilation, weak: false, flags: CoffSection { selection: 0, associative_section: None } } -12: Symbol { name: ".rdata$zzz", address: 0, size: 38, kind: Section, section: Section(SectionIndex(6)), scope: Compilation, weak: false, flags: CoffSection { selection: 0, associative_section: None } } -14: Symbol { name: ".weak.weak_symbol.", address: 0, size: 0, kind: Data, section: Section(SectionIndex(1)), scope: Linkage, weak: false, flags: None } -15: Symbol { name: "weak_symbol", address: 0, size: 0, kind: Text, section: Unknown, scope: Linkage, weak: true, flags: None } +0: Symbol { name: "weak-extern.c", address: 0, size: 0, kind: File, section: None, scope: Compilation, weak: false, flags: Coff { typ: 0, storage_class: 67 } } +2: Symbol { name: ".text", address: 0, size: 7, kind: Section, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 0, associative_section: None } } +4: Symbol { name: ".data", address: 0, size: 0, kind: Section, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 0, associative_section: None } } +6: Symbol { name: ".bss", address: 0, size: 0, kind: Section, section: Section(SectionIndex(3)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 0, associative_section: None } } +8: Symbol { name: ".xdata", address: 0, size: 8, kind: Section, section: Section(SectionIndex(4)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 0, associative_section: None } } +10: Symbol { name: ".pdata", address: 0, size: c, kind: Section, section: Section(SectionIndex(5)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 0, associative_section: None } } +12: Symbol { name: ".rdata$zzz", address: 0, size: 38, kind: Section, section: Section(SectionIndex(6)), scope: Compilation, weak: false, flags: CoffSection { typ: 0, storage_class: 3, selection: 0, associative_section: None } } +14: Symbol { name: ".weak.weak_symbol.", address: 0, size: 0, kind: Data, section: Section(SectionIndex(1)), scope: Linkage, weak: false, flags: Coff { typ: 0, storage_class: 2 } } +15: Symbol { name: "weak_symbol", address: 0, size: 0, kind: Text, section: Unknown, scope: Linkage, weak: true, flags: Coff { typ: 20, storage_class: 69 } } .pdata relocations (0, Relocation { kind: ImageOffset, encoding: Generic, size: 20, target: Symbol(SymbolIndex(2)), addend: 0, implicit_addend: true, flags: Coff { typ: 3 } }) diff --git a/crates/examples/testfiles/xcoff/base.o.objdump b/crates/examples/testfiles/xcoff/base.o.objdump index 0f711e8..e76ba24 100644 --- a/crates/examples/testfiles/xcoff/base.o.objdump +++ b/crates/examples/testfiles/xcoff/base.o.objdump @@ -8,15 +8,15 @@ Entry Address: 0 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 } } +0: Symbol { name: "base.c", address: 0, size: 0, kind: File, section: None, scope: Compilation, weak: false, flags: Xcoff { n_type: 2, 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_type: 0, 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_type: 0, 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_type: 0, 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_type: 0, 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_type: 0, 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_type: 0, 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_type: 0, 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_type: 0, 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 } }) diff --git a/crates/examples/testfiles/xcoff/base.xcoff.objdump b/crates/examples/testfiles/xcoff/base.xcoff.objdump index d8b50e0..b6a0d02 100644 --- a/crates/examples/testfiles/xcoff/base.xcoff.objdump +++ b/crates/examples/testfiles/xcoff/base.xcoff.objdump @@ -10,85 +10,85 @@ Entry Address: 110000848 4: Section { name: ".loader", address: 0, size: 485, align: 4, kind: Metadata, flags: Xcoff { s_flags: 1000 } } Symbols -0: Symbol { name: "errno", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 0, x_smclas: 5, containing_csect: None } } -2: Symbol { name: "__mod_init", 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 } } -4: Symbol { name: "exit", 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 } } -6: Symbol { name: "atexit", 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 } } -8: 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 } } -10: Symbol { name: "__run_final_dtors", 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 } } -12: Symbol { name: "__run_initial_ctors", 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 } } -14: Symbol { name: "__n_pthreads", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 0, x_smclas: 5, containing_csect: None } } -16: Symbol { name: "__crt0v", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 0, x_smclas: 5, containing_csect: None } } -18: Symbol { name: "__malloc_user_defined_name", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 0, x_smclas: 5, containing_csect: None } } -20: Symbol { name: "TOC", address: 1100008b8, 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 } } -22: Symbol { name: "__crt0v", address: 110000900, 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 } } -24: Symbol { name: "crt0_data", address: 110000908, 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 } } -26: Symbol { name: "__run_final_dtors", address: 110000910, 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 } } -28: Symbol { name: "_$STATIC", address: 110000918, 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 } } -30: Symbol { name: "__C_runtime_termination", address: 110000920, 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 } } -32: Symbol { name: "atexit", address: 110000928, 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 } } -34: Symbol { name: "_cdtors", address: 110000930, 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 } } -36: Symbol { name: "__run_initial_ctors", address: 110000938, 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 } } -38: Symbol { name: "exit", address: 110000940, 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 } } -40: Symbol { name: "__n_pthreads", address: 110000948, 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 } } -42: Symbol { name: "__mod_init", address: 110000950, 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 } } -44: Symbol { name: "__malloc_user_defined_name", address: 110000958, 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 } } -46: Symbol { name: "errno", address: 110000960, 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 } } -48: Symbol { name: ".rodata.str1.1L...str", address: 110000968, 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 } } -50: Symbol { name: "printf", address: 110000970, 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 } } -52: Symbol { name: "", 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 } } -53: Symbol { name: "crt0_64.s", 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 } } -54: Symbol { name: ".__start", address: 1000001f8, size: ad, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 0, containing_csect: None } } -56: Symbol { name: ".__start", address: 1000001f8, 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(36)) } } -58: Symbol { name: "__start", address: 110000848, size: 10, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 19, x_smclas: a, containing_csect: None } } -60: Symbol { name: "crt0_data", address: 1100006d0, size: 68, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 5, containing_csect: None } } -62: Symbol { name: "p_xargc", address: 1100008c0, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 13, x_smclas: 10, containing_csect: None } } -64: Symbol { name: "p_xargv", address: 1100008f0, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 1b, x_smclas: 10, containing_csect: None } } -66: Symbol { name: "p_xrcfg", address: 1100008f8, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 13, x_smclas: 10, containing_csect: None } } -68: Symbol { name: "p_xrc", address: 1100008fc, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 13, x_smclas: 10, containing_csect: None } } -70: Symbol { name: "_malloc_user_defined_name", address: 1100008b8, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 1b, x_smclas: 10, containing_csect: None } } -72: Symbol { name: "../../../../../../../src/bos/usr/ccs/lib/libc/__threads_init.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 } } -76: Symbol { name: "", address: 1000002c0, size: 160, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 29, x_smclas: 0, containing_csect: None } } -78: Symbol { name: ".__threads_init", address: 1000002c0, 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(4c)) } } -80: Symbol { name: ".__threads_init@AF2_1", address: 100000300, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 2, x_smclas: 0, containing_csect: Some(SymbolIndex(4c)) } } -82: Symbol { name: "_$STATIC", address: 110000738, size: 59, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 19, x_smclas: 5, containing_csect: None } } -84: Symbol { name: "__threads_init", address: 110000858, 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 } } -86: Symbol { name: "__pth_init_routine", address: 1100008c8, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 1b, x_smclas: 10, containing_csect: None } } -88: Symbol { name: "_bsd_init_routine", address: 1100008d0, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 1b, x_smclas: 10, containing_csect: None } } -90: Symbol { name: "_xti_tli_init_routine", address: 1100008d8, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 1b, x_smclas: 10, containing_csect: None } } -92: Symbol { name: "_nsl_init_routine", address: 1100008e0, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 1b, x_smclas: 10, containing_csect: None } } -94: Symbol { name: "__dce_compat_init_routine", address: 1100008e8, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 1b, x_smclas: 10, containing_csect: None } } -96: Symbol { name: "../../../../../../../src/bos/usr/ccs/lib/libc/POWER/crti.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 } } -100: Symbol { name: "", address: 100000420, size: 178, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 19, x_smclas: 0, containing_csect: None } } -102: Symbol { name: ".__User_sinit_begin", address: 100000420, 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(64)) } } -104: Symbol { name: ".__C_runtime_termination", address: 100000448, 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(64)) } } -106: Symbol { name: ".__C_runtime_startup", address: 100000498, 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(64)) } } -108: Symbol { name: ".__dftdt__L304e50f8c42_5CatchFv", address: 100000520, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 2, x_smclas: 0, containing_csect: Some(SymbolIndex(64)) } } -110: Symbol { name: "_$STATIC", address: 1100007a0, size: 95, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 19, x_smclas: 5, containing_csect: None } } -112: Symbol { name: "__dftdt__L304e50f8c42_5CatchFv", address: 110000888, size: 18, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 19, x_smclas: a, containing_csect: None } } -114: Symbol { name: "__C_runtime_termination", address: 1100008a0, 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 } } -116: Symbol { name: "__C_runtime_startup", address: 110000870, 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 } } -118: Symbol { name: "_cdtors", address: 110000838, size: 10, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: true, flags: Xcoff { n_sclass: 6f, x_smtyp: 19, x_smclas: 5, containing_csect: None } } -120: Symbol { name: "__C_runtime_pstartup", address: 110000798, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 19, x_smclas: 5, containing_csect: None } } -122: 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 } } -125: Symbol { name: ".text", address: 100000640, 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 } } -127: Symbol { name: ".main", address: 100000640, 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(7d)) } } -129: Symbol { name: ".rodata.str1.1L...str", address: 1000006c0, 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 } } -131: Symbol { name: "glink64.s", 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 } } -132: Symbol { name: ".exit", address: 100000610, size: 28, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 6, containing_csect: None } } -134: Symbol { name: ".exit", address: 100000610, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 2, x_smclas: 6, containing_csect: Some(SymbolIndex(84)) } } -136: Symbol { name: "glink64.s", 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 } } -137: Symbol { name: ".__run_final_dtors", address: 100000598, size: 28, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 6, containing_csect: None } } -139: Symbol { name: ".__run_final_dtors", address: 100000598, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 2, x_smclas: 6, containing_csect: Some(SymbolIndex(89)) } } -141: Symbol { name: "glink64.s", 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 } } -142: Symbol { name: ".atexit", address: 1000005c0, size: 28, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 6, containing_csect: None } } -144: Symbol { name: ".atexit", address: 1000005c0, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 2, x_smclas: 6, containing_csect: Some(SymbolIndex(8e)) } } -146: Symbol { name: "glink64.s", 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 } } -147: Symbol { name: ".__run_initial_ctors", address: 1000005e8, size: 28, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 6, containing_csect: None } } -149: Symbol { name: ".__run_initial_ctors", address: 1000005e8, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 2, x_smclas: 6, containing_csect: Some(SymbolIndex(93)) } } -151: Symbol { name: "glink64.s", 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 } } -152: Symbol { name: ".printf", address: 100000698, size: 28, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 6, containing_csect: None } } -154: Symbol { name: ".printf", address: 100000698, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 2, x_smclas: 6, containing_csect: Some(SymbolIndex(98)) } } +0: Symbol { name: "errno", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 0, x_smclas: 5, containing_csect: None } } +2: Symbol { name: "__mod_init", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 0, x_smclas: a, containing_csect: None } } +4: Symbol { name: "exit", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 0, x_smclas: a, containing_csect: None } } +6: Symbol { name: "atexit", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 0, x_smclas: a, containing_csect: None } } +8: Symbol { name: "printf", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 0, x_smclas: a, containing_csect: None } } +10: Symbol { name: "__run_final_dtors", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 0, x_smclas: a, containing_csect: None } } +12: Symbol { name: "__run_initial_ctors", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 0, x_smclas: a, containing_csect: None } } +14: Symbol { name: "__n_pthreads", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 0, x_smclas: 5, containing_csect: None } } +16: Symbol { name: "__crt0v", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 0, x_smclas: 5, containing_csect: None } } +18: Symbol { name: "__malloc_user_defined_name", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 0, x_smclas: 5, containing_csect: None } } +20: Symbol { name: "TOC", address: 1100008b8, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 19, x_smclas: f, containing_csect: None } } +22: Symbol { name: "__crt0v", address: 110000900, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 19, x_smclas: 3, containing_csect: None } } +24: Symbol { name: "crt0_data", address: 110000908, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 19, x_smclas: 3, containing_csect: None } } +26: Symbol { name: "__run_final_dtors", address: 110000910, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 19, x_smclas: 3, containing_csect: None } } +28: Symbol { name: "_$STATIC", address: 110000918, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 19, x_smclas: 3, containing_csect: None } } +30: Symbol { name: "__C_runtime_termination", address: 110000920, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 19, x_smclas: 3, containing_csect: None } } +32: Symbol { name: "atexit", address: 110000928, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 19, x_smclas: 3, containing_csect: None } } +34: Symbol { name: "_cdtors", address: 110000930, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 19, x_smclas: 3, containing_csect: None } } +36: Symbol { name: "__run_initial_ctors", address: 110000938, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 19, x_smclas: 3, containing_csect: None } } +38: Symbol { name: "exit", address: 110000940, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 19, x_smclas: 3, containing_csect: None } } +40: Symbol { name: "__n_pthreads", address: 110000948, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 19, x_smclas: 3, containing_csect: None } } +42: Symbol { name: "__mod_init", address: 110000950, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 19, x_smclas: 3, containing_csect: None } } +44: Symbol { name: "__malloc_user_defined_name", address: 110000958, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 19, x_smclas: 3, containing_csect: None } } +46: Symbol { name: "errno", address: 110000960, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 19, x_smclas: 3, containing_csect: None } } +48: Symbol { name: ".rodata.str1.1L...str", address: 110000968, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 19, x_smclas: 3, containing_csect: None } } +50: Symbol { name: "printf", address: 110000970, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 19, x_smclas: 3, containing_csect: None } } +52: Symbol { name: "", address: 0, size: 0, kind: File, section: None, scope: Compilation, weak: false, flags: Xcoff { n_type: f901, n_sclass: 67, x_smtyp: 0, x_smclas: 0, containing_csect: None } } +53: Symbol { name: "crt0_64.s", address: 0, size: 0, kind: File, section: None, scope: Compilation, weak: false, flags: Xcoff { n_type: c02, n_sclass: 67, x_smtyp: 0, x_smclas: 0, containing_csect: None } } +54: Symbol { name: ".__start", address: 1000001f8, size: ad, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: 0, containing_csect: None } } +56: Symbol { name: ".__start", address: 1000001f8, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 2, x_smclas: 0, containing_csect: Some(SymbolIndex(36)) } } +58: Symbol { name: "__start", address: 110000848, size: 10, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 19, x_smclas: a, containing_csect: None } } +60: Symbol { name: "crt0_data", address: 1100006d0, size: 68, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: 5, containing_csect: None } } +62: Symbol { name: "p_xargc", address: 1100008c0, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 13, x_smclas: 10, containing_csect: None } } +64: Symbol { name: "p_xargv", address: 1100008f0, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 1b, x_smclas: 10, containing_csect: None } } +66: Symbol { name: "p_xrcfg", address: 1100008f8, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 13, x_smclas: 10, containing_csect: None } } +68: Symbol { name: "p_xrc", address: 1100008fc, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 13, x_smclas: 10, containing_csect: None } } +70: Symbol { name: "_malloc_user_defined_name", address: 1100008b8, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 1b, x_smclas: 10, containing_csect: None } } +72: Symbol { name: "../../../../../../../src/bos/usr/ccs/lib/libc/__threads_init.c", address: 0, size: 0, kind: File, section: None, scope: Compilation, weak: false, flags: Xcoff { n_type: 2, n_sclass: 67, x_smtyp: 0, x_smclas: 0, containing_csect: None } } +76: Symbol { name: "", address: 1000002c0, size: 160, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 29, x_smclas: 0, containing_csect: None } } +78: Symbol { name: ".__threads_init", address: 1000002c0, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 20, n_sclass: 2, x_smtyp: 2, x_smclas: 0, containing_csect: Some(SymbolIndex(4c)) } } +80: Symbol { name: ".__threads_init@AF2_1", address: 100000300, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_type: 20, n_sclass: 6b, x_smtyp: 2, x_smclas: 0, containing_csect: Some(SymbolIndex(4c)) } } +82: Symbol { name: "_$STATIC", address: 110000738, size: 59, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 19, x_smclas: 5, containing_csect: None } } +84: Symbol { name: "__threads_init", address: 110000858, size: 18, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 19, x_smclas: a, containing_csect: None } } +86: Symbol { name: "__pth_init_routine", address: 1100008c8, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 1b, x_smclas: 10, containing_csect: None } } +88: Symbol { name: "_bsd_init_routine", address: 1100008d0, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 1b, x_smclas: 10, containing_csect: None } } +90: Symbol { name: "_xti_tli_init_routine", address: 1100008d8, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 1b, x_smclas: 10, containing_csect: None } } +92: Symbol { name: "_nsl_init_routine", address: 1100008e0, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 1b, x_smclas: 10, containing_csect: None } } +94: Symbol { name: "__dce_compat_init_routine", address: 1100008e8, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 1b, x_smclas: 10, containing_csect: None } } +96: Symbol { name: "../../../../../../../src/bos/usr/ccs/lib/libc/POWER/crti.C", address: 0, size: 0, kind: File, section: None, scope: Compilation, weak: false, flags: Xcoff { n_type: 902, n_sclass: 67, x_smtyp: 0, x_smclas: 0, containing_csect: None } } +100: Symbol { name: "", address: 100000420, size: 178, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 19, x_smclas: 0, containing_csect: None } } +102: Symbol { name: ".__User_sinit_begin", address: 100000420, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 20, n_sclass: 2, x_smtyp: 2, x_smclas: 0, containing_csect: Some(SymbolIndex(64)) } } +104: Symbol { name: ".__C_runtime_termination", address: 100000448, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 20, n_sclass: 2, x_smtyp: 2, x_smclas: 0, containing_csect: Some(SymbolIndex(64)) } } +106: Symbol { name: ".__C_runtime_startup", address: 100000498, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 20, n_sclass: 2, x_smtyp: 2, x_smclas: 0, containing_csect: Some(SymbolIndex(64)) } } +108: Symbol { name: ".__dftdt__L304e50f8c42_5CatchFv", address: 100000520, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_type: 20, n_sclass: 6b, x_smtyp: 2, x_smclas: 0, containing_csect: Some(SymbolIndex(64)) } } +110: Symbol { name: "_$STATIC", address: 1100007a0, size: 95, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 19, x_smclas: 5, containing_csect: None } } +112: Symbol { name: "__dftdt__L304e50f8c42_5CatchFv", address: 110000888, size: 18, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 19, x_smclas: a, containing_csect: None } } +114: Symbol { name: "__C_runtime_termination", address: 1100008a0, size: 18, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 19, x_smclas: a, containing_csect: None } } +116: Symbol { name: "__C_runtime_startup", address: 110000870, size: 18, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 19, x_smclas: a, containing_csect: None } } +118: Symbol { name: "_cdtors", address: 110000838, size: 10, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: true, flags: Xcoff { n_type: 0, n_sclass: 6f, x_smtyp: 19, x_smclas: 5, containing_csect: None } } +120: Symbol { name: "__C_runtime_pstartup", address: 110000798, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 19, x_smclas: 5, containing_csect: None } } +122: Symbol { name: "base.c", address: 0, size: 0, kind: File, section: None, scope: Compilation, weak: false, flags: Xcoff { n_type: 2, n_sclass: 67, x_smtyp: 0, x_smclas: 0, containing_csect: None } } +125: Symbol { name: ".text", address: 100000640, size: 57, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 29, x_smclas: 0, containing_csect: None } } +127: Symbol { name: ".main", address: 100000640, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 2, x_smclas: 0, containing_csect: Some(SymbolIndex(7d)) } } +129: Symbol { name: ".rodata.str1.1L...str", address: 1000006c0, size: d, kind: Data, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: 1, containing_csect: None } } +131: Symbol { name: "glink64.s", address: 0, size: 0, kind: File, section: None, scope: Compilation, weak: false, flags: Xcoff { n_type: c02, n_sclass: 67, x_smtyp: 0, x_smclas: 0, containing_csect: None } } +132: Symbol { name: ".exit", address: 100000610, size: 28, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: 6, containing_csect: None } } +134: Symbol { name: ".exit", address: 100000610, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 2, x_smclas: 6, containing_csect: Some(SymbolIndex(84)) } } +136: Symbol { name: "glink64.s", address: 0, size: 0, kind: File, section: None, scope: Compilation, weak: false, flags: Xcoff { n_type: c02, n_sclass: 67, x_smtyp: 0, x_smclas: 0, containing_csect: None } } +137: Symbol { name: ".__run_final_dtors", address: 100000598, size: 28, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: 6, containing_csect: None } } +139: Symbol { name: ".__run_final_dtors", address: 100000598, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 2, x_smclas: 6, containing_csect: Some(SymbolIndex(89)) } } +141: Symbol { name: "glink64.s", address: 0, size: 0, kind: File, section: None, scope: Compilation, weak: false, flags: Xcoff { n_type: c02, n_sclass: 67, x_smtyp: 0, x_smclas: 0, containing_csect: None } } +142: Symbol { name: ".atexit", address: 1000005c0, size: 28, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: 6, containing_csect: None } } +144: Symbol { name: ".atexit", address: 1000005c0, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 2, x_smclas: 6, containing_csect: Some(SymbolIndex(8e)) } } +146: Symbol { name: "glink64.s", address: 0, size: 0, kind: File, section: None, scope: Compilation, weak: false, flags: Xcoff { n_type: c02, n_sclass: 67, x_smtyp: 0, x_smclas: 0, containing_csect: None } } +147: Symbol { name: ".__run_initial_ctors", address: 1000005e8, size: 28, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: 6, containing_csect: None } } +149: Symbol { name: ".__run_initial_ctors", address: 1000005e8, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 2, x_smclas: 6, containing_csect: Some(SymbolIndex(93)) } } +151: Symbol { name: "glink64.s", address: 0, size: 0, kind: File, section: None, scope: Compilation, weak: false, flags: Xcoff { n_type: c02, n_sclass: 67, x_smtyp: 0, x_smclas: 0, containing_csect: None } } +152: Symbol { name: ".printf", address: 100000698, size: 28, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: 6, containing_csect: None } } +154: Symbol { name: ".printf", address: 100000698, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 2, x_smclas: 6, containing_csect: Some(SymbolIndex(98)) } } .text relocations (1000001fa, Relocation { kind: Got, encoding: Generic, size: 10, target: Symbol(SymbolIndex(46)), addend: 0, implicit_addend: true, flags: Xcoff { r_rtype: 3, r_rsize: f } }) diff --git a/crates/examples/testfiles/xcoff/base32.o.objdump b/crates/examples/testfiles/xcoff/base32.o.objdump index 9457477..4d0cbad 100644 --- a/crates/examples/testfiles/xcoff/base32.o.objdump +++ b/crates/examples/testfiles/xcoff/base32.o.objdump @@ -8,15 +8,15 @@ Entry Address: 0 2: Section { name: ".data", address: 6c, size: 10, 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: 5b, 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: 5c, 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: 6c, size: c, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 11, x_smclas: a, containing_csect: None } } -15: Symbol { name: "TOC", address: 78, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: f, containing_csect: None } } -17: Symbol { name: ".rodata.str1.1L...str", address: 78, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 3, containing_csect: None } } +0: Symbol { name: "base.c", address: 0, size: 0, kind: File, section: None, scope: Compilation, weak: false, flags: Xcoff { n_type: 3, 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_type: 0, 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_type: 0, n_sclass: 2, x_smtyp: 0, x_smclas: a, containing_csect: None } } +7: Symbol { name: ".text", address: 0, size: 5b, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, 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_type: 0, n_sclass: 2, x_smtyp: 2, x_smclas: 0, containing_csect: Some(SymbolIndex(7)) } } +11: Symbol { name: ".rodata.str1.1L...str", address: 5c, size: d, kind: Data, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: 1, containing_csect: None } } +13: Symbol { name: "main", address: 6c, size: c, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 11, x_smclas: a, containing_csect: None } } +15: Symbol { name: "TOC", address: 78, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: f, containing_csect: None } } +17: Symbol { name: ".rodata.str1.1L...str", address: 78, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: 3, containing_csect: None } } .text relocations (22, Relocation { kind: Got, encoding: Generic, size: 10, target: Symbol(SymbolIndex(11)), addend: 0, implicit_addend: true, flags: Xcoff { r_rtype: 3, r_rsize: f } }) diff --git a/crates/examples/testfiles/xcoff/base32.xcoff.objdump b/crates/examples/testfiles/xcoff/base32.xcoff.objdump index 08296c6..b7090fe 100644 --- a/crates/examples/testfiles/xcoff/base32.xcoff.objdump +++ b/crates/examples/testfiles/xcoff/base32.xcoff.objdump @@ -10,83 +10,83 @@ Entry Address: 20000710 4: Section { name: ".loader", address: 0, size: 37a, align: 4, kind: Metadata, flags: Xcoff { s_flags: 1000 } } Symbols -0: Symbol { name: "errno", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 0, x_smclas: 5, containing_csect: None } } -2: Symbol { name: "exit", 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 } } -4: Symbol { name: "atexit", 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 } } -6: 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 } } -8: Symbol { name: "__run_final_dtors", 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 } } -10: Symbol { name: "__run_initial_ctors", 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 } } -12: Symbol { name: "__mod_init", 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 } } -14: Symbol { name: "__crt0v", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 0, x_smclas: 5, containing_csect: None } } -16: Symbol { name: "__malloc_user_defined_name", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 0, x_smclas: 5, containing_csect: None } } -18: Symbol { name: "TOC", address: 20000748, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: f, containing_csect: None } } -20: Symbol { name: "__crt0v", address: 20000770, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 3, containing_csect: None } } -22: Symbol { name: "__mod_init", address: 20000774, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 3, containing_csect: None } } -24: Symbol { name: "crt0_data", address: 20000778, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 3, containing_csect: None } } -26: Symbol { name: "__run_final_dtors", address: 2000077c, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 3, containing_csect: None } } -28: Symbol { name: "_$STATIC", address: 20000780, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 3, containing_csect: None } } -30: Symbol { name: "__C_runtime_termination", address: 20000784, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 3, containing_csect: None } } -32: Symbol { name: "atexit", address: 20000788, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 3, containing_csect: None } } -34: Symbol { name: "_cdtors", address: 2000078c, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 3, containing_csect: None } } -36: Symbol { name: "__run_initial_ctors", address: 20000790, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 3, containing_csect: None } } -38: Symbol { name: "exit", address: 20000794, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 3, containing_csect: None } } -40: Symbol { name: "__malloc_user_defined_name", address: 20000798, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 3, containing_csect: None } } -42: Symbol { name: "errno", address: 2000079c, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 3, containing_csect: None } } -44: Symbol { name: ".rodata.str1.1L...str", address: 200007a0, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 3, containing_csect: None } } -46: Symbol { name: "printf", address: 200007a4, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 3, containing_csect: None } } -48: Symbol { name: " ", 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 } } -49: Symbol { name: "crt0main.s", 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 } } -50: Symbol { name: ".__start", address: 10000128, size: a5, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 0, containing_csect: None } } -52: Symbol { name: ".__start", address: 10000128, 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(32)) } } -54: Symbol { name: "__start", address: 20000710, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 11, x_smclas: a, containing_csect: None } } -56: Symbol { name: "crt0_data", address: 200005f4, size: 2c, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 5, containing_csect: None } } -58: Symbol { name: "p_xargc", address: 2000074c, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 13, x_smclas: 10, containing_csect: None } } -60: Symbol { name: "p_xargv", address: 20000764, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 13, x_smclas: 10, containing_csect: None } } -62: Symbol { name: "p_xrcfg", address: 20000768, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 13, x_smclas: 10, containing_csect: None } } -64: Symbol { name: "p_xrc", address: 2000076c, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 13, x_smclas: 10, containing_csect: None } } -66: Symbol { name: "_malloc_user_defined_name", address: 20000748, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 13, x_smclas: 10, containing_csect: None } } -68: Symbol { name: "../../../../../../../src/bos/usr/ccs/lib/libc/__threads_init.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 } } -72: Symbol { name: "", address: 100001e0, size: 160, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 29, x_smclas: 0, containing_csect: None } } -74: Symbol { name: ".__threads_init", address: 100001e0, 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(48)) } } -76: Symbol { name: ".__threads_init@AF2_1", address: 10000220, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 2, x_smclas: 0, containing_csect: Some(SymbolIndex(48)) } } -78: Symbol { name: "_$STATIC", address: 20000620, size: 59, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 19, x_smclas: 5, containing_csect: None } } -80: Symbol { name: "__threads_init", address: 20000718, size: c, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 11, x_smclas: a, containing_csect: None } } -82: Symbol { name: "__pth_init_routine", address: 20000750, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 13, x_smclas: 10, containing_csect: None } } -84: Symbol { name: "_bsd_init_routine", address: 20000754, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 13, x_smclas: 10, containing_csect: None } } -86: Symbol { name: "_xti_tli_init_routine", address: 20000758, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 13, x_smclas: 10, containing_csect: None } } -88: Symbol { name: "_nsl_init_routine", address: 2000075c, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 13, x_smclas: 10, containing_csect: None } } -90: Symbol { name: "__dce_compat_init_routine", address: 20000760, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 13, x_smclas: 10, containing_csect: None } } -92: Symbol { name: "../../../../../../../src/bos/usr/ccs/lib/libc/POWER/crti.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 } } -96: Symbol { name: "", address: 10000340, size: 178, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 19, x_smclas: 0, containing_csect: None } } -98: Symbol { name: ".__User_sinit_begin", address: 10000340, 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(60)) } } -100: Symbol { name: ".__C_runtime_termination", address: 10000368, 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(60)) } } -102: Symbol { name: ".__C_runtime_startup", address: 100003b8, 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(60)) } } -104: Symbol { name: ".__dftdt__L304e4b28c42_5CatchFv", address: 10000440, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 2, x_smclas: 0, containing_csect: Some(SymbolIndex(60)) } } -106: Symbol { name: "_$STATIC", address: 20000680, size: 81, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 19, x_smclas: 5, containing_csect: None } } -108: Symbol { name: "__dftdt__L304e4b28c42_5CatchFv", address: 20000730, size: c, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: a, containing_csect: None } } -110: Symbol { name: "__C_runtime_termination", address: 2000073c, size: c, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 11, x_smclas: a, containing_csect: None } } -112: Symbol { name: "__C_runtime_startup", address: 20000724, size: c, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 11, x_smclas: a, containing_csect: None } } -114: Symbol { name: "_cdtors", address: 20000708, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: true, flags: Xcoff { n_sclass: 6f, x_smtyp: 19, x_smclas: 5, containing_csect: None } } -116: Symbol { name: "__C_runtime_pstartup", address: 2000067c, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 11, x_smclas: 5, containing_csect: None } } -118: 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 } } -121: Symbol { name: ".text", address: 10000560, size: 5b, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 29, x_smclas: 0, containing_csect: None } } -123: Symbol { name: ".main", address: 10000560, 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(79)) } } -125: Symbol { name: ".rodata.str1.1L...str", address: 100005e4, 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 } } -127: Symbol { name: "glink.s", 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 } } -128: Symbol { name: ".exit", address: 10000530, size: 28, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 6, containing_csect: None } } -130: Symbol { name: ".exit", address: 10000530, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 2, x_smclas: 6, containing_csect: Some(SymbolIndex(80)) } } -132: Symbol { name: "glink.s", 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 } } -133: Symbol { name: ".__run_final_dtors", address: 100004b8, size: 28, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 6, containing_csect: None } } -135: Symbol { name: ".__run_final_dtors", address: 100004b8, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 2, x_smclas: 6, containing_csect: Some(SymbolIndex(85)) } } -137: Symbol { name: "glink.s", 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 } } -138: Symbol { name: ".atexit", address: 100004e0, size: 28, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 6, containing_csect: None } } -140: Symbol { name: ".atexit", address: 100004e0, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 2, x_smclas: 6, containing_csect: Some(SymbolIndex(8a)) } } -142: Symbol { name: "glink.s", 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 } } -143: Symbol { name: ".__run_initial_ctors", address: 10000508, size: 28, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 6, containing_csect: None } } -145: Symbol { name: ".__run_initial_ctors", address: 10000508, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 2, x_smclas: 6, containing_csect: Some(SymbolIndex(8f)) } } -147: Symbol { name: "glink.s", 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 } } -148: Symbol { name: ".printf", address: 100005bc, size: 28, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 6, containing_csect: None } } -150: Symbol { name: ".printf", address: 100005bc, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: Xcoff { n_sclass: 2, x_smtyp: 2, x_smclas: 6, containing_csect: Some(SymbolIndex(94)) } } +0: Symbol { name: "errno", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 0, x_smclas: 5, containing_csect: None } } +2: Symbol { name: "exit", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 0, x_smclas: a, containing_csect: None } } +4: Symbol { name: "atexit", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 0, x_smclas: a, containing_csect: None } } +6: Symbol { name: "printf", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 0, x_smclas: a, containing_csect: None } } +8: Symbol { name: "__run_final_dtors", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 0, x_smclas: a, containing_csect: None } } +10: Symbol { name: "__run_initial_ctors", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 0, x_smclas: a, containing_csect: None } } +12: Symbol { name: "__mod_init", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 0, x_smclas: a, containing_csect: None } } +14: Symbol { name: "__crt0v", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 0, x_smclas: 5, containing_csect: None } } +16: Symbol { name: "__malloc_user_defined_name", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 0, x_smclas: 5, containing_csect: None } } +18: Symbol { name: "TOC", address: 20000748, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: f, containing_csect: None } } +20: Symbol { name: "__crt0v", address: 20000770, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: 3, containing_csect: None } } +22: Symbol { name: "__mod_init", address: 20000774, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: 3, containing_csect: None } } +24: Symbol { name: "crt0_data", address: 20000778, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: 3, containing_csect: None } } +26: Symbol { name: "__run_final_dtors", address: 2000077c, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: 3, containing_csect: None } } +28: Symbol { name: "_$STATIC", address: 20000780, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: 3, containing_csect: None } } +30: Symbol { name: "__C_runtime_termination", address: 20000784, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: 3, containing_csect: None } } +32: Symbol { name: "atexit", address: 20000788, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: 3, containing_csect: None } } +34: Symbol { name: "_cdtors", address: 2000078c, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: 3, containing_csect: None } } +36: Symbol { name: "__run_initial_ctors", address: 20000790, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: 3, containing_csect: None } } +38: Symbol { name: "exit", address: 20000794, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: 3, containing_csect: None } } +40: Symbol { name: "__malloc_user_defined_name", address: 20000798, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: 3, containing_csect: None } } +42: Symbol { name: "errno", address: 2000079c, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: 3, containing_csect: None } } +44: Symbol { name: ".rodata.str1.1L...str", address: 200007a0, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: 3, containing_csect: None } } +46: Symbol { name: "printf", address: 200007a4, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: 3, containing_csect: None } } +48: Symbol { name: " ", address: 0, size: 0, kind: File, section: None, scope: Compilation, weak: false, flags: Xcoff { n_type: f903, n_sclass: 67, x_smtyp: 0, x_smclas: 0, containing_csect: None } } +49: Symbol { name: "crt0main.s", address: 0, size: 0, kind: File, section: None, scope: Compilation, weak: false, flags: Xcoff { n_type: c03, n_sclass: 67, x_smtyp: 0, x_smclas: 0, containing_csect: None } } +50: Symbol { name: ".__start", address: 10000128, size: a5, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: 0, containing_csect: None } } +52: Symbol { name: ".__start", address: 10000128, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 2, x_smclas: 0, containing_csect: Some(SymbolIndex(32)) } } +54: Symbol { name: "__start", address: 20000710, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 11, x_smclas: a, containing_csect: None } } +56: Symbol { name: "crt0_data", address: 200005f4, size: 2c, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: 5, containing_csect: None } } +58: Symbol { name: "p_xargc", address: 2000074c, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 13, x_smclas: 10, containing_csect: None } } +60: Symbol { name: "p_xargv", address: 20000764, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 13, x_smclas: 10, containing_csect: None } } +62: Symbol { name: "p_xrcfg", address: 20000768, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 13, x_smclas: 10, containing_csect: None } } +64: Symbol { name: "p_xrc", address: 2000076c, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 13, x_smclas: 10, containing_csect: None } } +66: Symbol { name: "_malloc_user_defined_name", address: 20000748, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 13, x_smclas: 10, containing_csect: None } } +68: Symbol { name: "../../../../../../../src/bos/usr/ccs/lib/libc/__threads_init.c", address: 0, size: 0, kind: File, section: None, scope: Compilation, weak: false, flags: Xcoff { n_type: 3, n_sclass: 67, x_smtyp: 0, x_smclas: 0, containing_csect: None } } +72: Symbol { name: "", address: 100001e0, size: 160, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 29, x_smclas: 0, containing_csect: None } } +74: Symbol { name: ".__threads_init", address: 100001e0, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 20, n_sclass: 2, x_smtyp: 2, x_smclas: 0, containing_csect: Some(SymbolIndex(48)) } } +76: Symbol { name: ".__threads_init@AF2_1", address: 10000220, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_type: 20, n_sclass: 6b, x_smtyp: 2, x_smclas: 0, containing_csect: Some(SymbolIndex(48)) } } +78: Symbol { name: "_$STATIC", address: 20000620, size: 59, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 19, x_smclas: 5, containing_csect: None } } +80: Symbol { name: "__threads_init", address: 20000718, size: c, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 11, x_smclas: a, containing_csect: None } } +82: Symbol { name: "__pth_init_routine", address: 20000750, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 13, x_smclas: 10, containing_csect: None } } +84: Symbol { name: "_bsd_init_routine", address: 20000754, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 13, x_smclas: 10, containing_csect: None } } +86: Symbol { name: "_xti_tli_init_routine", address: 20000758, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 13, x_smclas: 10, containing_csect: None } } +88: Symbol { name: "_nsl_init_routine", address: 2000075c, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 13, x_smclas: 10, containing_csect: None } } +90: Symbol { name: "__dce_compat_init_routine", address: 20000760, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 13, x_smclas: 10, containing_csect: None } } +92: Symbol { name: "../../../../../../../src/bos/usr/ccs/lib/libc/POWER/crti.C", address: 0, size: 0, kind: File, section: None, scope: Compilation, weak: false, flags: Xcoff { n_type: 903, n_sclass: 67, x_smtyp: 0, x_smclas: 0, containing_csect: None } } +96: Symbol { name: "", address: 10000340, size: 178, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 19, x_smclas: 0, containing_csect: None } } +98: Symbol { name: ".__User_sinit_begin", address: 10000340, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 20, n_sclass: 2, x_smtyp: 2, x_smclas: 0, containing_csect: Some(SymbolIndex(60)) } } +100: Symbol { name: ".__C_runtime_termination", address: 10000368, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 20, n_sclass: 2, x_smtyp: 2, x_smclas: 0, containing_csect: Some(SymbolIndex(60)) } } +102: Symbol { name: ".__C_runtime_startup", address: 100003b8, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 20, n_sclass: 2, x_smtyp: 2, x_smclas: 0, containing_csect: Some(SymbolIndex(60)) } } +104: Symbol { name: ".__dftdt__L304e4b28c42_5CatchFv", address: 10000440, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_type: 20, n_sclass: 6b, x_smtyp: 2, x_smclas: 0, containing_csect: Some(SymbolIndex(60)) } } +106: Symbol { name: "_$STATIC", address: 20000680, size: 81, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 19, x_smclas: 5, containing_csect: None } } +108: Symbol { name: "__dftdt__L304e4b28c42_5CatchFv", address: 20000730, size: c, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: a, containing_csect: None } } +110: Symbol { name: "__C_runtime_termination", address: 2000073c, size: c, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 11, x_smclas: a, containing_csect: None } } +112: Symbol { name: "__C_runtime_startup", address: 20000724, size: c, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 11, x_smclas: a, containing_csect: None } } +114: Symbol { name: "_cdtors", address: 20000708, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: true, flags: Xcoff { n_type: 0, n_sclass: 6f, x_smtyp: 19, x_smclas: 5, containing_csect: None } } +116: Symbol { name: "__C_runtime_pstartup", address: 2000067c, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 11, x_smclas: 5, containing_csect: None } } +118: Symbol { name: "base.c", address: 0, size: 0, kind: File, section: None, scope: Compilation, weak: false, flags: Xcoff { n_type: 3, n_sclass: 67, x_smtyp: 0, x_smclas: 0, containing_csect: None } } +121: Symbol { name: ".text", address: 10000560, size: 5b, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 29, x_smclas: 0, containing_csect: None } } +123: Symbol { name: ".main", address: 10000560, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 2, x_smclas: 0, containing_csect: Some(SymbolIndex(79)) } } +125: Symbol { name: ".rodata.str1.1L...str", address: 100005e4, size: d, kind: Data, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: 1, containing_csect: None } } +127: Symbol { name: "glink.s", address: 0, size: 0, kind: File, section: None, scope: Compilation, weak: false, flags: Xcoff { n_type: c03, n_sclass: 67, x_smtyp: 0, x_smclas: 0, containing_csect: None } } +128: Symbol { name: ".exit", address: 10000530, size: 28, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: 6, containing_csect: None } } +130: Symbol { name: ".exit", address: 10000530, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 2, x_smclas: 6, containing_csect: Some(SymbolIndex(80)) } } +132: Symbol { name: "glink.s", address: 0, size: 0, kind: File, section: None, scope: Compilation, weak: false, flags: Xcoff { n_type: c03, n_sclass: 67, x_smtyp: 0, x_smclas: 0, containing_csect: None } } +133: Symbol { name: ".__run_final_dtors", address: 100004b8, size: 28, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: 6, containing_csect: None } } +135: Symbol { name: ".__run_final_dtors", address: 100004b8, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 2, x_smclas: 6, containing_csect: Some(SymbolIndex(85)) } } +137: Symbol { name: "glink.s", address: 0, size: 0, kind: File, section: None, scope: Compilation, weak: false, flags: Xcoff { n_type: c03, n_sclass: 67, x_smtyp: 0, x_smclas: 0, containing_csect: None } } +138: Symbol { name: ".atexit", address: 100004e0, size: 28, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: 6, containing_csect: None } } +140: Symbol { name: ".atexit", address: 100004e0, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 2, x_smclas: 6, containing_csect: Some(SymbolIndex(8a)) } } +142: Symbol { name: "glink.s", address: 0, size: 0, kind: File, section: None, scope: Compilation, weak: false, flags: Xcoff { n_type: c03, n_sclass: 67, x_smtyp: 0, x_smclas: 0, containing_csect: None } } +143: Symbol { name: ".__run_initial_ctors", address: 10000508, size: 28, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: 6, containing_csect: None } } +145: Symbol { name: ".__run_initial_ctors", address: 10000508, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 2, x_smclas: 6, containing_csect: Some(SymbolIndex(8f)) } } +147: Symbol { name: "glink.s", address: 0, size: 0, kind: File, section: None, scope: Compilation, weak: false, flags: Xcoff { n_type: c03, n_sclass: 67, x_smtyp: 0, x_smclas: 0, containing_csect: None } } +148: Symbol { name: ".printf", address: 100005bc, size: 28, kind: Text, section: Section(SectionIndex(1)), scope: Compilation, weak: false, flags: Xcoff { n_type: 0, n_sclass: 6b, x_smtyp: 11, x_smclas: 6, containing_csect: None } } +150: Symbol { name: ".printf", address: 100005bc, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: Xcoff { n_type: 0, n_sclass: 2, x_smtyp: 2, x_smclas: 6, containing_csect: Some(SymbolIndex(94)) } } .text relocations (1000012a, Relocation { kind: Got, encoding: Generic, size: 10, target: Symbol(SymbolIndex(42)), addend: 0, implicit_addend: true, flags: Xcoff { r_rtype: 3, r_rsize: f } }) diff --git a/src/common.rs b/src/common.rs index 2a5b40c..d6270ca 100644 --- a/src/common.rs +++ b/src/common.rs @@ -514,6 +514,8 @@ pub enum SegmentFlags { /// ELF segment flags. #[cfg(feature = "elf")] Elf { + /// `p_type` field in the segment header. + p_type: u32, /// `p_flags` field in the segment header. p_flags: u32, }, @@ -655,12 +657,26 @@ pub enum SymbolFlags { /// Mach-O symbol flags. #[cfg(feature = "macho")] MachO { + /// `n_type` field in the Mach-O symbol. + n_type: u8, /// `n_desc` field in the Mach-O symbol. n_desc: u16, }, - /// COFF flags for a section symbol. + /// COFF flags for a symbol. + #[cfg(feature = "coff")] + Coff { + /// `Type` field in the COFF symbol. + typ: u16, + /// `StorageClass` field in the COFF symbol. + storage_class: u8, + }, + /// COFF flags for a section symbol with an auxiliary symbol. #[cfg(feature = "coff")] CoffSection { + /// `Type` field in the COFF symbol. + typ: u16, + /// `StorageClass` field in the COFF symbol. + storage_class: u8, /// `Selection` field in the auxiliary symbol for the section. selection: u8, /// `Number` field in the auxiliary symbol for the section. @@ -669,6 +685,8 @@ pub enum SymbolFlags { /// XCOFF symbol flags. #[cfg(feature = "xcoff")] Xcoff { + /// `n_type` field in the XCOFF symbol. + n_type: u16, /// `n_sclass` field in the XCOFF symbol. n_sclass: u8, /// `x_smtyp` field in the CSECT auxiliary symbol. diff --git a/src/read/coff/symbol.rs b/src/read/coff/symbol.rs index fedff76..ca47abc 100644 --- a/src/read/coff/symbol.rs +++ b/src/read/coff/symbol.rs @@ -513,6 +513,8 @@ impl<'data, 'file, R: ReadRef<'data>, Coff: CoffHeader> ObjectSymbol<'data> u32::from(aux.number.get(LE)) }; return SymbolFlags::CoffSection { + typ: self.symbol.typ(), + storage_class: self.symbol.storage_class(), selection: aux.selection, associative_section: if number == 0 { None @@ -522,7 +524,10 @@ impl<'data, 'file, R: ReadRef<'data>, Coff: CoffHeader> ObjectSymbol<'data> }; } } - SymbolFlags::None + SymbolFlags::Coff { + typ: self.symbol.typ(), + storage_class: self.symbol.storage_class(), + } } } diff --git a/src/read/elf/segment.rs b/src/read/elf/segment.rs index 02383ad..92545fc 100644 --- a/src/read/elf/segment.rs +++ b/src/read/elf/segment.rs @@ -142,8 +142,9 @@ where #[inline] fn flags(&self) -> SegmentFlags { + let p_type = self.segment.p_type(self.file.endian); let p_flags = self.segment.p_flags(self.file.endian); - SegmentFlags::Elf { p_flags } + SegmentFlags::Elf { p_type, p_flags } } #[inline] diff --git a/src/read/macho/symbol.rs b/src/read/macho/symbol.rs index 6a576df..17be852 100644 --- a/src/read/macho/symbol.rs +++ b/src/read/macho/symbol.rs @@ -457,8 +457,9 @@ where #[inline] fn flags(&self) -> SymbolFlags { + let n_type = self.nlist.n_type(); let n_desc = self.nlist.n_desc(self.file.endian); - SymbolFlags::MachO { n_desc } + SymbolFlags::MachO { n_type, n_desc } } } diff --git a/src/read/xcoff/symbol.rs b/src/read/xcoff/symbol.rs index 4cdf0b9..ec8f3c9 100644 --- a/src/read/xcoff/symbol.rs +++ b/src/read/xcoff/symbol.rs @@ -527,6 +527,7 @@ impl<'data, 'file, Xcoff: FileHeader, R: ReadRef<'data>> ObjectSymbol<'data> } } SymbolFlags::Xcoff { + n_type: self.symbol.n_type(), n_sclass: self.symbol.n_sclass(), x_smtyp, x_smclas, diff --git a/src/write/coff/object.rs b/src/write/coff/object.rs index c0a144d..f527af7 100644 --- a/src/write/coff/object.rs +++ b/src/write/coff/object.rs @@ -132,9 +132,44 @@ impl<'a> Object<'a> { SectionFlags::Coff { characteristics } } - pub(crate) fn coff_symbol_flags(&self, _symbol: &Symbol) -> SymbolFlags { - // TODO: Need SymbolFlags::Coff for COFF-specific flags (type and storage class). - SymbolFlags::None + pub(crate) fn coff_symbol_flags(&self, symbol: &Symbol) -> SymbolFlags { + let typ = if symbol.kind == SymbolKind::Text { + coff::IMAGE_SYM_DTYPE_FUNCTION << coff::IMAGE_SYM_DTYPE_SHIFT + } else { + coff::IMAGE_SYM_TYPE_NULL + }; + let storage_class = match symbol.kind { + _ if symbol.weak => coff::IMAGE_SYM_CLASS_WEAK_EXTERNAL, + SymbolKind::File => coff::IMAGE_SYM_CLASS_FILE, + SymbolKind::Section => { + if symbol.section.id().is_some() { + coff::IMAGE_SYM_CLASS_STATIC + } else { + coff::IMAGE_SYM_CLASS_SECTION + } + } + SymbolKind::Label => coff::IMAGE_SYM_CLASS_LABEL, + SymbolKind::Text | SymbolKind::Data | SymbolKind::Tls => match symbol.section { + SymbolSection::None => { + return SymbolFlags::None; + } + SymbolSection::Undefined | SymbolSection::Common => coff::IMAGE_SYM_CLASS_EXTERNAL, + SymbolSection::Absolute | SymbolSection::Section(_) => match symbol.scope { + SymbolScope::Unknown => { + return SymbolFlags::None; + } + SymbolScope::Compilation => coff::IMAGE_SYM_CLASS_STATIC, + SymbolScope::Linkage | SymbolScope::Dynamic => coff::IMAGE_SYM_CLASS_EXTERNAL, + }, + }, + SymbolKind::Unknown => match symbol.section { + SymbolSection::Undefined => coff::IMAGE_SYM_CLASS_EXTERNAL, + _ => { + return SymbolFlags::None; + } + }, + }; + SymbolFlags::Coff { typ, storage_class } } pub(crate) fn coff_translate_relocation( @@ -669,7 +704,7 @@ impl<'a> Object<'a> { // Write symbols. for (index, symbol) in self.symbols.iter().enumerate() { - let SymbolFlags::None = symbol.flags else { + let SymbolFlags::Coff { typ, storage_class } = self.symbol_flags(symbol) else { return Err(Error(format!( "unimplemented symbol `{}` kind {:?}", symbol.name().unwrap_or(""), @@ -688,57 +723,6 @@ impl<'a> Object<'a> { SymbolSection::Common => coff::IMAGE_SYM_UNDEFINED as u16, SymbolSection::Section(id) => id.0 as u16 + 1, }; - let typ = if symbol.kind == SymbolKind::Text { - coff::IMAGE_SYM_DTYPE_FUNCTION << coff::IMAGE_SYM_DTYPE_SHIFT - } else { - coff::IMAGE_SYM_TYPE_NULL - }; - let storage_class = match symbol.kind { - _ if symbol.weak => coff::IMAGE_SYM_CLASS_WEAK_EXTERNAL, - SymbolKind::File => coff::IMAGE_SYM_CLASS_FILE, - SymbolKind::Section => { - if symbol.section.id().is_some() { - coff::IMAGE_SYM_CLASS_STATIC - } else { - coff::IMAGE_SYM_CLASS_SECTION - } - } - SymbolKind::Label => coff::IMAGE_SYM_CLASS_LABEL, - SymbolKind::Text | SymbolKind::Data | SymbolKind::Tls => match symbol.section { - SymbolSection::None => { - return Err(Error(format!( - "missing section for symbol `{}`", - symbol.name().unwrap_or("") - ))); - } - SymbolSection::Undefined | SymbolSection::Common => { - coff::IMAGE_SYM_CLASS_EXTERNAL - } - SymbolSection::Absolute | SymbolSection::Section(_) => match symbol.scope { - SymbolScope::Unknown => { - return Err(Error(format!( - "unimplemented symbol `{}` scope {:?}", - symbol.name().unwrap_or(""), - symbol.scope - ))); - } - SymbolScope::Compilation => coff::IMAGE_SYM_CLASS_STATIC, - SymbolScope::Linkage | SymbolScope::Dynamic => { - coff::IMAGE_SYM_CLASS_EXTERNAL - } - }, - }, - SymbolKind::Unknown => match symbol.section { - SymbolSection::Undefined => coff::IMAGE_SYM_CLASS_EXTERNAL, - _ => { - return Err(Error(format!( - "unimplemented symbol `{}` kind {:?}", - symbol.name().unwrap_or(""), - symbol.kind - ))) - } - }, - }; let number_of_aux_symbols = symbol_offsets[index].aux_count; let value = if symbol.weak { // weak symbols should have a value of 0 diff --git a/src/write/macho.rs b/src/write/macho.rs index fa6f1fc..1c7e3a4 100644 --- a/src/write/macho.rs +++ b/src/write/macho.rs @@ -178,16 +178,29 @@ impl<'a> Object<'a> { } pub(crate) fn macho_symbol_flags(&self, symbol: &Symbol) -> SymbolFlags { - let mut n_desc = 0; - if symbol.weak { - if symbol.is_undefined() { - n_desc |= macho::N_WEAK_REF; - } else { - n_desc |= macho::N_WEAK_DEF; + // TODO: N_STAB + let n_type = match symbol.section { + SymbolSection::Undefined => macho::N_UNDF | macho::N_EXT, + SymbolSection::Absolute => macho::N_ABS, + SymbolSection::Section(_) => macho::N_SECT, + SymbolSection::None | SymbolSection::Common => { + return SymbolFlags::None; } - } - // TODO: include n_type - SymbolFlags::MachO { n_desc } + } | match symbol.scope { + SymbolScope::Unknown | SymbolScope::Compilation => 0, + SymbolScope::Linkage => macho::N_EXT | macho::N_PEXT, + SymbolScope::Dynamic => macho::N_EXT, + }; + let n_desc = if symbol.weak { + if symbol.is_undefined() { + macho::N_WEAK_REF + } else { + macho::N_WEAK_DEF + } + } else { + 0 + }; + SymbolFlags::MachO { n_type, n_desc } } fn macho_tlv_bootstrap(&mut self) -> SymbolId { @@ -887,30 +900,7 @@ impl<'a> Object<'a> { .chain(undefined_symbols.iter().copied()) { let symbol = &self.symbols[index]; - // TODO: N_STAB - let (mut n_type, n_sect) = match symbol.section { - SymbolSection::Undefined => (macho::N_UNDF | macho::N_EXT, 0), - SymbolSection::Absolute => (macho::N_ABS, 0), - SymbolSection::Section(id) => (macho::N_SECT, id.0 + 1), - SymbolSection::None | SymbolSection::Common => { - return Err(Error(format!( - "unimplemented symbol `{}` section {:?}", - symbol.name().unwrap_or(""), - symbol.section - ))); - } - }; - match symbol.scope { - SymbolScope::Unknown | SymbolScope::Compilation => {} - SymbolScope::Linkage => { - n_type |= macho::N_EXT | macho::N_PEXT; - } - SymbolScope::Dynamic => { - n_type |= macho::N_EXT; - } - } - - let SymbolFlags::MachO { n_desc } = self.symbol_flags(symbol) else { + let SymbolFlags::MachO { n_type, n_desc } = self.symbol_flags(symbol) else { return Err(Error(format!( "unimplemented symbol `{}` kind {:?}", symbol.name().unwrap_or(""), @@ -918,6 +908,11 @@ impl<'a> Object<'a> { ))); }; + let n_sect = match symbol.section { + SymbolSection::Section(id) => id.0 + 1, + _ => 0, + }; + let n_value = match symbol.section.id() { Some(section) => section_offsets[section.0].address + symbol.value, None => symbol.value, diff --git a/src/write/xcoff.rs b/src/write/xcoff.rs index 5353edb..fe3811e 100644 --- a/src/write/xcoff.rs +++ b/src/write/xcoff.rs @@ -18,7 +18,8 @@ struct SymbolOffsets { index: usize, str_id: Option, aux_count: u8, - storage_class: u8, + n_type: u16, + n_sclass: u8, x_smtyp: u8, x_smclas: u8, containing_csect: Option, @@ -113,6 +114,15 @@ impl<'a> Object<'a> { return SymbolFlags::None; } }; + let n_type = if (symbol.scope == SymbolScope::Linkage) + && (n_sclass == xcoff::C_EXT + || n_sclass == xcoff::C_WEAKEXT + || n_sclass == xcoff::C_HIDEXT) + { + xcoff::SYM_V_HIDDEN + } else { + 0 + }; let (x_smtyp, x_smclas) = if n_sclass == xcoff::C_EXT || n_sclass == xcoff::C_WEAKEXT || n_sclass == xcoff::C_HIDEXT @@ -148,6 +158,7 @@ impl<'a> Object<'a> { (0, 0) }; SymbolFlags::Xcoff { + n_type, n_sclass, x_smtyp, x_smclas, @@ -286,6 +297,7 @@ impl<'a> Object<'a> { symtab_count += 1; let SymbolFlags::Xcoff { + n_type, n_sclass, x_smtyp, x_smclas, @@ -298,7 +310,8 @@ impl<'a> Object<'a> { symbol.kind ))); }; - symbol_offsets[index].storage_class = n_sclass; + symbol_offsets[index].n_type = n_type; + symbol_offsets[index].n_sclass = n_sclass; symbol_offsets[index].x_smtyp = x_smtyp; symbol_offsets[index].x_smclas = x_smclas; symbol_offsets[index].containing_csect = containing_csect; @@ -491,16 +504,8 @@ impl<'a> Object<'a> { SymbolSection::Absolute => xcoff::N_ABS, SymbolSection::Section(id) => id.0 as i16 + 1, }; - let n_sclass = symbol_offsets[index].storage_class; - let n_type = if (symbol.scope == SymbolScope::Linkage) - && (n_sclass == xcoff::C_EXT - || n_sclass == xcoff::C_WEAKEXT - || n_sclass == xcoff::C_HIDEXT) - { - xcoff::SYM_V_HIDDEN - } else { - 0 - }; + let n_type = symbol_offsets[index].n_type; + let n_sclass = symbol_offsets[index].n_sclass; let n_numaux = symbol_offsets[index].aux_count; if is_64 { let str_id = if n_sclass == xcoff::C_FILE { diff --git a/tests/round_trip/comdat.rs b/tests/round_trip/comdat.rs index 88a2e79..f60926e 100644 --- a/tests/round_trip/comdat.rs +++ b/tests/round_trip/comdat.rs @@ -76,6 +76,8 @@ fn coff_x86_64_comdat() { assert_eq!( symbol.flags(), SymbolFlags::CoffSection { + typ: 0, + storage_class: pe::IMAGE_SYM_CLASS_STATIC, selection: pe::IMAGE_COMDAT_SELECT_NODUPLICATES, associative_section: None } @@ -92,6 +94,8 @@ fn coff_x86_64_comdat() { assert_eq!( symbol.flags(), SymbolFlags::CoffSection { + typ: 0, + storage_class: pe::IMAGE_SYM_CLASS_STATIC, selection: pe::IMAGE_COMDAT_SELECT_ASSOCIATIVE, associative_section: Some(section1_index) }