Removed binary executable output support
This broke writing executables.
This commit is contained in:
parent
2fdb45f577
commit
c15e37edad
1 changed files with 4 additions and 5 deletions
9
tccelf.c
9
tccelf.c
|
@ -1357,7 +1357,7 @@ int elf_output_file(TCCState *s1, const char *filename)
|
||||||
file_type = s1->output_type;
|
file_type = s1->output_type;
|
||||||
s1->nb_errors = 0;
|
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);
|
tcc_add_runtime(s1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1371,15 +1371,14 @@ int elf_output_file(TCCState *s1, const char *filename)
|
||||||
if (file_type != TCC_OUTPUT_OBJ) {
|
if (file_type != TCC_OUTPUT_OBJ) {
|
||||||
relocate_common_syms();
|
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;
|
const char *name;
|
||||||
int sym_index, index;
|
int sym_index, index;
|
||||||
ElfW(Sym) *esym, *sym_end;
|
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;
|
char *ptr;
|
||||||
/* add interpreter section only if executable */
|
/* add interpreter section only if executable */
|
||||||
interp = new_section(s1, ".interp", SHT_PROGBITS, SHF_ALLOC);
|
interp = new_section(s1, ".interp", SHT_PROGBITS, SHF_ALLOC);
|
||||||
|
|
Loading…
Add table
Reference in a new issue