Andes Technology has good news for you, we plan to update the nds32 port of binutils...
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
fbaf61ad
NC
12018-09-20 Nelson Chu <nelson.chu1990@gmail.com>
2
3 * elf32-nds32.c (nds32_elf_relax_loadstore):
4 Remove the unused target features.
5 (bfd_elf32_nds32_set_target_option): Remove the unused parameters.
6 (nds32_elf_relax_piclo12, nds32_elf_relax_letlslo12,
7 nds32_elf_relax_letlsadd, nds32_elf_relax_letlsls,
8 nds32_elf_relax_pltgot_suff, nds32_elf_relax_got_suff
9 nds32_elf_relax_gotoff_suff, calculate_plt_memory_address,
10 calculate_plt_offset, calculate_got_memory_address,
11 nds32_elf_check_dup_relocs): Removed.
12 All callers changed.
13 * elf32-nds32.h: Remove the unused macros and defines.
14 (elf_nds32_link_hash_table): Remove the unused variable.
15 (bfd_elf32_nds32_set_target_option): Update prototype.
16 (nds32_elf_ex9_init): Removed.
17 * elf32-nds32.c (nds32_convert_32_to_16): Updated.
18 * elf32-nds32.c (HOWTO2, HOWTO3): Define new HOWTO macros
19 to initialize array nds32_elf_howto_table in any order
20 without lots of EMPTY_HOWTO.
21 (nds32_reloc_map): Updated.
22 * reloc.c: Add BFD_RELOC_NDS32_LSI.
23 * bfd-in2.h: Regenerated.
24 * bfd/libbfd.h: Regenerated.
25 * elf32-nds32.c (nds32_elf_relax_howto_table): Add R_NDS32_LSI.
26 (nds32_reloc_map): Likewise.
27 (nds32_elf_relax_flsi): New function.
28 (nds32_elf_relax_section): Support floating load/store relaxation.
29 * elf32-nds32.c (NDS32_GUARD_SEC_P, elf32_nds32_local_gp_offset):
30 New macro.
31 (struct elf_nds32_link_hash_entry): New `offset_to_gp' field.
32 (struct elf_nds32_obj_tdata): New `offset_to_gp' and `hdr_size' fields.
33 (elf32_nds32_allocate_local_sym_info, nds32_elf_relax_guard,
34 nds32_elf_is_target_special_symbol, nds32_elf_maybe_function_sym):
35 New functions.
36 (nds32_info_to_howto_rel): Add BFD_ASSERT.
37 (bfd_elf32_bfd_reloc_type_table_lookup, nds32_elf_link_hash_newfunc,
38 nds32_elf_link_hash_table_create, nds32_elf_relocate_section,
39 nds32_elf_relax_loadstore, nds32_elf_relax_lo12, nds32_relax_adjust_label,
40 bfd_elf32_nds32_set_target_option, nds32_fag_mark_relax): Updated.
41 (nds32_elf_final_sda_base): Improve it to find the better gp value.
42 (insert_nds32_elf_blank): Must consider `len' when inserting blanks.
43 * elf32-nds32.h (bfd_elf32_nds32_set_target_option): Update prototype.
44 (struct elf_nds32_link_hash_table): Add new variable `hyper_relax'.
45 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): New function.
46 (create_got_section): Likewise.
47 (allocate_dynrelocs, nds32_elf_size_dynamic_sections,
48 nds32_elf_relocate_section, nds32_elf_finish_dynamic_symbol): Updated.
49 (nds32_elf_check_relocs): Fix the issue that the shared library may
50 has TEXTREL entry in the dynamic section.
51 (nds32_elf_create_dynamic_sections): Enable to call readonly_dynrelocs
52 since the TEXTREL issue is fixed in the nds32_elf_check_relocs.
53 (nds32_elf_finish_dynamic_sections): Update and add DT_RELASZ
54 dynamic entry.
55 (calculate_offset): Remove the unused parameter `pic_ext_target' and
56 related codes.
57 All callers changed.
58 (elf_backend_dtrel_excludes_plt): Disable it temporarily since it
59 will cause some errors for our test cases.
60 * elf32-nds32.c (nds32_elf_merge_private_bfd_data): Allow to link the
61 generic object.
62 * reloc.c: Add TLS relocations.
63 * libbfd.h: Regenerated.
64 * bfd-in2.h: Regenerated.
65 * elf32-nds32.h (struct section_id_list_t): New.
66 (elf32_nds32_lookup_section_id, elf32_nds32_check_relax_group,
67 elf32_nds32_unify_relax_group, nds32_elf_unify_tls_model):
68 New prototypes.
69 (elf32_nds32_compute_jump_table_size, elf32_nds32_local_tlsdesc_gotent):
70 New macro.
71 (nds32_insertion_sort, bfd_elf32_nds32_set_target_option,
72 elf_nds32_link_hash_table): Updated.
73 * elf32-nds32.c (enum elf_nds32_tls_type): New.
74 (struct elf32_nds32_relax_group_t, struct relax_group_list_t): New.
75 (elf32_nds32_add_dynreloc, patch_tls_desc_to_ie, get_tls_type,
76 fls, ones32, list_insert, list_insert_sibling, dump_chain,
77 elf32_nds32_check_relax_group, elf32_nds32_lookup_section_id,
78 elf32_nds32_unify_relax_group, nds32_elf_unify_tls_model): New functions.
79 (elf_nds32_obj_tdata): Add new fields.
80 (elf32_nds32_relax_group_ptr, nds32_elf_local_tlsdesc_gotent): New macros.
81 (nds32_elf_howto_table): Add TLS relocations.
82 (nds32_reloc_map): Likewise.
83 (nds32_elf_copy_indirect_symbol, nds32_elf_size_dynamic_sections,
84 nds32_elf_finish_dynamic_symbol, elf32_nds32_allocate_local_sym_info,
85 nds32_elf_relocate_section, bfd_elf32_nds32_set_target_option,
86 nds32_elf_check_relocs, allocate_dynrelocs): Updated.
87 (nds32_elf_relax_section): Call nds32_elf_unify_tls_model.
88 (dtpoff_base): Rename it to `gottpof' and then update it.
89
cf93e9c2
AM
902018-09-20 Alan Modra <amodra@gmail.com>
91
92 PR 23685
93 * peXXigen.c (pe_print_edata): Correct export address table
94 overflow checks. Check dataoff against section size too.
95
30838132
AM
962018-09-20 Alan Modra <amodra@gmail.com>
97
98 PR 23686
99 * dwarf2.c (read_section): Error when attempting to malloc
100 "(bfd_size_type) -1".
101 * syms.c (_bfd_stab_section_find_nearest_line): Bounds check
102 function_name. Bounds check reloc address. Formatting. Ensure
103 .stabstr zero terminated.
104
8ff71a9c
NC
1052018-09-18 Nick Clifton <nickc@redhat.com>
106
107 PR 23657
108 * elfcode.h (elf_swap_shdr_in): Generate a warning message if an
109 ELF section has contents and size larger than the file size.
110
47275900
MR
1112018-09-14 Maciej W. Rozycki <macro@mips.com>
112
113 PR ld/21375
114 * elfxx-mips.h (_bfd_mips_elf_hide_symbol): New prototype.
115 (_bfd_mips_elf_linker_flags): Update prototype.
116 * elf32-mips.c (elf_backend_hide_symbol): New macro.
117 * elf64-mips.c (elf_backend_hide_symbol): Likewise.
118 * elfn32-mips.c (elf_backend_hide_symbol): Likewise.
119 * elfxx-mips.c (mips_elf_link_hash_table): Add
120 `use_absolute_zero' and `gnu_target' members.
121 (mips_elf_record_global_got_symbol): Call
122 `_bfd_mips_elf_hide_symbol' rather than
123 `_bfd_elf_link_hash_hide_symbol'.
124 (mips_use_local_got_p): Return FALSE if the symbol is absolute.
125 (mips_elf_obtain_contents): Reorder function.
126 (mips_elf_nullify_got_load): New function.
127 (mips_elf_calculate_relocation): Add `contents' parameter.
128 Nullify GOT loads or if it is not possible, then redirect GOT
129 relocations to the `__gnu_absolute_zero' symbol, for references
130 that are supposed to resolve to zero.
131 (mips_elf_define_absolute_zero): New function.
132 (_bfd_mips_elf_check_relocs): Prepare for arrangements made in
133 `mips_elf_calculate_relocation' for references made via the GOT
134 that are supposed to resolve to zero.
135 (_bfd_mips_elf_hide_symbol): New function.
136 (_bfd_mips_elf_linker_flags): Add the `gnu_target' parameter,
137 set the `gnu_target' member of the MIPS hash table.
138 (MIPS_LIBC_ABI_ABSOLUTE): New enumeration constant.
139 (_bfd_mips_post_process_headers): Use it.
140
98e10ffa
MR
1412018-09-14 Maciej W. Rozycki <macro@mips.com>
142
143 * elfxx-mips.c (mips_elf_store_contents): New function...
144 (mips_elf_perform_relocation): ... factored out from here.
145
fe75f42e
LX
1462018-09-14 Lifang Xia <lifang_xia@c-sky.com>
147
148 * elf32-csky.c (csky_elf_howto_table): Fill special_function of
149 R_CKCORE_PCREL32.
150 (csky_elf_relocate_section): Add R_CKCORE_PCREL32 process.
151
a4cd947a
AM
1522018-09-14 Alan Modra <amodra@gmail.com>
153
154 PR 23425
155 * reloc.c (bfd_generic_get_relocated_section_contents): Zero reloc
156 fields in debug sections when reloc is against an undefined symbol
157 and called from bfd_simple_get_relocated_section_contents or
158 similar.
159 * dwarf2.c (find_abstract_instance): Return true for zero offset
160 DW_FORM_ref_addr without returning values.
161
deee88e9
AM
1622018-09-06 Alan Modra <amodra@gmail.com>
163
164 PR 23570
165 * elf32-avr.c (elf_avr_special_sections): New.
166 (elf_backend_special_sections): Define.
167
e920c014
JM
1682018-09-04 Jose E. Marchesi <jose.marchesi@oracle.com>
169
170 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Do not issue an
171 error when an invalid relocation is passed; this is already done
172 by `_bfd_sparc_elf_info_to_howto_ptr'.
173
8410d65b
JM
1742018-09-04 Jose E. Marchesi <jose.marchesi@oracle.com>
175
176 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Issue an
177 error when an invalid symbol index is retrieved in ELF64_R_SYM of
178 a relocation seen in an input file.
179
2542e49e
JL
1802018-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
181 Alan Modra <amodra@gmail.com>
182
183 PR 23595
184 elf.c (copy_elf_program_header): When first segment contains
185 only the headers and SHT_NOBITS sections, use segment p_filesz
186 to calculate header and padding size. Use filepos of the first
187 section otherwise.
188
b986869b
L
189018-08-31 H.J. Lu <hongjiu.lu@intel.com>
190
191 PR ld/23600
192 * archures.c (bfd_arch_get_compatible): Allow an IR object with
193 unknown architecture.
194
3d58e1fc
AM
1952018-08-31 Alan Modra <amodra@gmail.com>
196
197 * elf64-ppc.c (num_relocs_for_offset): New function.
198 (emit_relocs_for_offset): New function.
199 (use_global_in_relocs): New function, split out from..
200 (ppc_build_one_stub): ..here. Output relocations for notoc stubs.
201 (ppc_size_one_stub): Calculate reloc count for notoc stubs.
202 (ppc64_elf_size_stubs): Don't count undefined syms in stub_globals.
203
4a969973
AM
2042018-08-31 Alan Modra <amodra@gmail.com>
205
206 * reloc.c (BFD_RELOC_PPC64_REL16_HIGH, BFD_RELOC_PPC64_REL16_HIGHA),
207 (BFD_RELOC_PPC64_REL16_HIGHER, BFD_RELOC_PPC64_REL16_HIGHERA),
208 (BFD_RELOC_PPC64_REL16_HIGHEST, BFD_RELOC_PPC64_REL16_HIGHESTA):
209 Define.
210 * elf64-ppc.c (ppc64_elf_howto_raw): Add new REL16 howtos.
211 (ppc64_elf_reloc_type_lookup): Translate new REL16 relocs.
212 (ppc64_elf_check_relocs, ppc64_elf_relocate_section): Handle them.
213 * bfd-in2.h: Regenerate.
214 * libbfd.h: Regenerate.
215
f891966f
AM
2162018-08-31 Alan Modra <amodra@gmail.com>
217
218 * elf64-ppc.c: Correct _notoc stub comments.
219 (ppc_build_one_stub): Simplify output of branch for notoc
220 long branch stub. Don't include label offset of 8 bytes in
221 "off" calculation for notoc plt stub. Don't emit insns to get pc.
222 (build_offset): Emit insns to get pc here instead.
223 (size_offset): Add 4 extra insns.
224 (plt_stub_size): Adjust for "off" and size_offset changes.
225 (ppc_size_one_stub): Rearrange code into a switch, duplicating
226 some to better match ppc_build_one_stub.
227
9108bc33
CX
2282018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
229
230 * archures.c (bfd_architecture): New machine
231 bfd_mach_mips_gs264e.
232 * bfd-in2.h (bfd_architecture): Likewise.
233 * cpu-mips.c (enum I_xxx): Likewise.
234 (arch_info_struct): Likewise.
235 * elfxx-mips.c (_bfd_elf_mips_mach): Handle
236 E_MIPS_MACH_GS264E.
237 (mips_set_isa_flags): Likewise.
238 (mips_mach_extensions): Map bfd_mach_mips_gs264e to
239 bfd_mach_mips_gs464e extension.
240
bd782c07
CX
2412018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
242
243 * archures.c (bfd_architecture): New machine
244 bfd_mach_mips_gs464e.
245 * bfd-in2.h (bfd_architecture): Likewise.
246 * cpu-mips.c (enum I_xxx): Likewise.
247 (arch_info_struct): Likewise.
248 * elfxx-mips.c (_bfd_elf_mips_mach): Handle
249 E_MIPS_MACH_GS464E.
250 (mips_set_isa_flags): Likewise.
251 (mips_mach_extensions): Map bfd_mach_mips_gs464e to
252 bfd_mach_mips_gs464 extension.
253
ac8cb70f
CX
2542018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
255
256 * archures.c (bfd_architecture): Rename
257 bfd_mach_mips_loongson_3a to bfd_mach_mips_gs464.
258 * bfd-in2.h (bfd_architecture): Likewise.
259 * cpu-mips.c (enum I_xxx): Likewise.
260 (arch_info_struct): Likewise.
261 * elfxx-mips.c (_bfd_elf_mips_mach): Likewise.
262 (mips_set_isa_flags): Likewise.
263 (mips_mach_extensions): Likewise.
264 (bfd_mips_isa_ext_mach): Likewise.
265 (bfd_mips_isa_ext): Likewise.
266 (print_mips_isa_ext): Delete AFL_EXT_LOONGSON_3A.
267
a693765e
CX
2682018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
269
270 * elfxx-mips.c (print_mips_ases): Add Loongson EXT2 extension.
271
bdc6c06e
CX
2722018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
273
274 * elfxx-mips.c (infer_mips_abiflags): Use ases instead of
275 isa_ext for infer ABI flags.
276 (print_mips_ases): Add Loongson EXT extension.
277
716c08de
CX
2782018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
279
280 * elfxx-mips.c (print_mips_ases): Add CAM extension.
281
90c745dc
L
2822018-08-27 H.J. Lu <hongjiu.lu@intel.com>
283
284 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Don't mask
285 out the GNU_PROPERTY_X86_UINT32_VALID bit.
286
7a815dd5
L
2872018-08-25 H.J. Lu <hongjiu.lu@intel.com>
288
289 PR ld/23499
290 * elf.c (_bfd_elf_get_symbol_version_string): Return
291 _("<corrupt>") for corrupt symbol version info.
292
a9eafb08
L
2932018-08-24 H.J. Lu <hongjiu.lu@intel.com>
294
295 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Handle
296 X86_COMPAT_ISA_1_USED, X86_COMPAT_ISA_1_NEEDED,
297 X86_UINT32_AND_LO, X86_UINT32_AND_HI, X86_UINT32_OR_LO,
298 X86_UINT32_OR_HI, X86_UINT32_OR_AND_LO and X86_UINT32_OR_AND_HI
299 instead of X86_ISA_1_USED, X86_ISA_1_NEEDED and X86_FEATURE_1_AND.
300 (_bfd_x86_elf_merge_gnu_properties): Likewise.
301 (_bfd_x86_elf_link_setup_gnu_properties): Add X86_FEATURE_2_NEEDED
302 instead of X86_ISA_1_NEEDED.
303 (_bfd_x86_elf_link_fixup_gnu_properties): Handle
304 X86_COMPAT_ISA_1_USED, X86_COMPAT_ISA_1_NEEDED, X86_UINT32_AND_LO,
305 X86_UINT32_AND_HI, X86_UINT32_OR_LO, X86_UINT32_OR_HI,
306 X86_UINT32_OR_AND_LO and X86_UINT32_OR_AND_HI instead of
307 X86_ISA_1_USED, X86_ISA_1_NEEDED and X86_FEATURE_1_AND.
308
aa7bca9b
L
3092018-08-24 H.J. Lu <hongjiu.lu@intel.com>
310
311 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Mask out the
312 GNU_PROPERTY_X86_UINT32_VALID bit.
313 (_bfd_x86_elf_link_fixup_gnu_properties): Set the
314 GNU_PROPERTY_X86_UINT32_VALID bit for non-relocatable output.
315
b0ceb98a
Z
3162018-08-23 Zenith423 <zenith432@users.sourceforge.net>
317
318 PR 23460
319 * plugin.c (struct plugin_list_entry): New structure.
320 (plugin_list): New variable.
321 (try_load_plugin): Place opened plugins on a list. Ensure that
322 the refcount in the dynamic loader is kept at 1.
323
f53ad3cf
AM
3242018-08-23 Alan Modra <amodra@gmail.com>
325
326 * elf64-ppc.c (ppc64_elf_relocate_section): Revise "call lacks
327 nop" error message.
328
38cf70ca
NC
3292018-08-23 Nick Clifton <nickc@redhat.com>
330
331 * elf64-hppa.c (elf_hppa_final_link_relocate): Replace unworkable
332 code with an assertion.
333
334d4ced
NC
3342018-08-23 Nick Clifton <nickc@redhat.com>
335
336 PR 23061
337 * coffgen.c (coff_pointerize_aux): Add table_end parameter. Use
338 it to prevent walking off the end of the table.
339 (coff_get_normalized_symtab): Pass internal_end pointer to
340 coff_pointerize_aux.
341
d0abeec8
AM
3422018-08-23 Alan Modra <amodra@gmail.com>
343
344 * elf64-ppc.c (ppc64_elf_relocate_section): Don't miss clearing
345 unresolved_reloc on ppc_stub_plt_call_notoc.
346
9eef0608
L
3472018-08-22 H.J. Lu <hongjiu.lu@intel.com>
348
349 PR ld/23536
350 * development.sh (experimental): New.
351
6f4286c4
HD
3522018-08-22 Helge Deller <deller@gmx.de>
353 Nick Clifton <nickc@redhat.com>
354
355 * elf-hppa.h (elf_hppa_fake_sections): Use SHT_PARISC_UNWIND as
356 the section type of the .PARISC.unwind section on 64-bit binaries
357 and SHT_PROGBITS for 32-bit binaries. Add a comment about it.
358 Add comment about the sh_entsize value.
359
3da64fe4
RA
3602018-08-22 Rafeal Auler <rafaelauler@gmail.com>
361
362 PR 23560
363 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Always update the
364 stub's target, since it may have been changed after the layout.
365
ebf983a4 3662018-08-21 John Darington <john@darrington.wattle.id.au>
4e57b456
JD
367
368 * elf32-s12z.c (opru18_reloc): New function.
ebf983a4 369 (elf_s12z_howto_table): Adjust Howto according to new knowledge.
4e57b456 370
ae19acf3 3712018-08-21 mephi42 <mephi42@gmail.com>
372
373 PR binutils/23315
374 * mach-o.c (bfd_mach_o_mangle_symbols): Update n_type even if
375 data is already considered filled.
376
46807bf4
AM
3772018-08-21 Alan Modra <amodra@gmail.com>
378
379 * elf64-ppc.c (HOW): Define.
380 (ONES): Delete.
381 (ppc64_elf_howto_raw): Use HOW to initialize entries.
382 * elf32-ppc.c (HOW): Define.
383 (ppc_elf_howto_raw): Use HOW to initialize entries, updating
384 R_PPC_VLE_REL15 and R_PPC_VLE_REL24 to use bitpos=0.
385
706704c8
AM
3862018-08-21 Alan Modra <amodra@gmail.com>
387
388 * reloc.c (reloc_howto_type): Typedef.
389 (bfd_symbol): Delete forward declaration.
390 (struct reloc_howto_struct): Add "negate" field. Make "size",
391 "bitsize", "rightshift", "bitpos", "complain_on_overflow",
392 "pc_relative", "partial_inplace", and "pcrel_offset" bitfields.
393 Rearrange for better packing. Revise comments.
394 (HOWTO): Map to rearranged reloc_howto_struct.
395 (bfd_get_reloc_size): Delete now unused cases.
396 (read_reloc, write_reloc): Likewise.
397 (apply_reloc, _bfd_relocate_contents): Test howto->negate
398 rather than howto->size < 0 for negated relocation values.
399 * coff-rs6000.c (xcoff_complain_overflow_bitfield_func): Avoid
400 signed/unsigned warning.
401 (xcoff_ppc_relocate_section): Delete "condition is always false"
402 code.
403 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
404 * cpu-ns32k.c (do_ns32k_reloc): Adjust to suit reloc_howto_struct
405 changes.
406 * vms-alpha.c (_bfd_vms_write_etir, alpha_vms_slurp_relocs): Use
407 size 16 for ALPHA_R_LINKAGE.
408 (alpha_howto_table <ALPHA_R_LINKAGE>): Set encoded size and
409 bitsize to zero.
410 * bfd-in.h (reloc_howto_type): Delete.
411 * bfd-in2.h: Regenerate.
412
487096bf
AM
4132018-08-21 Alan Modra <amodra@gmail.com>
414
415 * reloc.c (HOWTO): Revise comment.
416 (NEWHOWTO, HOWTO_PREPARE): Delete.
417 * coff-arm.c (coff_arm_reloc_type_lookup): Replace const struc
418 reloc_howto_struct with reloc_howto_type.
419 * ns32knetbsd.c (MY_bfd_reloc_type_lookup): Likewise.
420 * vms-alpha.c (alpha_vms_bfd_reloc_type_lookup): Likewise.
421 * elf-hppa.h (HOW): Define.
422 (elf_hppa_howto_table): Use it to simplify this table, correcting
423 name of R_PARISC_LTOFF16WF, R_PARISC_LTOFF_FPTR64, and
424 R_PARISC_LTOFF_FPTR16DF.
425 * elf32-mep.c (MEPREL): Use HOWTO.
426 * bfd-in2.h: Regenerate.
427
865dcc8a
AM
4282018-08-20 Alan Modra <amodra@gmail.com>
429
430 * mmo.c (valid_mmo_symbol_character_set): Initialize and make
431 array const.
432 (mmo_init): Don't init valid_mmo_symbol_character_set.
433
ba1c4c6f
AM
4342018-08-20 Alan Modra <amodra@gmail.com>
435
436 * rs6000-core.c (CORE_COMMONSZ): Balance parentheses in expression.
437
bfb1e8c1
L
4382018-08-17 H.J. Lu <hongjiu.lu@intel.com>
439
440 PR ld/23515
441 * elf-bfd.h (elf_backend_data): Add fixup_gnu_properties.
442 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Call
443 backend fixup_gnu_properties if it isn't NULL. Discard
444 .note.gnu.property section if all properties have been removed.
445 * elfxx-target.h (elf_backend_fixup_gnu_properties): New.
446 (elfNN_bed): Initialize fixup_gnu_properties.
447 * elfxx-x86.c (_bfd_x86_elf_link_fixup_gnu_properties): New
448 function.
449 * elfxx-x86.h (_bfd_x86_elf_link_fixup_gnu_properties): New
450 prototype.
451 (elf_backend_fixup_gnu_properties): New.
452
2cdcc330
AM
4532018-08-16 Alan Modra <amodra@gmail.com>
454
455 * elf64-ppc.c: Correct ppc_stub_long_branch_notoc example.
456 Formatting.
457
98641896
L
4582018-08-12 H.J. Lu <hongjiu.lu@intel.com>
459
460 PR binutils/23494
461 * Makefile.am (BFD32_LIBS): Add elf-properties.lo.
462 (BFD32_LIBS_CFILES): Add elf-properties.c.
463 (BFD32_BACKENDS): Remove elf-properties.lo.
464 (BFD32_BACKENDS_CFILES): Remove elf-properties.c.
465 * configure.ac (elf): Remove elf-properties.lo.
466 * Makefile.in: Regenerated.
467 * configure: Likewise.
468
ab9e3428
L
4692018-08-11 H.J. Lu <hongjiu.lu@intel.com>
470
471 PR ld/23428
472 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Don't
473 add X86_ISA_1_NEEDED property only if existing properties won't
474 be removed.
475
1dc9e2d6
AM
4762018-08-11 Alan Modra <amodra@gmail.com>
477
478 * reloc.c (bfd_get_reloc_size): Sort switch.
479 (read_reloc, write_reloc, apply_reloc): New functions.
480 (bfd_perform_relocation, bfd_install_relocation): Use apply_reloc.
481 (_bfd_relocate_contents): Use read_reloc and write_reloc.
482 (_bfd_clear_contents): Likewise.
483
7cf9ebc6
JD
4842018-08-11 John Darrington <john@darrington.wattle.id.au>
485
486 * reloc.c (_bfd_relocate_contents): Handle 3 byte relocs.
487 (_bfd_clear_contents): Likewise.
488 (bfd_perform_relocation): Likewise.
489 (bfd_install_relocation): Likewise.
490
48e30f52
L
4912018-08-10 H.J. Lu <hongjiu.lu@intel.com>
492
493 PR ld/23499
494 * elflink.c (bfd_elf_record_link_assignment): Always clear
495 h->verinfo.verdef when overriding a dynamic definition.
496
9c973a29
L
4972018-08-10 H.J. Lu <hongjiu.lu@intel.com>
498
499 PR binutils/23494
500 * elf-properties.c (elf_get_gnu_property_section_size): Always
501 use align_size as pr_datasz for GNU_PROPERTY_STACK_SIZE.
502 (elf_write_gnu_properties): Likewise.
503
6404ab99
L
5042018-08-08 H.J. Lu <hongjiu.lu@intel.com>
505
506 PR binutils/23494
507 * bfd.c (bfd_convert_section_size): Check BFD_DECOMPRESS after
508 calling _bfd_elf_convert_gnu_property_size to convert
509 .note.gnu.property section size.
510 (bfd_convert_section_contents): Check BFD_DECOMPRESS after
511 calling _bfd_elf_convert_gnu_properties to convert
512 .note.gnu.property section.
513 * elf-bfd.h (_bfd_elf_convert_gnu_property_size): New prototype.
514 (_bfd_elf_convert_gnu_properties): Likewise.
515 * elf-properties.c (elf_get_gnu_property_section_size): New
516 function.
517 (elf_write_gnu_properties): Likewise.
518 (_bfd_elf_convert_gnu_property_size): Likewise.
519 (_bfd_elf_convert_gnu_properties): Likewise.
520 (_bfd_elf_link_setup_gnu_properties): Use
521 elf_get_gnu_property_section_size and elf_write_gnu_properties.
522
f7309df2
L
5232018-08-08 H.J. Lu <hongjiu.lu@intel.com>
524
525 PR ld/23486
526 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove
527 GNU_PROPERTY_X86_ISA_1_USED if an input file doesn't have it.
528 (_bfd_x86_elf_link_setup_gnu_properties): Adding the
529 GNU_PROPERTY_X86_ISA_1_NEEDED, instead of
530 GNU_PROPERTY_X86_ISA_1_USED, property.
531
df136d64
AM
5322018-08-07 Alan Modra <amodra@gmail.com>
533
534 * elf64-ppc.c (struct map_stub): Delete tls_get_addr_opt_bctrl.
535 Add lr_restore, eh_size and eh_base.
536 (eh_advance, eh_advance_size): New functions.
537 (build_tls_get_addr_stub): Emit EH info for stub.
538 (ppc_build_one_stub): Likewise for _notoc stubs.
539 (ppc_size_one_stub): Size EH info for stub.
540 (group_sections): Init new map_stub fields.
541 (stub_eh_frame_size): Delete.
542 (ppc64_elf_size_stubs): Size EH info for stubs. Set up dummy EH
543 program for stubs.
544 (ppc64_elf_build_stubs): Reinit new map_stub fields. Set FDE
545 offset to stub section here..
546 (ppc64_elf_finish_dynamic_sections): ..rather than here.
547
e81b4c93
AM
5482018-08-07 Alan Modra <amodra@gmail.com>
549
550 * elf64-ppc.c (ppc64_elf_relocate_section): Don't skip first
551 instruction of __tls_get_addr_opt stub.
552 (plt_stub_size): Omit ALWAYS_EMIT_R2SAVE condition when
553 dealing with __tls_get_addr_opt stub.
554 (build_tls_get_addr_stub, ppc_size_one_stub): Likewise.
555
6af04484
CZ
5562018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
557
558 * elf32-arc.c (arc_elf_merge_private_bfd_data): Complain about
559 efalgs only when in/out exists.
560 (elf32_arc_section_from_shdr): Don't complain about 0x0c
561 section type. It is mwdt compiler specific.
562
2fd43d78 5632018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
564
565 * elf32-arc.c (arc_elf_merge_attributes): Fix merge attributes.
566
db1e1b45 5672018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
568
569 * elf32-arc.c (arc_elf_merge_attributes): Handle
570 Tag_ARC_ATR_version.
571
05d0e962
AM
5722018-08-05 Alan Modra <amodra@gmail.com>
573
574 * elf64-ppc.c (ADDI_R12_R11, ADDI_R12_R12, LIS_R12),
575 (ADDIS_R12_R11, ORIS_R12_R12_0, ORI_R12_R12_0),
576 (SLDI_R12_R12_32, LDX_R12_R11_R12, ADD_R12_R11_R12): Define.
577 (ppc64_elf_howto_raw): Add R_PPC64_REL24_NOTOC entry.
578 (ppc64_elf_reloc_type_lookup): Support R_PPC64_REL24_NOTOC.
579 (ppc_stub_type): Add ppc_stub_long_branch_notoc,
580 ppc_stub_long_branch_both, ppc_stub_plt_branch_notoc,
581 ppc_stub_plt_branch_both, ppc_stub_plt_call_notoc, and
582 ppc_stub_plt_call_both.
583 (is_branch_reloc): Add R_PPC64_REL24_NOTOC.
584 (build_offset, size_offset): New functions.
585 (plt_stub_size): Support plt_call_notoc and plt_call_both.
586 (ppc_build_one_stub, ppc_size_one_stub): Support new stubs.
587 (toc_adjusting_stub_needed): Handle R_PPC64_REL24_NOTOC.
588 (ppc64_elf_size_stubs): Likewise, and new stubs.
589 (ppc64_elf_build_stubs, ppc64_elf_relocate_section): Likewise.
590 * reloc.c: Add BFD_RELOC_PPC64_REL24_NOTOC.
591 * bfd-in2.h: Regenerate.
592 * libbfd.h: Regenerate.
593
3f6ff479
AM
5942018-08-05 Alan Modra <amodra@gmail.com>
595
596 * elf64-ppc.c (ppc_build_one_stub): Lose "_r2off" in stub symbols.
597
13755f40
JW
5982018-08-02 Jim Wilson <jimw@sifive.com>
599
600 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): For .tdata.dyn,
601 add SEC_LINKER_CREATED flag.
602
4a9f7d65
NC
6032018-08-01 Nick Clifton <nickc@redhat.com>
604
c25179e7
NC
605 * coff-rs6000.c (_bfd_xcoff_put_ldsymbol_name): Suppress warnings
606 about potentially truncated strncpy operations.
607 (_bfd_xcoff_put_symbol_name): Likewise.
608
4a9f7d65
NC
609 * elf32-avr.c (avr_stub_name): Check for a NULL return from
610 bfd_malloc.
611
103da91b
NC
6122018-08-01 Zenith <zenith432@users.sourceforge.net>
613
614 PR 23460
615 * plugin.c (bfd_plugin_open_input): Close file descriptor if the
616 call to fstat fails.
617 (try_claim): Always close the file descriptor at the end of the
618 function.
619 (try_load_plugin): If a plugin has already been registered, then
620 skip the dlopen and onload steps and go straight to claiming the
621 file. If these is an error, close the plugin.
622
1aa42141
AM
6232018-08-01 Alan Modra <amodra@gmail.com>
624
625 * elf64-ppc.c (plt_stub_pad): Delay plt_stub_size call until needed.
626 (ppc_build_one_stub): Don't set stub_offset, instead assert that
627 it is sane. Don't adjust stub_offset for alignment. Adjust size
628 calculation. Use "targ" temp when calculating offsets.
629 (ppc_size_one_stub): Set stub_offset here. Use "targ" temp when
630 calculating offsets. Adjust for alignment before setting
631 tls_get_addr_opt_bctrl.
632
cb86a42a
AM
6332018-08-01 Alan Modra <amodra@gmail.com>
634
635 * po/SRC-POTFILES.in: Regenerate.
636
a05b9f5e
NC
6372018-07-30 Nick Clifton <nickc@redhat.com>
638
639 PR 22706
640 * elf32-sh.c (sh_elf_relocate_section): When processing
641 translation relocs, fail if the relocation offset is too small.
642 Replace BFD_ASSERTs with more helpful error messages.
643
b8891f8d
AJ
6442018-07-30 Andrew Jenner <andrew@codesourcery.com>
645
646 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES): Add C-SKY.
647 (BFD32_BACKENDS, BFD_BACKENDS_CFILES): Likewise.
648 * Makefile.in: Regenerated.
649 * archures.c (enum bfd_architecture): Add bfd_arch_csky and
650 related bfd_mach defines.
651 (bfd_csky_arch): Declare.
652 (bfd_archures_list): Add C-SKY.
653 * bfd-in.h (elf32_csky_build_stubs): Declare.
654 (elf32_csky_size_stubs): Declare.
655 (elf32_csky_next_input_section: Declare.
656 (elf32_csky_setup_section_lists): Declare.
657 * bfd-in2.h: Regenerated.
658 * config.bfd: Add C-SKY.
659 * configure.ac: Likewise.
660 * configure: Regenerated.
661 * cpu-csky.c: New file.
662 * elf-bfd.h (enum elf_target_id): Add C-SKY.
663 * elf32-csky.c: New file.
664 * libbfd.h: Regenerated.
665 * reloc.c: Add C-SKY relocations.
666 * targets.c (csky_elf32_be_vec, csky_elf32_le_vec): Declare.
667 (_bfd_target_vector): Add C-SKY target vector entries.
668
469d3b57
JD
6692018-07-27 John Darrington <john@darrington.wattle.id.au>
670
671 * elf32-s12z.c (ELF_TARGET_ID): Don't define.
672
370e4b50
JD
6732018-07-27 John Darrington <john@darrington.wattle.id.au>
674
675 * libbfd.c (bfd_getb24, bfd_getl24): New functions.
676 (bfd_get_24, bfd_put_24): New macros.
677 * bfd-in2.h: Regenerate.
678
cd4d353f
JD
6792018-07-27 John Darrington <john@darrington.wattle.id.au>
680
681 * elf32-s12z.c (s12z_elf_set_mach_from_flags): Remove comment.
682
33cb30a1
AM
6832018-07-26 Alan Modra <amodra@gmail.com>
684
685 * elf64-ppc.c (ppc64_elf_size_stubs): Use a ppc_stub_long_branch_r2off
686 for calls to symbols with STO_PPC64_LOCAL_MASK bits set to 1.
687
49199304
AM
6882018-07-25 Alan Modra <amodra@gmail.com>
689
690 * elf32-ppc.c (ppc_elf_relax_section): Ignore common or undef locals.
691 Avoid trashing toff with added when used as a symbol index.
692 Ignore R_PPC_PLTREL24 addends in unused example code. Avoid
693 creating unnecessary fixups when relocatable.
694
be3e27bb
AM
6952018-07-25 Alan Modra <amodra@gmail.com>
696
697 * elf32-arm.c (elf32_arm_nabi_write_core_note): Disable
698 -Wstringop-truncation warning for gcc-8.0 too.
699 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
700 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
701 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
702 * elf32-s390.c (elf_s390_write_core_note): Comment fix.
703 * elf64-s390.c (elf_s390_write_core_note): Likewise.
704
67ce483b
AM
7052018-07-24 Alan Modra <amodra@gmail.com>
706
707 PR 23430
708 * dwarf2.c (dwarf_debug_section_enum): Fix comment typo.
709 * elf.c (bfd_section_from_shdr, elf_sort_sections): Likewise.
710
f82863d7
MF
7112018-07-23 Max Filippov <jcmvbkbc@gmail.com>
712
713 * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Move
714 relocation sections consistency check to always check both
715 .rela.dyn and .rela.plt when they exist. Rearrange variable
716 definition and assignment places.
717
5d3a462f
MF
7182018-07-23 Max Filippov <jcmvbkbc@gmail.com>
719
720 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Shrink dynamic
721 relocations section for dynamic undefined weak symbols when
722 linking a shared object.
723
01bcaf63
TT
7242018-07-23 Tom Tromey <tom@tromey.com>
725
726 * elf.c (bfd_get_elf_phdrs): Don't call memcpy with size 0.
727
2376f038
EB
7282018-07-21 Eric Botcazou <ebotcazou@adacore.com>
729
730 * elf32-arm.c (elf32_arm_final_link_relocate) <R_ARM_GOT32>: Small
731 cleanup for the case of a global symbol that binds locally. Also
732 install a value in the GOT slot in the case of a local symbol in
733 a non-PIC link.
734
241e64e3
L
7352018-07-20 H.J. Lu <hongjiu.lu@intel.com>
736
737 PR ld/23428
738 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): If the
739 separate code program header is needed, make sure that the first
740 read-only PT_LOAD segment has no code by adding a
741 GNU_PROPERTY_X86_ISA_1_USED note.
742
8095d2f7
CX
7432018-07-20 Chenghua Xu <paul.hua.gm@gmail.com>
744 Maciej W. Rozycki <macro@mips.com>
745
746 * elfxx-mips.c (print_mips_ases): Add MMI extension.
747
db841b6f
MR
7482018-07-20 Maciej W. Rozycki <macro@mips.com>
749
750 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Do not
751 create DT_REL, DT_RELSZ or DT_RELENT dynamic entries if the
752 dynamic relocation section will be discarded from output.
753 (_bfd_mips_elf_finish_dynamic_sections) <DT_RELSZ>: Assert that
754 the dynamic relocation section will be retained in output.
755
d3554ec1
MR
7562018-07-18 Maciej W. Rozycki <macro@mips.com>
757
758 * xcofflink.c (xcoff_write_global_symbol): Fix symbol type
759 checks for defined weak symbols.
760
c691de6a
MR
7612018-07-17 Maciej W. Rozycki <macro@mips.com>
762
763 * elf32-nds32.c (nds32_elf_relax_loadstore): Use
764 `bfd_is_abs_symbol' rather than `bfd_is_abs_section' in checking
765 whether the symbol is absolute.
766 (nds32_elf_relax_lo12): Likewise.
767 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
768 (elfNN_aarch64_check_relocs): Likewise.
769 * xcofflink.c (xcoff_need_ldrel_p): Likewise.
770 (bfd_xcoff_import_symbol): Likewise.
771 (xcoff_write_global_symbol): Likewise.
772
d5c928c0
MR
7732018-07-17 Maciej W. Rozycki <macro@mips.com>
774
775 * linker.c (bfd_is_abs_symbol): New macro.
776 * bfd-in2.h: Regenerate.
777
cb2366c1
EBM
7782018-07-16 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
779
780 * elf-bfd.h (elfcore_write_ppc_tar): Add prototype.
781 (elfcore_write_ppc_ppr): Likewise.
782 (elfcore_write_ppc_dscr): Likewise.
783 (elfcore_write_ppc_ebb): Likewise.
784 (elfcore_write_ppc_pmu): Likewise.
785 (elfcore_write_ppc_tm_cgpr): Likewise.
786 (elfcore_write_ppc_tm_cfpr): Likewise.
787 (elfcore_write_ppc_tm_cvmx): Likewise.
788 (elfcore_write_ppc_tm_cvsx): Likewise.
789 (elfcore_write_ppc_tm_spr): Likewise.
790 (elfcore_write_ppc_tm_ctar): Likewise.
791 (elfcore_write_ppc_tm_cppr): Likewise.
792 (elfcore_write_ppc_tm_cdscr): Likewise.
793 * elf.c (elfcore_write_ppc_tar): New function.
794 (elfcore_write_ppc_ppr): Likewise.
795 (elfcore_write_ppc_dscr): Likewise.
796 (elfcore_write_ppc_ebb): Likewise.
797 (elfcore_write_ppc_pmu): Likewise.
798 (elfcore_write_ppc_tm_cgpr): Likewise.
799 (elfcore_write_ppc_tm_cfpr): Likewise.
800 (elfcore_write_ppc_tm_cvmx): Likewise.
801 (elfcore_write_ppc_tm_cvsx): Likewise.
802 (elfcore_write_ppc_tm_spr): Likewise.
803 (elfcore_write_ppc_tm_ctar): Likewise.
804 (elfcore_write_ppc_tm_cppr): Likewise.
805 (elfcore_write_ppc_tm_cdscr): Likewise.
806 (elfcore_write_register_note): Call them.
807 (elfcore_grok_ppc_tar): New function.
808 (elfcore_grok_ppc_ppr): Likewise.
809 (elfcore_grok_ppc_dscr): Likewise.
810 (elfcore_grok_ppc_ebb): Likewise.
811 (elfcore_grok_ppc_pmu): Likewise.
812 (elfcore_grok_ppc_tm_cgpr): Likewise.
813 (elfcore_grok_ppc_tm_cfpr): Likewise.
814 (elfcore_grok_ppc_tm_cvmx): Likewise.
815 (elfcore_grok_ppc_tm_cvsx): Likewise.
816 (elfcore_grok_ppc_tm_spr): Likewise.
817 (elfcore_grok_ppc_tm_ctar): Likewise.
818 (elfcore_grok_ppc_tm_cppr): Likewise.
819 (elfcore_grok_ppc_tm_cdscr): Likewise.
820 (elfcore_grok_note): Call them.
821
1cb83cac
MR
8222018-07-11 Maciej W. Rozycki <macro@mips.com>
823
824 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
825 than `!bfd_link_pic' in determining the dynamic symbol index.
826 Avoid the index of -1.
827 (mips_elf_initialize_tls_slots): Likewise. Flatten code by
828 moving `dyn' to the beginning of the function block.
829
9143e72c
MR
8302018-07-11 Maciej W. Rozycki <macro@mips.com>
831 Rich Felker <bugdal@aerifal.cx>
832
833 PR ld/22570
834 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
835 than `bfd_link_pic' to determine whether dynamic relocations are
836 to be produced.
837 (mips_elf_initialize_tls_slots): Likewise.
838
5270eddc
MR
8392018-07-10 Maciej W. Rozycki <macro@mips.com>
840
841 * elflink.c (bfd_elf_final_link): Rename `remove' local variable
842 to `remove_section'.
843
1594e052
AM
8442018-07-10 Alan Modra <amodra@gmail.com>
845
846 * elf32-xgate.h: Delete.
847 * elf32-xgate.c: Delete unnecessary forward declarations, add two
848 that are now needed.
849 (xgate_elf_bfd_link_hash_table_create)
850 (xgate_elf_bfd_link_hash_table_free)
851 (xgate_elf_set_mach_from_flags, struct xgate_scan_param)
852 (stub_hash_newfunc, elf32_xgate_add_symbol_hook)
853 (elf32_xgate_setup_section_lists, elf32_xgate_size_stubs)
854 (elf32_xgate_build_stubs, elf32_xgate_check_relocs)
855 (elf32_xgate_relocate_section, _bfd_xgate_elf_set_private_flags)
856 (elf32_xgate_post_process_headers): Delete.
857 (elf32_xgate_backend_symbol_processing): New function.
858 (xgate_elf_ignore_reloc, xgate_elf_special_reloc)
859 (_bfd_xgate_elf_print_private_bfd_data): Make static.
860 (ELF_TARGET_ID, elf_info_to_howto, elf_backend_check_relocs)
861 (elf_backend_relocate_section, elf_backend_object_p)
862 (elf_backend_final_write_processing, elf_backend_can_gc_sections)
863 (elf_backend_post_process_headers, elf_backend_add_symbol_hook)
864 (bfd_elf32_bfd_link_hash_table_create)
865 (bfd_elf32_bfd_set_private_flags)
866 (xgate_stub_hash_lookup): Don't define.
867 (elf_backend_symbol_processing): Define.
868 * elf-bfd.h (elf_target_id): Delete XGATE_ELF_DATA.
869
4b8377e7
MR
8702018-07-09 Maciej W. Rozycki <macro@mips.com>
871
872 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Don't set
873 `->needs_lazy_stub' if the stubs output section is the absolute
874 section.
875
872899f1
L
8762018-07-09 H.J. Lu <hongjiu.lu@intel.com>
877
878 PR ld/23388
879 * configure.ac: Use changequote for "i[3-7]86-*-linux-*".
880 * configure: Regenerated.
881
61658d78
AM
8822018-07-09 Alan Modra <amodra@gmail.com>
883
884 * elf32-m68hc1x.c (elf32_m68hc11_post_process_headers): Call
885 _bfd_elf_post_process_headers.
886
c451bb34
MF
8872018-07-06 Max Filippov <jcmvbkbc@gmail.com>
888
889 * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Don't allocate
890 space for dynamic relocation for undefined weak symbol.
891 (elf_xtensa_relocate_section): Don't emit R_XTENSA_RELATIVE
892 relocation for undefined weak symbols.
893 (shrink_dynamic_reloc_sections): Don't shrink dynamic relocation
894 section for relocations against undefined weak symbols.
895
ad1cc4e4
AH
8962018-07-06 Alan Hayward <alan.hayward@arm.com>
897
898 * elf.c (elfcore_grok_aarch_sve): New function.
899 (elfcore_grok_note): Check for Aarch64 SVE.
900 (elfcore_write_aarch_sve): New function.
901 (elfcore_write_register_note): Check for Aarch64 SVE.
902 * elf-bfd.h(elfcore_grok_aarch_sve): New declaration.
903
fe75810f
AM
9042018-07-06 Alan Modra <amodra@gmail.com>
905
906 * elf32-arm.c (elf32_arm_nabi_write_core_note): Don't use
907 DIAGNOTIC_PUSH and DIAGNOSTIC_POP unconditionally.
908 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
909 * elf32-s390.c (elf_s390_write_core_note): Likewise.
910 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
911 * elf64-s390.c (elf_s390_write_core_note): Likewise.
912 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
913
bb11866d
JW
9142018-07-05 Jim Wilson <jimw@sifive.com>
915
916 * config.bfd (riscv32*-*-*): Renamed from riscv32-*-*.
917 (riscv64*-*-*): Likewise.
918 (riscv-*-*): Add as an alias for riscv32*-*-*.
919
56ad703d
L
9202018-07-05 H.J. Lu <hongjiu.lu@intel.com>
921
922 PR ld/23372
923 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove x86
924 ISA properties with empty bits.
925
d8dab054
NC
9262018-07-05 Nick Clifton <nickc@redhat.com>
927
928 * po/ru.po: Updated Russian translation.
929
4a91d0ba
AM
9302018-07-05 Alan Modra <amodra@gmail.com>
931
932 * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Update prototype.
933 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Return error
934 on mismatch. Remove "warning: " from messages. Track last bfd
935 used to set tags.
936 (ppc_elf_merge_obj_attributes): Likewise. Handle status from
937 _bfd_elf_ppc_merge_fp_attributes.
938 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Handle status
939 from _bfd_elf_ppc_merge_fp_attributes.
940
db40acb0
L
9412018-07-04 H.J. Lu <hongjiu.lu@intel.com>
942
943 * Makefile.am (bfdinclude_HEADERS): Add $(INCDIR)/diagnostics.h.
944 * Makefile.in: Regenerated.
945
b8a6ced7
AM
9462018-07-03 Alan Modra <amodra@gmail.com>
947
948 * elflink.c (bfd_elf_final_link): Remove zero size .gnu.attributes
949 sections.
950
8d2c8c3d
AM
9512018-07-03 Alan Modra <amodra@gmail.com>
952
953 * elf-bfd.h (ATTR_TYPE_FLAG_ERROR, ATTR_TYPE_HAS_ERROR): Define.
954 * elf-attrs.c (is_default_attr): Handle ATTR_TYPE_HAS_ERROR.
955 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Use
956 ATTR_TYPE_FLAG_INT_VAL. Set ATTR_TYPE_HAS_ERROR on finding
957 incompatible attribute.
958 (ppc_elf_merge_obj_attributes): Likewise. Return
959 _bfd_elf_merge_object_attributes result.
960 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Return
961 _bfd_elf_merge_object_attributes result.
962
af0bfb9c
AM
9632018-07-03 Alan Modra <amodra@gmail.com>
964
965 PR 17550
966 * elflink.c (_bfd_elf_fix_symbol_flags): Hide dynamic symbols
967 in discarded sections.
968
12f09816
MR
9692018-07-02 Maciej W. Rozycki <macro@mips.com>
970
971 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Set
972 `mark' for symbols created from `mips_elf_dynsym_rtproc_names'
973 list.
974
156f2c00
MR
9752018-07-02 Maciej W. Rozycki <macro@mips.com>
976
977 * elf64-mips.c (micromips_elf64_howto_table_rel): Add
978 R_MICROMIPS_HI0_LO16, R_MICROMIPS_TLS_GD, R_MICROMIPS_TLS_LDM,
979 R_MICROMIPS_TLS_DTPREL_HI16, R_MICROMIPS_TLS_DTPREL_LO16,
980 R_MICROMIPS_TLS_GOTTPREL, R_MICROMIPS_TLS_TPREL_HI16,
981 R_MICROMIPS_TLS_TPREL_LO16, R_MICROMIPS_GPREL7_S2 and
982 R_MICROMIPS_PC23_S2 relocation entries.
983 (micromips_elf64_howto_table_rela): Likewise.
984 (micromips_reloc_map): Likewise.
985 * elfn32-mips.c (elf_micromips_howto_table_rel): Likewise.
986 (elf_micromips_howto_table_rela): Likewise.
987 (micromips_reloc_map): Likewise.
988
b638b5d5
L
9892018-07-02 H.J. Lu <hongjiu.lu@intel.com>
990
991 PR ld/23324
992 * elf64-x86-64.c (elf_x86_64_relocate_section): Clear the
993 R_X86_64_converted_reloc_bit bit.
994
eac61af6
TT
9952018-07-02 Jeff Muizelaar <jrmuizel@gmail.com>
996 Tom Tromey <tom@tromey.com>
997
998 PR 13157
999 PR 21787
1000 * mach-o.c (bfd_mach_o_fat_close_and_cleanup): New function.
1001 (bfd_mach_o_close_and_cleanup): Redefine.
1002 * archive.c (_bfd_unlink_from_archive_parent): New function,
1003 extracted from..
1004 (_bfd_archive_close_and_cleanup): ..here.
1005 (bfd_generic_archive_p): Do not clear archive's format.
1006 * libbfd-in.h (_bfd_unlink_from_archive_parent): Declare.
1007 * libbfd.h: Regenerate.
1008
c0c468d5
TP
10092018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
1010
1011 * archures.c (bfd_mach_arm_5TEJ, bfd_mach_arm_6, bfd_mach_arm_6KZ,
1012 bfd_mach_arm_6T2, bfd_mach_arm_6K, bfd_mach_arm_7, bfd_mach_arm_6M,
1013 bfd_mach_arm_6SM, bfd_mach_arm_7EM, bfd_mach_arm_8, bfd_mach_arm_8R,
1014 bfd_mach_arm_8M_BASE, bfd_mach_arm_8M_MAIN): Define.
1015 * bfd-in2.h: Regenerate.
1016 * cpu-arm.c (arch_info_struct): Add entries for above new
1017 bfd_mach_arm values.
1018 * elf32-arm.c (bfd_arm_get_mach_from_attributes): Add Tag_CPU_arch to
1019 bfd_mach_arm mapping logic for pre Armv4 and Armv5TEJ and later
1020 architectures. Force assert failure for any new Tag_CPU_arch value.
1021
a05a5b64
TP
10222018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
1023
1024 * doc/bfdint.texi: Use command-line consistently when used in a
1025 compount word.
1026 * doc/bfdsumm.texi: Likewise.
1027
262e07d0
MR
10282018-06-29 Maciej W. Rozycki <macro@mips.com>
1029
1030 * elfxx-mips.c (allocate_dynrelocs): Remove extraneous symbol
1031 visibility check made for undefined weak symbols.
1032
30aa1306
NC
10332018-06-26 Nick Clifton <nickc@redhat.com>
1034
1035 * po/uk.po: Updated Ukranian translation.
1036
bb69498c
NC
10372018-06-25 Nick Clifton <nickc@redhat.com>
1038
1039 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_stub_name): Check
1040 for malloc returning NULL.
1041 (_bfd_aarch64_erratum_843419_fixup): Check for
1042 _bfd_aarch64_erratum_835769_stub_name returning NULL.
1043
71300e2c
NC
10442018-06-24 Nick Clifton <nickc@redhat.com>
1045
1046 * po/bfd.pot: Regenerate.
1047
5127f207
NC
10482018-06-24 Nick Clifton <nickc@redhat.com>
1049
1050 * version.m4: Update version string to 2.31.51.
1051 * configure: Regenerate.
1052
719d8288
NC
10532018-06-24 Nick Clifton <nickc@redhat.com>
1054
1055 2.31 branch created.
1056
1ced1a5f
MR
10572018-06-21 Maciej W. Rozycki <macro@mips.com>
1058
1059 * elfxx-mips.c (_bfd_mips_elf_compact_eh_encoding)
1060 (_bfd_mips_elf_cant_unwind_opcode): Correct formatting.
1061
334cd8a7
MR
10622018-06-21 Maciej W. Rozycki <macro@mips.com>
1063
1064 * elfxx-mips.c (_bfd_mips_post_process_headers): Keep
1065 EI_ABIVERSION setting together.
1066
bb29b84d
MR
10672018-06-21 Maciej W. Rozycki <macro@mips.com>
1068
1069 * elfxx-mips.c (MIPS_LIBC_ABI_DEFAULT, MIPS_LIBC_ABI_MIPS_PLT)
1070 (MIPS_LIBC_ABI_UNIQUE, MIPS_LIBC_ABI_MIPS_O32_FP64)
1071 (MIPS_LIBC_ABI_MAX): New enumeration constants.
1072 (_bfd_mips_post_process_headers): Use them in place of magic
1073 numbers.
1074
25eb8346
JW
10752018-06-21 Jim Wilson <jimw@sifive.com>
1076
1077 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Update comment.
1078 Use SYMBOL_REFERENCES_LOCAL. Add asserts for h->got.offset.
1079
d388f643
AM
10802018-06-21 Alan Modra <amodra@gmail.com>
1081
1082 * doc/Makefile.am (AUTOMAKE_OPTIONS): Add "foreign".
1083 * doc/Makefile.in: Regenerate.
1084
b939d8a0
RL
10852018-06-20 Renlin Li <renlin.li@arm.com>
1086
1087 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use PG_OFFSET
1088 to resolve BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
1089 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
1090 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
1091 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC,
1092 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
1093 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
1094 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
1095 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
1096
6077de06
NC
10972018-06-20 Nick Clifton <nickc@redhat.com>
1098
1099 PR 23316
1100 * opncls.c (get_build_id): Check for a negative or excessive data
1101 size in the build-id note.
1102
c6643fcc
NC
11032018-06-20 Nick Clifton <nickc@redhat.com>
1104
1105 PR 23299
1106 * mach-o.c (cputype): New function.
1107 (cpusubtype): New function.
1108 (bfd_mach_o_bfd_print_private_data): New function. Dispalys the
1109 values in the MACH-O file header.
1110 (bfd_mach_o_bfd_copy_private_header_data): Copy the cputype and
1111 cpusubtype fields from the input bfd's mach-o header to the output
1112 bfd.
1113 * mach-o-target.c (bfd_mach_o_bfd_print_private_bfd_data):
1114 Redefine to bfd_mach_o_bfd_print_private_data.
1115 * mach-o.h (bfd_mach_o_bfd_print_private_bfd_data): Prototype.
1116
789ff5b6
MR
11172018-06-19 Maciej W. Rozycki <macro@mips.com>
1118
1119 PR ld/22966
1120 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Verify the
1121 `.got.plt' entry referred is in range.
1122 (mips_finish_exec_plt): Correct the range check for `.got.plt'
1123 start. Replace the assertion used for that with a proper error
1124 message.
1125
6a382bce
MR
11262018-06-19 Maciej W. Rozycki <macro@mips.com>
1127
1128 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Fix
1129 formatting.
1130
d0ac1c44
SM
11312018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1132
1133 * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11.
1134 (INCLUDES): Rename to ...
1135 (AM_CPPFLAGS): ... this.
1136 * configure.ac: Remove AC_PREREQ.
1137 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add
1138 info-in-builddir no-texinfo.tex.
1139 (info_TEXINFOS): Rename bfd.texinfo to bfd.texi.
1140 * doc/bfd.texinfo: Rename to ...
1141 * doc/bfd.texi: ... this.
1142 * Makefile.in: Re-generate.
1143 * aclocal.m4: Re-generate.
1144 * config.in: Re-generate.
1145 * configure: Re-generate.
1146 * doc/Makefile.in: Re-generate.
1147
ed1299fe
M
11482018-06-18 Mephi <mephi42@gmail.com>
1149
1150 PR 23297
1151 * mach-o-x86-64.c (x86_64_howto_table): Add entry for
1152 BFD_RELOC_MACH_O_X86_64_RELOC_TLV.
1153 (bfd_mach_o_x86_64_canonicalize_one_reloc): Handle the new reloc.
1154 (bfd_mach_o_x86_64_swap_reloc_out): Likewise.
1155 * reloc.c (BFD_RELOC_MACH_O_X86_64_TV): New entry.
1156 * bfd-in2.h: Regenerate.
1157 * libbfd.h: Regenerate.
1158
6f20c942
FS
11592018-06-14 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
1160
1161 * elfxx-mips.c (print_mips_ases): Add GINV extension.
1162
1f6f5dba
L
11632018-06-14 H.J. Lu <hongjiu.lu@intel.com>
1164
1165 PR binutils/23267
1166 * elf.c (_bfd_elf_get_symbol_version_string): Check if the first
1167 symbol version is base version.
1168
7f923b7f
AM
11692018-06-14 Alan Modra <amodra@gmail.com>
1170
1171 * elf-bfd.h (struct elf_link_hash_table): Add "dynamic_relocs".
1172 * elflink.c (_bfd_elf_init_2_index_sections): Comment fix.
1173 (_bfd_elf_add_dynamic_entry): Set "dynamic_relocs".
1174 (_bfd_elf_link_renumber_dynsyms): Exclude all section symbols when
1175 "dynamic_relocs" is not set.
1176 * elfxx-mips.c (count_section_dynsyms): Likewise.
1177
ff91d2f0
AM
11782018-06-14 Alan Modra <amodra@gmail.com>
1179
1180 PR 23282
1181 * bfdio.c (bfd_seek): Optimize away seeks to current position.
1182
730c3174
SE
11832018-06-13 Scott Egerton <scott.egerton@imgtec.com>
1184 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
1185
1186 * elfxx-mips.c (print_mips_ases): Add CRC.
1187
ecf99cc0
L
11882018-06-08 H.J. Lu <hongjiu.lu@intel.com>
1189
1190 PR ld/23161
1191 * elfxx-x86.c (elf_x86_hide_linker_defined): New function.
1192 (_bfd_x86_elf_link_check_relocs): Use it to hide hidden
1193 __bss_start, _end and _edata in shared libraries.
1194
527278f3
AM
11952018-06-07 Alan Modra <amodra@gmail.com>
1196
1197 * elf32-tic6x.c (elf32_tic6x_check_relocs): Reference
1198 __c6xabi_DSBT_BASE explicitly for R_C6000_SBR_* relocs.
1199
5c4ce239
AM
12002018-06-05 Alan Modra <amodra@gmail.com>
1201
1202 * bfd.c (struct bfd): Update comment on "where" usage.
1203 * bfdio.c (bfd_bwrite, bfd_stat): Use and update "iovec",
1204 "iostream", and "where" from containing archive file. Return
1205 error on NULL iovec.
1206 (bfd_bread): Similarly, and return error attempted out of
1207 bounds archive element access.
1208 (bfd_tell, bfd_flush): Use and update "iovec", "iostream", and
1209 "where" from containing archive file.
1210 (bfd_seek): Likewise. Return error on NULL iovec. Don't
1211 attempt to optimize away seeks. Don't paper over errors by
1212 calling bfd_tell.
1213 (bfd_get_mtime): Call bfd_stat rather than iovec->bstat.
1214 (bfd_get_size): Likewise.
1215 (bfd_mmap): Operate on and use iovec of containing archive
1216 file. Return error on NULL iovec.
1217 * cache.c (bfd_cache_lookup_worker): Abort if working on
1218 archive element bfd.
1219 (cache_bread_1): Delete bfd parameter, add FILE* parameter.
1220 Don't ignore zero byte reads.
1221 (cache_bread): Look up FILE* in cache here. Error on NULL
1222 lookup.
1223 (cache_bwrite): Rename "where" to "from".
1224 (cache_bmmap): Don't handle archive elements.
1225 * coffcode.h (coff_slurp_line_table): Exit early on zero
1226 lineno count.
1227 * bfd-in2.h: Regenerate.
1228
27b07675
AM
12292018-06-05 Alan Modra <amodra@gmail.com>
1230
1231 PR 23254
1232 * plugin.c (bfd_plugin_open_input): Allow for possibility of
1233 nested archives. Open file again for plugin.
1234 (try_claim): Don't save and restore file position. Close file
1235 if not claimed.
1236 * sysdep.h (O_BINARY): Define.
1237
4b8e28c7
MF
12382018-06-04 Max Filippov <jcmvbkbc@gmail.com>
1239
1240 * elf32-xtensa.c (xtensa_read_table_entries): Make global.
1241 (compute_fill_extra_space): Drop declaration. Rename function to
1242 xtensa_compute_fill_extra_space.
1243 (compute_ebb_actions, remove_dead_literal): Update references to
1244 compute_fill_extra_space.
1245
8255c61b
MF
12462018-06-04 Volodymyr Arbatov <arbatov@cadence.com>
1247
1248 * elf32-xtensa.c (elf32xtensa_separate_props): New global
1249 variable.
1250 (xtensa_add_names): New function.
1251 (xtensa_property_section_name): Add new parameter
1252 separate_sections, use it to choose property section name.
1253 (xtensa_get_separate_property_section): New function.
1254 (xtensa_get_property_section): Invoke
1255 xtensa_get_separate_property_section to get individual property
1256 section if it exists, common property section otherwise.
1257 (xtensa_make_property_section): Pass elf32xtensa_separate_props
1258 to xtensa_property_section_name.
1259
95da9854
L
12602018-06-04 H.J. Lu <hongjiu.lu@intel.com>
1261
1262 PR binutils/23146
1263 * bfd-in.h: Include "diagnostics.h".
1264 * bfd-in2.h: Regenerated.
1265 * elf32-arm.c (elf32_arm_nabi_write_core_note): Use
1266 DIAGNOSTIC_PUSH, DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION and
1267 DIAGNOSTIC_POP to silence GCC 8.1 warnings with
1268 -Wstringop-truncation.
1269 * elf32-ppc.c (ppc_elf_write_core_note): Likewse.
1270 * elf32-s390.c (elf_s390_write_core_note): Likewse.
1271 * elf64-ppc.c (ppc64_elf_write_core_note): Likewse.
1272 * elf64-s390.c (elf_s390_write_core_note): Likewse.
1273 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewse.
1274
137b5cbd
JW
12752018-06-03 Jim Wilson <jimw@sifive.com>
1276
cf7a5066
JW
1277 PR ld/23244
1278 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Check
1279 for and handle an undefined weak with no PLT.
1280
137b5cbd
JW
1281 PR ld/22756
1282 * elfnn-riscv.c (riscv_relax_delete_bytes): Add versioned_hidden check
1283 to code that ignores duplicate symbols.
1284
55e99962
L
12852018-06-01 H.J. Lu <hongjiu.lu@intel.com>
1286
1287 * version.m4: Bump version to 2.30.52
1288 * configure: Regenerated.
1289
030157d8
AM
12902018-06-01 Alan Modra <amodra@gmail.com>
1291
1292 * bfd.c (_bfd_error_handler): Arrange for this function to be
1293 declared in bfd-in2.h.
1294 * libbfd-in.h (_bfd_error_handler): Don't declare.
1295 * libbfd.h: Regenerate.
1296 * bfd-in2.h: Regenerate.
1297
421acf18
AC
12982018-05-30 Amaan Cheval <amaan.cheval@gmail.com>
1299
1300 * config.bfd (x86_64-*-*): Add pei-x86-64 target to x86_64-*-rtems*
1301 This is needed to generate UEFI application image files from ELFs.
1302
92e68c1d
L
13032018-05-28 H.J. Lu <hongjiu.lu@intel.com>
1304
1305 * elf32-i386.c (elf_i386_lazy_plt): Add plt_tlsdesc_entry,
1306 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
1307 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
1308 plt_tlsdesc_got2_insn_end for TLSDESC entry.
1309 (elf_i386_lazy_ibt_plt): Likewise.
1310 (elf_i386_nacl_plt): Likewise.
1311 * elf64-x86-64.c (tlsdesc_plt_entry): Moved and renamed to ...
1312 (elf_x86_64_tlsdesc_plt_entry): This.
1313 (elf_x86_64_lazy_plt): Add plt_tlsdesc_entry,
1314 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
1315 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
1316 plt_tlsdesc_got2_insn_end for TLSDESC entry.
1317 (elf_x86_64_lazy_bnd_plt): Likewise.
1318 (elf_x86_64_lazy_ibt_plt): Likewise.
1319 (elf_x32_lazy_ibt_plt): Likewise.
1320 (elf_x86_64_nacl_plt): Likewise.
1321 (elf_x86_64_finish_dynamic_sections): Use plt_tlsdesc_entry,
1322 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
1323 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
1324 plt_tlsdesc_got2_insn_end to update TLSDESC entry.
1325 * elfxx-x86.h (elf_x86_lazy_plt_layout): Update comments.
1326 Add plt_tlsdesc_entry, plt_tlsdesc_entry_size,
1327 plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset,
1328 plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end.
1329 (elf_x86_non_lazy_plt_layout): Update comments.
1330 (elf_x86_plt_layout): Likewise.
1331
ac98f9e2
L
13322018-05-28 H.J. Lu <hongjiu.lu@intel.com>
1333
1334 PR ld/23238
1335 * elf-s390-common.c (elf_s390_add_symbol_hook): Removed.
1336 * elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
1337 (elf_backend_add_symbol_hook): Likewise.
1338 * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
1339 (elf_backend_add_symbol_hook): Likewise.
1340 * elf32-s390.c (elf_backend_add_symbol_hook): Likewise.
1341 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
1342 (elf_backend_add_symbol_hook): Likewise.
1343 * elf64-s390.c (elf_backend_add_symbol_hook): Likewise.
1344 * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
1345 * elfxx-aarch64.h (_bfd_aarch64_elf_add_symbol_hook): Likewise.
1346 (elf_backend_add_symbol_hook): Likewise.
1347 * elf32-arm.c (elf32_arm_add_symbol_hook): Remove STT_GNU_IFUNC
1348 handling.
1349 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
1350 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
1351 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
1352 * elflink.c (elf_link_add_object_symbols): Set
1353 elf_gnu_symbol_ifunc for STT_GNU_IFUNC symbols.
1354
099bb8fb
L
13552018-05-26 H.J. Lu <hongjiu.lu@intel.com>
1356
1357 PR ld/23194
1358 * elf-bfd.h (_bfd_elf_link_hide_sym_by_version): New.
1359 * elflink.c (_bfd_elf_link_hide_versioned_symbol): New function.
1360 Extracted from _bfd_elf_link_assign_sym_version.
1361 (_bfd_elf_link_hide_sym_by_version): New function.
1362 (_bfd_elf_link_assign_sym_version): Use
1363 _bfd_elf_link_hide_versioned_symbol.
1364 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Call
1365 _bfd_elf_link_hide_sym_by_version instead of
1366 bfd_hide_sym_by_version. Don't check unversioned symbol.
1367
277eb7f6
AM
13682018-05-25 Alan Modra <amodra@gmail.com>
1369
1370 * Makefile.in: Regenerate.
1371 * po/SRC-POTFILES.in: Regenerate.
1372
629dabe3
AM
13732018-05-25 Alan Modra <amodra@gmail.com>
1374
1375 * configure.ac (bfd_cv_hidden): Run test with -Werror in CFLAGS.
1376 * configure: Regenerate.
1377
9ef6d1e3
L
13782018-05-23 H.J. Lu <hongjiu.lu@intel.com>
1379
1380 * elf64-ppc.c (ppc64_elf_write_core_note): Add ATTRIBUTE_NONSTRING
1381 to data.
1382
215f5271
AM
13832018-05-22 Alan Modra <amodra@gmail.com>
1384
1385 PR 23207
1386 * elf32-hppa.c (hppa_get_stub_entry): Return NULL when link_sec
1387 is NULL.
1388 (elf32_hppa_size_stubs): Only create stubs for load, alloc, code
1389 sections.
1390 (final_link_relocate): Revert last change.
1391
7455c018
AM
13922018-05-22 Alan Modra <amodra@gmail.com>
1393
1394 PR 23207
1395 * elf32-hppa.c (final_link_relocate): Don't look for plt call
1396 stubs in non-alloc sections.
1397
34a87bb0
L
13982018-05-21 H.J. Lu <hongjiu.lu@intel.com>
1399
1400 PR ld/23201
1401 * aout-target.h (MY_bfd_link_hide_symbol): New.
1402 * aout-tic30.c (MY_bfd_link_hide_symbol): Likewise.
1403 * binary.c (binary_bfd_link_hide_symbol): Likewise.
1404 * coff-alpha.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
1405 * coff-mips.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
1406 * coff-rs6000.c (_bfd_xcoff_bfd_link_hide_symbol): Likewise.
1407 * coffcode.h (coff_bfd_link_hide_symbol): Likewise.
1408 * elf-bfd.h (_bfd_elf_link_hide_symbol): Likewise.
1409 * elfxx-target.h (bfd_elfNN_bfd_link_hide_symbol): Likewise.
1410 * i386msdos.c (msdos_bfd_link_hide_symbol): Likewise.
1411 * ihex.c (ihex_bfd_link_hide_symbol): Likewise.
1412 * libbfd-in.h (_bfd_nolink_bfd_link_hide_symbol): Likewise.
1413 * linker.c (_bfd_generic_link_hide_symbol): Likewise.
1414 (bfd_link_hide_symbol): Likewise.
1415 * mach-o-target.c (bfd_mach_o_bfd_link_hide_symbol): Likewise.
1416 * mmo.c (mmo_bfd_link_hide_symbol): Likewise.
1417 * pef.c (bfd_pef_bfd_link_hide_symbol): Likewise.
1418 * plugin.c (bfd_plugin_bfd_link_hide_symbol): Likewise.
1419 * ppcboot.c (ppcboot_bfd_link_hide_symbol): Likewise.
1420 * som.c (som_bfd_link_hide_symbol): Likewise.
1421 * srec.c (srec_bfd_link_hide_symbol): Likewise.
1422 * tekhex.c (tekhex_bfd_link_hide_symbol): Likewise.
1423 * vms-alpha.c (vms_bfd_link_hide_symbol): Likewise.
1424 (alpha_vms_bfd_link_hide_symbol): Likewise.
1425 * xsym.c (bfd_sym_bfd_link_hide_symbol): Likewise.
1426 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
1427 _bfd_generic_link_hide_symbol.
1428 (rs6000_xcoff64_aix_vec): Likewise.
1429 * elflink.c (bfd_elf_record_link_assignment): Don't make forced
1430 local symbol dynamic.
1431 (_bfd_elf_link_hide_symbol): New function.
1432 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1433 check root.ldscript_def.
1434 * targets.c (bfd_target): Add _bfd_link_hide_symbol.
1435 (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_link_hide_symbol.
1436 * bfd-in2.h: Regenerated.
1437 * libbfd.h: Likewise.
1438
bae363f1
L
14392018-05-21 H.J. Lu <hongjiu.lu@intel.com>
1440
1441 PR binutils/23199
1442 * elf.c (setup_group): Mark section in a section group with
1443 SHF_GROUP.
1444
97373b2e
L
14452018-05-18 H.J. Lu <hongjiu.lu@intel.com>
1446
1447 PR ld/23194
1448 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1449 set eh->local_ref to 1 if a symbol is versioned and there is a
1450 version script.
1451
7f999549
JW
14522018-05-18 Kito Cheng <kito.cheng@gmail.com>
1453
1454 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Handle
1455 EF_RISCV_RVE.
1456
6487709f
JW
14572018-05-18 Jim Wilson <jimw@sifive.com>
1458
1459 * elfnn-riscv.c (allocate_dynrelocs): Discard dynamic relocations if
1460 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1461 (riscv_elf_relocate_section): Don't generate dynamic relocation if
1462 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1463 (riscv_elf_finish_dynamic_symbol): Likewise.
1464
7b4ae824
JD
14652018-05-18 John Darrington <john@darrington.wattle.id.au>
1466
1467 * Makefile.am: Add s12z files.
1468 * Makefile.in: Regenerate.
1469 * archures.c: Add bfd_s12z_arch.
1470 * bfd-in.h: Add exports of bfd_putb24 and bfd_putl24.
1471 * bfd-in2.h: Regenerate.
1472 * config.bfd: Add s12z target.
1473 * configure.ac: Add s12z target.
1474 * configure: Regenerate.
1475 * cpu-s12z.c: New file.
1476 * elf32-s12z.c: New file.
1477 * libbfd.c (bfd_putb24): New function.
1478 (bfd_putl24): New function.
1479 * libbfd.h: Regenerate.
1480 * reloc.c: Add s12z relocations.
1481 (bfd_get_reloc_size): Handle size 5 relocs.
1482 * targets.c: Add s12z_elf32_vec.
1483
011b32fd
L
14842018-05-18 H.J. Lu <hongjiu.lu@intel.com>
1485
1486 PR ld/23189
1487 * elf32-i386.c (elf_i386_relocate_section): Handle R_386_GOT32X
1488 like R_386_GOT32.
1489 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1490 set eh->local_ref to 1 for linker defined symbols.
1491
4bba0fb1
AM
14922018-05-18 Alan Modra <amodra@gmail.com>
1493
1494 PR 23199
1495 * elf.c (setup_group): Formatting. Check that SHT_GROUP entries
1496 don't point at other SHT_GROUP sections. Set shdr corresponding
1497 to invalid entry, to NULL rather than section 0. Identify
1498 SHT_GROUP section index when reporting an error. Cope with NULL
1499 shdr pointer.
1500
8722de9c
AM
15012018-05-18 Alan Modra <amodra@gmail.com>
1502
1503 * libbfd-in.h (ATTRIBUTE_HIDDEN): Define and use throughout.
1504 * configure.ac (HAVE_HIDDEN): Check compiler support for hidden
1505 visibility.
1506 * libbfd.h: Regenerate.
1507 * configure: Regenerate.
1508 * config.in: Regenerate.
1509
0b439543
AM
15102018-05-18 Alan Modra <amodra@gmail.com>
1511
1512 * libbfd-in.h: Add include guard.
1513 * libcoff-in.h: Likewise.
1514 * doc/Makefile.am (libbfd.h, libcoff.h): Append another #endif.
1515 * doc/Makefile.in: Regenerate.
1516 * libbfd.h: Regenerate.
1517 * libcoff.h: Regenerate.
1518
1624c9ca
MR
15192018-05-16 Maciej W. Rozycki <macro@mips.com>
1520
1521 * elf32-nds32.c (nds32_convert_32_to_16): Preset `insn_type'.
1522
7cf7fcc8
AM
15232018-05-16 Alan Modra <amodra@gmail.com>
1524
1525 PR 22458
1526 * format.c (struct bfd_preserve): Add section_id.
1527 (bfd_preserve_save, bfd_preserve_restore): Save and restore
1528 _bfd_section_id.
1529 (bfd_reinit): Set _bfd_section_id.
1530 (bfd_check_format_matches): Put all matches of any priority into
1531 matching_vector. Save initial section id and start each attempted
1532 match at that section id.
1533 * libbfd-in.h (_bfd_section_id): Declare.
1534 * section.c (_bfd_section_id): Rename from section_id and make
1535 global. Adjust uses.
1536 (bfd_get_next_section_id): Delete.
1537 * elf64-ppc.c (ppc64_elf_setup_section_lists): Replace use of
1538 bfd_get_section_id with _bfd_section_id.
1539 * libbfd.h: Regenerate.
1540 * bfd-in2.h: Regenerate.
1541
810ed4db
CG
15422018-05-15 Christophe Guillon <christophe.guillon@st.com>
1543
1544 * coffcode.h (coff_bigobj_swap_aux_in): Make sure that all fields
1545 of the aux structure are initialised.
1546
1678bd35
FT
15472018-05-15 Francois H. Theron <francois.theron@netronome.com>
1548
1549 * targets.c: Wrap nfp_elf64_vec in BFD64 ifdef.
1550
293b4d4f
NC
15512018-05-15 Nick Clifton <nickc@redhat.com>
1552
1553 * po/pt.po: New Portuguese translation.
1554 * configure.ac (ALL_LINGUAS): Add pt.
1555 * configure: Regenerate.
1556
4ec09950
L
15572018-05-14 H.J. Lu <hongjiu.lu@intel.com>
1558
1559 PR ld/23169
1560 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Don't issue
1561 an error on IFUNC pointer defined in PDE.
1562 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Call
1563 _bfd_x86_elf_link_fixup_ifunc_symbol.
1564 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1565 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): New
1566 function.
1567 * elfxx-x86.h (_bfd_x86_elf_link_fixup_ifunc_symbol): New.
1568
9bc935ef
L
15692018-05-14 H.J. Lu <hongjiu.lu@intel.com>
1570
1571 PR ld/23162
1572 * elfxx-x86.c (elf_x86_linker_defined): New function.
1573 (_bfd_x86_elf_link_check_relocs): Use it to mark __bss_start,
1574 _end and _edata locally defined within executables.
1575
9933dc52
AM
15762018-05-12 Alan Modra <amodra@gmail.com>
1577
1578 PR 20659
1579 * elf.c (rewrite_elf_program_header): Use segment_mark only for
1580 PT_LOAD headers. Delete first_matching_lma and first_suggested_lma.
1581 Instead make matching_lma and suggested_lma pointers to the
1582 sections. Align section vma and lma calculated from segment.
1583 Don't clear includes_phdrs or includes_filehdr based on p_paddr
1584 test. Try to handle alignment padding before first section by
1585 adjusting new segment lma down. Adjust PT_PHDR map p_paddr.
1586
493ffac5
DD
15872018-05-09 Dimitar Dimitrov <dimitar@dinux.eu>
1588
1589 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Make LDI32 relocation
1590 conformant to TI ABI.
1591 (pru_elf32_relax_section): Likewise.
1592 (pru_elf_relax_delete_bytes): Fix offsets for new LDI32 code.
1593 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Ignore addend.
1594 (pru_elf32_pmem_relocate): Trap - should not get here.
1595 (pru_elf32_relocate_section): Add support for REL relocations.
1596 (elf_info_to_howto_rel): Enable REL.
1597 (elf_backend_may_use_rel_p): Likewise.
1598 (elf_backend_may_use_rela_p): Likewise.
1599 (elf_backend_default_use_rela_p): Likewise.
1600
b4560c7d
AM
16012018-05-09 Alan Modra <amodra@gmail.com>
1602
1603 PR 23148
1604 * peXXigen.c (pe_print_edata): Correct minimum size.
1605
53db9cf9
AM
16062018-05-09 Alan Modra <amodra@gmail.com>
1607
1608 PR 23147
1609 * peXXigen.c (pe_print_idata): Bound check hint_addr.
1610
95a6d235
NC
16112018-05-08 Nick Clifton <nickc@redhat.com>
1612
1613 PR 22809
1614 * elf.c (bfd_elf_get_str_section): Check for an excessively large
1615 string section.
1616 * elf-attrs.c (_bfd_elf_parse_attributes): Issue an error if the
1617 attribute section is larger than the size of the file.
1618
7bd8862c
AM
16192018-05-07 Alan Modra <amodra@gmail.com>
1620
1621 * cofflink.c (_bfd_coff_link_input_bfd): Use memcmp rather than
1622 strncmp when checking for ".bf" special symbol.
1623 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Make pe_required_section_flags
1624 section name a char array, remove sentinal known_sections entry,
1625 and adjust loop over known_sections to suit. Use memcmp rather
1626 than strncmp.
1627
602f1657
AM
16282018-05-04 Alan Modra <amodra@gmail.com>
1629
1630 * elf-linux-core.h (struct elf_external_linux_prpsinfo32_ugid32),
1631 (struct elf_external_linux_prpsinfo32_ugid16),
1632 (struct elf_external_linux_prpsinfo64_ugid32),
1633 (struct elf_external_linux_prpsinfo64_ugid16): Add ATTRIBUTE_NONSTRING
1634 to pr_fname and pr_psargs fields. Remove GCC diagnostic pragmas.
1635 Move comment to..
1636 * elf.c (elfcore_write_prpsinfo): ..here. Indent nested preprocessor
1637 directives.
1638 * elf32-arm.c (elf32_arm_nabi_write_core_note): Add ATTRIBUTE_NONSTRING
1639 to data.
1640 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
1641 * elf32-s390.c (elf_s390_write_core_note): Likewise.
1642 * elf64-s390.c (elf_s390_write_core_note): Likewise.
1643 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
1644 * elf64-x86-64.c (elf_x86_64_write_core_note): Add GCC diagnostic
1645 pragmas.
1646 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Use strnlen to avoid
1647 false positive gcc-8 warning.
7bd8862c 1648 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
602f1657 1649
a27ca19c
TMQMF
16502018-05-04 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
1651
1652 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Fix the order
1653 of arguments when warning about different long double types.
1654
3be08ea4
SA
16552018-05-03 Simon Atanasyan <simon@atanasyan.com>
1656
1657 * elf32-mips.c: (elf32_mips_fixup_symbol): New function.
1658 (elf_backend_fixup_symbol): New macro.
1659 * elfxx-mips.c: (mips_elf_output_extsym): Discard _gp_disp
1660 handling.
1661 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
1662
fe944acf
FT
16632018-04-30 Francois H. Theron <francois.theron@netronome.com>
1664
1665 * Makefile.am: Added NFP files to build.
1666 * archures.c: Added bfd_arch_nfp
1667 * config.bfd: Added NFP support.
1668 * configure.ac: Added NFP support.
1669 * cpu-nfp.c: New, for NFP support.
1670 * elf-bfd.h: Added elf_section_info()
1671 * elf64-nfp.c: New, for NFP support.
1672 * po/SRC-POTFILES.in: Added NFP source files.
1673 * targets.c: Added nfp_elf64_vec
1674 * bfd-in2.h: Regenerate.
1675 * Makefile.in: Regenerate.
1676 * configure: Regenerate.
1677
ffa389a3
AM
16782018-04-27 Alan Modra <amodra@gmail.com>
1679
1680 * bfd-in2.h: Regenerate.
1681 * libbfd.h: Regenerate.
1682
04383fd1
AM
16832018-04-27 Alan Modra <amodra@gmail.com>
1684
1685 PR 23123
1686 PR 22374
1687 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt
1688 relocs for ifuncs.
1689 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes.
1690
bfa5bd2a
PA
16912018-04-26 Pedro Alves <palves@redhat.com>
1692
1693 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't consider
1694 ifunc and non-ifunc symbols duplicates.
1695
59029f57
CL
16962018-04-25 Christophe Lyon <christophe.lyon@st.com>
1697 Mickaël Guêné <mickael.guene@st.com>
1698
1699 * elf32-arm.c (elf32_arm_fdpic_thumb_plt_entry): New.
1700 (elf32_arm_plt_needs_thumb_stub_p): Handle thumb-only case.
1701 (elf32_arm_populate_plt_entry): Likewise.
1702 (elf32_arm_output_plt_map_1): Likewise.
1703 (elf32_arm_output_arch_local_syms): Likewise.
1704
fac7bd64
CL
17052018-04-25 Christophe Lyon <christophe.lyon@st.com>
1706 Mickaël Guêné <mickael.guene@st.com>
1707
1708 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle
1709 _GLOBAL_OFFSET_TABLE_ in FDPIC mode.
1710
29e9b073
CL
17112018-04-25 Christophe Lyon <christophe.lyon@st.com>
1712 Mickaël Guêné <mickael.guene@st.com>
1713
1714 * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case
1715 for R_ARM_TARGET2.
1716
cb10292c
CL
17172018-04-25 Christophe Lyon <christophe.lyon@st.com>
1718 Mickaël Guêné <mickael.guene@st.com>
1719
1720 * elf32-arm.c (DEFAULT_STACK_SIZE): New.
1721 (elf32_arm_always_size_sections): Create stack segment.
1722
5c5a4843
CL
17232018-04-25 Christophe Lyon <christophe.lyon@st.com>
1724 Mickaël Guêné <mickael.guene@st.com>
1725
1726 * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC)
1727 (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New
1728 relocations.
1729 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC,
1730 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations.
1731 (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC,
1732 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC.
1733 (struct elf32_arm_link_hash_table): Update comment.
1734 (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations.
1735 (IS_ARM_TLS_RELOC): Likewise.
1736 (elf32_arm_check_relocs): Likewise.
1737 (allocate_dynrelocs_for_symbol): Likewise.
1738 (elf32_arm_size_dynamic_sections): Update comment.
1739 * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC,
1740 BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC.
1741
7801f98f
CL
17422018-04-25 Christophe Lyon <christophe.lyon@st.com>
1743 Mickaël Guêné <mickael.guene@st.com>
1744
1745 * elf32-arm.c (elf32_arm_fdpic_plt_entry): New.
1746 (elf32_arm_create_dynamic_sections): Handle FDPIC.
1747 (elf32_arm_allocate_plt_entry): Likewise.
1748 (elf32_arm_populate_plt_entry): Likewise.
1749 (elf32_arm_output_plt_map_1): Likewise.
1750
e8b09b87
CL
17512018-04-25 Christophe Lyon <christophe.lyon@st.com>
1752 Mickaël Guêné <mickael.guene@st.com>
1753
1754 * elf32-arm.c (struct fdpic_local): New.
1755 (elf_arm_obj_tdata): Add local_fdpic_cnts field.
1756 (elf32_arm_local_fdpic_cnts): New.
1757 (struct fdpic_global): New.
1758 (elf32_arm_link_hash_entry): Add fdpic_cnts field.
1759 (elf32_arm_link_hash_table): Add srofixup field.
1760 (arm_elf_add_rofixup): New.
1761 (arm_elf_fill_funcdesc): New.
1762 (elf32_arm_link_hash_newfunc): Handle fdpic_cnts.
1763 (elf32_arm_allocate_local_sym_info): Likewise.
1764 (create_got_section): Create .rofixup section.
1765 (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts.
1766 (bfd_elf32_arm_set_target_params): Handle FDPIC.
1767 (elf32_arm_final_link_relocate): Likewise.
1768 (elf32_arm_check_relocs): Likewise.
1769 (allocate_dynrelocs_for_symbol): Likewise.
1770 (elf32_arm_size_dynamic_sections): Likewise.
1771 (elf32_arm_finish_dynamic_sections): Likewise.
1772 (elf32_arm_output_arch_local_syms): Likewise.
1773 (elf32_arm_fdpic_omit_section_dynsym): New.
1774
188fd7ae
CL
17752018-04-25 Christophe Lyon <christophe.lyon@st.com>
1776 Mickaël Guêné <mickael.guene@st.com>
1777
1778 * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC)
1779 (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC)
1780 (BFD_RELOC_ARM_FUNCDESC_VALUE): New.
1781 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC,
1782 R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE.
1783 (elf32_arm_howto_from_type): Take new members of
1784 elf32_arm_howto_table_2 into account.
1785 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC,
1786 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
1787 BFD_RELOC_ARM_FUNCDESC_VALUE.
1788 * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC,
1789 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
1790 BFD_RELOC_ARM_FUNCDESC_VALUE.
1791
18a20338
CL
17922018-04-25 Christophe Lyon <christophe.lyon@st.com>
1793 Mickaël Guêné <mickael.guene@st.com>
1794
1795 * elf32-arm.c (elf32_arm_print_private_bfd_data): Support
1796 EF_ARM_PIC and ELFOSABI_ARM_FDPIC.
1797 (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC.
1798 (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC.
1799
617a5ada
CL
18002018-04-25 Christophe Lyon <christophe.lyon@st.com>
1801 Mickaël Guêné <mickael.guene@st.com>
1802
1803 * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and
1804 arm_elf32_fdpic_le_vec to targ_selvecs. Accept
1805 arm*-*-uclinuxfdpiceabi.
1806 * configure.ac: Add support for arm_elf32_fdpic_be_vec and
1807 arm_elf32_fdpic_le_vec.
1808 * configure: Regenerate.
1809 * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p.
1810 (elf32_arm_link_hash_table_create): Initialize fdpic_p.
1811 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM)
1812 (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets.
1813 (elf32_arm_fdpic_link_hash_table_create): New.
1814 * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and
1815 arm_elf32_fdpic_le_vec.
1816
d99b4b92
AM
18172018-04-25 Alan Modra <amodra@gmail.com>
1818
1819 * elf-linux-core.h: Disable gcc-8 string truncation warning.
1820 * elf.c (elfcore_write_prpsinfo): Likewise.
1821
18222018-04-25 Alan Modra <amodra@gmail.com>
2ac93be7
AM
1823
1824 * Makefile.am: Remove arm-aout and arm-coff support.
1825 * config.bfd: Likewise.
1826 * configure.ac: Likewise.
1827 * targets.c: Likewise.
1828 * aout-arm.c: Delete.
1829 * armnetbsd.c: Delete.
1830 * riscix.c: Delete.
1831 * Makefile.in: Regenerate.
1832 * configure: Regenerate.
1833 * po/SRC-POTFILES.in: Regenerate.
1834
aa4a8c2a
NC
18352018-04-24 Nick Clifton <nickc@redhat.com>
1836
db0c309f
NC
1837 PR 23113
1838 * elf.c (ignore_section_sym): Check for the output_section pointer
1839 being NULL before dereferencing it.
1840
aa4a8c2a
NC
1841 PR 23110
1842 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for
1843 a negative PE_DEBUG_DATA size before iterating over the debug data.
1844
b9f26d2e
AM
18452018-04-23 Alan Modra <amodra@gmail.com>
1846
1847 * elf-linux-core.h: Revert last change.
1848 * elf.c: Likewise.
1849
bf82069d
NC
18502018-04-23 Nick Clifton <nickc@redhat.com>
1851
1852 PR 23056
1853 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
1854 the end of the string table, and zero it.
1855
5a6312e8
AM
18562018-04-23 Alan Modra <amodra@gmail.com>
1857
1858 * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable
1859 gcc-8 string truncation warning.
1860 (swap_linux_prpsinfo32_ugid16_out): Likewise.
1861 (swap_linux_prpsinfo64_ugid32_out): Likewise.
1862 (swap_linux_prpsinfo64_ugid16_out): Likewise.
1863 * elf.c (elfcore_write_prpsinfo): Likewise.
1864
bf82069d
NC
18652018-04-23 Nick Clifton <nickc@redhat.com>
1866
1867 PR 23056
1868 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
1869 the end of the string table, and zero it.
1870
4352556b
AM
18712018-04-20 Alan Modra <amodra@gmail.com>
1872
1873 PR 22978
1874 * elf32-hppa.c (got_relocs_needed): Add extra param to special
1875 case both dtprel and tprel relocs.
1876 (allocate_dynrelocs): Adjust conditions for got relocs.
1877 (elf32_hppa_relocate_section): Likewise for local sym got relocs.
1878 Emit dynamic relocs on TLS GOT entries for shared libraries,
1879 not when pic. Omit dynamic reloc on dtprel entry when local,
1880 and on tprel entry when local and executable.
1881
f6a8b8c7
AM
18822018-04-19 Alan Modra <amodra@gmail.com>
1883
1884 PR 22537
1885 * elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1.
1886 (hppa_type_of_stub): Don't return a long branch stub for
1887 symbols other than those defined statically.
1888
8e415ce8
AM
18892018-04-19 Alan Modra <amodra@gmail.com>
1890
1891 * Makefile.am: Revert 2018-04-18 coff-mips changes.
1892 * config.bfd: Add back mips_ecoff_le_vec and mips_ecoff_be_vec
1893 to selvecs for mips targets change 2018-04-18.
1894 * configure.ac: Reinstate mips_ecoff_le_vec, mips_ecoff_be_vec
1895 and mips_ecoff_bele_vec.
1896 * targets.c: Likewise.
1897 * coff-mips.c: Resurrect.
1898 * Makefile.in: Regenerate.
1899 * configure: Regenerate.
1900 * po/SRC-POTFILES.in: Regenerate.
1901
3596d8ce
AM
19022018-04-18 Alan Modra <amodra@gmail.com>
1903
1904 * Makefile.am: Remove mips aout and coff support.
1905 * config.bfd: Likewise.
1906 * configure.ac: Likewise.
1907 * targets.c: Likewise.
1908 * coff-mips.c: Delete
1909 * mipsbsd.c: Delete
1910 * pe-mips.c: Delete
1911 * pei-mips.c: Delete
1912 * Makefile.in: Regenerate.
1913 * configure: Regenerate.
1914 * po/SRC-POTFILES.in: Regenerate.
1915
d9dd2045
L
19162018-04-17 H.J. Lu <hongjiu.lu@intel.com>
1917
1918 * elf32-i386.c (elf32_bed): Define before including
1919 "elf32-target.h".
1920 * elf64-x86-64.c (elf64_bed): Define before including
1921 "elf64-target.h".
1922 (elf32_bed): Define before including "elf32-target.h".
1923
e4e6a73d
L
19242018-04-17 H.J. Lu <hongjiu.lu@intel.com>
1925
1926 PR ld/23055
1927 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a
1928 normal input file with compatible relocation.
1929
c65c21e1
AM
19302018-04-18 Alan Modra <amodra@gmail.com>
1931
1932 * Makefile.am: Remove support for assorted i386 aout and coff targets.
1933 * config.bfd: Likewise.
1934 * configure.ac: Likewise.
1935 * doc/bfdint.texi: Likewise.
1936 * targets.c: Likewise.
1937 * freebsd.h: Delete.
1938 * i386dynix.c: Delete.
1939 * i386freebsd.c: Delete.
1940 * i386linux.c: Delete.
1941 * i386mach3.c: Delete.
1942 * i386netbsd.c: Delete.
1943 * i386os9k.c: Delete.
1944 * Makefile.in: Regenerate.
1945 * configure: Regenerate.
1946 * po/SRC-POTFILES.in: Regenerate.
1947
884d4d8a 19482018-04-17 Andrew Sadek <andrew.sadek.se@gmail.com>
3f0a5f17
ME
1949
1950 Microblaze Target: PIC data text relative
1951
1952 * bfd/reloc.c (2 new BFD relocations):
1953 BFD_RELOC_MICROBLAZE_64_TEXTPCREL &
1954 BFD_RELOC_MICROBLAZE_64_TEXTPCREL
1955 * bfd/bfd-in2.h: Regenerate
1956 * bfd/libbfd.h: Regenerate
1957 * bfd/elf32-microblaze.c (Handle new relocs): define 'HOWTO' of 3
1958 new relocs and handle them in both relocate and relax functions.
1959 (microblaze_elf_reloc_type_lookup): add mapping between for new
1960 bfd relocs.
1961 (microblaze_elf_relocate_section): Handle new relocs in case of
1962 elf relocation.
1963 (microblaze_elf_relax_section): Handle new relocs for elf relaxation.
1964
6327533b
NC
19652018-04-17 Nick Clifton <nickc@redhat.com>
1966
808346fc
NC
1967 PR 23055
1968 * aoutx.h (find_nearest_line): Check that the symbol name exists
1969 and is long enough, before attempting to see if it is for a .o
1970 file.
1971 * hash.c (bfd_hash_hash): Add an assertion that the string is not
1972 NULL.
1973 * linker.c (bfd_link_hash_lookup): Fail if the table or string are
1974 NULL.
1975 (_bfd_generic_link_add_archive_symbols): Fail if an archive entry
1976 has no name.
1977
6327533b
NC
1978 PR 23065
1979 * dwarf2.c (concat_filename): Check for a NULL table pointer.
1980
e9af4700
NC
19812018-04-16 Nick Clifton <nickc@redhat.com>
1982
1983 PR 23061
1984 * coffgen.c (coff_pointerize_aux): Check for an out of range
1985 fixup.
1986
ddb00039
AM
19872018-04-16 Alan Modra <amodra@gmail.com>
1988
1989 * Makefile.am: Remove arm-epoc-pe support.
1990 * coff-arm.c: Likewise.
1991 * config.bfd: Likewise.
1992 * configure.ac: Likewise.
1993 * targets.c: Likewise.
1994 * epoc-pe-arm.c: Delete.
1995 * epoc-pei-arm.c: Delete.
1996 * Makefile.in: Regenerate.
1997 * configure: Regenerate.
1998 * po/SRC-POTFILES.in: Regenerate.
1999
c9098af4
AM
20002018-04-16 Alan Modra <amodra@gmail.com>
2001
2002 * Makefile.am: Remove sparc-aout and sparc-coff support.
2003 * config.bfd: Likewise.
2004 * configure.ac: Likewise.
2005 * targets.c: Likewise.
2006 * aout-sparcle.c: Delete.
2007 * aoutf1.h: Delete.
2008 * cf-sparclynx.c: Delete.
2009 * coff-sparc.c: Delete.
2010 * demo64.c: Delete.
2011 * sparclinux.c: Delete.
2012 * sparclynx.c: Delete.
2013 * sparcnetbsd.c: Delete.
2014 * sunos.c: Delete.
2015 * Makefile.in: Regenerate.
2016 * configure: Regenerate.
2017 * po/SRC-POTFILES.in: Regenerate.
2018
dc12032b
AM
20192018-04-16 Alan Modra <amodra@gmail.com>
2020
2021 * Makefile.am: Remove m68k-aout and m68k-coff support.
2022 * aoutf1.h: Likewise.
2023 * aoutx.h: Likewise.
2024 * archive.c: Likewise.
2025 * bfd-in.h: Likewise.
2026 * bfd.c: Likewise.
2027 * coffcode.h: Likewise.
2028 * coffswap.h: Likewise.
2029 * config.bfd: Likewise.
2030 * configure.ac: Likewise.
2031 * configure.host: Likewise.
2032 * doc/bfd.texinfo: Likewise.
2033 * doc/bfdint.texi: Likewise.
2034 * freebsd.h: Likewise.
2035 * gen-aout.c: Likewise.
2036 * hpux-core.c: Likewise.
2037 * libaout.h: Likewise.
2038 * libbfd-in.h: Likewise.
2039 * pdp11.c: Likewise.
2040 * peicode.h: Likewise.
2041 * riscix.c: Likewise.
2042 * targets.c: Likewise.
2043 * aout0.c: Delete.
2044 * coff-apollo.c: Delete.
2045 * coff-aux.c: Delete.
2046 * coff-m68k.c: Delete.
2047 * coff-svm68k.c: Delete.
2048 * coff-u68k.c: Delete.
2049 * hosts/delta68.h: Delete.
2050 * hosts/hp300bsd.h: Delete.
2051 * hosts/m68kaux.h: Delete.
2052 * hosts/news.h: Delete.
2053 * hp300bsd.c: Delete.
2054 * hp300hpux.c: Delete.
2055 * liboasys.h: Delete.
2056 * m68k4knetbsd.c: Delete.
2057 * m68klinux.c: Delete.
2058 * m68knetbsd.c: Delete.
2059 * oasys.c: Delete.
2060 * versados.c: Delete.
2061 * Makefile.in: Regenerate.
2062 * bfd-in2.h: Regenerate.
2063 * configure: Regenerate.
2064 * libbfd.h: Regenerate.
2065 * po/SRC-POTFILES.in: Regenerate.
2066
211dc24b
AM
20672018-04-16 Alan Modra <amodra@gmail.com>
2068
2069 * Makefile.am: Remove sh5 and sh64 support.
2070 * archures.c: Likewise.
2071 * config.bfd: Likewise.
2072 * configure.ac: Likewise.
2073 * cpu-sh.c: Likewise.
2074 * elf32-sh-relocs.h: Likewise.
2075 * elf32-sh.c: Likewise.
2076 * targets.c: Likewise.
2077 * elf32-sh64-com.c: Delete.
2078 * elf32-sh64.c: Delete.
2079 * elf32-sh64.h: Delete.
2080 * elf64-sh64.c: Delete.
2081 * Makefile.in: Regenerate.
2082 * bfd-in2.h: Regenerate.
2083 * configure: Regenerate.
2084 * po/SRC-POTFILES.in: Regenerate.
2085
4db9937a
AM
20862018-04-16 Alan Modra <amodra@gmail.com>
2087
2088 * Makefile.am: Remove sh-symbianelf support.
2089 * config.bfd: Likewise.
2090 * configure.ac: Likewise.
2091 * targets.c: Likewise.
2092 * elf32-sh-symbian.c: Delete.
2093 * Makefile.in: Regenerate.
2094 * configure: Regenerate.
2095 * po/SRC-POTFILES.in: Regenerate.
2096
9f5d1593
AM
20972018-04-16 Alan Modra <amodra@gmail.com>
2098
2099 * Makefile.am: Remove vax-bsd and vax-ultrix support.
2100 * config.bfd: Likewise.
2101 * configure.ac: Likewise.
2102 * targets.c: Likewise.
2103 * vaxbsd.c: Delete.
2104 * Makefile.in: Regenerate.
2105 * configure: Regenerate.
2106 * po/SRC-POTFILES.in: Regenerate.
2107
a9a4b302
AM
21082018-04-16 Alan Modra <amodra@gmail.com>
2109
2110 * Makefile.am: Remove w65 support.
2111 * archures.c: Likewise.
2112 * coffcode.h: Likewise.
2113 * config.bfd: Likewise.
2114 * configure.ac: Likewise.
2115 * targets.c: Likewise.
2116 * coff-w65.c: Delete.
2117 * cpu-w65.c: Delete.
2118 * Makefile.in: Regenerate.
2119 * bfd-in2.h: Regenerate.
2120 * configure: Regenerate.
2121 * po/SRC-POTFILES.in: Regenerate.
2122
04cb01fd
AM
21232018-04-16 Alan Modra <amodra@gmail.com>
2124
2125 * Makefile.am: Remove we32k support.
2126 * archures.c: Likewise.
2127 * coffcode.h: Likewise.
2128 * config.bfd: Likewise.
2129 * configure.ac: Likewise.
2130 * targets.c: Likewise.
2131 * coff-we32k.c: Delete.
2132 * cpu-we32k.c: Delete.
2133 * Makefile.in: Regenerate.
2134 * bfd-in2.h: Regenerate.
2135 * configure: Regenerate.
2136 * po/SRC-POTFILES.in: Regenerate.
2137
c2bf1eec
AM
21382018-04-16 Alan Modra <amodra@gmail.com>
2139
2140 * Makefile.am: Remove m88k support.
2141 * aoutx.h: Likewise.
2142 * archures.c: Likewise.
2143 * coffcode.h: Likewise.
2144 * coffswap.h: Likewise.
2145 * config.bfd: Likewise.
2146 * configure.ac: Likewise.
2147 * cpu-ns32k.c: Likewise.
2148 * elf32-nds32.c: Likewise.
2149 * mach-o.c: Likewise.
2150 * netbsd-core.c: Likewise.
2151 * reloc.c: Likewise.
2152 * targets.c: Likewise.
2153 * coff-m88k.c: Delete.
2154 * cpu-m88k.c: Delete.
2155 * elf32-m88k.c: Delete.
2156 * hosts/m88kmach3.h: Delete.
2157 * m88kmach3.c: Delete.
2158 * m88kopenbsd.c: Delete.
2159 * Makefile.in: Regenerate.
2160 * bfd-in2.h: Regenerate.
2161 * configure: Regenerate.
2162 * po/SRC-POTFILES.in: Regenerate.
2163
6793974d
AM
21642018-04-16 Alan Modra <amodra@gmail.com>
2165
2166 * Makefile.am: Remove i370 support.
2167 * archures.c: Likewise.
2168 * config.bfd: Likewise.
2169 * configure.ac: Likewise.
2170 * targets.c: Likewise.
2171 * cpu-i370.c: Delete.
2172 * elf32-i370.c: Delete.
2173 * Makefile.in: Regenerate.
2174 * bfd-in2.h: Regenerate.
2175 * configure: Regenerate.
2176 * po/SRC-POTFILES.in: Regenerate.
2177
e82aa794
AM
21782018-04-16 Alan Modra <amodra@gmail.com>
2179
2180 * Makefile.am: Remove h8500 support.
2181 * archures.c: Likewise.
2182 * coffcode.h: Likewise.
2183 * config.bfd: Likewise.
2184 * configure.ac: Likewise.
2185 * targets.c: Likewise.
2186 * coff-h8500.c: Delete.
2187 * cpu-h8500.c: Delete.
2188 * Makefile.in: Regenerate.
2189 * bfd-in2.h: Regenerate.
2190 * configure: Regenerate.
2191 * po/SRC-POTFILES.in: Regenerate.
2192
fe0bf0fd
AM
21932018-04-16 Alan Modra <amodra@gmail.com>
2194
2195 * Makefile.am: Remove h8300-coff support.
2196 * coffcode.h: Likewise.
2197 * config.bfd: Likewise.
2198 * configure.ac: Likewise.
2199 * reloc16.c: Likewise.
2200 * targets.c: Likewise.
2201 * coff-h8300.c: Delete.
2202 * Makefile.in: Regenerate.
2203 * configure: Regenerate.
2204 * po/SRC-POTFILES.in: Regenerate.
2205
fdef3943
AM
22062018-04-16 Alan Modra <amodra@gmail.com>
2207
2208 * Makefile.am: Remove IEEE 695 support.
2209 * archures.c: Likewise.
2210 * bfd.c: Likewise.
2211 * config.bfd: Likewise.
2212 * configure.ac: Likewise.
2213 * doc/bfd.texinfo: Likewise.
2214 * doc/bfdint.texi: Likewise.
2215 * doc/bfdsumm.texi: Likewise.
2216 * section.c: Likewise.
2217 * targets.c: Likewise.
2218 * ieee.c: Delete.
2219 * libieee.h: Delete.
2220 * Makefile.in: Regenerate.
2221 * bfd-in2.h: Regenerate.
2222 * configure: Regenerate.
2223 * po/SRC-POTFILES.in: Regenerate.
2224
de96689e
AM
22252018-04-16 Alan Modra <amodra@gmail.com>
2226
2227 * config.bfd: Remove tandem support.
2228
5972ac73
AM
22292018-04-16 Alan Modra <amodra@gmail.com>
2230
2231 * Makefile.am: Remove newsos3 support.
2232 * aoutx.h: Likewise.
2233 * config.bfd: Likewise.
2234 * configure.ac: Likewise.
2235 * targets.c: Likewise.
2236 * newsos3.c: Delete.
2237 * Makefile.in: Regenerate.
2238 * configure: Regenerate.
2239 * po/SRC-POTFILES.in: Regenerate.
2240
b4b594e3
AM
22412018-04-16 Alan Modra <amodra@gmail.com>
2242
2243 * Makefile.am: Remove netware support.
2244 * bfd-in.h: Likewise.
2245 * bfd.c: Likewise.
2246 * config.bfd: Likewise.
2247 * configure.ac: Likewise.
2248 * doc/bfdint.texi: Likewise.
2249 * ecoff.c: Likewise.
2250 * targets.c: Likewise.
2251 * libnlm.h: Delete.
2252 * nlm-target.h: Delete.
2253 * nlm.c: Delete.
2254 * nlm32-alpha.c: Delete.
2255 * nlm32-i386.c: Delete.
2256 * nlm32-ppc.c: Delete.
2257 * nlm32-sparc.c: Delete.
2258 * nlm32.c: Delete.
2259 * nlm64.c: Delete.
2260 * nlmcode.h: Delete.
2261 * nlmswap.h: Delete.
2262 * Makefile.in: Regenerate.
2263 * bfd-in2.h: Regenerate.
2264 * configure: Regenerate.
2265 * po/SRC-POTFILES.in: Regenerate.
2266
fceadf09
AM
22672018-04-16 Alan Modra <amodra@gmail.com>
2268
2269 * archures.c: Remove tahoe support.
2270 * config.bfd: Likewise.
2271 * configure.ac: Likewise.
2272 * hosts/tahoe.h: Delete.
2273 * bfd-in2.h: Regenerate.
2274 * configure: Regenerate.
2275
702d1671
AM
22762018-04-14 Alan Modra <amodra@gmail.com>
2277
2278 * elf-bfd.h (struct elf_backend_data): Add relropagesize.
2279 * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and
2280 sanity test.
2281 (elfNN_bed): Init relropagesize.
2282 * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to
2283 select relropagesize.
2284 * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
2285 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
2286 (ELF_MINPAGESIZE): Don't define.
2287 * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
2288 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
2289 * bfd-in2.h: Regenerate.
2290
03aa9684
AM
22912018-04-14 Alan Modra <amodra@gmail.com>
2292
2293 * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend
2294 on __QNXTARGET__ define.
2295
24acfe5e
AM
22962018-04-14 Alan Modra <amodra@gmail.com>
2297
2298 * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss*
2299 to obsolete list.
2300
a8eb42a8
AM
23012018-04-11 Alan Modra <amodra@gmail.com>
2302
2303 * aout-adobe.c: Delete.
2304 * bout.c: Delete.
2305 * coff-i860.c: Delete.
2306 * coff-i960.c: Delete.
2307 * cpu-i860.c: Delete.
2308 * cpu-i960.c: Delete.
2309 * elf32-i860.c: Delete.
2310 * elf32-i960.c: Delete.
2311 * hosts/i860mach3.h: Delete.
2312 * Makefile.am: Remove i860, i960, bout, and adobe support.
2313 * archures.c: Remove i860 and i960 support.
2314 * coffcode.h: Likewise.
2315 * reloc.c: Likewise.
2316 * aoutx.h: Comment updates.
2317 * archive.c: Remove BOUT and i960 support.
2318 * bfd.c: Remove BOUT support.
2319 * coffswap.h: Remove i960 support.
2320 * config.bfd: Remove i860, i960 and adobe targets.
2321 * configure.ac: Remove adode, bout, i860, i960, icoff targets.
2322 * targets.c: Likewise.
2323 * ieee.c: Remove i960 support.
2324 * mach-o.c: Remove i860 support.
2325 * Makefile.in: Regenerate.
2326 * bfd-in2.h: Regenerate.
2327 * configure: Regenerate.
2328 * libbfd.h: Regenerate.
2329 * po/SRC-POTFILES.in: Regenerate.
2330
aec2e0d2
MR
23312018-04-09 Maciej W. Rozycki <macro@mips.com>
2332
2333 * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer
2334 in the BFD symbol referred by the relocation.
2335 (mips_elf64_write_rela): Likewise.
2336
9ccfa98b
MR
23372018-04-09 Maciej W. Rozycki <macro@mips.com>
2338
2339 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an
2340 error for out-of-range `r_sym' values.
2341
3e04d765
AM
23422018-04-09 Alan Modra <amodra@gmail.com>
2343
2344 * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field.
2345 (struct ppc_link_hash_table): Add can_convert_all_inline_plt.
2346 (ppc64_elf_check_relocs): Set has_pltcall.
2347 (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries.
2348 (ppc64_elf_inline_plt): New function.
2349 (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals.
2350 * elf64-ppc.h (ppc64_elf_inline_plt): Declare.
2351 * elf32-ppc.c (has_pltcall): Define.
2352 (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt.
2353 (ppc_elf_check_relocs): Set has_pltcall.
2354 (ppc_elf_inline_plt): New function.
2355 (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries.
2356 (ppc_elf_size_dynamic_sections): Likewise.
2357 * elf32-ppc.h (ppc_elf_inline_plt): Declare.
2358
23cedd1d
AM
23592018-04-09 Alan Modra <amodra@gmail.com>
2360
2361 * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos.
2362 (is_plt_seq_reloc): New function.
2363 (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs.
2364 (ppc_elf_tls_optimize): Handle inline plt call sequence.
2365 (ppc_elf_relax_section): Handle PLTCALL reloc.
2366 (ppc_elf_relocate_section): Nop out inline plt call sequence when
2367 resolving locally.
2368 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and
2369 R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE.
2370 (has_tls_get_addr_call): Correct comment.
2371 (is_branch_reloc): Add PLTCALL.
2372 (is_plt_seq_reloc): New function.
2373 (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set
2374 has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt
2375 entry for R_PPC64_PLTCALL.
2376 (ppc64_elf_tls_optimize): Handle inline plt call sequence.
2377 (ppc_type_of_stub): Handle PLTCALL reloc.
2378 (toc_adjusting_stub_needed): Likewise.
2379 (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL
2380 reloc insn. Nop out inline plt call sequence when resolving
2381 locally. Handle __tls_get_addr inline plt call optimization.
2382
2d7ad24e
AM
23832018-04-09 Alan Modra <amodra@gmail.com>
2384
2385 * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define.
2386 (struct ppc_stub_hash_entry): Add symtype field.
2387 (PLT_KEEP): Define.
2388 (struct ppc_link_hash_table): Add pltlocal and relpltlocal.
2389 (create_linkage_sections): Create pltlocal and relpltlocal.
2390 (ppc64_elf_check_relocs): Allow PLT relocs on local symbols.
2391 Set PLT_KEEP.
2392 (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
2393 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
2394 (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
2395 Keep PLT entries for inline calls against locals.
2396 (ppc_build_one_stub): Use pltlocal as appropriate.
2397 (ppc_size_one_stub): Likewise.
2398 (ppc64_elf_size_stubs): Set symtype.
2399 (build_global_entry_stubs_and_plt): Init pltlocal and write
2400 relpltlocal for globals.
2401 (write_plt_relocs_for_local_syms): Likewise for local syms.
2402 (ppc64_elf_relocate_section): Support PLT for local syms.
2403 * elf32-ppc.c (PLT_KEEP): Define.
2404 (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal.
2405 (ppc_elf_create_glink): Create pltlocal and relpltlocal.
2406 (ppc_elf_check_relocs): Allow PLT relocs on local symbols.
2407 Set PLT_KEEP. Adjust update_local_sym_info call.
2408 (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
2409 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
2410 (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
2411 (ppc_elf_relocate_section): Support PLT16 relocs for local syms.
2412 (write_global_sym_plt): Init pltlocal and write relpltlocal.
2413 (ppc_finish_symbols): Likewise for locals.
2414
49c09209
AM
24152018-04-09 Alan Modra <amodra@gmail.com>
2416
2417 * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs
2418 for local symbols to..
2419 (write_plt_relocs_for_local_syms): ..here. New function.
2420 (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for
2421 global symbols to..
2422 (build_global_entry_stubs_and_plt): ..here. Rename from
2423 build_global_entry_stubs.
2424 (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt.
2425 Call write_plt_relocs_for_local_syms.
2426 * elf32-ppc.c (get_sym_h): New function.
2427 (ppc_elf_relax_section): Use get_sym_h.
2428 (ppc_elf_relocate_section): Move output of PLT relocs and glink
2429 stubs for local symbols to..
2430 (ppc_finish_symbols): ..here. New function.
2431 (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for
2432 global syms to..
2433 (write_global_sym_plt): ..here. New function.
2434 * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute.
2435 (ppc_finish_symbols): Declare.
2436
08be3224
AM
24372018-04-09 Alan Modra <amodra@gmail.com>
2438
2439 * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs.
2440 (ppc_elf_relocate_section): Likewise.
2441 * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS.
2442 (ppc64_elf_relocate_section): Likewise. Correct PLT16
2443 resolution to plt entry relative to toc pointer.
2444
37da22e5
AM
24452018-04-09 Alan Modra <amodra@gmail.com>
2446
2447 * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
2448 TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout
2449 file when other TLS flags are tested in a mask.
2450 (TLS_MARK, NON_GOT): Define.
2451 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
2452 (update_local_sym_info): Don't create got entry when NON_GOT.
2453 (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
2454 Set TLS_MARK.
2455 (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK.
2456 (ppc64_elf_relocate_section): Likewise.
2457 (ppc64_elf_tls_optimize): Don't attempt to optimize indirect
2458 __tls_get_addr calls lacking a marker reloc.
2459 * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
2460 TLS_TPRELGD): Renumber. Update comment.
2461 (TLS_MARK, NON_GOT): Define.
2462 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
2463 (update_local_sym_info): Don't create got entry when NON_GOT.
2464 (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
2465 Set TLS_MARK.
2466 (ppc_elf_tls_optimize): Don't attempt to optimize indirect
2467 __tls_get_addr calls lacking a marker reloc.
2468
a6fd92b0
L
24692018-04-06 H.J. Lu <hongjiu.lu@intel.com>
2470
2471 * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out
2472 R_X86_64_converted_reloc_bit.
2473
3cba8b6c
L
24742018-04-05 H.J. Lu <hongjiu.lu@intel.com>
2475
2476 PR gas/22318
2477 * configure: Regenerated.
2478
0e8452bb
AM
24792018-04-05 Alan Modra <amodra@gmail.com>
2480
2481 * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
2482 (elf_hppa_info_to_howto_rel): Likewise.
2483
8ee55178
MR
24842018-04-04 Maciej W. Rozycki <macro@mips.com>
2485
2486 * elf-hppa.h (elf_hppa_info_to_howto): Also return
2487 unsuccessfully for unimplemented relocations.
2488 (elf_hppa_info_to_howto_rel): Likewise.
2489
5d7c8b80
MR
24902018-04-04 Maciej W. Rozycki <macro@mips.com>
2491
2492 * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the
2493 `bfd_error_bad_value' error and call `_bfd_error_handler' on a
2494 howto lookup failure.
2495 (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call
2496 accordingly.
2497 (elf32_i860_info_to_howto_rela): Likewise.
2498 (elf32_i860_relocate_splitn): Likewise.
2499 (elf32_i860_relocate_pc16): Likewise.
2500 (elf32_i860_relocate_pc26): Likewise.
2501 (elf32_i860_relocate_section): Likewise.
2502
707bad1b
MR
25032018-04-04 Maciej W. Rozycki <macro@mips.com>
2504
2505 * elf32-visium.c (visium_info_to_howto_rela): Correct the range
2506 check for `visium_elf_howto_table' table access.
2507
0cc919dc
MR
25082018-04-04 Maciej W. Rozycki <macro@mips.com>
2509
2510 * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range
2511 check for `iq2000_elf_howto_table' table access.
2512
f428698e
MR
25132018-04-04 Maciej W. Rozycki <macro@mips.com>
2514
2515 * elf32-frv.c (frv_info_to_howto_rela): Correct the range check
2516 for `elf32_frv_howto_table' table access.
2517
7ed6f92a
MR
25182018-04-04 Maciej W. Rozycki <macro@mips.com>
2519
2520 * elf32-mips.c (mips_elf32_rtype_to_howto): Also return
2521 unsuccessfully for placeholder howtos.
2522 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
2523 * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise.
2524
75def2ab
MR
25252018-03-29 Maciej W. Rozycki <macro@mips.com>
2526
2527 * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
2528 `_bfd_error_handler' and to set the `bfd_error_bad_value' error.
2529
8b6a949a
MR
25302018-03-28 Maciej W. Rozycki <macro@mips.com>
2531
2532 * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove
2533 ATTRIBUTE_UNUSED from `abfd'.
2534
d81270c3
MR
25352018-03-28 Maciej W. Rozycki <macro@mips.com>
2536
2537 * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct
2538 `_bfd_error_handler' call formatting.
2539
60dceb8d 25402018-03-28 Maciej W. Rozycki <macro@mips.com>
8205a328
MR
2541
2542 * elf32-mips.c (mips_info_to_howto_rel): Call
2543 `mips_elf32_rtype_to_howto' directly rather than via
2544 `->elf_backend_mips_rtype_to_howto'.
2545
e04ef022
RL
25462018-03-28 Renlin Li <renlin.li@arm.com>
2547
2548 PR ld/22970
2549 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
2550 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
2551 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
2552 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
2553 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
2554 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
2555 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
2556 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
2557 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
2558 (elfNN_aarch64_final_link_relocate): Support new relocations.
2559 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
2560 relocations.
2561 (_bfd_aarch64_elf_resolve_relocation): Support new relocations.
2562
84f1b9fb
RL
25632018-03-28 Renlin Li <renlin.li@arm.com>
2564
2565 PR ld/22970
2566 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12
2567 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
2568 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
2569 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
2570 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
2571 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
2572 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
2573 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
2574 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
2575 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
2576 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for
2577 TLSLE_LDST16_TPREL_LO12,
2578 TLSLE_LDST16_TPREL_LO12_NC,
2579 TLSLE_LDST32_TPREL_LO12,
2580 TLSLE_LDST32_TPREL_LO12_NC,
2581 TLSLE_LDST64_TPREL_LO12,
2582 TLSLE_LDST64_TPREL_LO12_NC,
2583 TLSLE_LDST8_TPREL_LO12,
2584 TLSLE_LDST8_TPREL_LO12_NC.
2585 * bfd-in2.h: Regenerated.
2586 * libbfd.h: Regenerated.
2587
f8745e1c
EB
25882018-03-28 Eric Botcazou <ebotcazou@adacore.com>
2589
2590 PR ld/22972
2591 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
2592 has_old_style_got_reloc.
2593 (_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
2594 relocations. Fix a couple of long lines.
2595 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
2596 a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style
2597 GOT relocations.
2598
bf54968b
L
25992018-03-25 H.J. Lu <hongjiu.lu@intel.com>
2600
2601 PR ld/23000
2602 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
2603 ENDBR64 to the TLSDESC PLT entry.
2604
0ccf57bd
AM
26052018-03-21 Alan Modra <amodra@gmail.com>
2606
2607 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting
2608 symbols. Use size_t counts. Delete redundant opd test.
2609
4bad6366
AM
26102018-03-21 Alan Modra <amodra@gmail.com>
2611
2612 * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
2613
bac3c8c5
AM
26142018-03-21 Alan Modra <amodra@gmail.com>
2615
2616 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask
2617 field unsigned.
2618 (update_local_sym_info): Likewise for local_got_tls_masks.
2619 (ppc_elf_tls_optimize): Likewise for lgot_masks.
2620
6a3858a6
AM
26212018-03-21 Alan Modra <amodra@gmail.com>
2622
2623 * elf64-ppc.c (ppc_size_one_stub): Fix comment typo.
2624 (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we
2625 do in size_dynamic_sections.
2626
675e2809
AM
26272018-03-21 Alan Modra <amodra@gmail.com>
2628
2629 * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1]
2630 without first checking array bounds.
2631 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2632
416c34d6
L
26332018-03-20 H.J. Lu <hongjiu.lu@intel.com>
2634
2635 PR ld/22983
2636 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
2637 non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
2638
315aa1cf
NC
26392018-03-19 Nick Clifton <nickc@redhat.com>
2640
2641 * po/es.po: Updated Spanish translation.
2642
0854d504
MF
26432018-03-15 Max Filippov <jcmvbkbc@gmail.com>
2644
2645 * elf32-xtensa.c (xlate_map_entry): Change types of address
2646 fields from 'unsigned' to 'bfd_vma'.
2647 (xlate_offset_with_removed_text): Use struct xlate_map_entry as
2648 the key argument to bsearch. Allow offsets past the end of a
2649 section, use the last map entry for translation of such offsets.
2650
f9671640
KLC
26512018-03-15 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2652
2653 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
2654 Not support the target feature.
2655 (nds32_elf_ex9_itb_base): Likewise.
2656 (nds32_elf_ex9_import_table): Likewise.
2657 (nds32_elf_ex9_finish): Likewise.
2658 (nds32_elf_ex9_reloc_jmp): Likewise.
2659 (nds32_elf_get_insn_with_reg): Likewise.
2660 (nds32_get_local_syms): Likewise.
2661 (nds32_elf_ex9_replace_instruction): Likewise.
2662 (nds32_elf_ifc_calc): Likewise.
2663 (nds32_elf_ifc_finish): Likewise.
2664 (nds32_elf_ifc_replace): Likewise.
2665 (nds32_elf_ifc_reloc): Likewise.
2666
7dda8d3c
AM
26672018-03-14 Alan Modra <amodra@gmail.com>
2668
2669 * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
2670 sfpr size added before defining alias symbols.
2671 (ppc64_elf_build_stubs): Add stub section padding before
2672 copying sfpr contents and defining save/restore alias symbols.
2673
9e223787
L
26742018-03-14 H.J. Lu <hongjiu.lu@intel.com>
2675
2676 PR ld/20882
2677 * elflink.c (elf_gc_mark_debug_section): Also check the local
2678 debug definition section.
2679
3e33b239
NC
26802018-03-13 Nick Clifton <nickc@redhat.com>
2681
2682 PR 22113
2683 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
2684 function. Add an end address parameter. Check access of the data
2685 pointer to make sure that they do not extend beyond the end
2686 address. Return FALSE if any check fails. Add the end address
2687 pointer to the ui structure.
2688 (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
2689 codes to make sure that they do not extend beyond the end address
2690 pointer. Print an error message and return immediately if any
2691 check fails.
2692
f657f8c4
NC
26932018-03-09 Nick Clifton <nickc@redhat.com>
2694
2695 * elf64-s390.c (elf_s390_relocate_section): Move check for
2696 relocations against non-allocated sections to before the code that
2697 handles ifunc relocations.
2698 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2699 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
2700 relocs against IFUNC symbols in non-allocated sections as relocs
2701 against FUNC symbols.
2702 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2703
347a8774
L
27042018-03-08 H.J. Lu <hongjiu.lu@intel.com>
2705
2706 PR ld/22929
2707 * elf32-i386.c (elf_i386_relocate_section): Treat relocation
2708 against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
2709 relocation against FUNC symbol.
2710 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2711
0c1ded8d
RL
27122018-03-07 Renlin Li <renlin.li@arm.com>
2713
2714 PR ld/20402
2715 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
2716 symbol, and don't emit relocation in specific case.
2717
0118219e
AM
27182018-03-07 Alan Modra <amodra@gmail.com>
2719
2720 * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
2721 (mips_elf64_slurp_one_reloc_table): Pass on error.
2722
dfb93f11
JC
27232018-03-03 James Cowgill <james.cowgill@mips.com>
2724 Maciej W. Rozycki <macro@mips.com>
2725
2726 PR ld/21900
2727 * elfxx-mips.c (mips_elf_calculate_relocation): Only return
2728 after calling `undefined_symbol' hook if this is an error
2729 condition. Assume the value of 0 for the symbol requested
2730 otherwise.
2731
9a2ebffd
JW
27322018-03-02 Jim Wilson <jimw@sifive.com>
2733
2734 PR 22903
2735 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
2736 and nop instead of 4.
2737 (elfNN_arch64_build_stubs): Add nop after branch. Increase size by
2738 8 instead of 4.
2739
788af978
JW
27402018-03-01 Jim Wilson <jimw@sifive.com>
2741
2742 PR 22756
2743 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
2744 else if instead of if.
2745
5224fa03
AM
27462018-03-01 Alan Modra <amodra@gmail.com>
2747
2748 * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
2749
116acb2c
AM
27502018-02-28 Alan Modra <amodra@gmail.com>
2751
2752 PR 22887
2753 * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
2754
eef10466
NC
27552018-02-28 Nick Clifton <nickc@redhat.com>
2756
12c96342
NC
2757 PR 22895
2758 PR 22893
2759 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
2760 pointer. Drop unused abfd parameter. Check the size of the block
2761 before initialising the data field. Return the end pointer if the
2762 size is invalid.
2763 (read_attribute_value): Adjust invocations of read_n_bytes.
2764
eef10466
NC
2765 PR 22894
2766 * dwarf1.c (parse_die): Check the length of form blocks before
2767 advancing the data pointer.
2768
0d329c0a
AM
27692018-02-28 Alan Modra <amodra@gmail.com>
2770
2771 PR 22887
2772 * aoutx.h (translate_symbol_table): Print an error message and set
2773 bfd_error on finding an invalid name string offset.
2774
f6aec96d
L
27752018-02-27 H.J. Lu <hongjiu.lu@intel.com>
2776
2777 * config.in: Regenerated.
2778 * configure: Likewise.
2779 * configure.ac: Add --enable-separate-code.
2780 (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default
2781 to 1 for Linux/x86 targets,
2782 * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
2783 DEFAULT_LD_Z_SEPARATE_CODE is 1.
2784
f3185997
NC
27852018-02-27 Nick Clifton <nickc@redhat.com>
2786
e8f5af78
NC
2787 * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
2788 message.
2789 * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
2790 * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
2791 * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
2792 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
2793 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
2794 * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
2795 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
2796 * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
2797 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
2798
f3185997
NC
2799 PR 22875
2800 * elf-bfd.h (struct elf_backend_data): Change the return type of
2801 the elf_info_to_howto and elf_info_to_howto_rel function pointers
2802 to bfd_boolean.
2803 * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
2804 value from the info_to_howto function and fail if that function
2805 failed.
2806 * elf32-h8300.c (elf32_h8_relocate_section): Check return value
2807 from the info_to_howto function.
2808 (elf32_h8_relax_section): Likewise.
2809 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
2810 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
2811 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
2812 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2813 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2814 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
2815 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
2816 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
2817 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
2818 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2819 (riscv_elf_relocate_section): Likewise.
2820 * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
2821 bfd_boolean. Issue an error message, set an error value and
2822 return FALSE if the reloc is not recognized.
2823 (elf_hppa_info_to_howto_rel): Likewise.
2824 * elf-m10200.c (mn10200_info_to_howto): Likewise.
2825 * elf-m10300.c (mn10300_info_to_howto): Likewise.
2826 * elf.c (_bfd_elf_no_info_to_howto): Likewise.
2827 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
2828 * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
2829 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
2830 * elf32-bfin.c (bfin_info_to_howto): Likewise.
2831 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
2832 * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
2833 * elf32-cris.c (elf_cr16c_info_to_howto_rel)
2834 (cris_info_to_howto_rela): Likewise.
2835 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
2836 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
2837 * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
2838 Likewise.
2839 * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
2840 (elf32_dlx_info_to_howto_rel): Likewise.
2841 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
2842 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
2843 * elf32-frv.c (frv_info_to_howto_rela)
2844 (frvfdpic_info_to_howto_rel): Likewise.
2845 * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
2846 * elf32-gen.c (elf_generic_info_to_howto)
2847 (elf_generic_info_to_howto_rel): Likewise.
2848 * elf32-h8300.c (elf32_h8_info_to_howto)
2849 (elf32_h8_info_to_howto_rel): Likewise.
2850 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
2851 * elf32-i386.c (elf_i386_reloc_type_lookup)
2852 (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
2853 * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
2854 Likewise.
2855 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
2856 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
2857 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
2858 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
2859 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
2860 * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
2861 Likewise.
2862 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
2863 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
2864 * elf32-m68k.c (rtype_to_howto): Likewise.
2865 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
2866 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
2867 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
2868 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
2869 * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
2870 Likewise.
2871 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
2872 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
2873 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
2874 * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
2875 Likewise.
2876 * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
2877 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
2878 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
2879 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
2880 * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
2881 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
2882 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
2883 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
2884 * elf32-score.c (s3_bfd_score_info_to_howto)
2885 (_bfd_score_info_to_howto): Likewise.
2886 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
2887 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
2888 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
2889 * elf32-tic6x.c (elf32_tic6x_info_to_howto)
2890 (elf32_tic6x_info_to_howto_rel): Likewise.
2891 * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
2892 * elf32-v850.c (v850_elf_info_to_howto_rel)
2893 (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
2894 * elf32-vax.c (rtype_to_howto): Likewise.
2895 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
2896 * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
2897 (elf32_wasm32_info_to_howto_rela): Likewise.
2898 * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
2899 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
2900 * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
2901 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
2902 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
2903 * elf64-gen.c (elf_generic_info_to_howto)
2904 (elf_generic_info_to_howto_rel): Likewise.
2905 * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
2906 * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
2907 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
2908 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
2909 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
2910 * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
2911 Likewise.
2912 * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
2913 * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
2914 Likewise.
2915 * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
2916 * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
2917 * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
2918 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
2919 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
2920 * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
2921 * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
2922 * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
2923 * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
2924 * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
2925 Default to NULL.
2926
1f4bace8
JW
29272018-02-26 Jim Wilson <jimw@sifive.com>
2928 Stephan Schreiber <info@fs-driver.org>
2929
2930 PR 15904
2931 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
2932 call, set changed_contents and changed_relocs. Likewise after
2933 successful ia64_elf_relax_br call.
2934
6838f2be
AM
29352018-02-26 Alan Modra <amodra@gmail.com>
2936
2937 * elf.c (assign_file_positions_except_relocs): Don't segfault
2938 when actual number of phdrs is less than allocated. Delete
2939 outdated comment. Formatting.
2940
38f14ab8
AM
29412018-02-26 Alan Modra <amodra@gmail.com>
2942
2943 * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
2944 * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
2945 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
2946 * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
2947 * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
2948 * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
2949 * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
2950 * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
2951 * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
2952 * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
2953 error/warning messages.
2954
6e05870c
AM
29552018-02-26 Alan Modra <amodra@gmail.com>
2956
2957 * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
2958 * syms.c: Standardize error/warning messages.
2959
59d08d6c
AM
29602018-02-26 Alan Modra <amodra@gmail.com>
2961
2962 * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
2963 * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
2964 * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
2965 * peXXigen.c, * peicode.h: Standardize error/warning messages.
2966
90b6238f
AM
29672018-02-26 Alan Modra <amodra@gmail.com>
2968
2969 * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
2970
2c1c9679
AM
29712018-02-26 Alan Modra <amodra@gmail.com>
2972
2973 * elfxx-mips.c: Standardize error/warning messages.
2974
9793eb77
AM
29752018-02-26 Alan Modra <amodra@gmail.com>
2976
2977 * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
2978 * elflink.c: Standardize error/warning messages. Replace use of
2979 linker callback einfo with _bfd_error_handler when possible.
2980
0aa13fee
AM
29812018-02-26 Alan Modra <amodra@gmail.com>
2982
2983 * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
2984 * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
2985 * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
2986 * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
2987 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
2988 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
2989 * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
2990 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
2991 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
2992 * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
2993 * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
2994 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
2995 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
2996 * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
2997 * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
2998 * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
2999 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
3000 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
3001 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
3002 * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
3003 * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
3004 unrecognized/unsupported reloc message.
3005
cf97bcb0
AM
30062018-02-26 Alan Modra <amodra@gmail.com>
3007
3008 * elf32-ppc.c: Standardize error/warning messages. Use
3009 _bfd_error_handler rather than einfo when einfo features not used.
3010 * elf64-ppc.c: Likewise.
3011
01f7e10c
AM
30122018-02-23 Alan Modra <amodra@gmail.com>
3013
3014 PR 22881
3015 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
3016 segment if no matching LOAD segment.
3017
e859f655
KLC
30182018-02-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3019
3020 * elf32-nds32.h: Define mask for ict_model.
3021
6e8d06db
JD
30222018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
3023
3024 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
3025
b248d650
MR
30262018-02-19 Maciej W. Rozycki <macro@mips.com>
3027
3028 Revert
3029 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
3030
3031 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
3032 .reginfo section has wrong size.
3033
6798f8bf
MR
30342018-02-19 Maciej W. Rozycki <macro@mips.com>
3035
3036 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
3037 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
3038 `.MIPS.abiflags' sections.
3039 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
3040 section's end.
3041
8772de11
MR
30422018-02-19 Maciej W. Rozycki <macro@mips.com>
3043
3044 * section.c (SEC_FIXED_SIZE): New macro.
3045 * bfd-in2.h: Regenerate.
3046
4f7fd351
MR
30472018-02-19 Maciej W. Rozycki <macro@mips.com>
3048
3049 * section.c (SEC_HAS_GOT_REF): Remove macro.
3050 * bfd-in2.h: Regenerate.
3051
f2b740ac
AM
30522018-02-19 Alan Modra <amodra@gmail.com>
3053
3054 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
3055 arguments.
3056 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
3057 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
3058 (_bfd_riscv_relax_pc): Likewise and fix typos.
3059 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
3060 * libbfd.h: Regenerate.
3061
8979927a
AM
30622018-02-19 Alan Modra <amodra@gmail.com>
3063
3064 * dwarf2.c (read_section): Don't use 'll' format modifier.
3065 (find_abstract_instance): Likewise.
3066 * elfcore.h (elf_core_file_p): Likewise.
3067
2dcf00ce
AM
30682018-02-19 Alan Modra <amodra@gmail.com>
3069
3070 * bfd-in.h: Include inttypes.h or if not available define
3071 PRId64, PRIu64 and PRIx64.
3072 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
3073 modifier to print bfd_vma.
3074 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
3075 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
3076 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
3077 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
3078 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
3079 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
3080 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
3081 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
3082 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
3083 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
3084 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
3085 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
3086 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
3087 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
3088 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
3089 and cast input to uint64_t, and similarly for Ld and Lu.
3090 * bfd-in2.h: Regenerate.
3091
c1c8c1ef
AM
30922018-02-19 Alan Modra <amodra@gmail.com>
3093
3094 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
3095 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
3096 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
3097 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
3098 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
3099 * reloc.c: Replace use of %R and %T in format strings passed to
3100 einfo and friends by %pR and %pT.
3101
871b3ab2
AM
31022018-02-19 Alan Modra <amodra@gmail.com>
3103
3104 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
3105 of %A and %B.
3106 * aout-adobe.c: Update all messages using %A and %B.
3107 * aout-cris.c: Likewise.
3108 * aoutx.h: Likewise.
3109 * archive.c: Likewise.
3110 * binary.c: Likewise.
3111 * cache.c: Likewise.
3112 * coff-alpha.c: Likewise.
3113 * coff-arm.c: Likewise.
3114 * coff-i860.c: Likewise.
3115 * coff-mcore.c: Likewise.
3116 * coff-ppc.c: Likewise.
3117 * coff-rs6000.c: Likewise.
3118 * coff-sh.c: Likewise.
3119 * coff-tic4x.c: Likewise.
3120 * coff-tic54x.c: Likewise.
3121 * coff-tic80.c: Likewise.
3122 * coff64-rs6000.c: Likewise.
3123 * coffcode.h: Likewise.
3124 * coffgen.c: Likewise.
3125 * cofflink.c: Likewise.
3126 * coffswap.h: Likewise.
3127 * compress.c: Likewise.
3128 * cpu-arm.c: Likewise.
3129 * ecoff.c: Likewise.
3130 * elf-attrs.c: Likewise.
3131 * elf-eh-frame.c: Likewise.
3132 * elf-ifunc.c: Likewise.
3133 * elf-m10300.c: Likewise.
3134 * elf-properties.c: Likewise.
3135 * elf-s390-common.c: Likewise.
3136 * elf.c: Likewise.
3137 * elf32-arc.c: Likewise.
3138 * elf32-arm.c: Likewise.
3139 * elf32-avr.c: Likewise.
3140 * elf32-bfin.c: Likewise.
3141 * elf32-cr16.c: Likewise.
3142 * elf32-cr16c.c: Likewise.
3143 * elf32-cris.c: Likewise.
3144 * elf32-crx.c: Likewise.
3145 * elf32-d10v.c: Likewise.
3146 * elf32-d30v.c: Likewise.
3147 * elf32-epiphany.c: Likewise.
3148 * elf32-fr30.c: Likewise.
3149 * elf32-frv.c: Likewise.
3150 * elf32-gen.c: Likewise.
3151 * elf32-hppa.c: Likewise.
3152 * elf32-i370.c: Likewise.
3153 * elf32-i386.c: Likewise.
3154 * elf32-i960.c: Likewise.
3155 * elf32-ip2k.c: Likewise.
3156 * elf32-iq2000.c: Likewise.
3157 * elf32-lm32.c: Likewise.
3158 * elf32-m32c.c: Likewise.
3159 * elf32-m32r.c: Likewise.
3160 * elf32-m68hc11.c: Likewise.
3161 * elf32-m68hc12.c: Likewise.
3162 * elf32-m68hc1x.c: Likewise.
3163 * elf32-m68k.c: Likewise.
3164 * elf32-mcore.c: Likewise.
3165 * elf32-mep.c: Likewise.
3166 * elf32-metag.c: Likewise.
3167 * elf32-microblaze.c: Likewise.
3168 * elf32-moxie.c: Likewise.
3169 * elf32-msp430.c: Likewise.
3170 * elf32-mt.c: Likewise.
3171 * elf32-nds32.c: Likewise.
3172 * elf32-nios2.c: Likewise.
3173 * elf32-or1k.c: Likewise.
3174 * elf32-pj.c: Likewise.
3175 * elf32-ppc.c: Likewise.
3176 * elf32-rl78.c: Likewise.
3177 * elf32-rx.c: Likewise.
3178 * elf32-s390.c: Likewise.
3179 * elf32-score.c: Likewise.
3180 * elf32-score7.c: Likewise.
3181 * elf32-sh-symbian.c: Likewise.
3182 * elf32-sh.c: Likewise.
3183 * elf32-sh64.c: Likewise.
3184 * elf32-sparc.c: Likewise.
3185 * elf32-spu.c: Likewise.
3186 * elf32-tic6x.c: Likewise.
3187 * elf32-tilepro.c: Likewise.
3188 * elf32-v850.c: Likewise.
3189 * elf32-vax.c: Likewise.
3190 * elf32-visium.c: Likewise.
3191 * elf32-wasm32.c: Likewise.
3192 * elf32-xgate.c: Likewise.
3193 * elf32-xtensa.c: Likewise.
3194 * elf64-alpha.c: Likewise.
3195 * elf64-gen.c: Likewise.
3196 * elf64-hppa.c: Likewise.
3197 * elf64-ia64-vms.c: Likewise.
3198 * elf64-mmix.c: Likewise.
3199 * elf64-ppc.c: Likewise.
3200 * elf64-s390.c: Likewise.
3201 * elf64-sh64.c: Likewise.
3202 * elf64-sparc.c: Likewise.
3203 * elf64-x86-64.c: Likewise.
3204 * elfcode.h: Likewise.
3205 * elfcore.h: Likewise.
3206 * elflink.c: Likewise.
3207 * elfnn-aarch64.c: Likewise.
3208 * elfnn-ia64.c: Likewise.
3209 * elfnn-riscv.c: Likewise.
3210 * elfxx-mips.c: Likewise.
3211 * elfxx-sparc.c: Likewise.
3212 * elfxx-tilegx.c: Likewise.
3213 * elfxx-x86.c: Likewise.
3214 * hpux-core.c: Likewise.
3215 * ieee.c: Likewise.
3216 * ihex.c: Likewise.
3217 * libbfd.c: Likewise.
3218 * linker.c: Likewise.
3219 * mach-o.c: Likewise.
3220 * merge.c: Likewise.
3221 * mmo.c: Likewise.
3222 * oasys.c: Likewise.
3223 * pdp11.c: Likewise.
3224 * pe-mips.c: Likewise.
3225 * peXXigen.c: Likewise.
3226 * peicode.h: Likewise.
3227 * reloc.c: Likewise.
3228 * rs6000-core.c: Likewise.
3229 * srec.c: Likewise.
3230 * stabs.c: Likewise.
3231 * vms-alpha.c: Likewise.
3232 * xcofflink.c: Likewise.
3233
dbc88fc1
AM
32342018-02-19 Alan Modra <amodra@gmail.com>
3235
3236 PR 22845
3237 * elf.c (IS_TBSS): Define.
3238 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
3239 (assign_file_positions_for_non_load_sections): Revert last change.
3240 Properly calculate load segment limits to compare against relro limits.
3241
325ba6fb
AM
32422018-02-17 Alan Modra <amodra@gmail.com>
3243
3244 PR 22845
3245 * elf.c (assign_file_positions_for_non_load_sections): Ignore
3246 degenerate zero size PT_LOAD segments when finding one overlapping
3247 the PT_GNU_RELRO segment.
3248
d00dd7dc
AM
32492018-02-16 Alan Modra <amodra@gmail.com>
3250
3251 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
3252 (_bfd_bool_bfd_true): Rename from bfd_true.
3253 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
3254 (_bfd_int_bfd_0): Rename from bfd_0.
3255 (_bfd_uint_bfd_0): Rename from bfd_0u.
3256 (_bfd_long_bfd_0): Rename from bfd_0l.
3257 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
3258 (_bfd_void_bfd): Rename from bfd_void.
3259 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
3260 (_bfd_bool_bfd_link_false_error),
3261 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
3262 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
3263 (_bfd_bool_bfd_asection_bfd_asection_true),
3264 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
3265 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
3266 * archive.c (_bfd_noarchive_get_elt_at_index),
3267 (_bfd_noarchive_openr_next_archived_file),
3268 (_bfd_noarchive_construct_extended_name_table),
3269 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
3270 (_bfd_noarchive_write_armap): New functions.
3271 * archures.c (_bfd_nowrite_set_arch_mach): New function.
3272 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
3273 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
3274 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
3275 (alpha_ecoff_swap_coff_lineno_out),
3276 (alpha_ecoff_swap_coff_reloc_out): New functions.
3277 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
3278 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
3279 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
3280 (mips_ecoff_swap_coff_lineno_out),
3281 (mips_ecoff_swap_coff_reloc_out): New functions.
3282 * coffcode.h (coff_set_alignment_hook): Replace define with
3283 new function.
3284 (symname_in_debug_hook): Likewise.
3285 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
3286 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
3287 * elf.c (assign_file_positions_except_relocs): Test
3288 elf_backend_allow_non_load_phdr for NULL.
3289 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
3290 _bfd_elf_link_omit_section_dynsym. Update uses.
3291 (_bfd_elf_omit_section_dynsym_all): New function.
3292 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
3293 (_bfd_elf_omit_section_dynsym_default): Declare.
3294 (_bfd_elf_omit_section_dynsym_all): Declare.
3295 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
3296 (_bfd_nolink_bfd_get_relocated_section_contents),
3297 (_bfd_nolink_bfd_lookup_section_flags),
3298 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
3299 (_bfd_nolink_bfd_link_hash_table_create),
3300 (_bfd_nolink_bfd_link_just_syms),
3301 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
3302 (_bfd_nolink_bfd_link_split_section),
3303 (_bfd_nolink_section_already_linked),
3304 (_bfd_nolink_bfd_define_common_symbol),
3305 (_bfd_nolink_bfd_define_start_stop): New functions.
3306 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
3307 (_bfd_norelocs_bfd_reloc_name_lookup),
3308 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
3309 * section.c (_bfd_nowrite_set_section_contents): New function.
3310 * syms.c (_bfd_nosymbols_canonicalize_symtab),
3311 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
3312 (_bfd_nosymbols_get_symbol_version_string),
3313 (_bfd_nosymbols_bfd_is_local_label_name),
3314 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
3315 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
3316 (_bfd_nosymbols_bfd_make_debug_symbol),
3317 ( _bfd_nosymbols_read_minisymbols),
3318 ( _bfd_nosymbols_minisymbol_to_symbol),
3319 (_bfd_nodynamic_get_synthetic_symtab): New functions.
3320 * libbfd-in.h: Declare new functions. Update existing defines,
3321 removing casts.
3322 * aix386-core.c: Update to use new hooks. Formatting.
3323 * aout-adobe.c: Likewise.
3324 * aout-arm.c: Likewise.
3325 * aout-target.h: Likewise.
3326 * aout-tic30.c: Likewise.
3327 * aoutf1.h: Likewise.
3328 * binary.c: Likewise.
3329 * bout.c: Likewise.
3330 * cisco-core.c: Likewise.
3331 * coff-alpha.c: Likewise.
3332 * coff-i386.c: Likewise.
3333 * coff-i860.c: Likewise.
3334 * coff-i960.c: Likewise.
3335 * coff-ia64.c: Likewise.
3336 * coff-mips.c: Likewise.
3337 * coff-ppc.c: Likewise.
3338 * coff-rs6000.c: Likewise.
3339 * coff-sh.c: Likewise.
3340 * coff-tic30.c: Likewise.
3341 * coff-tic54x.c: Likewise.
3342 * coff-x86_64.c: Likewise.
3343 * coff64-rs6000.c: Likewise.
3344 * coffcode.h: Likewise.
3345 * elf-m10300.c: Likewise.
3346 * elf32-cr16.c: Likewise.
3347 * elf32-lm32.c: Likewise.
3348 * elf32-m32r.c: Likewise.
3349 * elf32-metag.c: Likewise.
3350 * elf32-score.c: Likewise.
3351 * elf32-score7.c: Likewise.
3352 * elf32-tilepro.c: Likewise.
3353 * elf32-xstormy16.c: Likewise.
3354 * elf32-xtensa.c: Likewise.
3355 * elf64-alpha.c: Likewise.
3356 * elf64-hppa.c: Likewise.
3357 * elf64-ia64-vms.c: Likewise.
3358 * elf64-mmix.c: Likewise.
3359 * elf64-sh64.c: Likewise.
3360 * elfnn-ia64.c: Likewise.
3361 * elfxx-sparc.c: Likewise.
3362 * elfxx-target.h: Likewise.
3363 * elfxx-tilegx.c: Likewise.
3364 * elfxx-x86.h: Likewise.
3365 * hp300hpux.c: Likewise.
3366 * hppabsd-core.c: Likewise.
3367 * hpux-core.c: Likewise.
3368 * i386msdos.c: Likewise.
3369 * i386os9k.c: Likewise.
3370 * ieee.c: Likewise.
3371 * ihex.c: Likewise.
3372 * irix-core.c: Likewise.
3373 * libaout.h: Likewise.
3374 * libecoff.h: Likewise.
3375 * mach-o-target.c: Likewise.
3376 * mach-o.c: Likewise.
3377 * mipsbsd.c: Likewise.
3378 * mmo.c: Likewise.
3379 * netbsd-core.c: Likewise.
3380 * nlm-target.h: Likewise.
3381 * oasys.c: Likewise.
3382 * osf-core.c: Likewise.
3383 * pdp11.c: Likewise.
3384 * pe-mips.c: Likewise.
3385 * pe-x86_64.c: Likewise.
3386 * pef.c: Likewise.
3387 * plugin.c: Likewise.
3388 * ppcboot.c: Likewise.
3389 * ptrace-core.c: Likewise.
3390 * sco5-core.c: Likewise.
3391 * som.c: Likewise.
3392 * sparclynx.c: Likewise.
3393 * srec.c: Likewise.
3394 * tekhex.c: Likewise.
3395 * trad-core.c: Likewise.
3396 * verilog.c: Likewise.
3397 * versados.c: Likewise.
3398 * vms-alpha.c: Likewise.
3399 * vms-lib.c: Likewise.
3400 * wasm-module.c: Likewise.
3401 * xsym.c: Likewise.
3402 * libbfd.h: Regenerate.
3403
2a0d9853
JW
34042018-02-15 Jim Wilson <jimw@sifive.com>
3405
09ca4b9d
JW
3406 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
3407 symbols whose section address is zero.
3408
2a0d9853
JW
3409 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
3410 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
3411 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
3412 Add %X%P to error messages.
3413
e513bd38
EB
34142018-02-15 Eric Botcazou <ebotcazou@adacore.com>
3415
3416 PR ld/22832
3417 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
3418 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
3419 and assert that the result of the call is not NULL.
3420
12ef3f5a
NC
34212018-02-14 Nick Clifton <nickc@redhat.com>
3422
3423 PR 22823
3424 Revert previous delta. Add extra casts to avoid compile time
3425 warnings instead.
3426 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
3427 cast to avoid warning from gcc v8 compiler.
3428 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
3429 (_bfd_generic_bfd_set_private_flags): Likewise.
3430 (_bfd_generic_bfd_copy_private_section_data): Likewise.
3431 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
3432 (_bfd_generic_bfd_copy_private_header_data): Likewise.
3433 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
3434 (_bfd_noarchive_construct_extended_name_table): Likewise.
3435 (_bfd_noarchive_truncate_arname): Likewise.
3436 (_bfd_noarchive_write_ar_hdr): Likewise.
3437 (_bfd_noarchive_get_elt_at_index): Likewise.
3438 (_bfd_nosymbols_canonicalize_symtab): Likewise.
3439 (_bfd_nosymbols_print_symbol): Likewise.
3440 (_bfd_nosymbols_get_symbol_info): Likewise.
3441 (_bfd_nosymbols_get_symbol_version_string): Likewise.
3442 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
3443 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
3444 (_bfd_nosymbols_get_lineno): Likewise.
3445 (_bfd_nosymbols_find_nearest_line): Likewise.
3446 (_bfd_nosymbols_find_line): Likewise.
3447 (_bfd_nosymbols_find_inliner_info): Likewise.
3448 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
3449 (_bfd_nosymbols_read_minisymbols): Likewise.
3450 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
3451 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
3452 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
3453 (_bfd_nowrite_set_arch_mach): Likewise.
3454 (_bfd_nowrite_set_section_contents): Likewise.
3455 (_bfd_nolink_sizeof_headers): Likewise.
3456 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
3457 (_bfd_nolink_bfd_relax_section): Likewise.
3458 (_bfd_nolink_bfd_gc_sections): Likewise.
3459 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
3460 (_bfd_nolink_bfd_merge_sections): Likewise.
3461 (_bfd_nolink_bfd_is_group_section): Likewise.
3462 (_bfd_nolink_bfd_discard_group): Likewise.
3463 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
3464 (_bfd_nolink_bfd_link_add_symbols): Likewise.
3465 (_bfd_nolink_bfd_link_just_syms): Likewise.
3466 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
3467 (_bfd_nolink_bfd_final_link): Likewise.
3468 (_bfd_nolink_bfd_link_split_section): Likewise.
3469 (_bfd_nolink_section_already_linked): Likewise.
3470 (_bfd_nolink_bfd_define_common_symbol): Likewise.
3471 (_bfd_nolink_bfd_define_start_stop): Likewise.
3472 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
3473 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
3474 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
3475 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
3476 * libbfd.c (bfd_false_any): Delete.
3477 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
3478 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
3479 * libbfd.h (extern): Regenerate
3480 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
3481 cast to avoid warning from gcc v8 compiler.
3482 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
3483 * binary.c (binary_get_symbol_info): Likewise.
3484 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
3485 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3486 * coffcode.h (coff_set_alignment_hook): Likewise.
3487 (symname_in_debug_hook): Likewise.
3488 (bfd_coff_backend_data bigobj_swap_table): Likewise.
3489 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
3490 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
3491 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
3492 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
3493 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
3494 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
3495 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
3496 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
3497 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
3498 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
3499 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
3500 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
3501 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
3502 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
3503 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
3504 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
3505 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
3506 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
3507 (bfd_elfNN_bfd_set_private_flags): Likewise.
3508 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
3509 (elf_backend_init_index_section): Likewise.
3510 (elf_backend_allow_non_load_phdr): Likewise.
3511 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
3512 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
3513 * ieee.c (ieee_construct_extended_name_table): Likewise.
3514 (ieee_write_armap): Likewise.
3515 (ieee_write_ar_hdr): Likewise.
3516 (ieee_bfd_is_target_special_symbol): Likewise.
3517 * ihex.c (ihex_canonicalize_symtab): Likewise.
3518 (ihex_bfd_is_target_special_symbol): Likewise.
3519 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
3520 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
3521 (_bfd_ecoff_set_alignment_hook): Likewise.
3522 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
3523 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
3524 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
3525 * oasys.c (oasys_construct_extended_name_table): Likewise.
3526 (oasys_write_armap): Likewise.
3527 (oasys_write_ar_hdr): Likewise.
3528 (oasys_bfd_is_target_special_symbol): Likewise.
3529 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
3530 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
3531 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
3532 * som.c (som_bfd_is_target_special_symbol): Likewise.
3533 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
3534 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
3535 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
3536 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
3537 (versados_bfd_reloc_name_lookup): Likewise.
3538 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
3539 (vms_bfd_define_start_stop): Likewise.
3540 (alpha_vms_bfd_is_target_special_symbol): Likewise.
3541 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
3542 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
3543
451875b4
L
35442018-02-14 H.J. Lu <hongjiu.lu@intel.com>
3545
3546 PR ld/22842
3547 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
3548 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
3549 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
3550 R_X86_64_PC32 reloc against dynamic function in data section.
3551 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
3552 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
3553 against dynamic function in data section.
3554 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
3555 function address only if pcrel_plt is true.
3556 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
3557 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
3558 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
3559 PC-relative relocation against a function definition in data
3560 secton in PIE. Remove the obsolete comments.
3561 (elf_x86_link_hash_table): Add pcrel_plt.
3562
1031c264
L
35632018-02-13 H.J. Lu <hongjiu.lu@intel.com>
3564
3565 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
3566 instead of bfd_link_pic, for building shared library.
3567
bd7ab16b
L
35682018-02-13 H.J. Lu <hongjiu.lu@intel.com>
3569
3570 PR gas/22791
3571 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
3572 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
3573 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
3574 against protected function in shared object.
3575
80c96350
ST
35762018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
3577
3578 PR 22828
3579 * po/ru.po: Fix typo in Russian translation.
3580
87993319
MR
35812018-02-13 Maciej W. Rozycki <macro@mips.com>
3582
3583 * wasm-module.c (wasm_scan_name_function_section): Rename
3584 `index' local variable to `idx'.
3585
68d20676
NC
35862018-02-13 Nick Clifton <nickc@redhat.com>
3587
3588 PR 22823
3589 Fix compile time warnings generated by gcc version 8.
3590 * libbfd-in.h: Remove extraneous text from prototypes.
3591 Add prototypes for bfd_false_any, bfd_true_any,
3592 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
3593 bfd_n1_any, bfd_void_any.
3594 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
3595 function.
3596 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
3597 (_bfd_generic_bfd_set_private_flags): Likewise.
3598 (_bfd_generic_bfd_copy_private_section_data): Likewise.
3599 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
3600 (_bfd_generic_bfd_copy_private_header_data): Likewise.
3601 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
3602 (_bfd_noarchive_construct_extended_name_table): Likewise.
3603 (_bfd_noarchive_truncate_arname): Likewise.
3604 (_bfd_noarchive_write_ar_hdr): Likewise.
3605 (_bfd_noarchive_get_elt_at_index): Likewise.
3606 (_bfd_nosymbols_canonicalize_symtab): Likewise.
3607 (_bfd_nosymbols_print_symbol): Likewise.
3608 (_bfd_nosymbols_get_symbol_info): Likewise.
3609 (_bfd_nosymbols_get_symbol_version_string): Likewise.
3610 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
3611 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
3612 (_bfd_nosymbols_get_lineno): Likewise.
3613 (_bfd_nosymbols_find_nearest_line): Likewise.
3614 (_bfd_nosymbols_find_line): Likewise.
3615 (_bfd_nosymbols_find_inliner_info): Likewise.
3616 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
3617 (_bfd_nosymbols_read_minisymbols): Likewise.
3618 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
3619 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
3620 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
3621 (_bfd_nowrite_set_arch_mach): Likewise.
3622 (_bfd_nowrite_set_section_contents): Likewise.
3623 (_bfd_nolink_sizeof_headers): Likewise.
3624 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
3625 (_bfd_nolink_bfd_relax_section): Likewise.
3626 (_bfd_nolink_bfd_gc_sections): Likewise.
3627 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
3628 (_bfd_nolink_bfd_merge_sections): Likewise.
3629 (_bfd_nolink_bfd_is_group_section): Likewise.
3630 (_bfd_nolink_bfd_discard_group): Likewise.
3631 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
3632 (_bfd_nolink_bfd_link_add_symbols): Likewise.
3633 (_bfd_nolink_bfd_link_just_syms): Likewise.
3634 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
3635 (_bfd_nolink_bfd_final_link): Likewise.
3636 (_bfd_nolink_bfd_link_split_section): Likewise.
3637 (_bfd_nolink_section_already_linked): Likewise.
3638 (_bfd_nolink_bfd_define_common_symbol): Likewise.
3639 (_bfd_nolink_bfd_define_start_stop): Likewise.
3640 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
3641 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
3642 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
3643 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
3644 * libbfd.c (bfd_false_any): New function. Like bfd_false but
3645 accepts one or more arguments.
3646 (bfd_true_any): Likewise.
3647 (bfd_nullvoidptr_any): Likewise.
3648 (bfd_0_any): Likewise.
3649 (bfd_0u_any): Likewise.
3650 (bfd_0l_any): Likewise.
3651 (_bfd_n1_any): Likewise.
3652 (bfd_void_any): Likewise.
3653 * libbfd.h (extern): Regenerate
3654 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
3655 based dummy function.
3656 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
3657 * binary.c (binary_get_symbol_info): Likewise.
3658 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
3659 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3660 * coffcode.h (coff_set_alignment_hook): Likewise.
3661 (symname_in_debug_hook): Likewise.
3662 (bfd_coff_backend_data bigobj_swap_table): Likewise.
3663 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
3664 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
3665 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
3666 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
3667 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
3668 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
3669 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
3670 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
3671 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
3672 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
3673 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
3674 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
3675 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
3676 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
3677 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
3678 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
3679 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
3680 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
3681 (bfd_elfNN_bfd_set_private_flags): Likewise.
3682 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
3683 (elf_backend_init_index_section): Likewise.
3684 (elf_backend_allow_non_load_phdr): Likewise.
3685 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
3686 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
3687 * ieee.c (ieee_construct_extended_name_table): Likewise.
3688 (ieee_write_armap): Likewise.
3689 (ieee_write_ar_hdr): Likewise.
3690 (ieee_bfd_is_target_special_symbol): Likewise.
3691 * ihex.c (ihex_canonicalize_symtab): Likewise.
3692 (ihex_bfd_is_target_special_symbol): Likewise.
3693 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
3694 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
3695 (_bfd_ecoff_set_alignment_hook): Likewise.
3696 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
3697 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
3698 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
3699 * oasys.c (oasys_construct_extended_name_table): Likewise.
3700 (oasys_write_armap): Likewise.
3701 (oasys_write_ar_hdr): Likewise.
3702 (oasys_bfd_is_target_special_symbol): Likewise.
3703 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
3704 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
3705 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
3706 * som.c (som_bfd_is_target_special_symbol): Likewise.
3707 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
3708 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
3709 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
3710 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
3711 (versados_bfd_reloc_name_lookup): Likewise.
3712 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
3713 (vms_bfd_define_start_stop): Likewise.
3714 (alpha_vms_bfd_is_target_special_symbol): Likewise.
3715 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
3716 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
3717 * elf32-arc.c (get_replace_function): Assign replacement function
3718 to func pointer.
3719 * elf32-i370.c (i370_noop): Update prototype.
3720
6e5e9d58
AM
37212018-02-13 Alan Modra <amodra@gmail.com>
3722
3723 PR 22836
3724 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
3725 relocation sections. If size reduces to just the flag word,
3726 remove that too and mark with SEC_EXCLUDE.
3727 * elflink.c (bfd_elf_final_link): Strip empty group sections.
3728
f2731e0c
AM
37292018-02-13 Alan Modra <amodra@gmail.com>
3730
3731 PR 22829
3732 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
3733 PT_GNU_RELRO setup.
3734
830db048
ZF
37352018-02-12 Zebediah Figura <z.figura12@gmail.com>
3736
3737 * i386msdos.c (msdos_mkobject); New function.
3738 (msdos_object_p): New function.
3739 (i386_msdos_vec): Use msdos_object_p as the check_format
3740 function.
3741 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
3742 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
3743 IMAGE_NT_SIGNATURE.
3744 * peXXigen.c: Likewise.
3745 * coff-ia64.c: Likewise.
3746
94fe5757
NC
37472018-02-12 Nick Clifton <nickc@redhat.com>
3748
3749 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
3750 assignment.
0b8683b7 3751 * elf32-arc.c (elf_arc_relocate_section): Likewise.
94fe5757 3752
d805612e 37532018-02-09 Eric Botcazou <ebotcazou@adacore.com>
a8735c82
EB
3754
3755 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
3756 (sparc_elf_append_rela): Assert that there is enough room in section.
3757 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
3758 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
3759 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
3760 For a symbol subject to a GOT relocation, reserve a slot in the
3761 relocation section if the symbol isn't dynamic and we are in PIC mode.
3762 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
3763 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
3764 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
3765 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
3766 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
3767 resolved_to_zero. Do not generate a dynamic GOT relocation for an
3768 undefined weak symbol with non-default visibility. Remove superfluous
3769 'else' and fix formatting.
3770
3b4c3844
L
37712018-02-09 H.J. Lu <hongjiu.lu@intel.com>
3772
3773 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
3774 is_solaris.
3775 (i386_elf32_sol2_vec): Don't declare.
3776 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
3777 Don't set need_global_offset_table.
3778 (elf_i386_solaris_arch_bed): New.
3779 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
3780 Solaris.
3781 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
3782 target_os != is_nacl instead of target_os == is_normal.
3783 (x86_64_elf64_sol2_vec): Don't declare.
3784 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
3785 is_nacl instead of target_os == is_normal. Don't set
3786 need_global_offset_table.
3787 (elf_x86_64_solaris_arch_bed): New.
3788 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
3789 Solaris.
3790 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
3791 _GLOBAL_OFFSET_TABLE_ for Solaris.
3792 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
3793 need_global_offset_table.
3794 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
3795 (elf_x86_link_hash_table): Remove need_global_offset_table.
3796 (elf_x86_init_table): Likewise.
3797
15b23f36
L
37982018-02-08 H.J. Lu <hongjiu.lu@intel.com>
3799
3800 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
3801 Remove prototype.
3802 (i386_elf32_sol2_vec): Declared.
3803 (elf_i386_link_setup_gnu_properties): Set
3804 need_global_offset_table with info->output_bfd->xvec.
3805 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
3806 Remove prototype.
3807 (x86_64_elf64_sol2_vec): Declared.
3808 (elf_x86_64_link_setup_gnu_properties): Set
3809 need_global_offset_table with info->output_bfd->xvec.
3810
dc11dea2
L
38112018-02-08 H.J. Lu <hongjiu.lu@intel.com>
3812
3813 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
3814 New prototype.
3815 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
3816 for Solaris.
3817 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
3818 New prototype.
3819 (elf_x86_64_link_setup_gnu_properties): Set
3820 need_global_offset_table for Solaris.
3821 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
3822 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
3823 (_bfd_x86_elf_link_setup_gnu_properties): Copy
3824 need_global_offset_table.
3825 * elfxx-x86.h (elf_x86_link_hash_table): Add
3826 need_global_offset_table.
3827 (elf_x86_init_table): Likewise.
3828
3f48fe4a
JW
38292018-02-08 Jim Wilson <jimw@sifive.com>
3830
3831 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
3832 change.
3833
ef135d43
NC
38342018-02-08 Nick Clifton <nickc@redhat.com>
3835
3836 PR 22788
3837 * elf.c (elf_parse_notes): Reject notes with excessuively large
3838 alignments.
3839
407aa07c
AM
38402018-02-07 Alan Modra <amodra@gmail.com>
3841
3842 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
3843 * elf32-ppc.c: Remove speculation barrier support.
3844 * elf32-ppc.h: Likewise.
3845 * elf64-ppc.c: Likewise.
3846 * elf64-ppc.h: Likewise.
3847
ed01220c
JW
38482018-02-06 Jim Wilson <jimw@sifive.com>
3849
3850 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
3851 callback to report an error.
3852
c20c30f6
EB
38532018-02-06 Eric Botcazou <ebotcazou@adacore.com>
3854
3855 PR ld/22263
3856 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
3857 into call to !bfd_link_executable and tidy up.
3858 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
3859 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
3860 !bfd_link_executable.
3861 <R_SPARC_TLS_IE_HI22>: Likewise.
3862 <GOT relocations>: Remove useless code, tidy and merge related blocks.
3863 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
3864 !bfd_link_executable.
3865 <R_SPARC_WPLT30>: Tidy up.
3866 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
3867 !bfd_link_executable.
3868 (allocate_dynrelocs): Likewise.
3869 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
3870 <R_SPARC_TLS_GD_HI22>: Merge into...
3871 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
3872 sparc_elf_tls_transition and remove redundant code.
3873 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
3874 !bfd_link_executable.
3875 <R_SPARC_TLS_LDO_HIX22>: Likewise.
3876 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
3877 <R_SPARC_TLS_LDM_CALL>: Likewise.
3878 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
3879 <R_SPARC_TLS_GD_ADD>: Likewise.
3880 <R_SPARC_TLS_LDM_ADD>: Likewise.
3881 <R_SPARC_TLS_LDO_ADD>: Likewise.
3882 <R_SPARC_TLS_IE_LD>: Likewise.
3883
46d09186
NC
38842018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
3885
3886 PR 22789
3887 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
3888 functions failed to find the function name, try the generic elf
3889 find function instead.
3890
8278e7ce
SDJ
38912018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
3892
3893 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
3894 'memcpy' instead of 'strncpy' when writing the magic number.
3895
64e234d4
NC
38962018-02-06 Nick Clifton <nickc@redhat.com>
3897
3898 PR 22794
3899 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
3900 section before attempting to read it in.
3901 (bfd_get_alt_debug_link_info): Likewise.
3902
422f3d3d
PC
39032018-02-06 Paul Carroll <pcarroll@codesourcery.com>
3904
3905 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
3906 line information in addition to name, if they can be found.
3907
279b2f94
RL
39082018-02-05 Renlin Li <renlin.li@arm.com>
3909
3910 PR ld/22764
3911 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
3912 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
3913 check for writeable section as well.
3914
cd048363
L
39152018-02-05 H.J. Lu <hongjiu.lu@intel.com>
3916
3917 PR ld/22782
3918 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
3919 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
3920 undefined weak symbol to 0.
3921 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
3922 if _GLOBAL_OFFSET_TABLE_ is referenced.
3923 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
3924 got_referenced instead of ref_regular_nonweak. Remove the
3925 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
3926 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
3927
e65b1a78
MR
39282018-02-05 Maciej W. Rozycki <macro@mips.com>
3929
3930 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
3931 initialize `hi_reloc'.
3932
2d6dda71
MR
39332018-02-05 Maciej W. Rozycki <macro@mips.com>
3934
3935 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
3936 SHT_MIPS_REGINFO sections don't assert the correct size and
3937 report an error instead.
3938
75506100
MR
39392018-02-05 Maciej W. Rozycki <macro@mips.com>
3940
3941 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
3942 status from `->elf_backend_section_processing'.
3943
7f02625e
JW
39442018-02-02 Jim Wilson <jimw@sifive.com>
3945
3946 PR ld/22756
3947 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
3948 If link_info->wrap_hash, check for a duplicate symbol and ignore.
3949 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
3950 Pass new argument to riscv_relax_delete_bytes.
3951 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
3952 ATTRIBUTE_UNUSED from link_info parameter.
3953
d830549d
AM
39542018-02-02 Alan Modra <amodra@gmail.com>
3955
3956 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
3957 emitted for toc sequence optimization. Set and use "howto" later.
3958
e99955cd
SM
39592018-02-01 Simon Marchi <simon.marchi@ericsson.com>
3960
3961 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
3962 arithmetic on NULL pointer.
3963 * elflink.c (_bfd_elf_archive_symbol_lookup,
3964 elf_link_add_archive_symbols): Likewise.
3965
bf3077a6
MM
39662018-01-31 Michael Matz <matz@suse.de>
3967
3968 * elflink.c (bfd_elf_define_start_stop): Fix check of
3969 def_dynamic.
3970
823143c6
L
39712018-01-31 H.J. Lu <hongjiu.lu@intel.com>
3972
3973 PR ld/21964
3974 * elflink.c (bfd_elf_define_start_stop): Check if __start and
3975 __stop symbols are referenced by shared objects.
3976
76cb3a89
AM
39772018-01-30 Alan Modra <amodra@gmail.com>
3978
3979 PR 22758
3980 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
3981 segment when demand paged with lma on the same page. Test this
3982 before load/non-load, executable/non-executable,
3983 writable/non-writable tests and simplify. Delete bogus relro
3984 condition in writable/non-writable test. Delete outdated
3985 comment. Formatting.
3986
36b8fda5
AM
39872018-01-30 Alan Modra <amodra@gmail.com>
3988
3989 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
3990 symbols dynamic.
3991
eb77f6a4
AM
39922018-01-29 Alan Modra <amodra@gmail.com>
3993
3994 PR 22741
3995 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
3996 range before converting to a symbol table pointer.
3997
7d73b4c8
NC
39982018-01-27 Nick Clifton <nickc@redhat.com>
3999
4000 * po/ru.po: Updated Russian translation.
4001
32253bb7
AM
40022018-01-26 Alan Modra <amodra@gmail.com>
4003
4004 * elflink.c (bfd_elf_define_start_stop): Override symbols when
4005 they are defined dynamically.
4006
ba21f564
AM
40072018-01-26 Alan Modra <amodra@gmail.com>
4008
4009 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
4010 .branch_lt changes size.
4011
38e64b0e
AM
40122018-01-25 Alan Modra <amodra@gmail.com>
4013
4014 PR 22746
4015 * elfcode.h (elf_object_p): Avoid integer overflow.
4016
bb363086
EB
40172018-01-25 Eric Botcazou <ebotcazou@adacore.com>
4018
4019 PR ld/22727
4020 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
4021 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
4022
4023 Revert
4024 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
4025
4026 PR ld/22263
4027 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
4028 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
4029 bfd_link_executable for TLS check.
4030 (_bfd_sparc_elf_check_relocs): Likewise.
4031 (allocate_dynrelocs): Likewise.
4032 (_bfd_sparc_elf_relocate_section): Likewise.
4033
1daf502a
RL
40342018-01-24 Renlin Li <renlin.li@arm.com>
4035
4036 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
4037 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
4038 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
4039 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
4040 BFD_RELOC_AARCH64_MOVW_PREL_G3.
4041 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
4042 (_bfd_aarch64_elf_resolve_relocation): Likewise.
4043
32247401
RL
40442018-01-24 Renlin Li <renlin.li@arm.com>
4045
4046 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
4047 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
4048 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
4049 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
4050 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
4051 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
4052 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
4053 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
4054 BFD_RELOC_AARCH64_MOVW_PREL_G3.
4055 * bfd-in2.h: Regenerate.
4056 * libbfd.h: Regenerate.
4057
1c5e4ee9
MR
40582018-01-23 Maciej W. Rozycki <macro@mips.com>
4059
4060 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
4061 `mips_elf32_section_processing' comment reference.
4062
8a1b824a
L
40632018-01-20 H.J. Lu <hongjiu.lu@intel.com>
4064
4065 PR ld/22721
4066 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
4067 versioned __tls_get_addr symbol.
4068
ee3fbc1e
NC
40692018-01-19 Nick Clifton <nickc@redhat.com>
4070
4071 * po/fr.po: Updated French translation.
4072
691d2e9a
AM
40732018-01-18 Alan Modra <amodra@gmail.com>
4074
4075 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
4076 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
4077 (ppc64_elf_build_stubs): Likewise.
4078
4bfce128
NC
40792018-01-17 Nick Clifton <nickc@redhat.com>
4080
4081 * po/ru.po: Updated Russian translation.
4082 * po/uk/po: Updated Ukranian translation.
4083
c75bc4f7
AM
40842018-01-17 Alan Modra <amodra@gmail.com>
4085
4086 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
4087
1be5d8d3
AM
40882018-01-17 Alan Modra <amodra@gmail.com>
4089
4090 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
4091 (CRSETEQ, BEQCTRM): Define.
4092 (is_nonpic_glink_stub): Don't check bctr.
4093 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
4094 (ppc_elf_relax_section): Size speculation barrier.
4095 (output_bctr): New function.
4096 (write_glink_stub): Use output_bctr.
4097 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
4098 (ppc_elf_finish_dynamic_symbol): Likewise.
4099 (ppc_elf_finish_dynamic_sections): Use output_bctr.
4100 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
4101 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
4102 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
4103 (size_global_entry_stubs): Handle speculation barrier sizing.
4104 (plt_stub_size): Likewise.
4105 (output_bctr): New function.
4106 (build_plt_stub, build_tls_get_addr_stub): Output speculation
4107 barrier.
4108 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
4109 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
4110 (build_global_entry_stubs): Output speculation barrier.
4111 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
4112 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
4113
9e390558
AM
41142018-01-17 Alan Modra <amodra@gmail.com>
4115
4116 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
4117 __tls_get_addr_opt, and alignment sizing.
4118 (TLS_GET_ADDR_GLINK_SIZE): Delete.
4119 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
4120 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
4121 or 8 insns.
4122 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
4123 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
4124 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
4125 by PLT reloc count.
4126 (write_glink_stub): Handle __tls_get_addr_opt stub.
4127 Pad out to size given by GLINK_ENTRY_SIZE.
4128 (ppc_elf_relocate_section): Adjust write_glink_stub call.
4129 (ppc_elf_finish_dynamic_symbol): Likewise.
4130 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
4131 insn array since so many need rewriting.
4132 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
4133 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
4134 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
4135 nops. Adjust all uses.
4136 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
4137 in glink_vma calculation.
4138 (struct ppc_link_hash_table): Add global_entry section pointer.
4139 (create_linkage_sections): Create separate section for global
4140 entry stubs.
4141 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
4142 (size_global_entry_stubs): Handle sizing for aligned stubs.
4143 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
4144 and don't stash end of glink branch table in rawsize.
4145 (ppc_build_one_stub): Rewrite stub size calculations.
4146 (build_global_entry_stubs): Use new section.
4147 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
4148 Build lazy link stubs out to end of section. Build global entry
4149 stubs in new section.
4150
616dcb87
NC
41512018-01-15 Nick Clifton <nickc@redhat.com>
4152
4153 * po/uk.po: Updated Ukranian translation.
4154
3957a496
NC
41552018-01-13 Nick Clifton <nickc@redhat.com>
4156
4157 * po/bfd.pot: Regenerated.
4158
769c7ea5
NC
41592018-01-13 Nick Clifton <nickc@redhat.com>
4160
4161 * version.m4: Bump version to 2.30.51
4162 * configure: Regenerate.
4163
faf766e3
NC
41642018-01-13 Nick Clifton <nickc@redhat.com>
4165
4166 2.30 branch created.
4167
564e11c9
JW
41682018-01-12 Jens Widell <jl@opera.com>
4169
4170 * elf.c (setup_group): Optimize search for group by remembering
4171 last found group and restarting search at that index.
4172 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
4173
a78eea16
AM
41742018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
4175
4176 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
4177 bfd_link_common_skip_none in switch.
4178
87e79a65
AM
41792018-01-12 Alan Modra <amodra@gmail.com>
4180
4181 PR ld/22649
4182 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
4183 references on forced local symbols.
4184
58807c48
VI
41852018-01-12 Vlad Ivanov <vlad@ivanov.email>
4186
4187 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
4188 .reginfo section has wrong size.
4189
2888249f
L
41902018-01-11 H.J. Lu <hongjiu.lu@intel.com>
4191
4192 PR ld/22393
4193 * elf.c (_bfd_elf_map_sections_to_segments): When generating
4194 separate code and read-only data LOAD segments, create a new
4195 LOAD segment if the previous section contains text and the
4196 current section doesn't or vice versa. Don't put a writable
4197 section in a read-only segment if there is a RELRO segment.
4198
d664fd41
L
41992018-01-11 H.J. Lu <hongjiu.lu@intel.com>
4200
4201 PR ld/22649
4202 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
4203 references on forced local symbols.
4204
8b6f4cd3
L
42052018-01-11 H.J. Lu <hongjiu.lu@intel.com>
4206
4207 PR ld/22677
4208 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
4209 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
4210
9c70c522 42112018-01-09 Kuan-Lin Chen <kuanlinchentw@gmail.com>
6cef73f9
KLC
4212
4213 PR 22662
4214 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
4215
ddb2bbcf
JB
42162018-01-03 John Baldwin <jhb@FreeBSD.org>
4217
4218 * elf.c (elfcore_grok_freebsd_note): Handle
4219 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
4220 NT_FREEBSD_PROCSTAT_VMMAP.
4221
219d1afa
AM
42222018-01-03 Alan Modra <amodra@gmail.com>
4223
4224 Update year range in copyright notice of all files.
4225
1e563868 4226For older changes see ChangeLog-2017
3499769a 4227\f
1e563868 4228Copyright (C) 2018 Free Software Foundation, Inc.
3499769a
AM
4229
4230Copying and distribution of this file, with or without modification,
4231are permitted in any medium without royalty provided the copyright
4232notice and this notice are preserved.
4233
4234Local Variables:
4235mode: change-log
4236left-margin: 8
4237fill-column: 74
4238version-control: never
4239End:
This page took 0.355576 seconds and 4 git commands to generate.