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