PR ld/22570: MIPS/BFD: Fix TLS relocation resolution for PIE executables
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
9143e72c
MR
12018-07-11 Maciej W. Rozycki <macro@mips.com>
2 Rich Felker <bugdal@aerifal.cx>
3
4 PR ld/22570
5 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
6 than `bfd_link_pic' to determine whether dynamic relocations are
7 to be produced.
8 (mips_elf_initialize_tls_slots): Likewise.
9
5270eddc
MR
102018-07-10 Maciej W. Rozycki <macro@mips.com>
11
12 * elflink.c (bfd_elf_final_link): Rename `remove' local variable
13 to `remove_section'.
14
1594e052
AM
152018-07-10 Alan Modra <amodra@gmail.com>
16
17 * elf32-xgate.h: Delete.
18 * elf32-xgate.c: Delete unnecessary forward declarations, add two
19 that are now needed.
20 (xgate_elf_bfd_link_hash_table_create)
21 (xgate_elf_bfd_link_hash_table_free)
22 (xgate_elf_set_mach_from_flags, struct xgate_scan_param)
23 (stub_hash_newfunc, elf32_xgate_add_symbol_hook)
24 (elf32_xgate_setup_section_lists, elf32_xgate_size_stubs)
25 (elf32_xgate_build_stubs, elf32_xgate_check_relocs)
26 (elf32_xgate_relocate_section, _bfd_xgate_elf_set_private_flags)
27 (elf32_xgate_post_process_headers): Delete.
28 (elf32_xgate_backend_symbol_processing): New function.
29 (xgate_elf_ignore_reloc, xgate_elf_special_reloc)
30 (_bfd_xgate_elf_print_private_bfd_data): Make static.
31 (ELF_TARGET_ID, elf_info_to_howto, elf_backend_check_relocs)
32 (elf_backend_relocate_section, elf_backend_object_p)
33 (elf_backend_final_write_processing, elf_backend_can_gc_sections)
34 (elf_backend_post_process_headers, elf_backend_add_symbol_hook)
35 (bfd_elf32_bfd_link_hash_table_create)
36 (bfd_elf32_bfd_set_private_flags)
37 (xgate_stub_hash_lookup): Don't define.
38 (elf_backend_symbol_processing): Define.
39 * elf-bfd.h (elf_target_id): Delete XGATE_ELF_DATA.
40
4b8377e7
MR
412018-07-09 Maciej W. Rozycki <macro@mips.com>
42
43 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Don't set
44 `->needs_lazy_stub' if the stubs output section is the absolute
45 section.
46
872899f1
L
472018-07-09 H.J. Lu <hongjiu.lu@intel.com>
48
49 PR ld/23388
50 * configure.ac: Use changequote for "i[3-7]86-*-linux-*".
51 * configure: Regenerated.
52
61658d78
AM
532018-07-09 Alan Modra <amodra@gmail.com>
54
55 * elf32-m68hc1x.c (elf32_m68hc11_post_process_headers): Call
56 _bfd_elf_post_process_headers.
57
c451bb34
MF
582018-07-06 Max Filippov <jcmvbkbc@gmail.com>
59
60 * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Don't allocate
61 space for dynamic relocation for undefined weak symbol.
62 (elf_xtensa_relocate_section): Don't emit R_XTENSA_RELATIVE
63 relocation for undefined weak symbols.
64 (shrink_dynamic_reloc_sections): Don't shrink dynamic relocation
65 section for relocations against undefined weak symbols.
66
ad1cc4e4
AH
672018-07-06 Alan Hayward <alan.hayward@arm.com>
68
69 * elf.c (elfcore_grok_aarch_sve): New function.
70 (elfcore_grok_note): Check for Aarch64 SVE.
71 (elfcore_write_aarch_sve): New function.
72 (elfcore_write_register_note): Check for Aarch64 SVE.
73 * elf-bfd.h(elfcore_grok_aarch_sve): New declaration.
74
fe75810f
AM
752018-07-06 Alan Modra <amodra@gmail.com>
76
77 * elf32-arm.c (elf32_arm_nabi_write_core_note): Don't use
78 DIAGNOTIC_PUSH and DIAGNOSTIC_POP unconditionally.
79 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
80 * elf32-s390.c (elf_s390_write_core_note): Likewise.
81 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
82 * elf64-s390.c (elf_s390_write_core_note): Likewise.
83 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
84
bb11866d
JW
852018-07-05 Jim Wilson <jimw@sifive.com>
86
87 * config.bfd (riscv32*-*-*): Renamed from riscv32-*-*.
88 (riscv64*-*-*): Likewise.
89 (riscv-*-*): Add as an alias for riscv32*-*-*.
90
56ad703d
L
912018-07-05 H.J. Lu <hongjiu.lu@intel.com>
92
93 PR ld/23372
94 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove x86
95 ISA properties with empty bits.
96
d8dab054
NC
972018-07-05 Nick Clifton <nickc@redhat.com>
98
99 * po/ru.po: Updated Russian translation.
100
4a91d0ba
AM
1012018-07-05 Alan Modra <amodra@gmail.com>
102
103 * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Update prototype.
104 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Return error
105 on mismatch. Remove "warning: " from messages. Track last bfd
106 used to set tags.
107 (ppc_elf_merge_obj_attributes): Likewise. Handle status from
108 _bfd_elf_ppc_merge_fp_attributes.
109 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Handle status
110 from _bfd_elf_ppc_merge_fp_attributes.
111
db40acb0
L
1122018-07-04 H.J. Lu <hongjiu.lu@intel.com>
113
114 * Makefile.am (bfdinclude_HEADERS): Add $(INCDIR)/diagnostics.h.
115 * Makefile.in: Regenerated.
116
b8a6ced7
AM
1172018-07-03 Alan Modra <amodra@gmail.com>
118
119 * elflink.c (bfd_elf_final_link): Remove zero size .gnu.attributes
120 sections.
121
8d2c8c3d
AM
1222018-07-03 Alan Modra <amodra@gmail.com>
123
124 * elf-bfd.h (ATTR_TYPE_FLAG_ERROR, ATTR_TYPE_HAS_ERROR): Define.
125 * elf-attrs.c (is_default_attr): Handle ATTR_TYPE_HAS_ERROR.
126 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Use
127 ATTR_TYPE_FLAG_INT_VAL. Set ATTR_TYPE_HAS_ERROR on finding
128 incompatible attribute.
129 (ppc_elf_merge_obj_attributes): Likewise. Return
130 _bfd_elf_merge_object_attributes result.
131 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Return
132 _bfd_elf_merge_object_attributes result.
133
af0bfb9c
AM
1342018-07-03 Alan Modra <amodra@gmail.com>
135
136 PR 17550
137 * elflink.c (_bfd_elf_fix_symbol_flags): Hide dynamic symbols
138 in discarded sections.
139
12f09816
MR
1402018-07-02 Maciej W. Rozycki <macro@mips.com>
141
142 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Set
143 `mark' for symbols created from `mips_elf_dynsym_rtproc_names'
144 list.
145
156f2c00
MR
1462018-07-02 Maciej W. Rozycki <macro@mips.com>
147
148 * elf64-mips.c (micromips_elf64_howto_table_rel): Add
149 R_MICROMIPS_HI0_LO16, R_MICROMIPS_TLS_GD, R_MICROMIPS_TLS_LDM,
150 R_MICROMIPS_TLS_DTPREL_HI16, R_MICROMIPS_TLS_DTPREL_LO16,
151 R_MICROMIPS_TLS_GOTTPREL, R_MICROMIPS_TLS_TPREL_HI16,
152 R_MICROMIPS_TLS_TPREL_LO16, R_MICROMIPS_GPREL7_S2 and
153 R_MICROMIPS_PC23_S2 relocation entries.
154 (micromips_elf64_howto_table_rela): Likewise.
155 (micromips_reloc_map): Likewise.
156 * elfn32-mips.c (elf_micromips_howto_table_rel): Likewise.
157 (elf_micromips_howto_table_rela): Likewise.
158 (micromips_reloc_map): Likewise.
159
b638b5d5
L
1602018-07-02 H.J. Lu <hongjiu.lu@intel.com>
161
162 PR ld/23324
163 * elf64-x86-64.c (elf_x86_64_relocate_section): Clear the
164 R_X86_64_converted_reloc_bit bit.
165
eac61af6
TT
1662018-07-02 Jeff Muizelaar <jrmuizel@gmail.com>
167 Tom Tromey <tom@tromey.com>
168
169 PR 13157
170 PR 21787
171 * mach-o.c (bfd_mach_o_fat_close_and_cleanup): New function.
172 (bfd_mach_o_close_and_cleanup): Redefine.
173 * archive.c (_bfd_unlink_from_archive_parent): New function,
174 extracted from..
175 (_bfd_archive_close_and_cleanup): ..here.
176 (bfd_generic_archive_p): Do not clear archive's format.
177 * libbfd-in.h (_bfd_unlink_from_archive_parent): Declare.
178 * libbfd.h: Regenerate.
179
c0c468d5
TP
1802018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
181
182 * archures.c (bfd_mach_arm_5TEJ, bfd_mach_arm_6, bfd_mach_arm_6KZ,
183 bfd_mach_arm_6T2, bfd_mach_arm_6K, bfd_mach_arm_7, bfd_mach_arm_6M,
184 bfd_mach_arm_6SM, bfd_mach_arm_7EM, bfd_mach_arm_8, bfd_mach_arm_8R,
185 bfd_mach_arm_8M_BASE, bfd_mach_arm_8M_MAIN): Define.
186 * bfd-in2.h: Regenerate.
187 * cpu-arm.c (arch_info_struct): Add entries for above new
188 bfd_mach_arm values.
189 * elf32-arm.c (bfd_arm_get_mach_from_attributes): Add Tag_CPU_arch to
190 bfd_mach_arm mapping logic for pre Armv4 and Armv5TEJ and later
191 architectures. Force assert failure for any new Tag_CPU_arch value.
192
a05a5b64
TP
1932018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
194
195 * doc/bfdint.texi: Use command-line consistently when used in a
196 compount word.
197 * doc/bfdsumm.texi: Likewise.
198
262e07d0
MR
1992018-06-29 Maciej W. Rozycki <macro@mips.com>
200
201 * elfxx-mips.c (allocate_dynrelocs): Remove extraneous symbol
202 visibility check made for undefined weak symbols.
203
30aa1306
NC
2042018-06-26 Nick Clifton <nickc@redhat.com>
205
206 * po/uk.po: Updated Ukranian translation.
207
bb69498c
NC
2082018-06-25 Nick Clifton <nickc@redhat.com>
209
210 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_stub_name): Check
211 for malloc returning NULL.
212 (_bfd_aarch64_erratum_843419_fixup): Check for
213 _bfd_aarch64_erratum_835769_stub_name returning NULL.
214
71300e2c
NC
2152018-06-24 Nick Clifton <nickc@redhat.com>
216
217 * po/bfd.pot: Regenerate.
218
5127f207
NC
2192018-06-24 Nick Clifton <nickc@redhat.com>
220
221 * version.m4: Update version string to 2.31.51.
222 * configure: Regenerate.
223
719d8288
NC
2242018-06-24 Nick Clifton <nickc@redhat.com>
225
226 2.31 branch created.
227
1ced1a5f
MR
2282018-06-21 Maciej W. Rozycki <macro@mips.com>
229
230 * elfxx-mips.c (_bfd_mips_elf_compact_eh_encoding)
231 (_bfd_mips_elf_cant_unwind_opcode): Correct formatting.
232
334cd8a7
MR
2332018-06-21 Maciej W. Rozycki <macro@mips.com>
234
235 * elfxx-mips.c (_bfd_mips_post_process_headers): Keep
236 EI_ABIVERSION setting together.
237
bb29b84d
MR
2382018-06-21 Maciej W. Rozycki <macro@mips.com>
239
240 * elfxx-mips.c (MIPS_LIBC_ABI_DEFAULT, MIPS_LIBC_ABI_MIPS_PLT)
241 (MIPS_LIBC_ABI_UNIQUE, MIPS_LIBC_ABI_MIPS_O32_FP64)
242 (MIPS_LIBC_ABI_MAX): New enumeration constants.
243 (_bfd_mips_post_process_headers): Use them in place of magic
244 numbers.
245
25eb8346
JW
2462018-06-21 Jim Wilson <jimw@sifive.com>
247
248 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Update comment.
249 Use SYMBOL_REFERENCES_LOCAL. Add asserts for h->got.offset.
250
d388f643
AM
2512018-06-21 Alan Modra <amodra@gmail.com>
252
253 * doc/Makefile.am (AUTOMAKE_OPTIONS): Add "foreign".
254 * doc/Makefile.in: Regenerate.
255
b939d8a0
RL
2562018-06-20 Renlin Li <renlin.li@arm.com>
257
258 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use PG_OFFSET
259 to resolve BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
260 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
261 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
262 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC,
263 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
264 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
265 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
266 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
267
6077de06
NC
2682018-06-20 Nick Clifton <nickc@redhat.com>
269
270 PR 23316
271 * opncls.c (get_build_id): Check for a negative or excessive data
272 size in the build-id note.
273
c6643fcc
NC
2742018-06-20 Nick Clifton <nickc@redhat.com>
275
276 PR 23299
277 * mach-o.c (cputype): New function.
278 (cpusubtype): New function.
279 (bfd_mach_o_bfd_print_private_data): New function. Dispalys the
280 values in the MACH-O file header.
281 (bfd_mach_o_bfd_copy_private_header_data): Copy the cputype and
282 cpusubtype fields from the input bfd's mach-o header to the output
283 bfd.
284 * mach-o-target.c (bfd_mach_o_bfd_print_private_bfd_data):
285 Redefine to bfd_mach_o_bfd_print_private_data.
286 * mach-o.h (bfd_mach_o_bfd_print_private_bfd_data): Prototype.
287
789ff5b6
MR
2882018-06-19 Maciej W. Rozycki <macro@mips.com>
289
290 PR ld/22966
291 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Verify the
292 `.got.plt' entry referred is in range.
293 (mips_finish_exec_plt): Correct the range check for `.got.plt'
294 start. Replace the assertion used for that with a proper error
295 message.
296
6a382bce
MR
2972018-06-19 Maciej W. Rozycki <macro@mips.com>
298
299 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Fix
300 formatting.
301
d0ac1c44
SM
3022018-06-19 Simon Marchi <simon.marchi@ericsson.com>
303
304 * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11.
305 (INCLUDES): Rename to ...
306 (AM_CPPFLAGS): ... this.
307 * configure.ac: Remove AC_PREREQ.
308 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add
309 info-in-builddir no-texinfo.tex.
310 (info_TEXINFOS): Rename bfd.texinfo to bfd.texi.
311 * doc/bfd.texinfo: Rename to ...
312 * doc/bfd.texi: ... this.
313 * Makefile.in: Re-generate.
314 * aclocal.m4: Re-generate.
315 * config.in: Re-generate.
316 * configure: Re-generate.
317 * doc/Makefile.in: Re-generate.
318
ed1299fe
M
3192018-06-18 Mephi <mephi42@gmail.com>
320
321 PR 23297
322 * mach-o-x86-64.c (x86_64_howto_table): Add entry for
323 BFD_RELOC_MACH_O_X86_64_RELOC_TLV.
324 (bfd_mach_o_x86_64_canonicalize_one_reloc): Handle the new reloc.
325 (bfd_mach_o_x86_64_swap_reloc_out): Likewise.
326 * reloc.c (BFD_RELOC_MACH_O_X86_64_TV): New entry.
327 * bfd-in2.h: Regenerate.
328 * libbfd.h: Regenerate.
329
6f20c942
FS
3302018-06-14 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
331
332 * elfxx-mips.c (print_mips_ases): Add GINV extension.
333
1f6f5dba
L
3342018-06-14 H.J. Lu <hongjiu.lu@intel.com>
335
336 PR binutils/23267
337 * elf.c (_bfd_elf_get_symbol_version_string): Check if the first
338 symbol version is base version.
339
7f923b7f
AM
3402018-06-14 Alan Modra <amodra@gmail.com>
341
342 * elf-bfd.h (struct elf_link_hash_table): Add "dynamic_relocs".
343 * elflink.c (_bfd_elf_init_2_index_sections): Comment fix.
344 (_bfd_elf_add_dynamic_entry): Set "dynamic_relocs".
345 (_bfd_elf_link_renumber_dynsyms): Exclude all section symbols when
346 "dynamic_relocs" is not set.
347 * elfxx-mips.c (count_section_dynsyms): Likewise.
348
ff91d2f0
AM
3492018-06-14 Alan Modra <amodra@gmail.com>
350
351 PR 23282
352 * bfdio.c (bfd_seek): Optimize away seeks to current position.
353
730c3174
SE
3542018-06-13 Scott Egerton <scott.egerton@imgtec.com>
355 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
356
357 * elfxx-mips.c (print_mips_ases): Add CRC.
358
ecf99cc0
L
3592018-06-08 H.J. Lu <hongjiu.lu@intel.com>
360
361 PR ld/23161
362 * elfxx-x86.c (elf_x86_hide_linker_defined): New function.
363 (_bfd_x86_elf_link_check_relocs): Use it to hide hidden
364 __bss_start, _end and _edata in shared libraries.
365
527278f3
AM
3662018-06-07 Alan Modra <amodra@gmail.com>
367
368 * elf32-tic6x.c (elf32_tic6x_check_relocs): Reference
369 __c6xabi_DSBT_BASE explicitly for R_C6000_SBR_* relocs.
370
5c4ce239
AM
3712018-06-05 Alan Modra <amodra@gmail.com>
372
373 * bfd.c (struct bfd): Update comment on "where" usage.
374 * bfdio.c (bfd_bwrite, bfd_stat): Use and update "iovec",
375 "iostream", and "where" from containing archive file. Return
376 error on NULL iovec.
377 (bfd_bread): Similarly, and return error attempted out of
378 bounds archive element access.
379 (bfd_tell, bfd_flush): Use and update "iovec", "iostream", and
380 "where" from containing archive file.
381 (bfd_seek): Likewise. Return error on NULL iovec. Don't
382 attempt to optimize away seeks. Don't paper over errors by
383 calling bfd_tell.
384 (bfd_get_mtime): Call bfd_stat rather than iovec->bstat.
385 (bfd_get_size): Likewise.
386 (bfd_mmap): Operate on and use iovec of containing archive
387 file. Return error on NULL iovec.
388 * cache.c (bfd_cache_lookup_worker): Abort if working on
389 archive element bfd.
390 (cache_bread_1): Delete bfd parameter, add FILE* parameter.
391 Don't ignore zero byte reads.
392 (cache_bread): Look up FILE* in cache here. Error on NULL
393 lookup.
394 (cache_bwrite): Rename "where" to "from".
395 (cache_bmmap): Don't handle archive elements.
396 * coffcode.h (coff_slurp_line_table): Exit early on zero
397 lineno count.
398 * bfd-in2.h: Regenerate.
399
27b07675
AM
4002018-06-05 Alan Modra <amodra@gmail.com>
401
402 PR 23254
403 * plugin.c (bfd_plugin_open_input): Allow for possibility of
404 nested archives. Open file again for plugin.
405 (try_claim): Don't save and restore file position. Close file
406 if not claimed.
407 * sysdep.h (O_BINARY): Define.
408
4b8e28c7
MF
4092018-06-04 Max Filippov <jcmvbkbc@gmail.com>
410
411 * elf32-xtensa.c (xtensa_read_table_entries): Make global.
412 (compute_fill_extra_space): Drop declaration. Rename function to
413 xtensa_compute_fill_extra_space.
414 (compute_ebb_actions, remove_dead_literal): Update references to
415 compute_fill_extra_space.
416
8255c61b
MF
4172018-06-04 Volodymyr Arbatov <arbatov@cadence.com>
418
419 * elf32-xtensa.c (elf32xtensa_separate_props): New global
420 variable.
421 (xtensa_add_names): New function.
422 (xtensa_property_section_name): Add new parameter
423 separate_sections, use it to choose property section name.
424 (xtensa_get_separate_property_section): New function.
425 (xtensa_get_property_section): Invoke
426 xtensa_get_separate_property_section to get individual property
427 section if it exists, common property section otherwise.
428 (xtensa_make_property_section): Pass elf32xtensa_separate_props
429 to xtensa_property_section_name.
430
95da9854
L
4312018-06-04 H.J. Lu <hongjiu.lu@intel.com>
432
433 PR binutils/23146
434 * bfd-in.h: Include "diagnostics.h".
435 * bfd-in2.h: Regenerated.
436 * elf32-arm.c (elf32_arm_nabi_write_core_note): Use
437 DIAGNOSTIC_PUSH, DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION and
438 DIAGNOSTIC_POP to silence GCC 8.1 warnings with
439 -Wstringop-truncation.
440 * elf32-ppc.c (ppc_elf_write_core_note): Likewse.
441 * elf32-s390.c (elf_s390_write_core_note): Likewse.
442 * elf64-ppc.c (ppc64_elf_write_core_note): Likewse.
443 * elf64-s390.c (elf_s390_write_core_note): Likewse.
444 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewse.
445
137b5cbd
JW
4462018-06-03 Jim Wilson <jimw@sifive.com>
447
cf7a5066
JW
448 PR ld/23244
449 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Check
450 for and handle an undefined weak with no PLT.
451
137b5cbd
JW
452 PR ld/22756
453 * elfnn-riscv.c (riscv_relax_delete_bytes): Add versioned_hidden check
454 to code that ignores duplicate symbols.
455
55e99962
L
4562018-06-01 H.J. Lu <hongjiu.lu@intel.com>
457
458 * version.m4: Bump version to 2.30.52
459 * configure: Regenerated.
460
030157d8
AM
4612018-06-01 Alan Modra <amodra@gmail.com>
462
463 * bfd.c (_bfd_error_handler): Arrange for this function to be
464 declared in bfd-in2.h.
465 * libbfd-in.h (_bfd_error_handler): Don't declare.
466 * libbfd.h: Regenerate.
467 * bfd-in2.h: Regenerate.
468
421acf18
AC
4692018-05-30 Amaan Cheval <amaan.cheval@gmail.com>
470
471 * config.bfd (x86_64-*-*): Add pei-x86-64 target to x86_64-*-rtems*
472 This is needed to generate UEFI application image files from ELFs.
473
92e68c1d
L
4742018-05-28 H.J. Lu <hongjiu.lu@intel.com>
475
476 * elf32-i386.c (elf_i386_lazy_plt): Add plt_tlsdesc_entry,
477 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
478 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
479 plt_tlsdesc_got2_insn_end for TLSDESC entry.
480 (elf_i386_lazy_ibt_plt): Likewise.
481 (elf_i386_nacl_plt): Likewise.
482 * elf64-x86-64.c (tlsdesc_plt_entry): Moved and renamed to ...
483 (elf_x86_64_tlsdesc_plt_entry): This.
484 (elf_x86_64_lazy_plt): Add plt_tlsdesc_entry,
485 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
486 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
487 plt_tlsdesc_got2_insn_end for TLSDESC entry.
488 (elf_x86_64_lazy_bnd_plt): Likewise.
489 (elf_x86_64_lazy_ibt_plt): Likewise.
490 (elf_x32_lazy_ibt_plt): Likewise.
491 (elf_x86_64_nacl_plt): Likewise.
492 (elf_x86_64_finish_dynamic_sections): Use plt_tlsdesc_entry,
493 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
494 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
495 plt_tlsdesc_got2_insn_end to update TLSDESC entry.
496 * elfxx-x86.h (elf_x86_lazy_plt_layout): Update comments.
497 Add plt_tlsdesc_entry, plt_tlsdesc_entry_size,
498 plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset,
499 plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end.
500 (elf_x86_non_lazy_plt_layout): Update comments.
501 (elf_x86_plt_layout): Likewise.
502
ac98f9e2
L
5032018-05-28 H.J. Lu <hongjiu.lu@intel.com>
504
505 PR ld/23238
506 * elf-s390-common.c (elf_s390_add_symbol_hook): Removed.
507 * elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
508 (elf_backend_add_symbol_hook): Likewise.
509 * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
510 (elf_backend_add_symbol_hook): Likewise.
511 * elf32-s390.c (elf_backend_add_symbol_hook): Likewise.
512 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
513 (elf_backend_add_symbol_hook): Likewise.
514 * elf64-s390.c (elf_backend_add_symbol_hook): Likewise.
515 * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
516 * elfxx-aarch64.h (_bfd_aarch64_elf_add_symbol_hook): Likewise.
517 (elf_backend_add_symbol_hook): Likewise.
518 * elf32-arm.c (elf32_arm_add_symbol_hook): Remove STT_GNU_IFUNC
519 handling.
520 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
521 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
522 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
523 * elflink.c (elf_link_add_object_symbols): Set
524 elf_gnu_symbol_ifunc for STT_GNU_IFUNC symbols.
525
099bb8fb
L
5262018-05-26 H.J. Lu <hongjiu.lu@intel.com>
527
528 PR ld/23194
529 * elf-bfd.h (_bfd_elf_link_hide_sym_by_version): New.
530 * elflink.c (_bfd_elf_link_hide_versioned_symbol): New function.
531 Extracted from _bfd_elf_link_assign_sym_version.
532 (_bfd_elf_link_hide_sym_by_version): New function.
533 (_bfd_elf_link_assign_sym_version): Use
534 _bfd_elf_link_hide_versioned_symbol.
535 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Call
536 _bfd_elf_link_hide_sym_by_version instead of
537 bfd_hide_sym_by_version. Don't check unversioned symbol.
538
277eb7f6
AM
5392018-05-25 Alan Modra <amodra@gmail.com>
540
541 * Makefile.in: Regenerate.
542 * po/SRC-POTFILES.in: Regenerate.
543
629dabe3
AM
5442018-05-25 Alan Modra <amodra@gmail.com>
545
546 * configure.ac (bfd_cv_hidden): Run test with -Werror in CFLAGS.
547 * configure: Regenerate.
548
9ef6d1e3
L
5492018-05-23 H.J. Lu <hongjiu.lu@intel.com>
550
551 * elf64-ppc.c (ppc64_elf_write_core_note): Add ATTRIBUTE_NONSTRING
552 to data.
553
215f5271
AM
5542018-05-22 Alan Modra <amodra@gmail.com>
555
556 PR 23207
557 * elf32-hppa.c (hppa_get_stub_entry): Return NULL when link_sec
558 is NULL.
559 (elf32_hppa_size_stubs): Only create stubs for load, alloc, code
560 sections.
561 (final_link_relocate): Revert last change.
562
7455c018
AM
5632018-05-22 Alan Modra <amodra@gmail.com>
564
565 PR 23207
566 * elf32-hppa.c (final_link_relocate): Don't look for plt call
567 stubs in non-alloc sections.
568
34a87bb0
L
5692018-05-21 H.J. Lu <hongjiu.lu@intel.com>
570
571 PR ld/23201
572 * aout-target.h (MY_bfd_link_hide_symbol): New.
573 * aout-tic30.c (MY_bfd_link_hide_symbol): Likewise.
574 * binary.c (binary_bfd_link_hide_symbol): Likewise.
575 * coff-alpha.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
576 * coff-mips.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
577 * coff-rs6000.c (_bfd_xcoff_bfd_link_hide_symbol): Likewise.
578 * coffcode.h (coff_bfd_link_hide_symbol): Likewise.
579 * elf-bfd.h (_bfd_elf_link_hide_symbol): Likewise.
580 * elfxx-target.h (bfd_elfNN_bfd_link_hide_symbol): Likewise.
581 * i386msdos.c (msdos_bfd_link_hide_symbol): Likewise.
582 * ihex.c (ihex_bfd_link_hide_symbol): Likewise.
583 * libbfd-in.h (_bfd_nolink_bfd_link_hide_symbol): Likewise.
584 * linker.c (_bfd_generic_link_hide_symbol): Likewise.
585 (bfd_link_hide_symbol): Likewise.
586 * mach-o-target.c (bfd_mach_o_bfd_link_hide_symbol): Likewise.
587 * mmo.c (mmo_bfd_link_hide_symbol): Likewise.
588 * pef.c (bfd_pef_bfd_link_hide_symbol): Likewise.
589 * plugin.c (bfd_plugin_bfd_link_hide_symbol): Likewise.
590 * ppcboot.c (ppcboot_bfd_link_hide_symbol): Likewise.
591 * som.c (som_bfd_link_hide_symbol): Likewise.
592 * srec.c (srec_bfd_link_hide_symbol): Likewise.
593 * tekhex.c (tekhex_bfd_link_hide_symbol): Likewise.
594 * vms-alpha.c (vms_bfd_link_hide_symbol): Likewise.
595 (alpha_vms_bfd_link_hide_symbol): Likewise.
596 * xsym.c (bfd_sym_bfd_link_hide_symbol): Likewise.
597 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
598 _bfd_generic_link_hide_symbol.
599 (rs6000_xcoff64_aix_vec): Likewise.
600 * elflink.c (bfd_elf_record_link_assignment): Don't make forced
601 local symbol dynamic.
602 (_bfd_elf_link_hide_symbol): New function.
603 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
604 check root.ldscript_def.
605 * targets.c (bfd_target): Add _bfd_link_hide_symbol.
606 (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_link_hide_symbol.
607 * bfd-in2.h: Regenerated.
608 * libbfd.h: Likewise.
609
bae363f1
L
6102018-05-21 H.J. Lu <hongjiu.lu@intel.com>
611
612 PR binutils/23199
613 * elf.c (setup_group): Mark section in a section group with
614 SHF_GROUP.
615
97373b2e
L
6162018-05-18 H.J. Lu <hongjiu.lu@intel.com>
617
618 PR ld/23194
619 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
620 set eh->local_ref to 1 if a symbol is versioned and there is a
621 version script.
622
7f999549
JW
6232018-05-18 Kito Cheng <kito.cheng@gmail.com>
624
625 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Handle
626 EF_RISCV_RVE.
627
6487709f
JW
6282018-05-18 Jim Wilson <jimw@sifive.com>
629
630 * elfnn-riscv.c (allocate_dynrelocs): Discard dynamic relocations if
631 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
632 (riscv_elf_relocate_section): Don't generate dynamic relocation if
633 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
634 (riscv_elf_finish_dynamic_symbol): Likewise.
635
7b4ae824
JD
6362018-05-18 John Darrington <john@darrington.wattle.id.au>
637
638 * Makefile.am: Add s12z files.
639 * Makefile.in: Regenerate.
640 * archures.c: Add bfd_s12z_arch.
641 * bfd-in.h: Add exports of bfd_putb24 and bfd_putl24.
642 * bfd-in2.h: Regenerate.
643 * config.bfd: Add s12z target.
644 * configure.ac: Add s12z target.
645 * configure: Regenerate.
646 * cpu-s12z.c: New file.
647 * elf32-s12z.c: New file.
648 * libbfd.c (bfd_putb24): New function.
649 (bfd_putl24): New function.
650 * libbfd.h: Regenerate.
651 * reloc.c: Add s12z relocations.
652 (bfd_get_reloc_size): Handle size 5 relocs.
653 * targets.c: Add s12z_elf32_vec.
654
011b32fd
L
6552018-05-18 H.J. Lu <hongjiu.lu@intel.com>
656
657 PR ld/23189
658 * elf32-i386.c (elf_i386_relocate_section): Handle R_386_GOT32X
659 like R_386_GOT32.
660 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
661 set eh->local_ref to 1 for linker defined symbols.
662
4bba0fb1
AM
6632018-05-18 Alan Modra <amodra@gmail.com>
664
665 PR 23199
666 * elf.c (setup_group): Formatting. Check that SHT_GROUP entries
667 don't point at other SHT_GROUP sections. Set shdr corresponding
668 to invalid entry, to NULL rather than section 0. Identify
669 SHT_GROUP section index when reporting an error. Cope with NULL
670 shdr pointer.
671
8722de9c
AM
6722018-05-18 Alan Modra <amodra@gmail.com>
673
674 * libbfd-in.h (ATTRIBUTE_HIDDEN): Define and use throughout.
675 * configure.ac (HAVE_HIDDEN): Check compiler support for hidden
676 visibility.
677 * libbfd.h: Regenerate.
678 * configure: Regenerate.
679 * config.in: Regenerate.
680
0b439543
AM
6812018-05-18 Alan Modra <amodra@gmail.com>
682
683 * libbfd-in.h: Add include guard.
684 * libcoff-in.h: Likewise.
685 * doc/Makefile.am (libbfd.h, libcoff.h): Append another #endif.
686 * doc/Makefile.in: Regenerate.
687 * libbfd.h: Regenerate.
688 * libcoff.h: Regenerate.
689
1624c9ca
MR
6902018-05-16 Maciej W. Rozycki <macro@mips.com>
691
692 * elf32-nds32.c (nds32_convert_32_to_16): Preset `insn_type'.
693
7cf7fcc8
AM
6942018-05-16 Alan Modra <amodra@gmail.com>
695
696 PR 22458
697 * format.c (struct bfd_preserve): Add section_id.
698 (bfd_preserve_save, bfd_preserve_restore): Save and restore
699 _bfd_section_id.
700 (bfd_reinit): Set _bfd_section_id.
701 (bfd_check_format_matches): Put all matches of any priority into
702 matching_vector. Save initial section id and start each attempted
703 match at that section id.
704 * libbfd-in.h (_bfd_section_id): Declare.
705 * section.c (_bfd_section_id): Rename from section_id and make
706 global. Adjust uses.
707 (bfd_get_next_section_id): Delete.
708 * elf64-ppc.c (ppc64_elf_setup_section_lists): Replace use of
709 bfd_get_section_id with _bfd_section_id.
710 * libbfd.h: Regenerate.
711 * bfd-in2.h: Regenerate.
712
810ed4db
CG
7132018-05-15 Christophe Guillon <christophe.guillon@st.com>
714
715 * coffcode.h (coff_bigobj_swap_aux_in): Make sure that all fields
716 of the aux structure are initialised.
717
1678bd35
FT
7182018-05-15 Francois H. Theron <francois.theron@netronome.com>
719
720 * targets.c: Wrap nfp_elf64_vec in BFD64 ifdef.
721
293b4d4f
NC
7222018-05-15 Nick Clifton <nickc@redhat.com>
723
724 * po/pt.po: New Portuguese translation.
725 * configure.ac (ALL_LINGUAS): Add pt.
726 * configure: Regenerate.
727
4ec09950
L
7282018-05-14 H.J. Lu <hongjiu.lu@intel.com>
729
730 PR ld/23169
731 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Don't issue
732 an error on IFUNC pointer defined in PDE.
733 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Call
734 _bfd_x86_elf_link_fixup_ifunc_symbol.
735 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
736 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): New
737 function.
738 * elfxx-x86.h (_bfd_x86_elf_link_fixup_ifunc_symbol): New.
739
9bc935ef
L
7402018-05-14 H.J. Lu <hongjiu.lu@intel.com>
741
742 PR ld/23162
743 * elfxx-x86.c (elf_x86_linker_defined): New function.
744 (_bfd_x86_elf_link_check_relocs): Use it to mark __bss_start,
745 _end and _edata locally defined within executables.
746
9933dc52
AM
7472018-05-12 Alan Modra <amodra@gmail.com>
748
749 PR 20659
750 * elf.c (rewrite_elf_program_header): Use segment_mark only for
751 PT_LOAD headers. Delete first_matching_lma and first_suggested_lma.
752 Instead make matching_lma and suggested_lma pointers to the
753 sections. Align section vma and lma calculated from segment.
754 Don't clear includes_phdrs or includes_filehdr based on p_paddr
755 test. Try to handle alignment padding before first section by
756 adjusting new segment lma down. Adjust PT_PHDR map p_paddr.
757
493ffac5
DD
7582018-05-09 Dimitar Dimitrov <dimitar@dinux.eu>
759
760 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Make LDI32 relocation
761 conformant to TI ABI.
762 (pru_elf32_relax_section): Likewise.
763 (pru_elf_relax_delete_bytes): Fix offsets for new LDI32 code.
764 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Ignore addend.
765 (pru_elf32_pmem_relocate): Trap - should not get here.
766 (pru_elf32_relocate_section): Add support for REL relocations.
767 (elf_info_to_howto_rel): Enable REL.
768 (elf_backend_may_use_rel_p): Likewise.
769 (elf_backend_may_use_rela_p): Likewise.
770 (elf_backend_default_use_rela_p): Likewise.
771
b4560c7d
AM
7722018-05-09 Alan Modra <amodra@gmail.com>
773
774 PR 23148
775 * peXXigen.c (pe_print_edata): Correct minimum size.
776
53db9cf9
AM
7772018-05-09 Alan Modra <amodra@gmail.com>
778
779 PR 23147
780 * peXXigen.c (pe_print_idata): Bound check hint_addr.
781
95a6d235
NC
7822018-05-08 Nick Clifton <nickc@redhat.com>
783
784 PR 22809
785 * elf.c (bfd_elf_get_str_section): Check for an excessively large
786 string section.
787 * elf-attrs.c (_bfd_elf_parse_attributes): Issue an error if the
788 attribute section is larger than the size of the file.
789
7bd8862c
AM
7902018-05-07 Alan Modra <amodra@gmail.com>
791
792 * cofflink.c (_bfd_coff_link_input_bfd): Use memcmp rather than
793 strncmp when checking for ".bf" special symbol.
794 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Make pe_required_section_flags
795 section name a char array, remove sentinal known_sections entry,
796 and adjust loop over known_sections to suit. Use memcmp rather
797 than strncmp.
798
602f1657
AM
7992018-05-04 Alan Modra <amodra@gmail.com>
800
801 * elf-linux-core.h (struct elf_external_linux_prpsinfo32_ugid32),
802 (struct elf_external_linux_prpsinfo32_ugid16),
803 (struct elf_external_linux_prpsinfo64_ugid32),
804 (struct elf_external_linux_prpsinfo64_ugid16): Add ATTRIBUTE_NONSTRING
805 to pr_fname and pr_psargs fields. Remove GCC diagnostic pragmas.
806 Move comment to..
807 * elf.c (elfcore_write_prpsinfo): ..here. Indent nested preprocessor
808 directives.
809 * elf32-arm.c (elf32_arm_nabi_write_core_note): Add ATTRIBUTE_NONSTRING
810 to data.
811 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
812 * elf32-s390.c (elf_s390_write_core_note): Likewise.
813 * elf64-s390.c (elf_s390_write_core_note): Likewise.
814 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
815 * elf64-x86-64.c (elf_x86_64_write_core_note): Add GCC diagnostic
816 pragmas.
817 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Use strnlen to avoid
818 false positive gcc-8 warning.
7bd8862c 819 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
602f1657 820
a27ca19c
TMQMF
8212018-05-04 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
822
823 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Fix the order
824 of arguments when warning about different long double types.
825
3be08ea4
SA
8262018-05-03 Simon Atanasyan <simon@atanasyan.com>
827
828 * elf32-mips.c: (elf32_mips_fixup_symbol): New function.
829 (elf_backend_fixup_symbol): New macro.
830 * elfxx-mips.c: (mips_elf_output_extsym): Discard _gp_disp
831 handling.
832 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
833
fe944acf
FT
8342018-04-30 Francois H. Theron <francois.theron@netronome.com>
835
836 * Makefile.am: Added NFP files to build.
837 * archures.c: Added bfd_arch_nfp
838 * config.bfd: Added NFP support.
839 * configure.ac: Added NFP support.
840 * cpu-nfp.c: New, for NFP support.
841 * elf-bfd.h: Added elf_section_info()
842 * elf64-nfp.c: New, for NFP support.
843 * po/SRC-POTFILES.in: Added NFP source files.
844 * targets.c: Added nfp_elf64_vec
845 * bfd-in2.h: Regenerate.
846 * Makefile.in: Regenerate.
847 * configure: Regenerate.
848
ffa389a3
AM
8492018-04-27 Alan Modra <amodra@gmail.com>
850
851 * bfd-in2.h: Regenerate.
852 * libbfd.h: Regenerate.
853
04383fd1
AM
8542018-04-27 Alan Modra <amodra@gmail.com>
855
856 PR 23123
857 PR 22374
858 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt
859 relocs for ifuncs.
860 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes.
861
bfa5bd2a
PA
8622018-04-26 Pedro Alves <palves@redhat.com>
863
864 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't consider
865 ifunc and non-ifunc symbols duplicates.
866
59029f57
CL
8672018-04-25 Christophe Lyon <christophe.lyon@st.com>
868 Mickaël Guêné <mickael.guene@st.com>
869
870 * elf32-arm.c (elf32_arm_fdpic_thumb_plt_entry): New.
871 (elf32_arm_plt_needs_thumb_stub_p): Handle thumb-only case.
872 (elf32_arm_populate_plt_entry): Likewise.
873 (elf32_arm_output_plt_map_1): Likewise.
874 (elf32_arm_output_arch_local_syms): Likewise.
875
fac7bd64
CL
8762018-04-25 Christophe Lyon <christophe.lyon@st.com>
877 Mickaël Guêné <mickael.guene@st.com>
878
879 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle
880 _GLOBAL_OFFSET_TABLE_ in FDPIC mode.
881
29e9b073
CL
8822018-04-25 Christophe Lyon <christophe.lyon@st.com>
883 Mickaël Guêné <mickael.guene@st.com>
884
885 * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case
886 for R_ARM_TARGET2.
887
cb10292c
CL
8882018-04-25 Christophe Lyon <christophe.lyon@st.com>
889 Mickaël Guêné <mickael.guene@st.com>
890
891 * elf32-arm.c (DEFAULT_STACK_SIZE): New.
892 (elf32_arm_always_size_sections): Create stack segment.
893
5c5a4843
CL
8942018-04-25 Christophe Lyon <christophe.lyon@st.com>
895 Mickaël Guêné <mickael.guene@st.com>
896
897 * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC)
898 (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New
899 relocations.
900 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC,
901 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations.
902 (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC,
903 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC.
904 (struct elf32_arm_link_hash_table): Update comment.
905 (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations.
906 (IS_ARM_TLS_RELOC): Likewise.
907 (elf32_arm_check_relocs): Likewise.
908 (allocate_dynrelocs_for_symbol): Likewise.
909 (elf32_arm_size_dynamic_sections): Update comment.
910 * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC,
911 BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC.
912
7801f98f
CL
9132018-04-25 Christophe Lyon <christophe.lyon@st.com>
914 Mickaël Guêné <mickael.guene@st.com>
915
916 * elf32-arm.c (elf32_arm_fdpic_plt_entry): New.
917 (elf32_arm_create_dynamic_sections): Handle FDPIC.
918 (elf32_arm_allocate_plt_entry): Likewise.
919 (elf32_arm_populate_plt_entry): Likewise.
920 (elf32_arm_output_plt_map_1): Likewise.
921
e8b09b87
CL
9222018-04-25 Christophe Lyon <christophe.lyon@st.com>
923 Mickaël Guêné <mickael.guene@st.com>
924
925 * elf32-arm.c (struct fdpic_local): New.
926 (elf_arm_obj_tdata): Add local_fdpic_cnts field.
927 (elf32_arm_local_fdpic_cnts): New.
928 (struct fdpic_global): New.
929 (elf32_arm_link_hash_entry): Add fdpic_cnts field.
930 (elf32_arm_link_hash_table): Add srofixup field.
931 (arm_elf_add_rofixup): New.
932 (arm_elf_fill_funcdesc): New.
933 (elf32_arm_link_hash_newfunc): Handle fdpic_cnts.
934 (elf32_arm_allocate_local_sym_info): Likewise.
935 (create_got_section): Create .rofixup section.
936 (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts.
937 (bfd_elf32_arm_set_target_params): Handle FDPIC.
938 (elf32_arm_final_link_relocate): Likewise.
939 (elf32_arm_check_relocs): Likewise.
940 (allocate_dynrelocs_for_symbol): Likewise.
941 (elf32_arm_size_dynamic_sections): Likewise.
942 (elf32_arm_finish_dynamic_sections): Likewise.
943 (elf32_arm_output_arch_local_syms): Likewise.
944 (elf32_arm_fdpic_omit_section_dynsym): New.
945
188fd7ae
CL
9462018-04-25 Christophe Lyon <christophe.lyon@st.com>
947 Mickaël Guêné <mickael.guene@st.com>
948
949 * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC)
950 (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC)
951 (BFD_RELOC_ARM_FUNCDESC_VALUE): New.
952 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC,
953 R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE.
954 (elf32_arm_howto_from_type): Take new members of
955 elf32_arm_howto_table_2 into account.
956 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC,
957 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
958 BFD_RELOC_ARM_FUNCDESC_VALUE.
959 * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC,
960 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
961 BFD_RELOC_ARM_FUNCDESC_VALUE.
962
18a20338
CL
9632018-04-25 Christophe Lyon <christophe.lyon@st.com>
964 Mickaël Guêné <mickael.guene@st.com>
965
966 * elf32-arm.c (elf32_arm_print_private_bfd_data): Support
967 EF_ARM_PIC and ELFOSABI_ARM_FDPIC.
968 (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC.
969 (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC.
970
617a5ada
CL
9712018-04-25 Christophe Lyon <christophe.lyon@st.com>
972 Mickaël Guêné <mickael.guene@st.com>
973
974 * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and
975 arm_elf32_fdpic_le_vec to targ_selvecs. Accept
976 arm*-*-uclinuxfdpiceabi.
977 * configure.ac: Add support for arm_elf32_fdpic_be_vec and
978 arm_elf32_fdpic_le_vec.
979 * configure: Regenerate.
980 * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p.
981 (elf32_arm_link_hash_table_create): Initialize fdpic_p.
982 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM)
983 (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets.
984 (elf32_arm_fdpic_link_hash_table_create): New.
985 * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and
986 arm_elf32_fdpic_le_vec.
987
d99b4b92
AM
9882018-04-25 Alan Modra <amodra@gmail.com>
989
990 * elf-linux-core.h: Disable gcc-8 string truncation warning.
991 * elf.c (elfcore_write_prpsinfo): Likewise.
992
9932018-04-25 Alan Modra <amodra@gmail.com>
2ac93be7
AM
994
995 * Makefile.am: Remove arm-aout and arm-coff support.
996 * config.bfd: Likewise.
997 * configure.ac: Likewise.
998 * targets.c: Likewise.
999 * aout-arm.c: Delete.
1000 * armnetbsd.c: Delete.
1001 * riscix.c: Delete.
1002 * Makefile.in: Regenerate.
1003 * configure: Regenerate.
1004 * po/SRC-POTFILES.in: Regenerate.
1005
aa4a8c2a
NC
10062018-04-24 Nick Clifton <nickc@redhat.com>
1007
db0c309f
NC
1008 PR 23113
1009 * elf.c (ignore_section_sym): Check for the output_section pointer
1010 being NULL before dereferencing it.
1011
aa4a8c2a
NC
1012 PR 23110
1013 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for
1014 a negative PE_DEBUG_DATA size before iterating over the debug data.
1015
b9f26d2e
AM
10162018-04-23 Alan Modra <amodra@gmail.com>
1017
1018 * elf-linux-core.h: Revert last change.
1019 * elf.c: Likewise.
1020
bf82069d
NC
10212018-04-23 Nick Clifton <nickc@redhat.com>
1022
1023 PR 23056
1024 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
1025 the end of the string table, and zero it.
1026
5a6312e8
AM
10272018-04-23 Alan Modra <amodra@gmail.com>
1028
1029 * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable
1030 gcc-8 string truncation warning.
1031 (swap_linux_prpsinfo32_ugid16_out): Likewise.
1032 (swap_linux_prpsinfo64_ugid32_out): Likewise.
1033 (swap_linux_prpsinfo64_ugid16_out): Likewise.
1034 * elf.c (elfcore_write_prpsinfo): Likewise.
1035
bf82069d
NC
10362018-04-23 Nick Clifton <nickc@redhat.com>
1037
1038 PR 23056
1039 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
1040 the end of the string table, and zero it.
1041
4352556b
AM
10422018-04-20 Alan Modra <amodra@gmail.com>
1043
1044 PR 22978
1045 * elf32-hppa.c (got_relocs_needed): Add extra param to special
1046 case both dtprel and tprel relocs.
1047 (allocate_dynrelocs): Adjust conditions for got relocs.
1048 (elf32_hppa_relocate_section): Likewise for local sym got relocs.
1049 Emit dynamic relocs on TLS GOT entries for shared libraries,
1050 not when pic. Omit dynamic reloc on dtprel entry when local,
1051 and on tprel entry when local and executable.
1052
f6a8b8c7
AM
10532018-04-19 Alan Modra <amodra@gmail.com>
1054
1055 PR 22537
1056 * elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1.
1057 (hppa_type_of_stub): Don't return a long branch stub for
1058 symbols other than those defined statically.
1059
8e415ce8
AM
10602018-04-19 Alan Modra <amodra@gmail.com>
1061
1062 * Makefile.am: Revert 2018-04-18 coff-mips changes.
1063 * config.bfd: Add back mips_ecoff_le_vec and mips_ecoff_be_vec
1064 to selvecs for mips targets change 2018-04-18.
1065 * configure.ac: Reinstate mips_ecoff_le_vec, mips_ecoff_be_vec
1066 and mips_ecoff_bele_vec.
1067 * targets.c: Likewise.
1068 * coff-mips.c: Resurrect.
1069 * Makefile.in: Regenerate.
1070 * configure: Regenerate.
1071 * po/SRC-POTFILES.in: Regenerate.
1072
3596d8ce
AM
10732018-04-18 Alan Modra <amodra@gmail.com>
1074
1075 * Makefile.am: Remove mips aout and coff support.
1076 * config.bfd: Likewise.
1077 * configure.ac: Likewise.
1078 * targets.c: Likewise.
1079 * coff-mips.c: Delete
1080 * mipsbsd.c: Delete
1081 * pe-mips.c: Delete
1082 * pei-mips.c: Delete
1083 * Makefile.in: Regenerate.
1084 * configure: Regenerate.
1085 * po/SRC-POTFILES.in: Regenerate.
1086
d9dd2045
L
10872018-04-17 H.J. Lu <hongjiu.lu@intel.com>
1088
1089 * elf32-i386.c (elf32_bed): Define before including
1090 "elf32-target.h".
1091 * elf64-x86-64.c (elf64_bed): Define before including
1092 "elf64-target.h".
1093 (elf32_bed): Define before including "elf32-target.h".
1094
e4e6a73d
L
10952018-04-17 H.J. Lu <hongjiu.lu@intel.com>
1096
1097 PR ld/23055
1098 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a
1099 normal input file with compatible relocation.
1100
c65c21e1
AM
11012018-04-18 Alan Modra <amodra@gmail.com>
1102
1103 * Makefile.am: Remove support for assorted i386 aout and coff targets.
1104 * config.bfd: Likewise.
1105 * configure.ac: Likewise.
1106 * doc/bfdint.texi: Likewise.
1107 * targets.c: Likewise.
1108 * freebsd.h: Delete.
1109 * i386dynix.c: Delete.
1110 * i386freebsd.c: Delete.
1111 * i386linux.c: Delete.
1112 * i386mach3.c: Delete.
1113 * i386netbsd.c: Delete.
1114 * i386os9k.c: Delete.
1115 * Makefile.in: Regenerate.
1116 * configure: Regenerate.
1117 * po/SRC-POTFILES.in: Regenerate.
1118
884d4d8a 11192018-04-17 Andrew Sadek <andrew.sadek.se@gmail.com>
3f0a5f17
ME
1120
1121 Microblaze Target: PIC data text relative
1122
1123 * bfd/reloc.c (2 new BFD relocations):
1124 BFD_RELOC_MICROBLAZE_64_TEXTPCREL &
1125 BFD_RELOC_MICROBLAZE_64_TEXTPCREL
1126 * bfd/bfd-in2.h: Regenerate
1127 * bfd/libbfd.h: Regenerate
1128 * bfd/elf32-microblaze.c (Handle new relocs): define 'HOWTO' of 3
1129 new relocs and handle them in both relocate and relax functions.
1130 (microblaze_elf_reloc_type_lookup): add mapping between for new
1131 bfd relocs.
1132 (microblaze_elf_relocate_section): Handle new relocs in case of
1133 elf relocation.
1134 (microblaze_elf_relax_section): Handle new relocs for elf relaxation.
1135
6327533b
NC
11362018-04-17 Nick Clifton <nickc@redhat.com>
1137
808346fc
NC
1138 PR 23055
1139 * aoutx.h (find_nearest_line): Check that the symbol name exists
1140 and is long enough, before attempting to see if it is for a .o
1141 file.
1142 * hash.c (bfd_hash_hash): Add an assertion that the string is not
1143 NULL.
1144 * linker.c (bfd_link_hash_lookup): Fail if the table or string are
1145 NULL.
1146 (_bfd_generic_link_add_archive_symbols): Fail if an archive entry
1147 has no name.
1148
6327533b
NC
1149 PR 23065
1150 * dwarf2.c (concat_filename): Check for a NULL table pointer.
1151
e9af4700
NC
11522018-04-16 Nick Clifton <nickc@redhat.com>
1153
1154 PR 23061
1155 * coffgen.c (coff_pointerize_aux): Check for an out of range
1156 fixup.
1157
ddb00039
AM
11582018-04-16 Alan Modra <amodra@gmail.com>
1159
1160 * Makefile.am: Remove arm-epoc-pe support.
1161 * coff-arm.c: Likewise.
1162 * config.bfd: Likewise.
1163 * configure.ac: Likewise.
1164 * targets.c: Likewise.
1165 * epoc-pe-arm.c: Delete.
1166 * epoc-pei-arm.c: Delete.
1167 * Makefile.in: Regenerate.
1168 * configure: Regenerate.
1169 * po/SRC-POTFILES.in: Regenerate.
1170
c9098af4
AM
11712018-04-16 Alan Modra <amodra@gmail.com>
1172
1173 * Makefile.am: Remove sparc-aout and sparc-coff support.
1174 * config.bfd: Likewise.
1175 * configure.ac: Likewise.
1176 * targets.c: Likewise.
1177 * aout-sparcle.c: Delete.
1178 * aoutf1.h: Delete.
1179 * cf-sparclynx.c: Delete.
1180 * coff-sparc.c: Delete.
1181 * demo64.c: Delete.
1182 * sparclinux.c: Delete.
1183 * sparclynx.c: Delete.
1184 * sparcnetbsd.c: Delete.
1185 * sunos.c: Delete.
1186 * Makefile.in: Regenerate.
1187 * configure: Regenerate.
1188 * po/SRC-POTFILES.in: Regenerate.
1189
dc12032b
AM
11902018-04-16 Alan Modra <amodra@gmail.com>
1191
1192 * Makefile.am: Remove m68k-aout and m68k-coff support.
1193 * aoutf1.h: Likewise.
1194 * aoutx.h: Likewise.
1195 * archive.c: Likewise.
1196 * bfd-in.h: Likewise.
1197 * bfd.c: Likewise.
1198 * coffcode.h: Likewise.
1199 * coffswap.h: Likewise.
1200 * config.bfd: Likewise.
1201 * configure.ac: Likewise.
1202 * configure.host: Likewise.
1203 * doc/bfd.texinfo: Likewise.
1204 * doc/bfdint.texi: Likewise.
1205 * freebsd.h: Likewise.
1206 * gen-aout.c: Likewise.
1207 * hpux-core.c: Likewise.
1208 * libaout.h: Likewise.
1209 * libbfd-in.h: Likewise.
1210 * pdp11.c: Likewise.
1211 * peicode.h: Likewise.
1212 * riscix.c: Likewise.
1213 * targets.c: Likewise.
1214 * aout0.c: Delete.
1215 * coff-apollo.c: Delete.
1216 * coff-aux.c: Delete.
1217 * coff-m68k.c: Delete.
1218 * coff-svm68k.c: Delete.
1219 * coff-u68k.c: Delete.
1220 * hosts/delta68.h: Delete.
1221 * hosts/hp300bsd.h: Delete.
1222 * hosts/m68kaux.h: Delete.
1223 * hosts/news.h: Delete.
1224 * hp300bsd.c: Delete.
1225 * hp300hpux.c: Delete.
1226 * liboasys.h: Delete.
1227 * m68k4knetbsd.c: Delete.
1228 * m68klinux.c: Delete.
1229 * m68knetbsd.c: Delete.
1230 * oasys.c: Delete.
1231 * versados.c: Delete.
1232 * Makefile.in: Regenerate.
1233 * bfd-in2.h: Regenerate.
1234 * configure: Regenerate.
1235 * libbfd.h: Regenerate.
1236 * po/SRC-POTFILES.in: Regenerate.
1237
211dc24b
AM
12382018-04-16 Alan Modra <amodra@gmail.com>
1239
1240 * Makefile.am: Remove sh5 and sh64 support.
1241 * archures.c: Likewise.
1242 * config.bfd: Likewise.
1243 * configure.ac: Likewise.
1244 * cpu-sh.c: Likewise.
1245 * elf32-sh-relocs.h: Likewise.
1246 * elf32-sh.c: Likewise.
1247 * targets.c: Likewise.
1248 * elf32-sh64-com.c: Delete.
1249 * elf32-sh64.c: Delete.
1250 * elf32-sh64.h: Delete.
1251 * elf64-sh64.c: Delete.
1252 * Makefile.in: Regenerate.
1253 * bfd-in2.h: Regenerate.
1254 * configure: Regenerate.
1255 * po/SRC-POTFILES.in: Regenerate.
1256
4db9937a
AM
12572018-04-16 Alan Modra <amodra@gmail.com>
1258
1259 * Makefile.am: Remove sh-symbianelf support.
1260 * config.bfd: Likewise.
1261 * configure.ac: Likewise.
1262 * targets.c: Likewise.
1263 * elf32-sh-symbian.c: Delete.
1264 * Makefile.in: Regenerate.
1265 * configure: Regenerate.
1266 * po/SRC-POTFILES.in: Regenerate.
1267
9f5d1593
AM
12682018-04-16 Alan Modra <amodra@gmail.com>
1269
1270 * Makefile.am: Remove vax-bsd and vax-ultrix support.
1271 * config.bfd: Likewise.
1272 * configure.ac: Likewise.
1273 * targets.c: Likewise.
1274 * vaxbsd.c: Delete.
1275 * Makefile.in: Regenerate.
1276 * configure: Regenerate.
1277 * po/SRC-POTFILES.in: Regenerate.
1278
a9a4b302
AM
12792018-04-16 Alan Modra <amodra@gmail.com>
1280
1281 * Makefile.am: Remove w65 support.
1282 * archures.c: Likewise.
1283 * coffcode.h: Likewise.
1284 * config.bfd: Likewise.
1285 * configure.ac: Likewise.
1286 * targets.c: Likewise.
1287 * coff-w65.c: Delete.
1288 * cpu-w65.c: Delete.
1289 * Makefile.in: Regenerate.
1290 * bfd-in2.h: Regenerate.
1291 * configure: Regenerate.
1292 * po/SRC-POTFILES.in: Regenerate.
1293
04cb01fd
AM
12942018-04-16 Alan Modra <amodra@gmail.com>
1295
1296 * Makefile.am: Remove we32k support.
1297 * archures.c: Likewise.
1298 * coffcode.h: Likewise.
1299 * config.bfd: Likewise.
1300 * configure.ac: Likewise.
1301 * targets.c: Likewise.
1302 * coff-we32k.c: Delete.
1303 * cpu-we32k.c: Delete.
1304 * Makefile.in: Regenerate.
1305 * bfd-in2.h: Regenerate.
1306 * configure: Regenerate.
1307 * po/SRC-POTFILES.in: Regenerate.
1308
c2bf1eec
AM
13092018-04-16 Alan Modra <amodra@gmail.com>
1310
1311 * Makefile.am: Remove m88k support.
1312 * aoutx.h: Likewise.
1313 * archures.c: Likewise.
1314 * coffcode.h: Likewise.
1315 * coffswap.h: Likewise.
1316 * config.bfd: Likewise.
1317 * configure.ac: Likewise.
1318 * cpu-ns32k.c: Likewise.
1319 * elf32-nds32.c: Likewise.
1320 * mach-o.c: Likewise.
1321 * netbsd-core.c: Likewise.
1322 * reloc.c: Likewise.
1323 * targets.c: Likewise.
1324 * coff-m88k.c: Delete.
1325 * cpu-m88k.c: Delete.
1326 * elf32-m88k.c: Delete.
1327 * hosts/m88kmach3.h: Delete.
1328 * m88kmach3.c: Delete.
1329 * m88kopenbsd.c: Delete.
1330 * Makefile.in: Regenerate.
1331 * bfd-in2.h: Regenerate.
1332 * configure: Regenerate.
1333 * po/SRC-POTFILES.in: Regenerate.
1334
6793974d
AM
13352018-04-16 Alan Modra <amodra@gmail.com>
1336
1337 * Makefile.am: Remove i370 support.
1338 * archures.c: Likewise.
1339 * config.bfd: Likewise.
1340 * configure.ac: Likewise.
1341 * targets.c: Likewise.
1342 * cpu-i370.c: Delete.
1343 * elf32-i370.c: Delete.
1344 * Makefile.in: Regenerate.
1345 * bfd-in2.h: Regenerate.
1346 * configure: Regenerate.
1347 * po/SRC-POTFILES.in: Regenerate.
1348
e82aa794
AM
13492018-04-16 Alan Modra <amodra@gmail.com>
1350
1351 * Makefile.am: Remove h8500 support.
1352 * archures.c: Likewise.
1353 * coffcode.h: Likewise.
1354 * config.bfd: Likewise.
1355 * configure.ac: Likewise.
1356 * targets.c: Likewise.
1357 * coff-h8500.c: Delete.
1358 * cpu-h8500.c: Delete.
1359 * Makefile.in: Regenerate.
1360 * bfd-in2.h: Regenerate.
1361 * configure: Regenerate.
1362 * po/SRC-POTFILES.in: Regenerate.
1363
fe0bf0fd
AM
13642018-04-16 Alan Modra <amodra@gmail.com>
1365
1366 * Makefile.am: Remove h8300-coff support.
1367 * coffcode.h: Likewise.
1368 * config.bfd: Likewise.
1369 * configure.ac: Likewise.
1370 * reloc16.c: Likewise.
1371 * targets.c: Likewise.
1372 * coff-h8300.c: Delete.
1373 * Makefile.in: Regenerate.
1374 * configure: Regenerate.
1375 * po/SRC-POTFILES.in: Regenerate.
1376
fdef3943
AM
13772018-04-16 Alan Modra <amodra@gmail.com>
1378
1379 * Makefile.am: Remove IEEE 695 support.
1380 * archures.c: Likewise.
1381 * bfd.c: Likewise.
1382 * config.bfd: Likewise.
1383 * configure.ac: Likewise.
1384 * doc/bfd.texinfo: Likewise.
1385 * doc/bfdint.texi: Likewise.
1386 * doc/bfdsumm.texi: Likewise.
1387 * section.c: Likewise.
1388 * targets.c: Likewise.
1389 * ieee.c: Delete.
1390 * libieee.h: Delete.
1391 * Makefile.in: Regenerate.
1392 * bfd-in2.h: Regenerate.
1393 * configure: Regenerate.
1394 * po/SRC-POTFILES.in: Regenerate.
1395
de96689e
AM
13962018-04-16 Alan Modra <amodra@gmail.com>
1397
1398 * config.bfd: Remove tandem support.
1399
5972ac73
AM
14002018-04-16 Alan Modra <amodra@gmail.com>
1401
1402 * Makefile.am: Remove newsos3 support.
1403 * aoutx.h: Likewise.
1404 * config.bfd: Likewise.
1405 * configure.ac: Likewise.
1406 * targets.c: Likewise.
1407 * newsos3.c: Delete.
1408 * Makefile.in: Regenerate.
1409 * configure: Regenerate.
1410 * po/SRC-POTFILES.in: Regenerate.
1411
b4b594e3
AM
14122018-04-16 Alan Modra <amodra@gmail.com>
1413
1414 * Makefile.am: Remove netware support.
1415 * bfd-in.h: Likewise.
1416 * bfd.c: Likewise.
1417 * config.bfd: Likewise.
1418 * configure.ac: Likewise.
1419 * doc/bfdint.texi: Likewise.
1420 * ecoff.c: Likewise.
1421 * targets.c: Likewise.
1422 * libnlm.h: Delete.
1423 * nlm-target.h: Delete.
1424 * nlm.c: Delete.
1425 * nlm32-alpha.c: Delete.
1426 * nlm32-i386.c: Delete.
1427 * nlm32-ppc.c: Delete.
1428 * nlm32-sparc.c: Delete.
1429 * nlm32.c: Delete.
1430 * nlm64.c: Delete.
1431 * nlmcode.h: Delete.
1432 * nlmswap.h: Delete.
1433 * Makefile.in: Regenerate.
1434 * bfd-in2.h: Regenerate.
1435 * configure: Regenerate.
1436 * po/SRC-POTFILES.in: Regenerate.
1437
fceadf09
AM
14382018-04-16 Alan Modra <amodra@gmail.com>
1439
1440 * archures.c: Remove tahoe support.
1441 * config.bfd: Likewise.
1442 * configure.ac: Likewise.
1443 * hosts/tahoe.h: Delete.
1444 * bfd-in2.h: Regenerate.
1445 * configure: Regenerate.
1446
702d1671
AM
14472018-04-14 Alan Modra <amodra@gmail.com>
1448
1449 * elf-bfd.h (struct elf_backend_data): Add relropagesize.
1450 * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and
1451 sanity test.
1452 (elfNN_bed): Init relropagesize.
1453 * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to
1454 select relropagesize.
1455 * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
1456 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
1457 (ELF_MINPAGESIZE): Don't define.
1458 * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
1459 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
1460 * bfd-in2.h: Regenerate.
1461
03aa9684
AM
14622018-04-14 Alan Modra <amodra@gmail.com>
1463
1464 * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend
1465 on __QNXTARGET__ define.
1466
24acfe5e
AM
14672018-04-14 Alan Modra <amodra@gmail.com>
1468
1469 * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss*
1470 to obsolete list.
1471
a8eb42a8
AM
14722018-04-11 Alan Modra <amodra@gmail.com>
1473
1474 * aout-adobe.c: Delete.
1475 * bout.c: Delete.
1476 * coff-i860.c: Delete.
1477 * coff-i960.c: Delete.
1478 * cpu-i860.c: Delete.
1479 * cpu-i960.c: Delete.
1480 * elf32-i860.c: Delete.
1481 * elf32-i960.c: Delete.
1482 * hosts/i860mach3.h: Delete.
1483 * Makefile.am: Remove i860, i960, bout, and adobe support.
1484 * archures.c: Remove i860 and i960 support.
1485 * coffcode.h: Likewise.
1486 * reloc.c: Likewise.
1487 * aoutx.h: Comment updates.
1488 * archive.c: Remove BOUT and i960 support.
1489 * bfd.c: Remove BOUT support.
1490 * coffswap.h: Remove i960 support.
1491 * config.bfd: Remove i860, i960 and adobe targets.
1492 * configure.ac: Remove adode, bout, i860, i960, icoff targets.
1493 * targets.c: Likewise.
1494 * ieee.c: Remove i960 support.
1495 * mach-o.c: Remove i860 support.
1496 * Makefile.in: Regenerate.
1497 * bfd-in2.h: Regenerate.
1498 * configure: Regenerate.
1499 * libbfd.h: Regenerate.
1500 * po/SRC-POTFILES.in: Regenerate.
1501
aec2e0d2
MR
15022018-04-09 Maciej W. Rozycki <macro@mips.com>
1503
1504 * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer
1505 in the BFD symbol referred by the relocation.
1506 (mips_elf64_write_rela): Likewise.
1507
9ccfa98b
MR
15082018-04-09 Maciej W. Rozycki <macro@mips.com>
1509
1510 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an
1511 error for out-of-range `r_sym' values.
1512
3e04d765
AM
15132018-04-09 Alan Modra <amodra@gmail.com>
1514
1515 * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field.
1516 (struct ppc_link_hash_table): Add can_convert_all_inline_plt.
1517 (ppc64_elf_check_relocs): Set has_pltcall.
1518 (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries.
1519 (ppc64_elf_inline_plt): New function.
1520 (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals.
1521 * elf64-ppc.h (ppc64_elf_inline_plt): Declare.
1522 * elf32-ppc.c (has_pltcall): Define.
1523 (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt.
1524 (ppc_elf_check_relocs): Set has_pltcall.
1525 (ppc_elf_inline_plt): New function.
1526 (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries.
1527 (ppc_elf_size_dynamic_sections): Likewise.
1528 * elf32-ppc.h (ppc_elf_inline_plt): Declare.
1529
23cedd1d
AM
15302018-04-09 Alan Modra <amodra@gmail.com>
1531
1532 * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos.
1533 (is_plt_seq_reloc): New function.
1534 (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs.
1535 (ppc_elf_tls_optimize): Handle inline plt call sequence.
1536 (ppc_elf_relax_section): Handle PLTCALL reloc.
1537 (ppc_elf_relocate_section): Nop out inline plt call sequence when
1538 resolving locally.
1539 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and
1540 R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE.
1541 (has_tls_get_addr_call): Correct comment.
1542 (is_branch_reloc): Add PLTCALL.
1543 (is_plt_seq_reloc): New function.
1544 (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set
1545 has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt
1546 entry for R_PPC64_PLTCALL.
1547 (ppc64_elf_tls_optimize): Handle inline plt call sequence.
1548 (ppc_type_of_stub): Handle PLTCALL reloc.
1549 (toc_adjusting_stub_needed): Likewise.
1550 (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL
1551 reloc insn. Nop out inline plt call sequence when resolving
1552 locally. Handle __tls_get_addr inline plt call optimization.
1553
2d7ad24e
AM
15542018-04-09 Alan Modra <amodra@gmail.com>
1555
1556 * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define.
1557 (struct ppc_stub_hash_entry): Add symtype field.
1558 (PLT_KEEP): Define.
1559 (struct ppc_link_hash_table): Add pltlocal and relpltlocal.
1560 (create_linkage_sections): Create pltlocal and relpltlocal.
1561 (ppc64_elf_check_relocs): Allow PLT relocs on local symbols.
1562 Set PLT_KEEP.
1563 (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
1564 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
1565 (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
1566 Keep PLT entries for inline calls against locals.
1567 (ppc_build_one_stub): Use pltlocal as appropriate.
1568 (ppc_size_one_stub): Likewise.
1569 (ppc64_elf_size_stubs): Set symtype.
1570 (build_global_entry_stubs_and_plt): Init pltlocal and write
1571 relpltlocal for globals.
1572 (write_plt_relocs_for_local_syms): Likewise for local syms.
1573 (ppc64_elf_relocate_section): Support PLT for local syms.
1574 * elf32-ppc.c (PLT_KEEP): Define.
1575 (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal.
1576 (ppc_elf_create_glink): Create pltlocal and relpltlocal.
1577 (ppc_elf_check_relocs): Allow PLT relocs on local symbols.
1578 Set PLT_KEEP. Adjust update_local_sym_info call.
1579 (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
1580 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
1581 (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
1582 (ppc_elf_relocate_section): Support PLT16 relocs for local syms.
1583 (write_global_sym_plt): Init pltlocal and write relpltlocal.
1584 (ppc_finish_symbols): Likewise for locals.
1585
49c09209
AM
15862018-04-09 Alan Modra <amodra@gmail.com>
1587
1588 * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs
1589 for local symbols to..
1590 (write_plt_relocs_for_local_syms): ..here. New function.
1591 (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for
1592 global symbols to..
1593 (build_global_entry_stubs_and_plt): ..here. Rename from
1594 build_global_entry_stubs.
1595 (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt.
1596 Call write_plt_relocs_for_local_syms.
1597 * elf32-ppc.c (get_sym_h): New function.
1598 (ppc_elf_relax_section): Use get_sym_h.
1599 (ppc_elf_relocate_section): Move output of PLT relocs and glink
1600 stubs for local symbols to..
1601 (ppc_finish_symbols): ..here. New function.
1602 (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for
1603 global syms to..
1604 (write_global_sym_plt): ..here. New function.
1605 * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute.
1606 (ppc_finish_symbols): Declare.
1607
08be3224
AM
16082018-04-09 Alan Modra <amodra@gmail.com>
1609
1610 * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs.
1611 (ppc_elf_relocate_section): Likewise.
1612 * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS.
1613 (ppc64_elf_relocate_section): Likewise. Correct PLT16
1614 resolution to plt entry relative to toc pointer.
1615
37da22e5
AM
16162018-04-09 Alan Modra <amodra@gmail.com>
1617
1618 * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
1619 TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout
1620 file when other TLS flags are tested in a mask.
1621 (TLS_MARK, NON_GOT): Define.
1622 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
1623 (update_local_sym_info): Don't create got entry when NON_GOT.
1624 (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
1625 Set TLS_MARK.
1626 (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK.
1627 (ppc64_elf_relocate_section): Likewise.
1628 (ppc64_elf_tls_optimize): Don't attempt to optimize indirect
1629 __tls_get_addr calls lacking a marker reloc.
1630 * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
1631 TLS_TPRELGD): Renumber. Update comment.
1632 (TLS_MARK, NON_GOT): Define.
1633 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
1634 (update_local_sym_info): Don't create got entry when NON_GOT.
1635 (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
1636 Set TLS_MARK.
1637 (ppc_elf_tls_optimize): Don't attempt to optimize indirect
1638 __tls_get_addr calls lacking a marker reloc.
1639
a6fd92b0
L
16402018-04-06 H.J. Lu <hongjiu.lu@intel.com>
1641
1642 * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out
1643 R_X86_64_converted_reloc_bit.
1644
3cba8b6c
L
16452018-04-05 H.J. Lu <hongjiu.lu@intel.com>
1646
1647 PR gas/22318
1648 * configure: Regenerated.
1649
0e8452bb
AM
16502018-04-05 Alan Modra <amodra@gmail.com>
1651
1652 * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
1653 (elf_hppa_info_to_howto_rel): Likewise.
1654
8ee55178
MR
16552018-04-04 Maciej W. Rozycki <macro@mips.com>
1656
1657 * elf-hppa.h (elf_hppa_info_to_howto): Also return
1658 unsuccessfully for unimplemented relocations.
1659 (elf_hppa_info_to_howto_rel): Likewise.
1660
5d7c8b80
MR
16612018-04-04 Maciej W. Rozycki <macro@mips.com>
1662
1663 * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the
1664 `bfd_error_bad_value' error and call `_bfd_error_handler' on a
1665 howto lookup failure.
1666 (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call
1667 accordingly.
1668 (elf32_i860_info_to_howto_rela): Likewise.
1669 (elf32_i860_relocate_splitn): Likewise.
1670 (elf32_i860_relocate_pc16): Likewise.
1671 (elf32_i860_relocate_pc26): Likewise.
1672 (elf32_i860_relocate_section): Likewise.
1673
707bad1b
MR
16742018-04-04 Maciej W. Rozycki <macro@mips.com>
1675
1676 * elf32-visium.c (visium_info_to_howto_rela): Correct the range
1677 check for `visium_elf_howto_table' table access.
1678
0cc919dc
MR
16792018-04-04 Maciej W. Rozycki <macro@mips.com>
1680
1681 * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range
1682 check for `iq2000_elf_howto_table' table access.
1683
f428698e
MR
16842018-04-04 Maciej W. Rozycki <macro@mips.com>
1685
1686 * elf32-frv.c (frv_info_to_howto_rela): Correct the range check
1687 for `elf32_frv_howto_table' table access.
1688
7ed6f92a
MR
16892018-04-04 Maciej W. Rozycki <macro@mips.com>
1690
1691 * elf32-mips.c (mips_elf32_rtype_to_howto): Also return
1692 unsuccessfully for placeholder howtos.
1693 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
1694 * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise.
1695
75def2ab
MR
16962018-03-29 Maciej W. Rozycki <macro@mips.com>
1697
1698 * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
1699 `_bfd_error_handler' and to set the `bfd_error_bad_value' error.
1700
8b6a949a
MR
17012018-03-28 Maciej W. Rozycki <macro@mips.com>
1702
1703 * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove
1704 ATTRIBUTE_UNUSED from `abfd'.
1705
d81270c3
MR
17062018-03-28 Maciej W. Rozycki <macro@mips.com>
1707
1708 * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct
1709 `_bfd_error_handler' call formatting.
1710
60dceb8d 17112018-03-28 Maciej W. Rozycki <macro@mips.com>
8205a328
MR
1712
1713 * elf32-mips.c (mips_info_to_howto_rel): Call
1714 `mips_elf32_rtype_to_howto' directly rather than via
1715 `->elf_backend_mips_rtype_to_howto'.
1716
e04ef022
RL
17172018-03-28 Renlin Li <renlin.li@arm.com>
1718
1719 PR ld/22970
1720 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
1721 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
1722 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
1723 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
1724 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
1725 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
1726 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
1727 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
1728 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
1729 (elfNN_aarch64_final_link_relocate): Support new relocations.
1730 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
1731 relocations.
1732 (_bfd_aarch64_elf_resolve_relocation): Support new relocations.
1733
84f1b9fb
RL
17342018-03-28 Renlin Li <renlin.li@arm.com>
1735
1736 PR ld/22970
1737 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12
1738 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
1739 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
1740 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
1741 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
1742 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
1743 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
1744 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
1745 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
1746 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
1747 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for
1748 TLSLE_LDST16_TPREL_LO12,
1749 TLSLE_LDST16_TPREL_LO12_NC,
1750 TLSLE_LDST32_TPREL_LO12,
1751 TLSLE_LDST32_TPREL_LO12_NC,
1752 TLSLE_LDST64_TPREL_LO12,
1753 TLSLE_LDST64_TPREL_LO12_NC,
1754 TLSLE_LDST8_TPREL_LO12,
1755 TLSLE_LDST8_TPREL_LO12_NC.
1756 * bfd-in2.h: Regenerated.
1757 * libbfd.h: Regenerated.
1758
f8745e1c
EB
17592018-03-28 Eric Botcazou <ebotcazou@adacore.com>
1760
1761 PR ld/22972
1762 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
1763 has_old_style_got_reloc.
1764 (_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
1765 relocations. Fix a couple of long lines.
1766 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
1767 a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style
1768 GOT relocations.
1769
bf54968b
L
17702018-03-25 H.J. Lu <hongjiu.lu@intel.com>
1771
1772 PR ld/23000
1773 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
1774 ENDBR64 to the TLSDESC PLT entry.
1775
0ccf57bd
AM
17762018-03-21 Alan Modra <amodra@gmail.com>
1777
1778 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting
1779 symbols. Use size_t counts. Delete redundant opd test.
1780
4bad6366
AM
17812018-03-21 Alan Modra <amodra@gmail.com>
1782
1783 * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
1784
bac3c8c5
AM
17852018-03-21 Alan Modra <amodra@gmail.com>
1786
1787 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask
1788 field unsigned.
1789 (update_local_sym_info): Likewise for local_got_tls_masks.
1790 (ppc_elf_tls_optimize): Likewise for lgot_masks.
1791
6a3858a6
AM
17922018-03-21 Alan Modra <amodra@gmail.com>
1793
1794 * elf64-ppc.c (ppc_size_one_stub): Fix comment typo.
1795 (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we
1796 do in size_dynamic_sections.
1797
675e2809
AM
17982018-03-21 Alan Modra <amodra@gmail.com>
1799
1800 * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1]
1801 without first checking array bounds.
1802 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1803
416c34d6
L
18042018-03-20 H.J. Lu <hongjiu.lu@intel.com>
1805
1806 PR ld/22983
1807 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
1808 non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
1809
315aa1cf
NC
18102018-03-19 Nick Clifton <nickc@redhat.com>
1811
1812 * po/es.po: Updated Spanish translation.
1813
0854d504
MF
18142018-03-15 Max Filippov <jcmvbkbc@gmail.com>
1815
1816 * elf32-xtensa.c (xlate_map_entry): Change types of address
1817 fields from 'unsigned' to 'bfd_vma'.
1818 (xlate_offset_with_removed_text): Use struct xlate_map_entry as
1819 the key argument to bsearch. Allow offsets past the end of a
1820 section, use the last map entry for translation of such offsets.
1821
f9671640
KLC
18222018-03-15 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1823
1824 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
1825 Not support the target feature.
1826 (nds32_elf_ex9_itb_base): Likewise.
1827 (nds32_elf_ex9_import_table): Likewise.
1828 (nds32_elf_ex9_finish): Likewise.
1829 (nds32_elf_ex9_reloc_jmp): Likewise.
1830 (nds32_elf_get_insn_with_reg): Likewise.
1831 (nds32_get_local_syms): Likewise.
1832 (nds32_elf_ex9_replace_instruction): Likewise.
1833 (nds32_elf_ifc_calc): Likewise.
1834 (nds32_elf_ifc_finish): Likewise.
1835 (nds32_elf_ifc_replace): Likewise.
1836 (nds32_elf_ifc_reloc): Likewise.
1837
7dda8d3c
AM
18382018-03-14 Alan Modra <amodra@gmail.com>
1839
1840 * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
1841 sfpr size added before defining alias symbols.
1842 (ppc64_elf_build_stubs): Add stub section padding before
1843 copying sfpr contents and defining save/restore alias symbols.
1844
9e223787
L
18452018-03-14 H.J. Lu <hongjiu.lu@intel.com>
1846
1847 PR ld/20882
1848 * elflink.c (elf_gc_mark_debug_section): Also check the local
1849 debug definition section.
1850
3e33b239
NC
18512018-03-13 Nick Clifton <nickc@redhat.com>
1852
1853 PR 22113
1854 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
1855 function. Add an end address parameter. Check access of the data
1856 pointer to make sure that they do not extend beyond the end
1857 address. Return FALSE if any check fails. Add the end address
1858 pointer to the ui structure.
1859 (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
1860 codes to make sure that they do not extend beyond the end address
1861 pointer. Print an error message and return immediately if any
1862 check fails.
1863
f657f8c4
NC
18642018-03-09 Nick Clifton <nickc@redhat.com>
1865
1866 * elf64-s390.c (elf_s390_relocate_section): Move check for
1867 relocations against non-allocated sections to before the code that
1868 handles ifunc relocations.
1869 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1870 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
1871 relocs against IFUNC symbols in non-allocated sections as relocs
1872 against FUNC symbols.
1873 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1874
347a8774
L
18752018-03-08 H.J. Lu <hongjiu.lu@intel.com>
1876
1877 PR ld/22929
1878 * elf32-i386.c (elf_i386_relocate_section): Treat relocation
1879 against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
1880 relocation against FUNC symbol.
1881 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1882
0c1ded8d
RL
18832018-03-07 Renlin Li <renlin.li@arm.com>
1884
1885 PR ld/20402
1886 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
1887 symbol, and don't emit relocation in specific case.
1888
0118219e
AM
18892018-03-07 Alan Modra <amodra@gmail.com>
1890
1891 * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
1892 (mips_elf64_slurp_one_reloc_table): Pass on error.
1893
dfb93f11
JC
18942018-03-03 James Cowgill <james.cowgill@mips.com>
1895 Maciej W. Rozycki <macro@mips.com>
1896
1897 PR ld/21900
1898 * elfxx-mips.c (mips_elf_calculate_relocation): Only return
1899 after calling `undefined_symbol' hook if this is an error
1900 condition. Assume the value of 0 for the symbol requested
1901 otherwise.
1902
9a2ebffd
JW
19032018-03-02 Jim Wilson <jimw@sifive.com>
1904
1905 PR 22903
1906 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
1907 and nop instead of 4.
1908 (elfNN_arch64_build_stubs): Add nop after branch. Increase size by
1909 8 instead of 4.
1910
788af978
JW
19112018-03-01 Jim Wilson <jimw@sifive.com>
1912
1913 PR 22756
1914 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
1915 else if instead of if.
1916
5224fa03
AM
19172018-03-01 Alan Modra <amodra@gmail.com>
1918
1919 * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
1920
116acb2c
AM
19212018-02-28 Alan Modra <amodra@gmail.com>
1922
1923 PR 22887
1924 * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
1925
eef10466
NC
19262018-02-28 Nick Clifton <nickc@redhat.com>
1927
12c96342
NC
1928 PR 22895
1929 PR 22893
1930 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
1931 pointer. Drop unused abfd parameter. Check the size of the block
1932 before initialising the data field. Return the end pointer if the
1933 size is invalid.
1934 (read_attribute_value): Adjust invocations of read_n_bytes.
1935
eef10466
NC
1936 PR 22894
1937 * dwarf1.c (parse_die): Check the length of form blocks before
1938 advancing the data pointer.
1939
0d329c0a
AM
19402018-02-28 Alan Modra <amodra@gmail.com>
1941
1942 PR 22887
1943 * aoutx.h (translate_symbol_table): Print an error message and set
1944 bfd_error on finding an invalid name string offset.
1945
f6aec96d
L
19462018-02-27 H.J. Lu <hongjiu.lu@intel.com>
1947
1948 * config.in: Regenerated.
1949 * configure: Likewise.
1950 * configure.ac: Add --enable-separate-code.
1951 (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default
1952 to 1 for Linux/x86 targets,
1953 * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
1954 DEFAULT_LD_Z_SEPARATE_CODE is 1.
1955
f3185997
NC
19562018-02-27 Nick Clifton <nickc@redhat.com>
1957
e8f5af78
NC
1958 * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
1959 message.
1960 * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
1961 * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
1962 * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
1963 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
1964 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
1965 * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
1966 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
1967 * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
1968 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
1969
f3185997
NC
1970 PR 22875
1971 * elf-bfd.h (struct elf_backend_data): Change the return type of
1972 the elf_info_to_howto and elf_info_to_howto_rel function pointers
1973 to bfd_boolean.
1974 * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
1975 value from the info_to_howto function and fail if that function
1976 failed.
1977 * elf32-h8300.c (elf32_h8_relocate_section): Check return value
1978 from the info_to_howto function.
1979 (elf32_h8_relax_section): Likewise.
1980 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
1981 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
1982 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
1983 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1984 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1985 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
1986 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
1987 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1988 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
1989 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1990 (riscv_elf_relocate_section): Likewise.
1991 * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
1992 bfd_boolean. Issue an error message, set an error value and
1993 return FALSE if the reloc is not recognized.
1994 (elf_hppa_info_to_howto_rel): Likewise.
1995 * elf-m10200.c (mn10200_info_to_howto): Likewise.
1996 * elf-m10300.c (mn10300_info_to_howto): Likewise.
1997 * elf.c (_bfd_elf_no_info_to_howto): Likewise.
1998 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
1999 * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
2000 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
2001 * elf32-bfin.c (bfin_info_to_howto): Likewise.
2002 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
2003 * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
2004 * elf32-cris.c (elf_cr16c_info_to_howto_rel)
2005 (cris_info_to_howto_rela): Likewise.
2006 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
2007 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
2008 * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
2009 Likewise.
2010 * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
2011 (elf32_dlx_info_to_howto_rel): Likewise.
2012 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
2013 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
2014 * elf32-frv.c (frv_info_to_howto_rela)
2015 (frvfdpic_info_to_howto_rel): Likewise.
2016 * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
2017 * elf32-gen.c (elf_generic_info_to_howto)
2018 (elf_generic_info_to_howto_rel): Likewise.
2019 * elf32-h8300.c (elf32_h8_info_to_howto)
2020 (elf32_h8_info_to_howto_rel): Likewise.
2021 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
2022 * elf32-i386.c (elf_i386_reloc_type_lookup)
2023 (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
2024 * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
2025 Likewise.
2026 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
2027 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
2028 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
2029 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
2030 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
2031 * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
2032 Likewise.
2033 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
2034 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
2035 * elf32-m68k.c (rtype_to_howto): Likewise.
2036 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
2037 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
2038 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
2039 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
2040 * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
2041 Likewise.
2042 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
2043 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
2044 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
2045 * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
2046 Likewise.
2047 * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
2048 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
2049 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
2050 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
2051 * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
2052 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
2053 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
2054 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
2055 * elf32-score.c (s3_bfd_score_info_to_howto)
2056 (_bfd_score_info_to_howto): Likewise.
2057 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
2058 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
2059 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
2060 * elf32-tic6x.c (elf32_tic6x_info_to_howto)
2061 (elf32_tic6x_info_to_howto_rel): Likewise.
2062 * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
2063 * elf32-v850.c (v850_elf_info_to_howto_rel)
2064 (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
2065 * elf32-vax.c (rtype_to_howto): Likewise.
2066 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
2067 * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
2068 (elf32_wasm32_info_to_howto_rela): Likewise.
2069 * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
2070 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
2071 * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
2072 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
2073 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
2074 * elf64-gen.c (elf_generic_info_to_howto)
2075 (elf_generic_info_to_howto_rel): Likewise.
2076 * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
2077 * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
2078 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
2079 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
2080 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
2081 * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
2082 Likewise.
2083 * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
2084 * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
2085 Likewise.
2086 * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
2087 * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
2088 * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
2089 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
2090 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
2091 * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
2092 * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
2093 * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
2094 * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
2095 * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
2096 Default to NULL.
2097
1f4bace8
JW
20982018-02-26 Jim Wilson <jimw@sifive.com>
2099 Stephan Schreiber <info@fs-driver.org>
2100
2101 PR 15904
2102 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
2103 call, set changed_contents and changed_relocs. Likewise after
2104 successful ia64_elf_relax_br call.
2105
6838f2be
AM
21062018-02-26 Alan Modra <amodra@gmail.com>
2107
2108 * elf.c (assign_file_positions_except_relocs): Don't segfault
2109 when actual number of phdrs is less than allocated. Delete
2110 outdated comment. Formatting.
2111
38f14ab8
AM
21122018-02-26 Alan Modra <amodra@gmail.com>
2113
2114 * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
2115 * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
2116 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
2117 * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
2118 * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
2119 * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
2120 * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
2121 * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
2122 * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
2123 * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
2124 error/warning messages.
2125
6e05870c
AM
21262018-02-26 Alan Modra <amodra@gmail.com>
2127
2128 * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
2129 * syms.c: Standardize error/warning messages.
2130
59d08d6c
AM
21312018-02-26 Alan Modra <amodra@gmail.com>
2132
2133 * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
2134 * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
2135 * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
2136 * peXXigen.c, * peicode.h: Standardize error/warning messages.
2137
90b6238f
AM
21382018-02-26 Alan Modra <amodra@gmail.com>
2139
2140 * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
2141
2c1c9679
AM
21422018-02-26 Alan Modra <amodra@gmail.com>
2143
2144 * elfxx-mips.c: Standardize error/warning messages.
2145
9793eb77
AM
21462018-02-26 Alan Modra <amodra@gmail.com>
2147
2148 * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
2149 * elflink.c: Standardize error/warning messages. Replace use of
2150 linker callback einfo with _bfd_error_handler when possible.
2151
0aa13fee
AM
21522018-02-26 Alan Modra <amodra@gmail.com>
2153
2154 * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
2155 * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
2156 * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
2157 * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
2158 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
2159 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
2160 * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
2161 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
2162 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
2163 * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
2164 * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
2165 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
2166 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
2167 * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
2168 * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
2169 * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
2170 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
2171 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
2172 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
2173 * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
2174 * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
2175 unrecognized/unsupported reloc message.
2176
cf97bcb0
AM
21772018-02-26 Alan Modra <amodra@gmail.com>
2178
2179 * elf32-ppc.c: Standardize error/warning messages. Use
2180 _bfd_error_handler rather than einfo when einfo features not used.
2181 * elf64-ppc.c: Likewise.
2182
01f7e10c
AM
21832018-02-23 Alan Modra <amodra@gmail.com>
2184
2185 PR 22881
2186 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
2187 segment if no matching LOAD segment.
2188
e859f655
KLC
21892018-02-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2190
2191 * elf32-nds32.h: Define mask for ict_model.
2192
6e8d06db
JD
21932018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
2194
2195 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
2196
b248d650
MR
21972018-02-19 Maciej W. Rozycki <macro@mips.com>
2198
2199 Revert
2200 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
2201
2202 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
2203 .reginfo section has wrong size.
2204
6798f8bf
MR
22052018-02-19 Maciej W. Rozycki <macro@mips.com>
2206
2207 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
2208 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
2209 `.MIPS.abiflags' sections.
2210 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
2211 section's end.
2212
8772de11
MR
22132018-02-19 Maciej W. Rozycki <macro@mips.com>
2214
2215 * section.c (SEC_FIXED_SIZE): New macro.
2216 * bfd-in2.h: Regenerate.
2217
4f7fd351
MR
22182018-02-19 Maciej W. Rozycki <macro@mips.com>
2219
2220 * section.c (SEC_HAS_GOT_REF): Remove macro.
2221 * bfd-in2.h: Regenerate.
2222
f2b740ac
AM
22232018-02-19 Alan Modra <amodra@gmail.com>
2224
2225 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
2226 arguments.
2227 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
2228 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
2229 (_bfd_riscv_relax_pc): Likewise and fix typos.
2230 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
2231 * libbfd.h: Regenerate.
2232
8979927a
AM
22332018-02-19 Alan Modra <amodra@gmail.com>
2234
2235 * dwarf2.c (read_section): Don't use 'll' format modifier.
2236 (find_abstract_instance): Likewise.
2237 * elfcore.h (elf_core_file_p): Likewise.
2238
2dcf00ce
AM
22392018-02-19 Alan Modra <amodra@gmail.com>
2240
2241 * bfd-in.h: Include inttypes.h or if not available define
2242 PRId64, PRIu64 and PRIx64.
2243 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
2244 modifier to print bfd_vma.
2245 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
2246 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
2247 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
2248 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
2249 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
2250 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
2251 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
2252 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
2253 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
2254 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
2255 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
2256 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
2257 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
2258 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
2259 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
2260 and cast input to uint64_t, and similarly for Ld and Lu.
2261 * bfd-in2.h: Regenerate.
2262
c1c8c1ef
AM
22632018-02-19 Alan Modra <amodra@gmail.com>
2264
2265 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
2266 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
2267 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
2268 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
2269 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
2270 * reloc.c: Replace use of %R and %T in format strings passed to
2271 einfo and friends by %pR and %pT.
2272
871b3ab2
AM
22732018-02-19 Alan Modra <amodra@gmail.com>
2274
2275 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
2276 of %A and %B.
2277 * aout-adobe.c: Update all messages using %A and %B.
2278 * aout-cris.c: Likewise.
2279 * aoutx.h: Likewise.
2280 * archive.c: Likewise.
2281 * binary.c: Likewise.
2282 * cache.c: Likewise.
2283 * coff-alpha.c: Likewise.
2284 * coff-arm.c: Likewise.
2285 * coff-i860.c: Likewise.
2286 * coff-mcore.c: Likewise.
2287 * coff-ppc.c: Likewise.
2288 * coff-rs6000.c: Likewise.
2289 * coff-sh.c: Likewise.
2290 * coff-tic4x.c: Likewise.
2291 * coff-tic54x.c: Likewise.
2292 * coff-tic80.c: Likewise.
2293 * coff64-rs6000.c: Likewise.
2294 * coffcode.h: Likewise.
2295 * coffgen.c: Likewise.
2296 * cofflink.c: Likewise.
2297 * coffswap.h: Likewise.
2298 * compress.c: Likewise.
2299 * cpu-arm.c: Likewise.
2300 * ecoff.c: Likewise.
2301 * elf-attrs.c: Likewise.
2302 * elf-eh-frame.c: Likewise.
2303 * elf-ifunc.c: Likewise.
2304 * elf-m10300.c: Likewise.
2305 * elf-properties.c: Likewise.
2306 * elf-s390-common.c: Likewise.
2307 * elf.c: Likewise.
2308 * elf32-arc.c: Likewise.
2309 * elf32-arm.c: Likewise.
2310 * elf32-avr.c: Likewise.
2311 * elf32-bfin.c: Likewise.
2312 * elf32-cr16.c: Likewise.
2313 * elf32-cr16c.c: Likewise.
2314 * elf32-cris.c: Likewise.
2315 * elf32-crx.c: Likewise.
2316 * elf32-d10v.c: Likewise.
2317 * elf32-d30v.c: Likewise.
2318 * elf32-epiphany.c: Likewise.
2319 * elf32-fr30.c: Likewise.
2320 * elf32-frv.c: Likewise.
2321 * elf32-gen.c: Likewise.
2322 * elf32-hppa.c: Likewise.
2323 * elf32-i370.c: Likewise.
2324 * elf32-i386.c: Likewise.
2325 * elf32-i960.c: Likewise.
2326 * elf32-ip2k.c: Likewise.
2327 * elf32-iq2000.c: Likewise.
2328 * elf32-lm32.c: Likewise.
2329 * elf32-m32c.c: Likewise.
2330 * elf32-m32r.c: Likewise.
2331 * elf32-m68hc11.c: Likewise.
2332 * elf32-m68hc12.c: Likewise.
2333 * elf32-m68hc1x.c: Likewise.
2334 * elf32-m68k.c: Likewise.
2335 * elf32-mcore.c: Likewise.
2336 * elf32-mep.c: Likewise.
2337 * elf32-metag.c: Likewise.
2338 * elf32-microblaze.c: Likewise.
2339 * elf32-moxie.c: Likewise.
2340 * elf32-msp430.c: Likewise.
2341 * elf32-mt.c: Likewise.
2342 * elf32-nds32.c: Likewise.
2343 * elf32-nios2.c: Likewise.
2344 * elf32-or1k.c: Likewise.
2345 * elf32-pj.c: Likewise.
2346 * elf32-ppc.c: Likewise.
2347 * elf32-rl78.c: Likewise.
2348 * elf32-rx.c: Likewise.
2349 * elf32-s390.c: Likewise.
2350 * elf32-score.c: Likewise.
2351 * elf32-score7.c: Likewise.
2352 * elf32-sh-symbian.c: Likewise.
2353 * elf32-sh.c: Likewise.
2354 * elf32-sh64.c: Likewise.
2355 * elf32-sparc.c: Likewise.
2356 * elf32-spu.c: Likewise.
2357 * elf32-tic6x.c: Likewise.
2358 * elf32-tilepro.c: Likewise.
2359 * elf32-v850.c: Likewise.
2360 * elf32-vax.c: Likewise.
2361 * elf32-visium.c: Likewise.
2362 * elf32-wasm32.c: Likewise.
2363 * elf32-xgate.c: Likewise.
2364 * elf32-xtensa.c: Likewise.
2365 * elf64-alpha.c: Likewise.
2366 * elf64-gen.c: Likewise.
2367 * elf64-hppa.c: Likewise.
2368 * elf64-ia64-vms.c: Likewise.
2369 * elf64-mmix.c: Likewise.
2370 * elf64-ppc.c: Likewise.
2371 * elf64-s390.c: Likewise.
2372 * elf64-sh64.c: Likewise.
2373 * elf64-sparc.c: Likewise.
2374 * elf64-x86-64.c: Likewise.
2375 * elfcode.h: Likewise.
2376 * elfcore.h: Likewise.
2377 * elflink.c: Likewise.
2378 * elfnn-aarch64.c: Likewise.
2379 * elfnn-ia64.c: Likewise.
2380 * elfnn-riscv.c: Likewise.
2381 * elfxx-mips.c: Likewise.
2382 * elfxx-sparc.c: Likewise.
2383 * elfxx-tilegx.c: Likewise.
2384 * elfxx-x86.c: Likewise.
2385 * hpux-core.c: Likewise.
2386 * ieee.c: Likewise.
2387 * ihex.c: Likewise.
2388 * libbfd.c: Likewise.
2389 * linker.c: Likewise.
2390 * mach-o.c: Likewise.
2391 * merge.c: Likewise.
2392 * mmo.c: Likewise.
2393 * oasys.c: Likewise.
2394 * pdp11.c: Likewise.
2395 * pe-mips.c: Likewise.
2396 * peXXigen.c: Likewise.
2397 * peicode.h: Likewise.
2398 * reloc.c: Likewise.
2399 * rs6000-core.c: Likewise.
2400 * srec.c: Likewise.
2401 * stabs.c: Likewise.
2402 * vms-alpha.c: Likewise.
2403 * xcofflink.c: Likewise.
2404
dbc88fc1
AM
24052018-02-19 Alan Modra <amodra@gmail.com>
2406
2407 PR 22845
2408 * elf.c (IS_TBSS): Define.
2409 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
2410 (assign_file_positions_for_non_load_sections): Revert last change.
2411 Properly calculate load segment limits to compare against relro limits.
2412
325ba6fb
AM
24132018-02-17 Alan Modra <amodra@gmail.com>
2414
2415 PR 22845
2416 * elf.c (assign_file_positions_for_non_load_sections): Ignore
2417 degenerate zero size PT_LOAD segments when finding one overlapping
2418 the PT_GNU_RELRO segment.
2419
d00dd7dc
AM
24202018-02-16 Alan Modra <amodra@gmail.com>
2421
2422 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
2423 (_bfd_bool_bfd_true): Rename from bfd_true.
2424 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
2425 (_bfd_int_bfd_0): Rename from bfd_0.
2426 (_bfd_uint_bfd_0): Rename from bfd_0u.
2427 (_bfd_long_bfd_0): Rename from bfd_0l.
2428 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
2429 (_bfd_void_bfd): Rename from bfd_void.
2430 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
2431 (_bfd_bool_bfd_link_false_error),
2432 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
2433 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
2434 (_bfd_bool_bfd_asection_bfd_asection_true),
2435 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
2436 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
2437 * archive.c (_bfd_noarchive_get_elt_at_index),
2438 (_bfd_noarchive_openr_next_archived_file),
2439 (_bfd_noarchive_construct_extended_name_table),
2440 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
2441 (_bfd_noarchive_write_armap): New functions.
2442 * archures.c (_bfd_nowrite_set_arch_mach): New function.
2443 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
2444 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
2445 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
2446 (alpha_ecoff_swap_coff_lineno_out),
2447 (alpha_ecoff_swap_coff_reloc_out): New functions.
2448 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
2449 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
2450 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
2451 (mips_ecoff_swap_coff_lineno_out),
2452 (mips_ecoff_swap_coff_reloc_out): New functions.
2453 * coffcode.h (coff_set_alignment_hook): Replace define with
2454 new function.
2455 (symname_in_debug_hook): Likewise.
2456 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
2457 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
2458 * elf.c (assign_file_positions_except_relocs): Test
2459 elf_backend_allow_non_load_phdr for NULL.
2460 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
2461 _bfd_elf_link_omit_section_dynsym. Update uses.
2462 (_bfd_elf_omit_section_dynsym_all): New function.
2463 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
2464 (_bfd_elf_omit_section_dynsym_default): Declare.
2465 (_bfd_elf_omit_section_dynsym_all): Declare.
2466 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
2467 (_bfd_nolink_bfd_get_relocated_section_contents),
2468 (_bfd_nolink_bfd_lookup_section_flags),
2469 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
2470 (_bfd_nolink_bfd_link_hash_table_create),
2471 (_bfd_nolink_bfd_link_just_syms),
2472 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
2473 (_bfd_nolink_bfd_link_split_section),
2474 (_bfd_nolink_section_already_linked),
2475 (_bfd_nolink_bfd_define_common_symbol),
2476 (_bfd_nolink_bfd_define_start_stop): New functions.
2477 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
2478 (_bfd_norelocs_bfd_reloc_name_lookup),
2479 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
2480 * section.c (_bfd_nowrite_set_section_contents): New function.
2481 * syms.c (_bfd_nosymbols_canonicalize_symtab),
2482 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
2483 (_bfd_nosymbols_get_symbol_version_string),
2484 (_bfd_nosymbols_bfd_is_local_label_name),
2485 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
2486 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
2487 (_bfd_nosymbols_bfd_make_debug_symbol),
2488 ( _bfd_nosymbols_read_minisymbols),
2489 ( _bfd_nosymbols_minisymbol_to_symbol),
2490 (_bfd_nodynamic_get_synthetic_symtab): New functions.
2491 * libbfd-in.h: Declare new functions. Update existing defines,
2492 removing casts.
2493 * aix386-core.c: Update to use new hooks. Formatting.
2494 * aout-adobe.c: Likewise.
2495 * aout-arm.c: Likewise.
2496 * aout-target.h: Likewise.
2497 * aout-tic30.c: Likewise.
2498 * aoutf1.h: Likewise.
2499 * binary.c: Likewise.
2500 * bout.c: Likewise.
2501 * cisco-core.c: Likewise.
2502 * coff-alpha.c: Likewise.
2503 * coff-i386.c: Likewise.
2504 * coff-i860.c: Likewise.
2505 * coff-i960.c: Likewise.
2506 * coff-ia64.c: Likewise.
2507 * coff-mips.c: Likewise.
2508 * coff-ppc.c: Likewise.
2509 * coff-rs6000.c: Likewise.
2510 * coff-sh.c: Likewise.
2511 * coff-tic30.c: Likewise.
2512 * coff-tic54x.c: Likewise.
2513 * coff-x86_64.c: Likewise.
2514 * coff64-rs6000.c: Likewise.
2515 * coffcode.h: Likewise.
2516 * elf-m10300.c: Likewise.
2517 * elf32-cr16.c: Likewise.
2518 * elf32-lm32.c: Likewise.
2519 * elf32-m32r.c: Likewise.
2520 * elf32-metag.c: Likewise.
2521 * elf32-score.c: Likewise.
2522 * elf32-score7.c: Likewise.
2523 * elf32-tilepro.c: Likewise.
2524 * elf32-xstormy16.c: Likewise.
2525 * elf32-xtensa.c: Likewise.
2526 * elf64-alpha.c: Likewise.
2527 * elf64-hppa.c: Likewise.
2528 * elf64-ia64-vms.c: Likewise.
2529 * elf64-mmix.c: Likewise.
2530 * elf64-sh64.c: Likewise.
2531 * elfnn-ia64.c: Likewise.
2532 * elfxx-sparc.c: Likewise.
2533 * elfxx-target.h: Likewise.
2534 * elfxx-tilegx.c: Likewise.
2535 * elfxx-x86.h: Likewise.
2536 * hp300hpux.c: Likewise.
2537 * hppabsd-core.c: Likewise.
2538 * hpux-core.c: Likewise.
2539 * i386msdos.c: Likewise.
2540 * i386os9k.c: Likewise.
2541 * ieee.c: Likewise.
2542 * ihex.c: Likewise.
2543 * irix-core.c: Likewise.
2544 * libaout.h: Likewise.
2545 * libecoff.h: Likewise.
2546 * mach-o-target.c: Likewise.
2547 * mach-o.c: Likewise.
2548 * mipsbsd.c: Likewise.
2549 * mmo.c: Likewise.
2550 * netbsd-core.c: Likewise.
2551 * nlm-target.h: Likewise.
2552 * oasys.c: Likewise.
2553 * osf-core.c: Likewise.
2554 * pdp11.c: Likewise.
2555 * pe-mips.c: Likewise.
2556 * pe-x86_64.c: Likewise.
2557 * pef.c: Likewise.
2558 * plugin.c: Likewise.
2559 * ppcboot.c: Likewise.
2560 * ptrace-core.c: Likewise.
2561 * sco5-core.c: Likewise.
2562 * som.c: Likewise.
2563 * sparclynx.c: Likewise.
2564 * srec.c: Likewise.
2565 * tekhex.c: Likewise.
2566 * trad-core.c: Likewise.
2567 * verilog.c: Likewise.
2568 * versados.c: Likewise.
2569 * vms-alpha.c: Likewise.
2570 * vms-lib.c: Likewise.
2571 * wasm-module.c: Likewise.
2572 * xsym.c: Likewise.
2573 * libbfd.h: Regenerate.
2574
2a0d9853
JW
25752018-02-15 Jim Wilson <jimw@sifive.com>
2576
09ca4b9d
JW
2577 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
2578 symbols whose section address is zero.
2579
2a0d9853
JW
2580 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
2581 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
2582 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
2583 Add %X%P to error messages.
2584
e513bd38
EB
25852018-02-15 Eric Botcazou <ebotcazou@adacore.com>
2586
2587 PR ld/22832
2588 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
2589 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
2590 and assert that the result of the call is not NULL.
2591
12ef3f5a
NC
25922018-02-14 Nick Clifton <nickc@redhat.com>
2593
2594 PR 22823
2595 Revert previous delta. Add extra casts to avoid compile time
2596 warnings instead.
2597 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
2598 cast to avoid warning from gcc v8 compiler.
2599 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
2600 (_bfd_generic_bfd_set_private_flags): Likewise.
2601 (_bfd_generic_bfd_copy_private_section_data): Likewise.
2602 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
2603 (_bfd_generic_bfd_copy_private_header_data): Likewise.
2604 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
2605 (_bfd_noarchive_construct_extended_name_table): Likewise.
2606 (_bfd_noarchive_truncate_arname): Likewise.
2607 (_bfd_noarchive_write_ar_hdr): Likewise.
2608 (_bfd_noarchive_get_elt_at_index): Likewise.
2609 (_bfd_nosymbols_canonicalize_symtab): Likewise.
2610 (_bfd_nosymbols_print_symbol): Likewise.
2611 (_bfd_nosymbols_get_symbol_info): Likewise.
2612 (_bfd_nosymbols_get_symbol_version_string): Likewise.
2613 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
2614 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
2615 (_bfd_nosymbols_get_lineno): Likewise.
2616 (_bfd_nosymbols_find_nearest_line): Likewise.
2617 (_bfd_nosymbols_find_line): Likewise.
2618 (_bfd_nosymbols_find_inliner_info): Likewise.
2619 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
2620 (_bfd_nosymbols_read_minisymbols): Likewise.
2621 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
2622 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
2623 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
2624 (_bfd_nowrite_set_arch_mach): Likewise.
2625 (_bfd_nowrite_set_section_contents): Likewise.
2626 (_bfd_nolink_sizeof_headers): Likewise.
2627 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
2628 (_bfd_nolink_bfd_relax_section): Likewise.
2629 (_bfd_nolink_bfd_gc_sections): Likewise.
2630 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
2631 (_bfd_nolink_bfd_merge_sections): Likewise.
2632 (_bfd_nolink_bfd_is_group_section): Likewise.
2633 (_bfd_nolink_bfd_discard_group): Likewise.
2634 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
2635 (_bfd_nolink_bfd_link_add_symbols): Likewise.
2636 (_bfd_nolink_bfd_link_just_syms): Likewise.
2637 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
2638 (_bfd_nolink_bfd_final_link): Likewise.
2639 (_bfd_nolink_bfd_link_split_section): Likewise.
2640 (_bfd_nolink_section_already_linked): Likewise.
2641 (_bfd_nolink_bfd_define_common_symbol): Likewise.
2642 (_bfd_nolink_bfd_define_start_stop): Likewise.
2643 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
2644 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
2645 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
2646 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
2647 * libbfd.c (bfd_false_any): Delete.
2648 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
2649 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
2650 * libbfd.h (extern): Regenerate
2651 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
2652 cast to avoid warning from gcc v8 compiler.
2653 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
2654 * binary.c (binary_get_symbol_info): Likewise.
2655 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
2656 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2657 * coffcode.h (coff_set_alignment_hook): Likewise.
2658 (symname_in_debug_hook): Likewise.
2659 (bfd_coff_backend_data bigobj_swap_table): Likewise.
2660 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
2661 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
2662 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
2663 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
2664 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
2665 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
2666 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
2667 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
2668 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
2669 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
2670 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
2671 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
2672 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
2673 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
2674 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
2675 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
2676 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
2677 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
2678 (bfd_elfNN_bfd_set_private_flags): Likewise.
2679 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
2680 (elf_backend_init_index_section): Likewise.
2681 (elf_backend_allow_non_load_phdr): Likewise.
2682 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
2683 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
2684 * ieee.c (ieee_construct_extended_name_table): Likewise.
2685 (ieee_write_armap): Likewise.
2686 (ieee_write_ar_hdr): Likewise.
2687 (ieee_bfd_is_target_special_symbol): Likewise.
2688 * ihex.c (ihex_canonicalize_symtab): Likewise.
2689 (ihex_bfd_is_target_special_symbol): Likewise.
2690 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
2691 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
2692 (_bfd_ecoff_set_alignment_hook): Likewise.
2693 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
2694 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
2695 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
2696 * oasys.c (oasys_construct_extended_name_table): Likewise.
2697 (oasys_write_armap): Likewise.
2698 (oasys_write_ar_hdr): Likewise.
2699 (oasys_bfd_is_target_special_symbol): Likewise.
2700 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
2701 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
2702 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
2703 * som.c (som_bfd_is_target_special_symbol): Likewise.
2704 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
2705 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
2706 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
2707 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
2708 (versados_bfd_reloc_name_lookup): Likewise.
2709 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
2710 (vms_bfd_define_start_stop): Likewise.
2711 (alpha_vms_bfd_is_target_special_symbol): Likewise.
2712 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
2713 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
2714
451875b4
L
27152018-02-14 H.J. Lu <hongjiu.lu@intel.com>
2716
2717 PR ld/22842
2718 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
2719 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
2720 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
2721 R_X86_64_PC32 reloc against dynamic function in data section.
2722 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
2723 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
2724 against dynamic function in data section.
2725 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
2726 function address only if pcrel_plt is true.
2727 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
2728 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
2729 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
2730 PC-relative relocation against a function definition in data
2731 secton in PIE. Remove the obsolete comments.
2732 (elf_x86_link_hash_table): Add pcrel_plt.
2733
1031c264
L
27342018-02-13 H.J. Lu <hongjiu.lu@intel.com>
2735
2736 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
2737 instead of bfd_link_pic, for building shared library.
2738
bd7ab16b
L
27392018-02-13 H.J. Lu <hongjiu.lu@intel.com>
2740
2741 PR gas/22791
2742 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
2743 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
2744 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
2745 against protected function in shared object.
2746
80c96350
ST
27472018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
2748
2749 PR 22828
2750 * po/ru.po: Fix typo in Russian translation.
2751
87993319
MR
27522018-02-13 Maciej W. Rozycki <macro@mips.com>
2753
2754 * wasm-module.c (wasm_scan_name_function_section): Rename
2755 `index' local variable to `idx'.
2756
68d20676
NC
27572018-02-13 Nick Clifton <nickc@redhat.com>
2758
2759 PR 22823
2760 Fix compile time warnings generated by gcc version 8.
2761 * libbfd-in.h: Remove extraneous text from prototypes.
2762 Add prototypes for bfd_false_any, bfd_true_any,
2763 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
2764 bfd_n1_any, bfd_void_any.
2765 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
2766 function.
2767 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
2768 (_bfd_generic_bfd_set_private_flags): Likewise.
2769 (_bfd_generic_bfd_copy_private_section_data): Likewise.
2770 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
2771 (_bfd_generic_bfd_copy_private_header_data): Likewise.
2772 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
2773 (_bfd_noarchive_construct_extended_name_table): Likewise.
2774 (_bfd_noarchive_truncate_arname): Likewise.
2775 (_bfd_noarchive_write_ar_hdr): Likewise.
2776 (_bfd_noarchive_get_elt_at_index): Likewise.
2777 (_bfd_nosymbols_canonicalize_symtab): Likewise.
2778 (_bfd_nosymbols_print_symbol): Likewise.
2779 (_bfd_nosymbols_get_symbol_info): Likewise.
2780 (_bfd_nosymbols_get_symbol_version_string): Likewise.
2781 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
2782 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
2783 (_bfd_nosymbols_get_lineno): Likewise.
2784 (_bfd_nosymbols_find_nearest_line): Likewise.
2785 (_bfd_nosymbols_find_line): Likewise.
2786 (_bfd_nosymbols_find_inliner_info): Likewise.
2787 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
2788 (_bfd_nosymbols_read_minisymbols): Likewise.
2789 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
2790 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
2791 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
2792 (_bfd_nowrite_set_arch_mach): Likewise.
2793 (_bfd_nowrite_set_section_contents): Likewise.
2794 (_bfd_nolink_sizeof_headers): Likewise.
2795 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
2796 (_bfd_nolink_bfd_relax_section): Likewise.
2797 (_bfd_nolink_bfd_gc_sections): Likewise.
2798 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
2799 (_bfd_nolink_bfd_merge_sections): Likewise.
2800 (_bfd_nolink_bfd_is_group_section): Likewise.
2801 (_bfd_nolink_bfd_discard_group): Likewise.
2802 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
2803 (_bfd_nolink_bfd_link_add_symbols): Likewise.
2804 (_bfd_nolink_bfd_link_just_syms): Likewise.
2805 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
2806 (_bfd_nolink_bfd_final_link): Likewise.
2807 (_bfd_nolink_bfd_link_split_section): Likewise.
2808 (_bfd_nolink_section_already_linked): Likewise.
2809 (_bfd_nolink_bfd_define_common_symbol): Likewise.
2810 (_bfd_nolink_bfd_define_start_stop): Likewise.
2811 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
2812 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
2813 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
2814 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
2815 * libbfd.c (bfd_false_any): New function. Like bfd_false but
2816 accepts one or more arguments.
2817 (bfd_true_any): Likewise.
2818 (bfd_nullvoidptr_any): Likewise.
2819 (bfd_0_any): Likewise.
2820 (bfd_0u_any): Likewise.
2821 (bfd_0l_any): Likewise.
2822 (_bfd_n1_any): Likewise.
2823 (bfd_void_any): Likewise.
2824 * libbfd.h (extern): Regenerate
2825 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
2826 based dummy function.
2827 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
2828 * binary.c (binary_get_symbol_info): Likewise.
2829 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
2830 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2831 * coffcode.h (coff_set_alignment_hook): Likewise.
2832 (symname_in_debug_hook): Likewise.
2833 (bfd_coff_backend_data bigobj_swap_table): Likewise.
2834 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
2835 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
2836 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
2837 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
2838 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
2839 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
2840 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
2841 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
2842 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
2843 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
2844 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
2845 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
2846 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
2847 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
2848 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
2849 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
2850 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
2851 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
2852 (bfd_elfNN_bfd_set_private_flags): Likewise.
2853 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
2854 (elf_backend_init_index_section): Likewise.
2855 (elf_backend_allow_non_load_phdr): Likewise.
2856 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
2857 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
2858 * ieee.c (ieee_construct_extended_name_table): Likewise.
2859 (ieee_write_armap): Likewise.
2860 (ieee_write_ar_hdr): Likewise.
2861 (ieee_bfd_is_target_special_symbol): Likewise.
2862 * ihex.c (ihex_canonicalize_symtab): Likewise.
2863 (ihex_bfd_is_target_special_symbol): Likewise.
2864 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
2865 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
2866 (_bfd_ecoff_set_alignment_hook): Likewise.
2867 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
2868 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
2869 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
2870 * oasys.c (oasys_construct_extended_name_table): Likewise.
2871 (oasys_write_armap): Likewise.
2872 (oasys_write_ar_hdr): Likewise.
2873 (oasys_bfd_is_target_special_symbol): Likewise.
2874 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
2875 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
2876 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
2877 * som.c (som_bfd_is_target_special_symbol): Likewise.
2878 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
2879 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
2880 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
2881 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
2882 (versados_bfd_reloc_name_lookup): Likewise.
2883 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
2884 (vms_bfd_define_start_stop): Likewise.
2885 (alpha_vms_bfd_is_target_special_symbol): Likewise.
2886 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
2887 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
2888 * elf32-arc.c (get_replace_function): Assign replacement function
2889 to func pointer.
2890 * elf32-i370.c (i370_noop): Update prototype.
2891
6e5e9d58
AM
28922018-02-13 Alan Modra <amodra@gmail.com>
2893
2894 PR 22836
2895 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
2896 relocation sections. If size reduces to just the flag word,
2897 remove that too and mark with SEC_EXCLUDE.
2898 * elflink.c (bfd_elf_final_link): Strip empty group sections.
2899
f2731e0c
AM
29002018-02-13 Alan Modra <amodra@gmail.com>
2901
2902 PR 22829
2903 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
2904 PT_GNU_RELRO setup.
2905
830db048
ZF
29062018-02-12 Zebediah Figura <z.figura12@gmail.com>
2907
2908 * i386msdos.c (msdos_mkobject); New function.
2909 (msdos_object_p): New function.
2910 (i386_msdos_vec): Use msdos_object_p as the check_format
2911 function.
2912 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
2913 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
2914 IMAGE_NT_SIGNATURE.
2915 * peXXigen.c: Likewise.
2916 * coff-ia64.c: Likewise.
2917
94fe5757
NC
29182018-02-12 Nick Clifton <nickc@redhat.com>
2919
2920 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
2921 assignment.
0b8683b7 2922 * elf32-arc.c (elf_arc_relocate_section): Likewise.
94fe5757 2923
d805612e 29242018-02-09 Eric Botcazou <ebotcazou@adacore.com>
a8735c82
EB
2925
2926 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
2927 (sparc_elf_append_rela): Assert that there is enough room in section.
2928 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
2929 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
2930 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
2931 For a symbol subject to a GOT relocation, reserve a slot in the
2932 relocation section if the symbol isn't dynamic and we are in PIC mode.
2933 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
2934 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
2935 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
2936 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
2937 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
2938 resolved_to_zero. Do not generate a dynamic GOT relocation for an
2939 undefined weak symbol with non-default visibility. Remove superfluous
2940 'else' and fix formatting.
2941
3b4c3844
L
29422018-02-09 H.J. Lu <hongjiu.lu@intel.com>
2943
2944 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
2945 is_solaris.
2946 (i386_elf32_sol2_vec): Don't declare.
2947 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
2948 Don't set need_global_offset_table.
2949 (elf_i386_solaris_arch_bed): New.
2950 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
2951 Solaris.
2952 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
2953 target_os != is_nacl instead of target_os == is_normal.
2954 (x86_64_elf64_sol2_vec): Don't declare.
2955 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
2956 is_nacl instead of target_os == is_normal. Don't set
2957 need_global_offset_table.
2958 (elf_x86_64_solaris_arch_bed): New.
2959 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
2960 Solaris.
2961 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
2962 _GLOBAL_OFFSET_TABLE_ for Solaris.
2963 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
2964 need_global_offset_table.
2965 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
2966 (elf_x86_link_hash_table): Remove need_global_offset_table.
2967 (elf_x86_init_table): Likewise.
2968
15b23f36
L
29692018-02-08 H.J. Lu <hongjiu.lu@intel.com>
2970
2971 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
2972 Remove prototype.
2973 (i386_elf32_sol2_vec): Declared.
2974 (elf_i386_link_setup_gnu_properties): Set
2975 need_global_offset_table with info->output_bfd->xvec.
2976 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
2977 Remove prototype.
2978 (x86_64_elf64_sol2_vec): Declared.
2979 (elf_x86_64_link_setup_gnu_properties): Set
2980 need_global_offset_table with info->output_bfd->xvec.
2981
dc11dea2
L
29822018-02-08 H.J. Lu <hongjiu.lu@intel.com>
2983
2984 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
2985 New prototype.
2986 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
2987 for Solaris.
2988 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
2989 New prototype.
2990 (elf_x86_64_link_setup_gnu_properties): Set
2991 need_global_offset_table for Solaris.
2992 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
2993 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
2994 (_bfd_x86_elf_link_setup_gnu_properties): Copy
2995 need_global_offset_table.
2996 * elfxx-x86.h (elf_x86_link_hash_table): Add
2997 need_global_offset_table.
2998 (elf_x86_init_table): Likewise.
2999
3f48fe4a
JW
30002018-02-08 Jim Wilson <jimw@sifive.com>
3001
3002 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
3003 change.
3004
ef135d43
NC
30052018-02-08 Nick Clifton <nickc@redhat.com>
3006
3007 PR 22788
3008 * elf.c (elf_parse_notes): Reject notes with excessuively large
3009 alignments.
3010
407aa07c
AM
30112018-02-07 Alan Modra <amodra@gmail.com>
3012
3013 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
3014 * elf32-ppc.c: Remove speculation barrier support.
3015 * elf32-ppc.h: Likewise.
3016 * elf64-ppc.c: Likewise.
3017 * elf64-ppc.h: Likewise.
3018
ed01220c
JW
30192018-02-06 Jim Wilson <jimw@sifive.com>
3020
3021 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
3022 callback to report an error.
3023
c20c30f6
EB
30242018-02-06 Eric Botcazou <ebotcazou@adacore.com>
3025
3026 PR ld/22263
3027 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
3028 into call to !bfd_link_executable and tidy up.
3029 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
3030 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
3031 !bfd_link_executable.
3032 <R_SPARC_TLS_IE_HI22>: Likewise.
3033 <GOT relocations>: Remove useless code, tidy and merge related blocks.
3034 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
3035 !bfd_link_executable.
3036 <R_SPARC_WPLT30>: Tidy up.
3037 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
3038 !bfd_link_executable.
3039 (allocate_dynrelocs): Likewise.
3040 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
3041 <R_SPARC_TLS_GD_HI22>: Merge into...
3042 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
3043 sparc_elf_tls_transition and remove redundant code.
3044 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
3045 !bfd_link_executable.
3046 <R_SPARC_TLS_LDO_HIX22>: Likewise.
3047 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
3048 <R_SPARC_TLS_LDM_CALL>: Likewise.
3049 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
3050 <R_SPARC_TLS_GD_ADD>: Likewise.
3051 <R_SPARC_TLS_LDM_ADD>: Likewise.
3052 <R_SPARC_TLS_LDO_ADD>: Likewise.
3053 <R_SPARC_TLS_IE_LD>: Likewise.
3054
46d09186
NC
30552018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
3056
3057 PR 22789
3058 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
3059 functions failed to find the function name, try the generic elf
3060 find function instead.
3061
8278e7ce
SDJ
30622018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
3063
3064 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
3065 'memcpy' instead of 'strncpy' when writing the magic number.
3066
64e234d4
NC
30672018-02-06 Nick Clifton <nickc@redhat.com>
3068
3069 PR 22794
3070 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
3071 section before attempting to read it in.
3072 (bfd_get_alt_debug_link_info): Likewise.
3073
422f3d3d
PC
30742018-02-06 Paul Carroll <pcarroll@codesourcery.com>
3075
3076 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
3077 line information in addition to name, if they can be found.
3078
279b2f94
RL
30792018-02-05 Renlin Li <renlin.li@arm.com>
3080
3081 PR ld/22764
3082 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
3083 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
3084 check for writeable section as well.
3085
cd048363
L
30862018-02-05 H.J. Lu <hongjiu.lu@intel.com>
3087
3088 PR ld/22782
3089 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
3090 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
3091 undefined weak symbol to 0.
3092 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
3093 if _GLOBAL_OFFSET_TABLE_ is referenced.
3094 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
3095 got_referenced instead of ref_regular_nonweak. Remove the
3096 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
3097 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
3098
e65b1a78
MR
30992018-02-05 Maciej W. Rozycki <macro@mips.com>
3100
3101 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
3102 initialize `hi_reloc'.
3103
2d6dda71
MR
31042018-02-05 Maciej W. Rozycki <macro@mips.com>
3105
3106 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
3107 SHT_MIPS_REGINFO sections don't assert the correct size and
3108 report an error instead.
3109
75506100
MR
31102018-02-05 Maciej W. Rozycki <macro@mips.com>
3111
3112 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
3113 status from `->elf_backend_section_processing'.
3114
7f02625e
JW
31152018-02-02 Jim Wilson <jimw@sifive.com>
3116
3117 PR ld/22756
3118 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
3119 If link_info->wrap_hash, check for a duplicate symbol and ignore.
3120 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
3121 Pass new argument to riscv_relax_delete_bytes.
3122 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
3123 ATTRIBUTE_UNUSED from link_info parameter.
3124
d830549d
AM
31252018-02-02 Alan Modra <amodra@gmail.com>
3126
3127 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
3128 emitted for toc sequence optimization. Set and use "howto" later.
3129
e99955cd
SM
31302018-02-01 Simon Marchi <simon.marchi@ericsson.com>
3131
3132 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
3133 arithmetic on NULL pointer.
3134 * elflink.c (_bfd_elf_archive_symbol_lookup,
3135 elf_link_add_archive_symbols): Likewise.
3136
bf3077a6
MM
31372018-01-31 Michael Matz <matz@suse.de>
3138
3139 * elflink.c (bfd_elf_define_start_stop): Fix check of
3140 def_dynamic.
3141
823143c6
L
31422018-01-31 H.J. Lu <hongjiu.lu@intel.com>
3143
3144 PR ld/21964
3145 * elflink.c (bfd_elf_define_start_stop): Check if __start and
3146 __stop symbols are referenced by shared objects.
3147
76cb3a89
AM
31482018-01-30 Alan Modra <amodra@gmail.com>
3149
3150 PR 22758
3151 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
3152 segment when demand paged with lma on the same page. Test this
3153 before load/non-load, executable/non-executable,
3154 writable/non-writable tests and simplify. Delete bogus relro
3155 condition in writable/non-writable test. Delete outdated
3156 comment. Formatting.
3157
36b8fda5
AM
31582018-01-30 Alan Modra <amodra@gmail.com>
3159
3160 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
3161 symbols dynamic.
3162
eb77f6a4
AM
31632018-01-29 Alan Modra <amodra@gmail.com>
3164
3165 PR 22741
3166 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
3167 range before converting to a symbol table pointer.
3168
7d73b4c8
NC
31692018-01-27 Nick Clifton <nickc@redhat.com>
3170
3171 * po/ru.po: Updated Russian translation.
3172
32253bb7
AM
31732018-01-26 Alan Modra <amodra@gmail.com>
3174
3175 * elflink.c (bfd_elf_define_start_stop): Override symbols when
3176 they are defined dynamically.
3177
ba21f564
AM
31782018-01-26 Alan Modra <amodra@gmail.com>
3179
3180 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
3181 .branch_lt changes size.
3182
38e64b0e
AM
31832018-01-25 Alan Modra <amodra@gmail.com>
3184
3185 PR 22746
3186 * elfcode.h (elf_object_p): Avoid integer overflow.
3187
bb363086
EB
31882018-01-25 Eric Botcazou <ebotcazou@adacore.com>
3189
3190 PR ld/22727
3191 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
3192 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
3193
3194 Revert
3195 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
3196
3197 PR ld/22263
3198 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
3199 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
3200 bfd_link_executable for TLS check.
3201 (_bfd_sparc_elf_check_relocs): Likewise.
3202 (allocate_dynrelocs): Likewise.
3203 (_bfd_sparc_elf_relocate_section): Likewise.
3204
1daf502a
RL
32052018-01-24 Renlin Li <renlin.li@arm.com>
3206
3207 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
3208 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3209 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3210 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3211 BFD_RELOC_AARCH64_MOVW_PREL_G3.
3212 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3213 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3214
32247401
RL
32152018-01-24 Renlin Li <renlin.li@arm.com>
3216
3217 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
3218 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
3219 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
3220 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
3221 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
3222 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3223 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3224 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3225 BFD_RELOC_AARCH64_MOVW_PREL_G3.
3226 * bfd-in2.h: Regenerate.
3227 * libbfd.h: Regenerate.
3228
1c5e4ee9
MR
32292018-01-23 Maciej W. Rozycki <macro@mips.com>
3230
3231 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
3232 `mips_elf32_section_processing' comment reference.
3233
8a1b824a
L
32342018-01-20 H.J. Lu <hongjiu.lu@intel.com>
3235
3236 PR ld/22721
3237 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
3238 versioned __tls_get_addr symbol.
3239
ee3fbc1e
NC
32402018-01-19 Nick Clifton <nickc@redhat.com>
3241
3242 * po/fr.po: Updated French translation.
3243
691d2e9a
AM
32442018-01-18 Alan Modra <amodra@gmail.com>
3245
3246 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
3247 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
3248 (ppc64_elf_build_stubs): Likewise.
3249
4bfce128
NC
32502018-01-17 Nick Clifton <nickc@redhat.com>
3251
3252 * po/ru.po: Updated Russian translation.
3253 * po/uk/po: Updated Ukranian translation.
3254
c75bc4f7
AM
32552018-01-17 Alan Modra <amodra@gmail.com>
3256
3257 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
3258
1be5d8d3
AM
32592018-01-17 Alan Modra <amodra@gmail.com>
3260
3261 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
3262 (CRSETEQ, BEQCTRM): Define.
3263 (is_nonpic_glink_stub): Don't check bctr.
3264 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3265 (ppc_elf_relax_section): Size speculation barrier.
3266 (output_bctr): New function.
3267 (write_glink_stub): Use output_bctr.
3268 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
3269 (ppc_elf_finish_dynamic_symbol): Likewise.
3270 (ppc_elf_finish_dynamic_sections): Use output_bctr.
3271 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
3272 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
3273 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
3274 (size_global_entry_stubs): Handle speculation barrier sizing.
3275 (plt_stub_size): Likewise.
3276 (output_bctr): New function.
3277 (build_plt_stub, build_tls_get_addr_stub): Output speculation
3278 barrier.
3279 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
3280 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
3281 (build_global_entry_stubs): Output speculation barrier.
3282 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
3283 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
3284
9e390558
AM
32852018-01-17 Alan Modra <amodra@gmail.com>
3286
3287 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
3288 __tls_get_addr_opt, and alignment sizing.
3289 (TLS_GET_ADDR_GLINK_SIZE): Delete.
3290 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
3291 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
3292 or 8 insns.
3293 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3294 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
3295 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
3296 by PLT reloc count.
3297 (write_glink_stub): Handle __tls_get_addr_opt stub.
3298 Pad out to size given by GLINK_ENTRY_SIZE.
3299 (ppc_elf_relocate_section): Adjust write_glink_stub call.
3300 (ppc_elf_finish_dynamic_symbol): Likewise.
3301 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
3302 insn array since so many need rewriting.
3303 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
3304 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
3305 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
3306 nops. Adjust all uses.
3307 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
3308 in glink_vma calculation.
3309 (struct ppc_link_hash_table): Add global_entry section pointer.
3310 (create_linkage_sections): Create separate section for global
3311 entry stubs.
3312 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
3313 (size_global_entry_stubs): Handle sizing for aligned stubs.
3314 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
3315 and don't stash end of glink branch table in rawsize.
3316 (ppc_build_one_stub): Rewrite stub size calculations.
3317 (build_global_entry_stubs): Use new section.
3318 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
3319 Build lazy link stubs out to end of section. Build global entry
3320 stubs in new section.
3321
616dcb87
NC
33222018-01-15 Nick Clifton <nickc@redhat.com>
3323
3324 * po/uk.po: Updated Ukranian translation.
3325
3957a496
NC
33262018-01-13 Nick Clifton <nickc@redhat.com>
3327
3328 * po/bfd.pot: Regenerated.
3329
769c7ea5
NC
33302018-01-13 Nick Clifton <nickc@redhat.com>
3331
3332 * version.m4: Bump version to 2.30.51
3333 * configure: Regenerate.
3334
faf766e3
NC
33352018-01-13 Nick Clifton <nickc@redhat.com>
3336
3337 2.30 branch created.
3338
564e11c9
JW
33392018-01-12 Jens Widell <jl@opera.com>
3340
3341 * elf.c (setup_group): Optimize search for group by remembering
3342 last found group and restarting search at that index.
3343 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
3344
a78eea16
AM
33452018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
3346
3347 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
3348 bfd_link_common_skip_none in switch.
3349
87e79a65
AM
33502018-01-12 Alan Modra <amodra@gmail.com>
3351
3352 PR ld/22649
3353 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
3354 references on forced local symbols.
3355
58807c48
VI
33562018-01-12 Vlad Ivanov <vlad@ivanov.email>
3357
3358 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
3359 .reginfo section has wrong size.
3360
2888249f
L
33612018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3362
3363 PR ld/22393
3364 * elf.c (_bfd_elf_map_sections_to_segments): When generating
3365 separate code and read-only data LOAD segments, create a new
3366 LOAD segment if the previous section contains text and the
3367 current section doesn't or vice versa. Don't put a writable
3368 section in a read-only segment if there is a RELRO segment.
3369
d664fd41
L
33702018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3371
3372 PR ld/22649
3373 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
3374 references on forced local symbols.
3375
8b6f4cd3
L
33762018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3377
3378 PR ld/22677
3379 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
3380 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
3381
9c70c522 33822018-01-09 Kuan-Lin Chen <kuanlinchentw@gmail.com>
6cef73f9
KLC
3383
3384 PR 22662
3385 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
3386
ddb2bbcf
JB
33872018-01-03 John Baldwin <jhb@FreeBSD.org>
3388
3389 * elf.c (elfcore_grok_freebsd_note): Handle
3390 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
3391 NT_FREEBSD_PROCSTAT_VMMAP.
3392
219d1afa
AM
33932018-01-03 Alan Modra <amodra@gmail.com>
3394
3395 Update year range in copyright notice of all files.
3396
1e563868 3397For older changes see ChangeLog-2017
3499769a 3398\f
1e563868 3399Copyright (C) 2018 Free Software Foundation, Inc.
3499769a
AM
3400
3401Copying and distribution of this file, with or without modification,
3402are permitted in any medium without royalty provided the copyright
3403notice and this notice are preserved.
3404
3405Local Variables:
3406mode: change-log
3407left-margin: 8
3408fill-column: 74
3409version-control: never
3410End:
This page took 0.315362 seconds and 4 git commands to generate.