From 2f3e288e82f8a5f9f3825486b70e19761be6bdad Mon Sep 17 00:00:00 2001 From: midipix Date: Fri, 16 May 2025 05:28:15 +0000 Subject: midipix targets: utilize the framework-specific .symattr section to mark hidden symbols. --- gcc/config/i386/midipix.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'gcc/config/i386/midipix.c') 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); } -- cgit v1.2.3