Skip to content

Commit

Permalink
read/xcoff: support the auxiliary header (#476)
Browse files Browse the repository at this point in the history
  • Loading branch information
EsmeYi authored Oct 25, 2022
1 parent 5514d1b commit e04e85d
Show file tree
Hide file tree
Showing 6 changed files with 339 additions and 91 deletions.
6 changes: 3 additions & 3 deletions crates/examples/testfiles/xcoff/base.xcoff.objdump
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Kind: Executable
Architecture: PowerPc64
Flags: Xcoff { f_flags: 1002 }
Relative Address Base: 0
Entry Address: 0
0: Section { name: ".text", address: 1000001f8, size: 4d5, align: 4, kind: Text, flags: Xcoff { s_flags: 20 } }
1: Section { name: ".data", address: 1100006cd, size: 2ab, align: 4, kind: Data, flags: Xcoff { s_flags: 40 } }
Entry Address: 110000848
0: Section { name: ".text", address: 1000001f8, size: 4d5, align: 5, kind: Text, flags: Xcoff { s_flags: 20 } }
1: Section { name: ".data", address: 1100006cd, size: 2ab, align: 3, kind: Data, flags: Xcoff { s_flags: 40 } }
2: Section { name: ".bss", address: 110000978, size: 0, align: 4, kind: UninitializedData, flags: Xcoff { s_flags: 80 } }
3: Section { name: ".loader", address: 0, size: 485, align: 4, kind: Metadata, flags: Xcoff { s_flags: 1000 } }

Expand Down
16 changes: 8 additions & 8 deletions crates/examples/testfiles/xcoff/base32.o.objdump
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ Architecture: PowerPc
Flags: Xcoff { f_flags: 0 }
Relative Address Base: 0
Entry Address: 0
0: Section { name: ".text", address: 0, size: 6c, align: 4, kind: Unknown, flags: Xcoff { s_flags: 0 } }
1: Section { name: ".data", address: 6c, size: 10, align: 4, kind: Unknown, flags: Xcoff { s_flags: 0 } }
0: Section { name: ".text", address: 0, size: 6c, align: 4, kind: Text, flags: Xcoff { s_flags: 20 } }
1: Section { name: ".data", address: 6c, size: 10, align: 4, kind: Data, flags: Xcoff { s_flags: 40 } }

Symbols
0: Symbol { name: ".file", address: 0, size: 0, kind: File, section: None, scope: Compilation, weak: false, flags: None }
3: Symbol { name: ".printf", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: None }
5: Symbol { name: "printf", address: 0, size: 0, kind: Unknown, section: Undefined, scope: Unknown, weak: false, flags: None }
7: Symbol { name: ".text", address: 0, size: 0, kind: Unknown, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: None }
9: Symbol { name: ".main", address: 0, size: 0, kind: Unknown, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: None }
11: Symbol { name: ".rodata.str1.1L...str", address: 5c, size: 0, kind: Unknown, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: None }
13: Symbol { name: "main", address: 6c, size: 0, kind: Unknown, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: None }
15: Symbol { name: "TOC", address: 78, size: 0, kind: Unknown, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: None }
17: Symbol { name: ".rodata.str1.1L...str", address: 78, size: 0, kind: Unknown, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: None }
7: Symbol { name: ".text", address: 0, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: None }
9: Symbol { name: ".main", address: 0, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: None }
11: Symbol { name: ".rodata.str1.1L...str", address: 5c, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: None }
13: Symbol { name: "main", address: 6c, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: None }
15: Symbol { name: "TOC", address: 78, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: None }
17: Symbol { name: ".rodata.str1.1L...str", address: 78, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: None }

Dynamic symbols
Loading

0 comments on commit e04e85d

Please sign in to comment.