https://sourceware.org/bugzilla/show_bug.cgi?id=23854
H.J. Lu <hjl.tools at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |WAITING Last reconfirmed| |2018-11-04 CC| |hjl.tools at gmail dot com Ever confirmed|0 |1 --- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> --- dpmi.o has: 8f69: 8b 83 00 00 00 00 mov 0x0(%ebx),%eax 8f6b: R_386_GOT32X DPMI_return_from_realmode 8f6f: 66 05 00 48 add $0x4800,%ax 8f73: 66 2b 83 00 00 00 00 sub 0x0(%ebx),%ax 8f76: R_386_GOT32X DPMI_dummy_start 8f7a: 66 89 46 30 mov %ax,0x30(%esi) Only the lower 16 bits of GOT slot are used. It leads to: [hjl@gnu-cfl-1 pr23854]$ cat pr23854.s .data .type bar, @object bar: .byte 1 .size bar, .-bar .globl foo .type foo, @object foo: .byte 1 .size foo, .-foo .text .globl _start .type _start, @function _start: adcw bar@GOT(%ecx), %ax addw bar@GOT(%ecx), %bx andw bar@GOT(%ecx), %cx cmpw bar@GOT(%ecx), %dx orw bar@GOT(%ecx), %di sbbw bar@GOT(%ecx), %si subw bar@GOT(%ecx), %bp xorw bar@GOT(%ecx), %sp testw %cx, bar@GOT(%ecx) adcw foo@GOT(%ecx), %ax addw foo@GOT(%ecx), %bx andw foo@GOT(%ecx), %cx cmpw foo@GOT(%ecx), %dx orw foo@GOT(%ecx), %di sbbw foo@GOT(%ecx), %si subw foo@GOT(%ecx), %bp xorw foo@GOT(%ecx), %sp testw %cx, foo@GOT(%ecx) .size _start, .-_start [hjl@gnu-cfl-1 pr23854]$ make as --32 -o pr23854.o pr23854.s ld -melf_i386 -o pr23854 pr23854.o [hjl@gnu-cfl-1 pr23854]$ objdump -dw pr23854 pr23854: file format elf32-i386 Disassembly of section .text: 08049000 <_start>: 8049000: 66 81 d0 00 a0 adc $0xa000,%ax 8049005: 04 08 add $0x8,%al 8049007: 66 81 c3 00 a0 add $0xa000,%bx 804900c: 04 08 add $0x8,%al 804900e: 66 81 e1 00 a0 and $0xa000,%cx 8049013: 04 08 add $0x8,%al 8049015: 66 81 fa 00 a0 cmp $0xa000,%dx 804901a: 04 08 add $0x8,%al 804901c: 66 81 cf 00 a0 or $0xa000,%di 8049021: 04 08 add $0x8,%al 8049023: 66 81 de 00 a0 sbb $0xa000,%si 8049028: 04 08 add $0x8,%al 804902a: 66 81 ed 00 a0 sub $0xa000,%bp 804902f: 04 08 add $0x8,%al 8049031: 66 81 f4 00 a0 xor $0xa000,%sp 8049036: 04 08 add $0x8,%al 8049038: 66 f7 c1 00 a0 test $0xa000,%cx 804903d: 04 08 add $0x8,%al 804903f: 66 81 d0 01 a0 adc $0xa001,%ax 8049044: 04 08 add $0x8,%al 8049046: 66 81 c3 01 a0 add $0xa001,%bx 804904b: 04 08 add $0x8,%al 804904d: 66 81 e1 01 a0 and $0xa001,%cx 8049052: 04 08 add $0x8,%al 8049054: 66 81 fa 01 a0 cmp $0xa001,%dx 8049059: 04 08 add $0x8,%al 804905b: 66 81 cf 01 a0 or $0xa001,%di 8049060: 04 08 add $0x8,%al 8049062: 66 81 de 01 a0 sbb $0xa001,%si 8049067: 04 08 add $0x8,%al 8049069: 66 81 ed 01 a0 sub $0xa001,%bp 804906e: 04 08 add $0x8,%al 8049070: 66 81 f4 01 a0 xor $0xa001,%sp 8049075: 04 08 add $0x8,%al 8049077: 66 f7 c1 01 a0 test $0xa001,%cx 804907c: 04 08 add $0x8,%al [hjl@gnu-cfl-1 pr23854]$ Does dpmi.o contain normal i386 code? -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils