diff options
author | midipix <writeonce@midipix.org> | 2025-05-16 05:28:15 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2025-05-16 05:28:15 +0000 |
commit | 42f8e80eeaca27952af165076c5ce921bb7b3f45 (patch) | |
tree | 983301cc3658c086040b31ac0bad15db74bd1150 /gcc | |
parent | 1ae38064a5cfaa3dfb7cb33d072604a07f203cd8 (diff) | |
download | cbb-gcc-4.6.4-42f8e80eeaca27952af165076c5ce921bb7b3f45.tar.bz2 cbb-gcc-4.6.4-42f8e80eeaca27952af165076c5ce921bb7b3f45.tar.xz |
midipix targets: utilize the framework-specific .symattr section to mark hidden symbols.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/i386/midipix.c | 16 | ||||
-rw-r--r-- | gcc/config/i386/midipix.h | 6 |
2 files changed, 22 insertions, 0 deletions
diff --git a/gcc/config/i386/midipix.c b/gcc/config/i386/midipix.c index 4d511722f..ca571049c 100644 --- a/gcc/config/i386/midipix.c +++ b/gcc/config/i386/midipix.c @@ -185,6 +185,22 @@ static void midipix_pe_create_got_entry(FILE * stream, const char * name, tree d fputs("\n",stream); fputs(TARGET_64BIT ? "\t.long\t" "0" "\n" : "",stream); fputs("\n\n",stream); + + /* default visilbity? */ + if (visibility == VISIBILITY_DEFAULT) + return; + + /* .symattr section */ + fputs("\n",stream); + fputs(GAS_SECTION,stream); + fputs(SYMATTR_SECTION_NAME,stream); + fputs(SYMATTR_SECTION_ATTR,stream); + + /* .symattr.hidden. */ + fputs("\n.symattr.hidden.",stream); + assemble_name(stream,name); + fputs(":\n",stream); + fputs("\t.linkonce discard\n\n",stream); } diff --git a/gcc/config/i386/midipix.h b/gcc/config/i386/midipix.h index 73d5a3a62..dd23327ab 100644 --- a/gcc/config/i386/midipix.h +++ b/gcc/config/i386/midipix.h @@ -193,6 +193,9 @@ #undef GOTSYMS_SECTION_NAME #define GOTSYMS_SECTION_NAME ".dsosyms" +#undef SYMATTR_SECTION_NAME +#define SYMATTR_SECTION_NAME ".symattr" + #undef GOTSTRS_SECTION_NAME #define GOTSTRS_SECTION_NAME ".gotstrs" @@ -202,6 +205,9 @@ #undef GOT_SECTION_ATTR #define GOT_SECTION_ATTR ",\"r\"" +#undef SYMATTR_SECTION_ATTR +#define SYMATTR_SECTION_ATTR ",\"r\"" + #undef GAS_PE_ASM_SET_OP #define GAS_PE_ASM_SET_OP "\t.set\t" |