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