Remove trailing redundant `;'
[platform/upstream/binutils.git] / bfd / ChangeLog
1 2012-11-09  H.J. Lu  <hongjiu.lu@intel.com>
2
3         * aout-tic30.c (MY_final_link_callback): Remove trailing
4         redundant `;'.
5         * coff-h8500.c (extra_case): Likewise.
6         (bfd_coff_reloc16_get_value): Likewise.
7         * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Likewise.
8         * elf.c (_bfd_elf_slurp_version_tables): Likewise.
9         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
10         * elf32-v850.c (v850_elf_perform_relocation): Likewise.
11         * opncls.c (bfd_calc_gnu_debuglink_crc32): Likewise.
12         * plugin.c (add_symbols): Likewise.
13         * reloc.c (bfd_check_overflow): Likewise.
14         * vms-lib.c (_bfd_vms_lib_archive_p): Likewise.
15
16 2012-11-08  Tom Tromey  <tromey@redhat.com>
17
18         * elf.c (elfcore_grok_note) <NT_SIGINFO>: New case; make
19         pseudosection.
20
21 2012-11-08  Alan Modra  <amodra@gmail.com>
22
23         * aclocal.m4: Regenerate.
24         * Makefile.in: Regenerate.
25         * po/SRC-POTFILES.in: Regenerate.
26
27 2012-11-07  H.J. Lu  <hongjiu.lu@intel.com>
28
29         * section.c (bfd_get_section_contents): Replace memcpy
30         with memmove.
31
32 2012-11-07  Hans-Peter Nilsson  <hp@axis.com>
33
34         PR binutils/14481
35         * aout-target.h (MY_close_and_cleanup): Make local function
36         instead of alias of MY_bfd_free_cached_info.  Also call
37         _bfd_generic_close_and_cleanup.
38
39 2012-11-06  H.J. Lu  <hongjiu.lu@intel.com>
40
41         PR binutils/14813
42         * bfdio.c (bfd_iovec): Change return type of bclose to
43         bfd_boolean.
44         (memory_bclose): Change return type to bfd_boolean.
45         * cache.c (cache_bclose): Likewise.
46         * opncls.c (opncls_bclose): Likewise.  Return TRUE on success.
47         * vms-lib.c (vms_lib_bclose): Likewise.  Return TRUE.
48         * libbfd.h: Regenerated.
49
50 2012-11-06  Tristan Gingold  <gingold@adacore.com>
51
52         * coff-x86_64.c (_bfd_generic_find_nearest_line_discriminator):
53         Define as coff_find_nearest_line_discriminator.
54
55 2012-11-06  Alan Modra  <amodra@gmail.com>
56
57         PR binutils/14567
58         * opncls.c (opncls_iovec): Forward declare.
59         (_bfd_new_bfd_contained_in): If using opncls_iovec, copy iostream
60         to new bfd.
61
62 2012-11-06  Alan Modra  <amodra@gmail.com>
63
64         * mach-o.c (bfd_mach_o_close_and_cleanup): Don't call
65         _bfd_generic_close_and_cleanup for mach_o_fat archives.
66
67 2012-11-06  Alan Modra  <amodra@gmail.com>
68
69         * coff-tic4x.c (tic4x_coff0_vec, tic4x_coff0_beh_vec,
70         tic4x_coff1_vec, tic4x_coff1_beh_vec, tic4x_coff2_vec,
71         tic4x_coff2_beh_vec): Allow SEC_CODE and SEC_READONLY in
72         section flags.
73         * coff-ppc.c (TARGET_LITTLE_SYM): Likewise.
74         (TARGET_BIG_SYM): Likewise.
75
76 2012-11-06  Alan Modra  <amodra@gmail.com>
77
78         * elf64-ppc.c (struct ppc_link_hash_table): Add dot_toc_dot.
79         (ppc64_elf_size_stubs): Lookup ".TOC.".
80         (ppc64_elf_relocate_section): Resolve special symbol ".TOC.".
81
82 2012-11-06  Alan Modra  <amodra@gmail.com>
83
84         * elf64-ppc.c (maybe_strip_output): Heed SEC_KEEP.
85
86 2012-11-05  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
87
88         PR target/14788
89         * elf32-s390.c (elf_s390_relocate_section): Set elf.dynobj for
90         local ifunc symbols.
91         * elf64-s390.c (elf_s390_relocate_section): Likewise.
92
93 2012-11-05  Alan Modra  <amodra@gmail.com>
94
95         * configure.in: Apply 2012-09-10 change to config.in here.
96
97 2012-11-05  Alan Modra  <amodra@gmail.com>
98
99         * elf64-ppc.c (ppc64_elf_edit_toc): Clear "repeat" inside
100         loop.  Really mark toc entry referring to another toc entry
101         only if the first is used.
102
103 2012-10-30  H.J. Lu  <hongjiu.lu@intel.com>
104
105         * configure.in: Also handle --enable-64-bit-bfd when setting
106         CORE_HEADER for 'i[3-7]86-*-linux-*'.
107
108 2012-10-30  Steve McIntyre  <steve.mcintyre@linaro.org>
109
110         * elf32-arm.c (elf32_arm_print_private_bfd_data): Recognise and
111         display the new ARM hard-float/soft-float ABI flags for EABI_VER5
112         (elf32_arm_post_process_headers): Add the hard-float/soft-float
113         ABI flag as appropriate for ET_DYN/ET_EXEC in EABI_VER5.
114
115 2012-10-30  Yao Qi  <yao@codesourcery.com>
116             H.J. Lu  <hongjiu.lu@intel.com>
117
118         * configure.in: Set CORE_HEADER to hosts/x86-64linux.h for
119         'i[3-7]86-*-linux-*' if x86_64-*linux is enabled.
120         * configure: Regenerated.
121
122         * elf64-x86-64.c (elf_x86_64_write_core_note): Replace type
123         'prpsinfo_t' and 'prstatus_t' with 'prpsinfo64_t' and
124         'prstatus64_t' respectively.
125
126         * hosts/x86-64linux.h (a8_uint64_t): New.
127         (user_regsx32_struct): Renamed to ...
128         (user_regs64_struct): This.  Replace uint64_t with a8_uint64_t.
129         (elf_gregx32_t): Renamed to ...
130         (elf_greg64_t): This.  Replace uint64_t with a8_uint64_t.
131         (ELF_NGREGX32): Removed.
132         (ELF_NGREG64): New.
133         (elf_gregx32_t): Removed.
134         (elf_greg64_t): New.
135         (struct prstatus64_timeval): New.
136         (elf_prstatusx32): Replace elf_gregsetx32_t with elf_gregset64_t.
137         (elf_prstatus64): New.
138         (elf_prpsinfo64): New.
139         (prstatus64_t, prpsinfo64_t): New typedef.
140
141 2012-10-29  Sean Keys <skeys@ipdatasys.com>
142
143         * elf32-xgate.c(elf_xgate_howto_table): Fix src and dest mask for
144         R_XGATE_16
145
146 2012-10-29  Alan Modra  <amodra@gmail.com>
147
148         * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask in
149         R_PPC_VLE_LO16A, R_PPC_VLE_HI16A, R_PPC_VLE_HA16A,
150         R_PPC_VLE_SDAREL_LO16A, R_PPC_VLE_SDAREL_HI16A,
151         R_PPC_VLE_SDAREL_HA16A reloc howtos.
152
153 2012-10-26  Nick Clifton  <nickc@redhat.com>
154
155         * po/uk.po: Updated Ukranian translation.
156
157 2012-10-26  Alan Modra  <amodra@gmail.com>
158
159         PR target/14758
160         * elf32-ppc.c (ppc_elf_reloc_type_lookup): Decode ppc64 _DS
161         bfd_reloc values.  Map to corresponding D-form relocs.
162         (is_insn_ds_form, is_insn_qs_form): New functions.
163         (ppc_elf_relocate_section): Validate insn with DS-form or DQ-form
164         fields using D-form reloc.
165
166 2012-10-25  H.J. Lu  <hongjiu.lu@intel.com>
167
168         * elf32-i386.c (elf_i386_size_dynamic_sections): Replace
169         _GLOBAL_OFFSET_TABLE_ lookup with htab->elf.hgot.
170         * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
171
172 2012-10-24  H.J. Lu  <hongjiu.lu@intel.com>
173
174         * compress.c (bfd_is_section_compressed): Don't decompress the
175         section.
176
177 2012-10-23  Nathan Sidwell  <nathan@codesourcery.com>
178
179         * bfd-in.h (bfd_elf_stack_segment_size): Declare.
180         * bfd-in2.h: Rebuilt.
181         * elfxx-target.h (elf_backend_stack_align): New.
182         (elfNN_bed): Add it.
183         * elf-bfd.h (struct elf_backend_data): Add stack_align field.
184         * elf.c (bfd_elf_map_sections_to_segments): Pay attention to
185         stack_align and stacksize for PT_GNU_STACK segment.
186         (assign_file_positions_for_non_load_sections): Set p_memsz for
187         PT_GNU_STACK segment.
188         (copy_elf_program_header): Copy PT_GNU_STACK size.
189         * elflink.c (bfd_elf_stack_segment_size): New function, taken from
190         uclinux backends.
191         (bfd_elf_size_dynamic_sections): Determine
192         PT_GNU_STACK requirements after calling backend.  Pay attention to
193         stacksize.
194         * elf32-bfin.c (elf32_bfinfdpic_always_size_sections): Call
195         bfd_elf_stack_segment_size.
196         (elf32_bfinfdpic_modify_program_headers): Delete.
197         (elf32_bfingfdpic_copy_private_bfd_data): Don't copy PT_GNU_STACK
198         here.
199         (elf_backend_stack_align): Override.
200         (elf_backend_modify_program_headers): Don't override.
201         * elf32-frv.c (frvfdpic_always_size_sections): Call
202         bfd_elf_stack_segment_size.
203         (elf32_frvfdpic_modify_program_headers): Delete.
204         (elf32_frvfdpic_copy_private_bfd_data): Don't copy PT_GNU_STACK
205         here.
206         (elf_backend_stack_align): Override.
207         (elf_backend_modify_program_headers): Don't override.
208         * elf32-lm32.c (lm32_elf_always_size_sections): Leave
209         PT_GNU_STACK creation to underlying elf support.  Check
210         __stacksize here for backwards compatibility, and set it if
211         needed.
212         (lm32_elf_modify_segment_map): Delete.
213         (lm32_elf_modify_program_headers): Delete.
214         (elf_backend_stack_align): Override.
215         (elf_backend_modify_segment_map): Don't override.
216         (elf_backend_modify_program_headers): Don't override.
217         * elf32-sh.c (sh_elf_always_size_sections): Call
218         bfd_elf_stack_segment_size.
219         (sh_elf_modify_program_headers): Delete.
220         (sh_elf_copy_private_data): Don't copy PT_GNU_STACK
221         here.
222         (elf_backend_stack_align): Override.
223         (elf_backend_modify_program_headers): Don't override.
224         * elf32-tic6x.c (elf32_tic6x_always_size_sections): Call
225         bfd_elf_stack_segment_size.
226         (elf32_tic6x_modify_program_headers): Delete.
227         (elf32_tic6x_copy_private_data): Delete.
228         (elf_backend_stack_align): Override.
229         (bfd_elf32_bfd_copy_private_bfd_data): Don't override.
230         (elf_backend_modify_program_headers): Don't override.
231
232 2012-10-22  Alan Modra  <amodra@gmail.com>
233
234         * cache.c (cache_bmmap): Don't use void* arithmetic.
235
236 2012-10-21  Alan Modra  <amodra@gmail.com>
237
238         * compress.c (bfd_cache_section_contents): New function.
239         * bfd-in2.h: Regenerate.
240
241 2012-10-21  Hans-Peter Nilsson  <hp@bitrange.com>
242
243         * linker.c (_bfd_generic_link_output_symbols): Handle a
244         no-longer-global symbol entered through a plugin.
245
246 2012-10-20  Alan Modra  <amodra@gmail.com>
247
248         * compress.c: Reinstate 2012-10-19 change.
249         (bfd_get_full_section_contents): Don't free unless we alloc.
250         Use proper decompress size.  Delete some vars, rename others.
251
252 2012-10-19  Tom Tromey  <tromey@redhat.com>
253
254         * compress.c: Revert previous patch.
255
256 2012-10-19  Tom Tromey  <tromey@redhat.com>
257
258         * compress.c (bfd_get_full_section_contents): Don't cache
259         decompressed contents.
260
261 2012-10-18  Kai Tietz  <ktietz@redhat.com>
262
263         PR binutils/14067
264         * coff-i386.c (bfd_target): Add section flag SEC_EXCLUDE.
265         Allow BFD_COMPRESS and BFD_DECOMPRESS flags.
266         * coff-x86_64.c: Likewise.
267         * coffcode.h (DOT_ZDEBUG): New define.
268         (sec_to_styp_flags): Check for .zdebug.
269         (styp_to_sec_flags): Likewise.
270         * coffgen.c (make_a_section): Handle .debug_* section
271         compression/decompression flags.
272         * cofflink.c (mark_relocs): Ignore relocations
273         for a section, which isn't marked as used.
274         (_bfd_coff_link_input_bfd): Add support of compressed
275         debug sections.
276         * compress.c (decompress_contents): Loop as long
277         as there is input available and there is room for
278         output.
279         * bfd/pe-arm.c: Add .zdebug_ partial match entry.
280         * pe-i386.c: Likewise.
281         * pe-x86_64.c: Likewise.
282         * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't clear all
283         data-directories as this might destroy content.
284
285         * coff-i386.c (_bfd_generic_find_nearest_line_discriminator):
286         define as coff_find_nearest_line_discriminator.
287         * libcoff-in.h (coff_find_nearest_line_discriminator): New
288         * libcoff.h: Regenerated.
289         * coff-x86_64.c: Likewise.
290         * coffgen.c (coff_find_nearest_line_discriminator): New function.
291         prototype.
292
293 2012-10-16  Joel Brobecker  <brobecker@adacore.com>
294
295         * coff64-rs6000.c (rs6000coff64_vec): Set _close_and_cleanup
296         field to _bfd_archive_close_and_cleanup.
297         (aix5coff64_vec): Likewise.
298
299 2012-10-16  Joel Brobecker  <brobecker@adacore.com>
300
301         * coff-rs6000.c (rs6000coff_vec): Set _close_and_cleanup
302         field to _bfd_archive_close_and_cleanup.
303         (pmac_xcoff_vec): Likewise.
304
305 2012-10-16  Sofiane Naci  <sofiane.naci@arm.com>
306
307         * elf64-aarch64.c (elf64_aarch64_tls_howto_table): Fix shift value for
308         R_AARCH64_TLSIE_LD_GOTTPREL_PREL19, R_AARCH64_TLSLE_MOVW_TPREL_G2,
309         R_AARCH64_TLSLE_MOVW_TPREL_G1, R_AARCH64_TLSLE_MOVW_TPREL_G1_NC,
310         R_AARCH64_TLSLE_ADD_TPREL_HI12.
311         (elf64_aarch64_tlsdesc_howto_table): Fix shift value for
312         R_AARCH64_TLSDESC_LD64_PREL19 and R_AARCH64_TLSDESC_OFF_G1.
313         (elf64_aarch64_final_link_relocate): Add signed_addend when resolving
314         AARCH64_TLSLE_*_TPREL_* relocations.
315
316 2012-10-16  Alan Modra  <amodra@gmail.com>
317
318         * elf32-xtensa.c (free_section_cache): Renamed from
319         clear_section_cache.  Don't zero cache.
320         (section_cache_section): Remove ineffectual zero of cache.
321         Call init_section_cache instead.
322
323 2012-10-15  Doug Evans  <dje@google.com>
324
325         * elf.c (special_sections_d): Add comment.
326
327 2012-10-13  H.J. Lu  <hongjiu.lu@intel.com>
328
329         * Makefile.am (LIBDL): Replace -ldl with @lt_cv_dlopen_libs@.
330         * configure.in (lt_cv_dlopen_libs): AC_SUBST.
331         * Makefile.in: Regenerated.
332         * configure: Likewise.
333
334 2012-10-08  Alan Modra  <amodra@gmail.com>
335
336         PR binutils/14662
337         * elf.c (_bfd_elf_make_section_from_shdr): Treat .gdb_index as
338         SEC_DEBUGGING.
339
340 2012-09-20  Walter Lee  <walt@tilera.com>
341
342         * elf32-tilepro.c (tilepro_elf_relocate_section): Adjust got
343         relocations with value of hgot.
344         * elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto.
345
346 2012-09-19  Steve Ellcey  <sellcey@mips.com>
347
348         * config.bfd: Add mips*-mti-elf* target.
349
350 2012-09-18  H.J. Lu  <hongjiu.lu@intel.com>
351
352         PR ld/14591
353         * elf-bfd.h (_bfd_elf_merge_symbol): Add an argument to return
354         if the old symbol is weak.
355
356         * elf32-sh-symbian.c (sh_symbian_relocate_section): Update
357         _bfd_elf_merge_symbol call.
358
359         * elflink.c (_bfd_elf_merge_symbol): Add an argument to return
360         if the old symbol is weak.
361         (_bfd_elf_add_default_symbol): Update _bfd_elf_merge_symbol
362         call.
363         (elf_link_add_object_symbols): Don't update symbol type from a
364         weak definition.  Update symbol type from a common symbol when
365         overriding a weak symbol.
366
367 2012-09-17  H.J. Lu  <hongjiu.lu@intel.com>
368
369         * elf32-i386.c (elf_i386_convert_mov_to_lea): Ignore discarded
370         section.
371         * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
372
373 2012-09-17  H.J. Lu  <hongjiu.lu@intel.com>
374
375         * elf32-i386.c (elf_i386_finish_dynamic_symbol): Replace return
376         FALSE with abort.
377         * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
378
379 2012-09-17  Walter Lee  <walt@tilera.com>
380
381         * elf32-tilepro.c (tilepro_elf_relocate_section): Remove unused
382         got_base variable.
383         * elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto.
384
385 2012-09-17  Walter Lee  <walt@tilera.com>
386
387         * elf32-tilepro.c (tilepro_elf_relocate_section): Fix computation
388         of got relocations for when .got.plt section is merged with .got.
389         * elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto.
390
391 2012-09-14  David Edelsohn  <dje.gcc@gmail.com>
392
393         * configure: Regenerate.
394
395 2012-09-13  Anthony Green  <green@moxielogic.com>
396
397         * targets.c (bfd_elf32_bigmoxie_vec, bfd_elf32_littlemoxie_vec):
398         Define.
399         (bfd_elf32_moxie_vec): Remove.
400         * config.bfd, configure.in: Add bi-endian support for moxie.
401         * configure: Rebuilt.
402         * elf32-moxie.c (TARGET_LITTLE_NAME, TARGET_LITTLE_SYM): Define.
403         (TARGET_BIG_NAME, TARGET_BIG_SYM): Update for bi-endian support.
404
405 2012-09-12  Doug Kwan  <dougkwan@google.com>
406
407         * elf64-ppc.c (ppc64_elf_relocate_section): Use pre-adjusted
408         relocation for stub lookup.
409
410 2012-09-12  Chris Schlumberger-Socha  <chris.schlumberger-socha@arm.com>
411
412         * bfd-in2.h: Regenerated.
413         * elf64-aarch64.c
414         (elf64_aarch64_howto_table): Add R_AARCH64_GOT_LD_PREL19 reloc to HOWTO.
415         (elf64_aarch64_reloc_map): Add reloc entry.
416         (aarch64_resolve_relocation): Likewise.
417         (bfd_elf_aarch64_put_addend): Likewise.
418         (aarch64_reloc_got_type): Likewise.
419         (elf64_aarch64_final_link_relocate): Likewise.
420         (lf64_aarch64_check_relocs): Likewise.
421         (elf64_aarch64_check_relocs): New case for R_AARCH64_ADR_PREL_LO21
422         reloc.
423         * libbfd.h: Regenerated.
424         * reloc.c (R_AARCH64_GOT_LD_PREL19): New reloc.
425
426 2012-09-10  Matthias Klose  <doko@ubuntu.com>
427
428         * config.in: Disable sanity check for kfreebsd.
429
430 2012-09-10  H.J. Lu  <hongjiu.lu@intel.com>
431
432         * configure: Regenerated.
433
434 2012-09-04  Sergey A. Guriev <sergey.a.guriev@intel.com>
435
436         * cpu-ia64-opc.c (ins_cnt6a): New function.
437         (ext_cnt6a): Ditto.
438         (ins_strd5b): Ditto.
439         (ext_strd5b): Ditto.
440         (elf64_ia64_operands): Add new operand types.
441
442 2012-09-04  H.J. Lu  <hongjiu.lu@intel.com>
443
444         PR binutils/14493
445         * elf.c (ignore_section_sym): Also ignore section symbols without
446         a BFD section.
447
448 2012-09-03  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
449
450         * elf32-s390.c (elf_s390_relocate_section): Handle PLTOFF for
451         local and global ifunc symbols.
452         * elf64-s390.c (elf_s390_relocate_section): Likewise.
453
454 2012-09-02  H.J. Lu  <hongjiu.lu@intel.com>
455
456         * elf-bfd.h (elf_link_hash_table): Add hdynamic for the
457         _DYNAMIC symbol.
458
459         * elflink.c (_bfd_elf_link_create_dynamic_sections): Set
460         hdynamic.
461
462         * elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_symbol): Check
463         hdynamic instead of "_DYNAMIC".
464         * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Likewise.
465         * elf32-cr16.c (elf32_arm_finish_dynamic_symbol): Likewise.
466         * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
467         * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
468         * elf32-i386.c (elf_i386_convert_mov_to_lea): Likewise.
469         * elf32-lm32.c (lm32_elf_finish_dynamic_symbol): Likewise.
470         * elf32-m32r.c (m32r_elf_finish_dynamic_symbol): Likewise.
471         * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
472         * elf32-sh.c (sh_elf_finish_dynamic_symbol): Likewise.
473         * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
474         * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
475         * elf32-vax.c (elf_vax_finish_dynamic_symbol): Likewise.
476         * elf32-xtensa.c (elf_xtensa_finish_dynamic_symbol): Likewise.
477         * elf64-aarch64.c elf64_aarch64_finish_dynamic_symbol(): Likewise.
478         * elf64-alpha.c (elf64_alpha_finish_dynamic_symbol): Likewise.
479         * elf64-ia64-vms.c (elf64_ia64_finish_dynamic_symbol): Likewise.
480         * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
481         * elf64-sh64.c (sh64_elf64_finish_dynamic_symbol): Likewise.
482         * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
483         * elfnn-ia64.c (elfNN_ia64_finish_dynamic_symbol): Likewise.
484         * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
485         * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
486         * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
487
488         * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Check
489         hdynamic, hgot, hplt instead of _DYNAMIC, _GLOBAL_OFFSET_TABLE_,
490         _PROCEDURE_LINKAGE_TABLE_.
491         * elf32-score.c (s3_bfd_score_elf_finish_dynamic_symbol): Likewise.
492         * elf32-score7.c (s7_bfd_score_elf_finish_dynamic_symbol): Likewise.
493
494 2012-08-31  H.J. Lu  <hongjiu.lu@intel.com>
495
496         * elf32-i386.c (elf_i386_convert_mov_to_lea): Don't optimize
497         _DYNAMIC.
498         * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
499
500 2012-08-31  H.J. Lu  <hongjiu.lu@intel.com>
501
502         * elf32-i386.c (elf_i386_convert_mov_to_lea): New.
503         (elf_i386_size_dynamic_sections): Use it on input sections.
504         (elf_i386_relocate_section): Don't convert
505         "mov foo@GOT(%reg), %reg" to "lea foo@GOTOFF(%reg), %reg"
506         for local symbols here.
507
508         * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): New.
509         (elf_x86_64_size_dynamic_sections): Use it on input sections.
510         (elf_x86_64_relocate_section): Don't convert
511         "mov foo@GOTPCREL(%rip), %reg" to "lea foo(%rip), %reg"
512         for local symbols here.
513
514 2012-08-30  H.J. Lu  <hongjiu.lu@intel.com>
515
516         * elf32-i386.c (elf_i386_relocate_section): Convert
517         "mov foo@GOT(%reg), %reg" to "lea foo@GOTOFF(%reg), %reg"
518         for local symbols.
519
520         * elf64-x86-64.c (elf_x86_64_relocate_section): Convert
521         "mov foo@GOTPCREL(%rip), %reg" to "lea foo(%rip), %reg"
522         for local symbols.
523
524 2012-08-31  Alan Modra  <amodra@gmail.com>
525
526         PR ld/14464
527         * elf64-ppc.c (ppc64_elf_relocate_section): Map symbols defined
528         by a linker script in .opd to corresponding input .opd section.
529
530 2012-08-28  Maciej W. Rozycki  <macro@codesourcery.com>
531
532         * elf32-ppc.c (ppc_elf_relocate_section): Assert that dynindx is
533         not minus one.
534         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
535
536 2012-08-28  Maciej W. Rozycki  <macro@codesourcery.com>
537
538         * elflink.c (_bfd_elf_merge_symbol): Also override the version
539         a dynamic symbol defaulted to if preempted with a hidden or
540         internal definition.
541
542 2012-08-28  Walter Lee  <walt@tilera.com>
543
544         * elf32-tilepro.c (allocate_dynrelocs): Use PLT_ENTRY_SIZE as size
545         of header.
546         (tilepro_plt_entry_build): Account for new header size.
547         (tilepro_elf_finish_dynamic_sections): Ditto.
548         (tilepro_elf_plt_sym_val): Ditto.
549         * elfxx-tilegx.c (allocate_dynrelocs): Use PLT_ENTRY_SIZE as size
550         of header + tail.
551         (tilegx_elf_finish_dynamic_sections): Account for new padding.
552
553 2012-08-27  Walter Lee  <walt@tilera.com>
554
555         * reloc.c (Add BFD_RELOC_TILEGX_IMM16_X0_HW0_PLT_PCREL,
556         BFD_RELOC_TILEGX_IMM16_X1_HW0_PLT_PCREL,
557         BFD_RELOC_TILEGX_IMM16_X0_HW1_PLT_PCREL,
558         BFD_RELOC_TILEGX_IMM16_X1_HW1_PLT_PCREL,
559         BFD_RELOC_TILEGX_IMM16_X0_HW2_PLT_PCREL,
560         BFD_RELOC_TILEGX_IMM16_X1_HW2_PLT_PCREL,
561         BFD_RELOC_TILEGX_IMM16_X0_HW3_PLT_PCREL,
562         BFD_RELOC_TILEGX_IMM16_X1_HW3_PLT_PCREL,
563         BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL,
564         BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL,
565         BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL,
566         BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL,
567         BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL,
568         BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL): new relocations.
569         * elfxx-tilegx.c (tilegx_elf_howto_table): Handle new relocations.
570         (tilegx_reloc_map): Ditto.
571         (reloc_to_create_func): Ditto.
572         (tilegx_elf_check_relocs): Ditto.
573         (tilegx_elf_gc_sweep_hook): Ditto.
574         (tilegx_elf_relocate_section): Ditto.
575         * libbfd.h: Regenerate.
576         * bfd-in2.h: Regenerate.
577
578 2012-08-24  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
579
580         * elf32-arm.c (v8): New array.
581         (tag_cpu_arch_combine): Add support for ARMv8 attributes.
582         (elf32_arm_merge_eabi_attributes): Likewise.
583         (VFP_VERSION_COUNT): New define.
584
585 2012-08-20  Tom Tromey  <tromey@redhat.com>
586
587         * vms-lib.c (_bfd_vms_lib_get_module): Use bfd_zmalloc for
588         areltdata.
589         * opncls.c (_bfd_delete_bfd): Free arelt_data.
590         * mach-o.c (bfd_mach_o_fat_member_init): Use bfd_zmalloc for
591         areltdata.
592         * ecoff.c (_bfd_ecoff_slurp_armap): Use free for mapdata.
593         * coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Use bfd_zmalloc for
594         areltdata.
595         (xcoff_write_archive_contents_old): Likewise.
596         (xcoff_write_archive_contents_big): Likewise.
597         * archive64.c (bfd_elf64_archive_slurp_armap): Use free for
598         areltdata.
599         * archive.c (_bfd_generic_read_ar_hdr_mag): Use bfd_zmalloc and
600         free for areltdata.
601         (_bfd_get_elt_at_filepos): Likewise.  Clear n_nfd->arelt_data on
602         failure.
603         (do_slurp_bsd_armap): Use bfd_zmalloc and free for areltdata.
604         (do_slurp_coff_armap): Likewise.
605         (_bfd_slurp_extended_name_table): Likewise.
606         (bfd_slurp_bsd_armap_f2): Likewise.  Don't leak 'mapdata'.
607
608 2012-08-17  Nick Clifton  <nickc@redhat.com>
609
610         * po/vi.po: Updated Vietnamese translation.
611
612 2012-08-17  Yuri Chornoivan  <yurchor@ukr.net>
613
614         * elf-bfd.h, * elf32-ppc.c, * elf64-ia64-vms.c, * elfnn-ia64.c,
615         * elfxx-mips.c, * vms-alpha.c: Typo fixes.
616
617 2012-08-17  Alan Modra  <amodra@gmail.com>
618
619         PR binutils/14475:
620         * archive.c (bfd_ar_hdr_from_filesystem): Revert last change.
621         Instead malloc areltdata.
622
623 2012-08-16  Tom Tromey  <tromey@redhat.com>
624
625         PR binutils/14475:
626         * archive.c (bfd_ar_hdr_from_filesystem): Allocate areltdata on
627         'member' BFD.  Don't try to free 'ared'.
628
629 2012-08-14  Nick Clifton  <nickc@redhat.com>
630
631         * po/uk.po: Updated Ukranian translation.
632
633 2012-08-13  Maciej W. Rozycki  <macro@codesourcery.com>
634
635         * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Look up
636         the options section in the output rather than input BFD to
637         decide if to add a DT_MIPS_OPTIONS tag.
638
639 2012-08-13  Maciej W. Rozycki  <macro@codesourcery.com>
640
641         * config.bfd: Wrap mips*el-*-linux* and mips*-*-linux* into
642         #ifdef BFD64.
643
644 2012-08-13  Ian Bolton  <ian.bolton@arm.com>
645             Laurent Desnogues  <laurent.desnogues@arm.com>
646             Jim MacArthur  <jim.macarthur@arm.com>
647             Marcus Shawcroft  <marcus.shawcroft@arm.com>
648             Nigel Stephens  <nigel.stephens@arm.com>
649             Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
650             Richard Earnshaw  <rearnsha@arm.com>
651             Sofiane Naci  <sofiane.naci@arm.com>
652             Tejas Belagod  <tejas.belagod@arm.com>
653             Yufeng Zhang  <yufeng.zhang@arm.com>
654
655         * Makefile.am: Add AArch64 files.
656         * Makefile.in: Regenerate.
657         * archures.c (bfd_aarch64_arch): New declaration.
658         (bfd_archures_list): Use bfd_archures_list.
659         * bfd-in.h (bfd_elf64_aarch64_init_maps): New declaration.
660         (bfd_aarch64_process_before_allocation): New declaration.
661         (bfd_elf64_aarch64_process_before_allocation): New declaration.
662         (bfd_elf64_aarch64_set_options): New declaration.
663         (bfd_elf64_aarch64_add_glue_sections_to_bfd): New declaration.
664         (BFD_AARCH64_SPECIAL_SYM_TYPE_MAP): New definition.
665         (BFD_AARCH64_SPECIAL_SYM_TYPE_TAG): New definition.
666         (BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER): New definition.
667         (BFD_AARCH64_SPECIAL_SYM_TYPE_ANY): New definition.
668         (bfd_is_aarch64_special_symbol_name): New declaration.
669         (bfd_aarch64_merge_machines): New declaration.
670         (bfd_aarch64_update_notes): New declaration.
671         (int bfd_aarch64_get_mach_from_notes): New declaration.
672         (elf64_aarch64_setup_section_lists): New declaration.
673         (elf64_aarch64_next_input_section): New declaration.
674         (elf64_aarch64_size_stubs): New declaration.
675         (elf64_aarch64_build_stubs): New declaration.
676         * config.bfd: Add AArch64.
677         * configure.in: Add AArch64.
678         * configure: Regenerate.
679         * cpu-aarch64.c: New file.
680         * elf-bfd.h: Add AArch64.
681         * bfd-in2.h: Regenerate.
682         * libbfd.h: Regenerate.
683         * elf64-aarch64.c: New file.
684         * reloc.c: Add AArch64 relocations.
685         * targets.c: Add AArch64.
686         * po/SRC-POTFILES.in: Regenerate.
687
688 2012-08-13  Maciej W. Rozycki  <macro@codesourcery.com>
689
690         * elfxx-mips.c (mips_elf_calculate_relocation): Fix the handling
691         of protected symbols.
692
693 2012-08-10  Alan Modra  <amodra@gmail.com>
694
695         PR binutils/14444
696         * elf.c (IS_VALID_GROUP_SECTION_HEADER) Add minsize param.
697         (setup_group): Adjust uses.
698         (bfd_section_from_shdr): Allow SHT_GROUP sections with just a flag
699         word.
700
701 2012-08-09  Nick Clifton  <nickc@redhat.com>
702
703         * po/vi.po: Updated Vietnamese translation.
704
705 2012-08-09  Maciej W. Rozycki  <macro@codesourcery.com>
706
707         * elfxx-mips.c (LA25_LUI_MICROMIPS_1, LA25_LUI_MICROMIPS_2):
708         Remove macros, folding them into...
709         (LA25_LUI_MICROMIPS): ... this new macro.
710         (LA25_J_MICROMIPS_1, LA25_J_MICROMIPS_2): Likewise into...
711         (LA25_J_MICROMIPS): ... this new macro.
712         (LA25_ADDIU_MICROMIPS_1, LA25_ADDIU_MICROMIPS_2): Likewise
713         into...
714         (LA25_ADDIU_MICROMIPS): ... this new macro.
715         (bfd_put_micromips_32, bfd_get_micromips_32): New functions.
716         (mips_elf_create_la25_stub): Use them.
717         (check_br32_dslot, check_br32, check_relocated_bzc): Likewise.
718         (_bfd_mips_elf_relax_section): Likewise.
719
720 2012-08-09  Alan Modra  <amodra@gmail.com>
721             Tom Tromey  <tromey@redhat.com>
722
723         * archive.c (SECTION Archives): Update documentation.
724         (_bfd_delete_archive_data): Remove.
725         (_bfd_add_bfd_to_archive_cache): Set 'parent_cache' and 'key'.
726         (archive_close_worker, _bfd_archive_close_and_cleanup): New
727         functions.
728         * libbfd-in.h (struct areltdata <parent_cache, key>): New fields.
729         (_bfd_delete_archive_data): Don't declare.
730         (_bfd_archive_close_and_cleanup): Declare.
731         (_bfd_generic_close_and_cleanup): Redefine.
732         * libbfd.h: Rebuild.
733         * opncls.c (_bfd_delete_bfd): Don't call _bfd_delete_archive_data.
734         (bfd_close): Don't close nested thin archives here.
735
736 2012-08-07  Tom Tromey  <tromey@redhat.com>
737
738         * archive.c (_bfd_delete_archive_data): New function.
739         * libbfd-in.h (_bfd_delete_archive_data): Declare.
740         * libbfd.h: Rebuild.
741         * opncls.c (_bfd_delete_bfd): Call _bfd_delete_archive_data.
742
743 2012-08-07  Nick Clifton  <nickc@redhat.com>
744
745         * po/uk.po: Updated Ukranian translation.
746
747 2012-08-06  Maciej W. Rozycki  <macro@codesourcery.com>
748
749         * elflink.c (bfd_elf_record_link_assignment): Remove --defsym
750         symbols special case.
751
752 2012-08-05  Maciej W. Rozycki  <macro@linux-mips.org>
753
754         * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Don't allocate
755         PLT slots for local symbols.
756
757 2012-08-03  Maciej W. Rozycki  <macro@codesourcery.com>
758
759         * elf64-mips.c (mips16_elf64_howto_table_rela): Correct src_mask
760         field initializers throughout.
761         * elfn32-mips.c (elf_mips16_howto_table_rela): Likewise.
762
763 2012-08-03  Maciej W. Rozycki  <macro@codesourcery.com>
764
765         * elfxx-mips.c (mips_elf_perform_relocation): Update the
766         cross-mode jump message.
767
768 2012-08-03  Maciej W. Rozycki  <macro@codesourcery.com>
769
770         * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Update the
771         comment on DT_MIPS_RLD_MAP.
772
773 2012-08-03  Tom Tromey  <tromey@redhat.com>
774
775         * opncls.c (_bfd_delete_bfd): Now static.
776         * libbfd-in.h (_bfd_delete_bfd): Don't declare.
777         * libbfd.h: Rebuild.
778
779 2012-08-02  Sean Keys  <skeys@ipdatasys.com>
780
781         * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Modified
782         conditional statment to allow suppression of mismatched bank
783         warning.
784
785 2012-08-01  Alan Modra  <amodra@gmail.com>
786
787         * dwarf2.c (struct dwarf2_debug): Add close_on_cleanup.
788         (_bfd_dwarf2_slurp_debug_info): Set close_on_cleanup if we open
789         gnu_debuglink bfd.
790         (_bfd_dwarf2_cleanup_debug_info): Act on close_on_cleanup.
791
792 2012-07-30  Nick Clifton  <nickc@redhat.com>
793
794         * po/bfd.pot: Updated template.
795         * po/es.po: Updated Spanish translation.
796         * po/fi.po: Updated Finnish translation.
797         * po/fr.po: Updated French translation.
798         * po/ru.po: Updated Russian translation.
799         * po/uk.po: Updated Ukranian translation.
800
801 2012-07-27  Mike Frysinger  <vapier@gentoo.org>
802
803         * configure.in (AC_INIT): Call with the args bfd and 2.22.52.
804         (AM_INIT_AUTOMAKE): Remove args.
805         * configure: Regenerate.
806
807 2012-07-27  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
808
809         * cpu-s390.c (bfd_s390_64_arch, bfd_s390_arch): Pick the default
810         arch depending on the target size.
811
812 2012-07-27  Tristan Gingold  <gingold@adacore.com>
813
814         * configure.in: Bump version to 2.23.51
815         * configure: Regenerate.
816
817 2012-07-26  Teresa Johnson  <tejohnson@google.com>
818
819         * bfd/dwarf2.c (find_line): Initialize discriminator_ptr
820         if it is non-NULL.
821
822 2012-07-26  Meador Inge  <meadori@codesourcery.com>
823             Nick Clifton  <nickc@redhat.com>
824
825         PR ld/14397
826         * elf32-arm.c (elf32_arm_finish_dynamic_sections): Report an error
827         if a required section is missing from the linker script.
828
829 2012-07-24  Jan Waclawek <konfera@efton.sk>
830         PR 13899
831         * elf32-avr.c (elf32_avr_relax_delete_bytes): Call
832         _bfd_elf_link_read_relocs with keep_memory as TRUE.
833
834 2012-07-24  Teresa Johnson  <tejohnson@google.com>
835
836         * bfd.c (bfd_find_nearest_line_discriminator): New macro.
837         * coff-rs6000.c: Init _bfd_find_nearest_line_discriminator.
838         * coff64-rs6000.c: Likewise.
839         * dwarf2.c (struct line_info): Add discriminator field.
840         (add_line_info): Fill in new discriminator field.
841         (decode_line_info): Record discriminator information instead
842         of ignoring it.
843         (lookup_address_in_line_info_table): Return discriminator field if
844         requested.
845         (comp_unit_find_nearest_line): Add discriminator argument.
846         (find_line): Likewise.
847         (_bfd_dwarf2_find_nearest_line): Likewise.
848         (_bfd_dwarf2_find_line): Likewise.
849         * elf-bfd.h (_bfd_elf_find_nearest_line_discriminator): New.
850         (_bfd_elf_find_line_discriminator): Likewise.
851         (_bfd_generic_find_nearest_line_discriminator): Likewise. Defined.
852         * elf.c (_bfd_elf_find_nearest_line): Change to a wrapper
853         that invokes _bfd_elf_find_nearest_line_discriminator with correct
854         arguments.
855         (_bfd_elf_find_nearest_line_discriminator): New.
856         (_bfd_elf_find_line): Change to a wrapper
857         that invokes _bfd_elf_find_line_discriminator with correct
858         arguments.
859         (_bfd_elf_find_line_discriminator): New.
860         * coffgen.c (coff_find_nearest_line_with_names): Handle
861         new discriminator argument.
862         * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
863         * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
864         * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
865         * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
866         * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Add discriminator
867         argument.
868         (_bfd_dwarf2_find_line): Likewise.
869         (_bfd_generic_find_nearest_line_discriminator): New.
870         * libbfd.c (_bfd_generic_find_nearest_line_discriminator): New.
871         * bfd-in2.h: Regenerated.
872         * libbfd.h: Likewise.
873         * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize
874         _bfd_find_nearest_line_discriminator with
875         _bfd_generic_find_nearest_line_discriminator.
876         (bfd_target): Add _bfd_find_nearest_line_discriminator.
877
878 2012-07-24  Sean Keys  <skeys@ipdatasys.com>
879
880         * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Added code
881         that enables the linker to offset addresses, when linking against
882         symbols from the XGATE processor and vice versa.
883
884 2012-07-23  Nick Clifton  <nickc@redhat.com>
885
886         * cisco-core.c (cisco_core_file_failing_command): Make static.
887         (cisco_core_file_failing_signal): Make static.
888
889 2012-07-18  H.J. Lu  <hongjiu.lu@intel.com>
890
891         * bfd-in2.h: Regenerated.
892
893 2012-07-18  Nicolàs Alejandro Di Risio <sheeva@tiscali.it>
894
895         PR binutils/14335
896         * section.c: Fix a typo in comments.
897
898 2012-07-13  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
899
900         * elf64-s390.c: Include elf-s390-common.c.
901         (R_390_IRELATIVE): New reloc.
902         (elf_s390_reloc_type_lookup): Support R_390_IRELATIVE.
903         (RELA_ENTRY_SIZE): New macro.
904         (elf_s390_link_hash_entry): New fields ifunc_resolver_address and
905         *ifunc_resolver_section.
906         (struct plt_entry): New struct.
907         (struct elf_s390_obj_tdata): New field local_plt.
908         (elf_s390_local_plt): New macro.
909         (struct elf_s390_link_hash_table): New field irelifunc.
910         (ELF64): New macro.
911         (link_hash_newfunc): Initialize new fields.
912         (elf_s390_check_relocs): Handle IFUNC symbols.
913         (elf_s390_adjust_dynamic_symbol): Don't do anything for IFUNC
914         symbols.
915         (allocate_dynrelocs): Call s390_elf_allocate_ifunc_dyn_relocs for
916         IFUNC symbols.
917         (elf_s390_size_dynamic_sections): Handle IFUNC symbols.
918         (elf_s390_relocate_section): Likewise.
919         (elf_s390_finish_dynamic_symbol): Likewise.
920         (elf_s390_finish_dynamic_sections): Handle local IFUNC symbols.
921         (elf_s390_finish_ifunc_symbol): New function.
922         (elf_s390_gc_sweep_hook): Handle local plt entries.
923         (elf_backend_add_symbol_hook): Define.
924         * elf32-s390.c: See elf64-s390.c changes.
925         * elf-s390-common.c: New file.
926         * bfd-in2.h (BFD_RELOC_390_IRELATIVE): New enum field.
927         * libbfd.h (BFD_RELOC_390_IRELATIVE): New entry for
928         BFD_RELOC_390_IRELATIVE.
929         * reloc.c (BFD_RELOC_390_IRELATIVE): Document new relocation.
930
931 2012-07-13  Nick Clifton  <nickc@redhat.com>
932
933         * aix386-core.c: Remove use of PTR and PARAMS macros.
934         * archive.c: Likewise.
935         * cache.c: Likewise.
936         * cisco-core.c: Likewise.
937         * coff-alpha.c: Likewise.
938         * coff-apollo.c: Likewise.
939         * coff-aux.c: Likewise.
940         * coff-h8300.c: Likewise.
941         * coff-h8500.c: Likewise.
942         * coff-i386.c: Likewise.
943         * coff-i960.c: Likewise.
944         * coff-ia64.c: Likewise.
945         * coff-m68k.c: Likewise.
946         * coff-m88k.c: Likewise.
947         * coff-mcore.c: Likewise.
948         * coff-mips.c: Likewise.
949         * coff-or32.c: Likewise.
950         * coff-ppc.c: Likewise.
951         * coff-rs6000.c: Likewise.
952         * coff-sh.c: Likewise.
953         * coff-sparc.c: Likewise.
954         * coff-stgo32.c: Likewise.
955         * coff-tic30.c: Likewise.
956         * coff-tic4x.c: Likewise.
957         * coff-tic54x.c: Likewise.
958         * coff-tic80.c: Likewise.
959         * coff-w65.c: Likewise.
960         * cofflink.c: Likewise.
961         * cpu-arc.c: Likewise.
962         * cpu-cris.c: Likewise.
963         * cpu-h8500.c: Likewise.
964         * cpu-i960.c: Likewise.
965         * cpu-msp430.c: Likewise.
966         * cpu-ns32k.c: Likewise.
967         * cpu-powerpc.c: Likewise.
968         * cpu-rs6000.c: Likewise.
969         * cpu-tic4x.c: Likewise.
970         * cpu-w65.c: Likewise.
971         * ecoff.c: Likewise.
972         * ecofflink.c: Likewise.
973         * elf-m10200.c: Likewise.
974         * elf32-bfin.c: Likewise.
975         * elf32-cris.c: Likewise.
976         * elf32-crx.c: Likewise.
977         * elf32-fr30.c: Likewise.
978         * elf32-frv.c: Likewise.
979         * elf32-h8300.c: Likewise.
980         * elf32-i960.c: Likewise.
981         * elf32-m32c.c: Likewise.
982         * elf32-m68hc11.c: Likewise.
983         * elf32-m68hc12.c: Likewise.
984         * elf32-m68hc1x.c: Likewise.
985         * elf32-m68k.c: Likewise.
986         * elf32-mcore.c: Likewise.
987         * elf32-rl78.c: Likewise.
988         * elf32-rx.c: Likewise.
989         * elf32-s390.c: Likewise.
990         * elf32-vax.c: Likewise.
991         * elf64-alpha.c: Likewise.
992         * elf64-mmix.c: Likewise.
993         * elf64-s390.c: Likewise.
994         * elf64-sparc.c: Likewise.
995         * elfnn-ia64.c: Likewise.
996         * elfxx-mips.c: Likewise.
997         * elfxx-sparc.c: Likewise.
998         * hash.c: Likewise.
999         * hp300hpux.c: Likewise.
1000         * hppabsd-core.c: Likewise.
1001         * hpux-core.c: Likewise.
1002         * i386dynix.c: Likewise.
1003         * i386linux.c: Likewise.
1004         * i386lynx.c: Likewise.
1005         * i386mach3.c: Likewise.
1006         * i386msdos.c: Likewise.
1007         * i386os9k.c: Likewise.
1008         * irix-core.c: Likewise.
1009         * lynx-core.c: Likewise.
1010         * m68klinux.c: Likewise.
1011         * mach-o.h: Likewise.
1012         * mipsbsd.c: Likewise.
1013         * netbsd-core.c: Likewise.
1014         * nlm32-i386.c: Likewise.
1015         * osf-core.c: Likewise.
1016         * pc532-mach.c: Likewise.
1017         * pef.c: Likewise.
1018         * ppcboot.c: Likewise.
1019         * ptrace-core.c: Likewise.
1020         * reloc16.c: Likewise.
1021         * sco5-core.c: Likewise.
1022         * som.h: Likewise.
1023         * sparclinux.c: Likewise.
1024         * sparclynx.c: Likewise.
1025         * ticoff.h: Likewise.
1026         * trad-core.c: Likewise.
1027         * vms-lib.c: Likewise.
1028         * xsym.h: Likewise.
1029
1030 2012-07-09  Alan Modra  <amodra@gmail.com>
1031
1032         PR ld/14323
1033         * elflink.c (elf_sort_symbol): Sort by size too.
1034         (elf_link_add_object_symbols <weakdefs>): Simplify binary search.
1035         Do not depend on ordering of symbol aliases.  Match largest size.
1036
1037 2012-07-03  H.J. Lu  <hongjiu.lu@intel.com>
1038
1039         * elf.c (assign_section_numbers): Check if number of sections
1040         >= SHN_LORESERVE.
1041         * elfcode.h (elf_object_p): Likewise.
1042
1043 2012-07-03  Nick Clifton  <nickc@redhat.com>
1044
1045         * archive.c (bsd_write_armap): Catch attempts to create an archive
1046         with indicies bigger than 4Gb.
1047         (coff_write_armap): Likewise.
1048
1049 2012-07-03  H.J. Lu  <hongjiu.lu@intel.com>
1050
1051         PR binutils/14319
1052         * elf.c (_bfd_elf_make_section_from_shdr): Don't compress empty
1053         debug section.
1054
1055 2012-07-03  H.J. Lu  <hongjiu.lu@intel.com>
1056
1057         PR ld/3351
1058         * elflink.c (_bfd_elf_update_dynamic_flags): New.
1059         (_bfd_elf_merge_symbol): Update both real and indirect symbol
1060         dynamic flags.
1061         (_bfd_elf_add_default_symbol): Make the real symbol dynamic if
1062         the indirect symbol is defined in a shared library.
1063         (elf_link_add_object_symbols): Likewise.  If the indirect
1064         symbol has been forced local, don't make the real symbol
1065         dynamic.
1066         (elf_link_check_versioned_symbol): Check indirect symbol.
1067         (elf_link_output_extsym): Use real symbol definition when
1068         reporting indirect symbol error.  Check version info for
1069         dynamic versioned symbol.
1070
1071 2012-07-03  Alan Modra  <amodra@gmail.com>
1072
1073         PR ld/14207
1074         * elf.c (assign_file_positions_for_load_sections): Remove assertions
1075         that only PT_LOAD headers include file header and section headers.
1076         (assign_file_positions_for_non_load_sections): Similarly don't
1077         assert PT_GNU_RELRO header does not include file and section headers.
1078         Compare first section vma rather than PT_LOAD p_vaddr against
1079         relro_start when looking for PT_LOAD covering PT_GNU_RELRO.  Replace
1080         abort with assertion.
1081
1082 2012-07-02  Alan Modra  <amodra@gmail.com>
1083
1084         * elf32-m32c.c (m32c_elf_check_relocs): Use bfd_make_section
1085         "anyway" variant when creating .plt.
1086         (m32c_elf_relax_plt_section): Remove redundant test and unused param.
1087         (m32c_elf_relax_section): Test SEC_LINKER_CREATED before calling
1088         m32c_elf_relax_plt_section.
1089         * elfxx-mips.c (mips_elf_create_got_section): Use make anyway variant
1090         when creating .got and .got.plt.
1091         (_bfd_mips_elf_final_link): Likewise for .rtproc, and use
1092         bfd_get_linker_section.
1093         * sunos.c: Similarly throughout.
1094
1095 2012-07-01  Andreas Schwab  <schwab@linux-m68k.org>
1096
1097         * elf.c (_bfd_elf_make_section_from_shdr): Fix typo in error
1098         message.
1099
1100 2012-06-29  H.J. Lu  <hongjiu.lu@intel.com>
1101
1102         * elf64-x86-64.c (elf_x86_64_relocate_section): Return FALSE
1103         on unresolvable relocation.
1104
1105 2012-06-29  H.J. Lu  <hongjiu.lu@intel.com>
1106
1107         * archive.c (_bfd_compute_and_write_armap): Simplify global
1108         symbol handling.
1109
1110 2012-06-29  Nick Clifton  <nickc@redhat.com>
1111
1112         PR ld/14189
1113         * elf32-arm.c (elf32_arm_check_relocs): Do not increment refcount
1114         for locally bound symbols.
1115
1116 2012-06-29  Alan Modra  <amodra@gmail.com>
1117
1118         * section.c (bfd_get_linker_section): New function.
1119         * elf32-arm.c: When retrieving SEC_LINKER_CREATED sections, use
1120         the above throughout rather than bfd_get_section_by_name.  Use
1121         bfd_make_section_anyway rather than bfd_make_section when creating
1122         them.
1123         * elf32-bfin.c: Likewise.
1124         * elf32-cr16.c: Likewise.
1125         * elf32-cris.c: Likewise.
1126         * elf32-frv.c: Likewise.
1127         * elf32-hppa.c: Likewise.
1128         * elf32-i370.c: Likewise.
1129         * elf32-i386.c: Likewise.
1130         * elf32-lm32.c: Likewise.
1131         * elf32-m32c.c: Likewise.
1132         * elf32-m32r.c: Likewise.
1133         * elf32-m68k.c: Likewise.
1134         * elf32-microblaze.c: Likewise.
1135         * elf32-ppc.c: Likewise.
1136         * elf32-rl78.c: Likewise.
1137         * elf32-s390.c: Likewise.
1138         * elf32-score.c: Likewise.
1139         * elf32-score7.c: Likewise.
1140         * elf32-sh.c: Likewise.
1141         * elf32-tic6x.c: Likewise.
1142         * elf32-tilepro.c: Likewise.
1143         * elf32-vax.c: Likewise.
1144         * elf32-xstormy16.c: Likewise.
1145         * elf32-xtensa.c: Likewise.
1146         * elf64-alpha.c: Likewise.
1147         * elf64-hppa.c: Likewise.
1148         * elf64-ia64-vms.c: Likewise.
1149         * elf64-ppc.c: Likewise.
1150         * elf64-s390.c: Likewise.
1151         * elf64-sh64.c: Likewise.
1152         * elf64-sparc.c: Likewise.
1153         * elf64-x86-64.c: Likewise.
1154         * elfnn-ia64.c: Likewise.
1155         * elfxx-mips.c: Likewise.
1156         * elfxx-sparc.c: Likewise.
1157         * elfxx-tilegx.c: Likewise.
1158         * elflink.c: Likewise.
1159         * elf-vxworks.c: Likewise.
1160         * elf-m10300.c: Likewise.  Also make use of htab plt, got and
1161         gotplt shortcuts.
1162         * bfd-in2.h: Regenerate.
1163         * elf32-lm32.c (lm32_elf_check_relocs): Use the correct bfd when
1164         calling create_rofixup_section.
1165         * elflink.c (bfd_elf_final_link): Simplify test for .dynstr.
1166
1167 2012-06-29  Alan Modra  <amodra@gmail.com>
1168
1169         * elf32-sh.c (sh_elf_create_dynamic_sections): Don't create .rela
1170         section for bss type sections, except for .rela.bss.
1171         * elf-m10300.c (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
1172         * elf32-cr16.c (_bfd_cr16_elf_create_dynamic_sections): Likewise.
1173         * elf32-lm32.c (lm32_elf_create_dynamic_sections): Likewise.
1174         * elf32-m32r.c (m32r_elf_create_dynamic_sections): Likewise.
1175         * elf64-sh64.c (sh64_elf64_create_dynamic_sections): Likewise.
1176
1177 2012-06-28  Roland McGrath  <mcgrathr@google.com>
1178
1179         * elf32-arm.c (elf32_arm_populate_plt_entry): Use int32_t for
1180         displacement calculation in nacl_p case.
1181
1182 2012-06-28  Nick Clifton  <nickc@redhat.com>
1183
1184         * po/uk.po: New Ukranian translation.
1185         * configure.in (ALL_LINGUAS): Add uk.
1186         * configure: Regenerate.
1187
1188 2012-06-26  Alan Modra  <amodra@gmail.com>
1189
1190         * elf64-ppc.c (ppc64_elf_next_toc_section): Don't error if input
1191         file has multiple .got/.toc sections and all don't fit in
1192         current toc group.
1193
1194 2012-06-22  Roland McGrath  <mcgrathr@google.com>
1195
1196         * elf.c (assign_file_positions_for_non_load_sections): Define
1197         __ehdr_start symbol if it's referenced and there's a PT_LOAD
1198         segment that covers both the file and program headers.
1199
1200 2012-06-22  Andreas Schwab  <schwab@linux-m68k.org>
1201
1202         * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Don't make
1203         _GLOBAL_OFFSET_TABLE_ and _DYNAMIC absolute.
1204
1205 2012-06-22  Alan Modra  <amodra@gmail.com>
1206
1207         * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't emit out-of-line
1208         save/restore functions when relocatable.  Make "funcs" static.
1209
1210 2012-06-18  Hans-Peter Nilsson  <hp@axis.com>
1211
1212         * elf32-cris.c (cris_elf_plt_sym_val): Rewrite to work in presence
1213         of merged .got and .got.plt entries.
1214
1215 2012-06-18  John Szakmeister  <john@szakmeister.net>
1216
1217         * elf32-arm.c (elf32_arm_final_link_relocate): Correct return value.
1218
1219 2012-06-17  Hans-Peter Nilsson  <hp@axis.com>
1220
1221         * elf32-cris.c (cris_elf_relocate_section): <R_CRIS_32_IE>
1222         <R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL>: Handle references to
1223         thread common symbols.
1224
1225 2012-06-13  Nick Clifton  <nickc@redhat.com>
1226
1227         * elf32-arm.c (bfd_arm_get_mach_from_attributes): New function.
1228         (elf32_arm_object_p): If the machine number could not be deduced
1229         from the notes, call bfd_arm_get_mach_from_attributes to get the
1230         number from the attributes.
1231
1232 2012-06-12  H.J. Lu  <hongjiu.lu@intel.com>
1233
1234         PR bfd/14207
1235         * elf.c (assign_file_positions_for_non_load_sections): Abort if
1236         PT_GNU_RELRO segment doesn't fit in PT_LOAD segment.
1237
1238 2012-06-12  Alan Modra  <amodra@gmail.com>
1239
1240         PR ld/14207
1241         * elf.c (_bfd_elf_map_sections_to_segments): Disregard bss type
1242         sections at end of PT_LOAD segment when searching for segment
1243         that contains end of relro extent.
1244
1245 2012-06-11  H.J. Lu  <hongjiu.lu@intel.com>
1246
1247         * elf.c (assign_file_positions_for_non_load_sections): Reindent.
1248
1249 2012-06-11  H.J. Lu  <hongjiu.lu@intel.com>
1250
1251         * elf.c (_bfd_elf_map_sections_to_segments): Reindent.
1252
1253 2012-06-06  Alan Modra  <amodra@gmail.com>
1254
1255         * elflink.c (elf_link_input_bfd): Provide a file symbol for
1256         each input file with local syms, if the input lacks such.
1257         (bfd_elf_final_link): Add a file symbol to mark end of locals
1258         for which we can associate with input files.
1259         (struct elf_final_link_info): Add filesym_count field.
1260         (struct elf_outext_info): Add need_second_pass and second_pass.
1261         (elf_link_output_extsym): Detect symbols defined in the output
1262         file, emit them on second pass over locals.
1263
1264 2012-06-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
1265
1266         * bfd-in.h (bfd_elf_bfd_from_remote_memory): Make LEN argument
1267         of target_read_memory as bfd_size_type.
1268         * bfd-in2.h: Regenerate.
1269         * elf-bfd.h (elf_backend_bfd_from_remote_memory): Make LEN
1270         argument of target_read_memory as bfd_size_type.
1271         (_bfd_elf32_bfd_from_remote_memory): Likewise.
1272         (_bfd_elf64_bfd_from_remote_memory): Likewise.
1273         * elf.c (bfd_elf_bfd_from_remote_memory): Likewise.
1274         * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): Likewise.
1275
1276 2012-06-03  Alan Modra  <amodra@gmail.com>
1277
1278         PR binutils/13897
1279         * elf.c (elf_find_function): Cache last function sym info.
1280         (_bfd_elf_maybe_function_sym): Return function size, pass in
1281         section of interest.
1282         * elf-bfd.h (struct elf_backend_data <maybe_function_sym>): Likewise.
1283         (_bfd_elf_maybe_function_sym): Likewise.
1284         * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise.
1285         (opd_entry_value): Add in_code_sec param.  Revert caching code.
1286         Return -1 if in_code_sec and function found in wrong section.
1287         Update all calls.
1288
1289 2012-06-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
1290
1291         * bfd-in.h (bfd_elf_bfd_from_remote_memory): Make LEN argument
1292         of target_read_memory as size_t.
1293         * bfd-in2.h: Regenerate.
1294         * elf-bfd.h (elf_backend_bfd_from_remote_memory): Make LEN
1295         argument of target_read_memory as size_t.
1296         (_bfd_elf32_bfd_from_remote_memory): Likewise.
1297         (_bfd_elf64_bfd_from_remote_memory): Likewise.
1298         * elf.c (bfd_elf_bfd_from_remote_memory): Likewise.
1299         * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): Likewise.
1300
1301 2012-06-01  Alan Modra  <amodra@gmail.com>
1302
1303         PR binutils/13897
1304         * elf64-ppc.c (opd_entry_value): Rewrite cache code.
1305
1306 2012-05-29  Tom Tromey  <tromey@redhat.com>
1307
1308         * opncls.c (bfd_fopen): Always close fd on failure.
1309         (bfd_fdopenr): Likewise.
1310
1311 2012-05-27  Alan Modra  <amodra@gmail.com>
1312
1313         PR ld/14170
1314         * elflink.c (_bfd_elf_merge_symbol): When a symbol defined in
1315         a dynamic library finds a new instance with non-default
1316         visibility in a regular object, correctly handle symbols
1317         already on the undefs list and undo dynamic symbol state when
1318         the new symbol is hidden or internal.
1319
1320 2012-05-25  H.J. Lu  <hongjiu.lu@intel.com>
1321
1322         * elf32-i386.c (elf_i386_create_dynamic_sections): Don't use
1323         dynamic_sec_flags to create PLT .eh_frame section.
1324         * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
1325
1326 2012-05-25  Alan Modra  <amodra@gmail.com>
1327
1328         PR ld/13909
1329         * elf-eh-frame.c (_bfd_elf_eh_frame_present): New function.
1330         (_bfd_elf_maybe_strip_eh_frame_hdr): Use it here.
1331         * elf-bfd.h (_bfd_elf_eh_frame_present): Declare.
1332         * elflink.c (bfd_elf_size_dynamic_sections): Let the backend
1333         size dynamic sections before stripping eh_frame_hdr.
1334         (bfd_elf_gc_sections): Handle multiple .eh_frame sections.
1335         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Drop glink_eh_frame
1336         if no other .eh_frame sections exist.
1337         * elf64-ppc.c (ppc64_elf_size_stubs): Likewise.
1338         * elf32-i386.c (elf_i386_create_dynamic_sections): Don't size
1339         or alloc plt_eh_frame here..
1340         (elf_i386_size_dynamic_sections): ..do it here instead.  Don't
1341         specially keep sgotplt, iplt, tgotplt, sdynbss for symbols.
1342         (elf_i386_finish_dynamic_sections): Check plt_eh_frame->contents
1343         before writing plt offset.
1344         * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Don't size
1345         or alloc plt_eh_frame here..
1346         (elf_x86_64_size_dynamic_sections): ..do it here instead.
1347         (elf_x86_64_finish_dynamic_sections): Check plt_eh_frame->contents
1348         before writing plt offset.
1349
1350 2012-05-24  Alan Modra  <amodra@gmail.com>
1351
1352         PR ld/14158
1353         * elf64-ppc.c (ppc64_elf_size_stubs): Round up glink_eh_frame
1354         size to output section alignment.
1355         (ppc64_elf_build_stubs): Likewise, and extend last FDE to cover.
1356
1357 2012-05-23  Alan Modra  <amodra@gmail.com>
1358
1359         * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Handle
1360         BFDs with multiple .eh_frame sections.
1361
1362 2012-05-23  Alan Modra  <amodra@gmail.com>
1363
1364         PR ld/13909
1365         * elflink.c (bfd_elf_discard_info): Don't ignore dynamic BFDs.
1366
1367 2012-05-22  H.J. Lu  <hongjiu.lu@intel.com>
1368
1369         PR ld/13909
1370         * elf32-i386.c (elf_i386_create_dynamic_sections): Revert the
1371         last change.
1372         * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
1373
1374 2012-05-22  Alan Modra  <amodra@gmail.com>
1375
1376         * elflink.c (bfd_elf_discard_info): Look for next .eh_frame if
1377         first one is zero size or discarded.
1378         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set most of
1379         glink_eh_frame contents here..
1380         (ppc_elf_finish_dynamic_sections): ..rather than here.  Just set
1381         offset to .glink.
1382
1383 2012-05-22  H.J. Lu  <hongjiu.lu@intel.com>
1384
1385         PR ld/13909
1386         * elf32-i386.c (elf_i386_create_dynamic_sections): Create PLT
1387         eh_frame section if there is an input .eh_frame section.
1388         * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
1389
1390 2012-05-22  H.J. Lu  <hongjiu.lu@intel.com>
1391
1392         PR ld/14105
1393         * elf32-i386.c (elf_i386_create_dynamic_sections): Always
1394         create PLT eh_frame section with SEC_LINKER_CREATED.
1395         * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
1396
1397 2012-05-22  Alan Modra  <amodra@gmail.com>
1398
1399         * elflink.c (bfd_elf_discard_info): Handle multiple .eh_frame
1400         sections attached to a BFD.
1401         * section.c (bfd_get_section_by_name): Rewrite description.
1402         (bfd_get_next_section_by_name): New function.
1403         * bfd-in2.h: Regenerate.
1404
1405 2012-05-21  Andreas Schwab  <schwab@linux-m68k.org>
1406
1407         * elf32-m68k.c (elf_m68k_grok_prstatus): New function.
1408         (elf_m68k_grok_psinfo): New function.
1409         (elf_backend_grok_prstatus): Define.
1410         (elf_backend_grok_psinfo): Define.
1411
1412 2012-05-19  Maciej W. Rozycki  <macro@linux-mips.org>
1413
1414         * elf64-mips.c (elf_backend_got_header_size): Correct definition.
1415         * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Use the ELF
1416         backend's GOT header size instead of hardcoding it.
1417
1418 2012-05-19  Maciej W. Rozycki  <macro@linux-mips.org>
1419
1420         * elf32-vax.c (elf_vax_relocate_section)
1421         <R_VAX_8, R_VAX_16, R_VAX_32>: Don't check if info->shared again.
1422
1423 2012-05-19  Maciej W. Rozycki  <macro@linux-mips.org>
1424
1425         * elf32-vax.c (elf_vax_relocate_section)
1426         <R_VAX_8, R_VAX_16, R_VAX_32>: Use section flags rather than
1427         its name as the check for text sections.
1428
1429 2012-05-19  Maciej W. Rozycki  <macro@linux-mips.org>
1430
1431         * elf64-mips.c (mips_elf64_be_swap_reloc_out): Also make sure
1432         the third reloc offset is the same as the first.
1433
1434 2012-05-19  Alan Modra  <amodra@gmail.com>
1435
1436         * elf32-ppc.h (has_vle_insns, is_ppc_vle): Delete.
1437         (has_tls_reloc, has_tls_get_addr_call): Move back to..
1438         * elf32-ppc.c: ..here.
1439         (ppc_elf_section_flags, elf_backend_section_flags): Delete.
1440         (ppc_elf_modify_segment_map): Use ELF sh_flags to detect VLE sections.
1441
1442 2012-05-18  H.J. Lu  <hongjiu.lu@intel.com>
1443
1444         * elf32-i386.c (elf_i386_finish_dynamic_symbol): Don't make
1445         _DYNAMIC nor _GLOBAL_OFFSET_TABLE_ absolute.
1446         * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1447
1448 2012-05-18  Roland McGrath  <mcgrathr@google.com>
1449
1450         * archive.c (_bfd_generic_read_ar_hdr_mag): Fix last change so as
1451         not to clobber the ar_fmag field stored in ARED->arch_header.
1452
1453 2012-05-18  Pedro Alves  <palves@redhat.com>
1454
1455         * mach-o.h: Don't include sysdep.h.
1456
1457 2012-05-18  Nick Clifton  <nickc@redhat.com>
1458
1459         PR 14072
1460         * bfd-in.h: Check for PACKAGE or PACKAGE_VERSION before
1461         complaining about config.h not having been included.
1462         * bfd-in2.h: Regenerate.
1463
1464 2012-05-18  Andreas Schwab  <schwab@linux-m68k.org>
1465
1466         * aclocal.m4: Regenerate.
1467         * Makefile.in: Regenerate.
1468
1469 2012-05-17  Daniel Richard G.  <skunk@iskunk.org>
1470             Nick Clifton  <nickc@redhat.com>
1471
1472         PR 14072
1473         * configure.in: Add check that sysdep.h has been included before
1474         any system header files.
1475         * configure: Regenerate.
1476         * config.in: Regenerate.
1477         * aclocal.m4: Regenerate.
1478         * bfd-in.h: Generate an error if included before config.h.
1479         * sysdep.h: Likewise.
1480         * bfd-in2.h: Regenerate.
1481         * compress.c: Remove #include "config.h".
1482         * plugin.c: Likewise.
1483         * elf32-m68hc1x.c: Include sysdep.h before alloca-conf.h.
1484         * elf64-hppa.c: Likewise.
1485         * som.c: Likewise.
1486         * xsymc.c: Likewise.
1487
1488 2012-05-17  Maciej W. Rozycki  <macro@linux-mips.org>
1489             Alan Modra  <amodra@gmail.com>
1490
1491         * elf.c (ignore_section_sym): Correct comment.  Don't return
1492         true for absolute section.
1493         (elf_map_symbols): Move stray comment.  Adjust for above change.
1494         Don't discard global section symbols.
1495
1496 2012-05-17  Alan Modra  <amodra@gmail.com>
1497
1498         * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make _DYNAMIC,
1499         _GLOBAL_OFFSET_TABLE_ or _PROCEDURE_LINKAGE_TABLE_ absolute.
1500         * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Don't make _DYNAMIC
1501         absolute.
1502
1503 2012-05-17  Alan Modra  <amodra@gmail.com>
1504
1505         * elf32-ppc.c (has_tls_reloc, has_tls_get_addr_call, has_vle_insns,
1506         is_ppc_vle): Move to..
1507         * elf32-ppc.h: ..here, making is_ppc_vle a macro.
1508
1509 2012-05-16  Sergio Durigan Junior  <sergiodj@redhat.com>
1510
1511         * bfd-in.h (bfd_get_section_name, bfd_get_section_vma,
1512         bfd_get_section_lma, bfd_get_section_alignment,
1513         bfd_get_section_flags, bfd_get_section_userdata): Rewrite macros
1514         in order to use the `bfd' argument.
1515         * bfd-in2.h: Regenerate.
1516         * elf-vxworks.c (elf_vxworks_finish_dynamic_entry): Pass proper `bfd'
1517         as the first argument for `bfd_get_section_alignment'.
1518         * elf32-arm.c (create_ifunc_sections): Likewise, for
1519         `bfd_set_section_alignment'.
1520         * elf32-m32r.c (m32r_elf_relocate_section): Likewise, for
1521         `bfd_get_section_name'.
1522         * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise.
1523         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
1524         (ppc_elf_relocate_section): Likewise.
1525         * elf64-mmix.c (mmix_final_link_relocate): Likewise, for
1526         `bfd_get_section_vma'.
1527         * elf64-ppc.c (create_linkage_sections): Likewise, for
1528         `bfd_set_section_alignment'.
1529
1530 2012-05-16  Georg-Johann Lay  <avr@gjlay.de>
1531
1532         PR target/13503
1533         * reloc.c: Rename BFD_RELOC_AVR_8_HHI to BFD_RELOC_AVR_8_HLO.
1534         * bfd-in2.h: Regenerate.
1535         * libbfd.h: Regenerate.
1536         * elf32-avr.c (elf_avr_howto_table): Rename R_AVR_8_HHI8 to
1537         R_AVR_8_HLO8.
1538         (avr_reloc_map): Likewise.
1539
1540 2012-05-16  Daniel Richard G.  <skunk@iskunk.org>
1541
1542         PR binutils/13558
1543         * bfd/aout-cris.c: Include sysdep.h before bfd.h.
1544         * bfd/aout-ns32k.c: Likewise.
1545         * bfd/aout-sparcle.c: Likewise.
1546         * bfd/aout0.c: Likewise.
1547         * bfd/bfd-in2.h: Likewise.
1548         * bfd/coff-stgo32.c: Likewise.
1549         * bfd/cpu-lm32.c: Likewise.
1550         * bfd/cpu-microblaze.c: Likewise.
1551         * bfd/cpu-score.c: Likewise.
1552         * bfd/cpu-tilegx.c: Likewise.
1553         * bfd/cpu-tilepro.c: Likewise.
1554         * bfd/elf32-lm32.c: Likewise.
1555         * bfd/elf32-microblaze.c: Likewise.
1556         * bfd/elf32-score7.c: Likewise.
1557         * bfd/elf32-tilepro.c: Likewise.
1558         * bfd/elfxx-tilegx.c: Likewise.
1559         * bfd/mach-o.h: Likewise.
1560         * bfd/nlm32-ppc.c: Likewise.
1561         * bfd/ns32knetbsd.c: Likewise.
1562         * bfd/pef.h: Likewise.
1563         * bfd/plugin.c: Likewise.
1564         * bfd/stab-syms.c: Likewise.
1565         * bfd/sunos.c: Likewise.
1566         * bfd/syms.c: Likewise.
1567         * bfd/xsym.h: Likewise.
1568
1569 2012-05-16  Alan Modra  <amodra@gmail.com>
1570
1571         * elflink.c: Rename flaginfo to flinfo throughout, except..
1572         (bfd_elf_lookup_section_flags): ..here, rename finfo to flaginfo.
1573         Formatting, style.  Simplify flag match.
1574
1575 2012-05-16  Alan Modra  <amodra@gmail.com>
1576
1577         * dwarf2.c: Formatting.
1578         (arange_add): Pass in unit rather than bfd.  Update callers.
1579         Ignore empty ranges.  Don't ask for cleared memory.
1580         (parse_comp_unit): Only set unit->base_address if processing
1581         DW_TAG_compile_unit.
1582         (find_debug_info): Optimise section lookup.
1583         (place_sections): Use bfd_alloc for stash->adjusted_sections.
1584         (find_line): Match previously parsed comp unit addresses as we
1585         do for newly parsed comp units.
1586
1587 2012-05-16  Alan Modra  <amodra@gmail.com>
1588
1589         * archive.c (_bfd_generic_read_ar_hdr_mag):  Ensure sscanf
1590         stops at end of ar_size field.
1591
1592 2012-05-16  Alan Modra  <amodra@gmail.com>
1593
1594         PR ld/13962
1595         PR ld/7023
1596         * elf.c (bfd_section_from_shdr): Fail when .dynsym sh_info is
1597         out of range.  As a special case, fix sh_info for zero sh_size.
1598         Do the same for .symtab.
1599
1600 2012-05-15  James Murray <jsm@jsm-net.demon.co.uk>
1601             Stephane Carrez <stcarrez@nerim.fr>
1602
1603         * archures.c: Add bfd_arch_m9s12x and bfd_arch_m9s12xg.
1604         * config.bfd: Likewise.
1605         * cpu-m9s12x.c: New.
1606         * cpu-m9s12xg.c: New.
1607         * elf32-m68hc12.c: Add S12X and XGATE co-processor support.
1608         Add option to offset S12 addresses into XGATE memory space.
1609         Fix carry bug in IMM16 (IMM8 low/high) relocate.
1610         * Makefile.am (ALL_MACHINES): Add cpu-m9s12x and cpu-m9s12xg.
1611         (ALL_MACHINES_CFILES): Likewise.
1612         * reloc.c: Add S12X relocs.
1613         * Makefile.in: Regenerate.
1614         * bfd-in2.h: Regenerate.
1615         * libbfd.h: Regenerate.
1616
1617 2012-05-14  James Lemke  <jwlemke@codesourcery.com>
1618             Catherine Moore  <clm@codesourcery.com>
1619
1620         * bfd.c (bfd_lookup_section_flags): Add section parm.
1621         * ecoff.c (bfd_debug_section): Remove flag_info initializer.
1622         * elf-bfd.h (bfd_elf_section_data): Move in section_flag_info.
1623         (bfd_elf_lookup_section_flags): Add section parm.
1624         * elf32-ppc.c (is_ppc_vle): New function.
1625         (ppc_elf_modify_segment_map): New function.
1626         (elf_backend_modify_segment_map): Define.
1627         (has_vle_insns): New define.
1628         * elf32-ppc.h (ppc_elf_modify_segment_map): Declare.
1629         * elflink.c (bfd_elf_lookup_section_flags): Add return value & parm.
1630         Move in logic to omit / include a section.
1631         * libbfd-in.h (bfd_link_info): Add section parm.
1632         (bfd_generic_lookup_section_flags): Likewise.
1633         * reloc.c (bfd_generic_lookup_section_flags): Likewise.
1634         * section.c (bfd_section): Move out section_flag_info.
1635         (BFD_FAKE_SECTION): Remove flag_info initializer.
1636         * targets.c (_bfd_lookup_section_flags): Add section parm.
1637
1638 2012-05-14  Catherine Moore  <clm@codesourcery.com>
1639
1640         * archures.c (bfd_mach_ppc_vle): New.
1641         * bfd-in2.h: Regenerated.
1642         * cpu-powerpc.c (bfd_powerpc_archs): New entry for vle.
1643         * elf32-ppc.c (split16_format_type): New enumeration.
1644         (ppc_elf_vle_split16): New function.
1645         (HOWTO): Add entries for R_PPC_VLE relocations.
1646         (ppc_elf_reloc_type_lookup): Handle PPC_VLE relocations.
1647         (ppc_elf_section_flags): New function.
1648         (ppc_elf_lookup_section_flags): New function.
1649         (ppc_elf_section_processing): New function.
1650         (ppc_elf_check_relocs): Handle PPC_VLE relocations.
1651         (ppc_elf_relocation_section): Likewise.
1652         (elf_backend_lookup_section_flags_hook): Define.
1653         (elf_backend_section_flags): Define.
1654         (elf_backend_section_processing): Define.
1655         * elf32-ppc.h (ppc_elf_section_processing): Declare.
1656         * libbfd.h: Regenerated.
1657         * reloc.c (BFD_RELOC_PPC_VLE_REL8, BFD_RELOC_PPC_VLE_REL15,
1658         BFD_RELOC_PPC_VLE_REL24, BFD_RELOC_PPC_VLE_LO16A,
1659         BFD_RELOC_PPC_VLE_LO16D, BFD_RELOC_PPC_VLE_HI16A,
1660         BFD_RELOC_PPC_VLE_HI16D, BFD_RELOC_PPC_VLE_HA16A,
1661         BFD_RELOC_PPC_VLE_HA16D, BFD_RELOC_PPC_VLE_SDA21,
1662         BFD_RELOC_PPC_VLE_SDA21_LO, BFD_RELOC_PPC_VLE_SDAREL_LO16A,
1663         BFD_RELOC_PPC_VLE_SDAREL_LO16D, BFD_RELOC_PPC_VLE_SDAREL_HI16A,
1664         BFD_RELOC_PPC_VLE_SDAREL_HI16D, BFD_RELOC_PPC_VLE_SDAREL_HA16A,
1665         BFD_RELOC_PPC_VLE_SDAREL_HA16D): New bfd relocations.
1666
1667 2012-05-11  Georg-Johann Lay  <avr@gjlay.de>
1668
1669         PR target/13503
1670         * reloc.c: Add new ENUM for BFD_RELOC_AVR_8_LO,
1671         BFD_RELOC_AVR_8_HI, BFD_RELOC_AVR_8_HHI.
1672         * bfd-in2.h: Regenerate.
1673         * libbfd.h: Regenerate.
1674         * elf32-avr.c (elf_avr_howto_table): Add entries for
1675         R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8.
1676         (avr_reloc_map): Add RELOC mappings for R_AVR_8_LO8, R_AVR_8_HI8,
1677         R_AVR_8_HHI8.
1678
1679 2012-05-10  H.J. Lu  <hongjiu.lu@intel.com>
1680
1681         * elf64-x86-64.c (elf_x86_64_relocate_section): Use int in x32
1682         addend overflow check.
1683
1684 2012-05-10  DJ Delorie  <dj@redhat.com>
1685
1686         * elf32-rx.c (rx_elf_object_p): Ignore empty segments.
1687
1688 2012-05-10  H.J. Lu  <hongjiu.lu@intel.com>
1689
1690         * elf64-x86-64.c (elf_x86_64_relocate_section): Display signed
1691         hex number in x32 addend overflow check.
1692
1693 2012-05-10  H.J. Lu  <hongjiu.lu@intel.com>
1694
1695         * elf64-x86-64.c (elf_x86_64_reloc_type_class): Handle
1696         R_X86_64_RELATIVE64.
1697
1698 2012-05-09  H.J. Lu  <hongjiu.lu@intel.com>
1699
1700         * elf64-x86-64.c (elf_x86_64_relocate_section): Check addend
1701         overflow for R_X86_64_RELATIVE64.
1702
1703 2012-05-08  Ben Cheng  <bccheng@google.com>
1704
1705         * elf.c: Preserve the original p_align and p_flags if they are
1706         valid.
1707
1708 2012-05-07  Alan Modra  <amodra@gmail.com>
1709
1710         * elf64-ia64-vms.c (elf64_ia64_relocate_section): Update
1711         RELOC_AGAINST_DISCARDED_SECTION invocation.
1712
1713 2012-05-07  Hans-Peter Nilsson  <hp@axis.com>
1714
1715         * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Declare and use
1716         local variable i_ instead of assuming and using a variable i.
1717
1718 2012-05-07  Maciej W. Rozycki  <macro@linux-mips.org>
1719
1720         * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Handle compound
1721         relocations.
1722         * elfxx-mips.c (mips_reloc_against_discarded_section): New
1723         function.
1724         (_bfd_mips_elf_relocate_section): Call it, in place of
1725         RELOC_AGAINST_DISCARDED_SECTION.
1726         * elf-m10200.c (mn10200_elf_relocate_section): Update arguments
1727         to RELOC_AGAINST_DISCARDED_SECTION.
1728         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1729         * elf32-arm.c (elf32_arm_relocate_section): Likewise.
1730         * elf32-avr.c (elf32_avr_relocate_section): Likewise.
1731         * elf32-bfin.c (bfin_relocate_section): Likewise.
1732         (bfinfdpic_relocate_section): Likewise.
1733         * elf32-cr16.c (elf32_cr16_relocate_section): Likewise.
1734         * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
1735         * elf32-cris.c (cris_elf_relocate_section): Likewise.
1736         * elf32-crx.c (elf32_crx_relocate_section): Likewise.
1737         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
1738         * elf32-epiphany.c (epiphany_elf_relocate_section): Likewise.
1739         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
1740         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
1741         * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
1742         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1743         * elf32-i370.c (i370_elf_relocate_section): Likewise.
1744         * elf32-i386.c (elf_i386_relocate_section): Likewise.
1745         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
1746         * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1747         * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
1748         * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
1749         * elf32-m32c.c (m32c_elf_relocate_section): Likewise.
1750         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1751         * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
1752         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1753         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1754         * elf32-mep.c (mep_elf_relocate_section): Likewise.
1755         * elf32-moxie.c (moxie_elf_relocate_section): Likewise.
1756         * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
1757         * elf32-mt.c (mt_elf_relocate_section): Likewise.
1758         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
1759         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1760         * elf32-rl78.c (rl78_elf_relocate_section): Likewise.
1761         * elf32-rx.c (rx_elf_relocate_section): Likewise.
1762         * elf32-s390.c (elf_s390_relocate_section): Likewise.
1763         * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
1764         * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1765         * elf32-sh.c (sh_elf_relocate_section): Likewise.
1766         * elf32-spu.c (spu_elf_relocate_section): Likewise.
1767         * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1768         * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1769         * elf32-v850.c (v850_elf_relocate_section): Likewise.
1770         * elf32-vax.c (elf_vax_relocate_section): Likewise.
1771         * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
1772         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
1773         * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1774         * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise.
1775         (elf64_alpha_relocate_section): Likewise.
1776         * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
1777         * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
1778         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1779         * elf64-s390.c (elf_s390_relocate_section): Likewise.
1780         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1781         * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1782         * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
1783         * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1784         * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1785
1786 2012-05-05  Alan Modra  <amodra@gmail.com>
1787
1788         PR ld/14052
1789         PR ld/13621
1790         * linker.c (_bfd_nearby_section): Revert 2012-02-13 change.
1791
1792 2012-05-05  Alan Modra  <amodra@gmail.com>
1793
1794         * aout-arm.c: Replace all uses of bfd_abs_section, bfd_com_section,
1795         bfd_und_section and bfd_ind_section with their _ptr variants, or
1796         use corresponding bfd_is_* macros.
1797         * aout-ns32k.c: Likewise.
1798         * aout-tic30.c: Likewise.
1799         * coff-arm.c: Likewise.
1800         * coff-tic54x.c: Likewise.
1801         * cpu-ns32k.c: Likewise.
1802         * elf-attrs.c: Likewise.
1803         * elfcode.h: Likewise.
1804         * peicode.h: Likewise.
1805         * reloc.c: Likewise.
1806         * riscix.c: Likewise.
1807         * versados.c: Likewise.
1808         * section.c: Likewise.
1809         (bfd_abs_section, bfd_ind_section, bfd_com_section,
1810         bfd_ind_section): Delete.
1811         (std_section): New array replacing above.
1812         (bfd_abs_section_ptr, bfd_ind_section_ptr, bfd_com_section_ptr,
1813         bfd_ind_section_ptr, STD_SECTION): Update.
1814         (BFD_FAKE_SECTION, GLOBAL_SYM_INIT): Remove unnecessary casts.
1815         * bfd-in2.h: Regenerate.
1816
1817 2012-05-03  Sean Keys  <skeys@ipdatasys.com>
1818
1819         * cpu-xgate.c: New file. Added XGATE support.
1820         * archures.c (bfd_architecture): Add XGATE architecture.
1821         (bfd_archures_list): Add reference to XGATE architecture info.
1822         * elf-bfd.h (prep_headers): Handle bfd_arch_xgate.
1823         * reloc.c: Add various XGATE relocation enums.
1824         * targets.c (bfd_elf32_xgate_vec): Declare and add to target vector
1825         list.
1826         * Makefile.am: Add support for XGATE elf.
1827         * configure.in: Ditto.
1828         * config.bfd: Ditto.
1829         * Makefile.in: Regenerate.
1830         * configure: Ditto.
1831         * bfd-in2.h: Ditto.
1832         * libbfd.h: Ditto.
1833         Added files for XGATE relocations.
1834         * elf32-xgate.c: Created minimal relocation file.
1835         * elf32-xgate.h: Created minimal header file for elf32-xgate.
1836
1837 2012-05-03  Tristan Gingold  <gingold@adacore.com>
1838
1839         * dwarf2.c (decode_line_info): Ignore
1840         DW_LNE_HP_source_file_correlation.
1841
1842 2012-05-01  Nick Clifton  <nickc@redhat.com>
1843
1844         PR binutils/13121
1845         * aoutx.h: Rename 'finfo' to 'flaginfo' to avoid conflicts with
1846         AIX system headers.
1847         * coff-ppc.c: Likewise.
1848         * cofflink.c: Likewise.
1849         * elf32-arm.c: Likewise.
1850         * elf64-sparc.c: Likewise.
1851         * elflink.c: Likewise.
1852         * pdp11.c: Likewise.
1853         * rescoff.c: Likewise.
1854
1855 2012-04-26  Mark Wielaard  <mjw@redhat.com>
1856
1857         * dwarf2.c (scan_unit_for_symbols): Account for DW_AT_high_pc
1858         possibly being relative to DW_AT_low_pc.
1859         (parse_comp_unit): Likewise.
1860
1861 2012-04-26  Andreas Schwab  <schwab@linux-m68k.org>
1862
1863         * elf32-m68k.c (elf_m68k_check_relocs): Mark non-GOT references
1864         also when generating PIE.
1865         (elf_m68k_discard_copies): Mark undefined weak symbols referenced
1866         by relocations as dynamic.
1867
1868 2012-04-26  Hans-Peter Nilsson  <hp@axis.com>
1869
1870         Provide a way for programs to recognize BFD_ASSERT calls.
1871         * bfd.c (bfd_assert_handler_type): New API type.
1872         (bfd_set_assert_handler, bfd_get_assert_handler): New API functions.
1873         (_bfd_assert_handler): New variable.
1874         (_bfd_default_assert_handler): New function.
1875         (bfd_assert): Call _bfd_assert_handler, not _bfd_error_handler.
1876         * libbfd-in.h (_bfd_assert_handler): Declare.
1877         * libbfd.h, bfd-in2.h: Regenerate.
1878
1879 2012-04-24  Hans-Peter Nilsson  <hp@axis.com>
1880
1881         PR ld/13990
1882         * elf32-arm.c (elf32_arm_gc_sweep_hook): Handle a forced-local
1883         symbol, where PLT refcount is set to -1.
1884
1885 2012-04-24  Alan Modra  <amodra@gmail.com>
1886
1887         PR ld/13991
1888         * elf-bfd.h (_bfd_elf_link_just_syms): Define as
1889         _bfd_generic_link_just_syms.
1890         * elflink.c (_bfd_elf_link_just_syms): Delete.
1891         * linker.c (_bfd_generic_link_just_syms): Set sec_info_type.
1892
1893         * bfd-in.h (discarded_section): Renamed from elf_discarded_section.
1894         * section.c (SEC_INFO_TYPE_NONE, SEC_INFO_TYPE_STABS,
1895         SEC_INFO_TYPE_MERGE, SEC_INFO_TYPE_EH_FRAME,
1896         SEC_INFO_TYPE_JUST_SYMS): Renamed from corresponding ELF_INFO_TYPE.
1897         * elf-eh-frame.c, * elf-m10200.c, * elf-m10300.c,
1898         * elf.c, * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c,
1899         * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c,
1900         * elf32-crx.c, * elf32-d10v.c, * elf32-epiphany.c,
1901         * elf32-fr30.c, * elf32-frv.c, * elf32-h8300.c,
1902         * elf32-hppa.c, * elf32-i370.c, * elf32-i386.c,
1903         * elf32-i860.c, * elf32-ip2k.c, * elf32-iq2000.c,
1904         * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c,
1905         * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c,
1906         * elf32-mep.c, * elf32-moxie.c, * elf32-msp430.c,
1907         * elf32-mt.c, * elf32-openrisc.c, * elf32-ppc.c,
1908         * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c,
1909         * elf32-score.c, * elf32-score7.c, * elf32-sh.c,
1910         * elf32-spu.c, * elf32-tic6x.c, * elf32-tilepro.c,
1911         * elf32-v850.c, * elf32-vax.c, * elf32-xc16x.c,
1912         * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c,
1913         * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c,
1914         * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c,
1915         * elf64-x86-64.c, * elflink.c, * elfnn-ia64.c,
1916         * elfxx-mips.c, * elfxx-sparc.c, * elfxx-tilegx.c,
1917         * reloc.c: Update all references.
1918         * bfd-in2.h: Regenerate.
1919
1920 2012-04-20  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
1921
1922         * elf32-s390.c (ELF_DYNAMIC_INTERPRETER): Set to the GCC default.
1923         * elf64-s390.c (ELF_DYNAMIC_INTERPRETER): Set to the GCC default.
1924
1925 2012-04-19  Thomas Schwinge  <thomas@codesourcery.com>
1926
1927         * elf32-sh.c (elf_sh_link_hash_entry): Specify an enum identifier for
1928         got_type.
1929         (allocate_dynrelocs, sh_elf_relocate_section, sh_elf_check_relocs): Use
1930         it.
1931
1932 2012-04-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1933
1934         * elf32-sh.c (allocate_dynrelocs): Don't allocate dynamic
1935         relocations when LE conversion happens on the IE tls symbol.
1936
1937 2012-04-17  Roland McGrath  <mcgrathr@google.com>
1938
1939         * elf64-x86-64.c (elf_x86_64_nacl_plt0_entry): Fix nop padding
1940         so that 32-byte boundary is a proper instruction boundary.
1941
1942 2012-04-17  Tristan Gingold  <gingold@adacore.com>
1943
1944         * vms-lib.c (_bfd_vms_lib_get_module): Append .obj extension to
1945         member of an object archive.<
1946
1947 2012-04-17  Tristan Gingold  <gingold@adacore.com>
1948
1949         * vms-lib.c (MAX_EKEYLEN): Define.
1950         (MAX_KEYLEN): Fix value.
1951         (vms_write_index): Add comments and fix indentation.
1952         Adjust comparaison.  Add assertions.  Free kbn_blk.
1953         (_bfd_vms_lib_write_archive_contents): Use MAX_EKEYLEN.
1954         Compense MAX_KEYLEN adjustment.
1955
1956 2012-04-16  Maciej W. Rozycki  <macro@linux-mips.org>
1957
1958         * elfxx-mips.c (mips16_stub_symndx): Handle n64 compound relocs.
1959         (_bfd_mips_elf_check_relocs): Update accordingly.
1960
1961 2012-04-13  Alan Modra  <amodra@gmail.com>
1962
1963         PR ld/13947
1964         * elflink.c (bfd_elf_final_link): Set reloc_count to 0 for
1965         reloc sections.
1966
1967 2012-04-12  David S. Miller  <davem@davemloft.net>
1968
1969         * reloc.c (BFD_RELOC_SPARC_H34, BFD_RELOC_SPARC_SIZE32,
1970         BFD_RELOC_SPARC_SIZE64, BFD_RELOC_SPARC_WDISP10): New relocs.
1971         * libbfd.h: Regenerate.
1972         * bfd-in2.h: Likewise.
1973         * elfxx-sparc.c (sparc_elf_wdisp10_reloc): New function.
1974         (_bfd_sparc_elf_howto_table): Add entries for R_SPARC_H34,
1975         R_SPARC_SIZE32, R_SPARC_64, and R_SPARC_WDISP10.
1976         (_bfd_sparc_elf_reloc_type_lookup): Handle new relocs.
1977         (_bfd_sparc_elf_check_relocs): Likewise.
1978         (_bfd_sparc_elf_gc_sweep_hook): Likewise.
1979         (_bfd_sparc_elf_relocate_section): Likewise.
1980
1981 2012-04-12  Roland McGrath  <mcgrathr@google.com>
1982
1983         * elf32-arm.c (elf32_arm_nacl_plt0_entry, elf32_arm_nacl_plt_entry):
1984         New variables.
1985         (struct elf32_arm_link_hash_table): New member `nacl_p'.
1986         (elf32_arm_link_hash_table_create): Initialize it.
1987         (elf32_arm_nacl_link_hash_table_create): New function.
1988         (arm_movw_immediate, arm_movt_immediate): New functions.
1989         (elf32_arm_populate_plt_entry): Test HTAB->nacl_p.
1990         (elf32_arm_finish_dynamic_sections): Likewise.
1991         (elf32_arm_output_plt_map_1): Likewise.
1992         (bfd_elf32_littlearm_nacl_vec, bfd_elf32_bigarm_nacl_vec):
1993         New backend vector stanza.
1994         (elf32_arm_nacl_modify_segment_map): New function.
1995         * config.bfd: Handle arm-*-nacl*, armeb-*-nacl*.
1996         * targets.c: Support bfd_elf32_{big,little}_nacl_vec.
1997         * configure.in: Likewise.
1998         (bfd_elf32_bigarm_nacl_vec): Add elf-nacl.lo here.
1999         (bfd_elf32_littlearm_nacl_vec): Likewise.
2000         (bfd_elf32_bigarm_vec, bfd_elf32_littlearm_vec): Likewise.
2001         (bfd_elf32_bigarm_symbian_vec): Likewise.
2002         (bfd_elf32_littlearm_symbian_vec): Likewise.
2003         (bfd_elf32_bigarm_vxworks_vec): Likewise.
2004         (bfd_elf32_littlearm_vxworks_vec): Likewise.
2005         * configure: Regenerated.
2006
2007 2012-04-12  Tristan Gingold  <gingold@adacore.com>
2008
2009         * elflink.c (elf_link_output_extsym): Add a guard.
2010         (bfd_elf_final_link): Remove assertion.
2011         (bfd_elf_final_link): Add a guard.
2012         * elfnn-ia64.c (INCLUDE_IA64_VMS): Removed.
2013         (elfNN_vms_section_from_shdr, elfNN_vms_object_p)
2014         (elfNN_vms_post_process_headers, elfNN_vms_section_processing)
2015         (elfNN_vms_final_write_processing, elfNN_vms_close_and_cleanup):
2016         Remove.
2017         (elfNN-ia64-vms target): Move to ...
2018         * elf64-ia64-vms.c: New file.
2019         * configure.in (bfd_elf64_ia64_vms_vec): Add elf64-ia64-vms.lo
2020         * Makefile.am (BFD64_BACKENDS): Add elf64-ia64-vms.lo.
2021         (BFD64_BACKENDS_CFILES): Ad elf64-ia64-vms.c.
2022         * configure: Regenerate.
2023         * Makefile.in: Regenerate.
2024
2025 2012-04-11  Nick Clifton  <nickc@redhat.com>
2026
2027         PR binutils/13897
2028         * elf64-ppc.c (opd_entry_value): When dealing with sections
2029         without relocs, keep the last section loaded in order to avoid
2030         unnecessary reloads.
2031
2032 2012-04-09  Roland McGrath  <mcgrathr@google.com>
2033
2034         * elf.c (_bfd_elf_map_sections_to_segments): Set INFO->user_phdrs.
2035         * elf-nacl.c (nacl_modify_segment_map): Do nothing if INFO->user_phdrs.
2036         (nacl_modify_program_headers): Likewise.
2037
2038 2012-04-03  Roland McGrath  <mcgrathr@google.com>
2039
2040         * elf-nacl.c: New file.
2041         * elf-nacl.h: New file.
2042         * elf32-i386.c (elf_backend_modify_segment_map): Define for
2043         bfd_elf32_i386_nacl_vec.
2044         (elf_backend_modify_program_headers): Likewise.
2045         * elf64-x86-64.c (elf_backend_modify_segment_map): Define for
2046         bfd_elf64_x86_64_nacl_vec and bfd_elf32_x86_64_nacl_vec.
2047         (elf_backend_modify_program_headers): Likewise.
2048         * Makefile.am (BFD32_BACKENDS, BFD64_BACKENDS): Add elf-nacl.lo here.
2049         (BFD32_BACKENDS_CFILES, BFD64_BACKENDS_CFILES): Add elf-nacl.c here.
2050         * Makefile.in: Regenerated.
2051         * configure.in (bfd_elf64_x86_64_nacl_vec): Add elf-nacl.o to tb here.
2052         (bfd_elf32_x86_64_nacl_vec): Likewise.
2053         (bfd_elf64_x86_64_vec, bfd_elf32_x86_64_vec): Likewise.
2054         (bfd_elf64_x86_64_freebsd_vec, bfd_elf64_x86_64_sol2_vec): Likewise.
2055         (bfd_elf64_l1om_vec, bfd_elf64_l1om_freebsd_vec): Likewise.
2056         (bfd_elf64_k1om_vec, bfd_elf64_k1om_freebsd_vec): Likewise.
2057         (bfd_elf32_i386_nacl_vec): Likewise.
2058         (bfd_elf32_i386_sol2_vec, bfd_elf32_i386_freebsd_vec): Likewise.
2059         (bfd_elf32_i386_vxworks_vec, bfd_elf32_i386_vec): Likewise.
2060         * configure: Regenerated.
2061
2062 2012-03-31  Andreas Schwab  <schwab@linux-m68k.org>
2063
2064         * elf32-m68k.c (elf_m68k_relocate_section): Allow
2065         R_68K_TLS_LE{8,16,32} for PIE.
2066
2067 2012-03-30  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
2068
2069         * elf64-s390.c: Fix several comments regarding PLT entry
2070         description.
2071         * elf32-s390.c: Likewise.
2072
2073 2012-03-30  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
2074
2075         * elf64-s390.c: Use the section pointer shortcuts in
2076         elf_link_hash_table and remove them from the target specific
2077         variant.
2078         * elf32-s390.c: Likewise.
2079
2080 2012-03-30  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
2081
2082         * elf64-s390.c (elf_s390x_plt_entry, elf_s390x_first_plt_entry):
2083         New definitions.
2084         (PLT_PIC_ENTRY_WORD*, PLT_PIC12_ENTRY_WORD*): Remove.
2085         (elf_s390_finish_dynamic_symbol): Use memcpy instead of bfd_put_32.
2086         (elf_s390_finish_dynamic_sections): Likewise.
2087         * elf32-s390.c (elf_s390_plt_entry, elf_s390_plt_pic_entry)
2088         (elf_s390_plt_pic12_entry, elf_s390_plt_pic16_entry)
2089         (elf_s390_plt_first_entry, elf_s390_plt_pic_first_entry): New definitions.
2090         (PLT_PIC16_ENTRY_WORD*, PLT_ENTRY_WORD*)
2091         (PLT_PIC_FIRST_ENTRY_WORD*, PLT_FIRST_ENTRY_WORD*): Remove.
2092
2093 2012-03-30  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
2094
2095         * elf32-s390.c (struct elf_s390_dyn_relocs): Remove.
2096         Rename all occurrences in the file to elf_dyn_relocs.
2097         * elf64-s390.c: Likewise.
2098
2099 2012-03-30  Alan Modra  <amodra@gmail.com>
2100
2101         * elflink.c (_bfd_elf_gc_mark_reloc): Don't delve into dynamic
2102         libraries.
2103
2104 2012-03-29  Alan Modra  <amodra@gmail.com>
2105
2106         * bfd-in.h (bfd_get_arch_size, bfd_get_sign_extend_vma): Delete.
2107         * bfd-in2.h: Regenerate.
2108
2109 2012-03-23  Alan Modra  <amodra@gmail.com>
2110
2111         * elf.c (assign_file_positions_for_non_load_sections): Don't warn
2112         on empty alloc sections.
2113
2114 2012-03-23  Alan Modra  <amodra@gmail.com>
2115
2116         * linker.c (_bfd_nearby_section): New function, split out from..
2117         (fix_syms): ..here.
2118         * bfd-in.h (_bfd_nearby_section): Declare.
2119         * bfd-in2.h: Regenerate.
2120         * elflink.c (elf_link_input_bfd): Don't use text_index_section or
2121         data_index_section with ld -q or ld -r output relocs against
2122         stripped output sections.  Instead use _bfd_nearby_section.
2123
2124 2012-03-23  Alan Modra  <amodra@gmail.com>
2125
2126         PR binutils/13894
2127         * elf64-ppc.c (opd_entry_value): Read full symbol table when
2128         sym hashes unavailable.
2129
2130 2012-03-21  Eliot Dresselhaus  <eliot@sonic.net>
2131
2132         * elf32-tic6x.c (elf32_tic6x_merge_private_bfd_data): Return TRUE
2133         for non-C6X objects.
2134
2135 2012-03-20  Kai Tietz  <ktietz@redhat.com>
2136
2137         PR ld/12742
2138         * configure.in (AC_CHECK_HEADERS): Test for windows.h and dlfcn.h.
2139         * plugin.c: Guard include of dlfcn.h if HAVE_DLFCN_H is defined.
2140         Add windows.h header include if HAVE_WINDOWS_H is defined.
2141         (dlerror): New static function if windows variant is used instead
2142         of dlfcn.h.
2143         (dlclose): Likewise.
2144         (dlopen): Likewise.
2145         (dlsym): Likewise.
2146         * configure: Regenerated.
2147         * config.in: Regenerated.
2148
2149 2012-03-20  H.J. Lu  <hongjiu.lu@intel.com>
2150
2151         PR ld/13880
2152         * elf32-i386.c (elf_i386_relocate_section): Don't issue an error
2153         for R_386_GOTOFF relocation against protected function if
2154         SYMBOLIC_BIND is true.
2155
2156         * elf64-x86-64.c (elf_x86_64_relocate_section): Don't issue an
2157         error for R_X86_64_GOTOFF64 relocation against protected function
2158         when building executable or SYMBOLIC_BIND is true.
2159
2160 2012-03-16  Roland McGrath  <mcgrathr@google.com>
2161
2162         * config.bfd: Handle x86_64-*-nacl*.
2163         * elf64-x86-64.c (bfd_elf64_x86_64_nacl_vec): New backend vector stanza.
2164         (bfd_elf32_x86_64_nacl_vec): Likewise.
2165         * targets.c: Support them.
2166         * configure.in: Likewise.
2167         * configure: Regenerated.
2168
2169 2012-03-16  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
2170
2171         * elf32-arm.c (elf32_arm_attributes_accept_div): New function.
2172         (elf32_arm_attributes_forbid_div): Likewise.
2173         (elf32_arm_merge_eabi_attributes): Correct handling of
2174         Tag_DIV_use.
2175
2176 2012-03-15  Roland McGrath  <mcgrathr@google.com>
2177
2178         * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Use
2179         elf_x86_64_backend_data parameters for plt_eh_frame.
2180
2181         * elf64-x86-64.c (struct elf_x86_64_backend_data): New type.
2182         (get_elf_x86_64_backend_data, GET_PLT_ENTRY_SIZE): New macros.
2183         (elf_x86_64_arch_bed): New variable.
2184         (elf_backend_arch_data): New macro.
2185         (elf_x86_64_adjust_dynamic_symbol): Use GET_PLT_ENTRY_SIZE.
2186         (elf_x86_64_allocate_dynrelocs): Likewise.
2187         (elf_x86_64_relocate_section): Likewise.
2188         (elf_x86_64_plt_sym_val): Likewise.
2189         (elf_x86_64_finish_dynamic_symbol): Use elf_x86_64_backend_data
2190         parameters for PLT details.
2191         (elf_x86_64_finish_dynamic_sections): Likewise.
2192
2193 2012-03-14  Roland McGrath  <mcgrathr@google.com>
2194
2195         * elf32-i386.c (elf_i386_nacl_pic_plt0_entry): Initialize up
2196         to the full size, padding out with nop instructions.
2197
2198 2012-03-12  Alan Modra  <amodra@gmail.com>
2199
2200         * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Don't warn
2201         on zero size dynbss symbol.
2202         * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
2203         * elf32-cr16.c (_bfd_cr16_elf_adjust_dynamic_symbol): Likewise.
2204         * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
2205         * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
2206         * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
2207         * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise.
2208         * elf32-lm32.c (lm32_elf_adjust_dynamic_symbol): Likewise.
2209         * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
2210         * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
2211         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
2212         * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
2213         * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
2214         * elf32-tic6x.c (elf32_tic6x_adjust_dynamic_symbol): Likewise.
2215         * elf32-tilepro.c (tilepro_elf_adjust_dynamic_symbol): Likewise.
2216         * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
2217         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
2218         * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
2219         * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
2220         * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
2221         * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
2222         * elfxx-tilegx.c (tilegx_elf_adjust_dynamic_symbol): Likewise.
2223
2224 2012-03-10  Edmar Wienskoski  <edmar@freescale.com>
2225
2226         * archures.c: Add bfd_mach_ppc_e5500 and bfd_mach_ppc_e6500.
2227         * bfd-in2.h: Regenerate.
2228         * cpu-powerpc.c (bfd_powerpc_archs): Add entries for
2229         bfd_mach_ppc_e5500 and bfd_mach_ppc_e6500.
2230
2231 2012-03-09  H.J. Lu  <hongjiu.lu@intel.com>
2232
2233         PR ld/13817
2234         * elf32-i386.c (elf_i386_relocate_section): Restore
2235         R_386_IRELATIVE.
2236
2237         * elf64-x86-64.c (elf_x86_64_relocate_section): Restore
2238         R_X86_64_IRELATIVE.
2239
2240 2012-03-08  Tristan Gingold  <gingold@adacore.com>
2241
2242         * vms-lib.c (_bfd_vms_lib_write_archive_contents): Set maximum
2243         keylen according to archive kind.  Set nextvbn and nextrfa lhd
2244         fields.  Add comments.
2245
2246 2012-03-07  Nick Clifton  <nickc@redhat.com>
2247
2248         * elf-m10300.c (elf32_mn10300_link_hash_entry): Add tls_type
2249         field.
2250         (elf32_mn10300_link_hash_table): Add tls_ldm_got entry;
2251         (elf_mn10300_tdata): Define.
2252         (elf_mn10300_local_got_tls_type): Define.
2253         (elf_mn10300_howto_table): Add entries for R_MN10300_TLS_GD,
2254         R_MN10300_TLS_LD, R_MN10300_TLS_LDO, R_MN10300_TLS_GOTIE,
2255         R_MN10300_TLS_IE, R_MN10300_TLS_LE, R_MN10300_TLS_DPTMOD,
2256         R_MN10300_TLS_DTPOFF, R_MN10300_TLS_TPOFF relocs.
2257         (mn10300_reloc_map): Likewise.
2258         (elf_mn10300_tls_transition): New function.
2259         (dtpoff, tpoff, mn10300_do_tls_transition): New functions.
2260         (mn10300_elf_check_relocs): Add TLS support.
2261         (mn10300_elf_final_link_relocate): Likewise.
2262         (mn10300_elf_relocate_section): Likewise.
2263         (mn10300_elf_relax_section): Likewise.
2264         (elf32_mn10300_link_hash_newfunc): Initialise new field.
2265         (_bfd_mn10300_copy_indirect_symbol): New function.
2266         (elf32_mn10300_link_hash_table_create): Initialise new fields.
2267         (_bfd_mn10300_elf_size_dynamic_sections): Add TLS support.
2268         (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
2269         (_bfd_mn10300_elf_reloc_type_class): Allocate an
2270         elf_mn10300_obj_tdata structure.
2271         (elf_backend_copy_indirect_symbol): Define.
2272         * reloc.c (BFD_MN10300_TLS_GD, BFD_MN10300_TLS_LD,
2273         BFD_MN10300_TLS_LDO, BFD_MN10300_TLS_GOTIE, BFD_MN10300_TLS_IE,
2274         BFD_MN10300_TLS_LE, BFD_MN10300_TLS_DPTMOD,
2275         BFD_MN10300_TLS_DTPOFF, BFD_MN10300_TLS_TPOFF): New relocations.
2276         (BFD_RELOC_MN10300_32_PCREL, BFD_RELOC_MN10300_16_PCREL): Move to
2277         alongside other MN10300 relocations.
2278         * bfd-in2.h: Regenerate.
2279         * libbfd.h: Regenerate.
2280
2281 2012-03-06  Jakub Jelinek  <jakub@redhat.com>
2282
2283         * elf64-x86-64.c (elf_x86_64_relocate_section): For R_X86_64_RELATIVE
2284         set relocate to TRUE.
2285
2286 2012-03-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2287
2288         PR ld/12152
2289         * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Also ignore
2290         overflows for R_SPARC_UA32 in .stab sections.
2291
2292 2012-03-01  Alan Modra  <amodra@gmail.com>
2293
2294         * elfxx-tilegx.c (tilegx_elf_relocate_section): Silence bogus warning.
2295
2296 2012-02-27  Alan Modra  <amodra@gmail.com>
2297
2298         * elf32-sh.c (sh_elf_osec_to_segment): Check for elf flavour bfd
2299         before calling elf specific function.
2300         (sh_elf_osec_readonly_p): Test for error return from above.
2301
2302 2012-02-27  Alan Modra  <amodra@gmail.com>
2303
2304         * elf32-spu.c (build_stub): Fix malloc under-allocation.
2305
2306 2012-02-25  Walter Lee  <walt@tilera.com>
2307         * reloc.c: Add BFD_RELOC_TILEPRO_TLS_GD_CALL,
2308         BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD,
2309         BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD,
2310         BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD,
2311         BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD,
2312         BFD_RELOC_TILEPRO_TLS_IE_LOAD, BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE,
2313         BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE,
2314         BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO,
2315         BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO,
2316         BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI,
2317         BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI,
2318         BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA,
2319         BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA,
2320         BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_LE,
2321         BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE,
2322         BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE,
2323         BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE,
2324         BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE,
2325         BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE,
2326         BFD_RELOC_TILEGX_TLS_GD_CALL, BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD,
2327         BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD,
2328         BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD,
2329         BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD, BFD_RELOC_TILEGX_TLS_IE_LOAD,
2330         BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD,
2331         BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD,
2332         BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD.
2333         Delete BFD_RELOC_TILEGX_IMM16_X0_HW1_GOT,
2334         BFD_RELOC_TILEGX_IMM16_X1_HW1_GOT,
2335         BFD_RELOC_TILEGX_IMM16_X0_HW2_GOT,
2336         BFD_RELOC_TILEGX_IMM16_X1_HW2_GOT,
2337         BFD_RELOC_TILEGX_IMM16_X0_HW3_GOT,
2338         BFD_RELOC_TILEGX_IMM16_X1_HW3_GOT,
2339         BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_GOT,
2340         BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_GOT,
2341         BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_GD,
2342         BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_GD,
2343         BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_GD,
2344         BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_GD,
2345         BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_GD,
2346         BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_GD,
2347         BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_GD,
2348         BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_GD,
2349         BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_IE,
2350         BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_IE,
2351         BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_IE,
2352         BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_IE,
2353         BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_IE,
2354         BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_IE,
2355         BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_IE,
2356         BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_IE.
2357         * elf32-tilepro.c (tilepro_elf_howto_table): Update tilepro
2358         relocations.
2359         (tilepro_reloc_map): Ditto.
2360         (tilepro_info_to_howto_rela): Ditto.
2361         (reloc_to_create_func): Ditto.
2362         (tilepro_tls_translate_to_le): New.
2363         (tilepro_tls_translate_to_ie): New.
2364         (tilepro_elf_tls_transition): New.
2365         (tilepro_elf_check_relocs): Handle new tls relocations.
2366         (tilepro_elf_gc_sweep_hook): Ditto.
2367         (allocate_dynrelocs): Ditto.
2368         (tilepro_elf_relocate_section): Ditto.
2369         (tilepro_replace_insn): New.
2370         (insn_mask_X1): New.
2371         (insn_mask_X0_no_dest_no_srca): New
2372         (insn_mask_X1_no_dest_no_srca): New
2373         (insn_mask_Y0_no_dest_no_srca): New
2374         (insn_mask_Y1_no_dest_no_srca): New
2375         (srca_mask_X0): New
2376         (srca_mask_X1): New
2377         (insn_tls_le_move_X1): New
2378         (insn_tls_le_move_zero_X0X1): New
2379         (insn_tls_ie_lw_X1): New
2380         (insn_tls_ie_add_X0X1): New
2381         (insn_tls_ie_add_Y0Y1): New
2382         (insn_tls_gd_add_X0X1): New
2383         (insn_tls_gd_add_Y0Y1): New
2384         * elfxx-tilegx.c (tilegx_elf_howto_table): Update tilegx
2385         relocations.
2386         (tilegx_reloc_map): Ditto.
2387         (tilegx_info_to_howto_rela): Ditto.
2388         (reloc_to_create_func): Ditto.
2389         (tilegx_elf_link_hash_table): New field disable_le_transition.
2390         (tilegx_tls_translate_to_le): New.
2391         (tilegx_tls_translate_to_ie): New.
2392         (tilegx_elf_tls_transition): New.
2393         (tilegx_elf_check_relocs): Handle new tls relocations.
2394         (tilegx_elf_gc_sweep_hook): Ditto.
2395         (allocate_dynrelocs): Ditto.
2396         (tilegx_elf_relocate_section): Ditto.
2397         (tilegx_copy_bits): New.
2398         (tilegx_replace_insn): New.
2399         (insn_mask_X1): New.
2400         (insn_mask_X0_no_dest_no_srca): New.
2401         (insn_mask_X1_no_dest_no_srca): New.
2402         (insn_mask_Y0_no_dest_no_srca): New.
2403         (insn_mask_Y1_no_dest_no_srca): New.
2404         (insn_mask_X0_no_operand): New.
2405         (insn_mask_X1_no_operand): New.
2406         (insn_mask_Y0_no_operand): New.
2407         (insn_mask_Y1_no_operand): New.
2408         (insn_tls_ie_ld_X1): New.
2409         (insn_tls_ie_ld4s_X1): New.
2410         (insn_tls_ie_add_X0X1): New.
2411         (insn_tls_ie_add_Y0Y1): New.
2412         (insn_tls_ie_addx_X0X1): New.
2413         (insn_tls_ie_addx_Y0Y1): New.
2414         (insn_tls_gd_add_X0X1): New.
2415         (insn_tls_gd_add_Y0Y1): New.
2416         (insn_move_X0X1): New.
2417         (insn_move_Y0Y1): New.
2418         (insn_add_X0X1): New.
2419         (insn_add_Y0Y1): New.
2420         (insn_addx_X0X1): New.
2421         (insn_addx_Y0Y1): New.
2422         * libbfd.h: Regenerate.
2423         * bfd-in2.h: Regenerate.
2424
2425 2012-02-25  Walter Lee  <walt@tilera.com>
2426
2427         * config.bfd (tilegx-*-*): rename little endian vector; add big
2428         endian vector.
2429         (tilegxbe-*-*): New case.
2430         * configure.in (bfd_elf32_tilegx_vec): Rename...
2431         (bfd_elf32_tilegx_le_vec): ... to this.
2432         (bfd_elf32_tilegx_be_vec): New vector.
2433         (bfd_elf64_tilegx_vec): Rename...
2434         (bfd_elf64_tilegx_le_vec): ... to this.
2435         (bfd_elf64_tilegx_be_vec): New vector.
2436         * configure: Regenerate.
2437         * elf32-tilegx.c (TARGET_LITTLE_SYM): Rename.
2438         (TARGET_LITTLE_NAME): Ditto.
2439         (TARGET_BIG_SYM): Define.
2440         (TARGET_BIG_NAME): Define.
2441         * elf64-tilegx.c (TARGET_LITTLE_SYM): Rename.
2442         (TARGET_LITTLE_NAME): Ditto.
2443         (TARGET_BIG_SYM): Define.
2444         (TARGET_BIG_NAME): Define.
2445         * targets.c (bfd_elf32_tilegx_vec): Rename...
2446         (bfd_elf32_tilegx_le_vec): ... to this.
2447         (bfd_elf32_tilegx_be_vec): Declare.
2448         (bfd_elf64_tilegx_vec): Rename...
2449         (bfd_elf64_tilegx_le_vec): ... to this.
2450         (bfd_elf64_tilegx_be_vec): Declare.
2451         (_bfd_target_vector): Add / rename above vectors.
2452         * arctures.c (bfd_architecture): Define bfd_mach_tilegx32.
2453         * bfd-in2.h: Regenerate.
2454         * cpu-tilegx.c (bfd_tilegx32_arch): define.
2455         (bfd_tilegx_arch): link to bfd_tilegx32_arch.
2456
2457 2012-02-24  Nick Clifton  <nickc@redhat.com>
2458
2459         PR ld/13730
2460         * reloc.c (bfd_generic_get_relocated_section_contents): Issue an
2461         error message instead of aborting, when an outofrange reloc is
2462         encountered.
2463
2464 2012-02-23  Iain Sandoe  <idsandoe@googlemail.com>
2465
2466         * mach-o.c (bfd_mach_o_swap_in_non_scattered_reloc): New.
2467         (bfd_mach_o_canonicalize_one_reloc):  Swap non-scattered reloc
2468         bit-fields when target and host differ in endian-ness.  When
2469         PAIRs are non-scattered find the 'symbol' from the preceding
2470         reloc.  Add FIXME re. reloc symbols on section boundaries.
2471         (bfd_mach_o_swap_out_non_scattered_reloc): New.
2472         (bfd_mach_o_write_relocs): Use bfd_mach_o_encode_non_scattered_reloc.
2473
2474 2012-02-17  Iain Sandoe  <idsandoe@googlemail.com>
2475
2476         * mach-o-i386.c (i386_howto_table): Add support for 16 bit
2477         sect-diffs.
2478         (bfd_mach_o_i386_swap_reloc_in): Handle 16bit sect-diffs.
2479         (bfd_mach_o_i386_swap_reloc_out): Likewise.
2480
2481 2012-02-17  Tristan Gingold  <gingold@adacore.com>
2482
2483         * reloc.c (BFD_RELOC_MACH_O_LOCAL_SECTDIFF):
2484         * libbfd.h: Regenerated.
2485         * bfd-in2.h: Likewise.
2486         * mach-o-i386.c (i386_howto_table): Include local sectdiff.
2487         (bfd_mach_o_i386_swap_reloc_in): Update for local sectdiff.
2488         (bfd_mach_o_i386_swap_reloc_out): Likewise.
2489
2490 2012-02-17  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
2491
2492         * elf32-s390.c (elf_s390_relocate_section): Support basr in the
2493         GD->LE and LD->LE optimizations.
2494
2495 2012-02-16  Alan Modra  <amodra@gmail.com>
2496
2497         PR binutils/13355
2498         * elf32-rx.c (elf32_rx_relax_section): Correct width check.
2499
2500 2012-02-13  Richard Henderson  <rth@redhat.com>
2501
2502         PR ld/13621
2503         * linker.c (fix_syms): Force symbols outside any section into
2504         bfd_abs_section_ptr.
2505
2506 2012-02-13  Alan Modra  <amodra@gmail.com>
2507
2508         * elf32-m68hc1x.c (elf32_m68hc11_merge_symbol_attribute): New function.
2509         * elf32-m68hc1x.h (elf32_m68hc11_merge_symbol_attribute): Declare.
2510         * elf32-m68hc11.c (elf_backend_merge_symbol_attribute): Define.
2511         * elf32-m68hc12.c (elf_backend_merge_symbol_attribute): Define.
2512
2513 2012-02-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
2514             Nick Clifton  <nickc@redhat.com>
2515
2516         * oasys.c (oasys_write_header): Fix compilation warning on zero-sized
2517         memset.
2518
2519 2012-02-10  Iain Sandoe  <idsandoe@googlemail.com>
2520
2521         * mach-o.c (bfd_mach_o_build_seg_command): Count zerofill section
2522         vma additions in their logical, rather than physical order.
2523
2524 2012-02-10  Iain Sandoe  <idsandoe@googlemail.com>
2525
2526         * mach-o.c (mach_o_section_name_xlat): Correct eh-frame section
2527         parameters.
2528         * mach-o-x86-64.c (text_section_names_xlat): New.
2529         (mach_o_x86_64_segsec_names_xlat): New.
2530         (bfd_mach_o_tgt_seg_table): Define to mach_o_x86_64_segsec_names_xlat.
2531         * mach-o-i386.c (text_section_names_xlat): Correct section parameters.
2532
2533 2012-02-10  Tristan Gingold  <gingold@adacore.com>
2534
2535         * elfnn-ia64.c (elfNN_vms_object_p): Change comparison operator
2536         to avoid infinite loop.  Add comments.
2537
2538 2012-02-09  H.J. Lu  <hongjiu.lu@intel.com>
2539
2540         PR ld/13675
2541         * cpu-i386.c (bfd_arch_i386_fill): Updated to support multi byte
2542         nop instructions.
2543         (bfd_arch_i386_short_nop_fill): New.
2544         (bfd_arch_i386_long_nop_fill): Likewise.
2545         Use bfd_arch_i386_short_nop_fill in 32bit bfd_arch_info
2546         initializers.  Use bfd_arch_i386_long_nop_fill on 64bit
2547         bfd_arch_info initializers.
2548
2549         * cpu-k1om.c (bfd_arch_i386_fill): Renamed to ...
2550         (bfd_arch_i386_short_nop_fill): This.
2551         Update bfd_arch_info initializers.
2552         * cpu-l1om.c: Likewise.
2553
2554 2012-02-08  Alan Modra  <amodra@gmail.com>
2555
2556         * elflink.c (_bfd_elf_gc_mark_rsec): Mark weakdef syms too.
2557         (_bfd_elf_fix_symbol_flags): When a weakdef is def_regular, clear
2558         the correct h->u.weakdef.
2559
2560 2012-02-07  Alan Modra  <amodra@gmail.com>
2561
2562         * elf.c (elf_find_function): Don't use internal_elf_sym.
2563         (_bfd_elf_maybe_function_sym): Likewise.  Replace elf_symbol_type
2564         parameter with asymbol.
2565         * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise.
2566         * elf-bfd.h (_bfd_elf_maybe_function_sym): Update prototype.
2567         (struct elf_backend_data <maybe_function_sym>): Likewise.
2568
2569 2012-02-02  Vidya Praveen (vidya.praveen@atmel.com)
2570
2571         PR bfd/13410
2572         * elf32-avr.c (elf32_avr_relax_section): Correct the
2573         condition that qualifies the candidates for relaxation.
2574
2575 2012-02-02  Tristan Gingold  <gingold@adacore.com>
2576
2577         * bfdio.c (real_fopen): Remove unused vms_modes variable.
2578
2579 2012-02-02  Tristan Gingold  <gingold@adacore.com>
2580
2581         * mach-o.c (bfd_mach_o_read_header): Silent uninitialized
2582         variable warning.
2583
2584 2012-02-02  Tristan Gingold  <gingold@adacore.com>
2585
2586         * archive.c (bfd_slurp_armap): Fix thinko in cast.
2587
2588 2012-01-31  H.J. Lu  <hongjiu.lu@intel.com>
2589
2590         PR ld/13616
2591         * archures.c (bfd_arch_info): Add fill.
2592         (bfd_default_arch_struct): Add bfd_arch_default_fill.
2593         (bfd_arch_default_fill): New.
2594
2595         * configure.in: Set bfd version to 2.22.52.
2596         * configure: Regenerated.
2597
2598         * cpu-alpha.c: Add bfd_arch_default_fill to bfd_arch_info
2599         initializer.
2600         * cpu-arc.c: Likewise.
2601         * cpu-arm.c: Likewise.
2602         * cpu-avr.c: Likewise.
2603         * cpu-bfin.c: Likewise.
2604         * cpu-cr16.c: Likewise.
2605         * cpu-cr16c.c: Likewise.
2606         * cpu-cris.c: Likewise.
2607         * cpu-crx.c: Likewise.
2608         * cpu-d10v.c: Likewise.
2609         * cpu-d30v.c: Likewise.
2610         * cpu-dlx.c: Likewise.
2611         * cpu-epiphany.c: Likewise.
2612         * cpu-fr30.c: Likewise.
2613         * cpu-frv.c: Likewise.
2614         * cpu-h8300.c: Likewise.
2615         * cpu-h8500.c: Likewise.
2616         * cpu-hppa.c: Likewise.
2617         * cpu-i370.c: Likewise.
2618         * cpu-i860.c: Likewise.
2619         * cpu-i960.c: Likewise.
2620         * cpu-ia64.c: Likewise.
2621         * cpu-ip2k.c: Likewise.
2622         * cpu-iq2000.c: Likewise.
2623         * cpu-lm32.c: Likewise.
2624         * cpu-m10200.c: Likewise.
2625         * cpu-m10300.c: Likewise.
2626         * cpu-m32c.c: Likewise.
2627         * cpu-m32r.c: Likewise.
2628         * cpu-m68hc11.c: Likewise.
2629         * cpu-m68hc12.c: Likewise.
2630         * cpu-m68k.c: Likewise.
2631         * cpu-m88k.c: Likewise.
2632         * cpu-mcore.c: Likewise.
2633         * cpu-mep.c: Likewise.
2634         * cpu-microblaze.c: Likewise.
2635         * cpu-mips.c: Likewise.
2636         * cpu-mmix.c: Likewise.
2637         * cpu-moxie.c: Likewise.
2638         * cpu-msp430.c: Likewise.
2639         * cpu-mt.c: Likewise.
2640         * cpu-ns32k.c: Likewise.
2641         * cpu-openrisc.c: Likewise.
2642         * cpu-or32.c: Likewise.
2643         * cpu-pdp11.c: Likewise.
2644         * cpu-pj.c: Likewise.
2645         * cpu-plugin.c: Likewise.
2646         * cpu-powerpc.c: Likewise.
2647         * cpu-rl78.c: Likewise.
2648         * cpu-rs6000.c: Likewise.
2649         * cpu-rx.c: Likewise.
2650         * cpu-s390.c: Likewise.
2651         * cpu-score.c: Likewise.
2652         * cpu-sh.c: Likewise.
2653         * cpu-sparc.c: Likewise.
2654         * cpu-spu.c: Likewise.
2655         * cpu-tic30.c: Likewise.
2656         * cpu-tic4x.c: Likewise.
2657         * cpu-tic54x.c: Likewise.
2658         * cpu-tic6x.c: Likewise.
2659         * cpu-tic80.c: Likewise.
2660         * cpu-tilegx.c: Likewise.
2661         * cpu-tilepro.c: Likewise.
2662         * cpu-v850.c: Likewise.
2663         * cpu-vax.c: Likewise.
2664         * cpu-w65.c: Likewise.
2665         * cpu-we32k.c: Likewise.
2666         * cpu-xc16x.c: Likewise.
2667         * cpu-xstormy16.c: Likewise.
2668         * cpu-xtensa.c: Likewise.
2669         * cpu-z80.c: Likewise.
2670         * cpu-z8k.c: Likewise.
2671
2672         * cpu-i386.c: Include "libiberty.h".
2673         (bfd_arch_i386_fill): New.
2674         Add bfd_arch_i386_fill to  bfd_arch_info initializer.
2675
2676         * cpu-k1om.c: Add bfd_arch_i386_fill to  bfd_arch_info initializer.
2677         * cpu-l1om.c: Likewise.
2678
2679         * linker.c (default_data_link_order): Call abfd->arch_info->fill
2680         if fill size is 0.
2681
2682         * bfd-in2.h: Regenerated.
2683
2684 2012-01-27  Michael Eager  <eager@eagercon.com>
2685
2686         * elf32-microblaze.c (create_got_section):
2687         Reuse existing .rela.got section.
2688
2689 2012-01-23  Alan Modra  <amodra@gmail.com>
2690
2691         * elf-bfd.h: Formatting.
2692         (struct elf_backend_data): Add "maybe_function_sym".
2693         (_bfd_elf_maybe_function_sym): Declare.
2694         * elfxx-target.h (elf_backend_maybe_function_sym): Define.
2695         (elfNN_bed): Init new field.
2696         * elf.c (elf_find_function): Use maybe_function_sym.
2697         (_bfd_elf_maybe_function_sym): New function.
2698         * elf64-ppc.c (elf_backend_maybe_function_sym): Define.
2699         (ppc64_elf_maybe_function_sym): New function.
2700
2701 2012-01-20  Francois Gouget  <fgouget@codeweavers.com>
2702
2703         PR binutils/13534
2704         * archive.c (_bfd_ar_sizepad): New function. Correctly install and
2705         pad the size field in an archive header.
2706         (_bfd_generic_read_ar_hdr_mag): Use the correct type and scan
2707         function for the archive size field.
2708         (bfd_generic_openr_next_archived_file): Likewise.
2709         (do_slurp_coff_armap): Likewise.
2710         (_bfd_write_archive_contents): Likewise.
2711         (_bfd_bsd44_write_ar_hdr): Use the new function.
2712         (bfd_ar_hdr_from_filesystem): Likewise.
2713         (_bfd_write_archive_contents): Likewise.
2714         (bsd_write_armap): Likewise.
2715         (coff_write_armap): Likewise.
2716         * archive64.c (bfd_elf64_archive_write_armap): Likewise.
2717         * bfdio.c (bfd_bread): Use correct type for archive element
2718         sizes.
2719         * ar.c (open_inarch): Likewise.
2720         (extract_file): Likewise.
2721         * libbfd-in.h (struct areltdata): Use correct types for
2722         parsed_size and extra_size fields.
2723         Prototype _bfd_ar_sizepad function.
2724         * libbfd.h: Regenerate.
2725
2726 2012-01-20  Ulrich Weigand  <ulrich.weigand@linaro.org>
2727
2728         * elf.c (elfcore_write_prpsinfo): Provide unconditionally.
2729         Return NULL if core file generation is unsupported.
2730         (elfcore_write_prstatus): Likewise.
2731         * elf32-arm.c (elf32_arm_nabi_write_core_note): New function.
2732         (elf_backend_write_core_note): Define.
2733
2734 2012-01-19  Tristan Gingold  <gingold@adacore.com>
2735
2736         * pef.c: Add a comment.
2737         * xsym.c: Likewise.
2738
2739 2012-01-17  Alan Modra  <amodra@gmail.com>
2740
2741         * elf32-ppc.c (ppc_elf_write_core_note <NT_PRPSINFO>): Don't leave
2742         trailing garbage in the note.
2743         * elf64-ppc.c (ppc64_elf_write_core_note <NT_PRPSINFO>): Likewise.
2744
2745 2012-01-16  Daniel Green  <venix1@gmail.com>
2746
2747         PR ld/13491
2748         * coff-i386.c (coff_i386_rtype_to_howto <R_SECREL32>): Test
2749         h->root.type not h->type.
2750         * coff-x86_64.c (coff_amd64_rtype_to_howto <R_AMD64_SECREL>): Likewise.
2751
2752 2012-01-13  Iain Sandoe  <idsandoe@googlemail.com>
2753
2754         * mach-o.c (bfd_mach_o_build_dysymtab_command): Handle absolute
2755         indirect symbols.
2756
2757 2012-01-13  Iain Sandoe  <idsandoe@googlemail.com>
2758
2759         * mach-o.c (bfd_mach_o_write_relocs): Move computation of relocs file
2760         position from here... to (bfd_mach_o_build_seg_command): Here.
2761
2762 2012-01-12  Iain Sandoe  <idsandoe@googlemail.com>
2763
2764         * mach-o.c (bfd_mach_o_count_indirect_symbols): New.
2765         (bfd_mach_o_build_dysymtab_command): Populate indirect symbol table.
2766         * mach-o.h (bfd_mach_o_asymbol): Move declaration to start of the
2767         file. (bfd_mach_o_section): Add indirect_syms field.
2768
2769 2012-01-11  Iain Sandoe  <idsandoe@googlemail.com>
2770
2771         * mach-o.c (bfd_mach_o_build_seg_command): Separate computation of
2772         vmsize from filesize.  Don't compute offsets or file sizes for
2773         zerofill sections.
2774
2775 2012-01-11  Iain Sandoe  <idsandoe@googlemail.com>
2776
2777         * mach-o.c (bfd_mach_o_build_commands): Make the building of each
2778         command type independent.
2779
2780 2012-01-11  Alan Modra  <amodra@gmail.com>
2781
2782         * elf64-ppc.c: Define more insns used in plt call stubs.
2783         (ppc64_elf_brtaken_reloc): Assume isa version 2 or above.
2784         (ppc64_elf_relocate_section): Likewise.
2785         (enum ppc_stub_type): Add ppc_stub_plt_call_r2save.
2786         (struct ppc_link_hash_table): Increase size of stub_count array.
2787         Add plt_stub_align and plt_thread_safe.
2788         (ALWAYS_USE_FAKE_DEP, ALWAYS_EMIT_R2SAVE): Define.
2789         (plt_stub_size, plt_stub_pad): New functions.
2790         (build_plt_stub): Emit barriers for power7 thread safety.  Don't
2791         emit needless save of r2.
2792         (build_tls_get_addr_stub): Adjust params.
2793         (ppc_build_one_stub): Handle ppc_stub_plt_call_r2save and aligning
2794         plt stubs.  Adjust build_*plt_stub calls.
2795         (ppc_size_one_stub): Similarly.
2796         (ppc64_elf_size_stubs): Accept plt_thread_safe and plt_stub_align
2797         params.  Choose default for plt_thread_safe based on existence of
2798         calls to thread creation functions.  Modify plt_call to
2799         plt_call_r2save when no tocsave reloc found.  Align tail of stub
2800         sections.
2801         (ppc64_elf_build_stubs): Align tail of stub sections.  Adjust
2802         output of stub statistics.
2803         (ppc64_elf_relocate_section): Handle ppc_stub_plt_call_r2save.
2804         * elf64-ppc.h (ppc64_elf_size_stubs): Update prototype.
2805
2806 2012-01-10  H.J. Lu  <hongjiu.lu@intel.com>
2807
2808         PR ld/13581
2809         * elf64-x86-64.c (elf_x86_64_relocate_section): Remove ABI_64_P
2810         check on R_X86_64_PCXX.
2811
2812 2012-01-10  Tristan Gingold  <gingold@adacore.com>
2813
2814         * mach-o.c (bfd_mach_o_build_commands): Avoid uninitialized false
2815         warning.
2816
2817 2012-01-10  Tristan Gingold  <gingold@adacore.com>
2818
2819         * bfdio.c (bfd_tell): Handle nested archives.
2820         (bfd_seek): Ditto.
2821         * cache.c (bfd_cache_lookup_worker): Ditto.
2822         * archive.c (_bfd_get_elt_at_filepos): Remove code dealing with
2823         nested archives.
2824         (bfd_generic_openr_next_archived_file): Likewise.
2825
2826 2012-01-09  Iain Sandoe  <idsandoe@googlemail.com>
2827
2828         * mach-o.c (bfd_mach_o_bfd_copy_private_symbol_data): Implement.
2829         (bfd_mach_o_write_symtab): Remove handling for indirect syms.
2830         (bfd_mach_o_primary_symbol_sort_key): Likewise.
2831         (bfd_mach_o_cf_symbols): Likewise.
2832         (bfd_mach_o_sort_symbol_table): Remove.
2833         (bfd_mach_o_mangle_symbols): Adjust arguments, remove handling
2834         for indirect and dysymtab counts.  Do the symbol sorting here.
2835         (bfd_mach_o_build_dysymtab_command): Count the symbol types here.
2836         Make the indirect symbols a TODO.
2837         (bfd_mach_o_build_commands): Adjust call to bfd_mach_o_mangle_symbols.
2838         (bfd_mach_o_make_empty_symbol): Specifically flag unset symbols with
2839         a non-zero value.
2840         (bfd_mach_o_read_symtab_symbol): Record the symbol index.
2841         (bfd_mach_o_read_symtab_symbol): Adjust recording of global status.
2842         * mach-o.h (mach_o_data_struct): Remove indirect and dysymtab entries.
2843         (IS_MACHO_INDIRECT): Remove.
2844         (SYM_MACHO_FIELDS_UNSET, SYM_MACHO_FIELDS_NOT_VALIDATED): New.
2845
2846 2012-01-06  Nick Clifton  <nickc@redhat.com>
2847
2848         PR binutils/13121
2849         * reloc.c (bfd_generic_lookup_section_flags): Rename 'finfo' to
2850         'flaginfo' to avoid conflicts with AIX system headers.
2851
2852 2012-01-06  Tristan Gingold  <gingold@adacore.com>
2853
2854         * bfdio.c (bfd_bread): Use arelt_size macro.
2855
2856 2012-01-06  Tristan Gingold  <gingold@adacore.com>
2857
2858         * config.bfd (i[3-7]86-*-darwin*): Define targ64_selvecs.
2859
2860 2012-01-05  Nick Clifton  <nickc@redhat.com>
2861
2862         PR ld/12161
2863         * elf32-avr.c (elf32_avr_relax_delete_bytes): Read in relocs if
2864         necessary.
2865
2866 2012-01-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
2867
2868         Fix zero registers core files when built by gcc-4.7.
2869         * elf64-x86-64.c (elf_x86_64_write_core_note): Remove variables p and
2870         size.  Call elfcore_write_note for the local variables.  Remove the
2871         final elfcore_write_note call.  Add NOTREACHED comments.
2872
2873 2012-01-04  Tristan Gingold  <gingold@adacore.com>
2874
2875         * mach-o.c (bfd_mach_o_fat_stat_arch_elt): New function.
2876         (bfd_mach_o_generic_stat_arch_elt): Adjust.
2877
2878 2012-01-04  Tristan Gingold  <gingold@adacore.com>
2879
2880         * mach-o.c (bfd_mach_o_fat_member_init): New function.
2881         (bfd_mach_o_openr_next_archived_file): Reindent.
2882         Adjust to call bfd_mach_o_fat_member_init.
2883         (bfd_mach_o_fat_extract): Adjust to call bfd_mach_o_fat_member_init.
2884
2885 2012-01-04  Tristan Gingold  <gingold@adacore.com>
2886
2887         * mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Handle
2888         BFD_RELOC_32, BFD_RELOC_MACH_O_X86_64_PCREL32_1,
2889         BFD_RELOC_MACH_O_X86_64_PCREL32_2,
2890         BFD_RELOC_MACH_O_X86_64_PCREL32_4,
2891         BFD_RELOC_MACH_O_X86_64_BRANCH32,
2892         BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32,
2893         BFD_RELOC_MACH_O_X86_64_GOT.
2894
2895 2012-01-04  Tristan Gingold  <gingold@adacore.com>
2896
2897         * mach-o.h (bfd_mach_o_fvmlib_command): New structure.
2898         (bfd_mach_o_load_command): Add fvmlib field.
2899
2900         * mach-o.c (bfd_mach_o_read_fvmlib): New function.
2901         (bfd_mach_o_read_command): Handle fvmlib.
2902
2903 2012-01-04  Tristan Gingold  <gingold@adacore.com>
2904
2905         * mach-o.c (bfd_mach_o_convert_architecture): Reindent.
2906         Decode msubtype for ARM.
2907
2908 2012-01-04  Tristan Gingold  <gingold@adacore.com>
2909
2910         * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add comments.
2911
2912 2012-01-04  Tristan Gingold  <gingold@adacore.com>
2913
2914         * mach-o.h: Reindent header.
2915         (bfd_mach_o_encryption_info_command): New structure.
2916         (bfd_mach_o_load_command): Add encryption_info field.
2917
2918         * mach-o.c (bfd_mach_o_read_encryption_info): New function.
2919         (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_ENCRYPTION_INFO.
2920         (bfd_mach_o_read_command): Adjust error message.
2921
2922 2012-01-04  Shinichiro Hamaji  <shinichiro.hamaji@gmail.com>
2923
2924         * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Factor out the part
2925         which reads DWARF2 and stores in stash from find_line.
2926         (find_line) Call _bfd_dwarf2_slurp_debug_info.
2927         * libbfd-in.h (_bfd_dwarf2_slurp_debug_info): Add declaration.
2928         * libbfd.h (_bfd_dwarf2_slurp_debug_info): Regenerate.
2929         * mach-o.c (dsym_subdir): The name of subdir where debug
2930         information may be stored.
2931         (bfd_mach_o_lookup_uuid_command): New. Lookup a load command whose
2932         type is UUID.
2933         (bfd_mach_o_dsym_for_uuid_p): New. Check if the specified BFD is
2934         corresponding to the executable.
2935         (bfd_mach_o_find_dsym): New. Find a debug information BFD in the
2936         specified binary file.
2937         (bfd_mach_o_follow_dsym): New. Find a debug information BFD for
2938         the original BFD.
2939         (bfd_mach_o_find_nearest_line): Check dSYM files for Mach-O
2940         executables, dylibs, and bundles.
2941         (bfd_mach_o_close_and_cleanup): Clean up BFDs for the dSYM file.
2942         * mach-o.h (dsym_bfd): The BFD of the dSYM file.
2943
2944 2012-01-03  Iain Sandoe  <idsandoe@googlemail.com>
2945
2946         * mach-o.c (bfd_mach_o_mangle_symbols): Put in the section index
2947         for stabd symbols.
2948         (bfd_mach_o_primary_symbol_sort_key): Adjust for stabs.
2949         (bfd_mach_o_cf_symbols): Likewise.
2950
2951 2012-01-03  Iain Sandoe  <idsandoe@googlemail.com>
2952
2953         * mach-o.c (bfd_mach_o_mangle_symbols): Correct typo.
2954
2955 2012-01-03  Iain Sandoe  <idsandoe@googlemail.com>
2956
2957         * mach-o.c (bfd_mach_o_write_symtab): Fill in the string table index
2958         as the value of an indirect symbol.  Keep the string table index in
2959         non-indirect syms for reference.
2960         (bfd_mach_o_write_dysymtab): New.
2961         (bfd_mach_o_primary_symbol_sort_key): New.
2962         (bfd_mach_o_cf_symbols): New.
2963         (bfd_mach_o_sort_symbol_table): New.
2964         (bfd_mach_o_mangle_symbols): Return early if no symbols.  Sort symbols.
2965         If we are emitting a dysymtab, process indirect symbols and count the
2966         number of each other kind.
2967         (bfd_mach_o_mangle_sections): New.
2968         (bfd_mach_o_write_contents): Split out some pre-requisite code into
2969         the command builder. Write dysymtab if the command is present.
2970         (bfd_mach_o_count_sections_for_seg): New.
2971         (bfd_mach_o_build_seg_command): New.
2972         (bfd_mach_o_build_dysymtab_command): New.
2973         (bfd_mach_o_build_commands): Reorganize to support the fact that some
2974         commands are optional and should not be emitted if there are no
2975         sections or symbols.
2976         (bfd_mach_o_set_section_contents): Amend comment.
2977         * mach-o.h: Amend and add to comments.
2978         (mach_o_data_struct): Add fields for dysymtab symbols counts and a
2979         pointer to the indirects, when present.
2980         (bfd_mach_o_should_emit_dysymtab): New macro.
2981         (IS_MACHO_INDIRECT): Likewise.
2982
2983 For older changes see ChangeLog-2011
2984 \f
2985 Local Variables:
2986 mode: change-log
2987 left-margin: 8
2988 fill-column: 74
2989 version-control: never
2990 End: