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