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