summaryrefslogtreecommitdiffhomepage
path: root/ir/be/begnuas.c
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2015-10-06 08:03:41 +0200
committerMatthias Braun <matze@braunis.de>2015-10-06 09:31:27 +0200
commit5fc82d987a0bc6357514c67fec2373369f16b29d (patch)
tree48779973b39fdb9e8be7c075ce226511970c446b /ir/be/begnuas.c
parentf8b38c80d0cf435a107a4decf564194670ae688e (diff)
Introduce IR_LINKAGE_NO_IDENTITY
This flag can be set on entities where the actual address isn't known/compared against other address. This also fixes a bug where we used the mach-o csrings section for global char arrays which need distinct addresses.
Diffstat (limited to 'ir/be/begnuas.c')
-rw-r--r--ir/be/begnuas.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ir/be/begnuas.c b/ir/be/begnuas.c
index 67bf966..8b06b0f 100644
--- a/ir/be/begnuas.c
+++ b/ir/be/begnuas.c
@@ -468,6 +468,7 @@ static be_gas_section_t determine_basic_section(const ir_entity *entity)
if (get_entity_linkage(entity) & IR_LINKAGE_CONSTANT) {
/* mach-o is the only one with a cstring section */
if (be_gas_object_file_format == OBJECT_FILE_FORMAT_MACH_O
+ && (get_entity_linkage(entity) & IR_LINKAGE_NO_IDENTITY)
&& entity_is_string_const(entity, true))
return GAS_SECTION_CSTRING;