summaryrefslogtreecommitdiffhomepage
path: root/ir/be/begnuas.c
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2015-10-19 07:06:51 +0200
committerMatthias Braun <matze@braunis.de>2015-10-19 07:06:51 +0200
commitc149643ec6a91de8daf89182d267a0196d90d108 (patch)
tree93920a784396c379d123882a56d64556788165c4 /ir/be/begnuas.c
parent4a81025298c97056b969559da99c7f6adfc30a82 (diff)
macho: comdat functions have to be marked .weak_definition
Diffstat (limited to 'ir/be/begnuas.c')
-rw-r--r--ir/be/begnuas.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ir/be/begnuas.c b/ir/be/begnuas.c
index 995a1c2..8ee8158 100644
--- a/ir/be/begnuas.c
+++ b/ir/be/begnuas.c
@@ -660,6 +660,8 @@ void be_gas_emit_function_prolog(const ir_entity *entity, unsigned po2alignment,
be_emit_write_line();
break;
case OBJECT_FILE_FORMAT_MACH_O:
+ if (section == (GAS_SECTION_TEXT | GAS_SECTION_FLAG_COMDAT))
+ emit_symbol_directive(".weak_definition", entity);
break;
}
be_gas_emit_entity(entity);