From 2af4a97900b435e35d7c20350604e3863aff2b4c Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Thu, 11 Feb 2010 12:27:37 +0000 Subject: [PATCH] fix weak external functions [r27116] --- ir/be/begnuas.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/ir/be/begnuas.c b/ir/be/begnuas.c index b986b2535..c6bbb1441 100644 --- a/ir/be/begnuas.c +++ b/ir/be/begnuas.c @@ -78,7 +78,7 @@ static const char *get_section_name(be_gas_section_t section) { /* OBJECT_FILE_FORMAT_COFF */ ".section\t.text", ".section\t.data", - ".section .rdata,\"dr\"", + ".section\t.rdata,\"dr\"", ".section\t.bss", ".section\t.tdata,\"awT\",@progbits", ".section\t.tbss,\"awT\",@nobits", @@ -1285,14 +1285,20 @@ static void dump_global(be_gas_decl_env_t *env, const ir_entity *ent) ir_visibility visibility = get_entity_visibility(ent); ir_linkage linkage = get_entity_linkage(ent); + /* block labels are already emittet in the code */ + if (type == firm_code_type) + return; + /* we already emitted all methods. Except for the trampolines which * the assembler/linker generates */ if (is_Method_type(type) && section != GAS_SECTION_PIC_TRAMPOLINES) { + /* functions with graph are already emitted with + * be_gas_emit_function_prolog */ + if (get_entity_irg(ent) == NULL) { + emit_visibility(ent); + } return; } - /* block labels are already emittet in the code */ - if (type == firm_code_type) - return; be_dbg_variable(ent); -- 2.20.1