OLD | NEW |
1 /* ELF linking support for BFD. | 1 /* ELF linking support for BFD. |
2 Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, | 2 Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
3 2005, 2006, 2007, 2008, 2009, 2010, 2011 | 3 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 |
4 Free Software Foundation, Inc. | 4 Free Software Foundation, Inc. |
5 | 5 |
6 This file is part of BFD, the Binary File Descriptor library. | 6 This file is part of BFD, the Binary File Descriptor library. |
7 | 7 |
8 This program is free software; you can redistribute it and/or modify | 8 This program is free software; you can redistribute it and/or modify |
9 it under the terms of the GNU General Public License as published by | 9 it under the terms of the GNU General Public License as published by |
10 the Free Software Foundation; either version 3 of the License, or | 10 the Free Software Foundation; either version 3 of the License, or |
11 (at your option) any later version. | 11 (at your option) any later version. |
12 | 12 |
13 This program is distributed in the hope that it will be useful, | 13 This program is distributed in the hope that it will be useful, |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 bfd_boolean | 97 bfd_boolean |
98 _bfd_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) | 98 _bfd_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) |
99 { | 99 { |
100 flagword flags; | 100 flagword flags; |
101 asection *s; | 101 asection *s; |
102 struct elf_link_hash_entry *h; | 102 struct elf_link_hash_entry *h; |
103 const struct elf_backend_data *bed = get_elf_backend_data (abfd); | 103 const struct elf_backend_data *bed = get_elf_backend_data (abfd); |
104 struct elf_link_hash_table *htab = elf_hash_table (info); | 104 struct elf_link_hash_table *htab = elf_hash_table (info); |
105 | 105 |
106 /* This function may be called more than once. */ | 106 /* This function may be called more than once. */ |
107 s = bfd_get_section_by_name (abfd, ".got"); | 107 s = bfd_get_linker_section (abfd, ".got"); |
108 if (s != NULL && (s->flags & SEC_LINKER_CREATED) != 0) | 108 if (s != NULL) |
109 return TRUE; | 109 return TRUE; |
110 | 110 |
111 flags = bed->dynamic_sec_flags; | 111 flags = bed->dynamic_sec_flags; |
112 | 112 |
113 s = bfd_make_section_anyway_with_flags (abfd, | 113 s = bfd_make_section_anyway_with_flags (abfd, |
114 (bed->rela_plts_and_copies_p | 114 (bed->rela_plts_and_copies_p |
115 ? ".rela.got" : ".rel.got"), | 115 ? ".rela.got" : ".rel.got"), |
116 (bed->dynamic_sec_flags | 116 (bed->dynamic_sec_flags |
117 | SEC_READONLY)); | 117 | SEC_READONLY)); |
118 if (s == NULL | 118 if (s == NULL |
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
769 SHT_PROGBITS/SHT_NOBITS. */ | 769 SHT_PROGBITS/SHT_NOBITS. */ |
770 case SHT_NULL: | 770 case SHT_NULL: |
771 htab = elf_hash_table (info); | 771 htab = elf_hash_table (info); |
772 if (p == htab->tls_sec) | 772 if (p == htab->tls_sec) |
773 return FALSE; | 773 return FALSE; |
774 | 774 |
775 if (htab->text_index_section != NULL) | 775 if (htab->text_index_section != NULL) |
776 return p != htab->text_index_section && p != htab->data_index_section; | 776 return p != htab->text_index_section && p != htab->data_index_section; |
777 | 777 |
778 if (strcmp (p->name, ".got") == 0 | 778 if (strcmp (p->name, ".got") == 0 |
error: old chunk mismatch |
None
OLD | NEW |