include/elf/
[binutils.git] / bfd / ChangeLog
blob0bdc2adbb9fcb114f5269963ffcc42ccd27e1d15
1 2011-03-14  Richard Sandiford  <richard.sandiford@linaro.org>
3         * elf-bfd.h (elf_link_hash_entry): Add target_internal.
4         * elf.c (swap_out_syms): Set st_target_internal for each
5         Elf_Internal_Sym.
6         * elfcode.h (elf_swap_symbol_in): Likewise.
7         * elf32-i370.c (i370_elf_finish_dynamic_sections): Likewise.
8         * elf32-sh-symbian.c (sh_symbian_relocate_section): Likewise.
9         * elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise.
10         * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
11         * elflink.c (elf_link_output_extsym): Likewise.
12         (bfd_elf_final_link): Likewise.
13         (elf_link_add_object_symbols): Copy st_target_internal
14         to the hash table if we see a definition.
15         (_bfd_elf_copy_link_hash_symbol_type): Copy target_internal.
16         * elf32-arm.c (elf32_arm_stub_hash_entry): Replace st_type with
17         a branch_type field.
18         (a8_erratum_fix, a8_erratum_reloc): Likewise.
19         (arm_type_of_stub): Replace actual_st_type with an
20         actual_branch_type parameter.
21         (arm_build_one_stub): Use branch types rather than st_types to
22         determine the type of branch.
23         (cortex_a8_erratum_scan): Likewise.
24         (elf32_arm_size_stubs): Likewise.
25         (bfd_elf32_arm_process_before_allocation): Likewise.
26         (allocate_dynrelocs_for_symbol): Likewise.
27         (elf32_arm_finish_dynamic_sections): Likewise.
28         (elf32_arm_final_link_relocate): Replace sym_flags parameter with
29         a branch_type parameter.
30         (elf32_arm_relocate_section): Update call accordingly.
31         (elf32_arm_adjust_dynamic_symbol): Don't check STT_ARM_TFUNC.
32         (elf32_arm_output_map_sym): Initialize st_target_internal.
33         (elf32_arm_output_stub_sym): Likewise.
34         (elf32_arm_symbol_processing): Delete.
35         (elf32_arm_swap_symbol_in): Convert STT_ARM_TFUNCs into STT_FUNCs.
36         Use st_target_internal to record the branch type.
37         (elf32_arm_swap_symbol_out): Use st_target_internal to test for
38         Thumb functions.
39         (elf32_arm_is_function_type): Delete.
40         (elf_backend_symbol_processing): Likewise.
41         (elf_backend_is_function_type): Likewise.
43 2011-03-14  Richard Sandiford  <richard.sandiford@linaro.org>
45         * elf32-arm.c (elf32_arm_check_relocs): Always assign a dynobj.
46         (elf32_arm_finish_dynamic_sections): Move sgot != NULL assertion
47         into the PLT block.
49 2011-03-14  Richard Sandiford  <richard.sandiford@linaro.org>
51         * elf32-arm.c (elf32_arm_check_relocs): Use call_reloc_p,
52         may_need_local_target_p and may_become_dynamic_p to classify
53         the relocation type.  Don't check info->symbolic or h->def_regular
54         when deciding whether to record a potential dynamic reloc.
55         Don't treat potential dynamic relocs as PLT references.
56         (elf32_arm_gc_sweep_hook): Update to match.  Assert that we don't
57         try to make the PLT reference count go negative.
59 2011-03-14  Richard Sandiford  <richard.sandiford@linaro.org>
61         * elf32-arm.c (elf32_arm_final_link_relocate): Always fill in the
62         GOT entry here, rather than leaving it to finish_dynamic_symbol.
63         Only create a dynamic relocation for local references if
64         info->shared.
65         (allocate_dynrelocs_for_symbol): Update dynamic relocation
66         allocation accordingly.
67         (elf32_arm_finish_dynamic_symbol): Don't initialise the GOT entry here.
69 2011-03-14  Richard Sandiford  <richard.sandiford@linaro.org>
71         * elf32-arm.c (elf32_arm_allocate_dynrelocs): New function.
72         (elf32_arm_add_dynreloc): Likewise.
73         (elf32_arm_adjust_dynamic_symbol): Use elf32_arm_allocate_dynrelocs
74         to allocate dynamic relocations.
75         (elf32_arm_size_dynamic_sections): Likewise.
76         (allocate_dynrelocs): Likewise.  Rename to
77         allocate_dynrelocs_for_symbol.
78         (elf32_arm_final_link_relocate): Use elf32_arm_add_dynreloc to
79         create dynamic relocations.
80         (elf32_arm_finish_dynamic_symbol): Likewise.
82 2011-03-12  H.J. Lu  <hongjiu.lu@intel.com>
84         * elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS
85         x32 GD->IE and GD->LE transitions.
86         (elf_x86_64_relocate_section): Supprt TLS x32 GD->IE, GD->LE
87         and LD->LE transitions.
89 2011-03-10  Alan Modra  <amodra@gmail.com>
91         * elf64-ppc.c (ppc64_elf_relocate_section): Provide section/offset
92         for LO_DS error message and correct multiple.
94 2011-03-10  Alan Modra  <amodra@gmail.com>
96         * elf64-ppc.c (bfd_elf64_bfd_link_just_syms): Define.
97         (ppc64_elf_link_just_syms): New function.
98         (opd_entry_value): Don't assume big-endian host.
99         (get_r2off): New function.
100         (ppc_build_one_stub, ppc_size_one_stub): Use it here.
102 2011-03-06  Michael Snyder  <msnyder@vmware.com>
104         * compress.c (bfd_compress_section_contents): Check for out of mem.
106         * elf64-x86-64.c (elf_x86_64_relocate_section): Document
107         that case statement falls through intentionally.
109         * elf32-i386.c (elf_i386_relocate_section): Document fall through.
111 2011-03-04  Alan Modra  <amodra@gmail.com>
113         * archive.c (bsd_write_armap): Don't call stat in deterministic
114         mode, and don't use st_mtime if stat returns error.
116 2011-03-03  Michael Snyder  <msnyder@vmware.com>
118         * elf64-x86-64.c (elf_x86_64_relocate_section): Remove dead code.
120         * coff-x86_64.c (coff_amd64_rtype_to_howto): Fencepost error.
122         * aoutx.h (aout_final_link): Use sizeof int not sizeof int*.
123         (aout_link_write_other_symbol): Missing break statement.
125         * dwarf2.c (scan_unit_for_symbols): Stop memory leak.
127         * archive.c (_bfd_slurp_extended_name_table): Fail if bfd_seek fails.
129 2011-03-03  H.J. Lu  <hongjiu.lu@intel.com>
131         * elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS
132         x32 IE->LE transition.
133         (elf_x86_64_relocate_section): Likewise.
135 2011-03-02  Bernd Schmidt  <bernds@codesourcery.com>
137         * elflink.c (is_reloc_section): Remove function.
138         (get_dynamic_reloc_section_name): Construct string manually.
140 2011-02-28  Kai Tietz  <kai.tietz@onevision.com>
142         * archive.c (_bfd_find_nested_archive): Use filename_(n)cmp.
143         (adjust_relative_path): Likewise.
144         (_bfd_construct_extended_name_table): Likewise.
145         * corefile.c (generic_core_file_matches_executable_p): Likewise.
146         * elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
147         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
148         * elf32-spu.c (sort_bfds): Likewise.
149         (spu_elf_auto_overlay): Likewise.
150         * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
151         * xcofflink.c (xcoff_set_import_path): Likewise.
152         * xtensa-isa.c (xtensa_regfile_lookup): Likewise.
153         (xtensa_regfile_lookup_shortname): Likewise.
155 2011-02-28  Alan Modra  <amodra@gmail.com>
157         PR 12513
158         * archive.c (bfd_slurp_bsd_armap_f2): Sanity check parsed_size and
159         stringsize.  Properly sanity check symdef_count.  Remove redundant
160         bfd_release.
162 2011-02-25  Rafael Ávila de Espíndola <respindola@mozilla.com>
164         * plugin.c (bfd_plugin_object_p): Correctly set the filesize
165         and handle claim_file seeking. Only try to load the plugin once.
167 2011-02-22  Andreas Schwab  <schwab@redhat.com>
169         * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): For a TLS_GD
170         relocation read the value from the second GOT slot.
172 2011-02-15  Tristan Gingold  <gingold@adacore.com>
174         * vms-alpha.c (alpha_vms_link_add_archive_symbols): Add a comment.
176 2011-02-15  Alan Modra  <amodra@gmail.com>
178         * elf64-ppc.c (ppc64_elf_edit_toc): Reinstate second read of
179         toc relocs.  Fuss over free(NULL).
181 2011-02-14  Mike Frysinger  <vapier@gentoo.org>
183         * elflink.c (bfd_elf_size_dynamic_sections): Add
184         bfd_get_symbol_leading_char to the start of newname.
186 2011-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
188         * configure: Regenerate.
190 2011-02-09  Alan Modra  <amodra@gmail.com>
192         * elf64-ppc.c (ppc64_elf_edit_toc): Don't free toc relocs until
193         we are done.  When optimising large toc, check that a global
194         symbol on a toc reloc is defined in a kept section.
196 2011-02-08  Nick Clifton  <nickc@redhat.com>
198         PR binutils/12467
199         * elf.c (assign_file_positions_for_load_sections): Set the program
200         header offset and entry size to zero if there are no program
201         headers.
203 2011-02-08  Alan Modra  <amodra@gmail.com>
205         * elf64-ppc.c (ppc64_elf_edit_toc): Don't segfault on NULL
206         local_syms when looking for local symbols in .toc.
208 2011-02-01  Alan Modra  <amodra@gmail.com>
210         * elf64-ppc.c (ppc64_elf_next_input_section): Use elf_gp value
211         for toc pointer on any section having makes_toc_func_call set.
212         (check_pasted_section): Ensure pasted .init/.fini fragments use
213         the same toc if any has makes_toc_func_call set.
215 2011-01-28  Joseph Myers  <joseph@codesourcery.com>
217         * elf32-ppc.c (ppc_elf_link_hash_newfunc): Initialize has_sda_refs
218         field.
220 2011-01-22  Richard Sandiford  <rdsandiford@googlemail.com>
222         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Ignore
223         common sections too.
225 2011-01-18  H.J. Lu  <hongjiu.lu@intel.com>
227         * elf64-x86-64.c (elf_backend_want_plt_sym): Redefine to 0 after
228         Solaris target.
230 2011-01-18  Pierre Muller  <muller@ics.u-strasbg.fr>
232         Fix compilation for mingw64.
233         * coffcode.h (coff_slurp_symbol_table): Add intptr_t intermediate
234         typecast to avoid warning.
235         * elf32-rx.c: Add "bfd_stdint.h" include required for int32_t type
236         usage.
237         * elfxx-ia64.c (elfNN_ia64_relax_br): Use intptr_t typeacast instead
238         of long for pointer to avoid warning.
239         (elfNN_ia64_relax_brl): Idem.
240         (elfNN_ia64_install_value): Idem.
241         * vms-alpha.c (_bfd_vms_slurp_etir): Idem.
243 2011-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
245         * elf32-arm.c (elf32_arm_check_relocs): Check needs_plt rather than
246         h->needs_plt when deciding whether to record a possible dynamic reloc.
248 2011-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
250         * elf32-arm.c (elf32_arm_gc_sweep_hook): Remove all registered
251         dynamic relocs for the removed section.
253 2011-01-15  H.J. Lu  <hongjiu.lu@intel.com>
255         * elf64-x86-64.c (elf_x86_64_check_relocs): Check invalid x32
256         relocations.
258 2011-01-14  H.J. Lu  <hongjiu.lu@intel.com>
260         * elf64-x86-64.c (elf_x86_64_link_hash_table): Add pointer_r_type.
261         (elf_x86_64_link_hash_table_create): Set pointer_r_type.
262         (elf_x86_64_check_relocs): Handle R_X86_64_32 like R_X86_64_64
263         for ILP32.  Remove ABI_64_P PIC check for R_X86_64_8,
264         R_X86_64_16, R_X86_64_32 and R_X86_64_32S.
265         (elf_x86_64_relocate_section):  Handle R_X86_64_32 like R_X86_64_64
266         for ILP32.
268 2011-01-14  Alan Modra  <amodra@gmail.com>
270         * bfd.c (bfd_perror): Flush stdout before and stderr after printing
271         error.
272         (_bfd_default_error_handler): Likewise.
273         * elf.c (print_segment_map): Likewise.
274         * libbfd.c (warn_deprecated): Likewise.
275         * som.c (som_sizeof_headers): No need to do so here.
276         * coff-i860.c: Replace use of printf for error messages with
277         _bfd_error_handler.
278         * coff-ppc.c: Likewise.
279         * coff-sh.c: Likewise.
280         * elf32-bfin.c: Likewise.
281         * elf32-dlx.c: Likewise.
282         * elf32-mep.c: Likewise.
283         * elf32-v850.c: Likewise.
284         * mach-o.c: Likewise.
285         * pef.c: Likewise.
287 2011-01-13  H.J. Lu  <hongjiu.lu@intel.com>
289         * elf64-x86-64.c (elf_x86_64_link_hash_table): Remove
290         swap_reloca_out.
291         (elf_x86_64_link_hash_table_create): Don't set swap_reloca_out.
292         (elf_x86_64_check_relocs): Align relocation section to 4 byte
293         for 32bit.
294         (elf_x86_64_gc_sweep_hook): Replace ELF64_ST_TYPE with
295         ELF_ST_TYPE.
296         (elf_x86_64_finish_dynamic_symbol): Updated.
297         (elf_x86_64_finish_dynamic_sections): Don't use
298         Elf64_External_Dyn, bfd_elf64_swap_dyn_in, nor
299         bfd_elf64_swap_dyn_out.
301 2011-01-14  J. Park  <grassman@gmail.com>
303         PR ld/12339
304         * elf32-arm.c (allocate_dynrelocs): Don't set up eh before
305         following bfd_link_hash_warning symbol link.
307 2011-01-10  Nathan Sidwell  <nathan@codesourcery.com>
308             Glauber de Oliveira Costa  <glommer@gmail.com>
310         * reloc.c (BFD_RELOC_ARM_TLS_GOTDESC, BFD_RELOC_ARM_TLS_CALL,
311         BFD_RELOC_ARM_THM_TLS_CALL, BFD_RELOC_ARM_TLS_DESCSEQ,
312         BFD_RELOC_ARM_THM_TLS_DESCSEQ, BFD_RELOC_ARM_TLS_DESC): New
313         relocations.
314         * libbfd.h: Rebuilt.
315         * bfd-in2.h: Rebuilt.
316         * elf32-arm.c (elf32_arm_howto_table_1): Add new relocations.
317         (elf32_arm_reloc_map): Likewise.
318         (tls_trampoline, dl_tlsdesc_lazy_trampoline): New PLT templates.
319         (elf32_arm_stub_long_branch_any_tls_pic,
320         elf32_arm_stub_long_branch_v4t_thumb_tls_pic): New stub templates.
321         (DEF_STUBS): Add new stubs.
322         (struct_elf_arm_obj_data): Add local_tlsdesc_gotent field.
323         (elf32_arm_local_tlsdesc_gotent): New.
324         (GOT_TLS_GDESC): New mask.
325         (GOT_TLS_GD_ANY): Define.
326         (struct elf32_arm_link_hash_entry): Add tlsdesc_got field.
327         (elf32_arm_compute_jump_table_size): New.
328         (struct elf32_arm_link_hash_table): Add next_tls_desc_index,
329         num_tls_desc, dt_tlsdesc_plt, dt_tlsdesc_got, tls_trampoline,
330         sgotplt_jump_table_size fields.
331         (elf32_arm_link_hash_newfunc): Initialize tlsdesc_got field.
332         (elf32_arm_link_hash_table_create): Initialize new fields.
333         (arm_type_of_stub): Check TLS desc relocs too.
334         (elf32_arm_stub_name): TLS desc relocs can be shared.
335         (elf32_arm_tls_transition): Determine relaxation.
336         (arm_stub_required_alignment): Add tls stubs.
337         (elf32_arm_size_stubs): Likewise.
338         (elf32_arm_tls_relax): Perform TLS relaxing.
339         (elf32_arm_final_link_relocate): Process TLS DESC relocations.
340         (IS_ARM_TLS_GNU_RELOC): New.
341         (IS_ARM_TLS_RELOC): Use it.
342         (elf32_arm_relocate_section): Perform TLS relaxing.
343         (elf32_arm_check_relocs): Anticipate TLS relaxing, process tls
344         desc relocations.
345         (allocate_dynrelocs): Allocate tls desc relcoations.
346         (elf32_arm_output_arch_local_syms): Emit tls trampoline mapping
347         symbols.
348         (elf32_arm_size_dynamic_sections): Allocate tls trampolines and
349         got slots.
350         (elf32_arm_always_size_sections): New. Create _TLS_MODULE_BASE
351         symbol.
352         (elf32_arm_finish_dynamic_symbol): Adjust.
353         (arm_put_trampoline): New.
354         (elf32_arm_finish_dynamic_sections): Emit new dynamic tags and tls
355         trampolines.
356         (elf_backend_always_size_sections): Define.
358 2011-01-06  H.J. Lu  <hongjiu.lu@intel.com>
360         * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Optimized.
362 2011-01-06  H.J. Lu  <hongjiu.lu@intel.com>
364         PR ld/12366
365         PR ld/12371
366         * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Properly
367         handle symbols marked with regular reference, but not non-GOT
368         reference when building shared library.
370         * elf32-i386.c (elf_i386_gc_sweep_hook): Properly handle
371         local and global STT_GNU_IFUNC symols when building shared
372         library.
373         * elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise.
375 2011-01-05  DJ Delorie  <dj@redhat.com>
377         * reloc.c: Add BFD_RELOC_RX_OP_NEG.
378         * libbfd.h: Regenerate.
379         * bfd-in2.h: Regenerate.
380         * elf32-rx.c: Add it to the list, corresponding to R_RX_OPneg.
382 2011-01-03  H.J. Lu  <hongjiu.lu@intel.com>
384         * cpu-i386.c (bfd_i386_compatible): New.
385         (bfd_x64_32_arch_intel_syntax): Replace bfd_default_compatible
386         with bfd_i386_compatible.
387         (bfd_x86_64_arch_intel_syntax): Likewise.
388         (bfd_i386_arch_intel_syntax): Likewise.
389         (i8086_arch): Likewise.
390         (bfd_x64_32_arch): Likewise.
391         (bfd_x86_64_arch): Likewise.
392         (bfd_i386_arch): Likewise.
394 For older changes see ChangeLog-2010
396 Local Variables:
397 mode: change-log
398 left-margin: 8
399 fill-column: 74
400 version-control: never
401 End: