#endif
}
+#ifdef RS6000COFF_C
+ /* XCOFF 32bit needs this to have new behaviour for n_type field. */
+ internal_a.vstamp = 2;
+#else
/* FIXME: Does anybody ever set this to another value? */
internal_a.vstamp = 0;
+#endif
/* Now should write relocs, strings, syms. */
obj_sym_filepos (abfd) = sym_base;
bfd_vma toc;
asection *loader_sec;
- internal_a.vstamp = 1;
+ internal_a.vstamp = 2;
internal_a.o_snentry = xcoff_data (abfd)->snentry;
if (internal_a.o_snentry == 0)
- (bfd_hostptr_t) root)
/ sizeof (combined_entry_type));
- fprintf (file, "(sec %2d)(fl 0x%02x)(ty %3x)(scl %3d) (nx %d) 0x",
+ fprintf (file, "(sec %2d)(fl 0x%02x)(ty %4x)(scl %3d) (nx %d) 0x",
combined->u.syment.n_scnum,
combined->u.syment.n_flags,
combined->u.syment.n_type,
static void ppc_file (int);
static void ppc_function (int);
static void ppc_extern (int);
+static void ppc_globl (int);
static void ppc_lglobl (int);
static void ppc_ref (int);
static void ppc_section (int);
static void ppc_toc (int);
static void ppc_xcoff_cons (int);
static void ppc_vbyte (int);
+static void ppc_weak (int);
#endif
#ifdef OBJ_ELF
{ "extern", ppc_extern, 0 },
{ "file", ppc_file, 0 },
{ "function", ppc_function, 0 },
+ { "globl", ppc_globl, 0 },
{ "lglobl", ppc_lglobl, 0 },
{ "ref", ppc_ref, 0 },
{ "rename", ppc_rename, 0 },
{ "word", ppc_xcoff_cons, 1 },
{ "short", ppc_xcoff_cons, 1 },
{ "vbyte", ppc_vbyte, 0 },
+ { "weak", ppc_weak, 0 },
#endif
#ifdef OBJ_ELF
to handle symbol suffixes for such symbols. */
static bool ppc_stab_symbol;
+/* Retrieve the visiblity input for pseudo-ops having ones. */
+static unsigned short
+ppc_xcoff_get_visibility (void) {
+ SKIP_WHITESPACE();
+
+ if (startswith (input_line_pointer, "exported"))
+ {
+ input_line_pointer += 8;
+ return SYM_V_EXPORTED;
+ }
+
+ if (startswith (input_line_pointer, "hidden"))
+ {
+ input_line_pointer += 6;
+ return SYM_V_HIDDEN;
+ }
+
+ if (startswith (input_line_pointer, "internal"))
+ {
+ input_line_pointer += 8;
+ return SYM_V_INTERNAL;
+ }
+
+ if (startswith (input_line_pointer, "protected"))
+ {
+ input_line_pointer += 9;
+ return SYM_V_PROTECTED;
+ }
+
+ return 0;
+}
+
+
/* The .comm and .lcomm pseudo-ops for XCOFF. XCOFF puts common
symbols in the .bss segment as though they were local common
symbols, and uses a different smclas. The native Aix 4.3.3 assembler
symbolS *lcomm_sym = NULL;
symbolS *sym;
char *pfrag;
+ unsigned short visibility;
struct ppc_xcoff_section *section;
endc = get_symbol_name (&name);
as_warn (_("ignoring bad alignment"));
align = 2;
}
+
+ /* The fourth argument to .comm is the visibility. */
+ if (*input_line_pointer == ',')
+ {
+ input_line_pointer++;
+ visibility = ppc_xcoff_get_visibility ();
+ if (!visibility)
+ {
+ as_bad (_("Unknown visibility field in .comm"));
+ ignore_rest_of_line ();
+ return;
+ }
+ }
}
}
else
symbol_get_frag (lcomm_sym)->fr_offset += size;
}
+ if (!lcomm && visibility)
+ {
+ /* Add visibility to .comm symbol. */
+ coff_symbol_type *coffsym = coffsymbol (symbol_get_bfdsym (sym));
+ coffsym->native->u.syment.n_type &= ~SYM_V_MASK;
+ coffsym->native->u.syment.n_type |= visibility;
+ }
+
subseg_set (current_seg, current_subseg);
demand_empty_rest_of_line ();
ppc_extern (int ignore ATTRIBUTE_UNUSED)
{
char *name;
- char endc;
+ symbolS *sym;
- endc = get_symbol_name (&name);
+ if ((name = read_symbol_name ()) == NULL)
+ return;
- (void) symbol_find_or_make (name);
+ sym = symbol_find_or_make (name);
- (void) restore_line_pointer (endc);
+ if (*input_line_pointer == ',')
+ {
+ unsigned short visibility;
+ coff_symbol_type *coffsym = coffsymbol (symbol_get_bfdsym (sym));
+
+ input_line_pointer++;
+ visibility = ppc_xcoff_get_visibility ();
+ if (!visibility)
+ {
+ as_bad (_("Unknown visibility field in .extern"));
+ ignore_rest_of_line ();
+ return;
+ }
+
+ coffsym->native->u.syment.n_type &= ~SYM_V_MASK;
+ coffsym->native->u.syment.n_type |= visibility;
+ }
+
+ demand_empty_rest_of_line ();
+}
+
+/* XCOFF semantic for .globl says that the second parameter is
+ the symbol visibility. */
+
+static void
+ppc_globl (int ignore ATTRIBUTE_UNUSED)
+{
+ char *name;
+ symbolS *sym;
+
+ if ((name = read_symbol_name ()) == NULL)
+ return;
+
+ sym = symbol_find_or_make (name);
+ S_SET_EXTERNAL (sym);
+
+ if (*input_line_pointer == ',')
+ {
+ unsigned short visibility;
+ coff_symbol_type *coffsym = coffsymbol (symbol_get_bfdsym (sym));
+
+ input_line_pointer++;
+ visibility = ppc_xcoff_get_visibility ();
+ if (!visibility)
+ {
+ as_bad (_("Unknown visibility field in .globl"));
+ ignore_rest_of_line ();
+ return;
+ }
+
+ coffsym->native->u.syment.n_type &= ~SYM_V_MASK;
+ coffsym->native->u.syment.n_type |= visibility;
+ }
+
+ demand_empty_rest_of_line ();
+}
+
+/* XCOFF semantic for .weak says that the second parameter is
+ the symbol visibility. */
+
+static void
+ppc_weak (int ignore ATTRIBUTE_UNUSED)
+{
+ char *name;
+ symbolS *sym;
+
+ if ((name = read_symbol_name ()) == NULL)
+ return;
+
+ sym = symbol_find_or_make (name);
+ S_SET_WEAK (sym);
+
+ if (*input_line_pointer == ',')
+ {
+ unsigned short visibility;
+ coff_symbol_type *coffsym = coffsymbol (symbol_get_bfdsym (sym));
+
+ input_line_pointer++;
+ visibility = ppc_xcoff_get_visibility ();
+ if (!visibility)
+ {
+ as_bad (_("Unknown visibility field in .weak"));
+ ignore_rest_of_line ();
+ return;
+ }
+
+ coffsym->native->u.syment.n_type &= ~SYM_V_MASK;
+ coffsym->native->u.syment.n_type |= visibility;
+ }
demand_empty_rest_of_line ();
}
.*: file format .*
SYMBOL TABLE:
-\[ 0\]\(sec -2\)\(fl 0x00\)\(ty 0\)\(scl 103\) \(nx 1\) 0x0+0000 foo.c
+\[ 0\]\(sec -2\)\(fl 0x00\)\(ty 0\)\(scl 103\) \(nx 1\) 0x0+0000 foo.c
File
-\[ 2\]\(sec 1\)\(fl 0x00\)\(ty 0\)\(scl 6\) \(nx 0\) 0x0+0000 gcc2_compiled.
-\[ 3\]\(sec 1\)\(fl 0x00\)\(ty 0\)\(scl 6\) \(nx 0\) 0x0+0000 ___gnu_compiled_c
-\[ 4\]\(sec -2\)\(fl 0x00\)\(ty a\)\(scl 15\) \(nx 1\) 0x0+0000 _token
+\[ 2\]\(sec 1\)\(fl 0x00\)\(ty 0\)\(scl 6\) \(nx 0\) 0x0+0000 gcc2_compiled.
+\[ 3\]\(sec 1\)\(fl 0x00\)\(ty 0\)\(scl 6\) \(nx 0\) 0x0+0000 ___gnu_compiled_c
+\[ 4\]\(sec -2\)\(fl 0x00\)\(ty a\)\(scl 15\) \(nx 1\) 0x0+0000 _token
AUX lnno 0 size 0x4 tagndx 0 endndx 10
-\[ 6\]\(sec -(1|2)\)\(fl 0x00\)\(ty b\)\(scl 16\) \(nx 0\) 0x0+0000 _operator
-\[ 7\]\(sec -(1|2)\)\(fl 0x00\)\(ty b\)\(scl 16\) \(nx 0\) 0x0+0001 _flags
-\[ 8\]\(sec -(1|2)\)\(fl 0x00\)\(ty 0\)\(scl 102\) \(nx 1\) 0x0+0004 .eos
+\[ 6\]\(sec -(1|2)\)\(fl 0x00\)\(ty b\)\(scl 16\) \(nx 0\) 0x0+0000 _operator
+\[ 7\]\(sec -(1|2)\)\(fl 0x00\)\(ty b\)\(scl 16\) \(nx 0\) 0x0+0001 _flags
+\[ 8\]\(sec -(1|2)\)\(fl 0x00\)\(ty 0\)\(scl 102\) \(nx 1\) 0x0+0004 .eos
AUX lnno 0 size 0x4 tagndx 4
-\[ 10\]\(sec 1\)\(fl 0x00\)\(ty 0\)\(scl 3\) \(nx 1\) 0x[0-9a-f]+ .text
+\[ 10\]\(sec 1\)\(fl 0x00\)\(ty 0\)\(scl 3\) \(nx 1\) 0x[0-9a-f]+ .text
AUX scnlen 0x[0-9a-f]+ nreloc 0 nlnno 0
-\[ 12\]\(sec 2\)\(fl 0x00\)\(ty 0\)\(scl 3\) \(nx 1\) 0x[0-9a-f]+ .data
+\[ 12\]\(sec 2\)\(fl 0x00\)\(ty 0\)\(scl 3\) \(nx 1\) 0x[0-9a-f]+ .data
AUX scnlen 0x[0-9a-f]+ nreloc 0 nlnno 0
-\[ 14\]\(sec 3\)\(fl 0x00\)\(ty 0\)\(scl 3\) \(nx 1\) 0x[0-9a-f]+ .bss
+\[ 14\]\(sec 3\)\(fl 0x00\)\(ty 0\)\(scl 3\) \(nx 1\) 0x[0-9a-f]+ .bss
AUX scnlen 0x[0-9a-f]+ nreloc 0 nlnno 0
-\[ 16\]\(sec 2\)\(fl 0x00\)\(ty 2\)\(scl 2\) \(nx 0\) 0x0+0000 _token
-\[ 17\]\(sec 2\)\(fl 0x00\)\(ty a\)\(scl 2\) \(nx 1\) 0x[0-9a-f]+ _what
+\[ 16\]\(sec 2\)\(fl 0x00\)\(ty 2\)\(scl 2\) \(nx 0\) 0x0+0000 _token
+\[ 17\]\(sec 2\)\(fl 0x00\)\(ty a\)\(scl 2\) \(nx 1\) 0x[0-9a-f]+ _what
AUX lnno 0 size 0x4 tagndx 4
run_dump_test "xcoff-file-32"
run_dump_test "xcoff-file-64"
+
+ run_dump_test "xcoff-visibility-1-32"
+ run_dump_test "xcoff-visibility-1-64"
}
2 \.bss +00000000 0+0090 0+0090 00000000 2\*\*3
+ALLOC
SYMBOL TABLE:
-\[ 0\]\(sec -2\)\(fl 0x00\)\(ty 0\)\(scl 103\) \(nx 1\) 0x00000000 fake
+\[ 0\]\(sec -2\)\(fl 0x00\)\(ty 0\)\(scl 103\) \(nx 1\) 0x00000000 fake
File
-\[ 2\]\(sec 1\)\(fl 0x00\)\(ty 0\)\(scl 107\) \(nx 1\) 0x00000000 \.crazy_table
+\[ 2\]\(sec 1\)\(fl 0x00\)\(ty 0\)\(scl 107\) \(nx 1\) 0x00000000 \.crazy_table
AUX val 8 prmhsh 0 snhsh 0 typ 1 algn 2 clss 1 stb 0 snstb 0
-\[ 4\]\(sec 1\)\(fl 0x00\)\(ty 0\)\(scl 107\) \(nx 1\) 0x00000008
+\[ 4\]\(sec 1\)\(fl 0x00\)\(ty 0\)\(scl 107\) \(nx 1\) 0x00000008
AUX val 96 prmhsh 0 snhsh 0 typ 1 algn 2 clss 0 stb 0 snstb 0
-\[ 6\]\(sec 1\)\(fl 0x00\)\(ty 0\)\(scl 107\) \(nx 1\) 0x00000008 reference_csect_relative_symbols
+\[ 6\]\(sec 1\)\(fl 0x00\)\(ty 0\)\(scl 107\) \(nx 1\) 0x00000008 reference_csect_relative_symbols
AUX indx 4 prmhsh 0 snhsh 0 typ 2 algn 0 clss 0 stb 0 snstb 0
-\[ 8\]\(sec 1\)\(fl 0x00\)\(ty 0\)\(scl 107\) \(nx 1\) 0x00000018 dubious_references_to_default_RW_csect
+\[ 8\]\(sec 1\)\(fl 0x00\)\(ty 0\)\(scl 107\) \(nx 1\) 0x00000018 dubious_references_to_default_RW_csect
AUX indx 4 prmhsh 0 snhsh 0 typ 2 algn 0 clss 0 stb 0 snstb 0
-\[ 10\]\(sec 1\)\(fl 0x00\)\(ty 0\)\(scl 107\) \(nx 1\) 0x00000028 reference_via_toc
+\[ 10\]\(sec 1\)\(fl 0x00\)\(ty 0\)\(scl 107\) \(nx 1\) 0x00000028 reference_via_toc
AUX indx 4 prmhsh 0 snhsh 0 typ 2 algn 0 clss 0 stb 0 snstb 0
-\[ 12\]\(sec 1\)\(fl 0x00\)\(ty 0\)\(scl 107\) \(nx 1\) 0x00000040 subtract_symbols
+\[ 12\]\(sec 1\)\(fl 0x00\)\(ty 0\)\(scl 107\) \(nx 1\) 0x00000040 subtract_symbols
AUX indx 4 prmhsh 0 snhsh 0 typ 2 algn 0 clss 0 stb 0 snstb 0
-\[ 14\]\(sec 1\)\(fl 0x00\)\(ty 0\)\(scl 107\) \(nx 1\) 0x0000005c load_addresses
+\[ 14\]\(sec 1\)\(fl 0x00\)\(ty 0\)\(scl 107\) \(nx 1\) 0x0000005c load_addresses
AUX indx 4 prmhsh 0 snhsh 0 typ 2 algn 0 clss 0 stb 0 snstb 0
-\[ 16\]\(sec 2\)\(fl 0x00\)\(ty 0\)\(scl 107\) \(nx 1\) 0x00000068
+\[ 16\]\(sec 2\)\(fl 0x00\)\(ty 0\)\(scl 107\) \(nx 1\) 0x00000068
AUX val 12 prmhsh 0 snhsh 0 typ 1 algn 2 clss 5 stb 0 snstb 0
-\[ 18\]\(sec 2\)\(fl 0x00\)\(ty 0\)\(scl 107\) \(nx 1\) 0x00000074 TOC
+\[ 18\]\(sec 2\)\(fl 0x00\)\(ty 0\)\(scl 107\) \(nx 1\) 0x00000074 TOC
AUX val 0 prmhsh 0 snhsh 0 typ 1 algn 2 clss 15 stb 0 snstb 0
-\[ 20\]\(sec 2\)\(fl 0x00\)\(ty 0\)\(scl 107\) \(nx 1\) 0x00000074 ignored0
+\[ 20\]\(sec 2\)\(fl 0x00\)\(ty 0\)\(scl 107\) \(nx 1\) 0x00000074 ignored0
AUX val 4 prmhsh 0 snhsh 0 typ 1 algn 2 clss 3 stb 0 snstb 0
-\[ 22\]\(sec 2\)\(fl 0x00\)\(ty 0\)\(scl 107\) \(nx 1\) 0x00000078 ignored1
+\[ 22\]\(sec 2\)\(fl 0x00\)\(ty 0\)\(scl 107\) \(nx 1\) 0x00000078 ignored1
AUX val 4 prmhsh 0 snhsh 0 typ 1 algn 2 clss 3 stb 0 snstb 0
-\[ 24\]\(sec 2\)\(fl 0x00\)\(ty 0\)\(scl 107\) \(nx 1\) 0x0000007c ignored2
+\[ 24\]\(sec 2\)\(fl 0x00\)\(ty 0\)\(scl 107\) \(nx 1\) 0x0000007c ignored2
AUX val 4 prmhsh 0 snhsh 0 typ 1 algn 2 clss 3 stb 0 snstb 0
-\[ 26\]\(sec 2\)\(fl 0x00\)\(ty 0\)\(scl 107\) \(nx 1\) 0x00000080 ignored3
+\[ 26\]\(sec 2\)\(fl 0x00\)\(ty 0\)\(scl 107\) \(nx 1\) 0x00000080 ignored3
AUX val 4 prmhsh 0 snhsh 0 typ 1 algn 2 clss 3 stb 0 snstb 0
-\[ 28\]\(sec 2\)\(fl 0x00\)\(ty 0\)\(scl 107\) \(nx 1\) 0x00000084 ignored4
+\[ 28\]\(sec 2\)\(fl 0x00\)\(ty 0\)\(scl 107\) \(nx 1\) 0x00000084 ignored4
AUX val 4 prmhsh 0 snhsh 0 typ 1 algn 2 clss 3 stb 0 snstb 0
-\[ 30\]\(sec 2\)\(fl 0x00\)\(ty 0\)\(scl 107\) \(nx 1\) 0x00000088 ignored5
+\[ 30\]\(sec 2\)\(fl 0x00\)\(ty 0\)\(scl 107\) \(nx 1\) 0x00000088 ignored5
AUX val 4 prmhsh 0 snhsh 0 typ 1 algn 2 clss 3 stb 0 snstb 0
-\[ 32\]\(sec 2\)\(fl 0x00\)\(ty 0\)\(scl 107\) \(nx 1\) 0x0000008c ignored6
+\[ 32\]\(sec 2\)\(fl 0x00\)\(ty 0\)\(scl 107\) \(nx 1\) 0x0000008c ignored6
AUX val 4 prmhsh 0 snhsh 0 typ 1 algn 2 clss 3 stb 0 snstb 0
-\[ 34\]\(sec 0\)\(fl 0x00\)\(ty 0\)\(scl 2\) \(nx 1\) 0x00000000 esym0
+\[ 34\]\(sec 0\)\(fl 0x00\)\(ty 0\)\(scl 2\) \(nx 1\) 0x00000000 esym0
AUX val 0 prmhsh 0 snhsh 0 typ 0 algn 0 clss 0 stb 0 snstb 0
-\[ 36\]\(sec 0\)\(fl 0x00\)\(ty 0\)\(scl 2\) \(nx 1\) 0x00000000 esym1
+\[ 36\]\(sec 0\)\(fl 0x00\)\(ty 0\)\(scl 2\) \(nx 1\) 0x00000000 esym1
AUX val 0 prmhsh 0 snhsh 0 typ 0 algn 0 clss 0 stb 0 snstb 0
-\[ 38\]\(sec 1\)\(fl 0x00\)\(ty 0\)\(scl 3\) \(nx 1\) 0x00000000 \.text
+\[ 38\]\(sec 1\)\(fl 0x00\)\(ty 0\)\(scl 3\) \(nx 1\) 0x00000000 \.text
AUX scnlen 0x68 nreloc 7 nlnno 0
--- /dev/null
+#as: -a32
+#source: xcoff-visibility-1.s
+#objdump: -t
+#name: XCOFF Visibility 1 (32 bit)
+
+.*
+
+SYMBOL TABLE:
+.*
+.*
+.*
+.*
+\[ 4\].*\(ty 0\).*l_novisibility
+.*
+\[ 6\].*\(ty 1000\).*l_internal
+.*
+\[ 8\].*\(ty 2000\).*l_hidden
+.*
+\[ 10\].*\(ty 3000\).*l_protected
+.*
+\[ 12\].*\(ty 4000\).*l_exported
+.*
+\[ 14\].*\(ty 1000\).*l_dual
+.*
+\[ 16\].*\(ty 0\).*globl_novisibility
+.*
+\[ 18\].*\(ty 1000\).*globl_internal
+.*
+\[ 20\].*\(ty 2000\).*globl_hidden
+.*
+\[ 22\].*\(ty 3000\).*globl_protected
+.*
+\[ 24\].*\(ty 4000\).*globl_exported
+.*
+\[ 26\].*\(ty 1000\).*globl_dual
+.*
+\[ 28\].*\(ty 0\).*weak_novisibility
+.*
+\[ 30\].*\(ty 1000\).*weak_internal
+.*
+\[ 32\].*\(ty 2000\).*weak_hidden
+.*
+\[ 34\].*\(ty 3000\).*weak_protected
+.*
+\[ 36\].*\(ty 4000\).*weak_exported
+.*
+\[ 38\].*\(ty 1000\).*weak_dual
+.*
+\[ 40\].*\(ty 0\).*comm_novisibility
+.*
+\[ 42\].*\(ty 1000\).*comm_internal
+.*
+\[ 44\].*\(ty 2000\).*comm_hidden
+.*
+\[ 46\].*\(ty 3000\).*comm_protected
+.*
+\[ 48\].*\(ty 4000\).*comm_exported
+.*
+\[ 50\].*\(ty 0\).*extern_novisibility
+.*
+\[ 52\].*\(ty 1000\).*extern_internal
+.*
+\[ 54\].*\(ty 2000\).*extern_hidden
+.*
+\[ 56\].*\(ty 3000\).*extern_protected
+.*
+\[ 58\].*\(ty 4000\).*extern_exported
+.*
+\[ 60\].*\(ty 1000\).*extern_dual
+.*
--- /dev/null
+#as: -a64
+#source: xcoff-visibility-1.s
+#objdump: -t
+#name: XCOFF Visibility 1 (64 bit)
+
+.*
+
+SYMBOL TABLE:
+.*
+.*
+.*
+.*
+\[ 4\].*\(ty 0\).*l_novisibility
+.*
+\[ 6\].*\(ty 1000\).*l_internal
+.*
+\[ 8\].*\(ty 2000\).*l_hidden
+.*
+\[ 10\].*\(ty 3000\).*l_protected
+.*
+\[ 12\].*\(ty 4000\).*l_exported
+.*
+\[ 14\].*\(ty 1000\).*l_dual
+.*
+\[ 16\].*\(ty 0\).*globl_novisibility
+.*
+\[ 18\].*\(ty 1000\).*globl_internal
+.*
+\[ 20\].*\(ty 2000\).*globl_hidden
+.*
+\[ 22\].*\(ty 3000\).*globl_protected
+.*
+\[ 24\].*\(ty 4000\).*globl_exported
+.*
+\[ 26\].*\(ty 1000\).*globl_dual
+.*
+\[ 28\].*\(ty 0\).*weak_novisibility
+.*
+\[ 30\].*\(ty 1000\).*weak_internal
+.*
+\[ 32\].*\(ty 2000\).*weak_hidden
+.*
+\[ 34\].*\(ty 3000\).*weak_protected
+.*
+\[ 36\].*\(ty 4000\).*weak_exported
+.*
+\[ 38\].*\(ty 1000\).*weak_dual
+.*
+\[ 40\].*\(ty 0\).*comm_novisibility
+.*
+\[ 42\].*\(ty 1000\).*comm_internal
+.*
+\[ 44\].*\(ty 2000\).*comm_hidden
+.*
+\[ 46\].*\(ty 3000\).*comm_protected
+.*
+\[ 48\].*\(ty 4000\).*comm_exported
+.*
+\[ 50\].*\(ty 0\).*extern_novisibility
+.*
+\[ 52\].*\(ty 1000\).*extern_internal
+.*
+\[ 54\].*\(ty 2000\).*extern_hidden
+.*
+\[ 56\].*\(ty 3000\).*extern_protected
+.*
+\[ 58\].*\(ty 4000\).*extern_exported
+.*
+\[ 60\].*\(ty 1000\).*extern_dual
+.*
--- /dev/null
+# Tests every possible visibility using XCOFF format.
+# Ensure that the visibility field is left empty if no
+# visibility is provided.
+# Ensure that only the last visibility is taken into
+# account when several are provided.
+
+# Csect visibility
+ .globl globl_novisibility[RW]
+ .csect globl_novisibility[RW]
+ .globl globl_internal[RW], internal
+ .csect globl_internal[RW]
+ .globl globl_hidden[RW], hidden
+ .csect globl_hidden[RW]
+ .globl globl_protected[RW], protected
+ .csect globl_protected[RW]
+ .globl globl_exported[RW], exported
+ .csect globl_exported[RW]
+ .globl globl_dual[RW], exported
+ .globl globl_dual[RW], internal
+ .csect globl_dual[RW]
+
+# Weak csect visibility
+ .weak weak_novisibility[RW]
+ .csect weak_novisibility[RW]
+ .weak weak_internal[RW], internal
+ .csect weak_internal[RW]
+ .weak weak_hidden[RW], hidden
+ .csect weak_hidden[RW]
+ .weak weak_protected[RW], protected
+ .csect weak_protected[RW]
+ .weak weak_exported[RW], exported
+ .csect weak_exported[RW]
+ .weak weak_dual[RW], exported
+ .weak weak_dual[RW], internal
+ .csect weak_dual[RW]
+
+# Comm visibility
+ .comm comm_novisibility[RW], 8, 4
+ .comm comm_internal[RW], 8, 4, internal
+ .comm comm_hidden[RW], 8, 4, hidden
+ .comm comm_protected[RW], 8, 4, protected
+ .comm comm_exported[RW], 8, 4, exported
+
+# Extern visibility
+ .extern extern_novisibility[RW]
+ .extern extern_internal[RW], internal
+ .extern extern_hidden[RW], hidden
+ .extern extern_protected[RW], protected
+ .extern extern_exported[RW], exported
+ .extern extern_dual[RW], exported
+ .extern extern_dual[RW], internal
+
+# Label visibility
+ .csect .text[PR]
+ .globl l_novisibility
+l_novisibility:
+ blr
+
+ .globl l_internal, internal
+l_internal:
+ blr
+
+ .globl l_hidden, hidden
+l_hidden:
+ blr
+
+ .globl l_protected, protected
+l_protected:
+ blr
+
+ .globl l_exported, exported
+l_exported:
+ blr
+
+ .globl l_dual, exported
+ .globl l_dual, internal
+l_dual:
+ blr
#define DECREF(x) \
((((x) >> N_TSHIFT) & ~ N_BTMASK) | ((x) & N_BTMASK))
+/* Visibility flag, in XCOFF n_type. */
+#define SYM_V_INTERNAL 0x1000
+#define SYM_V_HIDDEN 0x2000
+#define SYM_V_PROTECTED 0x3000
+#define SYM_V_EXPORTED 0x4000
+#define SYM_V_MASK 0xF000
+
union internal_auxent
{
struct
/* Some linker flags. */
unsigned long flags;
+ /* Symbol visibility, using the same define than n_type. */
+ unsigned short visibility;
+
/* The storage mapping class. */
unsigned char smclas;
};
# collection.
#...
-.*\(sec 1\)\(fl 0x00\)\(ty 0\)\(scl 2\) \(nx 0\) 0x0+000 .*Startup.*
+.*\(sec 1\)\(fl 0x00\)\(ty 0\)\(scl 2\) \(nx 0\) 0x0+000 .*Startup.*
#pass