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