From 1343c1be4ef8956057848c9c03155175f431a05b Mon Sep 17 00:00:00 2001 From: Philip Craig Date: Mon, 4 Dec 2023 15:21:22 +1000 Subject: [PATCH] read/xcoff: set C_HIDEXT symbol scope to Compilation (#605) The documentation says that C_HIDEXT specifies an internal symbol. --- .../examples/testfiles/xcoff/base.o.objdump | 8 +-- .../testfiles/xcoff/base.xcoff.objdump | 64 +++++++++---------- .../examples/testfiles/xcoff/base32.o.objdump | 8 +-- .../testfiles/xcoff/base32.xcoff.objdump | 62 +++++++++--------- src/read/xcoff/symbol.rs | 2 +- 5 files changed, 72 insertions(+), 72 deletions(-) diff --git a/crates/examples/testfiles/xcoff/base.o.objdump b/crates/examples/testfiles/xcoff/base.o.objdump index b05e1b70..b3ac199d 100644 --- a/crates/examples/testfiles/xcoff/base.o.objdump +++ b/crates/examples/testfiles/xcoff/base.o.objdump @@ -11,12 +11,12 @@ 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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 29, x_smclas: 0, 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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 1, containing_csect: None } } +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: Dynamic, 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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 19, x_smclas: 3, containing_csect: None } } +15: Symbol { name: "TOC", address: 80, size: 0, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 19, x_smclas: f, containing_csect: None } } +17: Symbol { name: ".rodata.str1.1L...str", address: 80, size: 8, kind: Data, section: Section(SectionIndex(2)), scope: Compilation, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 19, x_smclas: 3, containing_csect: None } } .text relocations (1e, Relocation { kind: Got, encoding: Generic, size: 10, target: Symbol(SymbolIndex(11)), addend: 0, implicit_addend: true }) diff --git a/crates/examples/testfiles/xcoff/base.xcoff.objdump b/crates/examples/testfiles/xcoff/base.xcoff.objdump index 94a7cb5a..39fc4398 100644 --- a/crates/examples/testfiles/xcoff/base.xcoff.objdump +++ b/crates/examples/testfiles/xcoff/base.xcoff.objdump @@ -20,38 +20,38 @@ Symbols 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: Dynamic, 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: Dynamic, 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: Dynamic, 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: Dynamic, 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: Dynamic, 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: Dynamic, 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: Dynamic, 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: Dynamic, 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: Dynamic, 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: Dynamic, 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: Dynamic, 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: Dynamic, 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: Dynamic, 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: Dynamic, 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: Dynamic, 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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 19, x_smclas: 3, 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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, 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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 5, 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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 29, 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: Dynamic, 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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 19, x_smclas: 5, containing_csect: None } } +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 } } @@ -59,35 +59,35 @@ Symbols 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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 19, 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: Dynamic, 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: Dynamic, 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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 19, x_smclas: a, containing_csect: None } } +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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 29, 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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 1, containing_csect: None } } +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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 6, 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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 6, 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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 6, 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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 6, 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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 6, 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)) } } .text relocations diff --git a/crates/examples/testfiles/xcoff/base32.o.objdump b/crates/examples/testfiles/xcoff/base32.o.objdump index ea34c349..3c37890c 100644 --- a/crates/examples/testfiles/xcoff/base32.o.objdump +++ b/crates/examples/testfiles/xcoff/base32.o.objdump @@ -11,12 +11,12 @@ 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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 29, x_smclas: 0, 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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 1, containing_csect: None } } +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: Dynamic, 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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 3, 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 } } .text relocations (22, Relocation { kind: Got, encoding: Generic, size: 10, target: Symbol(SymbolIndex(11)), addend: 0, implicit_addend: true }) diff --git a/crates/examples/testfiles/xcoff/base32.xcoff.objdump b/crates/examples/testfiles/xcoff/base32.xcoff.objdump index b96579b3..6447003b 100644 --- a/crates/examples/testfiles/xcoff/base32.xcoff.objdump +++ b/crates/examples/testfiles/xcoff/base32.xcoff.objdump @@ -19,37 +19,37 @@ Symbols 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: Dynamic, 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: Dynamic, 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: Dynamic, 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: Dynamic, 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: Dynamic, 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: Dynamic, 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: Dynamic, 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: Dynamic, 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: Dynamic, 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: Dynamic, 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: Dynamic, 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: Dynamic, 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: Dynamic, 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: Dynamic, 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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 3, 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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, 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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 5, 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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 29, 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: Dynamic, 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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 19, x_smclas: 5, containing_csect: None } } +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 } } @@ -57,35 +57,35 @@ Symbols 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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 19, 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: Dynamic, 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: Dynamic, 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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: a, containing_csect: None } } +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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 29, 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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 1, containing_csect: None } } +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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 6, 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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 6, 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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 6, 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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 6, 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: Dynamic, weak: false, flags: Xcoff { n_sclass: 6b, x_smtyp: 11, x_smclas: 6, 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)) } } .text relocations diff --git a/src/read/xcoff/symbol.rs b/src/read/xcoff/symbol.rs index 7ce215fa..fd9558dc 100644 --- a/src/read/xcoff/symbol.rs +++ b/src/read/xcoff/symbol.rs @@ -399,7 +399,7 @@ impl<'data, 'file, Xcoff: FileHeader, R: ReadRef<'data>> ObjectSymbol<'data> SymbolScope::Unknown } else { match self.symbol.n_sclass() { - xcoff::C_EXT | xcoff::C_WEAKEXT | xcoff::C_HIDEXT => { + xcoff::C_EXT | xcoff::C_WEAKEXT => { let visibility = self.symbol.n_type() & xcoff::SYM_V_MASK; if visibility == xcoff::SYM_V_HIDDEN { SymbolScope::Linkage