This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ATTRIBUTE_WEAK


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|


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]