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