Removed binary executable output support

This broke writing executables.
This commit is contained in:
Feret@.(none) 2009-09-16 16:04:38 +02:00 committed by grischka
parent 2fdb45f577
commit c15e37edad

View file

@ -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);