Bug 18423 - call *foo@GOT+200(%eax) is misassembled
Summary: call *foo@GOT+200(%eax) is misassembled
Status: RESOLVED INVALID
Alias: None
Product: binutils
Classification: Unclassified
Component: gas (show other bugs)
Version: 2.26
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-16 14:15 UTC by H.J. Lu
Modified: 2015-05-16 14:45 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2015-05-16 14:15:26 UTC
[hjl@gnu-tools-1 got-1]$ cat x.S
        call *foo@GOT+200(%eax)
[hjl@gnu-tools-1 got-1]$ make
gcc -B./ -m32 -fno-lto    -c -o x.o x.S
./objdump -dwr x.o

x.o:     file format elf32-i386


Disassembly of section .text:

00000000 <.text>:
   0:	ff 90 00 00 00 00    	call   *0x0(%eax)	2: R_386_GOT32	foo
              ^^^^^^^^^^^ No addend for 200
[hjl@gnu-tools-1 got-1]$
Comment 1 H.J. Lu 2015-05-16 14:45:31 UTC
It is done on purpose:

      case BFD_RELOC_386_GOT32:
      case BFD_RELOC_X86_64_GOT32:
        value = 0; /* Fully resolved at runtime.  No addend.  */
        break;