diff options
author | Khem Raj <raj.khem@gmail.com> | 2012-09-13 14:59:10 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-09-14 09:50:30 +0100 |
commit | 97bb9c5b6776a8cf04125d9293e22d85d78ccc3b (patch) | |
tree | a66608be38c66f67694ad1f0027425c8e7d5612d /meta/recipes-devtools/binutils/binutils/0182-PR-ld-13991.patch | |
parent | 268177e4e64525a3655094b5a835aee62acea622 (diff) | |
download | poky-97bb9c5b6776a8cf04125d9293e22d85d78ccc3b.tar.gz |
binutils-2.22: Backport PR fixes from 2.22 branch
These are fixes mainly cherrypicks for mips/ppc/x86
mainly fixing PRs in ld and gold
(From OE-Core rev: f098cfc24bae8e0685bcae53ea4fdc3326ddc6c4)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils/0182-PR-ld-13991.patch')
-rw-r--r-- | meta/recipes-devtools/binutils/binutils/0182-PR-ld-13991.patch | 1617 |
1 files changed, 1617 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils/0182-PR-ld-13991.patch b/meta/recipes-devtools/binutils/binutils/0182-PR-ld-13991.patch new file mode 100644 index 0000000000..f4c94388c8 --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/0182-PR-ld-13991.patch | |||
@@ -0,0 +1,1617 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | From e827844b6119ff7e0c2de167f2b261c6c06226c8 Mon Sep 17 00:00:00 2001 | ||
4 | From: Nick Clifton <nickc@redhat.com> | ||
5 | Date: Fri, 11 May 2012 12:24:12 +0000 | ||
6 | Subject: [PATCH 182/262] PR ld/13991 bfd/ * bfd/elf-bfd.h | ||
7 | (_bfd_elf_link_just_syms): Define as | ||
8 | _bfd_generic_link_just_syms. * bfd/elflink.c | ||
9 | (_bfd_elf_link_just_syms): Delete. * | ||
10 | bfd/linker.c (_bfd_generic_link_just_syms): Set | ||
11 | sec_info_type. | ||
12 | |||
13 | * bfd/bfd-in.h (discarded_section): Renamed from elf_discarded_section. | ||
14 | * bfd/section.c (SEC_INFO_TYPE_NONE, SEC_INFO_TYPE_STABS, | ||
15 | SEC_INFO_TYPE_MERGE, SEC_INFO_TYPE_EH_FRAME, | ||
16 | SEC_INFO_TYPE_JUST_SYMS): Renamed from corresponding ELF_INFO_TYPE. | ||
17 | * bfd/elf-eh-frame.c, * bfd/elf-m10200.c, * bfd/elf-m10300.c, | ||
18 | * bfd/elf.c, * bfd/elf32-arm.c, * bfd/elf32-avr.c, * bfd/elf32-bfin.c, | ||
19 | * bfd/elf32-cr16.c, * bfd/elf32-cr16c.c, * bfd/elf32-cris.c, | ||
20 | * bfd/elf32-crx.c, * bfd/elf32-d10v.c, * bfd/elf32-epiphany.c, | ||
21 | * bfd/elf32-fr30.c, * bfd/elf32-frv.c, * bfd/elf32-h8300.c, | ||
22 | * bfd/elf32-hppa.c, * bfd/elf32-i370.c, * bfd/elf32-i386.c, | ||
23 | * bfd/elf32-i860.c, * bfd/elf32-ip2k.c, * bfd/elf32-iq2000.c, | ||
24 | * bfd/elf32-lm32.c, * bfd/elf32-m32c.c, * bfd/elf32-m32r.c, | ||
25 | * bfd/elf32-m68hc1x.c, * bfd/elf32-m68k.c, * bfd/elf32-mcore.c, | ||
26 | * bfd/elf32-mep.c, * bfd/elf32-moxie.c, * bfd/elf32-msp430.c, | ||
27 | * bfd/elf32-mt.c, * bfd/elf32-openrisc.c, * bfd/elf32-ppc.c, | ||
28 | * bfd/elf32-rl78.c, * bfd/elf32-rx.c, * bfd/elf32-s390.c, | ||
29 | * bfd/elf32-score.c, * bfd/elf32-score7.c, * bfd/elf32-sh.c, | ||
30 | * bfd/elf32-spu.c, * bfd/elf32-tic6x.c, * bfd/elf32-tilepro.c, | ||
31 | * bfd/elf32-v850.c, * bfd/elf32-vax.c, * bfd/elf32-xc16x.c, | ||
32 | * bfd/elf32-xstormy16.c, * bfd/elf32-xtensa.c, * bfd/elf64-alpha.c, | ||
33 | * bfd/elf64-hppa.c, * bfd/elf64-ia64-vms.c, * bfd/elf64-mmix.c, | ||
34 | * bfd/elf64-ppc.c, * bfd/elf64-s390.c, * bfd/elf64-sh64.c, | ||
35 | * bfd/elf64-x86-64.c, * bfd/elflink.c, * bfd/elfnn-ia64.c, | ||
36 | * bfd/elfxx-mips.c, * bfd/elfxx-sparc.c, * bfd/elfxx-tilegx.c, | ||
37 | * bfd/reloc.c: Update all references. | ||
38 | * bfd/bfd-in2.h: Regenerate. | ||
39 | ld/ | ||
40 | * ld/ldlang.c (size_input_section): Use sec_info_type rather than | ||
41 | usrdata->flags.just_syms. | ||
42 | * ld/ldwrite.c (build_link_order): Likewise. | ||
43 | * ld/emultempl/hppaelf.em (build_section_lists): Likewise. | ||
44 | * ld/emultempl/ppc64elf.em (build_toc_list): Likewise. | ||
45 | * ld/emultempl/armelf.em (build_section_lists): Likewise. | ||
46 | (after_allocation): Update for renamed sec_info_type value. | ||
47 | * ld/emultempl/tic6xdsbt.em: Likewise. | ||
48 | --- | ||
49 | bfd/ChangeLog | 38 +++++++++++++++++++++++++++++++++ | ||
50 | bfd/bfd-in.h | 6 +++--- | ||
51 | bfd/bfd-in2.h | 16 +++++++------- | ||
52 | bfd/elf-bfd.h | 3 +-- | ||
53 | bfd/elf-eh-frame.c | 10 ++++----- | ||
54 | bfd/elf-m10200.c | 2 +- | ||
55 | bfd/elf-m10300.c | 4 ++-- | ||
56 | bfd/elf.c | 10 ++++----- | ||
57 | bfd/elf32-arm.c | 6 +++--- | ||
58 | bfd/elf32-avr.c | 2 +- | ||
59 | bfd/elf32-bfin.c | 6 +++--- | ||
60 | bfd/elf32-cr16.c | 2 +- | ||
61 | bfd/elf32-cr16c.c | 2 +- | ||
62 | bfd/elf32-cris.c | 2 +- | ||
63 | bfd/elf32-crx.c | 2 +- | ||
64 | bfd/elf32-d10v.c | 2 +- | ||
65 | bfd/elf32-fr30.c | 2 +- | ||
66 | bfd/elf32-frv.c | 4 ++-- | ||
67 | bfd/elf32-h8300.c | 2 +- | ||
68 | bfd/elf32-hppa.c | 2 +- | ||
69 | bfd/elf32-i370.c | 2 +- | ||
70 | bfd/elf32-i386.c | 4 ++-- | ||
71 | bfd/elf32-i860.c | 2 +- | ||
72 | bfd/elf32-ip2k.c | 2 +- | ||
73 | bfd/elf32-iq2000.c | 2 +- | ||
74 | bfd/elf32-lm32.c | 6 +++--- | ||
75 | bfd/elf32-m32c.c | 2 +- | ||
76 | bfd/elf32-m32r.c | 2 +- | ||
77 | bfd/elf32-m68hc1x.c | 2 +- | ||
78 | bfd/elf32-m68k.c | 2 +- | ||
79 | bfd/elf32-mcore.c | 2 +- | ||
80 | bfd/elf32-mep.c | 2 +- | ||
81 | bfd/elf32-moxie.c | 2 +- | ||
82 | bfd/elf32-msp430.c | 2 +- | ||
83 | bfd/elf32-mt.c | 2 +- | ||
84 | bfd/elf32-openrisc.c | 2 +- | ||
85 | bfd/elf32-ppc.c | 6 +++--- | ||
86 | bfd/elf32-rx.c | 4 ++-- | ||
87 | bfd/elf32-s390.c | 2 +- | ||
88 | bfd/elf32-score.c | 2 +- | ||
89 | bfd/elf32-score7.c | 2 +- | ||
90 | bfd/elf32-sh.c | 4 ++-- | ||
91 | bfd/elf32-spu.c | 2 +- | ||
92 | bfd/elf32-tic6x.c | 2 +- | ||
93 | bfd/elf32-tilepro.c | 2 +- | ||
94 | bfd/elf32-v850.c | 2 +- | ||
95 | bfd/elf32-vax.c | 2 +- | ||
96 | bfd/elf32-xc16x.c | 2 +- | ||
97 | bfd/elf32-xstormy16.c | 2 +- | ||
98 | bfd/elf32-xtensa.c | 8 +++---- | ||
99 | bfd/elf64-alpha.c | 8 +++---- | ||
100 | bfd/elf64-hppa.c | 2 +- | ||
101 | bfd/elf64-mmix.c | 2 +- | ||
102 | bfd/elf64-ppc.c | 20 +++++++++--------- | ||
103 | bfd/elf64-s390.c | 2 +- | ||
104 | bfd/elf64-sh64.c | 4 ++-- | ||
105 | bfd/elf64-x86-64.c | 4 ++-- | ||
106 | bfd/elflink.c | 51 ++++++++++++++++++--------------------------- | ||
107 | bfd/elfnn-ia64.c | 6 +++--- | ||
108 | bfd/elfxx-mips.c | 2 +- | ||
109 | bfd/elfxx-sparc.c | 2 +- | ||
110 | bfd/elfxx-tilegx.c | 2 +- | ||
111 | bfd/linker.c | 3 ++- | ||
112 | bfd/reloc.c | 2 +- | ||
113 | bfd/section.c | 10 ++++----- | ||
114 | ld/ChangeLog | 15 +++++++++++++ | ||
115 | ld/emultempl/armelf.em | 4 ++-- | ||
116 | ld/emultempl/hppaelf.em | 2 +- | ||
117 | ld/emultempl/ppc64elf.em | 4 ++-- | ||
118 | ld/emultempl/tic6xdsbt.em | 2 +- | ||
119 | ld/ldlang.c | 2 +- | ||
120 | ld/ldwrite.c | 4 ++-- | ||
121 | 72 files changed, 199 insertions(+), 157 deletions(-) | ||
122 | |||
123 | diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h | ||
124 | index a477b49..7c5298a 100644 | ||
125 | --- a/bfd/bfd-in.h | ||
126 | +++ b/bfd/bfd-in.h | ||
127 | @@ -295,11 +295,11 @@ typedef struct bfd_section *sec_ptr; | ||
128 | ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd)) | ||
129 | |||
130 | /* Return TRUE if input section SEC has been discarded. */ | ||
131 | -#define elf_discarded_section(sec) \ | ||
132 | +#define discarded_section(sec) \ | ||
133 | (!bfd_is_abs_section (sec) \ | ||
134 | && bfd_is_abs_section ((sec)->output_section) \ | ||
135 | - && (sec)->sec_info_type != ELF_INFO_TYPE_MERGE \ | ||
136 | - && (sec)->sec_info_type != ELF_INFO_TYPE_JUST_SYMS) | ||
137 | + && (sec)->sec_info_type != SEC_INFO_TYPE_MERGE \ | ||
138 | + && (sec)->sec_info_type != SEC_INFO_TYPE_JUST_SYMS) | ||
139 | |||
140 | /* Forward define. */ | ||
141 | struct stat; | ||
142 | diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h | ||
143 | index cd90740..34f9628 100644 | ||
144 | --- a/bfd/bfd-in2.h | ||
145 | +++ b/bfd/bfd-in2.h | ||
146 | @@ -302,11 +302,11 @@ typedef struct bfd_section *sec_ptr; | ||
147 | ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd)) | ||
148 | |||
149 | /* Return TRUE if input section SEC has been discarded. */ | ||
150 | -#define elf_discarded_section(sec) \ | ||
151 | +#define discarded_section(sec) \ | ||
152 | (!bfd_is_abs_section (sec) \ | ||
153 | && bfd_is_abs_section ((sec)->output_section) \ | ||
154 | - && (sec)->sec_info_type != ELF_INFO_TYPE_MERGE \ | ||
155 | - && (sec)->sec_info_type != ELF_INFO_TYPE_JUST_SYMS) | ||
156 | + && (sec)->sec_info_type != SEC_INFO_TYPE_MERGE \ | ||
157 | + && (sec)->sec_info_type != SEC_INFO_TYPE_JUST_SYMS) | ||
158 | |||
159 | /* Forward define. */ | ||
160 | struct stat; | ||
161 | @@ -1384,11 +1384,11 @@ typedef struct bfd_section | ||
162 | |||
163 | /* Type of sec_info information. */ | ||
164 | unsigned int sec_info_type:3; | ||
165 | -#define ELF_INFO_TYPE_NONE 0 | ||
166 | -#define ELF_INFO_TYPE_STABS 1 | ||
167 | -#define ELF_INFO_TYPE_MERGE 2 | ||
168 | -#define ELF_INFO_TYPE_EH_FRAME 3 | ||
169 | -#define ELF_INFO_TYPE_JUST_SYMS 4 | ||
170 | +#define SEC_INFO_TYPE_NONE 0 | ||
171 | +#define SEC_INFO_TYPE_STABS 1 | ||
172 | +#define SEC_INFO_TYPE_MERGE 2 | ||
173 | +#define SEC_INFO_TYPE_EH_FRAME 3 | ||
174 | +#define SEC_INFO_TYPE_JUST_SYMS 4 | ||
175 | |||
176 | /* Nonzero if this section uses RELA relocations, rather than REL. */ | ||
177 | unsigned int use_rela_p:1; | ||
178 | diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h | ||
179 | index d6e2ab2..2cfe2ba 100644 | ||
180 | --- a/bfd/elf-bfd.h | ||
181 | +++ b/bfd/elf-bfd.h | ||
182 | @@ -1807,8 +1807,7 @@ extern void bfd_elf_set_group_contents | ||
183 | (bfd *, asection *, void *); | ||
184 | extern asection *_bfd_elf_check_kept_section | ||
185 | (asection *, struct bfd_link_info *); | ||
186 | -extern void _bfd_elf_link_just_syms | ||
187 | - (asection *, struct bfd_link_info *); | ||
188 | +#define _bfd_elf_link_just_syms _bfd_generic_link_just_syms | ||
189 | extern void _bfd_elf_copy_link_hash_symbol_type | ||
190 | (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *); | ||
191 | extern bfd_boolean _bfd_elf_size_group_sections | ||
192 | diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c | ||
193 | index 54142b2..7b5cf7a 100644 | ||
194 | --- a/bfd/elf-eh-frame.c | ||
195 | +++ b/bfd/elf-eh-frame.c | ||
196 | @@ -491,7 +491,7 @@ _bfd_elf_parse_eh_frame (bfd *abfd, struct bfd_link_info *info, | ||
197 | return; | ||
198 | |||
199 | if (sec->size == 0 | ||
200 | - || sec->sec_info_type != ELF_INFO_TYPE_NONE) | ||
201 | + || sec->sec_info_type != SEC_INFO_TYPE_NONE) | ||
202 | { | ||
203 | /* This file does not contain .eh_frame information. */ | ||
204 | return; | ||
205 | @@ -904,7 +904,7 @@ _bfd_elf_parse_eh_frame (bfd *abfd, struct bfd_link_info *info, | ||
206 | BFD_ASSERT (cie_count == num_cies); | ||
207 | |||
208 | elf_section_data (sec)->sec_info = sec_info; | ||
209 | - sec->sec_info_type = ELF_INFO_TYPE_EH_FRAME; | ||
210 | + sec->sec_info_type = SEC_INFO_TYPE_EH_FRAME; | ||
211 | if (hdr_info->merge_cies) | ||
212 | { | ||
213 | sec_info->cies = local_cies; | ||
214 | @@ -1137,7 +1137,7 @@ _bfd_elf_discard_section_eh_frame | ||
215 | struct eh_frame_hdr_info *hdr_info; | ||
216 | unsigned int ptr_size, offset; | ||
217 | |||
218 | - if (sec->sec_info_type != ELF_INFO_TYPE_EH_FRAME) | ||
219 | + if (sec->sec_info_type != SEC_INFO_TYPE_EH_FRAME) | ||
220 | return FALSE; | ||
221 | |||
222 | sec_info = (struct eh_frame_sec_info *) elf_section_data (sec)->sec_info; | ||
223 | @@ -1307,7 +1307,7 @@ _bfd_elf_eh_frame_section_offset (bfd *output_bfd ATTRIBUTE_UNUSED, | ||
224 | struct eh_frame_sec_info *sec_info; | ||
225 | unsigned int lo, hi, mid; | ||
226 | |||
227 | - if (sec->sec_info_type != ELF_INFO_TYPE_EH_FRAME) | ||
228 | + if (sec->sec_info_type != SEC_INFO_TYPE_EH_FRAME) | ||
229 | return offset; | ||
230 | sec_info = (struct eh_frame_sec_info *) elf_section_data (sec)->sec_info; | ||
231 | |||
232 | @@ -1395,7 +1395,7 @@ _bfd_elf_write_section_eh_frame (bfd *abfd, | ||
233 | unsigned int ptr_size; | ||
234 | struct eh_cie_fde *ent; | ||
235 | |||
236 | - if (sec->sec_info_type != ELF_INFO_TYPE_EH_FRAME) | ||
237 | + if (sec->sec_info_type != SEC_INFO_TYPE_EH_FRAME) | ||
238 | /* FIXME: octets_per_byte. */ | ||
239 | return bfd_set_section_contents (abfd, sec->output_section, contents, | ||
240 | sec->output_offset, sec->size); | ||
241 | diff --git a/bfd/elf-m10200.c b/bfd/elf-m10200.c | ||
242 | index a38f4db..d58c75c 100644 | ||
243 | --- a/bfd/elf-m10200.c | ||
244 | +++ b/bfd/elf-m10200.c | ||
245 | @@ -401,7 +401,7 @@ mn10200_elf_relocate_section (output_bfd, info, input_bfd, input_section, | ||
246 | unresolved_reloc, warned); | ||
247 | } | ||
248 | |||
249 | - if (sec != NULL && elf_discarded_section (sec)) | ||
250 | + if (sec != NULL && discarded_section (sec)) | ||
251 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
252 | rel, relend, howto, contents); | ||
253 | |||
254 | diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c | ||
255 | index 8276a2f..876ff4a 100644 | ||
256 | --- a/bfd/elf-m10300.c | ||
257 | +++ b/bfd/elf-m10300.c | ||
258 | @@ -1509,7 +1509,7 @@ mn10300_elf_relocate_section (bfd *output_bfd, | ||
259 | h->root.root.root.string); | ||
260 | } | ||
261 | |||
262 | - if (sec != NULL && elf_discarded_section (sec)) | ||
263 | + if (sec != NULL && discarded_section (sec)) | ||
264 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
265 | rel, relend, howto, contents); | ||
266 | |||
267 | @@ -2763,7 +2763,7 @@ mn10300_elf_relax_section (bfd *abfd, | ||
268 | isym->st_name); | ||
269 | |||
270 | if ((sym_sec->flags & SEC_MERGE) | ||
271 | - && sym_sec->sec_info_type == ELF_INFO_TYPE_MERGE) | ||
272 | + && sym_sec->sec_info_type == SEC_INFO_TYPE_MERGE) | ||
273 | { | ||
274 | symval = isym->st_value; | ||
275 | |||
276 | diff --git a/bfd/elf.c b/bfd/elf.c | ||
277 | index aa40c33..9e23bee 100644 | ||
278 | --- a/bfd/elf.c | ||
279 | +++ b/bfd/elf.c | ||
280 | @@ -3071,7 +3071,7 @@ assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info) | ||
281 | if (link_info != NULL) | ||
282 | { | ||
283 | /* Check discarded linkonce section. */ | ||
284 | - if (elf_discarded_section (s)) | ||
285 | + if (discarded_section (s)) | ||
286 | { | ||
287 | asection *kept; | ||
288 | (*_bfd_error_handler) | ||
289 | @@ -9390,7 +9390,7 @@ _bfd_elf_rela_local_sym (bfd *abfd, | ||
290 | + sym->st_value); | ||
291 | if ((sec->flags & SEC_MERGE) | ||
292 | && ELF_ST_TYPE (sym->st_info) == STT_SECTION | ||
293 | - && sec->sec_info_type == ELF_INFO_TYPE_MERGE) | ||
294 | + && sec->sec_info_type == SEC_INFO_TYPE_MERGE) | ||
295 | { | ||
296 | rel->r_addend = | ||
297 | _bfd_merged_section_offset (abfd, psec, | ||
298 | @@ -9421,7 +9421,7 @@ _bfd_elf_rel_local_sym (bfd *abfd, | ||
299 | { | ||
300 | asection *sec = *psec; | ||
301 | |||
302 | - if (sec->sec_info_type != ELF_INFO_TYPE_MERGE) | ||
303 | + if (sec->sec_info_type != SEC_INFO_TYPE_MERGE) | ||
304 | return sym->st_value + addend; | ||
305 | |||
306 | return _bfd_merged_section_offset (abfd, psec, | ||
307 | @@ -9437,10 +9437,10 @@ _bfd_elf_section_offset (bfd *abfd, | ||
308 | { | ||
309 | switch (sec->sec_info_type) | ||
310 | { | ||
311 | - case ELF_INFO_TYPE_STABS: | ||
312 | + case SEC_INFO_TYPE_STABS: | ||
313 | return _bfd_stab_section_offset (sec, elf_section_data (sec)->sec_info, | ||
314 | offset); | ||
315 | - case ELF_INFO_TYPE_EH_FRAME: | ||
316 | + case SEC_INFO_TYPE_EH_FRAME: | ||
317 | return _bfd_elf_eh_frame_section_offset (abfd, info, sec, offset); | ||
318 | default: | ||
319 | if ((sec->flags & SEC_ELF_REVERSE_COPY) != 0) | ||
320 | diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c | ||
321 | index 1f6c1a0..9355f66 100644 | ||
322 | --- a/bfd/elf32-arm.c | ||
323 | +++ b/bfd/elf32-arm.c | ||
324 | @@ -4485,7 +4485,7 @@ cortex_a8_erratum_scan (bfd *input_bfd, | ||
325 | if (elf_section_type (section) != SHT_PROGBITS | ||
326 | || (elf_section_flags (section) & SHF_EXECINSTR) == 0 | ||
327 | || (section->flags & SEC_EXCLUDE) != 0 | ||
328 | - || (section->sec_info_type == ELF_INFO_TYPE_JUST_SYMS) | ||
329 | + || (section->sec_info_type == SEC_INFO_TYPE_JUST_SYMS) | ||
330 | || (section->output_section == bfd_abs_section_ptr)) | ||
331 | continue; | ||
332 | |||
333 | @@ -6556,7 +6556,7 @@ bfd_elf32_arm_vfp11_erratum_scan (bfd *abfd, struct bfd_link_info *link_info) | ||
334 | if (elf_section_type (sec) != SHT_PROGBITS | ||
335 | || (elf_section_flags (sec) & SHF_EXECINSTR) == 0 | ||
336 | || (sec->flags & SEC_EXCLUDE) != 0 | ||
337 | - || sec->sec_info_type == ELF_INFO_TYPE_JUST_SYMS | ||
338 | + || sec->sec_info_type == SEC_INFO_TYPE_JUST_SYMS | ||
339 | || sec->output_section == bfd_abs_section_ptr | ||
340 | || strcmp (sec->name, VFP11_ERRATUM_VENEER_SECTION_NAME) == 0) | ||
341 | continue; | ||
342 | @@ -10305,7 +10305,7 @@ elf32_arm_relocate_section (bfd * output_bfd, | ||
343 | sym_type = h->type; | ||
344 | } | ||
345 | |||
346 | - if (sec != NULL && elf_discarded_section (sec)) | ||
347 | + if (sec != NULL && discarded_section (sec)) | ||
348 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
349 | rel, relend, howto, contents); | ||
350 | |||
351 | diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c | ||
352 | index a7f9217..97dc268 100644 | ||
353 | --- a/bfd/elf32-avr.c | ||
354 | +++ b/bfd/elf32-avr.c | ||
355 | @@ -1189,7 +1189,7 @@ elf32_avr_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, | ||
356 | name = h->root.root.string; | ||
357 | } | ||
358 | |||
359 | - if (sec != NULL && elf_discarded_section (sec)) | ||
360 | + if (sec != NULL && discarded_section (sec)) | ||
361 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
362 | rel, relend, howto, contents); | ||
363 | |||
364 | diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c | ||
365 | index b112dfc..4941f40 100644 | ||
366 | --- a/bfd/elf32-bfin.c | ||
367 | +++ b/bfd/elf32-bfin.c | ||
368 | @@ -1444,7 +1444,7 @@ bfin_relocate_section (bfd * output_bfd, | ||
369 | unresolved_reloc, warned); | ||
370 | } | ||
371 | |||
372 | - if (sec != NULL && elf_discarded_section (sec)) | ||
373 | + if (sec != NULL && discarded_section (sec)) | ||
374 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
375 | rel, relend, howto, contents); | ||
376 | |||
377 | @@ -2663,7 +2663,7 @@ bfinfdpic_relocate_section (bfd * output_bfd, | ||
378 | osec = sec; | ||
379 | } | ||
380 | |||
381 | - if (sec != NULL && elf_discarded_section (sec)) | ||
382 | + if (sec != NULL && discarded_section (sec)) | ||
383 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
384 | rel, relend, howto, contents); | ||
385 | |||
386 | @@ -4429,7 +4429,7 @@ bfinfdpic_elf_discard_info (bfd *ibfd, | ||
387 | |||
388 | /* Account for relaxation of .eh_frame section. */ | ||
389 | for (s = ibfd->sections; s; s = s->next) | ||
390 | - if (s->sec_info_type == ELF_INFO_TYPE_EH_FRAME) | ||
391 | + if (s->sec_info_type == SEC_INFO_TYPE_EH_FRAME) | ||
392 | { | ||
393 | if (!_bfinfdpic_check_discarded_relocs (ibfd, s, info, &changed)) | ||
394 | return FALSE; | ||
395 | diff --git a/bfd/elf32-cr16.c b/bfd/elf32-cr16.c | ||
396 | index 0118131..38af05f 100644 | ||
397 | --- a/bfd/elf32-cr16.c | ||
398 | +++ b/bfd/elf32-cr16.c | ||
399 | @@ -1431,7 +1431,7 @@ elf32_cr16_relocate_section (bfd *output_bfd, struct bfd_link_info *info, | ||
400 | unresolved_reloc, warned); | ||
401 | } | ||
402 | |||
403 | - if (sec != NULL && elf_discarded_section (sec)) | ||
404 | + if (sec != NULL && discarded_section (sec)) | ||
405 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
406 | rel, relend, howto, contents); | ||
407 | |||
408 | diff --git a/bfd/elf32-cr16c.c b/bfd/elf32-cr16c.c | ||
409 | index ca2d7cb..109936b 100644 | ||
410 | --- a/bfd/elf32-cr16c.c | ||
411 | +++ b/bfd/elf32-cr16c.c | ||
412 | @@ -723,7 +723,7 @@ elf32_cr16c_relocate_section (bfd *output_bfd, | ||
413 | unresolved_reloc, warned); | ||
414 | } | ||
415 | |||
416 | - if (sec != NULL && elf_discarded_section (sec)) | ||
417 | + if (sec != NULL && discarded_section (sec)) | ||
418 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
419 | rel, relend, howto, contents); | ||
420 | |||
421 | diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c | ||
422 | index 310f6d1..ec23f03 100644 | ||
423 | --- a/bfd/elf32-cris.c | ||
424 | +++ b/bfd/elf32-cris.c | ||
425 | @@ -1180,7 +1180,7 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, | ||
426 | } | ||
427 | } | ||
428 | |||
429 | - if (sec != NULL && elf_discarded_section (sec)) | ||
430 | + if (sec != NULL && discarded_section (sec)) | ||
431 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
432 | rel, relend, howto, contents); | ||
433 | |||
434 | diff --git a/bfd/elf32-crx.c b/bfd/elf32-crx.c | ||
435 | index d48932d..fd13447 100644 | ||
436 | --- a/bfd/elf32-crx.c | ||
437 | +++ b/bfd/elf32-crx.c | ||
438 | @@ -873,7 +873,7 @@ elf32_crx_relocate_section (bfd *output_bfd, struct bfd_link_info *info, | ||
439 | unresolved_reloc, warned); | ||
440 | } | ||
441 | |||
442 | - if (sec != NULL && elf_discarded_section (sec)) | ||
443 | + if (sec != NULL && discarded_section (sec)) | ||
444 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
445 | rel, relend, howto, contents); | ||
446 | |||
447 | diff --git a/bfd/elf32-d10v.c b/bfd/elf32-d10v.c | ||
448 | index 7d65395..e39a9b5 100644 | ||
449 | --- a/bfd/elf32-d10v.c | ||
450 | +++ b/bfd/elf32-d10v.c | ||
451 | @@ -463,7 +463,7 @@ elf32_d10v_relocate_section (bfd *output_bfd, | ||
452 | unresolved_reloc, warned); | ||
453 | } | ||
454 | |||
455 | - if (sec != NULL && elf_discarded_section (sec)) | ||
456 | + if (sec != NULL && discarded_section (sec)) | ||
457 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
458 | rel, relend, howto, contents); | ||
459 | |||
460 | diff --git a/bfd/elf32-fr30.c b/bfd/elf32-fr30.c | ||
461 | index 97b0d29..57be6ae 100644 | ||
462 | --- a/bfd/elf32-fr30.c | ||
463 | +++ b/bfd/elf32-fr30.c | ||
464 | @@ -577,7 +577,7 @@ fr30_elf_relocate_section (output_bfd, info, input_bfd, input_section, | ||
465 | name = h->root.root.string; | ||
466 | } | ||
467 | |||
468 | - if (sec != NULL && elf_discarded_section (sec)) | ||
469 | + if (sec != NULL && discarded_section (sec)) | ||
470 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
471 | rel, relend, howto, contents); | ||
472 | |||
473 | diff --git a/bfd/elf32-frv.c b/bfd/elf32-frv.c | ||
474 | index 7f3c4dd..513f811 100644 | ||
475 | --- a/bfd/elf32-frv.c | ||
476 | +++ b/bfd/elf32-frv.c | ||
477 | @@ -2812,7 +2812,7 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section, | ||
478 | name = h->root.root.string; | ||
479 | } | ||
480 | |||
481 | - if (sec != NULL && elf_discarded_section (sec)) | ||
482 | + if (sec != NULL && discarded_section (sec)) | ||
483 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
484 | rel, relend, howto, contents); | ||
485 | |||
486 | @@ -5678,7 +5678,7 @@ frvfdpic_elf_discard_info (bfd *ibfd, | ||
487 | |||
488 | /* Account for relaxation of .eh_frame section. */ | ||
489 | for (s = ibfd->sections; s; s = s->next) | ||
490 | - if (s->sec_info_type == ELF_INFO_TYPE_EH_FRAME) | ||
491 | + if (s->sec_info_type == SEC_INFO_TYPE_EH_FRAME) | ||
492 | { | ||
493 | if (!_frvfdpic_check_discarded_relocs (ibfd, s, info, &changed)) | ||
494 | return FALSE; | ||
495 | diff --git a/bfd/elf32-h8300.c b/bfd/elf32-h8300.c | ||
496 | index 95d3983..ff1ee70 100644 | ||
497 | --- a/bfd/elf32-h8300.c | ||
498 | +++ b/bfd/elf32-h8300.c | ||
499 | @@ -460,7 +460,7 @@ elf32_h8_relocate_section (bfd *output_bfd, struct bfd_link_info *info, | ||
500 | unresolved_reloc, warned); | ||
501 | } | ||
502 | |||
503 | - if (sec != NULL && elf_discarded_section (sec)) | ||
504 | + if (sec != NULL && discarded_section (sec)) | ||
505 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
506 | rel, relend, howto, contents); | ||
507 | |||
508 | diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c | ||
509 | index dcf6df0..044b6fa 100644 | ||
510 | --- a/bfd/elf32-hppa.c | ||
511 | +++ b/bfd/elf32-hppa.c | ||
512 | @@ -3741,7 +3741,7 @@ elf32_hppa_relocate_section (bfd *output_bfd, | ||
513 | hh = hppa_elf_hash_entry (eh); | ||
514 | } | ||
515 | |||
516 | - if (sym_sec != NULL && elf_discarded_section (sym_sec)) | ||
517 | + if (sym_sec != NULL && discarded_section (sym_sec)) | ||
518 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
519 | rela, relend, | ||
520 | elf_hppa_howto_table + r_type, | ||
521 | diff --git a/bfd/elf32-i370.c b/bfd/elf32-i370.c | ||
522 | index 8082927..516511f 100644 | ||
523 | --- a/bfd/elf32-i370.c | ||
524 | +++ b/bfd/elf32-i370.c | ||
525 | @@ -1138,7 +1138,7 @@ i370_elf_relocate_section (bfd *output_bfd, | ||
526 | } | ||
527 | } | ||
528 | |||
529 | - if (sec != NULL && elf_discarded_section (sec)) | ||
530 | + if (sec != NULL && discarded_section (sec)) | ||
531 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
532 | rel, relend, howto, contents); | ||
533 | |||
534 | diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c | ||
535 | index d518d01..b925ca6 100644 | ||
536 | --- a/bfd/elf32-i386.c | ||
537 | +++ b/bfd/elf32-i386.c | ||
538 | @@ -3178,7 +3178,7 @@ elf_i386_relocate_section (bfd *output_bfd, | ||
539 | unresolved_reloc, warned); | ||
540 | } | ||
541 | |||
542 | - if (sec != NULL && elf_discarded_section (sec)) | ||
543 | + if (sec != NULL && discarded_section (sec)) | ||
544 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
545 | rel, relend, howto, contents); | ||
546 | |||
547 | @@ -4846,7 +4846,7 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd, | ||
548 | + PLT_FDE_START_OFFSET); | ||
549 | } | ||
550 | if (htab->plt_eh_frame->sec_info_type | ||
551 | - == ELF_INFO_TYPE_EH_FRAME) | ||
552 | + == SEC_INFO_TYPE_EH_FRAME) | ||
553 | { | ||
554 | if (! _bfd_elf_write_section_eh_frame (output_bfd, info, | ||
555 | htab->plt_eh_frame, | ||
556 | diff --git a/bfd/elf32-i860.c b/bfd/elf32-i860.c | ||
557 | index 00c8ca7..88f4265 100644 | ||
558 | --- a/bfd/elf32-i860.c | ||
559 | +++ b/bfd/elf32-i860.c | ||
560 | @@ -1128,7 +1128,7 @@ elf32_i860_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, | ||
561 | unresolved_reloc, warned); | ||
562 | } | ||
563 | |||
564 | - if (sec != NULL && elf_discarded_section (sec)) | ||
565 | + if (sec != NULL && discarded_section (sec)) | ||
566 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
567 | rel, relend, howto, contents); | ||
568 | |||
569 | diff --git a/bfd/elf32-ip2k.c b/bfd/elf32-ip2k.c | ||
570 | index 0a251b8..43c7b1c 100644 | ||
571 | --- a/bfd/elf32-ip2k.c | ||
572 | +++ b/bfd/elf32-ip2k.c | ||
573 | @@ -1436,7 +1436,7 @@ ip2k_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, | ||
574 | name = h->root.root.string; | ||
575 | } | ||
576 | |||
577 | - if (sec != NULL && elf_discarded_section (sec)) | ||
578 | + if (sec != NULL && discarded_section (sec)) | ||
579 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
580 | rel, relend, howto, contents); | ||
581 | |||
582 | diff --git a/bfd/elf32-iq2000.c b/bfd/elf32-iq2000.c | ||
583 | index 63ef3dc..3954616 100644 | ||
584 | --- a/bfd/elf32-iq2000.c | ||
585 | +++ b/bfd/elf32-iq2000.c | ||
586 | @@ -633,7 +633,7 @@ iq2000_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, | ||
587 | name = h->root.root.string; | ||
588 | } | ||
589 | |||
590 | - if (sec != NULL && elf_discarded_section (sec)) | ||
591 | + if (sec != NULL && discarded_section (sec)) | ||
592 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
593 | rel, relend, howto, contents); | ||
594 | |||
595 | diff --git a/bfd/elf32-lm32.c b/bfd/elf32-lm32.c | ||
596 | index 07add20..a2b1003 100644 | ||
597 | --- a/bfd/elf32-lm32.c | ||
598 | +++ b/bfd/elf32-lm32.c | ||
599 | @@ -893,7 +893,7 @@ lm32_elf_relocate_section (bfd *output_bfd, | ||
600 | name = h->root.root.string; | ||
601 | } | ||
602 | |||
603 | - if (sec != NULL && elf_discarded_section (sec)) | ||
604 | + if (sec != NULL && discarded_section (sec)) | ||
605 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
606 | rel, relend, howto, contents); | ||
607 | |||
608 | @@ -2372,7 +2372,7 @@ lm32_elf_size_dynamic_sections (bfd *output_bfd, | ||
609 | /* Don't generate entries for weak symbols. */ | ||
610 | if (!h || (h && h->root.type != bfd_link_hash_undefweak)) | ||
611 | { | ||
612 | - if (!elf_discarded_section (s) && !((bfd_get_section_flags (ibfd, s) & SEC_ALLOC) == 0)) | ||
613 | + if (!discarded_section (s) && !((bfd_get_section_flags (ibfd, s) & SEC_ALLOC) == 0)) | ||
614 | { | ||
615 | switch (ELF32_R_TYPE (internal_relocs->r_info)) | ||
616 | { | ||
617 | @@ -2394,7 +2394,7 @@ lm32_elf_size_dynamic_sections (bfd *output_bfd, | ||
618 | if (!strcmp (current->name, h->root.root.string)) | ||
619 | break; | ||
620 | } | ||
621 | - if (!current && !elf_discarded_section (s) && (bfd_get_section_flags (ibfd, s) & SEC_ALLOC)) | ||
622 | + if (!current && !discarded_section (s) && (bfd_get_section_flags (ibfd, s) & SEC_ALLOC)) | ||
623 | { | ||
624 | /* Will this have an entry in the GOT. */ | ||
625 | if (ELF32_R_TYPE (internal_relocs->r_info) == R_LM32_16_GOT) | ||
626 | diff --git a/bfd/elf32-m32c.c b/bfd/elf32-m32c.c | ||
627 | index cf7ad99..bcdb55d 100644 | ||
628 | --- a/bfd/elf32-m32c.c | ||
629 | +++ b/bfd/elf32-m32c.c | ||
630 | @@ -434,7 +434,7 @@ m32c_elf_relocate_section | ||
631 | } | ||
632 | } | ||
633 | |||
634 | - if (sec != NULL && elf_discarded_section (sec)) | ||
635 | + if (sec != NULL && discarded_section (sec)) | ||
636 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
637 | rel, relend, howto, contents); | ||
638 | |||
639 | diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c | ||
640 | index 51ef61e..b151a8a 100644 | ||
641 | --- a/bfd/elf32-m32r.c | ||
642 | +++ b/bfd/elf32-m32r.c | ||
643 | @@ -2616,7 +2616,7 @@ m32r_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, | ||
644 | } | ||
645 | } | ||
646 | |||
647 | - if (sec != NULL && elf_discarded_section (sec)) | ||
648 | + if (sec != NULL && discarded_section (sec)) | ||
649 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
650 | rel, relend, howto, contents); | ||
651 | |||
652 | diff --git a/bfd/elf32-m68hc1x.c b/bfd/elf32-m68hc1x.c | ||
653 | index 961dce4..4b9a1c0 100644 | ||
654 | --- a/bfd/elf32-m68hc1x.c | ||
655 | +++ b/bfd/elf32-m68hc1x.c | ||
656 | @@ -970,7 +970,7 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, | ||
657 | is_far = (h && (h->other & STO_M68HC12_FAR)); | ||
658 | } | ||
659 | |||
660 | - if (sec != NULL && elf_discarded_section (sec)) | ||
661 | + if (sec != NULL && discarded_section (sec)) | ||
662 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
663 | rel, relend, howto, contents); | ||
664 | |||
665 | diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c | ||
666 | index 3e9ada9..518a41a 100644 | ||
667 | --- a/bfd/elf32-m68k.c | ||
668 | +++ b/bfd/elf32-m68k.c | ||
669 | @@ -3717,7 +3717,7 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section, | ||
670 | unresolved_reloc, warned); | ||
671 | } | ||
672 | |||
673 | - if (sec != NULL && elf_discarded_section (sec)) | ||
674 | + if (sec != NULL && discarded_section (sec)) | ||
675 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
676 | rel, relend, howto, contents); | ||
677 | |||
678 | diff --git a/bfd/elf32-mcore.c b/bfd/elf32-mcore.c | ||
679 | index 31cc095..02aef53 100644 | ||
680 | --- a/bfd/elf32-mcore.c | ||
681 | +++ b/bfd/elf32-mcore.c | ||
682 | @@ -466,7 +466,7 @@ mcore_elf_relocate_section (bfd * output_bfd, | ||
683 | unresolved_reloc, warned); | ||
684 | } | ||
685 | |||
686 | - if (sec != NULL && elf_discarded_section (sec)) | ||
687 | + if (sec != NULL && discarded_section (sec)) | ||
688 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
689 | rel, relend, howto, contents); | ||
690 | |||
691 | diff --git a/bfd/elf32-mep.c b/bfd/elf32-mep.c | ||
692 | index 6fecb25..e5104b3 100644 | ||
693 | --- a/bfd/elf32-mep.c | ||
694 | +++ b/bfd/elf32-mep.c | ||
695 | @@ -500,7 +500,7 @@ mep_elf_relocate_section | ||
696 | name = h->root.root.string; | ||
697 | } | ||
698 | |||
699 | - if (sec != NULL && elf_discarded_section (sec)) | ||
700 | + if (sec != NULL && discarded_section (sec)) | ||
701 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
702 | rel, relend, howto, contents); | ||
703 | |||
704 | diff --git a/bfd/elf32-moxie.c b/bfd/elf32-moxie.c | ||
705 | index 8463599..c340826 100644 | ||
706 | --- a/bfd/elf32-moxie.c | ||
707 | +++ b/bfd/elf32-moxie.c | ||
708 | @@ -250,7 +250,7 @@ moxie_elf_relocate_section (bfd *output_bfd, | ||
709 | name = h->root.root.string; | ||
710 | } | ||
711 | |||
712 | - if (sec != NULL && elf_discarded_section (sec)) | ||
713 | + if (sec != NULL && discarded_section (sec)) | ||
714 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
715 | rel, relend, howto, contents); | ||
716 | |||
717 | diff --git a/bfd/elf32-msp430.c b/bfd/elf32-msp430.c | ||
718 | index 9a5fb2a..2fa70d9 100644 | ||
719 | --- a/bfd/elf32-msp430.c | ||
720 | +++ b/bfd/elf32-msp430.c | ||
721 | @@ -454,7 +454,7 @@ elf32_msp430_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, | ||
722 | unresolved_reloc, warned); | ||
723 | } | ||
724 | |||
725 | - if (sec != NULL && elf_discarded_section (sec)) | ||
726 | + if (sec != NULL && discarded_section (sec)) | ||
727 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
728 | rel, relend, howto, contents); | ||
729 | |||
730 | diff --git a/bfd/elf32-mt.c b/bfd/elf32-mt.c | ||
731 | index 1be5d00..b87995e 100644 | ||
732 | --- a/bfd/elf32-mt.c | ||
733 | +++ b/bfd/elf32-mt.c | ||
734 | @@ -354,7 +354,7 @@ mt_elf_relocate_section | ||
735 | name = h->root.root.string; | ||
736 | } | ||
737 | |||
738 | - if (sec != NULL && elf_discarded_section (sec)) | ||
739 | + if (sec != NULL && discarded_section (sec)) | ||
740 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
741 | rel, relend, howto, contents); | ||
742 | |||
743 | diff --git a/bfd/elf32-openrisc.c b/bfd/elf32-openrisc.c | ||
744 | index ada738e..e441f4d 100644 | ||
745 | --- a/bfd/elf32-openrisc.c | ||
746 | +++ b/bfd/elf32-openrisc.c | ||
747 | @@ -373,7 +373,7 @@ openrisc_elf_relocate_section (bfd *output_bfd, | ||
748 | unresolved_reloc, warned); | ||
749 | } | ||
750 | |||
751 | - if (sec != NULL && elf_discarded_section (sec)) | ||
752 | + if (sec != NULL && discarded_section (sec)) | ||
753 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
754 | rel, relend, howto, contents); | ||
755 | |||
756 | diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c | ||
757 | index 574cd98..d3925af 100644 | ||
758 | --- a/bfd/elf32-ppc.c | ||
759 | +++ b/bfd/elf32-ppc.c | ||
760 | @@ -6231,7 +6231,7 @@ ppc_elf_relax_section (bfd *abfd, | ||
761 | attribute for a code section, and we are only looking at | ||
762 | branches. However, implement it correctly here as a | ||
763 | reference for other target relax_section functions. */ | ||
764 | - if (0 && tsec->sec_info_type == ELF_INFO_TYPE_MERGE) | ||
765 | + if (0 && tsec->sec_info_type == SEC_INFO_TYPE_MERGE) | ||
766 | { | ||
767 | /* At this stage in linking, no SEC_MERGE symbol has been | ||
768 | adjusted, so all references to such symbols need to be | ||
769 | @@ -6886,7 +6886,7 @@ ppc_elf_relocate_section (bfd *output_bfd, | ||
770 | sym_name = h->root.root.string; | ||
771 | } | ||
772 | |||
773 | - if (sec != NULL && elf_discarded_section (sec)) | ||
774 | + if (sec != NULL && discarded_section (sec)) | ||
775 | { | ||
776 | /* For relocs against symbols from removed linkonce sections, | ||
777 | or sections discarded by a linker script, we just want the | ||
778 | @@ -9054,7 +9054,7 @@ ppc_elf_finish_dynamic_sections (bfd *output_bfd, | ||
779 | BFD_ASSERT ((bfd_vma) ((p + 3 - htab->glink_eh_frame->contents) & -4) | ||
780 | == htab->glink_eh_frame->size); | ||
781 | |||
782 | - if (htab->glink_eh_frame->sec_info_type == ELF_INFO_TYPE_EH_FRAME | ||
783 | + if (htab->glink_eh_frame->sec_info_type == SEC_INFO_TYPE_EH_FRAME | ||
784 | && !_bfd_elf_write_section_eh_frame (output_bfd, info, | ||
785 | htab->glink_eh_frame, | ||
786 | htab->glink_eh_frame->contents)) | ||
787 | diff --git a/bfd/elf32-rx.c b/bfd/elf32-rx.c | ||
788 | index f049f6e..32820b4 100644 | ||
789 | --- a/bfd/elf32-rx.c | ||
790 | +++ b/bfd/elf32-rx.c | ||
791 | @@ -510,7 +510,7 @@ rx_elf_relocate_section | ||
792 | name = h->root.root.string; | ||
793 | } | ||
794 | |||
795 | - if (sec != NULL && elf_discarded_section (sec)) | ||
796 | + if (sec != NULL && discarded_section (sec)) | ||
797 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
798 | rel, relend, howto, contents); | ||
799 | |||
800 | @@ -1588,7 +1588,7 @@ rx_offset_for_reloc (bfd * abfd, | ||
801 | if (ssec) | ||
802 | { | ||
803 | if ((ssec->flags & SEC_MERGE) | ||
804 | - && ssec->sec_info_type == ELF_INFO_TYPE_MERGE) | ||
805 | + && ssec->sec_info_type == SEC_INFO_TYPE_MERGE) | ||
806 | symval = _bfd_merged_section_offset (abfd, & ssec, | ||
807 | elf_section_data (ssec)->sec_info, | ||
808 | symval); | ||
809 | diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c | ||
810 | index 98437d0..11fb072 100644 | ||
811 | --- a/bfd/elf32-s390.c | ||
812 | +++ b/bfd/elf32-s390.c | ||
813 | @@ -2282,7 +2282,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section, | ||
814 | unresolved_reloc, warned); | ||
815 | } | ||
816 | |||
817 | - if (sec != NULL && elf_discarded_section (sec)) | ||
818 | + if (sec != NULL && discarded_section (sec)) | ||
819 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
820 | rel, relend, howto, contents); | ||
821 | |||
822 | diff --git a/bfd/elf32-score.c b/bfd/elf32-score.c | ||
823 | index b437624..ef849aa 100644 | ||
824 | --- a/bfd/elf32-score.c | ||
825 | +++ b/bfd/elf32-score.c | ||
826 | @@ -2672,7 +2672,7 @@ s3_bfd_score_elf_relocate_section (bfd *output_bfd, | ||
827 | } | ||
828 | } | ||
829 | |||
830 | - if (sec != NULL && elf_discarded_section (sec)) | ||
831 | + if (sec != NULL && discarded_section (sec)) | ||
832 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
833 | rel, relend, howto, contents); | ||
834 | |||
835 | diff --git a/bfd/elf32-score7.c b/bfd/elf32-score7.c | ||
836 | index 3e98bfc..3d228f3 100644 | ||
837 | --- a/bfd/elf32-score7.c | ||
838 | +++ b/bfd/elf32-score7.c | ||
839 | @@ -2443,7 +2443,7 @@ s7_bfd_score_elf_relocate_section (bfd *output_bfd, | ||
840 | } | ||
841 | } | ||
842 | |||
843 | - if (sec != NULL && elf_discarded_section (sec)) | ||
844 | + if (sec != NULL && discarded_section (sec)) | ||
845 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
846 | rel, relend, howto, contents); | ||
847 | |||
848 | diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c | ||
849 | index ca2c4af..e56c3b5 100644 | ||
850 | --- a/bfd/elf32-sh.c | ||
851 | +++ b/bfd/elf32-sh.c | ||
852 | @@ -4048,7 +4048,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, | ||
853 | _("Unexpected STO_SH5_ISA32 on local symbol is not handled"), | ||
854 | input_bfd, input_section, rel->r_offset)); | ||
855 | |||
856 | - if (sec != NULL && elf_discarded_section (sec)) | ||
857 | + if (sec != NULL && discarded_section (sec)) | ||
858 | /* Handled below. */ | ||
859 | ; | ||
860 | else if (info->relocatable) | ||
861 | @@ -4236,7 +4236,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, | ||
862 | } | ||
863 | } | ||
864 | |||
865 | - if (sec != NULL && elf_discarded_section (sec)) | ||
866 | + if (sec != NULL && discarded_section (sec)) | ||
867 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
868 | rel, relend, howto, contents); | ||
869 | |||
870 | diff --git a/bfd/elf32-spu.c b/bfd/elf32-spu.c | ||
871 | index ae3ed10..40a9da2 100644 | ||
872 | --- a/bfd/elf32-spu.c | ||
873 | +++ b/bfd/elf32-spu.c | ||
874 | @@ -4895,7 +4895,7 @@ spu_elf_relocate_section (bfd *output_bfd, | ||
875 | sym_name = h->root.root.string; | ||
876 | } | ||
877 | |||
878 | - if (sec != NULL && elf_discarded_section (sec)) | ||
879 | + if (sec != NULL && discarded_section (sec)) | ||
880 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
881 | rel, relend, howto, contents); | ||
882 | |||
883 | diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c | ||
884 | index 44042eb..a879d3c 100644 | ||
885 | --- a/bfd/elf32-tic6x.c | ||
886 | +++ b/bfd/elf32-tic6x.c | ||
887 | @@ -2334,7 +2334,7 @@ elf32_tic6x_relocate_section (bfd *output_bfd, | ||
888 | unresolved_reloc, warned); | ||
889 | } | ||
890 | |||
891 | - if (sec != NULL && elf_discarded_section (sec)) | ||
892 | + if (sec != NULL && discarded_section (sec)) | ||
893 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
894 | rel, relend, howto, contents); | ||
895 | |||
896 | diff --git a/bfd/elf32-tilepro.c b/bfd/elf32-tilepro.c | ||
897 | index f2aed9c..a4e565d 100644 | ||
898 | --- a/bfd/elf32-tilepro.c | ||
899 | +++ b/bfd/elf32-tilepro.c | ||
900 | @@ -2594,7 +2594,7 @@ tilepro_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, | ||
901 | } | ||
902 | } | ||
903 | |||
904 | - if (sec != NULL && elf_discarded_section (sec)) | ||
905 | + if (sec != NULL && discarded_section (sec)) | ||
906 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
907 | rel, relend, howto, contents); | ||
908 | |||
909 | diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c | ||
910 | index 9e6f77d..0fbe080 100644 | ||
911 | --- a/bfd/elf32-v850.c | ||
912 | +++ b/bfd/elf32-v850.c | ||
913 | @@ -2093,7 +2093,7 @@ v850_elf_relocate_section (bfd *output_bfd, | ||
914 | unresolved_reloc, warned); | ||
915 | } | ||
916 | |||
917 | - if (sec != NULL && elf_discarded_section (sec)) | ||
918 | + if (sec != NULL && discarded_section (sec)) | ||
919 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
920 | rel, relend, howto, contents); | ||
921 | |||
922 | diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c | ||
923 | index 643381c..fc3cb7c 100644 | ||
924 | --- a/bfd/elf32-vax.c | ||
925 | +++ b/bfd/elf32-vax.c | ||
926 | @@ -1450,7 +1450,7 @@ elf_vax_relocate_section (bfd *output_bfd, | ||
927 | relocation = 0; | ||
928 | } | ||
929 | |||
930 | - if (sec != NULL && elf_discarded_section (sec)) | ||
931 | + if (sec != NULL && discarded_section (sec)) | ||
932 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
933 | rel, relend, howto, contents); | ||
934 | |||
935 | diff --git a/bfd/elf32-xc16x.c b/bfd/elf32-xc16x.c | ||
936 | index 11d9840..00c7841 100644 | ||
937 | --- a/bfd/elf32-xc16x.c | ||
938 | +++ b/bfd/elf32-xc16x.c | ||
939 | @@ -381,7 +381,7 @@ elf32_xc16x_relocate_section (bfd *output_bfd, | ||
940 | unresolved_reloc, warned); | ||
941 | } | ||
942 | |||
943 | - if (sec != NULL && elf_discarded_section (sec)) | ||
944 | + if (sec != NULL && discarded_section (sec)) | ||
945 | { | ||
946 | /* For relocs against symbols from removed linkonce sections, | ||
947 | or sections discarded by a linker script, we just want the | ||
948 | diff --git a/bfd/elf32-xstormy16.c b/bfd/elf32-xstormy16.c | ||
949 | index 6141783..86e1d5b 100644 | ||
950 | --- a/bfd/elf32-xstormy16.c | ||
951 | +++ b/bfd/elf32-xstormy16.c | ||
952 | @@ -825,7 +825,7 @@ xstormy16_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNU | ||
953 | unresolved_reloc, warned); | ||
954 | } | ||
955 | |||
956 | - if (sec != NULL && elf_discarded_section (sec)) | ||
957 | + if (sec != NULL && discarded_section (sec)) | ||
958 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
959 | rel, relend, howto, contents); | ||
960 | |||
961 | diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c | ||
962 | index c6e4fb4..5a51eae 100644 | ||
963 | --- a/bfd/elf32-xtensa.c | ||
964 | +++ b/bfd/elf32-xtensa.c | ||
965 | @@ -1712,7 +1712,7 @@ elf_xtensa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, | ||
966 | continue; | ||
967 | for (s = abfd->sections; s != NULL; s = s->next) | ||
968 | { | ||
969 | - if (! elf_discarded_section (s) | ||
970 | + if (! discarded_section (s) | ||
971 | && xtensa_is_littable_section (s) | ||
972 | && s != spltlittbl) | ||
973 | sgotloc->size += s->size; | ||
974 | @@ -2656,7 +2656,7 @@ elf_xtensa_relocate_section (bfd *output_bfd, | ||
975 | sym_type = h->type; | ||
976 | } | ||
977 | |||
978 | - if (sec != NULL && elf_discarded_section (sec)) | ||
979 | + if (sec != NULL && discarded_section (sec)) | ||
980 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
981 | rel, relend, howto, contents); | ||
982 | |||
983 | @@ -8960,9 +8960,9 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) | ||
984 | that here and adjust things accordingly. */ | ||
985 | if (! elf_xtensa_ignore_discarded_relocs (sec) | ||
986 | && elf_xtensa_action_discarded (sec) == PRETEND | ||
987 | - && sec->sec_info_type != ELF_INFO_TYPE_STABS | ||
988 | + && sec->sec_info_type != SEC_INFO_TYPE_STABS | ||
989 | && target_sec != NULL | ||
990 | - && elf_discarded_section (target_sec)) | ||
991 | + && discarded_section (target_sec)) | ||
992 | { | ||
993 | /* It would be natural to call _bfd_elf_check_kept_section | ||
994 | here, but it's not exported from elflink.c. It's also a | ||
995 | diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c | ||
996 | index 6076709..ddb1cd7 100644 | ||
997 | --- a/bfd/elf64-alpha.c | ||
998 | +++ b/bfd/elf64-alpha.c | ||
999 | @@ -4106,7 +4106,7 @@ elf64_alpha_relocate_section_r (bfd *output_bfd ATTRIBUTE_UNUSED, | ||
1000 | sec = h->root.u.def.section; | ||
1001 | } | ||
1002 | |||
1003 | - if (sec != NULL && elf_discarded_section (sec)) | ||
1004 | + if (sec != NULL && discarded_section (sec)) | ||
1005 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
1006 | rel, relend, | ||
1007 | elf64_alpha_howto_table + r_type, | ||
1008 | @@ -4263,7 +4263,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info, | ||
1009 | unless it has been done already. */ | ||
1010 | if ((sec->flags & SEC_MERGE) | ||
1011 | && ELF_ST_TYPE (sym->st_info) == STT_SECTION | ||
1012 | - && sec->sec_info_type == ELF_INFO_TYPE_MERGE | ||
1013 | + && sec->sec_info_type == SEC_INFO_TYPE_MERGE | ||
1014 | && gotent | ||
1015 | && !gotent->reloc_xlated) | ||
1016 | { | ||
1017 | @@ -4315,7 +4315,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info, | ||
1018 | gotent = h->got_entries; | ||
1019 | } | ||
1020 | |||
1021 | - if (sec != NULL && elf_discarded_section (sec)) | ||
1022 | + if (sec != NULL && discarded_section (sec)) | ||
1023 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
1024 | rel, relend, howto, contents); | ||
1025 | |||
1026 | @@ -4717,7 +4717,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info, | ||
1027 | |||
1028 | if (r_symndx < symtab_hdr->sh_info | ||
1029 | && sec != NULL && howto->pc_relative | ||
1030 | - && elf_discarded_section (sec)) | ||
1031 | + && discarded_section (sec)) | ||
1032 | break; | ||
1033 | |||
1034 | if (h != NULL) | ||
1035 | diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c | ||
1036 | index 057a92d..9d2dfcf 100644 | ||
1037 | --- a/bfd/elf64-hppa.c | ||
1038 | +++ b/bfd/elf64-hppa.c | ||
1039 | @@ -3919,7 +3919,7 @@ elf64_hppa_relocate_section (bfd *output_bfd, | ||
1040 | } | ||
1041 | } | ||
1042 | |||
1043 | - if (sym_sec != NULL && elf_discarded_section (sym_sec)) | ||
1044 | + if (sym_sec != NULL && discarded_section (sym_sec)) | ||
1045 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
1046 | rel, relend, howto, contents); | ||
1047 | |||
1048 | diff --git a/bfd/elf64-mmix.c b/bfd/elf64-mmix.c | ||
1049 | index ecc9ad0..9cc407f 100644 | ||
1050 | --- a/bfd/elf64-mmix.c | ||
1051 | +++ b/bfd/elf64-mmix.c | ||
1052 | @@ -1475,7 +1475,7 @@ mmix_elf_relocate_section (output_bfd, info, input_bfd, input_section, | ||
1053 | name = h->root.root.string; | ||
1054 | } | ||
1055 | |||
1056 | - if (sec != NULL && elf_discarded_section (sec)) | ||
1057 | + if (sec != NULL && discarded_section (sec)) | ||
1058 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
1059 | rel, relend, howto, contents); | ||
1060 | |||
1061 | diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c | ||
1062 | index 32a3430..52e9ce9 100644 | ||
1063 | --- a/bfd/elf64-ppc.c | ||
1064 | +++ b/bfd/elf64-ppc.c | ||
1065 | @@ -6852,7 +6852,7 @@ adjust_opd_syms (struct elf_link_hash_entry *h, void *inf ATTRIBUTE_UNUSED) | ||
1066 | if (dsec == NULL) | ||
1067 | { | ||
1068 | for (dsec = sym_sec->owner->sections; dsec; dsec = dsec->next) | ||
1069 | - if (elf_discarded_section (dsec)) | ||
1070 | + if (discarded_section (dsec)) | ||
1071 | { | ||
1072 | ppc64_elf_tdata (sym_sec->owner)->deleted_section = dsec; | ||
1073 | break; | ||
1074 | @@ -7033,7 +7033,7 @@ ppc64_elf_edit_opd (struct bfd_link_info *info, bfd_boolean non_overlapping) | ||
1075 | if (sec == NULL || sec->size == 0) | ||
1076 | continue; | ||
1077 | |||
1078 | - if (sec->sec_info_type == ELF_INFO_TYPE_JUST_SYMS) | ||
1079 | + if (sec->sec_info_type == SEC_INFO_TYPE_JUST_SYMS) | ||
1080 | continue; | ||
1081 | |||
1082 | if (sec->output_section == bfd_abs_section_ptr) | ||
1083 | @@ -8077,8 +8077,8 @@ ppc64_elf_edit_toc (struct bfd_link_info *info) | ||
1084 | toc = bfd_get_section_by_name (ibfd, ".toc"); | ||
1085 | if (toc == NULL | ||
1086 | || toc->size == 0 | ||
1087 | - || toc->sec_info_type == ELF_INFO_TYPE_JUST_SYMS | ||
1088 | - || elf_discarded_section (toc)) | ||
1089 | + || toc->sec_info_type == SEC_INFO_TYPE_JUST_SYMS | ||
1090 | + || discarded_section (toc)) | ||
1091 | continue; | ||
1092 | |||
1093 | toc_relocs = NULL; | ||
1094 | @@ -8091,7 +8091,7 @@ ppc64_elf_edit_toc (struct bfd_link_info *info) | ||
1095 | for (sec = ibfd->sections; sec != NULL; sec = sec->next) | ||
1096 | { | ||
1097 | if (sec->reloc_count == 0 | ||
1098 | - || !elf_discarded_section (sec) | ||
1099 | + || !discarded_section (sec) | ||
1100 | || get_opd_info (sec) | ||
1101 | || (sec->flags & SEC_ALLOC) == 0 | ||
1102 | || (sec->flags & SEC_DEBUGGING) != 0) | ||
1103 | @@ -8201,7 +8201,7 @@ ppc64_elf_edit_toc (struct bfd_link_info *info) | ||
1104 | goto error_ret; | ||
1105 | |||
1106 | if (sym_sec == NULL | ||
1107 | - || elf_discarded_section (sym_sec)) | ||
1108 | + || discarded_section (sym_sec)) | ||
1109 | continue; | ||
1110 | |||
1111 | if (!SYMBOL_CALLS_LOCAL (info, h)) | ||
1112 | @@ -8281,7 +8281,7 @@ ppc64_elf_edit_toc (struct bfd_link_info *info) | ||
1113 | int repeat; | ||
1114 | |||
1115 | if (sec->reloc_count == 0 | ||
1116 | - || elf_discarded_section (sec) | ||
1117 | + || discarded_section (sec) | ||
1118 | || get_opd_info (sec) | ||
1119 | || (sec->flags & SEC_ALLOC) == 0 | ||
1120 | || (sec->flags & SEC_DEBUGGING) != 0) | ||
1121 | @@ -8503,7 +8503,7 @@ ppc64_elf_edit_toc (struct bfd_link_info *info) | ||
1122 | for (sec = ibfd->sections; sec != NULL; sec = sec->next) | ||
1123 | { | ||
1124 | if (sec->reloc_count == 0 | ||
1125 | - || elf_discarded_section (sec)) | ||
1126 | + || discarded_section (sec)) | ||
1127 | continue; | ||
1128 | |||
1129 | relstart = _bfd_elf_link_read_relocs (ibfd, sec, NULL, NULL, | ||
1130 | @@ -12036,7 +12036,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, | ||
1131 | } | ||
1132 | h = (struct ppc_link_hash_entry *) h_elf; | ||
1133 | |||
1134 | - if (sec != NULL && elf_discarded_section (sec)) | ||
1135 | + if (sec != NULL && discarded_section (sec)) | ||
1136 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
1137 | rel, relend, | ||
1138 | ppc64_elf_howto_table[r_type], | ||
1139 | @@ -13865,7 +13865,7 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd, | ||
1140 | |||
1141 | |||
1142 | if (htab->glink_eh_frame != NULL | ||
1143 | - && htab->glink_eh_frame->sec_info_type == ELF_INFO_TYPE_EH_FRAME | ||
1144 | + && htab->glink_eh_frame->sec_info_type == SEC_INFO_TYPE_EH_FRAME | ||
1145 | && !_bfd_elf_write_section_eh_frame (output_bfd, info, | ||
1146 | htab->glink_eh_frame, | ||
1147 | htab->glink_eh_frame->contents)) | ||
1148 | diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c | ||
1149 | index 9884da0..e9138a6 100644 | ||
1150 | --- a/bfd/elf64-s390.c | ||
1151 | +++ b/bfd/elf64-s390.c | ||
1152 | @@ -2270,7 +2270,7 @@ elf_s390_relocate_section (bfd *output_bfd, | ||
1153 | unresolved_reloc, warned); | ||
1154 | } | ||
1155 | |||
1156 | - if (sec != NULL && elf_discarded_section (sec)) | ||
1157 | + if (sec != NULL && discarded_section (sec)) | ||
1158 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
1159 | rel, relend, howto, contents); | ||
1160 | |||
1161 | diff --git a/bfd/elf64-sh64.c b/bfd/elf64-sh64.c | ||
1162 | index bbef2a2..d8f2120 100644 | ||
1163 | --- a/bfd/elf64-sh64.c | ||
1164 | +++ b/bfd/elf64-sh64.c | ||
1165 | @@ -1514,7 +1514,7 @@ sh_elf64_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, | ||
1166 | _("Unexpected STO_SH5_ISA32 on local symbol is not handled"), | ||
1167 | input_bfd, input_section, rel->r_offset)); | ||
1168 | |||
1169 | - if (sec != NULL && elf_discarded_section (sec)) | ||
1170 | + if (sec != NULL && discarded_section (sec)) | ||
1171 | /* Handled below. */ | ||
1172 | ; | ||
1173 | else if (info->relocatable) | ||
1174 | @@ -1657,7 +1657,7 @@ sh_elf64_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, | ||
1175 | } | ||
1176 | } | ||
1177 | |||
1178 | - if (sec != NULL && elf_discarded_section (sec)) | ||
1179 | + if (sec != NULL && discarded_section (sec)) | ||
1180 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
1181 | rel, relend, howto, contents); | ||
1182 | |||
1183 | diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c | ||
1184 | index bdb3ae6..9d826e7 100644 | ||
1185 | --- a/bfd/elf64-x86-64.c | ||
1186 | +++ b/bfd/elf64-x86-64.c | ||
1187 | @@ -3062,7 +3062,7 @@ elf_x86_64_relocate_section (bfd *output_bfd, | ||
1188 | unresolved_reloc, warned); | ||
1189 | } | ||
1190 | |||
1191 | - if (sec != NULL && elf_discarded_section (sec)) | ||
1192 | + if (sec != NULL && discarded_section (sec)) | ||
1193 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
1194 | rel, relend, howto, contents); | ||
1195 | |||
1196 | @@ -4625,7 +4625,7 @@ elf_x86_64_finish_dynamic_sections (bfd *output_bfd, | ||
1197 | + PLT_FDE_START_OFFSET); | ||
1198 | } | ||
1199 | if (htab->plt_eh_frame->sec_info_type | ||
1200 | - == ELF_INFO_TYPE_EH_FRAME) | ||
1201 | + == SEC_INFO_TYPE_EH_FRAME) | ||
1202 | { | ||
1203 | if (! _bfd_elf_write_section_eh_frame (output_bfd, info, | ||
1204 | htab->plt_eh_frame, | ||
1205 | diff --git a/bfd/elflink.c b/bfd/elflink.c | ||
1206 | index 8556cec..da6be48 100644 | ||
1207 | --- a/bfd/elflink.c | ||
1208 | +++ b/bfd/elflink.c | ||
1209 | @@ -1,6 +1,6 @@ | ||
1210 | /* ELF linking support for BFD. | ||
1211 | Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, | ||
1212 | - 2005, 2006, 2007, 2008, 2009, 2010, 2011 | ||
1213 | + 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 | ||
1214 | Free Software Foundation, Inc. | ||
1215 | |||
1216 | This file is part of BFD, the Binary File Descriptor library. | ||
1217 | @@ -937,7 +937,7 @@ _bfd_elf_merge_symbol (bfd *abfd, | ||
1218 | /* Silently discard TLS symbols from --just-syms. There's no way to | ||
1219 | combine a static TLS block with a new TLS block for this executable. */ | ||
1220 | if (ELF_ST_TYPE (sym->st_info) == STT_TLS | ||
1221 | - && sec->sec_info_type == ELF_INFO_TYPE_JUST_SYMS) | ||
1222 | + && sec->sec_info_type == SEC_INFO_TYPE_JUST_SYMS) | ||
1223 | { | ||
1224 | *skip = TRUE; | ||
1225 | return TRUE; | ||
1226 | @@ -2708,7 +2708,7 @@ _bfd_elf_link_sec_merge_syms (struct elf_link_hash_entry *h, void *data) | ||
1227 | if ((h->root.type == bfd_link_hash_defined | ||
1228 | || h->root.type == bfd_link_hash_defweak) | ||
1229 | && ((sec = h->root.u.def.section)->flags & SEC_MERGE) | ||
1230 | - && sec->sec_info_type == ELF_INFO_TYPE_MERGE) | ||
1231 | + && sec->sec_info_type == SEC_INFO_TYPE_MERGE) | ||
1232 | { | ||
1233 | bfd *output_bfd = (bfd *) data; | ||
1234 | |||
1235 | @@ -3499,7 +3499,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) | ||
1236 | /* ld --just-symbols and dynamic objects don't mix very well. | ||
1237 | ld shouldn't allow it. */ | ||
1238 | if ((s = abfd->sections) != NULL | ||
1239 | - && s->sec_info_type == ELF_INFO_TYPE_JUST_SYMS) | ||
1240 | + && s->sec_info_type == SEC_INFO_TYPE_JUST_SYMS) | ||
1241 | abort (); | ||
1242 | |||
1243 | /* If this dynamic lib was specified on the command line with | ||
1244 | @@ -3896,7 +3896,7 @@ error_free_dyn: | ||
1245 | sec = bfd_section_from_elf_index (abfd, isym->st_shndx); | ||
1246 | if (sec == NULL) | ||
1247 | sec = bfd_abs_section_ptr; | ||
1248 | - else if (elf_discarded_section (sec)) | ||
1249 | + else if (discarded_section (sec)) | ||
1250 | { | ||
1251 | /* Symbols from discarded section are undefined. We keep | ||
1252 | its visibility. */ | ||
1253 | @@ -4861,7 +4861,7 @@ error_free_dyn: | ||
1254 | &string_offset)) | ||
1255 | goto error_return; | ||
1256 | if (secdata->sec_info) | ||
1257 | - stab->sec_info_type = ELF_INFO_TYPE_STABS; | ||
1258 | + stab->sec_info_type = SEC_INFO_TYPE_STABS; | ||
1259 | } | ||
1260 | } | ||
1261 | } | ||
1262 | @@ -6644,25 +6644,14 @@ bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info) | ||
1263 | return TRUE; | ||
1264 | } | ||
1265 | |||
1266 | -/* Indicate that we are only retrieving symbol values from this | ||
1267 | - section. */ | ||
1268 | - | ||
1269 | -void | ||
1270 | -_bfd_elf_link_just_syms (asection *sec, struct bfd_link_info *info) | ||
1271 | -{ | ||
1272 | - if (is_elf_hash_table (info->hash)) | ||
1273 | - sec->sec_info_type = ELF_INFO_TYPE_JUST_SYMS; | ||
1274 | - _bfd_generic_link_just_syms (sec, info); | ||
1275 | -} | ||
1276 | - | ||
1277 | /* Make sure sec_info_type is cleared if sec_info is cleared too. */ | ||
1278 | |||
1279 | static void | ||
1280 | merge_sections_remove_hook (bfd *abfd ATTRIBUTE_UNUSED, | ||
1281 | asection *sec) | ||
1282 | { | ||
1283 | - BFD_ASSERT (sec->sec_info_type == ELF_INFO_TYPE_MERGE); | ||
1284 | - sec->sec_info_type = ELF_INFO_TYPE_NONE; | ||
1285 | + BFD_ASSERT (sec->sec_info_type == SEC_INFO_TYPE_MERGE); | ||
1286 | + sec->sec_info_type = SEC_INFO_TYPE_NONE; | ||
1287 | } | ||
1288 | |||
1289 | /* Finish SHF_MERGE section merging. */ | ||
1290 | @@ -6690,7 +6679,7 @@ _bfd_elf_merge_sections (bfd *abfd, struct bfd_link_info *info) | ||
1291 | sec, &secdata->sec_info)) | ||
1292 | return FALSE; | ||
1293 | else if (secdata->sec_info) | ||
1294 | - sec->sec_info_type = ELF_INFO_TYPE_MERGE; | ||
1295 | + sec->sec_info_type = SEC_INFO_TYPE_MERGE; | ||
1296 | } | ||
1297 | |||
1298 | if (elf_hash_table (info)->merge_info != NULL) | ||
1299 | @@ -8708,7 +8697,7 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data) | ||
1300 | else if ((h->root.type == bfd_link_hash_defined | ||
1301 | || h->root.type == bfd_link_hash_defweak) | ||
1302 | && ((finfo->info->strip_discarded | ||
1303 | - && elf_discarded_section (h->root.u.def.section)) | ||
1304 | + && discarded_section (h->root.u.def.section)) | ||
1305 | || (h->root.u.def.section->owner != NULL | ||
1306 | && (h->root.u.def.section->owner->flags & BFD_PLUGIN) != 0))) | ||
1307 | strip = TRUE; | ||
1308 | @@ -9007,8 +8996,8 @@ elf_section_ignore_discarded_relocs (asection *sec) | ||
1309 | |||
1310 | switch (sec->sec_info_type) | ||
1311 | { | ||
1312 | - case ELF_INFO_TYPE_STABS: | ||
1313 | - case ELF_INFO_TYPE_EH_FRAME: | ||
1314 | + case SEC_INFO_TYPE_STABS: | ||
1315 | + case SEC_INFO_TYPE_EH_FRAME: | ||
1316 | return TRUE; | ||
1317 | default: | ||
1318 | break; | ||
1319 | @@ -9193,7 +9182,7 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd) | ||
1320 | *ppsection = NULL; | ||
1321 | continue; | ||
1322 | } | ||
1323 | - else if (isec->sec_info_type == ELF_INFO_TYPE_MERGE | ||
1324 | + else if (isec->sec_info_type == SEC_INFO_TYPE_MERGE | ||
1325 | && ELF_ST_TYPE (isym->st_info) != STT_SECTION) | ||
1326 | isym->st_value = | ||
1327 | _bfd_merged_section_offset (output_bfd, &isec, | ||
1328 | @@ -9537,7 +9526,7 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd) | ||
1329 | { | ||
1330 | /* Complain if the definition comes from a | ||
1331 | discarded section. */ | ||
1332 | - if ((sec = *ps) != NULL && elf_discarded_section (sec)) | ||
1333 | + if ((sec = *ps) != NULL && discarded_section (sec)) | ||
1334 | { | ||
1335 | BFD_ASSERT (r_symndx != STN_UNDEF); | ||
1336 | if (action_discarded & COMPLAIN) | ||
1337 | @@ -9874,19 +9863,19 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd) | ||
1338 | } | ||
1339 | else switch (o->sec_info_type) | ||
1340 | { | ||
1341 | - case ELF_INFO_TYPE_STABS: | ||
1342 | + case SEC_INFO_TYPE_STABS: | ||
1343 | if (! (_bfd_write_section_stabs | ||
1344 | (output_bfd, | ||
1345 | &elf_hash_table (finfo->info)->stab_info, | ||
1346 | o, &elf_section_data (o)->sec_info, contents))) | ||
1347 | return FALSE; | ||
1348 | break; | ||
1349 | - case ELF_INFO_TYPE_MERGE: | ||
1350 | + case SEC_INFO_TYPE_MERGE: | ||
1351 | if (! _bfd_write_merged_section (output_bfd, o, | ||
1352 | elf_section_data (o)->sec_info)) | ||
1353 | return FALSE; | ||
1354 | break; | ||
1355 | - case ELF_INFO_TYPE_EH_FRAME: | ||
1356 | + case SEC_INFO_TYPE_EH_FRAME: | ||
1357 | { | ||
1358 | if (! _bfd_elf_write_section_eh_frame (output_bfd, finfo->info, | ||
1359 | o, contents)) | ||
1360 | @@ -12415,7 +12404,7 @@ bfd_elf_reloc_symbol_deleted_p (bfd_vma offset, void *cookie) | ||
1361 | |||
1362 | if ((h->root.type == bfd_link_hash_defined | ||
1363 | || h->root.type == bfd_link_hash_defweak) | ||
1364 | - && elf_discarded_section (h->root.u.def.section)) | ||
1365 | + && discarded_section (h->root.u.def.section)) | ||
1366 | return TRUE; | ||
1367 | else | ||
1368 | return FALSE; | ||
1369 | @@ -12431,7 +12420,7 @@ bfd_elf_reloc_symbol_deleted_p (bfd_vma offset, void *cookie) | ||
1370 | /* Need to: get the symbol; get the section. */ | ||
1371 | isym = &rcookie->locsyms[r_symndx]; | ||
1372 | isec = bfd_section_from_elf_index (rcookie->abfd, isym->st_shndx); | ||
1373 | - if (isec != NULL && elf_discarded_section (isec)) | ||
1374 | + if (isec != NULL && discarded_section (isec)) | ||
1375 | return TRUE; | ||
1376 | } | ||
1377 | return FALSE; | ||
1378 | @@ -12482,7 +12471,7 @@ bfd_elf_discard_info (bfd *output_bfd, struct bfd_link_info *info) | ||
1379 | if (stab != NULL | ||
1380 | && (stab->size == 0 | ||
1381 | || bfd_is_abs_section (stab->output_section) | ||
1382 | - || stab->sec_info_type != ELF_INFO_TYPE_STABS)) | ||
1383 | + || stab->sec_info_type != SEC_INFO_TYPE_STABS)) | ||
1384 | stab = NULL; | ||
1385 | |||
1386 | if (stab == NULL | ||
1387 | diff --git a/bfd/elfnn-ia64.c b/bfd/elfnn-ia64.c | ||
1388 | index 3e2ee0b..0f6b720 100644 | ||
1389 | --- a/bfd/elfnn-ia64.c | ||
1390 | +++ b/bfd/elfnn-ia64.c | ||
1391 | @@ -530,7 +530,7 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec, | ||
1392 | symtype = h->type; | ||
1393 | } | ||
1394 | |||
1395 | - if (tsec->sec_info_type == ELF_INFO_TYPE_MERGE) | ||
1396 | + if (tsec->sec_info_type == SEC_INFO_TYPE_MERGE) | ||
1397 | { | ||
1398 | /* At this stage in linking, no SEC_MERGE symbol has been | ||
1399 | adjusted, so all references to such symbols need to be | ||
1400 | @@ -3861,7 +3861,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd, | ||
1401 | if (!info->relocatable | ||
1402 | && (sym_sec->flags & SEC_MERGE) != 0 | ||
1403 | && ELF_ST_TYPE (sym->st_info) == STT_SECTION | ||
1404 | - && sym_sec->sec_info_type == ELF_INFO_TYPE_MERGE) | ||
1405 | + && sym_sec->sec_info_type == SEC_INFO_TYPE_MERGE) | ||
1406 | { | ||
1407 | struct elfNN_ia64_local_hash_entry *loc_h; | ||
1408 | |||
1409 | @@ -3919,7 +3919,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd, | ||
1410 | continue; | ||
1411 | } | ||
1412 | |||
1413 | - if (sym_sec != NULL && elf_discarded_section (sym_sec)) | ||
1414 | + if (sym_sec != NULL && discarded_section (sym_sec)) | ||
1415 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
1416 | rel, relend, howto, contents); | ||
1417 | |||
1418 | diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c | ||
1419 | index fa906cd..7911050 100644 | ||
1420 | --- a/bfd/elfxx-mips.c | ||
1421 | +++ b/bfd/elfxx-mips.c | ||
1422 | @@ -9385,7 +9385,7 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, | ||
1423 | sec = h->root.u.def.section; | ||
1424 | } | ||
1425 | |||
1426 | - if (sec != NULL && elf_discarded_section (sec)) | ||
1427 | + if (sec != NULL && discarded_section (sec)) | ||
1428 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
1429 | rel, relend, howto, contents); | ||
1430 | |||
1431 | diff --git a/bfd/elfxx-sparc.c b/bfd/elfxx-sparc.c | ||
1432 | index 9a15124..f3c631e 100644 | ||
1433 | --- a/bfd/elfxx-sparc.c | ||
1434 | +++ b/bfd/elfxx-sparc.c | ||
1435 | @@ -2970,7 +2970,7 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, | ||
1436 | } | ||
1437 | } | ||
1438 | |||
1439 | - if (sec != NULL && elf_discarded_section (sec)) | ||
1440 | + if (sec != NULL && discarded_section (sec)) | ||
1441 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
1442 | rel, relend, howto, contents); | ||
1443 | |||
1444 | diff --git a/bfd/elfxx-tilegx.c b/bfd/elfxx-tilegx.c | ||
1445 | index c484562..e1c8946 100644 | ||
1446 | --- a/bfd/elfxx-tilegx.c | ||
1447 | +++ b/bfd/elfxx-tilegx.c | ||
1448 | @@ -2908,7 +2908,7 @@ tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, | ||
1449 | } | ||
1450 | } | ||
1451 | |||
1452 | - if (sec != NULL && elf_discarded_section (sec)) | ||
1453 | + if (sec != NULL && discarded_section (sec)) | ||
1454 | RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, | ||
1455 | rel, relend, howto, contents); | ||
1456 | |||
1457 | diff --git a/bfd/linker.c b/bfd/linker.c | ||
1458 | index 7a01e11..e5d20b2 100644 | ||
1459 | --- a/bfd/linker.c | ||
1460 | +++ b/bfd/linker.c | ||
1461 | @@ -1,6 +1,6 @@ | ||
1462 | /* linker.c -- BFD linker routines | ||
1463 | Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, | ||
1464 | - 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 | ||
1465 | + 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 | ||
1466 | Free Software Foundation, Inc. | ||
1467 | Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support | ||
1468 | |||
1469 | @@ -810,6 +810,7 @@ void | ||
1470 | _bfd_generic_link_just_syms (asection *sec, | ||
1471 | struct bfd_link_info *info ATTRIBUTE_UNUSED) | ||
1472 | { | ||
1473 | + sec->sec_info_type = SEC_INFO_TYPE_JUST_SYMS; | ||
1474 | sec->output_section = bfd_abs_section_ptr; | ||
1475 | sec->output_offset = sec->vma; | ||
1476 | } | ||
1477 | diff --git a/bfd/reloc.c b/bfd/reloc.c | ||
1478 | index ef55cc3..e3f0343 100644 | ||
1479 | --- a/bfd/reloc.c | ||
1480 | +++ b/bfd/reloc.c | ||
1481 | @@ -6235,7 +6235,7 @@ bfd_generic_get_relocated_section_contents (bfd *abfd, | ||
1482 | bfd_reloc_status_type r; | ||
1483 | |||
1484 | symbol = *(*parent)->sym_ptr_ptr; | ||
1485 | - if (symbol->section && elf_discarded_section (symbol->section)) | ||
1486 | + if (symbol->section && discarded_section (symbol->section)) | ||
1487 | { | ||
1488 | bfd_byte *p; | ||
1489 | static reloc_howto_type none_howto | ||
1490 | diff --git a/bfd/section.c b/bfd/section.c | ||
1491 | index 7c1f750..e60f247 100644 | ||
1492 | --- a/bfd/section.c | ||
1493 | +++ b/bfd/section.c | ||
1494 | @@ -382,11 +382,11 @@ CODE_FRAGMENT | ||
1495 | . | ||
1496 | . {* Type of sec_info information. *} | ||
1497 | . unsigned int sec_info_type:3; | ||
1498 | -.#define ELF_INFO_TYPE_NONE 0 | ||
1499 | -.#define ELF_INFO_TYPE_STABS 1 | ||
1500 | -.#define ELF_INFO_TYPE_MERGE 2 | ||
1501 | -.#define ELF_INFO_TYPE_EH_FRAME 3 | ||
1502 | -.#define ELF_INFO_TYPE_JUST_SYMS 4 | ||
1503 | +.#define SEC_INFO_TYPE_NONE 0 | ||
1504 | +.#define SEC_INFO_TYPE_STABS 1 | ||
1505 | +.#define SEC_INFO_TYPE_MERGE 2 | ||
1506 | +.#define SEC_INFO_TYPE_EH_FRAME 3 | ||
1507 | +.#define SEC_INFO_TYPE_JUST_SYMS 4 | ||
1508 | . | ||
1509 | . {* Nonzero if this section uses RELA relocations, rather than REL. *} | ||
1510 | . unsigned int use_rela_p:1; | ||
1511 | diff --git a/ld/emultempl/armelf.em b/ld/emultempl/armelf.em | ||
1512 | index d29da59..7631474 100644 | ||
1513 | --- a/ld/emultempl/armelf.em | ||
1514 | +++ b/ld/emultempl/armelf.em | ||
1515 | @@ -240,7 +240,7 @@ build_section_lists (lang_statement_union_type *statement) | ||
1516 | { | ||
1517 | asection *i = statement->input_section.section; | ||
1518 | |||
1519 | - if (!((lang_input_statement_type *) i->owner->usrdata)->just_syms_flag | ||
1520 | + if (i->sec_info_type != SEC_INFO_TYPE_JUST_SYMS | ||
1521 | && (i->flags & SEC_EXCLUDE) == 0 | ||
1522 | && i->output_section != NULL | ||
1523 | && i->output_section->owner == link_info.output_bfd) | ||
1524 | @@ -299,7 +299,7 @@ gld${EMULATION_NAME}_after_allocation (void) | ||
1525 | && elf_section_type (sec) == SHT_PROGBITS | ||
1526 | && (elf_section_flags (sec) & SHF_EXECINSTR) != 0 | ||
1527 | && (sec->flags & SEC_EXCLUDE) == 0 | ||
1528 | - && sec->sec_info_type != ELF_INFO_TYPE_JUST_SYMS | ||
1529 | + && sec->sec_info_type != SEC_INFO_TYPE_JUST_SYMS | ||
1530 | && out_sec != bfd_abs_section_ptr) | ||
1531 | { | ||
1532 | if (sec_count == list_size) | ||
1533 | diff --git a/ld/emultempl/hppaelf.em b/ld/emultempl/hppaelf.em | ||
1534 | index 1137ba2..6258bf4 100644 | ||
1535 | --- a/ld/emultempl/hppaelf.em | ||
1536 | +++ b/ld/emultempl/hppaelf.em | ||
1537 | @@ -229,7 +229,7 @@ build_section_lists (lang_statement_union_type *statement) | ||
1538 | { | ||
1539 | asection *i = statement->input_section.section; | ||
1540 | |||
1541 | - if (!((lang_input_statement_type *) i->owner->usrdata)->just_syms_flag | ||
1542 | + if (i->sec_info_type != SEC_INFO_TYPE_JUST_SYMS | ||
1543 | && (i->flags & SEC_EXCLUDE) == 0 | ||
1544 | && i->output_section != NULL | ||
1545 | && i->output_section->owner == link_info.output_bfd) | ||
1546 | diff --git a/ld/emultempl/ppc64elf.em b/ld/emultempl/ppc64elf.em | ||
1547 | index 92a468f..52b9f05 100644 | ||
1548 | --- a/ld/emultempl/ppc64elf.em | ||
1549 | +++ b/ld/emultempl/ppc64elf.em | ||
1550 | @@ -428,7 +428,7 @@ build_toc_list (lang_statement_union_type *statement) | ||
1551 | { | ||
1552 | asection *i = statement->input_section.section; | ||
1553 | |||
1554 | - if (!((lang_input_statement_type *) i->owner->usrdata)->just_syms_flag | ||
1555 | + if (i->sec_info_type != SEC_INFO_TYPE_JUST_SYMS | ||
1556 | && (i->flags & SEC_EXCLUDE) == 0 | ||
1557 | && i->output_section == toc_section) | ||
1558 | { | ||
1559 | @@ -446,7 +446,7 @@ build_section_lists (lang_statement_union_type *statement) | ||
1560 | { | ||
1561 | asection *i = statement->input_section.section; | ||
1562 | |||
1563 | - if (!((lang_input_statement_type *) i->owner->usrdata)->just_syms_flag | ||
1564 | + if (i->sec_info_type != SEC_INFO_TYPE_JUST_SYMS | ||
1565 | && (i->flags & SEC_EXCLUDE) == 0 | ||
1566 | && i->output_section != NULL | ||
1567 | && i->output_section->owner == link_info.output_bfd) | ||
1568 | diff --git a/ld/emultempl/tic6xdsbt.em b/ld/emultempl/tic6xdsbt.em | ||
1569 | index e287005..fd7a12b 100644 | ||
1570 | --- a/ld/emultempl/tic6xdsbt.em | ||
1571 | +++ b/ld/emultempl/tic6xdsbt.em | ||
1572 | @@ -122,7 +122,7 @@ gld${EMULATION_NAME}_after_allocation (void) | ||
1573 | && elf_section_type (sec) == SHT_PROGBITS | ||
1574 | && (elf_section_flags (sec) & SHF_EXECINSTR) != 0 | ||
1575 | && (sec->flags & SEC_EXCLUDE) == 0 | ||
1576 | - && sec->sec_info_type != ELF_INFO_TYPE_JUST_SYMS | ||
1577 | + && sec->sec_info_type != SEC_INFO_TYPE_JUST_SYMS | ||
1578 | && out_sec != bfd_abs_section_ptr) | ||
1579 | { | ||
1580 | if (sec_count == list_size) | ||
1581 | diff --git a/ld/ldlang.c b/ld/ldlang.c | ||
1582 | index 2c56b56..7ecbae2 100644 | ||
1583 | --- a/ld/ldlang.c | ||
1584 | +++ b/ld/ldlang.c | ||
1585 | @@ -4648,7 +4648,7 @@ size_input_section | ||
1586 | lang_input_section_type *is = &((*this_ptr)->input_section); | ||
1587 | asection *i = is->section; | ||
1588 | |||
1589 | - if (!((lang_input_statement_type *) i->owner->usrdata)->just_syms_flag | ||
1590 | + if (i->sec_info_type != SEC_INFO_TYPE_JUST_SYMS | ||
1591 | && (i->flags & SEC_EXCLUDE) == 0) | ||
1592 | { | ||
1593 | unsigned int alignment_needed; | ||
1594 | diff --git a/ld/ldwrite.c b/ld/ldwrite.c | ||
1595 | index b7a1469..2503d1f 100644 | ||
1596 | --- a/ld/ldwrite.c | ||
1597 | +++ b/ld/ldwrite.c | ||
1598 | @@ -1,6 +1,6 @@ | ||
1599 | /* ldwrite.c -- write out the linked file | ||
1600 | Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2002, | ||
1601 | - 2003, 2004, 2005, 2006, 2007, 2008, 2010 | ||
1602 | + 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012 | ||
1603 | Free Software Foundation, Inc. | ||
1604 | Written by Steve Chamberlain sac@cygnus.com | ||
1605 | |||
1606 | @@ -240,7 +240,7 @@ build_link_order (lang_statement_union_type *statement) | ||
1607 | attached */ | ||
1608 | asection *i = statement->input_section.section; | ||
1609 | |||
1610 | - if (!((lang_input_statement_type *) i->owner->usrdata)->just_syms_flag | ||
1611 | + if (i->sec_info_type != SEC_INFO_TYPE_JUST_SYMS | ||
1612 | && (i->flags & SEC_EXCLUDE) == 0) | ||
1613 | { | ||
1614 | asection *output_section = i->output_section; | ||
1615 | -- | ||
1616 | 1.7.9.5 | ||
1617 | |||