bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/21168] New: ld should allow "lea address@hidden, %ecx"


From: hjl.tools at gmail dot com
Subject: [Bug ld/21168] New: ld should allow "lea address@hidden, %ecx"
Date: Wed, 15 Feb 2017 16:33:04 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=21168

            Bug ID: 21168
           Summary: ld should allow "lea address@hidden, %ecx"
           Product: binutils
           Version: 2.29 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: hjl.tools at gmail dot com
  Target Milestone: ---
            Target: i386-elf

address@hidden xxxx]$ cat x.S 
        .text
        .globl  bar
        .type   bar, @function
bar:
        call    __x86.get_pc_thunk.ax
        addl    $_GLOBAL_OFFSET_TABLE_, %eax
        lea     address@hidden, %ecx
        mov     (%eax,%ecx,1), %eax
        ret
        .section       
.text.__x86.get_pc_thunk.ax,"axG",@progbits,__x86.get_pc_thunk.ax,comdat
        .globl  __x86.get_pc_thunk.ax
        .hidden __x86.get_pc_thunk.ax
        .type   __x86.get_pc_thunk.ax, @function
__x86.get_pc_thunk.ax:
        movl    (%esp), %eax
        ret
        .section        .note.GNU-stack,"",@progbits
address@hidden xxxx]$ make libx.so
gcc -B./ -m32    -c -o x.o x.S
./ld -melf_i386 -shared -o libx.so x.o
./ld: x.o: direct GOT relocation R_386_GOT32 against `foo' without base
register can not be used when making a shared object
./ld: final link failed: Bad value
Makefile:28: recipe for target 'libx.so' failed
make: *** [libx.so] Error 1
address@hidden xxxx]$ 

Here "lea address@hidden, %ecx" is OK.

-- 
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]