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