* section.c (struct bfd_section): Delete has_tls_reloc,
authorAlan Modra <amodra@gmail.com>
Mon, 8 Feb 2010 13:16:24 +0000 (13:16 +0000)
committerAlan Modra <amodra@gmail.com>
Mon, 8 Feb 2010 13:16:24 +0000 (13:16 +0000)
has_tls_get_addr_call, has_gp_reloc, need_finalize_relax, reloc_done.
Add sec_flg0 thru sec_flg5.
(BFD_FAKE_SECTION): Update for changed flags.
* ecoff.c (bfd_debug_section): Likewise.
* elf32-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define.
* elf64-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define.
(has_toc_reloc, makes_toc_func_call, call_check_in_progress): Update.
* elf32-xtensa.c (reloc_done): Define.
* elfxx-ia64.c (skip_relax_pass_0, skip_relax_pass_1): Update.
* bfd-in2.h: Regenerate.

bfd/ChangeLog
bfd/bfd-in2.h
bfd/ecoff.c
bfd/elf32-ppc.c
bfd/elf32-xtensa.c
bfd/elf64-ppc.c
bfd/elfxx-ia64.c
bfd/section.c

index 6e07ae370f1798a1c8e40307e788965b2d9c90c1..1e0985395ef0a9c942b7d6cfdec6f938dabb288c 100644 (file)
@@ -1,3 +1,17 @@
+2010-02-08  Alan Modra  <amodra@gmail.com>
+
+       * section.c (struct bfd_section): Delete has_tls_reloc,
+       has_tls_get_addr_call, has_gp_reloc, need_finalize_relax, reloc_done.
+       Add sec_flg0 thru sec_flg5.
+       (BFD_FAKE_SECTION): Update for changed flags.
+       * ecoff.c (bfd_debug_section): Likewise.
+       * elf32-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define.
+       * elf64-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define.
+       (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Update.
+       * elf32-xtensa.c (reloc_done): Define.
+       * elfxx-ia64.c (skip_relax_pass_0, skip_relax_pass_1): Update.
+       * bfd-in2.h: Regenerate.
+
 2010-02-08  Tristan Gingold  <gingold@adacore.com>
 
        * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Set reloc.r_extern
index 448f5657afac929c93a3682de71dd3ca7d816ff5..1a0a0eabad0c9a5e53754eb63ae234fd7fe479cd 100644 (file)
@@ -1367,20 +1367,12 @@ typedef struct bfd_section
   /* Bits used by various backends.  The generic code doesn't touch
      these fields.  */
 
-  /* Nonzero if this section has TLS related relocations.  */
-  unsigned int has_tls_reloc:1;
-
-  /* Nonzero if this section has a call to __tls_get_addr.  */
-  unsigned int has_tls_get_addr_call:1;
-
-  /* Nonzero if this section has a gp reloc.  */
-  unsigned int has_gp_reloc:1;
-
-  /* Nonzero if this section needs the relax finalize pass.  */
-  unsigned int need_finalize_relax:1;
-
-  /* Whether relocations have been processed.  */
-  unsigned int reloc_done : 1;
+  unsigned int sec_flg0:1;
+  unsigned int sec_flg1:1;
+  unsigned int sec_flg2:1;
+  unsigned int sec_flg3:1;
+  unsigned int sec_flg4:1;
+  unsigned int sec_flg5:1;
 
   /* End of internal packed boolean fields.  */
 
@@ -1645,17 +1637,17 @@ extern asection bfd_ind_section;
   /* name, id,  index, next, prev, flags, user_set_vma,            */  \
   { NAME,  IDX, 0,     NULL, NULL, FLAGS, 0,                           \
                                                                        \
-  /* linker_mark, linker_has_input, gc_mark,                       */  \
-     0,           0,                1,                                 \
+  /* linker_mark, linker_has_input, gc_mark, segment_mark,         */  \
+     0,           0,                1,       0,                        \
                                                                        \
-  /* segment_mark, sec_info_type, use_rela_p, has_tls_reloc,       */  \
-     0,            0,             0,          0,                       \
+  /* sec_info_type, use_rela_p,                                    */  \
+     0,             0,                                                 \
                                                                        \
-  /* has_tls_get_addr_call, has_gp_reloc, need_finalize_relax,     */  \
-     0,                     0,            0,                           \
+  /* sec_flg0, sec_flg1, sec_flg2, sec_flg3, sec_flg4, sec_flg5,   */  \
+     0,        0,        0,        0,        0,        0,              \
                                                                        \
-  /* reloc_done, vma, lma, size, rawsize, relax, relax_count,      */  \
-     0,          0,   0,   0,    0,       0,     0,                    \
+  /* vma, lma, size, rawsize, relax, relax_count,                  */  \
+     0,   0,   0,    0,       0,     0,                                \
                                                                        \
   /* output_offset, output_section,              alignment_power,  */  \
      0,             (struct bfd_section *) &SEC, 0,                    \
index 472aab1dde11761662d3db603f9f7644638e4dba..ecfc34e808e8fb41401f08700ec05949f0f469f6 100644 (file)
@@ -1,6 +1,6 @@
 /* Generic ECOFF (Extended-COFF) routines.
    Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
    Original version by Per Bothner.
    Full support added by Ian Lance Taylor, ian@cygnus.com.
@@ -56,14 +56,14 @@ static asection bfd_debug_section =
 {
   /* name,      id,  index, next, prev, flags, user_set_vma,       */
      "*DEBUG*", 0,   0,     NULL, NULL, 0,     0,
-  /* linker_mark, linker_has_input, gc_mark,                       */
-     0,           0,                1,
-  /* segment_mark, sec_info_type, use_rela_p, has_tls_reloc,       */
-     0,            0,             0,          0,
-  /* has_tls_get_addr_call, has_gp_reloc, need_finalize_relax,     */
-     0,                     0,            0,
-  /* reloc_done, vma, lma, size, rawsize, relax, relax_count,      */
-     0,          0,   0,   0,    0,       0,     0,
+  /* linker_mark, linker_has_input, gc_mark, segment_mark,         */
+     0,           0,                1,       0,
+  /* sec_info_type, use_rela_p,                                    */
+     0,             0,
+  /* sec_flg0, sec_flg1, sec_flg2, sec_flg3, sec_flg4, sec_flg5,   */
+     0,        0,        0,        0,        0,        0,
+  /* vma, lma, size, rawsize, relax, relax_count,                  */
+     0,   0,   0,    0,       0,     0,
   /* output_offset, output_section, alignment_power,               */
      0,             NULL,           0,
   /* relocation, orelocation, reloc_count, filepos, rel_filepos,   */
index e7a310c82e1e3fd661cd7f9e1b3a0cdb6e3faad1..36674130e93bd68c1a69e57b79b666fab257790a 100644 (file)
@@ -2748,6 +2748,15 @@ struct ppc_elf_link_hash_table
   struct sym_cache sym_cache;
 };
 
+/* Rename some of the generic section flags to better document how they
+   are used here.  */
+
+/* Nonzero if this section has TLS related relocations.  */
+#define has_tls_reloc sec_flg0
+
+/* Nonzero if this section has a call to __tls_get_addr.  */
+#define has_tls_get_addr_call sec_flg1
+
 /* Get the PPC ELF linker hash table from a link_info structure.  */
 
 #define ppc_elf_hash_table(p) \
index 1992c9488cbf44f9e71769493d51cce81b986c06..4d1b384f661184ef60df282f70e98e2f21295831 100644 (file)
@@ -155,6 +155,10 @@ static bfd_boolean relaxing_section = FALSE;
 
 int elf32xtensa_no_literal_movement = 1;
 
+/* Rename one of the generic section flags to better document how it
+   is used here.  */
+/* Whether relocations have been processed.  */
+#define reloc_done sec_flg0
 \f
 static reloc_howto_type elf_howto_table[] =
 {
index 33b26cb46e183bceb8843776fa4ebd54da1ea792..37701f252c6825f27c3ec97c55b9e286d9ddbc7e 100644 (file)
@@ -3799,9 +3799,22 @@ struct ppc_link_hash_table
 
 /* Rename some of the generic section flags to better document how they
    are used here.  */
-#define has_toc_reloc has_gp_reloc
-#define makes_toc_func_call need_finalize_relax
-#define call_check_in_progress reloc_done
+
+/* Nonzero if this section has TLS related relocations.  */
+#define has_tls_reloc sec_flg0
+
+/* Nonzero if this section has a call to __tls_get_addr.  */
+#define has_tls_get_addr_call sec_flg1
+
+/* Nonzero if this section has any toc or got relocs.  */
+#define has_toc_reloc sec_flg2
+
+/* Nonzero if this section has a call to another section that uses
+   the toc or got.  */
+#define makes_toc_func_call sec_flg4
+
+/* Recursion protection when determining above flag.  */
+#define call_check_in_progress sec_flg5
 
 /* Get the ppc64 ELF linker hash table from a link_info structure.  */
 
index e35fcbf8fe580871be1b452354d9387d0f892b45..7fde3d5c25e9709c76867a370c06c21985ca7b33 100644 (file)
@@ -755,8 +755,8 @@ elfNN_ia64_relax_brl (bfd_byte *contents, bfd_vma off)
 
 /* Rename some of the generic section flags to better document how they
    are used here.  */
-#define skip_relax_pass_0 need_finalize_relax
-#define skip_relax_pass_1 has_gp_reloc
+#define skip_relax_pass_0 sec_flg0
+#define skip_relax_pass_1 sec_flg1
 
 \f
 /* These functions do relaxation for IA-64 ELF.  */
index d92dc2d4d7a7d8b7f5588041e54792ae23d16bcd..2bab6b9130d729bf16417767ef2ebdf8c7d0ec8b 100644 (file)
@@ -383,20 +383,12 @@ CODE_FRAGMENT
 .  {* Bits used by various backends.  The generic code doesn't touch
 .     these fields.  *}
 .
-.  {* Nonzero if this section has TLS related relocations.  *}
-.  unsigned int has_tls_reloc:1;
-.
-.  {* Nonzero if this section has a call to __tls_get_addr.  *}
-.  unsigned int has_tls_get_addr_call:1;
-.
-.  {* Nonzero if this section has a gp reloc.  *}
-.  unsigned int has_gp_reloc:1;
-.
-.  {* Nonzero if this section needs the relax finalize pass.  *}
-.  unsigned int need_finalize_relax:1;
-.
-.  {* Whether relocations have been processed.  *}
-.  unsigned int reloc_done : 1;
+.  unsigned int sec_flg0:1;
+.  unsigned int sec_flg1:1;
+.  unsigned int sec_flg2:1;
+.  unsigned int sec_flg3:1;
+.  unsigned int sec_flg4:1;
+.  unsigned int sec_flg5:1;
 .
 .  {* End of internal packed boolean fields.  *}
 .
@@ -661,17 +653,17 @@ CODE_FRAGMENT
 .  {* name, id,  index, next, prev, flags, user_set_vma,            *} \
 .  { NAME,  IDX, 0,     NULL, NULL, FLAGS, 0,                          \
 .                                                                      \
-.  {* linker_mark, linker_has_input, gc_mark,                       *} \
-.     0,           0,                1,                                \
+.  {* linker_mark, linker_has_input, gc_mark, segment_mark,         *} \
+.     0,           0,                1,       0,                       \
 .                                                                      \
-.  {* segment_mark, sec_info_type, use_rela_p, has_tls_reloc,       *} \
-.     0,            0,             0,          0,                      \
+.  {* sec_info_type, use_rela_p,                                    *} \
+.     0,             0,                                                        \
 .                                                                      \
-.  {* has_tls_get_addr_call, has_gp_reloc, need_finalize_relax,     *} \
-.     0,                     0,            0,                          \
+.  {* sec_flg0, sec_flg1, sec_flg2, sec_flg3, sec_flg4, sec_flg5,   *} \
+.     0,        0,        0,        0,        0,        0,             \
 .                                                                      \
-.  {* reloc_done, vma, lma, size, rawsize, relax, relax_count,      *} \
-.     0,          0,   0,   0,    0,       0,     0,                   \
+.  {* vma, lma, size, rawsize, relax, relax_count,                  *} \
+.     0,   0,   0,    0,       0,     0,                               \
 .                                                                      \
 .  {* output_offset, output_section,              alignment_power,  *} \
 .     0,             (struct bfd_section *) &SEC, 0,                   \
This page took 0.043863 seconds and 4 git commands to generate.