Automatic date update in version.in
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
6e8d06db
JD
12018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
2
3 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
4
b248d650
MR
52018-02-19 Maciej W. Rozycki <macro@mips.com>
6
7 Revert
8 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
9
10 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
11 .reginfo section has wrong size.
12
6798f8bf
MR
132018-02-19 Maciej W. Rozycki <macro@mips.com>
14
15 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
16 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
17 `.MIPS.abiflags' sections.
18 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
19 section's end.
20
8772de11
MR
212018-02-19 Maciej W. Rozycki <macro@mips.com>
22
23 * section.c (SEC_FIXED_SIZE): New macro.
24 * bfd-in2.h: Regenerate.
25
4f7fd351
MR
262018-02-19 Maciej W. Rozycki <macro@mips.com>
27
28 * section.c (SEC_HAS_GOT_REF): Remove macro.
29 * bfd-in2.h: Regenerate.
30
f2b740ac
AM
312018-02-19 Alan Modra <amodra@gmail.com>
32
33 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
34 arguments.
35 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
36 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
37 (_bfd_riscv_relax_pc): Likewise and fix typos.
38 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
39 * libbfd.h: Regenerate.
40
8979927a
AM
412018-02-19 Alan Modra <amodra@gmail.com>
42
43 * dwarf2.c (read_section): Don't use 'll' format modifier.
44 (find_abstract_instance): Likewise.
45 * elfcore.h (elf_core_file_p): Likewise.
46
2dcf00ce
AM
472018-02-19 Alan Modra <amodra@gmail.com>
48
49 * bfd-in.h: Include inttypes.h or if not available define
50 PRId64, PRIu64 and PRIx64.
51 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
52 modifier to print bfd_vma.
53 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
54 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
55 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
56 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
57 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
58 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
59 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
60 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
61 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
62 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
63 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
64 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
65 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
66 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
67 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
68 and cast input to uint64_t, and similarly for Ld and Lu.
69 * bfd-in2.h: Regenerate.
70
c1c8c1ef
AM
712018-02-19 Alan Modra <amodra@gmail.com>
72
73 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
74 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
75 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
76 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
77 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
78 * reloc.c: Replace use of %R and %T in format strings passed to
79 einfo and friends by %pR and %pT.
80
871b3ab2
AM
812018-02-19 Alan Modra <amodra@gmail.com>
82
83 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
84 of %A and %B.
85 * aout-adobe.c: Update all messages using %A and %B.
86 * aout-cris.c: Likewise.
87 * aoutx.h: Likewise.
88 * archive.c: Likewise.
89 * binary.c: Likewise.
90 * cache.c: Likewise.
91 * coff-alpha.c: Likewise.
92 * coff-arm.c: Likewise.
93 * coff-i860.c: Likewise.
94 * coff-mcore.c: Likewise.
95 * coff-ppc.c: Likewise.
96 * coff-rs6000.c: Likewise.
97 * coff-sh.c: Likewise.
98 * coff-tic4x.c: Likewise.
99 * coff-tic54x.c: Likewise.
100 * coff-tic80.c: Likewise.
101 * coff64-rs6000.c: Likewise.
102 * coffcode.h: Likewise.
103 * coffgen.c: Likewise.
104 * cofflink.c: Likewise.
105 * coffswap.h: Likewise.
106 * compress.c: Likewise.
107 * cpu-arm.c: Likewise.
108 * ecoff.c: Likewise.
109 * elf-attrs.c: Likewise.
110 * elf-eh-frame.c: Likewise.
111 * elf-ifunc.c: Likewise.
112 * elf-m10300.c: Likewise.
113 * elf-properties.c: Likewise.
114 * elf-s390-common.c: Likewise.
115 * elf.c: Likewise.
116 * elf32-arc.c: Likewise.
117 * elf32-arm.c: Likewise.
118 * elf32-avr.c: Likewise.
119 * elf32-bfin.c: Likewise.
120 * elf32-cr16.c: Likewise.
121 * elf32-cr16c.c: Likewise.
122 * elf32-cris.c: Likewise.
123 * elf32-crx.c: Likewise.
124 * elf32-d10v.c: Likewise.
125 * elf32-d30v.c: Likewise.
126 * elf32-epiphany.c: Likewise.
127 * elf32-fr30.c: Likewise.
128 * elf32-frv.c: Likewise.
129 * elf32-gen.c: Likewise.
130 * elf32-hppa.c: Likewise.
131 * elf32-i370.c: Likewise.
132 * elf32-i386.c: Likewise.
133 * elf32-i960.c: Likewise.
134 * elf32-ip2k.c: Likewise.
135 * elf32-iq2000.c: Likewise.
136 * elf32-lm32.c: Likewise.
137 * elf32-m32c.c: Likewise.
138 * elf32-m32r.c: Likewise.
139 * elf32-m68hc11.c: Likewise.
140 * elf32-m68hc12.c: Likewise.
141 * elf32-m68hc1x.c: Likewise.
142 * elf32-m68k.c: Likewise.
143 * elf32-mcore.c: Likewise.
144 * elf32-mep.c: Likewise.
145 * elf32-metag.c: Likewise.
146 * elf32-microblaze.c: Likewise.
147 * elf32-moxie.c: Likewise.
148 * elf32-msp430.c: Likewise.
149 * elf32-mt.c: Likewise.
150 * elf32-nds32.c: Likewise.
151 * elf32-nios2.c: Likewise.
152 * elf32-or1k.c: Likewise.
153 * elf32-pj.c: Likewise.
154 * elf32-ppc.c: Likewise.
155 * elf32-rl78.c: Likewise.
156 * elf32-rx.c: Likewise.
157 * elf32-s390.c: Likewise.
158 * elf32-score.c: Likewise.
159 * elf32-score7.c: Likewise.
160 * elf32-sh-symbian.c: Likewise.
161 * elf32-sh.c: Likewise.
162 * elf32-sh64.c: Likewise.
163 * elf32-sparc.c: Likewise.
164 * elf32-spu.c: Likewise.
165 * elf32-tic6x.c: Likewise.
166 * elf32-tilepro.c: Likewise.
167 * elf32-v850.c: Likewise.
168 * elf32-vax.c: Likewise.
169 * elf32-visium.c: Likewise.
170 * elf32-wasm32.c: Likewise.
171 * elf32-xgate.c: Likewise.
172 * elf32-xtensa.c: Likewise.
173 * elf64-alpha.c: Likewise.
174 * elf64-gen.c: Likewise.
175 * elf64-hppa.c: Likewise.
176 * elf64-ia64-vms.c: Likewise.
177 * elf64-mmix.c: Likewise.
178 * elf64-ppc.c: Likewise.
179 * elf64-s390.c: Likewise.
180 * elf64-sh64.c: Likewise.
181 * elf64-sparc.c: Likewise.
182 * elf64-x86-64.c: Likewise.
183 * elfcode.h: Likewise.
184 * elfcore.h: Likewise.
185 * elflink.c: Likewise.
186 * elfnn-aarch64.c: Likewise.
187 * elfnn-ia64.c: Likewise.
188 * elfnn-riscv.c: Likewise.
189 * elfxx-mips.c: Likewise.
190 * elfxx-sparc.c: Likewise.
191 * elfxx-tilegx.c: Likewise.
192 * elfxx-x86.c: Likewise.
193 * hpux-core.c: Likewise.
194 * ieee.c: Likewise.
195 * ihex.c: Likewise.
196 * libbfd.c: Likewise.
197 * linker.c: Likewise.
198 * mach-o.c: Likewise.
199 * merge.c: Likewise.
200 * mmo.c: Likewise.
201 * oasys.c: Likewise.
202 * pdp11.c: Likewise.
203 * pe-mips.c: Likewise.
204 * peXXigen.c: Likewise.
205 * peicode.h: Likewise.
206 * reloc.c: Likewise.
207 * rs6000-core.c: Likewise.
208 * srec.c: Likewise.
209 * stabs.c: Likewise.
210 * vms-alpha.c: Likewise.
211 * xcofflink.c: Likewise.
212
dbc88fc1
AM
2132018-02-19 Alan Modra <amodra@gmail.com>
214
215 PR 22845
216 * elf.c (IS_TBSS): Define.
217 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
218 (assign_file_positions_for_non_load_sections): Revert last change.
219 Properly calculate load segment limits to compare against relro limits.
220
325ba6fb
AM
2212018-02-17 Alan Modra <amodra@gmail.com>
222
223 PR 22845
224 * elf.c (assign_file_positions_for_non_load_sections): Ignore
225 degenerate zero size PT_LOAD segments when finding one overlapping
226 the PT_GNU_RELRO segment.
227
d00dd7dc
AM
2282018-02-16 Alan Modra <amodra@gmail.com>
229
230 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
231 (_bfd_bool_bfd_true): Rename from bfd_true.
232 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
233 (_bfd_int_bfd_0): Rename from bfd_0.
234 (_bfd_uint_bfd_0): Rename from bfd_0u.
235 (_bfd_long_bfd_0): Rename from bfd_0l.
236 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
237 (_bfd_void_bfd): Rename from bfd_void.
238 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
239 (_bfd_bool_bfd_link_false_error),
240 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
241 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
242 (_bfd_bool_bfd_asection_bfd_asection_true),
243 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
244 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
245 * archive.c (_bfd_noarchive_get_elt_at_index),
246 (_bfd_noarchive_openr_next_archived_file),
247 (_bfd_noarchive_construct_extended_name_table),
248 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
249 (_bfd_noarchive_write_armap): New functions.
250 * archures.c (_bfd_nowrite_set_arch_mach): New function.
251 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
252 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
253 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
254 (alpha_ecoff_swap_coff_lineno_out),
255 (alpha_ecoff_swap_coff_reloc_out): New functions.
256 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
257 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
258 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
259 (mips_ecoff_swap_coff_lineno_out),
260 (mips_ecoff_swap_coff_reloc_out): New functions.
261 * coffcode.h (coff_set_alignment_hook): Replace define with
262 new function.
263 (symname_in_debug_hook): Likewise.
264 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
265 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
266 * elf.c (assign_file_positions_except_relocs): Test
267 elf_backend_allow_non_load_phdr for NULL.
268 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
269 _bfd_elf_link_omit_section_dynsym. Update uses.
270 (_bfd_elf_omit_section_dynsym_all): New function.
271 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
272 (_bfd_elf_omit_section_dynsym_default): Declare.
273 (_bfd_elf_omit_section_dynsym_all): Declare.
274 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
275 (_bfd_nolink_bfd_get_relocated_section_contents),
276 (_bfd_nolink_bfd_lookup_section_flags),
277 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
278 (_bfd_nolink_bfd_link_hash_table_create),
279 (_bfd_nolink_bfd_link_just_syms),
280 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
281 (_bfd_nolink_bfd_link_split_section),
282 (_bfd_nolink_section_already_linked),
283 (_bfd_nolink_bfd_define_common_symbol),
284 (_bfd_nolink_bfd_define_start_stop): New functions.
285 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
286 (_bfd_norelocs_bfd_reloc_name_lookup),
287 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
288 * section.c (_bfd_nowrite_set_section_contents): New function.
289 * syms.c (_bfd_nosymbols_canonicalize_symtab),
290 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
291 (_bfd_nosymbols_get_symbol_version_string),
292 (_bfd_nosymbols_bfd_is_local_label_name),
293 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
294 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
295 (_bfd_nosymbols_bfd_make_debug_symbol),
296 ( _bfd_nosymbols_read_minisymbols),
297 ( _bfd_nosymbols_minisymbol_to_symbol),
298 (_bfd_nodynamic_get_synthetic_symtab): New functions.
299 * libbfd-in.h: Declare new functions. Update existing defines,
300 removing casts.
301 * aix386-core.c: Update to use new hooks. Formatting.
302 * aout-adobe.c: Likewise.
303 * aout-arm.c: Likewise.
304 * aout-target.h: Likewise.
305 * aout-tic30.c: Likewise.
306 * aoutf1.h: Likewise.
307 * binary.c: Likewise.
308 * bout.c: Likewise.
309 * cisco-core.c: Likewise.
310 * coff-alpha.c: Likewise.
311 * coff-i386.c: Likewise.
312 * coff-i860.c: Likewise.
313 * coff-i960.c: Likewise.
314 * coff-ia64.c: Likewise.
315 * coff-mips.c: Likewise.
316 * coff-ppc.c: Likewise.
317 * coff-rs6000.c: Likewise.
318 * coff-sh.c: Likewise.
319 * coff-tic30.c: Likewise.
320 * coff-tic54x.c: Likewise.
321 * coff-x86_64.c: Likewise.
322 * coff64-rs6000.c: Likewise.
323 * coffcode.h: Likewise.
324 * elf-m10300.c: Likewise.
325 * elf32-cr16.c: Likewise.
326 * elf32-lm32.c: Likewise.
327 * elf32-m32r.c: Likewise.
328 * elf32-metag.c: Likewise.
329 * elf32-score.c: Likewise.
330 * elf32-score7.c: Likewise.
331 * elf32-tilepro.c: Likewise.
332 * elf32-xstormy16.c: Likewise.
333 * elf32-xtensa.c: Likewise.
334 * elf64-alpha.c: Likewise.
335 * elf64-hppa.c: Likewise.
336 * elf64-ia64-vms.c: Likewise.
337 * elf64-mmix.c: Likewise.
338 * elf64-sh64.c: Likewise.
339 * elfnn-ia64.c: Likewise.
340 * elfxx-sparc.c: Likewise.
341 * elfxx-target.h: Likewise.
342 * elfxx-tilegx.c: Likewise.
343 * elfxx-x86.h: Likewise.
344 * hp300hpux.c: Likewise.
345 * hppabsd-core.c: Likewise.
346 * hpux-core.c: Likewise.
347 * i386msdos.c: Likewise.
348 * i386os9k.c: Likewise.
349 * ieee.c: Likewise.
350 * ihex.c: Likewise.
351 * irix-core.c: Likewise.
352 * libaout.h: Likewise.
353 * libecoff.h: Likewise.
354 * mach-o-target.c: Likewise.
355 * mach-o.c: Likewise.
356 * mipsbsd.c: Likewise.
357 * mmo.c: Likewise.
358 * netbsd-core.c: Likewise.
359 * nlm-target.h: Likewise.
360 * oasys.c: Likewise.
361 * osf-core.c: Likewise.
362 * pdp11.c: Likewise.
363 * pe-mips.c: Likewise.
364 * pe-x86_64.c: Likewise.
365 * pef.c: Likewise.
366 * plugin.c: Likewise.
367 * ppcboot.c: Likewise.
368 * ptrace-core.c: Likewise.
369 * sco5-core.c: Likewise.
370 * som.c: Likewise.
371 * sparclynx.c: Likewise.
372 * srec.c: Likewise.
373 * tekhex.c: Likewise.
374 * trad-core.c: Likewise.
375 * verilog.c: Likewise.
376 * versados.c: Likewise.
377 * vms-alpha.c: Likewise.
378 * vms-lib.c: Likewise.
379 * wasm-module.c: Likewise.
380 * xsym.c: Likewise.
381 * libbfd.h: Regenerate.
382
2a0d9853
JW
3832018-02-15 Jim Wilson <jimw@sifive.com>
384
09ca4b9d
JW
385 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
386 symbols whose section address is zero.
387
2a0d9853
JW
388 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
389 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
390 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
391 Add %X%P to error messages.
392
e513bd38
EB
3932018-02-15 Eric Botcazou <ebotcazou@adacore.com>
394
395 PR ld/22832
396 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
397 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
398 and assert that the result of the call is not NULL.
399
12ef3f5a
NC
4002018-02-14 Nick Clifton <nickc@redhat.com>
401
402 PR 22823
403 Revert previous delta. Add extra casts to avoid compile time
404 warnings instead.
405 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
406 cast to avoid warning from gcc v8 compiler.
407 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
408 (_bfd_generic_bfd_set_private_flags): Likewise.
409 (_bfd_generic_bfd_copy_private_section_data): Likewise.
410 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
411 (_bfd_generic_bfd_copy_private_header_data): Likewise.
412 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
413 (_bfd_noarchive_construct_extended_name_table): Likewise.
414 (_bfd_noarchive_truncate_arname): Likewise.
415 (_bfd_noarchive_write_ar_hdr): Likewise.
416 (_bfd_noarchive_get_elt_at_index): Likewise.
417 (_bfd_nosymbols_canonicalize_symtab): Likewise.
418 (_bfd_nosymbols_print_symbol): Likewise.
419 (_bfd_nosymbols_get_symbol_info): Likewise.
420 (_bfd_nosymbols_get_symbol_version_string): Likewise.
421 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
422 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
423 (_bfd_nosymbols_get_lineno): Likewise.
424 (_bfd_nosymbols_find_nearest_line): Likewise.
425 (_bfd_nosymbols_find_line): Likewise.
426 (_bfd_nosymbols_find_inliner_info): Likewise.
427 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
428 (_bfd_nosymbols_read_minisymbols): Likewise.
429 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
430 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
431 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
432 (_bfd_nowrite_set_arch_mach): Likewise.
433 (_bfd_nowrite_set_section_contents): Likewise.
434 (_bfd_nolink_sizeof_headers): Likewise.
435 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
436 (_bfd_nolink_bfd_relax_section): Likewise.
437 (_bfd_nolink_bfd_gc_sections): Likewise.
438 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
439 (_bfd_nolink_bfd_merge_sections): Likewise.
440 (_bfd_nolink_bfd_is_group_section): Likewise.
441 (_bfd_nolink_bfd_discard_group): Likewise.
442 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
443 (_bfd_nolink_bfd_link_add_symbols): Likewise.
444 (_bfd_nolink_bfd_link_just_syms): Likewise.
445 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
446 (_bfd_nolink_bfd_final_link): Likewise.
447 (_bfd_nolink_bfd_link_split_section): Likewise.
448 (_bfd_nolink_section_already_linked): Likewise.
449 (_bfd_nolink_bfd_define_common_symbol): Likewise.
450 (_bfd_nolink_bfd_define_start_stop): Likewise.
451 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
452 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
453 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
454 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
455 * libbfd.c (bfd_false_any): Delete.
456 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
457 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
458 * libbfd.h (extern): Regenerate
459 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
460 cast to avoid warning from gcc v8 compiler.
461 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
462 * binary.c (binary_get_symbol_info): Likewise.
463 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
464 * coff-mips.c (mips_ecoff_backend_data): Likewise.
465 * coffcode.h (coff_set_alignment_hook): Likewise.
466 (symname_in_debug_hook): Likewise.
467 (bfd_coff_backend_data bigobj_swap_table): Likewise.
468 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
469 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
470 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
471 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
472 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
473 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
474 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
475 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
476 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
477 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
478 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
479 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
480 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
481 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
482 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
483 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
484 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
485 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
486 (bfd_elfNN_bfd_set_private_flags): Likewise.
487 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
488 (elf_backend_init_index_section): Likewise.
489 (elf_backend_allow_non_load_phdr): Likewise.
490 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
491 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
492 * ieee.c (ieee_construct_extended_name_table): Likewise.
493 (ieee_write_armap): Likewise.
494 (ieee_write_ar_hdr): Likewise.
495 (ieee_bfd_is_target_special_symbol): Likewise.
496 * ihex.c (ihex_canonicalize_symtab): Likewise.
497 (ihex_bfd_is_target_special_symbol): Likewise.
498 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
499 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
500 (_bfd_ecoff_set_alignment_hook): Likewise.
501 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
502 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
503 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
504 * oasys.c (oasys_construct_extended_name_table): Likewise.
505 (oasys_write_armap): Likewise.
506 (oasys_write_ar_hdr): Likewise.
507 (oasys_bfd_is_target_special_symbol): Likewise.
508 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
509 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
510 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
511 * som.c (som_bfd_is_target_special_symbol): Likewise.
512 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
513 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
514 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
515 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
516 (versados_bfd_reloc_name_lookup): Likewise.
517 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
518 (vms_bfd_define_start_stop): Likewise.
519 (alpha_vms_bfd_is_target_special_symbol): Likewise.
520 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
521 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
522
451875b4
L
5232018-02-14 H.J. Lu <hongjiu.lu@intel.com>
524
525 PR ld/22842
526 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
527 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
528 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
529 R_X86_64_PC32 reloc against dynamic function in data section.
530 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
531 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
532 against dynamic function in data section.
533 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
534 function address only if pcrel_plt is true.
535 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
536 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
537 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
538 PC-relative relocation against a function definition in data
539 secton in PIE. Remove the obsolete comments.
540 (elf_x86_link_hash_table): Add pcrel_plt.
541
1031c264
L
5422018-02-13 H.J. Lu <hongjiu.lu@intel.com>
543
544 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
545 instead of bfd_link_pic, for building shared library.
546
bd7ab16b
L
5472018-02-13 H.J. Lu <hongjiu.lu@intel.com>
548
549 PR gas/22791
550 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
551 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
552 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
553 against protected function in shared object.
554
80c96350
ST
5552018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
556
557 PR 22828
558 * po/ru.po: Fix typo in Russian translation.
559
87993319
MR
5602018-02-13 Maciej W. Rozycki <macro@mips.com>
561
562 * wasm-module.c (wasm_scan_name_function_section): Rename
563 `index' local variable to `idx'.
564
68d20676
NC
5652018-02-13 Nick Clifton <nickc@redhat.com>
566
567 PR 22823
568 Fix compile time warnings generated by gcc version 8.
569 * libbfd-in.h: Remove extraneous text from prototypes.
570 Add prototypes for bfd_false_any, bfd_true_any,
571 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
572 bfd_n1_any, bfd_void_any.
573 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
574 function.
575 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
576 (_bfd_generic_bfd_set_private_flags): Likewise.
577 (_bfd_generic_bfd_copy_private_section_data): Likewise.
578 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
579 (_bfd_generic_bfd_copy_private_header_data): Likewise.
580 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
581 (_bfd_noarchive_construct_extended_name_table): Likewise.
582 (_bfd_noarchive_truncate_arname): Likewise.
583 (_bfd_noarchive_write_ar_hdr): Likewise.
584 (_bfd_noarchive_get_elt_at_index): Likewise.
585 (_bfd_nosymbols_canonicalize_symtab): Likewise.
586 (_bfd_nosymbols_print_symbol): Likewise.
587 (_bfd_nosymbols_get_symbol_info): Likewise.
588 (_bfd_nosymbols_get_symbol_version_string): Likewise.
589 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
590 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
591 (_bfd_nosymbols_get_lineno): Likewise.
592 (_bfd_nosymbols_find_nearest_line): Likewise.
593 (_bfd_nosymbols_find_line): Likewise.
594 (_bfd_nosymbols_find_inliner_info): Likewise.
595 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
596 (_bfd_nosymbols_read_minisymbols): Likewise.
597 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
598 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
599 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
600 (_bfd_nowrite_set_arch_mach): Likewise.
601 (_bfd_nowrite_set_section_contents): Likewise.
602 (_bfd_nolink_sizeof_headers): Likewise.
603 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
604 (_bfd_nolink_bfd_relax_section): Likewise.
605 (_bfd_nolink_bfd_gc_sections): Likewise.
606 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
607 (_bfd_nolink_bfd_merge_sections): Likewise.
608 (_bfd_nolink_bfd_is_group_section): Likewise.
609 (_bfd_nolink_bfd_discard_group): Likewise.
610 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
611 (_bfd_nolink_bfd_link_add_symbols): Likewise.
612 (_bfd_nolink_bfd_link_just_syms): Likewise.
613 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
614 (_bfd_nolink_bfd_final_link): Likewise.
615 (_bfd_nolink_bfd_link_split_section): Likewise.
616 (_bfd_nolink_section_already_linked): Likewise.
617 (_bfd_nolink_bfd_define_common_symbol): Likewise.
618 (_bfd_nolink_bfd_define_start_stop): Likewise.
619 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
620 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
621 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
622 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
623 * libbfd.c (bfd_false_any): New function. Like bfd_false but
624 accepts one or more arguments.
625 (bfd_true_any): Likewise.
626 (bfd_nullvoidptr_any): Likewise.
627 (bfd_0_any): Likewise.
628 (bfd_0u_any): Likewise.
629 (bfd_0l_any): Likewise.
630 (_bfd_n1_any): Likewise.
631 (bfd_void_any): Likewise.
632 * libbfd.h (extern): Regenerate
633 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
634 based dummy function.
635 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
636 * binary.c (binary_get_symbol_info): Likewise.
637 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
638 * coff-mips.c (mips_ecoff_backend_data): Likewise.
639 * coffcode.h (coff_set_alignment_hook): Likewise.
640 (symname_in_debug_hook): Likewise.
641 (bfd_coff_backend_data bigobj_swap_table): Likewise.
642 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
643 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
644 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
645 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
646 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
647 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
648 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
649 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
650 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
651 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
652 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
653 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
654 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
655 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
656 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
657 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
658 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
659 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
660 (bfd_elfNN_bfd_set_private_flags): Likewise.
661 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
662 (elf_backend_init_index_section): Likewise.
663 (elf_backend_allow_non_load_phdr): Likewise.
664 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
665 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
666 * ieee.c (ieee_construct_extended_name_table): Likewise.
667 (ieee_write_armap): Likewise.
668 (ieee_write_ar_hdr): Likewise.
669 (ieee_bfd_is_target_special_symbol): Likewise.
670 * ihex.c (ihex_canonicalize_symtab): Likewise.
671 (ihex_bfd_is_target_special_symbol): Likewise.
672 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
673 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
674 (_bfd_ecoff_set_alignment_hook): Likewise.
675 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
676 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
677 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
678 * oasys.c (oasys_construct_extended_name_table): Likewise.
679 (oasys_write_armap): Likewise.
680 (oasys_write_ar_hdr): Likewise.
681 (oasys_bfd_is_target_special_symbol): Likewise.
682 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
683 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
684 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
685 * som.c (som_bfd_is_target_special_symbol): Likewise.
686 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
687 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
688 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
689 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
690 (versados_bfd_reloc_name_lookup): Likewise.
691 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
692 (vms_bfd_define_start_stop): Likewise.
693 (alpha_vms_bfd_is_target_special_symbol): Likewise.
694 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
695 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
696 * elf32-arc.c (get_replace_function): Assign replacement function
697 to func pointer.
698 * elf32-i370.c (i370_noop): Update prototype.
699
6e5e9d58
AM
7002018-02-13 Alan Modra <amodra@gmail.com>
701
702 PR 22836
703 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
704 relocation sections. If size reduces to just the flag word,
705 remove that too and mark with SEC_EXCLUDE.
706 * elflink.c (bfd_elf_final_link): Strip empty group sections.
707
f2731e0c
AM
7082018-02-13 Alan Modra <amodra@gmail.com>
709
710 PR 22829
711 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
712 PT_GNU_RELRO setup.
713
830db048
ZF
7142018-02-12 Zebediah Figura <z.figura12@gmail.com>
715
716 * i386msdos.c (msdos_mkobject); New function.
717 (msdos_object_p): New function.
718 (i386_msdos_vec): Use msdos_object_p as the check_format
719 function.
720 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
721 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
722 IMAGE_NT_SIGNATURE.
723 * peXXigen.c: Likewise.
724 * coff-ia64.c: Likewise.
725
94fe5757
NC
7262018-02-12 Nick Clifton <nickc@redhat.com>
727
728 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
729 assignment.
0b8683b7 730 * elf32-arc.c (elf_arc_relocate_section): Likewise.
94fe5757 731
d805612e 7322018-02-09 Eric Botcazou <ebotcazou@adacore.com>
a8735c82
EB
733
734 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
735 (sparc_elf_append_rela): Assert that there is enough room in section.
736 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
737 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
738 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
739 For a symbol subject to a GOT relocation, reserve a slot in the
740 relocation section if the symbol isn't dynamic and we are in PIC mode.
741 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
742 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
743 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
744 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
745 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
746 resolved_to_zero. Do not generate a dynamic GOT relocation for an
747 undefined weak symbol with non-default visibility. Remove superfluous
748 'else' and fix formatting.
749
3b4c3844
L
7502018-02-09 H.J. Lu <hongjiu.lu@intel.com>
751
752 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
753 is_solaris.
754 (i386_elf32_sol2_vec): Don't declare.
755 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
756 Don't set need_global_offset_table.
757 (elf_i386_solaris_arch_bed): New.
758 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
759 Solaris.
760 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
761 target_os != is_nacl instead of target_os == is_normal.
762 (x86_64_elf64_sol2_vec): Don't declare.
763 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
764 is_nacl instead of target_os == is_normal. Don't set
765 need_global_offset_table.
766 (elf_x86_64_solaris_arch_bed): New.
767 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
768 Solaris.
769 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
770 _GLOBAL_OFFSET_TABLE_ for Solaris.
771 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
772 need_global_offset_table.
773 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
774 (elf_x86_link_hash_table): Remove need_global_offset_table.
775 (elf_x86_init_table): Likewise.
776
15b23f36
L
7772018-02-08 H.J. Lu <hongjiu.lu@intel.com>
778
779 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
780 Remove prototype.
781 (i386_elf32_sol2_vec): Declared.
782 (elf_i386_link_setup_gnu_properties): Set
783 need_global_offset_table with info->output_bfd->xvec.
784 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
785 Remove prototype.
786 (x86_64_elf64_sol2_vec): Declared.
787 (elf_x86_64_link_setup_gnu_properties): Set
788 need_global_offset_table with info->output_bfd->xvec.
789
dc11dea2
L
7902018-02-08 H.J. Lu <hongjiu.lu@intel.com>
791
792 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
793 New prototype.
794 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
795 for Solaris.
796 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
797 New prototype.
798 (elf_x86_64_link_setup_gnu_properties): Set
799 need_global_offset_table for Solaris.
800 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
801 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
802 (_bfd_x86_elf_link_setup_gnu_properties): Copy
803 need_global_offset_table.
804 * elfxx-x86.h (elf_x86_link_hash_table): Add
805 need_global_offset_table.
806 (elf_x86_init_table): Likewise.
807
3f48fe4a
JW
8082018-02-08 Jim Wilson <jimw@sifive.com>
809
810 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
811 change.
812
ef135d43
NC
8132018-02-08 Nick Clifton <nickc@redhat.com>
814
815 PR 22788
816 * elf.c (elf_parse_notes): Reject notes with excessuively large
817 alignments.
818
407aa07c
AM
8192018-02-07 Alan Modra <amodra@gmail.com>
820
821 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
822 * elf32-ppc.c: Remove speculation barrier support.
823 * elf32-ppc.h: Likewise.
824 * elf64-ppc.c: Likewise.
825 * elf64-ppc.h: Likewise.
826
ed01220c
JW
8272018-02-06 Jim Wilson <jimw@sifive.com>
828
829 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
830 callback to report an error.
831
c20c30f6
EB
8322018-02-06 Eric Botcazou <ebotcazou@adacore.com>
833
834 PR ld/22263
835 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
836 into call to !bfd_link_executable and tidy up.
837 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
838 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
839 !bfd_link_executable.
840 <R_SPARC_TLS_IE_HI22>: Likewise.
841 <GOT relocations>: Remove useless code, tidy and merge related blocks.
842 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
843 !bfd_link_executable.
844 <R_SPARC_WPLT30>: Tidy up.
845 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
846 !bfd_link_executable.
847 (allocate_dynrelocs): Likewise.
848 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
849 <R_SPARC_TLS_GD_HI22>: Merge into...
850 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
851 sparc_elf_tls_transition and remove redundant code.
852 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
853 !bfd_link_executable.
854 <R_SPARC_TLS_LDO_HIX22>: Likewise.
855 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
856 <R_SPARC_TLS_LDM_CALL>: Likewise.
857 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
858 <R_SPARC_TLS_GD_ADD>: Likewise.
859 <R_SPARC_TLS_LDM_ADD>: Likewise.
860 <R_SPARC_TLS_LDO_ADD>: Likewise.
861 <R_SPARC_TLS_IE_LD>: Likewise.
862
46d09186
NC
8632018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
864
865 PR 22789
866 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
867 functions failed to find the function name, try the generic elf
868 find function instead.
869
8278e7ce
SDJ
8702018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
871
872 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
873 'memcpy' instead of 'strncpy' when writing the magic number.
874
64e234d4
NC
8752018-02-06 Nick Clifton <nickc@redhat.com>
876
877 PR 22794
878 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
879 section before attempting to read it in.
880 (bfd_get_alt_debug_link_info): Likewise.
881
422f3d3d
PC
8822018-02-06 Paul Carroll <pcarroll@codesourcery.com>
883
884 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
885 line information in addition to name, if they can be found.
886
279b2f94
RL
8872018-02-05 Renlin Li <renlin.li@arm.com>
888
889 PR ld/22764
890 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
891 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
892 check for writeable section as well.
893
cd048363
L
8942018-02-05 H.J. Lu <hongjiu.lu@intel.com>
895
896 PR ld/22782
897 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
898 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
899 undefined weak symbol to 0.
900 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
901 if _GLOBAL_OFFSET_TABLE_ is referenced.
902 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
903 got_referenced instead of ref_regular_nonweak. Remove the
904 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
905 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
906
e65b1a78
MR
9072018-02-05 Maciej W. Rozycki <macro@mips.com>
908
909 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
910 initialize `hi_reloc'.
911
2d6dda71
MR
9122018-02-05 Maciej W. Rozycki <macro@mips.com>
913
914 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
915 SHT_MIPS_REGINFO sections don't assert the correct size and
916 report an error instead.
917
75506100
MR
9182018-02-05 Maciej W. Rozycki <macro@mips.com>
919
920 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
921 status from `->elf_backend_section_processing'.
922
7f02625e
JW
9232018-02-02 Jim Wilson <jimw@sifive.com>
924
925 PR ld/22756
926 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
927 If link_info->wrap_hash, check for a duplicate symbol and ignore.
928 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
929 Pass new argument to riscv_relax_delete_bytes.
930 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
931 ATTRIBUTE_UNUSED from link_info parameter.
932
d830549d
AM
9332018-02-02 Alan Modra <amodra@gmail.com>
934
935 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
936 emitted for toc sequence optimization. Set and use "howto" later.
937
e99955cd
SM
9382018-02-01 Simon Marchi <simon.marchi@ericsson.com>
939
940 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
941 arithmetic on NULL pointer.
942 * elflink.c (_bfd_elf_archive_symbol_lookup,
943 elf_link_add_archive_symbols): Likewise.
944
bf3077a6
MM
9452018-01-31 Michael Matz <matz@suse.de>
946
947 * elflink.c (bfd_elf_define_start_stop): Fix check of
948 def_dynamic.
949
823143c6
L
9502018-01-31 H.J. Lu <hongjiu.lu@intel.com>
951
952 PR ld/21964
953 * elflink.c (bfd_elf_define_start_stop): Check if __start and
954 __stop symbols are referenced by shared objects.
955
76cb3a89
AM
9562018-01-30 Alan Modra <amodra@gmail.com>
957
958 PR 22758
959 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
960 segment when demand paged with lma on the same page. Test this
961 before load/non-load, executable/non-executable,
962 writable/non-writable tests and simplify. Delete bogus relro
963 condition in writable/non-writable test. Delete outdated
964 comment. Formatting.
965
36b8fda5
AM
9662018-01-30 Alan Modra <amodra@gmail.com>
967
968 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
969 symbols dynamic.
970
eb77f6a4
AM
9712018-01-29 Alan Modra <amodra@gmail.com>
972
973 PR 22741
974 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
975 range before converting to a symbol table pointer.
976
7d73b4c8
NC
9772018-01-27 Nick Clifton <nickc@redhat.com>
978
979 * po/ru.po: Updated Russian translation.
980
32253bb7
AM
9812018-01-26 Alan Modra <amodra@gmail.com>
982
983 * elflink.c (bfd_elf_define_start_stop): Override symbols when
984 they are defined dynamically.
985
ba21f564
AM
9862018-01-26 Alan Modra <amodra@gmail.com>
987
988 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
989 .branch_lt changes size.
990
38e64b0e
AM
9912018-01-25 Alan Modra <amodra@gmail.com>
992
993 PR 22746
994 * elfcode.h (elf_object_p): Avoid integer overflow.
995
bb363086
EB
9962018-01-25 Eric Botcazou <ebotcazou@adacore.com>
997
998 PR ld/22727
999 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
1000 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
1001
1002 Revert
1003 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
1004
1005 PR ld/22263
1006 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
1007 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
1008 bfd_link_executable for TLS check.
1009 (_bfd_sparc_elf_check_relocs): Likewise.
1010 (allocate_dynrelocs): Likewise.
1011 (_bfd_sparc_elf_relocate_section): Likewise.
1012
1daf502a
RL
10132018-01-24 Renlin Li <renlin.li@arm.com>
1014
1015 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
1016 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
1017 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
1018 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
1019 BFD_RELOC_AARCH64_MOVW_PREL_G3.
1020 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1021 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1022
32247401
RL
10232018-01-24 Renlin Li <renlin.li@arm.com>
1024
1025 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
1026 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
1027 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
1028 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
1029 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
1030 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
1031 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
1032 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
1033 BFD_RELOC_AARCH64_MOVW_PREL_G3.
1034 * bfd-in2.h: Regenerate.
1035 * libbfd.h: Regenerate.
1036
1c5e4ee9
MR
10372018-01-23 Maciej W. Rozycki <macro@mips.com>
1038
1039 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
1040 `mips_elf32_section_processing' comment reference.
1041
8a1b824a
L
10422018-01-20 H.J. Lu <hongjiu.lu@intel.com>
1043
1044 PR ld/22721
1045 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
1046 versioned __tls_get_addr symbol.
1047
ee3fbc1e
NC
10482018-01-19 Nick Clifton <nickc@redhat.com>
1049
1050 * po/fr.po: Updated French translation.
1051
691d2e9a
AM
10522018-01-18 Alan Modra <amodra@gmail.com>
1053
1054 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
1055 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
1056 (ppc64_elf_build_stubs): Likewise.
1057
4bfce128
NC
10582018-01-17 Nick Clifton <nickc@redhat.com>
1059
1060 * po/ru.po: Updated Russian translation.
1061 * po/uk/po: Updated Ukranian translation.
1062
c75bc4f7
AM
10632018-01-17 Alan Modra <amodra@gmail.com>
1064
1065 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
1066
1be5d8d3
AM
10672018-01-17 Alan Modra <amodra@gmail.com>
1068
1069 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
1070 (CRSETEQ, BEQCTRM): Define.
1071 (is_nonpic_glink_stub): Don't check bctr.
1072 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
1073 (ppc_elf_relax_section): Size speculation barrier.
1074 (output_bctr): New function.
1075 (write_glink_stub): Use output_bctr.
1076 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
1077 (ppc_elf_finish_dynamic_symbol): Likewise.
1078 (ppc_elf_finish_dynamic_sections): Use output_bctr.
1079 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
1080 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
1081 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
1082 (size_global_entry_stubs): Handle speculation barrier sizing.
1083 (plt_stub_size): Likewise.
1084 (output_bctr): New function.
1085 (build_plt_stub, build_tls_get_addr_stub): Output speculation
1086 barrier.
1087 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
1088 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
1089 (build_global_entry_stubs): Output speculation barrier.
1090 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
1091 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
1092
9e390558
AM
10932018-01-17 Alan Modra <amodra@gmail.com>
1094
1095 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
1096 __tls_get_addr_opt, and alignment sizing.
1097 (TLS_GET_ADDR_GLINK_SIZE): Delete.
1098 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
1099 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
1100 or 8 insns.
1101 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
1102 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
1103 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
1104 by PLT reloc count.
1105 (write_glink_stub): Handle __tls_get_addr_opt stub.
1106 Pad out to size given by GLINK_ENTRY_SIZE.
1107 (ppc_elf_relocate_section): Adjust write_glink_stub call.
1108 (ppc_elf_finish_dynamic_symbol): Likewise.
1109 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
1110 insn array since so many need rewriting.
1111 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
1112 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
1113 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
1114 nops. Adjust all uses.
1115 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
1116 in glink_vma calculation.
1117 (struct ppc_link_hash_table): Add global_entry section pointer.
1118 (create_linkage_sections): Create separate section for global
1119 entry stubs.
1120 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
1121 (size_global_entry_stubs): Handle sizing for aligned stubs.
1122 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
1123 and don't stash end of glink branch table in rawsize.
1124 (ppc_build_one_stub): Rewrite stub size calculations.
1125 (build_global_entry_stubs): Use new section.
1126 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
1127 Build lazy link stubs out to end of section. Build global entry
1128 stubs in new section.
1129
616dcb87
NC
11302018-01-15 Nick Clifton <nickc@redhat.com>
1131
1132 * po/uk.po: Updated Ukranian translation.
1133
3957a496
NC
11342018-01-13 Nick Clifton <nickc@redhat.com>
1135
1136 * po/bfd.pot: Regenerated.
1137
769c7ea5
NC
11382018-01-13 Nick Clifton <nickc@redhat.com>
1139
1140 * version.m4: Bump version to 2.30.51
1141 * configure: Regenerate.
1142
faf766e3
NC
11432018-01-13 Nick Clifton <nickc@redhat.com>
1144
1145 2.30 branch created.
1146
564e11c9
JW
11472018-01-12 Jens Widell <jl@opera.com>
1148
1149 * elf.c (setup_group): Optimize search for group by remembering
1150 last found group and restarting search at that index.
1151 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
1152
a78eea16
AM
11532018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
1154
1155 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
1156 bfd_link_common_skip_none in switch.
1157
87e79a65
AM
11582018-01-12 Alan Modra <amodra@gmail.com>
1159
1160 PR ld/22649
1161 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
1162 references on forced local symbols.
1163
58807c48
VI
11642018-01-12 Vlad Ivanov <vlad@ivanov.email>
1165
1166 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
1167 .reginfo section has wrong size.
1168
2888249f
L
11692018-01-11 H.J. Lu <hongjiu.lu@intel.com>
1170
1171 PR ld/22393
1172 * elf.c (_bfd_elf_map_sections_to_segments): When generating
1173 separate code and read-only data LOAD segments, create a new
1174 LOAD segment if the previous section contains text and the
1175 current section doesn't or vice versa. Don't put a writable
1176 section in a read-only segment if there is a RELRO segment.
1177
d664fd41
L
11782018-01-11 H.J. Lu <hongjiu.lu@intel.com>
1179
1180 PR ld/22649
1181 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
1182 references on forced local symbols.
1183
8b6f4cd3
L
11842018-01-11 H.J. Lu <hongjiu.lu@intel.com>
1185
1186 PR ld/22677
1187 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
1188 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
1189
6cef73f9
KLC
11902017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1191
1192 PR 22662
1193 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
1194
ddb2bbcf
JB
11952018-01-03 John Baldwin <jhb@FreeBSD.org>
1196
1197 * elf.c (elfcore_grok_freebsd_note): Handle
1198 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
1199 NT_FREEBSD_PROCSTAT_VMMAP.
1200
219d1afa
AM
12012018-01-03 Alan Modra <amodra@gmail.com>
1202
1203 Update year range in copyright notice of all files.
1204
1e563868 1205For older changes see ChangeLog-2017
3499769a 1206\f
1e563868 1207Copyright (C) 2018 Free Software Foundation, Inc.
3499769a
AM
1208
1209Copying and distribution of this file, with or without modification,
1210are permitted in any medium without royalty provided the copyright
1211notice and this notice are preserved.
1212
1213Local Variables:
1214mode: change-log
1215left-margin: 8
1216fill-column: 74
1217version-control: never
1218End:
This page took 0.189227 seconds and 4 git commands to generate.