diff options
author | midipix <writeonce@midipix.org> | 2025-05-16 05:28:15 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2025-05-16 06:08:58 +0000 |
commit | 2f3e288e82f8a5f9f3825486b70e19761be6bdad (patch) | |
tree | fb25356f510ce08c998d5fa4620f8daeea3eea97 | |
parent | 1ae38064a5cfaa3dfb7cb33d072604a07f203cd8 (diff) | |
download | cbb-gcc-4.6.4-2f3e288e82f8a5f9f3825486b70e19761be6bdad.tar.bz2 cbb-gcc-4.6.4-2f3e288e82f8a5f9f3825486b70e19761be6bdad.tar.xz |
midipix targets: utilize the framework-specific .symattr section to mark hidden symbols.
-rw-r--r-- | gcc/config/i386/midipix.c | 15 | ||||
-rw-r--r-- | gcc/config/i386/midipix.h | 6 |
2 files changed, 21 insertions, 0 deletions
diff --git a/gcc/config/i386/midipix.c b/gcc/config/i386/midipix.c index 4d511722f..e1d2f1bd3 100644 --- a/gcc/config/i386/midipix.c +++ b/gcc/config/i386/midipix.c @@ -185,6 +185,21 @@ 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\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" |