This was confusing objdump such that it did not print disassembly with -d. Also, put filename as with C compilation
Unified · Split
| @@ -780,6 +780,8 @@ static void put_extern_sym2(Sym *sym, Section *section, · 779 unmodified lines | ||
| 780 | 780 | if (FUNC_CALL(attr) == FUNC_STDCALL) |
| 781 | 781 | other |= 2; |
| 782 | 782 | #endif |
| 783 | + } else if ((sym->type.t & VT_BTYPE) == VT_VOID) { | |
| 784 | + sym_type = STT_NOTYPE; | |
| 783 | 785 | } else { |
| 784 | 786 | sym_type = STT_OBJECT; |
| 785 | 787 | } |
| @@ -712,6 +712,12 @@ static int tcc_assemble(TCCState *s1, int do_preprocess) · 711 unmodified lines | ||
| 712 | 712 | |
| 713 | 713 | define_start = define_stack; |
| 714 | 714 | |
| 715 | + /* an elf symbol of type STT_FILE must be put so that STB_LOCAL | |
| 716 | + symbols can be safely used */ | |
| 717 | + put_elf_sym(symtab_section, 0, 0, | |
| 718 | + ELFW(ST_INFO)(STB_LOCAL, STT_FILE), 0, | |
| 719 | + SHN_ABS, file->filename); | |
| 720 | + | |
| 715 | 721 | ret = tcc_assemble_internal(s1, do_preprocess); |
| 716 | 722 | |
| 717 | 723 | cur_text_section->data_offset = ind; |