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