The other missing point in the x86-64 port is the support for asm
inlines. Are there plans
to implement it before the release? as far as I can see, all the work
should be done in
i386-asm.h where the opcodes are defined and x86-64 opcodes is mostly
binary
compatible with the i386 ones (some of them are >1 byte bigger and there
are some new
opcodes like the "syscall" one. But a basic port should be fast do
implement.
Thanks for such a great work!
--pancake
grischka wrote:
shinichiro.h wrote:
Hi,
I like this idea. But unfortunately, this needs some fixes for
x86-64. On x86-64, relocation may fail when the distance between
caller and callee is larger than 32bit. In such case, x86-64 TCC
generates PLT and GOT during relocation and it requires extra memory.
Anyway, I'll fix this.
Hm, does that mean we support programs larger than 2GB? 4GB?
I've just checked this fix in. This fix includes the fix for order of
relocate_syms and return offset. Please revert this change if I'm
missing something.
As to relocate_syms runned twice, it is just meant to check symbols
already in the 1st pass, so the user doesn't have to check the
return value of tcc_relocate twice. That's the only reason.
As to "runtime_plt_and_got", well, I don't know much about PLT/GOT
but it looks like tccpe.c:1129 is doing something similar. Basically
it makes an indirect "jmp" and puts a reloc entry on the address
such that it gets fixed later during normal relocate_section.
It means that the jmp table need to be build BEFORE relocation,
however isn't that what build_got_entries() is doing already, anyway?
Couldn't it be used to add the needed entries for TCC_OUTPUT_MEMORY,
too? (Maybe I'm just naive)
--- grischka
_______________________________________________
Tinycc-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/tinycc-devel
_______________________________________________
Tinycc-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/tinycc-devel