Remove support for the (deprecated) openrisc and or32 configurations and replace
[platform/upstream/binutils.git] / bfd / ChangeLog
1 2014-04-22  Christian Svensson  <blue@cmd.nu>
2
3         * Makefile.am: Remove openrisc and or32 support.  Add support for or1k.
4         * archures.c: Likewise.
5         * coffcode.h: Likewise.
6         * config.bfd: Likewise.
7         * configure.in: Likewise.
8         * reloc.c: Likewise.
9         * targets.c: Likewise.
10         * cpu-or1k.c: New file.
11         * elf32-or1k.c: New file.
12         * coff-or32.c: Delete.
13         * cpu-openrisc.c: Delete.
14         * cpu-or32.c: Delete.
15         * elf32-openrisc.c: Delete.
16         * elf32-or32.c: Delete.
17         * Makefile.in: Regenerate.
18         * bfd-in2.h: Regenerate.
19         * configure: Regenerate.
20         * libbfd.h: Regenerate.
21
22 2014-04-22  Yuanhui Zhang  <asmwarrior@gmail.com>
23
24         PR ld/16821
25         * peXXigen.c (abs_finder): Fix for 32-bit host builds.
26
27 2014-04-22  Will Newton  <will.newton@linaro.org>
28
29         * elfnn-aarch64.c (elfNN_aarch64_section_flags): Remove
30         function.  (elf_backend_section_flags): Remove define.
31
32 2014-04-21  Richard Henderson  <rth@redhat.com>
33
34         * elf64-alpha.c (elf64_alpha_size_got_sections): New may_merge
35         parameter; honor it and disable got merging when false.
36         (elf64_alpha_relax_got_load): Do not relax to GPREL relocs during
37         the first pass of relaxation.
38         (elf64_alpha_relax_with_lituse): Likewise.  Move relaxed relocs to
39         the end of the LITERAL+LITUSE chain.
40         (elf64_alpha_relax_section): Only process LITERAL relocs during the
41         second pass of relaxation.
42
43         * configure.ac (use_secureplt): Enable by default.
44         * configure: Rebuild.
45
46 2014-04-18  Tristan Gingold  <gingold@adacore.com>
47
48         * mach-o.h (bfd_mach_o_dyld_info_command): Add rebase_content,
49         bind_content, weak_bind_content, lazy_bind_content,
50         export_content.
51         (bfd_mach_o_load_command): Add comments, add next field.
52         (mach_o_data_struct): Replace commands field by first_command
53         and last_command.
54         * mach-o.c (bfd_mach_o_append_command): New function.
55         (bfd_mach_o_bfd_copy_private_symbol_data): Add blank lines.
56         (bfd_mach_o_bfd_copy_private_section_data): Check flavour,
57         copy fields.
58         (bfd_mach_o_bfd_copy_private_header_data): Copy load commands.
59         (bfd_mach_o_pad4, bfd_mach_o_pad_command): New functions.
60         (bfd_mach_o_write_thread): Use macro instead of literal.
61         (bfd_mach_o_write_dylinker, bfd_mach_o_write_dylib)
62         (bfd_mach_o_write_main, bfd_mach_o_write_dyld_info): New
63         functions.
64         (bfd_mach_o_write_symtab_content): New function (extracted
65         from bfd_mach_o_write_symtab).
66         (bfd_mach_o_write_symtab): Split.
67         (bfd_mach_o_count_indirect_symbols): Move
68         (bfd_mach_o_build_dysymtab): Remove layout code.
69         (bfd_mach_o_write_contents): Rewritten to build commands in order.
70         (bfd_mach_o_count_sections_for_seg): Remove.
71         (bfd_mach_o_build_obj_seg_command): New function (extracted from
72         bfd_mach_o_build_seg_command).
73         (bfd_mach_o_build_exec_seg_command): New function.
74         (bfd_mach_o_build_dysymtab_command): Remove.
75         (bfd_mach_o_layout_commands): New function.
76         (bfd_mach_o_init_segment): New function.
77         (bfd_mach_o_build_commands): Major rework to handle non-object
78         files.
79         (bfd_mach_o_alloc_and_read, bfd_mach_o_read_dyld_content): New
80         function.
81         (bfd_mach_o_read_dyld_info): Clear content fields.
82         (bfd_mach_o_read_segment): Adjust call.
83         (bfd_mach_o_flatten_sections): Adjust as now load commands are
84         chained.
85         (bfd_mach_o_scan_start_address, bfd_mach_o_scan)
86         (bfd_mach_o_mkobject_init, bfd_mach_o_get_base_address)
87         (bfd_mach_o_lookup_command, bfd_mach_o_core_fetch_environment):
88         Likewise.
89
90 2014-04-18  Tristan Gingold  <gingold@adacore.com>
91
92         * mach-o-target.c (bfd_mach_o_bfd_copy_private_header_data):
93         Define instead of bfd_mach_o_bfd_copy_private_bfd_data.
94         * mach-o.c (bfd_mach_o_bfd_copy_private_bfd_data): Rename.
95         * mach-o.h (bfd_mach_o_bfd_copy_private_bfd_data): Likewise.
96
97 2014-04-18  Tristan Gingold  <gingold@adacore.com>
98
99         * mach-o.h (bfd_mach_o_dylinker_command)
100         (bfd_mach_o_dylib_command, bfd_mach_o_fvmlib_command): Remove
101         name_len field.
102         * mach-o.c (bfd_mach_o_read_dylinker, bfd_mach_o_read_dylib)
103         (bfd_mach_o_read_fvmlib): Adjust after name_len removal.
104
105 2014-04-18  Tristan Gingold  <gingold@adacore.com>
106
107         * mach-o.h (bfd_mach_o_backend_data): Add page_size field.
108         * mach-o-target.c: Check TARGET_PAGESIZE is defined.
109         (TARGET_NAME_BACKEND): Add TARGET_PAGESIZE.
110         * mach-o.c (TARGET_PAGESIZE): Define and undefined for
111         each targets declared.
112         * mach-o-x86-64.c (TARGET_PAGESIZE): Define.
113         * mach-o-i386.c (TARGET_PAGESIZE): Define.
114
115 2014-04-18  Tristan Gingold  <gingold@adacore.com>
116
117         * mach-o.c (bfd_mach_o_write_thread)
118         (bfd_mach_o_write_section_32, bfd_mach_o_write_section_64)
119         (bfd_mach_o_write_segment_32, bfd_mach_o_write_segment_64)
120         (bfd_mach_o_read_dylinker, bfd_mach_o_read_dylib)
121         (bfd_mach_o_read_prebound_dylib, bfd_mach_o_read_prebind_cksum)
122         (bfd_mach_o_read_twolevel_hints, bfd_mach_o_read_fvmlib)
123         (bfd_mach_o_read_thread, bfd_mach_o_read_dysymtab)
124         (bfd_mach_o_read_symtab, bfd_mach_o_read_uuid)
125         (bfd_mach_o_read_linkedit, bfd_mach_o_read_str)
126         (bfd_mach_o_read_dyld_info, bfd_mach_o_read_segment)
127         (bfd_mach_o_read_segment_32, bfd_mach_o_read_segment_64)
128         (bfd_mach_o_read_command): Now return a boolean status.
129         Adjust return statements.
130         (bfd_mach_o_write_contents, bfd_mach_o_scan): Adjust tests.
131         (bfd_mach_o_core_file_failing_command): Remove useless initialization.
132
133 2014-04-17  Kwok Cheung Yeung  <kcy@codesourcery.com>
134
135         * elfxx-mips.c (struct mips_got_info): Delete assigned_gotno
136         field.  Add assigned_low_gotno and assigned_high_gotno fields.
137         (mips_elf_create_local_got_entry): Update out-of-space condition.
138         Set index of new GOT entry to assigned_low_gotno if required by
139         the current relocation, else set it to assigned_high_gotno.
140         (mips_elf_set_global_gotidx): Replace uses of assigned_gotno
141         with assigned_low_gotno.
142         (mips_elf_multi_got): Initialize assigned_low_gotno and
143         assigned_high_gotno in secondary GOTs.  Use assigned_low_gotno
144         in place of assigned_gotno when handling global GOT entries.
145         (mips_elf_lay_out_got): Initialize assigned_low_gotno and
146         assigned_high_gotno.
147         (_bfd_mips_elf_finish_dynamic_sections): Account for a possible
148         gap in the middle of local GOT space.
149
150 2014-04-17  Alan Modra  <amodra@gmail.com>
151
152         PR 16846
153         * elflink.c (_bfd_elf_merge_symbol): Ignore TLS mismatch when
154         current bfd is a plugin.  Don't always set type_change_ok
155         when old bfd is a plugin.
156
157 2014-04-16  Tristan Gingold  <gingold@adacore.com>
158
159         * mach-o-x86-64.c (bfd_mach_o_x86_64_mkobject): Adjust cpusubtype
160         flag.
161
162 2014-04-16  Alan Modra  <amodra@gmail.com>
163
164         * elf32-ppc.c (ppc_elf_relocate_section): Fill 476 fixup area
165         with "ba 0" rather than zeros.
166
167 2014-04-15  Marcus Shawcroft  <marcus.shawcroft@arm.com>
168
169         * (elfNN_aarch64_tls_relax): Fix instruction mask.
170
171 2014-04-14  Alan Modra  <amodra@gmail.com>
172
173         * elf32-ppc.c (BA): Define
174         (ppc_elf_link_hash_table_create): Correct default_params.
175         (write_glink_stub): Pad small plt call stub with "ba 0" rather
176         than "nop" for ppc476_workaround.
177         (ppc_elf_finish_dynamic_sections): Likewise for branch table
178         and __glink_PLTresolve.  Ensure plt call stub at end of page
179         doesn't allow fall-thru prefetch.
180
181 2014-04-11  Nick Clifton  <nickc@redhat.com>
182
183         PR ld/16821
184         * peXXigen.c (abs_finder): New function.
185         (_bfd_XXi_swap_sym_out): For absolute symbols with values larger
186         than 1^32 try to convert them into section relative values
187         instead.
188
189 2014-04-11  Nick Clifton  <nickc@redhat.com>
190
191         * bfd-in2.h: Regenerate.
192         * libbfd.h: Regenerate.
193
194 2014-04-10  Cesar Philippidis  <cesar@codesourcery.com>
195
196         * elf32-nios2.c (nios2_elf32_build_stubs): Ignore dynobjs
197         when building function stubs.
198
199 2014-04-10  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
200
201         * elf32-avr.c: Add DIFF relocations for AVR.
202         (avr_final_link_relocate): Handle the DIFF relocs.
203         (bfd_elf_avr_diff_reloc): New.
204         (elf32_avr_is_diff_reloc): New.
205         (elf32_avr_adjust_diff_reloc_value): Reduce difference value.
206         (elf32_avr_relax_delete_bytes): Recompute difference after deleting
207         bytes.
208
209         * reloc.c: Add BFD_RELOC_AVR_DIFF8/16/32 relocations
210
211 2014-04-09  Alan Modra  <amodra@gmail.com>
212
213         * libcoff.h: Regenerate.
214
215 2014-04-09  Alan Modra  <amodra@gmail.com>
216
217         * elf32-ppc.c (ppc_elf_relocate_section): Remove bctr from list
218         of safe ppc476 insns at end of page.  Also remove non-branch insns.
219         Expand comments.
220
221 2014-04-08  Jon TURNEY  <jon.turney@dronecode.org.uk>
222
223         * peXXigen.c (pe_print_debugdata): New function: Displays the
224         contents of the debug directory and decodes codeview entries.
225         (_bfd_XXi_swap_debugdir_in, _bfd_XXi_swap_debugdir_out)
226         (_bfd_XXi_slurp_codeview_record, _bfd_XXi_write_codeview_record):
227         Add functions for reading and writing debugdir and codeview
228         records.
229         * libpei.h (_bfd_XXi_swap_debugdir_in, _bfd_XXi_swap_debugdir_out)
230         (_bfd_XXi_write_codeview_record): Add prototypes and macros.
231         * libcoff-in.h (pe_tdata): Add build-id data.
232         * libcoff.h: Regenerate.
233         * coffcode.h (coff_write_object_contents): Run build_id
234         after_write_object_contents hook.
235
236 2014-04-05  Alan Modra  <amodra@gmail.com>
237
238         * elflink.c (_bfd_elf_add_default_symbol): Pass poldbfd when
239         merging non-default sym.
240
241 2014-04-04  Tristan Gingold  <gingold@adacore.com>
242
243         * mach-o.c (bfd_mach_o_header_p): Reject 64 bit target when not
244         configured for.
245
246 2014-04-04  Tristan Gingold  <gingold@adacore.com>
247
248         * mach-o.c (bfd_mach_o_convert_section_name_to_mach_o): Fix
249         thinko on names length.
250
251 2014-04-04  Tristan Gingold  <gingold@adacore.com>
252
253         * mach-o-i386.c (bfd_mach_o_i386_swap_reloc_out): Use target index
254         of output_section.
255         * mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Ditto.
256
257 2014-04-04  Tristan Gingold  <gingold@adacore.com>
258
259         * bfd.c (bfd_get_arch_size): Default is taken from arch.
260
261 2014-04-03  Jon Turney  <jon.turney@dronecode.org.uk>
262
263         * peXXigen.c (pe_print_edata): Verify edt.name lies inside
264         section before dereferencing.
265         (pe_print_idata, pe_print_edata, pe_print_reloc)
266         (rsrc_print_section): Don't bother interpreting the contents
267         of sections which have no contents.
268
269 2014-04-03  Maria Guseva  <m.guseva@samsung.com>
270
271         PR ld/16803
272         * elf.c (_bfd_elf_set_section_contents): Use correct type to hold
273         file position.
274
275 2014-04-03  Tristan Gingold  <gingold@adacore.com>
276
277         * mach-o.c (bfd_mach_o_mangle_symbols): Use index from
278         output_section.
279         (bfd_mach_o_build_seg_command): Add comment.  Realign segment.
280         Fix style.
281         (bfd_mach_o_build_commands, bfd_mach_o_read_thread): Fix style.
282
283 2014-04-03  Alan Modra  <amodra@gmail.com>
284
285         * elf-bfd.h (struct elf_backend_data
286         <elf_backend_bfd_from_remote_memory>): Replace "size_t size"
287         with "bfd_size_type size".
288         (_bfd_elf32_bfd_from_remote_memory): Likewise.
289         (_bfd_elf64_bfd_from_remote_memory): Likewise.
290         * elf.c (bfd_elf_bfd_from_remote_memory): Likewise.
291         * elfcode.h (bfd_from_remote_memory): Likewise.
292         * bfd-in.h (bfd_elf_bfd_from_remote_memory): Likewise.
293         * bfd-in2.h: Regenerate.
294
295 2014-04-02  Tristan Gingold  <gingold@adacore.com>
296
297         * mach-o.h (bfd_mach_o_twolevel_hints_command)
298         (bfd_mach_o_prebind_cksum_command): New types.
299         (bfd_mach_o_prebound_dylib_command): Rewrite.
300         (bfd_mach_o_load_command): Add prebind_cksum and twolevel_hints
301         fields.
302         * mach-o.c (bfd_mach_o_read_prebound_dylib): Read and decode the
303         command.
304         (bfd_mach_o_read_prebind_cksum): New function.
305         (bfd_mach_o_read_twolevel_hints): Ditto.
306         (bfd_mach_o_read_command): Handle prebind cksum and twolevel hints
307         commands.
308
309 2014-04-02  Alan Modra  <amodra@gmail.com>
310
311         * elfcode.h (bfd_from_remote_memory): Add "size" parameter.
312         Consolidate code handling possible section headers past end of
313         segment.  Don't use p_align for page size guess, instead use
314         minpagesize.  Take note of ld.so clearing section headers when
315         p_memsz > p_filesz.  Handle file header specifying no section
316         headers.  Handle zero p_align throughout.  Default loadbase to
317         zero.  Add comments.  Rename contents_size to high_offset, and
318         make it a bfd_vma.  Delete unnecessary bfd_set_error calls.
319         * bfd-in.h (bfd_elf_bfd_from_remote_memory): Update prototpe.
320         * elf-bfd.h (struct elf_backend_data <elf_backend_from_remote_memory>):
321         Likewise.
322         (_bfd_elf32_bfd_from_remote_memory): Likewise.
323         (_bfd_elf64_bfd_from_remote_memory): Likewise.
324         * elf.c (bfd_elf_bfd_from_remote_memory): Adjust.
325         * bfd-in2.h: Regnerate.
326
327 2014-04-01  Tristan Gingold  <gingold@adacore.com>
328
329         * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Avoid to crash
330         when num == 0.
331
332 2014-03-27  Yury Gribov  <y.gribov@samsung.com>
333             Pavel Fedin  <p.fedin@samsung.com>
334
335         * elf32-arm.c: Add support for limited pretty-printing of PLT
336         entries on eabi and nacl targets.
337         (elf32_arm_get_synthetic_symtab): Add new callback.
338         (elf32_arm_nacl_plt_sym_val): Likewise.
339         (elf32_arm_plt0_size): Add helper function.
340         (elf32_arm_plt_size): Likewise.
341
342 2014-03-27  Tristan Gingold  <gingold@adacore.com>
343
344         * mach-o.c (bfd_mach_o_read_dylinker): Remove assert.
345         (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_DYLD_ENVIRONMENT.
346
347 2014-03-27  Tristan Gingold  <gingold@adacore.com>
348
349         * mach-o.h (bfd_mach_o_get_base_address): New prototype.
350         * mach-o.c (bfd_mach_o_write_symtab)
351         (bfd_mach_o_write_contents)
352         (bfd_mach_o_set_section_flags_from_bfd)
353         (bfd_mach_o_build_seg_command): Fix indentation.
354         (bfd_mach_o_get_base_address): New function.
355
356 2014-03-26  Nick Clifton  <nickc@redhat.com>
357
358         * cofflink.c (_bfd_coff_generic_relocate_section): Skip
359         relocations in discarded sections.
360
361 2014-03-26  Tristan Gingold  <gingold@adacore.com>
362
363         * mach-o.c (bfd_mach_o_convert_architecture): Add
364         BFD_MACH_O_CPU_TYPE_ARM64.
365
366 2014-03-26  Alan Modra  <amodra@gmail.com>
367
368         * elf64-ppc.c (ppc64_elf_check_relocs): Account for possibly
369         needed plt entries when taking the address of functions for
370         abiversion == 0 (ie. unknown) as well as abiversion == 2.
371         Move opd setup and abiversion checks to..
372         (ppc64_elf_before_check_relocs): ..here.  Renamed from
373         ppc64_elf_process_dot_syms.  Set output abiversion from input and
374         input abiversion from output, if either is not set.
375         (ppc64_elf_merge_private_bfd_data): Don't merge flags here.
376         (elf_backend_check_directives): Update.
377
378 2014-03-25  Will Newton  <will.newton@linaro.org>
379
380          * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_sections):
381          Set value of DT_PLTRELSZ and DT_RELASZ based on the size
382          of input sections rather than output sections.
383
384 2014-03-20  Will Newton  <will.newton@linaro.org>
385
386         PR ld/16715
387         * elf32-arm.c (elf32_arm_check_relocs): Set
388         pointer_equality_needed for absolute references within
389         executable links.
390         (elf32_arm_finish_dynamic_symbol): Set st_value to zero
391         unless pointer_equality_needed is set.
392
393 2014-03-19  Nick Clifton  <nickc@redhat.com>
394
395         * peXXigen.c (rsrc_process_section): Add code to scan input
396         sections and record their lengths.  Use these lengths to find the
397         start of each merged .rsrc section.
398
399 2014-03-17  Tristan Gingold  <gingold@adacore.com>
400
401         * mach-o.c (bfd_mach_o_read_dylib): Handle lazy load dylib.
402         (bfd_mach_o_read_command): Ditto.
403
404 2014-03-14  Meador Inge  <meadori@codesourcery.com>
405
406          * configure.in: Add strnlen to AC_CHECK_DECLS.
407          * config.in: Regenerate.
408          * configure: Regenerate.
409          * sysdep.h (strnlen): Add prototype.
410
411 2014-03-14  Alan Modra  <amodra@gmail.com>
412
413         * elf32-ppc.c (ppc_elf_relocate_section): Correct overflow
414         handling for VLE_SDA21 relocs.
415
416 2014-03-13  Tristan Gingold  <gingold@adacore.com>
417
418         * peicode.h (pe_ILF_object_p): Adjust, as the version number
419         has been read.
420         (pe_bfd_object_p): Also read version number to detect ILF.
421         * pe-x86_64.c (COFF_WITH_PE_BIGOBJ): Define.
422         (x86_64pe_bigobj_vec): Define
423         * coffcode.h (bfd_coff_backend_data): Add _bfd_coff_max_nscns field.
424         (bfd_coff_max_nscns): New macro.
425         (coff_compute_section_file_positions): Use unsigned int for
426         target_index.  Compare with bfd_coff_max_nscns.
427         (bfd_coff_std_swap_table, ticoff0_swap_table, ticoff1_swap_table):
428         Set a value for _bfd_coff_max_nscns.
429         (header_bigobj_classid): New constant.
430         (coff_bigobj_swap_filehdr_in, coff_bigobj_swap_filehdr_out)
431         (coff_bigobj_swap_sym_in, coff_bigobj_swap_sym_out)
432         (coff_bigobj_swap_aux_in, coff_bigobj_swap_aux_out): New
433         functions.
434         (bigobj_swap_table): New table.
435         * libcoff.h: Regenerate.
436         * coff-sh.c (bfd_coff_small_swap_table): Likewise.
437         * coff-alpha.c (alpha_ecoff_backend_data): Add value for
438         _bfd_coff_max_nscns.
439         * coff-mips.c (mips_ecoff_backend_data): Likewise.
440         * coff-rs6000.c (bfd_xcoff_backend_data)
441         (bfd_pmac_xcoff_backend_data): Likewise.
442         * coff64-rs6000.c (bfd_xcoff_backend_data)
443         (bfd_xcoff_aix5_backend_data): Likewise.
444         * targets.c (x86_64pe_bigobj_vec): Declare.
445         * configure.in (x86_64pe_bigobj_vec): New vector.
446         * configure: Regenerate.
447         * config.bfd: Add bigobj object format for Windows targets.
448
449 2014-03-12  Nick Clifton  <nickc@redhat.com>
450
451         PR ld/16671
452         * elf32-arm.c (elf32_arm_add_symbol_hook): Check for ARM format
453         before testing for vxworks.
454
455 2014-03-12  Alan Modra  <amodra@gmail.com>
456
457         * Makefile.in: Regenerate.
458
459 2014-03-12  Alan Modra  <amodra@gmail.com>
460
461         PR 16690
462         * elf.c (copy_elf_program_header): Ignore first section lma if
463         non-alloc.
464
465 2014-03-11  Alan Modra  <amodra@gmail.com>
466
467         PR 16686
468         * coff-rs6000.c: Include stdint.h.
469         * coff64-rs6000.c: Likewise.
470
471 2014-03-10  Tristan Gingold  <gingold@adacore.com>
472
473         * ticoff.h: Removed.
474
475 2014-03-08  Alan Modra  <amodra@gmail.com>
476
477         * elf32-ppc.c (ppc_elf_howto_raw): Correct overflow check for
478         many relocations.  Correct bitsize and rightshift too for a number
479         of VLE relocs.  Describe R_PPC_VLE_SDA21 and R_PPC_VLE_SDA21_LO.
480         Correct dst_mask on R_PPC_VLE_SDA21_LO.
481         (ppc_elf_vle_split16): Tidy, delete unnecessary prototype.
482         (ppc_elf_relocate_section): Modify overflow test for 16-bit
483         fields in instructions to signed/unsigned according to whether
484         the field takes a signed or unsigned value.  Tidy vle split16 code.
485         Correct R_PPC_VLE_SDA21 and R_PPC_VLE_SDA21_LO handling.
486
487 2014-03-08  Alan Modra  <amodra@gmail.com>
488
489         * elf64-ppc.c (ppc64_elf_howto_raw): Use complain_overflow_signed
490         for R_PPC64_ADDR14, R_PPC64_ADDR14_BRTAKEN, R_PPC64_ADDR14_BRNTAKEN,
491         R_PPC64_SECTOFF, R_PPC64_ADDR16_DS, R_PPC64_SECTOFF_DS,
492         R_PPC64_REL16 entries.  Use complain_overflow_dont for R_PPC64_TOC.
493         (ppc64_elf_relocate_section): Modify overflow test for 16-bit
494         fields in instructions to signed/unsigned according to whether
495         the field takes a signed or unsigned value.
496
497 2014-03-07  Pedro Alves  <palves@redhat.com>
498
499         PR gdb/16696
500         * rs6000-core.c (rs6000coff_core_p): Cast pointers to bfd_vma
501         through ptr_to_uint instead of through long.
502
503 2014-03-06  Nick Clifton  <nickc@redhat.com>
504
505         PR 16664
506         * elf-attrs.c (_bfd_elf_parse_attributes): Add checks for corrupt
507         attribute section names.
508
509 2014-03-05  Alan Modra  <amodra@gmail.com>
510
511         Update copyright years.
512
513 2014-03-05  Alan Modra  <amodra@gmail.com>
514
515         * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_ADDR64_LOCAL entry.
516         (ppc64_elf_reloc_type_lookup): Support R_PPC64_ADDR64_LOCAL.
517         (ppc64_elf_check_relocs): Likewise.
518         (ppc64_elf_relocate_section): Likewise.
519         * Add BFD_RELOC_PPC64_ADDR64_LOCAL.
520         * bfd-in2.h: Regenerate.
521         * libbfd.h: Regenerate.
522
523 2014-03-04  Heiher  <r@hev.cc>
524
525         * elfxx-mips.c (mips_set_isa_flags): Use E_MIPS_ARCH_64R2 for
526         Loongson-3A.
527         (mips_mach_extensions): Make bfd_mach_mips_loongson_3a an
528         extension of bfd_mach_mipsisa64r2.
529
530 2014-03-04  Nick Clifton  <nickc@redhat.com>
531
532         PR ld/16017
533         * elf32-arm.c (elf32_thumb2_plt0_entry): New array.
534         (elf32_thumb2_plt_entry): New array.
535         (elf32_arm_create_dynamic_sections): Set PLT entry sizes when
536         using thumb2 based PLT.
537         (elf32_arm_populate_plt_entry): Handle generating Thumb2 based PLT
538         entries.
539         (elf32_arm_final_link_relocate): Do not bias jumps to Thumb based
540         PLT entries.
541         (elf32_arm_finish_dynamic_sections): Handle creation of Thumb2
542         based PLT 0-entry.
543         (elf32_arm_output_plt_map_1): Handle creation of local symbols for
544         Thumb2 based PLT 0-entry.
545         (elf32_arm_output_arch_local_syms): Handle creation of local
546         symbols for Thumb2 based PLT entries.
547
548 2014-02-28  Alan Modra  <amodra@gmail.com>
549
550         PR ld/16643
551         * elflink.c (elf_gc_sweep): Call gc_sweep_hook for exactly
552         the same conditions we called check_relocs.
553
554 2014-02-27  Yuri Gribov  <y.gribov@samsung.com>
555
556         * bfd-in.h: Add export of bfd_elf32_arm_use_long_plt.
557         * bfd-in2.h: Regenerate.
558         * elf32-arm.c (elf32_arm_plt_entry_long): New array.
559         (elf32_arm_link_hash_table_create): Set plt_entry_size to 16 if
560         using long PLT entries.
561         (bfd_elf32_arm_use_long_plt): New function.
562         (elf32_arm_populate_plt_entry): Add support for long PLT entries.
563
564 2014-02-27  Alan Modra  <amodra@gmail.com>
565
566         * elf32-ppc.c (ppc_elf_link_hash_table_create): Provide default
567         params for targets that don't use ppc32elf.em.
568
569 2014-02-20  Chung-Lin Tang  <cltang@codesourcery.com>
570
571         * elf32-nios2.c (nios2_elf32_relocate_section): Fix calculation
572         of GOTOFF relocations.
573
574 2014-02-19  Igor Zamyatin  <igor.zamyatin@intel.com>
575             H.J. Lu  <hongjiu.lu@intel.com>
576
577         * elf64-x86-64.c (elf_x86_64_bnd_plt0_entry): New.
578         (elf_x86_64_legacy_plt_entry): Likewise.
579         (elf_x86_64_bnd_plt_entry): Likewise.
580         (elf_x86_64_legacy_plt2_entry): Likewise.
581         (elf_x86_64_bnd_plt2_entry): Likewise.
582         (elf_x86_64_bnd_arch_bed): Likewise.
583         (elf_x86_64_link_hash_entry): Add has_bnd_reloc and plt_bnd.
584         (elf_x86_64_link_hash_table): Add plt_bnd.
585         (elf_x86_64_link_hash_newfunc): Initialize has_bnd_reloc and
586         plt_bnd.
587         (elf_x86_64_copy_indirect_symbol): Also copy has_bnd_reloc.
588         (elf_x86_64_check_relocs): Create the second PLT for Intel MPX
589         in 64-bit mode.
590         (elf_x86_64_allocate_dynrelocs): Handle the second PLT for IFUNC
591         symbols.  Resolve call to the second PLT if it is created.
592         (elf_x86_64_size_dynamic_sections): Keep the second PLT section.
593         (elf_x86_64_relocate_section): Resolve PLT references to the
594         second PLT if it is created.
595         (elf_x86_64_finish_dynamic_symbol): Use BND PLT0 and fill the
596         second PLT entry for BND relocation.
597         (elf_x86_64_finish_dynamic_sections): Use MPX backend data if
598         the second PLT is created.
599         (elf_x86_64_get_synthetic_symtab): New.
600         (bfd_elf64_get_synthetic_symtab): Likewise.  Undefine for NaCl.
601
602 2014-02-19  Alan Modra  <amodra@gmail.com>
603
604         * elf64-ppc.h (struct ppc64_elf_params): Add save_restore_funcs.
605         * elf64-ppc.c (ppc64_elf_func_desc_adjust): Use it to control
606         provision of out-of-line register save/restore routines.
607
608 2014-02-18  Jack Carter  <jack.carter@imgtec.com>
609
610         * elfxx-mips.c(_bfd_mips_elf_modify_segment_map): Deleted hard coding of
611         PT_DYNAMIC segment flags.
612
613 2014-02-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
614
615         PR binutils/16595
616         * simple.c (struct saved_offsets): New.
617         (simple_save_output_info): Use it for ptr.
618         (simple_restore_output_info): Use it for ptr.  Check section_count.
619         (bfd_simple_get_relocated_section_contents): Use it for saved_offsets.
620
621 2014-02-17  Alan Modra  <amodra@gmail.com>
622
623         * elf64-ppc.h (struct ppc64_elf_params): Define.
624         (ppc64_elf_init_stub_bfd, ppc64_elf_edit_opd, ppc64_elf_tls_setup,
625         ppc64_elf_setup_section_lists, ppc64_elf_size_stubs,
626         ppc64_elf_build_stubs): Update prototype.
627         * elf64-ppp.c (struct ppc_link_hash_table): Add params, delete other
628         fields now in params.  Adjust code throughout file.
629         (ppc64_elf_init_stub_bfd): Delete "abfd" parameter, add "params".
630         Save params pointer in htab.
631         (ppc64_elf_edit_opd, ppc64_elf_tls_setup,
632         ppc64_elf_setup_section_lists, ppc64_elf_size_stubs,
633         ppc64_elf_build_stubs): Remove parameters now in "params".
634
635 2014-02-17  Alan Modra  <amodra@gmail.com>
636
637         * elf32-ppc.c (ppc_elf_relocate_section): Move relocs on insns
638         patched for ppc476 workaround.  Reapply branch taken/not taken
639         relocs.
640
641 2014-02-12  Alan Modra  <amodra@gmail.com>
642
643         * elf32-ppc.c (ppc_elf_relax_section): Don't build long-branch
644         stubs for calls to __tls_get_addr that we know will later be
645         optimised away.
646
647 2014-02-12  Alan Modra  <amodra@gmail.com>
648
649         * elf32-ppc.c (ppc_elf_relax_section): Enable ppc476 workaround
650         for ld -r, when code sections are sufficiently aligned.
651         * elf32-ppc.h (struct ppc_elf_params): Delete pagesize.  Add
652         pagesize_p2.
653
654 2014-02-12  Alan Modra  <amodra@gmail.com>
655
656         PR gold/15530
657         * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
658         --export-dynamic and --dynamic-list marking of symbols.
659         * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Reorder
660         cheap tests first.
661
662 2014-02-10  H.J. Lu  <hongjiu.lu@intel.com>
663
664         PR gold/16530
665         * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Mark symbol in
666         executables if it matches dynamic_list.
667
668 2014-02-10  Alan Modra  <amodra@gmail.com>
669
670         * po/SRC-POTFILES.in: Regenerate.
671         * po/bfd.pot: Regenerate.
672
673 2014-02-09  Alan Modra  <amodra@gmail.com>
674
675         * elf-bfd.h (struct elf_backend_data): Add caches_rawsize.
676         * elfxx-target.h (elf_backend_caches_rawsize): Define.
677         (elfNN_bed): Init new field.
678         * elflink.c (elf_link_input_bfd): Handle caches_rawsize.
679         * elf32-ppc.c (shared_stub_entry): Zero addi offset.
680         (ppc_elf_relax_section): Don't reallocate section here, write
681         stubs, or write out relocs for ld -r here..
682         (ppc_elf_relocate_section): ..instead write stubs here, and use
683         existing code to write out relocs for ld -r.  Fix offset
684         adjustment on reloc for little-endian.
685         (elf_backend_caches_rawsize): Define.
686
687 2014-02-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
688
689         PR build/16550
690         * cache.c (bfd_cache_max_open): Cast RLIM_INFINITY to rlim_t.
691
692 2014-02-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
693
694         * coff-rs6000.c (xcoff_write_archive_contents_big): Free OFFSETS in
695         return paths.  Three times.
696         * elf64-ppc.c (ppc64_elf_link_hash_table_create): Free HTAB in all
697         return paths.
698         (ppc64_elf_tls_optimize): Free TOC_REF in return path.
699         (ppc64_elf_edit_toc): Free USED in return path.
700
701 2014-02-03  Sandra Loosemore  <sandra@codesourcery.com>
702
703         * reloc.c (BFD_RELOC_NIOS2_GOT_LO, BFD_RELOC_NIOS2_GOT_HA): New.
704         (BFD_RELOC_NIOS2_CALL_LO, BFD_RELOC_NIOS2_CALL_HA): New.
705         * libbfd.h: Regenerated.
706         * bfd-in2.h: Regenerated.
707         * elf32-nios2.c (elf_nios2_howto_table_rel): Add new relocations.
708         (nios2_reloc_map): Likewise.
709         (GOT_USED, CALL_USED): Renamed from GOT16_USED and CALL16_USED.
710         Fixed all references.
711         (nios2_elf32_relocate_section): Add new relocations.
712         (nios2_elf32_check_relocs): Likewise.
713         (nios2_elf32_gc_sweep_hook): Likewise.
714
715 2014-02-03  Alan Modra  <amodra@gmail.com>
716
717         * elf32-ppc.c (struct ppc_elf_link_hash_table): Add params.
718         Delete emit_stub_syms, no_tls_get_addr_opt.  Update all uses.
719         (ppc_elf_link_params): New function.
720         (ppc_elf_create_glink): Align .glink to 64 bytes for ppc476
721         workaround.
722         (ppc_elf_select_plt_layout): Remove plt_style and emit_stub_syms
723         parameters.  Use htab->params instead.
724         (ppc_elf_tls_setup): Remove no_tls_get_addr_opt parameter.
725         (ppc_elf_size_dynamic_sections): Align __glink_PLTresolve to
726         64 bytes for ppc476 workaround.
727         (struct ppc_elf_relax_info): New.
728         (ppc_elf_relax_section): Exclude linker created sections and
729         those too small to hold one instruction.  Don't add another
730         branch  around trampolines on later relax passes.  Don't
731         generate trampolines for undefined symbols when !relocatable,
732         nor for plugin symbols.  Allocate space for ppc476 workaround
733         patch area.  Free fixups on error return path.
734         (ppc_elf_relocate_section): Handle ppc476 workaround patching.
735         * elf32-ppc.h (struct ppc_elf_params): New.
736         (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Update prototype.
737         (ppc_elf_link_params): Declare.
738         * section.c (SEC_INFO_TYPE_TARGET): Define.
739         * bfd-in2.h: Regenerate.
740
741 2014-02-02  Sandra Loosemore  <sandra@codesourcery.com>
742
743         * elf32-nios2.c (struct elf32_nios2_link_hash_table): Add
744         h_gp_got field.
745         (nios2_elf32_relocate_section): Use got_base to adjust
746         GOT-pointer-relative relocations relative to _gp_got.
747         (create_got_section): Create _gp_got symbol.
748         (nios2_elf32_finish_dynamic_symbol): Make _gp_got absolute.
749         (nios2_elf32_size_dynamic_sections): Set _gp_got offset.
750
751 2014-01-30  Sandra Loosemore  <sandra@codesourcery.com>
752
753         * bfd-in2.h: Update from reloc.c.
754         * elf32-nios2.c: Include elf32-nios2.h.
755         (elf_nios2_howto_table_rel): Add entry for R_NIOS2_CALL26_NOAT.
756         (nios2_reloc_map): Likewise.
757         (enum elf32_nios2_stub_type): Declare.
758         (struct elf32_nios2_stub_hash_entry): Declare.
759         (nios2_stub_hash_entry, nios2_stub_hash_lookup): New macros.
760         (struct elf32_nios2_link_hash_entry): Add hsh_cache field.
761         (struct elf32_nios2_link_hash_table): Add new fields bstab,
762         stub_bfd, add_stub_section, layout_sections_again, stub_group,
763         bfd_count, top_index, input_list, all_local_syms.
764         (nios2_call26_stub_entry): New.
765         (nios2_elf32_install_imm16): Move up in file.
766         (nios2_elf32_install_data): Move up in file.
767         (hiadj): Move up in file.
768         (stub_hash_newfunc): New.
769         (link_hash_newfunc): Initialize hsh_cache field.
770         (STUB_SUFFIX): New.
771         (nios2_stub_name): New.
772         (nios2_get_stub_entry): New.
773         (nios2_add_stub): New.
774         (nios2_elf32_setup_section_lists): New.
775         (nios2_elf32_next_input_section): New.
776         (CALL26_SEGMENT): New.
777         (MAX_STUB_SECTION_SIZE): New.
778         (group_sections): New.
779         (nios2_type_of_stub): New.
780         (nios2_build_one_stub): New.
781         (nios2_size_one_stub): New.
782         (get_local_syms): New.
783         (nios2_elf32_size_stubs): New.
784         (nios2_elf32_build_stubs): New.
785         (nios2_elf32_do_call26_relocate): Correct CALL26 overflow test.
786         (nios2_elf32_relocate_section): Handle R_NIOS2_CALL26_NOAT.  Add
787         trampolines for R_NIOS2_CALL26 stubs.
788         (nios2_elf32_check_relocs): Handle R_NIOS2_CALL26_NOAT.
789         (nios2_elf32_gc_sweep_hook): Likewise.
790         (nios2_elf32_link_hash_table_create): Initialize the stub hash table.
791         (nios2_elf32_link_hash_table_free): New.
792         (bfd_elf32_bfd_link_hash_table_free): Define.
793         * elf32-nios2.h: New file.
794         * libbfd.h: Update from reloc.c.
795         * reloc.c (BFD_RELOC_NIOS2_CALL26_NOAT): New.
796
797 2014-01-29  Nick Clifton  <nickc@redhat.com>
798
799         PR binutils/16318
800         * elf32-metag.c (elf_metag_post_process_headers): Call
801         _bfd_elf_post_process_headers.
802         * elf32-sh64.c (sh64_elf_copy_private_data): Call
803         _bfd_elf_copy_private_data.
804         * elf64-sh64.c (sh_elf64_copy_private_data_internal): Likewise.
805
806 2014-01-29  Nick Clifton  <nickc@redhat.com>
807
808         * bfd-in.h (bfd_set_section_vma): Delete.
809         (bfd_set_section_alignment): Delete.
810         (bfd_set_section_userdata): Delete.
811         (bfd_set_cacheable): Delete.
812         * bfd.c (bfd_set_cacheable): New static inline function.
813         * section.c (bfd_set_section_userdata): Likewise.
814         (bfd_set_section_vma): Likewise.
815         (bfd_set_section_alignment): Likewise.
816         * bfd-in2.h: Regenerate.
817
818 2014-01-28  Nick Clifton  <nickc@redhat.com>
819
820         * dwarf2.c (find_abstract_instance_name): For DW_FORM_ref_addr
821         attributes select the CU containing the abbreviation, which may not
822         be the current CU.
823
824 2014-01-24  Alan Modra  <amodra@gmail.com>
825
826         * elf64-ppc.c (ppc_build_one_stub): Correct reloc count passed
827         to get_relocs for ELFv2.
828
829 2014-01-23  H.J. Lu  <hongjiu.lu@intel.com>
830
831         PR ld/16498
832         * elf.c (_bfd_elf_map_sections_to_segments): Issue a linker error
833         if TLS sections are not adjacent.
834
835 2014-01-22  Alan Modra  <amodra@gmail.com>
836
837         * elflink.c (elf_link_add_object_symbols): Call minfo for --as-needed.
838
839 2014-01-22  Alan Modra  <amodra@gmail.com>
840
841         * elf64-ppc.c (STK_LINKER): Comment typo fix.
842
843 2014-01-21  H.J. Lu  <hongjiu.lu@intel.com>
844
845         PR ld/16467
846         * elflink.c (_bfd_elf_merge_symbol): When types of the existing
847         regular default symbol definition and the versioned dynamic
848         symbol definition mismatch, skip the default symbol definition
849         if one of them is IFUNC.
850
851 2014-01-21  H.J. Lu  <hongjiu.lu@intel.com>
852
853         PR ld/2404
854         * elflink.c (_bfd_elf_merge_symbol): Don't check info->shared,
855         info->export_dynamic nor h->ref_dynamic for type mismatch when
856         adding the default version.
857
858 2014-01-16  Alan Modra  <amodra@gmail.com>
859
860         * elfxx-mips.c (mips_elf_record_got_page_entry): Pass in a
861         mips_elf_traverse_got_arg* rather than mips_got_info*.
862         Adjust caller.  Alloc on output_bfd rather than symbol section
863         owner.
864
865 2014-01-15  H.J. Lu  <hongjiu.lu@intel.com>
866
867         * elf32-i386.c (elf_i386_allocate_dynrelocs): Revert the last
868         change.
869         * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
870
871 2014-01-14  H.J. Lu  <hongjiu.lu@intel.com>
872
873         PR ld/16428
874         * elf32-i386.c (elf_i386_allocate_dynrelocs): Don't discard relocs
875         against __ehdr_start.
876         * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
877
878 2014-01-14  H.J. Lu  <hongjiu.lu@intel.com>
879
880         * elf32-i386.c (elf_i386_allocate_dynrelocs): Revert the last
881         change.
882         * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
883
884 2014-01-14  H.J. Lu  <hongjiu.lu@intel.com>
885
886         PR ld/16428
887         * elf32-i386.c (elf_i386_allocate_dynrelocs): Don't update reloc
888         count if there are any non pc-relative relocs.
889         * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
890
891 2014-01-14  Michael Hudson-Doyle  <michael.hudson@linaro.org>
892             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
893
894         * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use correct
895         offset while calculating relocation address.
896         (elfNN_aarch64_create_small_pltn_entry): Likewise.
897         (elfNN_aarch64_init_small_plt0_entry): Likewise.
898
899 2014-01-13  Ma Jiang  <ma.jiang@zte.com.cn>
900
901         PR ld/16202
902         * elf32-arm.c (elf32_arm_final_link_relocate): Refetch addends for
903         R_ARM_ABS8 and R_ARM_ABS16.
904
905 2014-01-13  Alan Modra  <amodra@gmail.com>
906
907         * elf32-ppc.c (ppc_elf_check_relocs): For @local call to ifunc,
908         error when shared and force a plt call otherwise.
909         (ppc_elf_size_dynamic_sections): Don't emit DT_PPC_GOT unless
910         plt_type == PLT_NEW.
911         (ppc_elf_relocate_section): Add missing test to resolve ifuncs to
912         the appropriate call stub.
913
914 2014-01-10  Alan Modra  <amodra@gmail.com>
915
916         PR ld/14207
917         PR ld/16322
918         PR binutils/16323
919         * elf.c (assign_file_positions_for_load_sections): Revert last change.
920         (assign_file_positions_for_non_load_sections): When setting up
921         PT_GNU_RELRO header, don't require a corresponding PT_LOAD
922         header that completely covers the relro region.
923
924 2014-01-09  Tristan Gingold  <gingold@adacore.com>
925
926         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): use jump
927         table macros and add macros to initializa the structure.
928
929 2014-01-08  H.J. Lu  <hongjiu.lu@intel.com>
930
931         PR ld/14207
932         PR ld/16322
933         PR binutils/16323
934         * elf.c (_bfd_elf_map_sections_to_segments): Don't check section
935         size for PT_GNU_RELRO segment.
936         (assign_file_positions_for_load_sections): If PT_LOAD segment
937         doesn't fit PT_GNU_RELRO segment, adjust its p_filesz and p_memsz.
938
939 2014-01-07  Tom Tromey  <tromey@redhat.com>
940
941         * elf32-xtensa.c (vsprint_msg): Don't use old VA_* compatibility
942         wrappers.
943
944 2014-01-03  Nick Clifton  <nickc@redhat.com>
945
946         PR binutils/16199
947         * elf.c (vma_page_aligned_bias): Handle a maxpagesize value of
948         zero.
949
950 2014-01-02  Yuanhui Zhang  <asmwarrior@gmail.com>
951
952         PR binutils/14289
953         * pef.c (bfd_pef_xlib_read_header): Increase buffer size to 80.
954
955 2014-01-02  Nick Clifton  <nickc@redhat.com>
956
957         PR binutils/11983
958         * archive.c (_bfd_get_elt_at_filepos): Store a copy of the
959         filename in the bfd's filename field.
960         * elfcode.h (bfd_from_remote_memory): Likewise.
961         * ieee.c (ieee_object_p): Likewise.
962         * mach-o.c (bfd_mach_o_fat_member_init): Likewise.
963         * oasys.c (oasys_openr_next_archived_file): Likewise.
964         * vms-lib.c (_bfd_vms_lib_get_module): Likewise.
965         * opncls.c (bfd_fopen): Likewise.
966         (bfd_openstreamr): Likewise.
967         (bfd_openr_iovec): Likewise.
968         (bfd_openw): Likewise.
969         (bfd_create): Likewise.
970         (_bfd_delete_bfd): Free filename.
971
972 For older changes see ChangeLog-2013
973 \f
974 Copyright (C) 2014 Free Software Foundation, Inc.
975
976 Copying and distribution of this file, with or without modification,
977 are permitted in any medium without royalty provided the copyright
978 notice and this notice are preserved.
979
980 Local Variables:
981 mode: change-log
982 left-margin: 8
983 fill-column: 74
984 version-control: never
985 End: