This project is mirrored from https://repo.or.cz/tinycc.git. Pull mirroring updated .
  1. 17 May, 2022 1 commit
    • herman ten brugge's avatar
      Update for elflint problems · 4c82b003
      herman ten brugge authored
      tccgen.c:
      - When __FUNCTION__ is used and no code is generated use symbol len = 0.
      
      tccelf.c:
      - If library is present in verneed it should be in DT_NEEDED.
      - @plt symbols should have size 0
      - set _GLOBAL_OFFSET_TABLE_ st_size correct
      - Remove version symbol if new value present
      
      reported by elflint:
      
      __FUNCTION__ problem:
        section [19] '.symtab': symbol 2134 (L.195) does not fit completely in referenced section [14] '.data.ro'
      DT_NEEDED problem:
        section [26] '.gnu.version_r': entry 2 references unknown dependency
      @plt symbols should have size 0:
        section [22] '.symtab': symbol 36557 (r_core_config_init@plt) does not fit completely in referenced section [14] '.plt'
      _GLOBAL_OFFSET_TABLE_ size:
        section [44] '.symtab': _GLOBAL_OFFSET_TABLE_ symbol size 4 does not match .got section size 736
      Remove version symbol:
        section [25] '.gnu.version': symbol 86: version index 3 is for requested version
        This happened for example with bounds checking symbol malloc
      4c82b003
  2. 16 May, 2022 1 commit
  3. 14 May, 2022 2 commits
  4. 12 May, 2022 2 commits
    • herman ten brugge's avatar
      Fix unicode compiler warning · 19cc8078
      herman ten brugge authored
      The compiler warned about the unicode_to_utf8 code.
      I fixed it by giving an error. This is the same as gcc does.
      19cc8078
    • herman ten brugge's avatar
      Dwarf update · e7396c99
      herman ten brugge authored
      Some small updates in tccdbg.c found by checking readelf output from
      gcc/clang.
      
      - Change encoding type bool type
      - Fix enum signed/unsigned
      - Do not hash anon symbol
      - Use correct filename/line_number for global variables
      - Fix compiler warning in tcc_get_dwarf_info
      - Use unsigned long long for array indexes
      - Display correct first line of function in gdb
      e7396c99
  5. 10 May, 2022 4 commits
    • herman ten brugge's avatar
      Fix stupid typo. · 748e38ad
      herman ten brugge authored
      748e38ad
    • herman ten brugge's avatar
      Fix vla type bug for stabs/dwarf · 9a81e636
      herman ten brugge authored
      The wrong vla stabs code was accepted by gdb.
      The dwarf vla code was fatal.
      9a81e636
    • grischka's avatar
      tccdbg.c: new file · 2caaff20
      grischka authored
      Better avoid global variables, at least in new code.
      
      tccdbg.c hopefully should be logically identical to the
      former parts in tccgen/elf.c (s1 tccstate added in some
      places)
      
      tccelf.c: dwarf linkage seems special per dwarf rather
      than special per target.
      2caaff20
    • grischka's avatar
      bored... · 56481d55
      grischka authored
      /* Use "-g" as alias for "-g1". Use "-g0" to disable debug */
      
      So not using -g is now the alias for -g0 ?!?
      
      This reverts commit 8759b258.
      This reverts commit 3ce7bc6e.
      This reverts commit 5fb582ab.
      This reverts commit aea68dbb.
      This reverts commit fa9c31c3.
      This reverts commit b3bebdb2.
      This reverts commit ecf8e5a0.
      This reverts commit fe6b5c08.
      This reverts commit e2e5377e.
      This reverts commit 1cd79989.
      56481d55
  6. 09 May, 2022 2 commits
  7. 08 May, 2022 1 commit
    • herman ten brugge's avatar
      Add dwarf clang support · 499cf230
      herman ten brugge authored
      This if for clang (pre)release 15.0.0.
      
      tccrun.c:
      - update directory/filename read. clang has extra md5 section
      - start with filename 0 instead of 1. clang starts at 0
      - change dwarf_read_32/dwarf_read_64 into macros
      
      x86_64-link.c:
      - Add support for R_X86_64_DTPOFF64/R_X86_64_TPOFF64. Needed by clang
      
      tests/tcctest.c:
      - add prototypes for puts/alloca. clang fails with error
      - disable other_constraints_test for clang. clang prints 1 instead of 0
      499cf230
  8. 07 May, 2022 1 commit
    • herman ten brugge's avatar
      Update dwarf2 support · 18808e32
      herman ten brugge authored
      tccgen.c:
      - add anon support. So tcc_state in tcc works now.
      - add function pointer support
      - remove DW_FORM_implicit_const from DW_TAG_pointer_type
      
      tccrun.c:
      - set initial file name
      - correctly use pc in DW_LNE_set_address (see lib/bt-exe.c)
      - add DW_LNE_define_file support (even if it is deprecated)
      
      tccelf.c
      - do not include debug/test_coverage information for stub functions
      
      lib/bt-exe.c
      - use num_callers=-1 to mark dll
      18808e32
  9. 05 May, 2022 2 commits
    • herman ten brugge's avatar
      Fix dwarf on 32 bits targets · f0df48fc
      herman ten brugge authored
      Never do last minute commits :-(
      f0df48fc
    • herman ten brugge's avatar
      Add dwarf support · 2f2708a7
      herman ten brugge authored
      The new gcc12 release does not support stabs any more.
      This was a good reason to add support for dwarf.
      
      The stabs code still works and is used if configure option --dwarf
      is not used.
      
      Tested on x86_64, i386, arm, arm64, riscv64 with dwarf-5.
      Some debuggers may not support dwarf-5. Try using older dwarf versions
      i that case.
      The tccmacho.c code probably need some support for dwarf.
      
      arm-gen.c, arm64-gen.c, i386-gen.c, riscv64-gen.c, x86_64-gen.
      - fix get_sym_ref symbol size
      
      arm-link.c, arm64-link.c, i386-link.c, riscv64-link.c, x86_64-link.c
      - add R_DATA_32U
      
      libtcc.c:
      - parse -gdwarf option
      
      tcc.c:
      - add dwarf option
      
      tcc.h:
      - add dwarf option and sections
      
      tccelf.c:
      - init dwarf sections
      - avoid adding sh_addr for dwarf sections
      - remove dwarf relocs for output dll
      - add dwarf sections for tccrun
      
      tccgen.c:
      - add dwarf defines + global data
      - add dwarf_* functions
      - mix dwarf code with stabs code
      - a trick is used to emit function name in .debug_line section so
        only this section has to be parsed instead of .debug_info and
        .debug_abbrev.
      - fix init debug_modes
      
      tccrun.c:
      - add dwarf sections in rt_context
      - init them in tcc_run
      - add new dwarf code rt_printline_dwarf to find file/function
      
      dwarf.h:
      - New file
      
      tcc-doc.texi:
      - document dwarf
      
      configure:
      - add dwarf option
      
      lib/Makefile
      - change -gstabs into -gdwarf
      
      lib/bt-exe.c, tests/tests2/Makefile, tests/tests2/126_bound_global:
      - Add __bound_init call
      - Add new testcase to test it
      2f2708a7
  10. 29 Apr, 2022 1 commit
  11. 28 Apr, 2022 2 commits
  12. 19 Apr, 2022 1 commit
  13. 18 Apr, 2022 3 commits
  14. 16 Apr, 2022 1 commit
  15. 12 Apr, 2022 7 commits
  16. 11 Apr, 2022 2 commits
  17. 10 Apr, 2022 2 commits
  18. 07 Apr, 2022 1 commit
  19. 02 Apr, 2022 1 commit
  20. 28 Mar, 2022 1 commit
  21. 24 Mar, 2022 1 commit
  22. 23 Mar, 2022 1 commit