This project is mirrored from Pull mirroring failed .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer or owner.
Last successful update .
  1. 13 Dec, 2017 2 commits
    • grischka's avatar
      final update for 0.9.27 · d348a9a5
      grischka authored
      - fix ldouble asm hack
      - fix a VLA problem on Win64 (also x86_64-gen.c)
      - patch_type(): make sure that no symbol ever changes
        from global to static
      - tcc -vv: print libtcc1.a path also on win32
      tccpe.c, tcctools.c:
      - use unix LF mode to for .def output files (that is for
        creating reproducible output trees)
      - suppress some warnings when makeinfo is missing
      - call 'which install' only on win32
      - change PATH only on WINNT systems (i.e. not if cross-compiling
        on linux for win32)
      - asm-c-connect.test: slim output and do diff
      tccrun.c tccpe.c *-link.c:
      - integrate former 'pe_relocate_rva()' into normal relocation
        This also fixes linkage of the unwind data on WIN64 for -run
        (reported by Janus Lynggaard Thorborg)
      tccasm.c, tests/tcctest.c:
      - fix dot (sym_index of -1 crashed in put_elf_reloc)
      - massage .set a bit (see test)
      - #define SECTION_ABS removed
      - ST_DATA Section *strtab_section: removed
      - put_extern_sym2(): take int section number
    • grischka's avatar
      tccgen_begin/end_file · 1a4d4b76
      grischka authored
      This is supposed to make compilation and linking with
      multiple source files (tcc f1.c f2.S ...) behave just
      the same as linking object files.
      - use put_elf_sym to enter new symbols unconditionally
      - save section state before compilation
      - disable symbol hashing during compilation
      - merge symbols and update relocations after compilation
      - re-create s1->uw_sym for each compilation (because it
        may change)
  2. 10 Dec, 2017 1 commit
    • Michael Matz's avatar
      Fix some multi-file corner cases with asm · 8490c54d
      Michael Matz authored
      for this we have to create also asm symbols as VT_STATIC initially
      except if there's an indication that it should be global (.globl
      or undefined at end of unit).  For this to work we need to
      be able to globalize symbols after they were local and enter them
      into the ELF hash tables, and also adjust the symbols that were
      potentially already used in relocs when they were still local.
      The easiest is to do a proper symbol resolution step also in multi-file
      mode, for regular symbols (the non-dynamic ones, i.e. not from shared
  3. 05 Dec, 2017 2 commits
    • grischka's avatar
      tccgen: unify type redefinition checks · 3ae1a2af
      grischka authored
      - improved function patch_storage() and added new function
        patch_type() for more consistent type redefinition and
        instance redefinition checks.
    • grischka's avatar
      tccasm: use global(_symbol)_stack · 877e164d
      grischka authored
      * removed asm_label stack
      * removed asm_free_labels() post-processing
      * using "impossible C type" for asm labels (VT_ASM)
      * tccgen.c:update_storage(): use it to refresh symbol attributes
      * tccelf.c:find_elf_sym(): ignore STB_LOCAL symbols
      * tccgen.c:unary(): asm symbols are supposed to be undeclared in C
  4. 04 Dec, 2017 1 commit
  5. 03 Dec, 2017 1 commit
    • Michael Matz's avatar
      tccasm: Accept suffixed cmovCC · 529b44c0
      Michael Matz authored
      The length suffix for cmovCC isn't necessary as the required register
      operands always allow length deduction.  But let's be nice to users
      and accept them anyway.  Do that without blowing up tables, which means
      we don't detect invalid suffixes for the given operands, but so be it.
  6. 27 Nov, 2017 2 commits
    • Michael Matz's avatar
      tccasm: Unify C and asm symbol table · 9e0d23cc
      Michael Matz authored
      This makes the asm symbols use the same members as the C symbols
      for global decls, e.g. using the ELF symbol to hold offset and
      section.  That allows us to use only one symbol table for C and
      asm symbols and to get rid of hacks to synch between them.
      We still need some special handling for symbols that come purely
      from asm sources.
    • Michael Matz's avatar
      Adjust asm-c-connect testcase for Windows · 3494e5de
      Michael Matz authored
      Calling conventions are different, let's use functions without
      any arguments.
  7. 26 Nov, 2017 1 commit
    • Michael Matz's avatar
      tccasm: Don't abuse dllexport/dllimport · 4266ebd6
      Michael Matz authored
      For tracking if asm symbols are connected with a C symbol,
      and if asm symbols need to be global use new flags, instead of
      reusing dllimport/dllexport, which would cause unrequested exported
      entries on Windows.
      This is a stop-gap until the C and asm symtable are unified.
  8. 23 Nov, 2017 1 commit
    • Michael Matz's avatar
      tccasm: synch C and asm symtab tighter · e7c71e24
      Michael Matz authored
      See testcase.  The C and asm symtab are still separate,
      but integrated tighter: the asm labels are only synched at file
      end, not after each asm snippet (this fixes references from one
      to another asm block), the C and asm syms are synched both ways,
      so defining things in asm and refering from C, or the other way
      around works.  In effect this model reflects what happens with
      GCC better.
      For this the asm labels aren't using the C label namespace anymore,
      but their own, which increases the size of each TokenSym by a pointer.
  9. 19 Nov, 2017 2 commits
    • Michael Matz's avatar
      Adjust testcase for PIE compilers · 330c01bf
      Michael Matz authored
      one some systems GCC defaults to PIC/PIE code which is incompatible
      with a unannotated asm call to a function (getenv here).  TCC doesn't
      support these PIC annotations (yet), so play some pre-processor games.
    • Michael Matz's avatar
      Fix forward asm labels differently · d0db2175
      Michael Matz authored
      while last change fixed one part of label behaviour (undefined ones
      must be global) it again broke a different aspect (forward defs
      without .globl must stay local).  This fixes both aspects.
      That a label is local instead of global is difficult to test without
      resorting to look at the symbol table or using two-file testcases,
      so we do without.  In essence the local/global-ness of symbols
      should be the same between GAS and TCC for this input:
          .globl glob1
          call glob1
          .globl glob2
          call glob2
          .globl glob3
          call glob3
          call glob4
          .globl glob4
          call glob5
          .globl glob5
          call glob6
          .globl glob6
          call locl1
          call locl2
          .globl unref2
          .globl unref3
          call undef
  10. 16 Nov, 2017 1 commit
    • Michael Matz's avatar
      Don't make forard asm symbols static by default · a8ece0f2
      Michael Matz authored
      fixes the problem in the testcase.  A symbolic reference
      from asm, which remains undefined at the end of processing is
      always a global reference, not a static (STB_LOCAL) one.
      This also affected the linux kernel.
  11. 15 Nov, 2017 1 commit
    • Michael Matz's avatar
      Fix absolute memory references · 348dd9f4
      Michael Matz authored
      This properly fixes what 870271ea tried to fix.  Absolute memory
      references can't use %rip relative addressing, and additionally,
      if the address doesn't fit 32bit (signed) it must be loaded via
      movabs.  No good testcase added, it would require catching signals
      and still be unreliable.
  12. 14 Nov, 2017 1 commit
  13. 04 Nov, 2017 1 commit
  14. 19 Oct, 2017 1 commit
  15. 12 Oct, 2017 1 commit
    • grischka's avatar
      various stuff · da8c62f7
      grischka authored
      win32/Makefile ("for cygwin") removed
      - On cygwin, the normal ./configure && make can be used with either
        cygwin's "GCC for Win32 Toolchain"
            ./configure --cross-prefix=i686-w64-mingw32-
        or with an existing tcc:
            ./configure --cc=<old-tccdir>/tcc.exe
      - exclude test_high_clobbers() on _WIN64 (does not work)
      - use 'signed char' for ARM (where default 'char' is unsigned)
      - remove -I "expr" diff option to allow tests with
      libtcc.c, tcc.c:
      - removed -iwithprefix option.  It is supposed to be
        combined with -iprefix which we don't have either.
      - fix assignments and return of 'void', as in
           void f() {
               void *p, *q;
               *p = *q:
               return *p;
        This appears to be allowed but should do nothing.
      tcc.h, libtcc.c, tccpp.c:
      - Revert "Introduce VIP sysinclude paths which are always searched first"
        This reverts commit 1d5e386b.
        The patch was giving tcc's system includes priority over -I which
        is not how it should be.
      - add DT_TEXTREL tag only if text relocations are actually
        used (which is likely not the case on x86_64)
      - prepare_dynamic_rel(): avoid relocation of unresolved
        (weak) symbols
      - for HAVE_SELINUX, use two mappings to the same (real) file.
        (it was so once except the RX mapping wasn't used at all).
      - fix relocation constant used for x86_64 (by Andrei E. Warentin)
      - #ifndef _WIN32 do "chmod 755 ..." to get runnable exes on cygwin.
      - keep forward asm labels static, otherwise they will endup
        in dynsym eventually.
      configure, Makefile:
      - mingw32: respect ./configure options --bindir --docdir --libdir
      - allow overriding tcc when building libtcc1.a and libtcc.def with
            make XTCC=<tcc program to use>
      - use $(wildcard ...) for install to allow installing just
        a cross compiler for example
            make cross-arm
            make install
      - use name <target>-libtcc1.a
      - add  options: -clean, -b bindir
  16. 10 Oct, 2017 1 commit
  17. 09 Oct, 2017 1 commit
  18. 03 Oct, 2017 1 commit
  19. 30 Sep, 2017 1 commit
  20. 29 Sep, 2017 1 commit
  21. 26 Sep, 2017 1 commit
  22. 25 Sep, 2017 5 commits
    • Avi Halachmi (:avih)'s avatar
      freebsd: allow building tcc which targets windows · abd1532a
      Avi Halachmi (:avih) authored
      Currently tcc doesn't have a compile-time config indicating that the target
      is freebsd, and as a result, the tcc binary adds freebsh stuff to elf headers
      if the compile-time (of tcc) *host* is freebsd.
      Test also that the target is not PE while generating an elf header.
      This still likely fails (but untested) when tcc targets other non-freebsd
      systems on a freebsd system, but for now fix it only when targetting windows.
    • Larry Doolittle's avatar
      Fix some spelling in documentation · 56018871
      Larry Doolittle authored
    • Larry Doolittle's avatar
      Spelling fixes · 1b6806e5
      Larry Doolittle authored
      Comments only, no change to functionality
    • Larry Doolittle's avatar
      Convert two .c files to LF line endings · 44d4da62
      Larry Doolittle authored
      ... matching the other 157 .c files in the tree
    • grischka's avatar
      'long' review · 14430394
      grischka authored
      add some features for more complete 'long' support
      - use LONG_SIZE=4/8 instead of TCC_LONG_ARE_64_BIT
      - add ptrdiff_type, update size_type
      - support shift and ?: operations
      - support long enum types
      - display 'long' from type_to_str
      - nwchar_t is unsigned short on windows
      - unrelated: use memcpy in init_putv for long doubles to avoid
        random bytes in the image (if tcc was compiled by gcc) for
        diff purposes.
      - make parse_number return correct types
      - improve multi-character-constants 'XX' 'abcd'
      - update
  23. 11 Sep, 2017 1 commit
  24. 10 Sep, 2017 3 commits
  25. 09 Sep, 2017 3 commits
    • Zhang Boyang's avatar
      Fix calling function pointers casted from intergers in DLL · b39810ff
      Zhang Boyang authored
      The code generated for "((void (*)(void))0x12345678)()" will be a single "CALL 0x12345678" in previous code.
      However, this will not work for DLLs, because "CALL imm" is PC related, DLL relocation will break the code.
      This commit fixed the problem by forcing TCC generates indirect CALLs in this situation.
    • Zhang Boyang's avatar
      Fix AL/AX is not extended to EAX when calling indirectly · 02370acd
      Zhang Boyang authored
      AL/AX should be extended to EAX when calling functions. However, the previous code did this only for direct calls, indirect calls were ignored.
      New code also avoid redundant code when generating JMP instruction. (i.e. expanding code should be generated with CALL instruction only)
    • Zhang Boyang's avatar
      Fix wide char handling in wide string literal · a82c11f4
      Zhang Boyang authored
      This commit fixed the problem that TCC directly cast each byte in wide string literal to wchar_t, which is wrong when wide string literal contains real wide chars.
      It fixed the problem by assuming input charset is UTF-8, and wchar_t stores wide chars in UTF-16 (Windows) or UTF-32 (others).
      The UTF-8 decoder is coded according to The Unicode Standard Version 10.
  26. 21 Aug, 2017 1 commit
  27. 26 Jul, 2017 2 commits