This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 8bit and 16bit relocations in gold


> > First the crash happen really in the real mode code which has 8 and 16bit
> > relocations (arch/x86/boot/* in a modern linux kernel tree). This is
> > generated from a custom linker script (arch/x86/boot/setup.ld)

Looks like a couple of cut-n-paste typos (probably mine) in i386.cc.
This patch ought to fix this problem; I'll get it tested and work up a
real patch later today...

-cary

Index: i386.cc
===================================================================
RCS file: /cvs/src/src/gold/i386.cc,v
retrieving revision 1.72
diff -u -p -r1.72 i386.cc
--- i386.cc	19 Apr 2008 18:30:58 -0000	1.72
+++ i386.cc	28 Apr 2008 18:01:40 -0000
@@ -1663,7 +1663,7 @@ Target_i386::Relocate::relocate(const Re
         if (gsym != NULL && gsym->type() == elfcpp::STT_FUNC)
           ref_flags |= Symbol::FUNCTION_CALL;
         if (should_apply_static_reloc(gsym, ref_flags, false))
-          Relocate_functions<32, false>::pcrel32(view, object,
psymval, address);
+          Relocate_functions<32, false>::pcrel16(view, object,
psymval, address);
       }
       break;

@@ -1678,7 +1678,7 @@ Target_i386::Relocate::relocate(const Re
         if (gsym != NULL && gsym->type() == elfcpp::STT_FUNC)
           ref_flags |= Symbol::FUNCTION_CALL;
         if (should_apply_static_reloc(gsym, ref_flags, false))
-          Relocate_functions<32, false>::pcrel32(view, object,
psymval, address);
+          Relocate_functions<32, false>::pcrel8(view, object,
psymval, address);
       }
       break;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]