bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/13682] New: delay-load doesn't work for target x86_64-w64-


From: erik-sources-redhat-bugzilla at vanpienbroek dot nl
Subject: [Bug binutils/13682] New: delay-load doesn't work for target x86_64-w64-mingw32
Date: Sat, 11 Feb 2012 17:51:07 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=13682

             Bug #: 13682
           Summary: delay-load doesn't work for target x86_64-w64-mingw32
           Product: binutils
           Version: 2.23 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
        AssignedTo: address@hidden
        ReportedBy: address@hidden
                CC: address@hidden
    Classification: Unclassified


Generating a delay-load import library using dlltool fails to work for the
x86_64-w64-mingw32 target:

$ cat mylib.def 
LIBRARY mylib.dll
EXPORTS
my_func

$ x86_64-w64-mingw32-dlltool --def mylib.def --kill-at --output-delaylib
mylib.dll.a -n
dxeuh.s: Assembler messages:
dxeuh.s:5: Error: invalid instruction suffix for `push'
dxeuh.s:6: Error: invalid instruction suffix for `push'
dxeuh.s:7: Error: invalid instruction suffix for `push'
dxeuh.s:8: Error: invalid instruction suffix for `push'
dxeuh.s:10: Error: invalid instruction suffix for `pop'
dxeuh.s:11: Error: invalid instruction suffix for `pop'
dxeuh.s:12: Error: operand type mismatch for `jmp'
x86_64-w64-mingw32-dlltool: x86_64-w64-mingw32-as exited with status 1
x86_64-w64-mingw32-dlltool: failed to open temporary head file: dxeuh.o: No
such file or directory

$ cat dxeuh.s 
# Import trampoline
    .section    .text
    .global    __tailMerge_mylib_dll_a
__tailMerge_mylib_dll_a:
    pushl %ecx
    pushl %edx
    pushl %eax
    pushl $__DELAY_IMPORT_DESCRIPTOR_mylib_dll_a
    call address@hidden
    popl %edx
    popl %ecx
    jmp *%eax

# DELAY_IMPORT_DESCRIPTOR
.section    .text$2
.global __DELAY_IMPORT_DESCRIPTOR_mylib_dll_a
__DELAY_IMPORT_DESCRIPTOR_mylib_dll_a:
    .long 1    # grAttrs
    .rva    __mylib_dll_a_iname    # rvaDLLName
    .rva    __DLL_HANDLE_mylib_dll_a    # rvaHmod
    .rva    __IAT_mylib_dll_a    # rvaIAT
    .rva    __INT_mylib_dll_a    # rvaINT
    .long    0    # rvaBoundIAT
    .long    0    # rvaUnloadIAT
    .long    0    # dwTimeStamp

.section .data
__DLL_HANDLE_mylib_dll_a:
    .long    0    # Handle

#Stuff for compatibility
    .section    .idata$5
    .long    0
    .long    0
__IAT_mylib_dll_a:
    .section    .idata$4
    .long    0
    .section    .idata$4
__INT_mylib_dll_a:
    .section    .idata$2


If the same command is tried using i686-w64-mingw32-dlltool then the import
library is generated without problems.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]