Handle R_X86_64_64 properly for x32
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 11 May 2012 11:10:19 +0000 (11:10 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 11 May 2012 11:10:19 +0000 (11:10 +0000)
elfcpp/

PR gold/14091
* x86_64.h (R_X86_64_RELATIVE64): New.

gold/

PR gold/14091
* x86_64.cc (Target_x86_64::Scan::local): For x32, generate
R_X86_64_RELATIVE64 instead of R_X86_64_RELATIVE in case of
R_X86_64_64.

elfcpp/ChangeLog
elfcpp/x86_64.h
gold/ChangeLog
gold/x86_64.cc

index 1ec14e8b301b4905561158784ec796008e5317b6..4c25a870eb84101113255fb4ca6e472b254a1778 100644 (file)
@@ -1,3 +1,8 @@
+2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR gold/14091
+       * x86_64.h (R_X86_64_RELATIVE64): New.
+
 2012-05-01  Cary Coutant  <ccoutant@google.com>
 
        * dwarf.h (enum DW_TAG, enum DW_FORM, enum DW_AT, enum DW_ENCODING)
index ae7d0a8ba5b51fa3adc3bf23e09350c5e622cfb7..a53beac947c11a40ff1a2a25b7539f65d9627b76 100644 (file)
@@ -91,6 +91,7 @@ enum
   R_X86_64_TLSDESC_CALL = 35,    // Relaxable call through TLS descriptor
   R_X86_64_TLSDESC = 36,         // 2 by 64-bit TLS descriptor
   R_X86_64_IRELATIVE = 37,          // Adjust indirectly by program base
+  R_X86_64_RELATIVE64 = 38,      // 64-bit adjust by program base
   // GNU vtable garbage collection extensions.
   R_X86_64_GNU_VTINHERIT = 250,
   R_X86_64_GNU_VTENTRY = 251
index 9e28c6273d09a18cc8aaebf1ee10e03642087f85..7fffe40fd6ba2a59054b7c28d54048f5037e1460 100644 (file)
@@ -1,3 +1,10 @@
+2012-05-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR gold/14091
+       * x86_64.cc (Target_x86_64::Scan::local): For x32, generate
+       R_X86_64_RELATIVE64 instead of R_X86_64_RELATIVE in case of
+       R_X86_64_64.
+
 2012-05-08  Cary Coutant  <ccoutant@google.com>
 
        * layout.cc (gdb_sections): Update GDB version, add .debug_addr.
index 1339e6ff6b16ae259153979764d5120b17f96f8c..2ac29bf0d45010d4e90287bfa3413db34c637d82 100644 (file)
@@ -2299,7 +2299,9 @@ Target_x86_64<size>::Scan::local(Symbol_table* symtab,
          unsigned int r_sym = elfcpp::elf_r_sym<size>(reloc.get_r_info());
          Reloc_section* rela_dyn = target->rela_dyn_section(layout);
          rela_dyn->add_local_relative(object, r_sym,
-                                      elfcpp::R_X86_64_RELATIVE,
+                                      (size == 32 
+                                       ? elfcpp::R_X86_64_RELATIVE64
+                                       : elfcpp::R_X86_64_RELATIVE),
                                       output_section, data_shndx,
                                       reloc.get_r_offset(),
                                       reloc.get_r_addend(), is_ifunc);
This page took 0.033202 seconds and 4 git commands to generate.