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