This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH,PE-COFF,PR11603] Allow ld to export symbols containing dots from DLLs.


On Mon, May 17, 2010 at 12:46 PM, Dave Korn <dave.korn.cygwin@gmail.com> wrote:
> On 17/05/2010 17:15, Doug Semler wrote:
>> Dave I did a test on x86_64-w64 and it's not exporting the data
>> symbols from the DLLs. ?I'm not sure whether it's another underscoring
>> issue or a PEBKAC error but I'm investigating...i'll know more in a
>> little while...
>
> ?Simple test case, by any chance?

Yeah.  Looks like gcc (4.5) isn't generating a correct .drective if
there are both thread local data and exported functions in the same
module.  If I take the __thread off, it exports both.  If I get rid of
the function definition it exports i properly.

__thread __declspec(dllexport) int i;
__declspec(dllexport) int function() { return 42; }

generates:

        .file   "foo.c"
.globl __emutls_v.i
        .data
        .align 32
__emutls_v.i:
        .quad   4
        .quad   4
        .quad   0
        .quad   0
        .text
.globl function
        .def    function;       .scl    2;      .type   32;     .endef
function:
        pushq   %rbp
        movq    %rsp, %rbp
        movl    $42, %eax
        leave
        ret
        .section .drectve
        .ascii " -export:function"


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