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