* 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.
This commit is contained in:
Alan Modra 2010-02-08 13:16:24 +00:00
parent 7b356089ca
commit b0dddeecc9
8 changed files with 82 additions and 58 deletions

View 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> 2010-02-08 Tristan Gingold <gingold@adacore.com>
* mach-o.c (bfd_mach_o_canonicalize_one_reloc): Set reloc.r_extern * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Set reloc.r_extern

View file

@ -1367,20 +1367,12 @@ typedef struct bfd_section
/* Bits used by various backends. The generic code doesn't touch /* Bits used by various backends. The generic code doesn't touch
these fields. */ these fields. */
/* Nonzero if this section has TLS related relocations. */ unsigned int sec_flg0:1;
unsigned int has_tls_reloc:1; unsigned int sec_flg1:1;
unsigned int sec_flg2:1;
/* Nonzero if this section has a call to __tls_get_addr. */ unsigned int sec_flg3:1;
unsigned int has_tls_get_addr_call:1; unsigned int sec_flg4:1;
unsigned int sec_flg5: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;
/* End of internal packed boolean fields. */ /* 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, id, index, next, prev, flags, user_set_vma, */ \
{ NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \
\ \
/* linker_mark, linker_has_input, gc_mark, */ \ /* linker_mark, linker_has_input, gc_mark, segment_mark, */ \
0, 0, 1, \ 0, 0, 1, 0, \
\ \
/* segment_mark, sec_info_type, use_rela_p, has_tls_reloc, */ \ /* sec_info_type, use_rela_p, */ \
0, 0, 0, 0, \ 0, 0, \
\ \
/* has_tls_get_addr_call, has_gp_reloc, need_finalize_relax, */ \ /* sec_flg0, sec_flg1, sec_flg2, sec_flg3, sec_flg4, sec_flg5, */ \
0, 0, 0, \ 0, 0, 0, 0, 0, 0, \
\ \
/* reloc_done, vma, lma, size, rawsize, relax, relax_count, */ \ /* vma, lma, size, rawsize, relax, relax_count, */ \
0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, \
\ \
/* output_offset, output_section, alignment_power, */ \ /* output_offset, output_section, alignment_power, */ \
0, (struct bfd_section *) &SEC, 0, \ 0, (struct bfd_section *) &SEC, 0, \

View file

@ -1,6 +1,6 @@
/* Generic ECOFF (Extended-COFF) routines. /* Generic ECOFF (Extended-COFF) routines.
Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 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. Free Software Foundation, Inc.
Original version by Per Bothner. Original version by Per Bothner.
Full support added by Ian Lance Taylor, ian@cygnus.com. 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, */ /* name, id, index, next, prev, flags, user_set_vma, */
"*DEBUG*", 0, 0, NULL, NULL, 0, 0, "*DEBUG*", 0, 0, NULL, NULL, 0, 0,
/* linker_mark, linker_has_input, gc_mark, */ /* linker_mark, linker_has_input, gc_mark, segment_mark, */
0, 0, 1, 0, 0, 1, 0,
/* segment_mark, sec_info_type, use_rela_p, has_tls_reloc, */ /* sec_info_type, use_rela_p, */
0, 0, 0, 0, 0, 0,
/* has_tls_get_addr_call, has_gp_reloc, need_finalize_relax, */ /* sec_flg0, sec_flg1, sec_flg2, sec_flg3, sec_flg4, sec_flg5, */
0, 0, 0, 0, 0, 0, 0, 0, 0,
/* reloc_done, vma, lma, size, rawsize, relax, relax_count, */ /* vma, lma, size, rawsize, relax, relax_count, */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* output_offset, output_section, alignment_power, */ /* output_offset, output_section, alignment_power, */
0, NULL, 0, 0, NULL, 0,
/* relocation, orelocation, reloc_count, filepos, rel_filepos, */ /* relocation, orelocation, reloc_count, filepos, rel_filepos, */

View file

@ -2748,6 +2748,15 @@ struct ppc_elf_link_hash_table
struct sym_cache sym_cache; 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. */ /* Get the PPC ELF linker hash table from a link_info structure. */
#define ppc_elf_hash_table(p) \ #define ppc_elf_hash_table(p) \

View file

@ -155,6 +155,10 @@ static bfd_boolean relaxing_section = FALSE;
int elf32xtensa_no_literal_movement = 1; 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
static reloc_howto_type elf_howto_table[] = static reloc_howto_type elf_howto_table[] =
{ {

View file

@ -3799,9 +3799,22 @@ struct ppc_link_hash_table
/* Rename some of the generic section flags to better document how they /* Rename some of the generic section flags to better document how they
are used here. */ are used here. */
#define has_toc_reloc has_gp_reloc
#define makes_toc_func_call need_finalize_relax /* Nonzero if this section has TLS related relocations. */
#define call_check_in_progress reloc_done #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. */ /* Get the ppc64 ELF linker hash table from a link_info structure. */

View 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 /* Rename some of the generic section flags to better document how they
are used here. */ are used here. */
#define skip_relax_pass_0 need_finalize_relax #define skip_relax_pass_0 sec_flg0
#define skip_relax_pass_1 has_gp_reloc #define skip_relax_pass_1 sec_flg1
/* These functions do relaxation for IA-64 ELF. */ /* These functions do relaxation for IA-64 ELF. */

View file

@ -383,20 +383,12 @@ CODE_FRAGMENT
. {* Bits used by various backends. The generic code doesn't touch . {* Bits used by various backends. The generic code doesn't touch
. these fields. *} . these fields. *}
. .
. {* Nonzero if this section has TLS related relocations. *} . unsigned int sec_flg0:1;
. unsigned int has_tls_reloc:1; . unsigned int sec_flg1:1;
. . unsigned int sec_flg2:1;
. {* Nonzero if this section has a call to __tls_get_addr. *} . unsigned int sec_flg3:1;
. unsigned int has_tls_get_addr_call:1; . unsigned int sec_flg4:1;
. . unsigned int sec_flg5: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;
. .
. {* End of internal packed boolean fields. *} . {* End of internal packed boolean fields. *}
. .
@ -661,17 +653,17 @@ CODE_FRAGMENT
. {* name, id, index, next, prev, flags, user_set_vma, *} \ . {* name, id, index, next, prev, flags, user_set_vma, *} \
. { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \ . { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \
. \ . \
. {* linker_mark, linker_has_input, gc_mark, *} \ . {* linker_mark, linker_has_input, gc_mark, segment_mark, *} \
. 0, 0, 1, \ . 0, 0, 1, 0, \
. \ . \
. {* segment_mark, sec_info_type, use_rela_p, has_tls_reloc, *} \ . {* sec_info_type, use_rela_p, *} \
. 0, 0, 0, 0, \ . 0, 0, \
. \ . \
. {* has_tls_get_addr_call, has_gp_reloc, need_finalize_relax, *} \ . {* sec_flg0, sec_flg1, sec_flg2, sec_flg3, sec_flg4, sec_flg5, *} \
. 0, 0, 0, \ . 0, 0, 0, 0, 0, 0, \
. \ . \
. {* reloc_done, vma, lma, size, rawsize, relax, relax_count, *} \ . {* vma, lma, size, rawsize, relax, relax_count, *} \
. 0, 0, 0, 0, 0, 0, 0, \ . 0, 0, 0, 0, 0, 0, \
. \ . \
. {* output_offset, output_section, alignment_power, *} \ . {* output_offset, output_section, alignment_power, *} \
. 0, (struct bfd_section *) &SEC, 0, \ . 0, (struct bfd_section *) &SEC, 0, \