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