History

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

grischka committed 16 years ago

Commit b5e22381 parent ab4a4ab2 files · +8 −0Browse files

Unified · Split

2 files
  1. libtcc.c +2 −0
  2. tccasm.c +6 −0
libtcc.c+2−0
@@ -780,6 +780,8 @@ static void put_extern_sym2(Sym *sym, Section *section, · 779 unmodified lines
780 if (FUNC_CALL(attr) == FUNC_STDCALL)780 if (FUNC_CALL(attr) == FUNC_STDCALL)
781 other |= 2;781 other |= 2;
782#endif782#endif
783 } else if ((sym->type.t & VT_BTYPE) == VT_VOID) {
784 sym_type = STT_NOTYPE;
783 } else {785 } else {
784 sym_type = STT_OBJECT;786 sym_type = STT_OBJECT;
785 }787 }
tccasm.c+6−0
@@ -712,6 +712,12 @@ static int tcc_assemble(TCCState *s1, int do_preprocess) · 711 unmodified lines
712 712
713 define_start = define_stack;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 ret = tcc_assemble_internal(s1, do_preprocess);721 ret = tcc_assemble_internal(s1, do_preprocess);
716 722
717 cur_text_section->data_offset = ind;723 cur_text_section->data_offset = ind;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t