tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Linker problem


From: Rob Landley
Subject: Re: [Tinycc-devel] Linker problem
Date: Tue, 4 Sep 2007 23:49:02 -0500
User-agent: KMail/1.9.6

On Tuesday 08 May 2007 6:13:36 am Philippe Ribet wrote:
> Vincent Pit wrote:
> >Philippe Ribet a écrit :
> >>Hello,
> >>
> >>I just downloaded the latest mercurial repository and I still get the
> >>very same problem as described here:
> >>http://lists.gnu.org/archive/html/tinycc-devel/2007-02/msg00041.html
> >>
> >>The problem occurs with atexit and some other functions. My system is
> >>Debian/etch.
> >>
> >>This message appears many times:
> >>/usr/lib/libc_nonshared.a: '__i686.get_pc_thunk.bx' defined twice
> >>
> >>
> >>Here is the code I'm unable to compile:
> >>#include <stdio.h>
> >>#include <stdlib.h>
> >>
> >>void finish() {
> >> printf("The end...\n");
> >>}
> >>int main()
> >>{
> >> atexit(finish);
> >> printf("Hello World\n");
> >> return 0;
> >>}
> >>
> >>Does someone have any idea?
> >>
> >>Thanks for any help,
> >
> >Hello,
> >
> >This is related to
> >http://lists.gnu.org/archive/html/tinycc-devel/2007-04/msg00003.html and
> >the very recent
> >http://lists.gnu.org/archive/html/tinycc-devel/2007-05/msg00057.html.
> >This problem happens because tcc doesn't handle visibility attributes. I
> >submitted a patch in the first of those links.
>
> Thanks for the quick reply.
>
> I remember I read your mail with the patch. I thought the patch was
> applied to the hg repository, that's why I tried again.
>
> I just applied manually the patch and it works for me. Thanks!

Huh, I thought I'd applied this patch already, but I just hit this bug (again, 
trying to build new software with tcc) and went "wait, I've seen this".  
Checked my back email and I had this message marked as unread.

yeah, I need to back and deal with my unfinished tcc items, of which there are 
a lot. :)

Anyway, I applied the patch, and I also noticed the stripping problem you saw:

> PS: 'strip' does not work anymore on executables generated by tcc.

Specifically, the error I get is:

BFD: toybox_unstripped: no group info for section .text.__i686.get_pc_thunk.bx

Which is the symbol it was complaining about being defined twice before I did 
the patch, so it definitely seems to be fallout from this patch.  I'm going 
to have to learn about elf headers now, aren't I?  Oh well, 
http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html was a fun 
introduction...

Rob
-- 
"One of my most productive days was throwing away 1000 lines of code."
  - Ken Thompson.




reply via email to

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