| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
This enables native unwind semantics with longjmp on
win64 by putting an entry into the .pdata section for
each compiled fuction.
Also, the function now use a fixed stack and store arguments
into X(%rsp) rather than using push.
|
| |
|
|
| |
If you want that, run: make NOTALLINONE=1
|
| |
|
|
| |
exception handler borrowed from k1w1. Thanks.
|
| | |
|
| |
|
|
| |
factor out -run support
|
| | |
|
| |
|
|
| |
-lfoo searches: foo.def, libfoo.def, foo.dll, libfoo.dll
|
| | |
|
| |
|
|
|
| |
Also, disable 16bit support for now as it causes bugs
in 32bit mode. #define I386_ASM_16 if you want it.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
This was confusing objdump such that it did not print
disassembly with -d.
Also, put filename as with C compilation
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
main (int argc, char *argv[])
{
char *p = (char *)0x12345678ABCD000F;
int res;
res = (p != (char *)0x12345678ABCD000F);
return res;
}
|
| |
|
|
|
|
| |
With imul the 3rd operand defaults to the 2nd on. The previous
logic left 'op_type[2]' uninitialized which caused the bug to
show up only sometimes.
|
| |
|
|
|
| |
Store (part of) the AttributeDef structure in the (int)sym-r
field of the typedef symbol (kludgy).
|
| |
|
|
|
|
|
| |
When storing structs with a memcpy call in vstore(),
so far a needless entry remaining on the vstack
sometimes resulted in an useless store generated by
save_regs() in gfunc_call() for the memcpy routine.
|
| |
|
|
| |
Signed-off-by: aldot <rep.dot.nop@gmail.com>
|
| |
|
|
|
|
| |
Previously ./configure --prefix=/foo --help didn't show the help-text
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Sun, Nov 22, 2009 at 05:43:14PM +0100, Luigi Rizzo wrote:
> Hi,
> there is a well known problem with tcc and FreeBSD in the generation
> of elf objects -- see
> http://lists.gnu.org/archive/html/tinycc-devel/2005-07/msg00070.html
>
> Apparently Sergey Lyubka has tried a partial fix to the problem.
> I was wondering if Sergey or someone can post some more detail on
> what needs to be done so we can try to help fixing this issue
I think i have managed to solve the problem and produce
almost valid elf files on FreeBSD. The two patches attached
address a few problems (trying to explain to the
best of my knowledge; i am not very familiar with ELF and
the FreeBSD ELF conventions):
1. ELF file format
tcc produces an ELF executable which is good for linux but
not for FreeBSD. It misses the PHDR section which is almost
mandatory for shared executables, puts in the .dynsym section
some relocation info that FreeBSD expects to be in .got,
and expect the relocation sections to be contiguous.
patch-tccelf.c tries to address the above problem using
conditional sections (so hopefully can be imported upstream)
and also adds the ability to override the name of the dynamic
loader through an environment variable (this is important to
debug tcc).
2. predefined macros
patch-libtcc.c adds/fixes some predefined macros when compiling
on FreeBSD: these are __FreeBSD__ and the usual set of
__i386__ and __unix__ variants.
It also sets __INTEL_COMPILER so we can grab the __aligned
macro from cdefs.h , otherwise many programs would fail
The resulting elf file is still not 100% correct -- if you strip it,
the program will not run (presumably there is some dangling reference).
Other than that, program do seem to run correctly.
It would be nice to integrate these patches in the main repository.
The FreeBSD specific code is in #ifdef so it should not harm
linux users
cheers
luigi
|
| | |
|
| | |
|
| |
|
|
| |
Reported by Martin Ettl (thanks)
|
| |
|
|
| |
Now that we have it thanks to Mr. Féret
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
The new 16bit code was causing wrong 0x66 prefixes
in 32bit code.
The fix possibly breaks the feature on 16bit asm.
|
| |
|
|
| |
This broke writing executables.
|
| |
|
|
| |
Signed-off-by: aldot <rep.dot.nop@gmail.com>
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Previously sizeof would return the size of the array although the
expression is always a plain pointer of 4 (or 8) bytes.
|