This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
PATCH: x86_64 Linux kernel failed to build with the binutils in CVS
On Wed, Apr 06, 2005 at 03:20:08PM -0700, H. J. Lu wrote:
> On Wed, Apr 06, 2005 at 02:23:58PM -0700, H. J. Lu wrote:
> > I got
> >
>
> This patch is the cause
>
> http://sourceware.org/ml/binutils/2005-03/msg00850.html
>
I am testing this patch. I will check it in if kernel boots.
H.J.
----
gas/
2005-04-06 H.J. Lu <hongjiu.lu@intel.com>
* config/tc-i386.c (tc_gen_reloc): Don't turn
BFD_RELOC_X86_64_32S into BFD_RELOC_32.
gas/testsuite/
2005-04-06 H.J. Lu <hongjiu.lu@intel.com>
* gas/i386/x86-64-pcrel.s: Test R_X86_64_32S.
* gas/i386/x86-64-pcrel.d: Updated.
--- gas/config/tc-i386.c.pcrel 2005-04-06 10:50:12.000000000 -0700
+++ gas/config/tc-i386.c 2005-04-06 16:25:21.394634421 -0700
@@ -5378,6 +5378,13 @@ tc_gen_reloc (section, fixp)
#endif
code = fixp->fx_r_type;
break;
+ case BFD_RELOC_X86_64_32S:
+ if (!fixp->fx_pcrel)
+ {
+ /* Don't turn BFD_RELOC_X86_64_32S into BFD_RELOC_32. */
+ code = fixp->fx_r_type;
+ break;
+ }
default:
if (fixp->fx_pcrel)
{
--- gas/testsuite/gas/i386/x86-64-pcrel.d.pcrel 2005-04-01 06:34:23.000000000 -0800
+++ gas/testsuite/gas/i386/x86-64-pcrel.d 2005-04-06 16:30:29.548881232 -0700
@@ -10,4 +10,5 @@ Disassembly of section .text:
[ ]*[0-9a-f]+:[ ]+66 b8 00 00[ ]+movw?[ ]+\$(0x)?0,%ax[ ]*[0-9a-f]+:[ ]+R_X86_64_PC16[ ]+xtrn\+(0x)?2
[ ]*[0-9a-f]+:[ ]+b8 00 00 00 00[ ]+movl?[ ]+\$(0x)?0,%eax[ ]*[0-9a-f]+:[ ]+R_X86_64_PC32[ ]+xtrn\+(0x)?1
[ ]*[0-9a-f]+:[ ]+48 c7 c0 00 00 00 00[ ]+movq?[ ]+\$(0x)?0,%rax[ ]*[0-9a-f]+:[ ]+R_X86_64_PC32[ ]+xtrn\+(0x)?3
+[ ]*[0-9a-f]+:[ ]+48 c7 c0 00 00 00 00[ ]+movq?[ ]+\$(0x)?0,%rax[ ]*[0-9a-f]+:[ ]+R_X86_64_32S[ ]+xtrn
#pass
--- gas/testsuite/gas/i386/x86-64-pcrel.s.pcrel 2005-04-01 06:34:23.000000000 -0800
+++ gas/testsuite/gas/i386/x86-64-pcrel.s 2005-04-06 16:27:02.801552504 -0700
@@ -4,5 +4,6 @@ _start:
movw $(xtrn - .), %ax
movl $(xtrn - .), %eax
movq $(xtrn - .), %rax
+ movq $xtrn, %rax
.p2align 4,0