]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - bfd/ChangeLog
elf: Check for corrupt symbol version info
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
7a815dd5
L
12018-08-25 H.J. Lu <hongjiu.lu@intel.com>
2
3 PR ld/23499
4 * elf.c (_bfd_elf_get_symbol_version_string): Return
5 _("<corrupt>") for corrupt symbol version info.
6
a9eafb08
L
72018-08-24 H.J. Lu <hongjiu.lu@intel.com>
8
9 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Handle
10 X86_COMPAT_ISA_1_USED, X86_COMPAT_ISA_1_NEEDED,
11 X86_UINT32_AND_LO, X86_UINT32_AND_HI, X86_UINT32_OR_LO,
12 X86_UINT32_OR_HI, X86_UINT32_OR_AND_LO and X86_UINT32_OR_AND_HI
13 instead of X86_ISA_1_USED, X86_ISA_1_NEEDED and X86_FEATURE_1_AND.
14 (_bfd_x86_elf_merge_gnu_properties): Likewise.
15 (_bfd_x86_elf_link_setup_gnu_properties): Add X86_FEATURE_2_NEEDED
16 instead of X86_ISA_1_NEEDED.
17 (_bfd_x86_elf_link_fixup_gnu_properties): Handle
18 X86_COMPAT_ISA_1_USED, X86_COMPAT_ISA_1_NEEDED, X86_UINT32_AND_LO,
19 X86_UINT32_AND_HI, X86_UINT32_OR_LO, X86_UINT32_OR_HI,
20 X86_UINT32_OR_AND_LO and X86_UINT32_OR_AND_HI instead of
21 X86_ISA_1_USED, X86_ISA_1_NEEDED and X86_FEATURE_1_AND.
22
aa7bca9b
L
232018-08-24 H.J. Lu <hongjiu.lu@intel.com>
24
25 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Mask out the
26 GNU_PROPERTY_X86_UINT32_VALID bit.
27 (_bfd_x86_elf_link_fixup_gnu_properties): Set the
28 GNU_PROPERTY_X86_UINT32_VALID bit for non-relocatable output.
29
b0ceb98a
Z
302018-08-23 Zenith423 <zenith432@users.sourceforge.net>
31
32 PR 23460
33 * plugin.c (struct plugin_list_entry): New structure.
34 (plugin_list): New variable.
35 (try_load_plugin): Place opened plugins on a list. Ensure that
36 the refcount in the dynamic loader is kept at 1.
37
f53ad3cf
AM
382018-08-23 Alan Modra <amodra@gmail.com>
39
40 * elf64-ppc.c (ppc64_elf_relocate_section): Revise "call lacks
41 nop" error message.
42
38cf70ca
NC
432018-08-23 Nick Clifton <nickc@redhat.com>
44
45 * elf64-hppa.c (elf_hppa_final_link_relocate): Replace unworkable
46 code with an assertion.
47
334d4ced
NC
482018-08-23 Nick Clifton <nickc@redhat.com>
49
50 PR 23061
51 * coffgen.c (coff_pointerize_aux): Add table_end parameter. Use
52 it to prevent walking off the end of the table.
53 (coff_get_normalized_symtab): Pass internal_end pointer to
54 coff_pointerize_aux.
55
d0abeec8
AM
562018-08-23 Alan Modra <amodra@gmail.com>
57
58 * elf64-ppc.c (ppc64_elf_relocate_section): Don't miss clearing
59 unresolved_reloc on ppc_stub_plt_call_notoc.
60
9eef0608
L
612018-08-22 H.J. Lu <hongjiu.lu@intel.com>
62
63 PR ld/23536
64 * development.sh (experimental): New.
65
6f4286c4
HD
662018-08-22 Helge Deller <deller@gmx.de>
67 Nick Clifton <nickc@redhat.com>
68
69 * elf-hppa.h (elf_hppa_fake_sections): Use SHT_PARISC_UNWIND as
70 the section type of the .PARISC.unwind section on 64-bit binaries
71 and SHT_PROGBITS for 32-bit binaries. Add a comment about it.
72 Add comment about the sh_entsize value.
73
3da64fe4
RA
742018-08-22 Rafeal Auler <rafaelauler@gmail.com>
75
76 PR 23560
77 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Always update the
78 stub's target, since it may have been changed after the layout.
79
ebf983a4 802018-08-21 John Darington <john@darrington.wattle.id.au>
4e57b456
JD
81
82 * elf32-s12z.c (opru18_reloc): New function.
ebf983a4 83 (elf_s12z_howto_table): Adjust Howto according to new knowledge.
4e57b456 84
ae19acf3 852018-08-21 mephi42 <mephi42@gmail.com>
86
87 PR binutils/23315
88 * mach-o.c (bfd_mach_o_mangle_symbols): Update n_type even if
89 data is already considered filled.
90
46807bf4
AM
912018-08-21 Alan Modra <amodra@gmail.com>
92
93 * elf64-ppc.c (HOW): Define.
94 (ONES): Delete.
95 (ppc64_elf_howto_raw): Use HOW to initialize entries.
96 * elf32-ppc.c (HOW): Define.
97 (ppc_elf_howto_raw): Use HOW to initialize entries, updating
98 R_PPC_VLE_REL15 and R_PPC_VLE_REL24 to use bitpos=0.
99
706704c8
AM
1002018-08-21 Alan Modra <amodra@gmail.com>
101
102 * reloc.c (reloc_howto_type): Typedef.
103 (bfd_symbol): Delete forward declaration.
104 (struct reloc_howto_struct): Add "negate" field. Make "size",
105 "bitsize", "rightshift", "bitpos", "complain_on_overflow",
106 "pc_relative", "partial_inplace", and "pcrel_offset" bitfields.
107 Rearrange for better packing. Revise comments.
108 (HOWTO): Map to rearranged reloc_howto_struct.
109 (bfd_get_reloc_size): Delete now unused cases.
110 (read_reloc, write_reloc): Likewise.
111 (apply_reloc, _bfd_relocate_contents): Test howto->negate
112 rather than howto->size < 0 for negated relocation values.
113 * coff-rs6000.c (xcoff_complain_overflow_bitfield_func): Avoid
114 signed/unsigned warning.
115 (xcoff_ppc_relocate_section): Delete "condition is always false"
116 code.
117 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
118 * cpu-ns32k.c (do_ns32k_reloc): Adjust to suit reloc_howto_struct
119 changes.
120 * vms-alpha.c (_bfd_vms_write_etir, alpha_vms_slurp_relocs): Use
121 size 16 for ALPHA_R_LINKAGE.
122 (alpha_howto_table <ALPHA_R_LINKAGE>): Set encoded size and
123 bitsize to zero.
124 * bfd-in.h (reloc_howto_type): Delete.
125 * bfd-in2.h: Regenerate.
126
487096bf
AM
1272018-08-21 Alan Modra <amodra@gmail.com>
128
129 * reloc.c (HOWTO): Revise comment.
130 (NEWHOWTO, HOWTO_PREPARE): Delete.
131 * coff-arm.c (coff_arm_reloc_type_lookup): Replace const struc
132 reloc_howto_struct with reloc_howto_type.
133 * ns32knetbsd.c (MY_bfd_reloc_type_lookup): Likewise.
134 * vms-alpha.c (alpha_vms_bfd_reloc_type_lookup): Likewise.
135 * elf-hppa.h (HOW): Define.
136 (elf_hppa_howto_table): Use it to simplify this table, correcting
137 name of R_PARISC_LTOFF16WF, R_PARISC_LTOFF_FPTR64, and
138 R_PARISC_LTOFF_FPTR16DF.
139 * elf32-mep.c (MEPREL): Use HOWTO.
140 * bfd-in2.h: Regenerate.
141
865dcc8a
AM
1422018-08-20 Alan Modra <amodra@gmail.com>
143
144 * mmo.c (valid_mmo_symbol_character_set): Initialize and make
145 array const.
146 (mmo_init): Don't init valid_mmo_symbol_character_set.
147
ba1c4c6f
AM
1482018-08-20 Alan Modra <amodra@gmail.com>
149
150 * rs6000-core.c (CORE_COMMONSZ): Balance parentheses in expression.
151
bfb1e8c1
L
1522018-08-17 H.J. Lu <hongjiu.lu@intel.com>
153
154 PR ld/23515
155 * elf-bfd.h (elf_backend_data): Add fixup_gnu_properties.
156 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Call
157 backend fixup_gnu_properties if it isn't NULL. Discard
158 .note.gnu.property section if all properties have been removed.
159 * elfxx-target.h (elf_backend_fixup_gnu_properties): New.
160 (elfNN_bed): Initialize fixup_gnu_properties.
161 * elfxx-x86.c (_bfd_x86_elf_link_fixup_gnu_properties): New
162 function.
163 * elfxx-x86.h (_bfd_x86_elf_link_fixup_gnu_properties): New
164 prototype.
165 (elf_backend_fixup_gnu_properties): New.
166
2cdcc330
AM
1672018-08-16 Alan Modra <amodra@gmail.com>
168
169 * elf64-ppc.c: Correct ppc_stub_long_branch_notoc example.
170 Formatting.
171
98641896
L
1722018-08-12 H.J. Lu <hongjiu.lu@intel.com>
173
174 PR binutils/23494
175 * Makefile.am (BFD32_LIBS): Add elf-properties.lo.
176 (BFD32_LIBS_CFILES): Add elf-properties.c.
177 (BFD32_BACKENDS): Remove elf-properties.lo.
178 (BFD32_BACKENDS_CFILES): Remove elf-properties.c.
179 * configure.ac (elf): Remove elf-properties.lo.
180 * Makefile.in: Regenerated.
181 * configure: Likewise.
182
ab9e3428
L
1832018-08-11 H.J. Lu <hongjiu.lu@intel.com>
184
185 PR ld/23428
186 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Don't
187 add X86_ISA_1_NEEDED property only if existing properties won't
188 be removed.
189
1dc9e2d6
AM
1902018-08-11 Alan Modra <amodra@gmail.com>
191
192 * reloc.c (bfd_get_reloc_size): Sort switch.
193 (read_reloc, write_reloc, apply_reloc): New functions.
194 (bfd_perform_relocation, bfd_install_relocation): Use apply_reloc.
195 (_bfd_relocate_contents): Use read_reloc and write_reloc.
196 (_bfd_clear_contents): Likewise.
197
7cf9ebc6
JD
1982018-08-11 John Darrington <john@darrington.wattle.id.au>
199
200 * reloc.c (_bfd_relocate_contents): Handle 3 byte relocs.
201 (_bfd_clear_contents): Likewise.
202 (bfd_perform_relocation): Likewise.
203 (bfd_install_relocation): Likewise.
204
48e30f52
L
2052018-08-10 H.J. Lu <hongjiu.lu@intel.com>
206
207 PR ld/23499
208 * elflink.c (bfd_elf_record_link_assignment): Always clear
209 h->verinfo.verdef when overriding a dynamic definition.
210
9c973a29
L
2112018-08-10 H.J. Lu <hongjiu.lu@intel.com>
212
213 PR binutils/23494
214 * elf-properties.c (elf_get_gnu_property_section_size): Always
215 use align_size as pr_datasz for GNU_PROPERTY_STACK_SIZE.
216 (elf_write_gnu_properties): Likewise.
217
6404ab99
L
2182018-08-08 H.J. Lu <hongjiu.lu@intel.com>
219
220 PR binutils/23494
221 * bfd.c (bfd_convert_section_size): Check BFD_DECOMPRESS after
222 calling _bfd_elf_convert_gnu_property_size to convert
223 .note.gnu.property section size.
224 (bfd_convert_section_contents): Check BFD_DECOMPRESS after
225 calling _bfd_elf_convert_gnu_properties to convert
226 .note.gnu.property section.
227 * elf-bfd.h (_bfd_elf_convert_gnu_property_size): New prototype.
228 (_bfd_elf_convert_gnu_properties): Likewise.
229 * elf-properties.c (elf_get_gnu_property_section_size): New
230 function.
231 (elf_write_gnu_properties): Likewise.
232 (_bfd_elf_convert_gnu_property_size): Likewise.
233 (_bfd_elf_convert_gnu_properties): Likewise.
234 (_bfd_elf_link_setup_gnu_properties): Use
235 elf_get_gnu_property_section_size and elf_write_gnu_properties.
236
f7309df2
L
2372018-08-08 H.J. Lu <hongjiu.lu@intel.com>
238
239 PR ld/23486
240 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove
241 GNU_PROPERTY_X86_ISA_1_USED if an input file doesn't have it.
242 (_bfd_x86_elf_link_setup_gnu_properties): Adding the
243 GNU_PROPERTY_X86_ISA_1_NEEDED, instead of
244 GNU_PROPERTY_X86_ISA_1_USED, property.
245
df136d64
AM
2462018-08-07 Alan Modra <amodra@gmail.com>
247
248 * elf64-ppc.c (struct map_stub): Delete tls_get_addr_opt_bctrl.
249 Add lr_restore, eh_size and eh_base.
250 (eh_advance, eh_advance_size): New functions.
251 (build_tls_get_addr_stub): Emit EH info for stub.
252 (ppc_build_one_stub): Likewise for _notoc stubs.
253 (ppc_size_one_stub): Size EH info for stub.
254 (group_sections): Init new map_stub fields.
255 (stub_eh_frame_size): Delete.
256 (ppc64_elf_size_stubs): Size EH info for stubs. Set up dummy EH
257 program for stubs.
258 (ppc64_elf_build_stubs): Reinit new map_stub fields. Set FDE
259 offset to stub section here..
260 (ppc64_elf_finish_dynamic_sections): ..rather than here.
261
e81b4c93
AM
2622018-08-07 Alan Modra <amodra@gmail.com>
263
264 * elf64-ppc.c (ppc64_elf_relocate_section): Don't skip first
265 instruction of __tls_get_addr_opt stub.
266 (plt_stub_size): Omit ALWAYS_EMIT_R2SAVE condition when
267 dealing with __tls_get_addr_opt stub.
268 (build_tls_get_addr_stub, ppc_size_one_stub): Likewise.
269
6af04484
CZ
2702018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
271
272 * elf32-arc.c (arc_elf_merge_private_bfd_data): Complain about
273 efalgs only when in/out exists.
274 (elf32_arc_section_from_shdr): Don't complain about 0x0c
275 section type. It is mwdt compiler specific.
276
2fd43d78 2772018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
278
279 * elf32-arc.c (arc_elf_merge_attributes): Fix merge attributes.
280
db1e1b45 2812018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
282
283 * elf32-arc.c (arc_elf_merge_attributes): Handle
284 Tag_ARC_ATR_version.
285
05d0e962
AM
2862018-08-05 Alan Modra <amodra@gmail.com>
287
288 * elf64-ppc.c (ADDI_R12_R11, ADDI_R12_R12, LIS_R12),
289 (ADDIS_R12_R11, ORIS_R12_R12_0, ORI_R12_R12_0),
290 (SLDI_R12_R12_32, LDX_R12_R11_R12, ADD_R12_R11_R12): Define.
291 (ppc64_elf_howto_raw): Add R_PPC64_REL24_NOTOC entry.
292 (ppc64_elf_reloc_type_lookup): Support R_PPC64_REL24_NOTOC.
293 (ppc_stub_type): Add ppc_stub_long_branch_notoc,
294 ppc_stub_long_branch_both, ppc_stub_plt_branch_notoc,
295 ppc_stub_plt_branch_both, ppc_stub_plt_call_notoc, and
296 ppc_stub_plt_call_both.
297 (is_branch_reloc): Add R_PPC64_REL24_NOTOC.
298 (build_offset, size_offset): New functions.
299 (plt_stub_size): Support plt_call_notoc and plt_call_both.
300 (ppc_build_one_stub, ppc_size_one_stub): Support new stubs.
301 (toc_adjusting_stub_needed): Handle R_PPC64_REL24_NOTOC.
302 (ppc64_elf_size_stubs): Likewise, and new stubs.
303 (ppc64_elf_build_stubs, ppc64_elf_relocate_section): Likewise.
304 * reloc.c: Add BFD_RELOC_PPC64_REL24_NOTOC.
305 * bfd-in2.h: Regenerate.
306 * libbfd.h: Regenerate.
307
3f6ff479
AM
3082018-08-05 Alan Modra <amodra@gmail.com>
309
310 * elf64-ppc.c (ppc_build_one_stub): Lose "_r2off" in stub symbols.
311
13755f40
JW
3122018-08-02 Jim Wilson <jimw@sifive.com>
313
314 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): For .tdata.dyn,
315 add SEC_LINKER_CREATED flag.
316
4a9f7d65
NC
3172018-08-01 Nick Clifton <nickc@redhat.com>
318
c25179e7
NC
319 * coff-rs6000.c (_bfd_xcoff_put_ldsymbol_name): Suppress warnings
320 about potentially truncated strncpy operations.
321 (_bfd_xcoff_put_symbol_name): Likewise.
322
4a9f7d65
NC
323 * elf32-avr.c (avr_stub_name): Check for a NULL return from
324 bfd_malloc.
325
103da91b
NC
3262018-08-01 Zenith <zenith432@users.sourceforge.net>
327
328 PR 23460
329 * plugin.c (bfd_plugin_open_input): Close file descriptor if the
330 call to fstat fails.
331 (try_claim): Always close the file descriptor at the end of the
332 function.
333 (try_load_plugin): If a plugin has already been registered, then
334 skip the dlopen and onload steps and go straight to claiming the
335 file. If these is an error, close the plugin.
336
1aa42141
AM
3372018-08-01 Alan Modra <amodra@gmail.com>
338
339 * elf64-ppc.c (plt_stub_pad): Delay plt_stub_size call until needed.
340 (ppc_build_one_stub): Don't set stub_offset, instead assert that
341 it is sane. Don't adjust stub_offset for alignment. Adjust size
342 calculation. Use "targ" temp when calculating offsets.
343 (ppc_size_one_stub): Set stub_offset here. Use "targ" temp when
344 calculating offsets. Adjust for alignment before setting
345 tls_get_addr_opt_bctrl.
346
cb86a42a
AM
3472018-08-01 Alan Modra <amodra@gmail.com>
348
349 * po/SRC-POTFILES.in: Regenerate.
350
a05b9f5e
NC
3512018-07-30 Nick Clifton <nickc@redhat.com>
352
353 PR 22706
354 * elf32-sh.c (sh_elf_relocate_section): When processing
355 translation relocs, fail if the relocation offset is too small.
356 Replace BFD_ASSERTs with more helpful error messages.
357
b8891f8d
AJ
3582018-07-30 Andrew Jenner <andrew@codesourcery.com>
359
360 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES): Add C-SKY.
361 (BFD32_BACKENDS, BFD_BACKENDS_CFILES): Likewise.
362 * Makefile.in: Regenerated.
363 * archures.c (enum bfd_architecture): Add bfd_arch_csky and
364 related bfd_mach defines.
365 (bfd_csky_arch): Declare.
366 (bfd_archures_list): Add C-SKY.
367 * bfd-in.h (elf32_csky_build_stubs): Declare.
368 (elf32_csky_size_stubs): Declare.
369 (elf32_csky_next_input_section: Declare.
370 (elf32_csky_setup_section_lists): Declare.
371 * bfd-in2.h: Regenerated.
372 * config.bfd: Add C-SKY.
373 * configure.ac: Likewise.
374 * configure: Regenerated.
375 * cpu-csky.c: New file.
376 * elf-bfd.h (enum elf_target_id): Add C-SKY.
377 * elf32-csky.c: New file.
378 * libbfd.h: Regenerated.
379 * reloc.c: Add C-SKY relocations.
380 * targets.c (csky_elf32_be_vec, csky_elf32_le_vec): Declare.
381 (_bfd_target_vector): Add C-SKY target vector entries.
382
469d3b57
JD
3832018-07-27 John Darrington <john@darrington.wattle.id.au>
384
385 * elf32-s12z.c (ELF_TARGET_ID): Don't define.
386
370e4b50
JD
3872018-07-27 John Darrington <john@darrington.wattle.id.au>
388
389 * libbfd.c (bfd_getb24, bfd_getl24): New functions.
390 (bfd_get_24, bfd_put_24): New macros.
391 * bfd-in2.h: Regenerate.
392
cd4d353f
JD
3932018-07-27 John Darrington <john@darrington.wattle.id.au>
394
395 * elf32-s12z.c (s12z_elf_set_mach_from_flags): Remove comment.
396
33cb30a1
AM
3972018-07-26 Alan Modra <amodra@gmail.com>
398
399 * elf64-ppc.c (ppc64_elf_size_stubs): Use a ppc_stub_long_branch_r2off
400 for calls to symbols with STO_PPC64_LOCAL_MASK bits set to 1.
401
49199304
AM
4022018-07-25 Alan Modra <amodra@gmail.com>
403
404 * elf32-ppc.c (ppc_elf_relax_section): Ignore common or undef locals.
405 Avoid trashing toff with added when used as a symbol index.
406 Ignore R_PPC_PLTREL24 addends in unused example code. Avoid
407 creating unnecessary fixups when relocatable.
408
be3e27bb
AM
4092018-07-25 Alan Modra <amodra@gmail.com>
410
411 * elf32-arm.c (elf32_arm_nabi_write_core_note): Disable
412 -Wstringop-truncation warning for gcc-8.0 too.
413 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
414 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
415 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
416 * elf32-s390.c (elf_s390_write_core_note): Comment fix.
417 * elf64-s390.c (elf_s390_write_core_note): Likewise.
418
67ce483b
AM
4192018-07-24 Alan Modra <amodra@gmail.com>
420
421 PR 23430
422 * dwarf2.c (dwarf_debug_section_enum): Fix comment typo.
423 * elf.c (bfd_section_from_shdr, elf_sort_sections): Likewise.
424
f82863d7
MF
4252018-07-23 Max Filippov <jcmvbkbc@gmail.com>
426
427 * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Move
428 relocation sections consistency check to always check both
429 .rela.dyn and .rela.plt when they exist. Rearrange variable
430 definition and assignment places.
431
5d3a462f
MF
4322018-07-23 Max Filippov <jcmvbkbc@gmail.com>
433
434 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Shrink dynamic
435 relocations section for dynamic undefined weak symbols when
436 linking a shared object.
437
01bcaf63
TT
4382018-07-23 Tom Tromey <tom@tromey.com>
439
440 * elf.c (bfd_get_elf_phdrs): Don't call memcpy with size 0.
441
2376f038
EB
4422018-07-21 Eric Botcazou <ebotcazou@adacore.com>
443
444 * elf32-arm.c (elf32_arm_final_link_relocate) <R_ARM_GOT32>: Small
445 cleanup for the case of a global symbol that binds locally. Also
446 install a value in the GOT slot in the case of a local symbol in
447 a non-PIC link.
448
241e64e3
L
4492018-07-20 H.J. Lu <hongjiu.lu@intel.com>
450
451 PR ld/23428
452 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): If the
453 separate code program header is needed, make sure that the first
454 read-only PT_LOAD segment has no code by adding a
455 GNU_PROPERTY_X86_ISA_1_USED note.
456
8095d2f7
CX
4572018-07-20 Chenghua Xu <paul.hua.gm@gmail.com>
458 Maciej W. Rozycki <macro@mips.com>
459
460 * elfxx-mips.c (print_mips_ases): Add MMI extension.
461
db841b6f
MR
4622018-07-20 Maciej W. Rozycki <macro@mips.com>
463
464 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Do not
465 create DT_REL, DT_RELSZ or DT_RELENT dynamic entries if the
466 dynamic relocation section will be discarded from output.
467 (_bfd_mips_elf_finish_dynamic_sections) <DT_RELSZ>: Assert that
468 the dynamic relocation section will be retained in output.
469
d3554ec1
MR
4702018-07-18 Maciej W. Rozycki <macro@mips.com>
471
472 * xcofflink.c (xcoff_write_global_symbol): Fix symbol type
473 checks for defined weak symbols.
474
c691de6a
MR
4752018-07-17 Maciej W. Rozycki <macro@mips.com>
476
477 * elf32-nds32.c (nds32_elf_relax_loadstore): Use
478 `bfd_is_abs_symbol' rather than `bfd_is_abs_section' in checking
479 whether the symbol is absolute.
480 (nds32_elf_relax_lo12): Likewise.
481 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
482 (elfNN_aarch64_check_relocs): Likewise.
483 * xcofflink.c (xcoff_need_ldrel_p): Likewise.
484 (bfd_xcoff_import_symbol): Likewise.
485 (xcoff_write_global_symbol): Likewise.
486
d5c928c0
MR
4872018-07-17 Maciej W. Rozycki <macro@mips.com>
488
489 * linker.c (bfd_is_abs_symbol): New macro.
490 * bfd-in2.h: Regenerate.
491
cb2366c1
EBM
4922018-07-16 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
493
494 * elf-bfd.h (elfcore_write_ppc_tar): Add prototype.
495 (elfcore_write_ppc_ppr): Likewise.
496 (elfcore_write_ppc_dscr): Likewise.
497 (elfcore_write_ppc_ebb): Likewise.
498 (elfcore_write_ppc_pmu): Likewise.
499 (elfcore_write_ppc_tm_cgpr): Likewise.
500 (elfcore_write_ppc_tm_cfpr): Likewise.
501 (elfcore_write_ppc_tm_cvmx): Likewise.
502 (elfcore_write_ppc_tm_cvsx): Likewise.
503 (elfcore_write_ppc_tm_spr): Likewise.
504 (elfcore_write_ppc_tm_ctar): Likewise.
505 (elfcore_write_ppc_tm_cppr): Likewise.
506 (elfcore_write_ppc_tm_cdscr): Likewise.
507 * elf.c (elfcore_write_ppc_tar): New function.
508 (elfcore_write_ppc_ppr): Likewise.
509 (elfcore_write_ppc_dscr): Likewise.
510 (elfcore_write_ppc_ebb): Likewise.
511 (elfcore_write_ppc_pmu): Likewise.
512 (elfcore_write_ppc_tm_cgpr): Likewise.
513 (elfcore_write_ppc_tm_cfpr): Likewise.
514 (elfcore_write_ppc_tm_cvmx): Likewise.
515 (elfcore_write_ppc_tm_cvsx): Likewise.
516 (elfcore_write_ppc_tm_spr): Likewise.
517 (elfcore_write_ppc_tm_ctar): Likewise.
518 (elfcore_write_ppc_tm_cppr): Likewise.
519 (elfcore_write_ppc_tm_cdscr): Likewise.
520 (elfcore_write_register_note): Call them.
521 (elfcore_grok_ppc_tar): New function.
522 (elfcore_grok_ppc_ppr): Likewise.
523 (elfcore_grok_ppc_dscr): Likewise.
524 (elfcore_grok_ppc_ebb): Likewise.
525 (elfcore_grok_ppc_pmu): Likewise.
526 (elfcore_grok_ppc_tm_cgpr): Likewise.
527 (elfcore_grok_ppc_tm_cfpr): Likewise.
528 (elfcore_grok_ppc_tm_cvmx): Likewise.
529 (elfcore_grok_ppc_tm_cvsx): Likewise.
530 (elfcore_grok_ppc_tm_spr): Likewise.
531 (elfcore_grok_ppc_tm_ctar): Likewise.
532 (elfcore_grok_ppc_tm_cppr): Likewise.
533 (elfcore_grok_ppc_tm_cdscr): Likewise.
534 (elfcore_grok_note): Call them.
535
1cb83cac
MR
5362018-07-11 Maciej W. Rozycki <macro@mips.com>
537
538 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
539 than `!bfd_link_pic' in determining the dynamic symbol index.
540 Avoid the index of -1.
541 (mips_elf_initialize_tls_slots): Likewise. Flatten code by
542 moving `dyn' to the beginning of the function block.
543
9143e72c
MR
5442018-07-11 Maciej W. Rozycki <macro@mips.com>
545 Rich Felker <bugdal@aerifal.cx>
546
547 PR ld/22570
548 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
549 than `bfd_link_pic' to determine whether dynamic relocations are
550 to be produced.
551 (mips_elf_initialize_tls_slots): Likewise.
552
5270eddc
MR
5532018-07-10 Maciej W. Rozycki <macro@mips.com>
554
555 * elflink.c (bfd_elf_final_link): Rename `remove' local variable
556 to `remove_section'.
557
1594e052
AM
5582018-07-10 Alan Modra <amodra@gmail.com>
559
560 * elf32-xgate.h: Delete.
561 * elf32-xgate.c: Delete unnecessary forward declarations, add two
562 that are now needed.
563 (xgate_elf_bfd_link_hash_table_create)
564 (xgate_elf_bfd_link_hash_table_free)
565 (xgate_elf_set_mach_from_flags, struct xgate_scan_param)
566 (stub_hash_newfunc, elf32_xgate_add_symbol_hook)
567 (elf32_xgate_setup_section_lists, elf32_xgate_size_stubs)
568 (elf32_xgate_build_stubs, elf32_xgate_check_relocs)
569 (elf32_xgate_relocate_section, _bfd_xgate_elf_set_private_flags)
570 (elf32_xgate_post_process_headers): Delete.
571 (elf32_xgate_backend_symbol_processing): New function.
572 (xgate_elf_ignore_reloc, xgate_elf_special_reloc)
573 (_bfd_xgate_elf_print_private_bfd_data): Make static.
574 (ELF_TARGET_ID, elf_info_to_howto, elf_backend_check_relocs)
575 (elf_backend_relocate_section, elf_backend_object_p)
576 (elf_backend_final_write_processing, elf_backend_can_gc_sections)
577 (elf_backend_post_process_headers, elf_backend_add_symbol_hook)
578 (bfd_elf32_bfd_link_hash_table_create)
579 (bfd_elf32_bfd_set_private_flags)
580 (xgate_stub_hash_lookup): Don't define.
581 (elf_backend_symbol_processing): Define.
582 * elf-bfd.h (elf_target_id): Delete XGATE_ELF_DATA.
583
4b8377e7
MR
5842018-07-09 Maciej W. Rozycki <macro@mips.com>
585
586 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Don't set
587 `->needs_lazy_stub' if the stubs output section is the absolute
588 section.
589
872899f1
L
5902018-07-09 H.J. Lu <hongjiu.lu@intel.com>
591
592 PR ld/23388
593 * configure.ac: Use changequote for "i[3-7]86-*-linux-*".
594 * configure: Regenerated.
595
61658d78
AM
5962018-07-09 Alan Modra <amodra@gmail.com>
597
598 * elf32-m68hc1x.c (elf32_m68hc11_post_process_headers): Call
599 _bfd_elf_post_process_headers.
600
c451bb34
MF
6012018-07-06 Max Filippov <jcmvbkbc@gmail.com>
602
603 * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Don't allocate
604 space for dynamic relocation for undefined weak symbol.
605 (elf_xtensa_relocate_section): Don't emit R_XTENSA_RELATIVE
606 relocation for undefined weak symbols.
607 (shrink_dynamic_reloc_sections): Don't shrink dynamic relocation
608 section for relocations against undefined weak symbols.
609
ad1cc4e4
AH
6102018-07-06 Alan Hayward <alan.hayward@arm.com>
611
612 * elf.c (elfcore_grok_aarch_sve): New function.
613 (elfcore_grok_note): Check for Aarch64 SVE.
614 (elfcore_write_aarch_sve): New function.
615 (elfcore_write_register_note): Check for Aarch64 SVE.
616 * elf-bfd.h(elfcore_grok_aarch_sve): New declaration.
617
fe75810f
AM
6182018-07-06 Alan Modra <amodra@gmail.com>
619
620 * elf32-arm.c (elf32_arm_nabi_write_core_note): Don't use
621 DIAGNOTIC_PUSH and DIAGNOSTIC_POP unconditionally.
622 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
623 * elf32-s390.c (elf_s390_write_core_note): Likewise.
624 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
625 * elf64-s390.c (elf_s390_write_core_note): Likewise.
626 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
627
bb11866d
JW
6282018-07-05 Jim Wilson <jimw@sifive.com>
629
630 * config.bfd (riscv32*-*-*): Renamed from riscv32-*-*.
631 (riscv64*-*-*): Likewise.
632 (riscv-*-*): Add as an alias for riscv32*-*-*.
633
56ad703d
L
6342018-07-05 H.J. Lu <hongjiu.lu@intel.com>
635
636 PR ld/23372
637 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove x86
638 ISA properties with empty bits.
639
d8dab054
NC
6402018-07-05 Nick Clifton <nickc@redhat.com>
641
642 * po/ru.po: Updated Russian translation.
643
4a91d0ba
AM
6442018-07-05 Alan Modra <amodra@gmail.com>
645
646 * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Update prototype.
647 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Return error
648 on mismatch. Remove "warning: " from messages. Track last bfd
649 used to set tags.
650 (ppc_elf_merge_obj_attributes): Likewise. Handle status from
651 _bfd_elf_ppc_merge_fp_attributes.
652 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Handle status
653 from _bfd_elf_ppc_merge_fp_attributes.
654
db40acb0
L
6552018-07-04 H.J. Lu <hongjiu.lu@intel.com>
656
657 * Makefile.am (bfdinclude_HEADERS): Add $(INCDIR)/diagnostics.h.
658 * Makefile.in: Regenerated.
659
b8a6ced7
AM
6602018-07-03 Alan Modra <amodra@gmail.com>
661
662 * elflink.c (bfd_elf_final_link): Remove zero size .gnu.attributes
663 sections.
664
8d2c8c3d
AM
6652018-07-03 Alan Modra <amodra@gmail.com>
666
667 * elf-bfd.h (ATTR_TYPE_FLAG_ERROR, ATTR_TYPE_HAS_ERROR): Define.
668 * elf-attrs.c (is_default_attr): Handle ATTR_TYPE_HAS_ERROR.
669 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Use
670 ATTR_TYPE_FLAG_INT_VAL. Set ATTR_TYPE_HAS_ERROR on finding
671 incompatible attribute.
672 (ppc_elf_merge_obj_attributes): Likewise. Return
673 _bfd_elf_merge_object_attributes result.
674 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Return
675 _bfd_elf_merge_object_attributes result.
676
af0bfb9c
AM
6772018-07-03 Alan Modra <amodra@gmail.com>
678
679 PR 17550
680 * elflink.c (_bfd_elf_fix_symbol_flags): Hide dynamic symbols
681 in discarded sections.
682
12f09816
MR
6832018-07-02 Maciej W. Rozycki <macro@mips.com>
684
685 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Set
686 `mark' for symbols created from `mips_elf_dynsym_rtproc_names'
687 list.
688
156f2c00
MR
6892018-07-02 Maciej W. Rozycki <macro@mips.com>
690
691 * elf64-mips.c (micromips_elf64_howto_table_rel): Add
692 R_MICROMIPS_HI0_LO16, R_MICROMIPS_TLS_GD, R_MICROMIPS_TLS_LDM,
693 R_MICROMIPS_TLS_DTPREL_HI16, R_MICROMIPS_TLS_DTPREL_LO16,
694 R_MICROMIPS_TLS_GOTTPREL, R_MICROMIPS_TLS_TPREL_HI16,
695 R_MICROMIPS_TLS_TPREL_LO16, R_MICROMIPS_GPREL7_S2 and
696 R_MICROMIPS_PC23_S2 relocation entries.
697 (micromips_elf64_howto_table_rela): Likewise.
698 (micromips_reloc_map): Likewise.
699 * elfn32-mips.c (elf_micromips_howto_table_rel): Likewise.
700 (elf_micromips_howto_table_rela): Likewise.
701 (micromips_reloc_map): Likewise.
702
b638b5d5
L
7032018-07-02 H.J. Lu <hongjiu.lu@intel.com>
704
705 PR ld/23324
706 * elf64-x86-64.c (elf_x86_64_relocate_section): Clear the
707 R_X86_64_converted_reloc_bit bit.
708
eac61af6
TT
7092018-07-02 Jeff Muizelaar <jrmuizel@gmail.com>
710 Tom Tromey <tom@tromey.com>
711
712 PR 13157
713 PR 21787
714 * mach-o.c (bfd_mach_o_fat_close_and_cleanup): New function.
715 (bfd_mach_o_close_and_cleanup): Redefine.
716 * archive.c (_bfd_unlink_from_archive_parent): New function,
717 extracted from..
718 (_bfd_archive_close_and_cleanup): ..here.
719 (bfd_generic_archive_p): Do not clear archive's format.
720 * libbfd-in.h (_bfd_unlink_from_archive_parent): Declare.
721 * libbfd.h: Regenerate.
722
c0c468d5
TP
7232018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
724
725 * archures.c (bfd_mach_arm_5TEJ, bfd_mach_arm_6, bfd_mach_arm_6KZ,
726 bfd_mach_arm_6T2, bfd_mach_arm_6K, bfd_mach_arm_7, bfd_mach_arm_6M,
727 bfd_mach_arm_6SM, bfd_mach_arm_7EM, bfd_mach_arm_8, bfd_mach_arm_8R,
728 bfd_mach_arm_8M_BASE, bfd_mach_arm_8M_MAIN): Define.
729 * bfd-in2.h: Regenerate.
730 * cpu-arm.c (arch_info_struct): Add entries for above new
731 bfd_mach_arm values.
732 * elf32-arm.c (bfd_arm_get_mach_from_attributes): Add Tag_CPU_arch to
733 bfd_mach_arm mapping logic for pre Armv4 and Armv5TEJ and later
734 architectures. Force assert failure for any new Tag_CPU_arch value.
735
a05a5b64
TP
7362018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
737
738 * doc/bfdint.texi: Use command-line consistently when used in a
739 compount word.
740 * doc/bfdsumm.texi: Likewise.
741
262e07d0
MR
7422018-06-29 Maciej W. Rozycki <macro@mips.com>
743
744 * elfxx-mips.c (allocate_dynrelocs): Remove extraneous symbol
745 visibility check made for undefined weak symbols.
746
30aa1306
NC
7472018-06-26 Nick Clifton <nickc@redhat.com>
748
749 * po/uk.po: Updated Ukranian translation.
750
bb69498c
NC
7512018-06-25 Nick Clifton <nickc@redhat.com>
752
753 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_stub_name): Check
754 for malloc returning NULL.
755 (_bfd_aarch64_erratum_843419_fixup): Check for
756 _bfd_aarch64_erratum_835769_stub_name returning NULL.
757
71300e2c
NC
7582018-06-24 Nick Clifton <nickc@redhat.com>
759
760 * po/bfd.pot: Regenerate.
761
5127f207
NC
7622018-06-24 Nick Clifton <nickc@redhat.com>
763
764 * version.m4: Update version string to 2.31.51.
765 * configure: Regenerate.
766
719d8288
NC
7672018-06-24 Nick Clifton <nickc@redhat.com>
768
769 2.31 branch created.
770
1ced1a5f
MR
7712018-06-21 Maciej W. Rozycki <macro@mips.com>
772
773 * elfxx-mips.c (_bfd_mips_elf_compact_eh_encoding)
774 (_bfd_mips_elf_cant_unwind_opcode): Correct formatting.
775
334cd8a7
MR
7762018-06-21 Maciej W. Rozycki <macro@mips.com>
777
778 * elfxx-mips.c (_bfd_mips_post_process_headers): Keep
779 EI_ABIVERSION setting together.
780
bb29b84d
MR
7812018-06-21 Maciej W. Rozycki <macro@mips.com>
782
783 * elfxx-mips.c (MIPS_LIBC_ABI_DEFAULT, MIPS_LIBC_ABI_MIPS_PLT)
784 (MIPS_LIBC_ABI_UNIQUE, MIPS_LIBC_ABI_MIPS_O32_FP64)
785 (MIPS_LIBC_ABI_MAX): New enumeration constants.
786 (_bfd_mips_post_process_headers): Use them in place of magic
787 numbers.
788
25eb8346
JW
7892018-06-21 Jim Wilson <jimw@sifive.com>
790
791 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Update comment.
792 Use SYMBOL_REFERENCES_LOCAL. Add asserts for h->got.offset.
793
d388f643
AM
7942018-06-21 Alan Modra <amodra@gmail.com>
795
796 * doc/Makefile.am (AUTOMAKE_OPTIONS): Add "foreign".
797 * doc/Makefile.in: Regenerate.
798
b939d8a0
RL
7992018-06-20 Renlin Li <renlin.li@arm.com>
800
801 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use PG_OFFSET
802 to resolve BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
803 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
804 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
805 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC,
806 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
807 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
808 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
809 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
810
6077de06
NC
8112018-06-20 Nick Clifton <nickc@redhat.com>
812
813 PR 23316
814 * opncls.c (get_build_id): Check for a negative or excessive data
815 size in the build-id note.
816
c6643fcc
NC
8172018-06-20 Nick Clifton <nickc@redhat.com>
818
819 PR 23299
820 * mach-o.c (cputype): New function.
821 (cpusubtype): New function.
822 (bfd_mach_o_bfd_print_private_data): New function. Dispalys the
823 values in the MACH-O file header.
824 (bfd_mach_o_bfd_copy_private_header_data): Copy the cputype and
825 cpusubtype fields from the input bfd's mach-o header to the output
826 bfd.
827 * mach-o-target.c (bfd_mach_o_bfd_print_private_bfd_data):
828 Redefine to bfd_mach_o_bfd_print_private_data.
829 * mach-o.h (bfd_mach_o_bfd_print_private_bfd_data): Prototype.
830
789ff5b6
MR
8312018-06-19 Maciej W. Rozycki <macro@mips.com>
832
833 PR ld/22966
834 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Verify the
835 `.got.plt' entry referred is in range.
836 (mips_finish_exec_plt): Correct the range check for `.got.plt'
837 start. Replace the assertion used for that with a proper error
838 message.
839
6a382bce
MR
8402018-06-19 Maciej W. Rozycki <macro@mips.com>
841
842 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Fix
843 formatting.
844
d0ac1c44
SM
8452018-06-19 Simon Marchi <simon.marchi@ericsson.com>
846
847 * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11.
848 (INCLUDES): Rename to ...
849 (AM_CPPFLAGS): ... this.
850 * configure.ac: Remove AC_PREREQ.
851 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add
852 info-in-builddir no-texinfo.tex.
853 (info_TEXINFOS): Rename bfd.texinfo to bfd.texi.
854 * doc/bfd.texinfo: Rename to ...
855 * doc/bfd.texi: ... this.
856 * Makefile.in: Re-generate.
857 * aclocal.m4: Re-generate.
858 * config.in: Re-generate.
859 * configure: Re-generate.
860 * doc/Makefile.in: Re-generate.
861
ed1299fe
M
8622018-06-18 Mephi <mephi42@gmail.com>
863
864 PR 23297
865 * mach-o-x86-64.c (x86_64_howto_table): Add entry for
866 BFD_RELOC_MACH_O_X86_64_RELOC_TLV.
867 (bfd_mach_o_x86_64_canonicalize_one_reloc): Handle the new reloc.
868 (bfd_mach_o_x86_64_swap_reloc_out): Likewise.
869 * reloc.c (BFD_RELOC_MACH_O_X86_64_TV): New entry.
870 * bfd-in2.h: Regenerate.
871 * libbfd.h: Regenerate.
872
6f20c942
FS
8732018-06-14 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
874
875 * elfxx-mips.c (print_mips_ases): Add GINV extension.
876
1f6f5dba
L
8772018-06-14 H.J. Lu <hongjiu.lu@intel.com>
878
879 PR binutils/23267
880 * elf.c (_bfd_elf_get_symbol_version_string): Check if the first
881 symbol version is base version.
882
7f923b7f
AM
8832018-06-14 Alan Modra <amodra@gmail.com>
884
885 * elf-bfd.h (struct elf_link_hash_table): Add "dynamic_relocs".
886 * elflink.c (_bfd_elf_init_2_index_sections): Comment fix.
887 (_bfd_elf_add_dynamic_entry): Set "dynamic_relocs".
888 (_bfd_elf_link_renumber_dynsyms): Exclude all section symbols when
889 "dynamic_relocs" is not set.
890 * elfxx-mips.c (count_section_dynsyms): Likewise.
891
ff91d2f0
AM
8922018-06-14 Alan Modra <amodra@gmail.com>
893
894 PR 23282
895 * bfdio.c (bfd_seek): Optimize away seeks to current position.
896
730c3174
SE
8972018-06-13 Scott Egerton <scott.egerton@imgtec.com>
898 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
899
900 * elfxx-mips.c (print_mips_ases): Add CRC.
901
ecf99cc0
L
9022018-06-08 H.J. Lu <hongjiu.lu@intel.com>
903
904 PR ld/23161
905 * elfxx-x86.c (elf_x86_hide_linker_defined): New function.
906 (_bfd_x86_elf_link_check_relocs): Use it to hide hidden
907 __bss_start, _end and _edata in shared libraries.
908
527278f3
AM
9092018-06-07 Alan Modra <amodra@gmail.com>
910
911 * elf32-tic6x.c (elf32_tic6x_check_relocs): Reference
912 __c6xabi_DSBT_BASE explicitly for R_C6000_SBR_* relocs.
913
5c4ce239
AM
9142018-06-05 Alan Modra <amodra@gmail.com>
915
916 * bfd.c (struct bfd): Update comment on "where" usage.
917 * bfdio.c (bfd_bwrite, bfd_stat): Use and update "iovec",
918 "iostream", and "where" from containing archive file. Return
919 error on NULL iovec.
920 (bfd_bread): Similarly, and return error attempted out of
921 bounds archive element access.
922 (bfd_tell, bfd_flush): Use and update "iovec", "iostream", and
923 "where" from containing archive file.
924 (bfd_seek): Likewise. Return error on NULL iovec. Don't
925 attempt to optimize away seeks. Don't paper over errors by
926 calling bfd_tell.
927 (bfd_get_mtime): Call bfd_stat rather than iovec->bstat.
928 (bfd_get_size): Likewise.
929 (bfd_mmap): Operate on and use iovec of containing archive
930 file. Return error on NULL iovec.
931 * cache.c (bfd_cache_lookup_worker): Abort if working on
932 archive element bfd.
933 (cache_bread_1): Delete bfd parameter, add FILE* parameter.
934 Don't ignore zero byte reads.
935 (cache_bread): Look up FILE* in cache here. Error on NULL
936 lookup.
937 (cache_bwrite): Rename "where" to "from".
938 (cache_bmmap): Don't handle archive elements.
939 * coffcode.h (coff_slurp_line_table): Exit early on zero
940 lineno count.
941 * bfd-in2.h: Regenerate.
942
27b07675
AM
9432018-06-05 Alan Modra <amodra@gmail.com>
944
945 PR 23254
946 * plugin.c (bfd_plugin_open_input): Allow for possibility of
947 nested archives. Open file again for plugin.
948 (try_claim): Don't save and restore file position. Close file
949 if not claimed.
950 * sysdep.h (O_BINARY): Define.
951
4b8e28c7
MF
9522018-06-04 Max Filippov <jcmvbkbc@gmail.com>
953
954 * elf32-xtensa.c (xtensa_read_table_entries): Make global.
955 (compute_fill_extra_space): Drop declaration. Rename function to
956 xtensa_compute_fill_extra_space.
957 (compute_ebb_actions, remove_dead_literal): Update references to
958 compute_fill_extra_space.
959
8255c61b
MF
9602018-06-04 Volodymyr Arbatov <arbatov@cadence.com>
961
962 * elf32-xtensa.c (elf32xtensa_separate_props): New global
963 variable.
964 (xtensa_add_names): New function.
965 (xtensa_property_section_name): Add new parameter
966 separate_sections, use it to choose property section name.
967 (xtensa_get_separate_property_section): New function.
968 (xtensa_get_property_section): Invoke
969 xtensa_get_separate_property_section to get individual property
970 section if it exists, common property section otherwise.
971 (xtensa_make_property_section): Pass elf32xtensa_separate_props
972 to xtensa_property_section_name.
973
95da9854
L
9742018-06-04 H.J. Lu <hongjiu.lu@intel.com>
975
976 PR binutils/23146
977 * bfd-in.h: Include "diagnostics.h".
978 * bfd-in2.h: Regenerated.
979 * elf32-arm.c (elf32_arm_nabi_write_core_note): Use
980 DIAGNOSTIC_PUSH, DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION and
981 DIAGNOSTIC_POP to silence GCC 8.1 warnings with
982 -Wstringop-truncation.
983 * elf32-ppc.c (ppc_elf_write_core_note): Likewse.
984 * elf32-s390.c (elf_s390_write_core_note): Likewse.
985 * elf64-ppc.c (ppc64_elf_write_core_note): Likewse.
986 * elf64-s390.c (elf_s390_write_core_note): Likewse.
987 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewse.
988
137b5cbd
JW
9892018-06-03 Jim Wilson <jimw@sifive.com>
990
cf7a5066
JW
991 PR ld/23244
992 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Check
993 for and handle an undefined weak with no PLT.
994
137b5cbd
JW
995 PR ld/22756
996 * elfnn-riscv.c (riscv_relax_delete_bytes): Add versioned_hidden check
997 to code that ignores duplicate symbols.
998
55e99962
L
9992018-06-01 H.J. Lu <hongjiu.lu@intel.com>
1000
1001 * version.m4: Bump version to 2.30.52
1002 * configure: Regenerated.
1003
030157d8
AM
10042018-06-01 Alan Modra <amodra@gmail.com>
1005
1006 * bfd.c (_bfd_error_handler): Arrange for this function to be
1007 declared in bfd-in2.h.
1008 * libbfd-in.h (_bfd_error_handler): Don't declare.
1009 * libbfd.h: Regenerate.
1010 * bfd-in2.h: Regenerate.
1011
421acf18
AC
10122018-05-30 Amaan Cheval <amaan.cheval@gmail.com>
1013
1014 * config.bfd (x86_64-*-*): Add pei-x86-64 target to x86_64-*-rtems*
1015 This is needed to generate UEFI application image files from ELFs.
1016
92e68c1d
L
10172018-05-28 H.J. Lu <hongjiu.lu@intel.com>
1018
1019 * elf32-i386.c (elf_i386_lazy_plt): Add plt_tlsdesc_entry,
1020 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
1021 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
1022 plt_tlsdesc_got2_insn_end for TLSDESC entry.
1023 (elf_i386_lazy_ibt_plt): Likewise.
1024 (elf_i386_nacl_plt): Likewise.
1025 * elf64-x86-64.c (tlsdesc_plt_entry): Moved and renamed to ...
1026 (elf_x86_64_tlsdesc_plt_entry): This.
1027 (elf_x86_64_lazy_plt): Add plt_tlsdesc_entry,
1028 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
1029 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
1030 plt_tlsdesc_got2_insn_end for TLSDESC entry.
1031 (elf_x86_64_lazy_bnd_plt): Likewise.
1032 (elf_x86_64_lazy_ibt_plt): Likewise.
1033 (elf_x32_lazy_ibt_plt): Likewise.
1034 (elf_x86_64_nacl_plt): Likewise.
1035 (elf_x86_64_finish_dynamic_sections): Use plt_tlsdesc_entry,
1036 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
1037 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
1038 plt_tlsdesc_got2_insn_end to update TLSDESC entry.
1039 * elfxx-x86.h (elf_x86_lazy_plt_layout): Update comments.
1040 Add plt_tlsdesc_entry, plt_tlsdesc_entry_size,
1041 plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset,
1042 plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end.
1043 (elf_x86_non_lazy_plt_layout): Update comments.
1044 (elf_x86_plt_layout): Likewise.
1045
ac98f9e2
L
10462018-05-28 H.J. Lu <hongjiu.lu@intel.com>
1047
1048 PR ld/23238
1049 * elf-s390-common.c (elf_s390_add_symbol_hook): Removed.
1050 * elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
1051 (elf_backend_add_symbol_hook): Likewise.
1052 * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
1053 (elf_backend_add_symbol_hook): Likewise.
1054 * elf32-s390.c (elf_backend_add_symbol_hook): Likewise.
1055 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
1056 (elf_backend_add_symbol_hook): Likewise.
1057 * elf64-s390.c (elf_backend_add_symbol_hook): Likewise.
1058 * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
1059 * elfxx-aarch64.h (_bfd_aarch64_elf_add_symbol_hook): Likewise.
1060 (elf_backend_add_symbol_hook): Likewise.
1061 * elf32-arm.c (elf32_arm_add_symbol_hook): Remove STT_GNU_IFUNC
1062 handling.
1063 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
1064 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
1065 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
1066 * elflink.c (elf_link_add_object_symbols): Set
1067 elf_gnu_symbol_ifunc for STT_GNU_IFUNC symbols.
1068
099bb8fb
L
10692018-05-26 H.J. Lu <hongjiu.lu@intel.com>
1070
1071 PR ld/23194
1072 * elf-bfd.h (_bfd_elf_link_hide_sym_by_version): New.
1073 * elflink.c (_bfd_elf_link_hide_versioned_symbol): New function.
1074 Extracted from _bfd_elf_link_assign_sym_version.
1075 (_bfd_elf_link_hide_sym_by_version): New function.
1076 (_bfd_elf_link_assign_sym_version): Use
1077 _bfd_elf_link_hide_versioned_symbol.
1078 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Call
1079 _bfd_elf_link_hide_sym_by_version instead of
1080 bfd_hide_sym_by_version. Don't check unversioned symbol.
1081
277eb7f6
AM
10822018-05-25 Alan Modra <amodra@gmail.com>
1083
1084 * Makefile.in: Regenerate.
1085 * po/SRC-POTFILES.in: Regenerate.
1086
629dabe3
AM
10872018-05-25 Alan Modra <amodra@gmail.com>
1088
1089 * configure.ac (bfd_cv_hidden): Run test with -Werror in CFLAGS.
1090 * configure: Regenerate.
1091
9ef6d1e3
L
10922018-05-23 H.J. Lu <hongjiu.lu@intel.com>
1093
1094 * elf64-ppc.c (ppc64_elf_write_core_note): Add ATTRIBUTE_NONSTRING
1095 to data.
1096
215f5271
AM
10972018-05-22 Alan Modra <amodra@gmail.com>
1098
1099 PR 23207
1100 * elf32-hppa.c (hppa_get_stub_entry): Return NULL when link_sec
1101 is NULL.
1102 (elf32_hppa_size_stubs): Only create stubs for load, alloc, code
1103 sections.
1104 (final_link_relocate): Revert last change.
1105
7455c018
AM
11062018-05-22 Alan Modra <amodra@gmail.com>
1107
1108 PR 23207
1109 * elf32-hppa.c (final_link_relocate): Don't look for plt call
1110 stubs in non-alloc sections.
1111
34a87bb0
L
11122018-05-21 H.J. Lu <hongjiu.lu@intel.com>
1113
1114 PR ld/23201
1115 * aout-target.h (MY_bfd_link_hide_symbol): New.
1116 * aout-tic30.c (MY_bfd_link_hide_symbol): Likewise.
1117 * binary.c (binary_bfd_link_hide_symbol): Likewise.
1118 * coff-alpha.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
1119 * coff-mips.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
1120 * coff-rs6000.c (_bfd_xcoff_bfd_link_hide_symbol): Likewise.
1121 * coffcode.h (coff_bfd_link_hide_symbol): Likewise.
1122 * elf-bfd.h (_bfd_elf_link_hide_symbol): Likewise.
1123 * elfxx-target.h (bfd_elfNN_bfd_link_hide_symbol): Likewise.
1124 * i386msdos.c (msdos_bfd_link_hide_symbol): Likewise.
1125 * ihex.c (ihex_bfd_link_hide_symbol): Likewise.
1126 * libbfd-in.h (_bfd_nolink_bfd_link_hide_symbol): Likewise.
1127 * linker.c (_bfd_generic_link_hide_symbol): Likewise.
1128 (bfd_link_hide_symbol): Likewise.
1129 * mach-o-target.c (bfd_mach_o_bfd_link_hide_symbol): Likewise.
1130 * mmo.c (mmo_bfd_link_hide_symbol): Likewise.
1131 * pef.c (bfd_pef_bfd_link_hide_symbol): Likewise.
1132 * plugin.c (bfd_plugin_bfd_link_hide_symbol): Likewise.
1133 * ppcboot.c (ppcboot_bfd_link_hide_symbol): Likewise.
1134 * som.c (som_bfd_link_hide_symbol): Likewise.
1135 * srec.c (srec_bfd_link_hide_symbol): Likewise.
1136 * tekhex.c (tekhex_bfd_link_hide_symbol): Likewise.
1137 * vms-alpha.c (vms_bfd_link_hide_symbol): Likewise.
1138 (alpha_vms_bfd_link_hide_symbol): Likewise.
1139 * xsym.c (bfd_sym_bfd_link_hide_symbol): Likewise.
1140 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
1141 _bfd_generic_link_hide_symbol.
1142 (rs6000_xcoff64_aix_vec): Likewise.
1143 * elflink.c (bfd_elf_record_link_assignment): Don't make forced
1144 local symbol dynamic.
1145 (_bfd_elf_link_hide_symbol): New function.
1146 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1147 check root.ldscript_def.
1148 * targets.c (bfd_target): Add _bfd_link_hide_symbol.
1149 (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_link_hide_symbol.
1150 * bfd-in2.h: Regenerated.
1151 * libbfd.h: Likewise.
1152
bae363f1
L
11532018-05-21 H.J. Lu <hongjiu.lu@intel.com>
1154
1155 PR binutils/23199
1156 * elf.c (setup_group): Mark section in a section group with
1157 SHF_GROUP.
1158
97373b2e
L
11592018-05-18 H.J. Lu <hongjiu.lu@intel.com>
1160
1161 PR ld/23194
1162 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1163 set eh->local_ref to 1 if a symbol is versioned and there is a
1164 version script.
1165
7f999549
JW
11662018-05-18 Kito Cheng <kito.cheng@gmail.com>
1167
1168 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Handle
1169 EF_RISCV_RVE.
1170
6487709f
JW
11712018-05-18 Jim Wilson <jimw@sifive.com>
1172
1173 * elfnn-riscv.c (allocate_dynrelocs): Discard dynamic relocations if
1174 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1175 (riscv_elf_relocate_section): Don't generate dynamic relocation if
1176 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1177 (riscv_elf_finish_dynamic_symbol): Likewise.
1178
7b4ae824
JD
11792018-05-18 John Darrington <john@darrington.wattle.id.au>
1180
1181 * Makefile.am: Add s12z files.
1182 * Makefile.in: Regenerate.
1183 * archures.c: Add bfd_s12z_arch.
1184 * bfd-in.h: Add exports of bfd_putb24 and bfd_putl24.
1185 * bfd-in2.h: Regenerate.
1186 * config.bfd: Add s12z target.
1187 * configure.ac: Add s12z target.
1188 * configure: Regenerate.
1189 * cpu-s12z.c: New file.
1190 * elf32-s12z.c: New file.
1191 * libbfd.c (bfd_putb24): New function.
1192 (bfd_putl24): New function.
1193 * libbfd.h: Regenerate.
1194 * reloc.c: Add s12z relocations.
1195 (bfd_get_reloc_size): Handle size 5 relocs.
1196 * targets.c: Add s12z_elf32_vec.
1197
011b32fd
L
11982018-05-18 H.J. Lu <hongjiu.lu@intel.com>
1199
1200 PR ld/23189
1201 * elf32-i386.c (elf_i386_relocate_section): Handle R_386_GOT32X
1202 like R_386_GOT32.
1203 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1204 set eh->local_ref to 1 for linker defined symbols.
1205
4bba0fb1
AM
12062018-05-18 Alan Modra <amodra@gmail.com>
1207
1208 PR 23199
1209 * elf.c (setup_group): Formatting. Check that SHT_GROUP entries
1210 don't point at other SHT_GROUP sections. Set shdr corresponding
1211 to invalid entry, to NULL rather than section 0. Identify
1212 SHT_GROUP section index when reporting an error. Cope with NULL
1213 shdr pointer.
1214
8722de9c
AM
12152018-05-18 Alan Modra <amodra@gmail.com>
1216
1217 * libbfd-in.h (ATTRIBUTE_HIDDEN): Define and use throughout.
1218 * configure.ac (HAVE_HIDDEN): Check compiler support for hidden
1219 visibility.
1220 * libbfd.h: Regenerate.
1221 * configure: Regenerate.
1222 * config.in: Regenerate.
1223
0b439543
AM
12242018-05-18 Alan Modra <amodra@gmail.com>
1225
1226 * libbfd-in.h: Add include guard.
1227 * libcoff-in.h: Likewise.
1228 * doc/Makefile.am (libbfd.h, libcoff.h): Append another #endif.
1229 * doc/Makefile.in: Regenerate.
1230 * libbfd.h: Regenerate.
1231 * libcoff.h: Regenerate.
1232
1624c9ca
MR
12332018-05-16 Maciej W. Rozycki <macro@mips.com>
1234
1235 * elf32-nds32.c (nds32_convert_32_to_16): Preset `insn_type'.
1236
7cf7fcc8
AM
12372018-05-16 Alan Modra <amodra@gmail.com>
1238
1239 PR 22458
1240 * format.c (struct bfd_preserve): Add section_id.
1241 (bfd_preserve_save, bfd_preserve_restore): Save and restore
1242 _bfd_section_id.
1243 (bfd_reinit): Set _bfd_section_id.
1244 (bfd_check_format_matches): Put all matches of any priority into
1245 matching_vector. Save initial section id and start each attempted
1246 match at that section id.
1247 * libbfd-in.h (_bfd_section_id): Declare.
1248 * section.c (_bfd_section_id): Rename from section_id and make
1249 global. Adjust uses.
1250 (bfd_get_next_section_id): Delete.
1251 * elf64-ppc.c (ppc64_elf_setup_section_lists): Replace use of
1252 bfd_get_section_id with _bfd_section_id.
1253 * libbfd.h: Regenerate.
1254 * bfd-in2.h: Regenerate.
1255
810ed4db
CG
12562018-05-15 Christophe Guillon <christophe.guillon@st.com>
1257
1258 * coffcode.h (coff_bigobj_swap_aux_in): Make sure that all fields
1259 of the aux structure are initialised.
1260
1678bd35
FT
12612018-05-15 Francois H. Theron <francois.theron@netronome.com>
1262
1263 * targets.c: Wrap nfp_elf64_vec in BFD64 ifdef.
1264
293b4d4f
NC
12652018-05-15 Nick Clifton <nickc@redhat.com>
1266
1267 * po/pt.po: New Portuguese translation.
1268 * configure.ac (ALL_LINGUAS): Add pt.
1269 * configure: Regenerate.
1270
4ec09950
L
12712018-05-14 H.J. Lu <hongjiu.lu@intel.com>
1272
1273 PR ld/23169
1274 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Don't issue
1275 an error on IFUNC pointer defined in PDE.
1276 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Call
1277 _bfd_x86_elf_link_fixup_ifunc_symbol.
1278 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1279 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): New
1280 function.
1281 * elfxx-x86.h (_bfd_x86_elf_link_fixup_ifunc_symbol): New.
1282
9bc935ef
L
12832018-05-14 H.J. Lu <hongjiu.lu@intel.com>
1284
1285 PR ld/23162
1286 * elfxx-x86.c (elf_x86_linker_defined): New function.
1287 (_bfd_x86_elf_link_check_relocs): Use it to mark __bss_start,
1288 _end and _edata locally defined within executables.
1289
9933dc52
AM
12902018-05-12 Alan Modra <amodra@gmail.com>
1291
1292 PR 20659
1293 * elf.c (rewrite_elf_program_header): Use segment_mark only for
1294 PT_LOAD headers. Delete first_matching_lma and first_suggested_lma.
1295 Instead make matching_lma and suggested_lma pointers to the
1296 sections. Align section vma and lma calculated from segment.
1297 Don't clear includes_phdrs or includes_filehdr based on p_paddr
1298 test. Try to handle alignment padding before first section by
1299 adjusting new segment lma down. Adjust PT_PHDR map p_paddr.
1300
493ffac5
DD
13012018-05-09 Dimitar Dimitrov <dimitar@dinux.eu>
1302
1303 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Make LDI32 relocation
1304 conformant to TI ABI.
1305 (pru_elf32_relax_section): Likewise.
1306 (pru_elf_relax_delete_bytes): Fix offsets for new LDI32 code.
1307 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Ignore addend.
1308 (pru_elf32_pmem_relocate): Trap - should not get here.
1309 (pru_elf32_relocate_section): Add support for REL relocations.
1310 (elf_info_to_howto_rel): Enable REL.
1311 (elf_backend_may_use_rel_p): Likewise.
1312 (elf_backend_may_use_rela_p): Likewise.
1313 (elf_backend_default_use_rela_p): Likewise.
1314
b4560c7d
AM
13152018-05-09 Alan Modra <amodra@gmail.com>
1316
1317 PR 23148
1318 * peXXigen.c (pe_print_edata): Correct minimum size.
1319
53db9cf9
AM
13202018-05-09 Alan Modra <amodra@gmail.com>
1321
1322 PR 23147
1323 * peXXigen.c (pe_print_idata): Bound check hint_addr.
1324
95a6d235
NC
13252018-05-08 Nick Clifton <nickc@redhat.com>
1326
1327 PR 22809
1328 * elf.c (bfd_elf_get_str_section): Check for an excessively large
1329 string section.
1330 * elf-attrs.c (_bfd_elf_parse_attributes): Issue an error if the
1331 attribute section is larger than the size of the file.
1332
7bd8862c
AM
13332018-05-07 Alan Modra <amodra@gmail.com>
1334
1335 * cofflink.c (_bfd_coff_link_input_bfd): Use memcmp rather than
1336 strncmp when checking for ".bf" special symbol.
1337 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Make pe_required_section_flags
1338 section name a char array, remove sentinal known_sections entry,
1339 and adjust loop over known_sections to suit. Use memcmp rather
1340 than strncmp.
1341
602f1657
AM
13422018-05-04 Alan Modra <amodra@gmail.com>
1343
1344 * elf-linux-core.h (struct elf_external_linux_prpsinfo32_ugid32),
1345 (struct elf_external_linux_prpsinfo32_ugid16),
1346 (struct elf_external_linux_prpsinfo64_ugid32),
1347 (struct elf_external_linux_prpsinfo64_ugid16): Add ATTRIBUTE_NONSTRING
1348 to pr_fname and pr_psargs fields. Remove GCC diagnostic pragmas.
1349 Move comment to..
1350 * elf.c (elfcore_write_prpsinfo): ..here. Indent nested preprocessor
1351 directives.
1352 * elf32-arm.c (elf32_arm_nabi_write_core_note): Add ATTRIBUTE_NONSTRING
1353 to data.
1354 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
1355 * elf32-s390.c (elf_s390_write_core_note): Likewise.
1356 * elf64-s390.c (elf_s390_write_core_note): Likewise.
1357 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
1358 * elf64-x86-64.c (elf_x86_64_write_core_note): Add GCC diagnostic
1359 pragmas.
1360 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Use strnlen to avoid
1361 false positive gcc-8 warning.
7bd8862c 1362 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
602f1657 1363
a27ca19c
TMQMF
13642018-05-04 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
1365
1366 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Fix the order
1367 of arguments when warning about different long double types.
1368
3be08ea4
SA
13692018-05-03 Simon Atanasyan <simon@atanasyan.com>
1370
1371 * elf32-mips.c: (elf32_mips_fixup_symbol): New function.
1372 (elf_backend_fixup_symbol): New macro.
1373 * elfxx-mips.c: (mips_elf_output_extsym): Discard _gp_disp
1374 handling.
1375 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
1376
fe944acf
FT
13772018-04-30 Francois H. Theron <francois.theron@netronome.com>
1378
1379 * Makefile.am: Added NFP files to build.
1380 * archures.c: Added bfd_arch_nfp
1381 * config.bfd: Added NFP support.
1382 * configure.ac: Added NFP support.
1383 * cpu-nfp.c: New, for NFP support.
1384 * elf-bfd.h: Added elf_section_info()
1385 * elf64-nfp.c: New, for NFP support.
1386 * po/SRC-POTFILES.in: Added NFP source files.
1387 * targets.c: Added nfp_elf64_vec
1388 * bfd-in2.h: Regenerate.
1389 * Makefile.in: Regenerate.
1390 * configure: Regenerate.
1391
ffa389a3
AM
13922018-04-27 Alan Modra <amodra@gmail.com>
1393
1394 * bfd-in2.h: Regenerate.
1395 * libbfd.h: Regenerate.
1396
04383fd1
AM
13972018-04-27 Alan Modra <amodra@gmail.com>
1398
1399 PR 23123
1400 PR 22374
1401 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt
1402 relocs for ifuncs.
1403 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes.
1404
bfa5bd2a
PA
14052018-04-26 Pedro Alves <palves@redhat.com>
1406
1407 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't consider
1408 ifunc and non-ifunc symbols duplicates.
1409
59029f57
CL
14102018-04-25 Christophe Lyon <christophe.lyon@st.com>
1411 Mickaël Guêné <mickael.guene@st.com>
1412
1413 * elf32-arm.c (elf32_arm_fdpic_thumb_plt_entry): New.
1414 (elf32_arm_plt_needs_thumb_stub_p): Handle thumb-only case.
1415 (elf32_arm_populate_plt_entry): Likewise.
1416 (elf32_arm_output_plt_map_1): Likewise.
1417 (elf32_arm_output_arch_local_syms): Likewise.
1418
fac7bd64
CL
14192018-04-25 Christophe Lyon <christophe.lyon@st.com>
1420 Mickaël Guêné <mickael.guene@st.com>
1421
1422 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle
1423 _GLOBAL_OFFSET_TABLE_ in FDPIC mode.
1424
29e9b073
CL
14252018-04-25 Christophe Lyon <christophe.lyon@st.com>
1426 Mickaël Guêné <mickael.guene@st.com>
1427
1428 * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case
1429 for R_ARM_TARGET2.
1430
cb10292c
CL
14312018-04-25 Christophe Lyon <christophe.lyon@st.com>
1432 Mickaël Guêné <mickael.guene@st.com>
1433
1434 * elf32-arm.c (DEFAULT_STACK_SIZE): New.
1435 (elf32_arm_always_size_sections): Create stack segment.
1436
5c5a4843
CL
14372018-04-25 Christophe Lyon <christophe.lyon@st.com>
1438 Mickaël Guêné <mickael.guene@st.com>
1439
1440 * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC)
1441 (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New
1442 relocations.
1443 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC,
1444 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations.
1445 (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC,
1446 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC.
1447 (struct elf32_arm_link_hash_table): Update comment.
1448 (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations.
1449 (IS_ARM_TLS_RELOC): Likewise.
1450 (elf32_arm_check_relocs): Likewise.
1451 (allocate_dynrelocs_for_symbol): Likewise.
1452 (elf32_arm_size_dynamic_sections): Update comment.
1453 * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC,
1454 BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC.
1455
7801f98f
CL
14562018-04-25 Christophe Lyon <christophe.lyon@st.com>
1457 Mickaël Guêné <mickael.guene@st.com>
1458
1459 * elf32-arm.c (elf32_arm_fdpic_plt_entry): New.
1460 (elf32_arm_create_dynamic_sections): Handle FDPIC.
1461 (elf32_arm_allocate_plt_entry): Likewise.
1462 (elf32_arm_populate_plt_entry): Likewise.
1463 (elf32_arm_output_plt_map_1): Likewise.
1464
e8b09b87
CL
14652018-04-25 Christophe Lyon <christophe.lyon@st.com>
1466 Mickaël Guêné <mickael.guene@st.com>
1467
1468 * elf32-arm.c (struct fdpic_local): New.
1469 (elf_arm_obj_tdata): Add local_fdpic_cnts field.
1470 (elf32_arm_local_fdpic_cnts): New.
1471 (struct fdpic_global): New.
1472 (elf32_arm_link_hash_entry): Add fdpic_cnts field.
1473 (elf32_arm_link_hash_table): Add srofixup field.
1474 (arm_elf_add_rofixup): New.
1475 (arm_elf_fill_funcdesc): New.
1476 (elf32_arm_link_hash_newfunc): Handle fdpic_cnts.
1477 (elf32_arm_allocate_local_sym_info): Likewise.
1478 (create_got_section): Create .rofixup section.
1479 (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts.
1480 (bfd_elf32_arm_set_target_params): Handle FDPIC.
1481 (elf32_arm_final_link_relocate): Likewise.
1482 (elf32_arm_check_relocs): Likewise.
1483 (allocate_dynrelocs_for_symbol): Likewise.
1484 (elf32_arm_size_dynamic_sections): Likewise.
1485 (elf32_arm_finish_dynamic_sections): Likewise.
1486 (elf32_arm_output_arch_local_syms): Likewise.
1487 (elf32_arm_fdpic_omit_section_dynsym): New.
1488
188fd7ae
CL
14892018-04-25 Christophe Lyon <christophe.lyon@st.com>
1490 Mickaël Guêné <mickael.guene@st.com>
1491
1492 * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC)
1493 (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC)
1494 (BFD_RELOC_ARM_FUNCDESC_VALUE): New.
1495 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC,
1496 R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE.
1497 (elf32_arm_howto_from_type): Take new members of
1498 elf32_arm_howto_table_2 into account.
1499 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC,
1500 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
1501 BFD_RELOC_ARM_FUNCDESC_VALUE.
1502 * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC,
1503 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
1504 BFD_RELOC_ARM_FUNCDESC_VALUE.
1505
18a20338
CL
15062018-04-25 Christophe Lyon <christophe.lyon@st.com>
1507 Mickaël Guêné <mickael.guene@st.com>
1508
1509 * elf32-arm.c (elf32_arm_print_private_bfd_data): Support
1510 EF_ARM_PIC and ELFOSABI_ARM_FDPIC.
1511 (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC.
1512 (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC.
1513
617a5ada
CL
15142018-04-25 Christophe Lyon <christophe.lyon@st.com>
1515 Mickaël Guêné <mickael.guene@st.com>
1516
1517 * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and
1518 arm_elf32_fdpic_le_vec to targ_selvecs. Accept
1519 arm*-*-uclinuxfdpiceabi.
1520 * configure.ac: Add support for arm_elf32_fdpic_be_vec and
1521 arm_elf32_fdpic_le_vec.
1522 * configure: Regenerate.
1523 * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p.
1524 (elf32_arm_link_hash_table_create): Initialize fdpic_p.
1525 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM)
1526 (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets.
1527 (elf32_arm_fdpic_link_hash_table_create): New.
1528 * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and
1529 arm_elf32_fdpic_le_vec.
1530
d99b4b92
AM
15312018-04-25 Alan Modra <amodra@gmail.com>
1532
1533 * elf-linux-core.h: Disable gcc-8 string truncation warning.
1534 * elf.c (elfcore_write_prpsinfo): Likewise.
1535
15362018-04-25 Alan Modra <amodra@gmail.com>
2ac93be7
AM
1537
1538 * Makefile.am: Remove arm-aout and arm-coff support.
1539 * config.bfd: Likewise.
1540 * configure.ac: Likewise.
1541 * targets.c: Likewise.
1542 * aout-arm.c: Delete.
1543 * armnetbsd.c: Delete.
1544 * riscix.c: Delete.
1545 * Makefile.in: Regenerate.
1546 * configure: Regenerate.
1547 * po/SRC-POTFILES.in: Regenerate.
1548
aa4a8c2a
NC
15492018-04-24 Nick Clifton <nickc@redhat.com>
1550
db0c309f
NC
1551 PR 23113
1552 * elf.c (ignore_section_sym): Check for the output_section pointer
1553 being NULL before dereferencing it.
1554
aa4a8c2a
NC
1555 PR 23110
1556 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for
1557 a negative PE_DEBUG_DATA size before iterating over the debug data.
1558
b9f26d2e
AM
15592018-04-23 Alan Modra <amodra@gmail.com>
1560
1561 * elf-linux-core.h: Revert last change.
1562 * elf.c: Likewise.
1563
bf82069d
NC
15642018-04-23 Nick Clifton <nickc@redhat.com>
1565
1566 PR 23056
1567 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
1568 the end of the string table, and zero it.
1569
5a6312e8
AM
15702018-04-23 Alan Modra <amodra@gmail.com>
1571
1572 * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable
1573 gcc-8 string truncation warning.
1574 (swap_linux_prpsinfo32_ugid16_out): Likewise.
1575 (swap_linux_prpsinfo64_ugid32_out): Likewise.
1576 (swap_linux_prpsinfo64_ugid16_out): Likewise.
1577 * elf.c (elfcore_write_prpsinfo): Likewise.
1578
bf82069d
NC
15792018-04-23 Nick Clifton <nickc@redhat.com>
1580
1581 PR 23056
1582 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
1583 the end of the string table, and zero it.
1584
4352556b
AM
15852018-04-20 Alan Modra <amodra@gmail.com>
1586
1587 PR 22978
1588 * elf32-hppa.c (got_relocs_needed): Add extra param to special
1589 case both dtprel and tprel relocs.
1590 (allocate_dynrelocs): Adjust conditions for got relocs.
1591 (elf32_hppa_relocate_section): Likewise for local sym got relocs.
1592 Emit dynamic relocs on TLS GOT entries for shared libraries,
1593 not when pic. Omit dynamic reloc on dtprel entry when local,
1594 and on tprel entry when local and executable.
1595
f6a8b8c7
AM
15962018-04-19 Alan Modra <amodra@gmail.com>
1597
1598 PR 22537
1599 * elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1.
1600 (hppa_type_of_stub): Don't return a long branch stub for
1601 symbols other than those defined statically.
1602
8e415ce8
AM
16032018-04-19 Alan Modra <amodra@gmail.com>
1604
1605 * Makefile.am: Revert 2018-04-18 coff-mips changes.
1606 * config.bfd: Add back mips_ecoff_le_vec and mips_ecoff_be_vec
1607 to selvecs for mips targets change 2018-04-18.
1608 * configure.ac: Reinstate mips_ecoff_le_vec, mips_ecoff_be_vec
1609 and mips_ecoff_bele_vec.
1610 * targets.c: Likewise.
1611 * coff-mips.c: Resurrect.
1612 * Makefile.in: Regenerate.
1613 * configure: Regenerate.
1614 * po/SRC-POTFILES.in: Regenerate.
1615
3596d8ce
AM
16162018-04-18 Alan Modra <amodra@gmail.com>
1617
1618 * Makefile.am: Remove mips aout and coff support.
1619 * config.bfd: Likewise.
1620 * configure.ac: Likewise.
1621 * targets.c: Likewise.
1622 * coff-mips.c: Delete
1623 * mipsbsd.c: Delete
1624 * pe-mips.c: Delete
1625 * pei-mips.c: Delete
1626 * Makefile.in: Regenerate.
1627 * configure: Regenerate.
1628 * po/SRC-POTFILES.in: Regenerate.
1629
d9dd2045
L
16302018-04-17 H.J. Lu <hongjiu.lu@intel.com>
1631
1632 * elf32-i386.c (elf32_bed): Define before including
1633 "elf32-target.h".
1634 * elf64-x86-64.c (elf64_bed): Define before including
1635 "elf64-target.h".
1636 (elf32_bed): Define before including "elf32-target.h".
1637
e4e6a73d
L
16382018-04-17 H.J. Lu <hongjiu.lu@intel.com>
1639
1640 PR ld/23055
1641 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a
1642 normal input file with compatible relocation.
1643
c65c21e1
AM
16442018-04-18 Alan Modra <amodra@gmail.com>
1645
1646 * Makefile.am: Remove support for assorted i386 aout and coff targets.
1647 * config.bfd: Likewise.
1648 * configure.ac: Likewise.
1649 * doc/bfdint.texi: Likewise.
1650 * targets.c: Likewise.
1651 * freebsd.h: Delete.
1652 * i386dynix.c: Delete.
1653 * i386freebsd.c: Delete.
1654 * i386linux.c: Delete.
1655 * i386mach3.c: Delete.
1656 * i386netbsd.c: Delete.
1657 * i386os9k.c: Delete.
1658 * Makefile.in: Regenerate.
1659 * configure: Regenerate.
1660 * po/SRC-POTFILES.in: Regenerate.
1661
884d4d8a 16622018-04-17 Andrew Sadek <andrew.sadek.se@gmail.com>
3f0a5f17
ME
1663
1664 Microblaze Target: PIC data text relative
1665
1666 * bfd/reloc.c (2 new BFD relocations):
1667 BFD_RELOC_MICROBLAZE_64_TEXTPCREL &
1668 BFD_RELOC_MICROBLAZE_64_TEXTPCREL
1669 * bfd/bfd-in2.h: Regenerate
1670 * bfd/libbfd.h: Regenerate
1671 * bfd/elf32-microblaze.c (Handle new relocs): define 'HOWTO' of 3
1672 new relocs and handle them in both relocate and relax functions.
1673 (microblaze_elf_reloc_type_lookup): add mapping between for new
1674 bfd relocs.
1675 (microblaze_elf_relocate_section): Handle new relocs in case of
1676 elf relocation.
1677 (microblaze_elf_relax_section): Handle new relocs for elf relaxation.
1678
6327533b
NC
16792018-04-17 Nick Clifton <nickc@redhat.com>
1680
808346fc
NC
1681 PR 23055
1682 * aoutx.h (find_nearest_line): Check that the symbol name exists
1683 and is long enough, before attempting to see if it is for a .o
1684 file.
1685 * hash.c (bfd_hash_hash): Add an assertion that the string is not
1686 NULL.
1687 * linker.c (bfd_link_hash_lookup): Fail if the table or string are
1688 NULL.
1689 (_bfd_generic_link_add_archive_symbols): Fail if an archive entry
1690 has no name.
1691
6327533b
NC
1692 PR 23065
1693 * dwarf2.c (concat_filename): Check for a NULL table pointer.
1694
e9af4700
NC
16952018-04-16 Nick Clifton <nickc@redhat.com>
1696
1697 PR 23061
1698 * coffgen.c (coff_pointerize_aux): Check for an out of range
1699 fixup.
1700
ddb00039
AM
17012018-04-16 Alan Modra <amodra@gmail.com>
1702
1703 * Makefile.am: Remove arm-epoc-pe support.
1704 * coff-arm.c: Likewise.
1705 * config.bfd: Likewise.
1706 * configure.ac: Likewise.
1707 * targets.c: Likewise.
1708 * epoc-pe-arm.c: Delete.
1709 * epoc-pei-arm.c: Delete.
1710 * Makefile.in: Regenerate.
1711 * configure: Regenerate.
1712 * po/SRC-POTFILES.in: Regenerate.
1713
c9098af4
AM
17142018-04-16 Alan Modra <amodra@gmail.com>
1715
1716 * Makefile.am: Remove sparc-aout and sparc-coff support.
1717 * config.bfd: Likewise.
1718 * configure.ac: Likewise.
1719 * targets.c: Likewise.
1720 * aout-sparcle.c: Delete.
1721 * aoutf1.h: Delete.
1722 * cf-sparclynx.c: Delete.
1723 * coff-sparc.c: Delete.
1724 * demo64.c: Delete.
1725 * sparclinux.c: Delete.
1726 * sparclynx.c: Delete.
1727 * sparcnetbsd.c: Delete.
1728 * sunos.c: Delete.
1729 * Makefile.in: Regenerate.
1730 * configure: Regenerate.
1731 * po/SRC-POTFILES.in: Regenerate.
1732
dc12032b
AM
17332018-04-16 Alan Modra <amodra@gmail.com>
1734
1735 * Makefile.am: Remove m68k-aout and m68k-coff support.
1736 * aoutf1.h: Likewise.
1737 * aoutx.h: Likewise.
1738 * archive.c: Likewise.
1739 * bfd-in.h: Likewise.
1740 * bfd.c: Likewise.
1741 * coffcode.h: Likewise.
1742 * coffswap.h: Likewise.
1743 * config.bfd: Likewise.
1744 * configure.ac: Likewise.
1745 * configure.host: Likewise.
1746 * doc/bfd.texinfo: Likewise.
1747 * doc/bfdint.texi: Likewise.
1748 * freebsd.h: Likewise.
1749 * gen-aout.c: Likewise.
1750 * hpux-core.c: Likewise.
1751 * libaout.h: Likewise.
1752 * libbfd-in.h: Likewise.
1753 * pdp11.c: Likewise.
1754 * peicode.h: Likewise.
1755 * riscix.c: Likewise.
1756 * targets.c: Likewise.
1757 * aout0.c: Delete.
1758 * coff-apollo.c: Delete.
1759 * coff-aux.c: Delete.
1760 * coff-m68k.c: Delete.
1761 * coff-svm68k.c: Delete.
1762 * coff-u68k.c: Delete.
1763 * hosts/delta68.h: Delete.
1764 * hosts/hp300bsd.h: Delete.
1765 * hosts/m68kaux.h: Delete.
1766 * hosts/news.h: Delete.
1767 * hp300bsd.c: Delete.
1768 * hp300hpux.c: Delete.
1769 * liboasys.h: Delete.
1770 * m68k4knetbsd.c: Delete.
1771 * m68klinux.c: Delete.
1772 * m68knetbsd.c: Delete.
1773 * oasys.c: Delete.
1774 * versados.c: Delete.
1775 * Makefile.in: Regenerate.
1776 * bfd-in2.h: Regenerate.
1777 * configure: Regenerate.
1778 * libbfd.h: Regenerate.
1779 * po/SRC-POTFILES.in: Regenerate.
1780
211dc24b
AM
17812018-04-16 Alan Modra <amodra@gmail.com>
1782
1783 * Makefile.am: Remove sh5 and sh64 support.
1784 * archures.c: Likewise.
1785 * config.bfd: Likewise.
1786 * configure.ac: Likewise.
1787 * cpu-sh.c: Likewise.
1788 * elf32-sh-relocs.h: Likewise.
1789 * elf32-sh.c: Likewise.
1790 * targets.c: Likewise.
1791 * elf32-sh64-com.c: Delete.
1792 * elf32-sh64.c: Delete.
1793 * elf32-sh64.h: Delete.
1794 * elf64-sh64.c: Delete.
1795 * Makefile.in: Regenerate.
1796 * bfd-in2.h: Regenerate.
1797 * configure: Regenerate.
1798 * po/SRC-POTFILES.in: Regenerate.
1799
4db9937a
AM
18002018-04-16 Alan Modra <amodra@gmail.com>
1801
1802 * Makefile.am: Remove sh-symbianelf support.
1803 * config.bfd: Likewise.
1804 * configure.ac: Likewise.
1805 * targets.c: Likewise.
1806 * elf32-sh-symbian.c: Delete.
1807 * Makefile.in: Regenerate.
1808 * configure: Regenerate.
1809 * po/SRC-POTFILES.in: Regenerate.
1810
9f5d1593
AM
18112018-04-16 Alan Modra <amodra@gmail.com>
1812
1813 * Makefile.am: Remove vax-bsd and vax-ultrix support.
1814 * config.bfd: Likewise.
1815 * configure.ac: Likewise.
1816 * targets.c: Likewise.
1817 * vaxbsd.c: Delete.
1818 * Makefile.in: Regenerate.
1819 * configure: Regenerate.
1820 * po/SRC-POTFILES.in: Regenerate.
1821
a9a4b302
AM
18222018-04-16 Alan Modra <amodra@gmail.com>
1823
1824 * Makefile.am: Remove w65 support.
1825 * archures.c: Likewise.
1826 * coffcode.h: Likewise.
1827 * config.bfd: Likewise.
1828 * configure.ac: Likewise.
1829 * targets.c: Likewise.
1830 * coff-w65.c: Delete.
1831 * cpu-w65.c: Delete.
1832 * Makefile.in: Regenerate.
1833 * bfd-in2.h: Regenerate.
1834 * configure: Regenerate.
1835 * po/SRC-POTFILES.in: Regenerate.
1836
04cb01fd
AM
18372018-04-16 Alan Modra <amodra@gmail.com>
1838
1839 * Makefile.am: Remove we32k support.
1840 * archures.c: Likewise.
1841 * coffcode.h: Likewise.
1842 * config.bfd: Likewise.
1843 * configure.ac: Likewise.
1844 * targets.c: Likewise.
1845 * coff-we32k.c: Delete.
1846 * cpu-we32k.c: Delete.
1847 * Makefile.in: Regenerate.
1848 * bfd-in2.h: Regenerate.
1849 * configure: Regenerate.
1850 * po/SRC-POTFILES.in: Regenerate.
1851
c2bf1eec
AM
18522018-04-16 Alan Modra <amodra@gmail.com>
1853
1854 * Makefile.am: Remove m88k support.
1855 * aoutx.h: Likewise.
1856 * archures.c: Likewise.
1857 * coffcode.h: Likewise.
1858 * coffswap.h: Likewise.
1859 * config.bfd: Likewise.
1860 * configure.ac: Likewise.
1861 * cpu-ns32k.c: Likewise.
1862 * elf32-nds32.c: Likewise.
1863 * mach-o.c: Likewise.
1864 * netbsd-core.c: Likewise.
1865 * reloc.c: Likewise.
1866 * targets.c: Likewise.
1867 * coff-m88k.c: Delete.
1868 * cpu-m88k.c: Delete.
1869 * elf32-m88k.c: Delete.
1870 * hosts/m88kmach3.h: Delete.
1871 * m88kmach3.c: Delete.
1872 * m88kopenbsd.c: Delete.
1873 * Makefile.in: Regenerate.
1874 * bfd-in2.h: Regenerate.
1875 * configure: Regenerate.
1876 * po/SRC-POTFILES.in: Regenerate.
1877
6793974d
AM
18782018-04-16 Alan Modra <amodra@gmail.com>
1879
1880 * Makefile.am: Remove i370 support.
1881 * archures.c: Likewise.
1882 * config.bfd: Likewise.
1883 * configure.ac: Likewise.
1884 * targets.c: Likewise.
1885 * cpu-i370.c: Delete.
1886 * elf32-i370.c: Delete.
1887 * Makefile.in: Regenerate.
1888 * bfd-in2.h: Regenerate.
1889 * configure: Regenerate.
1890 * po/SRC-POTFILES.in: Regenerate.
1891
e82aa794
AM
18922018-04-16 Alan Modra <amodra@gmail.com>
1893
1894 * Makefile.am: Remove h8500 support.
1895 * archures.c: Likewise.
1896 * coffcode.h: Likewise.
1897 * config.bfd: Likewise.
1898 * configure.ac: Likewise.
1899 * targets.c: Likewise.
1900 * coff-h8500.c: Delete.
1901 * cpu-h8500.c: Delete.
1902 * Makefile.in: Regenerate.
1903 * bfd-in2.h: Regenerate.
1904 * configure: Regenerate.
1905 * po/SRC-POTFILES.in: Regenerate.
1906
fe0bf0fd
AM
19072018-04-16 Alan Modra <amodra@gmail.com>
1908
1909 * Makefile.am: Remove h8300-coff support.
1910 * coffcode.h: Likewise.
1911 * config.bfd: Likewise.
1912 * configure.ac: Likewise.
1913 * reloc16.c: Likewise.
1914 * targets.c: Likewise.
1915 * coff-h8300.c: Delete.
1916 * Makefile.in: Regenerate.
1917 * configure: Regenerate.
1918 * po/SRC-POTFILES.in: Regenerate.
1919
fdef3943
AM
19202018-04-16 Alan Modra <amodra@gmail.com>
1921
1922 * Makefile.am: Remove IEEE 695 support.
1923 * archures.c: Likewise.
1924 * bfd.c: Likewise.
1925 * config.bfd: Likewise.
1926 * configure.ac: Likewise.
1927 * doc/bfd.texinfo: Likewise.
1928 * doc/bfdint.texi: Likewise.
1929 * doc/bfdsumm.texi: Likewise.
1930 * section.c: Likewise.
1931 * targets.c: Likewise.
1932 * ieee.c: Delete.
1933 * libieee.h: Delete.
1934 * Makefile.in: Regenerate.
1935 * bfd-in2.h: Regenerate.
1936 * configure: Regenerate.
1937 * po/SRC-POTFILES.in: Regenerate.
1938
de96689e
AM
19392018-04-16 Alan Modra <amodra@gmail.com>
1940
1941 * config.bfd: Remove tandem support.
1942
5972ac73
AM
19432018-04-16 Alan Modra <amodra@gmail.com>
1944
1945 * Makefile.am: Remove newsos3 support.
1946 * aoutx.h: Likewise.
1947 * config.bfd: Likewise.
1948 * configure.ac: Likewise.
1949 * targets.c: Likewise.
1950 * newsos3.c: Delete.
1951 * Makefile.in: Regenerate.
1952 * configure: Regenerate.
1953 * po/SRC-POTFILES.in: Regenerate.
1954
b4b594e3
AM
19552018-04-16 Alan Modra <amodra@gmail.com>
1956
1957 * Makefile.am: Remove netware support.
1958 * bfd-in.h: Likewise.
1959 * bfd.c: Likewise.
1960 * config.bfd: Likewise.
1961 * configure.ac: Likewise.
1962 * doc/bfdint.texi: Likewise.
1963 * ecoff.c: Likewise.
1964 * targets.c: Likewise.
1965 * libnlm.h: Delete.
1966 * nlm-target.h: Delete.
1967 * nlm.c: Delete.
1968 * nlm32-alpha.c: Delete.
1969 * nlm32-i386.c: Delete.
1970 * nlm32-ppc.c: Delete.
1971 * nlm32-sparc.c: Delete.
1972 * nlm32.c: Delete.
1973 * nlm64.c: Delete.
1974 * nlmcode.h: Delete.
1975 * nlmswap.h: Delete.
1976 * Makefile.in: Regenerate.
1977 * bfd-in2.h: Regenerate.
1978 * configure: Regenerate.
1979 * po/SRC-POTFILES.in: Regenerate.
1980
fceadf09
AM
19812018-04-16 Alan Modra <amodra@gmail.com>
1982
1983 * archures.c: Remove tahoe support.
1984 * config.bfd: Likewise.
1985 * configure.ac: Likewise.
1986 * hosts/tahoe.h: Delete.
1987 * bfd-in2.h: Regenerate.
1988 * configure: Regenerate.
1989
702d1671
AM
19902018-04-14 Alan Modra <amodra@gmail.com>
1991
1992 * elf-bfd.h (struct elf_backend_data): Add relropagesize.
1993 * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and
1994 sanity test.
1995 (elfNN_bed): Init relropagesize.
1996 * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to
1997 select relropagesize.
1998 * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
1999 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
2000 (ELF_MINPAGESIZE): Don't define.
2001 * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
2002 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
2003 * bfd-in2.h: Regenerate.
2004
03aa9684
AM
20052018-04-14 Alan Modra <amodra@gmail.com>
2006
2007 * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend
2008 on __QNXTARGET__ define.
2009
24acfe5e
AM
20102018-04-14 Alan Modra <amodra@gmail.com>
2011
2012 * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss*
2013 to obsolete list.
2014
a8eb42a8
AM
20152018-04-11 Alan Modra <amodra@gmail.com>
2016
2017 * aout-adobe.c: Delete.
2018 * bout.c: Delete.
2019 * coff-i860.c: Delete.
2020 * coff-i960.c: Delete.
2021 * cpu-i860.c: Delete.
2022 * cpu-i960.c: Delete.
2023 * elf32-i860.c: Delete.
2024 * elf32-i960.c: Delete.
2025 * hosts/i860mach3.h: Delete.
2026 * Makefile.am: Remove i860, i960, bout, and adobe support.
2027 * archures.c: Remove i860 and i960 support.
2028 * coffcode.h: Likewise.
2029 * reloc.c: Likewise.
2030 * aoutx.h: Comment updates.
2031 * archive.c: Remove BOUT and i960 support.
2032 * bfd.c: Remove BOUT support.
2033 * coffswap.h: Remove i960 support.
2034 * config.bfd: Remove i860, i960 and adobe targets.
2035 * configure.ac: Remove adode, bout, i860, i960, icoff targets.
2036 * targets.c: Likewise.
2037 * ieee.c: Remove i960 support.
2038 * mach-o.c: Remove i860 support.
2039 * Makefile.in: Regenerate.
2040 * bfd-in2.h: Regenerate.
2041 * configure: Regenerate.
2042 * libbfd.h: Regenerate.
2043 * po/SRC-POTFILES.in: Regenerate.
2044
aec2e0d2
MR
20452018-04-09 Maciej W. Rozycki <macro@mips.com>
2046
2047 * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer
2048 in the BFD symbol referred by the relocation.
2049 (mips_elf64_write_rela): Likewise.
2050
9ccfa98b
MR
20512018-04-09 Maciej W. Rozycki <macro@mips.com>
2052
2053 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an
2054 error for out-of-range `r_sym' values.
2055
3e04d765
AM
20562018-04-09 Alan Modra <amodra@gmail.com>
2057
2058 * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field.
2059 (struct ppc_link_hash_table): Add can_convert_all_inline_plt.
2060 (ppc64_elf_check_relocs): Set has_pltcall.
2061 (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries.
2062 (ppc64_elf_inline_plt): New function.
2063 (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals.
2064 * elf64-ppc.h (ppc64_elf_inline_plt): Declare.
2065 * elf32-ppc.c (has_pltcall): Define.
2066 (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt.
2067 (ppc_elf_check_relocs): Set has_pltcall.
2068 (ppc_elf_inline_plt): New function.
2069 (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries.
2070 (ppc_elf_size_dynamic_sections): Likewise.
2071 * elf32-ppc.h (ppc_elf_inline_plt): Declare.
2072
23cedd1d
AM
20732018-04-09 Alan Modra <amodra@gmail.com>
2074
2075 * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos.
2076 (is_plt_seq_reloc): New function.
2077 (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs.
2078 (ppc_elf_tls_optimize): Handle inline plt call sequence.
2079 (ppc_elf_relax_section): Handle PLTCALL reloc.
2080 (ppc_elf_relocate_section): Nop out inline plt call sequence when
2081 resolving locally.
2082 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and
2083 R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE.
2084 (has_tls_get_addr_call): Correct comment.
2085 (is_branch_reloc): Add PLTCALL.
2086 (is_plt_seq_reloc): New function.
2087 (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set
2088 has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt
2089 entry for R_PPC64_PLTCALL.
2090 (ppc64_elf_tls_optimize): Handle inline plt call sequence.
2091 (ppc_type_of_stub): Handle PLTCALL reloc.
2092 (toc_adjusting_stub_needed): Likewise.
2093 (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL
2094 reloc insn. Nop out inline plt call sequence when resolving
2095 locally. Handle __tls_get_addr inline plt call optimization.
2096
2d7ad24e
AM
20972018-04-09 Alan Modra <amodra@gmail.com>
2098
2099 * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define.
2100 (struct ppc_stub_hash_entry): Add symtype field.
2101 (PLT_KEEP): Define.
2102 (struct ppc_link_hash_table): Add pltlocal and relpltlocal.
2103 (create_linkage_sections): Create pltlocal and relpltlocal.
2104 (ppc64_elf_check_relocs): Allow PLT relocs on local symbols.
2105 Set PLT_KEEP.
2106 (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
2107 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
2108 (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
2109 Keep PLT entries for inline calls against locals.
2110 (ppc_build_one_stub): Use pltlocal as appropriate.
2111 (ppc_size_one_stub): Likewise.
2112 (ppc64_elf_size_stubs): Set symtype.
2113 (build_global_entry_stubs_and_plt): Init pltlocal and write
2114 relpltlocal for globals.
2115 (write_plt_relocs_for_local_syms): Likewise for local syms.
2116 (ppc64_elf_relocate_section): Support PLT for local syms.
2117 * elf32-ppc.c (PLT_KEEP): Define.
2118 (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal.
2119 (ppc_elf_create_glink): Create pltlocal and relpltlocal.
2120 (ppc_elf_check_relocs): Allow PLT relocs on local symbols.
2121 Set PLT_KEEP. Adjust update_local_sym_info call.
2122 (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
2123 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
2124 (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
2125 (ppc_elf_relocate_section): Support PLT16 relocs for local syms.
2126 (write_global_sym_plt): Init pltlocal and write relpltlocal.
2127 (ppc_finish_symbols): Likewise for locals.
2128
49c09209
AM
21292018-04-09 Alan Modra <amodra@gmail.com>
2130
2131 * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs
2132 for local symbols to..
2133 (write_plt_relocs_for_local_syms): ..here. New function.
2134 (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for
2135 global symbols to..
2136 (build_global_entry_stubs_and_plt): ..here. Rename from
2137 build_global_entry_stubs.
2138 (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt.
2139 Call write_plt_relocs_for_local_syms.
2140 * elf32-ppc.c (get_sym_h): New function.
2141 (ppc_elf_relax_section): Use get_sym_h.
2142 (ppc_elf_relocate_section): Move output of PLT relocs and glink
2143 stubs for local symbols to..
2144 (ppc_finish_symbols): ..here. New function.
2145 (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for
2146 global syms to..
2147 (write_global_sym_plt): ..here. New function.
2148 * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute.
2149 (ppc_finish_symbols): Declare.
2150
08be3224
AM
21512018-04-09 Alan Modra <amodra@gmail.com>
2152
2153 * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs.
2154 (ppc_elf_relocate_section): Likewise.
2155 * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS.
2156 (ppc64_elf_relocate_section): Likewise. Correct PLT16
2157 resolution to plt entry relative to toc pointer.
2158
37da22e5
AM
21592018-04-09 Alan Modra <amodra@gmail.com>
2160
2161 * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
2162 TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout
2163 file when other TLS flags are tested in a mask.
2164 (TLS_MARK, NON_GOT): Define.
2165 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
2166 (update_local_sym_info): Don't create got entry when NON_GOT.
2167 (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
2168 Set TLS_MARK.
2169 (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK.
2170 (ppc64_elf_relocate_section): Likewise.
2171 (ppc64_elf_tls_optimize): Don't attempt to optimize indirect
2172 __tls_get_addr calls lacking a marker reloc.
2173 * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
2174 TLS_TPRELGD): Renumber. Update comment.
2175 (TLS_MARK, NON_GOT): Define.
2176 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
2177 (update_local_sym_info): Don't create got entry when NON_GOT.
2178 (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
2179 Set TLS_MARK.
2180 (ppc_elf_tls_optimize): Don't attempt to optimize indirect
2181 __tls_get_addr calls lacking a marker reloc.
2182
a6fd92b0
L
21832018-04-06 H.J. Lu <hongjiu.lu@intel.com>
2184
2185 * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out
2186 R_X86_64_converted_reloc_bit.
2187
3cba8b6c
L
21882018-04-05 H.J. Lu <hongjiu.lu@intel.com>
2189
2190 PR gas/22318
2191 * configure: Regenerated.
2192
0e8452bb
AM
21932018-04-05 Alan Modra <amodra@gmail.com>
2194
2195 * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
2196 (elf_hppa_info_to_howto_rel): Likewise.
2197
8ee55178
MR
21982018-04-04 Maciej W. Rozycki <macro@mips.com>
2199
2200 * elf-hppa.h (elf_hppa_info_to_howto): Also return
2201 unsuccessfully for unimplemented relocations.
2202 (elf_hppa_info_to_howto_rel): Likewise.
2203
5d7c8b80
MR
22042018-04-04 Maciej W. Rozycki <macro@mips.com>
2205
2206 * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the
2207 `bfd_error_bad_value' error and call `_bfd_error_handler' on a
2208 howto lookup failure.
2209 (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call
2210 accordingly.
2211 (elf32_i860_info_to_howto_rela): Likewise.
2212 (elf32_i860_relocate_splitn): Likewise.
2213 (elf32_i860_relocate_pc16): Likewise.
2214 (elf32_i860_relocate_pc26): Likewise.
2215 (elf32_i860_relocate_section): Likewise.
2216
707bad1b
MR
22172018-04-04 Maciej W. Rozycki <macro@mips.com>
2218
2219 * elf32-visium.c (visium_info_to_howto_rela): Correct the range
2220 check for `visium_elf_howto_table' table access.
2221
0cc919dc
MR
22222018-04-04 Maciej W. Rozycki <macro@mips.com>
2223
2224 * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range
2225 check for `iq2000_elf_howto_table' table access.
2226
f428698e
MR
22272018-04-04 Maciej W. Rozycki <macro@mips.com>
2228
2229 * elf32-frv.c (frv_info_to_howto_rela): Correct the range check
2230 for `elf32_frv_howto_table' table access.
2231
7ed6f92a
MR
22322018-04-04 Maciej W. Rozycki <macro@mips.com>
2233
2234 * elf32-mips.c (mips_elf32_rtype_to_howto): Also return
2235 unsuccessfully for placeholder howtos.
2236 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
2237 * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise.
2238
75def2ab
MR
22392018-03-29 Maciej W. Rozycki <macro@mips.com>
2240
2241 * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
2242 `_bfd_error_handler' and to set the `bfd_error_bad_value' error.
2243
8b6a949a
MR
22442018-03-28 Maciej W. Rozycki <macro@mips.com>
2245
2246 * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove
2247 ATTRIBUTE_UNUSED from `abfd'.
2248
d81270c3
MR
22492018-03-28 Maciej W. Rozycki <macro@mips.com>
2250
2251 * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct
2252 `_bfd_error_handler' call formatting.
2253
60dceb8d 22542018-03-28 Maciej W. Rozycki <macro@mips.com>
8205a328
MR
2255
2256 * elf32-mips.c (mips_info_to_howto_rel): Call
2257 `mips_elf32_rtype_to_howto' directly rather than via
2258 `->elf_backend_mips_rtype_to_howto'.
2259
e04ef022
RL
22602018-03-28 Renlin Li <renlin.li@arm.com>
2261
2262 PR ld/22970
2263 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
2264 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
2265 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
2266 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
2267 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
2268 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
2269 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
2270 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
2271 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
2272 (elfNN_aarch64_final_link_relocate): Support new relocations.
2273 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
2274 relocations.
2275 (_bfd_aarch64_elf_resolve_relocation): Support new relocations.
2276
84f1b9fb
RL
22772018-03-28 Renlin Li <renlin.li@arm.com>
2278
2279 PR ld/22970
2280 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12
2281 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
2282 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
2283 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
2284 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
2285 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
2286 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
2287 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
2288 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
2289 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
2290 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for
2291 TLSLE_LDST16_TPREL_LO12,
2292 TLSLE_LDST16_TPREL_LO12_NC,
2293 TLSLE_LDST32_TPREL_LO12,
2294 TLSLE_LDST32_TPREL_LO12_NC,
2295 TLSLE_LDST64_TPREL_LO12,
2296 TLSLE_LDST64_TPREL_LO12_NC,
2297 TLSLE_LDST8_TPREL_LO12,
2298 TLSLE_LDST8_TPREL_LO12_NC.
2299 * bfd-in2.h: Regenerated.
2300 * libbfd.h: Regenerated.
2301
f8745e1c
EB
23022018-03-28 Eric Botcazou <ebotcazou@adacore.com>
2303
2304 PR ld/22972
2305 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
2306 has_old_style_got_reloc.
2307 (_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
2308 relocations. Fix a couple of long lines.
2309 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
2310 a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style
2311 GOT relocations.
2312
bf54968b
L
23132018-03-25 H.J. Lu <hongjiu.lu@intel.com>
2314
2315 PR ld/23000
2316 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
2317 ENDBR64 to the TLSDESC PLT entry.
2318
0ccf57bd
AM
23192018-03-21 Alan Modra <amodra@gmail.com>
2320
2321 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting
2322 symbols. Use size_t counts. Delete redundant opd test.
2323
4bad6366
AM
23242018-03-21 Alan Modra <amodra@gmail.com>
2325
2326 * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
2327
bac3c8c5
AM
23282018-03-21 Alan Modra <amodra@gmail.com>
2329
2330 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask
2331 field unsigned.
2332 (update_local_sym_info): Likewise for local_got_tls_masks.
2333 (ppc_elf_tls_optimize): Likewise for lgot_masks.
2334
6a3858a6
AM
23352018-03-21 Alan Modra <amodra@gmail.com>
2336
2337 * elf64-ppc.c (ppc_size_one_stub): Fix comment typo.
2338 (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we
2339 do in size_dynamic_sections.
2340
675e2809
AM
23412018-03-21 Alan Modra <amodra@gmail.com>
2342
2343 * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1]
2344 without first checking array bounds.
2345 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2346
416c34d6
L
23472018-03-20 H.J. Lu <hongjiu.lu@intel.com>
2348
2349 PR ld/22983
2350 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
2351 non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
2352
315aa1cf
NC
23532018-03-19 Nick Clifton <nickc@redhat.com>
2354
2355 * po/es.po: Updated Spanish translation.
2356
0854d504
MF
23572018-03-15 Max Filippov <jcmvbkbc@gmail.com>
2358
2359 * elf32-xtensa.c (xlate_map_entry): Change types of address
2360 fields from 'unsigned' to 'bfd_vma'.
2361 (xlate_offset_with_removed_text): Use struct xlate_map_entry as
2362 the key argument to bsearch. Allow offsets past the end of a
2363 section, use the last map entry for translation of such offsets.
2364
f9671640
KLC
23652018-03-15 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2366
2367 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
2368 Not support the target feature.
2369 (nds32_elf_ex9_itb_base): Likewise.
2370 (nds32_elf_ex9_import_table): Likewise.
2371 (nds32_elf_ex9_finish): Likewise.
2372 (nds32_elf_ex9_reloc_jmp): Likewise.
2373 (nds32_elf_get_insn_with_reg): Likewise.
2374 (nds32_get_local_syms): Likewise.
2375 (nds32_elf_ex9_replace_instruction): Likewise.
2376 (nds32_elf_ifc_calc): Likewise.
2377 (nds32_elf_ifc_finish): Likewise.
2378 (nds32_elf_ifc_replace): Likewise.
2379 (nds32_elf_ifc_reloc): Likewise.
2380
7dda8d3c
AM
23812018-03-14 Alan Modra <amodra@gmail.com>
2382
2383 * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
2384 sfpr size added before defining alias symbols.
2385 (ppc64_elf_build_stubs): Add stub section padding before
2386 copying sfpr contents and defining save/restore alias symbols.
2387
9e223787
L
23882018-03-14 H.J. Lu <hongjiu.lu@intel.com>
2389
2390 PR ld/20882
2391 * elflink.c (elf_gc_mark_debug_section): Also check the local
2392 debug definition section.
2393
3e33b239
NC
23942018-03-13 Nick Clifton <nickc@redhat.com>
2395
2396 PR 22113
2397 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
2398 function. Add an end address parameter. Check access of the data
2399 pointer to make sure that they do not extend beyond the end
2400 address. Return FALSE if any check fails. Add the end address
2401 pointer to the ui structure.
2402 (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
2403 codes to make sure that they do not extend beyond the end address
2404 pointer. Print an error message and return immediately if any
2405 check fails.
2406
f657f8c4
NC
24072018-03-09 Nick Clifton <nickc@redhat.com>
2408
2409 * elf64-s390.c (elf_s390_relocate_section): Move check for
2410 relocations against non-allocated sections to before the code that
2411 handles ifunc relocations.
2412 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2413 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
2414 relocs against IFUNC symbols in non-allocated sections as relocs
2415 against FUNC symbols.
2416 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2417
347a8774
L
24182018-03-08 H.J. Lu <hongjiu.lu@intel.com>
2419
2420 PR ld/22929
2421 * elf32-i386.c (elf_i386_relocate_section): Treat relocation
2422 against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
2423 relocation against FUNC symbol.
2424 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2425
0c1ded8d
RL
24262018-03-07 Renlin Li <renlin.li@arm.com>
2427
2428 PR ld/20402
2429 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
2430 symbol, and don't emit relocation in specific case.
2431
0118219e
AM
24322018-03-07 Alan Modra <amodra@gmail.com>
2433
2434 * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
2435 (mips_elf64_slurp_one_reloc_table): Pass on error.
2436
dfb93f11
JC
24372018-03-03 James Cowgill <james.cowgill@mips.com>
2438 Maciej W. Rozycki <macro@mips.com>
2439
2440 PR ld/21900
2441 * elfxx-mips.c (mips_elf_calculate_relocation): Only return
2442 after calling `undefined_symbol' hook if this is an error
2443 condition. Assume the value of 0 for the symbol requested
2444 otherwise.
2445
9a2ebffd
JW
24462018-03-02 Jim Wilson <jimw@sifive.com>
2447
2448 PR 22903
2449 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
2450 and nop instead of 4.
2451 (elfNN_arch64_build_stubs): Add nop after branch. Increase size by
2452 8 instead of 4.
2453
788af978
JW
24542018-03-01 Jim Wilson <jimw@sifive.com>
2455
2456 PR 22756
2457 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
2458 else if instead of if.
2459
5224fa03
AM
24602018-03-01 Alan Modra <amodra@gmail.com>
2461
2462 * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
2463
116acb2c
AM
24642018-02-28 Alan Modra <amodra@gmail.com>
2465
2466 PR 22887
2467 * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
2468
eef10466
NC
24692018-02-28 Nick Clifton <nickc@redhat.com>
2470
12c96342
NC
2471 PR 22895
2472 PR 22893
2473 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
2474 pointer. Drop unused abfd parameter. Check the size of the block
2475 before initialising the data field. Return the end pointer if the
2476 size is invalid.
2477 (read_attribute_value): Adjust invocations of read_n_bytes.
2478
eef10466
NC
2479 PR 22894
2480 * dwarf1.c (parse_die): Check the length of form blocks before
2481 advancing the data pointer.
2482
0d329c0a
AM
24832018-02-28 Alan Modra <amodra@gmail.com>
2484
2485 PR 22887
2486 * aoutx.h (translate_symbol_table): Print an error message and set
2487 bfd_error on finding an invalid name string offset.
2488
f6aec96d
L
24892018-02-27 H.J. Lu <hongjiu.lu@intel.com>
2490
2491 * config.in: Regenerated.
2492 * configure: Likewise.
2493 * configure.ac: Add --enable-separate-code.
2494 (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default
2495 to 1 for Linux/x86 targets,
2496 * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
2497 DEFAULT_LD_Z_SEPARATE_CODE is 1.
2498
f3185997
NC
24992018-02-27 Nick Clifton <nickc@redhat.com>
2500
e8f5af78
NC
2501 * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
2502 message.
2503 * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
2504 * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
2505 * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
2506 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
2507 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
2508 * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
2509 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
2510 * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
2511 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
2512
f3185997
NC
2513 PR 22875
2514 * elf-bfd.h (struct elf_backend_data): Change the return type of
2515 the elf_info_to_howto and elf_info_to_howto_rel function pointers
2516 to bfd_boolean.
2517 * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
2518 value from the info_to_howto function and fail if that function
2519 failed.
2520 * elf32-h8300.c (elf32_h8_relocate_section): Check return value
2521 from the info_to_howto function.
2522 (elf32_h8_relax_section): Likewise.
2523 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
2524 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
2525 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
2526 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2527 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2528 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
2529 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
2530 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2531 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
2532 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2533 (riscv_elf_relocate_section): Likewise.
2534 * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
2535 bfd_boolean. Issue an error message, set an error value and
2536 return FALSE if the reloc is not recognized.
2537 (elf_hppa_info_to_howto_rel): Likewise.
2538 * elf-m10200.c (mn10200_info_to_howto): Likewise.
2539 * elf-m10300.c (mn10300_info_to_howto): Likewise.
2540 * elf.c (_bfd_elf_no_info_to_howto): Likewise.
2541 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
2542 * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
2543 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
2544 * elf32-bfin.c (bfin_info_to_howto): Likewise.
2545 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
2546 * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
2547 * elf32-cris.c (elf_cr16c_info_to_howto_rel)
2548 (cris_info_to_howto_rela): Likewise.
2549 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
2550 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
2551 * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
2552 Likewise.
2553 * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
2554 (elf32_dlx_info_to_howto_rel): Likewise.
2555 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
2556 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
2557 * elf32-frv.c (frv_info_to_howto_rela)
2558 (frvfdpic_info_to_howto_rel): Likewise.
2559 * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
2560 * elf32-gen.c (elf_generic_info_to_howto)
2561 (elf_generic_info_to_howto_rel): Likewise.
2562 * elf32-h8300.c (elf32_h8_info_to_howto)
2563 (elf32_h8_info_to_howto_rel): Likewise.
2564 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
2565 * elf32-i386.c (elf_i386_reloc_type_lookup)
2566 (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
2567 * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
2568 Likewise.
2569 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
2570 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
2571 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
2572 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
2573 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
2574 * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
2575 Likewise.
2576 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
2577 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
2578 * elf32-m68k.c (rtype_to_howto): Likewise.
2579 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
2580 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
2581 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
2582 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
2583 * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
2584 Likewise.
2585 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
2586 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
2587 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
2588 * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
2589 Likewise.
2590 * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
2591 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
2592 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
2593 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
2594 * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
2595 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
2596 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
2597 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
2598 * elf32-score.c (s3_bfd_score_info_to_howto)
2599 (_bfd_score_info_to_howto): Likewise.
2600 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
2601 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
2602 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
2603 * elf32-tic6x.c (elf32_tic6x_info_to_howto)
2604 (elf32_tic6x_info_to_howto_rel): Likewise.
2605 * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
2606 * elf32-v850.c (v850_elf_info_to_howto_rel)
2607 (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
2608 * elf32-vax.c (rtype_to_howto): Likewise.
2609 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
2610 * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
2611 (elf32_wasm32_info_to_howto_rela): Likewise.
2612 * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
2613 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
2614 * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
2615 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
2616 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
2617 * elf64-gen.c (elf_generic_info_to_howto)
2618 (elf_generic_info_to_howto_rel): Likewise.
2619 * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
2620 * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
2621 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
2622 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
2623 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
2624 * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
2625 Likewise.
2626 * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
2627 * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
2628 Likewise.
2629 * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
2630 * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
2631 * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
2632 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
2633 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
2634 * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
2635 * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
2636 * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
2637 * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
2638 * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
2639 Default to NULL.
2640
1f4bace8
JW
26412018-02-26 Jim Wilson <jimw@sifive.com>
2642 Stephan Schreiber <info@fs-driver.org>
2643
2644 PR 15904
2645 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
2646 call, set changed_contents and changed_relocs. Likewise after
2647 successful ia64_elf_relax_br call.
2648
6838f2be
AM
26492018-02-26 Alan Modra <amodra@gmail.com>
2650
2651 * elf.c (assign_file_positions_except_relocs): Don't segfault
2652 when actual number of phdrs is less than allocated. Delete
2653 outdated comment. Formatting.
2654
38f14ab8
AM
26552018-02-26 Alan Modra <amodra@gmail.com>
2656
2657 * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
2658 * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
2659 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
2660 * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
2661 * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
2662 * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
2663 * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
2664 * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
2665 * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
2666 * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
2667 error/warning messages.
2668
6e05870c
AM
26692018-02-26 Alan Modra <amodra@gmail.com>
2670
2671 * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
2672 * syms.c: Standardize error/warning messages.
2673
59d08d6c
AM
26742018-02-26 Alan Modra <amodra@gmail.com>
2675
2676 * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
2677 * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
2678 * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
2679 * peXXigen.c, * peicode.h: Standardize error/warning messages.
2680
90b6238f
AM
26812018-02-26 Alan Modra <amodra@gmail.com>
2682
2683 * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
2684
2c1c9679
AM
26852018-02-26 Alan Modra <amodra@gmail.com>
2686
2687 * elfxx-mips.c: Standardize error/warning messages.
2688
9793eb77
AM
26892018-02-26 Alan Modra <amodra@gmail.com>
2690
2691 * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
2692 * elflink.c: Standardize error/warning messages. Replace use of
2693 linker callback einfo with _bfd_error_handler when possible.
2694
0aa13fee
AM
26952018-02-26 Alan Modra <amodra@gmail.com>
2696
2697 * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
2698 * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
2699 * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
2700 * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
2701 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
2702 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
2703 * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
2704 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
2705 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
2706 * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
2707 * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
2708 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
2709 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
2710 * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
2711 * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
2712 * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
2713 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
2714 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
2715 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
2716 * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
2717 * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
2718 unrecognized/unsupported reloc message.
2719
cf97bcb0
AM
27202018-02-26 Alan Modra <amodra@gmail.com>
2721
2722 * elf32-ppc.c: Standardize error/warning messages. Use
2723 _bfd_error_handler rather than einfo when einfo features not used.
2724 * elf64-ppc.c: Likewise.
2725
01f7e10c
AM
27262018-02-23 Alan Modra <amodra@gmail.com>
2727
2728 PR 22881
2729 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
2730 segment if no matching LOAD segment.
2731
e859f655
KLC
27322018-02-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2733
2734 * elf32-nds32.h: Define mask for ict_model.
2735
6e8d06db
JD
27362018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
2737
2738 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
2739
b248d650
MR
27402018-02-19 Maciej W. Rozycki <macro@mips.com>
2741
2742 Revert
2743 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
2744
2745 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
2746 .reginfo section has wrong size.
2747
6798f8bf
MR
27482018-02-19 Maciej W. Rozycki <macro@mips.com>
2749
2750 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
2751 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
2752 `.MIPS.abiflags' sections.
2753 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
2754 section's end.
2755
8772de11
MR
27562018-02-19 Maciej W. Rozycki <macro@mips.com>
2757
2758 * section.c (SEC_FIXED_SIZE): New macro.
2759 * bfd-in2.h: Regenerate.
2760
4f7fd351
MR
27612018-02-19 Maciej W. Rozycki <macro@mips.com>
2762
2763 * section.c (SEC_HAS_GOT_REF): Remove macro.
2764 * bfd-in2.h: Regenerate.
2765
f2b740ac
AM
27662018-02-19 Alan Modra <amodra@gmail.com>
2767
2768 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
2769 arguments.
2770 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
2771 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
2772 (_bfd_riscv_relax_pc): Likewise and fix typos.
2773 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
2774 * libbfd.h: Regenerate.
2775
8979927a
AM
27762018-02-19 Alan Modra <amodra@gmail.com>
2777
2778 * dwarf2.c (read_section): Don't use 'll' format modifier.
2779 (find_abstract_instance): Likewise.
2780 * elfcore.h (elf_core_file_p): Likewise.
2781
2dcf00ce
AM
27822018-02-19 Alan Modra <amodra@gmail.com>
2783
2784 * bfd-in.h: Include inttypes.h or if not available define
2785 PRId64, PRIu64 and PRIx64.
2786 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
2787 modifier to print bfd_vma.
2788 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
2789 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
2790 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
2791 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
2792 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
2793 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
2794 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
2795 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
2796 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
2797 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
2798 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
2799 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
2800 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
2801 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
2802 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
2803 and cast input to uint64_t, and similarly for Ld and Lu.
2804 * bfd-in2.h: Regenerate.
2805
c1c8c1ef
AM
28062018-02-19 Alan Modra <amodra@gmail.com>
2807
2808 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
2809 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
2810 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
2811 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
2812 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
2813 * reloc.c: Replace use of %R and %T in format strings passed to
2814 einfo and friends by %pR and %pT.
2815
871b3ab2
AM
28162018-02-19 Alan Modra <amodra@gmail.com>
2817
2818 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
2819 of %A and %B.
2820 * aout-adobe.c: Update all messages using %A and %B.
2821 * aout-cris.c: Likewise.
2822 * aoutx.h: Likewise.
2823 * archive.c: Likewise.
2824 * binary.c: Likewise.
2825 * cache.c: Likewise.
2826 * coff-alpha.c: Likewise.
2827 * coff-arm.c: Likewise.
2828 * coff-i860.c: Likewise.
2829 * coff-mcore.c: Likewise.
2830 * coff-ppc.c: Likewise.
2831 * coff-rs6000.c: Likewise.
2832 * coff-sh.c: Likewise.
2833 * coff-tic4x.c: Likewise.
2834 * coff-tic54x.c: Likewise.
2835 * coff-tic80.c: Likewise.
2836 * coff64-rs6000.c: Likewise.
2837 * coffcode.h: Likewise.
2838 * coffgen.c: Likewise.
2839 * cofflink.c: Likewise.
2840 * coffswap.h: Likewise.
2841 * compress.c: Likewise.
2842 * cpu-arm.c: Likewise.
2843 * ecoff.c: Likewise.
2844 * elf-attrs.c: Likewise.
2845 * elf-eh-frame.c: Likewise.
2846 * elf-ifunc.c: Likewise.
2847 * elf-m10300.c: Likewise.
2848 * elf-properties.c: Likewise.
2849 * elf-s390-common.c: Likewise.
2850 * elf.c: Likewise.
2851 * elf32-arc.c: Likewise.
2852 * elf32-arm.c: Likewise.
2853 * elf32-avr.c: Likewise.
2854 * elf32-bfin.c: Likewise.
2855 * elf32-cr16.c: Likewise.
2856 * elf32-cr16c.c: Likewise.
2857 * elf32-cris.c: Likewise.
2858 * elf32-crx.c: Likewise.
2859 * elf32-d10v.c: Likewise.
2860 * elf32-d30v.c: Likewise.
2861 * elf32-epiphany.c: Likewise.
2862 * elf32-fr30.c: Likewise.
2863 * elf32-frv.c: Likewise.
2864 * elf32-gen.c: Likewise.
2865 * elf32-hppa.c: Likewise.
2866 * elf32-i370.c: Likewise.
2867 * elf32-i386.c: Likewise.
2868 * elf32-i960.c: Likewise.
2869 * elf32-ip2k.c: Likewise.
2870 * elf32-iq2000.c: Likewise.
2871 * elf32-lm32.c: Likewise.
2872 * elf32-m32c.c: Likewise.
2873 * elf32-m32r.c: Likewise.
2874 * elf32-m68hc11.c: Likewise.
2875 * elf32-m68hc12.c: Likewise.
2876 * elf32-m68hc1x.c: Likewise.
2877 * elf32-m68k.c: Likewise.
2878 * elf32-mcore.c: Likewise.
2879 * elf32-mep.c: Likewise.
2880 * elf32-metag.c: Likewise.
2881 * elf32-microblaze.c: Likewise.
2882 * elf32-moxie.c: Likewise.
2883 * elf32-msp430.c: Likewise.
2884 * elf32-mt.c: Likewise.
2885 * elf32-nds32.c: Likewise.
2886 * elf32-nios2.c: Likewise.
2887 * elf32-or1k.c: Likewise.
2888 * elf32-pj.c: Likewise.
2889 * elf32-ppc.c: Likewise.
2890 * elf32-rl78.c: Likewise.
2891 * elf32-rx.c: Likewise.
2892 * elf32-s390.c: Likewise.
2893 * elf32-score.c: Likewise.
2894 * elf32-score7.c: Likewise.
2895 * elf32-sh-symbian.c: Likewise.
2896 * elf32-sh.c: Likewise.
2897 * elf32-sh64.c: Likewise.
2898 * elf32-sparc.c: Likewise.
2899 * elf32-spu.c: Likewise.
2900 * elf32-tic6x.c: Likewise.
2901 * elf32-tilepro.c: Likewise.
2902 * elf32-v850.c: Likewise.
2903 * elf32-vax.c: Likewise.
2904 * elf32-visium.c: Likewise.
2905 * elf32-wasm32.c: Likewise.
2906 * elf32-xgate.c: Likewise.
2907 * elf32-xtensa.c: Likewise.
2908 * elf64-alpha.c: Likewise.
2909 * elf64-gen.c: Likewise.
2910 * elf64-hppa.c: Likewise.
2911 * elf64-ia64-vms.c: Likewise.
2912 * elf64-mmix.c: Likewise.
2913 * elf64-ppc.c: Likewise.
2914 * elf64-s390.c: Likewise.
2915 * elf64-sh64.c: Likewise.
2916 * elf64-sparc.c: Likewise.
2917 * elf64-x86-64.c: Likewise.
2918 * elfcode.h: Likewise.
2919 * elfcore.h: Likewise.
2920 * elflink.c: Likewise.
2921 * elfnn-aarch64.c: Likewise.
2922 * elfnn-ia64.c: Likewise.
2923 * elfnn-riscv.c: Likewise.
2924 * elfxx-mips.c: Likewise.
2925 * elfxx-sparc.c: Likewise.
2926 * elfxx-tilegx.c: Likewise.
2927 * elfxx-x86.c: Likewise.
2928 * hpux-core.c: Likewise.
2929 * ieee.c: Likewise.
2930 * ihex.c: Likewise.
2931 * libbfd.c: Likewise.
2932 * linker.c: Likewise.
2933 * mach-o.c: Likewise.
2934 * merge.c: Likewise.
2935 * mmo.c: Likewise.
2936 * oasys.c: Likewise.
2937 * pdp11.c: Likewise.
2938 * pe-mips.c: Likewise.
2939 * peXXigen.c: Likewise.
2940 * peicode.h: Likewise.
2941 * reloc.c: Likewise.
2942 * rs6000-core.c: Likewise.
2943 * srec.c: Likewise.
2944 * stabs.c: Likewise.
2945 * vms-alpha.c: Likewise.
2946 * xcofflink.c: Likewise.
2947
dbc88fc1
AM
29482018-02-19 Alan Modra <amodra@gmail.com>
2949
2950 PR 22845
2951 * elf.c (IS_TBSS): Define.
2952 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
2953 (assign_file_positions_for_non_load_sections): Revert last change.
2954 Properly calculate load segment limits to compare against relro limits.
2955
325ba6fb
AM
29562018-02-17 Alan Modra <amodra@gmail.com>
2957
2958 PR 22845
2959 * elf.c (assign_file_positions_for_non_load_sections): Ignore
2960 degenerate zero size PT_LOAD segments when finding one overlapping
2961 the PT_GNU_RELRO segment.
2962
d00dd7dc
AM
29632018-02-16 Alan Modra <amodra@gmail.com>
2964
2965 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
2966 (_bfd_bool_bfd_true): Rename from bfd_true.
2967 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
2968 (_bfd_int_bfd_0): Rename from bfd_0.
2969 (_bfd_uint_bfd_0): Rename from bfd_0u.
2970 (_bfd_long_bfd_0): Rename from bfd_0l.
2971 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
2972 (_bfd_void_bfd): Rename from bfd_void.
2973 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
2974 (_bfd_bool_bfd_link_false_error),
2975 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
2976 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
2977 (_bfd_bool_bfd_asection_bfd_asection_true),
2978 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
2979 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
2980 * archive.c (_bfd_noarchive_get_elt_at_index),
2981 (_bfd_noarchive_openr_next_archived_file),
2982 (_bfd_noarchive_construct_extended_name_table),
2983 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
2984 (_bfd_noarchive_write_armap): New functions.
2985 * archures.c (_bfd_nowrite_set_arch_mach): New function.
2986 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
2987 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
2988 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
2989 (alpha_ecoff_swap_coff_lineno_out),
2990 (alpha_ecoff_swap_coff_reloc_out): New functions.
2991 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
2992 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
2993 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
2994 (mips_ecoff_swap_coff_lineno_out),
2995 (mips_ecoff_swap_coff_reloc_out): New functions.
2996 * coffcode.h (coff_set_alignment_hook): Replace define with
2997 new function.
2998 (symname_in_debug_hook): Likewise.
2999 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
3000 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
3001 * elf.c (assign_file_positions_except_relocs): Test
3002 elf_backend_allow_non_load_phdr for NULL.
3003 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
3004 _bfd_elf_link_omit_section_dynsym. Update uses.
3005 (_bfd_elf_omit_section_dynsym_all): New function.
3006 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
3007 (_bfd_elf_omit_section_dynsym_default): Declare.
3008 (_bfd_elf_omit_section_dynsym_all): Declare.
3009 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
3010 (_bfd_nolink_bfd_get_relocated_section_contents),
3011 (_bfd_nolink_bfd_lookup_section_flags),
3012 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
3013 (_bfd_nolink_bfd_link_hash_table_create),
3014 (_bfd_nolink_bfd_link_just_syms),
3015 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
3016 (_bfd_nolink_bfd_link_split_section),
3017 (_bfd_nolink_section_already_linked),
3018 (_bfd_nolink_bfd_define_common_symbol),
3019 (_bfd_nolink_bfd_define_start_stop): New functions.
3020 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
3021 (_bfd_norelocs_bfd_reloc_name_lookup),
3022 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
3023 * section.c (_bfd_nowrite_set_section_contents): New function.
3024 * syms.c (_bfd_nosymbols_canonicalize_symtab),
3025 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
3026 (_bfd_nosymbols_get_symbol_version_string),
3027 (_bfd_nosymbols_bfd_is_local_label_name),
3028 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
3029 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
3030 (_bfd_nosymbols_bfd_make_debug_symbol),
3031 ( _bfd_nosymbols_read_minisymbols),
3032 ( _bfd_nosymbols_minisymbol_to_symbol),
3033 (_bfd_nodynamic_get_synthetic_symtab): New functions.
3034 * libbfd-in.h: Declare new functions. Update existing defines,
3035 removing casts.
3036 * aix386-core.c: Update to use new hooks. Formatting.
3037 * aout-adobe.c: Likewise.
3038 * aout-arm.c: Likewise.
3039 * aout-target.h: Likewise.
3040 * aout-tic30.c: Likewise.
3041 * aoutf1.h: Likewise.
3042 * binary.c: Likewise.
3043 * bout.c: Likewise.
3044 * cisco-core.c: Likewise.
3045 * coff-alpha.c: Likewise.
3046 * coff-i386.c: Likewise.
3047 * coff-i860.c: Likewise.
3048 * coff-i960.c: Likewise.
3049 * coff-ia64.c: Likewise.
3050 * coff-mips.c: Likewise.
3051 * coff-ppc.c: Likewise.
3052 * coff-rs6000.c: Likewise.
3053 * coff-sh.c: Likewise.
3054 * coff-tic30.c: Likewise.
3055 * coff-tic54x.c: Likewise.
3056 * coff-x86_64.c: Likewise.
3057 * coff64-rs6000.c: Likewise.
3058 * coffcode.h: Likewise.
3059 * elf-m10300.c: Likewise.
3060 * elf32-cr16.c: Likewise.
3061 * elf32-lm32.c: Likewise.
3062 * elf32-m32r.c: Likewise.
3063 * elf32-metag.c: Likewise.
3064 * elf32-score.c: Likewise.
3065 * elf32-score7.c: Likewise.
3066 * elf32-tilepro.c: Likewise.
3067 * elf32-xstormy16.c: Likewise.
3068 * elf32-xtensa.c: Likewise.
3069 * elf64-alpha.c: Likewise.
3070 * elf64-hppa.c: Likewise.
3071 * elf64-ia64-vms.c: Likewise.
3072 * elf64-mmix.c: Likewise.
3073 * elf64-sh64.c: Likewise.
3074 * elfnn-ia64.c: Likewise.
3075 * elfxx-sparc.c: Likewise.
3076 * elfxx-target.h: Likewise.
3077 * elfxx-tilegx.c: Likewise.
3078 * elfxx-x86.h: Likewise.
3079 * hp300hpux.c: Likewise.
3080 * hppabsd-core.c: Likewise.
3081 * hpux-core.c: Likewise.
3082 * i386msdos.c: Likewise.
3083 * i386os9k.c: Likewise.
3084 * ieee.c: Likewise.
3085 * ihex.c: Likewise.
3086 * irix-core.c: Likewise.
3087 * libaout.h: Likewise.
3088 * libecoff.h: Likewise.
3089 * mach-o-target.c: Likewise.
3090 * mach-o.c: Likewise.
3091 * mipsbsd.c: Likewise.
3092 * mmo.c: Likewise.
3093 * netbsd-core.c: Likewise.
3094 * nlm-target.h: Likewise.
3095 * oasys.c: Likewise.
3096 * osf-core.c: Likewise.
3097 * pdp11.c: Likewise.
3098 * pe-mips.c: Likewise.
3099 * pe-x86_64.c: Likewise.
3100 * pef.c: Likewise.
3101 * plugin.c: Likewise.
3102 * ppcboot.c: Likewise.
3103 * ptrace-core.c: Likewise.
3104 * sco5-core.c: Likewise.
3105 * som.c: Likewise.
3106 * sparclynx.c: Likewise.
3107 * srec.c: Likewise.
3108 * tekhex.c: Likewise.
3109 * trad-core.c: Likewise.
3110 * verilog.c: Likewise.
3111 * versados.c: Likewise.
3112 * vms-alpha.c: Likewise.
3113 * vms-lib.c: Likewise.
3114 * wasm-module.c: Likewise.
3115 * xsym.c: Likewise.
3116 * libbfd.h: Regenerate.
3117
2a0d9853
JW
31182018-02-15 Jim Wilson <jimw@sifive.com>
3119
09ca4b9d
JW
3120 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
3121 symbols whose section address is zero.
3122
2a0d9853
JW
3123 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
3124 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
3125 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
3126 Add %X%P to error messages.
3127
e513bd38
EB
31282018-02-15 Eric Botcazou <ebotcazou@adacore.com>
3129
3130 PR ld/22832
3131 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
3132 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
3133 and assert that the result of the call is not NULL.
3134
12ef3f5a
NC
31352018-02-14 Nick Clifton <nickc@redhat.com>
3136
3137 PR 22823
3138 Revert previous delta. Add extra casts to avoid compile time
3139 warnings instead.
3140 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
3141 cast to avoid warning from gcc v8 compiler.
3142 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
3143 (_bfd_generic_bfd_set_private_flags): Likewise.
3144 (_bfd_generic_bfd_copy_private_section_data): Likewise.
3145 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
3146 (_bfd_generic_bfd_copy_private_header_data): Likewise.
3147 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
3148 (_bfd_noarchive_construct_extended_name_table): Likewise.
3149 (_bfd_noarchive_truncate_arname): Likewise.
3150 (_bfd_noarchive_write_ar_hdr): Likewise.
3151 (_bfd_noarchive_get_elt_at_index): Likewise.
3152 (_bfd_nosymbols_canonicalize_symtab): Likewise.
3153 (_bfd_nosymbols_print_symbol): Likewise.
3154 (_bfd_nosymbols_get_symbol_info): Likewise.
3155 (_bfd_nosymbols_get_symbol_version_string): Likewise.
3156 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
3157 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
3158 (_bfd_nosymbols_get_lineno): Likewise.
3159 (_bfd_nosymbols_find_nearest_line): Likewise.
3160 (_bfd_nosymbols_find_line): Likewise.
3161 (_bfd_nosymbols_find_inliner_info): Likewise.
3162 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
3163 (_bfd_nosymbols_read_minisymbols): Likewise.
3164 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
3165 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
3166 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
3167 (_bfd_nowrite_set_arch_mach): Likewise.
3168 (_bfd_nowrite_set_section_contents): Likewise.
3169 (_bfd_nolink_sizeof_headers): Likewise.
3170 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
3171 (_bfd_nolink_bfd_relax_section): Likewise.
3172 (_bfd_nolink_bfd_gc_sections): Likewise.
3173 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
3174 (_bfd_nolink_bfd_merge_sections): Likewise.
3175 (_bfd_nolink_bfd_is_group_section): Likewise.
3176 (_bfd_nolink_bfd_discard_group): Likewise.
3177 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
3178 (_bfd_nolink_bfd_link_add_symbols): Likewise.
3179 (_bfd_nolink_bfd_link_just_syms): Likewise.
3180 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
3181 (_bfd_nolink_bfd_final_link): Likewise.
3182 (_bfd_nolink_bfd_link_split_section): Likewise.
3183 (_bfd_nolink_section_already_linked): Likewise.
3184 (_bfd_nolink_bfd_define_common_symbol): Likewise.
3185 (_bfd_nolink_bfd_define_start_stop): Likewise.
3186 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
3187 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
3188 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
3189 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
3190 * libbfd.c (bfd_false_any): Delete.
3191 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
3192 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
3193 * libbfd.h (extern): Regenerate
3194 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
3195 cast to avoid warning from gcc v8 compiler.
3196 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
3197 * binary.c (binary_get_symbol_info): Likewise.
3198 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
3199 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3200 * coffcode.h (coff_set_alignment_hook): Likewise.
3201 (symname_in_debug_hook): Likewise.
3202 (bfd_coff_backend_data bigobj_swap_table): Likewise.
3203 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
3204 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
3205 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
3206 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
3207 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
3208 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
3209 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
3210 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
3211 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
3212 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
3213 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
3214 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
3215 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
3216 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
3217 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
3218 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
3219 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
3220 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
3221 (bfd_elfNN_bfd_set_private_flags): Likewise.
3222 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
3223 (elf_backend_init_index_section): Likewise.
3224 (elf_backend_allow_non_load_phdr): Likewise.
3225 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
3226 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
3227 * ieee.c (ieee_construct_extended_name_table): Likewise.
3228 (ieee_write_armap): Likewise.
3229 (ieee_write_ar_hdr): Likewise.
3230 (ieee_bfd_is_target_special_symbol): Likewise.
3231 * ihex.c (ihex_canonicalize_symtab): Likewise.
3232 (ihex_bfd_is_target_special_symbol): Likewise.
3233 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
3234 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
3235 (_bfd_ecoff_set_alignment_hook): Likewise.
3236 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
3237 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
3238 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
3239 * oasys.c (oasys_construct_extended_name_table): Likewise.
3240 (oasys_write_armap): Likewise.
3241 (oasys_write_ar_hdr): Likewise.
3242 (oasys_bfd_is_target_special_symbol): Likewise.
3243 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
3244 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
3245 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
3246 * som.c (som_bfd_is_target_special_symbol): Likewise.
3247 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
3248 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
3249 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
3250 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
3251 (versados_bfd_reloc_name_lookup): Likewise.
3252 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
3253 (vms_bfd_define_start_stop): Likewise.
3254 (alpha_vms_bfd_is_target_special_symbol): Likewise.
3255 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
3256 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
3257
451875b4
L
32582018-02-14 H.J. Lu <hongjiu.lu@intel.com>
3259
3260 PR ld/22842
3261 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
3262 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
3263 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
3264 R_X86_64_PC32 reloc against dynamic function in data section.
3265 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
3266 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
3267 against dynamic function in data section.
3268 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
3269 function address only if pcrel_plt is true.
3270 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
3271 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
3272 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
3273 PC-relative relocation against a function definition in data
3274 secton in PIE. Remove the obsolete comments.
3275 (elf_x86_link_hash_table): Add pcrel_plt.
3276
1031c264
L
32772018-02-13 H.J. Lu <hongjiu.lu@intel.com>
3278
3279 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
3280 instead of bfd_link_pic, for building shared library.
3281
bd7ab16b
L
32822018-02-13 H.J. Lu <hongjiu.lu@intel.com>
3283
3284 PR gas/22791
3285 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
3286 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
3287 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
3288 against protected function in shared object.
3289
80c96350
ST
32902018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
3291
3292 PR 22828
3293 * po/ru.po: Fix typo in Russian translation.
3294
87993319
MR
32952018-02-13 Maciej W. Rozycki <macro@mips.com>
3296
3297 * wasm-module.c (wasm_scan_name_function_section): Rename
3298 `index' local variable to `idx'.
3299
68d20676
NC
33002018-02-13 Nick Clifton <nickc@redhat.com>
3301
3302 PR 22823
3303 Fix compile time warnings generated by gcc version 8.
3304 * libbfd-in.h: Remove extraneous text from prototypes.
3305 Add prototypes for bfd_false_any, bfd_true_any,
3306 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
3307 bfd_n1_any, bfd_void_any.
3308 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
3309 function.
3310 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
3311 (_bfd_generic_bfd_set_private_flags): Likewise.
3312 (_bfd_generic_bfd_copy_private_section_data): Likewise.
3313 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
3314 (_bfd_generic_bfd_copy_private_header_data): Likewise.
3315 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
3316 (_bfd_noarchive_construct_extended_name_table): Likewise.
3317 (_bfd_noarchive_truncate_arname): Likewise.
3318 (_bfd_noarchive_write_ar_hdr): Likewise.
3319 (_bfd_noarchive_get_elt_at_index): Likewise.
3320 (_bfd_nosymbols_canonicalize_symtab): Likewise.
3321 (_bfd_nosymbols_print_symbol): Likewise.
3322 (_bfd_nosymbols_get_symbol_info): Likewise.
3323 (_bfd_nosymbols_get_symbol_version_string): Likewise.
3324 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
3325 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
3326 (_bfd_nosymbols_get_lineno): Likewise.
3327 (_bfd_nosymbols_find_nearest_line): Likewise.
3328 (_bfd_nosymbols_find_line): Likewise.
3329 (_bfd_nosymbols_find_inliner_info): Likewise.
3330 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
3331 (_bfd_nosymbols_read_minisymbols): Likewise.
3332 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
3333 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
3334 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
3335 (_bfd_nowrite_set_arch_mach): Likewise.
3336 (_bfd_nowrite_set_section_contents): Likewise.
3337 (_bfd_nolink_sizeof_headers): Likewise.
3338 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
3339 (_bfd_nolink_bfd_relax_section): Likewise.
3340 (_bfd_nolink_bfd_gc_sections): Likewise.
3341 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
3342 (_bfd_nolink_bfd_merge_sections): Likewise.
3343 (_bfd_nolink_bfd_is_group_section): Likewise.
3344 (_bfd_nolink_bfd_discard_group): Likewise.
3345 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
3346 (_bfd_nolink_bfd_link_add_symbols): Likewise.
3347 (_bfd_nolink_bfd_link_just_syms): Likewise.
3348 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
3349 (_bfd_nolink_bfd_final_link): Likewise.
3350 (_bfd_nolink_bfd_link_split_section): Likewise.
3351 (_bfd_nolink_section_already_linked): Likewise.
3352 (_bfd_nolink_bfd_define_common_symbol): Likewise.
3353 (_bfd_nolink_bfd_define_start_stop): Likewise.
3354 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
3355 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
3356 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
3357 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
3358 * libbfd.c (bfd_false_any): New function. Like bfd_false but
3359 accepts one or more arguments.
3360 (bfd_true_any): Likewise.
3361 (bfd_nullvoidptr_any): Likewise.
3362 (bfd_0_any): Likewise.
3363 (bfd_0u_any): Likewise.
3364 (bfd_0l_any): Likewise.
3365 (_bfd_n1_any): Likewise.
3366 (bfd_void_any): Likewise.
3367 * libbfd.h (extern): Regenerate
3368 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
3369 based dummy function.
3370 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
3371 * binary.c (binary_get_symbol_info): Likewise.
3372 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
3373 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3374 * coffcode.h (coff_set_alignment_hook): Likewise.
3375 (symname_in_debug_hook): Likewise.
3376 (bfd_coff_backend_data bigobj_swap_table): Likewise.
3377 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
3378 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
3379 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
3380 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
3381 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
3382 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
3383 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
3384 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
3385 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
3386 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
3387 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
3388 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
3389 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
3390 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
3391 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
3392 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
3393 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
3394 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
3395 (bfd_elfNN_bfd_set_private_flags): Likewise.
3396 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
3397 (elf_backend_init_index_section): Likewise.
3398 (elf_backend_allow_non_load_phdr): Likewise.
3399 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
3400 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
3401 * ieee.c (ieee_construct_extended_name_table): Likewise.
3402 (ieee_write_armap): Likewise.
3403 (ieee_write_ar_hdr): Likewise.
3404 (ieee_bfd_is_target_special_symbol): Likewise.
3405 * ihex.c (ihex_canonicalize_symtab): Likewise.
3406 (ihex_bfd_is_target_special_symbol): Likewise.
3407 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
3408 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
3409 (_bfd_ecoff_set_alignment_hook): Likewise.
3410 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
3411 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
3412 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
3413 * oasys.c (oasys_construct_extended_name_table): Likewise.
3414 (oasys_write_armap): Likewise.
3415 (oasys_write_ar_hdr): Likewise.
3416 (oasys_bfd_is_target_special_symbol): Likewise.
3417 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
3418 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
3419 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
3420 * som.c (som_bfd_is_target_special_symbol): Likewise.
3421 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
3422 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
3423 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
3424 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
3425 (versados_bfd_reloc_name_lookup): Likewise.
3426 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
3427 (vms_bfd_define_start_stop): Likewise.
3428 (alpha_vms_bfd_is_target_special_symbol): Likewise.
3429 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
3430 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
3431 * elf32-arc.c (get_replace_function): Assign replacement function
3432 to func pointer.
3433 * elf32-i370.c (i370_noop): Update prototype.
3434
6e5e9d58
AM
34352018-02-13 Alan Modra <amodra@gmail.com>
3436
3437 PR 22836
3438 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
3439 relocation sections. If size reduces to just the flag word,
3440 remove that too and mark with SEC_EXCLUDE.
3441 * elflink.c (bfd_elf_final_link): Strip empty group sections.
3442
f2731e0c
AM
34432018-02-13 Alan Modra <amodra@gmail.com>
3444
3445 PR 22829
3446 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
3447 PT_GNU_RELRO setup.
3448
830db048
ZF
34492018-02-12 Zebediah Figura <z.figura12@gmail.com>
3450
3451 * i386msdos.c (msdos_mkobject); New function.
3452 (msdos_object_p): New function.
3453 (i386_msdos_vec): Use msdos_object_p as the check_format
3454 function.
3455 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
3456 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
3457 IMAGE_NT_SIGNATURE.
3458 * peXXigen.c: Likewise.
3459 * coff-ia64.c: Likewise.
3460
94fe5757
NC
34612018-02-12 Nick Clifton <nickc@redhat.com>
3462
3463 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
3464 assignment.
0b8683b7 3465 * elf32-arc.c (elf_arc_relocate_section): Likewise.
94fe5757 3466
d805612e 34672018-02-09 Eric Botcazou <ebotcazou@adacore.com>
a8735c82
EB
3468
3469 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
3470 (sparc_elf_append_rela): Assert that there is enough room in section.
3471 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
3472 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
3473 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
3474 For a symbol subject to a GOT relocation, reserve a slot in the
3475 relocation section if the symbol isn't dynamic and we are in PIC mode.
3476 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
3477 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
3478 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
3479 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
3480 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
3481 resolved_to_zero. Do not generate a dynamic GOT relocation for an
3482 undefined weak symbol with non-default visibility. Remove superfluous
3483 'else' and fix formatting.
3484
3b4c3844
L
34852018-02-09 H.J. Lu <hongjiu.lu@intel.com>
3486
3487 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
3488 is_solaris.
3489 (i386_elf32_sol2_vec): Don't declare.
3490 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
3491 Don't set need_global_offset_table.
3492 (elf_i386_solaris_arch_bed): New.
3493 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
3494 Solaris.
3495 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
3496 target_os != is_nacl instead of target_os == is_normal.
3497 (x86_64_elf64_sol2_vec): Don't declare.
3498 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
3499 is_nacl instead of target_os == is_normal. Don't set
3500 need_global_offset_table.
3501 (elf_x86_64_solaris_arch_bed): New.
3502 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
3503 Solaris.
3504 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
3505 _GLOBAL_OFFSET_TABLE_ for Solaris.
3506 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
3507 need_global_offset_table.
3508 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
3509 (elf_x86_link_hash_table): Remove need_global_offset_table.
3510 (elf_x86_init_table): Likewise.
3511
15b23f36
L
35122018-02-08 H.J. Lu <hongjiu.lu@intel.com>
3513
3514 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
3515 Remove prototype.
3516 (i386_elf32_sol2_vec): Declared.
3517 (elf_i386_link_setup_gnu_properties): Set
3518 need_global_offset_table with info->output_bfd->xvec.
3519 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
3520 Remove prototype.
3521 (x86_64_elf64_sol2_vec): Declared.
3522 (elf_x86_64_link_setup_gnu_properties): Set
3523 need_global_offset_table with info->output_bfd->xvec.
3524
dc11dea2
L
35252018-02-08 H.J. Lu <hongjiu.lu@intel.com>
3526
3527 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
3528 New prototype.
3529 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
3530 for Solaris.
3531 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
3532 New prototype.
3533 (elf_x86_64_link_setup_gnu_properties): Set
3534 need_global_offset_table for Solaris.
3535 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
3536 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
3537 (_bfd_x86_elf_link_setup_gnu_properties): Copy
3538 need_global_offset_table.
3539 * elfxx-x86.h (elf_x86_link_hash_table): Add
3540 need_global_offset_table.
3541 (elf_x86_init_table): Likewise.
3542
3f48fe4a
JW
35432018-02-08 Jim Wilson <jimw@sifive.com>
3544
3545 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
3546 change.
3547
ef135d43
NC
35482018-02-08 Nick Clifton <nickc@redhat.com>
3549
3550 PR 22788
3551 * elf.c (elf_parse_notes): Reject notes with excessuively large
3552 alignments.
3553
407aa07c
AM
35542018-02-07 Alan Modra <amodra@gmail.com>
3555
3556 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
3557 * elf32-ppc.c: Remove speculation barrier support.
3558 * elf32-ppc.h: Likewise.
3559 * elf64-ppc.c: Likewise.
3560 * elf64-ppc.h: Likewise.
3561
ed01220c
JW
35622018-02-06 Jim Wilson <jimw@sifive.com>
3563
3564 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
3565 callback to report an error.
3566
c20c30f6
EB
35672018-02-06 Eric Botcazou <ebotcazou@adacore.com>
3568
3569 PR ld/22263
3570 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
3571 into call to !bfd_link_executable and tidy up.
3572 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
3573 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
3574 !bfd_link_executable.
3575 <R_SPARC_TLS_IE_HI22>: Likewise.
3576 <GOT relocations>: Remove useless code, tidy and merge related blocks.
3577 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
3578 !bfd_link_executable.
3579 <R_SPARC_WPLT30>: Tidy up.
3580 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
3581 !bfd_link_executable.
3582 (allocate_dynrelocs): Likewise.
3583 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
3584 <R_SPARC_TLS_GD_HI22>: Merge into...
3585 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
3586 sparc_elf_tls_transition and remove redundant code.
3587 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
3588 !bfd_link_executable.
3589 <R_SPARC_TLS_LDO_HIX22>: Likewise.
3590 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
3591 <R_SPARC_TLS_LDM_CALL>: Likewise.
3592 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
3593 <R_SPARC_TLS_GD_ADD>: Likewise.
3594 <R_SPARC_TLS_LDM_ADD>: Likewise.
3595 <R_SPARC_TLS_LDO_ADD>: Likewise.
3596 <R_SPARC_TLS_IE_LD>: Likewise.
3597
46d09186
NC
35982018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
3599
3600 PR 22789
3601 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
3602 functions failed to find the function name, try the generic elf
3603 find function instead.
3604
8278e7ce
SDJ
36052018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
3606
3607 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
3608 'memcpy' instead of 'strncpy' when writing the magic number.
3609
64e234d4
NC
36102018-02-06 Nick Clifton <nickc@redhat.com>
3611
3612 PR 22794
3613 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
3614 section before attempting to read it in.
3615 (bfd_get_alt_debug_link_info): Likewise.
3616
422f3d3d
PC
36172018-02-06 Paul Carroll <pcarroll@codesourcery.com>
3618
3619 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
3620 line information in addition to name, if they can be found.
3621
279b2f94
RL
36222018-02-05 Renlin Li <renlin.li@arm.com>
3623
3624 PR ld/22764
3625 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
3626 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
3627 check for writeable section as well.
3628
cd048363
L
36292018-02-05 H.J. Lu <hongjiu.lu@intel.com>
3630
3631 PR ld/22782
3632 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
3633 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
3634 undefined weak symbol to 0.
3635 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
3636 if _GLOBAL_OFFSET_TABLE_ is referenced.
3637 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
3638 got_referenced instead of ref_regular_nonweak. Remove the
3639 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
3640 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
3641
e65b1a78
MR
36422018-02-05 Maciej W. Rozycki <macro@mips.com>
3643
3644 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
3645 initialize `hi_reloc'.
3646
2d6dda71
MR
36472018-02-05 Maciej W. Rozycki <macro@mips.com>
3648
3649 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
3650 SHT_MIPS_REGINFO sections don't assert the correct size and
3651 report an error instead.
3652
75506100
MR
36532018-02-05 Maciej W. Rozycki <macro@mips.com>
3654
3655 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
3656 status from `->elf_backend_section_processing'.
3657
7f02625e
JW
36582018-02-02 Jim Wilson <jimw@sifive.com>
3659
3660 PR ld/22756
3661 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
3662 If link_info->wrap_hash, check for a duplicate symbol and ignore.
3663 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
3664 Pass new argument to riscv_relax_delete_bytes.
3665 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
3666 ATTRIBUTE_UNUSED from link_info parameter.
3667
d830549d
AM
36682018-02-02 Alan Modra <amodra@gmail.com>
3669
3670 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
3671 emitted for toc sequence optimization. Set and use "howto" later.
3672
e99955cd
SM
36732018-02-01 Simon Marchi <simon.marchi@ericsson.com>
3674
3675 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
3676 arithmetic on NULL pointer.
3677 * elflink.c (_bfd_elf_archive_symbol_lookup,
3678 elf_link_add_archive_symbols): Likewise.
3679
bf3077a6
MM
36802018-01-31 Michael Matz <matz@suse.de>
3681
3682 * elflink.c (bfd_elf_define_start_stop): Fix check of
3683 def_dynamic.
3684
823143c6
L
36852018-01-31 H.J. Lu <hongjiu.lu@intel.com>
3686
3687 PR ld/21964
3688 * elflink.c (bfd_elf_define_start_stop): Check if __start and
3689 __stop symbols are referenced by shared objects.
3690
76cb3a89
AM
36912018-01-30 Alan Modra <amodra@gmail.com>
3692
3693 PR 22758
3694 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
3695 segment when demand paged with lma on the same page. Test this
3696 before load/non-load, executable/non-executable,
3697 writable/non-writable tests and simplify. Delete bogus relro
3698 condition in writable/non-writable test. Delete outdated
3699 comment. Formatting.
3700
36b8fda5
AM
37012018-01-30 Alan Modra <amodra@gmail.com>
3702
3703 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
3704 symbols dynamic.
3705
eb77f6a4
AM
37062018-01-29 Alan Modra <amodra@gmail.com>
3707
3708 PR 22741
3709 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
3710 range before converting to a symbol table pointer.
3711
7d73b4c8
NC
37122018-01-27 Nick Clifton <nickc@redhat.com>
3713
3714 * po/ru.po: Updated Russian translation.
3715
32253bb7
AM
37162018-01-26 Alan Modra <amodra@gmail.com>
3717
3718 * elflink.c (bfd_elf_define_start_stop): Override symbols when
3719 they are defined dynamically.
3720
ba21f564
AM
37212018-01-26 Alan Modra <amodra@gmail.com>
3722
3723 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
3724 .branch_lt changes size.
3725
38e64b0e
AM
37262018-01-25 Alan Modra <amodra@gmail.com>
3727
3728 PR 22746
3729 * elfcode.h (elf_object_p): Avoid integer overflow.
3730
bb363086
EB
37312018-01-25 Eric Botcazou <ebotcazou@adacore.com>
3732
3733 PR ld/22727
3734 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
3735 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
3736
3737 Revert
3738 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
3739
3740 PR ld/22263
3741 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
3742 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
3743 bfd_link_executable for TLS check.
3744 (_bfd_sparc_elf_check_relocs): Likewise.
3745 (allocate_dynrelocs): Likewise.
3746 (_bfd_sparc_elf_relocate_section): Likewise.
3747
1daf502a
RL
37482018-01-24 Renlin Li <renlin.li@arm.com>
3749
3750 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
3751 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3752 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3753 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3754 BFD_RELOC_AARCH64_MOVW_PREL_G3.
3755 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3756 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3757
32247401
RL
37582018-01-24 Renlin Li <renlin.li@arm.com>
3759
3760 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
3761 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
3762 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
3763 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
3764 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
3765 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
3766 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
3767 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
3768 BFD_RELOC_AARCH64_MOVW_PREL_G3.
3769 * bfd-in2.h: Regenerate.
3770 * libbfd.h: Regenerate.
3771
1c5e4ee9
MR
37722018-01-23 Maciej W. Rozycki <macro@mips.com>
3773
3774 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
3775 `mips_elf32_section_processing' comment reference.
3776
8a1b824a
L
37772018-01-20 H.J. Lu <hongjiu.lu@intel.com>
3778
3779 PR ld/22721
3780 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
3781 versioned __tls_get_addr symbol.
3782
ee3fbc1e
NC
37832018-01-19 Nick Clifton <nickc@redhat.com>
3784
3785 * po/fr.po: Updated French translation.
3786
691d2e9a
AM
37872018-01-18 Alan Modra <amodra@gmail.com>
3788
3789 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
3790 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
3791 (ppc64_elf_build_stubs): Likewise.
3792
4bfce128
NC
37932018-01-17 Nick Clifton <nickc@redhat.com>
3794
3795 * po/ru.po: Updated Russian translation.
3796 * po/uk/po: Updated Ukranian translation.
3797
c75bc4f7
AM
37982018-01-17 Alan Modra <amodra@gmail.com>
3799
3800 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
3801
1be5d8d3
AM
38022018-01-17 Alan Modra <amodra@gmail.com>
3803
3804 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
3805 (CRSETEQ, BEQCTRM): Define.
3806 (is_nonpic_glink_stub): Don't check bctr.
3807 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3808 (ppc_elf_relax_section): Size speculation barrier.
3809 (output_bctr): New function.
3810 (write_glink_stub): Use output_bctr.
3811 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
3812 (ppc_elf_finish_dynamic_symbol): Likewise.
3813 (ppc_elf_finish_dynamic_sections): Use output_bctr.
3814 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
3815 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
3816 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
3817 (size_global_entry_stubs): Handle speculation barrier sizing.
3818 (plt_stub_size): Likewise.
3819 (output_bctr): New function.
3820 (build_plt_stub, build_tls_get_addr_stub): Output speculation
3821 barrier.
3822 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
3823 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
3824 (build_global_entry_stubs): Output speculation barrier.
3825 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
3826 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
3827
9e390558
AM
38282018-01-17 Alan Modra <amodra@gmail.com>
3829
3830 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
3831 __tls_get_addr_opt, and alignment sizing.
3832 (TLS_GET_ADDR_GLINK_SIZE): Delete.
3833 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
3834 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
3835 or 8 insns.
3836 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
3837 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
3838 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
3839 by PLT reloc count.
3840 (write_glink_stub): Handle __tls_get_addr_opt stub.
3841 Pad out to size given by GLINK_ENTRY_SIZE.
3842 (ppc_elf_relocate_section): Adjust write_glink_stub call.
3843 (ppc_elf_finish_dynamic_symbol): Likewise.
3844 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
3845 insn array since so many need rewriting.
3846 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
3847 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
3848 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
3849 nops. Adjust all uses.
3850 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
3851 in glink_vma calculation.
3852 (struct ppc_link_hash_table): Add global_entry section pointer.
3853 (create_linkage_sections): Create separate section for global
3854 entry stubs.
3855 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
3856 (size_global_entry_stubs): Handle sizing for aligned stubs.
3857 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
3858 and don't stash end of glink branch table in rawsize.
3859 (ppc_build_one_stub): Rewrite stub size calculations.
3860 (build_global_entry_stubs): Use new section.
3861 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
3862 Build lazy link stubs out to end of section. Build global entry
3863 stubs in new section.
3864
616dcb87
NC
38652018-01-15 Nick Clifton <nickc@redhat.com>
3866
3867 * po/uk.po: Updated Ukranian translation.
3868
3957a496
NC
38692018-01-13 Nick Clifton <nickc@redhat.com>
3870
3871 * po/bfd.pot: Regenerated.
3872
769c7ea5
NC
38732018-01-13 Nick Clifton <nickc@redhat.com>
3874
3875 * version.m4: Bump version to 2.30.51
3876 * configure: Regenerate.
3877
faf766e3
NC
38782018-01-13 Nick Clifton <nickc@redhat.com>
3879
3880 2.30 branch created.
3881
564e11c9
JW
38822018-01-12 Jens Widell <jl@opera.com>
3883
3884 * elf.c (setup_group): Optimize search for group by remembering
3885 last found group and restarting search at that index.
3886 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
3887
a78eea16
AM
38882018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
3889
3890 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
3891 bfd_link_common_skip_none in switch.
3892
87e79a65
AM
38932018-01-12 Alan Modra <amodra@gmail.com>
3894
3895 PR ld/22649
3896 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
3897 references on forced local symbols.
3898
58807c48
VI
38992018-01-12 Vlad Ivanov <vlad@ivanov.email>
3900
3901 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
3902 .reginfo section has wrong size.
3903
2888249f
L
39042018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3905
3906 PR ld/22393
3907 * elf.c (_bfd_elf_map_sections_to_segments): When generating
3908 separate code and read-only data LOAD segments, create a new
3909 LOAD segment if the previous section contains text and the
3910 current section doesn't or vice versa. Don't put a writable
3911 section in a read-only segment if there is a RELRO segment.
3912
d664fd41
L
39132018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3914
3915 PR ld/22649
3916 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
3917 references on forced local symbols.
3918
8b6f4cd3
L
39192018-01-11 H.J. Lu <hongjiu.lu@intel.com>
3920
3921 PR ld/22677
3922 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
3923 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
3924
9c70c522 39252018-01-09 Kuan-Lin Chen <kuanlinchentw@gmail.com>
6cef73f9
KLC
3926
3927 PR 22662
3928 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
3929
ddb2bbcf
JB
39302018-01-03 John Baldwin <jhb@FreeBSD.org>
3931
3932 * elf.c (elfcore_grok_freebsd_note): Handle
3933 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
3934 NT_FREEBSD_PROCSTAT_VMMAP.
3935
219d1afa
AM
39362018-01-03 Alan Modra <amodra@gmail.com>
3937
3938 Update year range in copyright notice of all files.
3939
1e563868 3940For older changes see ChangeLog-2017
3499769a 3941\f
1e563868 3942Copyright (C) 2018 Free Software Foundation, Inc.
3499769a
AM
3943
3944Copying and distribution of this file, with or without modification,
3945are permitted in any medium without royalty provided the copyright
3946notice and this notice are preserved.
3947
3948Local Variables:
3949mode: change-log
3950left-margin: 8
3951fill-column: 74
3952version-control: never
3953End: