From b5e22384836d5c09602d5cf6fe990485299dfbf0 Mon Sep 17 00:00:00 2001 From: grischka Date: Sat, 19 Dec 2009 19:12:33 +0100 Subject: tccasm: make VT_VOID symbols ST_NOTYPE, elf-wise This was confusing objdump such that it did not print disassembly with -d. Also, put filename as with C compilation --- tccasm.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tccasm.c') diff --git a/tccasm.c b/tccasm.c index 6862ef5..56bf6cd 100644 --- a/tccasm.c +++ b/tccasm.c @@ -712,6 +712,12 @@ static int tcc_assemble(TCCState *s1, int do_preprocess) define_start = define_stack; + /* an elf symbol of type STT_FILE must be put so that STB_LOCAL + symbols can be safely used */ + put_elf_sym(symtab_section, 0, 0, + ELFW(ST_INFO)(STB_LOCAL, STT_FILE), 0, + SHN_ABS, file->filename); + ret = tcc_assemble_internal(s1, do_preprocess); cur_text_section->data_offset = ind; -- cgit v1.3.1