]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
bfd/
authorTristan Gingold <gingold@adacore.com>
Fri, 19 Oct 2012 13:02:22 +0000 (13:02 +0000)
committerTristan Gingold <gingold@adacore.com>
Fri, 19 Oct 2012 13:02:22 +0000 (13:02 +0000)
2012-10-16  Sofiane Naci  <sofiane.naci@arm.com>

* elf64-aarch64.c (elf64_aarch64_tls_howto_table): Fix shift value for
R_AARCH64_TLSIE_LD_GOTTPREL_PREL19, R_AARCH64_TLSLE_MOVW_TPREL_G2,
R_AARCH64_TLSLE_MOVW_TPREL_G1, R_AARCH64_TLSLE_MOVW_TPREL_G1_NC,
R_AARCH64_TLSLE_ADD_TPREL_HI12.
(elf64_aarch64_tlsdesc_howto_table): Fix shift value for
R_AARCH64_TLSDESC_LD64_PREL19 and R_AARCH64_TLSDESC_OFF_G1.
(elf64_aarch64_final_link_relocate): Add signed_addend when resolving
AARCH64_TLSLE_*_TPREL_* relocations.

bfd/ChangeLog
bfd/elf64-aarch64.c

index b542abd106d07be33af0855fc02ec285efcde6f5..5c06d60ce2fc2f08a8ee65c54495b721a0b3d6f6 100644 (file)
@@ -1,3 +1,14 @@
+2012-10-16  Sofiane Naci  <sofiane.naci@arm.com>
+
+       * elf64-aarch64.c (elf64_aarch64_tls_howto_table): Fix shift value for
+       R_AARCH64_TLSIE_LD_GOTTPREL_PREL19, R_AARCH64_TLSLE_MOVW_TPREL_G2,
+       R_AARCH64_TLSLE_MOVW_TPREL_G1, R_AARCH64_TLSLE_MOVW_TPREL_G1_NC,
+       R_AARCH64_TLSLE_ADD_TPREL_HI12.
+       (elf64_aarch64_tlsdesc_howto_table): Fix shift value for
+       R_AARCH64_TLSDESC_LD64_PREL19 and R_AARCH64_TLSDESC_OFF_G1.
+       (elf64_aarch64_final_link_relocate): Add signed_addend when resolving
+       AARCH64_TLSLE_*_TPREL_* relocations.
+
 2012-09-20  Walter Lee  <walt@tilera.com>
 
        * elf32-tilepro.c (tilepro_elf_relocate_section): Adjust got
index 9a74b2d2e506291bf0c5506b9da309ba128ce362..91d241d6c8eded7d16fd92ddb428fea3b4981d63 100644 (file)
@@ -1057,7 +1057,7 @@ static reloc_howto_type elf64_aarch64_tls_howto_table[] = {
         FALSE),                /* pcrel_offset */
 
   HOWTO (R_AARCH64_TLSIE_LD_GOTTPREL_PREL19,   /* type */
-        0,                     /* rightshift */
+        2,                     /* rightshift */
         2,                     /* size (0 = byte, 1 = short, 2 = long) */
         21,                    /* bitsize */
         FALSE,                 /* pc_relative */
@@ -1071,7 +1071,7 @@ static reloc_howto_type elf64_aarch64_tls_howto_table[] = {
         FALSE),                /* pcrel_offset */
 
   HOWTO (R_AARCH64_TLSLE_MOVW_TPREL_G2,        /* type */
-        8,                     /* rightshift */
+        32,                    /* rightshift */
         2,                     /* size (0 = byte, 1 = short, 2 = long) */
         12,                    /* bitsize */
         FALSE,                 /* pc_relative */
@@ -1085,7 +1085,7 @@ static reloc_howto_type elf64_aarch64_tls_howto_table[] = {
         FALSE),                /* pcrel_offset */
 
   HOWTO (R_AARCH64_TLSLE_MOVW_TPREL_G1,        /* type */
-        4,                     /* rightshift */
+        16,                    /* rightshift */
         2,                     /* size (0 = byte, 1 = short, 2 = long) */
         12,                    /* bitsize */
         FALSE,                 /* pc_relative */
@@ -1099,7 +1099,7 @@ static reloc_howto_type elf64_aarch64_tls_howto_table[] = {
         FALSE),                /* pcrel_offset */
 
   HOWTO (R_AARCH64_TLSLE_MOVW_TPREL_G1_NC,     /* type */
-        4,                     /* rightshift */
+        16,                    /* rightshift */
         2,                     /* size (0 = byte, 1 = short, 2 = long) */
         12,                    /* bitsize */
         FALSE,                 /* pc_relative */
@@ -1141,7 +1141,7 @@ static reloc_howto_type elf64_aarch64_tls_howto_table[] = {
         FALSE),                /* pcrel_offset */
 
   HOWTO (R_AARCH64_TLSLE_ADD_TPREL_HI12,       /* type */
-        3,                     /* rightshift */
+        12,                    /* rightshift */
         2,                     /* size (0 = byte, 1 = short, 2 = long) */
         12,                    /* bitsize */
         FALSE,                 /* pc_relative */
@@ -1185,7 +1185,7 @@ static reloc_howto_type elf64_aarch64_tls_howto_table[] = {
 
 static reloc_howto_type elf64_aarch64_tlsdesc_howto_table[] = {
   HOWTO (R_AARCH64_TLSDESC_LD64_PREL19,        /* type */
-        0,                     /* rightshift */
+        2,                     /* rightshift */
         2,                     /* size (0 = byte, 1 = short, 2 = long) */
         21,                    /* bitsize */
         TRUE,                  /* pc_relative */
@@ -1259,7 +1259,7 @@ static reloc_howto_type elf64_aarch64_tlsdesc_howto_table[] = {
         FALSE),                /* pcrel_offset */
 
   HOWTO (R_AARCH64_TLSDESC_OFF_G1,     /* type */
-        4,                     /* rightshift */
+        16,                    /* rightshift */
         2,                     /* size (0 = byte, 1 = short, 2 = long) */
         12,                    /* bitsize */
         FALSE,                 /* pc_relative */
@@ -4024,7 +4024,7 @@ elf64_aarch64_final_link_relocate (reloc_howto_type *howto,
     case R_AARCH64_TLSLE_MOVW_TPREL_G1_NC:
     case R_AARCH64_TLSLE_MOVW_TPREL_G2:
       value = aarch64_resolve_relocation (r_type, place, value,
-                                         - tpoff_base (info), weak_undef_p);
+                                         signed_addend - tpoff_base (info), weak_undef_p);
       *unresolved_reloc_p = FALSE;
       break;