This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: ATTRIBUTE_WEAK
- To: egcs at egcs dot cygnus dot com
- Subject: Re: ATTRIBUTE_WEAK
- From: Paul Derbyshire <pderbysh at usa dot net>
- Date: Fri, 26 Feb 1999 01:11:05 -0500
- References: <Your message of Wed, 24 Feb 1999 10:02:51 MST. <m10Fie3-000390C@ocean.lucon.org>
At 11:33 PM 2/24/99 -0700, you wrote:
> .file "foo.c"
> .version "01.01"
>gcc2_compiled.:
>..text
> .align 4
>..globl bar
> .type bar,@function
>bar:
> pushl %ebp
> movl %esp,%ebp
> movl $foo,%eax
> testl %eax,%eax
> je .L2
> call foo
>..L2:
> movl %ebp,%esp
> popl %ebp
> ret
>..Lfe1:
> .size bar,.Lfe1-bar
> .weak foo
>
>Which is the same code I get if I use a #pragma instead.
This code looks ill-formed to me. I've never heard of a pseudo-op "..text",
just ".text". Ditto "..globl"... If your version of egcs is producing asm
like that, I think weak symbol support is the least of your problems.
--
.*. "Clouds are not spheres, mountains are not cones, coastlines are not
-() < circles, and bark is not smooth, nor does lightning travel in a
`*' straight line." -------------------------------------------------
-- B. Mandelbrot |http://surf.to/pgd.net
_____________________ ____|________ Paul Derbyshire pderbysh@usa.net
Programmer & Humanist|ICQ: 10423848|