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