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