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