diff options
-rw-r--r-- | bfd/ChangeLog | 14 | ||||
-rw-r--r-- | bfd/bfd-in2.h | 36 | ||||
-rw-r--r-- | bfd/ecoff.c | 18 | ||||
-rw-r--r-- | bfd/elf32-ppc.c | 9 | ||||
-rw-r--r-- | bfd/elf32-xtensa.c | 4 | ||||
-rw-r--r-- | bfd/elf64-ppc.c | 19 | ||||
-rw-r--r-- | bfd/elfxx-ia64.c | 4 | ||||
-rw-r--r-- | bfd/section.c | 36 |
8 files changed, 82 insertions, 58 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 6e07ae3..1e09853 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -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 diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 448f565..1a0a0ea 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -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, \ diff --git a/bfd/ecoff.c b/bfd/ecoff.c index 472aab1..ecfc34e 100644 --- a/bfd/ecoff.c +++ b/bfd/ecoff.c @@ -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, */ diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index e7a310c..3667413 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -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) \ diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c index 1992c94..4d1b384 100644 --- a/bfd/elf32-xtensa.c +++ b/bfd/elf32-xtensa.c @@ -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 static reloc_howto_type elf_howto_table[] = { diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 33b26cb..37701f2 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -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. */ diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c index e35fcbf..7fde3d5 100644 --- a/bfd/elfxx-ia64.c +++ b/bfd/elfxx-ia64.c @@ -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 /* These functions do relaxation for IA-64 ELF. */ diff --git a/bfd/section.c b/bfd/section.c index d92dc2d..2bab6b9 100644 --- a/bfd/section.c +++ b/bfd/section.c @@ -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, \ |