|
From: | grischka |
Subject: | Re: [Tinycc-devel] tcc shared libraries with gcc programs |
Date: | Fri, 02 Sep 2011 02:41:50 +0200 |
User-agent: | Thunderbird 2.0.0.24 (Windows/20100228) |
Rob Heatherly wrote:
tcc -Wall -Wunsupported -bench -shared -soname libyLOG.so.1 -o libyLOG.so.1.0 -lrt yLOG.c It performs as expected when my main program is compiled with tcc, but when that same main program is complied with gcc I get the following when linking... libyLOG.so: file not recognized: File format not recognized When I recompile the yLOG library with the tcc "-g" flag, the main gcc program compiles/links to it with no problem. Small, but maybe confusing deal. Am I missing or doing something classically stupid?
Indeed that looks confusing. I tried this setup with a _very_ simple foo.so (with only one "hello world" type function) and it seemed to work finr, regardless of -g. (using a gcc 4.3.2 on an older ubuntu64 for the main program). However I also tried that with libtcc.so as produced with ./configure --disable-static and then running the result gave a lot of errors about relocations out of range and then crashed. Also regardless of -g. Which suggests that there might be something wrong with tcc's shared libraries on x86-64. I can't tell what however. One thing to note is that tcc does not support -fPIC while gcc actually requires it for libtcc.so. Maybe it has to do with that, maybe not. --- grischka
[Prev in Thread] | Current Thread | [Next in Thread] |