86f9d849b17630ff8ce7943e76ccf38fd878f595
[external/binutils.git] / bfd / ChangeLog
1 2014-02-17  Alan Modra  <amodra@gmail.com>
2
3         * elf32-ppc.c (ppc_elf_relocate_section): Move relocs on insns
4         patched for ppc476 workaround.  Reapply branch taken/not taken
5         relocs.
6
7 2014-02-12  Alan Modra  <amodra@gmail.com>
8
9         * elf32-ppc.c (ppc_elf_relax_section): Don't build long-branch
10         stubs for calls to __tls_get_addr that we know will later be
11         optimised away.
12
13 2014-02-12  Alan Modra  <amodra@gmail.com>
14
15         * elf32-ppc.c (ppc_elf_relax_section): Enable ppc476 workaround
16         for ld -r, when code sections are sufficiently aligned.
17         * elf32-ppc.h (struct ppc_elf_params): Delete pagesize.  Add
18         pagesize_p2.
19
20 2014-02-12  Alan Modra  <amodra@gmail.com>
21
22         PR gold/15530
23         * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
24         --export-dynamic and --dynamic-list marking of symbols.
25         * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Reorder
26         cheap tests first.
27
28 2014-02-10  H.J. Lu  <hongjiu.lu@intel.com>
29
30         PR gold/16530
31         * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Mark symbol in
32         executables if it matches dynamic_list.
33
34 2014-02-10  Alan Modra  <amodra@gmail.com>
35
36         * po/SRC-POTFILES.in: Regenerate.
37         * po/bfd.pot: Regenerate.
38
39 2014-02-09  Alan Modra  <amodra@gmail.com>
40
41         * elf-bfd.h (struct elf_backend_data): Add caches_rawsize.
42         * elfxx-target.h (elf_backend_caches_rawsize): Define.
43         (elfNN_bed): Init new field.
44         * elflink.c (elf_link_input_bfd): Handle caches_rawsize.
45         * elf32-ppc.c (shared_stub_entry): Zero addi offset.
46         (ppc_elf_relax_section): Don't reallocate section here, write
47         stubs, or write out relocs for ld -r here..
48         (ppc_elf_relocate_section): ..instead write stubs here, and use
49         existing code to write out relocs for ld -r.  Fix offset
50         adjustment on reloc for little-endian.
51         (elf_backend_caches_rawsize): Define.
52
53 2014-02-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
54
55         PR build/16550
56         * cache.c (bfd_cache_max_open): Cast RLIM_INFINITY to rlim_t.
57
58 2014-02-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
59
60         * coff-rs6000.c (xcoff_write_archive_contents_big): Free OFFSETS in
61         return paths.  Three times.
62         * elf64-ppc.c (ppc64_elf_link_hash_table_create): Free HTAB in all
63         return paths.
64         (ppc64_elf_tls_optimize): Free TOC_REF in return path.
65         (ppc64_elf_edit_toc): Free USED in return path.
66
67 2014-02-03  Sandra Loosemore  <sandra@codesourcery.com>
68
69         * reloc.c (BFD_RELOC_NIOS2_GOT_LO, BFD_RELOC_NIOS2_GOT_HA): New.
70         (BFD_RELOC_NIOS2_CALL_LO, BFD_RELOC_NIOS2_CALL_HA): New.
71         * libbfd.h: Regenerated.
72         * bfd-in2.h: Regenerated.
73         * elf32-nios2.c (elf_nios2_howto_table_rel): Add new relocations.
74         (nios2_reloc_map): Likewise.
75         (GOT_USED, CALL_USED): Renamed from GOT16_USED and CALL16_USED.
76         Fixed all references.
77         (nios2_elf32_relocate_section): Add new relocations.
78         (nios2_elf32_check_relocs): Likewise.
79         (nios2_elf32_gc_sweep_hook): Likewise.
80
81 2014-02-03  Alan Modra  <amodra@gmail.com>
82
83         * elf32-ppc.c (struct ppc_elf_link_hash_table): Add params.
84         Delete emit_stub_syms, no_tls_get_addr_opt.  Update all uses.
85         (ppc_elf_link_params): New function.
86         (ppc_elf_create_glink): Align .glink to 64 bytes for ppc476
87         workaround.
88         (ppc_elf_select_plt_layout): Remove plt_style and emit_stub_syms
89         parameters.  Use htab->params instead.
90         (ppc_elf_tls_setup): Remove no_tls_get_addr_opt parameter.
91         (ppc_elf_size_dynamic_sections): Align __glink_PLTresolve to
92         64 bytes for ppc476 workaround.
93         (struct ppc_elf_relax_info): New.
94         (ppc_elf_relax_section): Exclude linker created sections and
95         those too small to hold one instruction.  Don't add another
96         branch  around trampolines on later relax passes.  Don't
97         generate trampolines for undefined symbols when !relocatable,
98         nor for plugin symbols.  Allocate space for ppc476 workaround
99         patch area.  Free fixups on error return path.
100         (ppc_elf_relocate_section): Handle ppc476 workaround patching.
101         * elf32-ppc.h (struct ppc_elf_params): New.
102         (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Update prototype.
103         (ppc_elf_link_params): Declare.
104         * section.c (SEC_INFO_TYPE_TARGET): Define.
105         * bfd-in2.h: Regenerate.
106
107 2014-02-02  Sandra Loosemore  <sandra@codesourcery.com>
108
109         * elf32-nios2.c (struct elf32_nios2_link_hash_table): Add
110         h_gp_got field.
111         (nios2_elf32_relocate_section): Use got_base to adjust
112         GOT-pointer-relative relocations relative to _gp_got.
113         (create_got_section): Create _gp_got symbol.
114         (nios2_elf32_finish_dynamic_symbol): Make _gp_got absolute.
115         (nios2_elf32_size_dynamic_sections): Set _gp_got offset.
116
117 2014-01-30  Sandra Loosemore  <sandra@codesourcery.com>
118
119         * bfd-in2.h: Update from reloc.c.
120         * elf32-nios2.c: Include elf32-nios2.h.
121         (elf_nios2_howto_table_rel): Add entry for R_NIOS2_CALL26_NOAT.
122         (nios2_reloc_map): Likewise.
123         (enum elf32_nios2_stub_type): Declare.
124         (struct elf32_nios2_stub_hash_entry): Declare.
125         (nios2_stub_hash_entry, nios2_stub_hash_lookup): New macros.
126         (struct elf32_nios2_link_hash_entry): Add hsh_cache field.
127         (struct elf32_nios2_link_hash_table): Add new fields bstab,
128         stub_bfd, add_stub_section, layout_sections_again, stub_group,
129         bfd_count, top_index, input_list, all_local_syms.
130         (nios2_call26_stub_entry): New.
131         (nios2_elf32_install_imm16): Move up in file.
132         (nios2_elf32_install_data): Move up in file.
133         (hiadj): Move up in file.
134         (stub_hash_newfunc): New.
135         (link_hash_newfunc): Initialize hsh_cache field.
136         (STUB_SUFFIX): New.
137         (nios2_stub_name): New.
138         (nios2_get_stub_entry): New.
139         (nios2_add_stub): New.
140         (nios2_elf32_setup_section_lists): New.
141         (nios2_elf32_next_input_section): New.
142         (CALL26_SEGMENT): New.
143         (MAX_STUB_SECTION_SIZE): New.
144         (group_sections): New.
145         (nios2_type_of_stub): New.
146         (nios2_build_one_stub): New.
147         (nios2_size_one_stub): New.
148         (get_local_syms): New.
149         (nios2_elf32_size_stubs): New.
150         (nios2_elf32_build_stubs): New.
151         (nios2_elf32_do_call26_relocate): Correct CALL26 overflow test.
152         (nios2_elf32_relocate_section): Handle R_NIOS2_CALL26_NOAT.  Add
153         trampolines for R_NIOS2_CALL26 stubs.
154         (nios2_elf32_check_relocs): Handle R_NIOS2_CALL26_NOAT.
155         (nios2_elf32_gc_sweep_hook): Likewise.
156         (nios2_elf32_link_hash_table_create): Initialize the stub hash table.
157         (nios2_elf32_link_hash_table_free): New.
158         (bfd_elf32_bfd_link_hash_table_free): Define.
159         * elf32-nios2.h: New file.
160         * libbfd.h: Update from reloc.c.
161         * reloc.c (BFD_RELOC_NIOS2_CALL26_NOAT): New.
162
163 2014-01-29  Nick Clifton  <nickc@redhat.com>
164
165         PR binutils/16318
166         * elf32-metag.c (elf_metag_post_process_headers): Call
167         _bfd_elf_post_process_headers.
168         * elf32-sh64.c (sh64_elf_copy_private_data): Call
169         _bfd_elf_copy_private_data.
170         * elf64-sh64.c (sh_elf64_copy_private_data_internal): Likewise.
171
172 2014-01-29  Nick Clifton  <nickc@redhat.com>
173
174         * bfd-in.h (bfd_set_section_vma): Delete.
175         (bfd_set_section_alignment): Delete.
176         (bfd_set_section_userdata): Delete.
177         (bfd_set_cacheable): Delete.
178         * bfd.c (bfd_set_cacheable): New static inline function.
179         * section.c (bfd_set_section_userdata): Likewise.
180         (bfd_set_section_vma): Likewise.
181         (bfd_set_section_alignment): Likewise.
182         * bfd-in2.h: Regenerate.
183
184 2014-01-28  Nick Clifton  <nickc@redhat.com>
185
186         * dwarf2.c (find_abstract_instance_name): For DW_FORM_ref_addr
187         attributes select the CU containing the abbreviation, which may not
188         be the current CU.
189
190 2014-01-24  Alan Modra  <amodra@gmail.com>
191
192         * elf64-ppc.c (ppc_build_one_stub): Correct reloc count passed
193         to get_relocs for ELFv2.
194
195 2014-01-23  H.J. Lu  <hongjiu.lu@intel.com>
196
197         PR ld/16498
198         * elf.c (_bfd_elf_map_sections_to_segments): Issue a linker error
199         if TLS sections are not adjacent.
200
201 2014-01-22  Alan Modra  <amodra@gmail.com>
202
203         * elflink.c (elf_link_add_object_symbols): Call minfo for --as-needed.
204
205 2014-01-22  Alan Modra  <amodra@gmail.com>
206
207         * elf64-ppc.c (STK_LINKER): Comment typo fix.
208
209 2014-01-21  H.J. Lu  <hongjiu.lu@intel.com>
210
211         PR ld/16467
212         * elflink.c (_bfd_elf_merge_symbol): When types of the existing
213         regular default symbol definition and the versioned dynamic
214         symbol definition mismatch, skip the default symbol definition
215         if one of them is IFUNC.
216
217 2014-01-21  H.J. Lu  <hongjiu.lu@intel.com>
218
219         PR ld/2404
220         * elflink.c (_bfd_elf_merge_symbol): Don't check info->shared,
221         info->export_dynamic nor h->ref_dynamic for type mismatch when
222         adding the default version.
223
224 2014-01-16  Alan Modra  <amodra@gmail.com>
225
226         * elfxx-mips.c (mips_elf_record_got_page_entry): Pass in a
227         mips_elf_traverse_got_arg* rather than mips_got_info*.
228         Adjust caller.  Alloc on output_bfd rather than symbol section
229         owner.
230
231 2014-01-15  H.J. Lu  <hongjiu.lu@intel.com>
232
233         * elf32-i386.c (elf_i386_allocate_dynrelocs): Revert the last
234         change.
235         * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
236
237 2014-01-14  H.J. Lu  <hongjiu.lu@intel.com>
238
239         PR ld/16428
240         * elf32-i386.c (elf_i386_allocate_dynrelocs): Don't discard relocs
241         against __ehdr_start.
242         * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
243
244 2014-01-14  H.J. Lu  <hongjiu.lu@intel.com>
245
246         * elf32-i386.c (elf_i386_allocate_dynrelocs): Revert the last
247         change.
248         * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
249
250 2014-01-14  H.J. Lu  <hongjiu.lu@intel.com>
251
252         PR ld/16428
253         * elf32-i386.c (elf_i386_allocate_dynrelocs): Don't update reloc
254         count if there are any non pc-relative relocs.
255         * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
256
257 2014-01-14  Michael Hudson-Doyle  <michael.hudson@linaro.org>
258             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
259
260         * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use correct
261         offset while calculating relocation address.
262         (elfNN_aarch64_create_small_pltn_entry): Likewise.
263         (elfNN_aarch64_init_small_plt0_entry): Likewise.
264
265 2014-01-13  Ma Jiang  <ma.jiang@zte.com.cn>
266
267         PR ld/16202
268         * elf32-arm.c (elf32_arm_final_link_relocate): Refetch addends for
269         R_ARM_ABS8 and R_ARM_ABS16.
270
271 2014-01-13  Alan Modra  <amodra@gmail.com>
272
273         * elf32-ppc.c (ppc_elf_check_relocs): For @local call to ifunc,
274         error when shared and force a plt call otherwise.
275         (ppc_elf_size_dynamic_sections): Don't emit DT_PPC_GOT unless
276         plt_type == PLT_NEW.
277         (ppc_elf_relocate_section): Add missing test to resolve ifuncs to
278         the appropriate call stub.
279
280 2014-01-10  Alan Modra  <amodra@gmail.com>
281
282         PR ld/14207
283         PR ld/16322
284         PR binutils/16323
285         * elf.c (assign_file_positions_for_load_sections): Revert last change.
286         (assign_file_positions_for_non_load_sections): When setting up
287         PT_GNU_RELRO header, don't require a corresponding PT_LOAD
288         header that completely covers the relro region.
289
290 2014-01-09  Tristan Gingold  <gingold@adacore.com>
291
292         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): use jump
293         table macros and add macros to initializa the structure.
294
295 2014-01-08  H.J. Lu  <hongjiu.lu@intel.com>
296
297         PR ld/14207
298         PR ld/16322
299         PR binutils/16323
300         * elf.c (_bfd_elf_map_sections_to_segments): Don't check section
301         size for PT_GNU_RELRO segment.
302         (assign_file_positions_for_load_sections): If PT_LOAD segment
303         doesn't fit PT_GNU_RELRO segment, adjust its p_filesz and p_memsz.
304
305 2014-01-07  Tom Tromey  <tromey@redhat.com>
306
307         * elf32-xtensa.c (vsprint_msg): Don't use old VA_* compatibility
308         wrappers.
309
310 2014-01-03  Nick Clifton  <nickc@redhat.com>
311
312         PR binutils/16199
313         * elf.c (vma_page_aligned_bias): Handle a maxpagesize value of
314         zero.
315
316 2014-01-02  Yuanhui Zhang  <asmwarrior@gmail.com>
317
318         PR binutils/14289
319         * pef.c (bfd_pef_xlib_read_header): Increase buffer size to 80.
320
321 2014-01-02  Nick Clifton  <nickc@redhat.com>
322
323         PR binutils/11983
324         * archive.c (_bfd_get_elt_at_filepos): Store a copy of the
325         filename in the bfd's filename field.
326         * elfcode.h (bfd_from_remote_memory): Likewise.
327         * ieee.c (ieee_object_p): Likewise.
328         * mach-o.c (bfd_mach_o_fat_member_init): Likewise.
329         * oasys.c (oasys_openr_next_archived_file): Likewise.
330         * vms-lib.c (_bfd_vms_lib_get_module): Likewise.
331         * opncls.c (bfd_fopen): Likewise.
332         (bfd_openstreamr): Likewise.
333         (bfd_openr_iovec): Likewise.
334         (bfd_openw): Likewise.
335         (bfd_create): Likewise.
336         (_bfd_delete_bfd): Free filename.
337
338 For older changes see ChangeLog-2013
339 \f
340 Copyright (C) 2014 Free Software Foundation, Inc.
341
342 Copying and distribution of this file, with or without modification,
343 are permitted in any medium without royalty provided the copyright
344 notice and this notice are preserved.
345
346 Local Variables:
347 mode: change-log
348 left-margin: 8
349 fill-column: 74
350 version-control: never
351 End: