bfd/elfnn-aarch64.c: Cleanup a couple of TLS functions
authorWill Newton <will.newton@linaro.org>
Wed, 21 May 2014 15:49:57 +0000 (16:49 +0100)
committerWill Newton <will.newton@linaro.org>
Wed, 4 Jun 2014 08:35:08 +0000 (09:35 +0100)
Add an assert and remove an unused line of code.

bfd/ChangeLog:

2014-06-04  Will Newton  <will.newton@linaro.org>

        * elfnn-aarch64.c (tpoff_base): Make test of tls_sec
being non-NULL into an assert.
(elfNN_aarch64_tls_relax): Remove unused code.

bfd/ChangeLog
bfd/elfnn-aarch64.c

index 20f1325dec9e9c76b4466324e63faffd0c6bba50..e6b88e321f87774a0fe2b7679756d6667ca072db 100644 (file)
@@ -1,3 +1,9 @@
+2014-06-04  Will Newton  <will.newton@linaro.org>
+
+        * elfnn-aarch64.c (tpoff_base): Make test of tls_sec
+       being non-NULL into an assert.
+       (elfNN_aarch64_tls_relax): Remove unused code.
+
 2014-06-03  DJ Delorie  <dj@redhat.com>
 
        * elf32-rx.c (rx_table_map): Use BFD_VMA_FMT for portability.
index 498b7bd121367e0f7acf5357268c0cfd6dd53093..d917c7e5139832d48b26b2d9754fd4f8e8bab737 100644 (file)
@@ -3301,8 +3301,7 @@ tpoff_base (struct bfd_link_info *info)
   struct elf_link_hash_table *htab = elf_hash_table (info);
 
   /* If tls_sec is NULL, we should have signalled an error already.  */
-  if (htab->tls_sec == NULL)
-    return 0;
+  BFD_ASSERT (htab->tls_sec != NULL);
 
   bfd_vma base = align_power ((bfd_vma) TCB_SIZE,
                              htab->tls_sec->alignment_power);
@@ -3938,7 +3937,6 @@ elfNN_aarch64_tls_relax (struct elf_aarch64_link_hash_table *globals,
             or
             adrp x0, :tlsdesc:var   =>   adrp x0, :gottprel:var
           */
-         insn = bfd_getl32 (contents + rel->r_offset);
          return bfd_reloc_continue;
        }
 
This page took 0.029955 seconds and 4 git commands to generate.