On Wednesday 29 August 2007 6:12:01 am bifferos wrote: > --- Rob Landley <[EMAIL PROTECTED]> wrote: > > On Wednesday 29 August 2007 3:25:04 am bifferos wrote: > > > I tried to produce a .so file with: > > > > > > tcc -shared -r dll.c -o test_dll.so > > > > > > but when dlopen()ing it I got the error: > > > > > > ./test_dll.so: only ET_DYN and ET_EXEC can be loaded > > > > > > Any ideas what I'm doing wrong? > > > > What version are you using, and what platform are you using it on? > > I tried 0.9.23 on Slackware Linux 11.0. I compiled the same source > code with gcc -shared and it was loaded by my test program no problem. > Then I looked on the list and then discovered the Mercurial repo, so I > tried the tip of that, and got the same result. > > I take it that from your response I am typing the right compilation > command?
Dunno, I'm not very familiar with this area. (It's been around two years since I needed to use dlopen() on a shared library, it's "pull out the man pages" time and I assume you've already done that...) Did you try doing the same thing with gcc? If it works with gcc and not with tcc, it's a bug and we need to fix it. (Comparing the resulting binaries is a good way to figure out what the heck's wrong, too...) Rob -- "One of my most productive days was throwing away 1000 lines of code." - Ken Thompson. _______________________________________________ Tinycc-devel mailing list Tinycc-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/tinycc-devel