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