ELF/BFD: Propagate the return status from backend section processing
[external/binutils.git] / bfd / ChangeLog
1 2018-02-05  Maciej W. Rozycki  <macro@mips.com>
2
3         * elf.c (_bfd_elf_write_object_contents): Propagate a failure
4         status from `->elf_backend_section_processing'.
5
6 2018-02-02  Jim Wilson  <jimw@sifive.com>
7
8         PR ld/22756
9         * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
10         If link_info->wrap_hash, check for a duplicate symbol and ignore.
11         (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
12         Pass new argument to riscv_relax_delete_bytes.
13         (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise.  Remove
14         ATTRIBUTE_UNUSED from link_info parameter.
15
16 2018-02-02  Alan Modra  <amodra@gmail.com>
17
18         * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
19         emitted for toc sequence optimization.  Set and use "howto" later.
20
21 2018-02-01  Simon Marchi  <simon.marchi@ericsson.com>
22
23         * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
24         arithmetic on NULL pointer.
25         * elflink.c (_bfd_elf_archive_symbol_lookup,
26         elf_link_add_archive_symbols): Likewise.
27
28 2018-01-31  Michael Matz  <matz@suse.de>
29
30         * elflink.c (bfd_elf_define_start_stop): Fix check of
31         def_dynamic.
32
33 2018-01-31  H.J. Lu  <hongjiu.lu@intel.com>
34
35         PR ld/21964
36         * elflink.c (bfd_elf_define_start_stop): Check if __start and
37         __stop symbols are referenced by shared objects.
38
39 2018-01-30  Alan Modra  <amodra@gmail.com>
40
41         PR 22758
42         * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
43         segment when demand paged with lma on the same page.  Test this
44         before load/non-load, executable/non-executable,
45         writable/non-writable tests and simplify.  Delete bogus relro
46         condition in writable/non-writable test.  Delete outdated
47         comment.  Formatting.
48
49 2018-01-30  Alan Modra  <amodra@gmail.com>
50
51         * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
52         symbols dynamic.
53
54 2018-01-29  Alan Modra  <amodra@gmail.com>
55
56         PR 22741
57         * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
58         range before converting to a symbol table pointer.
59
60 2018-01-27  Nick Clifton  <nickc@redhat.com>
61
62         * po/ru.po: Updated Russian translation.
63
64 2018-01-26  Alan Modra  <amodra@gmail.com>
65
66         * elflink.c (bfd_elf_define_start_stop): Override symbols when
67         they are defined dynamically.
68
69 2018-01-26  Alan Modra  <amodra@gmail.com>
70
71         * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
72         .branch_lt changes size.
73
74 2018-01-25  Alan Modra  <amodra@gmail.com>
75
76         PR 22746
77         * elfcode.h (elf_object_p): Avoid integer overflow.
78
79 2018-01-25  Eric Botcazou  <ebotcazou@adacore.com>
80
81         PR ld/22727
82         * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
83         Do a mere lookup of the __tls_get_addr symbol instead of adding it.
84
85         Revert
86         2017-10-19  H.J. Lu  <hongjiu.lu@intel.com>
87
88         PR ld/22263
89         * elfxx-sparc.c (sparc_elf_tls_transition): Replace
90         bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
91         bfd_link_executable for TLS check.
92         (_bfd_sparc_elf_check_relocs): Likewise.
93         (allocate_dynrelocs): Likewise.
94         (_bfd_sparc_elf_relocate_section): Likewise.
95
96 2018-01-24  Renlin Li  <renlin.li@arm.com>
97
98         * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
99         BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
100         BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
101         BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
102         BFD_RELOC_AARCH64_MOVW_PREL_G3.
103         * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
104         (_bfd_aarch64_elf_resolve_relocation): Likewise.
105
106 2018-01-24  Renlin Li  <renlin.li@arm.com>
107
108         * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
109         BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
110         BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
111         BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
112         * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
113         BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
114         BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
115         BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
116         BFD_RELOC_AARCH64_MOVW_PREL_G3.
117         * bfd-in2.h: Regenerate.
118         * libbfd.h: Regenerate.
119
120 2018-01-23  Maciej W. Rozycki  <macro@mips.com>
121
122         * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
123         `mips_elf32_section_processing' comment reference.
124
125 2018-01-20  H.J. Lu  <hongjiu.lu@intel.com>
126
127         PR ld/22721
128         * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
129         versioned __tls_get_addr symbol.
130
131 2018-01-19  Nick Clifton  <nickc@redhat.com>
132
133         * po/fr.po: Updated French translation.
134
135 2018-01-18  Alan Modra  <amodra@gmail.com>
136
137         * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
138         * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
139         (ppc64_elf_build_stubs): Likewise.
140
141 2018-01-17  Nick Clifton  <nickc@redhat.com>
142
143         * po/ru.po: Updated Russian translation.
144         * po/uk/po: Updated Ukranian translation.
145
146 2018-01-17  Alan Modra  <amodra@gmail.com>
147
148         * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
149
150 2018-01-17  Alan Modra  <amodra@gmail.com>
151
152         * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
153         (CRSETEQ, BEQCTRM): Define.
154         (is_nonpic_glink_stub): Don't check bctr.
155         (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
156         (ppc_elf_relax_section): Size speculation barrier.
157         (output_bctr): New function.
158         (write_glink_stub): Use output_bctr.
159         (ppc_elf_relocate_section): Use output_bctr for long branch stub.
160         (ppc_elf_finish_dynamic_symbol): Likewise.
161         (ppc_elf_finish_dynamic_sections): Use output_bctr.
162         * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
163         * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
164         (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
165         (size_global_entry_stubs): Handle speculation barrier sizing.
166         (plt_stub_size): Likewise.
167         (output_bctr): New function.
168         (build_plt_stub, build_tls_get_addr_stub): Output speculation
169         barrier.
170         (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
171         (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
172         (build_global_entry_stubs): Output speculation barrier.
173         (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
174         * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
175
176 2018-01-17  Alan Modra  <amodra@gmail.com>
177
178         * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
179         __tls_get_addr_opt, and alignment sizing.
180         (TLS_GET_ADDR_GLINK_SIZE): Delete.
181         (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
182         (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
183         or 8 insns.
184         (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
185         (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
186         (ppc_elf_size_dynamic_sections): Likewise.  Size branch table
187         by PLT reloc count.
188         (write_glink_stub): Handle __tls_get_addr_opt stub.
189         Pad out to size given by GLINK_ENTRY_SIZE.
190         (ppc_elf_relocate_section): Adjust write_glink_stub call.
191         (ppc_elf_finish_dynamic_symbol): Likewise.
192         (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
193         insn array since so many need rewriting.
194         * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
195         * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
196         GLINK_CALL_STUB_SIZE.  Add htab param and evaluate to size without
197         nops.  Adjust all uses.
198         (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
199         in glink_vma calculation.
200         (struct ppc_link_hash_table): Add global_entry section pointer.
201         (create_linkage_sections): Create separate section for global
202         entry stubs.
203         (PPC_LO, PPC_HI, PPC_HA): Move earlier.
204         (size_global_entry_stubs): Handle sizing for aligned stubs.
205         (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
206         and don't stash end of glink branch table in rawsize.
207         (ppc_build_one_stub): Rewrite stub size calculations.
208         (build_global_entry_stubs): Use new section.
209         (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
210         Build lazy link stubs out to end of section.  Build global entry
211         stubs in new section.
212
213 2018-01-15  Nick Clifton  <nickc@redhat.com>
214
215         * po/uk.po: Updated Ukranian translation.
216
217 2018-01-13  Nick Clifton  <nickc@redhat.com>
218
219         * po/bfd.pot: Regenerated.
220
221 2018-01-13  Nick Clifton  <nickc@redhat.com>
222
223         * version.m4: Bump version to 2.30.51
224         * configure: Regenerate.
225
226 2018-01-13  Nick Clifton  <nickc@redhat.com>
227
228         2.30 branch created.
229
230 2018-01-12  Jens Widell  <jl@opera.com>
231
232         * elf.c (setup_group): Optimize search for group by remembering
233         last found group and restarting search at that index.
234         * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
235
236 2018-01-12  Gunther Nikl  <gnikl@users.sourceforge.net>
237
238         * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
239         bfd_link_common_skip_none in switch.
240
241 2018-01-12  Alan Modra  <amodra@gmail.com>
242
243         PR ld/22649
244         * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
245         references on forced local symbols.
246
247 2018-01-12  Vlad Ivanov  <vlad@ivanov.email>
248
249         * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
250         .reginfo section has wrong size.
251
252 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
253
254         PR ld/22393
255         * elf.c (_bfd_elf_map_sections_to_segments): When generating
256         separate code and read-only data LOAD segments, create a new
257         LOAD segment if the previous section contains text and the
258         current section doesn't or vice versa.  Don't put a writable
259         section in a read-only segment if there is a RELRO segment.
260
261 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
262
263         PR ld/22649
264         * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
265         references on forced local symbols.
266
267 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
268
269         PR ld/22677
270         * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
271         INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
272
273 2017-09-27  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
274
275         PR 22662
276         * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
277
278 2018-01-03  John Baldwin  <jhb@FreeBSD.org>
279
280         * elf.c (elfcore_grok_freebsd_note): Handle
281         NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
282         NT_FREEBSD_PROCSTAT_VMMAP.
283
284 2018-01-03  Alan Modra  <amodra@gmail.com>
285
286         Update year range in copyright notice of all files.
287
288 For older changes see ChangeLog-2017
289 \f
290 Copyright (C) 2018 Free Software Foundation, Inc.
291
292 Copying and distribution of this file, with or without modification,
293 are permitted in any medium without royalty provided the copyright
294 notice and this notice are preserved.
295
296 Local Variables:
297 mode: change-log
298 left-margin: 8
299 fill-column: 74
300 version-control: never
301 End: