- 16 Jan, 2023 3 commits
-
-
herman ten brugge authored
Macos has an offset of 1 for DW_LNS_set_file. Also rewrite dwarf_file to not scan list twice and move check for <command line> to this function.
-
herman ten brugge authored
The preprocessor line directive did not result in correct debug info when -g was used. Line directives like: #line 1 "filename" should now work.
-
herman ten brugge authored
-
- 01 Jan, 2023 2 commits
-
-
noneofyourbusiness authored
-
noneofyourbusiness authored
-
- 28 Dec, 2022 2 commits
-
-
herman ten brugge authored
tcc -ar t failed sometimes because the header size was not correct.
-
noneofyourbusiness authored
-
- 27 Dec, 2022 4 commits
-
-
Per Nordlöw authored
-
Per Nordlöw authored
-
herman ten brugge authored
-
herman ten brugge authored
In tcc_load_object_file use unsigned long for size/offset. This avoids strange sizes of sections in case of overflow. The sections that are now larger then 4G may not work. This avoids a hang on macos in realloc.
-
- 26 Dec, 2022 1 commit
-
-
noneofyourbusiness authored
-
- 24 Dec, 2022 1 commit
-
-
Christian Jullien authored
Add -Wl,-install_name macOS clang compatible flag as clang refuses -Wl,-soname. This helps configure scripts using both clang and tcc.
-
- 23 Dec, 2022 2 commits
-
-
herman ten brugge authored
If multiple rpaths are specified then output multiple LC_RPATH load commands instead of one with : seperator.
-
herman ten brugge authored
Changed -1 into -2 for plt_offset,
-
- 22 Dec, 2022 2 commits
-
-
herman ten brugge authored
The problem occurs when a shared library creates a pointer to a function and then the application also uses this function.
-
grischka authored
Also: return all of 'cumofs' (no extra '+' required at caller)
-
- 20 Dec, 2022 2 commits
-
-
herman ten brugge authored
On macos we cannot use the ar because is does not support elf files and then does not generate a symbol table. The solution is to use 'tcc -ar'. The problem now is that some pacages first built an archive with 'tcc -ar c' and later extracts the archive with 'tcc -ar x' and built with this a dylib file. The 'tcc -ar x' failed. So I implemented it. I also added the t option because it was simple to do,
-
herman ten brugge authored
With these option I can now built several packages without problem. There are a lot of options we can add so I tried to implement the minumum. Add the following options: dynamiclib same as -shared flat_namespace default/ignored two_levelnamespace ignored undefined default/ignored install_name name of dynmic lib compatibility_version version dynamic lib current_version version version dynamic lib -Wl options: all_load same as whole-archive force_load same as whole-archive with lib single_module ignored
-
- 18 Dec, 2022 1 commit
-
-
herman ten brugge authored
Export now all global symbols in export trie instead of only text symbols. I wrote too much data into dylib file because I did not check for sk_unknown/sk_discard/sk_uw_info. Simplified code in tccrun.c
-
- 17 Dec, 2022 2 commits
-
-
herman ten brugge authored
Needed when using ...libtcc1-usegcc=yes in lib/Makefile. lib/bcheck.c: Add __clang__ for pragma diagnostic lib/bt-log.c: Add pragma diagnostic as in lib/bcheck.c lib/builtin.c: Add a lot of alias code to allow building with gcc/clang lib/stdatomic.c: Same as lib/builtin.c lib/tcov.c: Avoid clang compiler warning
-
herman ten brugge authored
Macho uses bind/rebase instead of dynsym so disable them for relocate_sections.
-
- 16 Dec, 2022 1 commit
-
-
herman ten brugge authored
Update configure and remove dll=no for Darwin. Also removed dwarf=$dwarf because this is not a config option. In tccelf.c only add __PAGEZERO if stabs and executable. In tccrun.c correct rt_printline_dwarf code for dll. In tests/Makefile disable dlltest with PIC for Darwin because object format of .o file is still in elf. In tccmacho.c add dll support and and rpath support. Corrected trie code. For some reason symbol 'xx' should be after 'xx1'. Corrected weak symbol support for old macho code. Used R_JMP_SLOT instead of R_DATA_PTR in check_relocs.
-
- 13 Dec, 2022 1 commit
-
-
Mathias Krause authored
We already support popcnt, add lzcnt and tzcnt as well. Signed-off-by:
Mathias Krause <minipli@grsecurity.net>
-
- 11 Dec, 2022 2 commits
-
-
herman ten brugge authored
-
herman ten brugge authored
Add new file lib/builtin.c Modify include/tccdefs.h, lib/Makefile to compile it. Update tests/tcctest.c to test it.
-
- 10 Dec, 2022 1 commit
-
-
Petr Skocik authored
This usage has been part of the C grammar since C11 (http://port70.net/~nsz/c/c11/n1570.html#6.7.2.1) and is also supported by gcc and clang.
-
- 06 Dec, 2022 2 commits
-
-
herman ten brugge authored
Fix gen_vla_sp_save/gen_vla_sp_restore in riscv64-gen.c
-
herman ten brugge authored
-
- 05 Dec, 2022 4 commits
-
-
Christian Jullien authored
-
Christian Jullien authored
cosmetic: OSX is a deprecated name, macOS is the official system name for Apple Operating System since 2016.
-
Christian Jullien authored
-
herman ten brugge authored
I tested on macos 10, 11, 12 and 13 that old and new macho code work. I do not know when this new format is introduced but it is now available on a lot of versions. So make it the default. Also default to dwarf=4 because stabs and dwarf=5 is not supported.
-
- 04 Dec, 2022 3 commits
-
-
herman ten brugge authored
The test failed because atexit/on_exit code was not correct. Make it look more like the g_exit_context. Added a sleep to libtcc_test_mt to allow overlap of threads to detect this problem.
-
herman ten brugge authored
Add an array with segement to load instead of code. Dynamically check if segment is used or not. This fixes the strange __DWARF code segment handling.
-
herman ten brugge authored
lldb does not like function end and next function start at same pc
-
- 03 Dec, 2022 1 commit
-
-
noneofyourbusiness authored
-
- 02 Dec, 2022 3 commits
-
-
herman ten brugge authored
The last commit only worked on arm64. The problem was that the new __DWARF segment was empty. I now remove the __DWARF segment if it is not needed. This resolves the rebase problem on x86_64.
-
herman ten brugge authored
-
herman ten brugge authored
Do not align vmsize/filesize to SEG_PAGE_SIZE every time. Move rel_offset check down due to this change.
-