diff options
author | Jakub Jelinek <jakub@redhat.com> | 2002-02-26 22:17:22 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2002-02-26 22:17:22 +0100 |
commit | 47bd70b56aa4ccc10fd0e90a7fae4c94d991bb30 (patch) | |
tree | bf177b7375ac3fceb1bd51f1f20b2ff845e3fbba /gcc/varasm.c | |
parent | 6d73371a68e805956981592bdc2a631acaab2a33 (diff) | |
download | gcc-47bd70b56aa4ccc10fd0e90a7fae4c94d991bb30.zip gcc-47bd70b56aa4ccc10fd0e90a7fae4c94d991bb30.tar.gz gcc-47bd70b56aa4ccc10fd0e90a7fae4c94d991bb30.tar.bz2 |
attribs.c (c_common_attribute_table): Add visibility.
* attribs.c (c_common_attribute_table): Add visibility.
(handle_visibility_attribute): New function.
* varasm.c (assemble_visibility): New function.
* output.h (assemble_visibility): Add prototype.
* tree.h (MODULE_LOCAL_P): Define.
* crtstuff.c (__dso_handle): Use visibility attribute.
* config/i386/i386.h (ENCODE_SECTION_INFO): Set SYMBOL_REF_FLAG
for MODULE_LOCAL_P symbols too.
* config/ia64/ia64.c (ia64_encode_section_info): Handle
MODULE_LOCAL_P symbols the same way as local symbols.
Add SDATA_NAME_FLAG_CHAR even if decl was explicitely forced
into .sdata/.sbss by the user.
* doc/extend.texi (Function Attributes): Document visibility
attribute.
* gcc.dg/ia64-visibility-1.c: New test.
From-SVN: r50061
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index 46810c6..fa69592 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -5160,6 +5160,25 @@ assemble_alias (decl, target) #endif } +/* Emit an assembler directive to set symbol for DECL visibility to + VISIBILITY_TYPE. */ + +void +assemble_visibility (decl, visibility_type) + tree decl; + const char *visibility_type ATTRIBUTE_UNUSED; +{ + const char *name; + + name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); + +#ifdef HAVE_GAS_HIDDEN + fprintf (asm_out_file, "\t.%s\t%s\n", visibility_type, name); +#else + warning ("visibility attribute not supported in this configuration; ignored"); +#endif +} + /* Returns 1 if the target configuration supports defining public symbols so that one of them will be chosen at link time instead of generating a multiply-defined symbol error, whether through the use of weak symbols or |