daily update
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2013-06-14 Yufeng Zhang <yufeng.zhang@arm.com>
2
3 * elf64-aarch64.c (elf64_aarch64_final_link_relocate): Call
4 aarch64_resolve_relocation and bfd_elf_aarch64_put_addend to
5 handle the relocations of R_AARCH64_JUMP26, R_AARCH64_CALL26,
6 R_AARCH64_LD64_GOT_LO12_NC, R_AARCH64_ADR_GOT_PAGE and
7 R_AARCH64_GOT_LD_PREL19.
8
9 2013-06-13 Terry Guo <terry.guo@arm.com>
10
11 PR ld/15302
12 * elf32-arm.c (allocate_dynrelocs_for_symbol): Transform
13 ST_BRANCH_TO_ARM into ST_BRANCH_TO_THUMB if the target only
14 supports thumb instructions.
15
16 2013-06-11 DJ Delorie <dj@redhat.com>
17
18 * elf32-rl78.c (rl78_elf_relocate_section): Fix OPsub math.
19
20 2013-06-11 Will Newton <will.newton@linaro.org>
21
22 * elf64-aarch64.c (elf_aarch64_get_local_sym_hash): Use
23 ELF64_R_SYM instead of ELF32_R_SYM.
24
25 2013-06-11 Nick Clifton <nickc@redhat.com>
26
27 * elf32-rl78.c (rl78_elf_finish_dynamic_sections): Onlly run
28 checks if the dynamic sections have been created and relaxation
29 has not been performed.
30
31 2013-06-07 Will Newton <will.newton@linaro.org>
32
33 * configure: Regenerate.
34 * configure.in: Build elf-ifunc.o for AArch64.
35 * elf64-aarch64.c: Include objalloc.h.
36 (elf64_aarch64_howto_dynrelocs): Add R_AARCH64_IRELATIVE howto.
37 (struct elf64_aarch64_link_hash_table): Add members for handling
38 R_AARCH64_IRELATIVE relocations.
39 (elf_aarch64_local_htab_hash): New function.
40 (elf_aarch64_local_htab_eq): New function.
41 (elf_aarch64_get_local_sym_hash): New function.
42 (elf64_aarch64_link_hash_table_create): Initialize local STT_GNU_IFUNC
43 symbol hash.
44 (elf64_aarch64_hash_table_free): Free local STT_GNU_IFUNC symbol hash.
45 (elf64_aarch64_final_link_relocate): Add sym argument. Add support
46 for handling STT_GNU_IFUNC symbols.
47 (elf64_aarch64_gc_sweep_hook): Add support for garbage collecting
48 references to STT_GNU_IFUNC symbols.
49 (elf64_aarch64_adjust_dynamic_symbol): Add support for handling
50 STT_GNU_IFUNC symbols.
51 (elf64_aarch64_check_relocs): Add support for handling STT_GNU_IFUNC
52 symbols. Ensure we don't increase plt.refcount from -1 to 0.
53 (elf64_aarch64_post_process_headers): Call _bfd_elf_set_osabi.
54 (elf64_aarch64_is_function_type): Remove function.
55 (elf64_aarch64_allocate_dynrelocs): Call
56 _bfd_elf_allocate_ifunc_dyn_relocs for STT_GNU_IFUNC symbols.
57 (elf_aarch64_allocate_local_dynrelocs): New function.
58 (elf64_aarch64_size_dynamic_sections): Call
59 elf_aarch64_allocate_local_dynrelocs. Initialize next_irelative_index.
60 (elf64_aarch64_create_small_pltn_entry): Add info argument.
61 Add support for creating .iplt entries for STT_GNU_IFUNC symbols.
62 (elf64_aarch64_finish_dynamic_symbol): Add support for handling
63 STT_GNU_IFUNC symbols and .iplt.
64 (elf_aarch64_finish_local_dynamic_symbol): New function.
65 (elf64_aarch64_finish_dynamic_sections): Call
66 elf_aarch64_finish_local_dynamic_symbol.
67 (elf64_aarch64_add_symbol_hook): New function.
68
69 2013-06-03 Alan Modra <amodra@gmail.com>
70
71 * syms.c (_bfd_stab_section_find_nearest_line): Add last_str
72 var. Use it with last_stab.
73
74 2013-05-30 Paul Brook <paul@codesourcery.com>
75
76 * bfd-in2.h: Regenerate.
77 * elf32-mips.c (elf_mips_eh_howto): New.
78 (bfd_elf32_bfd_reloc_type_lookup ): Support BFD_RELOC_MIPS_EH.
79 (bfd_elf32_bfd_reloc_name_lookup): Likewise.
80 (mips_elf32_rtype_to_howto): Support R_MIPS_EH.
81 * elf64-mips.c (elf_mips_eh_howto): New.
82 (bfd_elf64_bfd_reloc_type_lookup): Support BFD_RELOC_MIPS_EH.
83 (bfd_elf64_bfd_reloc_name_lookup): Likewise.
84 (mips_elf64_rtype_to_howto): Support R_MIPS_EH.
85 * libbfd.h: Regenerate.
86 * reloc.c (BFD_RELOC_MIPS_EH): New.
87
88 2013-05-29 Nick Clifton <nickc@redhat.com>
89
90 * dwarf2.c (struct dwarf2_debug): Add fields for handling
91 alternate debug info source.
92 (dwarf_debug_sections): Add entries for alternate .debug_str and
93 .debug_info sections.
94 (dwarf_debug_section_enum): Likewise.
95 (read_alt_indirect_string): New function. Handles a
96 DW_FORM_GNU_strp_alt attribute.
97 (read_alt_indirect_ref): New function. Handles a
98 DW_FORM_GNU_ref_alt attribute.
99 (read_attribute_value): Process DW_FORM_GNU_ref_alt and
100 DW_FORM_GNU_strp_alt.
101 (find_abstract_instance_name): Handle DW_FORM_GNU_ref_alt
102 attributes.
103 (_bfd_dwarf2_cleanup_debug_info): Free alternate debug info
104 sources.
105 * opncls.c (GNU_DEBUGALTLINK): Define.
106 (bfd_get_alt_debug_link_info): New function.
107 (separate_alt_debug_file_exists): New function.
108 (find_separate_debug_file): Add parameters for fetch and check
109 functions.
110 (bfd_follow_gnu_debugaltlink): New function.
111 * bfd-in2.h: Regenerate.
112
113 2013-05-28 Yufeng Zhang <yufeng.zhang@arm.com>
114
115 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE): Rename to ...
116 (BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21): ... this.
117 (BFD_RELOC_AARCH64_TLSDESC_LD64_PREL19): Rename to ...
118 (BFD_RELOC_AARCH64_TLSDESC_LD_PREL19): ... this.
119 * bfd-in2.h: Regenerate.
120 * libbfd.h: Regenerate.
121 * elf64-aarch64.c (IS_AARCH64_TLSDESC_RELOC): Update to use
122 the correct names.
123 (elf64_aarch64_tlsdesc_howto_table): Likewise.
124 (elf64_aarch64_reloc_map): Likewise.
125 (aarch64_resolve_relocation): Likewise.
126 (bfd_elf_aarch64_put_addend): Likewise.
127 (aarch64_tls_transition_without_check): Likewise.
128 (aarch64_reloc_got_type): Likewise.
129 (elf64_aarch64_final_link_relocate): Likewise.
130 (elf64_aarch64_tls_relax): Likewise.
131 (elf64_aarch64_relocate_section): Likewise.
132 (elf64_aarch64_gc_sweep_hook): Likewise.
133 (elf64_aarch64_check_relocs): Likewise.
134
135 2013-05-26 Mark Wielaard <mjw@redhat.com>
136
137 * cache.c (BFD_CACHE_MAX_OPEN): Remove define.
138 (max_open_files): New static int initialized to zero.
139 (bfd_cache_max_open): New static function to set and return
140 max_open_files.
141 (bfd_cache_init): Use bfd_cache_max_open.
142 (bfd_open_file): Likewise.
143 * configure.in (AC_CHECK_HEADERS): Add sys/resource.h.
144 (AC_CHECK_FUNCS): Add getrlimit.
145 * configure: Regenerated.
146 * config.in: Likewise.
147 * sysdep.h: Check and include sys/resource.h for getrlimit.
148
149 2013-05-23 Alan Modra <amodra@gmail.com>
150
151 * format.c (bfd_check_format_matches): Don't match a target in
152 targ_selvecs if some other target is a better match. If
153 targets implement match priority, fall back to the first of
154 the best matches.
155
156 2013-05-22 Eric Herman <eric@freesa.org>
157
158 PR binutils/15462
159 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Warning fix.
160
161 2013-05-22 Ralf Dreesen <gamma@dreesen.net>
162
163 PR binutils/15474
164 * srec.c (srec_set_section_contents): Properly convert size
165 and offset to address when octets_per_byte is not unity.
166
167 2013-05-20 Maciej W. Rozycki <macro@linux-mips.org>
168
169 * elf32-vax.c (elf_vax_instantiate_got_entries): Only set the
170 refcount member of the gotplt_union when resetting the reference
171 count. Adjust comment.
172
173 2013-05-20 Will Newton <will.newton@linaro.org>
174
175 * elf64-aarch64.c (elf64_aarch64_link_hash_entry): Remove
176 relocs_copied member.
177 (elf64_aarch64_link_hash_newfunc): Remove initialization of
178 relocs_copied member.
179 (elf64_aarch64_copy_indirect_symbol): Remove code to copy
180 relocs_copied member.
181
182 2013-05-19 Maciej W. Rozycki <macro@linux-mips.org>
183
184 * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Convert K&R
185 function definition.
186
187 2013-05-16 Cary Coutant <ccoutant@google.com>
188
189 * ecoff.c (ecoff_link_check_archive_element): Add initializers for
190 external_ext_size and esize.
191
192 2013-05-16 Tristan Gingold <gingold@adacore.com>
193
194 * coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Handle BFD_RELOC_16.
195 * coff64-rs6000.c (xcoff64_reloc_type_lookup): Likewise.
196
197 2013-05-15 Andreas Schwab <schwab@suse.de>
198
199 * elf64-aarch64.c (elf_backend_default_execstack): Define to 0.
200
201 2013-05-10 Joel Brobecker <brobecker@adacore.com>
202
203 * coffcode.h (styp_to_sec_flags) [RS6000COFF_C]: Add handling
204 of STYP_EXCEPT, STYP_LOADER and STYP_TYPCHK sections.
205
206 2013-05-09 Joel Brobecker <brobecker@adacore.com>
207
208 * bfd.c (_bfd_default_error_handler): Replace use of putc
209 by fputc. Add comment explaining why.
210
211 2013-05-09 Alan Modra <amodra@gmail.com>
212
213 * elflink.c (elf_link_add_object_symbols): Don't omit reading
214 of symbols when hashes already exist.
215
216 2013-05-07 Will Newton <will.newton@linaro.org>
217
218 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Add a
219 plt_header_size argument for ports where it differs from
220 plt_entry_size.
221 * elf-bfd.h: Likewise.
222 * elf32-i386.c: Pass plt_header_size to
223 _bfd_elf_allocate_ifunc_dyn_relocs.
224 * elf64-x86-64.c: Likewise.
225
226 2013-05-07 Will Newton <will.newton@linaro.org>
227
228 * elf-ifunc.c (_bfd_elf_create_ifunc_dyn_reloc): Remove unused
229 function.
230 * elf-bfd.h: Likewise.
231
232 2013-05-06 Paul Brook <paul@codesourcery.com>
233
234 * elf64-mips.c (elf_mips_gnu_pcrel32): New.
235 (bfd_elf64_bfd_reloc_type_lookup, bfd_elf64_bfd_reloc_name_lookup,
236 mips_elf64_rtype_to_howto): Handle R_MIPS_PC32.
237 * elfn32-mips.c (elf_mips_gnu_pcrel32): New.
238 (bfd_elfn32_bfd_reloc_type_lookup, bfd_elfn32_bfd_reloc_name_lookup,
239 mips_elfn32_rtype_to_howto): Handle R_MIPS_PC32.
240
241 2013-05-06 Alan Modra <amodra@gmail.com>
242
243 * elf64-ppc.c (opd_entry_value): Handle case where symbol
244 hashes are not available.
245
246 2013-05-06 Alan Modra <amodra@gmail.com>
247
248 * elflink.c (elf_link_add_object_symbols): Don't save symbol
249 hashes around loading as-needed library. Zero them on allocation,
250 and restore to initial all-zero state if library not needed.
251 Arrange to reuse hashes if we load library again later.
252
253 2013-05-04 Richard Sandiford <rdsandiford@googlemail.com>
254
255 * elf32-mips.c (elf_mips_copy_howto, elf_mips_jump_slot_howto):
256 Use _bfd_mips_elf_generic_reloc instead of bfd_elf_generic_reloc.
257 * elfn32-mips.c: Likewise.
258 * elf64-mips.c: Likewise.
259
260 2013-05-02 Nick Clifton <nickc@redhat.com>
261
262 * archures.c: Add some more MSP430 machine numbers.
263 * config.bfd (msp430): Define targ_selvecs.
264 * configure.in: Add bfd_elf32_msp430_ti_vec.
265 * cpu-msp430.c: Add some more MSP430 machine numbers.
266 * elf32-msp430.c Add support for MSP430X relocations.
267 Add support for TI compiler generated relocations.
268 Add support for sym_diff relocations.
269 Add support for relaxing out of range short branches into long
270 branches.
271 Add support for MSP430 attribute section.
272 * reloc.c: Add MSP430X relocations.
273 * targets.c: Add bfd_elf32_msp430_ti_vec.
274 * bfd-in2.h: Regenerate.
275 * configure: Regenerate.
276 * libbfd.h: Regenerate.
277
278 2013-05-01 Maciej W. Rozycki <macro@codesourcery.com>
279
280 * config.bfd: Replace alpha*-*-linuxecoff* pattern with
281 alpha*-*-linux*ecoff*.
282
283 2013-04-30 Olaf Flebbe <o.flebbe@science-computing.de>
284
285 PR binutils/15417
286 * elflink.c (elf_link_add_object_symbols): Initialise 'idx' to
287 zero.
288
289 2013-04-30 Alan Modra <amodra@gmail.com>
290
291 * elflink.c (bfd_elf_record_link_assignment): Dont make
292 STV_INTERNAL symbols STV_HIDDEN.
293
294 2013-04-29 Nick Clifton <nickc@redhat.com>
295
296 * elflink.c (_bfd_elf_gc_mark_extra_sections): Remove mark from
297 fragmented .debug_line sections associated with unmarked code
298 sections.
299
300 2013-04-29 Will Newton <will.newton@linaro.org>
301
302 * elf32-arm.c (elf32_arm_populate_plt_entry): Call
303 elf32_arm_add_dynreloc when emitting R_ARM_IRELATIVE relocs.
304
305 2013-04-29 Will Newton <will.newton@linaro.org>
306
307 * elf64-aarch64.c (elf64_aarch64_check_relocs): Move relocation
308 error check up and add error message.
309
310 2013-04-26 Will Newton <will.newton@linaro.org>
311
312 * elf64-aarch64.c (elf64_aarch64_check_relocs): Remove dead code.
313
314 2013-04-25 Alan Modra <amodra@gmail.com>
315
316 * config.bfd: Add powerpc64le-linux.
317
318 2013-04-24 H.J. Lu <hongjiu.lu@intel.com>
319
320 * config.bfd (targ_selvecs): Add bfd_elf32_x86_64_vec for
321 x86_64-*-elf*.
322
323 2013-04-24 Roland McGrath <mcgrathr@google.com>
324
325 * elf32-arm.c (elf32_arm_allocate_plt_entry): If HTAB->nacl_p,
326 allocate space for PLT header even if IS_IPLT_ENTRY.
327 (arm_nacl_put_plt0): New function, broken out of ...
328 (elf32_arm_finish_dynamic_sections): ... here. Call it.
329 If HTAB->nacl_p, set up the PLT header in .iplt too.
330 (elf32_arm_output_arch_local_syms): If HTAB->nacl_p, write
331 a mapping symbol for the start of .iplt too.
332
333 2013-04-19 Luca Pizzamiglio <luca.pizzamiglio@gmail.com>
334
335 * ecoff.c (_bfd_ecoff_sizeof_headers): Cast the return value of
336 BFD_ALIGN to int.
337 * elf32-tic6x.c (elf32_tic6x_size_dynamic_sections): Remove unused
338 variables.
339 * elf32-v850.c (v850_elf_relax_section): Redefine the type of 'i'
340 to bfd_vma.
341 * vms-alpha.c (evax_bfd_print_etir): Initialize sec_len.
342
343 2013-04-22 Alan Modra <amodra@gmail.com>
344
345 PR ld/15382
346 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Don't multiply
347 sh_size or reloc_count adjustment by count.
348
349 2013-04-22 Alan Modra <amodra@gmail.com>
350
351 * elf64-ppc.c (ppc64_elf_check_relocs): Don't call
352 create_linkage_sections here..
353 (ppc64_elf_init_stub_bfd): ..do so here. Return status.
354 (create_linkage_sections): Move earlier in file.
355 (ppc64_elf_setup_section_lists): Remove now useless htab->brlt test.
356 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Update proto.
357
358 2013-04-19 Nick Clifton <nickc@redhat.com>
359
360 PR binutils/15356
361 * compress.c (decompress_contents): Always call inflateEnd, even
362 when another inflation operation fails.
363
364 2013-04-17 H.J. Lu <hongjiu.lu@intel.com>
365
366 * elf-ifunc.c: Update copyright year.
367
368 2013-04-17 Luca Pizzamiglio <luca.pizzamiglio@gmail.com>
369
370 * coffcode.h: Added a cast to void when a bfd_set_section_*()
371 macro's return value is ignored.
372 * elf32-hppa.c: Likewise.
373 * elf32-tic6x.c: Likewise.
374 * mach-o.c: Likewise.
375 * mmo.c: Likewise.
376 * opncls.c: Likewise.
377 * peicode.h: Likewise.
378 * elf32-m32r.c: Check return value of bfd_set_section_*().
379 * elfnn-ia64.c: Likewise.
380 * elfxx-mips.c: Likewise.
381 * vms-alpha.c: Likewise.
382
383 2013-04-15 H.J. Lu <hongjiu.lu@intel.com>
384
385 PR ld/15371
386 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Check
387 regular reference without non-GOT reference when building
388 shared library.
389
390 2013-04-15 Alan Modra <amodra@gmail.com>
391
392 * archive.c (_bfd_archive_close_and_cleanup): Clear parent
393 cache slot for archives.
394
395 2013-04-14 Hans-Peter Nilsson <hp@bitrange.com>
396
397 * mmo.c (mmo_write_chunk): Break out abfd->tdata.mmo_data to new
398 local variable mmop.
399
400 2013-04-09 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
401
402 PR ld/12494
403 * bfd/elf32-avr.c: Consider all sections to determine if linker
404 relaxation can safely delete a ret after a call/jmp
405
406 2013-04-09 Mingjie Xing <mingjie.xing@gmail.com>
407
408 * bfd.c (typedef bfd, Error reporting, Miscellaneous): Add
409 INODEs.
410
411 2013-04-08 Tom Tromey <tromey@redhat.com>
412
413 * som.c (bfd_section_from_som_symbol): No longer static.
414 * som.h (bfd_section_from_som_symbol): Declare.
415
416 2013-04-06 Alan Modra <amodra@gmail.com>
417
418 * elf32-ppc.c (ppc_elf_check_relocs): Use SYMBOLIC_BIND.
419 * elf64-ppc.c (ppc64_elf_check_relocs, dec_dynrel_count): Likewise.
420
421 2013-04-05 Nick Clifton <nickc@redhat.com>
422
423 * elflink.c (elf_link_add_object_symbols): Revert accidental commit.
424
425 2013-04-04 Alan Modra <amodra@gmail.com>
426
427 * bfd.c (bfd_error_type, bfd_errmsgs): Add bfd_error_missing_dso.
428 * bfd-in2.h: Regenerate.
429 * elflink.c (elf_link_add_object_symbols): Use new error.
430
431 2013-04-03 Nick Clifton <nickc@redhat.com>
432
433 * elf32-v850.c (v850_elf_is_target_special_symbol): New function.
434 (bfd_elf32_bfd_is_target_special_symbol): Define.
435
436 2013-04-03 Venkataramanan Kumar <venkataramanan.kumar@linaro.org>
437
438 * elf64-aarch64.c (elf64_aarch64_gc_sweep_hook): Use
439 elf64_aarch64_locals to get local GOT reference counts.
440
441 2013-04-02 DJ Delorie <dj@redhat.com>
442
443 * elf32-rl78.c (GET_RELOC): Assert that there are relocs to get.
444 (rl78_elf_relax_section): Only fetch the next reloc if there is
445 one expected.
446
447 2013-03-30 Alan Modra <amodra@gmail.com>
448
449 PR ld/15323
450 * elf-m10300.c (mn10300_elf_check_relocs): Set non_ir_ref for
451 global symbols referenced by relocs.
452 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
453 * elf32-bfin.c (bfin_check_relocs): Likewise.
454 * elf32-cr16.c (cr16_elf_check_relocs): Likewise.
455 * elf32-cris.c (cris_elf_check_relocs): Likewise.
456 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
457 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
458 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
459 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
460 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
461 * elf32-i370.c (i370_elf_check_relocs): Likewise.
462 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
463 * elf32-lm32.c (lm32_elf_check_relocs): Likewise.
464 * elf32-m32c.c (m32c_elf_check_relocs): Likewise.
465 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
466 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
467 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
468 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
469 * elf32-metag.c (elf_metag_check_relocs): Likewise.
470 * elf32-microblaze.c (microblaze_elf_check_relocs): Likewise.
471 * elf32-moxie.c (moxie_elf_check_relocs): Likewise.
472 * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
473 * elf32-mt.c (mt_elf_check_relocs): Likewise.
474 * elf32-nios2.c (nios2_elf32_check_relocs): Likewise.
475 * elf32-openrisc.c (openrisc_elf_check_relocs): Likewise.
476 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
477 * elf32-rl78.c (rl78_elf_check_relocs): Likewise.
478 * elf32-s390.c (elf_s390_check_relocs): Likewise.
479 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
480 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
481 * elf32-sh.c (sh_elf_check_relocs): Likewise.
482 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
483 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
484 * elf32-v850.c (v850_elf_check_relocs): Likewise.
485 * elf32-vax.c (elf_vax_check_relocs): Likewise.
486 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
487 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
488 * elf64-aarch64.c (elf64_aarch64_check_relocs): Likewise.
489 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
490 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
491 * elf64-ia64-vms.c (elf64_ia64_check_relocs): Likewise.
492 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
493 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
494 * elf64-s390.c (elf_s390_check_relocs): Likewise.
495 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
496 * elfnn-ia64.c (elfNN_ia64_check_relocs): Likewise.
497 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
498 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
499 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise. Don't
500 test indirect/warning links for NULL.
501
502 2013-03-29 H.J. Lu <hongjiu.lu@intel.com>
503
504 PR ld/15323
505 * elf32-i386.c (elf_i386_check_relocs): Set non_ir_ref if a
506 symbol is referenced by a non-shared object.
507 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
508
509 2013-03-28 Joe Seymour <jseymour@codesourcery.com>
510
511 * elf32-sh.c (sh_elf_relocate_section): Suppress warnings for
512 R_SH_REL32 relocations against undefined weak symbols.
513
514 2013-03-28 Alan Modra <amodra@gmail.com>
515
516 * elf64-ppc.c (struct ppc_dyn_relocs): New.
517 (ppc64_elf_check_relocs): Separate dynrel counts for local syms
518 into ifunc and non-ifunc.
519 (dec_dynrel_count): Pass in sym rather than sym_sec. Handle
520 separate ifunc/non-ifunc dynrel counts.
521 (allocate_got): Always use reliplt for ifunc.
522 (allocate_dynrelocs): Likewise.
523 (ppc64_elf_size_dynamic_sections): Likewise.
524 (ppc64_elf_layout_multitoc): Likewise.
525 (ppc64_elf_relocate_section): Likewise.
526
527 2013-03-28 Alan Modra <amodra@gmail.com>
528
529 * elf32-ppc.c (struct ppc_dyn_relocs): New.
530 (ppc_elf_check_relocs): Separate dynrel counts for local syms
531 into ifunc and non-ifunc.
532 (allocate_dynrelocs): Always put ifunc relocs into reliplt.
533 (ppc_elf_size_dynamic_sections): Likewise.
534 (ppc_elf_relocate_section): Likewise.
535
536 2013-03-28 Alan Modra <amodra@gmail.com>
537
538 * elf-bfd.h (enum elf_reloc_type_class): Add reloc_class_ifunc.
539 (struct elf_backend_data <elf_backed_reloc_type_class>): Add
540 bfd_link_info* and asection* params.
541 (_bfd_elf_reloc_type_class): Likewise.
542 * elf.c (_bfd_elf_reloc_type_class): Likewise.
543 * elflink.c (elf_link_sort_cmp2): Sort first on reloc class.
544 (elf_link_sort_relocs): Update elf_backed_reloc_type_class call.
545 * elf32-ppc.c (ppc_elf_reloc_type_class): Return reloc_class_ifunc
546 for any reliplt reloc. Don't return reloc_class_plt for
547 R_PPC_REL24 and R_PPC_ADDR24.
548 * elf64-ppc.c (allocate_got): Formatting.
549 (ppc64_elf_reloc_type_class): Return reloc_class_ifunc for any
550 reliplt reloc.
551 * elf-m10300.c, * elf32-arm.c, * elf32-bfin.c, * elf32-cr16.c,
552 * elf32-cris.c, * elf32-hppa.c, * elf32-i386.c, * elf32-lm32.c,
553 * elf32-m32r.c, * elf32-m68k.c, * elf32-metag.c, * elf32-nios2.c,
554 * elf32-s390.c, * elf32-sh.c, * elf32-sparc.c, * elf32-tilepro.c,
555 * elf32-vax.c, * elf32-xtensa.c, * elf64-aarch64.c, * elf64-alpha.c,
556 * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-s390.c, * elf64-sparc.c,
557 * elf64-x86-64.c, * elfnn-ia64.c, * elfxx-tilegx.c, * elfxx-tilegx.h:
558 Add extra params to the various reloc_type_class functions.
559
560 2013-03-27 Alan Modra <amodra@gmail.com>
561
562 * elf32-ppc.c (ppc_elf_check_relocs): Set PLT_IFUNC in local got
563 masks for all local ifunc syms.
564 (allocate_dynrelocs): Don't use htab->relgot for ifunc.
565 (ppc_elf_size_dynamic_sections): Likewise.
566 (ppc_elf_relocate_section): Likewise.
567
568 2013-03-27 Will Newton <will.newton@linaro.org>
569
570 * elf32-arm.c (elf32_arm_final_link_relocate): Avoid emitting a
571 dynamic reloc for symbols with dynindx == -1.
572 (allocate_dynrelocs_for_symbol): Avoid allocating space for a
573 dynamic reloc for symbols with dynindx == -1.
574
575 2013-03-27 Will Newton <will.newton@linaro.org>
576
577 * elf32-arm.c (elf32_arm_final_link_relocate): Avoid emitting a
578 dynamic reloc for non-default visibility undefined weaks.
579 (allocate_dynrelocs_for_symbol): Avoid allocating space for a
580 dynamic reloc for non-default visibility undefined weaks.
581
582 2013-03-26 Alan Modra <amodra@gmail.com>
583
584 * elflink.c (_bfd_elf_add_default_symbol): Preserve section
585 over _bfd_elf_merge_symbol calls.
586
587 2013-03-26 Alan Modra <amodra@gmail.com>
588
589 * elflink.c (elf_link_add_object_symbols): Add assertion for
590 common override alignment check code. Formatting.
591
592 2013-03-25 Alan Modra <amodra@gmail.com>
593
594 * elflink.c (_bfd_elf_merge_symbol): Set old_alignment for
595 usual common symbols as well as for dynamic. Add poldbfd param.
596 Save old bfd. Adjust callers.
597 (_bfd_elf_add_default_symbol): Add poldbfd param. Pass "section"
598 and "value" by value, not pointer. Adjust caller.
599 (elf_link_add_object_symbols): Combine undef_bfd and old_bfd vars.
600 Delete code to set same. Use old_bfd and old_alignment from
601 _bfd_elf_merge_symbol instead. Add default symbol before
602 alignment and size checks. Wrap overlong lines.
603
604 2013-03-25 Alan Modra <amodra@gmail.com>
605
606 * elflink.c (_bfd_elf_add_default_symbol): Delete "override" param.
607 (elf_link_add_object_symbols): Don't call _bfd_elf_add_default_symbol
608 when override is true.
609
610 2013-03-25 Alan Modra <amodra@gmail.com>
611
612 * elflink.c (_bfd_elf_merge_symbol): Use local var holding value
613 of *sym_hash.
614
615 2013-03-25 Alan Modra <amodra@gmail.com>
616
617 * elflink.c (_bfd_elf_merge_symbol): Don't discard TLS symbols here.
618 Wrap long lines.
619 (elf_link_add_object_symbols): Discard TLS symbols for --just-syms
620 early in symbol loop.
621
622 2013-03-25 Alan Modra <amodra@gmail.com>
623
624 * elf-bfd.h (struct elf_backend_data <merge_symbol>): Update proto.
625 (_bfd_elf_init_reloc_shdr): Delete.
626 * elf.c (_bfd_elf_init_reloc_shdr): Make static.
627 * elf64-x86-64.c (elf_x86_64_merge_symbol): Trim parameters to
628 just what is needed.
629 * elflink.c (_bfd_elf_merge_symbol): Update bed->merge_symbol call.
630
631 2013-03-23 Alan Modra <amodra@gmail.com>
632
633 * elf-bfd.h (_bfd_elf_merge_symbol): Delete declaration.
634 * elflink.c (_bfd_elf_merge_symbol): Make static.
635 * elf32-sh-symbian.c (sh_symbian_relocate_section): Don't call
636 _bfd_elf_merge_symbol, call _bfd_generic_link_add_one_symbol.
637
638 2013-03-23 Alan Modra <amodra@gmail.com>
639
640 PR ld/15270
641 * elflink.c (elf_link_add_object_symbols): Don't set def_regular
642 or ref_regular for BFD_PLUGIN owned syms, or have them affect
643 def_dynamic/ref_dynamic.
644 (_bfd_elf_fix_symbol_flags): Don't set def_regular for BFD_PLUGIN
645 owned syms.
646
647 2013-03-22 David S. Miller <davem@davemloft.net>
648
649 * elfxx-sparc.c (_bfd_sparc_elf_merge_private_bfd_data): Set type of
650 hwcaps attribute.
651
652 2013-03-22 Achille Fouilleul <achille.fouilleul+binutils@gadz.org>
653
654 PR ld/14902
655 * elf32-h8300.c (elf32_h8_relax_delete_bytes): Fix off by one
656 errors adjusting relocs and symbols.
657
658 2013-03-21 Michael Schewe <michael.schewe@gmx.net>
659
660 * elf32-h8300 (h8_relax_section): Add new relaxation of mov
661 @(disp:32,ERx) to mov @(disp:16,ERx).
662 (R_H8_DISP32A16): New reloc.
663 Comments added and corrected.
664 * reloc.c (BFD_RELOC_H8_DISP32A16): New reloc.
665 * bfd-in2.h: Regenerate.
666 * libbfd.h: Regenerate.
667
668 2013-03-21 Kai Tietz <ktietz@redhat.com>
669
670 * coffgen.c (coff_real_object_p): Make global.
671 * peicode.h (coff_real_object_p): Add prototype.
672 (FILHDR): Defined for COFF_IMAGE_WITH_PE as
673 external_PEI_IMAGE_hdr structure.
674 (coff_swap_filehdr_in): Handle variable header-size.
675 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Just handle amount
676 of directory-entiries as specified in pe-header.
677
678 2013-03-21 Nick Clifton <nickc@redhat.com>
679
680 PR sim/15286
681 * elf32-arm.c (bfd_arm_get_mach_from_attributes): Identify XScale,
682 iWMMXt and iWMMXt2 processors from attributes.
683
684 2013-03-20 Alan Modra <amodra@gmail.com>
685
686 * elflink.c (_bfd_elf_make_dynamic_reloc_section): Override
687 sh_type according to is_rela.
688
689 2013-03-18 Alan Modra <amodra@gmail.com>
690
691 PR ld/12549
692 * elflink.c (elf_link_add_object_symbols): Exclude weak refs when
693 considering whether an --as-needed library is needed.
694
695 2013-03-14 Tom Tromey <tromey@redhat.com>
696
697 * opncls.c (bfd_get_debug_link_info): Rename from
698 get_debug_link_info. Export. Update comment.
699 (find_separate_debug_file): Update.
700 * bfd-in2.h: Rebuild.
701
702 2013-03-08 Venkataramanan Kumar <venkataramanan.kumar@linaro.org>
703
704 * elf64-aarch64.c (elf_backend_can_gc_sections): Enable gc-section
705 support.
706 (elf64_aarch64_gc_sweep_hook): Handle GOT, TLS and PLT related
707 relocs.
708
709 2013-03-08 Andreas Arnez <arnez@linux.vnet.ibm.com>
710
711 * elf-bfd.h (elfcore_write_s390_tdb): Add prototype.
712 * elf.c (elfcore_write_s390_tdb): New function.
713 (elfcore_write_register_note): Call it.
714 (elfcore_grok_s390_tdb): New function.
715 (elfcore_grok_note): Call it.
716
717 2013-03-08 Maciej W. Rozycki <macro@codesourcery.com>
718
719 * elfxx-mips.c (mips_elf_allocate_lazy_stub): Correct data type.
720
721 2013-03-05 Corinna Vinschen <vinschen@redhat.com>
722
723 * config.bfd: Add x86_64-*-cygwin to list of supported targets.
724
725 2013-03-04 Alan Modra <amodra@gmail.com>
726
727 * elf32-ppc.c (ppc_elf_relocate_section <R_PPC_PLTREL24>): Adjust
728 non-zero addends when relocatable, rather than addends >= 32768.
729 Always zero "addend" before applying relocation.
730
731 2013-03-04 Nick Clifton <nickc@redhat.com>
732
733 * archive64.c (bfd_elf64_archive_write_armap): Fix calculation of
734 file pointer offsets for thin archives.
735
736 2013-02-28 Nathan Sidwell <nathan@codesourcery.com>
737
738 * elf32-arm.c (elf32_arm_size_dynamic_sections): Don't call
739 elf32_arm_allocate_dynrelocs for source reloc for non-dynamic link.
740
741 2013-02-27 DJ Delorie <dj@redhat.com>
742
743 * reloc.c (BFD_RELOC_RL78_CODE): Add.
744 * libbfd.h: Regenerate.
745 * bfd-in2.h: Regenerate.
746 * elf32-rl78.c (rl78_elf_relocate_section): Handle weak code
747 references in compuated relocs.
748
749 2013-02-26 Anthony Green <green@moxielogic.com>
750
751 * config.bfd: Extend moxie-rtems target triplet name support.
752
753 2013-02-21 H.J. Lu <hongjiu.lu@intel.com>
754
755 PR ld/15167
756 * elf64-ia64-vms.c (elf64_vms_link_add_object_symbols): Set
757 unique_global only for definition.
758 * elflink.c (_bfd_elf_merge_symbol): Don't set unique_global
759 here.
760 (elf_link_add_object_symbols): Set unique_global only
761 for definition.
762
763 2013-02-21 Alan Modra <amodra@gmail.com>
764
765 * elf-bfd.h (struct elf_build_id): Extracted from..
766 (struct elf_build_id_info): ..here. Delete.
767 (struct output_elf_obj_tdata): New, extracted from..
768 (struct elf_obj_tdata): ..here. Reorganize for better packing.
769 Add "o" field.
770 (elf_program_header_size): Reference tdata->o.
771 (elf_seg_map, elf_next_file_pos, elf_eh_frame_hdr, elf_linker,
772 elf_stack_flags, elf_shstrtab, elf_strtab_sec, elf_shstrtab_sec,
773 elf_section_syms, elf_num_section_syms, elf_flags_init): Likewise.
774 * elf.c (bfd_elf_allocate_object): Allocate output_elf_obj_tdata
775 when opening bfd in any mode that might write.
776 (_bfd_elf_write_object_contents): Use build_id field in
777 output_elf_obj_tdata.
778 (_bfd_elf_close_and_cleanup): Tweak elf_shstrtab test.
779 (elfobj_grok_gnu_build_id): Adjust for elf_tdata changes.
780
781 2013-02-21 Alan Modra <amodra@gmail.com>
782
783 * elf-bfd.h (struct core_elf_obj_tdata): New.
784 (struct elf_obj_tdata): Delete core_signal, core_pid, core_lwpid,
785 core_program, and core_command. Add "core".
786 * elf.c (bfd_elf_mkcorefile): Allocate "core" struct.
787 Update all refs to tdata core fields.
788 * elf32-am33lin.c, * elf32-arm.c, * elf32-cris.c, * elf32-frv.c,
789 * elf32-hppa.c, * elf32-i386.c, * elf32-m68k.c, * elf32-mips.c,
790 * elf32-nios2.c, * elf32-ppc.c, * elf32-s390.c, * elf32-score.c,
791 * elf32-score7.c, * elf32-sh.c, * elf32-sparc.c, * elf32-tilegx.c,
792 * elf32-tilepro.c, * elf32-xtensa.c, * elf64-aarch64.c,
793 * elf64-hppa.c, * elf64-mips.c, * elf64-ppc.c, * elf64-tilegx.c,
794 * elf64-x86-64.c, * elfcore.h, * elfn32-mips.c: Update all refs
795 to tdata core fields.
796
797 2013-02-21 Alan Modra <amodra@gmail.com>
798
799 * elf-bfd.h (struct elf_obj_tdata): Rename segment_map to seg_map.
800 Delete num_locals and num_globals.
801 (elf_num_locals, elf_num_globals): Don't define.
802 (elf_seg_map, elf_next_file_pos, elf_eh_frame_hdr, elf_linker,
803 elf_stack_flags, elf_strtab_sec, elf_shstrtab_sec): Define.
804 * bfd.c, * elf-eh-frame.c, * elf-nacl.c, * elf-vxworks.c, * elf.c,
805 * elf32-arm.c, * elf32-lm32.c, * elf32-ppc.c, * elf32-rx.c,
806 * elf32-spu.c, * elf64-hppa.c, * elfcode.h, * elflink.c,
807 * elfnn-ia64.c, * elfxx-mips.c: Use newly defined elf_obj_tdata
808 accessor macros.
809 * elf.c (elf_map_symbols): Add pnum_locals param. Return
810 number of locals syms via new param.
811 (swap_out_syms): Adjust to suit elf_map_symbols change.
812
813 2013-02-19 Maciej W. Rozycki <macro@codesourcery.com>
814
815 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Also clear
816 STO_MICROMIPS annotation.
817
818 2013-02-19 Alan Modra <amodra@gmail.com>
819
820 * configure.in: Bump version to 2.23.52.
821 * elf-bfd.h (struct elf_build_id_info): New.
822 (struct elf_obj_tdata): Delete after_write_object_contents,
823 after_write_object_contents_info and build_id_size. Make build_id
824 a pointer to struct elf_build_id_info.
825 * elf.c (_bfd_elf_write_object_contents): Style. Update
826 after_write_ibject_contents invocation.
827 (elfobj_grok_gnu_build_id): Update for new build_id struct. Don't
828 allow zero size notes.
829 * configure: Regenerate.
830
831 2013-02-18 Maciej W. Rozycki <macro@codesourcery.com>
832
833 * elf64-mips.c (micromips_elf64_howto_table_rel): Add
834 R_MICROMIPS_SCN_DISP and R_MICROMIPS_JALR.
835 (micromips_elf64_howto_table_rela): Likewise.
836 (micromips_reloc_map): Add BFD_RELOC_MICROMIPS_JALR.
837 * elfn32-mips.c (elf_micromips_howto_table_rel): Add
838 R_MICROMIPS_SCN_DISP and R_MICROMIPS_JALR.
839 (elf_micromips_howto_table_rela): Likewise.
840 (micromips_reloc_map): Add BFD_RELOC_MICROMIPS_JALR.
841
842 2013-02-18 Paul Brook <paul@codesourcery.com>
843
844 * elfxx-mips.c (MICROMIPS_P): New macro.
845 (_bfd_mips_elf_symbol_processing): Use it.
846
847 2013-02-18 Maciej W. Rozycki <macro@codesourcery.com>
848
849 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Clarify
850 comment on _PROCEDURE_LINKAGE_TABLE_ creation.
851
852 2013-02-18 Alan Modra <amodra@gmail.com>
853
854 PR ld/12549
855 * elf-bfd.h (_bfd_elf_strtab_clear_refs): Delete.
856 (_bfd_elf_strtab_clear_all_refs): Declare.
857 (_bfd_elf_strtab_resize): Declare.
858 * elf-strtab.c (_bfd_elf_strtab_clear_refs): Delete.
859 (_bfd_elf_strtab_clear_all_refs): New function.
860 (_bfd_elf_strtab_resize): Likewise.
861 * elflink.c (elf_link_add_object_symbols): Use _bfd_elf_strtab_resize.
862
863 2013-02-18 Alan Modra <amodra@gmail.com>
864
865 * elf-bfd.h (struct elf_obj_tdata): Move find_line_info, local_stubs,
866 local_call_stubs, elf_data_symbol, elf_text_symbol, elf_data_section,
867 and elf_text_section to..
868 * elfxx-mips.c (struct mips_elf_obj_tdata): ..here. Update all refs.
869 * elf64-alpha.c (struct mips_elf_find_line): Rename to..
870 (struct alpha_elf_find_line): ..this.
871 (struct alpha_elf_obj_tdata): Add find_line_info, update refs.
872
873 2013-02-16 H.J. Lu <hongjiu.lu@intel.com>
874
875 PR ld/15146
876 * elflink.c (elf_link_add_object_symbols): Don't add DT_NEEDED
877 for references from the dummy bfd.
878
879 2013-02-16 H.J. Lu <hongjiu.lu@intel.com>
880
881 PR ld/15149
882 * elflink.c (elf_link_add_object_symbols): Also track weak
883 references.
884
885 2013-02-15 H.J. Lu <hongjiu.lu@intel.com>
886
887 PR binutils/15151
888 * archive.c (_bfd_find_nested_archive): Don't allow a nested
889 archive pointing to itself.
890 (_bfd_get_elt_at_filepos): Revert the last 2 changes.
891
892 2013-02-15 Nick Clifton <nickc@redhat.com>
893
894 PR binutils/15140
895 * archive.c (_bfd_get_elt_at_filepos): Prevent an infinite loop
896 accessing a corrupt nested archive.
897
898 2013-02-13 Richard Sandiford <rdsandiford@googlemail.com>
899
900 * elfxx-mips.c (mips_got_page_ref): New structure.
901 (mips_got_page_entry): Use a section rather than a (bfd, symndx)
902 pair to represent the anchor point.
903 (mips_got_info): Add a got_page_refs field.
904 (mips_elf_link_hash_table): Add a sym_cache field.
905 (mips_got_page_ref_hash, mips_got_page_ref_eq): New functions.
906 (mips_got_page_entry_hash, mips_got_page_entry_eq): Update for
907 new anchor representation.
908 (mips_elf_create_got_info): Create got_page_refs rather than
909 got_page_entries.
910 (mips_elf_record_got_page_ref): New function.
911 (mips_elf_pages_for_range): Move further down file.
912 (mips_elf_record_got_page_entry): Likewise. Take a got as argument.
913 Use a section rather than a (bfd, symndx) pair to represent the
914 anchor point.
915 (mips_elf_resolve_got_page_ref): New function.
916 (mips_elf_resolve_final_got_entries): Use it to populate
917 got_page_entries.
918 (_bfd_mips_elf_check_relocs): Call mips_elf_record_got_page_ref
919 rather than mips_elf_record_got_page_entry. Only nullify h
920 afterwards.
921 (mips_elf_lay_out_got): Call mips_elf_resolve_final_got_entries
922 earlier.
923
924 2013-02-12 Richard Sandiford <rdsandiford@googlemail.com>
925
926 * elfxx-mips.c (mips_elf_lay_out_got): Count VxWorks GOT relocs
927 in g->relocs.
928
929 2013-02-12 Alan Modra <amodra@gmail.com>
930
931 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Provide
932 suitable definition when using generic linker hash table.
933
934 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
935
936 * elfxx-mips.c (mips_elf_count_got_entries): Delete.
937 (mips_elf_check_recreate_got, mips_elf_recreate_got): Take a
938 mips_elf_traverse_got_arg. Count GOT entries.
939 (mips_elf_resolve_final_got_entries): Take the bfd_link_info
940 as argument. Update after above changes.
941 (mips_elf_merge_got, mips_elf_lay_out_got): Don't call
942 mips_elf_count_got_entries. Update the calls to
943 mips_elf_resolve_final_got_entries.
944
945 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
946
947 * elfxx-mips.c (mips_got_tls_type): New enum.
948 (mips_got_entry): Add tls_initialized.
949 (mips_elf_got_entry_hash, mips_elf_got_entry_eq, mips_tls_got_relocs)
950 (mips_elf_count_got_entry, mips_elf_initialize_tls_index): Remove
951 GOT_TLS_TYPE masks.
952 (mips_elf_reloc_tls_type, mips_tls_got_entries)
953 (mips_elf_record_global_got_symbol, mips_elf_initialize_tls_index)
954 (_bfd_mips_elf_finish_dynamic_symbol): Use GOT_TLS_NONE rather
955 than GOT_NORMAL.
956 (mips_elf_initialize_tls_slots): Replace got_offset and tls_type_p
957 arguments with a GOT entry. Remove GOT_TLS_TYPE masks. Use
958 tls_initialized rather than GOT_TLS_DONE.
959 (mips_tls_got_index): Delete.
960 (mips_elf_local_got_index, mips_elf_global_got_index): Use
961 mips_elf_initialize_tls_slots rather than mips_tls_got_index.
962 (mips_elf_record_got_entry): Initialize tls_initialized.
963
964 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
965
966 * elfxx-mips.c (mips_got_entry): Remove tls_ldm_offset.
967 (mips_elf_link_hash_entry): Remove tls_ie_type, tls_gd_type,
968 tls_ie_got_offset and tls_gd_got_offset.
969 (mips_elf_link_hash_newfunc): Remove initialization.
970 (mips_elf_create_got_info): Likewise.
971 (mips_elf_count_local_got_entries, mips_elf_count_global_tls_entries)
972 (mips_tls_single_got_index): Delete.
973 (mips_elf_local_got_index): Always use the GOT entry to track
974 GOT indices.
975 (mips_elf_global_got_index): Likewise.
976 (mips_elf_create_local_got_entry): Assert that TLS entries have
977 already been allocated.
978 (mips_elf_record_global_got_symbol): Don't initialize
979 tls_ie_type or tls_gd_type.
980 (mips_elf_count_got_symbols): Only count reloc-only GOT entries here.
981 (mips_elf_initialize_tls_index): Allocate a GOT index for every TLS
982 entry.
983 (mips_elf_lay_out_got): Use mips_elf_count_got_entries to count
984 the GOT entries.
985 (_bfd_mips_elf_finish_dynamic_symbol): Assert that TLS GOT offsets
986 have been allocated.
987 (_bfd_mips_elf_copy_indirect_symbol): Remove handling of
988 tls_ie_type and tls_gd_type.
989
990 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
991
992 * elfxx-mips.c (mips_elf_create_local_got_entry): Tidy. Avoid
993 aliasing violation. Check for htab allocation failures.
994
995 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
996
997 * elfxx-mips.c (mips_elf_primary_global_got_index): New function,
998 split out from...
999 (mips_elf_global_got_index): ...here. Reorder arguments so that
1000 the output bfd and info come first.
1001 (mips_elf_calculate_relocation): Update the call to
1002 mips_elf_global_got_index accordingly.
1003 (_bfd_mips_elf_finish_dynamic_symbol): Use
1004 mips_elf_primary_global_got_index rather than
1005 mips_elf_global_got_index.
1006 (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
1007
1008 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
1009
1010 * elfxx-mips.c (mips_got_entry): Update comments.
1011 (mips_elf_multi_got_entry_eq): Rename to...
1012 (mips_elf_got_entry_eq): ...this, deleting the old definition.
1013 (mips_elf_create_got_info): Remove master_got_p argument.
1014 Always use mips_elf_got_entry_eq.
1015 (mips_elf_bfd_got, mips_elf_multi_got, mips_elf_create_got_section):
1016 Update calls accordingly.
1017
1018 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
1019
1020 * elfxx-mips.c (mips_got_info): Remove bfd2got.
1021 (mips_elf_bfd2got_hash): Delete.
1022 (mips_elf_got_per_bfd_arg): Remove bfd2got.
1023 (mips_elf_replace_bfd_got, mips_elf_count_got_entries): New functions.
1024 (mips_elf_global_got_index, mips_elf_create_local_got_entry): Use
1025 g->next to test for the multigot case. Use mips_elf_bfd_got rather
1026 than mips_elf_got_for_ibfd.
1027 (mips_elf_bfd2got_entry_hash, mips_elf_bfd2got_entry_eq)
1028 (mips_elf_got_for_ibfd, mips_elf_get_got_for_bfd): Delete.
1029 (mips_elf_make_got_per_bfd): Replace with...
1030 (mips_elf_add_got_entry): ...this new function.
1031 (mips_elf_make_got_pages_per_bfd): Replace with...
1032 (mips_elf_add_got_page_entry): ...this new function.
1033 (mips_elf_merge_got_with): Replace bfd2got argument with separate
1034 bfd and GOT arguments. Use mips_elf_add_got_entry and
1035 mips_elf_add_got_page_entry instead of mips_elf_make_got_per_bfd
1036 and mips_elf_make_got_pages_per_bfd. Use mips_elf_replace_bfd_got
1037 to set the BFD's GOT and free the old table.
1038 (mips_elf_merge_got): Replace bfd2got argument with separate
1039 bfd and GOT arguments. Apply mips_elf_resolve_final_got_entries.
1040 Use mips_elf_count_got_entries to count the number of entries in
1041 each GOT. Update the calls to mips_elf_merge_got_with.
1042 (mips_elf_adjust_gp): Use g->next to test for the multigot case.
1043 Use mips_elf_bfd_got rather than mips_elf_got_for_ibfd.
1044 (mips_elf_multi_got): Don't create the bfd2got hash table.
1045 Replace hash table traversal with a walk over the input bfds,
1046 updating the call to mips_elf_merge_got. Use mips_elf_replace_bfd_got
1047 to set the output bfd's GOT.
1048 (mips_elf_lay_out_got): Rename "sub" to "ibfd". Record that all
1049 bfds use the master GOT in the single-GOT case.
1050 (_bfd_mips_elf_finish_dynamic_sections): Use mips_elf_bfd_got
1051 rather than mips_elf_got_for_ibfd.
1052
1053 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
1054
1055 * elfxx-mips.c (mips_elf_obj_tdata): Add a got field.
1056 (mips_elf_bfd_got, mips_elf_record_got_entry): New functions.
1057 (mips_elf_record_global_got_symbol): Update the hash entry before
1058 adding the mips_got_entry. Use mips_elf_record_got_entry to do
1059 the latter.
1060 (mips_elf_record_local_got_symbol): Use mips_elf_record_got_entry.
1061 (mips_elf_record_got_page_entry): Record the entry in both the
1062 master and bfd GOTs.
1063
1064 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
1065
1066 * elfxx-mips.c (mips_elf_recreate_got): Don't change the entry;
1067 create another one if necessary.
1068 (mips_elf_set_gotidx): New function.
1069 (mips_elf_set_global_gotidx): Use it.
1070 (mips_elf_initialize_tls_index): Likewise. Take a
1071 mips_elf_traverse_got_arg as argument.
1072 (mips_elf_lay_out_got): Update use of mips_elf_initialize_tls_index.
1073 (mips_elf_multi_got): Likewise. Cope with error returns from
1074 mips_elf_set_global_gotidx.
1075
1076 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
1077
1078 * elfxx-mips.c (mips_got_info): Add relocs field.
1079 (mips_elf_set_global_got_offset_arg, mips_elf_count_tls_arg): Replace
1080 with...
1081 (mips_elf_traverse_got_arg): ...this new structure.
1082 (mips_elf_count_local_tls_relocs): Delete.
1083 (mips_elf_count_global_tls_relocs): Likewise.
1084 (mips_elf_count_got_entry): New function.
1085 (mips_elf_count_local_got_entries): Likewise.
1086 (mips_elf_count_global_tls_entries): Take a mips_elf_traverse_got_arg
1087 rather than a mips_elf_count_tls_arg. Count both relocs and entries.
1088 (mips_elf_record_local_got_symbol): Don't count got entries here.
1089 (mips_elf_make_got_per_bfd): Use mips_elf_count_got_entry.
1090 (mips_elf_set_global_got_offset): Split into...
1091 (mips_elf_set_global_got_area, mips_elf_set_global_gotidx): ...these
1092 new functions. Take a mips_elf_traverse_got_arg rather than a
1093 mips_elf_set_global_got_offset_arg. Don't count TLS relocs here.
1094 Use g->relocs to record the number of relocs needed for global GOT
1095 entries.
1096 (mips_elf_multi_got): Use mips_elf_traverse_got_arg rather than
1097 mips_elf_set_global_got_offset_arg. Use the relocs field to count
1098 relocations. Update for above function split.
1099 (mips_elf_lay_out_got): Use mips_elf_count_local_got_entries
1100 to count both the number of GOT entries and the number of TLS
1101 relocs required by local entries. Likewise
1102 mips_elf_count_global_tls_entries and global entries.
1103 Remove uses of mips_elf_count_local_tls_relocs and
1104 mips_elf_count_global_tls_relocs.
1105
1106 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
1107
1108 * elfxx-mips.c (mips_got_entry): Update comment above tls_type entry
1109 to say that each structure represents only one type of TLS reference.
1110 (GOT_TLS_TYPE): New define.
1111 (mips_elf_link_hash_entry): Temporarily split tls_type and
1112 tls_got_offset into two variables each.
1113 (mips_elf_link_hash_newfunc): Update accordingly.
1114 (mips_elf_got_entry_eq, mips_elf_got_entry_hash)
1115 (mips_elf_multi_got_entry_eq): Require the tls_type to be the same.
1116 (mips_elf_reloc_tls_type, mips_tls_got_entries): New functions.
1117 (mips_tls_got_relocs): Use a switch statement.
1118 (mips_elf_count_global_tls_entries): Handle the new hash entry fields.
1119 (mips_elf_initialize_tls_slots): Use a switch statement. Avoid
1120 local "offset" variable.
1121 (mips_tls_got_index): Remove r_type argument and assert. Remove
1122 code that handled entries with two TLS types; always use the
1123 original got_index instead.
1124 (mips_tls_single_got_index): New function.
1125 (mips_elf_local_got_index): Use entry->tls_type to check for
1126 TLS entries. Use mips_tls_single_got_index. Update call to
1127 mips_tls_got_index.
1128 (mips_elf_global_got_index): Use mips_elf_reloc_tls_type.
1129 Use p->tls_type to check for TLS entries. Update call to
1130 mips_tls_got_index. Use mips_tls_single_got_index.
1131 (mips_elf_create_local_got_entry): Use mips_elf_reloc_tls_type.
1132 Use entry.tls_type to check for TLS entries.
1133 (mips_elf_record_global_got_symbol): Replace tls_flag argument
1134 with r_type argument. Use mips_elf_reloc_tls_type.
1135 Set up the new hash entry fields.
1136 (mips_elf_record_local_got_symbol): Replace tls_flag argument
1137 with r_type argument. Use mips_elf_reloc_tls_type and
1138 mips_tls_got_entries. Remove code that handled entries
1139 with multiple TLS types.
1140 (mips_elf_make_got_per_bfd): Use mips_tls_got_entries.
1141 (mips_elf_initialize_tls_index): Handle new hash entry fields.
1142 Use equality rather than masks when checking for specific TLS types.
1143 Use mips_tls_got_entries. Remove code that handled entries
1144 with multiple TLS types.
1145 (mips_elf_calculate_relocation): Use TLS_RELOC_P instead of
1146 testing the hash table entry.
1147 (_bfd_mips_elf_check_relocs): Update calls to
1148 mips_elf_record_global_got_symbol and mips_elf_record_local_got_symbol.
1149 (_bfd_mips_elf_finish_dynamic_symbol): Don't check h->type.
1150 (_bfd_mips_elf_copy_indirect_symbol): Handle new hash entry fields.
1151
1152 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
1153
1154 * elfxx-mips.c (mips_elf_multi_got_entry_hash): Rename to...
1155 (mips_elf_got_entry_hash): ...this, deleting the old version.
1156 (mips_elf_create_got_info): Use mips_elf_got_entry_hash for
1157 both types of GOT.
1158
1159 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
1160
1161 * elfxx-mips.c (mips_elf_create_got_info): New function.
1162 (mips_elf_get_got_for_bfd, mips_elf_multi_got): Use it.
1163 (mips_elf_create_got_section): Likewise.
1164
1165 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
1166
1167 * elfxx-mips.c (mips_elf_record_local_got_symbol): Always set
1168 gotidx to -1.
1169
1170 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
1171
1172 * elfxx-mips.c (mips_elf_multi_got): Simplify size calculation.
1173
1174 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
1175
1176 * elfxx-mips.c (mips_got_info): Move global_gotsym to...
1177 (mips_elf_link_hash_table): ...here. Update rest of file accordingly.
1178
1179 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
1180
1181 * elfxx-mips.c (mips_elf_count_global_tls_entries)
1182 (mips_elf_count_global_tls_relocs): Don't count indirect or
1183 warning symbols.
1184 (mips_elf_multi_got, mips_elf_lay_out_got): Assert that the right
1185 number of TLS entries were allocated.
1186
1187 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
1188
1189 * elfxx-mips.c (mips_elf_sort_hash_table_f): Remove asserts.
1190
1191 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
1192
1193 * elfxx-mips.c (mips_elf_merge_got_with): Only use arg->global_count
1194 if there are TLS relocations.
1195
1196 2013-02-11 Richard Sandiford <rdsandiford@googlemail.com>
1197
1198 * elfxx-mips.c (mips_elf_recreate_got): Remove free.
1199 (mips_elf_resolve_final_got_entries): Remove bogus comment.
1200
1201 2013-02-11 Alan Modra <amodra@gmail.com>
1202
1203 * elfcode.h (elf_checksum_contents): Free contents.
1204 * elf-bfd.h (_bfd_elf_link_hash_table_free): Declare.
1205 * elflink.c (_bfd_elf_link_hash_table_free): New function.
1206 (elf_final_link_free): New function, extracted from..
1207 (bfd_elf_final_link): ..here. Always call
1208 _bfd_elf_write_section_eh_frame_hdr.
1209 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Default to
1210 _bfd_elf_link_hash_table_free.
1211 * libbfd-in.h (_bfd_merge_sections_free): Declare.
1212 * libbfd.h: Regenerate.
1213 * merge.c (_bfd_merge_sections_free): New function.
1214 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame_hdr): Free
1215 hdr_info->array.
1216 * elf-m10300.c (elf32_mn10300_link_hash_table_free): Call
1217 _bfd_elf_link_hash_table_free.
1218 * elf32-arm.c (elf32_arm_link_hash_table_free): Likewise.
1219 * elf32-avr.c (elf32_avr_link_hash_table_free): Likewise.
1220 * elf32-hppa.c (elf32_hppa_link_hash_table_free): Likewise.
1221 * elf32-i386.c (elf_i386_link_hash_table_free): Likewise.
1222 * elf32-m68hc1x.c (m68hc11_elf_hash_table_free): Likewise.
1223 * elf32-m68k.c (elf_m68k_link_hash_table_free): Likewise.
1224 * elf32-metag.c (elf_metag_link_hash_table_free): Likewise.
1225 * elf32-xgate.c (xgate_elf_bfd_link_hash_table_free): Likewise.
1226 * elf64-aarch64.c (elf64_aarch64_link_hash_table_free): Likewise.
1227 * elf64-ia64-vms.c (elf64_ia64_hash_table_free): Likewise.
1228 * elf64-ppc.c (ppc64_elf_link_hash_table_free): Likewise.
1229 * elf64-x86-64.c (elf_x86_64_link_hash_table_free): Likewise.
1230 * elfnn-ia64.c (elfNN_ia64_hash_table_free): Likewise.
1231 * elf32-cr16.c (elf32_cr16_link_hash_table_free): Delete.
1232 (bfd_elf32_bfd_link_hash_table_free): Don't define.
1233 * elf32-tic6x.c (elf32_tic6x_link_hash_table_free): Delete.
1234 (bfd_elf32_bfd_link_hash_table_free): Dont' define.
1235
1236 2013-02-10 Alan Modra <amodra@gmail.com>
1237
1238 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_zmalloc.
1239 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
1240 * m68klinux.c (linux_link_hash_table_create): Likewise.
1241 * sparclinux.c (linux_link_hash_table_create): Likewise.
1242 * sunos.c (sunos_link_hash_table_create): Likewise.
1243 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
1244 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
1245 * elf32-arm.c (elf32_arm_link_hash_table_create): Likewise.
1246 * elf32-avr.c (elf32_avr_link_hash_table_create): Likewise.
1247 * elf32-cr16.c (elf32_cr16_link_hash_table_create): Likewise.
1248 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
1249 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
1250 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
1251 * elf32-lm32.c (lm32_elf_link_hash_table_create): Likewise.
1252 * elf32-m32r.c (m32r_elf_link_hash_table_create): Likewise.
1253 * elf32-m68hc1x.c (m68hc11_elf_hash_table_create): Likewise.
1254 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
1255 * elf32-metag.c (elf_metag_link_hash_table_create): Likewise.
1256 * elf32-nios2.c (nios2_elf32_link_hash_table_create): Likewise.
1257 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
1258 * elf32-score.c (elf32_score_link_hash_table_create): Likewise.
1259 * elf32-spu.c (spu_elf_link_hash_table_create): Likewise.
1260 * elf32-tic6x.c (elf32_tic6x_link_hash_table_create): Likewise.
1261 * elf32-vax.c (elf_vax_link_hash_table_create): Likewise.
1262 * elf32-xgate.c (xgate_elf_bfd_link_hash_table_create): Likewise.
1263 * elf32-xtensa.c (elf_xtensa_link_hash_table_create): Likewise.
1264 * elf64-aarch64.c (elf64_aarch64_link_hash_table_create): Likewise.
1265 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
1266 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
1267 * elf64-x86-64.c (elf_x86_64_link_hash_table_create): Likewise.
1268 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
1269 * elflink.c (_bfd_elf_link_hash_table_create): Likewise.
1270 (_bfd_elf_link_hash_table_init): Assume zero fill table on entry.
1271
1272 2013-02-10 Alan Modra <amodra@gmail.com>
1273
1274 * i386linux.c (linux_link_hash_table_create): Allocate table
1275 with bfd_zmalloc, not bfd_alloc.
1276 * pdp11.c (link_hash_table_create): Allocate table with
1277 bfd_malloc, not bfd_alloc.
1278 * elf32-bfin.c (bfinfdpic_elf_link_hash_table_create): Allocate table
1279 with bfd_zmalloc, not bfd_zalloc.
1280 (bfin_link_hash_table_create): Likewise.
1281 * elf32-frv.c (frvfdpic_elf_link_hash_table_create): Likewise.
1282 * elf64-hppa.c (elf64_hppa_hash_table_create): Likewise.
1283
1284 2013-02-10 Alan Modra <amodra@gmail.com>
1285
1286 PR ld/15113
1287 * elf32-sh.c (sh_elf_link_hash_table_create): Use bfd_zmalloc.
1288
1289 2013-02-08 Markos Chandras <markos.chandras@imgtec.com>
1290
1291 * elf32-metag.c: Use bfd_get_linker_section to get SEC_LINKER_CREATED
1292 sections.
1293 (elf_metag_adjust_dynamic_symbol): Don't error on zero size dynbss
1294 symbol.
1295
1296 2013-02-08 Yufeng Zhang <yufeng.zhang@arm.com>
1297
1298 * elf64-aarch64.c (elf64_aarch64_grok_prstatus): Change 'size' from
1299 288 to 272.
1300
1301 2013-02-08 Alan Modra <amodra@gmail.com>
1302
1303 PR binutils/15106
1304 * elf-bfd.h (struct elf_obj_tdata): Add elf_find_function_cache.
1305 * elf.c (elf_find_function): Revert last change. Use new
1306 tdata field rather than static vars for cache.
1307
1308 2013-02-07 H.J. Lu <hongjiu.lu@intel.com>
1309
1310 PR ld/15107
1311 * elflink.c (elf_link_output_extsym): Set STB_GNU_UNIQUE only if
1312 symbol is defined in regular object.
1313
1314 2013-02-07 Roberto Agostino Vitillo <ra.vitillo@gmail.com>
1315
1316 PR binutils/15106
1317 * elf.c (elf_find_function): Don't cache if symbols change.
1318
1319 2013-02-07 Alan Modra <amodra@gmail.com>
1320
1321 PR binutils/14873
1322 * elf-attrs.c (_bfd_elf_copy_obj_attributes): Don't attempt to
1323 copy attributes from or to non-ELF.
1324
1325 2013-02-06 H.J. Lu <hongjiu.lu@intel.com>
1326
1327 * elf32-i386.c (elf_i386_allocate_dynrelocs): Don't clear pc_count
1328 for non-zero TLS symbol.
1329 (elf_i386_relocate_section): Don't resolve size relocation against
1330 non-zero TLS symbol.
1331 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Don't clear
1332 pc_count for non-zero TLS symbol.
1333 (elf_x86_64_relocate_section): Don't resolve size relocation
1334 against non-zero TLS symbol.
1335
1336 2013-02-06 Sandra Loosemore <sandra@codesourcery.com>
1337 Andrew Jenner <andrew@codesourcery.com>
1338
1339 Based on patches from Altera Corporation.
1340
1341 * Makefile.am (ALL_MACHINES): Add cpu-nios2.lo.
1342 (ALL_MACHINES_CFILES): Add cpu-nios2.c.
1343 (BFD_BACKENDS): Add elf32-nios2.lo.
1344 (BFD32_BACKENDS_CFILES): Add elf32-nios2.c.
1345 * Makefile.in: Regenerated.
1346 * configure.in: Add entries for bfd_elf32_bignios2_vec and
1347 bfd_elf32_littlenios2_vec.
1348 * configure: Regenerated.
1349 * config.bfd: Add cases for nios2.
1350 * archures.c (enum bfd_architecture): Add bfd_arch_nios2.
1351 (bfd_mach_nios2): Define.
1352 (bfd_nios2_arch): Declare.
1353 (bfd_archures_list): Add bfd_nios2_arch.
1354 * targets.c (bfd_elf32_bignios2_vec): Declare.
1355 (bfd_elf32_littlenios2_vec): Declare.
1356 (_bfd_target_vector): Add entries for bfd_elf32_bignios2_vec and
1357 bfd_elf32_littlenios2_vec.
1358 * elf-bfd.h (enum elf_target_id): Add NIOS2_ELF_DATA.
1359 * reloc.c (enum bfd_reloc_code_real): Add Nios II relocations.
1360 * bfd-in2.h: Regenerated.
1361 * libbfd.h: Regenerated.
1362 * cpu-nios2.c: New file.
1363 * elf32-nios2.c: New file.
1364
1365 2013-02-06 Alan Modra <amodra@gmail.com>
1366
1367 * elf32-arm.c (elf32_arm_final_link_relocate): Only test for
1368 stubs in stub_bfd.
1369
1370 2013-02-06 Alan Modra <amodra@gmail.com>
1371
1372 * Makefile.am (SOURCE_HFILES): Add `elf-linux-psinfo.h'.
1373 * Makefile.in: Regenerate.
1374
1375 2013-02-04 Sergio Durigan Junior <sergiodj@redhat.com>
1376 Pedro Alves <palves@redhat.com>
1377
1378 * Makefile.in (SOURCE_HFILES): Add `elf-linux-psinfo.h'.
1379 * elf-bfd.h (elf_internal_linux_prpsinfo): New structure
1380 declaration.
1381 (elfcore_write_linux_prpsinfo32, elfcore_write_linux_prpsinfo64)
1382 (elfcore_write_ppc32_linux_prpsinfo32): New declarations.
1383 * elf-linux-psinfo.h: New file.
1384 * elf.c: Include elf-linux-psinfo.h.
1385 (elfcore_write_linux_prpsinfo32, elfcore_write_linux_prpsinfo64):
1386 New functions.
1387 * elf32-ppc.c: Include `elf-linux-psinfo.h'.
1388 (elf_external_ppc_linux_prpsinfo32): New structure declaration.
1389 (PPC_LINUX_PRPSINFO32_SWAP_FIELDS): New macro.
1390 (elfcore_write_ppc_linux_prpsinfo32): New function.
1391
1392 2013-02-04 Tristan Gingold <gingold@adacore.com>
1393
1394 * mach-o.c (bfd_mach_o_scan_start_address): Do not fail if no
1395 start address.
1396
1397 2013-02-04 Alan Modra <amodra@gmail.com>
1398
1399 * Makefile.am (BFD64_BACKENDS): Remove elf-nacl.lo.
1400 (BFD64_BACKENDS_CFILES): Remove elf-nacl.c.
1401 * Makefile.in: Regenerate.
1402 * po/SRC-POTFILES.in: Regenerate.
1403
1404 2013-02-04 Alan Modra <amodra@gmail.com>
1405
1406 * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Delete.
1407 * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Delete.
1408
1409 2013-02-01 Alan Modra <amodra@gmail.com>
1410
1411 * elf64-ppc.c (dec_dynrel_count): Don't error when elf_gc_sweep_symbol
1412 clears def_regular.
1413
1414 2013-01-31 Tristan Gingold <gingold@adacore.com>
1415
1416 * mach-o.c (bfd_mach_o_scan): Call bfd_mach_o_flatten_sections
1417 earlier. Fix status checking of bfd_mach_o_scan_start_address.
1418 (bfd_mach_o_scan_start_address): Handle LC_MAIN.
1419
1420 2013-01-31 Alan Modra <amodra@gmail.com>
1421 David S. Miller <davem@davemloft.net>
1422
1423 PR ld/15056
1424 * elfxx-sparc.c (_bfd_sparc_elf_gc_mark_hook): Handle implicit
1425 references to __tls_get_addr.
1426 * elf32-tilpro.c (tilepro_elf_gc_mark_hook): Likewise. Correct
1427 vtinherit and vtentry reloc handling too.
1428 * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): As for tilepro.
1429
1430 2013-01-31 Alan Modra <amodra@gmail.com>
1431
1432 * elf64-ppc.c (ppc_stub_name): Trim off trailing "+0".
1433
1434 2013-01-31 Alan Modra <amodra@gmail.com>
1435
1436 * elf64-ppc.c (build_plt_stub): Correct plt stub branch to glink.
1437
1438 2013-01-28 Alan Modra <amodra@gmail.com>
1439
1440 * elf64-ppc.c: Use %T to print symbols names and remove redundant
1441 "relocation" in error messages throughout file.
1442 (ppc64_elf_relocate_section): Remove sibling call error message,
1443 replace with "call lacks nop". Specially report errors for
1444 branches to function entry points via OPD lookup and branches
1445 to stubs. Remove NULL symbol handling now done by %T.
1446
1447 2013-01-28 Alan Modra <amodra@gmail.com>
1448
1449 * archive.c (bfd_generic_archive_p): Return target and keep
1450 ardata on partial matches.
1451 * format.c (bfd_check_format_matches): Adjust for above
1452 change. Remove bfd_error_file_ambiguously_recognized dead
1453 code.
1454
1455 2013-01-26 Alan Modra <amodra@gmail.com>
1456
1457 * bfd.c (struct bfd_preserve, bfd_preserve_save, bfd_preserve_restore,
1458 bfd_preserve_finish): Move to..
1459 * format.c: ..here, splitting out..
1460 (bfd_reinit): ..this. New function.
1461 (bfd_check_format_matches): Use bfd_preserve_save/restore to
1462 keep bfd state for a match.
1463 * elfcode.h (elf_object_p): Don't use bfd_preserve_save/restore.
1464 * elfcore.h (elf_core_file_p): Likewise.
1465 * mach-o.c (bfd_mach_o_header_p): Likewise.
1466 * pef.c (bfd_pef_object_p, bfd_pef_xlib_object_p): Likewise.
1467 * xsym.c (bfd_sym_object_p): Likewise.
1468 * mmo.c (mmo_scan): Clear abfd->symcount.
1469 * opncls.c (_bfd_new_bfd): Use a smaller section hash table.
1470 * section.c (bfd_section_list_clear): Clear section_htab.count.
1471 * bfd-in2.h: Regenerate.
1472
1473 2013-01-25 Michael Schewe <michael.schewe@gmx.net>
1474
1475 * elf32-h8300.c (elf32_h8_relax_section): When checking for a
1476 second reloc, make sure that the reloc potentially exists first.
1477
1478 2013-01-24 Nick Clifton <nickc@redhat.com>
1479
1480 * archures.c: Add bfd_mach_v850e3v5.
1481 * bfd-in2.h: Regenerate.
1482 * cpu-v850.c: Add entries for v850e2v5 and v850e3v5.
1483 * cpu-v850_rh850.c: Likewise.
1484 * elf32-v850.c: Add support for v850e3v5 architecture.
1485
1486 2013-01-23 Markos Chandras <markos.chandras@imgtec.com>
1487
1488 * elf32-metag.c: Error on HIADDR16/LOADDR16 in shared link.
1489
1490 2013-01-23 Leif Ekblad <leif@rdos.net>
1491
1492 * config.bfd (x86_64-*-rdos*): Remove targ_selvecs.
1493
1494 2013-01-18 H.J. Lu <hongjiu.lu@intel.com>
1495
1496 * elf32-i386.c (elf_i386_allocate_dynrelocs): Clear pc_count for
1497 non-zero TLS symbol.
1498 (elf_i386_relocate_section): Resolve size relocation against
1499 non-zero TLS symbol.
1500 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Clear pc_count
1501 for non-zero TLS symbol.
1502 (elf_x86_64_relocate_section): Resolve size relocation against
1503 non-zero TLS symbol.
1504
1505 2013-01-18 Mike Frysinger <vapier@gentoo.org>
1506
1507 * elflink.c (bfd_elf_size_dynamic_sections): Only add DT_RPATH
1508 when new_dtags is false. Only add DT_RUNPATH when new_dtags is
1509 true.
1510
1511 2013-01-17 H.J. Lu <hongjiu.lu@intel.com>
1512
1513 * elf32-i386.c (elf_i386_check_relocs): Count size relocation as
1514 PC-relative relocation.
1515 * elf64-x86-64.c (elf_x86_64_check_relocs): Count size relocation
1516 as PC-relative relocation.
1517
1518 2013-01-16 H.J. Lu <hongjiu.lu@intel.com>
1519
1520 * elf32-i386.c (elf_i386_check_relocs): Update R_386_SIZE32
1521 check.
1522 (elf_i386_relocate_section): Don't check TLS for R_386_SIZE32.
1523
1524 * elf64-x86-64.c (elf_x86_64_check_relocs): Update R_X86_64_SIZE32
1525 and R_X86_64_SIZE64 check.
1526 (elf_x86_64_relocate_section): Don't check TLS for R_X86_64_SIZE32
1527 nor R_X86_64_SIZE64.
1528
1529 2013-01-16 H.J. Lu <hongjiu.lu@intel.com>
1530
1531 * bfd-in2.h: Regenerated.
1532 * libbfd.h: Likewise.
1533
1534 * elf32-i386.c (elf_howto_table): Fill R_386_SIZE32 entry.
1535 (elf_i386_reloc_type_lookup): Support BFD_RELOC_SIZE32.
1536 (elf_i386_check_relocs): Handle R_386_SIZE32.
1537 (elf_i386_gc_sweep_hook): Likewise.
1538 (elf_i386_relocate_section): Likewise.
1539
1540 * elf64-x86-64.c (x86_64_elf_howto_table): Fill R_X86_64_SIZE32
1541 and R_X86_64_SIZE64 entries.
1542 (x86_64_reloc_map): Add BFD_RELOC_SIZE32 and BFD_RELOC_SIZE64,
1543 (elf_x86_64_rtype_to_howto): Handle R_X86_64_SIZE32 for x32.
1544 (elf_x86_64_reloc_name_lookup): Likewise.
1545 (elf_x86_64_check_relocs): Handle R_X86_64_SIZE32 and
1546 R_X86_64_SIZE64.
1547 (elf_x86_64_gc_sweep_hook): Likewise.
1548 (elf_x86_64_relocate_section): Likewise.
1549
1550 * reloc.c (bfd_reloc_code_type): Add BFD_RELOC_SIZE32 and
1551 BFD_RELOC_SIZE64.
1552
1553 2013-01-15 H.J. Lu <hongjiu.lu@intel.com>
1554
1555 * elf64-x86-64.c (R_X86_64_standard): Replace R_X86_64_IRELATIVE
1556 with R_X86_64_RELATIVE64.
1557
1558 2013-01-15 Nick Clifton <nickc@redhat.com>
1559
1560 * elf32-msp430.c: Fix spelling typo.
1561
1562 2013-01-15 Alan Modra <amodra@gmail.com>
1563
1564 * elf64-ppc.c (ppc64_elf_size_stubs): Default shared libs to
1565 plt-thread-safe.
1566
1567 2013-01-14 Alan Modra <amodra@gmail.com>
1568
1569 PR binutils/14813
1570 * bfdio.c (struct bfd_iovec <bclose>): Revert 2012-11-06.
1571 (memory_bclose): Likewise. Return 0 on success.
1572 * cache.c (cache_bclose): Likewise.
1573 * opncls.c (opncls_bclose, bfd_close): Likewise.
1574 * vms-lib.c (vms_lib_bclose): Likewise.
1575 * libbfd.h: Regenerate.
1576
1577 2013-01-13 Alan Modra <amodra@gmail.com>
1578
1579 * elf-bfd.h (struct elf_link_hash_entry): Delete dynamic_weak.
1580 Add ref_dynamic_nonweak.
1581 * elflink.c (_bfd_elf_mark_dynamic_def_weak): Delete.
1582 (_bfd_elf_merge_symbol): Don't call above function. Move
1583 setting of ref_dynamic_nonweak and dynamic_def earlier. Don't
1584 clear dynamic_def.
1585 (elf_link_add_object_symbols): Delete redundant "override" test.
1586 Don't set dynamic_def here.
1587 (elf_link_output_extsym): Update.
1588
1589 2013-01-12 H.J. Lu <hongjiu.lu@intel.com>
1590
1591 * elf32-i386.c (elf_i386_check_relocs): Set bfd errror for
1592 normal and TLS symbol access.
1593 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1594
1595 2013-01-12 Alan Modra <amodra@gmail.com>
1596
1597 * elf-bfd.h (_bfd_elf_strtab_refcount): Declare.
1598 * elf-strtab.c (_bfd_elf_strtab_refcount): New function.
1599 * elflink.c (elf_add_dt_needed_tag): Use _bfd_elf_strtab_refcount.
1600
1601 2013-01-12 Alan Modra <amodra@gmail.com>
1602
1603 PR ld/12549
1604 * elf-bfd.h (_bfd_elf_strtab_clear_refs): Declare.
1605 (_bfd_elf_strtab_clear_all_refs): Define.
1606 * elf-strtab.c (_bfd_elf_strtab_clear_refs): New function.
1607 (_bfd_elf_strtab_clear_all_refs): Delete.
1608 * elflink.c (elf_link_add_object_symbols): Clear out added
1609 strtab refs. Correct handling of warning common symbols.
1610
1611 2013-01-10 H.J. Lu <hongjiu.lu@intel.com>
1612
1613 * aout0.c: Remove trailing white spaces.
1614 * archive.c: Likewise.
1615 * archures.c: Likewise.
1616 * bfd-in.h: Likewise.
1617 * bfd-in2.h: Likewise.
1618 * coff-alpha.c: Likewise.
1619 * coff-i860.c: Likewise.
1620 * coff-mips.c: Likewise.
1621 * coff-ppc.c: Likewise.
1622 * coff-tic80.c: Likewise.
1623 * coff-x86_64.c: Likewise.
1624 * coff-z80.c: Likewise.
1625 * coffcode.h: Likewise.
1626 * coffgen.c: Likewise.
1627 * cofflink.c: Likewise.
1628 * compress.c: Likewise.
1629 * corefile.c: Likewise.
1630 * cpu-arm.c: Likewise.
1631 * cpu-avr.c: Likewise.
1632 * cpu-bfin.c: Likewise.
1633 * cpu-cr16.c: Likewise.
1634 * cpu-cr16c.c: Likewise.
1635 * cpu-crx.c: Likewise.
1636 * cpu-h8300.c: Likewise.
1637 * cpu-i386.c: Likewise.
1638 * cpu-lm32.c: Likewise.
1639 * cpu-m68k.c: Likewise.
1640 * cpu-moxie.c: Likewise.
1641 * cpu-msp430.c: Likewise.
1642 * cpu-sh.c: Likewise.
1643 * cpu-xc16x.c: Likewise.
1644 * dwarf2.c: Likewise.
1645 * ecofflink.c: Likewise.
1646 * ecoffswap.h: Likewise.
1647 * elf-ifunc.c: Likewise.
1648 * elf-m10300.c: Likewise.
1649 * elf-vxworks.c: Likewise.
1650 * elf32-avr.c: Likewise.
1651 * elf32-avr.h: Likewise.
1652 * elf32-cr16.c: Likewise.
1653 * elf32-cr16c.c: Likewise.
1654 * elf32-cris.c: Likewise.
1655 * elf32-crx.c: Likewise.
1656 * elf32-frv.c: Likewise.
1657 * elf32-hppa.c: Likewise.
1658 * elf32-i860.c: Likewise.
1659 * elf32-ip2k.c: Likewise.
1660 * elf32-iq2000.c: Likewise.
1661 * elf32-m32c.c: Likewise.
1662 * elf32-m68hc1x.c: Likewise.
1663 * elf32-msp430.c: Likewise.
1664 * elf32-mt.c: Likewise.
1665 * elf32-ppc.c: Likewise.
1666 * elf32-rl78.c: Likewise.
1667 * elf32-s390.c: Likewise.
1668 * elf32-score.h: Likewise.
1669 * elf32-sh-symbian.c: Likewise.
1670 * elf32-sh.c: Likewise.
1671 * elf32-spu.c: Likewise.
1672 * elf32-tic6x.c: Likewise.
1673 * elf32-v850.c: Likewise.
1674 * elf32-xc16x.c: Likewise.
1675 * elf32-xtensa.c: Likewise.
1676 * elf64-alpha.c: Likewise.
1677 * elf64-hppa.c: Likewise.
1678 * elf64-ppc.c: Likewise.
1679 * elf64-s390.c: Likewise.
1680 * elfcore.h: Likewise.
1681 * elflink.c: Likewise.
1682 * elfxx-mips.c: Likewise.
1683 * elfxx-sparc.c: Likewise.
1684 * elfxx-tilegx.c: Likewise.
1685 * ieee.c: Likewise.
1686 * libcoff.h: Likewise.
1687 * libpei.h: Likewise.
1688 * libxcoff.h: Likewise.
1689 * linker.c: Likewise.
1690 * mach-o-i386.c: Likewise.
1691 * mach-o-target.c: Likewise.
1692 * mach-o.c: Likewise.
1693 * mach-o.h: Likewise.
1694 * mmo.c: Likewise.
1695 * opncls.c: Likewise.
1696 * pdp11.c: Likewise.
1697 * pe-x86_64.c: Likewise.
1698 * peXXigen.c: Likewise.
1699 * pef-traceback.h: Likewise.
1700 * pei-x86_64.c: Likewise.
1701 * peicode.h: Likewise.
1702 * plugin.c: Likewise.
1703 * reloc.c: Likewise.
1704 * riscix.c: Likewise.
1705 * section.c: Likewise.
1706 * som.c: Likewise.
1707 * syms.c: Likewise.
1708 * tekhex.c: Likewise.
1709 * ticoff.h: Likewise.
1710 * vaxbsd.c: Likewise.
1711 * xcofflink.c: Likewise.
1712 * xtensa-isa.c: Likewise.
1713
1714 2013-01-10 Will Newton <will.newton@imgtec.com>
1715
1716 * Makefile.am: Add Meta.
1717 * Makefile.in: Regenerate.
1718 * archures.c (bfd_mach_metag): New.
1719 * bfd-in2.h: Regenerate.
1720 * config.bfd: Add Meta.
1721 * configure: Regenerate.
1722 * configure.in: Add Meta.
1723 * cpu-metag.c: New file.
1724 * elf-bfd.h: Add Meta.
1725 * elf32-metag.c: New file.
1726 * elf32-metag.h: New file.
1727 * libbfd.h: Regenerate.
1728 * reloc.c: Add Meta relocations.
1729 * targets.c: Add Meta.
1730
1731 2013-01-08 Yufeng Zhang <yufeng.zhang@arm.com>
1732
1733 * elf-bfd.h (elfcore_write_aarch_tls): Add prototype.
1734 (elfcore_write_aarch_hw_break): Likewise.
1735 (elfcore_write_aarch_hw_watch): Likewise.
1736 * elf.c (elfcore_grok_aarch_tls): New function.
1737 (elfcore_grok_aarch_hw_break): Likewise.
1738 (elfcore_grok_aarch_hw_watch): Likewise.
1739 (elfcore_grok_note): Call the new functions to handle the
1740 corresponding notes.
1741 (elfcore_write_aarch_tls): New function.
1742 (elfcore_write_aarch_hw_break): Likewise.
1743 (elfcore_write_aarch_hw_watch): Likewise.
1744 (elfcore_write_register_note): Call the new functions to handle the
1745 corresponding pseudo sections.
1746
1747 2013-01-07 Tom Tromey <tromey@redhat.com>
1748
1749 * section.c (_bfd_std_section): Rename from std_section.
1750 (bfd_com_section_ptr, bfd_und_section_ptr, bfd_abs_section_ptr)
1751 (STD_SECTION): Update.
1752 * bfd-in2.h: Rebuild.
1753
1754 2013-01-04 Juergen Urban <JuergenUrban@gmx.de>
1755
1756 * archures.c (bfd_mach_mips5900): Define.
1757 * bfd-in2.h: Regenerate.
1758 * config.bfd: Add mips64-ps2-elf and mips-ps2-elf targets.
1759 * cpu-mips.c: Add support for MIPS r5900.
1760 * elfxx-mips.c: Add support for MIPS r5900 (extension of r4000).
1761
1762 2013-01-03 Nickolai Zeldovich <nickolai@csail.mit.edu>
1763 Nick Clifton <nickc@redhat.com>
1764
1765 * elflink.c (get_value): Prevent the use of an undefined shift
1766 operation. Add sanity checks.
1767
1768 2013-01-02 Kaushik Phatak <kaushik.phatak@kpitcummins.com>
1769
1770 * config.bfd (cr16*-*-uclinux*): New target support.
1771
1772
1773 For older changes see ChangeLog-2012
1774 \f
1775 Copyright (C) 2013 Free Software Foundation, Inc.
1776
1777 Copying and distribution of this file, with or without modification,
1778 are permitted in any medium without royalty provided the copyright
1779 notice and this notice are preserved.
1780
1781 Local Variables:
1782 mode: change-log
1783 left-margin: 8
1784 fill-column: 74
1785 version-control: never
1786 End:
This page took 0.064822 seconds and 4 git commands to generate.