/*
- * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
+ * Copyright (C) 1995-2011 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
}
if (be_gas_object_file_format == OBJECT_FILE_FORMAT_MACH_O
- && (linkage & IR_LINKAGE_HIDDEN_USER)) {
+ && (linkage & IR_LINKAGE_HIDDEN_USER)
+ && get_entity_ld_name(entity)[0] != '\0') {
be_emit_cstring("\t.no_dead_strip ");
be_gas_emit_entity(entity);
be_emit_char('\n');
case iro_Const:
tv = get_Const_tarval(init);
- /* it's a arithmetic value */
+ /* it's an arithmetic value */
emit_arith_tarval(tv, bytes);
return;
if (!is_type_variable_size(type)) {
return get_type_size_bytes(type);
} else {
- unsigned n_entries
+ size_t n_entries
= get_initializer_compound_n_entries(initializer);
- unsigned i;
+ size_t i;
unsigned initializer_size = get_type_size_bytes(type);
for (i = 0; i < n_entries; ++i) {
ir_entity *entity = get_compound_member(type, i);
}
if (entity_is_null(entity)) {
- be_emit_irprintf("\t.space %u, 0\n", get_type_size_bytes(type));
- be_emit_write_line();
+ unsigned size = get_type_size_bytes(type);
+ if (size > 0) {
+ be_emit_irprintf("\t.space %u, 0\n", get_type_size_bytes(type));
+ be_emit_write_line();
+ }
} else if (entity_has_compound_ent_values(entity)) {
emit_compound_graph_init(env, entity);
} else {
*/
static void be_gas_emit_globals(ir_type *gt, be_gas_decl_env_t *env)
{
- int i, n = get_compound_n_members(gt);
+ size_t i, n = get_compound_n_members(gt);
for (i = 0; i < n; i++) {
ir_entity *ent = get_compound_member(gt, i);