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