From c15e37edad604bdaa6fe7b21d031ccea162b2bad Mon Sep 17 00:00:00 2001 From: "Feret@.(none)" Date: Wed, 16 Sep 2009 16:04:38 +0200 Subject: [PATCH] Removed binary executable output support This broke writing executables. --- tccelf.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tccelf.c b/tccelf.c index 5d73b4ad..3b881b00 100644 --- a/tccelf.c +++ b/tccelf.c @@ -1357,7 +1357,7 @@ int elf_output_file(TCCState *s1, const char *filename) file_type = s1->output_type; s1->nb_errors = 0; - if ((file_type != TCC_OUTPUT_OBJ) && (s1->output_type != TCC_OUTPUT_FORMAT_BINARY)) { + if (file_type != TCC_OUTPUT_OBJ) { tcc_add_runtime(s1); } @@ -1371,15 +1371,14 @@ int elf_output_file(TCCState *s1, const char *filename) if (file_type != TCC_OUTPUT_OBJ) { relocate_common_syms(); - if (s1->output_type != TCC_OUTPUT_FORMAT_BINARY) - tcc_add_linker_symbols(s1); + tcc_add_linker_symbols(s1); - if ((!s1->static_link) && (s1->output_type != TCC_OUTPUT_FORMAT_BINARY)) { + if (!s1->static_link) { const char *name; int sym_index, index; ElfW(Sym) *esym, *sym_end; - if ((file_type == TCC_OUTPUT_EXE) && (s1->output_type != TCC_OUTPUT_FORMAT_BINARY)) { + if (file_type == TCC_OUTPUT_EXE) { char *ptr; /* add interpreter section only if executable */ interp = new_section(s1, ".interp", SHT_PROGBITS, SHF_ALLOC); -- 2.11.4.GIT