Hmm, well the problem is we talking about /usr/lib/crt1.o, and I want to
compile a hosted program. In freestanding case, it would not complain.
But tcc supposed to load glibc's CRT, but if tcc cannot load it, then
you are unable to link a hosted program.
The problematic stuff is the 7th section in my crt1.o, which is a
relocation section of an ARM_EXIDX. And somehow the 6th section (which
is the ARM_EXIDX) is not loaded into 'sm_table'. You could say "ah, the
tcc does not support ARM_EXIDX", but in this case the answer is wrong,
because ARM_EXIDX is part of the ARM ELF ABI.
http://infocenter.arm.com/help/topic/com.arm.doc.ihi0044f/IHI0044F_aaelf.pdf
Take all into account, I would say, tcc should (at least) ignore the
ARM_EXIDX, and not crash on it.
About the "variety of elf file format": yes, it highly varies on
architectures, but on a specified architecture it is well-known what's
inside. Refer to different architecture ABI specifications, like the ARM
one I linked.
On 12/23/18 10:59 AM, Pursuer wrote:
I hava read this mail. On my computer, tcc usually can't load the
object file which compiled by other compiler. I guess It's due to
the?0?2variety of elf file format(I know very little about elf file
format). ?0?2So I only plan to use tcc as a jit?0?2library of c, and only
load the object file compiled by tcc self. (Also I hope tcc can catch
the error instead of aborting process.)
------------------?0?2Original?0?2------------------
*From: *?0?2"Barath Aron"<baratha...@caesar.elte.hu>;
*Date: *?0?2Sun, Dec 23, 2018 05:23 PM
*To: *?0?2"tinycc-devel"<tinycc-devel@nongnu.org>;
*Subject: *?0?2Re: [Tinycc-devel] When is planned to be released the next
versionof Tcc?
Scroll back to my mail dated on 12/3/18, 5:34 PM for details of the crash.
On 12/23/18 10:07 AM, Christian Jullien wrote:
> Ouch! I don??t know about ARCH ARM Linux, I can just say it works
nicely on RPi ARM board:
>
> jullien@sims3:~ $ tcc -v
> tcc version 0.9.27 (ARM Hard Float Linux)
>
> jullien@sims3:~ $ uname -a
> Linux sims3 4.14.89-v7+ #1182 SMP Tue Dec 18 00:35:25 GMT 2018
armv7l GNU/Linux
>
> jullien@sims3:~ $ cat hello1.c
> #include <stdio.h>
>
> int main(int argc, char* argv[])
> {
>?0?2?0?2?0?2?0?2?0?2?0?2?0?2?0?2?0?2 printf("Hello World!\n");
>?0?2?0?2?0?2?0?2?0?2?0?2?0?2?0?2?0?2 return 0;
> }
> jullien@sims3:~ $ tcc hello1.c
> jullien@sims3:~ $ ./a.out
> Hello World!
>
> This tcc version allows me to pass my Lisp compiler huge non
regression test suite.
>
>
> From: Tinycc-devel
[mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org] On Behalf Of
Barath Aron
> Sent: dimanche 23 d??cembre 2018 09:23
> To: tinycc-devel@nongnu.org
> Subject: Re: [Tinycc-devel] When is planned to be released the next
version of Tcc?
>
> Let we argue about the "almost bug free" thing. I have a major issue
with 0.9.27:
>
> $ tcc -v
> tcc version 0.9.27 (ARM Linux)
>
> $ uname -a
> Linux alarm 4.18.13-1-ARCH #1 SMP PREEMPT Thu Oct 11 02:22:56 UTC
2018 armv7l GNU/Linux
>
> $ cat hello1.c
> #include <stdio.h>
>
> int main(int argc, char* argv[])
> {
>?0?2?0?2?0?2?0?2?0?2 printf("Hello World!\n");
>?0?2?0?2?0?2?0?2?0?2 return 0;
> }
>
> $ tcc hello1.c
> Segmentation fault (core dumped)
>
> I suppose this is not the intended behavior. Same effect with
official package and with mob.
> (I already reported this bug, but it seems nobody cares.)
>
> Aron
>
> On 12/23/18 8:25 AM, Christian Jullien wrote:
> I??m not the maintainer of tcc but I??ve no sign of a new version
anytime soon.
> What I can say however is that:
> - 0.9.27 released last year is damn good and almost bug free on
supported platforms (I personally tested)
> - Since last release, tcc activity has been rather low and I see no
real reasons to publish a 0.9.28
> - I you want the latest version, I invite you to use mod which is
also very stable.
> - As a general rule for a new version is that it comes out ?? when
it??s ready
>
> M2c
>
> From: Tinycc-devel
[mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org] On Behalf Of
Kantor Zsolt
> Sent: samedi 22 d??cembre 2018 14:52
> To: tinycc-devel@nongnu.org
> Subject: [Tinycc-devel] When is planned to be released the next
version of Tcc?
>
> The question is in the subject.
>
> Thanks.
>
>
> _______________________________________________
> Tinycc-devel mailing list
> Tinycc-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
>
>
>
> _______________________________________________
> Tinycc-devel mailing list
> Tinycc-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel