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