PR23652, Use symbols from debug bfd for _bfd_elf_find_function
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2019-11-27 Alan Modra <amodra@gmail.com>
2
3 PR 23652
4 * dwarf2.c (_bfd_dwarf2_stash_syms): New function.
5 (_bfd_dwarf2_find_nearest_line): Use it here, passing syms to
6 _bfd_elf_find_function. Call _bfd_elf_find_function in cases
7 where _bfd_elf_find_nearest_line would do so.
8 * elf.c (_bfd_elf_find_nearest_line): Omit _bfd_elf_find_function
9 for dwarf2.
10 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Similarly. Tidy.
11 * elf32-arm.c (elf32_arm_maybe_function_sym): New function.
12 (elf_backend_maybe_function_sym): Define.
13 (arm_elf_find_function, elf32_arm_find_nearest_line): Delete.
14 (bfd_elf32_find_nearest_line): Don't define.
15 * elfnn-aarch64.c (elfNN_aarch64_maybe_function_sym): New function.
16 (elf_backend_maybe_function_sym): Define.
17 (aarch64_elf_find_function, elfNN_aarch64_find_nearest_line): Delete.
18 (bfd_elfNN_find_nearest_line): Don't define.
19
20 2019-11-27 Alan Modra <amodra@gmail.com>
21
22 * elf32-sh.c (sh_reloc): Use a bfd_vma insn.
23 (sh_reloc <R_SH_IND12W>): Divide calculated relocation value
24 by two before applying to insn. Correct overflow test.
25 * coff-sh.c (sh_reloc): Likewise.
26
27 2019-11-26 Nick Clifton <nickc@redhat.com>
28
29 * elf32-sh.c (sh_elf_reloc): Use a signed_vma when checking for a
30 negative relocated value.
31 * coff-sh.c (sh_reloc): Likewise.
32
33 2019-11-25 Alan Modra <amodra@gmail.com>
34
35 * archures.c (bfd_octets_per_byte): Tail call
36 bfd_arch_mach_octets_per_byte.
37 * coff-arm.c (OCTETS_PER_BYTE): Define.
38 (coff_arm_reloc): Introduce new "octets" temp. Use OCTETS_PER_BYTE
39 with section. Correct "addr". Remove ATTRIBUTE_UNUSED.
40 * coff-i386.c (coff_i386_reloc): Similarly.
41 * coff-mips.c (mips_reflo_reloc): Similarly.
42 * coff-x86_64.c (coff_amd64_reloc): Similarly.
43 * elf32-msp430.c (OCTETS_PER_BYTE): Define.
44 (rl78_sym_diff_handler): Use OCTETS_PER_BYTE, with section.
45 * elf32-nds32.c (nds32_elf_get_relocated_section_contents): Similarly.
46 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Similarly.
47 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Similarly.
48 * elf32-s12z.c (opru18_reloc): Similarly.
49 * elf32-sh.c (sh_elf_reloc): Similarly.
50 * elf32-spu.c (spu_elf_rel9): Similarly.
51 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Similarly.
52 * elf64-ppc.c (ppc64_elf_ha_reloc, ppc64_elf_brtaken_reloc),
53 (ppc64_elf_toc64_reloc): Similarly.
54 * bfd.c (bfd_get_section_limit): Pass section to bfd_octets_per_byte.
55 * cofflink.c (_bfd_coff_link_input_bfd),
56 (_bfd_coff_reloc_link_order): Likewise.
57 * elf.c (_bfd_elf_section_offset): Likewise.
58 * elflink.c (resolve_section, bfd_elf_perform_complex_relocation),
59 (elf_link_input_bfd, elf_reloc_link_order, elf_fixup_link_order),
60 (bfd_elf_final_link): Likewise.
61 * elf.c (_bfd_elf_make_section_from_shdr): Don't strncmp twice
62 to set SEC_ELF_OCTETS.
63 * reloc.c (bfd_perform_relocation): Tidy SEC_ELF_OCTETS special case.
64 (bfd_install_relocation): Likewise.
65 (_bfd_final_link_relocate): Don't recalculate octets.
66 * syms.c (_bfd_stab_section_find_nearest_line): Introduc new
67 "octets" temp.
68 * bfd-in2.h: Regenerate.
69
70 2019-11-25 Christian Eggers <ceggers@gmx.de>
71
72 * section.c (struct bfd_section): New flag SEC_ELF_OCTETS.
73 * archures.c (bfd_octets_per_byte): New parameter sec.
74 If section is not NULL and SEC_ELF_OCTETS is set, one octet es
75 returned [ELF targets only].
76 * bfd.c (bfd_get_section_limit): Provide section parameter to
77 bfd_octets_per_byte.
78 * bfd-in2.h: regenerate.
79 * binary.c (binary_set_section_contents): Move call to
80 bfd_octets_per_byte into section loop. Provide section parameter
81 to bfd_octets_per_byte.
82 * coff-arm.c (coff_arm_reloc): Provide section parameter
83 to bfd_octets_per_byte.
84 * coff-i386.c (coff_i386_reloc): likewise.
85 * coff-mips.c (mips_reflo_reloc): likewise.
86 * coff-x86_64.c (coff_amd64_reloc): likewise.
87 * cofflink.c (_bfd_coff_link_input_bfd): likewise.
88 (_bfd_coff_reloc_link_order): likewise.
89 * elf.c (_bfd_elf_section_offset): likewise.
90 (_bfd_elf_make_section_from_shdr): likewise.
91 Set SEC_ELF_OCTETS for sections with names .gnu.build.attributes,
92 .debug*, .zdebug* and .note.gnu*.
93 * elf32-msp430.c (rl78_sym_diff_handler): Provide section parameter
94 to bfd_octets_per_byte.
95 * elf32-nds.c (nds32_elf_get_relocated_section_contents): likewise.
96 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): likewise.
97 * elf32-pru.c (pru_elf32_do_ldi32_relocate): likewise.
98 * elf32-s12z.c (opru18_reloc): likewise.
99 * elf32-sh.c (sh_elf_reloc): likewise.
100 * elf32-spu.c (spu_elf_rel9): likewise.
101 * elf32-xtensa.c (bfd_elf_xtensa_reloc): likewise
102 * elf64-ppc.c (ppc64_elf_brtaken_reloc): likewise.
103 (ppc64_elf_addr16_ha_reloc): likewise.
104 (ppc64_elf_toc64_reloc): likewise.
105 * elflink.c (bfd_elf_final_link): likewise.
106 (bfd_elf_perform_complex_relocation): likewise.
107 (elf_fixup_link_order): likewise.
108 (elf_link_input_bfd): likewise.
109 (elf_link_sort_relocs): likewise.
110 (elf_reloc_link_order): likewise.
111 (resolve_section): likewise.
112 * linker.c (_bfd_generic_reloc_link_order): likewise.
113 (bfd_generic_define_common_symbol): likewise.
114 (default_data_link_order): likewise.
115 (default_indirect_link_order): likewise.
116 * srec.c (srec_set_section_contents): likewise.
117 (srec_write_section): likewise.
118 * syms.c (_bfd_stab_section_find_nearest_line): likewise.
119 * reloc.c (_bfd_final_link_relocate): likewise.
120 (bfd_generic_get_relocated_section_contents): likewise.
121 (bfd_install_relocation): likewise.
122 For section which have SEC_ELF_OCTETS set, multiply output_base
123 and output_offset with bfd_octets_per_byte.
124 (bfd_perform_relocation): likewise.
125
126 2019-11-21 Alan Modra <amodra@gmail.com>
127
128 * elf32-arm.c (elf32_arm_size_stubs): Exclude dynamic library
129 BFDs that have not been loaded.
130
131 2019-11-19 Alan Modra <amodra@gmail.com>
132
133 PR 25197
134 * coffgen.c (coff_find_nearest_line_with_names): Check that C_FILE
135 u.syment.n_value does point at another C_FILE sym and not into
136 some auxent that happens to look like a C_FILE. Properly check
137 for integer overflow and avoid possible pointer wrap-around.
138 Simplify pr17512 checks.
139
140 2019-11-19 Alan Modra <amodra@gmail.com>
141
142 PR 25200
143 * reloc.c (bfd_default_reloc_type_lookup): Don't BFD_FAIL.
144 * elf.c (_bfd_elf_validate_reloc): Don't segfault on NULL howto.
145
146 2019-11-18 Alan Modra <amodra@gmail.com>
147
148 * elf-bfd.h (struct elf_backend_data <elf_backend_init_file_header>):
149 Rename from elf_backend_post_process_headers.
150 (_bfd_elf_post_process_headers): Delete.
151 (_bfd_elf_init_file_header): Declare.
152 * elf.c (_bfd_elf_compute_section_file_positions): Call new function
153 in place of prep_headers and elf_backend_post_process_headers.
154 (_bfd_elf_init_file_header): Renamed from prep_headers with
155 updated args and made global. Delete dead code.
156 (_bfd_elf_post_process_headers): Delete.
157 * elf32-arm.c (elf32_arm_init_file_header): Rename from
158 elf32_arm_post_process_headers and call _bfd_elf_init_file_header.
159 Return status.
160 (elf_backend_init_file_header): Define.
161 (elf_backend_post_process_headers): Don't define.
162 * elf32-i386.c (elf_i386_fbsd_init_file_header): Similarly.
163 * elf32-m68hc1x.c (elf32_m68hc11_init_file_header): Similarly.
164 * elf32-metag.c (elf_metag_init_file_header): Similarly.
165 * elf32-spu.c (spu_elf_init_file_header
166 * elf32-visium.c (visium_elf_init_file_header
167 * elf64-alpha.c (elf64_alpha_fbsd_init_file_header
168 * elf64-hppa.c (elf64_hppa_init_file_header
169 * elf64-ia64-vms.c (elf64_vms_init_file_header
170 * elfnn-aarch64.c (elfNN_aarch64_init_file_header
171 * elfnn-ia64.c (elfNN_hpux_init_file_header
172 * elfxx-mips.c (_bfd_mips_init_file_header
173 * elfxx-mips.h (_bfd_mips_post_process_headers): Delete.
174 (_bfd_mips_init_file_header): Declare.
175 (elf_backend_post_process_headers): Delete.
176 (elf_backend_init_file_header): Define.
177 * elfxx-target.h (elf_backend_post_process_headers): Delete.
178 (elf_backend_init_file_header): Define and use.
179 * elf32-m68hc12.c (elf_backend_init_file_header): Define.
180 (elf_backend_post_process_headers): Don't define.
181 * elf32-m68hc1x.h (elf32_m68hc11_post_process_headers): Delete.
182 (elf32_m68hc11_init_file_header): Declare.
183 * elf32-ppc.c (elf_backend_post_process_headers): Remove
184 unnecessary undef.
185
186 2019-11-18 Alan Modra <amodra@gmail.com>
187
188 * elf-bfd.h (struct elf_backend_data <elf_backend_modify_headers>):
189 Rename from elf_backend_modify_program_headers.
190 (_bfd_elf_modify_headers): Declare.
191 * elf.c (assign_file_positions_except_relocs): Set
192 elf_program_header_size. Always call elf_backend_modify_headers.
193 Extract code modifying file header..
194 (_bfd_elf_modify_headers): ..to here. New function.
195 * elf32-arm.c (elf_backend_modify_headers): Renamed from
196 elf_backend_modify_program_headers.
197 * elf32-i386.c: Similarly.
198 * elf64-x86-64.c: Similarly.
199 * elfxx-target.h: Similarly. Default elf_backend_modify_headers
200 to _bfd_elf_modify_headers.
201 * elf-nacl.h (nacl_modify_headers): Rename from
202 nacl_modify_program_headers.
203 * elf-nacl.c (nacl_modify_headers): Rename from
204 nacl_modify_program_headers and call _bfd_elf_modify_headers.
205 * elf32-rx.c (elf32_rx_modify_headers): Similarly.
206 * elf32-spu.c (spu_elf_modify_headers): Similarly.
207 * elfnn-ia64.c (elfNN_ia64_modify_headers): Similarly.
208 * elf32-sh.c (elf_backend_modify_program_headers): Don't undef.
209
210 2019-11-18 Alan Modra <amodra@gmail.com>
211
212 PR 25196
213 * bfd.c (bfd_error_type): Add bfd_error_sorry.
214 (bfd_errmsgs): Likewise.
215 * elf.c (rewrite_elf_program_header): Don't abort on confused
216 lma/alignment. Replace bfd_error_bad_value with bfd_error_sorry.
217 (_bfd_elf_validate_reloc): Use bfd_error_sorry.
218 (_bfd_elf_final_write_processing): Likewise.
219 * bfd-in2.h: Regenerate.
220
221 2019-11-12 Jim Wilson <jimw@sifive.com>
222
223 PR 25181
224 * elfnn-riscv.c (_bfd_riscv_relax_call): Always add max_alignment to
225 foff. If sym_sec->output_section and sec->output_section are the same
226 and not *ABS* then set max_alignment to that section's alignment.
227
228 2019-11-07 Alan Modra <amodra@gmail.com>
229
230 * cpu-cr16c.c: Delete.
231 * elf32-cr16c.c: Delete.
232 * Makefile.am,
233 * archures.c,
234 * config.bfd,
235 * configure.ac,
236 * reloc.c,
237 * targets.c: Remove cr16c support.
238 * Makefile.in,
239 * bfd-in2.h,
240 * configure,
241 * libbfd.h,
242 * po/SRC-POTFILES.in: Regenerate.
243
244 2019-11-05 Tim Rühsen <tim.ruehsen@gmx.de>
245
246 * doc/chew.c (add_to_definition): Use correct type when
247 calculating size of array reallocation.
248 (nextword): Always initialise the word return parameter.
249 (compile): Check return value of nextword().
250
251 2019-10-30 Keith Seitz <keiths@redhat.com>
252
253 * elf-bfd.h (elf_backend_data) <elf_backend_core_find_build_id>:
254 New field.
255 (_bfd_elf32_core_find_build_id, _bfd_elf64_core_find_build_id):
256 New functions.
257 (elf_read_notes): Add declaration.
258 * elf.c (elf_read_notes): Move elf-bfd.h.
259 (_bfd_elf_core_find_build_id): New function.
260 (bfd_section_from_phdr): Scan core file PT_LOAD segments for
261 build-id if none is known.
262 (elf_parse_notes): For core files, scan for notes.
263 * elfcore.h (elf_core_file_matches_executable_p): If both
264 BFDs have identical build-ids, then they match.
265 (_bfd_elf_core_find_build_id): New function.
266 * elfxx-target.h (elf_backend_core_find_build_id): Define.
267 (elfNN_bed): Add elf_backend_core_find_build_id.
268
269 2019-10-29 Andrew Eikum <aeikum@codeweavers.com>
270
271 * libcoff-in.h (struct pe_tdata): Add dos_message field.
272 * libcoff.h: Regenerate.
273 * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Copy the
274 dos_message field rather than initialising it.
275 (_bfd_XX_bfd_copy_private_bfd_data_common): Copy the dos_message
276 field.
277 * peicode.h (pe_mkobject): Initialise the dos_message field.
278 (pe_mkobject_hook): Copy the dos_message field.
279 (pe_bfd_object_p): Copy the dos_message field.
280
281 2019-10-25 Alan Modra <amodra@gmail.com>
282
283 PR 4499
284 * elf-nacl.c (nacl_modify_segment_map): Set no_sort_lma for all
285 PT_LOAD segments.
286 * elf32-spu.c (spu_elf_modify_segment_map): Likewise on overlay
287 PT_LOAD segments.
288 * elf.c (elf_sort_segments): New function.
289 (assign_file_positions_except_relocs): Use shortcuts to elfheader
290 and elf_tdata. Seek to e_phoff not sizeof_ehdr to write program
291 headers. Move PT_PHDR check..
292 (assign_file_positions_for_non_load_sections): ..and code setting
293 PT_PHDR p_vaddr and p_paddr, and code setting __ehdr_start value..
294 (assign_file_positions_for_load_sections): ..to here. Sort
295 PT_LOAD headers. Delete header_pad code. Use actual number of
296 headers rather than allocated in calculating size for program
297 headers. Don't assume program headers follow ELF file header.
298 Simplify pt_load_count code. Only set "off" for PT_LOAD or
299 PT_NOTE in cores.
300 (rewrite_elf_program_header): Set p_vaddr_offset for segments
301 that include file and program headers.
302 (copy_elf_program_header): Likewise, replacing header_size code.
303
304 2019-10-21 Alan Modra <amodra@gmail.com>
305
306 PR 452
307 * archive.c (normalize): Return file unchanged when
308 BFD_ARCHIVE_FULL_PATH.
309 (_bfd_construct_extended_name_table): Pass abfd, the output
310 bfd, to normalize.
311 (_bfd_archive_bsd44_construct_extended_name_table): Likewise.
312 * bfd.c (struct bfd): Make flags a full flagword.
313 (BFD_ARCHIVE_FULL_PATH): Define.
314 * bfd-in2.h: Regenerate.
315
316 2019-10-20 John David Anglin <danglin@gcc.gnu.org>
317
318 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Provide 8-byte
319 minimum alignment for .plt section.
320
321 2019-10-19 John David Anglin <danglin@gcc.gnu.org>
322
323 * elf32-hppa.c: Revise import stub sequences.
324 (LONG_BRANCH_STUB_SIZE): Define.
325 (LONG_BRANCH_SHARED_STUB_SIZE): Define.
326 (IMPORT_STUB_SIZE): Define.
327 (IMPORT_SHARED_STUB_SIZE): Define.
328 (EXPORT_STUB_SIZE): Define.
329 (plt_stub): Revise to not use register %r22.
330 (LDO_R1_R22): Define.
331 (LDW_R22_R21): Define.
332 (LDW_R22_R19): Define.
333 (hppa_build_one_stub): Update stub generation and use new defines.
334 (hppa_size_one_stub): Likewise.
335
336 2019-10-17 Nelson Chu <nelson.chu@sifive.com>
337
338 * elfnn-riscv.c (riscv_elf_relocate_section): Report the error message
339 that user should recompile their code with `fPIC` when linking non-pic
340 code into shared library.
341
342 * elfnn-riscv.c (riscv_elf_relocate_section): Use asprintf to extend
343 the error message if needed, and then store the result into the
344 `msg_buf`. Finally, remember to free the unused `msg_buf`. All error
345 message for the dangerous relocation should be set before we call the
346 callback function. If we miss the error message since linker runs out
347 of memory, we should set the default error message for the error.
348
349 2019-10-16 Alan Modra <amodra@gmail.com>
350
351 PR 13616
352 * cpu-powerpc.c (bfd_arch_ppc_nop_fill): New function, use it
353 for all ppc arch info.
354 * linker.c (default_data_link_order): Pass info->big_endian to
355 arch_info->fill function.
356
357 2019-10-15 Alan Modra <amodra@gmail.com>
358
359 * elf32-m68hc1x.c (reloc_warning): Add printf attribute.
360 (elf32_m68hc11_relocate_section): Don't use a variable for format
361 strings. Delete some unnecessary xgettext:c-format comments.
362
363 2019-10-15 Alan Modra <amodra@gmail.com>
364
365 PR 24955
366 * elf32-arm.c (set_cmse_veneer_addr_from_implib): Use bfd_malloc
367 rather than xmalloc.
368 * elf32-m68hc1x.c (reloc_warning): New function.
369 (elf32_m68hc11_relocate_section): Use it here. Cast bfd_vma values
370 corresponding to %lx in format strings.
371 * elf32-nds32.c (nds32_insertion_sort): Use a stack temporary.
372
373 2019-10-15 Alan Modra <amodra@gmail.com>
374
375 PR 25100
376 * elf64-ppc.c (sfpr_define): Delete dead code that triggered a warning.
377
378 2019-10-15 Alan Modra <amodra@gmail.com>
379
380 * bfd.c (bfd_check_compression_header): Check for powers of two
381 with x == (x & -x).
382
383 2019-10-14 Alan Modra <amodra@gmail.com>
384
385 * syms.c (struct indexentry): Add idx field.
386 (cmpindexentry): Final sort on idx.
387 (_bfd_stab_section_find_nearest_line): Set idx.
388
389 2019-10-14 Alan Modra <amodra@gmail.com>
390
391 * dwarf2.c (struct lookup_funcinfo): Add idx field.
392 (compare_lookup_funcinfos): Perform final sort on idx.
393 (build_lookup_funcinfo_table): Set idx.
394 (compare_sequences): Perform final sort on num_lines.
395 (build_line_info_table): Set num_lines and line_info_lookup earlier.
396 (sort_line_sequences): Set num_lines for sort.
397
398 2019-10-14 Alan Modra <amodra@gmail.com>
399
400 * elflink.c (elf_sort_symbol): Sort on type and name as well.
401 (elf_link_add_object_symbols): Style fix.
402
403 2019-10-14 Alan Modra <amodra@gmail.com>
404
405 * elf.c (_bfd_elf_map_sections_to_segments): Init target_index
406 for sections about to be sorted.
407 (assign_file_positions_for_load_sections): Likewise.
408 (elf_sort_sections): Don't bother optimising both TOEND case.
409 * elflink.c (bfd_elf_final_link): Reset target_index.
410
411 2019-10-14 Alan Modra <amodra@gmail.com>
412
413 * elflink.c (elf_get_linked_section_vma): Delete.
414 (compare_link_order): Use elf_linked_to_section and sort by lma,
415 size, and id.
416 (elf_fixup_link_order): Use size_t variables where appropriate.
417 Make use of elf_linked_to_section. Formatting. Properly align
418 sections.
419
420 2019-10-14 Alan Modra <amodra@gmail.com>
421
422 * elf-strtab.c (strrevcmp): Comment.
423 * merge.c (strrevcmp): Likewise.
424 * elf64-ppc.c (compare_symbols): Correct final pointer comparison.
425 Comment on why comparing pointers ensures a stable sort.
426 * elflink.c (struct elf_symbol): Add void* to union.
427 (elf_sort_elf_symbol): Ensure a stable sort with pointer comparison.
428 (elf_sym_name_compare): Likewise.
429 (bfd_elf_match_symbols_in_sections): Style fix.
430 (elf_link_sort_cmp1): Comment.
431
432 2019-10-14 Alan Modra <amodra@gmail.com>
433
434 PR 24955
435 * elflink.c (elf_output_implib): Don't use xmalloc. Don't ignore
436 return value of bfd_alloc2.
437 * peXXigen.c (_bfd_XXi_write_codeview_record): Don't use xmalloc.
438 * pef.c (bfd_pef_print_symbol): Likewise. Don't ignore return
439 value of bfd_get_section_contents.
440 * som.c (som_write_space_strings): Don't use xmalloc.
441 (som_write_symbol_strings): Likewise.
442
443 2019-10-11 Max Filippov <jcmvbkbc@gmail.com>
444
445 * dwarf2.c (stash_maybe_enable_info_hash_tables): Only set
446 stash->info_hash_status = STASH_INFO_HASH_ON when
447 stash_maybe_update_info_hash_tables succeeds.
448
449 2019-10-09 Alan Modra <amodra@gmail.com>
450
451 PR 25070
452 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Catch overflow of
453 total_size calculation.
454
455 2019-10-08 Alan Modra <amodra@gmail.com>
456
457 PR 25078
458 * dwarf2.c (find_abstract_instance): Delete orig_info_ptr, add
459 recur_count. Error on recur_count reaching 100 rather than
460 info_ptr matching orig_info_ptr. Adjust calls.
461
462 2019-10-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
463
464 * elf32-msp430.c (elf32_msp430_merge_mspabi_attributes): Rename to..
465 (elf32_msp430_merge_msp430_attributes): Add support for merging
466 the GNU object attribute for data region.
467
468 2019-10-07 Alan Modra <amodra@gmail.com>
469
470 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Do allocate
471 space for local got non-tls relocs when PIE.
472
473 2019-10-07 Alan Modra <amodra@gmail.com>
474
475 * elflink.c (elf_fixup_link_order): Don't attempt to find
476 an elf_section for linker created bfd sections.
477
478 2019-10-07 Alan Modra <amodra@gmail.com>
479
480 * elf32-ppc.c (ppc_elf_tls_optimize): Don't process R_PPC_TLSLD
481 with non-local symbol. Don't double count __tls_get_addr calls
482 with marker relocs.
483 * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
484
485 2019-10-07 Alan Modra <amodra@gmail.com>
486
487 * elf32-ppc.c (nomark_tls_get_addr): Rename from has_tls_get_addr_call
488 throughout.
489 * elf64-ppc.c (nomark_tls_get_addr): Likewise.
490
491 2019-10-04 Alan Modra <amodra@gmail.com>
492
493 * elf64-ppc.c (ppc64_elf_check_relocs): Move initialisation of vars.
494 (ppc64_elf_tls_optimize): Correct is_local condition.
495 (allocate_got): Don't reserve dynamic relocations for any of the
496 tls got relocs in PIEs when the symbol is local.
497 (allocate_dynrelocs): Correct validity test for local sym using
498 tlsld_got slot.
499 (ppc64_elf_size_dynamic_sections): Don't reserve dynamic relocations
500 for any of the tls got relocs in PIEs.
501 (ppc64_elf_layout_multitoc): Likewise.
502 (ppc64_elf_relocate_section): Correct validity test for local sym
503 using tlsld_got slot. Don't emit dynamic relocations for any of
504 the tls got relocs in PIEs when the symbol is local.
505 * elf32-ppc.c (ppc_elf_tls_optimize): Correct is_local condition.
506 (got_relocs_needed): Delete.
507 (allocate_dynrelocs): Correct validity test for local sym using
508 tlsld_got slot. Don't reserve dynamic relocations for any of the
509 tls got relocs in PIEs when the symbol is local.
510 (ppc_elf_size_dynamic_sections): Don't reserve dynamic relocations
511 for any of the tls got relocs in PIEs.
512 (ppc_elf_relocate_section): Correct validity test for local sym
513 using tlsld_got slot. Don't emit dynamic relocations for any of
514 the tls got relocs in PIEs when the symbol is local.
515
516 2019-10-04 Szabolcs Nagy <szabolcs.nagy@arm.com>
517
518 PR ld/22263
519 PR ld/25056
520 * elf32-arm.c (elf32_arm_tls_transition): Use bfd_link_dll instead of
521 bfd_link_pic for TLS checks.
522 (elf32_arm_final_link_relocate): Likewise.
523 (allocate_dynrelocs_for_symbol): Likewise.
524
525 2019-10-04 Szabolcs Nagy <szabolcs.nagy@arm.com>
526
527 PR ld/25062
528 * elf32-arm.c (elf32_arm_final_link_relocate): Sign extend data.
529
530 2019-09-30 Nick Alcock <nick.alcock@oracle.com>
531
532 * elf-bfd.h (bfd_section_is_ctf): New inline function.
533 * elf.c (special_sections_c): Add ".ctf".
534 (assign_file_positions_for_non_load_sections): Note that
535 compressed debugging sections etc are not assigned here. Treat
536 CTF sections like SEC_ELF_COMPRESS sections when is_linker_output:
537 sh_offset -1.
538 (assign_file_positions_except_relocs): Likewise.
539 (find_section_in_list): Note that debugging and CTF sections, as
540 well as reloc sections, are assigned later.
541 (_bfd_elf_assign_file_positions_for_non_load): CTF sections get
542 their size and contents updated.
543 (_bfd_elf_set_section_contents): Skip CTF sections: unlike
544 compressed sections, they have no uncompressed content to copy at
545 this stage.
546 * elflink.c (elf_link_swap_symbols_out): Call the examine_strtab
547 callback right before the strtab is written out.
548 (bfd_elf_final_link): Don't cache the section contents of CTF
549 sections: they are not populated yet. Call the emit_ctf callback
550 right at the end, after all the symbols and strings are flushed
551 out.
552
553 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
554
555 * elf-strtab.c (_bfd_elf_strtab_len): New.
556 (_bfd_elf_strtab_str): Likewise.
557 * bfd-elf.h: Declare them.
558
559 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
560
561 * elf-bfd.h (bfd_elf_get_str_section): Add.
562 * elf.c (bfd_elf_get_str_section): No longer static.
563
564 2019-09-26 Alan Modra <amodra@gmail.com>
565
566 PR 24262
567 * Makefile.am (AM_CPPFLAGS): Add -DLIBDIR.
568 * plugin.c (load_plugin): Search both ${libdir}/bfd-plugins and
569 ${bindir}/../lib/bfd-plugins if different.
570 * Makefile.in: Regenerate.
571
572 2019-09-23 Alan Modra <amodra@gmail.com>
573
574 * elf64-ppc.c (ppc64_elf_check_relocs): Use bfd_link_executable
575 in choosing between different actions for shared library and
576 non-shared library cases. Delete ELIMINATE_COPY_RELOCS test.
577 (dec_dynrel_count): Likewise. Account for ifunc special case.
578 (ppc64_elf_adjust_dynamic_symbol): Copy relocs are for executables,
579 not non-pic.
580 (allocate_dynrelocs): Comment fixes. Delete ELIMINATE_COPY_RELOCS
581 test.
582
583 2019-09-23 Alan Modra <amodra@gmail.com>
584
585 * Makefile.am (SOURCE_HFILES): Add many missing .h files.
586 * Makefile.in: Regenerate.
587 * po/SRC-POTFILES.in: Regenerate.
588
589 2019-09-23 Alan Modra <amodra@gmail.com>
590
591 * bfd-in.h (bfd_symbol, bfd_section_already_linked),
592 (bfd_elf_version_tree): Delete forward declarations.
593 Move other forward decls and remaining elf function decl later.
594 (bfd_section_already_linked_table_init),
595 (bfd_section_already_linked_table_free),
596 (_bfd_handle_already_linked, _bfd_nearby_section),
597 (_bfd_fix_excluded_sec_syms): Move to bfdlink.h.
598
599 2019-09-23 Alan Modra <amodra@gmail.com>
600
601 * bfd-in.h: Move ecoff function declarations..
602 * ecoff-bfd.h: ..to here, new file.
603 * ecoff.c: Include ecoff-bfd.h.
604 * ecofflink.c: Likewise.
605 * elf64-alpha.c: Likewise.
606 * elfxx-mips.c: Likewise.
607 * bfd-in2.h: Regenerate.
608
609 2019-09-23 Alan Modra <amodra@gmail.com>
610
611 * bfd-in.h (enum notice_asneeded_action): Move to bfdlink.h.
612 Move most other elf declarations..
613 * elf-bfd.h: ..to here.
614 * bfd-in2.h: Regenerate.
615
616 2019-09-23 Alan Modra <amodra@gmail.com>
617
618 * bfd-in.h: Move m68k function declaration..
619 * cpu-m68k.h: ..to here, new file..
620 * elf32-m68k.h: ..and here, new file.
621 * elf32-m68k.c: Include cpu-m68k.h and elf32-m68k.h.
622 * bfd-in2.h: Regenerate.
623
624 2019-09-23 Alan Modra <amodra@gmail.com>
625
626 * bfd-in.h: Move bfin function declaration..
627 * elf32-bfin.h: ..to here, new file.
628 * elf32-bfin.c: Include elf32-bfin.h.
629 * bfd-in2.h: Regenerate.
630
631 2019-09-23 Alan Modra <amodra@gmail.com>
632
633 * bfd-in.h: Move cr16 function declaration..
634 * elf32-cr16.h: ..to here, new file.
635 * elf32-cr16.c: Include elf32-cr16.h.
636 * bfd-in2.h: Regenerate.
637
638 2019-09-23 Alan Modra <amodra@gmail.com>
639
640 * bfd-in.h (bfd_sunos_get_needed_list),
641 (bfd_sunos_record_link_assignment),
642 (bfd_sunos_size_dynamic_sections),
643 (bfd_i386linux_size_dynamic_sections),
644 (bfd_sparclinux_size_dynamic_sections): Delete obsolete decls.
645 * bfd-in2.h: Regenerate.
646
647 2019-09-23 Alan Modra <amodra@gmail.com>
648
649 * bfd-in.h: Move xcoff function declarations..
650 * xcofflink.h: ..to here, new file.
651 * xcofflink.c: Include xcofflink.h.
652 * coff-rs6000.c (bfd_xcoff_ar_archive_set_magic): Delete unused func.
653 * bfd-in2.h: Regenerate.
654
655 2019-09-23 Alan Modra <amodra@gmail.com>
656
657 * bfd-in.h: Delete coff forward refs and move coff declaration..
658 * coff-bfd.h: ..to here.
659 * bfd-in2.h: Regenerate.
660
661 2019-09-23 Alan Modra <amodra@gmail.com>
662
663 * bfd-in.h: Move arm declaraions..
664 * cpu-arm.h: ..to here, new file..
665 * coff-arm.h: ..and here, new file..
666 * elf32-arm.h: ..and here, new file.
667 * cpu-arm.c: Include cpu-arm.h.
668 * coff-arm.c: Include cpu-arm.h and coff-arm.h.
669 * elf32-arm.c: Include cpu-arm.h and elf32-arm.h.
670 * pe-arm.c: Move function rename defines later.
671 * pe-arm-wince.c: Likewise and include sysdep.h and bfd.h early.
672 * bfd-in2.h: Regenerate.
673
674 2019-09-23 Alan Modra <amodra@gmail.com>
675
676 * bfd-in.h: Move tic6x function declaration..
677 * elf32-tic6x.h: ..to here.
678 * bfd-in2.h: Regenerate.
679
680 2019-09-23 Alan Modra <amodra@gmail.com>
681
682 * bfd-in.h: Move aarch64 declarations and defines..
683 * cpu-aarch64.h: ..to here, new file..
684 * elfxx-aarch64.h: ..and here.
685 * cpu-aarch64.c: Include cpu-aarch64.h.
686 * elfnn-aarch64.c: Likewise.
687 * bfd-in2.h: Regenerate.
688
689 2019-09-23 Alan Modra <amodra@gmail.com>
690
691 * bfd-in.h: Delete ticoff function declarations.
692 * coff-tic54x.c (bfd_ticoff_set_section_load_page),
693 (bfd_ticoff_get_section_load_page): Make static.
694 * bfd-in2.h: Regenerate.
695
696 2019-09-23 Alan Modra <amodra@gmail.com>
697
698 * bfd-in.h: Move h8300 function declaration to..
699 * cpu-h8300.h: ..here, new file.
700 * cpu-h8300.c: Include cpu-h8300.h.
701 * elf32-h8300.c: Likewise.
702 * bfd-in2.h: Regenerate.
703
704 2019-09-23 Alan Modra <amodra@gmail.com>
705
706 * bfd-in.h: Move ia64 function declarations..
707 * elfxx-ia64.h: ..to here.
708 * bfd-in2.h: Regenerate.
709
710 2019-09-23 Alan Modra <amodra@gmail.com>
711
712 * bfd-in.h: Move v850 function declarations..
713 * elf32-v850.h: ..to here, new file.
714 * elf32-v850.c: Include elf32-v850.h.
715 * bfd-in2.h: Regenerate.
716
717 2019-09-23 Alan Modra <amodra@gmail.com>
718
719 * bfd-in.h: Move mips function declaration to..
720 * elfxx-mips.h: ..here.
721 * bfd-in2.h: Regenerate.
722
723 2019-09-23 Alan Modra <amodra@gmail.com>
724
725 * bfd-in.h: Move csky function declarations to..
726 * elf32-csky.h: ..here, new file.
727 * elf32-csky.c: Include elf32-csky.h.
728 * bfd-in2.h: Regenerate.
729
730 2019-09-20 Nelson Chu <nelson.chu@sifive.com>
731
732 * elfnn-riscv.c (riscv_pcgp_hi_reloc): Add new field undefined_weak.
733 (riscv_record_pcgp_hi_reloc): New parameter undefined_weak.
734 Set undefined_weak field from it.
735 (relax_func_t): New parameter undefined_weak.
736 (_bfd_riscv_relax_call): New ignored parameter undefined_weak.
737 (_bfd_riscv_relax_tls_le): Likewise.
738 (_bfd_riscv_relax_align): Likewise.
739 (_bfd_riscv_relax_delete): Likewise.
740 (_bfd_riscv_relax_lui): New parameter undefined_weak. If true,
741 allow relaxing. For LO12* relocs, set rs1 to x0 when undefined_weak.
742 (_bfd_riscv_relax_pc): New parameter undefined_weak. For LO12* relocs,
743 set undefined_weak from hi_reloc. If true, allow relaxing. For LO12*
744 relocs, set rs1 to x0 when undefined_weak and change to non-pcrel
745 reloc.
746 (_bfd_riscv_relax_section): New local undefined_weak. Set for
747 undef weak relocs that can be relaxed. Pass to relax_func call.
748
749 2019-09-20 Alan Modra <amodra@gmail.com>
750
751 * bfd-in.h (bfd_section_name, bfd_section_size, bfd_section_vma),
752 (bfd_section_lma, bfd_section_alignment, bfd_section_flags),
753 (bfd_section_userdata, bfd_is_com_section, discarded_section),
754 (bfd_get_section_limit_octets, bfd_get_section_limit): Delete macros.
755 * bfd.c (bfd_get_section_limit_octets, bfd_get_section_limit),
756 (bfd_section_list_remove, bfd_section_list_append),
757 (bfd_section_list_prepend, bfd_section_list_insert_after),
758 (bfd_section_list_insert_before, bfd_section_removed_from_list):
759 New inline functions.
760 * section.c (bfd_is_und_section, bfd_is_abs_section),
761 (bfd_is_ind_section, bfd_is_const_section, bfd_section_list_remove),
762 (bfd_section_list_append, bfd_section_list_prepend),
763 (bfd_section_list_insert_after, bfd_section_list_insert_before),
764 (bfd_section_removed_from_list): Delete macros.
765 (bfd_section_name, bfd_section_size, bfd_section_vma),
766 (bfd_section_lma, bfd_section_alignment, bfd_section_flags),
767 (bfd_section_userdata, bfd_is_com_section, bfd_is_und_section),
768 (bfd_is_abs_section, bfd_is_ind_section, bfd_is_const_section),
769 (discarded_section): New inline functions.
770 * bfd-in2.h: Regenerate.
771
772 2019-09-20 Alan Modra <amodra@gmail.com>
773
774 * bfd-in.h (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
775 (bfd_asymbol_bfd, bfd_asymbol_flavour, bfd_set_asymbol_name): Delete.
776 * bfd.c (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
777 (bfd_asymbol_bfd, bfd_set_asymbol_name): New inline functions.
778 * targets.c (bfd_asymbol_flavour): Likewise.
779 * bfd-in2.h: Regenerate.
780
781 2019-09-20 Alan Modra <amodra@gmail.com>
782
783 * archive.c (bfd_generic_archive_p): Use bfd_set_thin_archive.
784 * bfd-in.h (bfd_get_filename, bfd_get_cacheable, bfd_get_format),
785 (bfd_get_target, bfd_get_flavour, bfd_family_coff, bfd_big_endian),
786 (bfd_little_endian, bfd_header_big_endian, bfd_header_little_endian),
787 (bfd_get_file_flags, bfd_applicable_file_flags),
788 (bfd_applicable_section_flags, bfd_has_map, bfd_is_thin_archive),
789 (bfd_valid_reloc_types, bfd_usrdata, bfd_get_start_address),
790 (bfd_get_symcount, bfd_get_outsymbols, bfd_count_sections),
791 (bfd_get_dynamic_symcount, bfd_get_symbol_leading_char): Delete.
792 * bfd/bfd.c (bfd_get_filename, bfd_get_cacheable, bfd_get_format),
793 (bfd_get_file_flags, bfd_get_start_address, bfd_get_symcount),
794 (bfd_get_dynamic_symcount, bfd_get_outsymbols, bfd_count_sections),
795 (bfd_has_map, bfd_is_thin_archive, bfd_set_thin_archive),
796 (bfd_usrdata, bfd_set_usrdata): New inline functions.
797 * targets.c (bfd_get_target, bfd_get_flavour),
798 (bfd_applicable_file_flags, bfd_family_coff, bfd_big_endian),
799 (bfd_little_endian, bfd_header_big_endian),
800 (bfd_header_little_endian, bfd_applicable_section_flags),
801 (bfd_get_symbol_leading_char): New inline functions.
802 * bfd-in2.h: Regenerate.
803
804 2019-09-20 Alan Modra <amodra@gmail.com>
805
806 * elf64-ppc.c (ppc64_glibc_dynamic_reloc): New function.
807 (ppc64_elf_relocate_section): Warn if emitting unsupported dynamic
808 relocations.
809
810 2019-09-18 Alan Modra <amodra@gmail.com>
811
812 * bfd-in.h (bfd_get_section_name, bfd_get_section_vma),
813 (bfd_get_section_lma, bfd_get_section_alignment),
814 (bfd_get_section_size, bfd_get_section_flags),
815 (bfd_get_section_userdata): Delete.
816 (bfd_section_name, bfd_section_size, bfd_section_vma),
817 (bfd_section_lma, bfd_section_alignment): Lose bfd parameter.
818 (bfd_section_flags, bfd_section_userdata): New.
819 (bfd_is_com_section): Rename parameter.
820 * section.c (bfd_set_section_userdata, bfd_set_section_vma),
821 (bfd_set_section_alignment, bfd_set_section_flags, bfd_rename_section),
822 (bfd_set_section_size): Delete bfd parameter, rename section parameter.
823 (bfd_set_section_lma): New.
824 * bfd-in2.h: Regenerate.
825 * mach-o.c (bfd_mach_o_init_section_from_mach_o): Delete bfd param,
826 update callers.
827 * aoutx.h, * bfd.c, * coff-alpha.c, * coff-arm.c, * coff-mips.c,
828 * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c,
829 * compress.c, * ecoff.c, * elf-eh-frame.c, * elf-hppa.h,
830 * elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-properties.c,
831 * elf-s390-common.c, * elf-vxworks.c, * elf.c, * elf32-arc.c,
832 * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c,
833 * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c, * elf32-csky.c,
834 * elf32-d10v.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c,
835 * elf32-ft32.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c,
836 * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c,
837 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c,
838 * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c,
839 * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c,
840 * elf32-nios2.c, * elf32-or1k.c, * elf32-ppc.c, * elf32-pru.c,
841 * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
842 * elf32-score7.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
843 * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-visium.c,
844 * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c,
845 * elf64-bpf.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c,
846 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
847 * elflink.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c,
848 * elfxx-aarch64.c, * elfxx-mips.c, * elfxx-sparc.c,
849 * elfxx-tilegx.c, * elfxx-x86.c, * i386msdos.c, * linker.c,
850 * mach-o.c, * mmo.c, * opncls.c, * pdp11.c, * pei-x86_64.c,
851 * peicode.h, * reloc.c, * section.c, * syms.c, * vms-alpha.c,
852 * xcofflink.c: Update throughout for bfd section macro and function
853 changes.
854
855 2019-09-18 Alan Modra <amodra@gmail.com>
856
857 * bfd-in.h (bfd_asymbol_section): Rename from bfd_get_section.
858 (bfd_get_output_section): Delete.
859 (bfd_asymbol_base): Delete.
860 (bfd_asymbol_section, bfd_asymbol_value, bfd_asymbol_name),
861 (bfd_asymbol_bfd, bfd_asymbol_flavour): Tidy.
862 (bfd_set_asymbol_name): New macro.
863 * bfd-in2.h: Regenerate.
864 * aout-cris.c: Update throughout to use bfd_asymbol_section.
865 * aoutx.h: Likewise.
866 * cofflink.c: Likewise.
867 * dwarf2.c: Likewise.
868 * ecoff.c: Likewise.
869 * elf.c: Likewise.
870 * elf32-arm.c: Likewise.
871 * elf32-mips.c: Likewise.
872 * elf32-score.c: Likewise.
873 * elf32-score7.c: Likewise.
874 * elfn32-mips.c: Likewise.
875 * elfnn-aarch64.c: Likewise.
876 * elfxx-mips.c: Likewise.
877 * linker.c: Likewise.
878 * pdp11.c: Likewise.
879 * elf64-mmix.c (mmix_elf_reloc): Part expand bfd_get_output_section.
880
881 2019-09-18 Simon Marchi <simon.marchi@polymtl.ca>
882
883 * Makefile.in: Re-generate.
884 * configure: Re-generate.
885 * doc/Makefile.in: Re-generate.
886
887 2019-09-18 Alan Modra <amodra@gmail.com>
888
889 * aoutx.h (slurp_symbol_table): Don't set symcount using bfd_get
890 macros.
891 * pdp11.c (slurp_symbol_table): Likewise.
892 * som.c (som_slurp_symbol_table): Likewise.
893 * coff-ppc.c (ppc_bfd_coff_final_link): Likewise.
894 * coffcode.h (coff_slurp_symbol_table): Likewise.
895 * cofflink.c (_bfd_coff_final_link): Likewise.
896 * ecoff.c (ecoff_slurp_symbolic_header): Likewise.
897 (_bfd_ecoff_slurp_symbolic_info): Likewise.
898 (_bfd_ecoff_slurp_symbol_table): Likewise.
899 (_bfd_ecoff_bfd_final_link): Likewise.
900 * elf.c (_bfd_elf_canonicalize_symtab): Likewise.
901 * elflink.c (elf_link_output_symstrtab): Likewise.
902 (bfd_elf_final_link): Likewise.
903 * peicode.h (pe_ILF_build_a_bfd): Likewise.
904 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
905 * aoutx.h (some_aout_object_p, slurp_symbol_table): Don't set
906 start_address or symcount using bfd_get macros.
907 * coffgen.c (coff_real_object_p): Likewise.
908 * pdp11.c (some_aout_object_p, slurp_symbol_table): Likewise.
909 * som.c (som_object_setup, som_slurp_symbol_table): Likewise.
910 * elfcore.h (elf_core_file_p): Don't set start_address using
911 bfd_get macro.
912 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Don't set dynsymcount
913 using bfd_get macro.
914 * bfd.c (bfd_set_file_flags): Don't set flags using bfd_get macro.
915 * linker.c (bfd_generic_link_read_symbols): Don't set outsymbols
916 or symcount using bfd_get macros.
917 (_bfd_generic_final_link, generic_add_output_symbol): Likewise.
918 * syms.c (bfd_set_symtab): Likewise.
919 * vms-alpha.c (alpha_vms_bfd_final_link): Likewise.
920 * archive.c (do_slurp_bsd_armap): Don't set has_armap using
921 bfd_has_map macro.
922 (do_slurp_coff_armap, bfd_slurp_armap): Likewise.
923 * archive64.c (_bfd_archive_64_bit_slurp_armap): Likewise.
924 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Likewise.
925 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
926 * ecoff.c (_bfd_ecoff_slurp_armap): Likewise.
927 * som.c (som_slurp_armap): Likewise.
928
929 2019-09-18 Alan Modra <amodra@gmail.com>
930
931 * archures.c (bfd_get_arch): Make param const.
932 (bfd_get_mach, bfd_arch_bits_per_byte): Likewise.
933 (bfd_arch_bits_per_address, bfd_octets_per_byte): Likewise.
934 * bfd-in2.h: Regenerate.
935
936 2019-09-18 Alan Modra <amodra@gmail.com>
937
938 * bfd-in.h (carsym.name): Make const.
939 * reloc.c (struct reloc_howto_struct.name): Likewise.
940 * targets.c (bfd_target.name): Likewise.!
941 * bfd.c (bfd_get_sign_extend_vma): Make variable const.
942 * som.c (som_bfd_fill_in_ar_symbols): Use an intermediary variable
943 when setting carsym.name.
944 * bfd-in2.h: Regenerate.
945
946 2019-09-18 Alan Modra <amodra@gmail.com>
947
948 * mach-o.c (bfd_mach_o_fat_member_init): Likewise. Replace
949 xstrdup and xmalloc with bfd_strdup and bfd_malloc. Return an
950 error status. Adjust calls.
951 * vms-lib.c (_bfd_vms_lib_get_module): Test mhd->id earlier.
952 Close bfd on failure. Replace xstrdup/bfd_alloc use with
953 bfd_malloc. Use bfd_set_filename.
954
955 2019-09-18 Alan Modra <amodra@gmail.com>
956
957 * elf64-ppc.c (must_be_dyn_reloc): Return 0 for TOC16 relocs.
958 (ppc64_elf_check_relocs): Support dynamic/copy relocs for TOC16.
959 (ppc64_elf_adjust_dynamic_symbol): Don't keep dynamic reloc when
960 needs_copy even if all relocs are in rw sections.
961 (dec_dynrel_count): Handle TOC16 relocs.
962 (ppc64_elf_relocate_section): Support dynamic relocs for TOC16.
963 (ppc64_elf_finish_dynamic_symbol): Adjust to handle needs_copy
964 semantic change.
965
966 2019-09-16 Phil Blundell <pb@pbcl.net>
967
968 * version.m4: Set version to 2.33.50.
969 * Makefile.in, configure, doc/Makefile.in: Regenerated.
970
971 2019-09-11 Tom Tromey <tom@tromey.com>
972
973 * opncls.c (bfd_set_filename): New function.
974 * bfd-in2.h: Regenerate.
975
976 2019-09-11 Alan Modra <amodra@gmail.com>
977
978 * targets.c (struct bfd_target): Add _bfd_group_name.
979 (BFD_JUMP_TABLE): Likewise.
980 * coffgen.c (bfd_coff_group_name): New function.
981 * elf.c (bfd_elf_group_name): New function.
982 * linker.c (_bfd_nolink_bfd_group_name): New function.
983 * section.c (bfd_generic_group_name): New function.
984 * elf-bfd.h (bfd_elf_group_name): Declare.
985 * libbfd-in.h (_bfd_nolink_bfd_group_name): Declare.
986 * libcoff-in.h (bfd_coff_group_name): Declare.
987 * aout-target.h (MY_bfd_group_name): Define.
988 * aout-tic30.c (MY_bfd_group_name): Define.
989 * bfd.c (bfd_group_name): Define.
990 * binary.c (binary_bfd_group_name): Define.
991 * coff-alpha.c (_bfd_ecoff_bfd_group_name): Define.
992 * coff-mips.c (_bfd_ecoff_bfd_group_name): Define.
993 * coff-rs6000.c (_bfd_xcoff_bfd_group_name): Define.
994 * coffcode.h (coff_bfd_group_name): Define.
995 * elfxx-target.h (bfd_elfNN_bfd_group_name): Define.
996 * i386msdos.c (msdos_bfd_group_name): Define.
997 * ihex.c (ihex_bfd_group_name): Define.
998 * mach-o-target.c (bfd_mach_o_bfd_group_name): Define.
999 * mmo.c (mmo_bfd_group_name): Define.
1000 * pef.c (bfd_pef_bfd_group_name): Define.
1001 * plugin.c (bfd_plugin_bfd_group_name): Define.
1002 * ppcboot.c (ppcboot_bfd_group_name): Define.
1003 * som.c (som_bfd_group_name): Define.
1004 * srec.c (srec_bfd_group_name): Define.
1005 * tekhex.c (tekhex_bfd_group_name): Define.
1006 * verilog.c (verilog_bfd_group_name): Define.
1007 * vms-alpha.c (vms_bfd_group_name, alpha_vms_bfd_group_name): Define.
1008 * xsym.c (bfd_sym_bfd_group_name): Define.
1009 * coff64-rs6000.c (rs6000_xcoff64_vec): Init new field.
1010 (rs6000_xcoff64_aix_vec): Likewise.
1011 * bfd-in2.h: Regenerate.
1012 * libbfd.h: Regenerate.
1013 * libcoff.h: Regenerate.
1014
1015 2019-09-10 Nick Clifton <nickc@redhat.com>
1016
1017 PR 24907
1018 * archures.c (bfd_arch_info_type): Add max_reloc_offset_into_insn
1019 field.
1020 (bfd_default_arch_struct): Initialise the new field.
1021 * bfd-in2.h: Regenerate.
1022 * cpu-aarch64.c: Initialise the new field.
1023 * cpu-alpha.c: Likewise.
1024 * cpu-arc.c: Likewise.
1025 * cpu-arm.c: Likewise.
1026 * cpu-avr.c: Likewise.
1027 * cpu-bfin.c: Likewise.
1028 * cpu-bpf.c: Likewise.
1029 * cpu-cr16.c: Likewise.
1030 * cpu-cr16c.c: Likewise.
1031 * cpu-cris.c: Likewise.
1032 * cpu-crx.c: Likewise.
1033 * cpu-csky.c: Likewise.
1034 * cpu-d10v.c: Likewise.
1035 * cpu-d30v.c: Likewise.
1036 * cpu-dlx.c: Likewise.
1037 * cpu-epiphany.c: Likewise.
1038 * cpu-fr30.c: Likewise.
1039 * cpu-frv.c: Likewise.
1040 * cpu-ft32.c: Likewise.
1041 * cpu-h8300.c: Likewise.
1042 * cpu-hppa.c: Likewise.
1043 * cpu-i386.c: Likewise.
1044 * cpu-ia64.c: Likewise.
1045 * cpu-iamcu.c: Likewise.
1046 * cpu-ip2k.c: Likewise.
1047 * cpu-iq2000.c: Likewise.
1048 * cpu-k1om.c: Likewise.
1049 * cpu-l1om.c: Likewise.
1050 * cpu-lm32.c: Likewise.
1051 * cpu-m10200.c: Likewise.
1052 * cpu-m10300.c: Likewise.
1053 * cpu-m32c.c: Likewise.
1054 * cpu-m32r.c: Likewise.
1055 * cpu-m68hc11.c: Likewise.
1056 * cpu-m68hc12.c: Likewise.
1057 * cpu-m68k.c: Likewise.
1058 * cpu-m9s12x.c: Likewise.
1059 * cpu-m9s12xg.c: Likewise.
1060 * cpu-mcore.c: Likewise.
1061 * cpu-mep.c: Likewise.
1062 * cpu-metag.c: Likewise.
1063 * cpu-microblaze.c: Likewise.
1064 * cpu-mips.c: Likewise.
1065 * cpu-mmix.c: Likewise.
1066 * cpu-moxie.c: Likewise.
1067 * cpu-msp430.c: Likewise.
1068 * cpu-mt.c: Likewise.
1069 * cpu-nds32.c: Likewise.
1070 * cpu-nfp.c: Likewise.
1071 * cpu-nios2.c: Likewise.
1072 * cpu-ns32k.c: Likewise.
1073 * cpu-or1k.c: Likewise.
1074 * cpu-pdp11.c: Likewise.
1075 * cpu-pj.c: Likewise.
1076 * cpu-plugin.c: Likewise.
1077 * cpu-powerpc.c: Likewise.
1078 * cpu-pru.c: Likewise.
1079 * cpu-riscv.c: Likewise.
1080 * cpu-rl78.c: Likewise.
1081 * cpu-rs6000.c: Likewise.
1082 * cpu-rx.c: Likewise.
1083 * cpu-s12z.c: Likewise.
1084 * cpu-s390.c: Likewise.
1085 * cpu-score.c: Likewise.
1086 * cpu-sh.c: Likewise.
1087 * cpu-sparc.c: Likewise.
1088 * cpu-spu.c: Likewise.
1089 * cpu-tic30.c: Likewise.
1090 * cpu-tic4x.c: Likewise.
1091 * cpu-tic54x.c: Likewise.
1092 * cpu-tic6x.c: Likewise.
1093 * cpu-tic80.c: Likewise.
1094 * cpu-tilegx.c: Likewise.
1095 * cpu-tilepro.c: Likewise.
1096 * cpu-v850.c: Likewise.
1097 * cpu-v850_rh850.c: Likewise.
1098 * cpu-vax.c: Likewise.
1099 * cpu-visium.c: Likewise.
1100 * cpu-wasm32.c: Likewise.
1101 * cpu-xc16x.c: Likewise.
1102 * cpu-xgate.c: Likewise.
1103 * cpu-xstormy16.c: Likewise.
1104 * cpu-xtensa.c: Likewise.
1105 * cpu-z80.c: Likewise.
1106 * cpu-z8k.c: Likewise.
1107
1108 2019-09-09 Phil Blundell <pb@pbcl.net>
1109
1110 binutils 2.33 branch created.
1111
1112 2019-09-06 Alan Modra <amodra@gmail.com>
1113
1114 * aout-target.h (object_p): Formatting.
1115 * bfd-in.h (bfd_get_filename): Don't cast to char*.
1116 * corefile.c (generic_core_file_matches_executable_p): Constify
1117 variables and remove cast.
1118 * bfd-in2.h: Regenerate.
1119
1120 2019-09-05 Alan Modra <amodra@gmail.com>
1121
1122 * elf64-ppc.c (ppc64_elf_check_relocs): Interpret an addend in
1123 GOT_PCREL and PLT_PCREL relocs as affecting the value stored
1124 in the GOT/PLT entry rather than affecting the offset to that
1125 GOI/PLT entry.
1126 (ppc64_elf_edit_toc, ppc64_elf_relocate_section): Likewise.
1127
1128 2019-09-05 Alan Modra <amodra@gmail.com>
1129
1130 * elf64-ppc.c (xlate_pcrel_opt): Handle prefix loads and stores
1131 in second instruction.
1132 (ppc64_elf_relocate_section): Likewise.
1133
1134 2019-09-05 Alan Modra <amodra@gmail.com>
1135
1136 PR 24955
1137 * libbfd-in.h (bfd_strdup): New inline function.
1138 * archive.c (_bfd_get_elt_at_filepos): Use bfd_strdup. Close
1139 bfd on error.
1140 * elfcode.h (_bfd_elf_bfd_from_remote_memory): Use bfd_strdup.
1141 * opncls.c (bfd_fopen): Use bfd_strdup. Close fd and stream
1142 on error.
1143 (bfd_openstreamr): Use bfd_strdup.
1144 (bfd_openr_iovec, bfd_openw, bfd_create): Likewise.
1145 * plugin.c (try_load_plugin): Use bfd_malloc.
1146 * libbfd.h: Regenerate.
1147
1148 2019-09-02 Alan Modra <amodra@gmail.com>
1149
1150 PR 11983
1151 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Free debug_filename
1152 on success. Tidy.
1153 (read_alt_indirect_string): Likewise.
1154 (read_alt_indirect_ref): Likewise.
1155
1156 2019-08-31 Jim Wilson <jimw@sifive.com>
1157
1158 PR 23825
1159 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): Add SEC_LOAD,
1160 SEC_DATA, and SEC_HAS_CONTENTS to .tdata.dyn section.
1161
1162 2019-08-30 Jim Wilson <jimw@sifive.com>
1163
1164 * elfnn-riscv.c (riscv_elf_relocate_section): For unresolvable reloc
1165 error, call bfd_set_error, set ret to FALSE, and goto out label.
1166
1167 2019-08-30 H.J. Lu <hongjiu.lu@intel.com>
1168
1169 PR ld/24951
1170 * archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS,
1171 BFD_DECOMPRESS and BFD_COMPRESS_GABI flags for thin archive.
1172
1173 2019-08-29 Alan Modra <amodra@gmail.com>
1174
1175 PR 24697
1176 * elf32-ppc.c (ppc_elf_check_relocs): Call bad_shared_reloc
1177 when !bfd_link_executable for R_PPC_EMB_SDA2I16 and
1178 R_PPC_EMB_SDA2REL. Don't call bad_shared_reloc for any other
1179 reloc.
1180
1181 2019-08-29 Alan Modra <amodra@gmail.com>
1182
1183 * elf64-ppc.c (xlate_pcrel_opt): Add poff parameter. Allow offset
1184 on second insn, return it in poff.
1185 (ppc64_elf_relocate_section): Add offset to paddi addend for
1186 PCREL_OPT.
1187
1188 2019-08-28 Jim Wilson <jimw@sifive.com>
1189
1190 * elfnn-riscv.c (_bfd_riscv_relax_lui): Add check to exclude abs
1191 section when setting max_alignment. Update comment.
1192 (_bfd_riscv_relax_pc): Likewise.
1193
1194 2019-08-29 Alan Modra <amodra@gmail.com>
1195
1196 PR 24891
1197 * bfd.c (struct bfd): Add no_element_cache.
1198 * archive.c (_bfd_get_elt_at_filepos): Don't add element to
1199 archive cache when no_element_cache.
1200 (bfd_generic_archive_p): Set no_element_cache when opening first
1201 element to check format. Close first element too.
1202 (do_slurp_bsd_armap): Don't zero ardata->cache here.
1203 * bfd-in2.h: Regenerate.
1204
1205 2019-08-24 Alan Modra <amodra@gmail.com>
1206
1207 * elf64-ppc.c (ppc64_elf_edit_toc): Exclude undefined weak
1208 symbols from GOT optimisation.
1209
1210 2019-08-23 Stafford Horne <shorne@gmail.com>
1211
1212 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Use correct value for
1213 PLT GOT entries.
1214
1215 2019-08-23 Nick Clifton <nickc@redhat.com>
1216
1217 PR 24456
1218 * elf.c (bfd_section_from_shdr): Issue an informative warning
1219 message and continue processing other sections after encountering
1220 a reloc section for a section which already has other relocs
1221 associated with it.
1222
1223 2019-08-23 Alan Modra <amodra@gmail.com>
1224
1225 PR 24933
1226 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Don't exit
1227 on error without freeing plts[] contents.
1228
1229 2019-08-22 Dennis Zhang <dennis.zhang@arm.com>
1230
1231 * cpu-arm.c: New entries for Cortex-M35P, Cortex-A77, Cortex-A76AE.
1232
1233 2019-08-22 Nick Clifton <nickc@redhat.com>
1234
1235 PR 24922
1236 * pei-x86_64.c (pex64_xdata_print_uwd_codes): Add checks before
1237 reading data from extra records.
1238
1239 2019-08-22 Tamar Christina <tamar.christina@arm.com>
1240
1241 PR ld/24601
1242 * elfnn-aarch64.c (aarch64_relocate): Handle weak TLS and undefined TLS.
1243 Also Pass input_bfd to _bfd_aarch64_elf_resolve_relocation.
1244 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use it.
1245 * elfxx-aarch64.h (_bfd_aarch64_elf_resolve_relocation): Emit warning
1246 for weak TLS.
1247
1248 2019-08-22 Alan Modra <amodra@gmail.com>
1249
1250 * elf32-arm.c (cmse_scan): Don't use ARM_GET_SYM_CMSE_SPCL,
1251 instead recognize CMSE_PREFIX in symbol name.
1252 (elf32_arm_gc_mark_extra_sections): Likewise.
1253 (elf32_arm_filter_cmse_symbols): Don't test ARM_GET_SYM_CMSE_SPCL.
1254 (elf32_arm_swap_symbol_in): Don't invoke ARM_SET_SYM_CMSE_SPCL.
1255
1256 2019-08-20 Dennis Zhang <dennis.zhang@arm.com>
1257
1258 * cpu-aarch64.c: New entries for Cortex-A34, Cortex-A65,
1259 Cortex-A77, cortex-A65AE, and Cortex-A76AE.
1260
1261 2019-08-20 Tamar Christina <tamar.christina@arm.com>
1262
1263 * elf32-arm.c (elf32_thumb2_plt_entry, elf32_arm_plt_thumb_stub,
1264 elf32_arm_stub_long_branch_v4t_thumb_thumb,
1265 elf32_arm_stub_long_branch_v4t_thumb_arm,
1266 elf32_arm_stub_short_branch_v4t_thumb_arm,
1267 elf32_arm_stub_long_branch_v4t_thumb_arm_pic,
1268 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic,
1269 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): Change nop to branch to
1270 previous instruction.
1271
1272 2019-08-19 Tom Tromey <tromey@adacore.com>
1273
1274 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Create hash table
1275 holding symbols.
1276
1277 2019-08-19 Alan Modra <amodra@gmail.com>
1278
1279 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename has_gotrel
1280 to has_optrel.
1281 (struct _ppc64_elf_section_data): Likewise.
1282 (ppc64_elf_check_relocs): Set has_optrel for more relocs.
1283 (ppc64_elf_edit_toc): Do ha/lo insn checks in GOT loop rather
1284 than TOC loop. Check PLT16 insns too.
1285
1286 2019-08-16 H.J. Lu <hongjiu.lu@intel.com>
1287
1288 PR ld/24905
1289 * elf64-x86-64.c (elf_x86_64_check_relocs): Move PIC check for
1290 PC-relative relocations back to ...
1291 (elf_x86_64_relocate_section): Here.
1292
1293 2019-08-16 Martin Liska <mliska@suse.cz>
1294
1295 PR ld/24912
1296 * elflink.c: Report error only for not relocatable.
1297 * linker.c (_bfd_generic_link_add_one_symbol): Do not handle
1298 here lto_slim_object as it's handled in caller.
1299
1300 2019-08-16 Alan Modra <amodra@gmail.com>
1301
1302 * elf32-ppc.c (ppc_elf_relocate_section): Optimize unaligned relocs.
1303
1304 2019-08-15 Jim Wilson <jimw@sifive.com>
1305
1306 * elfnn-riscv.c (perform_relocation) <R_RISCV_RVC_LUI>: If
1307 RISCV_CONST_HIGH_PART (value) is zero, then convert c.lui instruction
1308 to c.li instruction, and use ENCODE_RVC_IMM to set value.
1309
1310 2019-08-15 Tom Tromey <tromey@adacore.com>
1311
1312 * dwarf2.c (scan_unit_for_symbols): Check for end of CU, not end
1313 of section.
1314
1315 2019-08-14 Alan Modra <amodra@gmail.com>
1316
1317 PR 24623
1318 * dwarf2.c (stash_comp_unit): New function, extracted from..
1319 (_bfd_dwarf2_find_nearest_line): ..here.
1320 (find_abstract_instance): Parse comp units and decode line info
1321 as needed.
1322
1323 2019-08-14 Alan Modra <amodra@gmail.com>
1324
1325 * dwarf2.c (comp_unit_maybe_decode_line_info): Declare.
1326 (comp_unit_find_nearest_line): Use it here..
1327 (_bfd_dwarf2_find_symbol_bias): ..and here.
1328
1329 2019-08-14 Alan Modra <amodra@gmail.com>
1330
1331 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove addr_size parameter.
1332 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
1333 * coffgen.c (coff_find_nearest_line_with_names): Adjust
1334 _bfd_dwarf2_find_nearest_line calls.
1335 * elf.c (_bfd_elf_find_nearest_line, _bfd_elf_find_line): Likewise.
1336 * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
1337 * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
1338 * elfnn-aarch64.c (elfNN_aarch64_find_nearest_line): Likewise.
1339 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
1340 * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
1341 * libbfd.h: Regenerate.
1342
1343 2019-08-09 Mihailo Stojanovic <mihailo.stojanovic@rt-rk.com>
1344
1345 * elf-bfd.h (struct elf_backend_data): New members.
1346 * elflink.c (_bfd_elf_link_create_dynamic_sections): Create
1347 .gnu.hash section if necessary.
1348 (struct collect_gnu_hash_codes): New member.
1349 (elf_gnu_hash_process_symidx): New function name.
1350 (elf_renumber_gnu_hash_syms): Ignore local and undefined
1351 symbols. Record xlat location for every symbol which should have
1352 a .MIPS.xhash entry.
1353 (bfd_elf_size_dynamic_sections): Add DT_GNU_HASH dynamic tag to
1354 dynamic section if necessary.
1355 (GNU_HASH_SECTION_NAME): New define.
1356 (bfd_elf_size_dynsym_hash_dynstr): Get .MIPS.xhash section.
1357 Update the section size info.
1358 * elfxx-mips.c (struct mips_elf_hash_sort_data): New members.
1359 (struct mips_elf_link_hash_entry): New member.
1360 (mips_elf_link_hash_newfunc): Initialize .MIPS.xhash translation
1361 table location.
1362 (mips_elf_sort_hash_table): Initialize the pointer to the
1363 .MIPS.xhash section.
1364 (mips_elf_sort_hash_table_f): Populate the .MIPS.xhash
1365 translation table entry with the symbol dynindx.
1366 (_bfd_mips_elf_section_from_shdr): Add SHT_MIPS_XHASH.
1367 (_bfd_mips_elf_fake_sections): Initialize .MIPS.xhash section
1368 info.
1369 (_bfd_mips_elf_create_dynamic_sections): Create .MIPS.xhash
1370 section.
1371 (_bfd_mips_elf_size_dynamic_sections): Add DT_MIPS_XHASH tag to
1372 dynamic section.
1373 (_bfd_mips_elf_finish_synamic_sections): Add DT_MIPS_XHASH.
1374 (_bfd_mips_elf_final_write_processing): Set .MIPS.xhash section
1375 sh_link info.
1376 (_bfd_mips_elf_get_target_dtag): Get DT_MIPS_XHASH tag.
1377 (MIPS_LIBC_ABI_XHASH): New ABI version enum value.
1378 (_bfd_mips_post_process_headers): Mark the ABI version as
1379 MIPS_LIBC_ABI_XHASH if there exists a .MIPS.xhash section,
1380 but not a .hash section.
1381 (_bfd_mips_elf_record_xhash_symbol): New function. Record a
1382 position in the translation table, associated with the hash
1383 entry.
1384 * elfxx-mips.h (literal_reloc_p): Define
1385 elf_backend_record_xhash_symbol backend hook.
1386 * elfxx-target.h: Initialize elf_backend_record_xhash_symbol
1387 backend hook.
1388
1389 2019-08-07 Jose E. Marchesi <jose.marchesi@oracle.com>
1390
1391 * elf64-bpf.c (bpf_elf_relocate_section): New function.
1392 (bpf_elf_insn_disp_reloc): Delete function.
1393 (elf_backend_relocate_section): Define.
1394
1395 2019-08-07 Alan Modra <amodra@gmail.com>
1396
1397 PR 24644
1398 * archive64.c (_bfd_archive_64_bit_slurp_armap): Properly check
1399 for overflow in expressions involving nsymz.
1400
1401 2019-08-01 Ilia Diachkov <ilia.diachkov@optimitech.com>
1402
1403 * elfnn-riscv.c (_bfd_riscv_relax_lui): Set lui relax safety area to
1404 two pages in relro presence.
1405
1406 2019-08-01 Max Filippov <jcmvbkbc@gmail.com>
1407
1408 * elf32-xtensa.c (insn_num_slots, get_rsr_lend_opcode)
1409 (get_wsr_lbeg_opcode): New functions.
1410 (check_loop_aligned): Detect relaxed loops and adjust loop_len
1411 and insn_len for the first actual instruction of the loop.
1412
1413 2019-07-30 Alan Modra <amodra@gmail.com>
1414
1415 PR 24768
1416 * bfd.c (struct bfd): Add lto_slim_object flag.
1417 * bfd-in2.h: Regenerate.
1418
1419 2019-07-29 Martin Liska <mliska@suse.cz>
1420
1421 PR 24768
1422 * archive.c (_bfd_compute_and_write_armap): Come up with
1423 report_plugin_err variable.
1424 * bfd-in2.h (struct bfd): Add lto_slim_object flag.
1425 * elf.c (struct lto_section): New.
1426 (_bfd_elf_make_section_from_shdr): Parse content of
1427 .gnu_lto_.lto section.
1428 * elflink.c: Report error for a missing LTO plugin.
1429 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
1430
1431 2019-07-28 Alan Modra <amodra@gmail.com>
1432
1433 PR 24857
1434 PR 24339
1435 * elflink.c (elf_link_add_object_symbols): Report an informative
1436 error on finding local symbols with index equal or greater than
1437 symbol table sh_info. Correct comment. Allow such symbols in
1438 dynamic objects. Abort on NULL section for symbol.
1439
1440 2019-07-26 Alan Modra <amodra@gmail.com>
1441
1442 * elf-bfd.h (struct output_elf_obj_tdata): Delete "linker" field.
1443 (elf_linker): Don't define.
1444 * elflink.c (bfd_elf_final_link): Don't set elf_linker.
1445
1446 2019-07-25 YunQiang Su <syq@debian.org>
1447
1448 PR 24832
1449 * elfxx-mips.c (mips_set_isa_flags): Default to MIPS 3 for 64-bit
1450 mips inputs.
1451
1452 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
1453
1454 * elf32-arc.c (bfd_get_32_me): Add a small description, fix
1455 formating.
1456 (reloc_type_to_name): Fix formating.
1457 (arc_elf_object_p): Likewise.
1458 (debug_arc_reloc): Likewise.
1459 (arc_do_relocation): Likewise.
1460
1461 2019-07-24 Claudiu Zissulescu <claziss@synopsys.com>
1462
1463 * elf32-arc.c (bfd_get_32_me): New function.
1464 (bfd_put_32_me): Likewise.
1465 (arc_elf_relax_section): Likewise.
1466 (bfd_elf32_bfd_relax_section): Define.
1467
1468 2019-07-24 Alan Modra <amodra@gmail.com>
1469
1470 * elf-bfd.h (struct elf_backend_data): Return bfd_boolean from
1471 elf_backend_final_write_processing, don't pass linker arg.
1472 (_bfd_elf_final_write_processing): Update prototype.
1473 * elf.c (_bfd_elf_write_object_contents): Adjust call.
1474 (_bfd_elf_final_write_processing): Return error on incompatible
1475 OSABI and has_gnu_osabi. Remove linker arg.
1476 * elf-nacl.h (nacl_final_write_processing): Update prototype.
1477 * elf-vxworks.h (elf_vxworks_final_write_processing): Likewise.
1478 * elfxx-mips.h (_bfd_mips_final_write_processing): Likewise.
1479 (_bfd_mips_elf_final_write_processing): Likewise.
1480 * elf-hppa.h (elf_hppa_final_write_processing): Return status
1481 and remove linker arg.
1482 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
1483 * elf-nacl.c (nacl_final_write_processing): Likewise.
1484 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
1485 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
1486 * elf32-arm.c (arm_final_write_processing): Likewise.
1487 (elf32_arm_final_write_processing): Likewise.
1488 (elf32_arm_nacl_final_write_processing): Likewise.
1489 (elf32_arm_vxworks_final_write_processing): Likewise.
1490 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
1491 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
1492 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
1493 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
1494 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
1495 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
1496 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
1497 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
1498 * elf32-mips.c (mips_vxworks_final_write_processing): Likewise.
1499 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
1500 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
1501 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
1502 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
1503 * elf32-ppc.c (ppc_final_write_processing): Likewise.
1504 (ppc_elf_final_write_processing): Likewise.
1505 (ppc_elf_vxworks_final_write_processing): Likewise.
1506 * elf32-sparc.c (sparc_final_write_processing): Likewise.
1507 (elf32_sparc_final_write_processing): Likewise.
1508 (elf32_sparc_vxworks_final_write_processing): Likewise.
1509 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
1510 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
1511 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
1512 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
1513 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
1514 * elfxx-mips.c (_bfd_mips_final_write_processing): Likewise.
1515 (_bfd_mips_elf_final_write_processing): Likewise.
1516
1517 2019-07-24 Alan Modra <amodra@gmail.com>
1518
1519 * elf-vxworks.c (elf_vxworks_final_write_processing): Don't return
1520 early.
1521 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
1522 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
1523
1524 2019-07-24 Alan Modra <amodra@gmail.com>
1525
1526 * elf32-visium.c (visium_elf_post_process_headers): Don't set
1527 EI_OSABI header byte here.
1528 (ELF_OSABI): Define.
1529
1530 2019-07-23 Alan Modra <amodra@gmail.com>
1531
1532 * elf-bfd.h (enum elf_gnu_osabi): Add elf_gnu_osabi_mbind.
1533 * elf.c (_bfd_elf_make_section_from_shdr): Set elf_gnu_osabi_mbind.
1534 (get_program_header_size): Formatting. Only test SH_GNU_MBIND
1535 when elf_gnu_osabi_mbind is set.
1536 (_bfd_elf_map_sections_to_segments): Likewise.
1537 (_bfd_elf_init_private_section_data): Likewise.
1538 (_bfd_elf_final_write_processing): Update comment.
1539 * elf64-hppa.c (elf64_hppa_special_sections): Move .tbss entry.
1540 (elf_backend_special_sections): Define without .tbss for linux.
1541
1542 2019-07-23 Alan Modra <amodra@gmail.com>
1543
1544 * elf-bfd.h (enum elf_gnu_osabi): Rename from elf_gnu_symbols.
1545 Remove none, any, all enums.
1546 (struct elf_obj_tdata): Rename has_gnu_symbols field to has_gnu_osabi.
1547 (_bfd_elf_final_write_processing): Declare.
1548 * elf.c (_bfd_elf_write_object_contents): Unconditionally call
1549 elf_backend_final_write_processing.
1550 (_bfd_elf_post_process_headers): Move body of function to..
1551 (_bfd_elf_final_write_processing): ..here, but set EI_OSABI byte
1552 only when not already set. Adjust for rename.
1553 * elfxx-target.h (elf_backend_final_write_processing): Default to
1554 _bfd_elf_final_write_processing.
1555 * elf-hppa.h (elf_hppa_final_write_processing): Call
1556 _bfd_elf_final_write_processing.
1557 * elf-m10300.c (_bfd_mn10300_elf_final_write_processing): Likewise.
1558 * elf-nacl.c (nacl_final_write_processing): Likewise.
1559 * elf-vxworks.c (elf_vxworks_final_write_processing): Likewise.
1560 * elf32-arc.c (arc_elf_final_write_processing): Likewise.
1561 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
1562 * elf32-bfin.c (elf32_bfin_final_write_processing): Likewise.
1563 * elf32-cr16.c (_bfd_cr16_elf_final_write_processing): Likewise.
1564 * elf32-cris.c (cris_elf_final_write_processing): Likewise.
1565 * elf32-h8300.c (elf32_h8_final_write_processing): Likewise.
1566 * elf32-lm32.c (lm32_elf_final_write_processing): Likewise.
1567 * elf32-m32r.c (m32r_elf_final_write_processing): Likewise.
1568 * elf32-m68k.c (elf_m68k_final_write_processing): Likewise.
1569 * elf32-msp430.c (bfd_elf_msp430_final_write_processing): Likewise.
1570 * elf32-nds32.c (nds32_elf_final_write_processing): Likewise.
1571 * elf32-or1k.c (or1k_elf_final_write_processing): Likewise.
1572 * elf32-pj.c (pj_elf_final_write_processing): Likewise.
1573 * elf32-v850.c (v850_elf_final_write_processing): Likewise.
1574 * elf32-xc16x.c (elf32_xc16x_final_write_processing): Likewise.
1575 * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
1576 * elf64-ia64-vms.c (elf64_vms_final_write_processing): Likewise.
1577 * elfnn-ia64.c (elfNN_ia64_final_write_processing): Likewise.
1578 * elf32-arm.c (arm_final_write_processing): Split out from..
1579 (elf32_arm_final_write_processing): ..here. Call
1580 _bfd_elf_final_write_processing.
1581 (elf32_arm_nacl_final_write_processing): Adjust.
1582 * elfxx-mips.c (_bfd_mips_final_write_processing): Split out from..
1583 (_bfd_mips_elf_final_write_processing): ..here. Call
1584 _bfd_elf_final_write_processing.
1585 * elfxx-mips.h (_bfd_mips_final_write_processing): Declare.
1586 * elf32-mips.c (mips_vxworks_final_write_processing): Adjust.
1587 * elf32-ppc.c (ppc_final_write_processing): Split out from..
1588 (ppc_elf_final_write_processing): ..here. Call
1589 _bfd_elf_final_write_processing.
1590 (ppc_elf_vxworks_final_write_processing): Adjust.
1591 * elf32-sparc.c (sparc_final_write_processing): Split out from..
1592 (elf32_sparc_final_write_processing): ..here. Call
1593 _bfd_elf_final_write_processing.
1594 (elf32_sparc_vxworks_final_write_processing): Adjust.
1595 * elf32-d10v.c (elf_backend_final_write_processing): Don't define.
1596 * elf32-d30v.c (elf_backend_final_write_processing): Don't define.
1597 * elf32-m68hc11.c (elf_backend_final_write_processing): Don't define.
1598 * elf32-m68hc12.c (elf_backend_final_write_processing): Don't define.
1599 * elf32-s12z.c (elf_backend_final_write_processing): Don't define.
1600 * elf32-i386.c (elf_i386_check_relocs): Don't set has_gnu_symbols.
1601 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1602 * elflink.c (elf_link_add_object_symbols): Likewise.
1603 (elf_link_output_symstrtab): Set has_gnu_osabi for symbols here
1604 instead.
1605
1606 2019-07-23 Omar Majid <omajid@redhat.com>
1607
1608 * coffcode.h (coff_set_arch_mach_hook): Handle I386_APPLE_MAGIC,
1609 I386_FREEBSD_MAGIC, I386_LINUX_MAGIC, I386_NETBSD_MAGIC,
1610 AMD64_APPLE_MAGIC, AMD64_FREEBSD_MAGIC, AMD64_LINUX_MAGIC,
1611 AMD64_NETBSD_MAGIC.
1612 * peXXigen.c: Add comment about source of .NET magic numbers.
1613
1614 2019-07-19 Alan Modra <amodra@gmail.com>
1615
1616 * reloc.c (BFD_RELOC_PPC64_TPREL34, BFD_RELOC_PPC64_DTPREL34),
1617 (BFD_RELOC_PPC64_GOT_TLSGD34, BFD_RELOC_PPC64_GOT_TLSLD34),
1618 (BFD_RELOC_PPC64_GOT_TPREL34, BFD_RELOC_PPC64_GOT_DTPREL34),
1619 (BFD_RELOC_PPC64_TLS_PCREL): New pcrel tls relocs.
1620 * elf64-ppc.c (ppc64_elf_howto_raw): Add howtos for pcrel tls relocs.
1621 (ppc64_elf_reloc_type_lookup): Translate pcrel tls relocs.
1622 (must_be_dyn_reloc, dec_dynrel_count): Add R_PPC64_TPREL64.
1623 (ppc64_elf_check_relocs): Support pcrel tls relocs.
1624 (ppc64_elf_tls_optimize, ppc64_elf_relocate_section): Likewise.
1625 * bfd-in2.h: Regenerate.
1626 * libbfd.h: Regenerate.
1627
1628 2019-07-18 Alan Modra <amodra@gmail.com>
1629
1630 * elf64-ppc.c (ppc64_elf_relocate_section): Don't bother selecting
1631 a TLS section symbol for edited relocs. Tighten TLS symbol/reloc
1632 match test.
1633
1634 2019-07-18 Alan Modra <amodra@gmail.com>
1635
1636 * elf64-ppc.c (TLS_EXPLICIT): Define as 256.
1637 (ppc64_elf_check_relocs): Don't store TLS_EXPLICIT even if char
1638 is more than 8 bits.
1639 (ppc64_elf_tls_optimize): Likewise. Make tls_set, tls_clear, and
1640 tls_type vars unsigned int.
1641 (ppc64_elf_relocate_section): Use r_type rather than TLS_EXPLICIT
1642 to select r_type edit.
1643
1644 2019-07-18 Alan Modra <amodra@gmail.com>
1645
1646 * elf32-ppc.c (TLS_GDIE): Rename from TLS_TPRELGD throughout file.
1647 Correct comment.
1648 * elf64-ppc.c (TLS_GDIE): Likewise.
1649
1650 2019-07-18 Alan Modra <amodra@gmail.com>
1651
1652 * elf64-ppc.c (ppc64_elf_tls_optimize): Correct test for allowed
1653 range of tp-relative offsets.
1654
1655 2019-07-15 Alan Modra <amodra@gmail.com>
1656
1657 * elflink.c (_bfd_elf_fix_symbol_flags): If the def for an
1658 alias is no longer bfd_link_hash_defined, clear the alias.
1659
1660 2019-07-13 Alan Modra <amodra@gmail.com>
1661
1662 * elflink.c (_bfd_elf_omit_section_dynsym_default): Don't keep
1663 tls_sec.
1664 (_bfd_elf_init_1_index_section): Prefer not using TLS sections.
1665 (_bfd_elf_init_2_index_sections): Likewise.
1666 * elf64-ppc.c (ppc64_elf_relocate_section): When emitting dynamic
1667 relocations for local TLS symbols, use STN_UNDEF as the relocation
1668 symbol.
1669 * elf32-ppc.c (ppc_elf_relocate_section): Likewise, and don't
1670 leave TLS symbol value in the addend.
1671
1672 2019-07-08 Alan Modra <amodra@gmail.com>
1673
1674 PR 24785
1675 * elf32-ppc.c (_bfd_elf_ppc_set_arch): Sanity check .PPC.EMB.apuinfo
1676 size before reading first word.
1677
1678 2019-07-02 Nick Clifton <nickc@redhat.com>
1679
1680 PR 24717
1681 * elf.c (is_debuginfo_file): New function.
1682 (assign_file_positions_for_non_load_sections): Do not warn about
1683 allocated sections outside of loadable segments if they are found
1684 in a debuginfo file.
1685 * elf-bfd.h (is_debuginfo_file): Prototype.
1686
1687 2019-07-02 Nick Clifton <nickc@redhat.com>
1688
1689 PR 24753
1690 * compress.c (bfd_get_full_section_contents): Do not complain
1691 about linker created sections that are larger than the file size.
1692
1693 2019-07-02 Christophe Lyon <christophe.lyon@linaro.org>
1694
1695 * bfd/elf32-arm.c (CMSE_STUB_NAME): New define.
1696 (elf32_arm_get_stub_entry): Do not try to emit long-branch stubs
1697 for CMSE stubs.
1698 (arm_dedicated_stub_output_section_name): Use CMSE_STUB_NAME.
1699
1700 2019-07-02 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
1701
1702 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark debug
1703 sections when .text section contain secure entry functions
1704 is marked.
1705
1706 2019-07-01 Nick Clifton <nickc@redhat.com>
1707
1708 PR 23839
1709 * elf32-arm.c (elf32_arm_update_relocs): Do not include the
1710 section VMA in the offset used to update exidx relocs.
1711
1712 2019-06-28 Nick Clifton <nickc@redhat.com>
1713
1714 PR 24708
1715 * elf.c (_bfd_elf_slurp_version_tables): Check for an excessively
1716 large version reference section.
1717 * compress.c (bfd_get_full_section_contents): Check for an
1718 uncompressed section whose size is larger than the file size.
1719
1720 2019-06-28 Alan Modra <amodra@gmail.com>
1721
1722 * format.c (bfd_check_format_matches): Don't match plugin target
1723 if another target matches. Expand comment.
1724 * targets.c (_bfd_target_vector): Move plugin_vec after all other
1725 non-corefile targets, outside !SELECT_VECS.
1726 * config.bfd: Don't handle targ=plugin here.
1727 * configure.ac: Don't add plugin to enable_targets or handle in
1728 target loop setting selvecs and other target vars.
1729 * configure: Regenerate.
1730
1731 2019-06-26 Nick Clifton <nickc@redhat.com>
1732
1733 PR 24703
1734 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add error
1735 messages for failures.
1736 * mach-o.c (bfd_mach_o_canonicalize_relocs): Set an bfd error code
1737 if returning an error value.
1738
1739 2019-06-25 Jan Beulich <jbeulich@suse.com>
1740
1741 * elf-properties.c (elf_find_and_remove_property): Rename last
1742 parameter. Mention it in comment.
1743
1744 2019-06-24 Ilia Diachkov <ilia.diachkov@optimitech.com>
1745
1746 * elfnn-riscv.c (_bfd_riscv_relax_lui): Delete early exit when
1747 SEC_MERGE or SEC_CODE flags are set.
1748 (_bfd_riscv_relax_section): New local symtype. Set sym_sec and
1749 symtype consistently. Don't include sec_addr (sym_sec) in symval.
1750 Add check for SEC_INFO_TYPE_MERGE and call _bfd_merged_section_offset.
1751 Add sec_addr (sym_sec) after handling merge sections.
1752
1753 2019-06-24 H.J. Lu <hongjiu.lu@intel.com>
1754
1755 PR ld/24721
1756 * elf-properties.c (elf_merge_gnu_property_list): Remove the
1757 property after reporting property removal.
1758
1759 2019-06-23 Alan Modra <amodra@gmail.com>
1760
1761 PR 24704
1762 * elf64-ppc.c (R_PPC64_GOT16_DS): Don't set has_gotrel.
1763 (ppc64_elf_edit_toc): Don't remove R_PPC64_GOT16_DS got entries.
1764 Reduce range of offsets allowed for other GOT relocs.
1765
1766 2019-06-23 Alan Modra <amodra@gmail.com>
1767
1768 PR 24689
1769 * elfcode.h (elf_object_p): Warning fix.
1770
1771 2019-06-21 Alan Modra <amodra@gmail.com>
1772
1773 PR 24689
1774 * elfcode.h (elf_object_p): Check type of e_shstrndx section.
1775
1776 2019-06-19 Alan Modra <amodra@gmail.com>
1777
1778 PR 24697
1779 * elf32-ppc.c (ppc_elf_relocate_section): Don't read insn for
1780 R_PPC_EMB_RELSDA. Mask low bit of R_PPC_EMB_SDA21 r_offset.
1781
1782 2019-06-19 Alan Modra <amodra@gmail.com>
1783
1784 * elf64-ppc.c (ppc64_elf_inline_plt): Correct st_other test for
1785 functions that require r2 valid to use local entry.
1786 (ppc64_elf_size_stubs, ppc64_elf_relocate_section): Likewise.
1787
1788 2019-06-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
1789
1790 * elfnn-aarch64.c (elfNN_aarch64_allocate_local_dynrelocs): Remove.
1791 (elfNN_aarch64_size_dynamic_sections): Remove loc_hash_table traversal
1792 with elfNN_aarch64_allocate_local_dynrelocs.
1793
1794 2019-06-14 Szabolcs Nagy <szabolcs.nagy@arm.com>
1795
1796 * elfnn-aarch64.c: Enable MOVW_PREL relocs for ELF32.
1797
1798 2019-06-14 Alan Modra <amodra@gmail.com>
1799
1800 * Makefile.in: Regenerate.
1801 * configure: Regenerate.
1802
1803 2019-06-14 Alan Modra <amodra@gmail.com>
1804
1805 * elf64-ppc.c: Fix comments involving paddi.
1806
1807 2019-06-12 Adam Lackorzymski <adam@os.inf.tu-dresden.de>
1808
1809 PR 24643
1810 * elf32-arm.c (arm_elf_find_function): Fail if the symol table is
1811 absent, or the bfd is not in the ELF formart.
1812 * elfnn-aarch64.c (aarch64_elf_find_function): Likewise.
1813
1814 2019-06-10 Christos Zoulas <christos@zoulas.com>
1815
1816 PR 24650
1817 * elf.c (elfcore_make_auxv_note_section): New function.
1818 (elfcore_grok_note): Use it.
1819 (elfcore_grok_freebsd_note): Likewise.
1820 (elfcore_grok_openbsd_note): Likewise.
1821 (elfcore_grok_netbsd_note): Likewise. Plus add support for
1822 NT_NETBSDCORE_AUXV notes.
1823
1824 2019-06-06 Sudakshina Das <sudi.das@arm.com>
1825
1826 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Set
1827 alignment of the new gnu property section.
1828
1829 2019-06-06 Sudakshina Das <sudi.das@arm.com>
1830
1831 * bfd-in.h: Change comment.
1832 * bfd-in2.h: Regenerate.
1833 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update warning.
1834 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties):
1835 Likwise.
1836
1837 2019-05-28 Faraz Shahbazker <fshahbazker@wavecomp.com>
1838
1839 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_PCHI16>:
1840 Remove overflow check.
1841
1842 2019-05-28 Alan Modra <amodra@gmail.com>
1843
1844 PR 24596
1845 * cofflink.c (coff_link_check_archive_element): Don't assume
1846 element is a coff object file after calling add_archive_element.
1847
1848 2019-05-28 Alan Modra <amodra@gmail.com>
1849
1850 PR 24596
1851 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Don't
1852 attempt to set sh_entsize for excluded PLT section.
1853
1854 2019-05-28 Alan Modra <amodra@gmail.com>
1855
1856 PR 24596
1857 * elf64-alpha.c (elf64_alpha_relocate_section): Don't attempt
1858 to emit R_ALPHA_GOTTPREL in PIEs, for which no space is
1859 allocated in alpha_dynamic_entries_for_reloc.
1860
1861 2019-05-28 Alan Modra <amodra@gmail.com>
1862
1863 PR 24596
1864 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Don't segfault
1865 on NULL output_section.
1866 * elflink.c (elf_final_link_free): Don't free -1 symshndxbuf.
1867
1868 2019-05-28 Alan Modra <amodra@gmail.com>
1869
1870 PR 24596
1871 * elf32-m68k.c (elf_m68k_get_got_entry): Don't create a new
1872 entry when MUST_FIND. Abort when MUST_FIND not found.
1873 (elf_m68k_get_bfd2got_entry): Likewise.
1874 (elf_m68k_relocate_section): Remove now useless assert.
1875
1876 2019-05-28 Alan Modra <amodra@gmail.com>
1877
1878 PR 24596
1879 * elf64-hppa.c (elf64_hppa_finalize_dynreloc): Get the output bfd
1880 from bfd_link_info, not an output section owner.
1881 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd): Likewise.
1882 (elf_hppa_final_link_relocate): Likewise.
1883
1884 2019-05-28 Alan Modra <amodra@gmail.com>
1885
1886 PR 24596
1887 * aout-tic30.c (MY_bfd_final_link): Don't segfault on missing
1888 create_object_symbols_section, obj_textsec, obj_datasec or
1889 obj_bsssec. Fix other errors in placement.
1890 * config.bfd: Obsolete tic30-aout.
1891
1892 2019-05-28 Alan Modra <amodra@gmail.com>
1893
1894 PR 24596
1895 * dwarf2.c (save_section_vma, section_vma_same): Check for NULL
1896 end of section list as well as section_count.
1897 * xcofflink.c (xcoff_link_add_symbols): Fix temporarily changed
1898 section list before returning error.
1899
1900 2019-05-27 Alan Modra <amodra@gmail.com>
1901
1902 * elf.c (bfd_elf_set_group_contents): Exit on zero size section.
1903
1904 2019-05-27 Alan Modra <amodra@gmail.com>
1905
1906 PR 24596
1907 * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
1908
1909 2019-05-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
1910
1911 * elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
1912 (struct elf_aarch64_link_hash_table): Add variant_pcs member.
1913 (elfNN_aarch64_allocate_dynrelocs): Update variant_pcs.
1914 (elfNN_aarch64_size_dynamic_sections): Add DT_AARCH64_VARIANT_PCS.
1915 (elf_backend_merge_symbol_attribute): Define.
1916
1917 2019-05-24 Alan Modra <amodra@gmail.com>
1918
1919 * po/SRC-POTFILES.in: Regenerate.
1920
1921 2019-05-24 Alan Modra <amodra@gmail.com>
1922
1923 * elf64-ppc.c: Comment on powerxx _notoc stub variants.
1924 (LI_R11_0, LIS_R11, ORI_R11_R11_0, SLDI_R11_R11_34): Define.
1925 (PADDI_R12_PC, PLD_R12_PC, D34, HA34): Define.
1926 (struct ppc_link_hash_table): Add powerxx_stubs.
1927 (ppc64_elf_check_relocs): Set powerxx_stubs.
1928 (build_powerxx_offset, size_powerxx_offset),
1929 (num_relocs_for_powerxx_offset),
1930 (emit_relocs_for_powerxx_offset): New functions.
1931 (plt_stub_size): Size powerxx stubs.
1932 (ppc_build_one_stub): Emit powerxx stubs.
1933 (ppc_size_one_stub): Size powerxx stubs. Omit .eh_frame for
1934 powerxx stubs.
1935
1936 2019-05-24 Alan Modra <amodra@gmail.com>
1937
1938 * elf64-ppc.c (ppc64_elf_check_relocs): Set has_gotrel for
1939 R_PPC64_GOT_PCREL34.
1940 (xlate_pcrel_opt): New function.
1941 (ppc64_elf_edit_toc): Handle R_PPC64_GOT_PCREL34.
1942 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
1943 for R_PPC64_GOT_PCREL34. Implement R_PPC64_PCREL_OPT optimisation.
1944
1945 2019-05-24 Alan Modra <amodra@gmail.com>
1946
1947 * reloc.c (BFD_RELOC_PPC64_D34, BFD_RELOC_PPC64_D34_LO),
1948 (BFD_RELOC_PPC64_D34_HI30, BFD_RELOC_PPC64_D34_HA30),
1949 (BFD_RELOC_PPC64_PCREL34, BFD_RELOC_PPC64_GOT_PCREL34),
1950 (BFD_RELOC_PPC64_PLT_PCREL34),
1951 (BFD_RELOC_PPC64_ADDR16_HIGHER34, BFD_RELOC_PPC64_ADDR16_HIGHERA34),
1952 (BFD_RELOC_PPC64_ADDR16_HIGHEST34, BFD_RELOC_PPC64_ADDR16_HIGHESTA34),
1953 (BFD_RELOC_PPC64_REL16_HIGHER34, BFD_RELOC_PPC64_REL16_HIGHERA34),
1954 (BFD_RELOC_PPC64_REL16_HIGHEST34, BFD_RELOC_PPC64_REL16_HIGHESTA34),
1955 (BFD_RELOC_PPC64_D28, BFD_RELOC_PPC64_PCREL28): New reloc enums.
1956 * elf64-ppc.c (PNOP): Define.
1957 (ppc64_elf_howto_raw): Add reloc howtos for new relocations.
1958 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc numbers.
1959 (ppc64_elf_ha_reloc): Adjust addend for highera34 and highesta34
1960 relocs.
1961 (ppc64_elf_prefix_reloc): New function.
1962 (struct ppc_link_hash_table): Add notoc_plt.
1963 (is_branch_reloc): Add R_PPC64_PLTCALL_NOTOC.
1964 (is_plt_seq_reloc): Add R_PPC64_PLT_PCREL34,
1965 R_PPC64_PLT_PCREL34_NOTOC, and R_PPC64_PLTSEQ_NOTOC.
1966 (ppc64_elf_check_relocs): Handle pcrel got and plt relocs. Set
1967 has_pltcall for section on seeing R_PPC64_PLTCALL_NOTOC. Handle
1968 possible need for dynamic relocs on non-pcrel powerxx relocs.
1969 (dec_dynrel_count): Handle non-pcrel powerxx relocs.
1970 (ppc64_elf_inline_plt): Handle R_PPC64_PLTCALL_NOTOC.
1971 (toc_adjusting_stub_needed): Likewise.
1972 (ppc64_elf_tls_optimize): Handle R_PPC64_PLTSEQ_NOTOC.
1973 (ppc64_elf_relocate_section): Handle new powerxx relocs.
1974 * bfd-in2.h: Regenerate.
1975 * libbfd.h: Regenerate.
1976
1977 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
1978
1979 * config.bfd (targ_cpu): Process bpf-*-none only if BFD64.
1980 * configure.ac: Set target_size=64 for bpf_elf64_le_vec and
1981 bpf_elf64_be_vec.
1982 * configure: Regenerate.
1983
1984 2019-05-23 Jose E. Marchesi <jose.marchesi@oracle.com>
1985
1986 * configure: Regenerated.
1987 * Makefile.am (ALL_MACHINES): Add cpu-bpf.lo.
1988 (ALL_MACHINES_CFILES): Add cpu-bpf.c.
1989 (BFD64_BACKENDS): Add elf64-bpf.lo.
1990 (BFD64_BACKENDS_CFILES): Add elf64-bpf.c.
1991 * Makefile.in (SOURCE_HFILES): Regenerate.
1992 * config.bfd (targ_cpu): Handle bpf-*-* targets.
1993 * cpu-bpf.c: New file.
1994 * elf64-bpf.c: Likewise.
1995 * targets.c (_bfd_target_vector): Add bpf_elf64_be_vec and
1996 bpf_elf64_le_vec.
1997 * archures.c: Define architecture bfd_arch_bpf and machine
1998 bfd_arch_bpf.
1999 * reloc.c: Define BFD relocations used by the BPF target.
2000 * bfd-in2.h: Regenerated.
2001 * libbfd.h: Likewise.
2002
2003 2019-05-22 Alan Modra <amodra@gmail.com>
2004
2005 * elf32-arm.c (arm_allocate_glue_section_space): Clear section
2006 contents.
2007
2008 2019-05-22 Alan Modra <amodra@gmail.com>
2009
2010 * vms-alpha.c (_bfd_vms_write_etir): Don't attempt further
2011 processing on "size error in section".
2012
2013 2019-05-22 Alan Modra <amodra@gmail.com>
2014
2015 * som.c (som_bfd_free_cached_info): Call
2016 _bfd_generic_close_and_cleanup.
2017
2018 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
2019
2020 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Generate error
2021 for TLS_TPREL_HI16(/LO16) relocations in shared library.
2022
2023 2019-05-21 Faraz Shahbazker <fshahbazker@wavecomp.com>
2024
2025 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Add NULL pointer
2026 checks. Search the RELA table for n64 relocations.
2027
2028 2019-05-21 Matthew Fortune <matthew.fortune@mips.com>
2029 Faraz Shahbazker <fshahbazker@wavecomp.com>
2030
2031 * elfxx-mips.c (LA25_BC): New macro.
2032 (mips_elf_link_hash_table)<compact_branches>: New field.
2033 (STUB_JALRC): New macro.
2034 (mipsr6_o32_exec_plt0_entry_compact): New array.
2035 (mipsr6_n32_exec_plt0_entry_compact): Likewise.
2036 (mipsr6_n64_exec_plt0_entry_compact): Likewise.
2037 (mipsr6_exec_plt_entry_compact): Likewise.
2038 (mips_elf_create_la25_stub): Use BC instead of J for stubs
2039 when compact_branches is true.
2040 (_bfd_mips_elf_finish_dynamic_symbol): Choose the compact
2041 PLT for MIPSR6 with compact_branches. Do not reorder the
2042 compact branches PLT. Switch the lazy stub for MIPSR6
2043 with compact_branches to use JALRC.
2044 (mips_finish_exec_plt): Choose the compact PLT0 for MIPSR6
2045 when compact_branches is true.
2046 (_bfd_mips_elf_compact_branches): New function.
2047 * elfxx-mips.h (_bfd_mips_elf_compact_branches): New prototype.
2048
2049 2019-05-21 Tamar Christina <tamar.christina@arm.com>
2050
2051 PR ld/24373
2052 * elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
2053 Fix print formatter.
2054
2055 2019-05-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
2056
2057 PR 24460
2058 * elf32-arm.c (get_value_helper): Remove.
2059 (elf32_arm_final_link_relocate): Fix branch future relocations.
2060
2061 2019-05-21 Tamar Christina <tamar.christina@arm.com>
2062
2063 PR ld/24373
2064 * bfd-in.h (enum erratum_84319_opts): New
2065 (bfd_elf64_aarch64_set_options, bfd_elf32_aarch64_set_options): Change
2066 int to enum erratum_84319_opts.
2067 * bfd-in2.h: Regenerate.
2068 * elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Change
2069 fix_erratum_843419 to use new enum, remove fix_erratum_843419_adr.
2070 (_bfd_aarch64_add_stub_entry_after): Conditionally create erratum stub.
2071 (aarch64_size_one_stub): Conditionally size erratum 843419 stubs.
2072 (_bfd_aarch64_resize_stubs): Amend comment.
2073 (elfNN_aarch64_size_stubs): Don't generate stubs when no workaround
2074 requested.
2075 (bfd_elfNN_aarch64_set_options): Use new fix_erratum_843419 enum.
2076 (_bfd_aarch64_erratum_843419_branch_to_stub): Implement selection of
2077 erratum workaround.
2078 (clear_erratum_843419_entry): Update erratum conditional.
2079
2080 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
2081
2082 PR ld/24571
2083 * bfd/elf32-avr.c (elf32_avr_relax_section): Adjust range check
2084 when computing distance_short_enough.
2085
2086 2019-05-21 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
2087
2088 PR ld/24564
2089 * bfd/elf32-avr.c (avr_relative_distance_considering_wrap_around):
2090 Wrap around even if distance equals avr_pc_wrap_around.
2091
2092 2019-05-20 Nick Clifton <nickc@redhat.com>
2093
2094 * po/fr.po: Updated French translation.
2095
2096 2019-05-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
2097
2098 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add case for Tag_MVE_arch.
2099
2100 2019-05-16 Alan Modra <amodra@gmail.com>
2101
2102 * elf32-arm.c (elf32_arm_write_section): Revert last change.
2103
2104 2019-05-15 Alan Modra <amodra@gmail.com>
2105
2106 * elf32-arm.c (elf32_arm_write_section): Don't leave
2107 error case of STM32L4XX_ERRATUM_BRANCH_TO_VENEER with
2108 unitialised section contents.
2109
2110 2019-05-14 Jamey Hicks <jamey.hicks@gmail.com>
2111
2112 PR 19921
2113 * verilog.c: (VerilogDataWidth): New variable.
2114 (verilog_write_record): Emit bytes in VerilogDataWidth bundles.
2115
2116 2019-05-08 Nick Clifton <nickc@redhat.com>
2117
2118 PR 24523
2119 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE
2120 rather than FALSE if encountering a non-ELF file.
2121
2122 2019-05-06 Alan Modra <amodra@gmail.com>
2123
2124 * elf32-pj.c (pj_elf_reloc): Don't report undefined weak as an error.
2125
2126 2019-05-06 Alan Modra <amodra@gmail.com>
2127
2128 * reloc.c (BFD_RELOC_PPC64_TPREL16_HIGH, BFD_RELOC_PPC64_TPREL16_HIGHA),
2129 (BFD_RELOC_PPC64_DTPREL16_HIGH, BFD_RELOC_PPC64_DTPREL16_HIGHA):
2130 Sort before BFD_RELOC_PPC64_DTPREL16_HIGHESTA entry.
2131 * libbfd.h: Regenerate.
2132 * bfd-in2.h: Regenerate.
2133
2134 2019-05-04 Alan Modra <amodra@gmail.com>
2135
2136 PR 24511
2137 * syms.c (coff_section_type): Only allow '.', '$' and numeric
2138 following the standard section names.
2139 (bfd_decode_symclass): Prioritize section flag tests in
2140 decode_section_type before name tests in coff_section_type.
2141 * plugin.c (bfd_plugin_canonicalize_symtab): Init fake_section
2142 and fake_common_section using BFD_FAKE_SECTION. Use "fake" as
2143 their names and choose standard .text section flags for
2144 fake_section.
2145
2146 2019-05-02 Nick Clifton <nickc@redhat.com>
2147
2148 PR 24493
2149 * coffcode.h (styp_to_sec_flags): Treat .gnu.debuglink and
2150 .gnu.debugaltlink sections as debugging sections.
2151
2152 2019-04-30 Alan Modra <amodra@gmail.com>
2153
2154 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_gotrel.
2155 (struct _ppc64_elf_section_data): Likewise.
2156 (ppc64_elf_check_relocs): Set above fields.
2157 (ppc64_elf_edit_toc): Add a pass over GOT relocs.
2158 (ppc64_elf_relocate_section): Edit GOT indirect to GOT relative
2159 when possible.
2160
2161 2019-04-26 H.J. Lu <hongjiu.lu@intel.com>
2162
2163 PR ld/24486
2164 * elflink.c (elf_link_output_extsym): Don't complain undefined
2165 weak dynamic reference.
2166
2167 2019-04-25 Sudakshina Das <sudi.das@arm.com>
2168
2169 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): Remove.
2170 (PLT_BTI_TLSDESC_ENTRY_SIZE): Remove.
2171 (PLT_PAC_ENTRY_SIZE, PLT_BTI_PAC_ENTRY_SIZE): Remove.
2172 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): Update.
2173 (elfNN_aarch64_small_plt0_pac_entry): Remove.
2174 (elfNN_aarch64_small_plt0_bti_pac_entry): Remove.
2175 (elfNN_aarch64_small_plt0_bti_entry): Update.
2176 (elfNN_aarch64_small_plt_bti_entry): Update.
2177 (elfNN_aarch64_small_plt_pac_entry): Update.
2178 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): Update.
2179 (setup_plt_values): Setup new entries.
2180 (elfNN_aarch64_finish_dynamic_sections): Remove size change.
2181 (elfNN_aarch64_plt_sym_val): Likewise.
2182
2183 2019-04-22 Jim Wilson <jimw@sifive.com>
2184
2185 * elfnn-riscv.c (PRSTATUS_SIZE) [ARCH_SIZE==32]: Change from 0 to 204.
2186
2187 2019-04-19 Alan Modra <amodra@gmail.com>
2188
2189 * elf32-s12z.c (elf_backend_can_gc_sections): Don't define
2190
2191 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
2192
2193 * elf64-x86-64.c (elf_x86_64_need_pic): Suggest -fPIE when not
2194 building shared object.
2195 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Likewise.
2196
2197 2019-04-17 H.J. Lu <hongjiu.lu@intel.com>
2198
2199 PR ld/24458
2200 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
2201 linker_def.
2202
2203 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
2204
2205 * reloc.c (BFD_RELOC_ARM_T32_VLDR_VSTR_OFF_IMM): New internal
2206 relocation.
2207 * bfd-in2.h: Regenerate.
2208 * libbfd.h: Likewise.
2209
2210 2019-04-15 Sudakshina Das <sudi.das@arm.com>
2211
2212 * reloc.c (BFD_RELOC_ARM_THUMB_LOOP12): New.
2213 * bfd-in2.h: Regenerated.
2214 * libbfd.h: Regenerated.
2215
2216 2019-04-15 Sudakshina Das <sudi.das@arm.com>
2217
2218 * reloc.c (BFD_RELOC_THUMB_PCREL_BFCSEL): New relocation.
2219 * bfd-in2.h: Regenerated.
2220 * libbfd.h: Likewise.
2221
2222 2019-04-15 Sudakshina Das <sudi.das@arm.com>
2223
2224 * reloc.c (BFD_RELOC_ARM_THUMB_BF13): New.
2225 * bfd-in2.h: Regenerated.
2226 * libbfd.h: Regenerated.
2227 * elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF13.
2228 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF13
2229 and R_ARM_THM_BF12 together.
2230 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF13.
2231
2232 2019-04-15 Sudakshina Das <sudi.das@arm.com>
2233
2234 * reloc.c (BFD_RELOC_ARM_THUMB_BF19): New
2235 * libbfd.h: Regenerated.
2236 * bfd-in2.h: Regenerated.
2237 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF18.
2238 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF19
2239 and R_ARM_THM_BF18 together.
2240 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF19.
2241
2242 2019-04-15 Sudakshina Das <sudi.das@arm.com>
2243
2244 * reloc.c (BFD_RELOC_ARM_THUMB_BF17): New enum.
2245 * bfd-in2.h: Regenerated.
2246 * libbfd.h: Regenerated.
2247 * bfd-elf32-arm.c (elf32_arm_howto_table_1): New entry for R_ARM_THM_BF16.
2248 (elf32_arm_reloc_map elf32_arm_reloc_map): Map BFD_RELOC_ARM_THUMB_BF17
2249 and R_ARM_THM_BF16 together.
2250 (get_value_helper): New reloc helper.
2251 (elf32_arm_final_link_relocate): New switch case for R_ARM_THM_BF16.
2252
2253 2019-04-15 Sudakshina Das <sudi.das@arm.com>
2254
2255 * reloc.c (BFD_RELOC_THUMB_PCREL_BRANCH5): New enum.
2256 * bfd-in2.h: Regenerate.
2257 * libbfd.h: Regenerate.
2258
2259 2019-04-15 Thomas Preud'homme <thomas.preudhomme@arm.com>
2260
2261 * archures.c (bfd_mach_arm_8_1M_MAIN): Define.
2262 * bfd-in2.h: Regenerate.
2263 * cpu-arm.c (arch_info_struct): Add entry for Armv8.1-M Mainline.
2264 * elf32-arm.c (using_thumb_only): Return true for Armv8.1-M Mainline
2265 and update assert.
2266 (using_thumb2): Likewise.
2267 (using_thumb2_bl): Update assert.
2268 (arch_has_arm_nop): Likewise.
2269 (bfd_arm_get_mach_from_attributes): Add case for Armv8.1-M Mainline.
2270 (tag_cpu_arch_combine): Add logic for Armv8.1-M Mainline merging.
2271
2272 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
2273
2274 * elf-linker-x86.h (elf_x86_cet_report): New.
2275 (elf_linker_x86_params): Add cet_report.
2276 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Report
2277 missing IBT and SHSTK properties if needed.
2278
2279 2019-04-11 H.J. Lu <hongjiu.lu@intel.com>
2280
2281 PR ld/24436
2282 * elf-m10300.c (mn10300_elf_check_relocs): Remove BFD_ASSERT of
2283 "h != NULL". Don't check "h != NULL" before calling.
2284 bfd_elf_gc_record_vtentry.
2285 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
2286 * elf32-bfin.c (bfin_check_relocs): Likewise.
2287 * elf32-cris.c (cris_elf_check_relocs): Likewise.
2288 * elf32-csky.c (csky_elf_check_relocs): Likewise.
2289 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
2290 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
2291 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
2292 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
2293 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
2294 * elf32-i386.c (elf_i386_check_relocs): Likewise.
2295 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
2296 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
2297 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
2298 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
2299 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
2300 * elf32-metag.c (elf_metag_check_relocs): Likewise.
2301 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
2302 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
2303 * elf32-s390.c (elf_s390_check_relocs): Likewise.
2304 * elf32-sh.c (sh_elf_check_relocs): Likewise.
2305 * elf32-v850.c (v850_elf_check_relocs): Likewise.
2306 * elf32-vax.c (elf_vax_check_relocs): Likewise.
2307 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
2308 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
2309 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
2310 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
2311 * elf64-s390.c (elf_s390_check_relocs): Likewise.
2312 * elf64-x86-64.c (elf_s390_check_relocs): Likewise.
2313 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2314 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
2315 * elflink.c (bfd_elf_gc_record_vtinherit): Check for corrupt
2316 VTENTRY entry.
2317
2318 2019-04-11 Alan Modra <amodra@gmail.com>
2319
2320 PR 24435
2321 * elflink.c (elf_link_add_object_symbols): Don't read partial
2322 dynamic entries from fuzzed objects.
2323
2324 2019-04-11 Tamar Christina <tamar.christina@arm.com>
2325
2326 PR ld/24302
2327 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Don't emit
2328 DT_TLSDESC_GOT and DT_TLSDESC_PLT when DF_BIND_NOW.
2329 (elfNN_aarch64_finish_dynamic_sections): Don't write PLT if DF_BIND_NOW.
2330
2331 2019-04-10 Michael Forney <mforney@mforney.org>
2332
2333 PR 24427
2334 * doc/chew.c (free_words): Correctly free "push_text" strings.
2335
2336 2019-04-08 H.J. Lu <hongjiu.lu@intel.com>
2337
2338 * config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
2339
2340 2019-04-08 Alan Modra <amodra@gmail.com>
2341
2342 * configure.ac (elfxx_x86): Define and use.
2343 * configure: Regenerate.
2344
2345 2019-04-06 H.J. Lu <hongjiu.lu@intel.com>
2346
2347 * elf-linker-x86.h: New file.
2348 * elf32-i386.c (elf_i386_convert_load_reloc): Use htab->params
2349 to get x86-specific linker options.
2350 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
2351 (elf_x86_64_check_relocs): Likewise.
2352 (elf_x86_64_relocate_section): Likewise.
2353 (elf_x86_64_link_setup_gnu_properties): Likewise.
2354 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Likewise.
2355 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
2356 (_bfd_elf_linker_x86_set_options): New function.
2357 * elfxx-x86.h: Include "elf-linker-x86.h".
2358 (elf_x86_link_hash_table): Add params.
2359
2360 2019-04-03 Alan Modra <amodra@gmail.com>
2361
2362 * coff-i386.c, * coff-x86_64.c, * coffgen.c, * dwarf2.c,
2363 * elf-m10200.c, * elf.c, * elf32-arm.c, * elf32-bfin.c,
2364 * elf32-csky.c, * elf32-m32r.c, * elf32-microblaze.c, * elf32-pru.c,
2365 * elf32-rx.c, * elf32-xgate.c, * elf64-sparc.c, * elfnn-ia64.c,
2366 * elfxx-riscv.c, * elfxx-sparc.c, * linker.c, * mach-o.c,
2367 * pe-x86_64.c, * pei-x86_64.c, * plugin.c: Whitespace fixes.
2368
2369 2019-04-02 Jim Wilson <jimw@sifive.com>
2370
2371 PR 24389
2372 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
2373 ELF header flags to after check for ELF object file. Loop through
2374 sections looking for code sections, if none, then skip ABI checks.
2375
2376 2019-03-30 Andrew Waterman <andrew@sifive.com>
2377
2378 * elfnn-riscv.c (_bfd_riscv_relax_call): Only check ARCH_SIZE for
2379 rd == X_RA case.
2380
2381 2019-03-29 Max Filippov <jcmvbkbc@gmail.com>
2382
2383 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Add
2384 info->export_dynamic to the conditional.
2385
2386 2019-03-28 Alan Modra <amodra@gmail.com>
2387
2388 PR 24392
2389 * configure.ac: Invoke AC_CHECK_SIZEOF(int).
2390 * configure: Regenerate.
2391 * coffgen.c (coff_get_reloc_upper_bound): Replace gcc diagnostic
2392 workaround with SIZEOF_LONG vs. SIZEOF_INT check.
2393 * elf.c (_bfd_elf_get_reloc_upper_bound): Likewise.
2394 * elf64-sparc.c (elf64_sparc_get_reloc_upper_bound): Likewise.
2395 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
2396
2397 2019-03-21 Jim Wilson <jimw@sifive.com>
2398
2399 PR 24365
2400 * elfnn-riscv.c (riscv_elf_relocate_section): For STT_SECTION check,
2401 verify sym non-NULL before using. Add identical check using h.
2402
2403 2019-03-21 Sudakshina Das <sudi.das@arm.com>
2404
2405 * elf-bfd.h (struct elf_backend_data): Add argument to
2406 merge_gnu_properties.
2407 * elf-properties.c (elf_merge_gnu_properties): Add argument to
2408 itself and while calling bed->merge_gnu_properties.
2409 (elf_merge_gnu_property_list): Update the calls for
2410 elf_merge_gnu_properties.
2411 * elfnn-aarch64.c (elfNN_aarch64_merge_gnu_properties): Update handling
2412 of --force-bti warning and add argument.
2413 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Add
2414 warning.
2415 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Add argument.
2416 * elfxx-x86.h (_bfd_x86_elf_merge_gnu_properties): Likewise in
2417 declaration.
2418
2419 2019-03-20 Sudakshina Das <sudi.das@arm.com>
2420
2421 * elfxx-aarch64.c (_bfd_aarch64_elf_link_fixup_gnu_properties): Define.
2422 * elfxx-aarch64.h (_bfd_aarch64_elf_link_fixup_gnu_properties): Declare.
2423 (elf_backend_fixup_gnu_properties): Define for AArch64.
2424
2425 2019-03-18 Alan Modra <amodra@gmail.com>
2426
2427 PR 24355
2428 * elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
2429 for local iplt syms with ent->plt.offset == -1. Remove ineffective
2430 attempt at writing glink stubs only once.
2431
2432 2019-03-16 Alan Modra <amodra@gmail.com>
2433
2434 PR 24337
2435 * elf.c (_bfd_elf_rela_local_sym): Revert last change.
2436 (_bfd_elf_rel_local_sym): Likewise.
2437 * elflink.c (elf_link_input_bfd): Use bfd_und_section for
2438 section of symbols with unrecognized shndx.
2439
2440 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
2441
2442 PR ld/24267
2443 * coffgen.c (_bfd_coff_section_already_linked): Skip discarded
2444 section.
2445 * cofflink.c (coff_link_add_symbols): Check for symbols defined
2446 in discarded section.
2447
2448 2019-03-15 Alan Modra <amodra@gmail.com>
2449
2450 PR 24339
2451 * elflink.c (elf_link_add_object_symbols): Bail out on a local
2452 symbol after globals if elf_bad_symtab is not set.
2453
2454 2019-03-15 Alan Modra <amodra@gmail.com>
2455
2456 PR 24337
2457 * elf.c (_bfd_elf_rela_local_sym): Don't segfault on NULL sec.
2458 (_bfd_elf_rel_local_sym): Likewise.
2459
2460 2019-03-15 Alan Modra <amodra@gmail.com>
2461
2462 PR 24336
2463 * elflink.c (elf_link_read_relocs_from_section): Handle fuzzed
2464 object files with sh_size not a multiple of sh_entsize.
2465
2466 2019-03-15 H.J. Lu <hongjiu.lu@intel.com>
2467
2468 PR ld/24338
2469 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for corrupt
2470 input with bad relocation.
2471
2472 22019-03-15 H.J. Lu <hongjiu.lu@intel.com>
2473
2474 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
2475
2476 2019-03-14 Nick Clifton <nickc@redhat.com>
2477
2478 PR 24334
2479 * dwarf2.c (struct dwarf2_debug): Add sec_vma_count field.
2480 (save_section_vma): Initialise field to the number of entries in
2481 the sec_vma table.
2482 (section_vma_same): Check that the number of entries in the
2483 sec_vma table matches the number of sections in the bfd.
2484
2485 2019-03-14 Nick Clifton <nickc@redhat.com>
2486
2487 PR 24333
2488 * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
2489 section owner pointer when adding the default symbol.
2490
2491 2019-03-14 Nick Clifton <nickc@redhat.com>
2492
2493 PR 24332
2494 * elflink.c (elf_link_add_object_symbols): Add new local variable
2495 extversym_end. Initialise it to point to the end of the version
2496 symbol table, if present. Check it when initialising and updating
2497 the ever pointer.
2498
2499 2019-03-13 Sudakshina Das <sudi.das@arm.com>
2500
2501 * elfnn-aarch64.c (PLT_PAC_ENTRY_SIZE, PLT_PAC_SMALL_ENTRY_SIZE): New.
2502 (PLT_BTI_PAC_ENTRY_SIZE, PLT_BTI_PAC_SMALL_ENTRY_SIZE): New.
2503 (setup_plt_values): Account for PAC or PAC and BTI enabled PLTs.
2504 (elfNN_aarch64_size_dynamic_sections): Add checks for PLT_BTI_PAC
2505 and PLT_PAC_PLT.
2506 (elfNN_aarch64_finish_dynamic_sections): Account for PLT_BTI_PAC.
2507 (get_plt_type): Add case for DT_AARCH64_PAC_PLT.
2508 (elfNN_aarch64_plt_sym_val): Add cases for PLT_BTI_PAC and PLT_PAC.
2509
2510 2019-03-13 Sudakshina Das <sudi.das@arm.com>
2511 Szabolcs Nagy <szabolcs.nagy@arm.com>
2512
2513 * bfd-in.h (aarch64_plt_type, aarch64_enable_bti_type): New.
2514 (aarch64_bti_pac_info): New.
2515 (bfd_elf64_aarch64_set_options): Add aarch64_bti_pac_info argument.
2516 (bfd_elf32_aarch64_set_options): Likewise.
2517 * bfd-in2.h: Regenerate
2518 * elfnn-aarch64.c (PLT_BTI_ENTRY_SIZE): New.
2519 (PLT_BTI_SMALL_ENTRY_SIZE, PLT_BTI_TLSDESC_ENTRY_SIZE): New.
2520 (elfNN_aarch64_small_plt0_bti_entry): New.
2521 (elfNN_aarch64_small_plt_bti_entry): New.
2522 (elfNN_aarch64_tlsdesc_small_plt_bti_entry): New.
2523 (elf_aarch64_obj_tdata): Add no_bti_warn and plt_type fields.
2524 (elf_aarch64_link_hash_table): Add plt0_entry, plt_entry and
2525 tlsdesc_plt_entry_size fields.
2526 (elfNN_aarch64_link_hash_table_create): Initialise the new fields.
2527 (setup_plt_values): New helper function.
2528 (bfd_elfNN_aarch64_set_options): Use new bp_info to set plt sizes and
2529 bti enable type.
2530 (elfNN_aarch64_allocate_dynrelocs): Use new size members instead of
2531 fixed macros.
2532 (elfNN_aarch64_size_dynamic_sections): Likewise and add checks.
2533 (elfNN_aarch64_create_small_pltn_entry): Use new generic pointers
2534 to plt stubs instead of fixed ones and update filling them according
2535 to the need for bti.
2536 (elfNN_aarch64_init_small_plt0_entry): Likewise.
2537 (elfNN_aarch64_finish_dynamic_sections): Likewise.
2538 (get_plt_type, elfNN_aarch64_get_synthetic_symtab): New.
2539 (elfNN_aarch64_plt_sym_val): Update size accordingly.
2540 (elfNN_aarch64_link_setup_gnu_properties): Set up plts if BTI GNU NOTE
2541 is set.
2542 (bfd_elfNN_get_synthetic_symtab): Define.
2543 (elfNN_aarch64_merge_gnu_properties): Give out warning with --force-bti
2544 and mising BTI NOTE SECTION.
2545
2546
2547 2019-03-13 Sudakshina Das <sudi.das@arm.com>
2548
2549 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Exclude
2550 linker created inputs from merge.
2551 * elfnn-aarch64.c (struct elf_aarch64_obj_tdata): Add field for
2552 GNU_PROPERTY_AARCH64_FEATURE_1_AND properties.
2553 (elfNN_aarch64_link_setup_gnu_properties): New.
2554 (elfNN_aarch64_merge_gnu_properties): New.
2555 (elf_backend_setup_gnu_properties): Define for AArch64.
2556 (elf_backend_merge_gnu_properties): Likewise.
2557 * elfxx-aarch64.c (_bfd_aarch64_elf_link_setup_gnu_properties): Define.
2558 (_bfd_aarch64_elf_parse_gnu_properties): Define.
2559 (_bfd_aarch64_elf_merge_gnu_properties): Define.
2560 * elfxx-aarch64.h (_bfd_aarch64_elf_link_setup_gnu_properties): Declare.
2561 (_bfd_aarch64_elf_parse_gnu_properties): Declare.
2562 (_bfd_aarch64_elf_merge_gnu_properties): Declare.
2563 (elf_backend_parse_gnu_properties): Define for AArch64.
2564
2565 2019-03-13 H.J. Lu <hongjiu.lu@intel.com>
2566
2567 PR ld/24322
2568 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Properly
2569 merge GNU_PROPERTY_X86_FEATURE_1_[IBT|SHSTK].
2570
2571 2019-03-12 Alan Modra <amodra@gmail.com>
2572
2573 * coffcode.h (buy_and_read): Delete unnecessary forward decl. Add
2574 nmemb parameter. Use bfd_alloc2.
2575 (coff_slurp_line_table): Use bfd_alloc2. Update buy_and_read calls.
2576 Delete assertion.
2577 (coff_slurp_symbol_table): Use bfd_alloc2 and bfd_zalloc2.
2578 (coff_slurp_reloc_table): Use bfd_alloc2. Update buy_and_read calls.
2579 * coffgen.c (coff_get_reloc_upper_bound): Ensure size calculation
2580 doesn't overflow.
2581 * elf.c (bfd_section_from_shdr): Use bfd_zalloc2. Style fix.
2582 (assign_section_numbers): Style fix.
2583 (swap_out_syms): Use bfd_malloc2.
2584 (_bfd_elf_get_reloc_upper_bound): Ensure size calculation doesn't
2585 overflow.
2586 (_bfd_elf_make_empty_symbol): Style fix.
2587 (elfobj_grok_stapsdt_note_1): Formatting.
2588 * elfcode.h (elf_object_p): Use bfd_alloc2.
2589 (elf_write_relocs, elf_write_shdrs_and_ehdr): Likewise.
2590 (elf_slurp_symbol_table): Use bfd_zalloc2.
2591 (elf_slurp_reloc_table): Use bfd_alloc2.
2592 (_bfd_elf_bfd_from_remote_memory): Use bfd_malloc2.
2593 * elf64-sparc (elf64_sparc_get_reloc_upper_bound): Ensure
2594 size calculation doesn't overflow.
2595 (elf64_sparc_get_dynamic_reloc_upper_bound): Likewise.
2596 * mach-o.c (bfd_mach_o_get_reloc_upper_bound): Likewise.
2597 * pdp11.c (get_reloc_upper_bound): Copy aoutx.h version.
2598
2599 2019-03-08 Alan Modra <amodra@gmail.com>
2600
2601 PR 24311
2602 * merge.c (merge_strings): Return secinfo. Don't pad section
2603 to alignment here.
2604 (_bfd_merge_sections): Pad section to alignment here, if input
2605 sections contributing to merged output all pad to alignment.
2606 Formatting.
2607
2608 2019-03-06 Nick Clifton <nickc@redhat.com>
2609
2610 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol
2611 table pointer.
2612 * coffgen.c (coff_find_nearest_line_with_names): Do not call
2613 _bfd_dwarf2_find_symbol_bias if there is no symbol table available.
2614
2615 2019-03-01 Andreas Krebbel <krebbel@linux.ibm.com>
2616
2617 This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
2618 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
2619
2620 PR 20113
2621 * elf32-s390.c (allocate_dynrelocs): Update comment.
2622
2623 2019-02-28 Tamar Christina <tamar.christina@arm.com>
2624
2625 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Correct CIE parse.
2626
2627 2019-02-28 Nick Clifton <nickc@redhat.com>
2628
2629 PR 24273
2630 * elf.c (bfd_elf_string_from_elf_section): Check for a string
2631 section that is not NUL terminated.
2632
2633 2019-02-27 H.J. Lu <hongjiu.lu@intel.com>
2634
2635 PR ld/24276
2636 * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
2637 by linker when checking copy reloc on protected symbol.
2638
2639 2019-02-24 Alan Modra <amodra@gmail.com>
2640
2641 PR 24144
2642 * pdp11.c (set_section_contents): Revert 2015-02-24 change.
2643
2644 2019-02-20 Eric Tsai <erictsai@cadence.com>
2645
2646 * elf32-xtensa.c (is_resolvable_asm_expansion): Scan output
2647 sections between the call site and call destination and adjust
2648 call distance by the largest alignment.
2649
2650 2019-02-20 Alan Hayward <alan.hayward@arm.com>
2651
2652 * elf-bfd.h (elfcore_write_aarch_pauth): Add declaration.
2653 * elf.c (elfcore_grok_aarch_pauth): New function.
2654 (elfcore_grok_note): Check for NT_ARM_PAC_MASK.
2655 (elfcore_write_aarch_pauth): New function.
2656 (elfcore_write_register_note): Check for AArch64 pauth section.
2657
2658 2019-02-20 Alan Modra <amodra@gmail.com>
2659
2660 PR 24225
2661 * elf32-nios2.c (nios2_elf32_relocate_section): Check asprintf
2662 return value.
2663
2664 2019-02-20 Michael Roitzsch <reactorcontrol@icloud.com>
2665
2666 * configure.ac (SHARED_LIBADD): Add -liberty -lintl for all
2667 Darwin hosts, not just or1k.
2668 * configure: Regenerate.
2669
2670 2019-02-20 Alan Modra <amodra@gmail.com>
2671
2672 PR 24236
2673 * archive64.c (_bfd_archive_64_bit_slurp_armap): Move code adding
2674 sentinel NUL to string buffer nearer to loop where it is used.
2675 Don't go past sentinel when scanning strings, and don't write
2676 NUL again.
2677 * archive.c (do_slurp_coff_armap): Simplify string handling to
2678 archive64.c style.
2679
2680 2019-02-19 Alan Modra <amodra@gmail.com>
2681
2682 PR 24235
2683 * pei-x86_64.c (pex64_bfd_print_pdata_section): Correct checks
2684 attempting to prevent read past end of section.
2685
2686 2019-02-18 Alan Modra <amodra@gmail.com>
2687
2688 PR 24225
2689 * elf32-nios2.c (nios2_elf32_relocate_section): Use asprintf and
2690 PRIx64 to generate warning messages. Print local sym names too.
2691
2692 2019-02-09 Vineet Gupta <vgupta@synopsys.com>
2693
2694 * elf32-arc (INIT_SYM_STRING): Delete.
2695 (FINI_SYM_STRING): Likewise.
2696 (init_str): Likewise.
2697 (fini_str): Likewise.
2698
2699 2019-02-08 Alan Modra <amodra@gmail.com>
2700
2701 * elf32-ppc.c (ppc_elf_relocate_section): Add %X to "unsupported
2702 for bss-plt" warning to make it an error.
2703
2704 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
2705
2706 PR ld/18841
2707 * elf32-sparc.c (elf32_sparc_reloc_type_class): Return
2708 reloc_class_ifunc for ifunc symbols.
2709 * elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.
2710
2711 2019-02-07 Eric Botcazou <ebotcazou@adacore.com>
2712
2713 * elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
2714 <R_VISIUM_PC16>: Use explicit range test to detect an overflow.
2715
2716 2019-02-07 Nick Clifton <nickc@redhat.com>
2717
2718 * config.bfd: Move the powerpc-lynxos and powerpc-windiss targets
2719 into the definitely obsolete list.
2720
2721 2019-02-05 H.J. Lu <hongjiu.lu@intel.com>
2722
2723 PR ld/24151
2724 * elf64-x86-64.c (elf_x86_64_need_pic): Check
2725 SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
2726 (elf_x86_64_relocate_section): Move PIC check for PC-relative
2727 relocations to ...
2728 (elf_x86_64_check_relocs): Here.
2729 (elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
2730 to check if a symbol is defined in a non-shared object.
2731 * elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.
2732
2733 2019-01-21 Sergio Durigan Junior <sergiodj@redhat.com>
2734
2735 * elf32-arm.c (elf32_arm_final_link_relocate): Use 'llabs' instead
2736 of 'labs' (and fix GCC warning).
2737
2738 2019-01-25 Nick Clifton <nickc@redhat.com>
2739
2740 * po/ru.po: Updated Russian translation.
2741
2742 2019-01-23 Nick Clifton <nickc@redhat.com>
2743
2744 * po/fr.po: Updated French translation.
2745
2746 2019-01-21 Nick Clifton <nickc@redhat.com>
2747
2748 * po/pt.po: Updated Portuguese translation.
2749 * po/uk.po: Updated Ukranian translation.
2750
2751 2019-01-21 Yuri Chornoivan <yurchor@ukr.net>
2752
2753 PR 24108
2754 * elf32-nds32.c (nds32_relocate_section): Add space between words
2755 in error message.
2756 * elfnn-riscv.c (riscv_version_mismatch): Fix spelling mistake in
2757 error message.
2758 (riscv_i_or_e_p): Likewise.
2759 (riscv_merge_arch_attr_info): Likewise.
2760
2761 2019-01-19 Nick Clifton <nickc@redhat.com>
2762
2763 * version.m4: Reset to 2.32.51
2764 * configure: Regenerate.
2765 * po/bfd.pot: Regenerate.
2766
2767 2018-06-24 Nick Clifton <nickc@redhat.com>
2768
2769 2.32 branch created.
2770
2771 2019-01-16 Kito Cheng <kito@andestech.com>
2772
2773 * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
2774 for OBJ_ATTR_PROC.
2775
2776 2019-01-16 Kito Cheng <kito@andestech.com>
2777 Nelson Chu <nelson@andestech.com>
2778
2779 * elfnn-riscv.c (in_subsets): New.
2780 (out_subsets): Likewise.
2781 (merged_subsets): Likewise.
2782 (riscv_std_ext_p): Likewise.
2783 (riscv_non_std_ext_p): Likewise.
2784 (riscv_std_sv_ext_p): Likewise.
2785 (riscv_non_std_sv_ext_p): Likewise.
2786 (riscv_version_mismatch): Likewise.
2787 (riscv_i_or_e_p): Likewise.
2788 (riscv_merge_std_ext): Likewise.
2789 (riscv_merge_non_std_and_sv_ext): Likewise.
2790 (riscv_merge_arch_attr_info): Likewise.
2791 (riscv_merge_attributes): Likewise.
2792 (_bfd_riscv_elf_merge_private_bfd_data): Merge attribute.
2793
2794 * elfnn-riscv.c (riscv_elf_obj_attrs_arg_type): New.
2795 (elf_backend_obj_attrs_vendor): Define.
2796 (elf_backend_obj_attrs_section_type): Likewise.
2797 (elf_backend_obj_attrs_section): Likewise.
2798 (elf_backend_obj_attrs_arg_type): Define as
2799 riscv_elf_obj_attrs_arg_type.
2800 * elfxx-riscv.c (riscv_estimate_digit): New.
2801 (riscv_estimate_arch_strlen1): Likewise.
2802 (riscv_estimate_arch_strlen): Likewise.
2803 (riscv_arch_str1): Likewise.
2804 (riscv_arch_str): Likewise.
2805 * elfxx-riscv.h (riscv_arch_str): Declare.
2806
2807 2019-01-14 John Darrington <john@darrington.wattle.id.au>
2808
2809 * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
2810 * libbfd.h: regen.
2811 * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
2812 source field. (md_apply_fix): Apply final fix
2813 to BFD_RELOC_S12Z_OPR.
2814 * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
2815
2816 2019-01-14 Maamoun Tarsha <maamountk@hotmail.com>
2817
2818 PR 20113
2819 * elf32-s390.c (allocate_dynrelocs): Update comment.
2820
2821 2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
2822
2823 * warning.m4: Adjust egrep pattern for non-GNU compilers.
2824 * configure: Regenerate.
2825
2826 2019-01-08 Alan Modra <amodra@gmail.com>
2827
2828 PR 23699
2829 PR 24065
2830 * ihex.c (ihex_write_object_contents): Properly check 32-bit
2831 address range.
2832
2833 2019-01-05 Yoshinori Sato <ysato@users.sourceforge.jp>
2834
2835 * bfd/archures.c: Add bfd_mach_rx_v2 and bfd_mach_rx_v3.
2836 * bfd/bfd-in2.h: Regenerate.
2837 * bfd/cpu-rx.c (arch_info_struct): Add RXv2 and RXv3 entry.
2838 * bfd/elf32-rx.c (elf32_rx_machine): Add RXv2 and RXv3 support.
2839
2840 2019-01-04 Lifang Xia <lifang_xia@c-sky.com>
2841
2842 * config.bfd (csky-*-elf* | csky-*-linux*): Modify the csky
2843 default target, little endian target is more suitable.
2844
2845 2019-01-04 Alan Modra <amodra@gmail.com>
2846
2847 PR 24061
2848 PR 21786
2849 * coff-rs6000.c (GET_VALUE_IN_FIELD): Add base parameter and
2850 adjust all callers.
2851 (EQ_VALUE_IN_FIELD): Likewise.
2852 * coff64-rs6000.c (GET_VALUE_IN_FIELD): Likewise.
2853
2854 2019-01-01 Alan Modra <amodra@gmail.com>
2855
2856 Update year range in copyright notice of all files.
2857
2858 For older changes see ChangeLog-2018
2859 \f
2860 Copyright (C) 2019 Free Software Foundation, Inc.
2861
2862 Copying and distribution of this file, with or without modification,
2863 are permitted in any medium without royalty provided the copyright
2864 notice and this notice are preserved.
2865
2866 Local Variables:
2867 mode: change-log
2868 left-margin: 8
2869 fill-column: 74
2870 version-control: never
2871 End:
This page took 0.085298 seconds and 5 git commands to generate.