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