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