Don't allow a nested archive pointing to itself
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2013-02-15 H.J. Lu <hongjiu.lu@intel.com>
2
3 PR binutils/15151
4 * archive.c (_bfd_find_nested_archive): Don't allow a nested
5 archive pointing to itself.
6 (_bfd_get_elt_at_filepos): Revert the last 2 changes.
7
8 2013-02-15 Nick Clifton <nickc@redhat.com>
9
10 PR binutils/15140
11 * archive.c (_bfd_get_elt_at_filepos): Prevent an infinite loop
12 accessing a corrupt nested archive.
13
14 2013-02-13 Richard Sandiford <rdsandiford@googlemail.com>
15
16 * elfxx-mips.c (mips_got_page_ref): New structure.
17 (mips_got_page_entry): Use a section rather than a (bfd, symndx)
18 pair to represent the anchor point.
19 (mips_got_info): Add a got_page_refs field.
20 (mips_elf_link_hash_table): Add a sym_cache field.
21 (mips_got_page_ref_hash, mips_got_page_ref_eq): New functions.
22 (mips_got_page_entry_hash, mips_got_page_entry_eq): Update for
23 new anchor representation.
24 (mips_elf_create_got_info): Create got_page_refs rather than
25 got_page_entries.
26 (mips_elf_record_got_page_ref): New function.
27 (mips_elf_pages_for_range): Move further down file.
28 (mips_elf_record_got_page_entry): Likewise. Take a got as argument.
29 Use a section rather than a (bfd, symndx) pair to represent the
30 anchor point.
31 (mips_elf_resolve_got_page_ref): New function.
32 (mips_elf_resolve_final_got_entries): Use it to populate
33 got_page_entries.
34 (_bfd_mips_elf_check_relocs): Call mips_elf_record_got_page_ref
35 rather than mips_elf_record_got_page_entry. Only nullify h
36 afterwards.
37 (mips_elf_lay_out_got): Call mips_elf_resolve_final_got_entries
38 earlier.
39
40 2013-02-12 Richard Sandiford <rdsandiford@googlemail.com>
41
42 * elfxx-mips.c (mips_elf_lay_out_got): Count VxWorks GOT relocs
43 in g->relocs.
44
45 2013-02-12 Alan Modra <amodra@gmail.com>
46
47 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Provide
48 suitable definition when using generic linker hash table.
49
50 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
51
52 * elfxx-mips.c (mips_elf_count_got_entries): Delete.
53 (mips_elf_check_recreate_got, mips_elf_recreate_got): Take a
54 mips_elf_traverse_got_arg. Count GOT entries.
55 (mips_elf_resolve_final_got_entries): Take the bfd_link_info
56 as argument. Update after above changes.
57 (mips_elf_merge_got, mips_elf_lay_out_got): Don't call
58 mips_elf_count_got_entries. Update the calls to
59 mips_elf_resolve_final_got_entries.
60
61 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
62
63 * elfxx-mips.c (mips_got_tls_type): New enum.
64 (mips_got_entry): Add tls_initialized.
65 (mips_elf_got_entry_hash, mips_elf_got_entry_eq, mips_tls_got_relocs)
66 (mips_elf_count_got_entry, mips_elf_initialize_tls_index): Remove
67 GOT_TLS_TYPE masks.
68 (mips_elf_reloc_tls_type, mips_tls_got_entries)
69 (mips_elf_record_global_got_symbol, mips_elf_initialize_tls_index)
70 (_bfd_mips_elf_finish_dynamic_symbol): Use GOT_TLS_NONE rather
71 than GOT_NORMAL.
72 (mips_elf_initialize_tls_slots): Replace got_offset and tls_type_p
73 arguments with a GOT entry. Remove GOT_TLS_TYPE masks. Use
74 tls_initialized rather than GOT_TLS_DONE.
75 (mips_tls_got_index): Delete.
76 (mips_elf_local_got_index, mips_elf_global_got_index): Use
77 mips_elf_initialize_tls_slots rather than mips_tls_got_index.
78 (mips_elf_record_got_entry): Initialize tls_initialized.
79
80 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
81
82 * elfxx-mips.c (mips_got_entry): Remove tls_ldm_offset.
83 (mips_elf_link_hash_entry): Remove tls_ie_type, tls_gd_type,
84 tls_ie_got_offset and tls_gd_got_offset.
85 (mips_elf_link_hash_newfunc): Remove initialization.
86 (mips_elf_create_got_info): Likewise.
87 (mips_elf_count_local_got_entries, mips_elf_count_global_tls_entries)
88 (mips_tls_single_got_index): Delete.
89 (mips_elf_local_got_index): Always use the GOT entry to track
90 GOT indices.
91 (mips_elf_global_got_index): Likewise.
92 (mips_elf_create_local_got_entry): Assert that TLS entries have
93 already been allocated.
94 (mips_elf_record_global_got_symbol): Don't initialize
95 tls_ie_type or tls_gd_type.
96 (mips_elf_count_got_symbols): Only count reloc-only GOT entries here.
97 (mips_elf_initialize_tls_index): Allocate a GOT index for every TLS
98 entry.
99 (mips_elf_lay_out_got): Use mips_elf_count_got_entries to count
100 the GOT entries.
101 (_bfd_mips_elf_finish_dynamic_symbol): Assert that TLS GOT offsets
102 have been allocated.
103 (_bfd_mips_elf_copy_indirect_symbol): Remove handling of
104 tls_ie_type and tls_gd_type.
105
106 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
107
108 * elfxx-mips.c (mips_elf_create_local_got_entry): Tidy. Avoid
109 aliasing violation. Check for htab allocation failures.
110
111 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
112
113 * elfxx-mips.c (mips_elf_primary_global_got_index): New function,
114 split out from...
115 (mips_elf_global_got_index): ...here. Reorder arguments so that
116 the output bfd and info come first.
117 (mips_elf_calculate_relocation): Update the call to
118 mips_elf_global_got_index accordingly.
119 (_bfd_mips_elf_finish_dynamic_symbol): Use
120 mips_elf_primary_global_got_index rather than
121 mips_elf_global_got_index.
122 (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
123
124 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
125
126 * elfxx-mips.c (mips_got_entry): Update comments.
127 (mips_elf_multi_got_entry_eq): Rename to...
128 (mips_elf_got_entry_eq): ...this, deleting the old definition.
129 (mips_elf_create_got_info): Remove master_got_p argument.
130 Always use mips_elf_got_entry_eq.
131 (mips_elf_bfd_got, mips_elf_multi_got, mips_elf_create_got_section):
132 Update calls accordingly.
133
134 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
135
136 * elfxx-mips.c (mips_got_info): Remove bfd2got.
137 (mips_elf_bfd2got_hash): Delete.
138 (mips_elf_got_per_bfd_arg): Remove bfd2got.
139 (mips_elf_replace_bfd_got, mips_elf_count_got_entries): New functions.
140 (mips_elf_global_got_index, mips_elf_create_local_got_entry): Use
141 g->next to test for the multigot case. Use mips_elf_bfd_got rather
142 than mips_elf_got_for_ibfd.
143 (mips_elf_bfd2got_entry_hash, mips_elf_bfd2got_entry_eq)
144 (mips_elf_got_for_ibfd, mips_elf_get_got_for_bfd): Delete.
145 (mips_elf_make_got_per_bfd): Replace with...
146 (mips_elf_add_got_entry): ...this new function.
147 (mips_elf_make_got_pages_per_bfd): Replace with...
148 (mips_elf_add_got_page_entry): ...this new function.
149 (mips_elf_merge_got_with): Replace bfd2got argument with separate
150 bfd and GOT arguments. Use mips_elf_add_got_entry and
151 mips_elf_add_got_page_entry instead of mips_elf_make_got_per_bfd
152 and mips_elf_make_got_pages_per_bfd. Use mips_elf_replace_bfd_got
153 to set the BFD's GOT and free the old table.
154 (mips_elf_merge_got): Replace bfd2got argument with separate
155 bfd and GOT arguments. Apply mips_elf_resolve_final_got_entries.
156 Use mips_elf_count_got_entries to count the number of entries in
157 each GOT. Update the calls to mips_elf_merge_got_with.
158 (mips_elf_adjust_gp): Use g->next to test for the multigot case.
159 Use mips_elf_bfd_got rather than mips_elf_got_for_ibfd.
160 (mips_elf_multi_got): Don't create the bfd2got hash table.
161 Replace hash table traversal with a walk over the input bfds,
162 updating the call to mips_elf_merge_got. Use mips_elf_replace_bfd_got
163 to set the output bfd's GOT.
164 (mips_elf_lay_out_got): Rename "sub" to "ibfd". Record that all
165 bfds use the master GOT in the single-GOT case.
166 (_bfd_mips_elf_finish_dynamic_sections): Use mips_elf_bfd_got
167 rather than mips_elf_got_for_ibfd.
168
169 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
170
171 * elfxx-mips.c (mips_elf_obj_tdata): Add a got field.
172 (mips_elf_bfd_got, mips_elf_record_got_entry): New functions.
173 (mips_elf_record_global_got_symbol): Update the hash entry before
174 adding the mips_got_entry. Use mips_elf_record_got_entry to do
175 the latter.
176 (mips_elf_record_local_got_symbol): Use mips_elf_record_got_entry.
177 (mips_elf_record_got_page_entry): Record the entry in both the
178 master and bfd GOTs.
179
180 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
181
182 * elfxx-mips.c (mips_elf_recreate_got): Don't change the entry;
183 create another one if necessary.
184 (mips_elf_set_gotidx): New function.
185 (mips_elf_set_global_gotidx): Use it.
186 (mips_elf_initialize_tls_index): Likewise. Take a
187 mips_elf_traverse_got_arg as argument.
188 (mips_elf_lay_out_got): Update use of mips_elf_initialize_tls_index.
189 (mips_elf_multi_got): Likewise. Cope with error returns from
190 mips_elf_set_global_gotidx.
191
192 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
193
194 * elfxx-mips.c (mips_got_info): Add relocs field.
195 (mips_elf_set_global_got_offset_arg, mips_elf_count_tls_arg): Replace
196 with...
197 (mips_elf_traverse_got_arg): ...this new structure.
198 (mips_elf_count_local_tls_relocs): Delete.
199 (mips_elf_count_global_tls_relocs): Likewise.
200 (mips_elf_count_got_entry): New function.
201 (mips_elf_count_local_got_entries): Likewise.
202 (mips_elf_count_global_tls_entries): Take a mips_elf_traverse_got_arg
203 rather than a mips_elf_count_tls_arg. Count both relocs and entries.
204 (mips_elf_record_local_got_symbol): Don't count got entries here.
205 (mips_elf_make_got_per_bfd): Use mips_elf_count_got_entry.
206 (mips_elf_set_global_got_offset): Split into...
207 (mips_elf_set_global_got_area, mips_elf_set_global_gotidx): ...these
208 new functions. Take a mips_elf_traverse_got_arg rather than a
209 mips_elf_set_global_got_offset_arg. Don't count TLS relocs here.
210 Use g->relocs to record the number of relocs needed for global GOT
211 entries.
212 (mips_elf_multi_got): Use mips_elf_traverse_got_arg rather than
213 mips_elf_set_global_got_offset_arg. Use the relocs field to count
214 relocations. Update for above function split.
215 (mips_elf_lay_out_got): Use mips_elf_count_local_got_entries
216 to count both the number of GOT entries and the number of TLS
217 relocs required by local entries. Likewise
218 mips_elf_count_global_tls_entries and global entries.
219 Remove uses of mips_elf_count_local_tls_relocs and
220 mips_elf_count_global_tls_relocs.
221
222 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
223
224 * elfxx-mips.c (mips_got_entry): Update comment above tls_type entry
225 to say that each structure represents only one type of TLS reference.
226 (GOT_TLS_TYPE): New define.
227 (mips_elf_link_hash_entry): Temporarily split tls_type and
228 tls_got_offset into two variables each.
229 (mips_elf_link_hash_newfunc): Update accordingly.
230 (mips_elf_got_entry_eq, mips_elf_got_entry_hash)
231 (mips_elf_multi_got_entry_eq): Require the tls_type to be the same.
232 (mips_elf_reloc_tls_type, mips_tls_got_entries): New functions.
233 (mips_tls_got_relocs): Use a switch statement.
234 (mips_elf_count_global_tls_entries): Handle the new hash entry fields.
235 (mips_elf_initialize_tls_slots): Use a switch statement. Avoid
236 local "offset" variable.
237 (mips_tls_got_index): Remove r_type argument and assert. Remove
238 code that handled entries with two TLS types; always use the
239 original got_index instead.
240 (mips_tls_single_got_index): New function.
241 (mips_elf_local_got_index): Use entry->tls_type to check for
242 TLS entries. Use mips_tls_single_got_index. Update call to
243 mips_tls_got_index.
244 (mips_elf_global_got_index): Use mips_elf_reloc_tls_type.
245 Use p->tls_type to check for TLS entries. Update call to
246 mips_tls_got_index. Use mips_tls_single_got_index.
247 (mips_elf_create_local_got_entry): Use mips_elf_reloc_tls_type.
248 Use entry.tls_type to check for TLS entries.
249 (mips_elf_record_global_got_symbol): Replace tls_flag argument
250 with r_type argument. Use mips_elf_reloc_tls_type.
251 Set up the new hash entry fields.
252 (mips_elf_record_local_got_symbol): Replace tls_flag argument
253 with r_type argument. Use mips_elf_reloc_tls_type and
254 mips_tls_got_entries. Remove code that handled entries
255 with multiple TLS types.
256 (mips_elf_make_got_per_bfd): Use mips_tls_got_entries.
257 (mips_elf_initialize_tls_index): Handle new hash entry fields.
258 Use equality rather than masks when checking for specific TLS types.
259 Use mips_tls_got_entries. Remove code that handled entries
260 with multiple TLS types.
261 (mips_elf_calculate_relocation): Use TLS_RELOC_P instead of
262 testing the hash table entry.
263 (_bfd_mips_elf_check_relocs): Update calls to
264 mips_elf_record_global_got_symbol and mips_elf_record_local_got_symbol.
265 (_bfd_mips_elf_finish_dynamic_symbol): Don't check h->type.
266 (_bfd_mips_elf_copy_indirect_symbol): Handle new hash entry fields.
267
268 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
269
270 * elfxx-mips.c (mips_elf_multi_got_entry_hash): Rename to...
271 (mips_elf_got_entry_hash): ...this, deleting the old version.
272 (mips_elf_create_got_info): Use mips_elf_got_entry_hash for
273 both types of GOT.
274
275 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
276
277 * elfxx-mips.c (mips_elf_create_got_info): New function.
278 (mips_elf_get_got_for_bfd, mips_elf_multi_got): Use it.
279 (mips_elf_create_got_section): Likewise.
280
281 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
282
283 * elfxx-mips.c (mips_elf_record_local_got_symbol): Always set
284 gotidx to -1.
285
286 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
287
288 * elfxx-mips.c (mips_elf_multi_got): Simplify size calculation.
289
290 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
291
292 * elfxx-mips.c (mips_got_info): Move global_gotsym to...
293 (mips_elf_link_hash_table): ...here. Update rest of file accordingly.
294
295 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
296
297 * elfxx-mips.c (mips_elf_count_global_tls_entries)
298 (mips_elf_count_global_tls_relocs): Don't count indirect or
299 warning symbols.
300 (mips_elf_multi_got, mips_elf_lay_out_got): Assert that the right
301 number of TLS entries were allocated.
302
303 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
304
305 * elfxx-mips.c (mips_elf_sort_hash_table_f): Remove asserts.
306
307 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
308
309 * elfxx-mips.c (mips_elf_merge_got_with): Only use arg->global_count
310 if there are TLS relocations.
311
312 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
313
314 * elfxx-mips.c (mips_elf_recreate_got): Remove free.
315 (mips_elf_resolve_final_got_entries): Remove bogus comment.
316
317 2013-02-11 Alan Modra <amodra@gmail.com>
318
319 * elfcode.h (elf_checksum_contents): Free contents.
320 * elf-bfd.h (_bfd_elf_link_hash_table_free): Declare.
321 * elflink.c (_bfd_elf_link_hash_table_free): New function.
322 (elf_final_link_free): New function, extracted from..
323 (bfd_elf_final_link): ..here. Always call
324 _bfd_elf_write_section_eh_frame_hdr.
325 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Default to
326 _bfd_elf_link_hash_table_free.
327 * libbfd-in.h (_bfd_merge_sections_free): Declare.
328 * libbfd.h: Regenerate.
329 * merge.c (_bfd_merge_sections_free): New function.
330 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame_hdr): Free
331 hdr_info->array.
332 * elf-m10300.c (elf32_mn10300_link_hash_table_free): Call
333 _bfd_elf_link_hash_table_free.
334 * elf32-arm.c (elf32_arm_link_hash_table_free): Likewise.
335 * elf32-avr.c (elf32_avr_link_hash_table_free): Likewise.
336 * elf32-hppa.c (elf32_hppa_link_hash_table_free): Likewise.
337 * elf32-i386.c (elf_i386_link_hash_table_free): Likewise.
338 * elf32-m68hc1x.c (m68hc11_elf_hash_table_free): Likewise.
339 * elf32-m68k.c (elf_m68k_link_hash_table_free): Likewise.
340 * elf32-metag.c (elf_metag_link_hash_table_free): Likewise.
341 * elf32-xgate.c (xgate_elf_bfd_link_hash_table_free): Likewise.
342 * elf64-aarch64.c (elf64_aarch64_link_hash_table_free): Likewise.
343 * elf64-ia64-vms.c (elf64_ia64_hash_table_free): Likewise.
344 * elf64-ppc.c (ppc64_elf_link_hash_table_free): Likewise.
345 * elf64-x86-64.c (elf_x86_64_link_hash_table_free): Likewise.
346 * elfnn-ia64.c (elfNN_ia64_hash_table_free): Likewise.
347 * elf32-cr16.c (elf32_cr16_link_hash_table_free): Delete.
348 (bfd_elf32_bfd_link_hash_table_free): Don't define.
349 * elf32-tic6x.c (elf32_tic6x_link_hash_table_free): Delete.
350 (bfd_elf32_bfd_link_hash_table_free): Dont' define.
351
352 2013-02-10 Alan Modra <amodra@gmail.com>
353
354 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_zmalloc.
355 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
356 * m68klinux.c (linux_link_hash_table_create): Likewise.
357 * sparclinux.c (linux_link_hash_table_create): Likewise.
358 * sunos.c (sunos_link_hash_table_create): Likewise.
359 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
360 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
361 * elf32-arm.c (elf32_arm_link_hash_table_create): Likewise.
362 * elf32-avr.c (elf32_avr_link_hash_table_create): Likewise.
363 * elf32-cr16.c (elf32_cr16_link_hash_table_create): Likewise.
364 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
365 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
366 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
367 * elf32-lm32.c (lm32_elf_link_hash_table_create): Likewise.
368 * elf32-m32r.c (m32r_elf_link_hash_table_create): Likewise.
369 * elf32-m68hc1x.c (m68hc11_elf_hash_table_create): Likewise.
370 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
371 * elf32-metag.c (elf_metag_link_hash_table_create): Likewise.
372 * elf32-nios2.c (nios2_elf32_link_hash_table_create): Likewise.
373 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
374 * elf32-score.c (elf32_score_link_hash_table_create): Likewise.
375 * elf32-spu.c (spu_elf_link_hash_table_create): Likewise.
376 * elf32-tic6x.c (elf32_tic6x_link_hash_table_create): Likewise.
377 * elf32-vax.c (elf_vax_link_hash_table_create): Likewise.
378 * elf32-xgate.c (xgate_elf_bfd_link_hash_table_create): Likewise.
379 * elf32-xtensa.c (elf_xtensa_link_hash_table_create): Likewise.
380 * elf64-aarch64.c (elf64_aarch64_link_hash_table_create): Likewise.
381 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
382 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
383 * elf64-x86-64.c (elf_x86_64_link_hash_table_create): Likewise.
384 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
385 * elflink.c (_bfd_elf_link_hash_table_create): Likewise.
386 (_bfd_elf_link_hash_table_init): Assume zero fill table on entry.
387
388 2013-02-10 Alan Modra <amodra@gmail.com>
389
390 * i386linux.c (linux_link_hash_table_create): Allocate table
391 with bfd_zmalloc, not bfd_alloc.
392 * pdp11.c (link_hash_table_create): Allocate table with
393 bfd_malloc, not bfd_alloc.
394 * elf32-bfin.c (bfinfdpic_elf_link_hash_table_create): Allocate table
395 with bfd_zmalloc, not bfd_zalloc.
396 (bfin_link_hash_table_create): Likewise.
397 * elf32-frv.c (frvfdpic_elf_link_hash_table_create): Likewise.
398 * elf64-hppa.c (elf64_hppa_hash_table_create): Likewise.
399
400 2013-02-10 Alan Modra <amodra@gmail.com>
401
402 PR ld/15113
403 * elf32-sh.c (sh_elf_link_hash_table_create): Use bfd_zmalloc.
404
405 2013-02-08 Markos Chandras <markos.chandras@imgtec.com>
406
407 * elf32-metag.c: Use bfd_get_linker_section to get SEC_LINKER_CREATED
408 sections.
409 (elf_metag_adjust_dynamic_symbol): Don't error on zero size dynbss
410 symbol.
411
412 2013-02-08 Yufeng Zhang <yufeng.zhang@arm.com>
413
414 * elf64-aarch64.c (elf64_aarch64_grok_prstatus): Change 'size' from
415 288 to 272.
416
417 2013-02-08 Alan Modra <amodra@gmail.com>
418
419 PR binutils/15106
420 * elf-bfd.h (struct elf_obj_tdata): Add elf_find_function_cache.
421 * elf.c (elf_find_function): Revert last change. Use new
422 tdata field rather than static vars for cache.
423
424 2013-02-07 H.J. Lu <hongjiu.lu@intel.com>
425
426 PR ld/15107
427 * elflink.c (elf_link_output_extsym): Set STB_GNU_UNIQUE only if
428 symbol is defined in regular object.
429
430 2013-02-07 Roberto Agostino Vitillo <ra.vitillo@gmail.com>
431
432 PR binutils/15106
433 * elf.c (elf_find_function): Don't cache if symbols change.
434
435 2013-02-07 Alan Modra <amodra@gmail.com>
436
437 PR binutils/14873
438 * elf-attrs.c (_bfd_elf_copy_obj_attributes): Don't attempt to
439 copy attributes from or to non-ELF.
440
441 2013-02-06 H.J. Lu <hongjiu.lu@intel.com>
442
443 * elf32-i386.c (elf_i386_allocate_dynrelocs): Don't clear pc_count
444 for non-zero TLS symbol.
445 (elf_i386_relocate_section): Don't resolve size relocation against
446 non-zero TLS symbol.
447 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Don't clear
448 pc_count for non-zero TLS symbol.
449 (elf_x86_64_relocate_section): Don't resolve size relocation
450 against non-zero TLS symbol.
451
452 2013-02-06 Sandra Loosemore <sandra@codesourcery.com>
453 Andrew Jenner <andrew@codesourcery.com>
454
455 Based on patches from Altera Corporation.
456
457 * Makefile.am (ALL_MACHINES): Add cpu-nios2.lo.
458 (ALL_MACHINES_CFILES): Add cpu-nios2.c.
459 (BFD_BACKENDS): Add elf32-nios2.lo.
460 (BFD32_BACKENDS_CFILES): Add elf32-nios2.c.
461 * Makefile.in: Regenerated.
462 * configure.in: Add entries for bfd_elf32_bignios2_vec and
463 bfd_elf32_littlenios2_vec.
464 * configure: Regenerated.
465 * config.bfd: Add cases for nios2.
466 * archures.c (enum bfd_architecture): Add bfd_arch_nios2.
467 (bfd_mach_nios2): Define.
468 (bfd_nios2_arch): Declare.
469 (bfd_archures_list): Add bfd_nios2_arch.
470 * targets.c (bfd_elf32_bignios2_vec): Declare.
471 (bfd_elf32_littlenios2_vec): Declare.
472 (_bfd_target_vector): Add entries for bfd_elf32_bignios2_vec and
473 bfd_elf32_littlenios2_vec.
474 * elf-bfd.h (enum elf_target_id): Add NIOS2_ELF_DATA.
475 * reloc.c (enum bfd_reloc_code_real): Add Nios II relocations.
476 * bfd-in2.h: Regenerated.
477 * libbfd.h: Regenerated.
478 * cpu-nios2.c: New file.
479 * elf32-nios2.c: New file.
480
481 2013-02-06 Alan Modra <amodra@gmail.com>
482
483 * elf32-arm.c (elf32_arm_final_link_relocate): Only test for
484 stubs in stub_bfd.
485
486 2013-02-06 Alan Modra <amodra@gmail.com>
487
488 * Makefile.am (SOURCE_HFILES): Add `elf-linux-psinfo.h'.
489 * Makefile.in: Regenerate.
490
491 2013-02-04 Sergio Durigan Junior <sergiodj@redhat.com>
492 Pedro Alves <palves@redhat.com>
493
494 * Makefile.in (SOURCE_HFILES): Add `elf-linux-psinfo.h'.
495 * elf-bfd.h (elf_internal_linux_prpsinfo): New structure
496 declaration.
497 (elfcore_write_linux_prpsinfo32, elfcore_write_linux_prpsinfo64)
498 (elfcore_write_ppc32_linux_prpsinfo32): New declarations.
499 * elf-linux-psinfo.h: New file.
500 * elf.c: Include elf-linux-psinfo.h.
501 (elfcore_write_linux_prpsinfo32, elfcore_write_linux_prpsinfo64):
502 New functions.
503 * elf32-ppc.c: Include `elf-linux-psinfo.h'.
504 (elf_external_ppc_linux_prpsinfo32): New structure declaration.
505 (PPC_LINUX_PRPSINFO32_SWAP_FIELDS): New macro.
506 (elfcore_write_ppc_linux_prpsinfo32): New function.
507
508 2013-02-04 Tristan Gingold <gingold@adacore.com>
509
510 * mach-o.c (bfd_mach_o_scan_start_address): Do not fail if no
511 start address.
512
513 2013-02-04 Alan Modra <amodra@gmail.com>
514
515 * Makefile.am (BFD64_BACKENDS): Remove elf-nacl.lo.
516 (BFD64_BACKENDS_CFILES): Remove elf-nacl.c.
517 * Makefile.in: Regenerate.
518 * po/SRC-POTFILES.in: Regenerate.
519
520 2013-02-04 Alan Modra <amodra@gmail.com>
521
522 * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Delete.
523 * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Delete.
524
525 2013-02-01 Alan Modra <amodra@gmail.com>
526
527 * elf64-ppc.c (dec_dynrel_count): Don't error when elf_gc_sweep_symbol
528 clears def_regular.
529
530 2013-01-31 Tristan Gingold <gingold@adacore.com>
531
532 * mach-o.c (bfd_mach_o_scan): Call bfd_mach_o_flatten_sections
533 earlier. Fix status checking of bfd_mach_o_scan_start_address.
534 (bfd_mach_o_scan_start_address): Handle LC_MAIN.
535
536 2013-01-31 Alan Modra <amodra@gmail.com>
537 David S. Miller <davem@davemloft.net>
538
539 PR ld/15056
540 * elfxx-sparc.c (_bfd_sparc_elf_gc_mark_hook): Handle implicit
541 references to __tls_get_addr.
542 * elf32-tilpro.c (tilepro_elf_gc_mark_hook): Likewise. Correct
543 vtinherit and vtentry reloc handling too.
544 * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): As for tilepro.
545
546 2013-01-31 Alan Modra <amodra@gmail.com>
547
548 * elf64-ppc.c (ppc_stub_name): Trim off trailing "+0".
549
550 2013-01-31 Alan Modra <amodra@gmail.com>
551
552 * elf64-ppc.c (build_plt_stub): Correct plt stub branch to glink.
553
554 2013-01-28 Alan Modra <amodra@gmail.com>
555
556 * elf64-ppc.c: Use %T to print symbols names and remove redundant
557 "relocation" in error messages throughout file.
558 (ppc64_elf_relocate_section): Remove sibling call error message,
559 replace with "call lacks nop". Specially report errors for
560 branches to function entry points via OPD lookup and branches
561 to stubs. Remove NULL symbol handling now done by %T.
562
563 2013-01-28 Alan Modra <amodra@gmail.com>
564
565 * archive.c (bfd_generic_archive_p): Return target and keep
566 ardata on partial matches.
567 * format.c (bfd_check_format_matches): Adjust for above
568 change. Remove bfd_error_file_ambiguously_recognized dead
569 code.
570
571 2013-01-26 Alan Modra <amodra@gmail.com>
572
573 * bfd.c (struct bfd_preserve, bfd_preserve_save, bfd_preserve_restore,
574 bfd_preserve_finish): Move to..
575 * format.c: ..here, splitting out..
576 (bfd_reinit): ..this. New function.
577 (bfd_check_format_matches): Use bfd_preserve_save/restore to
578 keep bfd state for a match.
579 * elfcode.h (elf_object_p): Don't use bfd_preserve_save/restore.
580 * elfcore.h (elf_core_file_p): Likewise.
581 * mach-o.c (bfd_mach_o_header_p): Likewise.
582 * pef.c (bfd_pef_object_p, bfd_pef_xlib_object_p): Likewise.
583 * xsym.c (bfd_sym_object_p): Likewise.
584 * mmo.c (mmo_scan): Clear abfd->symcount.
585 * opncls.c (_bfd_new_bfd): Use a smaller section hash table.
586 * section.c (bfd_section_list_clear): Clear section_htab.count.
587 * bfd-in2.h: Regenerate.
588
589 2013-01-25 Michael Schewe <michael.schewe@gmx.net>
590
591 * elf32-h8300.c (elf32_h8_relax_section): When checking for a
592 second reloc, make sure that the reloc potentially exists first.
593
594 2013-01-24 Nick Clifton <nickc@redhat.com>
595
596 * archures.c: Add bfd_mach_v850e3v5.
597 * bfd-in2.h: Regenerate.
598 * cpu-v850.c: Add entries for v850e2v5 and v850e3v5.
599 * cpu-v850_rh850.c: Likewise.
600 * elf32-v850.c: Add support for v850e3v5 architecture.
601
602 2013-01-23 Markos Chandras <markos.chandras@imgtec.com>
603
604 * elf32-metag.c: Error on HIADDR16/LOADDR16 in shared link.
605
606 2013-01-23 Leif Ekblad <leif@rdos.net>
607
608 * config.bfd (x86_64-*-rdos*): Remove targ_selvecs.
609
610 2013-01-18 H.J. Lu <hongjiu.lu@intel.com>
611
612 * elf32-i386.c (elf_i386_allocate_dynrelocs): Clear pc_count for
613 non-zero TLS symbol.
614 (elf_i386_relocate_section): Resolve size relocation against
615 non-zero TLS symbol.
616 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Clear pc_count
617 for non-zero TLS symbol.
618 (elf_x86_64_relocate_section): Resolve size relocation against
619 non-zero TLS symbol.
620
621 2013-01-18 Mike Frysinger <vapier@gentoo.org>
622
623 * elflink.c (bfd_elf_size_dynamic_sections): Only add DT_RPATH
624 when new_dtags is false. Only add DT_RUNPATH when new_dtags is
625 true.
626
627 2013-01-17 H.J. Lu <hongjiu.lu@intel.com>
628
629 * elf32-i386.c (elf_i386_check_relocs): Count size relocation as
630 PC-relative relocation.
631 * elf64-x86-64.c (elf_x86_64_check_relocs): Count size relocation
632 as PC-relative relocation.
633
634 2013-01-16 H.J. Lu <hongjiu.lu@intel.com>
635
636 * elf32-i386.c (elf_i386_check_relocs): Update R_386_SIZE32
637 check.
638 (elf_i386_relocate_section): Don't check TLS for R_386_SIZE32.
639
640 * elf64-x86-64.c (elf_x86_64_check_relocs): Update R_X86_64_SIZE32
641 and R_X86_64_SIZE64 check.
642 (elf_x86_64_relocate_section): Don't check TLS for R_X86_64_SIZE32
643 nor R_X86_64_SIZE64.
644
645 2013-01-16 H.J. Lu <hongjiu.lu@intel.com>
646
647 * bfd-in2.h: Regenerated.
648 * libbfd.h: Likewise.
649
650 * elf32-i386.c (elf_howto_table): Fill R_386_SIZE32 entry.
651 (elf_i386_reloc_type_lookup): Support BFD_RELOC_SIZE32.
652 (elf_i386_check_relocs): Handle R_386_SIZE32.
653 (elf_i386_gc_sweep_hook): Likewise.
654 (elf_i386_relocate_section): Likewise.
655
656 * elf64-x86-64.c (x86_64_elf_howto_table): Fill R_X86_64_SIZE32
657 and R_X86_64_SIZE64 entries.
658 (x86_64_reloc_map): Add BFD_RELOC_SIZE32 and BFD_RELOC_SIZE64,
659 (elf_x86_64_rtype_to_howto): Handle R_X86_64_SIZE32 for x32.
660 (elf_x86_64_reloc_name_lookup): Likewise.
661 (elf_x86_64_check_relocs): Handle R_X86_64_SIZE32 and
662 R_X86_64_SIZE64.
663 (elf_x86_64_gc_sweep_hook): Likewise.
664 (elf_x86_64_relocate_section): Likewise.
665
666 * reloc.c (bfd_reloc_code_type): Add BFD_RELOC_SIZE32 and
667 BFD_RELOC_SIZE64.
668
669 2013-01-15 H.J. Lu <hongjiu.lu@intel.com>
670
671 * elf64-x86-64.c (R_X86_64_standard): Replace R_X86_64_IRELATIVE
672 with R_X86_64_RELATIVE64.
673
674 2013-01-15 Nick Clifton <nickc@redhat.com>
675
676 * elf32-msp430.c: Fix spelling typo.
677
678 2013-01-15 Alan Modra <amodra@gmail.com>
679
680 * elf64-ppc.c (ppc64_elf_size_stubs): Default shared libs to
681 plt-thread-safe.
682
683 2013-01-14 Alan Modra <amodra@gmail.com>
684
685 PR binutils/14813
686 * bfdio.c (struct bfd_iovec <bclose>): Revert 2012-11-06.
687 (memory_bclose): Likewise. Return 0 on success.
688 * cache.c (cache_bclose): Likewise.
689 * opncls.c (opncls_bclose, bfd_close): Likewise.
690 * vms-lib.c (vms_lib_bclose): Likewise.
691 * libbfd.h: Regenerate.
692
693 2013-01-13 Alan Modra <amodra@gmail.com>
694
695 * elf-bfd.h (struct elf_link_hash_entry): Delete dynamic_weak.
696 Add ref_dynamic_nonweak.
697 * elflink.c (_bfd_elf_mark_dynamic_def_weak): Delete.
698 (_bfd_elf_merge_symbol): Don't call above function. Move
699 setting of ref_dynamic_nonweak and dynamic_def earlier. Don't
700 clear dynamic_def.
701 (elf_link_add_object_symbols): Delete redundant "override" test.
702 Don't set dynamic_def here.
703 (elf_link_output_extsym): Update.
704
705 2013-01-12 H.J. Lu <hongjiu.lu@intel.com>
706
707 * elf32-i386.c (elf_i386_check_relocs): Set bfd errror for
708 normal and TLS symbol access.
709 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
710
711 2013-01-12 Alan Modra <amodra@gmail.com>
712
713 * elf-bfd.h (_bfd_elf_strtab_refcount): Declare.
714 * elf-strtab.c (_bfd_elf_strtab_refcount): New function.
715 * elflink.c (elf_add_dt_needed_tag): Use _bfd_elf_strtab_refcount.
716
717 2013-01-12 Alan Modra <amodra@gmail.com>
718
719 PR ld/12549
720 * elf-bfd.h (_bfd_elf_strtab_clear_refs): Declare.
721 (_bfd_elf_strtab_clear_all_refs): Define.
722 * elf-strtab.c (_bfd_elf_strtab_clear_refs): New function.
723 (_bfd_elf_strtab_clear_all_refs): Delete.
724 * elflink.c (elf_link_add_object_symbols): Clear out added
725 strtab refs. Correct handling of warning common symbols.
726
727 2013-01-10 H.J. Lu <hongjiu.lu@intel.com>
728
729 * aout0.c: Remove trailing white spaces.
730 * archive.c: Likewise.
731 * archures.c: Likewise.
732 * bfd-in.h: Likewise.
733 * bfd-in2.h: Likewise.
734 * coff-alpha.c: Likewise.
735 * coff-i860.c: Likewise.
736 * coff-mips.c: Likewise.
737 * coff-ppc.c: Likewise.
738 * coff-tic80.c: Likewise.
739 * coff-x86_64.c: Likewise.
740 * coff-z80.c: Likewise.
741 * coffcode.h: Likewise.
742 * coffgen.c: Likewise.
743 * cofflink.c: Likewise.
744 * compress.c: Likewise.
745 * corefile.c: Likewise.
746 * cpu-arm.c: Likewise.
747 * cpu-avr.c: Likewise.
748 * cpu-bfin.c: Likewise.
749 * cpu-cr16.c: Likewise.
750 * cpu-cr16c.c: Likewise.
751 * cpu-crx.c: Likewise.
752 * cpu-h8300.c: Likewise.
753 * cpu-i386.c: Likewise.
754 * cpu-lm32.c: Likewise.
755 * cpu-m68k.c: Likewise.
756 * cpu-moxie.c: Likewise.
757 * cpu-msp430.c: Likewise.
758 * cpu-sh.c: Likewise.
759 * cpu-xc16x.c: Likewise.
760 * dwarf2.c: Likewise.
761 * ecofflink.c: Likewise.
762 * ecoffswap.h: Likewise.
763 * elf-ifunc.c: Likewise.
764 * elf-m10300.c: Likewise.
765 * elf-vxworks.c: Likewise.
766 * elf32-avr.c: Likewise.
767 * elf32-avr.h: Likewise.
768 * elf32-cr16.c: Likewise.
769 * elf32-cr16c.c: Likewise.
770 * elf32-cris.c: Likewise.
771 * elf32-crx.c: Likewise.
772 * elf32-frv.c: Likewise.
773 * elf32-hppa.c: Likewise.
774 * elf32-i860.c: Likewise.
775 * elf32-ip2k.c: Likewise.
776 * elf32-iq2000.c: Likewise.
777 * elf32-m32c.c: Likewise.
778 * elf32-m68hc1x.c: Likewise.
779 * elf32-msp430.c: Likewise.
780 * elf32-mt.c: Likewise.
781 * elf32-ppc.c: Likewise.
782 * elf32-rl78.c: Likewise.
783 * elf32-s390.c: Likewise.
784 * elf32-score.h: Likewise.
785 * elf32-sh-symbian.c: Likewise.
786 * elf32-sh.c: Likewise.
787 * elf32-spu.c: Likewise.
788 * elf32-tic6x.c: Likewise.
789 * elf32-v850.c: Likewise.
790 * elf32-xc16x.c: Likewise.
791 * elf32-xtensa.c: Likewise.
792 * elf64-alpha.c: Likewise.
793 * elf64-hppa.c: Likewise.
794 * elf64-ppc.c: Likewise.
795 * elf64-s390.c: Likewise.
796 * elfcore.h: Likewise.
797 * elflink.c: Likewise.
798 * elfxx-mips.c: Likewise.
799 * elfxx-sparc.c: Likewise.
800 * elfxx-tilegx.c: Likewise.
801 * ieee.c: Likewise.
802 * libcoff.h: Likewise.
803 * libpei.h: Likewise.
804 * libxcoff.h: Likewise.
805 * linker.c: Likewise.
806 * mach-o-i386.c: Likewise.
807 * mach-o-target.c: Likewise.
808 * mach-o.c: Likewise.
809 * mach-o.h: Likewise.
810 * mmo.c: Likewise.
811 * opncls.c: Likewise.
812 * pdp11.c: Likewise.
813 * pe-x86_64.c: Likewise.
814 * peXXigen.c: Likewise.
815 * pef-traceback.h: Likewise.
816 * pei-x86_64.c: Likewise.
817 * peicode.h: Likewise.
818 * plugin.c: Likewise.
819 * reloc.c: Likewise.
820 * riscix.c: Likewise.
821 * section.c: Likewise.
822 * som.c: Likewise.
823 * syms.c: Likewise.
824 * tekhex.c: Likewise.
825 * ticoff.h: Likewise.
826 * vaxbsd.c: Likewise.
827 * xcofflink.c: Likewise.
828 * xtensa-isa.c: Likewise.
829
830 2013-01-10 Will Newton <will.newton@imgtec.com>
831
832 * Makefile.am: Add Meta.
833 * Makefile.in: Regenerate.
834 * archures.c (bfd_mach_metag): New.
835 * bfd-in2.h: Regenerate.
836 * config.bfd: Add Meta.
837 * configure: Regenerate.
838 * configure.in: Add Meta.
839 * cpu-metag.c: New file.
840 * elf-bfd.h: Add Meta.
841 * elf32-metag.c: New file.
842 * elf32-metag.h: New file.
843 * libbfd.h: Regenerate.
844 * reloc.c: Add Meta relocations.
845 * targets.c: Add Meta.
846
847 2013-01-08 Yufeng Zhang <yufeng.zhang@arm.com>
848
849 * elf-bfd.h (elfcore_write_aarch_tls): Add prototype.
850 (elfcore_write_aarch_hw_break): Likewise.
851 (elfcore_write_aarch_hw_watch): Likewise.
852 * elf.c (elfcore_grok_aarch_tls): New function.
853 (elfcore_grok_aarch_hw_break): Likewise.
854 (elfcore_grok_aarch_hw_watch): Likewise.
855 (elfcore_grok_note): Call the new functions to handle the
856 corresponding notes.
857 (elfcore_write_aarch_tls): New function.
858 (elfcore_write_aarch_hw_break): Likewise.
859 (elfcore_write_aarch_hw_watch): Likewise.
860 (elfcore_write_register_note): Call the new functions to handle the
861 corresponding pseudo sections.
862
863 2013-01-07 Tom Tromey <tromey@redhat.com>
864
865 * section.c (_bfd_std_section): Rename from std_section.
866 (bfd_com_section_ptr, bfd_und_section_ptr, bfd_abs_section_ptr)
867 (STD_SECTION): Update.
868 * bfd-in2.h: Rebuild.
869
870 2013-01-04 Juergen Urban <JuergenUrban@gmx.de>
871
872 * archures.c (bfd_mach_mips5900): Define.
873 * bfd-in2.h: Regenerate.
874 * config.bfd: Add mips64-ps2-elf and mips-ps2-elf targets.
875 * cpu-mips.c: Add support for MIPS r5900.
876 * elfxx-mips.c: Add support for MIPS r5900 (extension of r4000).
877
878 2013-01-03 Nickolai Zeldovich <nickolai@csail.mit.edu>
879 Nick Clifton <nickc@redhat.com>
880
881 * elflink.c (get_value): Prevent the use of an undefined shift
882 operation. Add sanity checks.
883
884 2013-01-02 Kaushik Phatak <kaushik.phatak@kpitcummins.com>
885
886 * config.bfd (cr16*-*-uclinux*): New target support.
887
888
889 For older changes see ChangeLog-2012
890 \f
891 Copyright (C) 2013 Free Software Foundation, Inc.
892
893 Copying and distribution of this file, with or without modification,
894 are permitted in any medium without royalty provided the copyright
895 notice and this notice are preserved.
896
897 Local Variables:
898 mode: change-log
899 left-margin: 8
900 fill-column: 74
901 version-control: never
902 End:
This page took 0.048787 seconds and 4 git commands to generate.