[Top] [All Lists]

Re: binutils 2.8.1 problems

To: Ralf Baechle <>
Subject: Re: binutils 2.8.1 problems
From: Michael Shmulevich <>
Date: Tue, 08 May 2001 10:36:34 +0300
Cc: Ian Thompson <>,
Organization: Jungo LTD
References: <> <>
User-agent: Mozilla/5.0 (X11; U; Linux 2.2.17-21mdk i686; en-US; 0.8.1) Gecko/20010326
So then is a binutils and not a compiler problem.  What binutils are you
using?  Binutils 2.8.1 which I'm still recommending (mostly to avoid
sending people into a maze of version dependencies) is getting dated and
the bug may well have been fixed in the meantime.

I have met a weird bug in binutils 2.8.1 on mips lately: when using ".weak" directive in some module which make use of the same asliased symbol, during linkage the symbol doesn't get relocated to a "strong" symbol:

in foo.c:
extern void bar();

void foo(){
__asm__(".weak bar; bar = foo");

void f1(){

in bar.c:
void bar(){
in main.c:
extern void bar();
extern void f1();

int main(){

This code produce printout of
since f1() always calls foo() no matter that bar() is defined outside.
AFIAIK, there is no ".weakext" macro in 2.8.1.

Using objdump on foo.o I see there is no relocation entry for bar, however using gas-2.10 on exactly same assembly does produce relocation entry. So it must definitely be a "gas" problem.

Sincerely yours,
Michael Shmulevich
Software Developer
Jungo - R&D
Phone: 1-877-514-0537(USA)  +972-9-8859365(Worldwide) ext. 233
Fax:   1-877-514-0538(USA)  +972-9-8859366(Worldwide)

<Prev in Thread] Current Thread [Next in Thread>