summaryrefslogtreecommitdiffhomepage
path: root/ir/be/begnuas.c
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2015-05-25 23:54:10 +0200
committerMatthias Braun <matze@braunis.de>2015-05-26 00:46:39 +0200
commit708a3f7ebf36cbb2dfe1336f6b1b9ce5723fdc92 (patch)
tree6be5836e41312fa10b21a45c49cdb1148c5cca06 /ir/be/begnuas.c
parentd382a20a5eeadef2236ef168916cf0ae989232df (diff)
begnuas: OS X has .weak_definition and .weak_reference
Diffstat (limited to 'ir/be/begnuas.c')
-rw-r--r--ir/be/begnuas.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ir/be/begnuas.c b/ir/be/begnuas.c
index b9392bc..f2fecde 100644
--- a/ir/be/begnuas.c
+++ b/ir/be/begnuas.c
@@ -462,7 +462,8 @@ static void emit_weak(const ir_entity *entity)
{
const char *directive;
if (be_gas_object_file_format == OBJECT_FILE_FORMAT_MACH_O) {
- directive = ".weak_reference";
+ directive = entity_has_definition(entity) ? ".weak_definition"
+ : ".weak_reference";
} else {
directive = ".weak";
}