tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] tcc on FreeBSD patch


From: Carl Drougge
Subject: Re: [Tinycc-devel] tcc on FreeBSD patch
Date: Mon, 9 Dec 2002 17:40:17 +0100

On Mon, Dec 09, 2002 at 10:08:13AM +0100, Philippe Ribet wrote:

> > Well, SmartEiffel doesn't like using tcc if it doesn't produce executables,
> > now does it?
> 
> On Linux, SmartEiffel and tcc works very well together. What's wrong on
> FreeBSD?

That executables produced by tcc don't work of course. (Quite reasonable 
since they're linux exes linked against freebsd libraries.)

And it still didn't work after I changed it to make freebsd exes (at least 
file reports them as such now). But since the object files are fine, I 
figured it wasn't a problem, just link using gcc. Except of course that 
SmartEiffel doesn't (easily at least) give you that much control over the 
compilation process, so I made tcc call gcc by itself.

If someone who knows anything about ELF feels like pointing me in the right 
direction about why they don't work I might look further into it. This is 
what you currently get if you let tcc link:

address@hidden ./tcc -B. -o c c.c
address@hidden ktrace ./c
zsh: abort      ktrace ./c
address@hidden kdump
 92653 ktrace   RET   ktrace 0
 92653 ktrace   CALL  execve(0xbfbff657,0xbfbff524,0xbfbff52c)
 92653 ktrace   NAMI  "./c"
address@hidden 

In other words, the ELF loader rejects it. When it's linked by gcc it works.
The first lines of kdump then look like this:

address@hidden tcc -o c c.c                      
address@hidden ktrace ./c
address@hidden kdump
 92664 ktrace   RET   ktrace 0
 92664 ktrace   CALL  execve(0xbfbff647,0xbfbff514,0xbfbff51c)
 92664 ktrace   NAMI  "./c"
 92664 ktrace   NAMI  "/usr/libexec/ld-elf.so.1"
 92664 c        RET   execve 0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]