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