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 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
/* 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. */
/* 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, \
/* 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.
{
/* 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, */
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) \
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[] =
{
/* 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. */
/* 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. */
. {* 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. *}
.
. {* 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, \