Christian Maeder wrote:
Simon Marlow schrieb:
Christian Maeder wrote:
[...]
In PrimOps.s it looks (wrongly mangled?) like this:

.text
        .align 4
        .type   GHC_ZCCReturnable_static_info, @object
        .size   GHC_ZCCReturnable_static_info, 4
        .zero   4
.globl GHC_ZCCReturnable_static_info
GHC_ZCCReturnable_static_info:
[...]
I guess we should just eliminate the .size directives if the linker is
going to be picky about them.  In ghc-asm.lprl you'll find

    $T_COPY_DIRVS   = '^\s*\.(globl|type|size|local)';

if you change it to

    $T_COPY_DIRVS   = '^\s*\.(globl|local)';

Now it looks like:

.text
        .align 4
        .zero   4
GHC_ZCCCallable_static_info:
.text
        .align 4
        .zero   4
.globl GHC_ZCCReturnable_static_info


and elfdump shows:

Section Header[1]:  sh_name: .text
    sh_addr:      0               sh_flags:   [ SHF_ALLOC SHF_EXECINSTR ]
    sh_size:      0x213c          sh_type:    [ SHT_PROGBITS ]


and size 0!

[...]
     [206]  0x0000213c 0x00000000  NOTY GLOB  D    0 .text
GHC_ZCCReturnable_static_info

Is this going to work?

Should be ok, yes. The .size and .type information is only used when linking dynamically (at least on platforms I'm familiar with, which doesn't include Solaris), and we're only using static libraries here.

It might be more correct for _info symbols to get .type function, since they're followed by code. I don't think we should worry about this though.

Cheers,
        Simon
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to