From 6f6635d1a6a89ee31ed881074447f859f5e15e83 Mon Sep 17 00:00:00 2001 From: midipix Date: Tue, 8 Jan 2019 03:53:40 -0500 Subject: midipix targets: GOT entries: unless internal visibility, create in .got$. --- gcc/config/i386/midipix.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/gcc/config/i386/midipix.c b/gcc/config/i386/midipix.c index 5e206f87a..30a7ff91f 100644 --- a/gcc/config/i386/midipix.c +++ b/gcc/config/i386/midipix.c @@ -2,7 +2,7 @@ /* */ /* midipix target interfaces */ /* */ -/* Copyright (C) 2014,2015 Z. Gilboa */ +/* Copyright (C) 2014,2015,2019 Z. Gilboa */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ @@ -141,18 +141,14 @@ static void midipix_pe_create_got_entry(FILE * stream, const char * name, tree d fputs("\n",stream); fputs(GAS_SECTION,stream); - switch (decl->decl_with_vis.visibility) { - case VISIBILITY_HIDDEN: - fputs(HIDDEN_SECTION_NAME,stream); - break; + if (decl->decl_with_vis.weak_flag) { + fputs(GOT_SECTION_NAME,stream); - case VISIBILITY_INTERNAL: - fputs(INTERNAL_SECTION_NAME,stream); - break; + } else if (decl->decl_with_vis.visibility == VISIBILITY_INTERNAL) { + fputs(INTERNAL_SECTION_NAME,stream); - default: - fputs(GOT_SECTION_NAME,stream); - break; + } else { + fputs(GOT_SECTION_NAME,stream); } fputs("$",stream); -- cgit v1.2.3