ld/
[binutils.git] / bfd / ChangeLog
bloba3b9a8fe4b8c51630f8831b451cb73a3855e88d8
1 2009-11-19  Tristan Gingold  <gingold@adacore.com>
3         * coff-rs6000.c (rs6000coff_vec): Use generic routines instead of
4         hard-coded casts.
5         (pmac_xcoff_vec): Ditto.
6         * coff64-rs6000.c (rs6000coff64_vec): Ditto.
7         (aix5coff64_vec): Ditto.
9 2009-11-18  Alan Modra  <amodra@bigpond.net.au>
11         * bfd-in.h (_bfd_elf_ppc_at_tls_transform): Declare.
12         * bfd-in2.h: Regenerate.
13         * elf64-ppc.c (ppc64_elf_relocate_section): Move code for R_PPC64_TLS
14         insn optimisation to..
15         * elf32-ppc.c (_bfd_elf_ppc_at_tls_transform): ..here.  New function.
16         (ppc_elf_relocate_section): Use it.
18 2009-11-18  Alan Modra  <amodra@bigpond.net.au>
20         * targets.c: Don't include alloca-conf.h.
21         (bfd_get_target_info): Don't use alloca.
23 2009-11-17  H.J. Lu  <hongjiu.lu@intel.com>
25         PR ld/10955
26         * elfxx-ia64.c (elfNN_ia64_update_short_info): Also skip ABS
27         sections.
29 2009-11-17  H.J. Lu  <hongjiu.lu@intel.com>
31         PR ld/10955
32         * elfxx-ia64.c (elfNN_ia64_link_hash_table): Update comments.
33         (elfNN_ia64_update_short_info): Remove "->output_section" from
34         ia64_info->max_short_sec and ia64_info->min_short_sec.
35         (elfNN_ia64_choose_gp): Likewise.
36         (elfNN_ia64_relax_section): Pass tsec->output_section to
37         elfNN_ia64_update_short_info.
39 2009-11-17  H.J. Lu  <hongjiu.lu@intel.com>
41         PR ld/10955
42         * elfxx-ia64.c (elfNN_ia64_link_hash_table): Add max_short_sec,
43         max_short_offset, min_short_sec and min_short_offset.
44         (elfNN_ia64_update_short_info): New.
45         (elfNN_ia64_relax_section): Update max_short_sec,
46         max_short_offset, min_short_sec and min_short_offset.
47         (elfNN_ia64_choose_gp): Use min_short_sec/max_short_sec if
48         they are set.
50 2009-11-17  Paul Brook  <paul@codesourcery.com>
51             Daniel Jacobowitz  <dan@codesourcery.com>
53         * elf32-arm.c (using_thumb_only, arch_has_arm_nop,
54         arch_has_thumb2_nop): Handle TAG_CPU_ARCH_V7E_M.
55         (tag_cpu_arch_combine): Ditto. Correct MAX_TAG_CPU_ARCH test.
57 2009-11-17  Ulrich Weigand  <uweigand@de.ibm.com>
59         * elf32-spu.c (struct spu_link_hash_table): Remove overlay_fixed,
60         reserved, and extra_stack_space members.
61         (spu_elf_auto_overlay): Use auto_overlay_fixed, auto_overlay_reserved,
62         and extra_stack_space members of htab->params instead.
64 2009-11-17  Tristan Gingold  <gingold@adacore.com>
66         * targets.c: Include alloca-conf.h
68 2009-11-16  Kai Tietz  <kai.tietz@onevision.com>
70         * targets.c (bfd_get_target_info): New function.
71         (_bfd_find_arch_match): New function.
72         * bfd-in2.h: Regenerated.
74 2009-11-12  Nick Clifton  <nickc@redhat.com>
76         * po/ru.po: Updates Russian translation.
78 2009-11-11  Nick Clifton  <nickc@redhat.com>
80         * po/id.po: Updated Indonesian translation.
82 2009-11-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
84         * configure.in: Call ACX_LARGEFILE.  Stop calling AC_PLUGINS,
85         AC_SYS_LARGEFILE and checking the Solaris largefile exception.
86         * aclocal.m4: Regenerate.
87         * configure: Regenerate.
89 2009-11-09  H.J. Lu  <hongjiu.lu@intel.com>
91         PR ld/10911
92         * elflink.c (elf_link_output_extsym): Don't return on
93         STT_GNU_IFUNC symbol when stripping.
95 2009-11-08  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
97         * elf32-hppa.c (elf32_hppa_final_link): Don't sort unwind information
98         in a relocatable link.
99         * elf64-hppa.c (elf_hppa_final_link): Likewise.
101 2009-11-05  Nick Clifton  <nickc@redhat.com>
103         * elflink.c (elf_link_add_object_symbols): Improve error
104         message generated when a symbol is left unresolved because a
105         --no-add-needed command line option has prevented the
106         inclusion of the DSO defining it.
108 2009-11-03  Alan Modra  <amodra@bigpond.net.au>
109             Ulrich Weigand  <uweigand@de.ibm.com>
111         * elf32-spu.c (mark_functions_via_relocs): Handle non-branch relocs
112         (jump tables or other references to code labels) as well.
114 2009-11-02  Paul Brook  <paul@codesourcery.com>
116         * elf32-arm.c (elf32_arm_merge_eabi_attributes): Handle VFPv4
117         attributes.
119 2009-11-02  Alan Modra  <amodra@bigpond.net.au>
121         * elflink.c (elf_link_add_object_symbols): Don't force debug
122         symbols local.
124 2009-10-29  Johan Kristell  <johankri@axis.com>
126         * elf32-cris.c (cris_elf_plt_sym_val): New function.
127         (elf_backend_plt_sym_val): Define.
129 2009-10-27  Kai Tietz  <kai.tietz@onevision.com>
131         * peXXigen.c (bfdver.h): Add include.
132         (LINKER_VERSION): Do calculation based on BFD_VERSION.
134 2009-10-25  Maciej W. Rozycki  <macro@linux-mips.org>
136         * elf32-vax.c (elf_vax_relocate_section): Correct assertion.
138 2009-10-25  Maciej W. Rozycki  <macro@linux-mips.org>
140         * elf32-vax.c (elf_vax_plt_entry): Fix formatting.
142 2009-10-25  Maciej W. Rozycki  <macro@linux-mips.org>
144         * elf32-vax.c (elf_vax_relocate_section): Fix a typo.
146 2009-10-23  Kai Tietz  <kai.tietz@onevision.com>
148         * coff-x86_64.c (coff_amd64_rtype_to_howto): Subtract offset
149         of R_AMD64_PCRLONG_<X> relocations from addend.
151 2009-10-23  Alan Modra  <amodra@bigpond.net.au>
153         * plugin.c: Produce empty object if not BFD_SUPPORTS_PLUGINS.
155 2009-10-20  Alan Modra  <amodra@bigpond.net.au>
157         PR binutils/10802
158         * opncls.c (_maybe_make_executable): Make DYNAMIC files executable.
160 2009-10-19  Hans-Peter Nilsson  <hp@axis.com>
162         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_DTPREL>:
163         Don't subtract the size of the TLS block for non-shared objects
164         from the relocation.
166 2009-10-17  Arnold Metselaar  <arnold.metselaar@planet.nl>
168         * coff-z80.c (z80coff_vec): Allow sections to be of type
169         SEC_CODE or SEC_DATA
171 2009-10-16  Alan Modra  <amodra@bigpond.net.au>
173         PR binutils/10785
174         * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Don't bfd_alloc
175         bim and bim->buffer.  bfd_malloc instead.
176         * peicode.h (pe_ILF_build_a_bfd): Similarly.
177         (ILF_DATA_SIZE): Don't include bim.
178         * opncls.c (bfd_close): Test bim->buffer non-NULL before freeing.
180 2009-10-14  Alan Modra  <amodra@bigpond.net.au>
182         * aoutx.h (aout_link_check_ar_symbols): Typo fix.
184 2009-10-13  H.J. Lu  <hongjiu.lu@intel.com>
186         PR binutils/10763
187         * elf32-i386.c (elf_i386_finish_dynamic_symbol): Declare plt
188         earlier.
190 2009-10-13  Alan Modra  <amodra@bigpond.net.au>
192         * elflink.c (_bfd_elf_merge_symbol): Revert previous patch.
194 2009-10-12  Roland McGrath  <roland@frob.com>
196         * elflink.c (elf_link_add_object_symbols, _bfd_elf_merge_symbol):
197         Fix %s that should be %B in several message formats.
199 2009-10-10  Alan Modra  <amodra@bigpond.net.au>
201         * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols for
202         excluded output sections.
204 2009-10-09  Tristan Gingold  <gingold@adacore.com>
206         * mach-o.c (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_RPATH.
207         (bfd_mach_o_bfd_print_private_bfd_data): Ditto.
209 2009-10-09  Tristan Gingold  <gingold@adacore.com>
211         * mach-o.c (bfd_mach_o_scan_read_symtab_symbols): Rename to
212         bfd_mach_o_read_symtab_symbols.
213         (bfd_mach_o_scan_write_thread): Rename to bfd_mach_o_write_thread.
214         (bfd_mach_o_scan_write_relocs): Rename to bfd_mach_o_write_relocs.
215         (bfd_mach_o_scan_write_section_32): Rename to
216         bfd_mach_o_write_section_32.
217         (bfd_mach_o_scan_write_section_64): Rename to
218         bfd_mach_o_write_section_64.
219         (bfd_mach_o_scan_write_segment_32): Rename to
220         bfd_mach_o_write_segment_32.
221         (bfd_mach_o_scan_write_segment_64): Rename to
222         bfd_mach_o_write_segment_64.
223         (bfd_mach_o_scan_write_symtab): Rename to bfd_mach_o_write_symtab.
224         (bfd_mach_o_scan_read_section_32): Rename to
225         bfd_mach_o_read_section_32.
226         (bfd_mach_o_scan_read_section_64): Rename to
227         bfd_mach_o_read_section_64.
228         (bfd_mach_o_scan_read_section): Rename to bfd_mach_o_read_section.
229         (bfd_mach_o_scan_read_symtab_strtab): Rename to
230         bfd_mach_o_read_symtab_strtab.
231         (bfd_mach_o_scan_read_symtab_symbol): Rename to
232         bfd_mach_o_read_symtab_symbol.
233         (bfd_mach_o_scan_read_dysymtab_symbol): Rename to
234         bfd_mach_o_read_dysymtab_symbol.
235         (bfd_mach_o_scan_read_dylinker): Rename to bfd_mach_o_read_dylinker.
236         (bfd_mach_o_scan_read_dylib): Rename to bfd_mach_o_read_dylib.
237         (bfd_mach_o_scan_read_prebound_dylib): Rename to
238         bfd_mach_o_read_prebound_dylib.
239         (bfd_mach_o_scan_read_thread): Rename to bfd_mach_o_read_thread.
240         (bfd_mach_o_scan_read_dysymtab): Rename to bfd_mach_o_read_dysymtab.
241         (bfd_mach_o_scan_read_symtab): Rename to bfd_mach_o_read_symtab.
242         (bfd_mach_o_scan_read_uuid): Rename to bfd_mach_o_read_uuid.
243         (bfd_mach_o_scan_read_linkedit): Rename to bfd_mach_o_read_linkedit.
244         (bfd_mach_o_scan_read_str): Rename to bfd_mach_o_read_str.
245         (bfd_mach_o_scan_read_dyld_info): Rename to bfd_mach_o_read_dyld_info.
246         (bfd_mach_o_scan_read_segment): Rename to bfd_mach_o_read_segment.
247         (bfd_mach_o_scan_read_segment_32): Rename to
248         bfd_mach_o_read_segment_32.
249         (bfd_mach_o_scan_read_segment_64): Rename to
250         bfd_mach_o_read_segment_64.
251         (bfd_mach_o_scan_read_command): Rename to bfd_mach_o_read_command.
252         * mach-o.h (bfd_mach_o_scan_read_dysymtab_symbol): Rename to
253         bfd_mach_o_read_dysymtab_symbol.
255 2009-10-09  Tristan Gingold  <gingold@adacore.com>
257         * mach-o.c (bfd_mach_o_section_get_entry_size): Moved.
258         (bfd_mach_o_section_get_nbr_indirect): Ditto.
259         (bfd_mach_o_get_synthetic_symtab): New function.
260         (bfd_mach_o_print_private_header): Print the number of commands
261         in decimal.
262         * mach-o.h (bfd_mach_o_get_synthetic_symtab): Add prototype.
263         * mach-o-target.c: Do not defined bfd_mach_o_get_synthetic_symtab.
265 2009-10-08  Tristan Gingold  <gingold@adacore.com>
267         * config.bfd: Add bfd_mach_o_i386_vec in x86_64-darwin targ_selvecs.
269 2009-10-06  H.J. Lu  <hongjiu.lu@intel.com>
271         * bfd-in2.h: Regenerated.
273 2009-10-02  Alan Modra  <amodra@bigpond.net.au>
275         * aout-cris.c (N_SHARED_LIB): Don't define.
276         * hp300bsd.c (N_SHARED_LIB): Don't define.
277         * i386bsd.c (N_SHARED_LIB): Don't define.
278         * i386linux.c (N_SHARED_LIB): Don't define.
279         * i386lynx.c (N_SHARED_LIB): Don't define.
280         * m68klinux.c (N_SHARED_LIB): Don't define.
281         * m88kmach3.c (N_SHARED_LIB): Don't define.
282         * mipsbsd.c (N_SHARED_LIB): Don't define.
283         * newsos3.c (N_SHARED_LIB): Don't define.
284         * pc532-mach.c (N_SHARED_LIB): Don't define.
285         * pdp11.c (N_SHARED_LIB): Don't define.
286         * sparclinux.c (N_SHARED_LIB): Don't define.
287         * vaxbsd.c (N_SHARED_LIB): Don't define.
289 2009-10-01  Dave Korn  <dave.korn.cygwin@gmail.com>
291         * cofflink.c (_bfd_coff_generic_relocate_section): Look for the aux
292         symbol for a weak undef in the auxbfd, not the input bfd.
294 2009-10-01  Ulrich Weigand  <uweigand@de.ibm.com>
296         * elf32-spu.c (spu_elf_auto_overlay): Insert icache linker script
297         after .toe instead of before .text section.  Set the LMA of all
298         overlay sections to their icache IA address.
299         (spu_elf_find_overlays): Determine icache set id without reference
300         to the LMA.
302 2009-09-30  Tristan Gingold  <gingold@adacore.com>
304         * configure.com: Use hosts/alphavms.h on both alpha and ia64 VMS.
306 2009-09-29  H.J. Lu  <hongjiu.lu@intel.com>
308         * elf64-x86-64.c (elf64_x86_64_append_rela): New.
309         (elf64_x86_64_relocate_section): Use it.
310         (elf64_x86_64_finish_dynamic_symbol): Likewise.
312 2009-09-29  DJ Delorie  <dj@redhat.com>
314         * Makefile.am (ALL_MACHINES): Add cpu-rx.lo.
315         (ALL_MACHINES_CFILES): Add cpu-rx.c.
316         (BFD32_BACKENDS): Add elf32-rx.lo.
317         (BFD32_BACKENDS_CFILES): Add elf32-rx.c.
318         * archures.c (bfd_architecture): Add bfd_arch_rx and bfd_mach_rx.
319         Export bfd_rx_arch.
320         (bfd_archures_list): Add bfd_rx_arch.
321         * config.bfd: Add entry for rx-*-elf.
322         * configure.in: Add entries for bfd_elf32_rx_le_vec and
323         bfd_elf32_rx_be_vec.
324         * reloc.c: Add RX relocations.
325         * targets.c: Add RX target vectors.
326         * Makefile.in: Regenerate.
327         * bfd-in2.h: Regenerate.
328         * configure: Regenerate.
329         * libbfd.h: Regenerate.
330         * cpu-rx.c: New file.
331         * elf32-rx.c: New file.
333 2009-09-29 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
335         * elf32-cr16.c (elf32_cr16_relocate_section): Removed
336         info->relocatable to fix the ld/testsuites/ld-elf/linkonce1 test case.
338 2009-09-28  Nick Clifton  <nickc@redhat.com>
340         PR 10478: Accepting Solaris binaries.
341         * elf.c (bfd_section_from_shdr): Allow SHN_BEFORE and SHN_AFTER
342         section link values in x86 binaries.
343         * elfcode.h (elf_object_p): Likewise.
345 2009-09-28  Philippe De Muyter  <phdm@macqel.be>
347         * elf32-m68k.c (elf_m68k_final_write_processing): New function.
348         (elf_backend_final_write_processing): Macro defined as above function.
350 2009-09-25  Martin Thuresson  <martint@google.com>
352         Update sources to make alpha and arm targets compile cleanly with
353         -Wc++-compat:
354         * ecoff.c: Add casts.
355         * ecofflink.c: Add casts.
356         * elf64-alpha.c: Add casts.
357         (struct alpha_elf_got_entry, struct alpha_elf_reloc_entry): Move
358         to top level.
359         (SKIP_HOWTO): Use enum name.
360         * elf32-arm.c: Add casts.
361         (elf32_arm_vxworks_bed): Update code to avoid multiple
362         declarations.
363         (struct map_stub): Move to top level.
365 2009-09-24  H.J. Lu  <hongjiu.lu@intel.com>
367         PR ld/10630
368         * elflink.c (elf_link_output_extsym): Turn off visibility on
369         local symbol.
370         (bfd_elf_final_link): Turn off visibility on dynamic local
371         symbol.
373 2009-09-24  Alan Modra  <amodra@bigpond.net.au>
375         PR binutils/10654
376         * dwarf2.c (lookup_address_in_line_info_table): Remove workaround
377         for invalid location lists generated by gcc-2.95 and Intel 6.0 C++.
378         Remove "function" parm, adjust caller.
380 2009-09-23  Matt Rice  <ratmice@gmail.com>
382         * bfd-in.h (bfd_elf_size_dynamic_sections): Add audit and depaudit
383         arguments.
384         * elflink.c (bfd_elf_size_dynamic_sections): Generate DT_AUDIT,
385         DT_DEPAUDIT from audit/depaudit arguments.
386         (elf_finalize_dynstr): Finalize DT_AUDIT and DT_DEPAUDIT strtab entries.
387         (elf_link_add_object_symbols): Set dt_audit target data when finding a
388         DT_AUDIT.
389         * bfd-in2.h: Regenerate.
390         * bfd-elf.h: Add dt_audit to elf_obj_tdata, and elf_dt_audit macro.
392 2009-09-23  Jie Zhang  <jie.zhang@analog.com>
394         * elf32-bfin.c (_bfinfdpic_size_got_plt): Make sure empty
395         .rel.plt and .plt sections are removed.
396         (elf32_bfinfdpic_size_dynamic_sections): Remove empty .dynbss
397         section.  Remove the duplicated removing of empty .rel.plt
398         section.
400 2009-09-21  Richard Sandiford  <rdsandiford@googlemail.com>
402         * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Extend previous
403         patch to handle the new personality relaxation.
405 2009-09-21  Richard Sandiford  <rdsandiford@googlemail.com>
407         * elf-eh-frame.c (make_pc_relative): New function.
408         (_bfd_elf_write_section_eh_frame): Use it.
410 2009-09-21  Alan Modra  <amodra@bigpond.net.au>
412         * elf32-ppc.c (TLS_GET_ADDR_GLINK_SIZE): Define.
413         (ADD_3_12_2, BEQLR, CMPWI_11_0, LWZ_11_3, LWZ_12_3): Define.
414         (MR_0_3, MR_3_0): Define.
415         (struct ppc_elf_link_hash_table): Add no_tls_get_addr_opt.
416         (ppc_elf_select_plt_layout): Save emit_stub_syms param earlier.
417         (ppc_elf_tls_setup): Add no_tls_get_addr_opt param and save to hash
418         table.  Check for presense of __tls_get_addr_opt
419         (allocate_dynrelocs): Increase glink entry size for __tls_get_addr.
420         (ppc_elf_size_dynamic_sections): Add DT_PPC_TLS_OPT tag.
421         (write_glink_stub): Add param p.
422         (ppc_elf_relocate_section): Adjust write_glink_stub call.
423         (ppc_elf_finish_dynamic_symbol): Emit special glink call stub for
424         __tls_get_addr.
425         * elf32-ppc.h (ppc_elf_tls_setup): Update prototype.
426         * elf64-ppc.c (struct ppc_link_hash_table): Add no_tls_get_addr_opt.
427         (ppc64_elf_tls_setup): Add no_tls_get_addr_opt param and save to hash
428         table.  Check for presense of __tls_get_addr_opt.
429         (ppc64_elf_size_dynamic_sections): Add DT_PPC64_TLS_OPT tag.
430         (LD_R11_0R3, LD_R12_0R3, MR_R0_R3, CMPDI_R11_0, ADD_R3_R12_R13,
431         BEQLR, MR_R3_R0, MFLR_R11, STD_R11_0R1, BCTRL, LD_R11_0R1,
432         LD_R2_0R1, MTLR_R11): Define.
433         (build_tls_get_addr_stub): New function.
434         (ppc_build_one_stub): Call it.
435         (ppc_size_one_stub): Add extra size for __tls_get_addr stub.
436         (ppc64_elf_relocate_section): Don't change nop to ld 2,40(1) for
437         __tls_get_addr plt call.
438         * elf64-ppc.h (ppc64_elf_tls_setup): Update prototype.
440 2009-09-19  Richard Sandiford  <rdsandiford@googlemail.com>
442         * elf-bfd.h (eh_cie_fde): Add personality_offset and
443         make_per_encoding_relative to the CIE structure.  Add a padding field.
444         * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Use 0x70
445         rather than 0xf0 when masking out the base address encoding
446         Record the offset of personality data from the start of the CIE.
447         Remove a repeated elf_backend_can_make_relative_eh_frame check.
448         (find_merged_cie): Take an info argument.  If the personality
449         binds locally, try converting an absolute personality into
450         a local one.
451         (_bfd_elf_discard_section_eh_frame): Use 0x70 rather than 0xf0
452         when masking out the base address encoding.  Update the call to
453         find_merged_cie.
454         (_bfd_elf_eh_frame_section_offset): Discard relocations against
455         the personality data if we are converting into PC-relative form.
456         (_bfd_elf_write_section_eh_frame): Use 0x70 rather than 0xf0
457         when masking out the base address encoding.  Handle
458         make_per_encoding_relative.
460 2009-09-18  Alan Modra  <amodra@bigpond.net.au>
462         PR ld/10406
463         * elf32-ppc.c (ppc_elf_howto_raw): Make R_PPC_EMB_SDAI16 and
464         R_PPC_EMB_SDA2I16 complain_overflow_signed.
465         (create_sdata_sym): Pass info rather than htab.
466         Update all callers.  Ensure symbols are hidden.
467         (ppc_elf_check_relocs): Allow SDAREL16 when shared.
468         (ppc_elf_size_dynamic_sections): When shared, equate _SDA_BASE_ to
469         _GLOBAL_OFFSET_TABLE_.
470         (elf_finish_pointer_linker_section): Don't assume that sdata base
471         symbol is always at 0x8000 offset.  Don't subtract the addend here.
472         (is_static_defined): New function.
473         (ppc_elf_relocate_section): Verify symbol base used in SDA relocs
474         is statically defined.  Clear addend for EMB_SDAI16 and EMB_SDA2I16
475         relocs.  Downgrade error on unexpected section for EMB_SDA2REL
476         reloc symbols to a warning.
478 2009-09-18  Nick Clifton  <nickc@redhat.com>
480         * po/es.po: Updated Spanish translation.
481         * po/vi.po: Updated Vietnamese translation.
483 2009-09-18  Alan Modra  <amodra@bigpond.net.au>
485         * elf64-ppc.c (follow_link, elf_follow_link, ppc_follow_link): New
486         functions.  Use throughout.
487         (ppc64_elf_copy_indirect_symbol): Set direct symbol "oh" field
488         from indirect symbol.
489         (lookup_fdh): Rename from get_fdh.  Follow indirect sym links.
490         (add_symbol_adjust): Simplify.
491         (defined_code_entry, defined_func_desc): New functions.
492         (ppc64_elf_gc_keep): Follow indirect sym links.  Use defined_code_entry.
493         (ppc64_elf_gc_mark_dynamic_ref): Use defined_func_desc and
494         defined_code_entry to follow indirect sym links.
495         (ppc64_elf_gc_mark_hook, func_desc_adjust): Likewise.
496         (ppc_type_of_stub): Follow indirect sym links.
497         (toc_adjusting_stub_needed): Likewise.
498         (ppc_build_one_stub): Likewise.  Make undefined dot-symbols weak
499         rather than defining them at stub.
500         (ppc64_elf_relocate_section): Rewrite call test to avoid multiple
501         assignments in test.
503 2009-09-16  Tristan Gingold  <gingold@adacore.com>
505         * mach-o.h (bfd_mach_o_filetype): Add new constants from darwin10.
506         Reindent.
507         * mach-o.c (bfd_mach_o_cpu_name): Reindent.
508         (bfd_mach_o_filetype_name): Complete with new constants.  Reindent.
509         (bfd_mach_o_print_private_header): Use fputs instead of fprintf
510         when possible to avoid warnings.
511         (bfd_mach_o_print_section_map): Ditto.
512         (bfd_mach_o_section_get_entry_size): New function.
513         (bfd_mach_o_section_get_nbr_indirect): Simplify using the newly
514         added function.
515         (bfd_mach_o_print_dysymtab): Print address of indirect symbols.
517 2009-09-14  Nick Clifton  <nickc@redhat.com>
519         * po/fi.po: Updated Finnish translation.
521 2009-09-11  Nick Clifton  <nickc@redhat.com>
523         * po/bfd.pot: Updated by the Translation project.
525 2009-09-11  Philippe De Muyter  <phdm@macqel.be>
527         * binary.c (binary_object_p): Remove bfd_external_binary_architecture
528         hack.  objcopy `-B' (`--binary-architecture') option is now handled
529         in a generic way.
531 2009-09-11  Nick Clifton  <nickc@redhat.com>
533         * rs6000-core.c (read_hdr): Fix typo in recent C++ compatibility
534         changes.
536 2009-09-11  Jie Zhang  <jie.zhang@analog.com>
538         * elf32-bfin.c (bfinfdpic_relocs_info_find): Just return
539         NULL if `ht' is NULL.
541 2009-09-09  Martin Thuresson  <martin@mtme.org>
543         Update sources to compile cleanly with -Wc++-compat:
544         * aoutx.h: Add casts.
545         * archive.c: Add casts.
546         * archive64.c: Add casts.
547         * archures.c: Add casts.
548         * bfd-in2.h: Regenerated.
549         * bfd.c: Add casts. (enum bfd_direction): Move out to top level.
550         * bfdio.c: Add casts.
551         * binary.c: Add casts.
552         * cache.c (cache_bseek,cache_bread_1,cache_bwrite): Updated
553         parameter to use enum value instead of int.
554         * coffcode.h: Add casts.
555         * coffgen.c: Add casts.
556         * cofflink.c: Add casts.
557         * compress.c: Add casts.
558         * dwarf1.c: Add casts.
559         * dwarf2.c: Add casts. (struct dwarf2_debug): Rename member bfd to
560         bfd_ptr. Update code to use new name.
561         * elf-attrs.c: Add casts.
562         * elf-bfd.h (elf_link_virtual_table_entry): Gives name to
563         anonymous struct. (union gotplt_union, struct
564         elf_link_virtual_table_entry): Move to top level.
565         * elf-eh-frame.c: Add casts.
566         * elf-strtab.c: Add casts.
567         * elf.c: Add casts. (_bfd_elm_make_Section_from_phdr): Change
568         argument name from typename to type_name.
569         * elf32-i386.c: Add casts.
570         * elf64-x86-64.c: Add casts.
571         * elfcode.h: Add casts.
572         * elfcore.h: Add casts.
573         * elflink.c: Add casts.
574         * format.c: Add casts.
575         * hash.c: Add casts.
576         * ihex.c: Add casts.
577         * libaout.h (enum aout_subformat, enum aout_magic): Move to top
578         level.
579         * libbfd.c: Add casts.
580         * linker.c: Add casts.
581         * merge.c: Add casts.
582         * opncls.c: Add casts.
583         * peXXigen.c: Add casts.
584         * peicode.h: Add casts.
585         * reloc.c: Add casts.
586         * section.c: Add casts.
587         * simple.c: Add casts.
588         * srec.c: Add casts.
589         * stabs.c: Add casts.
590         * syms.c: Add casts.
591         * targets.c: Add casts.
592         * tekhex.c: Add casts.
593         * verilog.c: Add casts.
595 2009-09-09  Paolo Bonzini  <bonzini@gnu.org>
597         * configure: Regenerate.
599 2009-09-09  Daniel Jacobowitz  <dan@codesourcery.com>
601         * elf32-arm.c (elf32_arm_final_link_relocate): Set sym_flags
602         for the mode of target PLT entries.
603         (allocate_dynrelocs): Only adjust symbol type if setting its
604         value.
606 2009-09-09  Paolo Bonzini  <bonzini@gnu.org>
608         * configure: Regenerate.
610 2009-09-09  Nick Clifton  <nickc@redhat.com>
612         PR 10478:
613         * elf.c (bfd_section_from_shdr): Do not reject sparc binaries with
614         section headers containing sh_link values of SHN_BEFORE or
615         SHN_AFTER.
616         * elfcode.h (elf_object_p): Likewise.
618 2009-09-09  Tristan Gingold  <gingold@adacore.com>
620         Handle DYLD_INFO introduced by Darwin10.
621         * mach-o.h (bfd_mach_o_load_command_type): Add
622         BFD_MACH_O_LC_DYLD_INFO.
623         (bfd_mach_o_dyld_info_command): New type.
624         (bfd_mach_o_load_command): Add dyld_info field.
625         * mach-o.c (bfd_mach_o_scan_read_str): Reduce size of buf.
626         (bfd_mach_o_scan_read_dyld_info): New function.
627         (bfd_mach_o_scan_read_command): Handle BFD_MACH_O_LC_DYLD_INFO.
628         (bfd_mach_o_bfd_print_private_bfd_data): Ditto.
629         (bfd_mach_o_load_command_name): AddB FD_MACH_O_LC_DYLD_INFO.
630         (bfd_mach_o_print_dyld_info): New function.
632 2009-09-09  M R Swami Reddy <MR.Swami.Reddy@nsc.com>
634         * elf32-cr16.c (elf32_cr16_relocate_section): Add code to discard the
635         linkonce or linker script discarded section.
637 2009-09-09  Alan Modra  <amodra@bigpond.net.au>
639         * elf32-xtensa.c (elf_xtensa_relax_section): Delete -r check.
641 2009-09-07  Andreas Schwab  <schwab@linux-m68k.org>
643         * elf32-m68k.c (rtype_to_howto): If the reloc index is out of
644         range call the bfd error hander and use R_68K_NONE instead.
646 2009-09-07  Tristan Gingold  <gingold@adacore.com>
648         * po/SRC-POTFILES.in: Regenerate.
649         * po/bfd.pot: Regenerate.
651         * bfd.m4 (BFD_HAVE_TIME_TYPE_MEMBER,
652         BFD_HAVE_SYS_STAT_TYPE_MEMBER): Moved to gas/acinclude.m4
653         * configure.in: Move tests for tm_gmtoff, st_mtim.tv_sec and
654         st_mtim.tv_nsec to gas/configure.in
655         (bfd_elf64_ia64_vms_vec): Remove vmsutil.lo
656         * configure: Regenerate.
657         * config.in: Regenerate.
658         * vmsutil.c: Moved to gas/config/te-vms.c
659         * vmsutil.h: Removed.
660         * Makefile.am (BFD32_BACKENDS_CFILES): Remove vmsutil.c
661         (BFD32_BACKENDS): Remove vmsutil.lo
662         * Makefile.in: Regenerate.
664 2009-09-05  Eli Zaretskii  <eliz@gnu.org>
666         * coffcode.h: Include libiberty.h.
668 2009-09-05  Martin Thuresson  <martin@mtme.org>
670         * coff-arm.c (coff_arm_relocate_section)
671         (record_thumb_to_arm_glue, bfd_arm_process_before_allocation):
672         Change member name class to symbol_class.
673         * coff-i960.c (coff_i960_relocate_section) Rename variable
674         class to class_val. Change member name class to symbol_class.
675         * coff-rs6000.c (_bfd_xcoff_swap_aux_in)
676         (_bfd_xcoff_swap_aux_out): Rename arguments class to in_class.
677         * coff-stgo32.c (adjust_aux_in_post)
678         (adjust_aux_out_pre, adjust_aux_out_post): Rename arguments class
679         to in_class.
680         * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in)
681         (_bfd_xcoff64_swap_aux_out): Rename arguments class to in_class.
682         * coffcode.h (coff_pointerize_aux_hook): Rename variable class
683         to n_sclass.
684         * coffgen.c (coff_write_symbol, coff_pointerize_aux): Rename
685         variables named class to n_sclass. (coff_write_symbols): Rename
686         variable class to sym_class. (bfd_coff_set_symbol_class): Rename
687         argument class to symbol_class.
688         * cofflink.c (_bfd_coff_link_hash_newfunc)
689         (coff_link_add_symbols, _bfd_coff_link_input_bfd)
690         (_bfd_coff_write_global_sym, _bfd_coff_generic_relocate_section):
691         Update code to use renamed members.
692         * coffswap.h (coff_swap_aux_in, coff_swap_aux_out): Rename
693         argument class to in_class.
694         * libcoff-in.h (struct coff_link_hash_entry, struct
695         coff_debug_merge_type) Renamed members class to symbol_class and
696         type_class.
697         * libcoff.h Regenerated.
698         * peXXigen.c: (_bfd_XXi_swap_aux_in, _bfd_XXi_swap_aux_out):
699         Rename argument class to in_class.
700         * pef.c (bfd_pef_parse_imported_symbol): Update code to use
701         renamed members.
702         * pef.h (struct bfd_pef_imported_symbol): Changed name of
703         member class to symbol_class.
705 2009-09-04  H.J. Lu  <hongjiu.lu@intel.com>
707         * configure: Regenerated.
709 2009-09-04  Tristan Gingold  <gingold@adacore.com>
711         * configure.in: Bump version to 2.20.51
713 2009-09-04  Alan Modra  <amodra@bigpond.net.au>
715         * elf32-spu.c (spu_elf_relocate_section): Correct 2009-07-24 logic.
717 2009-09-04  Jie Zhang  <jie.zhang@analog.com>
719         * elf32-bfin.c (elf32_bfinfdpic_create_dynamic_sections): Always
720         create .rela.bss.
721         (elf32_bfinfdpic_size_dynamic_sections): Set SEC_EXCLUDE flag
722         for empty .rela.bss and .rel.plt sections.
724 2009-09-03  Adam Nemet  <anemet@caviumnetworks.com>
726         * elfxx-mips.c (mips_elf_calculate_relocation): Don't relocate
727         R_MIPS_JALR unless symbol resolves locally.
729 2009-09-03  Adam Nemet  <anemet@caviumnetworks.com>
731         * elfxx-mips.c (_bfd_mips_elf_check_relocs): Don't set
732         has_static_relocs for R_MIPS_JALR.
734 2009-09-03  Maciej W. Rozycki  <macro@codesourcery.com>
736         * elf64-mips.c (mips_elf64_howto_table_rela): Add support for
737         R_MIPS_TLS_DTPMOD64 and R_MIPS_TLS_TPREL64, replacing the
738         respective stubs.
740 2009-09-01  H.J. Lu  <hongjiu.lu@intel.com>
742         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Declare
743         plt earlier.
745 2009-09-01  Tristan Gingold  <gingold@adacore.com>
747         * makefile.vms: Ported to Itanium VMS.  Remove useless variable and
748         dependencies.  Reindent.
749         * configure.com: Ported to Itanium VMS.  Now generates a build.com
750         to build without make.  Add messages but make edit silent.
751         * hosts/alphavms.h: Add a prototype for stpcpy.
752         * vms.c: Add a missing include for Alpha VMS.
753         * elfxx-ia64.c (ELF_OSABI): Define for OpenVMS.
755 2009-08-31  Jan Beulich  <jbeulich@novell.com>
757         * elf-bfd.h (bfd_elf_get_default_section_type): Declare.
758         * elf.c (bfd_elf_get_default_section_type): New.
759         (elf_fake_sections): Use bfd_elf_get_default_section_type.
761 2009-08-30  H.J. Lu  <hongjiu.lu@intel.com>
763         * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert the
764         accidental checkin.
765         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Likwise.
767 2009-08-30  Alan Modra  <amodra@bigpond.net.au>
769         PR ld/10569
770         * bfd.c (bfd_emul_get_maxpagesize): Don't abort.
771         (bfd_emul_get_commonpagesize): Likewise.
773 2009-08-29  Martin Thuresson  <martin@mtme.org>
775         * elf32-arm.c (struct stub_def): Rename member template to
776         template_sequence. (arm_build_one_stub,
777         find_stub_size_and_template, arm_size_one_stub, arm_map_one_stub):
778         Rename variable template to template_sequence.
779         * elfxx-ia64.c (elfNN_ia64_relax_br, elfNN_ia64_relax_brl):
780         Rename variable template to template_val.
781         * aoutx.h (NAME (aout, make_empty_symbol)): Rename variable
782         new to new_symbol.
783         * coffgen.c (coff_make_empty_symbol)
784         (coff_bfd_make_debug_symbol): Rename variable new to new_symbol.
785         * cpu-ia64-opc.c (ext_reg, ins_imms_scaled): Rename variable
786         new to new_insn.
787         * ecoff.c (_bfd_ecoff_make_empty_symbol): Rename variable new
788         to new_symbol.
789         * elf32-m68k.c (elf_m68k_get_got_entry_type): Rename argument
790         new to new_reloc.
791         * hash.c (bfd_hash_lookup): Rename variable new to new_string.
792         * ieee.c (ieee_make_empty_symbol): Rename variable new to
793         new_symbol.
794         * linker.c (bfd_new_link_order): Rename variable new to
795         new_lo.
796         * mach-o.c (bfd_mach_o_sizeof_headers): Rename variable new to
797         symbol.
798         * oasys.c (oasys_make_empty_symbol): Rename variable new to
799         new_symbol_type.
800         * pdp11.c (NAME (aout, make_empty_symbol)): Rename variable
801         new to new_symbol_type.
802         * plugin.c (bfd_plugin_make_empty_symbol): Rename variable new
803         to new_symbol.
804         * rs6000-core.c (CoreHdr, VmInfo): Rename union member new to
805         new_dump.
806         (read_hdr, rs6000coff_core_p)
807         (rs6000coff_core_file_matches_executable_p)
808         (rs6000coff_core_file_failing_command)
809         (rs6000coff_core_file_failing_signal): Updated function to use new
810         union member name.
811         * som.c (som_make_empty_symbol): Rename variable new to
812         new_symbol_type.
813         * syms.c (_bfd_generic_make_empty_symbol): Rename variable new
814         to new_symbol.
815         * tekhex.c (first_phase, tekhex_make_empty_symbol): Rename
816         variable new to new_symbol.
818 2009-08-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
820         * acinclude.m4 (AM_INSTALL_LIBBFD): Call AM_SUBST_NOTMAKE for
821         bfdlibdir and bfdincludedir.
822         * Makefile.am (bfdlibdir, bfdincludedir): Move definition ...
823         [INSTALL_LIBBFD]: ... here, ...
824         [INSTALL_LIBBFD]: ... and empty overrides here.
825         [!INSTALL_LIBBFD]: (rpath_bfdlibdir): New variable.
826         [!INSTALL_LIBBFD] (libbfd_la_LDFLAGS): Use it.
827         * Makefile.in: Regenerate.
828         * configure: Regenerate.
830 2009-08-26  Maxim Kuvyrkov  <maxim@codesourcery.com>
832         * elf32-m68k.c: Rewrite initialization of GOT entries for TLS
833         relocations.  Rewrite output of dynamic TLS relocations.
834         (DTP_OFFSET, TP_OFFSET): New constants.
835         (dtpoff_base): Update.
836         (tpoff): Rename to tpoff_base, update.
837         (elf_m68k_init_got_entry_static, elf_m68k_init_got_entry_local_shared):
838         New functions.  Move code from elf_m68k_relocate_section here.
839         (elf_m68k_relocate_section): Update.
840         (elf_m68k_finish_dynamic_symbol): Fix handling of local TLS symbols.
842 2009-08-26  Maxim Kuvyrkov  <maxim@codesourcery.com>
844         * elf32-m68k.c (elf_m68k_copy_indirect_symbol): Propagate
845         non_got_ref value.
846         (elf_m68k_check_relocs): Handle dynamic TLS relocations.
847         Handle non_got_ref field.
848         (elf_m68k_adjust_dynamic_symbol): Handle non_got_ref field.
850 2009-08-26  Alan Modra  <amodra@bigpond.net.au>
852         PR ld/10518
853         * linker.c (bfd_find_version_for_sym): Revert warning.
855 2009-08-26  Alan Modra  <amodra@bigpond.net.au>
857         PR ld/10518
858         * linker.c (bfd_find_version_for_sym): Override a "*" match by any
859         other wildcard match.  Warn on multiple wildcard matches.
861 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
863         * Makefile.am (libbfd_la_LDFLAGS): Initialize early, to allow
864         appending.
865         [INSTALL_LIBBFD] (bfdlib_LTLIBRARIES, bfdinclude_HEADERS): Set
866         only in this condition.
867         [!INSTALL_LIBBFD] (noinst_LTLIBRARIES, libbfd_la_LDFLAGS): New,
868         to build but not install libbfd.la in this condition.
869         (install-bfdlibLTLIBRARIES, uninstall-bfdlibLTLIBRARIES)
870         (install_libbfd, install_libbfd): Remove.
871         * Makefile.in: Regenerate.
872         * doc/Makefile.am (AM_CPPFLAGS): Renamed from ...
873         (INCLUDES): ... this.
874         ($(MKDOC)): Adjust.
875         * doc/Makefile.in: Regenerate.
877         * Makefile.am (AUTOMAKE_OPTIONS): Remove cygnus, instead use
878         no-dist and foreign.
879         (EXTRA_libbfd_la_SOURCES): New, list $(CFILES) to allow
880         dependency tracking to work for them.
881         (targets.lo, archures.lo, dwarf.lo): Rewrite to
882         use automake dependency tracking mechanism.
883         (MKDEP, DEP, DEP1, dep.sed, dep, dep-in, dep-am): Remove.
884         (mkdep section): Remove.
885         (BUILT_SOURCES): New, list $(BUILD_HFILES).
886         * Makefile.in: Regenerate.
887         * po/SRC-POTFILES.in, po/bfd.pot: Regenerate.
889         * Makefile.am (datarootdir, docdir, htmldor, pdfdir)
890         (install-pdf, install-pdf-recursive, install-html)
891         (install-html-recursive): Remove.
892         * Makefile.in: Regenerate.
894         * Makefile.in: Regenerate.
895         * aclocal.m4: Likewise.
896         * config.in: Likewise.
897         * configure: Likewise.
899 2009-08-21  Daniel Gutson  <dgutson@codesourcery.com>
901         * elf32-arm.c (arch_has_thumb2_nop): New function.
902         (arch_has_arm_nop): New function.
903         (elf32_arm_final_link_relocate): NOP opcodes changed.
905 2009-08-16  Doug Evans  <dje@google.com>
907         * opncls.c (bfd_close): Until BFD_IN_MEMORY has an iovec,
908         at least don't leak memory.
910 2009-08-13  DJ Delorie  <dj@redhat.com>
912         * elf32-m32c.c (m32c_elf_relax_delete_bytes): Adjust symbol sizes
913         if needed.
915 2009-08-12  Nick Clifton  <nickc@redhat.com>
917         * po/fi.po: Updated Finnish translation.
919 2009-08-11  Bernd Schmidt  <bernd.schmidt@analog.com>
921         Merge some FRV FDPIC changes into the Blackfin code.
922         * elf32-bfin.c (struct bfinfdpic_elf_link_hash_table): Add pointer to
923         summary reloc information.
924         (bfinfdpic_dynamic_got_plt_info): New.
925         (_bfin_create_got_section): Create the PLT section here.
926         (elf32_bfinfdpic_create_dynamic_sections): Not here.
927         (_bfinfdpic_count_nontls_entries): Move out of...
928         (_bfinfdpic_count_got_plt_entries): ... here.
929         (_bfinfdpic_count_relocs_fixups): Likewise.
930         (_bfinfdpic_reset_got_plt_entries): New.
931         (_bfinfdpic_size_got_plt): Move out of...
932         (elf32_bfinfdpic_size_dynamic_sections): ... here.
933         (bfinfdpic_relocate_section): Be careful not to call
934         _bfinfdpic_add_rofixup or _bfinfdpic_add_dyn_reloc for deleted relocs.
935         (bfinfdpic_check_discarded_relocs, bfinfdpic_elf_discard_info):
936         New functions.
937         (elf_backend_discard_info): Define for FD-PIC.
939 2009-08-11  Alan Modra  <amodra@bigpond.net.au>
941         * elflink.c: Add FIXMEs for some places that require octets_per_byte
942         adjustments.
943         * elf-eh-frame.c: Likewise.
944         * merge.c: Likewise.
946 2009-08-11  Alan Modra  <amodra@bigpond.net.au>
948         * configure.in:  Remove elf-ifunc.lo from common ELF files.  Add
949         to x86 and x86_64 configurations.
950         * configure: Regenerate.
952 2009-08-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
954         Stop using bfd_usrdata in libbfd.
955         * coff-stgo32.c (bfd_coff_go32stub): Remove.
956         (stub_bytes, comment): Replace STUBSIZE by GO32_STUBSIZE.
957         (adjust_filehdr_in_post): Declare the abfd parameter as unused.
958         Replace STUBSIZE by GO32_STUBSIZE.  Save now the stub in
959         filehdr_dst->u.go32.stub.  New comment with the reason.
960         (adjust_filehdr_out_pre): Replace STUBSIZE by GO32_STUBSIZE.
961         Substitute the removed macro bfd_coff_go32stub.
962         (adjust_filehdr_out_post, adjust_scnhdr_in_post, adjust_scnhdr_out_pre)
963         (adjust_scnhdr_out_post, adjust_aux_in_post, adjust_aux_out_pre)
964         (adjust_aux_out_post): Replace STUBSIZE by GO32_STUBSIZE.
965         (create_go32_stub, go32_stubbed_coff_bfd_copy_private_bfd_data):
966         Replace STUBSIZE by GO32_STUBSIZE.  Substitute the removed macro
967         bfd_coff_go32stub.
968         * coffcode.h (coff_mkobject_hook): Initialize coff->go32stub.
969         * libcoff-in.h (coff_data_type): New field go32stub.
970         * libcoff.h: Regenerated.
972 2009-08-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
974         Fix go32 stub preservation by objcopy.
975         * coff-stgo32.c (adjust_filehdr_in_post): Use bfd_malloc.
976         (go32_stubbed_coff_bfd_copy_private_bfd_data): Optionally allocate OBFD
977         go32stub.
979 2009-08-10  Nathan Sidwell  <nathan@codesourcery.com>
981         * elf32-arm.c (elf32_arm_size_stubs): Don't die on undefined local
982         symbols.
983         (elf32_arm_final_link_relocate): Treat local undefined symbols the
984         same as global undefined symbols.
985         (elf32_arm_relocate_section): Give an error for local undefined
986         non-weak symbols, unless the reloc will not use the symbol.
988 2009-08-10  Nathan Sidwell  <nathan@codesourcery.com>
990         * elf32-ppc.c (shared_stub_entry, stub_entry): Use r12, not r11.
991         (ppc_elf_relax_section): Use symbol index to distinguish
992         relocatable stubs.
994 2009-08-10  Alan Modra  <amodra@bigpond.net.au>
996         * elf32-ppc.c (ppc_elf_relax_section): Ignore non-code sections.
998 2009-08-10  Alan Modra  <amodra@bigpond.net.au>
1000         * elflink.c (_bfd_elf_adjust_dynamic_symbol): Don't clear plt
1001         info for STT_GNU_IFUNC.
1002         * elf32-ppc.c (ppc_elf_check_relocs): Count a needed plt entry
1003         on got refs in case the symbol turns out to be ifunc.
1004         (ppc_elf_gc_sweep_hook): Similarly.
1005         (ppc_elf_adjust_dynamic_symbol): Adjust assertion.
1006         (allocate_dynrelocs): Don't specially allocate got relocs for ifunc.
1007         (ppc_elf_size_dynamic_sections): Likewise.
1008         (ppc_elf_relocate_section): Likewise.
1010 2009-08-09  Bernd Schmidt  <bernd.schmidt@analog.com>
1012         From Mike Frysinger <michael.frysinger@analog.com>
1013         * elf32-bfin.c (bfin_howto_table, bfin_reloc_map, bfin_check_relocs,
1014         bfin_final_link_relocate, bfin_relocate_section, bfin_gc_sweep_hook,
1015         _bfinfdpic_emit_got_relocs_plt_entries, bfinfdpic_relocate_section,
1016         bfinfdpic_gc_sweep_hook, bfinfdpic_check_relocs,
1017         bfin_finish_dynamic_symbol, bfd_bfin_elf32_create_embedded_relocs):
1018         Adjust to match the renamed reloc definitions.
1020 2009-08-08  Alan Modra  <amodra@bigpond.net.au>
1022         PR 10494
1023         * elf.c (_bfd_elf_make_section_from_shdr): When setting up section
1024         LMAs, use ELF_IS_SECTION_IN_SEGMENT to match sections with headers.
1026 2009-08-07  Tom Tromey  <tromey@redhat.com>
1028         * elf32-microblaze.c (microblaze_elf_check_relocs): Avoid strict
1029         aliasing error.
1031 2009-08-06  Michael Eager <eager@eagercon.com>
1033         * Makefile.am: Add cpu-microblaze.{lo,c}, elf32-microblaze.{lo,c}.
1034         * Makefile.in: Regenerate.
1035         * archures.c: Add bfd_arch_microblaze.
1036         * bfd-in2.h: Regenerate.
1037         * config.bfd: Add microblaze target.
1038         * configure.in: Add bfd_elf32_microblaze_vec target.
1039         * configure: Regenerate.
1040         * cpu-microblaze.c: New.
1041         * elf32-microblaze.c: New.
1042         * libbfd-in.h: Add prototype _bfd_dwarf2_fixup_section_debug_loc().
1043         * libbfd.h: Regenerate.
1044         * reloc.c: Add MICROBLAZE relocations.
1045         * section.c: Add struct relax_table and relax_count to section.
1046         * targets.c: Add bfd_elf32_microblaze_vec.
1048 2009-08-06  Jakub Jelinek  <jakub@redhat.com>
1049             Alan Modra  <amodra@bigpond.net.au>
1051         PR binutils/10492
1052         * elf.c (sym_is_global): Return true even for BSF_GNU_UNIQUE
1053         symbols.
1054         * elf32-mips.c (mips_elf_sym_is_global): Likewise.
1055         * elfn32-mips.c (mips_elf_sym_is_global): Likewise.
1057 2009-08-06  Nathan Sidwell  <nathan@codesourcery.com>
1059         * elf32-arm.c (elf32_arm_size_stubs): Call layout_sections_again
1060         at least once when fixing cortex-a8.
1062 2009-08-05  Chao-ying Fu  <fu@mips.com>
1064         * elf32-mips.c (mips_reloc_map): Add BFD_RELOC_MIPS_JALR.
1065         * elfxx-mips.c (JAL_TO_BAL_P): New define to transform JAL to BAL
1066         for CPUs.  It is true for RM9000.
1067         (JALR_TO_BAL_P): New define to transform JALR to BAL.  It is true
1068         for all CPUs.
1069         (mips_elf_perform_relocation): Use JAL_TO_BAL_P and JALR_TO_BAL_P
1070         to guard the transformation.
1072 2009-08-05  Trevor Smigiel  <Trevor_Smigiel@playstation.sony.com>
1074         * elf32-spu.h (spu_elf_params): Add member emit_fixups.
1075         (spu_elf_size_sections): Declare prototype.
1076         * elf32-spu.c (spu_link_hash_table): Add member sfixup.
1077         (FIXUP_RECORD_SIZE, FIXUP_GET, FIXUP_PUT): New macros.
1078         (spu_elf_emit_fixup): New function.
1079         (spu_elf_relocate_section): Emit fixup for each SPU_ADDR32.
1080         (spu_elf_size_sections): New function.
1082 2009-08-05  Nathan Sidwell  <nathan@codesourcery.com>
1084         * elf32-arm.c (elf32_arm_stub_type): Add arm_stub_a8_veneer_lwm.
1085         (arm_build_one_stub): Build a8 veneers as a separate pass.
1086         (cortex_a8_erratum_scan): Add prev_num_a8_fixes and stub_changed_p
1087         parameters.  Use them to check if we create a different a8 fixup
1088         than the previous pass.
1089         (elf32_arm_size_stubs): Move scope of stub_changed and
1090         prev_num_a8_fixes into main loop.
1091         (elf32_arm_build_stubs): Build a8 veneers in a second pass.
1093 2009-08-04  Alan Modra  <amodra@bigpond.net.au>
1095         * elf32-ppc.c (ppc_elf_relax_section): Correct conditions under
1096         which find_plt_ent is called.  Delete redundant code.
1098 2009-08-03  H.J. Lu  <hongjiu.lu@intel.com>
1100         PR binutils/10363
1101         * elf.c (bfd_elf_string_from_elf_section): Return NULL on
1102         invalid string offset.
1104 2009-08-03  H.J. Lu  <hongjiu.lu@intel.com>
1106         PR ld/10433
1107         * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Set got
1108         to htab->init_got_offset and plt to htab->init_plt_offset
1109         when discarding space for dynamic relocations.
1111 2009-08-03  Alan Modra  <amodra@bigpond.net.au>
1113         * elf32-ppc.c (struct plt_entry): Revise comments.
1114         (ppc_elf_check_relocs): Don't create needless plt_entry info
1115         for non-pie executables.  Don't test info->pie when info->shared
1116         already covers that case.
1117         (ppc_elf_gc_sweep_hook): Adjust for above change.
1118         (add_stub_sym): Don't test info->pie when info->shared tested.
1119         (allocate_dynrelocs, ppc_elf_size_dynamic_sections): Likewise.
1120         (write_glink_stub, ppc_elf_finish_dynamic_symbol): Likewise.
1121         (ppc_elf_relax_section): Adjust find_plt_ent arguments.
1122         (ppc_elf_relocate_section): Likewise.
1124 2009-08-03  Alan Modra  <amodra@bigpond.net.au>
1126         * elf32-ppc.c (ppc_elf_check_relocs): Always add a plt ref count
1127         for local ifunc symbols in non-pie executables, regardless of
1128         reloc type.  Don't specially create ifunc dyn relocs.  Tidy ifunc
1129         code so that it's obvious that we only do anything special for
1130         local ifunc syms.
1131         (ppc_elf_gc_sweep_hook): Adjust to suit check_relocs changes.
1132         (allocate_dynrelocs): Correct comment for syms defined in plt.
1133         Don't specially allocate ifunc dyn relocs.
1134         (ppc_elf_relax_section): Relax branches to ifunc plt entries too.
1135         (ppc_elf_relocate_section): Set "relocation" value for ifunc
1136         syms in non-pie executables.  No specially allocated dyn relocs
1137         for ifunc to write.  Allow for local sym on R_PPC_RELAX32_PLT.
1138         (ppc_elf_finish_dynamic_symbol): Set value of ifunc symbols in
1139         a non-pie executable.
1141 2009-08-02  H.J. Lu  <hongjiu.lu@intel.com>
1142             Jakub Jelinek  <jakub@redhat.com>
1144         PR ld/6443
1145         * elf32-i386.c (elf_i386_tls_transition): Check executable
1146         instead of shared for TLS when building PIE.
1147         (elf_i386_check_relocs): Likewise.
1148         (elf_i386_allocate_dynrelocs): Likewise.
1149         (elf_i386_relocate_section): Likewise.
1151         * elf64-x86-64.c (elf64_x86_64_tls_transition): Check executable
1152         instead of shared for TLS when building PIE.
1153         (elf64_x86_64_check_relocs): Likewise.
1154         (elf64_x86_64_allocate_dynrelocs): Likewise.
1155         (elf64_x86_64_relocate_section): Likewise.
1157 2009-07-31  Anthony Green  <green@moxielogic.com>
1159         * config.bfd (targ_cpu): Add moxie-uclinux support.
1161 2009-07-31  Hans-Peter Nilsson  <hp@bitrange.com>
1163         * linker.c (fix_syms): Consider SEC_LOAD when choosing section.
1165 2009-07-30  Alan Modra  <amodra@bigpond.net.au>
1167         * elf32-ppc.c (ppc_elf_check_relocs): Always set up sections
1168         used by indirect function support.  Count dynamic relocs for
1169         ifunc syms.
1170         (ppc_elf_adjust_dynamic_symbol): Tweak for ifunc.
1171         (allocate_dynrelocs): Allocate all non-dynamic ifunc plt entries
1172         in iplt and their relocs in reliplt.  Don't make ifunc syms
1173         dynamic.  Allocate got entry relocs for non-dynamic ifunc in
1174         reliplt.  Handle other dynamic relocs for ifunc.
1175         (ppc_elf_size_dynamic_sections): Alloc dyn relocs for static
1176         ifunc in reliplt, likewise relocs for got against local ifunc.
1177         Typo fix on reliplt size adjust.
1178         (ppc_elf_relocate_section): Don't use plt scheme of allocating
1179         relocs 1-1 with entries for iplt, instead just add using
1180         reloc_count.  Write got relocs and dyn relocs for ifunc to reliplt.
1181         Error on invalid ifunc dyn relocs.
1182         (ppc_elf_finish_dynamic_symbol): Adjust for non-dynamic ifunc plt
1183         in iplt/reliplt.
1184         * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_JMP_IREL,
1185         R_PPC64_REL16, R_PPC64_REL16_LO, R_PPC64_REL16_HI, R_PPC64_REL16_HA.
1186         (ppc64_elf_reloc_type_lookup): Handle new relocs.
1187         (ppc64_elf_check_relocs): Likewise.  Count dyn relocs for ifunc.
1188         (allocate_dynrelocs): As for elf32-ppc.c above.
1189         (ppc64_elf_size_dynamic_sections): Likewise.
1190         (ppc_build_one_stub): Put non-dynamic ifunc plt call stubs in iplt,
1191         and their relocs in reliplt.  Use R_PPC64_JMP_IREL.
1192         (ppc_size_one_stub): Similarly.
1193         (ppc64_elf_relocate_section): As for elf32-ppc.c above.  Handle new
1194         relocs too.
1195         (ppc64_elf_finish_dynamic_symbol): As for elf32-ppc.c above.
1197 2009-07-29  Hans-Peter Nilsson  <hp@bitrange.com>
1199         * elf64-mmix.c (mmix_elf_relax_section): Revert 2009-05-27
1200         change.  Add note to head comment.
1202 2009-07-28  Jan Beulich  <jbeulich@novell.com>
1204         * archive.c (get_extended_arelt_filename): Remove redundant
1205         range check on index.
1207 2009-07-27  Doug Kwan  <dougkwan@google.com>
1209         * elf32-arm.c (stub_hash_newfunc): Initialize field output_name.
1211 2009-07-27  H.J. Lu  <hongjiu.lu@intel.com>
1213         * archures.c bfd_*_arch): Sorted.
1214         (bfd_archures_list): Likewise.
1216 2009-07-27  M R Swami Reddy <MR.Swami.Reddy@nsc.com>
1218         * elf32-cr16.c (elf_cr16_final_link_relocate): Add code to handle
1219         to R_cr16_NUM32 relocation.
1221 2009-07-26  Michael Eager  <eager@eagercon.com>
1223         * archures.c: Add bfd_mach_ppc_405
1224         * bfd-in2.h: Same.
1226 2009-07-25  H.J. Lu  <hongjiu.lu@intel.com>
1228         * cpu-i386.c (bfd_x86_64_arch): Fix comment typos.
1229         * cpu-l1om.c (bfd_l1om_arch): Likewise.
1231 2009-07-25  H.J. Lu  <hongjiu.lu@intel.com>
1233         * archures.c (bfd_architecture): Add bfd_arch_l1om.
1234         (bfd_l1om_arch): New.
1235         (bfd_archures_list): Add &bfd_l1om_arch.
1236         * bfd-in2.h: Regenerated.
1238         * config.bfd (targ64_selvecs): Add bfd_elf64_l1om_vec if
1239         bfd_elf64_x86_64_vec is supported.  Add bfd_elf64_l1om_freebsd_vec
1240         if bfd_elf64_x86_64_freebsd_vec is supported.
1241         (targ_selvecs): Likewise.
1243         * configure.in: Support bfd_elf64_l1om_vec and
1244         bfd_elf64_l1om_freebsd_vec.
1245         * configure: Regenerated.
1247         * cpu-l1om.c: New.
1249         * elf64-x86-64.c (elf64_l1om_elf_object_p): New.
1250         (bfd_elf64_l1om_vec): Likewise.
1251         (bfd_elf64_l1om_freebsd_vec): Likewise.
1253         * Makefile.am (ALL_MACHINES): Add cpu-l1om.lo.
1254         (ALL_MACHINES_CFILES): Add cpu-l1om.c.
1255         * Makefile.in: Regenerated.
1257         * targets.c (bfd_elf64_l1om_vec): New.
1258         (bfd_elf64_l1om_freebsd_vec): Likewise.
1259         (_bfd_target_vector): Add bfd_elf64_l1om_vec and
1260         bfd_elf64_l1om_freebsd_vec.
1262 2009-07-24  Trevor Smigiel  <Trevor_Smigiel@playstation.sony.com>
1263             Alan Modra  <amodra@bigpond.net.au>
1265         * reloc.c (BFD_RELOC_SPU_ADD_PIC): Define.
1266         * bfd-in2.h: Regenerate.
1267         * libbfd.h: Regenerate.
1268         * elf32-spu.c (elf_howto_table): Add entries SPU_ADD_PIC.
1269         (spu_elf_bfd_to_reloc_type): Handle SPU_ADD_PIC.
1270         (spu_elf_relocate_section): Patch instructions marked by SPU_ADD_PIC.
1272 2009-07-23  H.J. Lu  <hongjiu.lu@intel.com>
1274         PR ld/10434
1275         * elf64-x86-64.c (elf64_x86_64_check_relocs): Check executable
1276         instead of shared for R_X86_64_TPOFF32.
1277         (elf64_x86_64_relocate_section): Likewise.
1279 2009-07-23  Ulrich Drepper  <drepper@redhat.com>
1281         * elf-bfd.h (struct elf_link_hash_entry): Add unique_global field.
1282         * elf.c (swap_out_syms): Set binding to STB_GNU_UNIQUE for symbols
1283         with the BSF_GNU_UNIQUE flag bit set.
1284         * elfcode.h (elf_slurp_symbol_table): Set the BSF_GNU_UNIQUE flag
1285         for symbols with STB_GNU_UNIQUE binding.
1286         * elflink.c (_bfd_elf_merge_symbol): Set unique_global for symbols
1287         with the STB_GNU_UNIQUE binding.
1288         (elf_link_add_object_symbols): Set the BSF_GNU_UNIQUE flag for
1289         symbols with STB_GNU_UNIQUE binding.  Set STB_GNU_UNIQUE for
1290         symbols with the unique_global field set.
1291         (elf_link_output_extsym): Set unique_global field for symbols with
1292         the STB_GNU_UNIQUE binding.
1293         * syms.c (struct bfd_symbol): Define BSF_GNU_UNIQUE flag bit.
1294         (bfd_print_symbol_vandf): Print a 'u' character for BSF_GNU_UNIQUE
1295         symbols.
1296         (bfd_decode_symclass): Return a 'u' character for BSF_GNU_UNIQUE
1297         symbols.
1298         * bfd-in2.h: Regenerate.
1300 2009-07-22  H.J. Lu  <hongjiu.lu@intel.com>
1302         * elflink.c (elf_link_output_extsym): Revert the last change.
1304 2009-07-22  H.J. Lu  <hongjiu.lu@intel.com>
1306         PR ld/10433
1307         * elflink.c (elf_link_output_extsym): Special case ifunc syms
1308         when ref_regular, not def_regular.
1310 2009-07-21  H.J. Lu  <hongjiu.lu@intel.com>
1312         PR ld/10426
1313         * elflink.c (elf_link_add_object_symbols): Turn an IFUNC symbol
1314         from a DSO into a normal FUNC symbol.
1315         (elf_link_output_extsym): Turn an undefined IFUNC symbol into
1316         a normal FUNC symbol.
1318 2009-07-17  Chao-ying Fu  <fu@mips.com>
1320         * elfxx-mips.c (LOAD_INTERLOCKS_P): New define.
1321         (_bfd_mips_elf_size_dynamic_sections): For CPUs without load
1322         interlocking, the last PLT entry needs a nop in the branch delay slot.
1323         (_bfd_mips_elf_finish_dynamic_symbol): For CPUs with load itnerlocking,
1324         output the last two PLT entries in reverse order.
1326 2009-07-16  H.J. Lu  <hongjiu.lu@intel.com>
1328         * elf32-i386.c (elf_i386_relocate_section): Don't get local
1329         STT_GNU_IFUNC symbol for relocatable link.
1330         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1332 2009-07-10  H.J. Lu  <hongjiu.lu@intel.com>
1334         * bfdio.c (bfd_iovec): Add comments for bmmap.
1335         * bfd-in2.h: Regenerated.
1337 2009-07-10  H.J. Lu  <hongjiu.lu@intel.com>
1339         * Makefile.am: Run "make dep-am".
1340         * Makefile.in: Regenerated.
1342 2009-07-10  Doug Kwan  <dougkwan@google.com>
1344         * elf32-arm.c (stub_hash_newfunc): Initialize fields
1345         target_addend and orig_insn.
1347 2009-07-10  Tom Tromey  <tromey@redhat.com>
1349         * Makefile.am (dwarf2.lo): Use dwarf2.h, not elf/dwarf2.h.
1350         (elf-eh-frame.lo): Likewise.
1351         (elf32-bfin.lo): Likewise.
1352         (elf32-frv.lo): Likewise.
1353         (elf32-xc16x.lo): Likewise.
1354         * Makefile.in: Rebuild.
1355         * dwarf2.c: Included dwarf.h, not elf/dwarf2.h.
1356         * elf-eh-frame.c: Likewise.
1357         * elf32-bfin.c: Likewise.
1358         * elf32-frv.c: Likewise.
1359         * elf32-xc16x.c: Likewise.
1361 2009-07-10  Julian Brown  <julian@codesourcery.com>
1363         * elf32-arm.c (arm_build_one_stub): Use the hash entry of the
1364         symbol a stub entry is derived from, not the entry for the stub
1365         itself, in call to elf32_arm_final_link_relocate.
1367 2009-07-10  H.J. Lu  <hongjiu.lu@intel.com>
1369         * elf.c (_bfd_elf_get_synthetic_symtab): Remove leading zeros
1370         when reporting  addends.
1372 2009-07-10  Alan Modra  <amodra@bigpond.net.au>
1374         * elf32-spu.c (spu_elf_size_stubs): Do set up soft-icache manager
1375         data even when no stubs.
1376         (spu_elf_place_overlay_data, spu_elf_build_stubs): Adjust.
1378 2009-07-10  Alan Modra  <amodra@bigpond.net.au>
1380         * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_IRELATIVE.
1381         (ppc_elf_get_synthetic_symtab): Report addend.
1382         (PLT_IFUNC): Define.
1383         (struct ppc_elf_link_hash_table): Add iplt and reliplt.
1384         (ppc_elf_create_glink): New function.
1385         (ppc_elf_create_dynamic_sections): Use it.
1386         (ppc_elf_add_symbol_hook): Set has_ifunc_symbols.
1387         (update_local_sym_info): Allocate space for local_plt array.
1388         Don't bump local_got_refcounts for PLT_IFUNC.  Return local_plt
1389         entry pointer.
1390         (is_branch_reloc): New function.
1391         (ppc_elf_check_relocs): Handle STT_GNU_IFUNC symbols.
1392         (ppc_elf_gc_sweep_hook): Likewise.
1393         (ppc_elf_adjust_dynamic_symbol): Likewise.
1394         (allocate_dynrelocs): Likewise.
1395         (ppc_elf_size_dynamic_sections): Likewise.
1396         (ppc_elf_relocate_section): Likewise.
1397         (branch_reloc_hash_match): Use is_branch_reloc.
1398         (ppc_elf_tls_optimize): Adjust for local_plt.
1399         (write_glink_stub): New function, extracted from..
1400         (ppc_elf_finish_dynamic_symbol): ..here.  Handle STT_GNU_IFUNC.
1401         (ppc_elf_finish_dynamic_sections): Only write plt resolver and
1402         branch table when dynamic.
1403         (elf_backend_post_process_headers): Define.
1404         * elf64-ppc.c (elf_backend_post_process_headers): Define.
1405         (ppc64_elf_howto_raw): Add R_PPC64_IRELATIVE.
1406         (ppc64_elf_get_synthetic_symtab): Report addend.
1407         (struct ppc_stub_hash_entry): Add plt_ent.
1408         (PLT_IFUNC): Define.
1409         (struct ppc_link_hash_table): Add iplt and reliplt.
1410         (create_linkage_sections): Make .iplt and .rela.iplt sections.
1411         (ppc64_elf_add_symbol_hook): Set has_ifunc_symbols.
1412         (update_local_sym_info): Allocate space for local_plt array.
1413         Don't bump local_got_ents for PLT_IFUNC.  Return local_plt
1414         entry pointer.
1415         (update_plt_info): Pass pointer to plt_entry rather than sym hash,
1416         and don't change hash flags here.
1417         (is_branch_reloc): New function.
1418         (ppc64_elf_check_relocs): Handle STT_GNU_IFUNC.
1419         (ppc64_elf_gc_sweep_hook): Likewise.
1420         (ppc64_elf_adjust_dynamic_symbol): Likewise.
1421         (allocate_dynrelocs): Likewise.
1422         (ppc64_elf_size_dynamic_sections): Likewise.
1423         (ppc_build_one_stub, ppc_size_one_stub): Likewise.
1424         (ppc64_elf_size_stubs): Likewise.
1425         (ppc64_elf_relocate_section): Likewise.
1426         (get_sym_h): Adjust for local_plt.
1427         (branch_reloc_hash_match): Use is_branch_reloc.
1428         (ppc_type_of_stub): Pass plt_entry pointer and handle ifunc.
1429         (ppc64_elf_toc): Ignore SEC_EXCLUDE sections.
1431 2009-07-10  Alan Modra  <amodra@bigpond.net.au>
1433         * elf.c (_bfd_elf_get_synthetic_symtab): Report addends.
1435 2009-07-10  Alan Modra  <amodra@bigpond.net.au>
1437         * elf-bfd.h (struct elf_link_hash_entry): Clarify ref_regular
1438         and ref_regular_nonweak comment.
1439         * elflink.c (elf_link_output_extsym): Special case ifunc syms
1440         when def_regular, not ref_regular.
1441         (elf_link_add_object_symbols): Don't set needs_plt on ifunc syms,..
1442         * elf32-i386.c (elf_i386_check_relocs): ..set it here instead..
1443         * elf64-x86-64.c (elf64_x86_64_check_relocs): ..and here.
1445 2009-07-09  Alan Modra  <amodra@bigpond.net.au>
1447         * elf32-spu.c (mark_functions_via_relocs): Init broken_cycle field
1448         of malloc'd struct call_info.
1449         (pasted_function): Likewise, priority too.
1451 2009-07-07  Alan Modra  <amodra@bigpond.net.au>
1453         * elf32-spu.c (spu_elf_auto_overlay): Take into account section
1454         alignment when packing sections into overlays.
1456 2009-07-03  Cary Coutant  <ccoutant@google.com>
1458         * dwarf2.c (decode_line_info): Ignore DW_LNE_set_discriminator.
1460 2009-07-03  Dave Korn  <dave.korn.cygwin@gmail.com>
1462         * coffcode.h (sec_to_styp_flags):  Partially revert (functional
1463         changes only) earlier patch:-
1465 2009-06-25  Kai Tietz  <kai.tietz@onevision.com>
1467         * coffcode.h (sec_to_styp_flags): Set discardable for .reloc and
1468         give .debug and .reloc data characteristics.
1469         (DOT_RELOC): New define for .reloc section string.
1470         (coff_write_object_contents): Use DOT_RELOC instead of string.
1472 2009-07-02  Tom Tromey  <tromey@redhat.com>
1474         * aoutx.h (aout_get_external_symbols): Declare 'amt' locally.
1475         * bfdwin.c (bfd_free_window): Cast to unsigned long.
1477 2009-07-01  Nick Clifton  <nickc@redhat.com>
1479         * elf-m10300.c: Remove trailing white space.
1480         * reloc.c: Likewise.
1482 2009-07-01  Douglas B Rupp  <rupp@gnat.com>
1484         * bfd.m4 (BFD_HAVE_TIME_TYPE_MEMBER,
1485         BFD_HAVE_SYS_STAT_TYPE_MEMBER): New config functions.
1486         * configure.in: Use them.
1487         * configure: Regenerate.
1488         * config.in: Regenerate.
1489         * vmsutil.c: Include sysdep.h, remove ansidecl.h.
1490         #define _BSD_SOURCE. Add comments.
1491         (vms_file_stats_name): Calculate creation date based on available
1492         runtime data. Return 1 for version instead of 0.
1494 2009-07-01  Nick Clifton  <nickc@redhat.com>
1496         PR 10072
1497         * elf32-arm.c (elf32_arm_final_link_relocate): Add code to handle
1498         to R_ARM_THM_PC8 relocation.
1500 2009-06-29  Nick Clifton  <nickc@redhat.com>
1502         * elf-m10300.c (mn10300_elf_relax_section): Allow for the
1503         different uses of the relocations addend when a symbol is in a
1504         merged section.
1506 2009-06-27  H.J. Lu  <hongjiu.lu@intel.com>
1508         PR ld/10337
1509         * elf.c (bfd_section_from_shdr): Don't change sh_link for
1510         SHT_REL/SHT_RELA sections on executable nor shared library.
1511         Treat SHT_REL/SHT_RELA sections with sh_link set to SHN_UNDEF
1512         as a normal section.
1514 2009-06-25  Nick Clifton  <nickc@redhat.com>
1516         * elf-m10300.c (mn10300_elf_relax_section): Handle non-section
1517         symbols with SEC_MERGE flag.
1519 2009-06-25  Kai Tietz  <kai.tietz@onevision.com>
1521         * coffcode.h (sec_to_styp_flags): Set discardable for .reloc and
1522         give .debug and .reloc data characteristics.
1523         (DOT_RELOC): New define for .reloc section string.
1524         (coff_write_object_contents): Use DOT_RELOC instead of string.
1526 2009-06-25  Tristan Gingold  <gingold@adacore.com>
1528         * mach-o-target.c (bfd_mach_o_get_dynamic_symtab_upper_bound)
1529         (bfd_mach_o_canonicalize_dynamic_symtab)
1530         (bfd_mach_o_get_synthetic_symtab): Defines.
1531         (TARGET_NAME_BACKEND): Add bfd_mach_o_print_thread entry.
1532         (TARGET_NAME): Use Mach-O specific functions for dynamic.
1534         * mach-o-i386.c (bfd_mach_o_i386_swap_reloc_in): Fix howto indexes
1535         for scattered relocations.
1536         (bfd_mach_o_i386_print_thread): New function.
1537         (bfd_mach_o_print_thread): Define.
1539         * mach-o.c (text_section_names_xlat): Add an entry for __const.
1540         (bfd_mach_o_canonicalize_one_reloc, bfd_mach_o_canonicalize_relocs):
1541         New functions extracted from ...
1542         (bfd_mach_o_canonicalize_reloc): ... This.  Simplified.
1543         (bfd_mach_o_get_dynamic_reloc_upper_bound): New function.
1544         (bfd_mach_o_canonicalize_dynamic_reloc): New function.
1545         (bfd_mach_o_i386_flavour_string): Adjusted after enum renaming.
1546         (bfd_mach_o_ppc_flavour_string): Reindentation.  Add 64 bits cases.
1547         (bfd_mach_o_scan_read_dylinker): Do not create a section anymore.
1548         Set name_str field.
1549         (bfd_mach_o_scan_read_dylib): Ditto.
1550         (bfd_mach_o_scan_read_thread): Set mdata at declaration.  Add comments,
1551         reindent.
1552         (bfd_mach_o_scan_read_dysymtab): Set mdata at declaration.  Correctly
1553         decode isym and flags on little endian targets.  Set dysymtab field.
1554         (bfd_mach_o_scan_start_address): Adjust for enum names.
1555         (bfd_mach_o_lookup_section): Do not look for segments anymore.
1556         (bfd_mach_o_print_section): Display bfd section name.
1557         (bfd_mach_o_print_segment): Display none if no name.
1558         (bfd_mach_o_print_dysymtab): Display next index for local, external
1559         and undefined symbols.
1560         (bfd_mach_o_bfd_print_private_bfd_data): Adjust code by using name_str.
1561         Display dylinker name. Display thread and unixthread commands content.
1562         (bfd_mach_o_print_thread): New macro.
1564         * mach-o.h (bfd_mach_o_mach_header_magic): Align numbers.
1565         (bfd_mach_o_ppc_thread_flavour): Ditto.
1566         (bfd_mach_o_i386_thread_flavour): Ditto.
1567         (BFD_MACH_O_PPC_THREAD_STATE_NONE): New enum.
1568         (BFD_MACH_O_x86_THREAD_STATE_NONE): Replaces
1569         BFD_MACH_O_THREAD_STATE_NONE.
1570         (bfd_mach_o_segment_command): Remove segment field.
1571         (bfd_mach_o_thread_flavour): Field offset is now unsigned long.
1572         (bfd_mach_o_dylinker_command): Remove section field, add name_str.
1573         (bfd_mach_o_prebound_dylib_command): Ditto.
1574         (bfd_mach_o_dylib_command): Ditto.
1575         (bfd_mach_o_prebound_dylib_command): Remove section field.
1576         (mach_o_data_struct): Add dysymtab field.
1577         (bfd_mach_o_backend_data): Add _bfd_mach_o_print_thread field.
1578         (bfd_mach_o_get_reloc_upper_bound, bfd_mach_o_canonicalize_reloc)
1579         (bfd_mach_o_build_commands): Remove parameter names and attributes.
1580         (bfd_mach_o_get_dynamic_reloc_upper_bound)
1581         (bfd_mach_o_canonicalize_dynamic_reloc): New prototypes.
1583 2009-06-25  Rafael Avila de Espindola  <espindola@google.com>
1585         * plugin.c (load_plugin): Use stat and S_ISREG instead of the d_type
1586         field of struct dirent.
1588 2009-06-23  Tristan Gingold  <gingold@adacore.com>
1590         * vms.c (vms_get_synthetic_symtab): Remove duplicate definition
1591         of this macro.  Fix indentation.
1593 2009-06-22  Christophe Lyon  <christophe.lyon@st.com>
1595         * elf32-arm.c (elf32_arm_size_stubs): Use PLT address as
1596         destination for defined dynamic symbols when deciding whether to
1597         insert a stub or not.
1598         (allocate_dynrelocs): Make sure functions are not marked as Thumb
1599         when actually accessed through a PLT, even when generating a
1600         shared lib.
1602 2009-06-22  Tristan Gingold  <gingold@adacore.com>
1604         * mach-o.c (bfd_mach_o_canonicalize_reloc): Append a sentinel to
1605         the relocs array.
1607 2009-06-22  Alan Modra  <amodra@bigpond.net.au>
1609         * elf32-ppc.c (ppc_elf_check_relocs): Handle R_PPC_RELAX* in switch.
1610         * elf32-v850.c (v850_elf_relocate_section): Warning fix.
1612 2009-06-22  Alan Modra  <amodra@bigpond.net.au>
1614         * elf64-ppc.c (ppc64_elf_edit_opd): Avoid gcc warning.
1616 2009-06-19  H.J. Lu  <hongjiu.lu@intel.com>
1618         * elflink.c (elf_link_add_object_symbols): Avoid warning
1619         from -Wjump-misses-init in gcc 4.5.0.
1621 2009-06-19  H.J. Lu  <hongjiu.lu@intel.com>
1623         * elf32-i386.c (elf_i386_check_relocs): Properly check local
1624         symbol on error.
1625         * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1627 2009-06-19  H.J. Lu  <hongjiu.lu@intel.com>
1629         * elf32-i386.c (elf_i386_tls_transition): Add a parameter,
1630         r_symndx.  Report local symbol name on error.
1631         (elf_i386_check_relocs): Updated.  Report local symbol name on
1632         error.
1633         (elf_i386_gc_sweep_hook): Updated.
1634         (elf_i386_relocate_section): Likewise.
1636         * elf64-x86-64.c (elf64_x86_64_tls_transition): Add a parameter,
1637         r_symndx.  Report local symbol name on error.
1638         (elf64_x86_64_check_relocs): Updated.  Report local symbol name
1639         on error.
1640         (elf64_x86_64_gc_sweep_hook): Updated.
1641         (elf64_x86_64_relocate_section): Likewise.
1643 2009-06-19  Tristan Gingold  <gingold@adacore.com>
1645         * mach-o.c (bfd_mach_o_print_private_header): Fix format character.
1647 2009-06-19  Tristan Gingold  <gingold@adacore.com>
1649         * mach-o.c (bfd_mach_o_scan_read_symtab_symbols): Add prototype.
1650         (bfd_mach_o_version): Use bfd_mach_o_get_data instead of direct access.
1651         (bfd_mach_o_valid): Ditto.
1652         (bfd_mach_o_wide_p): Ditto.
1653         (bfd_mach_o_canonicalize_reloc): Ditto.
1654         (bfd_mach_o_build_commands): Ditto.
1655         (bfd_mach_o_scan_read_thread): Ditto.
1656         (bfd_mach_o_flatten_sections): Ditto.
1657         (bfd_mach_o_scan_start_address): Ditto.
1658         (bfd_mach_o_lookup_section): Ditto.
1659         (bfd_mach_o_core_fetch_environment): Ditto.
1660         (bfd_mach_o_write_contents): Ditto.  Handle reexport_dylib.
1661         (bfd_mach_o_scan_write_relocs): Adjust for bfd_mach_o_get_data.
1662         (bfd_mach_o_scan_write_symtab): Ditto.
1663         Use macros instead of hard-coded values.
1664         (bfd_mach_o_scan_read_symtab_symbol): Make the function static.
1665         Use bfd_mach_o_get_data instead of direct access.  Use macros
1666         instead of hard-coded values.
1667         (bfd_mach_o_scan_read_symtab_strtab): Make the function static.
1668         Remove sym argument and get section from mdata.
1669         Move code into the else branch.
1670         (bfd_mach_o_scan_read_symtab_symbols): Make the function static.
1671         Remove sym argument and get section from mdata.  Adjust code.
1672         (bfd_mach_o_scan_read_dylib): Move assertion into the created
1673         switch (which replaces consecutive if statements).
1674         (bfd_mach_o_scan_read_dysymtab): Rename seg to cmd.  Load
1675         module table, table of content, indirect symbols and external
1676         referenced symbols.
1677         (bfd_mach_o_scan_read_symtab): Renames seg to symtab.  Set symtab
1678         field.
1679         (bfd_mach_o_scan_read_linkedit): New function.
1680         (bfd_mach_o_scan_read_str): Ditto.
1681         (bfd_mach_o_count_symbols): Simplify the code by using the symtab
1682         field of mdata.
1683         (bfd_mach_o_get_symtab_upper_bound): Remove check as
1684         bfd_mach_o_count_symbols never returns an error.
1685         (bfd_mach_o_canonicalize_symtab): Simplify the code by using the
1686         symtab field (there might be only one symtab).
1687         (bfd_mach_o_scan_read_command): Handle reexported dylib.
1688         Handle sub frameworks, sub umbrella, sub library and sub client.
1689         Read code signature and segment split info commands.
1690         (bfd_mach_o_scan): Reindent.
1691         (bfd_mach_o_xlat_name): New type.
1692         (bfd_mach_o_print_flags): New function.
1693         (bfd_mach_o_get_name): Ditto.
1694         (bfd_mach_o_cpu_name): New variable.
1695         (bfd_mach_o_filetype_name, bfd_mach_o_header_flags_name)
1696         (bfd_mach_o_section_type_name)
1697         (bfd_mach_o_section_attribute_name)
1698         (bfd_mach_o_load_command_name): New variables.
1699         (bfd_mach_o_print_private_header): New function.
1700         (bfd_mach_o_print_section_map): New function extracted from
1701         bfd_mach_o_print_private_bfd_data.
1702         (bfd_mach_o_print_section): Ditto.  Print more infos.
1703         (bfd_mach_o_print_segment): Ditto.
1704         (bfd_mach_o_print_dysymtab): Ditto.
1705         (bfd_mach_o_bfd_print_private_bfd_data): Reworked.  Handle
1706         load weak dylib, reexport dylib and id dylib.
1707         Handle code signature and segment_split info.
1708         Handle sub frameworks, sub umbrella, sub library and sub client.
1709         (bfd_mach_o_section_get_nbr_indirect): New function.
1711         * mach-o.h (BFD_MACH_O_REFERENCE_MASK): New macro.  Add comment.
1712         (bfd_mach_o_header_flags): New enum to define header flags.
1713         (bfd_mach_o_section_attribute): New enum to replace ...
1714         (BFD_MACH_O_S_ATTR_LOC_RELOC, BFD_MACH_O_S_ATTR_EXT_RELOC,
1715         BFD_MACH_O_S_ATTR_SOME_INSTRUCTIONS, BFD_MACH_O_S_ATTR_DEBUG,
1716         BFD_MACH_O_S_SELF_MODIFYING_CODE, BFD_MACH_O_S_ATTR_LIVE_SUPPORT,
1717         BFD_MACH_O_S_ATTR_NO_DEAD_STRIP, BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS,
1718         BFD_MACH_O_S_ATTR_NO_TOC, BFD_MACH_O_S_ATTR_PURE_INSTRUCTIONS): ...
1719         these removed macros.
1720         (BFD_MACH_O_NLIST_SIZE, BFD_MACH_O_NLIST_64_SIZE): New macros.
1721         (bfd_mach_o_dylib_module): New type.
1722         (BFD_MACH_O_DYLIB_MODULE_SIZE, BFD_MACH_O_DYLIB_MODULE_64_SIZE): New
1723         macros.
1724         (bfd_mach_o_dylib_table_of_content): New type.
1725         (BFD_MACH_O_TABLE_OF_CONTENT_SIZE): New macro.
1726         (bfd_mach_o_dylib_reference): New type.
1727         (BFD_MACH_O_REFERENCE_SIZE): New macro.
1728         (bfd_mach_o_dysymtab_command): Add fields for loaded and decoded
1729         modules, toc, references and indirect syms.
1730         (BFD_MACH_O_INDIRECT_SYMBOL_SIZE): New macro.
1731         (bfd_mach_o_dylinker_command): Remove cmd and cmdsize fields (were
1732         unused).  Add comment.
1733         (bfd_mach_o_dylib_command): Ditto.
1734         (bfd_mach_o_prebound_dylib_command): Ditto.
1735         (bfd_mach_o_linkedit_command): New type.
1736         (bfd_mach_o_str_command): New type.
1737         (bfd_mach_o_load_command): Add linkedit and str fields.
1738         (mach_o_data_struct): Add symtab field.
1739         (bfd_get_mach_o_data): Renamed to ...
1740         (bfd_mach_o_get_data): ... this new macro.
1741         (bfd_mach_o_scan_read_symtab_symbol,
1742         bfd_mach_o_scan_read_symtab_strtab,
1743         bfd_mach_o_scan_read_symtab_symbols): Prototypes removed.
1745         * mach-o-i386.c (bfd_mach_o_i386_mkobject): Use bfd_mach_o_get_data
1746         instead of direct access.
1748 2009-06-19  Alan Modra  <amodra@bigpond.net.au>
1750         * elf32-ppc.c (ppc_elf_check_relocs): Allow local symbols for
1751         R_PPC_PLTREL24 relocs.
1752         (ppc_elf_relocate_section): Likewise.
1754 2009-06-19  Alan Modra  <amodra@bigpond.net.au>
1756         * elf32-ppc.c (find_plt_ent): Pass pointer to plist rather than
1757         pointer to sym hash.  Update all uses.
1758         (update_plt_info): Likewise.  Don't check addend here.
1760 2009-06-18  H.J. Lu  <hongjiu.lu@intel.com>
1762         * elf32-i386.c (elf_i386_check_relocs): Remove isymbuf and use
1763         bfd_sym_from_r_symndx.
1764         * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1766 2009-06-18  Alan Modra  <amodra@bigpond.net.au>
1768         * elf-bfd.h (struct sym_sec_cache): Delete.
1769         (struct sym_cache): New.
1770         (bfd_section_from_r_symndx): Delete prototype.
1771         (bfd_sym_from_r_symndx): Define prototype.
1772         * elf.c (bfd_section_from_r_symndx): Delete, replace with..
1773         (bfd_sym_from_r_symndx): ..new function.
1774         * elf32-arm.c: Update all uses of struct sym_sec_cache and
1775         bfd_section_from_r_symndx to new struct and function.
1776         * elf32-bfin.c: Likewise.
1777         * elf32-hppa.c: Likewise.
1778         * elf32-i386.c: Likewise.
1779         * elf32-m32r.c: Likewise.
1780         * elf32-m68hc1x.c: Likewise.
1781         * elf32-m68hc1x.h: Likewise.
1782         * elf32-m68k.c: Likewise.
1783         * elf32-ppc.c: Likewise.
1784         * elf32-s390.c: Likewise.
1785         * elf32-sh.c: Likewise.
1786         * elf64-ppc.c: Likewise.
1787         * elf64-s390.c: Likewise.
1788         * elf64-x86-64.c: Likewise.
1789         * elfxx-sparc.c: Likewise.
1790         * elfxx-sparc.h: Likewise.
1792 2009-06-18  H.J. Lu  <hongjiu.lu@intel.com>
1794         * elf32-i386.c (elf_i386_check_relocs): Cache or free isymbuf.
1795         * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1797 2009-06-18  Nick Clifton  <nickc@redhat.com>
1799         * elflink.c (elf_link_sort_relocs): Return early if there are no
1800         relocs to sort.
1802 2009-06-18  Dave Korn  <dave.korn.cygwin@gmail.com>
1804         Merge cegcc and mingw32ce target name changes from
1805         CeGCC project:
1807         2007-12-25  Pedro Alves  <pedro_alves@portugalmail.pt>
1809         * config.bfd: Add arm*-*-cegcc* target.
1811         2007-12-17  Pedro Alves  <pedro_alves@portugalmail.pt>
1813         * config.bfd: Add arm-*-mingw32ce* target.
1815 2009-06-17  H.J. Lu  <hongjiu.lu@intel.com>
1817         * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): New.
1818         * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Likewise.
1819         * elf32-i386.c (elf_i386_allocate_dynrelocs): Use it.
1820         * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
1822 2009-06-17  H.J. Lu  <hongjiu.lu@intel.com>
1824         * elf-bfd.h (_bfd_elf_create_ifunc_dyn_reloc): New.
1825         * elf-ifunc.c (_bfd_elf_create_ifunc_dyn_reloc): Likewise.
1826         * elf32-i386.c (elf_i386_check_relocs): Use it.
1827         * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1829 2009-06-17  H.J. Lu  <hongjiu.lu@intel.com>
1831         * elf-bfd.h (elf_dyn_relocs): New.
1833         * elf32-i386.c (elf_i386_dyn_relocs): Removed.
1834         (elf_i386_link_hash_entry): Replace elf_i386_dyn_relocs with
1835         elf_dyn_relocs.
1836         (elf_i386_copy_indirect_symbol): Likewise.
1837         (elf_i386_check_relocs): Likewise.
1838         (elf_i386_gc_sweep_hook): Likewise.
1839         (elf_i386_allocate_dynrelocs): Likewise.
1840         (elf_i386_readonly_dynrelocs): Likewise.
1841         (elf_i386_size_dynamic_sections): Likewise.
1843         * elf64-x86-64.c (elf64_x86_64_dyn_relocs): Removed.
1844         (elf64_x86_64_link_hash_entry): Replace elf64_x86_64_dyn_relocs
1845         with elf_dyn_relocs.
1846         (elf64_x86_64_copy_indirect_symbol): Updated.
1847         (elf64_x86_64_check_relocs): Likewise.
1848         (elf64_x86_64_gc_sweep_hook): Likewise.
1849         (elf64_x86_64_adjust_dynamic_symbol): Likewise.
1850         (elf64_x86_64_allocate_dynrelocs): Likewise.
1851         (elf64_x86_64_readonly_dynrelocs): Likewise.
1852         (elf64_x86_64_size_dynamic_sections): Likewise.
1854 2009-06-17  H.J. Lu  <hongjiu.lu@intel.com>
1856         * elf32-arm.c (create_got_section): Get existing .rela.got
1857         section.
1858         * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
1859         * elf32-lm32.c (create_got_section): Likewise.
1860         * elf32-m32r.c (create_got_section): Likewise.
1861         * elf32-ppc.c (ppc_elf_create_got): Likewise.
1862         * elf32-s390.c (create_got_section): Likewise.
1863         * elf32-sh.c (create_got_section): Likewise.
1864         * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
1865         * elf64-s390.c (create_got_section): Likewise.
1866         * elfxx-sparc.c (create_got_section): Likewise.
1868         * elflink.c (_bfd_elf_create_got_section): Properly initialize
1869         the GOT size.
1871 2009-06-16  H.J. Lu  <hongjiu.lu@intel.com>
1873         * elf-bfd.h (ELF_LOCAL_SYMBOL_HASH): New.
1875         * elf32-i386.c (elf_i386_local_hash): Removed.
1876         (elf_i386_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH.
1877         (elf_i386_get_local_sym_hash): Likewise.
1879         * elf64-x86-64.c (elf64_x86_64_local_hash): Removed.
1880         (elf64_x86_64_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH.
1881         (elf64_x86_64_get_local_sym_hash): Likewise.
1882         * elfxx-ia64.c (elfNN_ia64_local_htab_hash): Likewise.
1883         (get_local_sym_hash): Likewise.
1885 2009-06-16  H.J. Lu  <hongjiu.lu@intel.com>
1887         * elfxx-ia64.c (elfNN_ia64_link_hash_table): Remove got_sec,
1888         rel_got_sec and plt_sec.
1889         (elfNN_ia64_relax_section): Updated.
1890         (elfNN_ia64_create_dynamic_sections): Likewise.
1891         (get_got): Likewise.
1892         (allocate_dynrel_entries): Likewise.
1893         (elfNN_ia64_size_dynamic_sections): Likewise.
1894         (set_got_entry): Likewise.
1895         (elfNN_ia64_choose_gp): Likewise.
1896         (elfNN_ia64_relocate_section): Likewise.
1897         (elfNN_ia64_finish_dynamic_symbol): Likewise.
1898         (elfNN_ia64_finish_dynamic_sections): Likewise.
1900 2009-06-16  Ulrich Weigand  <uweigand@de.ibm.com>
1902         * elf32-spu.c (needs_ovl_stub): Respect .brinfo lrlive bits
1903         also for calls.
1905 2009-06-16  H.J. Lu  <hongjiu.lu@intel.com>
1907         * configure.in (elf): Add elf-ifunc.lo.
1909         * configure: Regenerated.
1910         * Makefile.in: Likewise.
1912         * elf-bfd.h (elf_link_hash_table): Add sgot, sgotplt,
1913         srelgot, splt, srelplt, igotplt, iplt, irelplt and irelifunc.
1915         * elf32-i386.c (elf_i386_link_hash_table): Remove sgot,
1916         sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and
1917         irelifunc.
1918         (elf_i386_link_hash_table_create): Likewise.
1919         (elf_i386_create_dynamic_sections): Likewise.
1920         (elf_i386_check_relocs): Likewise.
1921         (elf_i386_allocate_dynrelocs): Likewise.
1922         (elf_i386_size_dynamic_sections): Likewise.
1923         (elf_i386_relocate_section): Likewise.
1924         (elf_i386_finish_dynamic_symbol): Likewise.
1925         (elf_i386_finish_dynamic_sections): Likewise.
1926         (elf_i386_create_got_section): Removed.
1928         * elf64-x86-64.c (elf64_x86_64_link_hash_table): Remove sgot,
1929         sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and
1930         irelifunc.
1931         (elf64_x86_64_compute_jump_table_size): Updated.
1932         (elf64_x86_64_link_hash_table_create): Likewise.
1933         (elf64_x86_64_create_dynamic_sections): Likewise.
1934         (elf64_x86_64_check_relocs): Likewise.
1935         (elf64_x86_64_allocate_dynrelocs): Likewise.
1936         (elf64_x86_64_size_dynamic_sections): Likewise.
1937         (elf64_x86_64_relocate_section): Likewise.
1938         (elf64_x86_64_finish_dynamic_symbol): Likewise.
1939         (elf64_x86_64_finish_dynamic_sections): Likewise.
1940         (elf64_x86_64_create_got_section): Removed.
1942         * elflink.c (_bfd_elf_create_got_section): Use log_file_align
1943         for pointer alignment.  Set up section pointers.
1944         (_bfd_elf_create_dynamic_sections): Likewise.
1945         (_bfd_elf_create_ifunc_sections): Moved to ...
1946         * elf-ifunc.c: Here.  New.
1948         * Makefile.am (BFD32_BACKENDS): Add elf-ifunc.lo.
1949         (BFD32_BACKENDS_CFILES): Add elf-ifunc.c.
1950         Run "make dep-am".
1952 2009-06-16  Doug Kwan  <dougkwan@google.com>
1954         * elf32-arm.c (cortex_a8_erratum_scan): Change type of offset
1955         to bfd_signed_vma.  Cast constant operands which are used in
1956         offset related expressions to bfd_signed_vma type as appropriate.
1958 2009-06-16  Maciej W. Rozycki  <macro@linux-mips.org>
1960         * elf32-vax.c (elf_vax_plt_sym_val): New function.
1961         (elf_backend_plt_sym_val): Define.
1963 2009-06-16  Maciej W. Rozycki  <macro@linux-mips.org>
1965         * elf32-vax.c (elf_vax_reloc_type_class): New function.
1966         (elf_backend_reloc_type_class): Define.
1968 2009-06-16  Maciej W. Rozycki  <macro@linux-mips.org>
1970         * elf32-vax.c (elf_vax_relocate_section): For symbol references
1971         from an executable to a shared library treat R_VAX_PC32
1972         relocations as R_VAX_PLT32 ones.
1974 2009-06-16  Maciej W. Rozycki  <macro@linux-mips.org>
1976         * elf32-vax.c (elf_vax_instantiate_got_entries): Skip local
1977         symbols in GOT space calculation.
1978         (elf_vax_relocate_section): Adjust accordingly.
1980 2009-06-16  Maciej W. Rozycki  <macro@linux-mips.org>
1982         * elf32-vax.c (elf_vax_plt_entry): Set the entry mask to
1983         include <R11:R2>.
1985 2009-06-16  Maciej W. Rozycki  <macro@linux-mips.org>
1987         * elf32-vax.c (elf_vax_check_relocs): Handle the visibility
1988         attribute.
1989         (elf_vax_relocate_section): Likewise.
1991 2009-06-15  H.J. Lu  <hongjiu.lu@intel.com>
1993         * elf32-i386.c (elf_i386_allocate_dynrelocs): Update comments.
1994         * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
1996 2009-06-15  H.J. Lu  <hongjiu.lu@intel.com>
1998         * elf32-i386.c (elf_i386_check_relocs): Reformat.
1999         * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
2001 2009-06-15  H.J. Lu  <hongjiu.lu@intel.com>
2003         * Makefile.am: Run "make dep-am".
2004         * Makefile.in: Regenerated.
2006 2009-06-15  H.J. Lu  <hongjiu.lu@intel.com>
2008         * elf32-i386.c (elf_i386_allocate_dynrelocs): Fix a typo.
2009         * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
2011 2009-06-15  Nick Clifton  <nickc@redhat.com>
2013         * po/ru.po: New Russian translation.
2014         * configure.in (ALL_LINGUAS): Add ru.
2015         * configure: Regenerate.
2017 2009-06-14  H.J. Lu  <hongjiu.lu@intel.com>
2019         * elf32-i386.c: Remove duplicated comments.
2021 2009-06-14  H.J. Lu  <hongjiu.lu@intel.com>
2023         PR ld/10270
2024         * elf32-i386.c (elf_i386_allocate_dynrelocs): Disallow
2025         dynamic IFUNC pointer in non-shared object.  Use .got.plt
2026         for IFUNC definition in PIE.
2027         (elf_i386_allocate_dynrelocs): Resolve IFUNC definition in
2028         PIE locally.
2030         * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Disallow
2031         dynamic IFUNC pointer in non-shared object.  Use .got.plt
2032         for IFUNC definition in PIE.
2033         (elf64_x86_64_relocate_section): Resolve IFUNC definition in
2034         PIE locally.
2036 2009-06-13  H.J. Lu  <hongjiu.lu@intel.com>
2038         * elf32-i386.c (elf_i386_check_relocs): Properly report
2039         local symbol for unhandled relocation against STT_GNU_IFUNC
2040         symbol.
2041         (elf_i386_relocate_section): Likewise.
2042         * elf64-x86-64.c (elf64_x86_64_check_relocs):  Likewise.
2043         (elf64_x86_64_relocate_section): Likewise.
2045 2009-06-13  H.J. Lu  <hongjiu.lu@intel.com>
2047         PR ld/10269
2048         * elf32-i386.c: Include "objalloc.h" and "hashtab.h".
2049         (elf_i386_link_hash_table): Add loc_hash_table and
2050         loc_hash_memory.
2051         (elf_i386_local_hash): New.
2052         (elf_i386_local_htab_hash): Likewise.
2053         (elf_i386_local_htab_eq): Likewise.
2054         (elf_i386_get_local_sym_hash): Likewise.
2055         (elf_i386_link_hash_table_free): Likewise.
2056         (elf_i386_allocate_local_dynrelocs): Likewise.
2057         (elf_i386_finish_local_dynamic_symbol): Likewise.
2058         (bfd_elf64_bfd_link_hash_table_free): Likewise.
2059         (elf_i386_link_hash_table_create): Create loc_hash_table and
2060         loc_hash_memory.
2061         (elf_i386_check_relocs): Handle local STT_GNU_IFUNC symbols.
2062         (elf_i386_size_dynamic_sections): Likewise.
2063         (elf_i386_relocate_section): Likewise.
2064         (elf_i386_finish_dynamic_sections): Likewise.
2065         (elf_i386_finish_dynamic_symbol): Check _DYNAMIC only if sym
2066         isn't NULL.
2068         * elf64-x86-64.c: Include "objalloc.h" and "hashtab.h".
2069         (elf64_x86_64_link_hash_table): Add loc_hash_table and
2070         loc_hash_memory.
2071         (elf64_x86_64_local_hash): New.
2072         (elf64_x86_64_local_htab_hash): Likewise.
2073         (elf64_x86_64_local_htab_eq): Likewise.
2074         (elf64_x86_64_get_local_sym_hash): Likewise.
2075         (elf64_x86_64_link_hash_table_free): Likewise.
2076         (elf64_x86_64_allocate_local_dynrelocs): Likewise.
2077         (elf64_x86_64_finish_local_dynamic_symbol): Likewise.
2078         (bfd_elf64_bfd_link_hash_table_free): Likewise.
2079         (elf64_x86_64_link_hash_table_create): Create loc_hash_table
2080         and loc_hash_memory.
2081         (elf64_x86_64_check_relocs): Handle local STT_GNU_IFUNC
2082         symbols.
2083         (elf64_x86_64_size_dynamic_sections): Likewise.
2084         (elf64_x86_64_relocate_section): Likewise.
2085         (elf64_x86_64_finish_dynamic_sections): Likewise.
2086         (elf64_x86_64_finish_dynamic_symbol): Check _DYNAMIC only if
2087         sym isn't NULL.
2089 2009-06-10  Philip Blundell  <philb@gnu.org>
2091         * elf32-arm.c (elf32_arm_fix_exidx_coverage): Avoid crash if
2092         elf_sec->this_hdr == NULL.
2094 2009-06-12  Tristan Gingold  <gingold@adacore.com>
2096         * reloc.c: Add BFD_RELOC_MACH_O_SECTDIFF and BFD_RELOC_MACH_O_PAIR.
2097         * bfd-in2.h: Regenerated.
2098         * libbfd.h: Regenerated.
2100         * mach-o.c (FILE_ALIGN): New macro.
2101         (bfd_mach_o_canonicalize_symtab): Adjust for bfd_mach_o_asymbol.
2102         (bfd_mach_o_print_symbol): Ditto.
2103         (bfd_mach_o_scan_write_thread): Adjust type of variable offset.
2104         (bfd_mach_o_get_reloc_upper_bound): New function.
2105         (bfd_mach_o_canonicalize_reloc): Ditto.
2106         (bfd_mach_o_scan_write_relocs): Ditto.
2107         (bfd_mach_o_scan_write_section_32): Remove offset argument.
2108         (bfd_mach_o_scan_write_section_64): Ditto.
2109         (bfd_mach_o_scan_write_segment_32): Write relocs.  Fix size of data
2110         written for load command.  Do not compute section file offset.
2111         (bfd_mach_o_scan_write_segment_64): Ditto.
2112         (bfd_mach_o_scan_write_symtab): Compute file offset first.
2113         Adjust for bfd_mach_o_asymbol.  Move code to convert from BFD to
2114         Mach-O to ...
2115         (bfd_mach_o_mangle_symbols): ... this new function.
2116         (bfd_mach_o_write_contents): Be sure to have load commands built.
2117         Call bfd_mach_o_mangle_symbols.
2118         (bfd_mach_o_build_commands): Adjust for filelen field.
2119         Use FILE_ALIGN macro.  Clear section file offset if section is empty.
2120         Do not set symtab file offset anymore here.
2121         (bfd_mach_o_make_empty_symbol): Allocate a bfd_mach_o_asymbol.
2122         (bfd_mach_o_make_bfd_section): Set SEC_RELOC if has reloc.
2123         Set reloc_count and rel_filepos section fields.
2124         (bfd_mach_o_scan_read_section_32): Type of argument offset is now
2125         unsigned int.
2126         (bfd_mach_o_scan_read_section_64): Ditto.
2127         (bfd_mach_o_scan_read_section): Ditto.
2128         (bfd_mach_o_scan_read_symtab_symbol): Typr of argument s is now
2129         bfd_mach_o_asymbol.  Use unsigned int for file offset type.
2130         (bfd_mach_o_scan_read_symtab_symbol): Adjust for bfd_mach_o_asymbol.
2131         Handle weak-ref symbols.
2132         (bfd_mach_o_scan_read_symtab_symbols): Adjust for bfd_mach_o_asymbol.
2133         (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
2134         (bfd_mach_o_scan): Remove assignment to removed field.
2135         (bfd_mach_o_mkobject_init): Ditto.
2136         (bfd_mach_o_bfd_print_private_bfd_data): Adjust printf formatter.
2137         (bfd_mach_o_bfd_reloc_type_lookup): New macro.
2138         (bfd_mach_o_bfd_reloc_name_lookup): Ditto.
2139         (bfd_mach_o_swap_reloc_in): Ditto.
2140         (bfd_mach_o_swap_reloc_out): Ditto.
2142         * mach-o.h (BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_NON_LAZY)
2143         (BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_LAZY)
2144         (BFD_MACH_O_REFERENCE_FLAG_DEFINED)
2145         (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_DEFINED)
2146         (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_NON_LAZY)
2147         (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_LAZY)
2148         (BFD_MACH_O_REFERENCED_DYNAMICALLY, BFD_MACH_O_N_DESC_DISCARDED)
2149         (BFD_MACH_O_N_NO_DEAD_STRIP, BFD_MACH_O_N_WEAK_REF)
2150         (BFD_MACH_O_N_WEAK_DEF): New macros.
2151         Add comments.
2152         (bfd_mach_o_section_type): Add new enumeration values.
2153         (BFD_MACH_O_S_SELF_MODIFYING_CODE)
2154         (BFD_MACH_O_S_ATTR_LIVE_SUPPORT)
2155         (BFD_MACH_O_S_ATTR_NO_DEAD_STRIP)
2156         (BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS, BFD_MACH_O_S_ATTR_NO_TOC): New
2157         macros.
2158         (BFD_MACH_O_GENERIC_RELOC_VANILLA)
2159         (BFD_MACH_O_GENERIC_RELOC_PAIR)
2160         (BFD_MACH_O_GENERIC_RELOC_SECTDIFF)
2161         (BFD_MACH_O_GENERIC_RELOC_PB_LA_PTR)
2162         (BFD_MACH_O_GENERIC_RELOC_LOCAL_SECTDIFF): Ditto.
2163         (BFD_MACH_O_RELENT_SIZE): Ditto.
2164         (BFD_MACH_O_R_PCREL, BFD_MACH_O_GET_R_LENGTH)
2165         (BFD_MACH_O_R_EXTERN, BFD_MACH_O_GET_R_TYPE)
2166         (BFD_MACH_O_GET_R_SYMBOLNUM, BFD_MACH_O_SET_R_LENGTH)
2167         (BFD_MACH_O_SET_R_TYPE, BFD_MACH_O_SET_R_SYMBOLNUM): Ditto.
2168         (BFD_MACH_O_SR_SCATTERED, BFD_MACH_O_SR_PCREL)
2169         (BFD_MACH_O_GET_SR_LENGTH, BFD_MACH_O_GET_SR_TYPE)
2170         (BFD_MACH_O_GET_SR_ADDRESS, BFD_MACH_O_SET_SR_LENGTH)
2171         (BFD_MACH_O_SET_SR_TYPE, BFD_MACH_O_SET_SR_ADDRESS): Ditto.
2172         (bfd_mach_o_reloc_info): New struct.
2173         (bfd_mach_o_asymbol): New struct.
2174         (bfd_mach_o_symtab_command): The symbols field is now of type
2175         bfd_mach_o_asymbol.
2176         (bfd_mach_o_load_command): The offset and len fields are now of type
2177         unsigned int.
2178         (mach_o_data_struct): Remove symbols, nsymbols and ibfd fields.
2179         Add a filelen field.  Add comments.
2180         (bfd_mach_o_backend_data): New struct.
2181         (bfd_mach_o_get_backend_data): New macro.
2182         (bfd_mach_o_scan_read_symtab_symbol): Parameter symbol now of type
2183         bfd_mach_o_asymbol.
2184         (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
2185         (bfd_mach_o_get_reloc_upper_bound): New prototype.
2186         (bfd_mach_o_canonicalize_reloc): Ditto.
2188         * mach-o-target.c (bfd_mach_o_bfd_is_local_label_name): Remove
2189         duplicated macro.  Now defined to _bfd_generic_is_local_label.
2190         (TARGET_NAME_BACKEND): New macro...
2191         (TARGET_NAME_BACKEND): ... used to name a new variable.
2192         (TARGET_NAME): Define relocs table using bfd_mach_o, reference
2193         Mach-O backend data.
2195         * mach-o-i386.c (i386_howto_table): New variable.
2196         (bfd_mach_o_i386_swap_reloc_in): New function.
2197         (bfd_mach_o_i386_swap_reloc_out): Ditto.
2198         (bfd_mach_o_i386_bfd_reloc_type_lookup): Ditto.
2199         (bfd_mach_o_i386_bfd_reloc_name_lookup): Ditto.
2200         (bfd_mach_o_swap_reloc_in, bfd_mach_o_swap_reloc_out): New macros.
2201         (bfd_mach_o_bfd_reloc_type_lookup)
2202         (bfd_mach_o_bfd_reloc_name_lookup): Ditto.
2204 2009-06-11  Eric Paris  <eparis@redhat.com>
2205             Nick Clifton  <nickc@redhat.com>
2207         * opncls.c (_maybe_make_executable): New function.  Gives execute
2208         permission to an executable bfd that was opened for writing
2209         provided that it is a regular file.  Replaces common code found in...
2210         (bfd_close): here and ...
2211         (bfd_close_all_done): here.
2213 2009-06-11  Anthony Green  <green@moxielogic.com>
2215         * reloc.c: Add BFD_RELOC_MOXIE_10_PCREL.
2216         * bfd-in2.h: Rebuilt.
2217         * libbfd.h: Rebuilt.
2218         * elf32-moxie.c (moxie_elf_howto_table): Add R_MOXIE_PCREL10
2219         relocation support.
2220         (moxie_reloc_map): Ditto.
2221         Clean up copyright notice.
2223 2009-06-10  Paul Pluzhnikov  <ppluzhnikov@google.com>
2225         * bfd-in2.h: bfd_mmap prototype.
2226         * bfdio.c (bfd_mmap): New function.
2227         * libbfd.h (bfd_iovec): Add bmmap.
2228         * cache.c (cache_bmmap): New function.
2229         (cache_iovec): Initialize bmmap member.
2230         * opencls.c (opncls_bmmap): New function.
2231         (opncls_iovec): Initialize bmmap member.
2233 2009-06-09  Tristan Gingold  <gingold@adacore.com>
2235         * mach-o.h (bfd_mach_o_symtab_command): Remove stabs_segment
2236         and stabstr_segment fields.
2237         (mach_o_be_vec, mach_o_le_vec): Removed
2238         (bfd_mach_o_version): New prototype.
2240         * mach-o.c (bfd_mach_o_version): Make this function public.
2241         (mach_o_wide_p): New function.
2242         (bfd_mach_o_wide_p): Ditto.
2243         (bfd_mach_o_convert_section_name_to_bfd): Add prefix only for
2244         weird names.
2245         (bfd_mach_o_convert_section_name_to_mach_o): Fix typo in comment.
2246         Search in the list only if the name starts with a dot.
2247         (bfd_mach_o_write_header): Use mach_o_wide_p instead of hard-coded
2248         test.  Check bfd_seek status.
2249         (bfd_mach_o_scan_write_thread): Check bfd_seek status.
2250         (bfd_mach_o_scan_write_section_32): Ditto.
2251         (bfd_mach_o_scan_write_section_64): Ditto.
2252         (bfd_mach_o_scan_write_section): Removed.
2253         (bfd_mach_o_scan_write_segment): Split into ...
2254         (bfd_mach_o_scan_write_segment_32): ... this and ...
2255         (bfd_mach_o_scan_write_segment_64): ... this.  Check bfd_seek status.
2256         (bfd_mach_o_scan_write_symtab_symbols): Moved into ...
2257         (bfd_mach_o_scan_write_symtab): ... this.  Write symtab from BFD
2258         symbol table.  Now returns a boolean.
2259         (bfd_mach_o_write_contents): Set filetype.  Check bfd_seek status.
2260         Adjust for status type.
2261         (bfd_mach_o_build_commands): Use mach_o_wide_p instead of hard-coded
2262         test.  Write symbol table.  Numbers the sections.
2263         (bfd_mach_o_read_header): Check bfd_seek status.
2264         Use mach_o_wide_p instead of hard-coded test.
2265         (bfd_mach_o_scan_read_section_32): Check bfd_seek status.
2266         (bfd_mach_o_scan_read_section_64): Ditto.
2267         (bfd_mach_o_scan_read_symtab_symbol): Ditto.  Check bfd_seek status.
2268         Use BFD_MACH_O_N_TYPE instead of hard-coded value.  Correctly
2269         handled common symbols.
2270         (bfd_mach_o_scan_read_symtab_strtab): Check bfd_seek status.
2271         (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
2272         (bfd_mach_o_scan_read_dylinker): Ditto.
2273         (bfd_mach_o_scan_read_dylib): Ditto.
2274         (bfd_mach_o_scan_read_thread): Ditto.
2275         (bfd_mach_o_scan_read_symtab): Ditto.
2276         Do not create a section for the stabs.
2277         (bfd_mach_o_scan_read_uuid): Check bfd_seek status.
2278         (bfd_mach_o_scan_read_segment): Ditto.
2279         (bfd_mach_o_scan_read_command): Ditto.
2280         (bfd_mach_o_scan_start_address): Ditto.
2281         (bfd_mach_o_scan): Use mach_o_wide_p instead of hard-coded test.
2282         (bfd_mach_o_archive_p): Check bfd_seek status.
2283         (bfd_mach_o_core_fetch_environment): Ditto.
2285         * mach-o-i386.c (bfd_mach_o_i386_mkobject): Don't set filetype.
2287 2009-06-06  H.J. Lu  <hongjiu.lu@intel.com>
2289         * elf32-i386.c (elf_i386_link_hash_table): Add irelifunc.
2290         (elf_i386_link_hash_table_create): Initialize irelifunc.
2291         (elf_i386_check_relocs): Updated.  Set up irelifunc for
2292         shared objects.
2293         (elf_i386_allocate_dynrelocs): Use irelifunc for dynamic
2294         relocation for non-GOT reference of STT_GNU_IFUNC symbol in
2295         shared objects.
2296         (elf_i386_relocate_section): Likewise.
2298         * elf64-x86-64.c (elf64_x86_64_link_hash_table): Add irelifunc.
2299         (elf64_x86_64_link_hash_table_create): Initialize irelifunc.
2300         (elf64_x86_64_check_relocs): Updated.  Set up irelifunc for
2301         shared objects.
2302         (elf64_x86_64_allocate_dynrelocs): Use irelifunc for dynamic
2303         relocation for non-GOT reference of STT_GNU_IFUNC symbol in
2304         shared objects.
2305         (elf64_x86_64_relocate_section): Likewise.
2307         * elf-bfd.h (_bfd_elf_create_static_ifunc_sections): Renamed to
2308         ...
2309         (_bfd_elf_create_ifunc_sections): This.
2311         * elflink.c (_bfd_elf_create_static_ifunc_sections): Renamed to
2312         ...
2313         (_bfd_elf_create_ifunc_sections): This.  Create .rel[a].ifunc
2314         for shared objects.
2316 2009-06-06  H.J. Lu  <hongjiu.lu@intel.com>
2318         * elf32-i386.c (elf_i386_check_relocs): Make room for dynamic
2319         relocation for R_386_32 against STT_GNU_IFUNC symbol when
2320         building shared object.  Check info->executable instead of
2321         !info->shared when setting non_got_ref.
2322         (elf_i386_allocate_dynrelocs): Allocate dynamic relocation
2323         for non-GOT reference of STT_GNU_IFUNC symbol in shared
2324         object. Allocate GOT relocation agsinst STT_GNU_IFUNC
2325         symbol if needed.
2326         (elf_i386_relocate_section): Output dynamic relocation for
2327         R_386_32 against STT_GNU_IFUNC symbol to get the real
2328         function address when building shared object.
2329         (elf_i386_finish_dynamic_symbol): Output R_386_GLOB_DAT
2330         relocation for STT_GNU_IFUNC symbol in shared object.
2332         * elf64-x86-64.c (elf64_x86_64_check_relocs): Make room for
2333         dynamic relocation for R_X86_64_64 against STT_GNU_IFUNC
2334         symbol when building shared object.  Check info->executable
2335         instead of !info->shared when setting non_got_ref.
2336         (elf64_x86_64_allocate_dynrelocs): Allocate dynamic relocation
2337         for non-GOT reference of STT_GNU_IFUNC symbol in shared
2338         library. Allocate GOT relocation agsinst STT_GNU_IFUNC symbol
2339         if needed.
2340         (elf64_x86_64_relocate_section): Output dynamic relocation
2341         for R_X86_64_64 against STT_GNU_IFUNC symbol to get the real
2342         function address when building shared object.
2343         (elf64_x86_64_finish_dynamic_symbol): Output R_X86_64_GLOB_DAT
2344         relocation for STT_GNU_IFUNC symbol in shared object.
2346 2009-06-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
2348         * Makefile.am: Run "make dep-am".
2349         (BFD32_BACKENDS): Add mach-o-i386.lo.
2350         (BFD32_BACKENDS_CFILES): Add mach-o-i386.c.
2351         * Makefile.in: Regenerate.
2353 2009-06-06  Alan Modra  <amodra@bigpond.net.au>
2355         * elf32-spu.c (spu_elf_relocate_section): Match overlay number
2356         when looking for soft-icache stubs.
2358 2009-06-05  Tristan Gingold  <gingold@adacore.com>
2360         * mach-o.h: Update copyright year.
2361         (bfd_mach_o_mach_header_magic): New enum.
2362         (bfd_mach_o_cpu_subtype): Now an enum.
2363         (BFD_MACH_O_HEADER_SIZE, BFD_MACH_O_HEADER_64_SIZE): New macros.
2364         (BFD_MACH_O_SECTION_SIZE, BFD_MACH_O_SECTION_64_SIZE): Ditto.
2365         (BFD_MACH_O_LC_SEGMENT_SIZE, BFD_MACH_O_LC_SEGMENT_64_SIZE): Ditto.
2366         (bfd_mach_o_load_command): Field type_required is now a boolean.
2367         Reindent prototypes.
2368         (bfd_mach_o_object_p, bfd_mach_o_core_p): Remove.
2369         (bfd_mach_o_bfd_copy_private_symbol_data): Add a prototype.
2370         (bfd_mach_o_bfd_copy_private_section_data): Ditto.
2371         (bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
2372         (bfd_mach_o_get_symtab_upper_bound): Ditto.
2373         (bfd_mach_o_canonicalize_symtab): Ditto.
2374         (bfd_mach_o_get_symbol_info): Ditto.
2375         (bfd_mach_o_print_symbol): Ditto.
2376         (bfd_mach_o_bfd_print_private_bfd_data): Ditto.
2377         (bfd_mach_o_make_empty_symbol): Ditto.
2378         (bfd_mach_o_write_contents): Ditto.
2380         * mach-o.c (bfd_mach_o_object_p, bfd_mach_o_core_p,
2381         bfd_mach_o_mkobject): Defines.
2382         (bfd_mach_o_valid): Returns FALSE/TRUE instead of 0/1.
2383         Do not check with target vector but with flavour.
2384         (struct mach_o_section_name_xlat): New declaration.
2385         (dwarf_section_names_xlat): Ditto.
2386         (text_section_names_xlat): Ditto.
2387         (data_section_names_xlat): Ditto.
2388         (struct mach_o_segment_name_xlat): Ditto.
2389         (segsec_names_xlat): Ditto.
2390         (bfd_mach_o_convert_section_name_to_bfd): New function.
2391         (bfd_mach_o_convert_section_name_to_mach_o): Ditto.
2392         (bfd_mach_o_bfd_copy_private_symbol_data): Make it public.
2393         (bfd_mach_o_bfd_copy_private_section_data): Ditto.
2394         (bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
2395         Accept any input and output flavour.  Do not share private data
2396         anymore.
2397         (bfd_mach_o_count_symbols): Add a comment.
2398         (bfd_mach_o_get_symtab_upper_bound): Make it public.
2399         (bfd_mach_o_canonicalize_symtab): Ditto.
2400         (bfd_mach_o_get_symbol_info): Ditto.
2401         (bfd_mach_o_print_symbol): Ditto.
2402         (bfd_mach_o_write_header): Now returns a boolean instead of an int.
2403         Use constants instead of hard-coded values.
2404         (bfd_mach_o_scan_write_section_32): Use constants instead of hard-coded
2405         values.
2406         (bfd_mach_o_scan_write_section_64): Ditto.
2407         (bfd_mach_o_scan_write_segment): Ditto.
2408         Do not copy sections anymore.
2409         (bfd_mach_o_write_contents): Make it public.
2410         Remove dead code.  Rewrite typeflag assignment.
2411         (bfd_mach_o_build_commands): New function.
2412         (bfd_mach_o_set_section_contents): Ditto.
2413         (bfd_mach_o_make_empty_symbol): Make it public.
2414         (bfd_mach_o_read_header): Make it static.
2415         Convert to bfd_boolean.
2416         Use constants instead of hard-coded values.
2417         (bfd_mach_o_make_bfd_section): Call
2418         bfd_mach_o_convert_section_name_to_bfd to create name.
2419         (bfd_mach_o_scan_read_section_32): Use constants instead of hard-coded
2420         values.
2421         (bfd_mach_o_scan_read_section_64): Ditto.
2422         (bfd_mach_o_scan_read_segment): Do not create a bfd section for
2423         a segment anymore.  Use constants instead of hard-coded values.
2424         (bfd_mach_o_scan_read_command): Fix style.
2425         (bfd_mach_o_scan): Use constants instead of hard-coded values.
2426         Get rid of BFD_IO_FUNCS.
2427         (bfd_mach_o_mkobject_init): Renamed from bfd_mach_o_mkobject.
2428         (bfd_mach_o_header_p): Created from bfd_mach_o_object_p.
2429         (bfd_mach_o_gen_object_p): New function, replaces bfd_mach_o_object_p.
2430         (bfd_mach_o_object_p): Removed.
2431         (bfd_mach_o_gen_core_p): New function, replaces ...
2432         (bfd_mach_o_core_p): ... deleted.
2433         (bfd_mach_o_bfd_print_private_bfd_data): Make it public.
2435         * mach-o-i386.c: New file.
2436         * config.bfd: Use mach_o_i386_vec as targ_defvec for ix86-darwin.
2437         * configure.in (TDEFINES): Add mach_o_i386_vec.
2438         * configure: Regenerated.
2439         * targets.c: Add mach_o_i386_vec.
2441         * mach-o.c: Update copyright years.
2442         (BFD_IO_FUNCS): Remove (was not used).
2443         (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr, bfd_mach_o_slurp_armap
2444         bfd_mach_o_slurp_extended_name_table,
2445         bfd_mach_o_construct_extended_name_table,
2446         bfd_mach_o_truncate_arname, bfd_mach_o_write_armap,
2447         bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt,
2448         bfd_mach_o_update_armap_timestamp, bfd_mach_o_close_and_cleanup,
2449         bfd_mach_o_bfd_free_cached_info, bfd_mach_o_new_section_hook,
2450         bfd_mach_o_get_section_contents_in_window,
2451         bfd_mach_o_bfd_is_local_label_name,
2452         bfd_mach_o_bfd_is_target_special_symbol,
2453         bfd_mach_o_bfd_is_local_label_name, bfd_mach_o_get_lineno,
2454         bfd_mach_o_find_nearest_line, bfd_mach_o_find_inliner_info,
2455         bfd_mach_o_bfd_make_debug_symbol, bfd_mach_o_read_minisymbols,
2456         bfd_mach_o_minisymbol_to_symbol,
2457         bfd_mach_o_bfd_get_relocated_section_contents,
2458         bfd_mach_o_bfd_relax_section, bfd_mach_o_bfd_link_hash_table_create,
2459         bfd_mach_o_bfd_link_hash_table_free, bfd_mach_o_bfd_link_add_symbols,
2460         bfd_mach_o_bfd_link_just_syms, bfd_mach_o_bfd_final_link,
2461         bfd_mach_o_bfd_link_split_section, bfd_mach_o_set_arch_mach,
2462         bfd_mach_o_bfd_merge_private_bfd_data,
2463         bfd_mach_o_bfd_set_private_flags, bfd_mach_o_get_section_contents,
2464         bfd_mach_o_bfd_gc_sections, bfd_mach_o_bfd_merge_sections,
2465         bfd_mach_o_bfd_is_group_section, bfd_mach_o_bfd_discard_group,
2466         bfd_mach_o_section_already_linked, bfd_mach_o_bfd_define_common_symbol,
2467         bfd_mach_o_bfd_copy_private_header_data,
2468         bfd_mach_o_core_file_matches_executable_p): Move these defines ...
2469         * mach-o-target.c: ... here.
2470         Update copyright years.
2472 2009-06-04  Alan Modra  <amodra@bigpond.net.au>
2474         * dep-in.sed: Don't use \n in replacement part of s command.
2475         * Makefile.am (DEP1): LC_ALL for uniq.
2476         Run "make dep-am".
2477         * Makefile.in: Regenerate.
2479 2009-06-03  H.J. Lu  <hongjiu.lu@intel.com>
2481         * elf32-i386.c (elf_i386_allocate_dynrelocs): Remove check of
2482         h->plt.refcount > 0 on STT_GNU_IFUNC symbol.
2483         * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
2485 2009-06-03  H.J. Lu  <hongjiu.lu@intel.com>
2487         * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate
2488         GOT entry for STT_GNU_IFUNC symbol with pointer equality.
2489         (elf_i386_relocate_section): Adjust R_386_GOT32 relocation
2490         against STT_GNU_IFUNC symbols for static executables.
2491         (elf_i386_finish_dynamic_symbol): Load GOT entry with
2492         PLT entry for STT_GNU_IFUNC symbol with pointer equality.
2494         * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Allocate
2495         GOT entry for STT_GNU_IFUNC symbol with pointer equality.
2496         (elf64_x86_64_finish_dynamic_symbol): Load GOT entry with
2497         PLT entry for STT_GNU_IFUNC symbol with pointer equality.
2499 2009-06-02  Richard Sandiford  <r.sandiford@uk.ibm.com>
2501         * coff-rs6000.c (xcoff_ppc_relocate_section): Allow undefined
2502         symbols to be left unimported when linking statically.
2503         * xcofflink.c (xcoff_link_add_symbols): Ignore global linkage
2504         code when linking statically.
2506 2009-06-02  H.J. Lu  <hongjiu.lu@intel.com>
2508         * elf32-i386.c (elf_i386_check_relocs): Increment
2509         got.refcount for R_386_GOT32/R_386_GOTOFF relocations
2510         against STT_GNU_IFUNC symbol.
2511         (elf_i386_allocate_dynrelocs): Set got.refcount to 0 if
2512         local STT_GNU_IFUNC definition is used.
2513         (elf_i386_relocate_section): Handle got.offset != -1 for
2514         R_386_GOT32/R_386_GOTOFF relocations against STT_GNU_IFUNC
2515         symbol.
2517         * elf64-x86-64.c (elf64_x86_64_check_relocs): Increment
2518         got.refcount for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64
2519         relocations against STT_GNU_IFUNC symbol.
2520         (elf64_x86_64_allocate_dynrelocs): Set got.refcount to 0 if
2521         local STT_GNU_IFUNC definition is used.
2522         (elf64_x86_64_relocate_section): Handle got.offset != -1
2523         for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64 relocations against
2524         STT_GNU_IFUNC symbol.
2526 2009-06-01  H.J. Lu  <hongjiu.lu@intel.com>
2528         PR ld/10205
2529         * elf32-i386.c (elf_howto_table): Add R_386_IRELATIVE.
2530         (elf_i386_reloc_type_lookup): Likewise.
2531         (R_386_tls): Removed.
2532         (R_386_irelative): New.
2533         (R_386_vt_offset): Updated.
2534         (elf_i386_rtype_to_howto): Likewise.
2535         (elf_i386_link_hash_table): Add igotplt, iplt and irelplt.
2536         (elf_i386_link_hash_table_create): Initialize igotplt,
2537         iplt and irelplt.
2538         (elf_i386_check_relocs): Handle STT_GNU_IFUNC symbol first.
2539         (elf_i386_adjust_dynamic_symbol): Likewise.
2540         (elf_i386_allocate_dynrelocs): Likewise.
2541         (elf_i386_relocate_section): Likewise.
2542         (elf_i386_size_dynamic_sections): Set up .iplt and .igot.plt
2543         sections.
2544         (elf_i386_finish_dynamic_symbol): When building a static
2545         executable, use .iplt, .igot.plt and .rel.iplt sections for
2546         STT_GNU_IFUNC symbols.  Generate R_386_IRELATIVE relocation for
2547         locally defined STT_GNU_IFUNC symbol.
2549         * elf64-x86-64.c (x86_64_elf_howto): Add R_X86_64_IRELATIVE.
2550         (x86_64_reloc_map): Likewise.
2551         (R_X86_64_standard): Updated.
2552         (elf64_x86_64_link_hash_table): Add igotplt, iplt and irelplt.
2553         (elf64_x86_64_link_hash_table_create): Initialize igotplt,
2554         iplt and irelplt.
2555         (elf64_x86_64_check_relocs): Handle STT_GNU_IFUNC symbol first.
2556         (elf64_x86_64_adjust_dynamic_symbol): Likewise.
2557         (elf64_x86_64_allocate_dynrelocs): Likewise.
2558         (elf64_x86_64_relocate_section): Likewise.
2559         (elf64_x86_64_size_dynamic_sections): Set up .iplt and .igot.plt
2560         sections.
2561         (elf64_x86_64_finish_dynamic_symbol): When building a static
2562         executable, use .iplt, .igot.plt and .rela.iplt sections for
2563         STT_GNU_IFUNC symbols.  Generate R_X86_64_IRELATIVE relocation
2564         for locally defined STT_GNU_IFUNC symbol.
2566         * reloc.c (BFD_RELOC_386_IRELATIVE): New.
2567         (BFD_RELOC_X86_64_IRELATIVE): Likewise.
2569         * bfd-in2.h: Regenerated.
2570         * libbfd.h: Likewise.
2572 2009-06-01  H.J. Lu  <hongjiu.lu@intel.com>
2574         * elf-bfd.h (struct bfd_elf_section_data): Remove indirect_relocs.
2575         (_bfd_elf_make_ifunc_reloc_section): Removed.
2576         (_bfd_elf_is_ifunc_symbol): Likewise.
2577         (_bfd_elf_create_static_ifunc_sections): New.
2579         * elflink.c (_bfd_elf_adjust_dynamic_symbol): Move STT_GNU_IFUNC
2580         symbol check to ...
2581         (elf_link_add_object_symbols): Here.
2582         (_bfd_elf_link_hash_hide_symbol): Don't clean plt on
2583         STT_GNU_IFUNC symbol.
2584         (elf_link_output_extsym): Call elf_backend_finish_dynamic_symbol
2585         if a STT_GNU_IFUNC symbol is referenced in a non-shared object.
2586         (IFUNC_INFIX): Removed.
2587         (get_ifunc_reloc_section_name): Likewise.
2588         (_bfd_elf_make_ifunc_reloc_section): Likewise.
2589         (_bfd_elf_is_ifunc_symbol): Likewise.
2590         (_bfd_elf_create_static_ifunc_sections): New.
2592 2009-05-29  H.J. Lu  <hongjiu.lu@intel.com>
2594         * elf32-i386.c (link_hash_newfunc): Add elf_i386_ prefix.
2595         (create_got_section): Likewise.
2596         (allocate_dynrelocs): Likewise.
2597         (readonly_dynrelocs): Likewise.
2598         (set_tls_module_base): Likewise.
2599         (dtpoff_base): Likewise.
2600         (tpoff): Likewise.
2601         (elf_i386_link_hash_table_create): Updated.
2602         (elf_i386_create_dynamic_sections): Likewise.
2603         (elf_i386_check_relocs): Likewise.
2604         (elf_i386_size_dynamic_sections): Likewise.
2605         (elf_i386_relocate_section): Likewise.
2607         * elf64-x86-64.c (link_hash_newfunc): Add elf64_x86_64_ prefix.
2608         (create_got_section): Likewise.
2609         (allocate_dynrelocs): Likewise.
2610         (readonly_dynrelocs): Likewise.
2611         (set_tls_module_base): Likewise.
2612         (dtpoff_base): Likewise.
2613         (tpoff): Likewise.
2614         (elf64_x86_64_link_hash_table_create): Updated.
2615         (elf64_x86_64_create_dynamic_sections): Likewise.
2616         (elf64_x86_64_check_relocs): Likewise.
2617         (elf64_x86_64_size_dynamic_sections): Likewise.
2618         (elf64_x86_64_relocate_section): Likewise.
2620 2009-05-28  Nick Clifton  <nickc@redhat.com>
2622         * targets.c (_bfd_target_vector): Only include plugin target in
2623         all-targets build if BFD_SUPPORTS_PLUGINS is non-zero.
2625 2009-05-28  Ulrich Weigand  <uweigand@de.ibm.com>
2627         * elf32-spu.c (struct call_info): New member broken_cycle.
2628         (remove_cycle): Instead of physically removing call_info structures
2629         to break call graph cycles, mark them using the broken_cycle flag.
2630         (mark_overlay_section): Respect broken_cycle flag.
2631         (unmark_overlay_section): Likewise.
2632         (collect_lib_sections): Likewise.
2633         (collect_overlays): Likewise.
2634         (sum_stack): Likewise.
2636 2009-05-28  Ulrich Weigand  <uweigand@de.ibm.com>
2638         * elf32-spu.c (insert_callee): Accumulate incoming callee->count.
2639         (mark_functions_via_relocs): Initialize callee->count to 1.
2640         (pasted_function): Likewise.
2641         (spu_elf_auto_overlay): Honor call counts when determining number
2642         of stubs required in software i-cache mode.
2644 2009-05-27  Rafael Avila de Espindola  <espindola@google.com>
2646         * plugin.c (program_name): Remove.
2647         (plugin_program_name): New.
2648         (bfd_plugin_set_program_name): New.
2649         (try_load_plugin): Use plugin_program_name.
2650         * plugin.h (bfd_plugin_set_program_name): New.
2652 2009-05-27  Rafael Avila de Espindola  <espindola@google.com>
2654         * aclocal.m4: Include ../config/plugins.m4.
2655         * configure.in: Use AC_PLUGINS.
2656         * configure: Regenerate.
2657         * Makefile.in: Regenerate.
2658         * doc/Makefile.in: Regenerate.
2660 2009-05-27  Nathan Sidwell  <nathan@codesourcery.com>
2662         * elf32-ppc.c (ppc_elf_relax_section): Work with a partial
2663         link.
2664         * bout.c (b_out_bfd_relax_section): Reject relocatable links.
2665         * elf32-m10300.c (mn10300_elf_relax_section): Likewise.
2666         * elf32-avr.c (elf32_avr_relax_section): Likewise.
2667         * elf32-frv.c (elf32_avr_relax_section): Likewise.
2668         * elf32-xtensa.c (elf_xtensa_relax_section): Likewise.
2669         * elf64-mmix.c (mmix_elf_relax_section): Likewise.
2670         * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
2671         * elfxx-sparc.c (_bfd_sparc_elf_relax_section): Likewise.
2672         * reloc.c (bfd_generic_relax_section): Likewise.
2673         * reloc16.c (bfd_coff_reloc16_relax_section): Likewise.
2674         * vms.c (vms_bfd_relax_section): Likewise.
2676 2009-05-26  H.J. Lu  <hongjiu.lu@intel.com>
2678         * elf-bfd.h (_bfd_elf_is_ifunc_symbol): New.
2680         * elf32-i386.c (is_indirect_symbol): Renamed to ...
2681         * elflink.c (_bfd_elf_is_ifunc_symbol): This.
2683         * elf32-i386.c (allocate_dynrelocs): Updated.
2684         (elf_i386_relocate_section): Likewise.
2685         * elf64-x86-64.c (allocate_dynrelocs): Likewise.
2686         (elf64_x86_64_relocate_section): Likewise.
2688         * elf64-x86-64.c (is_indirect_symbol): Removed.
2690 2009-05-26  Nick Clifton  <nickc@redhat.com>
2692         * po/id.po: Updated Indonesian translation.
2694 2009-05-26  Rafael Avila de Espindola  <espindola@google.com>
2696         * Makefile.am: Run "make dep-am".
2697         (AM_CPPFLAGS): New.
2698         (LIBDL): New.
2699         (ALL_MACHINES): Add cpu-plugin.lo.
2700         (ALL_MACHINES_CFILES): Add cpu-plugin.c.
2701         (BFD32_BACKENDS): Add plugin.lo.
2702         (BFD32_BACKENDS_CFILES): Add plugin.c.
2703         (libbfd_la_LIBADD): Add LIBDL
2704         * archures.c (bfd_architecture): Add bfd_arch_plugin.
2705         (bfd_plugin_arch): Declare.
2706         * bfd-in.h (BFD_SUPPORTS_PLUGINS): New.
2707         * bfd.c (bfd): Add plugin_data.
2708         * config.bfd: Handle the plugin target.
2709         * configure.in: Check for --enable-plugins.
2710         (LT_INIT): Use the dlopen option.
2711         * cpu-plugin.c: New.
2712         * plugin.c: New.
2713         * plugin.h: New.
2714         * targets.c (plugin_vec): Declare.
2715         (_bfd_target_vector): Add plugin_vec.
2716         * Makefile.in: Regenerate.
2717         * bfd-in2.h: Regenerate.
2718         * configure: Regenerate.
2720 2009-05-26  Alan Modra  <amodra@bigpond.net.au>
2722         * dep-in.sed: Don't modify .o to .lo here.  Output one filename
2723         per line with all lines having continuation backslash.  Prefix
2724         first line with "A", following lines with "B".
2725         * Makefile.am (DEP): Don't use dep.sed here.
2726         (DEP1): Run $MKDEP on single files, modify .o to .lo here.  Use
2727         dep.sed here on dependencies, sort and uniq.
2728         * Makefile.in: Regenerate.
2730 2009-05-25  Tristan Gingold  <gingold@adacore.com>
2732         * makefile.vms: Add verilog.obj to object list OBJS.
2734 2009-05-24  Alan Modra  <amodra@bigpond.net.au>
2736         * bfdio.c (bfd_seek): Formatting.  Ensure newly allocated memory
2737         for BFD_IN_MEMORY is cleared.
2738         (bfd_bwrite): Zero excess memory allocated.
2740 2009-05-22  Julian Brown  <julian@codesourcery.com>
2742         * elf32-arm.c (THUMB16_BCOND_INSN, THUMB32_INSN, THUMB32_B_INSN): New
2743         macros.
2744         (elf32_arm_stub_a8_veneer_b_cond, elf32_arm_stub_a8_veneer_b)
2745         (elf32_arm_stub_a8_veneer_blx): New stub sequences.
2746         (elf32_arm_stub_type): Add arm_stub_a8_veneer_b_cond,
2747         arm_stub_a8_veneer_b and arm_stub_a8_veneer_blx.
2748         (elf32_arm_stub_hash_entry): Add target_addend, orig_insn fields.
2749         (a8_erratum_fix, a8_erratum_reloc): New structs.
2750         (elf32_arm_link_hash_table): Add a8_erratum_fixes,
2751         num_a8_erratum_fixes, fix_cortex_a8 fields.
2752         (elf32_arm_link_hash_table_create): Zero fix_cortex_a8.
2753         (elf32_arm_add_stub): Split into two parts, creating...
2754         (elf32_arm_create_or_find_stub_sec): New function.
2755         (elf32_arm_final_link_relocate): Add forward declaration.
2756         (arm_build_one_stub): Add support for THUMB32_TYPE, Thumb-2
2757         relocations, multiple relocations per stub.
2758         (find_stub_size_and_template): New (using parts of arm_size_one_stub).
2759         (arm_size_one_stub): Use find_stub_size_and_template.
2760         (a8_reloc_compare): New.
2761         (find_thumb_glue): Add forward declaration.
2762         (cortex_a8_erratum_scan): New.
2763         (elf32_arm_size_stubs): Add Cortex-A8 erratum workaround support.
2764         (bfd_elf32_arm_set_cortex_a8_fix): New.
2765         (bfd_elf32_arm_set_target_relocs): Add fix_cortex_a8 argument.
2766         (arm_map_one_stub): Add THUMB32_TYPE support.
2767         (a8_branch_to_stub_data): New.
2768         (make_branch_to_a8_stub): New.
2769         (elf32_arm_write_section): Add Cortex-A8 erratum workaround support.
2770         * bfd-in.h (bfd_elf32_arm_set_cortex_a8_fix): New.
2771         (bfd_elf32_arm_set_target_relocs): Add argument for controlling
2772         Cortex-A8 erratum workaround.
2773         * bfd-in2.h: Regenerate.
2775 2009-05-22  Alan Modra  <amodra@bigpond.net.au>
2777         * Makefile.am: Run "make dep-am".
2778         * Makefile.in: Regenerate.
2779         * po/SRC-POTFILES.in: Regenerate.
2781 2009-05-21  Alan Modra  <amodra@bigpond.net.au>
2783         * elflink.c (elf_link_input_bfd): Correct *pindex change in last
2784         commit.
2786 2009-05-21  Alan Modra  <amodra@bigpond.net.au>
2788         * elf-bfd.h (struct elf_backend_data
2789         <elf_backend_link_output_symbol_hook>): Return an int.
2790         * elf64-ppc.c (ppc64_elf_output_symbol_hook): Return 2 to drop
2791         symbols on deleted .opd entries.
2792         * elflink.c (elf_link_output_sym): Return without outputting sym
2793         if output_symbol_hook returns 2.
2794         (elf_link_output_extsym): Don't assign h->indx when symbol discarded.
2795         Abort if we must not discard sym.
2796         (elf_link_input_bfd): Similarly, don't set finfo->indices for
2797         local syms.
2798         (bfd_elf_final_link): Adjust elf_link_output_sym calls.
2799         * elf-vxworks.c (elf_vxworks_link_output_symbol_hook): Adjust for
2800         elf_backend_link_output_symbol_hook return type change.
2801         * elf32-arm.c (output_arch_syminfo): Likewise.
2802         (elf32_arm_output_map_sym, elf32_arm_output_stub_sym): Likewise.
2803         (elf32_arm_output_arch_local_syms): Likewise.
2804         * elf32-cr16c.c (elf32_cr16c_link_output_symbol_hook): Likewise.
2805         * elf32-score.c (s3_bfd_score_elf_link_output_symbol_hook): Likewise.
2806         (bfd_score_elf_link_output_symbol_hook): Likewise.
2807         * elf32-score.h (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
2808         * elf32-score7.c (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
2809         * elf32-sh64.c (sh64_elf_link_output_symbol_hook): Likewise.
2810         * elf32-spu.c (spu_elf_output_symbol_hook): Likewise.
2811         * elf32-v850.c (v850_elf_link_output_symbol_hook): Likewise.
2812         * elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Likewise.
2813         * elf64-mmix.c (mmix_elf_link_output_symbol_hook): Likewise.
2814         * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Likewise.
2815         * elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise.
2816         * elfxx-mips.c (_bfd_mips_elf_link_output_symbol_hook): Likewise.
2817         * elfxx-mips.h (_bfd_mips_elf_link_output_symbol_hook): Likewise.
2819 2009-05-21  Alan Modra  <amodra@bigpond.net.au>
2821         * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't segfault on
2822         out of range .opd symbols.
2824 2009-05-21  Dave Korn  <dave.korn.cygwin@gmail.com>
2826         * coffgen.c (coff_print_symbol):  Use bfd_fprintf_vma, not
2827         fprintf_vma directly.
2828         * peXXigen.c (pe_print_edata):  Likewise.
2829         (pe_print_pdata):  Likewise.
2830         (_bfd_XX_print_ce_compressed_pdata):  Likewise.
2831         (_bfd_XX_print_private_bfd_data_common):  Likewise.
2833 2009-05-19  Dave Korn  <dave.korn.cygwin@gmail.com>
2835         * cofflink.c (process_embedded_commands):  Ignore "-aligncomm".
2837 2009-05-15  Andrew Stubbs  <ams@codesourcery.com>
2838             Paul Brook  <paul@codesourcery.com>
2840         * elf32-arm.c (elf32_arm_fix_exidx_coverage): Don't attempt to
2841         fix discarded sections.
2843 2009-05-14  Ulrich Weigand  <uweigand@de.ibm.com>
2845         * elf32-spu.c (mark_overlay_section): Move .init and .fini
2846         sections into the software icache.
2848 2009-05-14  Ulrich Weigand  <uweigand@de.ibm.com>
2850         * elf32-spu.c (build_stub): Always build "compact" sofware
2851         i-cache stubs.
2853 2009-05-14  Ulrich Weigand  <uweigand@de.ibm.com>
2855         * elf32-spu.c (struct spu_link_hash_table): Add fromelem_size_log2.
2856         (spu_elf_setup): Initialize it.
2857         (spu_elf_size_stubs): Move .ovtab into .bss for software i-cache.
2858         Update to new-sytle cache manager data structures.
2859         (spu_elf_build_stubs): Generate new-style cache manager data
2860         structures and symbols.
2861         (spu_elf_auto_overlay): Update size computation.
2863 2009-05-14  Ulrich Weigand  <uweigand@de.ibm.com>
2865         * elf32-spu.c (spu_elf_modify_segment_map): Move all PF_OVERLAY
2866         segments first amongst the program headers.
2868 2009-05-14  Ulrich Weigand  <uweigand@de.ibm.com>
2870         * elf32-spu.c (spu_elf_relocate_section): Only encode overlay index
2871         into addresses for relocation types that look at high bits.  Remove
2872         special handling of relocation overflow warnings.
2874 2009-05-14  Ulrich Weigand  <uweigand@de.ibm.com>
2876         * elf32-spu.c (mark_functions_via_relocs): Handle cycles in the
2877         control flow graph between fragments of a function.
2879 2009-05-14  Ulrich Weigand  <uweigand@de.ibm.com>
2881         * elf32-spu.c (spu_elf_size_stubs): Even in software i-cache mode,
2882         generate only a 16-byte .toe section.
2883         (spu_elf_build_stubs, spu_elf_auto_overlay): Likewise.
2885 2009-05-14  Alan Modra  <amodra@bigpond.net.au>
2887         * elf32-spu.c (spu_elf_size_stubs): Split out section placement to..
2888         (spu_elf_place_overlay_data): ..here.  New function.
2889         * elf32-spu.h (spu_elf_place_overlay_data): Declare.
2891 2009-05-13  Andrew Jenner  <andrew@codesourcery.com>
2893         * elf32-arm.c: Move sysdep.h to start of file.
2895 2009-05-11  Ulrich Weigand  <uweigand@de.ibm.com>
2897         * elf32-spu.c (spu_elf_find_overlays): Don't use .ovl.init lma as
2898         start of overlays.
2899         (spu_elf_build_stubs): Don't define __icache_tagbase.  Define
2900         __icache_tag_array and __icache_tag_array_size.
2902 2009-05-11  Masaki Muranaka  <monaka@monami-software.com>
2904         * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Remove unnecessary
2905         ATTRIBUTE_UNUSED.
2906         (bfinfdpic_link_omit_section_dynsym): Likewise.
2907         (elf32_bfinfdpic_finish_dynamic_sections): Likewise.
2909 2009-05-05  Paul Brook  <paul@codesourcery.com>
2911         * bfd-in.h (elf32_arm_fix_exidx_coverage): Add prototype.
2912         * bfd-in2.h: Regenerate.
2913         * elf32-arm.c (arm_unwind_edit_type, arm_unwind_table_edit): Define.
2914         (_arm_elf_section_data): Add text and exidx fields.
2915         (add_unwind_table_edit, get_arm_elf_section_data, adjust_exidx_size,
2916         insert_cantunwind_after, elf32_arm_fix_exidx_coverage, offset_prel31,
2917         copy_exidx_entry): New functions.
2918         (elf32_arm_write_section): Fixup .ARM.exidx contents.
2920 2009-05-05  Christophe lyon  <christophe.lyon@st.com>
2922         * elf32-arm.c (DEF_STUBS): New helper define.
2923         (DEF_STUB): Likewise.
2924         (stub_def): New type.
2925         (stub_definitions): New array, containing stub template pointers
2926         and sizes.
2927         (arm_size_one_stub): Make use of stub_definitions.
2929 2009-05-04  Dave Korn  <dave.korn.cygwin@gmail.com>
2931         * elflink.c (find_version_for_sym):  Remove from here, ...
2932         * linker.c (bfd_find_version_for_sym):  ... rename, replace
2933         here, make public and update all callers.
2934         * bfd-in2.h:  Regenerate.
2936 2009-04-30  Nick Clifton  <nickc@redhat.com>
2938         * elf-bfd.h (struct bfd_elf_section_data): Add indirect_relocs
2939         section pointer.
2940         (struct elf_obj_data): Add has_ifunc_symbols boolean.
2941         * elf.c (swap_out_syms): Convert BSF_GNU_INDIRECT_FUNCTION flags
2942         into a STT_GNU_IFUNC symbol type.
2943         (_bfd_elf_is_function_type): Accept STT_GNU_IFUNC as a function
2944         type.
2945         (_bfd_elf_set_osabi): Set the osasbi field to ELFOSABI_LINUX if
2946         the binary contains ifunc symbols.
2947         * elfcode.h (elf_slurp_symbol_table): Translate the STT_GNU_IFUNC
2948         symbol type into a BSF_GNU_INDIRECT_FUNCTION flag.
2949         * elf32-i386.c (is_indirect_function): New function.
2950         (elf_i386_check_relocs): Create an ifunc output section.
2951         (allocate_dynrelocs): Create dynamic relocs in the ifunc output
2952         section if necessary.
2953         (elf_i386_relocate_section): Emit a reloc against an ifunc symbol
2954         if necessary.
2955         (elf_i386_add_symbol_hook): New function. Set the
2956         has_ifunc_symbols field of the elf_obj_data structure if an ifunc
2957         symbol is encountered.
2958         (elf_backend_post_process_headers): Define.
2959         (elf_backend_add_symbol_hook): Define.
2960         (elf_i386_post_process_headers): Rename to
2961         elf_i388_fbsd_post_process_headers.
2962         * elf64-x86_64.c (IS_X86_64_PCREL_TYPE): New macro.
2963         (is_indirect_function): New function.
2964         (elf64_x86_64_check_relocs): Create an ifunc output section.
2965         (allocate_dynrelocs): Create dynamic relocs in the ifunc output
2966         section if necessary.
2967         (elf64_x86_64_relocate_section): Emit a reloc against an ifunc
2968         symbol if necessary.
2969         (elf_i386_add_symbol_hook): Set the has_ifunc_symbols field of the
2970         elf_obj_data structure if an ifunc symbol is encountered.
2971         (elf_backend_post_process_headers): Define.
2972         * elflink.c (_bfd_elf_adjust_dynamic_symbol): Always create a PLT
2973         if we have ifunc symbols to handle.
2974         (get_ifunc_reloc_section_name): New function.  Computes the name
2975         for an ifunc section.
2976         (_bfd_elf_make_ifunc_reloc_section): New function.  Creates a
2977         section to hold ifunc relocs.
2978         * syms.c (BSF_GNU_INDIRECT_FUNCTION): Define.
2979         (bfd_print_symbol_vandf): Handle ifunc symbols.
2980         (bfd_decode_symclass): Likewise.
2981         * bfd-in2.h: Regenerate.
2983 2009-04-30  Joseph Myers  <joseph@codesourcery.com>
2985         * elf32-arm.c (elf32_arm_check_relocs): Give errors for absolute
2986         MOVW and MOVT relocations in a shared library link.
2988 2009-04-27  Anthony Green  <green@moxielogic.com>
2990         * verilog.c: New file.
2991         * Makefile.am (BFD32_LIBS): Add verilog.c.
2992         (BFD32_LIBS_CFILES): Add verilog.c.
2993         (verilog.lo): New build rule.
2994         * Makefile.in: Rebuilt.
2995         * targets.c: Add verilog support.
2996         * bfd.c (tdata union): Add Verilog private data field.
2997         * bfd-in2.h: Regenerate.
2999 2009-04-27  H.J. Lu  <hongjiu.lu@intel.com>
3001         * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Don't
3002         copy pe_opthdr.
3004 2009-04-23  Matthias Klose  <doko@ubuntu.com>
3006         * peXXigen.c (_bfd_XXi_swap_sym_in): Initialize `name'.
3008 2009-04-22  Christophe Lyon  <christophe.lyon@st.com>
3010         PR9743
3011         * elf32-arm.c (arm_type_of_stub): Handle R_ARM_THM_JUMP24,
3012         R_ARM_JUMP24 and R_ARM_PLT32 relocations.
3013         (elf32_arm_size_stubs): Likewise.
3014         (record_thumb_to_arm_glue): Deleted unused function.
3015         (bfd_elf32_arm_process_before_allocation): No longer handle
3016         R_ARM_THM_JUMP24, R_ARM_JUMP24 and R_ARM_PLT32 relocations here.
3017         (elf32_arm_final_link_relocate): Handle R_ARM_THM_JUMP24,
3018         R_ARM_JUMP24 and R_ARM_PLT32 relocations.
3020 2009-04-21  Daniel Jacobowitz  <dan@codesourcery.com>
3022         * elf32-arm.c (INTERWORK_FLAG): Check BFD_LINKER_CREATED.
3023         (elf32_arm_write_section): Declare early.
3024         (elf32_arm_size_stubs): Skip non-stub sections in the stub BFD.
3025         (arm_allocate_glue_section_space): Exclude empty sections.
3026         (ARM_GLUE_SECTION_FLAGS): Add SEC_LINKER_CREATED.
3027         (bfd_elf32_arm_add_glue_sections_to_bfd): Do not skip the stub
3028         BFD.
3029         (elf32_arm_output_glue_section, elf32_arm_final_link): New.
3030         (elf32_arm_merge_eabi_attributes): Skip the stub BFD.
3031         (elf32_arm_size_dynamic_sections): Allocate interworking
3032         sections here.
3033         (bfd_elf32_bfd_final_link): Define.
3035 2009-04-21  H.J. Lu  <hongjiu.lu@intel.com>
3037         * coff-ia64.c (COFF_PAGE_SIZE): Changed to 8K.
3039         * coffcode.h (coff_compute_section_file_positions): Clear
3040         D_PAGED if PE section alignment is smaller than COFF_PAGE_SIZE.
3042         * libcoff-in.h (pe_tdata): Remove force_minimum_alignment and
3043         force_minimum_alignment.
3045         * libcoff.h: Regenerated.
3047         * pei-ia64.c (PEI_TARGET_SUBSYSTEM): Removed.
3048         (PEI_FORCE_MINIMUM_ALIGNMENT): Likewise.
3050         * peicode.h (pe_mkobject): Don't set force_minimum_alignment
3051         nor target_subsystem.
3053         * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't check
3054         force_minimum_alignment nor target_subsystem.
3056 2009-04-21  Kai Tietz  <kai.tietz@onevision.com>
3058         * coff-x86_64.c (PEI_HEADERS): Protect includes.
3059         (bfd_pe_print_pdata): Remove #ifdef PE variation.
3060         * pei-x86_64.c (PEI_HEADERS): Define to prevent double
3061         include in coff-x86_64.c of headers.
3062         (PDATA_ROW_SIZE): New define.
3063         (pex_regs[]): New static array.
3064         (pex64_get_runtime_function): New static function.
3065         (pex64_get_unwind_info): Likewise.
3066         (pex64_get_scope_entry): Likewise.
3067         (pex64_xdata_print_uwd_codes): Likewise.
3068         (pex64_get_section_by_rva): Likewise.
3069         (pex64_dump_xdata): Likewise.
3070         (pex64_bfd_print_pdata): Likewise.
3071         (bfd_pe_print_pdata): Define as pex64_bfd_print_pdata.
3072         * peXXigen.c (_bfd_pex64_print_pdata): Removed implementation.
3073         * libpei.h (_bfd_pex64_print_pdata): Removed declaration.
3075 2009-04-19  Peter O'Gorman  <binutils@mlists.thewrittenword.com>
3076             Alan Modra  <amodra@bigpond.net.au>
3077             Dave Korn  <dave.korn.cygwin@gmail.com>
3079         * peXXigen.c (_bfd_XXi_swap_sym_in): Fix name handling w.r.t
3080         long names and non-NUL-terminated strings.
3082 2009-04-17  H.J. Lu  <hongjiu.lu@intel.com>
3084         * bfd-in2.h: Regenerated.
3086 2009-04-17  H.J. Lu  <hongjiu.lu@intel.com>
3088         * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Replace
3089         IMAGE_SUBSYSTEM_EFI_ROM with IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER.
3091 2009-04-17  H.J. Lu  <hongjiu.lu@intel.com>
3093         PR binutils/10074
3094         * coffcode.h (bfd_pei_p): New.
3096         * config.bfd: Remove bfd_efi_bsdrv_ia32_vec,
3097         bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
3098         bfd_efi_rtdrv_x86_64_vec, bfd_efi_bsdrv_ia64_vec and
3099         bfd_efi_rtdrv_ia64_vec.  Replace bfd_efi_app_ia32_vec,
3100         bfd_efi_app_x86_64_vec and bfd_efi_app_ia64_vec with
3101         i386pei_vec, x86_64pei_vec and bfd_pei_ia64_vec, respectively.
3103         * configure.in: Remove bfd_efi_bsdrv_ia32_vec,
3104         bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
3105         bfd_efi_rtdrv_x86_64_vec,
3106         bfd_efi_bsdrv_ia64_vec and bfd_efi_rtdrv_ia64_vec.  Replace
3107         bfd_efi_ia64_vec with bfd_pei_ia64_vec.
3108         * targets.c: Likewise.
3110         * configure: Regenerated.
3111         * libcoff.h: Likewise.
3112         * Makefile.in: Likewise.
3114         * efi-app-ia32.c: Removed.
3115         * efi-app-x86_64.c: Likewise.
3116         * efi-bsdrv-ia32.c: Likewise.
3117         * efi-bsdrv-ia64.c: Likewise.
3118         * efi-bsdrv-x86_64.c: Likewise.
3119         * efi-rtdrv-ia32.c: Likewise.
3120         * efi-rtdrv-ia64.c: Likewise.
3121         * efi-rtdrv-x86_64.c: Likewise.
3122         * efi-rtdrv-ia32.c: Likewise.
3124         * efi-app-ia64.c: Moved to ...
3125         * pei-ia64.c: This.
3126         (TARGET_SYM): Set to bfd_pei_ia64_vec.
3127         (TARGET_NAME): Set to pei-ia64.
3129         * libpei.h (bfd_target_pei_p): Removed.
3130         (bfd_target_pei_arch): Likewise.
3131         (bfd_target_efi_app_p): Likewise.
3132         (bfd_target_efi_app_arch): Likewise.
3133         (bfd_target_efi_bsdrv_p): Likewise.
3134         (bfd_target_efi_bsdrv_arch): Likewise.
3135         (bfd_target_efi_rtdrv_p): Likewise.
3136         (bfd_target_efi_rtdrv_arch): Likewise.
3137         (bfd_pe_executable_p): Likewise.
3139         * Makefile.am (BFD32_BACKENDS): Remove efi-app-ia32.lo,
3140         efi-bsdrv-ia32.lo and efi-rtdrv-ia32.lo.
3141         (BFD32_BACKENDS_CFILES): Remove efi-app-ia32.c, efi-bsdrv-ia32.c
3142         and efi-rtdrv-ia32.c.
3143         (BFD64_BACKENDS): Remove efi-app-ia64.lo, efi-bsdrv-ia64.lo,
3144         efi-rtdrv-ia64.lo, efi-app-x86_64.lo, efi-bsdrv-x86_64.lo and
3145         efi-rtdrv-x86_64.lo. Add pei-ia64.lo.
3146         (BFD64_BACKENDS_CFILES): Remove efi-app-ia64.c, efi-bsdrv-ia64.c,
3147         efi-rtdrv-ia64.c, efi-app-x86_64.c, efi-bsdrv-x86_64.c and
3148         efi-rtdrv-x86_64.c. Add pei-ia64.c.
3149         (efi-app-ia64.lo): Removed.
3150         (efi-bsdrv-ia32.lo): Likewise.
3151         (efi-rtdrv-ia32.lo): Likewise.
3152         (efi-app-ia64.lo): Likewise.
3153         (efi-bsdrv-ia64.lo): Likewise.
3154         (efi-rtdrv-ia64.lo): Likewise.
3155         (efi-app-x86_64.lo): Likewise.
3156         (efi-bsdrv-x86_64.lo): Likewise.
3157         (efi-rtdrv-x86_64.lo): Likewise.
3158         (pei-ia64.lo): New.
3160         * peicode.h (coff_swap_scnhdr_in): Replace bfd_pe_executable_p
3161         with bfd_pei_p.
3162         (arch_type): Removed.
3163         (pe_arch): Likewise.
3164         (pe_bfd_object_p): Just return coff_object_p.
3166         * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Replace
3167         bfd_pe_executable_p with bfd_pei_p.
3169 2009-04-17  Christophe Lyon  <christophe.lyon@st.com>
3171         * elf32-arm.c (elf32_arm_size_stubs): Handle long branches through
3172         PLT entries to an undefined symbol when generating a shared
3173         library.
3175 2009-04-17  Nick Clifton  <nickc@redhat.com>
3177         PR 9909
3178         * coffcode.h (handle_COMDAT): Allow for external COMDAT symbols.
3180 2009-04-16  Richard Sandiford  <r.sandiford@uk.ibm.com>
3182         * aout-adobe.c (aout_32_bfd_define_common_symbol): Define.
3183         * aout-target.h (MY_bfd_define_common_symbol): Likewise.
3184         * aout-tic30.c (MY_bfd_define_common_symbol): Likewise.
3185         * binary.c (binary_bfd_define_common_symbol): Likewise.
3186         * bout.c (b_out_bfd_define_common_symbol): Likewise.
3187         * coff-alpha.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
3188         * coff-mips.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
3189         * coffcode.h (coff_bfd_define_common_symbol): Likewise.
3190         * elfxx-target.h (bfd_elfNN_bfd_define_common_symbol): Likewise.
3191         * i386msdos.c (msdos_bfd_define_common_symbol): Likewise.
3192         * i386os9k.c (os9k_bfd_define_common_symbol): Likewise.
3193         * ieee.c (ieee_bfd_define_common_symbol): Likewise.
3194         * ihex.c (ihex_bfd_define_common_symbol): Likewise.
3195         * libbfd-in.h (_bfd_nolink_bfd_define_common_symbol): Likewise.
3196         * mach-o.c (bfd_mach_o_bfd_define_common_symbol): Likewise.
3197         * mmo.c (mmo_bfd_define_common_symbol): Likewise.
3198         * nlm-target.h (nlm_bfd_define_common_symbol): Likewise.
3199         * oasys.c (oasys_bfd_define_common_symbol): Likewise.
3200         * pef.c (bfd_pef_bfd_define_common_symbol): Likewise.
3201         * ppcboot.c (ppcboot_bfd_define_common_symbol): Likewise.
3202         * som.c (som_bfd_define_common_symbol): Likewise.
3203         * srec.c (srec_bfd_define_common_symbol): Likewise.
3204         * tekhex.c (tekhex_bfd_define_common_symbol): Likewise.
3205         * versados.c (versados_bfd_define_common_symbol): Likewise.
3206         * vms.c (vms_bfd_define_common_symbol): Likewise.
3207         * xcoff-target.h (_bfd_xcoff_bfd_define_common_symbol): Likewise.
3208         * xsym.c (bfd_sym_bfd_define_common_symbol): Likewise.
3209         * coff-rs6000.c (rs6000coff_vec): Add _bfd_xcoff_define_common_symbol.
3210         (pmac_xcoff_vec): Likewise.
3211         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3212         (aix5coff64_vec): Likewise.
3213         * linker.c (bfd_generic_define_common_symbol): New function.
3214         * targets.c (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_define_common_symbol.
3215         (_bfd_define_common_symbol): New field.
3216         * libcoff-in.h (_bfd_xcoff_define_common_symbol): Declare.
3217         * xcofflink.c (_bfd_xcoff_define_common_symbol): New function.
3218         (xcoff_build_ldsyms): Don't set XCOFF_DEF_REGULAR for common
3219         symbols here.
3220         * bfd-in2.h: Regenerate.
3221         * libbfd.h: Likewise.
3222         * libcoff.h: Likewise.
3224 2009-04-15  Anthony Green  <green@moxielogic.com>
3226         * targets.c: Add moxie support.
3227         * Makefile.am: Ditto.
3228         * Makefile.in: Rebuilt.
3229         * cpu-moxie.c, elf32-moxie.c: New files.
3230         * archures.c: Add moxie support.
3231         * configure.in: Add moxie support.
3232         * configure: Rebuilt.
3233         * config.bfd, archures.c: Add moxie support.
3234         * bfd-in2.h: Rebuilt.
3236 2009-04-15  Christophe Lyon  <christophe.lyon@st.com>
3238         * elf32-arm.c (elf32_arm_final_link_relocate): Don't convert ARM
3239         branch to an undef weak symbol into a jump to next instruction if
3240         a PLT entry will be created.
3242 2009-04-14  Dave Korn  <dave.korn.cygwin@gmail.com>
3244         * coffgen.c (make_a_section_from_file):  Set the backend long
3245         section names enable if long section names found on input.
3246         * coffcode.h:  Extend long section names documentation to match.
3248 2009-04-08  H.J. Lu  <hongjiu.lu@intel.com>
3250         * elflink.c (elf_link_add_object_symbols): Warn alternate ELF
3251         machine code.
3253 2009-04-07  DJ Delorie  <dj@redhat.com>
3255         * archures.c: Add bfd_mach_mep_c5.
3256         * bfd-in2.h: Likewise.
3257         * cpu-mep.c: Add bfd_c5_arch.
3258         * elf32-mep.c: Support it.
3260 2009-04-07  H.J. Lu  <hongjiu.lu@intel.com>
3262         * elflink.c (_bfd_elf_section_already_linked): Add `\n' for
3263         info->callbacks->einfo.
3264         * linker.c (_bfd_generic_section_already_linked): Likewise.
3266 2009-04-06  DJ Delorie  <dj@redhat.com>
3268         * elf32-h8300.c (elf32_h8_relax_section): Relax MOVA opcodes.
3270 2009-04-06  H.J. Lu  <hongjiu.lu@intel.com>
3272         * coff-x86_64.c (bfd_pe_print_pdata): Defined to
3273         _bfd_pex64_print_pdata only if PE is defined.
3275         * libpei.h (_bfd_pep_print_x64_pdata): Renamed to ...
3276         (_bfd_pex64_print_pdata): This.
3278         * peXXigen.c (_bfd_pep_print_x64_pdata): Renamed to ...
3279         (_bfd_pex64_print_pdata): This.  Defined only if COFF_WITH_pex64
3280         is defined.
3282 2009-04-05  Kai Tietz  <kai.tietz@onevision.com>
3284         * coff-x86_64.c (bfd_pe_print_pdata): Define as
3285         _bfd_pep_print_x64_pdata.
3286         * libpei.h (_bfd_pep_print_x64_pdata): Add prototype.
3287         * peXXigen.c (_bfd_pep_print_x64_pdata): New.
3289 2009-04-02  Sterling Augustine  <sterling@jaw.hq.tensilica.com>
3291         * elf32-xtensa.c (relax_property_section): Always set r_offset
3292         to zero.
3294 2009-04-02  Christophe Lyon  <christophe.lyon@st.com>
3296         * elf32-arm.c (elf32_arm_stub_long_branch_v4t_thumb_thumb,
3297         elf32_arm_stub_long_branch_v4t_thumb_thumb_pic): Two new long
3298         branch stubs.
3299         (elf32_arm_stub_type): New enum values for the two new stubs.
3300         (arm_type_of_stub): Make use of the two new stubs.
3301         (arm_size_one_stub): Handle the two new stubs.
3303 2009-04-01  Matt Thomas  <matt@netbsd.org>
3305         * elf32-vax.c (elf_vax_check_relocs): Do not put relocations against
3306         hidden symbols into the GOT or PLT.GOT.
3307         (elf_vax_relocate_section): Do not emit a PCREL reloc
3308         into a shared object if it is against a hidden symbol.
3310 2009-04-01  Richard Sandiford  <r.sandiford@uk.ibm.com>
3312         * xcofflink.c (xcoff_archive_info): Add contains_shared_object_p
3313         and know_contains_shared_object_p.
3314         (xcoff_archive_contains_shared_object_p): Add an "info" parameter.
3315         Cache the result in the archive_info table.
3316         (xcoff_auto_export_p): Add an "info" parameter and update the
3317         call to xcoff_archive_contains_shared_object_p.
3318         (xcoff_mark_auto_exports): Update accordingly.
3319         (xcoff_post_gc_symbol): Likewise.
3321 2009-04-01  Richard Sandiford  <r.sandiford@uk.ibm.com>
3323         * xcofflink.c (bfd_link_input_bfd): Treat __rtinit as C_HIDEXT
3324         rather than C_EXT.
3326 2009-04-01  Richard Sandiford  <r.sandiford@uk.ibm.com>
3328         * coff-rs6000.c (member_layout): New structure.
3329         (archive_iterator): Likewise.
3330         (member_layout_init): New function.
3331         (archive_iterator_begin): Likewise.
3332         (archive_iterator_next): Likewise.
3333         (xcoff_write_armap_old): Use the new iterator functions.
3334         (do_shared_object_padding): Delete.
3335         (xcoff_write_armap_big): Use the new iterator functions.  Simplify
3336         handling of arch_info.
3337         (xcoff_write_archive_contents_old): Allocate arelt_data in the
3338         first loop rather than the second.  Allocate a member header if
3339         there isn't one, then work out the stat information and length
3340         in the first loop too.  Use the new iterators for the second loop.
3341         (xcoff_write_archive_contents_big): Likewise.
3343 2009-04-01  Richard Sandiford  <r.sandiford@uk.ibm.com>
3345         * bfd-in.h (bfd_xcoff_split_import_path): Declare.
3346         (bfd_xcoff_set_archive_import_path): Likewise.
3347         * bfd-in2.h: Regenerate.
3348         * xcofflink.c: Include libiberty.h.
3349         (xcoff_archive_info): New structure.
3350         (xcoff_archive_info_hash): New function.
3351         (xcoff_archive_info_eq): Likewise.
3352         (xcoff_get_archive_info): Likewise.
3353         (_bfd_xcoff_bfd_link_hash_table_create): Initialize archive_info.
3354         (bfd_xcoff_split_import_path): New function.
3355         (bfd_xcoff_set_archive_import_path): Likewise.
3356         (xcoff_set_import_path): Move earlier in file.
3357         (xcoff_link_add_dynamic_symbols): Set the import path of a non-archive
3358         object to the the directory part of the bfd's filename.  Get the
3359         import path and filename of an archive object from the archive's
3360         xcoff_tdata, initializing it if necessary.  Update use of
3361         import_file_id.
3362         (bfd_link_input_bfd): Update use of import_file_id.
3363         (xcoff_write_global_symbol): Likewise.
3365 2009-04-01  Richard Sandiford  <r.sandiford@uk.ibm.com>
3367         * xcofflink.c (xcoff_link_hash_table): Moved from include/coff/xcoff.h.
3369 2009-04-01  Richard Sandiford  <r.sandiford@uk.ibm.com>
3371         * xcofflink.c (xcoff_link_create_extra_sections): Don't create
3372         a .loader section for relocatable links.
3373         (xcoff_need_ldrel_p): New function.
3374         (xcoff_mark): Use it.
3375         (bfd_xcoff_link_count_reloc): Only count loader relocs if there's
3376         a loader section.
3377         (xcoff_build_ldsym): New function, split out from...
3378         (xcoff_build_ldsyms): ...here.  Rename to...
3379         (xcoff_post_gc_symbol): ...this.  Only export symbols, and only
3380         call xcoff_build_ldsym, if there's a loader section.
3381         (xcoff_build_loader_section): New function, extracted verbatim from...
3382         (bfd_xcoff_size_dynamic_sections): ...here.  Only call it if
3383         there's a loader section.  Only add an __rtinit loader symbol
3384         if there's a loader section.  Update after above name change.
3385         (xcoff_symbol_section, xcoff_create_ldrel): New functions.
3386         (bfd_link_input_bfd): Use xcoff_need_ldrel_p, xcoff_symbol_section
3387         and xcoff_create_ldrel.
3388         (xcoff_write_global_symbol): Use xcoff_create_ldrel.
3389         (xcoff_reloc_link_order): Likewise, but only call it if there's
3390         a loader section.  Use xcoff_symbol_section.
3391         (_bfd_xcoff_bfd_final_link): Only use fdinfo.ldrel and fdinfo.ldsym
3392         if there's a loader section.
3394 2009-04-01  Richard Sandiford  <rdsandiford@googlemail.com>
3396         * xcofflink.c (bfd_link_input_bfd): Fix buffer overrun.
3398 2009-04-01  Christophe Lyon  <christophe.lyon@st.com>
3400         * elf32-arm.c (group_sections): Rewrite loops for better
3401         readability.
3403 2009-03-30  DJ Delorie  <dj@redhat.com>
3405         * elflink.c (elf_link_input_bfd): Don't try to resolve complex
3406         relocs when doing a relocatable link.
3408 2009-03-28  Mark Mitchell  <mark@codesourcery.com>
3410         * coff-arm.c (coff_arm_merge_private_bfd_data): Use "error:", not
3411         "ERROR:", in error messages.
3412         * cpu-arm.c (bfd_arm_merge_machines): Likewise.
3413         * elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise.
3414         * elf32-arm.c (tag_cpu_arch_combine): Likewise.
3415         (elf32_arm_merge_eabi_attributes): Likewise.
3416         (elf32_arm_merge_private_bfd_data): Likewise.
3418 2009-03-27  Nick Clifton  <nickc@redhat.com>
3420         * section.c (bfd_get_section_contents): Detect and handle the case
3421         where a section has the SEC_IN_MEMORY flag set but no actual
3422         contents allocated.
3424 2009-03-26  Alan Modra  <amodra@bigpond.net.au>
3426         PR 6494
3427         * elf.c (copy_elf_program_header): Do not check that PT_GNU_RELRO
3428         p_filesz and p_memsz are equal.  Use p_memsz as the segment size.
3429         (assign_file_positions_for_non_load_sections): Zap PT_GNU_RELRO
3430         if we don't find matching PT_LOAD when copying.
3432 2009-03-25  M R Swami Reddy <MR.Swami.Reddy@nsc.com>
3434         * elf32-crx.c (crx_elf_howto_table): Zero the src_mask field of
3435         the reloc descriptions.
3437 2009-03-25  Hans-Peter Nilsson  <hp@axis.com>
3439         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
3440         <R_CRIS_16_GOT_GD, case R_CRIS_32_GOT_GD>: Handle COMMON symbols.
3441         <case R_CRIS_16_TPREL, R_CRIS_32_TPREL>: Ditto.
3443 2009-03-24  H.J. Lu  <hongjiu.lu@intel.com>
3445         * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Make it static.
3446         (bfd_i386_arch_intel_syntax): Likewise.
3447         (i8086_arch): Likewise.
3448         (bfd_x86_64_arch): Likewise.
3450 2009-03-24  Hans-Peter Nilsson  <hp@axis.com>
3452         * elf32-cris.c (cris_elf_relocate_section): <case
3453         R_CRIS_16_DTPREL, R_CRIS_32_DTPREL>: Allow use of non-local
3454         symbols for non-allocated sections.  Don't check whether to
3455         generate R_CRIS_DTPMOD for non-allocated sections.
3456         (cris_elf_gc_sweep_hook) <case R_CRIS_32_DTPREL>: Don't
3457         handle relocation GC:ing if applied to non-allocated section.
3458         (cris_elf_check_relocs): Similar.
3460         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
3461         <R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: Don't include the TLS size
3462         when emitting a known TP offset in the GOT.
3464 2009-03-23  Alan Modra  <amodra@bigpond.net.au>
3466         * elf64-ppc.c (synthetic_opd): Delete.
3467         (compare_symbols): Look for .opd name rather than section match.
3468         (ppc64_elf_get_synthetic_symtab): Likewise.
3470 2009-03-21  Alan Modra  <amodra@bigpond.net.au>
3472         * elf32-ppc.c (is_pic_glink_stub): Delete.
3473         (is_nonpic_glink_stub): New function.
3474         (ppc_elf_get_synthetic_symtab): Check for last non-pic stub rather
3475         than first pic one.
3476         (struct ppc_elf_link_hash_table <glink_pltresolve>): Comment fix.
3478 2009-03-20  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3479             Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
3481         * elf32-s390.c (elf_s390_check_relocs): Use the SYMBOL_*
3482         macros for visibilty and locality checks.
3483         (elf_s390_adjust_dynamic_symbol): Likewise.
3484         (allocate_dynrelocs): Likewise.
3485         (elf_s390_relocate_section): Likewise.
3486         (elf_s390_finish_dynamic_symbol): Likewise.
3487         * elf64-s390.c (elf_s390_check_relocs): Likewise.
3488         (elf_s390_adjust_dynamic_symbol): Likewise.
3489         (allocate_dynrelocs): Likewise.
3490         (elf_s390_relocate_section): Likewise.
3491         (elf_s390_finish_dynamic_symbol): Likewise.
3493 2009-03-19  Kai Tietz  <kai.tietz@onevision.com>
3495         * bfd-in2.h: Regenerated.
3496         * coffcode.h (sec_to_styp_flags): For pe-coff add SEC_READONLY
3497         for debugging sections and map memory read/write dependent on
3498         SEC_COFF_NOREAD.
3499         (styp_to_sec_flags): Set SEC_COFF_NOREAD for sections
3500         without memory read flags set.
3501         * section.c: Add SEC_COFF_NOREAD to section flags.
3503 2009-03-19  Andreas Schwab  <schwab@linux-m68k.org>
3505         * elf32-hppa.c (final_link_relocate): Cast bfd_vma values to long
3506         for format string.
3508 2009-03-19  Alan Modra  <amodra@bigpond.net.au>
3510         * elf32-spu.c (spu_elf_find_overlays): Separate error return from
3511         "no overlays" return.  If there are overlays, create overlay
3512         manager entry symbols here, so that..
3513         (spu_elf_build_stubs): ..we don't need to set them up here.
3514         Simplify entry symbol tests.
3515         * elf32-spu.h (spu_elf_find_overlays): Update prototype.
3517 2009-03-18  Mark Kettenis  <kettenis@gnu.org>
3519         * elf.c (elfcore_grok_openbsd_procinfo)
3520         (elfcore_grok_openbsd_note): New functions.
3521         (elf_parse_notes): Handle notes from OpenBSD ELF core files.
3523 2009-03-18  Alan Modra  <amodra@bigpond.net.au>
3525         * vms-hdr.c: Don't include alloca.h.
3526         * elf32-m68hc1x.c: Include alloca-conf.h.
3527         * xsym.c: Likewise.
3528         * elf64-hppa.c: Likewise.  Remove existing #if's handling alloca.
3529         * som.c: Likewise.
3530         * Makefile.am: Run "make dep-am".
3531         * Makefile.in: Regenerate.
3533 2009-03-17  Daniel Jacobowitz  <dan@codesourcery.com>
3535         * elf32-arm.c (elf32_arm_check_relocs): Correct symbian_p test.
3537 2009-03-17  Alan Modra  <amodra@bigpond.net.au>
3539         * elf32-spu.h (struct spu_elf_params): ovly_flavour now only 1 bit.
3540         Add compact_stub.
3541         (emum _ovly_flavour): Delete ovly_compact, ovly_none.
3542         * elf32-spu.c (struct spu_link_hash_table): Replace ovly_load and
3543         ovly_return fields with ovly_entry[2].  Adjust all users.
3544         (spu_elf_find_overlays): Set ovly_entry[1] from __icache_call_handler
3545         when soft-icache.
3546         (spu_elf_build_stubs): Likewise.
3547         (ovl_stub_size): Change arg to spu_elf_params pointer.  Adjust for
3548         ovly_flavour changes.  Update all callers.
3549         (ovl_stub_size_log2): New function.
3550         (build_stub): Handle compact icache stubs.  Use different manager
3551         entry point for stubs in non-icache area.
3552         (spu_elf_size_stubs): Don't allocate space for indirect branch
3553         descriptors.
3554         (spu_elf_build_stubs): And don't built them.
3556 2009-03-16  Andrew Stubbs  <ams@codesourcery.com>
3558         * dwarf2.c (read_section): Always use rawsize, if available.
3560 2009-03-16  Alan Modra  <amodra@bigpond.net.au>
3562         * simple.c (bfd_simple_get_relocated_section_contents): Use larger
3563         of rawsize and size for buffer.
3565 2009-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
3567         * elf32-spu.c (spu_elf_check_vma): Do not reset auto_overlay
3568         parameter just because fixed sections fit into local store.
3569         (spu_elf_auto_overlay): Do not declare as "noreturn".  Skip
3570         generating overlays if fixed sections plus reserved stack
3571         and heap space fit into local store.
3573 2009-03-15  Alan Modra  <amodra@bigpond.net.au>
3575         * elf32-spu.c (build_stub): Correct icache set_id.
3576         (spu_elf_relocate_section): Likewise.
3578 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
3580         * xcofflink.c (xcoff_link_check_archive_element): Only free the
3581         symbol table if it was created by the current call.
3583 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
3585         * xcofflink.c (xcoff_build_ldsyms): Give imported descriptors
3586         class XMC_DS rather than XMC_UA.
3588 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
3590         * bfd-in.h (bfd_xcoff_size_dynamic_sections): Replace the
3591         bfd_boolean export_defineds parameter with an unsigned int
3592         auto_export_flags parameter.
3593         * bfd-in2.h: Regenerate.
3594         * xcofflink.c (xcoff_archive_contains_shared_object_p): New function,
3595         split out from xcoff_build_ldsyms.
3596         (xcoff_covered_by_expall_p): New function.
3597         (xcoff_auto_export_p): New function, split out from xcoff_build_ldsyms
3598         but with extra code to handle -bexpfull and -bexpall.
3599         (xcoff_mark_auto_exports): New function.
3600         (xcoff_build_ldsyms): Use xcoff_auto_export_p to decide whether
3601         a function should be automatically exported.
3602         (bfd_xcoff_size_dynamic_sections): Replace the export_defineds
3603         parameter with an auto_export_flags parameter.  Update ldinfo
3604         accordingly.  Use xcoff_mark_auto_exports to mark all automatically-
3605         exported symbols.
3607 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
3609         * xcofflink.c (xcoff_mark_symbol_by_name): New function.
3610         (bfd_xcoff_size_dynamic_sections): Use it to mark the entry,
3611         init and fini functions.  Do garbage collection for objects
3612         without an entry point too.
3614 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
3616         * coffcode.h (coff_pointerize_aux_hook): Update CSECT_SYM_P to
3617         check whether a symbol has csect information.
3618         (coff_print_aux): Likewise.
3619         * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Handle auxillary csect
3620         information for C_AIX_WEAKEXT too.
3621         (_bfd_xcoff_swap_aux_out): Likewise.
3622         (xcoff_reloc_type_br): Handle defweak symbols too.
3623         * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Handle auxillary csect
3624         information for C_AIX_WEAKEXT too.
3625         (_bfd_xcoff64_swap_aux_out): Likewise.
3626         (xcoff64_reloc_type_br): Handle defweak symbols too.
3627         * coffgen.c (coff_print_symbol): Handle auxillary function
3628         information for C_AIX_WEAKEXT too.
3629         * xcofflink.c (_bfd_xcoff_canonicalize_dynamic_symtab): Set BSF_WEAK
3630         instead of BSF_GLOBAL if the L_WEAK flag is set.
3631         (xcoff_dynamic_definition_p): New function.
3632         (xcoff_link_add_dynamic_symbols): Use it to decide whether ldsym
3633         defines h.  Don't change h if ldsym isn't the definition.  Otherwise,
3634         always take the symbol class from the ldsym.  Use weak bfd symbol
3635         types for weak ldsyms.
3636         (xcoff_link_add_symbols): Use CSECT_SYM_P and EXTERN_SYM_P.
3637         Fix the check for whether a definition is from a shared object.
3638         Allow redefinitions of weak symbols.
3639         (xcoff_link_check_ar_symbols): Use EXTERN_SYM_P.
3640         (xcoff_keep_symbol_p): Likewise.
3641         (bfd_xcoff_size_dynamic_sections): Use CSECT_SYM_P.
3642         (xcoff_link_input_bfd): Use CSECT_SYM_P and EXTERN_SYM_P.
3643         Add .loader entries for C_AIX_WEAKEXT as well as C_EXT symbols,
3644         but mark them as L_WEAK.
3645         (xcoff_write_global_symbol): Treat weak symbols as C_AIX_WEAKEXT
3646         instead of C_EXT if C_AIX_WEAKEXT == C_WEAKEXT.
3648 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
3650         * xcofflink.c (xcoff_mark): When walking the relocations,
3651         only mark the target symbol or the target section, not both.
3652         (xcoff_final_definition_p): New function.
3653         (xcoff_keep_symbol_p): Use it to check whether an external XCOFF
3654         symbol is a valid definition of the associated output symbol.
3655         Use XCOFF_ALLOCATED to stop the same hash table entry having
3656         two output symbols.
3657         (bfd_xcoff_size_dynamic_sections): Set XCOFF_ALLOCATED when
3658         keeping a symbol.
3659         (xcoff_link_input_bfd): Use xcoff_final_definition_p.
3661 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
3663         * xcofflink.c (bfd_xcoff_import_symbol): Treat imported absolute
3664         symbols as XMC_XO.
3666 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
3668         * libcoff-in.h (xcoff_tdata): Add a lineno_counts field.
3669         * libcoff.h: Regenerate.
3670         * xcofflink.c (xcoff_link_add_symbols): Record per-symbol
3671         line-number counts in the bfd's lineno_counts field.
3672         Don't keep per-csect line-number counts.
3673         (xcoff_sweep): Don't update per-csect line-number counts.
3674         (bfd_xcoff_size_dynamic_sections): Count the number of line-number
3675         entries in each output section.
3676         (xcoff_link_input_bfd): Get the number of line numbers from
3677         the bfd's lineno_counts field, rather than recalculating it
3678         from scratch.  Fix the range check when updating C_BINCL and
3679         C_EINCL symbols.
3680         (_bfd_xcoff_bfd_final_link): Don't count the output line numbers
3681         here.  Don't expect csects to have line-number counts.
3683 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
3685         * libcoff-in.h (xcoff_tdata): Change debug_indices to a signed long.
3686         * libcoff.h: Regenerate.
3687         * xcofflink.c (xcoff_keep_symbol_p): New function, using the
3688         "skip" logic from xcoff_link_input_bfd.
3689         (bfd_xcoff_size_dynamic_sections): Explicitly skip dynamic
3690         objects in a dynamic link, rather than checking whether csectpp
3691         is null.  Always allocate debug_index for other objects,
3692         and always go through the loop.  Update the type of debug_index
3693         after the change above.  Read the auxillary csect information
3694         and use xcoff_keep_symbol_p to decide whether a symbol should
3695         be kept.  Set its debug_index to -2 if not.
3696         (xcoff_link_input_bfd): Update the type of debug_index after
3697         the change above and always expect it to be nonnull.  Use it to
3698         test whether a symbol should be stripped, rather than making the
3699         decision here.  Postpone all symbol creation to the second pass.
3701 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
3703         * xcofflink.c: (xcoff_mark_symbol): Mark the TOC section when
3704         creating a descriptor.
3705         (xcoff_sweep): Don't mark toc_section unless it's needed.
3706         (bfd_xcoff_size_dynamic_sections): Skip the toc_section
3707         when marking every bfd.
3708         (xcoff_link_input_bfd): Skip all TOC anchors.
3709         (xcoff_toc_section_p, xcoff_find_tc0): New functions.
3710         (_bfd_xcoff_bfd_final_link): Don't set the output bfd's TOC anchor
3711         to -1; call xcoff_find_tc0 instead.
3713 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
3715         * libcoff-in.h (xcoff_section_tdata): Update commentary.
3716         * libcoff.h: Regenerate.
3717         * xcofflink.c (xcoff_link_add_symbols): Set the csect of XTY_ER
3718         symbols to bfd_und_section_ptr or bfd_abs_section_ptr, rather than
3719         the previous symbol's csect.  Treat last_symndx as an inclusive value
3720         and simplify its handling.
3721         (xcoff_mark): Treat last_symndx as an inclusive value.  Only mark
3722         symbols with the right csect.  Don't mark rsec when processing
3723         relocations against undefined or absolute sections.
3724         (bfd_xcoff_size_dynamic_sections): Don't check the SEC_MARK flag
3725         of bfd_und_section_ptr.
3726         (xcoff_link_input_bfd): Likewise.
3728 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
3730         * coff-rs6000.c (xcoff_ppc_relocate_section): Report relocations
3731         against undefined symbols if the symbol's XCOFF_WAS_UNDEFINED
3732         flag is set.  Assert that all undefined symbols are either
3733         imported or defined by a dynamic object.
3734         * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
3735         * xcofflink.c (xcoff_link_add_symbols): Extend function-symbol
3736         handling to all relocations.  Only set XCOFF_CALLED for function
3737         symbols.
3738         (xcoff_find_function): New function, split out from...
3739         (bfd_xcoff_export_symbol) ...here.
3740         (xcoff_set_import_path): New function, split out from...
3741         (bfd_xcoff_import_symbol): ...here.  Remove assertion for old
3742         meaning of XCOFF_CALLED.
3743         (xcoff_mark_symbol): If we mark an undefined and unimported
3744         symbol, find some way of defining it.  If the symbol is a function
3745         descriptor, fill in its definition automatically.  If the symbol
3746         is a function, mark its descriptor and allocate room for global
3747         linkage code.  Otherwise mark the symbol as implicitly imported.
3748         Move the code for creating function descriptors from...
3749         (xcoff_build_ldsyms): ...here.  Use XCOFF_WAS_UNDEFINED to
3750         check for symbols that were implicitly defined.
3751         (xcoff_mark): Don't count any dynamic relocations against
3752         function symbols.
3753         (bfd_xcoff_size_dynamic_sections): Save the rtld parameter
3754         in the xcoff link info.
3755         (xcoff_link_input_bfd): Remove handling of undefined and
3756         unexported symbols.
3758 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
3760         * coff-rs6000.c (xcoff_reloc_type_br): Make the branch absolute
3761         if the target is absolute.  Fix comment typo.
3762         (xcoff_ppc_relocate_section): Remove FIXME.
3763         * coff64-rs6000.c (xcoff64_reloc_type_br): Make the branch absolute
3764         if the target is absolute.
3766 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
3768         * xcofflink.c (xcoff_mark, xcoff_link_input_bfd): Don't copy
3769         R_POS and R_NEG relocations against absolute symbols to the
3770         .loader section.
3772 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
3774         * coff64-rs6000.c (xcoff64_write_object_contents): Set the cputype
3775         to 2 for bfd_mach_ppc_620.
3777 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
3779         * config.bfd: Treat AIX 6+ in the same way as AIX 5.
3780         * configure.in: Likewise.
3781         * configure: Regenerate.
3783 2009-03-13  H.J. Lu  <hongjiu.lu@intel.com>
3785         PR binutils/9945
3786         * elf.c (assign_section_numbers): Generate symbol table if there
3787         is any relocation in output.
3788         (_bfd_elf_compute_section_file_positions): Likewise.
3790 2009-03-13  Nick Clifton  <nickc@redhat.com>
3792         PR 9934
3793         * elf-bfd.h (NUM_SHDR_ENTRIES): Cope with an empty section.
3794         * elflink.c (elf_link_read_relocs_from_section): Use
3795         NUM_SHDR_ENTRIES.  Gracefully handle the case where there are
3796         relocs but no symbol table.
3797         * elf32-arm.c (elf32_arm_check_relocs): Likewise.
3799 2009-03-12  H.J. Lu  <hongjiu.lu@intel.com>
3801         PR ld/9938
3802         * elf32-i386.c (elf_i386_check_tls_transition): Use strncmp
3803         to check ___tls_get_addr.
3805         * elf64-x86-64.c (elf64_x86_64_check_tls_transition): Use
3806         strncmp to check __tls_get_addr.
3808 2009-03-12  Andrew Stubbs  <ams@codesourcery.com>
3810         * dwarf2.c (read_section): Always check the offset, even when the
3811         section has been read before.
3813 2009-03-11  H.J. Lu  <hongjiu.lu@intel.com>
3815         * elf32-i386.c (elf_i386_check_tls_transition): Fix a typo in
3816         comments.
3818 2009-03-11  Chris Demetriou  <cgd@google.com>
3820         * bfd.c (BFD_DETERMINISTIC_OUTPUT): New flag.
3821         * bfd-in2.h: Regenerate.
3822         * archive.c (bfd_ar_hdr_from_filesystem): If BFD_DETERMINISTIC_OUTPUT
3823         flag is set, use 0 for uid, gid, and timestamp, and use 0644 for file
3824         mode.
3825         (bsd_write_armap): Likewise.
3826         (_bfd_archive_bsd_update_armap_timestamp): If BFD_DETERMINISTIC_OUTPUT
3827         flag is set, do nothing.
3828         (coff_write_armap): If BFD_DETERMINISTIC_OUTPUT flag is set, use 0
3829         for timestamp.
3831 2009-03-11  Ulrich Weigand  <uweigand@de.ibm.com>
3833         * elf32-spu.c (find_function_stack_adjust): Handle sf instruction
3834         used to update stack pointer.
3836 2009-03-07  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
3838         PR binutils/9921
3839         * som.c (som_bfd_derive_misc_symbol_info): Set symbol type ST_ABSOLUTE
3840         for unknown symbols in absolute section.
3842 2009-03-06  Nick Clifton  <nickc@redhat.com>
3844         * po/es.po: Updated Spanish translation.
3846 2009-03-05  Christophe Lyon  <christophe.lyon@st.com>
3848         * elf32-arm.c (group_sections): Take next section size into
3849         account before accepting to group it.
3851 2009-03-05  Christophe Lyon  <christophe.lyon@st.com>
3853         * elf32-arm.c (arm_type_of_stub): Handle long branches targetting
3854         PLT entries.
3855         (elf32_arm_final_link_relocate): Likewise.
3857 2009-03-05  Moritz Kroll  <Moritz.Kroll@gmx.de>
3859         PR 9923
3860         * peXXigen.c (_bfd_XXi_final_link_postscript): Check h->root.type.
3862 2009-03-04  Alan Modra  <amodra@bigpond.net.au>
3864         * reloc.c (BFD_RELOC_PPC_TLSGD, BFD_RELOC_PPC_TLSLD): New.
3865         * section.c (struct bfd_section): Add has_tls_get_addr_call.
3866         (BFD_FAKE_SECTION): Init new flag.
3867         * ecoff.c (bfd_debug_section): Likewise.
3868         * bfd-in2.h: Regenerate.
3869         * libbfd.h: Regenerate.
3870         * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_TLSGD and R_PPC_TLSLD.
3871         (ppc_elf_reloc_type_lookup): Handle new relocs.
3872         (ppc_elf_check_relocs): Set has_tls_get_addr_call on finding such
3873         without marker relocs.
3874         (ppc_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
3875         if section has no old-style calls.
3876         (ppc_elf_relocate_section): Set tls_mask for non-tls relocs too.
3877         Don't try to optimize new-style __tls_get_addr call when handling
3878         arg setup relocs.  Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
3879         relocs.
3880         * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_TLSGD, R_PPC64_TLSLD.
3881         (ppc64_elf_reloc_type_lookup): Handle new relocs.
3882         (ppc64_elf_check_relocs): Set has_tls_get_addr_call on finding such
3883         without marker relocs.
3884         (ppc64_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
3885         if section has no old-style calls.  Set toc_ref for new relocs as
3886         appropriate.
3887         (ppc64_elf_relocate_section): Set tls_mask for non-tls relocs too.
3888         Don't try to optimize new-style __tls_get_addr call when handling
3889         arg setup relocs.  Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
3890         relocs.
3892 2009-03-04  Alan Modra  <amodra@bigpond.net.au>
3894         PR 6768
3895         * configure.in: Test for ld --as-needed support.  Link shared
3896         libbfd against libm.
3897         * configure: Regenerate.
3899 2009-03-03  Alan Modra  <amodra@bigpond.net.au>
3901         * Makefile.am: Run "make dep-am".
3902         * Makefile.in: Regenerate.
3904 2009-03-02  Qinwei  <qinwei@sunnorth.com.cn>
3906         * elf32-score7.c: New file.
3907         * elf32-score.h: New file.
3908         * elf32-score.c: Add code to support score 7.  Set score7 as the
3909         default.
3910         * cpu-score.c: Add score7 architecure.
3911         (compatibile): New function.
3912         * Makefile.am: Add rules for building elf32-score7 object.
3913         * Makefile.in: Regenerate.
3914         * configure.in: Add elf32-score7 object to score vectors.
3915         * configure: Regenerate.
3916         * reloc.c: Add score7 relocs.
3917         * archures.c: Add score3 and score7 machine numbers.
3918         * bfd-in2.h: Regenerate.
3919         * libbfd.h: Regenerate.
3921 2009-03-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3923         * configure: Regenerate.
3925 2009-03-01  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
3927         * elf32-hppa.c (hppa32_elf_local_refcounts): New function.
3928         (elf32_hppa_check_relocs): Use it.
3930         * elf_hppa_add_symbol_hook (elf_hppa_add_symbol_hook): Move to
3931         elf64-hppa.c.
3932         (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
3933         (elf_hppa_remark_useless_dynamic_symbols): Likewise.
3934         (elf_hppa_is_dynamic_loader_symbol): Likewise.
3935         (elf_hppa_record_segment_addrs): Likewise.
3936         (elf_hppa_final_link): Likewise.
3937         (elf_hppa_relocate_insn): Likewise.
3938         (elf_hppa_final_link_relocate): Likewise.
3939         (elf64_hppa_relocate_section): Likewise.
3940         * elf64-hppa.c: Insert above.
3942 2009-02-28  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
3944         * elf-hppa.h (elf_hppa_final_link): Use elf_hppa_final_link.
3945         (elf_hppa_final_link_relocate ): Rewrite eliminating dynamic hash table.
3946         (elf_hppa_relocate_section): Likewise.
3947         * elf64-hppa.c (struct elf64_hppa_link_hash_entry): Change to derive
3948         from struct elf_link_hash_entry.  Add count field.
3949         (struct elf64_hppa_dyn_hash_table): Delete.
3950         (struct elf64_hppa_link_hash_table): Delete dyn_hash_table field.
3951         (elf64_hppa_hash_table): Rename to hppa_link_hash_table.
3952         (hppa_elf_hash_entry, eh_name): Define.
3953         (elf64_hppa_new_dyn_hash_entry): Delete.
3954         (elf64_hppa_dyn_hash_lookup): Delete.
3955         (elf64_hppa_dyn_hash_traverse): Delete.
3956         (get_dyn_name): Delete.
3957         (elf64_hppa_finalize_opd): Use struct elf_link_hash_entry * instead
3958         of struct elf64_hppa_dyn_hash_entry *.
3959         (elf64_hppa_finalize_dlt, llocate_global_data_dlt,
3960         allocate_global_data_plt, allocate_global_data_stub,
3961         allocate_global_data_opd, count_dyn_reloc, allocate_dynrel_entries):
3962         Likewise.
3963         (hppa64_link_hash_newfunc): New.
3964         (elf64_hppa_hash_table_create): Rework.
3965         (count_dyn_reloc): Likewise.
3966         (hppa64_elf_local_refcounts): New.
3967         (elf64_hppa_check_relocs): Rework using standard technique for recording
3968         local DLT, PLT and OPD reference counts.
3969         (elf64_hppa_dynamic_symbol_p): Revise using "eh" for struct
3970         elf_link_hash_entry *.
3971         (elf64_hppa_mark_exported_functions, allocate_global_data_dlt,
3972         allocate_global_data_plt, allocate_global_data_stub,
3973         allocate_global_data_opd, allocate_dynrel_entries,
3974         elf64_hppa_adjust_dynamic_symbol,
3975         elf64_hppa_mark_milli_and_exported_functions): Likewise.
3976         (elf64_hppa_create_dynamic_sections, elf64_hppa_size_dynamic_sections):
3977         Use hppa_link_hash_table.  Rework.
3978         (elf64_hppa_link_output_symbol_hook): Rework.
3979         (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd,
3980         elf64_hppa_finalize_dlt, elf64_hppa_finalize_dynreloc,
3981         elf64_hppa_finish_dynamic_sections): Likewise.
3983 2009-02-26  Christophe Lyon  <christophe.lyon@st.com>
3985         * elf32-arm.c (stub_reloc_type): Removed.
3986         (insn_sequence): Renamed reloc_type field to r_type.
3987         (elf32_arm_stub_long_branch_v4t_arm_thumb_pic): New stub.
3988         (elf32_arm_stub_long_branch_v4t_thumb_arm_pic): Likewise.
3989         (elf32_arm_stub_long_branch_thumb_only_pic): Likewise.
3990         (elf32_arm_stub_type): Add new enum entries for the new stubs.
3991         (arm_stub_is_thumb): Catch new stubs.
3992         (arm_type_of_stub): Handle new stubs.
3993         (arm_size_one_stub): Use ARRAY_SIZE. Handle new stubs.
3994         (bfd_elf32_arm_process_before_allocation): Remove useless
3995         condition.
3997 2009-02-25  H.J. Lu  <hongjiu.lu@intel.com>
3999         * elf.c (elf_find_function): Use is_function_type to check
4000         function symbol.
4002 2009-02-24  Sterling Augustine  <sterling@jaw.hq.tensilica.com>
4004         * xtensa-modules.c: Revert to previous version 1.11 due
4005         to inadvertant commit.
4007 2009-02-24  Sterling Augustine  <sterling@tensilica.com>
4009         * elf32-xtensa.c (text_action_add): Separate test for action
4010         type.  Break if saved action is ta_widen_insn at same offset.
4012 2009-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
4014         * elf32-arm.c (elf32_arm_stub_long_branch_any_any_pic): Rename
4015         to elf32_arm_stub_long_branch_any_arm_pic.
4016         (elf32_arm_stub_long_branch_any_thumb_pic): New.
4017         (enum elf32_arm_stub_type, arm_type_of_stub)
4018         (arm_size_one_stub): Handle any to ARM PIC and any to Thumb PIC
4019         separately.
4021 2009-02-24  Joseph Myers  <joseph@codesourcery.com>
4023         * elf32-arm.c (PREV_SEC): Update comment.
4024         (group_sections): Rename argument to stubs_always_after_branch.
4025         Reverse the list and place stubs at the end of input sections.
4026         Undefine NEXT_SEC.
4027         (elf32_arm_size_stubs): Update to use stubs_always_after_branch.
4029 2009-02-23  Daniel Jacobowitz  <dan@codesourcery.com>
4031         * elf32-arm.c (arm_build_one_stub): Initialize stub_reloc_offset.
4032         Fix formatting.
4033         (arm_size_one_stub): Remove unnecessary break.
4034         (arm_map_one_stub): Fix formatting.  Return after BFD_FAIL.
4036 2009-02-23  Christophe Lyon  <christophe.lyon@st.com>
4038         * elf32-arm.c (stub_insn_type): New type.
4039         (stub_reloc_type): Likewise.
4040         (insn_sequence): Likewise.
4041         (elf32_arm_stub_long_branch_any_any): Encode using insn_sequence.
4042         (elf32_arm_stub_long_branch_v4t_arm_thumb): Likewise.
4043         (elf32_arm_stub_long_branch_thumb_only): Likewise.
4044         (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
4045         (elf32_arm_stub_short_branch_v4t_thumb_arm): Likewise.
4046         (elf32_arm_stub_long_branch_any_any_pic): Likewise.
4047         (elf32_arm_stub_hash_entry): Add new helper fields.
4048         (stub_hash_newfunc): Initialize these new fields.
4049         (arm_build_one_stub): Encode Arm and Thumb instructions separately
4050         to take endianness into account.
4051         (arm_size_one_stub): Compute size of stubs using insn_sequence.
4052         (arm_map_one_stub): Code is now more generic, thanks to
4053         insn_sequence.
4055 2009-02-23  Christophe Lyon  <christophe.lyon@st.com>
4057         * elf32-arm.c (elf32_arm_stub_long_branch_thumb_only): Fix stub
4058         code.
4059         (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
4060         (arm_type_of_stub): Use Thumb-only long branch stub (non-PIC) when
4061         BLX is not available. Fix typo in warning message. Add comments
4062         and improve formatting.
4063         (arm_build_one_stub): Adjust to new
4064         elf32_arm_stub_long_branch_v4t_thumb_arm stub.
4065         (arm_map_one_stub): Likewise.
4067 2009-02-23  Tristan Gingold  <gingold@adacore.com>
4068             Eric Botcazou  <ebotcazou@adacore.com>
4069             Douglas B Rupp  <rupp@gnat.com>
4071         * vms.h: Update copyright year, fix comments, reorder declarations.
4072         (_bfd_save_vms_section): Remove the prototype.
4073         (EGPS_S_V_NO_SHIFT): New constant.
4074         (bfd_vms_set_section_flags): New prototype.
4075         (EGPS_S_B_ALIGN, EGPS_S_W_FLAGS, EGPS_S_L_ALLOC, EGPS_S_B_NAMLNG): New
4076         constants.
4077         (EGSY_S_W_FLAGS): Ditto.
4078         (EGSY_S_V_QUAD_VAL): Ditto.
4079         (ESDF_S_L_VALUE, ESDF_S_L_PSINDX, ESDF_S_B_NAMLNG): Ditto.
4080         (EGST_S_W_FLAGS, EGST_S_Q_LP_1, EGST_S_Q_LP_2, EGST_S_L_PSINDX,
4081         EGST_S_B_NAMLNG): Ditto.
4082         (ESRF_S_B_NAMLNG): Ditto.
4083         (ETIR_S_C_HEADER_SIZE): Ditto.
4084         (EGPS_S_V_ALLOC_64BIT): Ditto.
4085         (DST_S_C_EPILOG): Ditto.
4086         (DST_S_C_SRC_SETLNUM_L, DST_S_C_SRC_SETLNUM_W) : Ditto.
4087         (DST_S_C_SRC_INCRLNUM_B): Ditto.
4088         (DST_S_B_PCLINE_UNSBYTE, DST_S_W_PCLINE_UNSWORD): Ditto.
4089         (DST_S_L_PCLINE_UNSLONG): Ditto.
4090         (DST_S_B_MODBEG_NAME, DST_S_L_RTNBEG_ADDRESS) : Ditto
4091         (DST_S_B_RTNBEG_NAME, DST_S_L_RTNEND_SIZE): Ditto
4092         (DST_S_C_SOURCE_HEADER_SIZE): Ditto.
4093         (DST_S_B_SRC_DF_LENGTH, DST_S_W_SRC_DF_FILEID): Ditto.
4094         (DST_S_B_SRC_DF_FILENAME, DST_S_B_SRC_UNSBYTE): Ditto.
4095         (DST_S_B_SRC_UNSBYTE): Ditto.
4096         (DST_S_W_SRC_UNSWORD, DST_S_L_SRC_UNSLONG): Ditto.
4097         Add prototypes.
4098         (vms_section, vms_reloc): Remove types.
4099         (hdr_struc): Replaced by ...
4100         (hdr_struct): ... new type.
4101         (EMH_S_W_HDRTYP, EMH_S_B_STRLVL, EMH_S_L_ARCH1): New constants.
4102         (EMH_S_L_ARCH2, EMH_S_L_RECSIZ, EMH_S_B_NAMLNG): Ditto.
4103         (EMH_DATE_LENGTH): Ditto.
4104         (eom_struc): Replaced by ...
4105         (eom_struct): ... new type.
4106         (EEOM_S_L_TOTAL_LPS, EEOM_S_W_COMCOD, EEOM_S_B_TFRFLG): New constants.
4107         (EEOM_S_L_PSINDX, EEOM_S_L_TFRADR): Ditto.
4108         (EIHD_S_K_MAJORID, EIHD_S_K_MINORID, EIHD_S_K_EXE): Ditto.
4109         (EIHD_S_L_SIZE, EIHD_S_L_ISDOFF, EIHD_S_L_SYMDBGOFF): Ditto.
4110         (EIHD_S_Q_SYMVVA, EIHD_S_L_IMGTYPE): Ditto.
4111         (EISD_S_L_EISDSIZE, EISD_S_L_SECSIZE, EISD_S_Q_VIR_ADDR): Ditto.
4112         (EISD_S_L_FLAGS, EISD_S_L_VBN, EISD_S_R_CONTROL): Ditto.
4113         (EISD_S_L_IDENT, EISD_S_T_GBLNAM): Ditto.
4114         (EISD_S_M_GBL, EISD_S_M_CRF, EISD_S_M_DZRO, EISD_S_M_WRT): Ditto.
4115         (EISD_S_M_INITALCODE, EISD_S_M_BASED, EISD_S_M_FIXUPVEC): Ditto.
4116         (EISD_S_M_RESIDENT, EISD_S_M_VECTOR, EISD_S_M_PROTECT): Ditto.
4117         (EISD_S_M_LASTCLU, EISD_S_M_EXE, EISD_S_M_NONSHRADR): Ditto.
4118         (EISD_S_M_QUAD_LENGTH, EISD_S_M_ALLOC_64BIT): Ditto.
4119         (EIHS_S_L_DSTVBN, EIHS_S_L_DSTSIZE, EIHS_S_L_GSTVBN): Ditto.
4120         (EIHS_S_L_GSTSIZE, EIHS_S_L_DMTVBN, EIHS_S_L_DMTBYTES): Ditto.
4121         (DBG_S_L_DMT_MODBEG, DBG_S_L_DST_SIZE): Ditto.
4122         (DBG_S_W_DMT_PSECT_COUNT, DBG_S_C_DMT_HEADER_SIZE): Ditto.
4123         (DBG_S_L_DMT_PSECT_START, DBG_S_L_DMT_PSECT_LENGTH)
4124         (DBG_S_C_DMT_PSECT_SIZE): Ditto.
4125         (enum file_type_enum): New type.
4126         (struct location_struct): Removed.
4127         (struct fileinfo, struct srecinfo, struct lineinfo): New types.
4128         (struct funcinfo, struct module): Ditto.
4129         (struct vms_private_data_struct): Update fields.
4130         (struct vms_section_data_struct): New type.
4132         * vms.c: Update copyright year, fix comments,
4133         Fix includes for DECC, add prototypes.
4134         (vms_initialize): Use bfd_alloc instead of bfd_zalloc and remove
4135         some initializers.
4136         Use flavour to set is_vax, location_stack is removed.
4137         (struct pair): Declare.
4138         (fill_section_ptr): Initialize variables at declaration.
4139         Add guard to set SECTION_SYM flag, handlde und section.
4140         (vms_fixup_sections): Use struct pair for fill_section_ptr argument.
4141         (_bfd_vms_slurp_object_records): New function, replaces previous
4142         vms_object_p.
4143         (vms_slurp_module): New function.
4144         (vms_slurp_image): Ditto.
4145         (vms_object_p): Complete rewrite.
4146         (vms_mkobject): Use is_vax field to slect architecture.
4147         (free_reloc_stream): New function.
4148         (vms_convert_to_var): Ditto.
4149         (vms_convert_to_var_1): Ditto.
4150         (vms_convert_to_var_unix_filename): Ditto.
4151         (vms_close_and_cleanup): Call free_reloc_stream, convert file to
4152         VAR format on VMS.
4153         (vms_new_section_hook): Set alignment to 0, allocate private data.
4154         (vms_get_section_contents): Load content.
4155         (vms_get_symbol_info): Handle undefined section.
4156         (vms_find_nearest_line): Handle.
4157         (alloc_reloc_stream): New function.
4158         (vms_slurp_reloc_table): Ditto.
4159         (vms_get_reloc_upper_bound): Make it real.
4160         (vms_canonicalize_reloc): Do the real work.
4161         (alpha_howto_table): Add ALPHA_R_NOP, ALPHA_R_BSR, ALPHA_R_LDA,
4162         ALPHA_R_BOH.
4163         (vms_bfd_reloc_type_lookup): Handle NOP, BSR, LDA and BOH.
4164         (vms_set_arch_mach): Check arch.
4165         (vms_set_section_contents): Copy the content after allocation.
4166         (vms_alpha_vec): Update object flags.
4168         * vms-tir.c: Update copyright year, fix comments,
4169         add prototypes for new functions.
4170         (dst_define_location): New function.
4171         (dst_restore_location): New function.
4172         (dst_retrieve_location): New function.
4173         (dst_check_allocation): New function.
4174         (image_dump): Call dst_check_allocation.
4175         (image_write_b): Ditto.
4176         (image_write_w): Ditto.
4177         (image_write_l): Ditto.
4178         (image_write_q): Ditto.
4179         (cmd_name): Handle STA_LW, STA_QW, STO_OFF, STO_IMM, STO_IMMR, STO_LW,
4180         STO_QW, OPR_ADD, CTL_SETRB, STC_LP_PSB, CTL_DFLOC, CTL_STLOC,
4181         CTL_STKDL.
4182         Call error handler instead of abort if name is not known.
4183         (etir_sta): Add quarter_relocs argument and set it.
4184         Fix cast.
4185         (etir_sto): Ditto.
4186         (etir_opr): Ditto, return FALSE in case of error.
4187         (etir_ctl): Add quarter_relocs argument and set it, fix cast.
4188         Fix CTL_DFLOC, CTL_STLOC, CTL_STKDL.
4189         (etir_stc): Add quarter_relocs argument and set it, fix cast.
4190         Fix STC_LP, STC_LP_PSB, STC_GBL and STC_CGA.
4191         Handle STC_LP_PSB, STC_BSR_GBL, STC_LDA_GBL, STC_BOH_GBL.
4192         Move STC_NOP_PS, STC_BSR_PS, STC_LDA_PS, STC_BOH_PS, STC_NBH_PS.
4193         Return FALSE in case of error.
4194         (tir_sta): Change sign of psect.
4195         (tir_ctl): Ditto.
4196         (tir_cmd): Fix cast. Makes tir_table static const.
4197         (etir_cmd): Add quarter_relocs argument, makes etir_table const,
4198         add argument to explain.
4199         (analyze_etir): Initialize maxptr, add quarter_relocs
4200         declaration, move some declarations into inner scopes.
4201         Handle quarter_relocs and STO_IMM.
4202         (_bfd_vms_slurp_tir): Use constant instead of hard-coded values.
4203         (_bfd_vms_slurp_relocs): New function.
4204         (_bfd_vms_decode_relocs): New function.
4205         (sto_imm): Rewritten.
4206         (start_first_etbt_record): New function.
4207         (start_another_etbt_record): Ditto.
4208         (etir_output_check): Ditto.
4209         (defer_reloc_p): Ditto.
4210         (_bfd_vms_write_tir): Remove nextoffset, convert a while-loop to
4211         a for-loop.  Correctly deals with contents, deals with .vmsdebug,
4212         rewritte relocations handling.
4213         (_bfd_vms_write_tbt): Removed.
4214         (_bfd_vms_write_dbg): Ditto.
4216         * vms-misc.c: Update copyright year, Fix comments.
4217         (_bfd_vms_get_header_values): Use 'size' instead of 'length'.
4218         (maybe_adjust_record_pointer_for_object): New function.
4219         (_bfd_vms_get_first_record): New function, replaces ...
4220         (_bfd_vms_get_record): ..  removed.
4221         (_bfd_vms_get_object_record): New function.
4222         (_bfd_vms_get_object_record): New function.
4223         (vms_get_remaining_object_record): New function, replaces ...
4224         (_bfd_vms_get_next_record): ... removed.
4225         (add_new_contents): Removed.
4226         (_bfd_save_vms_section): Removed.
4227         (_bfd_get_vms_section): Removed.
4228         (_bfd_vms_output_flush): Write in VAR format.
4229         (new_symbol): Don't make UND section.
4231         * vms-hdr.c: Update copyright year, update list of record handled.
4232         (_bfd_vms_slurp_hdr): rec_length renamed to rec_size.
4233         (_bfd_vms_write_hdr): Strip vms and unix patches,
4234         add comments, truncate module name at 31 characters,
4235         use constants instead of hard-coded value,
4236         write BFD version instead of a fixed string.
4237         (_bfd_vms_slurp_ihd): New function.
4238         (_bfd_vms_slurp_isd): Ditto.
4239         (_bfd_vms_slurp_ihs): Ditto.
4240         (new_module): Ditto.
4241         (parse_module): Ditto
4242         (build_module_list): Ditto.
4243         (module_find_nearest_line): Ditto.
4244         (_bfd_vms_find_nearest_dst_line): Ditto.
4245         (vms_slurp_debug): Ditto.
4246         (_bfd_vms_slurp_dbg): Ditto.
4247         (_bfd_vms_slurp_tbt): Ditto.
4248         (_bfd_vms_write_dbg): Ditto.
4249         (_bfd_vms_write_tbt): Ditto.
4251         * vms-gsd.c: Update copyright year, update list of records handled.
4252         (EVAX_LITERALS_NAME): New macro.
4253         (evax_section_flags): Add an entry for EVAX_LITERALS_NAME.
4254         (gpsflagdesc, gsyflagdesc): Moved out of _bfd_vms_slurp_gsd.
4255         (register_universal_symbol): New function and prototype.
4256         (_bfd_vms_slurp_gsd): Fix indentations and casts,
4257         improve debug messages,
4258         use constants instead of hard-coded value,
4259         fix missing endianness conversion,
4260         handle global symbol (SYMG).
4261         (bfd_vms_set_section_flags): New function.
4262         (_bfd_vms_write_gsd): Don't write .vmsdebug section,
4263         handle section literals,
4264         fix indentation,
4265         handle section bfd and vms flags,
4266         don't output LIB$INITIALIZE symbol,
4267         fix handling of weak symbols,
4268         fix evax vs vax procedure descriptor,
4269         handle absolute symbols.
4271         * reloc.c (BFD_RELOC_ALPHA_NOP, BFD_RELOC_ALPHA_BSR,
4272         BFD_RELOC_ALPHA_LDA, BFD_RELOC_ALPHA_BOH): New relocations.
4274         * makefile.vms (DEFS): Fix flags for VMS.
4276         * bfdio.c (real_fopen): Handle multiple VMS fopen attributes.
4278         * bfd-in2.h: Regenerated.
4279         * libbfd.h: Regenerated.
4281 2009-02-20  Cary Coutant  <ccoutant@google.com>
4283         * vmsutil.c (vms_file_stats_name): Fix incorrect use of st_mtime
4284         in struct stat.
4286 2009-18-02  Dave Korn  <dave.korn.cygwin@gmail.com>
4288         PR gas/7059
4289         * coffcode.h (coff_write_object_contents):  Don't let the string
4290         table offset overflow the s_name field when using long section names.
4292 2009-18-02  Dave Korn  <dave.korn.cygwin@gmail.com>
4294         * coff-alpha.c (alpha_ecoff_backend_data):  Initialise fields which
4295         control long section name handling with ECOFF_NO_LONG_SECTION_NAMES.
4296         * coff-mips.c (mips_ecoff_backend_data):  Likewise.
4297         * coff-rs6000.c (bfd_xcoff_backend_data):  Initialise fields which
4298         control long section name handling with XCOFF_NO_LONG_SECTION_NAMES.
4299         (bfd_pmac_xcoff_backend_data):  Likewise.
4300         * coff64-rs6000.c (bfd_xcoff_backend_data):  Likewise.
4301         (bfd_xcoff_aix5_backend_data):  Likewise.
4302         (xcoff64_write_object_contents):  Delete unused long_section_names
4303         local variable.
4304         * coff-sh.c (bfd_coff_small_swap_table):  Initialise long section
4305         name members using COFF_DEFAULT_LONG_SECTION_NAMES and make entire
4306         struct non-const.
4307         * coffcode.h (documentation):  Update to describe long section names.
4308         (COFFLONGSECTIONCATHELPER):  New helper macro.
4309         (BLANKOR1TOODD):  Likewise.
4310         (COFF_ENABLE_LONG_SECTION_NAMES):  Likewise.
4311         (COFF_LONG_SECTION_NAMES_SETTER):  Likewise.
4312         (COFF_DEFAULT_LONG_SECTION_NAMES):  Likewise.
4313         (bfd_coff_set_long_section_names_allowed):  New function.
4314         (bfd_coff_set_long_section_names_disallowed):  Likewise.
4315         (struct bfd_coff_backend_data):  Add new backend hook function
4316         pointer _bfd_coff_set_long_section_names.
4317         (bfd_coff_set_long_section_names):  New backend hook.
4318         (coff_write_object_contents):  Only generate long section names if
4319         bfd_coff_long_section_names() indicates they are currently enabled.
4320         (bfd_coff_std_swap_table):  Make non-const, and initialise long
4321         section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
4322         (ticoff0_swap_table):  Likewise to both.
4323         (ticoff1_swap_table):  Again, likewise to both.
4324         * coffgen.c (make_a_section_from_file):  Allow long section names
4325         as inputs even if not currently allowed for outputs.
4326         * ecoff.c (_bfd_ecoff_no_long_sections):  New function.
4327         * efi-app-ia32.c (COFF_LONG_SECTION_NAMES):  Define to 0, not blank.
4328         * efi-app-ia64.c (COFF_LONG_SECTION_NAMES):  Likewise.
4329         * efi-app-x86_64.c (COFF_LONG_SECTION_NAMES):  Likewise.
4330         * efi-bsdrv-ia32.c (COFF_LONG_SECTION_NAMES):  Likewise.
4331         * efi-bsdrv-ia64.c (COFF_LONG_SECTION_NAMES):  Likewise.
4332         * efi-bsdrv-x86_64.c (COFF_LONG_SECTION_NAMES):  Likewise.
4333         * efi-rtdrv-ia32.c (COFF_LONG_SECTION_NAMES):  Likewise.
4334         * efi-rtdrv-ia64.c (COFF_LONG_SECTION_NAMES):  Likewise.
4335         * efi-rtdrv-x86_64.c (COFF_LONG_SECTION_NAMES):  Likewise.
4336         * pei-arm.c (COFF_LONG_SECTION_NAMES):  Likewise.
4337         * pei-i386.c (COFF_LONG_SECTION_NAMES):  Likewise.
4338         * pei-mcore.c (COFF_LONG_SECTION_NAMES):  Likewise.
4339         * pei-mips.c (COFF_LONG_SECTION_NAMES):  Likewise.
4340         * pei-ppc.c (COFF_LONG_SECTION_NAMES):  Likewise.
4341         * pei-sh.c (COFF_LONG_SECTION_NAMES):  Likewise.
4342         * pei-x86_64.c (COFF_LONG_SECTION_NAMES):  Likewise.
4343         * libcoff-in.h:  Update copyright year to cause updated copyright
4344         year in generated libcoff.h, and fix typo.
4345         * libcoff.h:  Regenerated.
4346         * libecoff.h (ECOFF_NO_LONG_SECTION_NAMES):  New macro.
4347         (_bfd_ecoff_no_long_sections):  Add prototype.
4348         * libxcoff.h (XCOFF_NO_LONG_SECTION_NAMES):  New macro.
4349         * pe-mips.c (COFF_LONG_SECTION_NAMES):  Define empty if not already
4350         defined by an including .c file.
4351         * ticoff.h (ticoff0_swap_table):  Make non-const, and initialise
4352         long section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
4353         (ticoff1_swap_table):  Likewise to both.
4355 2009-02-18  Christophe Lyon  <christophe.lyon@st.com>
4357         * elf32-arm.c (arm_build_one_stub): Fix relocation target for pic
4358         stub. Catch default case error.
4359         (arm_map_one_stub): Add missing Thumb mapping symbol.
4361 2009-02-18  Bjoern Haase  <bjoern.m.haase@web.de>
4363         PR 9841
4364         * elf32-avr.c: Handle case where no local symbos exist correctly.
4366 2009-02-16  Christophe Lyon  <christophe.lyon@st.com>
4368         bfd/
4369         * elf32-arm.c (arm_long_branch_stub,
4370         arm_thumb_v4t_long_branch_stub,
4371         arm_thumb_thumb_long_branch_stub,
4372         arm_thumb_arm_v4t_long_branch_stub,
4373         arm_thumb_arm_v4t_short_branch_stub,
4374         arm_pic_long_branch_stub):
4375         Renamed to elf32_arm_stub_long_branch_any_any,
4376         elf32_arm_stub_long_branch_v4t_arm_thumb,
4377         elf32_arm_stub_long_branch_thumb_only,
4378         elf32_arm_stub_long_branch_v4t_thumb_arm,
4379         elf32_arm_stub_short_branch_v4t_thumb_arm,
4380         elf32_arm_stub_long_branch_any_any_pic.
4381         (arm_stub_long_branch, arm_thumb_v4t_stub_long_branch,
4382         arm_thumb_thumb_stub_long_branch,
4383         arm_thumb_arm_v4t_stub_long_branch,
4384         arm_thumb_arm_v4t_stub_short_branch, arm_stub_pic_long_branch):
4385         Renamed to arm_stub_long_branch_any_any,
4386         arm_stub_long_branch_v4t_arm_thumb,
4387         arm_stub_long_branch_thumb_only,
4388         arm_stub_long_branch_v4t_thumb_arm,
4389         arm_stub_short_branch_v4t_thumb_arm,
4390         arm_stub_long_branch_any_any_pic.
4392 2009-02-15  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
4394         * elf-hppa.h (elf_hppa_final_link_relocate): Correct addend value used
4395         in branch offset check.
4397 2009-02-15  Alan Modra  <amodra@bigpond.net.au>
4399         * elf64-ppc.c (struct _ppc64_elf_section_data): Delete t_symndx,
4400         add toc.symndx and toc.add.
4401         (ppc64_elf_check_relocs): Don't set htab->tls_get_addr here.
4402         Set up toc.add.
4403         (get_tls_mask): Add toc_addend param, set from toc.add.  Adjust all
4404         callers.
4405         (ppc64_elf_tls_setup): Set htab->tls_get_addr and tls_get_addr_fd.
4406         (branch_reloc_hash_match): New function, extracted from..
4407         (ppc64_elf_tls_optimize): ..here.
4408         (ppc64_elf_relocate_section): Properly set addends when optimizing
4409         tls sequences.  Avoid unnecessary reading and writing of insns.
4410         Only redo reloc when symbol changed.  Bypass symbol checks when
4411         using tlsld_got.
4412         * elf32-ppc.c (ppc_elf_tls_setup): Correct comment.
4413         (branch_reloc_hash_match): New function, extracted from..
4414         (ppc_elf_tls_optimize): ..here.
4415         (ppc_elf_relocate_section): Avoid unnecessary reading of insns.
4416         Don't clear addend on zapped __tls_get_addr reloc.
4418 2009-02-12  Nick Clifton  <nickc@redhat.com>
4420         PR 9827
4421         * elflink.c (bfd_elf_final_link): When counting the relocations,
4422         if the header size has not been set yet then assume that it will
4423         match the output section's reloc type.
4425 2009-02-12  Nathan Sidwell  <nathan@codesourcery.com>
4427         * elf32-mips.c (mips_elf_final_gp): Don't add 0x4000 offset for
4428         relocatable link.
4430 2009-02-09  Alan Modra  <amodra@bigpond.net.au>
4432         * elf32-spu.c (spu_elf_find_overlays): Call bfd_set_error on errors.
4433         (find_function): Likewise.
4434         (pasted_function): Don't error if no prior function found.
4435         (discover_functions): Revert 2008-12-10 change.  Extend first
4436         function range to start of section.
4438 2009-02-08  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
4440         * elf64-hppa.c: Remove PARAMS macro.  Replace PTR with void *.  Convert
4441         functions to C90.
4442         * elf64-hppa.h: Likewise.
4444 2009-02-06  Joseph Myers  <joseph@codesourcery.com>
4446         * elfxx-mips.c (_bfd_mips_elf_section_processing): Remove special
4447         .sbss handling.
4449 2009-02-04  Alan Modra  <amodra@bigpond.net.au>
4451         * elf32-spu.c (spu_elf_build_stubs): Define __icache_neg_log2_linesize.
4452         Define __icache_ptr_handler*, not __icache_ptr___icache_bi_handler*.
4454 2009-02-03  Sandip Matte  <sandip@rmicorp.com>
4456         * aoutx.h (NAME (aout, machine_type)): Handle bfd_mach_mips_xlr.
4457         * archures.c (bfd_mach_mips_xlr): Define.
4458         * bfd-in2.h: Regenerate.
4459         * cpu-mips.c (I_xlr): Define.
4460         (arch_info_struct): Add XLR entry.
4461         * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_XLR.
4462         (mips_set_isa_flags): Handle bfd_mach_mips_xlr
4463         (mips_mach_extensions): Add XLR entry.
4465 2009-02-03  Eric B. Weddington  <eric.weddington@atmel.com>
4467         * elf32-avr.c (avr_final_link_relocate): Allow avr25 to wraparound.
4469 2009-02-03  Carlos O'Donell  <carlos@codesourcery.com>
4471         * configure.in: AC_SUBST pdfdir.
4472         * Makefile.am: Add install-pdf, install-pdf-am
4473         and install-pdf-recursive targets. Define pdfdir.
4474         * doc/Makefile.am: Define pdf__strip_dir. Add
4475         install-pdf and install-pdf-am targets.
4476         * po/Make-in: Add install-pdf target.
4477         * configure: Regenerate.
4478         * Makefile.in: Regenerate
4479         * doc/Makefile.in: Regenerate.
4481 2009-02-03  Maxim Kuvyrkov  <maxim@codesourcery.com>
4483         * bfd-in2.h: Regenerate.
4484         * elf32-m68k.c: Handle 2-slot GOT entries.  Rename variables and
4485         fields from n_entries to n_slots where appropriate, update comments.
4486         (HOWTO): Add TLS relocations.
4487         (reloc_map): Map BFD_RELOC_68K_TLS_* to R_68K_TLS_*.
4488         (enum elf_m68k_got_offset_size): New enum.
4489         (struct elf_m68k_got_entry.type): Move field to ...
4490         (struct elf_m68k_got_entry_key): ... here.  Update all uses.
4491         (elf_m68k_reloc_got_type, elf_m68k_reloc_got_offset_size): New static
4492         functions.
4493         (elf_m68k_reloc_got_n_entries, elf_m68k_reloc_tls_p): New static
4494         functions.
4495         (struct elf_m68k_got): merge rel_8o_n_entries and rel_8o_16o_n_entries
4496         fields into n_entries array.  Update comments.
4497         (elf_m68k_init_got): Simplify, update all uses.
4498         (elf_m68k_init_got_entry_key): Handle R_68K_TLS_LDM32 reloc, update.
4499         (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT): Adjust to handle 2-slot
4500         GOT entries; update name, update all uses.
4501         (ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): Ditto.
4502         (elf_m68k_get_got_entry): Update.
4503         (elf_m68k_update_got_entry_type): Rewrite to handle TLS GOT entries,
4504         simplify.
4505         (elf_m68k_remove_got_entry_type): Simplify.
4506         (elf_m68k_add_entry_to_got, elf_m68k_can_merge_gots_1): Update.
4507         (elf_m68k_can_merge_gots): Update.
4508         (elf_m68k_merge_gots_1, elf_m68k_merge_gots): Update.
4509         (struct elf_m68k_finalize_got_offsets_arg): Rewrite to handle 2-slot
4510         GOT entries, simplify.
4511         (elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Same.
4512         (struct elf_m68k_partition_multi_got_arg): Add slots_relas_diff
4513         field, remove obsoleted local_n_entries field.
4514         (elf_m68k_partition_multi_got_2): New static function.
4515         (elf_m68k_partition_multi_got_1, elf_m68k_partition_multi_got): Use it;
4516         update.
4517         (elf_m68k_remove_got_entry_type): Update.
4518         (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
4519         (elf_m68k_check_relocs): Handle TLS relocations.  Remove unnecessary
4520         update of sgot->size and srelgot->size.
4521         (elf_m68k_gc_sweep_hook): Update.
4522         (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
4523         (elf_m68k_relocate_section, elf_m68k_finish_dynamic_symbol): Handle
4524         TLS relocations.
4525         * reloc.c (BFD_RELOC_68K_TLS_*): Declare TLS relocations.
4526         * libbfd.h (bfd_reloc_code_real_names): Add BFD_RELOC_68K_TLS_*.
4528 2009-02-02  DJ Delorie  <dj@redhat.com>
4530         * elf32-mep.c (config_names): Regenerate configuration.
4532 2009-02-02  Alan Modra  <amodra@bigpond.net.au>
4534         * elf-bfd.h (bfd_elf_get_str_section): Don't declare.
4535         (bfd_elf_find_section, _sh_elf_set_mach_from_flags): Likewise.
4536         * elf.c (bfd_elf_get_str_section): Make static.
4537         (bfd_elf_find_section): Delete.
4538         * libbfd.h: Regenerate.
4540 2009-02-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
4542         * elf-eh-frame.c (REQUIRE_CLEARED_RELOCS) Remove.
4543         (_bfd_elf_parse_eh_frame): Do not check relocations for removed FDEs.
4545 2009-01-31  Alan Modra  <amodra@bigpond.net.au>
4547         * elflink.c (on_needed_list): New function.
4548         (elf_link_add_object_symbols): Link in --as-needed libs if they
4549         satisfy undefined symbols in other libs.
4551 2009-01-30  Julian Brown  <julian@codesourcery.com>
4553         * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Skip BFDs with
4554         EXEC_P or DYNAMIC flags, and skip sections which are being linked
4555         with --just-symbols (-R).
4557 2009-01-29  Adam Nemet  <anemet@caviumnetworks.com>
4559         * dwarf2.c (read_rangelist): Use read_address to read low_pc and
4560         high_pc in order to properly sign-extend VMAs.
4562 2009-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
4563             Mark Shinwell  <shinwell@codesourcery.com>
4564             Catherine Moore  <clm@codesourcery.com>
4566         * elf-attrs.c, elflink.c, elfxx-mips.c: Correct typos in comments.
4568 2009-01-28  Catherine Moore <clm@codesourcery.com>
4570         * elf32-arm.c (elf32_arm_check_relocs): Set SEC_ALLOC and
4571         SEC_LOAD for dynamic relocation sections.
4573 2009-01-27  Hans-Peter Nilsson  <hp@axis.com>
4575         * elf32-cris.c (cris_elf_relocate_section): Use elf_hash_table
4576         (info)->tls_size, not elf_hash_table (info)->tls_sec->size for
4577         the size of local TLS data.
4579 2009-01-27  Andreas Schwab  <schwab@suse.de>
4581         * mach-o.c (bfd_mach_o_archive_p): Restrict the number of
4582         architectures in the archive.
4584 2009-01-27  Hans-Peter Nilsson  <hp@axis.com>
4586         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_DTPREL>
4587         <R_CRIS_32_DTPREL>: Correct relocation value.
4589         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_8>
4590         <R_CRIS_16, R_CRIS_32>: Don't call BFD_ASSERT for weak undefined
4591         symbols with non-default visibility.
4593 2009-01-26  Nathan Sidwell  <nathan@codesourcery.com>
4595         * elf32-ppc.c (ppc_elf_relax_section): Add space for relocs
4596         describing the trampolines.
4597         (ppc_elf_relocate_section): Update relocs to describe the
4598         trampolines.
4600 2009-01-25  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
4602         * elf-hppa.h (elf_hppa_final_link_relocate): Add check to ensure that
4603         branch targets can be reached for R_PARISC_PCREL22F, R_PARISC_PCREL17F
4604         and R_PARISC_PCREL12F relocations.
4606 2009-01-24  Alan Modra  <amodra@bigpond.net.au>
4608         PR 6022
4609         * elflink.c (find_version_for_sym): New function split out from,
4610         but without export_dynamic test, ..
4611         (_bfd_elf_link_assign_sym_version): ..here.
4612         (_bfd_elf_export_symbol): Use it.
4614 2009-01-23  Alan Modra  <amodra@bigpond.net.au>
4616         * elf-bfd.h (struct elf_assign_sym_version_info): Delete.
4617         (struct elf_info_failed, struct elf_find_verdep_info): Move to..
4618         * elflink.c: ..here, somewhat modified.
4619         * elf-bfd.h (_bfd_elf_add_default_symbol, _bfd_elf_export_symbol,
4620         _bfd_elf_link_find_version_dependencies,
4621         _bfd_elf_link_assign_sym_version, _bfd_elf_link_size_reloc_section,
4622         _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
4623         _bfd_elf_link_sec_merge_syms, bfd_elf_link_mark_dynamic_symbol): Don't
4624         declare..
4625         * elflink.c: ..and make static here.
4626         (_bfd_elf_link_find_version_dependencies): Adjust for removal
4627         of output_bfd from struct elf_find_verdep_info.
4628         (_bfd_elf_link_assign_sym_version): Similarly adjust to use
4629         struct elf_info_failed.
4630         (bfd_elf_size_dynamic_sections): Adjust.
4632 2009-01-22  Alan Modra  <amodra@bigpond.net.au>
4634         PR 6832
4635         * dwarf2.c (find_line): Don't update stash->sec_info_ptr until
4636         after comp_unit_find_line call.
4638 2009-01-21  Nick Clifton  <nickc@redhat.com>
4640         PR 9769
4641         * vmsutil.c (vms_file_stats_name): Remove use of unsupported
4642         tm_gmtoff field in struct tm.
4644 2009-01-21  Alan Modra  <amodra@bigpond.net.au>
4646         * elf32-spu.h (struct spu_elf_params): Add non_ia_text.
4647         * elf32-spu.c (mark_overlay_section): Only include .text.ia.*
4648         sections in soft-icache lines unless non_ia_text.  Don't add
4649         rodata if doing so would exceed line size.
4651 2009-01-19  Hans-Peter Nilsson  <hp@axis.com>
4653         * elf32-cris.c (elf_cris_copy_indirect_symbol): For other symbol
4654         types than bfd_link_hash_indirect, before early return, call
4655         _bfd_elf_link_hash_copy_indirect.
4657 2009-01-19  Andrew Stubbs  <ams@codesourcery.com>
4659         * elf-attrs.c (vendor_set_obj_attr_contents): Support tag ordering.
4660         * elf-bfd.h (elf_backend_data): Add obj_attrs_order.
4661         * elf32-arm.c (elf32_arm_obj_attrs_order): New function.
4662         (elf_backend_obj_attrs_order): New define.
4663         * elfxx-target.h (elf_backend_obj_attrs_order): New define.
4664         (elfNN_bed): Add elf_backend_obj_attrs_order.
4666 2009-01-19  Andrew Stubbs  <ams@codesourcery.com>
4668         * elf-attrs.c (is_default_attr): Substitute magic numbers with macros.
4669         (obj_attr_size): Likewise.
4670         (write_obj_attribute): Likewise.
4671         (_bfd_elf_copy_obj_attributes): Likewise.
4672         (_bfd_elf_parse_attributes): Likewise.
4673         * elf-bfd.h (ATTR_TYPE_FLAG_INT_VAL): New define.
4674         (ATTR_TYPE_FLAG_STR_VAL, ATTR_TYPE_FLAG_NO_DEFAULT): New defines.
4675         (ATTR_TYPE_HAS_INT_VAL, ATTR_TYPE_HAS_STR_VAL): New defines.
4676         (ATTR_TYPE_HAS_NO_DEFAULT): New define.
4677         * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Replace magic numbers
4678         with macros.
4680 2009-01-19  Andrew Stubbs  <ams@codesourcery.com>
4682         * elf-attrs.c (is_default_attr): Support defaultless attributes.
4683         (bfd_elf_add_obj_attr_int): Get type from _bfd_elf_obj_attrs_arg_type.
4684         (bfd_elf_add_obj_attr_string): Likewise.
4685         (bfd_elf_add_obj_attr_int_string): Likewise.
4686         (_bfd_elf_parse_attributes): Allow for unknown flag bits in type.
4687         * elf-bfd.h (struct obj_attribute): Document new flag bit.
4688         * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Specify that
4689         Tag_nodefaults has no default value.
4690         (elf32_arm_merge_eabi_attributes): Modify the Tag_nodefaults
4691         comment to reflect the new state.
4693 2009-01-19  Alan Modra  <amodra@bigpond.net.au>
4695         PR 9695
4696         * pdp11.c (N_BADMAG): True for anything but OMAGIC, NMAGIC, ZMAGIC.
4697         (some_aout_object_p): Delete dead code handling QMAGIC and BMAGIC.
4698         (adjust_z_magix): Delete dead code handling QMAGIC.
4700 2009-01-16  Kai Tietz  <kai.tietz@onevision.com>
4702         * coffcode.h (styp_to_sec_flags): Correct interpretation of
4703         IMAGE_SCN_MEM_DISCARDABLE.
4705 2009-01-16  Alan Modra  <amodra@bigpond.net.au>
4707         * Makefile.am (libbfd_la_LIBADD, libbfd_la_LDFLAGS): Substitute
4708         SHARED_LIBADD and SHARED_LDFLAGS rather than WIN32LIBADD, WIN32LDFLAGS.
4709         * configure.in (commonbfdlib): Delete.
4710         (SHARED_LDFLAGS): Rename from WIN32LDFLAGS/
4711         (SHARED_LIBADD): Rename from WIN32LIBADD.  Add pic libiberty if such
4712         is available, not just for linux.
4713         * po/SRC-POTFILES.in: Regenerate.
4714         * Makefile.in: Regenerate.
4715         * configure: Regenerate.
4717 2009-01-15  Andrew Stubbs  <ams@codesourcery.com>
4718             Julian Brown   <julian@codesourcery.com>
4720         * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 71 to include all known
4721         ARM attributes in ABI 2.07.
4722         * elf32-arm.c (get_secondary_compatible_arch): New function.
4723         (set_secondary_compatible_arch): New function.
4724         (tag_cpu_arch_combine): New function.
4725         (elf32_arm_copy_one_eabi_other_attribute): Delete function.
4726         (elf32_arm_copy_eabi_other_attribute_list): Delete function.
4727         (elf32_arm_merge_eabi_attributes): Rename order_312 to order_021 to
4728         make it fit with order_01243.
4729         Add support for Tag_also_compatible_with,
4730         Tag_CPU_unaligned_access, Tag_T2EE_use, Tag_Virtualization_use,
4731         Tag_MPextension_use, Tag_nodefaults and Tag_conformance.
4732         Improve/tidy up support for Tag_CPU_raw_name, Tag_CPU_name,
4733         Tag_CPU_arch, Tag_ABI_HardFP_use, Tag_VFP_HP_extension,
4734         Tag_ABI_FP_denormal, Tag_ABI_PCS_GOT_use, Tag_ABI_align8_needed,
4735         Tag_VFP_arch and Tag_ABI_FP_16bit_format.
4736         Rework the way unknown attributes are handled.
4737         Defer errors until all attributes have been processed.
4739 2009-01-15  Andrew Stubbs  <ams@codesourcery.com>
4741         * elf-attrs.c (bfd_elf_add_obj_attr_compat): Rename to
4742         bfd_elf_add_obj_attr_int_string.
4743         Read Tag_compatibility from its new location in the attribute array,
4744         rather than the attribute list.
4745         (_bfd_elf_copy_obj_attributes): bfd_elf_add_obj_attr_compat ->
4746         bfd_elf_add_obj_attr_int_string.
4747         (_bfd_elf_parse_attributes): Likewise.
4748         (_bfd_elf_merge_object_attributes): There's now only one
4749         Tag_compatibility, and it's in the array, not the list.
4750         * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 33 to include
4751         Tag_compatibility.
4752         (bfd_elf_add_obj_attr_compat): Rename to
4753         bfd_elf_add_obj_attr_int_string.
4754         (bfd_elf_add_proc_attr_compat): Rename to
4755         bfd_elf_add_proc_attr_int_string.
4756         * elf32-arm.c (elf32_arm_merge_eabi_attributes): Explicitly don't handle
4757         Tag_compatibility.
4759 2009-01-15  Douglas B Rupp  <rupp@gnat.com>
4761         * Makefile.am (BFD32_BACKENDS): Add new object vmsutil.lo
4762         (BFD32_BACKENDS_CFILES): Add new file vmsutil.c
4763         (vmsutil.lo): Add dependency rule.
4764         * Makefile.in: Regenerate.
4765         * config.bfd (ia64*-*-*vms*): Add case.
4766         * configure.in (bfd_elf64_ia64_vms_vec): Add case.
4767         * configure: Regenerate.
4768         * vmsutil.c: New file.
4769         * vmsutil.h: New file.
4770         * elf-bfd.h (struct bfd_elf_special_section): Change type of
4771         attr to bfd_vma.
4772         * elfxx-ia64.c (elfNN_vms_post_process_headers,
4773         elfNN_vms_section_processing, elfNN_vms_final_write_processing,
4774         elfNN_vms_close_and_cleanup, elfNN_vms_section_from_shdr,
4775         elfNN_vms_object_p): New functions
4776         * targets.c (bfd_elf64_ia64_vms_vec): New target.
4778 2009-01-14  H.J. Lu  <hongjiu.lu@intel.com>
4780         PR ld/9727
4781         * elflink.c (elf_gc_sweep): Exclude the group section if the
4782         first member of the section group is excluded.
4784 2009-01-14  Alan Modra  <amodra@bigpond.net.au>
4786         PR 9735
4787         * syms.c (_bfd_stab_section_find_nearest_line): Don't free
4788         saved filename, use bfd_alloc rather than bfd_malloc for it.
4790 2009-01-13  Alan Modra  <amodra@bigpond.net.au>
4792         * elf32-spu.c (spu_elf_build_stubs): Make __icache_base absolute.
4794 2009-01-13  Alan Modra  <amodra@bigpond.net.au>
4796         * elf32-spu.c (remove_cycles): Always set call->max_depth.
4798 2009-01-12  Alan Modra  <amodra@bigpond.net.au>
4800         * elf32-spu.c (spu_elf_auto_overlay): Correct vma mask.
4802 2009-01-12  Alan Modra  <amodra@bigpond.net.au>
4804         * elf32-spu.c (struct spu_link_hash_table): Add init, line_size_log2,
4805         num_lines_log2.
4806         (struct got_entry): Add br_addr.
4807         (struct call_info): Add priority.
4808         (struct function_info): Add lr_store and sp_adjust.
4809         (spu_elf_setup): Init line_size_log2 and num_lines_log2.
4810         (spu_elf_find_overlays): For soft-icache, mark any section within cache
4811         area as an overlay, and check that no other overlays exist.  Look up
4812         icache overlay manager entry sym.
4813         (BRA_STUBS, BRA, BRASL): Define.
4814         (enum _stub_type): Replace ovl_stub with call_ovl_stub and br*_ovl_stub.
4815         (needs_ovl_stub): Adjust for soft-icache.  Return priority encoded
4816         in branch insn.
4817         (count_stub, build_stub): Support soft-icache.
4818         (build_spuear_stubs, process_stubs): Adjust build_stub call.
4819         (spu_elf_size_stubs): Size soft-icache stubs.
4820         (overlay_index): New function.
4821         (spu_elf_build_stubs): Make static.  Support soft-icache.
4822         (spu_elf_check_vma): Don't turn off auto_overlay if soft-icache.
4823         (find_function_stack_adjust): Save lr store and stack adjust insn
4824         offsets.
4825         (maybe_insert_function): Adjust find_function_stack_adjust call.
4826         (mark_functions_via_relocs): Retrieve priority.
4827         (remove_cycles): Only warn about pruned arcs when stack_analysis.
4828         (sort_calls): Sort by priority first.
4829         (mark_overlay_section): Ignore .ovl.init.
4830         (sum_stack): Only print when stack_analysis.
4831         (print_one_overlay_section): New function, extracted from..
4832         (spu_elf_auto_overlay): ..here.  Support soft-icache overlays.
4833         (spu_elf_stack_analysis): Only print when htab->stack_analysis.
4834         (spu_elf_final_link): Call spu_elf_stack_analysis for lrlive
4835         analysis.  Call spu_elf_build_stubs.
4836         (spu_elf_relocate_section): For soft-icache encode overlay index
4837         into addresses.
4838         (spu_elf_output_symbol_hook): Support soft-icache.
4839         (spu_elf_modify_program_headers: Likewise.
4841         * elf32-spu.h (struct spu_elf_params): Add lrlive_analysis.  Rename
4842         num_regions to num_lines.  Add line_size and max_branch.
4843         (enum _ovly_flavour): Add ovly_soft_icache.
4844         (spu_elf_build_stubs): Delete.
4846 2009-01-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
4848         * elflink.c (_bfd_elf_section_already_linked): Handle g++-3.4
4849         relocations in `.gnu.linkonce.r.*' referencing its `.gnu.linkonce.t.*'.
4851 2009-01-07  Hans-Peter Nilsson  <hp@axis.com>
4853         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
4854         <case R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: For a symbol defined in
4855         the program, the known offset starts at the negative size of the
4856         TLS section.
4857         <case R_CRIS_32_IE, R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL>:
4858         Similar.
4860 2009-01-05  Joel Sherrill <joel.sherrill@oarcorp.com>
4862         * config.bfd: Add lm32-*-rtems*.
4864 2009-01-03  H.J. Lu  <hongjiu.lu@intel.com>
4866         * coff-ppc.c: Add 2009 to Copyright.
4867         * elf32-cris.c: Likewise.
4868         * elflink.c: Likewise.
4870 2009-01-03  Hans-Peter Nilsson  <hp@axis.com>
4872         * elf32-cris.c (elf_cris_finish_dynamic_symbol): Rename
4873         gotplt_index to rela_plt_index.  Adjust for R_CRIS_DTPMOD entry.
4875 2009-01-02  H.J. Lu  <hongjiu.lu@intel.com>
4877         PR ld/9679
4878         * elflink.c (elf_merge_st_other): New.
4879         (_bfd_elf_merge_symbol): Use it on skipped weak definitions and
4880         hide them if needed.
4881         (elf_link_add_object_symbols): Updated.
4883 2009-01-02  H.J. Lu  <hongjiu.lu@intel.com>
4885         PR ld/9676
4886         * elflink.c (elf_link_add_object_symbols): Update def_dynamic,
4887         ref_dynamic and dynamic_def fields when setting def_regular
4888         to 1.
4890 2009-01-02  Curtis Mackie  <curtmackevo@gmail.com>
4892         PR 9682
4893         * coff-ppc.c (dump_toc): Fix up calls to fprintf without a string
4894         literal.
4896 For older changes see ChangeLog-2008
4898 Local Variables:
4899 mode: change-log
4900 left-margin: 8
4901 fill-column: 74
4902 version-control: never
4903 End: