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