Skip to content

Commit

Permalink
read/xcoff: support auxiliary symbol entries (AuxFile and AuxCsect). (g…
Browse files Browse the repository at this point in the history
  • Loading branch information
EsmeYi authored Nov 16, 2022
1 parent e4e5ae3 commit f691ba1
Show file tree
Hide file tree
Showing 7 changed files with 564 additions and 122 deletions.
8 changes: 4 additions & 4 deletions crates/examples/testfiles/xcoff/base.o.objdump
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ 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: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: None }
7: Symbol { name: ".text", address: 0, size: 57, 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: 58, size: 0, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: None }
13: Symbol { name: "main", address: 68, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: None }
11: Symbol { name: ".rodata.str1.1L...str", address: 58, size: d, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: None }
13: Symbol { name: "main", address: 68, size: 18, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: None }
15: Symbol { name: "TOC", address: 80, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: None }
17: Symbol { name: ".rodata.str1.1L...str", address: 80, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: None }
17: Symbol { name: ".rodata.str1.1L...str", address: 80, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: None }

.text relocations
(1e, Relocation { kind: Got, encoding: Generic, size: 0, target: Symbol(SymbolIndex(11)), addend: 0, implicit_addend: true })
Expand Down
90 changes: 45 additions & 45 deletions crates/examples/testfiles/xcoff/base.xcoff.objdump

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions crates/examples/testfiles/xcoff/base32.o.objdump
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ 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: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: None }
7: Symbol { name: ".text", address: 0, size: 5b, 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 }
11: Symbol { name: ".rodata.str1.1L...str", address: 5c, size: d, kind: Text, section: Section(SectionIndex(1)), scope: Dynamic, weak: false, flags: None }
13: Symbol { name: "main", address: 6c, size: c, 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 }
17: Symbol { name: ".rodata.str1.1L...str", address: 78, size: 4, kind: Data, section: Section(SectionIndex(2)), scope: Dynamic, weak: false, flags: None }

.text relocations
(22, Relocation { kind: Got, encoding: Generic, size: 0, target: Symbol(SymbolIndex(11)), addend: 0, implicit_addend: true })
Expand Down
Loading

0 comments on commit f691ba1

Please sign in to comment.