Upload Tizen:Base source
[external/binutils.git] / bfd / ChangeLog
1 2011-04-20  Tristan Gingold  <gingold@adacore.com>
2
3         * config.bfd (alpha*-*-*vms*, ia64*-*-*vms*): Define targ_selvecs.
4
5 2011-04-20  Alan Modra  <amodra@gmail.com>
6
7         * hash.c (bfd_default_hash_table_size): Make it an unsigned long.
8         (bfd_hash_table_init_n): Overflow checking.
9         (bfd_hash_set_default_size): Return current size.  Take unsigned long
10         arg.  Add 65537 to hash_size primes.
11         * bfd-in.h (bfd_hash_set_default_size): Update prototype.
12         * bfd-in2.h: Regenerate.
13
14 2011-04-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
15
16         * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Fix +1 overrun of
17         memmove elements.
18
19 2011-04-20  Alan Modra  <amodra@gmail.com>
20
21         * libbfd.c (bfd_log2): Do return rounded up value.
22         * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Replace bfd_log2
23         call with expanded old round down version of the function.
24
25         * archive.c (_bfd_get_elt_at_filepos): Don't release n_nfd.
26         * elflink.c (elf_link_add_object_symbols): Delete redundant code.
27
28 2011-04-20  Alan Modra  <amodra@gmail.com>
29
30         PR ld/12365
31         * elfcode.h (elf_slurp_symbol_table): Put common plugin IR symbols
32         in their own common section.
33         * elflink.c (elf_link_add_object_symbols): Likewise.
34         * linker.c (generic_link_check_archive_element): Don't lose flags
35         if common section is pre-existing.
36         (_bfd_generic_link_add_one_symbol): Likewise.
37
38 2011-04-20  Alan Modra  <amodra@gmail.com>
39
40         PR ld/12365
41         * elflink.c (_bfd_elf_merge_symbol): Update multiple_common calls.
42         * linker.c (_bfd_generic_link_add_one_symbol): Likewise.  Call
43         multiple_definition regardless of allow_multiple_definition.
44         * simple.c (simple_dummy_multiple_definition): Update.
45         * xcofflink.c (xcoff_link_add_symbols): Update multiple_definition
46         calls.
47
48 2011-04-18  Tristan Gingold  <gingold@adacore.com>
49
50         * coff-rs6000.c: Convert to ISO-C.  Remove PARAMS macro.
51
52 2011-04-18  Alan Modra  <amodra@gmail.com>
53
54         PR ld/12365
55         PR ld/12672
56         * bfd.c (BFD_PLUGIN): Define.
57         (BFD_FLAGS_SAVED, BFD_FLAGS_FOR_BFD_USE_MASK): Add BFD_PLUGIN.
58         * bfd-in2.h: Regenerate.
59         * elflink.c (elf_link_output_extsym): Strip undefined plugin syms.
60         * opncls.c (bfd_make_readable): Don't lose original bfd flags.
61
62 2011-04-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
63
64         * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Do not check for
65         SEC_LOAD.
66
67 2011-04-15  Sergio Durigan Junior  <sergiodj@redhat.com>
68
69         * elf-bfd.h (struct sdt_note): New struct.
70         (struct elf_obj_tdata) <sdt_note_head>: New field.
71         * elf.c (elfobj_grok_stapsdt_note_1): New function.
72         (elfobj_grok_stapsdt_note): Likewise.
73         (elf_parse_notes): Added code to treat SystemTap note
74         sections.
75
76 2011-04-12  Richard Henderson  <rth@redhat.com>
77
78         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Do not
79         exclude empty .got sections.
80
81 2011-04-11  H.J. Lu  <hongjiu.lu@intel.com>
82
83         * elf32-i386.c (elf_i386_reloc_type_lookup): Fix the out of bound
84         array access for BFD_RELOC_386_IRELATIVE.
85
86 2011-04-11  Bernd Schmidt  <bernds@codesourcery.com>
87
88         * elf32-tic6x.c (elf32_tic6x_check_relocs): Initialize pc_count field.
89
90 2011-04-11  Mark Wielaard  <mjw@redhat.com>
91
92         PR 10549
93         * elf-bfd.h (has_ifunc_symbols): Renamed to has_gnu_symbols.
94         (has_gnu_symbols): Renamed from has_ifunc_symbols.
95         * elf.c (_bfd_elf_set_osabi): Use new has_gnu_symbols name.
96         * elf32-arm.c (elf32_arm_add_symbol_hook): Set has_gnu_symbols
97         also if STB_GNU_UNIQUE symbol binding was seen.
98         * elf32-i386.c (elf_i386_add_symbol_hook): Likewise.
99         * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
100         * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
101         * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
102         * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
103         * elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise.
104
105 2011-04-11  Alan Modra  <amodra@gmail.com>
106
107         * bfd-in.h (bfd_get_section_limit): Don't use rawsize with output
108         sections.
109         * libbfd.c (_bfd_generic_get_section_contents): Likewise.
110         (_bfd_generic_get_section_contents_in_window): Likewise.
111         * section.c (bfd_get_section_contents): Likewise.
112         * compress.c (bfd_get_full_section_contents): Likewise.
113         * elf32-rx.c (rx_final_link): Ignore rawsize.
114         * elf32-microblaze.c (microblaze_elf_relocate_section): Use correct
115         bfd with bfd_get_section_limit.
116         * elfxx-ia64.c (elfNN_ia64_choose_gp): Add "final" parameter.  Use
117         os->size during final link.  Update callers.
118         * bfd-in2.h: Regenerate.
119
120 2011-04-10  Richard Sandiford  <rdsandiford@googlemail.com>
121
122         PR ld/12637
123         * elfxx-mips.c (mips_elf_merge_got_with): Use arg->global_count
124         as the number of global entries when merging with the primary GOT.
125
126 2011-04-09  H.J. Lu  <hongjiu.lu@intel.com>
127
128         * elf32-i386.c: Update copyright year.
129         * elf64-x86-64.c: Likewise.
130
131 2011-04-09  Kai Tietz  <ktietz@redhat.com>
132
133         * peXXigen.c (_bfd_XXi_final_link_postscripte): Sort pdata in temporary
134         buffer and use rawsize for sorting.
135         * coffcode.h (coff_compute_section_file_positions): Set rawsize
136         before doing alignment.
137
138 2011-04-09  H.J. Lu  <hongjiu.lu@intel.com>
139
140         * elf32-i386.c (elf_i386_relocate_section): Return relocation
141         error on unsupported relocation.
142         * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
143
144 2011-04-09  H.J. Lu  <hongjiu.lu@intel.com>
145
146         PR binutils/12657
147         * hosts/x86-64linux.h (elf_prstatus32): Replace __pid_t with
148         pid_t.
149
150 2011-04-08  H.J. Lu  <hongjiu.lu@intel.com>
151
152         PR ld/12654
153         * elf32-i386.c (elf_i386_relocate_section): Check !executable
154         instead of shared for R_386_TLS_LDO_32.
155
156 2011-04-08  Tristan Gingold  <gingold@adacore.com>
157
158         * Makefile.am (SOURCE_HFILES): Remove xcoff-target.h
159         * coff-pmac: Remove
160         * xcoff-target.h: Remove
161         * Makefile.in: Regenerate.
162
163 2011-04-07  Cary Coutant  <ccoutant@google.com>
164
165         * dwarf2.c (scan_unit_for_symbols): Check for DW_AT_specification.
166
167 2011-04-07  Paul Brook  <paul@codesourcery.com>
168
169         * elf32-tic6x.c (elf32_tic6x_howto_table): R_C6000_PREL31 is
170         pc-relative.
171         (elf32_tic6x_howto_table_rel): Ditto.
172         (elf32_tic6x_relocate_section): Implement R_C6000_PREL31.
173         (elf32_tic6x_check_relocs): Ditto.
174
175 2011-04-06  Joseph Myers  <joseph@codesourcery.com>
176
177         * config.bfd (thumb-*-oabi): Don't handle in list of obsolete
178         targets.
179         (strongarm*, thumb*, xscale*): Remove architectures.
180         (strongarm-*-kaos*, thumb-*-coff, thumb-*-elf, thumb-epoc-pe*,
181         thumb-*-pe*, strongarm-*-elf, strongarm-*-coff, xscale-*-elf,
182         xscale-*-coff): Remove targets.
183
184 2011-04-01  Tristan Gingold  <gingold@adacore.com>
185
186         * elfxx-ia64.c: include bfd_stdint.h
187
188 2011-03-31  Jan Kratochvil  <jan.kratochvil@redhat.com>
189
190         * elf32-tic6x.c (elf32_tic6x_relocate_section): Remove unused variable
191         dynobj and its initialization.
192
193 2011-03-31  Tristan Gingold  <gingold@adacore.com>
194
195         * makefile.vms (DEFS): Add HAVE_bfd_elf64_ia64_vms_vec.
196         * configure.com: Set BFD_HOST_64BIT_LONG_LONG and
197         BFD_HOST_LONG_LONG to 1.
198
199 2011-03-31  Tristan Gingold  <gingold@adacore.com>
200
201         * vms-alpha.c (vms_get_remaining_object_record): Fix dec-c warning.
202         (_bfd_vms_write_etir): Ditto.
203         (_bfd_vms_slurp_etir): Avoid to use intptr_t
204         * configure.com: Generate bfd_stdint.h
205
206 2011-03-31  Bernd Schmidt  <bernds@codesourcery.com>
207
208         * elf32-tic6x.h (struct elf32_tic6x_params): New.
209         (elf32_tic6x_setup): Declare.
210         * elf32-tic6x.c: Include <limits.h>.
211         (ELF_DYNAMIC_LINKER, DEFAULT_STACK_SIZE, PLT_ENTRY_SIZE): Define.
212         (struct elf32_tic6x_link_hash_table, struct elf32_link_hash_entry):
213         New structures.
214         (elf32_tic6x_link_hash_table, is_tic6x_elf): New macros.
215         (tic6x_elf_scom_section, tic6x_elf_scom_symbol,
216         tic6x_elf_scom_symbol_ptr): New static variables.
217         (elf32_tic6x_howto_table, elf32_tic6x_howto_table_rel,
218         elf32_tic6x_reloc_map): Add R_C6000_JUMP_SLOT, R_C6000_EHTYPE,
219         R_C6000_PCR_H16 and R_C6000_PCR_L16.
220         (elf32_tic6x_link_hash_newfunc, elf32_tic6x_link_hash_table_create,
221         elf32_tic6x_link_hash_table_free, elf32_tic6x_setup,
222         elf32_tic6x_using_dsbt, elf32_tic6x_install_rela,
223         elf32_tic6x_create_dynamic_sections, elf32_tic6x_make_got_dynreloc,
224         elf32_tic6x_finish_dynamic_symbol, elf32_tic6x_gc_sweep_hook,
225         elf32_tic6x_adjust_dynamic_symbol): New static functions.
226         (elf32_tic6x_relocate_section): For R_C6000_PCR_S21, convert branches
227         to weak symbols as required by the ABI.
228         Handle GOT and DSBT_INDEX relocs, and copy relocs to the output file
229         as needed when generating DSBT output.
230         (elf32_tic6x_check_relocs, elf32_tic6x_add_symbol_hook,
231         elf32_tic6x_symbol_processing, elf32_tic6x_section_from_bfd_section,
232         elf32_tic6x_allocate_dynrelocs, elf32_tic6x_size_dynamic_sections,
233         elf32_tic6x_always_size_sections, elf32_tic6x_modify_program_headers,
234         elf32_tic6x_finish_dynamic_sections, elf32_tic6x_plt_sym_val,
235         elf32_tic6x_copy_private_data, elf32_tic6x_link_omit_section_dynsym):
236         New static functions.
237         (ELF_MAXPAGESIZE): Define to 0x1000.
238         (bfd_elf32_bfd_copy_private_bfd_data,
239         bfd_elf32_bfd_link_hash_table_create,
240         bfd_elf32_bfd_link_hash_table_free, elf_backend_can_refcount,
241         elf_backend_want_got_plt, elf_backend_want_dynbss,
242         elf_backend_plt_readonly, elf_backend_got_header_size,
243         elf_backend_gc_sweep_hook, elf_backend_modify_program_headers,
244         elf_backend_create_dynamic_sections, elf_backend_adjust_dynamic_symbol,
245         elf_backend_check_relocs, elf_backend_add_symbol_hook,
246         elf_backend_symbol_processing, elf_backend_link_output_symbol_hook,
247         elf_backend_section_from_bfd_section,
248         elf_backend_finish_dynamic_symbol, elf_backend_always_size_sections,
249         elf32_tic6x_size_dynamic_sections, elf_backend_finish_dynamic_sections,
250         elf_backend_omit_section_dynsym, elf_backend_plt_sym_val): Define.
251
252         * bfd/reloc.c (BFD_RELOC_C6000_JUMP_SLOT, BFD_RELOC_C6000_EHTYPE,
253         BFD_RELOC_C6000_PCR_H16, BFD_RELOC_C6000_PCR_S16): Add.
254         * bfd/bfd-in2.h: Regenerate.
255         * bfd/libbfd.h: Regenerate.
256         * config.bfd: Accept tic6x-*-* instead of tic6x-*-elf.
257
258 2011-03-31  Tristan Gingold  <gingold@adacore.com>
259
260         * coffcode.h (coff_slurp_symbol_table): Silently discard C_NULL
261         entry on xcoff when value is C_NULL_VALUE.
262
263 2011-03-31  Tristan Gingold  <gingold@adacore.com>
264
265         * libcoff-in.h (exec_hdr): Remove.
266         * libcoff.h: Regenerate.
267
268 2011-03-30  Nick Clifton  <nickc@redhat.com>
269
270         * po/da.po: Updated Danish translation.
271
272 2011-03-29  Richard Henderson  <rth@redhat.com>
273
274         * elf64-alpha.c (elf64_alpha_gc_mark_hook): New.
275         (elf64_alpha_gc_sweep_hook): New.
276         (elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook): New.
277         (elf_backend_can_gc_sections): New.
278
279 2011-03-26  John Marino  <binutils@marino.st>
280
281         * config.bfd: Add x86_64-*-dragonfly*, fix i386-*-dragonfly*.
282         * configure.in: Delete unused bfd_elf32_i386_dragonfly_vec.
283         * configure: Regenerate.
284
285 2011-03-25  Michael Snyder  <msnyder@vmware.com>
286
287         * coffcode.h (coff_set_alignment_hook): Check return of bfd_seek.
288
289 2011-03-25  Tristan Gingold  <gingold@adacore.com>
290
291         * vms-alpha.c (_bfd_vms_find_nearest_dst_line): Allow the use
292         of find_nearest_line on object files.
293
294 2011-03-25  Tristan Gingold  <gingold@adacore.com>
295
296         * vms-alpha.c (evax_section_flags): Make $CODE$ section read-only.
297         Minor reordering.
298         (alpha_vms_create_eisd_for_section): Make code sections read-only.
299
300 2011-03-24  Alan Modra  <amodra@gmail.com>
301
302         * elf32-ppc.c (ppc_elf_tls_optimize): Catch more cases where
303         old-style __tls_get_addr calls without marker relocs don't match
304         their arg setup insn one for one.  If such mismatches are found
305         report the reloc and don't do any tls optimization.
306         * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
307
308 2011-03-22  Eric B. Weddington  <eric.weddington@atmel.com>
309
310         * bfd-in2.h: Regenerate.
311
312 2011-03-22  Eric B. Weddington  <eric.weddington@atmel.com>
313
314         * archures.c: Add AVR XMEGA architecture information.
315         * cpu-avr.c (arch_info_struct): Likewise.
316         * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
317         (elf32_avr_object_p): Likewise.
318
319 2011-03-14  Richard Sandiford  <richard.sandiford@linaro.org>
320
321         * reloc.c (BFD_RELOC_ARM_IRELATIVE): New relocation.
322         * bfd-in2.h: Regenerate.
323         * elf32-arm.c (elf32_arm_howto_table_2): Rename existing definition
324         to elf32_arm_howto_table_3 and replace with a single R_ARM_IRELATIVE
325         entry.
326         (elf32_arm_howto_from_type): Update accordingly.
327         (elf32_arm_reloc_map): Map BFD_RELOC_ARM_IRELATIVE to R_ARM_IRELATIVE.
328         (elf32_arm_reloc_name_lookup): Handle elf32_arm_howto_table_3.
329         (arm_plt_info): New structure, split out from elf32_arm_link_hash_entry
330         with an extra noncall_refcount field.
331         (arm_local_iplt_info): New structure.
332         (elf_arm_obj_tdata): Add local_iplt.
333         (elf32_arm_local_iplt): New accessor macro.
334         (elf32_arm_link_hash_entry): Replace plt_thumb_refcount,
335         plt_maybe_thumb_refcount and plt_got_offset with an arm_plt_info.
336         Change tls_type to a bitfield and add is_iplt.
337         (elf32_arm_link_hash_newfunc): Update accordingly.
338         (elf32_arm_allocate_local_sym_info): New function.
339         (elf32_arm_create_local_iplt): Likewise.
340         (elf32_arm_get_plt_info): Likewise.
341         (elf32_arm_plt_needs_thumb_stub_p): Likewise.
342         (elf32_arm_get_local_dynreloc_list): Likewise.
343         (create_ifunc_sections): Likewise.
344         (elf32_arm_copy_indirect_symbol): Update after the changes to
345         elf32_arm_link_hash_entry.  Assert the is_iplt has not yet been set.
346         (arm_type_of_stub): Add an st_type argument.  Use elf32_arm_get_plt_info
347         to get PLT information.  Assert that all STT_GNU_IFUNC references
348         are turned into PLT references.
349         (arm_build_one_stub): Pass the symbol type to
350         elf32_arm_final_link_relocate.
351         (elf32_arm_size_stubs): Pass the symbol type to arm_type_of_stub.
352         (elf32_arm_allocate_irelocs): New function.
353         (elf32_arm_add_dynreloc): In static objects, use .rel.iplt for
354         all R_ARM_IRELATIVE.
355         (elf32_arm_allocate_plt_entry): New function.
356         (elf32_arm_populate_plt_entry): Likewise.
357         (elf32_arm_final_link_relocate): Add an st_type parameter.
358         Set srelgot to null for static objects.  Use separate variables
359         to record which st_value and st_type should be used when generating
360         a dynamic relocation.  Use elf32_arm_get_plt_info to find the
361         symbol's PLT information, setting has_iplt_entry, splt,
362         plt_offset and gotplt_offset accordingly.  Check whether
363         STT_GNU_IFUNC symbols should resolve to an .iplt entry, and change
364         the relocation target accordingly.  Broaden assert to include
365         .iplts.  Don't set sreloc for static relocations.  Assert that
366         we only generate dynamic R_ARM_RELATIVE relocations for R_ARM_ABS32
367         and R_ARM_ABS32_NOI.  Generate R_ARM_IRELATIVE relocations instead
368         of R_ARM_RELATIVE relocations if the target is an STT_GNU_IFUNC
369         symbol.  Pass the symbol type to arm_type_of_stub.  Conditionally
370         resolve GOT references to the .igot.plt entry.
371         (elf32_arm_relocate_section): Update the call to
372         elf32_arm_final_link_relocate.
373         (elf32_arm_gc_sweep_hook): Use elf32_arm_get_plt_info to get PLT
374         information.  Treat R_ARM_REL32 and R_ARM_REL32_NOI as call
375         relocations in shared libraries and relocatable executables.
376         Count non-call PLT references.  Use elf32_arm_get_local_dynreloc_list
377         to get the list of dynamic relocations for a local symbol.
378         (elf32_arm_check_relocs): Always create ifunc sections.  Set isym
379         at the same time as setting h.  Use elf32_arm_allocate_local_sym_info
380         to allocate local symbol information.  Treat R_ARM_REL32 and
381         R_ARM_REL32_NOI as call relocations in shared libraries and
382         relocatable executables.  Record PLT information for local
383         STT_GNU_IFUNC functions as well as global functions.   Count
384         non-call PLT references.  Use elf32_arm_get_local_dynreloc_list
385         to get the list of dynamic relocations for a local symbol.
386         (elf32_arm_adjust_dynamic_symbol): Handle STT_GNU_IFUNC symbols.
387         Don't remove STT_GNU_IFUNC PLTs unless all references have been
388         removed.  Update after the changes to elf32_arm_link_hash_entry.
389         (allocate_dynrelocs_for_symbol): Decide whether STT_GNU_IFUNC PLT
390         entries should live in .plt or .iplt.  Check whether the .igot.plt
391         and .got entries can be combined.  Use elf32_arm_allocate_plt_entry
392         to allocate .plt and .(i)got.plt entries.  Detect which .got
393         entries will need R_ARM_IRELATIVE relocations and use
394         elf32_arm_allocate_irelocs to allocate them.  Likewise other
395         non-.got dynamic relocations.
396         (elf32_arm_size_dynamic_sections): Allocate .iplt, .igot.plt
397         and dynamic relocations for local STT_GNU_IFUNC symbols.
398         Check whether the .igot.plt and .got entries can be combined.
399         Detect which .got entries will need R_ARM_IRELATIVE relocations
400         and use elf32_arm_allocate_irelocs to allocate them.  Use stashed
401         section pointers intead of strcmp checks.  Handle iplt and igotplt.
402         (elf32_arm_finish_dynamic_symbol): Use elf32_arm_populate_plt_entry
403         to fill in .plt, .got.plt and .rel(a).plt entries.  Point
404         STT_GNU_IFUNC symbols at an .iplt entry if non-call relocations
405         resolve to it.
406         (elf32_arm_output_plt_map_1): New function, split out from
407         elf32_arm_output_plt_map.  Handle .iplt entries.  Use
408         elf32_arm_plt_needs_thumb_stub_p.
409         (elf32_arm_output_plt_map): Call it.
410         (elf32_arm_output_arch_local_syms): Add mapping symbols for
411         local .iplt entries.
412         (elf32_arm_swap_symbol_in): Handle Thumb STT_GNU_IFUNC symbols.
413         (elf32_arm_swap_symbol_out): Likewise.
414         (elf32_arm_add_symbol_hook): New function.
415         (elf_backend_add_symbol_hook): Define for all targets.
416
417 2011-03-14  Richard Sandiford  <richard.sandiford@linaro.org>
418
419         * elf-bfd.h (elf_link_hash_entry): Add target_internal.
420         * elf.c (swap_out_syms): Set st_target_internal for each
421         Elf_Internal_Sym.
422         * elfcode.h (elf_swap_symbol_in): Likewise.
423         * elf32-i370.c (i370_elf_finish_dynamic_sections): Likewise.
424         * elf32-sh-symbian.c (sh_symbian_relocate_section): Likewise.
425         * elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise.
426         * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
427         * elflink.c (elf_link_output_extsym): Likewise.
428         (bfd_elf_final_link): Likewise.
429         (elf_link_add_object_symbols): Copy st_target_internal
430         to the hash table if we see a definition.
431         (_bfd_elf_copy_link_hash_symbol_type): Copy target_internal.
432         * elf32-arm.c (elf32_arm_stub_hash_entry): Replace st_type with
433         a branch_type field.
434         (a8_erratum_fix, a8_erratum_reloc): Likewise.
435         (arm_type_of_stub): Replace actual_st_type with an
436         actual_branch_type parameter.
437         (arm_build_one_stub): Use branch types rather than st_types to
438         determine the type of branch.
439         (cortex_a8_erratum_scan): Likewise.
440         (elf32_arm_size_stubs): Likewise.
441         (bfd_elf32_arm_process_before_allocation): Likewise.
442         (allocate_dynrelocs_for_symbol): Likewise.
443         (elf32_arm_finish_dynamic_sections): Likewise.
444         (elf32_arm_final_link_relocate): Replace sym_flags parameter with
445         a branch_type parameter.
446         (elf32_arm_relocate_section): Update call accordingly.
447         (elf32_arm_adjust_dynamic_symbol): Don't check STT_ARM_TFUNC.
448         (elf32_arm_output_map_sym): Initialize st_target_internal.
449         (elf32_arm_output_stub_sym): Likewise.
450         (elf32_arm_symbol_processing): Delete.
451         (elf32_arm_swap_symbol_in): Convert STT_ARM_TFUNCs into STT_FUNCs.
452         Use st_target_internal to record the branch type.
453         (elf32_arm_swap_symbol_out): Use st_target_internal to test for
454         Thumb functions.
455         (elf32_arm_is_function_type): Delete.
456         (elf_backend_symbol_processing): Likewise.
457         (elf_backend_is_function_type): Likewise.
458
459 2011-03-14  Richard Sandiford  <richard.sandiford@linaro.org>
460
461         * elf32-arm.c (elf32_arm_check_relocs): Always assign a dynobj.
462         (elf32_arm_finish_dynamic_sections): Move sgot != NULL assertion
463         into the PLT block.
464
465 2011-03-14  Richard Sandiford  <richard.sandiford@linaro.org>
466
467         * elf32-arm.c (elf32_arm_check_relocs): Use call_reloc_p,
468         may_need_local_target_p and may_become_dynamic_p to classify
469         the relocation type.  Don't check info->symbolic or h->def_regular
470         when deciding whether to record a potential dynamic reloc.
471         Don't treat potential dynamic relocs as PLT references.
472         (elf32_arm_gc_sweep_hook): Update to match.  Assert that we don't
473         try to make the PLT reference count go negative.
474
475 2011-03-14  Richard Sandiford  <richard.sandiford@linaro.org>
476
477         * elf32-arm.c (elf32_arm_final_link_relocate): Always fill in the
478         GOT entry here, rather than leaving it to finish_dynamic_symbol.
479         Only create a dynamic relocation for local references if
480         info->shared.
481         (allocate_dynrelocs_for_symbol): Update dynamic relocation
482         allocation accordingly.
483         (elf32_arm_finish_dynamic_symbol): Don't initialise the GOT entry here.
484
485 2011-03-14  Richard Sandiford  <richard.sandiford@linaro.org>
486
487         * elf32-arm.c (elf32_arm_allocate_dynrelocs): New function.
488         (elf32_arm_add_dynreloc): Likewise.
489         (elf32_arm_adjust_dynamic_symbol): Use elf32_arm_allocate_dynrelocs
490         to allocate dynamic relocations.
491         (elf32_arm_size_dynamic_sections): Likewise.
492         (allocate_dynrelocs): Likewise.  Rename to
493         allocate_dynrelocs_for_symbol.
494         (elf32_arm_final_link_relocate): Use elf32_arm_add_dynreloc to
495         create dynamic relocations.
496         (elf32_arm_finish_dynamic_symbol): Likewise.
497
498 2011-03-12  H.J. Lu  <hongjiu.lu@intel.com>
499
500         * elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS
501         x32 GD->IE and GD->LE transitions.
502         (elf_x86_64_relocate_section): Supprt TLS x32 GD->IE, GD->LE
503         and LD->LE transitions.
504
505 2011-03-10  Alan Modra  <amodra@gmail.com>
506
507         * elf64-ppc.c (ppc64_elf_relocate_section): Provide section/offset
508         for LO_DS error message and correct multiple.
509
510 2011-03-10  Alan Modra  <amodra@gmail.com>
511
512         * elf64-ppc.c (bfd_elf64_bfd_link_just_syms): Define.
513         (ppc64_elf_link_just_syms): New function.
514         (opd_entry_value): Don't assume big-endian host.
515         (get_r2off): New function.
516         (ppc_build_one_stub, ppc_size_one_stub): Use it here.
517
518 2011-03-06  Michael Snyder  <msnyder@vmware.com>
519
520         * compress.c (bfd_compress_section_contents): Check for out of mem.
521
522         * elf64-x86-64.c (elf_x86_64_relocate_section): Document
523         that case statement falls through intentionally.
524
525         * elf32-i386.c (elf_i386_relocate_section): Document fall through.
526
527 2011-03-04  Alan Modra  <amodra@gmail.com>
528
529         * archive.c (bsd_write_armap): Don't call stat in deterministic
530         mode, and don't use st_mtime if stat returns error.
531
532 2011-03-03  Michael Snyder  <msnyder@vmware.com>
533
534         * elf64-x86-64.c (elf_x86_64_relocate_section): Remove dead code.
535
536         * coff-x86_64.c (coff_amd64_rtype_to_howto): Fencepost error.
537
538         * aoutx.h (aout_final_link): Use sizeof int not sizeof int*.
539         (aout_link_write_other_symbol): Missing break statement.
540
541         * dwarf2.c (scan_unit_for_symbols): Stop memory leak.
542
543         * archive.c (_bfd_slurp_extended_name_table): Fail if bfd_seek fails.
544
545 2011-03-03  H.J. Lu  <hongjiu.lu@intel.com>
546
547         * elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS
548         x32 IE->LE transition.
549         (elf_x86_64_relocate_section): Likewise.
550
551 2011-03-02  Bernd Schmidt  <bernds@codesourcery.com>
552
553         * elflink.c (is_reloc_section): Remove function.
554         (get_dynamic_reloc_section_name): Construct string manually.
555
556 2011-02-28  Kai Tietz  <kai.tietz@onevision.com>
557
558         * archive.c (_bfd_find_nested_archive): Use filename_(n)cmp.
559         (adjust_relative_path): Likewise.
560         (_bfd_construct_extended_name_table): Likewise.
561         * corefile.c (generic_core_file_matches_executable_p): Likewise.
562         * elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
563         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
564         * elf32-spu.c (sort_bfds): Likewise.
565         (spu_elf_auto_overlay): Likewise.
566         * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
567         * xcofflink.c (xcoff_set_import_path): Likewise.
568         * xtensa-isa.c (xtensa_regfile_lookup): Likewise.
569         (xtensa_regfile_lookup_shortname): Likewise.
570
571 2011-02-28  Alan Modra  <amodra@gmail.com>
572
573         PR 12513
574         * archive.c (bfd_slurp_bsd_armap_f2): Sanity check parsed_size and
575         stringsize.  Properly sanity check symdef_count.  Remove redundant
576         bfd_release.
577
578 2011-02-25  Rafael Ávila de Espíndola <respindola@mozilla.com>
579
580         * plugin.c (bfd_plugin_object_p): Correctly set the filesize
581         and handle claim_file seeking. Only try to load the plugin once.
582
583 2011-02-22  Andreas Schwab  <schwab@redhat.com>
584
585         * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): For a TLS_GD
586         relocation read the value from the second GOT slot.
587
588 2011-02-15  Tristan Gingold  <gingold@adacore.com>
589
590         * vms-alpha.c (alpha_vms_link_add_archive_symbols): Add a comment.
591
592 2011-02-15  Alan Modra  <amodra@gmail.com>
593
594         * elf64-ppc.c (ppc64_elf_edit_toc): Reinstate second read of
595         toc relocs.  Fuss over free(NULL).
596
597 2011-02-14  Mike Frysinger  <vapier@gentoo.org>
598
599         * elflink.c (bfd_elf_size_dynamic_sections): Add
600         bfd_get_symbol_leading_char to the start of newname.
601
602 2011-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
603
604         * configure: Regenerate.
605
606 2011-02-09  Alan Modra  <amodra@gmail.com>
607
608         * elf64-ppc.c (ppc64_elf_edit_toc): Don't free toc relocs until
609         we are done.  When optimising large toc, check that a global
610         symbol on a toc reloc is defined in a kept section.
611
612 2011-02-08  Nick Clifton  <nickc@redhat.com>
613
614         PR binutils/12467
615         * elf.c (assign_file_positions_for_load_sections): Set the program
616         header offset and entry size to zero if there are no program
617         headers.
618
619 2011-02-08  Alan Modra  <amodra@gmail.com>
620
621         * elf64-ppc.c (ppc64_elf_edit_toc): Don't segfault on NULL
622         local_syms when looking for local symbols in .toc.
623
624 2011-02-01  Alan Modra  <amodra@gmail.com>
625
626         * elf64-ppc.c (ppc64_elf_next_input_section): Use elf_gp value
627         for toc pointer on any section having makes_toc_func_call set.
628         (check_pasted_section): Ensure pasted .init/.fini fragments use
629         the same toc if any has makes_toc_func_call set.
630
631 2011-01-28  Joseph Myers  <joseph@codesourcery.com>
632
633         * elf32-ppc.c (ppc_elf_link_hash_newfunc): Initialize has_sda_refs
634         field.
635
636 2011-01-22  Richard Sandiford  <rdsandiford@googlemail.com>
637
638         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Ignore
639         common sections too.
640
641 2011-01-18  H.J. Lu  <hongjiu.lu@intel.com>
642
643         * elf64-x86-64.c (elf_backend_want_plt_sym): Redefine to 0 after
644         Solaris target.
645
646 2011-01-18  Pierre Muller  <muller@ics.u-strasbg.fr>
647
648         Fix compilation for mingw64.
649         * coffcode.h (coff_slurp_symbol_table): Add intptr_t intermediate
650         typecast to avoid warning.
651         * elf32-rx.c: Add "bfd_stdint.h" include required for int32_t type
652         usage.
653         * elfxx-ia64.c (elfNN_ia64_relax_br): Use intptr_t typeacast instead
654         of long for pointer to avoid warning.
655         (elfNN_ia64_relax_brl): Idem.
656         (elfNN_ia64_install_value): Idem.
657         * vms-alpha.c (_bfd_vms_slurp_etir): Idem.
658
659 2011-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
660
661         * elf32-arm.c (elf32_arm_check_relocs): Check needs_plt rather than
662         h->needs_plt when deciding whether to record a possible dynamic reloc.
663
664 2011-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
665
666         * elf32-arm.c (elf32_arm_gc_sweep_hook): Remove all registered
667         dynamic relocs for the removed section.
668
669 2011-01-15  H.J. Lu  <hongjiu.lu@intel.com>
670
671         * elf64-x86-64.c (elf_x86_64_check_relocs): Check invalid x32
672         relocations.
673
674 2011-01-14  H.J. Lu  <hongjiu.lu@intel.com>
675
676         * elf64-x86-64.c (elf_x86_64_link_hash_table): Add pointer_r_type.
677         (elf_x86_64_link_hash_table_create): Set pointer_r_type.
678         (elf_x86_64_check_relocs): Handle R_X86_64_32 like R_X86_64_64
679         for ILP32.  Remove ABI_64_P PIC check for R_X86_64_8,
680         R_X86_64_16, R_X86_64_32 and R_X86_64_32S.
681         (elf_x86_64_relocate_section):  Handle R_X86_64_32 like R_X86_64_64
682         for ILP32.
683
684 2011-01-14  Alan Modra  <amodra@gmail.com>
685
686         * bfd.c (bfd_perror): Flush stdout before and stderr after printing
687         error.
688         (_bfd_default_error_handler): Likewise.
689         * elf.c (print_segment_map): Likewise.
690         * libbfd.c (warn_deprecated): Likewise.
691         * som.c (som_sizeof_headers): No need to do so here.
692         * coff-i860.c: Replace use of printf for error messages with
693         _bfd_error_handler.
694         * coff-ppc.c: Likewise.
695         * coff-sh.c: Likewise.
696         * elf32-bfin.c: Likewise.
697         * elf32-dlx.c: Likewise.
698         * elf32-mep.c: Likewise.
699         * elf32-v850.c: Likewise.
700         * mach-o.c: Likewise.
701         * pef.c: Likewise.
702
703 2011-01-13  H.J. Lu  <hongjiu.lu@intel.com>
704
705         * elf64-x86-64.c (elf_x86_64_link_hash_table): Remove
706         swap_reloca_out.
707         (elf_x86_64_link_hash_table_create): Don't set swap_reloca_out.
708         (elf_x86_64_check_relocs): Align relocation section to 4 byte
709         for 32bit.
710         (elf_x86_64_gc_sweep_hook): Replace ELF64_ST_TYPE with
711         ELF_ST_TYPE.
712         (elf_x86_64_finish_dynamic_symbol): Updated.
713         (elf_x86_64_finish_dynamic_sections): Don't use
714         Elf64_External_Dyn, bfd_elf64_swap_dyn_in, nor
715         bfd_elf64_swap_dyn_out.
716
717 2011-01-14  J. Park  <grassman@gmail.com>
718
719         PR ld/12339
720         * elf32-arm.c (allocate_dynrelocs): Don't set up eh before
721         following bfd_link_hash_warning symbol link.
722
723 2011-01-10  Nathan Sidwell  <nathan@codesourcery.com>
724             Glauber de Oliveira Costa  <glommer@gmail.com>
725
726         * reloc.c (BFD_RELOC_ARM_TLS_GOTDESC, BFD_RELOC_ARM_TLS_CALL,
727         BFD_RELOC_ARM_THM_TLS_CALL, BFD_RELOC_ARM_TLS_DESCSEQ,
728         BFD_RELOC_ARM_THM_TLS_DESCSEQ, BFD_RELOC_ARM_TLS_DESC): New
729         relocations.
730         * libbfd.h: Rebuilt.
731         * bfd-in2.h: Rebuilt.
732         * elf32-arm.c (elf32_arm_howto_table_1): Add new relocations.
733         (elf32_arm_reloc_map): Likewise.
734         (tls_trampoline, dl_tlsdesc_lazy_trampoline): New PLT templates.
735         (elf32_arm_stub_long_branch_any_tls_pic,
736         elf32_arm_stub_long_branch_v4t_thumb_tls_pic): New stub templates.
737         (DEF_STUBS): Add new stubs.
738         (struct_elf_arm_obj_data): Add local_tlsdesc_gotent field.
739         (elf32_arm_local_tlsdesc_gotent): New.
740         (GOT_TLS_GDESC): New mask.
741         (GOT_TLS_GD_ANY): Define.
742         (struct elf32_arm_link_hash_entry): Add tlsdesc_got field.
743         (elf32_arm_compute_jump_table_size): New.
744         (struct elf32_arm_link_hash_table): Add next_tls_desc_index,
745         num_tls_desc, dt_tlsdesc_plt, dt_tlsdesc_got, tls_trampoline,
746         sgotplt_jump_table_size fields.
747         (elf32_arm_link_hash_newfunc): Initialize tlsdesc_got field.
748         (elf32_arm_link_hash_table_create): Initialize new fields.
749         (arm_type_of_stub): Check TLS desc relocs too.
750         (elf32_arm_stub_name): TLS desc relocs can be shared.
751         (elf32_arm_tls_transition): Determine relaxation.
752         (arm_stub_required_alignment): Add tls stubs.
753         (elf32_arm_size_stubs): Likewise.
754         (elf32_arm_tls_relax): Perform TLS relaxing.
755         (elf32_arm_final_link_relocate): Process TLS DESC relocations.
756         (IS_ARM_TLS_GNU_RELOC): New.
757         (IS_ARM_TLS_RELOC): Use it.
758         (elf32_arm_relocate_section): Perform TLS relaxing.
759         (elf32_arm_check_relocs): Anticipate TLS relaxing, process tls
760         desc relocations.
761         (allocate_dynrelocs): Allocate tls desc relcoations.
762         (elf32_arm_output_arch_local_syms): Emit tls trampoline mapping
763         symbols.
764         (elf32_arm_size_dynamic_sections): Allocate tls trampolines and
765         got slots.
766         (elf32_arm_always_size_sections): New. Create _TLS_MODULE_BASE
767         symbol.
768         (elf32_arm_finish_dynamic_symbol): Adjust.
769         (arm_put_trampoline): New.
770         (elf32_arm_finish_dynamic_sections): Emit new dynamic tags and tls
771         trampolines.
772         (elf_backend_always_size_sections): Define.
773
774 2011-01-06  H.J. Lu  <hongjiu.lu@intel.com>
775
776         * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Optimized.
777
778 2011-01-06  H.J. Lu  <hongjiu.lu@intel.com>
779
780         PR ld/12366
781         PR ld/12371
782         * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Properly
783         handle symbols marked with regular reference, but not non-GOT
784         reference when building shared library.
785
786         * elf32-i386.c (elf_i386_gc_sweep_hook): Properly handle
787         local and global STT_GNU_IFUNC symols when building shared
788         library.
789         * elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise.
790
791 2011-01-05  DJ Delorie  <dj@redhat.com>
792
793         * reloc.c: Add BFD_RELOC_RX_OP_NEG.
794         * libbfd.h: Regenerate.
795         * bfd-in2.h: Regenerate.
796         * elf32-rx.c: Add it to the list, corresponding to R_RX_OPneg.
797
798 2011-01-03  H.J. Lu  <hongjiu.lu@intel.com>
799
800         * cpu-i386.c (bfd_i386_compatible): New.
801         (bfd_x64_32_arch_intel_syntax): Replace bfd_default_compatible
802         with bfd_i386_compatible.
803         (bfd_x86_64_arch_intel_syntax): Likewise.
804         (bfd_i386_arch_intel_syntax): Likewise.
805         (i8086_arch): Likewise.
806         (bfd_x64_32_arch): Likewise.
807         (bfd_x86_64_arch): Likewise.
808         (bfd_i386_arch): Likewise.
809
810 For older changes see ChangeLog-2010
811 \f
812 Local Variables:
813 mode: change-log
814 left-margin: 8
815 fill-column: 74
816 version-control: never
817 End: