No PT_INTERP when .interp is zero size
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
1b9e270b
AM
12018-10-08 Alan Modra <amodra@gmail.com>
2
3 * elf.c (get_program_header_size): Don't count PT_INTERP if
4 .interp is empty.
5 (_bfd_elf_map_sections_to_segments): Don't create PT_INTERP if
6 .interp is empty.
7
e0c3dfa2
AM
82018-10-08 Alan Modra <amodra@gmail.com>
9
10 * elf32-spu.c (spu_elf_modify_segment_map): Don't insert
11 overlays before segment containing headers.
12
00bee008
AM
132018-10-08 Alan Modra <amodra@gmail.com>
14
15 * elf.c (make_mapping): Cope with zero size array at end of
16 struct elf_segment_map.
17 (_bfd_elf_map_sections_to_segments): Likewise.
18 (rewrite_elf_program_header, copy_elf_program_header): Likewise.
19 (_bfd_elf_map_sections_to_segments): Rename phdr_index to hdr_index.
20
d1c86cff
AM
212018-10-05 Alan Modra <amodra@gmail.com>
22
23 * elf32-spu.c (spu_elf_create_sections): Make .note.spu_name
24 SHT_NOTE.
25
c8e98e36
SH
262018-10-05 Richard Henderson <rth@twiddle.net>
27
28 * bfd-in2.h: Regenerated.
29 * elf32-or1k.c: (or1k_elf_howto_table): Fix formatting for
30 R_OR1K_PLT26, Add R_OR1K_PCREL_PG21, R_OR1K_GOT_PG21,
31 R_OR1K_TLS_GD_PG21, R_OR1K_TLS_LDM_PG21, R_OR1K_TLS_IE_PG21,
32 R_OR1K_LO13, R_OR1K_GOT_LO13, R_OR1K_TLS_GD_LO13, R_OR1K_TLS_LDM_LO13,
33 R_OR1K_TLS_IE_LO13, R_OR1K_SLO13, R_OR1K_PLTA26.
34 (or1k_reloc_map): Add BFD_RELOC_OR1K_PCREL_PG21,
35 BFD_RELOC_OR1K_GOT_PG21, BFD_RELOC_OR1K_TLS_GD_PG21,
36 BFD_RELOC_OR1K_TLS_LDM_PG21, BFD_RELOC_OR1K_TLS_IE_PG21,
37 BFD_RELOC_OR1K_LO13, BFD_RELOC_OR1K_GOT_LO13,
38 BFD_RELOC_OR1K_TLS_GD_LO13, BFD_RELOC_OR1K_TLS_GD_LO13,
39 BFD_RELOC_OR1K_TLS_LDM_LO13, BFD_RELOC_OR1K_TLS_IE_LO13,
40 BFD_RELOC_OR1K_SLO13, BFD_RELOC_OR1K_PLTA26.
41 (elf_or1k_link_hash_table): Add field saw_plta.
42 (or1k_final_link_relocate): Add value calculations for new relocations.
43 (or1k_elf_relocate_section): Add section relocations for new
44 relocations.
45 (or1k_write_plt_entry): New function.
46 (or1k_elf_finish_dynamic_sections): Add support for PLTA relocations
47 using new l.adrp instruction. Cleanup PLT relocation code generation.
48 * libbfd.h: Regenerated.
49 * reloc.c: Add BFD_RELOC_OR1K_PCREL_PG21, BFD_RELOC_OR1K_LO13,
50 BFD_RELOC_OR1K_SLO13, BFD_RELOC_OR1K_GOT_PG21, BFD_RELOC_OR1K_GOT_LO13,
51 BFD_RELOC_OR1K_PLTA26, BFD_RELOC_OR1K_TLS_GD_PG21,
52 BFD_RELOC_OR1K_TLS_GD_LO13, BFD_RELOC_OR1K_TLS_LDM_PG21,
53 BFD_RELOC_OR1K_TLS_LDM_LO13, BFD_RELOC_OR1K_TLS_IE_PG21,
54 BFD_RELOC_OR1K_TLS_IE_LO13.
55
f2c1801f
SH
562018-10-05 Richard Henderson <rth@twiddle.net>
57
58 * elf32-or1k.c (or1k_elf_relocate_section): Add error for unknown
59 relocations. Add error for non zero addend with plt and got
60 relocations. Add error for got and plt references against dynamic, non
61 local, symbols. Add error when linking non shared liraries with
62 flag_pic.
63
1c4f3780
RH
642018-10-05 Richard Henderson <rth@twiddle.net>
65 Stafford Horne <shorne@gmail.com>
66
67 * bfd-in2.h: Regenerated.
68 * elf32-or1k.c (N_ONES): New macro.
69 (or1k_elf_howto_table): Fix R_OR1K_PLT26 to complain on overflow.
70 Add definitions for R_OR1K_TLS_TPOFF, R_OR1K_TLS_DTPOFF,
71 R_OR1K_TLS_DTPMOD, R_OR1K_AHI16, R_OR1K_GOTOFF_AHI16,
72 R_OR1K_TLS_IE_AHI16, R_OR1K_TLS_LE_AHI16, R_OR1K_SLO16,
73 R_OR1K_GOTOFF_SLO16, R_OR1K_TLS_LE_SLO16.
74 (or1k_reloc_map): Add entries for BFD_RELOC_HI16_S,
75 BFD_RELOC_LO16_GOTOFF, BFD_RELOC_HI16_GOTOFF, BFD_RELOC_HI16_S_GOTOFF,
76 BFD_RELOC_OR1K_TLS_IE_AHI16, BFD_RELOC_OR1K_TLS_LE_AHI16,
77 BFD_RELOC_OR1K_SLO16, BFD_RELOC_OR1K_GOTOFF_SLO16,
78 BFD_RELOC_OR1K_TLS_LE_SLO16.
79 (or1k_reloc_type_lookup): Change search loop to start ad index 0 and
80 also check results before returning.
81 (or1k_reloc_name_lookup): Simplify loop to use R_OR1K_max as index
82 limit.
83 (or1k_final_link_relocate): New function.
84 (or1k_elf_relocate_section): Add support for new AHI and SLO
85 relocations. Use or1k_final_link_relocate instead of generic
86 _bfd_final_link_relocate.
87 (or1k_elf_check_relocs): Add support for new AHI and SLO relocations.
88 * reloc.c: Add new enums for BFD_RELOC_OR1K_SLO16,
89 BFD_RELOC_OR1K_GOTOFF_SLO16, BFD_RELOC_OR1K_TLS_IE_AHI16,
90 BFD_RELOC_OR1K_TLS_IE_AHI16, BFD_RELOC_OR1K_TLS_LE_AHI16,
91 BFD_RELOC_OR1K_TLS_LE_SLO16. Remove unused BFD_RELOC_OR1K_GOTOFF_HI16
92 and BFD_RELOC_OR1K_GOTOFF_LO16.
93 * libbfd.h: Regenerated.
94
3e1b4df8
JW
952018-10-04 Jim Wilson <jimw@sifive.com>
96
97 * elfnn-riscv.c (riscv_elf_size_dynamic_sections): In dynobj->sections
98 loop, handle htab->sdyntdata section.
99
6d0a6093
JM
1002018-10-04 Jose E. Marchesi <jose.marchesi@oracle.com>
101
102 * elf64-sparc.c (elf64_sparc_output_arch_syms): Do notcorrect the
dca0df07 103 impact of STT_REGISTER symbols in the dynsym sh_info here...
6d0a6093
JM
104 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_sections): ...but
105 do it here.
106
23e463ed
L
1072018-10-03 H.J. Lu <hongjiu.lu@intel.com>
108
109 PR ld/23658
110 * elf.c (get_program_header_size): Put all adjacent SHT_NOTE
111 sections with the same section alignment into a single PT_NOTE
112 segment. Check SHT_NOTE section type instead of section name.
113 (_bfd_elf_map_sections_to_segments): Likewise.
114
c8d3f932
MW
1152018-10-03 Millan Wolff <mail@milianw.de>
116
117 PR 23715
118 * dwarf2.c (find_abstract_instance): Allow recursive invocations
119 of find_abstract_instance to override the name variable.
120
8e90d6d2
NC
1212018-10-03 Nick Clifton <nickc@redhat.com>
122
123 * po/pt.po: Updated Portuguese translation.
124
eb528ad1
CM
1252018-10-01 Cupertino Miranda <cmiranda@synopsys.com>
126
127 * arc-got.h (relocate_fix_got_relocs_for_got_info): Changed. Take TLS
128 section alignment in consideration for this relocation. Fixed TCB_SIZE
129 offset size to include section alignment.
130 (get_got_entry_list_for_symbol): Changed.
131 * elf32-arc.c (FINAL_SECTSTART): Added this formula macro.
132 (ARC_TLS_DTPOFF) Updated reloc to use new created macro instead.
133 (arc_special_overflow_checks): Fixed TCB_SIZE offsize to include
134 section alignment.
135 (elf_arc_check_relocs): Changed.
136 (elf_arc_finish_dynamic_symbol) Return FALSE in case arc_htab is NULL.
137 (struct elf_arc_link_hash_entry): Moved and changed.
138 (elf_arc_link_hash_newfunc): Changed.
139 (arc_elf_link_hash_table_create): Removed old initializations.
140 (elf_arc_relocate_section, elf_arc_finish_dynamic_symbol): Changed.
141
79c1bf3c
L
1422018-09-28 H.J. Lu <hongjiu.lu@intel.com>
143
144 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Use
145 elfclass instead of bed->s->elfclass.
146
5f9aecea
JW
1472018-09-27 Jim Wilson <jimw@sifive.com>
148
149 * elfnn-riscv.c (riscv_init_pcgp_relocs): Add explanatory comment.
150 (riscv_free_pcgp_relocs, riscv_record_pcgp_reloc): Likewise.
151 (riscv_find_pcgp_hi_reloc, riscv_reocrd_pcgp_lo_reloc): Likewise.
152 (riscv_find_pcgp_lo_reloc): Likewise.
153 (riscv_delete_pcgp_hi_reloc, riscv_use_pcgp_hi_reloc): Delete.
154 (riscv_delete_pcgp_lo_reloc): Likewise.
155 (_bfd_riscv_relax_pc): Don't call riscv_use_pcgp_hi_reloc. Replace
156 calls to riscv_delete_pcgp_lo_reloc and riscv_delete_pcgp_hi_reloc
157 with TRUE. Mark abfd arg as ATTRIBUTE_UNUSED.
158
5ef23793
JW
1592018-09-25 Jim Wilson <jimw@sifive.com>
160
161 * elfnn-riscv.c (riscv_make_plt_header): New arg output_bfd. Change
162 return type to bfd_boolean. If EF_RISCV_RVE call _bfd_error_handler
163 and return FALSE. Return TRUE at end.
164 (riscv_make_plt_entry): Likewise.
165 (riscv_elf_finish_dynamic_symbol): Update call to riscv_make_plt_entry.
166 (riscv_elf_finish_dynamic_sections): Update call to
167 riscv_make_plt_header.
168
551703cf
JW
1692018-09-24 Jim Wilson <jimw@sifive.com>
170
a05f27b6
JW
171 * elfnn-riscv.c (_bfd_riscv_relax_pc) <R_RISCV_PCREL_LO12_I>: New local
172 hi_sec_off which is symbol address with addend subtracted. Use in
173 riscv_find_pcgp_hi_reloc and riscv_record_pcgp_lo_reloc calls.
174
551703cf
JW
175 * elfnn-riscv.c (riscv_resolve_pcrel_lo_relocs): Add check for reloc
176 overflow with addend. Use reloc_dangerous instead of reloc_overflow.
177 Add strings for the two errors handled here.
178 (riscv_elf_relocate_section) In case R_RISCV_PCREL_LO12_I, rewrite
179 comment. Only give error with addend when used with section symbol.
180 In case bfd_reloc_dangerous, update error string.
181
db727370
JL
1822018-09-24 Jozef Lawrynowicz <jozef.l@mittosystems.com>
183
184 PR gdb/20948
185 * elf.c (_bfd_elf_write_object_contents): Return from function
186 early if abfd->direction == both_direction.
187
a767a1c4
SM
1882018-09-21 Simon Marchi <simon.marchi@ericsson.com>
189
190 * configure.ac: Check for fls.
191 * elf32-nds32.c (fls): Only define if !HAVE_FLS.
192 * config.in: Re-generate.
193 * configure: Re-generate.
194
ed3162ad
MR
1952018-09-20 Maciej W. Rozycki <macro@linux-mips.org>
196
197 * config.bfd <rs6000-*-aix5.[01], rs6000-*-aix[5-9]*>: Remove
198 duplicate `case' selectors.
199
fbaf61ad
NC
2002018-09-20 Nelson Chu <nelson.chu1990@gmail.com>
201
202 * elf32-nds32.c (nds32_elf_relax_loadstore):
203 Remove the unused target features.
204 (bfd_elf32_nds32_set_target_option): Remove the unused parameters.
205 (nds32_elf_relax_piclo12, nds32_elf_relax_letlslo12,
206 nds32_elf_relax_letlsadd, nds32_elf_relax_letlsls,
207 nds32_elf_relax_pltgot_suff, nds32_elf_relax_got_suff
208 nds32_elf_relax_gotoff_suff, calculate_plt_memory_address,
209 calculate_plt_offset, calculate_got_memory_address,
210 nds32_elf_check_dup_relocs): Removed.
211 All callers changed.
212 * elf32-nds32.h: Remove the unused macros and defines.
213 (elf_nds32_link_hash_table): Remove the unused variable.
214 (bfd_elf32_nds32_set_target_option): Update prototype.
215 (nds32_elf_ex9_init): Removed.
216 * elf32-nds32.c (nds32_convert_32_to_16): Updated.
217 * elf32-nds32.c (HOWTO2, HOWTO3): Define new HOWTO macros
218 to initialize array nds32_elf_howto_table in any order
219 without lots of EMPTY_HOWTO.
220 (nds32_reloc_map): Updated.
221 * reloc.c: Add BFD_RELOC_NDS32_LSI.
222 * bfd-in2.h: Regenerated.
223 * bfd/libbfd.h: Regenerated.
224 * elf32-nds32.c (nds32_elf_relax_howto_table): Add R_NDS32_LSI.
225 (nds32_reloc_map): Likewise.
226 (nds32_elf_relax_flsi): New function.
227 (nds32_elf_relax_section): Support floating load/store relaxation.
228 * elf32-nds32.c (NDS32_GUARD_SEC_P, elf32_nds32_local_gp_offset):
229 New macro.
230 (struct elf_nds32_link_hash_entry): New `offset_to_gp' field.
231 (struct elf_nds32_obj_tdata): New `offset_to_gp' and `hdr_size' fields.
232 (elf32_nds32_allocate_local_sym_info, nds32_elf_relax_guard,
233 nds32_elf_is_target_special_symbol, nds32_elf_maybe_function_sym):
234 New functions.
235 (nds32_info_to_howto_rel): Add BFD_ASSERT.
236 (bfd_elf32_bfd_reloc_type_table_lookup, nds32_elf_link_hash_newfunc,
237 nds32_elf_link_hash_table_create, nds32_elf_relocate_section,
238 nds32_elf_relax_loadstore, nds32_elf_relax_lo12, nds32_relax_adjust_label,
239 bfd_elf32_nds32_set_target_option, nds32_fag_mark_relax): Updated.
240 (nds32_elf_final_sda_base): Improve it to find the better gp value.
241 (insert_nds32_elf_blank): Must consider `len' when inserting blanks.
242 * elf32-nds32.h (bfd_elf32_nds32_set_target_option): Update prototype.
243 (struct elf_nds32_link_hash_table): Add new variable `hyper_relax'.
244 * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): New function.
245 (create_got_section): Likewise.
246 (allocate_dynrelocs, nds32_elf_size_dynamic_sections,
247 nds32_elf_relocate_section, nds32_elf_finish_dynamic_symbol): Updated.
248 (nds32_elf_check_relocs): Fix the issue that the shared library may
249 has TEXTREL entry in the dynamic section.
250 (nds32_elf_create_dynamic_sections): Enable to call readonly_dynrelocs
251 since the TEXTREL issue is fixed in the nds32_elf_check_relocs.
252 (nds32_elf_finish_dynamic_sections): Update and add DT_RELASZ
253 dynamic entry.
254 (calculate_offset): Remove the unused parameter `pic_ext_target' and
255 related codes.
256 All callers changed.
257 (elf_backend_dtrel_excludes_plt): Disable it temporarily since it
258 will cause some errors for our test cases.
259 * elf32-nds32.c (nds32_elf_merge_private_bfd_data): Allow to link the
260 generic object.
261 * reloc.c: Add TLS relocations.
262 * libbfd.h: Regenerated.
263 * bfd-in2.h: Regenerated.
264 * elf32-nds32.h (struct section_id_list_t): New.
265 (elf32_nds32_lookup_section_id, elf32_nds32_check_relax_group,
266 elf32_nds32_unify_relax_group, nds32_elf_unify_tls_model):
267 New prototypes.
268 (elf32_nds32_compute_jump_table_size, elf32_nds32_local_tlsdesc_gotent):
269 New macro.
270 (nds32_insertion_sort, bfd_elf32_nds32_set_target_option,
271 elf_nds32_link_hash_table): Updated.
272 * elf32-nds32.c (enum elf_nds32_tls_type): New.
273 (struct elf32_nds32_relax_group_t, struct relax_group_list_t): New.
274 (elf32_nds32_add_dynreloc, patch_tls_desc_to_ie, get_tls_type,
275 fls, ones32, list_insert, list_insert_sibling, dump_chain,
276 elf32_nds32_check_relax_group, elf32_nds32_lookup_section_id,
277 elf32_nds32_unify_relax_group, nds32_elf_unify_tls_model): New functions.
278 (elf_nds32_obj_tdata): Add new fields.
279 (elf32_nds32_relax_group_ptr, nds32_elf_local_tlsdesc_gotent): New macros.
280 (nds32_elf_howto_table): Add TLS relocations.
281 (nds32_reloc_map): Likewise.
282 (nds32_elf_copy_indirect_symbol, nds32_elf_size_dynamic_sections,
283 nds32_elf_finish_dynamic_symbol, elf32_nds32_allocate_local_sym_info,
284 nds32_elf_relocate_section, bfd_elf32_nds32_set_target_option,
285 nds32_elf_check_relocs, allocate_dynrelocs): Updated.
286 (nds32_elf_relax_section): Call nds32_elf_unify_tls_model.
287 (dtpoff_base): Rename it to `gottpof' and then update it.
288
cf93e9c2
AM
2892018-09-20 Alan Modra <amodra@gmail.com>
290
291 PR 23685
292 * peXXigen.c (pe_print_edata): Correct export address table
293 overflow checks. Check dataoff against section size too.
294
30838132
AM
2952018-09-20 Alan Modra <amodra@gmail.com>
296
297 PR 23686
298 * dwarf2.c (read_section): Error when attempting to malloc
299 "(bfd_size_type) -1".
300 * syms.c (_bfd_stab_section_find_nearest_line): Bounds check
301 function_name. Bounds check reloc address. Formatting. Ensure
302 .stabstr zero terminated.
303
8ff71a9c
NC
3042018-09-18 Nick Clifton <nickc@redhat.com>
305
306 PR 23657
307 * elfcode.h (elf_swap_shdr_in): Generate a warning message if an
308 ELF section has contents and size larger than the file size.
309
47275900
MR
3102018-09-14 Maciej W. Rozycki <macro@mips.com>
311
312 PR ld/21375
313 * elfxx-mips.h (_bfd_mips_elf_hide_symbol): New prototype.
314 (_bfd_mips_elf_linker_flags): Update prototype.
315 * elf32-mips.c (elf_backend_hide_symbol): New macro.
316 * elf64-mips.c (elf_backend_hide_symbol): Likewise.
317 * elfn32-mips.c (elf_backend_hide_symbol): Likewise.
318 * elfxx-mips.c (mips_elf_link_hash_table): Add
319 `use_absolute_zero' and `gnu_target' members.
320 (mips_elf_record_global_got_symbol): Call
321 `_bfd_mips_elf_hide_symbol' rather than
322 `_bfd_elf_link_hash_hide_symbol'.
323 (mips_use_local_got_p): Return FALSE if the symbol is absolute.
324 (mips_elf_obtain_contents): Reorder function.
325 (mips_elf_nullify_got_load): New function.
326 (mips_elf_calculate_relocation): Add `contents' parameter.
327 Nullify GOT loads or if it is not possible, then redirect GOT
328 relocations to the `__gnu_absolute_zero' symbol, for references
329 that are supposed to resolve to zero.
330 (mips_elf_define_absolute_zero): New function.
331 (_bfd_mips_elf_check_relocs): Prepare for arrangements made in
332 `mips_elf_calculate_relocation' for references made via the GOT
333 that are supposed to resolve to zero.
334 (_bfd_mips_elf_hide_symbol): New function.
335 (_bfd_mips_elf_linker_flags): Add the `gnu_target' parameter,
336 set the `gnu_target' member of the MIPS hash table.
337 (MIPS_LIBC_ABI_ABSOLUTE): New enumeration constant.
338 (_bfd_mips_post_process_headers): Use it.
339
98e10ffa
MR
3402018-09-14 Maciej W. Rozycki <macro@mips.com>
341
342 * elfxx-mips.c (mips_elf_store_contents): New function...
343 (mips_elf_perform_relocation): ... factored out from here.
344
fe75f42e
LX
3452018-09-14 Lifang Xia <lifang_xia@c-sky.com>
346
347 * elf32-csky.c (csky_elf_howto_table): Fill special_function of
348 R_CKCORE_PCREL32.
349 (csky_elf_relocate_section): Add R_CKCORE_PCREL32 process.
350
a4cd947a
AM
3512018-09-14 Alan Modra <amodra@gmail.com>
352
353 PR 23425
354 * reloc.c (bfd_generic_get_relocated_section_contents): Zero reloc
355 fields in debug sections when reloc is against an undefined symbol
356 and called from bfd_simple_get_relocated_section_contents or
357 similar.
358 * dwarf2.c (find_abstract_instance): Return true for zero offset
359 DW_FORM_ref_addr without returning values.
360
deee88e9
AM
3612018-09-06 Alan Modra <amodra@gmail.com>
362
363 PR 23570
364 * elf32-avr.c (elf_avr_special_sections): New.
365 (elf_backend_special_sections): Define.
366
e920c014
JM
3672018-09-04 Jose E. Marchesi <jose.marchesi@oracle.com>
368
369 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Do not issue an
370 error when an invalid relocation is passed; this is already done
371 by `_bfd_sparc_elf_info_to_howto_ptr'.
372
8410d65b
JM
3732018-09-04 Jose E. Marchesi <jose.marchesi@oracle.com>
374
375 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Issue an
376 error when an invalid symbol index is retrieved in ELF64_R_SYM of
377 a relocation seen in an input file.
378
2542e49e
JL
3792018-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
380 Alan Modra <amodra@gmail.com>
381
382 PR 23595
383 elf.c (copy_elf_program_header): When first segment contains
384 only the headers and SHT_NOBITS sections, use segment p_filesz
385 to calculate header and padding size. Use filepos of the first
386 section otherwise.
387
79c1bf3c 3882018-08-31 H.J. Lu <hongjiu.lu@intel.com>
b986869b
L
389
390 PR ld/23600
391 * archures.c (bfd_arch_get_compatible): Allow an IR object with
392 unknown architecture.
393
3d58e1fc
AM
3942018-08-31 Alan Modra <amodra@gmail.com>
395
396 * elf64-ppc.c (num_relocs_for_offset): New function.
397 (emit_relocs_for_offset): New function.
398 (use_global_in_relocs): New function, split out from..
399 (ppc_build_one_stub): ..here. Output relocations for notoc stubs.
400 (ppc_size_one_stub): Calculate reloc count for notoc stubs.
401 (ppc64_elf_size_stubs): Don't count undefined syms in stub_globals.
402
4a969973
AM
4032018-08-31 Alan Modra <amodra@gmail.com>
404
405 * reloc.c (BFD_RELOC_PPC64_REL16_HIGH, BFD_RELOC_PPC64_REL16_HIGHA),
406 (BFD_RELOC_PPC64_REL16_HIGHER, BFD_RELOC_PPC64_REL16_HIGHERA),
407 (BFD_RELOC_PPC64_REL16_HIGHEST, BFD_RELOC_PPC64_REL16_HIGHESTA):
408 Define.
409 * elf64-ppc.c (ppc64_elf_howto_raw): Add new REL16 howtos.
410 (ppc64_elf_reloc_type_lookup): Translate new REL16 relocs.
411 (ppc64_elf_check_relocs, ppc64_elf_relocate_section): Handle them.
412 * bfd-in2.h: Regenerate.
413 * libbfd.h: Regenerate.
414
f891966f
AM
4152018-08-31 Alan Modra <amodra@gmail.com>
416
417 * elf64-ppc.c: Correct _notoc stub comments.
418 (ppc_build_one_stub): Simplify output of branch for notoc
419 long branch stub. Don't include label offset of 8 bytes in
420 "off" calculation for notoc plt stub. Don't emit insns to get pc.
421 (build_offset): Emit insns to get pc here instead.
422 (size_offset): Add 4 extra insns.
423 (plt_stub_size): Adjust for "off" and size_offset changes.
424 (ppc_size_one_stub): Rearrange code into a switch, duplicating
425 some to better match ppc_build_one_stub.
426
9108bc33
CX
4272018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
428
429 * archures.c (bfd_architecture): New machine
430 bfd_mach_mips_gs264e.
431 * bfd-in2.h (bfd_architecture): Likewise.
432 * cpu-mips.c (enum I_xxx): Likewise.
433 (arch_info_struct): Likewise.
434 * elfxx-mips.c (_bfd_elf_mips_mach): Handle
435 E_MIPS_MACH_GS264E.
436 (mips_set_isa_flags): Likewise.
437 (mips_mach_extensions): Map bfd_mach_mips_gs264e to
438 bfd_mach_mips_gs464e extension.
439
bd782c07
CX
4402018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
441
442 * archures.c (bfd_architecture): New machine
443 bfd_mach_mips_gs464e.
444 * bfd-in2.h (bfd_architecture): Likewise.
445 * cpu-mips.c (enum I_xxx): Likewise.
446 (arch_info_struct): Likewise.
447 * elfxx-mips.c (_bfd_elf_mips_mach): Handle
448 E_MIPS_MACH_GS464E.
449 (mips_set_isa_flags): Likewise.
450 (mips_mach_extensions): Map bfd_mach_mips_gs464e to
451 bfd_mach_mips_gs464 extension.
452
ac8cb70f
CX
4532018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
454
455 * archures.c (bfd_architecture): Rename
456 bfd_mach_mips_loongson_3a to bfd_mach_mips_gs464.
457 * bfd-in2.h (bfd_architecture): Likewise.
458 * cpu-mips.c (enum I_xxx): Likewise.
459 (arch_info_struct): Likewise.
460 * elfxx-mips.c (_bfd_elf_mips_mach): Likewise.
461 (mips_set_isa_flags): Likewise.
462 (mips_mach_extensions): Likewise.
463 (bfd_mips_isa_ext_mach): Likewise.
464 (bfd_mips_isa_ext): Likewise.
465 (print_mips_isa_ext): Delete AFL_EXT_LOONGSON_3A.
466
a693765e
CX
4672018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
468
469 * elfxx-mips.c (print_mips_ases): Add Loongson EXT2 extension.
470
bdc6c06e
CX
4712018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
472
473 * elfxx-mips.c (infer_mips_abiflags): Use ases instead of
474 isa_ext for infer ABI flags.
475 (print_mips_ases): Add Loongson EXT extension.
476
716c08de
CX
4772018-08-29 Chenghua Xu <paul.hua.gm@gmail.com>
478
479 * elfxx-mips.c (print_mips_ases): Add CAM extension.
480
90c745dc
L
4812018-08-27 H.J. Lu <hongjiu.lu@intel.com>
482
483 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Don't mask
484 out the GNU_PROPERTY_X86_UINT32_VALID bit.
485
7a815dd5
L
4862018-08-25 H.J. Lu <hongjiu.lu@intel.com>
487
488 PR ld/23499
489 * elf.c (_bfd_elf_get_symbol_version_string): Return
490 _("<corrupt>") for corrupt symbol version info.
491
a9eafb08
L
4922018-08-24 H.J. Lu <hongjiu.lu@intel.com>
493
494 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Handle
495 X86_COMPAT_ISA_1_USED, X86_COMPAT_ISA_1_NEEDED,
496 X86_UINT32_AND_LO, X86_UINT32_AND_HI, X86_UINT32_OR_LO,
497 X86_UINT32_OR_HI, X86_UINT32_OR_AND_LO and X86_UINT32_OR_AND_HI
498 instead of X86_ISA_1_USED, X86_ISA_1_NEEDED and X86_FEATURE_1_AND.
499 (_bfd_x86_elf_merge_gnu_properties): Likewise.
500 (_bfd_x86_elf_link_setup_gnu_properties): Add X86_FEATURE_2_NEEDED
501 instead of X86_ISA_1_NEEDED.
502 (_bfd_x86_elf_link_fixup_gnu_properties): Handle
503 X86_COMPAT_ISA_1_USED, X86_COMPAT_ISA_1_NEEDED, X86_UINT32_AND_LO,
504 X86_UINT32_AND_HI, X86_UINT32_OR_LO, X86_UINT32_OR_HI,
505 X86_UINT32_OR_AND_LO and X86_UINT32_OR_AND_HI instead of
506 X86_ISA_1_USED, X86_ISA_1_NEEDED and X86_FEATURE_1_AND.
507
aa7bca9b
L
5082018-08-24 H.J. Lu <hongjiu.lu@intel.com>
509
510 * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Mask out the
511 GNU_PROPERTY_X86_UINT32_VALID bit.
512 (_bfd_x86_elf_link_fixup_gnu_properties): Set the
513 GNU_PROPERTY_X86_UINT32_VALID bit for non-relocatable output.
514
b0ceb98a
Z
5152018-08-23 Zenith423 <zenith432@users.sourceforge.net>
516
517 PR 23460
518 * plugin.c (struct plugin_list_entry): New structure.
519 (plugin_list): New variable.
520 (try_load_plugin): Place opened plugins on a list. Ensure that
521 the refcount in the dynamic loader is kept at 1.
522
f53ad3cf
AM
5232018-08-23 Alan Modra <amodra@gmail.com>
524
525 * elf64-ppc.c (ppc64_elf_relocate_section): Revise "call lacks
526 nop" error message.
527
38cf70ca
NC
5282018-08-23 Nick Clifton <nickc@redhat.com>
529
530 * elf64-hppa.c (elf_hppa_final_link_relocate): Replace unworkable
531 code with an assertion.
532
334d4ced
NC
5332018-08-23 Nick Clifton <nickc@redhat.com>
534
535 PR 23061
536 * coffgen.c (coff_pointerize_aux): Add table_end parameter. Use
537 it to prevent walking off the end of the table.
538 (coff_get_normalized_symtab): Pass internal_end pointer to
539 coff_pointerize_aux.
540
d0abeec8
AM
5412018-08-23 Alan Modra <amodra@gmail.com>
542
543 * elf64-ppc.c (ppc64_elf_relocate_section): Don't miss clearing
544 unresolved_reloc on ppc_stub_plt_call_notoc.
545
9eef0608
L
5462018-08-22 H.J. Lu <hongjiu.lu@intel.com>
547
548 PR ld/23536
549 * development.sh (experimental): New.
550
6f4286c4
HD
5512018-08-22 Helge Deller <deller@gmx.de>
552 Nick Clifton <nickc@redhat.com>
553
554 * elf-hppa.h (elf_hppa_fake_sections): Use SHT_PARISC_UNWIND as
555 the section type of the .PARISC.unwind section on 64-bit binaries
556 and SHT_PROGBITS for 32-bit binaries. Add a comment about it.
557 Add comment about the sh_entsize value.
558
3da64fe4
RA
5592018-08-22 Rafeal Auler <rafaelauler@gmail.com>
560
561 PR 23560
562 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Always update the
563 stub's target, since it may have been changed after the layout.
564
ebf983a4 5652018-08-21 John Darington <john@darrington.wattle.id.au>
4e57b456
JD
566
567 * elf32-s12z.c (opru18_reloc): New function.
ebf983a4 568 (elf_s12z_howto_table): Adjust Howto according to new knowledge.
4e57b456 569
ae19acf3 5702018-08-21 mephi42 <mephi42@gmail.com>
571
572 PR binutils/23315
573 * mach-o.c (bfd_mach_o_mangle_symbols): Update n_type even if
574 data is already considered filled.
575
46807bf4
AM
5762018-08-21 Alan Modra <amodra@gmail.com>
577
578 * elf64-ppc.c (HOW): Define.
579 (ONES): Delete.
580 (ppc64_elf_howto_raw): Use HOW to initialize entries.
581 * elf32-ppc.c (HOW): Define.
582 (ppc_elf_howto_raw): Use HOW to initialize entries, updating
583 R_PPC_VLE_REL15 and R_PPC_VLE_REL24 to use bitpos=0.
584
706704c8
AM
5852018-08-21 Alan Modra <amodra@gmail.com>
586
587 * reloc.c (reloc_howto_type): Typedef.
588 (bfd_symbol): Delete forward declaration.
589 (struct reloc_howto_struct): Add "negate" field. Make "size",
590 "bitsize", "rightshift", "bitpos", "complain_on_overflow",
591 "pc_relative", "partial_inplace", and "pcrel_offset" bitfields.
592 Rearrange for better packing. Revise comments.
593 (HOWTO): Map to rearranged reloc_howto_struct.
594 (bfd_get_reloc_size): Delete now unused cases.
595 (read_reloc, write_reloc): Likewise.
596 (apply_reloc, _bfd_relocate_contents): Test howto->negate
597 rather than howto->size < 0 for negated relocation values.
598 * coff-rs6000.c (xcoff_complain_overflow_bitfield_func): Avoid
599 signed/unsigned warning.
600 (xcoff_ppc_relocate_section): Delete "condition is always false"
601 code.
602 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
603 * cpu-ns32k.c (do_ns32k_reloc): Adjust to suit reloc_howto_struct
604 changes.
605 * vms-alpha.c (_bfd_vms_write_etir, alpha_vms_slurp_relocs): Use
606 size 16 for ALPHA_R_LINKAGE.
607 (alpha_howto_table <ALPHA_R_LINKAGE>): Set encoded size and
608 bitsize to zero.
609 * bfd-in.h (reloc_howto_type): Delete.
610 * bfd-in2.h: Regenerate.
611
487096bf
AM
6122018-08-21 Alan Modra <amodra@gmail.com>
613
614 * reloc.c (HOWTO): Revise comment.
615 (NEWHOWTO, HOWTO_PREPARE): Delete.
616 * coff-arm.c (coff_arm_reloc_type_lookup): Replace const struc
617 reloc_howto_struct with reloc_howto_type.
618 * ns32knetbsd.c (MY_bfd_reloc_type_lookup): Likewise.
619 * vms-alpha.c (alpha_vms_bfd_reloc_type_lookup): Likewise.
620 * elf-hppa.h (HOW): Define.
621 (elf_hppa_howto_table): Use it to simplify this table, correcting
622 name of R_PARISC_LTOFF16WF, R_PARISC_LTOFF_FPTR64, and
623 R_PARISC_LTOFF_FPTR16DF.
624 * elf32-mep.c (MEPREL): Use HOWTO.
625 * bfd-in2.h: Regenerate.
626
865dcc8a
AM
6272018-08-20 Alan Modra <amodra@gmail.com>
628
629 * mmo.c (valid_mmo_symbol_character_set): Initialize and make
630 array const.
631 (mmo_init): Don't init valid_mmo_symbol_character_set.
632
ba1c4c6f
AM
6332018-08-20 Alan Modra <amodra@gmail.com>
634
635 * rs6000-core.c (CORE_COMMONSZ): Balance parentheses in expression.
636
bfb1e8c1
L
6372018-08-17 H.J. Lu <hongjiu.lu@intel.com>
638
639 PR ld/23515
640 * elf-bfd.h (elf_backend_data): Add fixup_gnu_properties.
641 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Call
642 backend fixup_gnu_properties if it isn't NULL. Discard
643 .note.gnu.property section if all properties have been removed.
644 * elfxx-target.h (elf_backend_fixup_gnu_properties): New.
645 (elfNN_bed): Initialize fixup_gnu_properties.
646 * elfxx-x86.c (_bfd_x86_elf_link_fixup_gnu_properties): New
647 function.
648 * elfxx-x86.h (_bfd_x86_elf_link_fixup_gnu_properties): New
649 prototype.
650 (elf_backend_fixup_gnu_properties): New.
651
2cdcc330
AM
6522018-08-16 Alan Modra <amodra@gmail.com>
653
654 * elf64-ppc.c: Correct ppc_stub_long_branch_notoc example.
655 Formatting.
656
98641896
L
6572018-08-12 H.J. Lu <hongjiu.lu@intel.com>
658
659 PR binutils/23494
660 * Makefile.am (BFD32_LIBS): Add elf-properties.lo.
661 (BFD32_LIBS_CFILES): Add elf-properties.c.
662 (BFD32_BACKENDS): Remove elf-properties.lo.
663 (BFD32_BACKENDS_CFILES): Remove elf-properties.c.
664 * configure.ac (elf): Remove elf-properties.lo.
665 * Makefile.in: Regenerated.
666 * configure: Likewise.
667
ab9e3428
L
6682018-08-11 H.J. Lu <hongjiu.lu@intel.com>
669
670 PR ld/23428
671 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Don't
672 add X86_ISA_1_NEEDED property only if existing properties won't
673 be removed.
674
1dc9e2d6
AM
6752018-08-11 Alan Modra <amodra@gmail.com>
676
677 * reloc.c (bfd_get_reloc_size): Sort switch.
678 (read_reloc, write_reloc, apply_reloc): New functions.
679 (bfd_perform_relocation, bfd_install_relocation): Use apply_reloc.
680 (_bfd_relocate_contents): Use read_reloc and write_reloc.
681 (_bfd_clear_contents): Likewise.
682
7cf9ebc6
JD
6832018-08-11 John Darrington <john@darrington.wattle.id.au>
684
685 * reloc.c (_bfd_relocate_contents): Handle 3 byte relocs.
686 (_bfd_clear_contents): Likewise.
687 (bfd_perform_relocation): Likewise.
688 (bfd_install_relocation): Likewise.
689
48e30f52
L
6902018-08-10 H.J. Lu <hongjiu.lu@intel.com>
691
692 PR ld/23499
693 * elflink.c (bfd_elf_record_link_assignment): Always clear
694 h->verinfo.verdef when overriding a dynamic definition.
695
9c973a29
L
6962018-08-10 H.J. Lu <hongjiu.lu@intel.com>
697
698 PR binutils/23494
699 * elf-properties.c (elf_get_gnu_property_section_size): Always
700 use align_size as pr_datasz for GNU_PROPERTY_STACK_SIZE.
701 (elf_write_gnu_properties): Likewise.
702
6404ab99
L
7032018-08-08 H.J. Lu <hongjiu.lu@intel.com>
704
705 PR binutils/23494
706 * bfd.c (bfd_convert_section_size): Check BFD_DECOMPRESS after
707 calling _bfd_elf_convert_gnu_property_size to convert
708 .note.gnu.property section size.
709 (bfd_convert_section_contents): Check BFD_DECOMPRESS after
710 calling _bfd_elf_convert_gnu_properties to convert
711 .note.gnu.property section.
712 * elf-bfd.h (_bfd_elf_convert_gnu_property_size): New prototype.
713 (_bfd_elf_convert_gnu_properties): Likewise.
714 * elf-properties.c (elf_get_gnu_property_section_size): New
715 function.
716 (elf_write_gnu_properties): Likewise.
717 (_bfd_elf_convert_gnu_property_size): Likewise.
718 (_bfd_elf_convert_gnu_properties): Likewise.
719 (_bfd_elf_link_setup_gnu_properties): Use
720 elf_get_gnu_property_section_size and elf_write_gnu_properties.
721
f7309df2
L
7222018-08-08 H.J. Lu <hongjiu.lu@intel.com>
723
724 PR ld/23486
725 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove
726 GNU_PROPERTY_X86_ISA_1_USED if an input file doesn't have it.
727 (_bfd_x86_elf_link_setup_gnu_properties): Adding the
728 GNU_PROPERTY_X86_ISA_1_NEEDED, instead of
729 GNU_PROPERTY_X86_ISA_1_USED, property.
730
df136d64
AM
7312018-08-07 Alan Modra <amodra@gmail.com>
732
733 * elf64-ppc.c (struct map_stub): Delete tls_get_addr_opt_bctrl.
734 Add lr_restore, eh_size and eh_base.
735 (eh_advance, eh_advance_size): New functions.
736 (build_tls_get_addr_stub): Emit EH info for stub.
737 (ppc_build_one_stub): Likewise for _notoc stubs.
738 (ppc_size_one_stub): Size EH info for stub.
739 (group_sections): Init new map_stub fields.
740 (stub_eh_frame_size): Delete.
741 (ppc64_elf_size_stubs): Size EH info for stubs. Set up dummy EH
742 program for stubs.
743 (ppc64_elf_build_stubs): Reinit new map_stub fields. Set FDE
744 offset to stub section here..
745 (ppc64_elf_finish_dynamic_sections): ..rather than here.
746
e81b4c93
AM
7472018-08-07 Alan Modra <amodra@gmail.com>
748
749 * elf64-ppc.c (ppc64_elf_relocate_section): Don't skip first
750 instruction of __tls_get_addr_opt stub.
751 (plt_stub_size): Omit ALWAYS_EMIT_R2SAVE condition when
752 dealing with __tls_get_addr_opt stub.
753 (build_tls_get_addr_stub, ppc_size_one_stub): Likewise.
754
6af04484
CZ
7552018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
756
757 * elf32-arc.c (arc_elf_merge_private_bfd_data): Complain about
758 efalgs only when in/out exists.
759 (elf32_arc_section_from_shdr): Don't complain about 0x0c
760 section type. It is mwdt compiler specific.
761
2fd43d78 7622018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
763
764 * elf32-arc.c (arc_elf_merge_attributes): Fix merge attributes.
765
db1e1b45 7662018-08-06 Claudiu Zissulescu <claziss@synopsys.com>
767
768 * elf32-arc.c (arc_elf_merge_attributes): Handle
769 Tag_ARC_ATR_version.
770
05d0e962
AM
7712018-08-05 Alan Modra <amodra@gmail.com>
772
773 * elf64-ppc.c (ADDI_R12_R11, ADDI_R12_R12, LIS_R12),
774 (ADDIS_R12_R11, ORIS_R12_R12_0, ORI_R12_R12_0),
775 (SLDI_R12_R12_32, LDX_R12_R11_R12, ADD_R12_R11_R12): Define.
776 (ppc64_elf_howto_raw): Add R_PPC64_REL24_NOTOC entry.
777 (ppc64_elf_reloc_type_lookup): Support R_PPC64_REL24_NOTOC.
778 (ppc_stub_type): Add ppc_stub_long_branch_notoc,
779 ppc_stub_long_branch_both, ppc_stub_plt_branch_notoc,
780 ppc_stub_plt_branch_both, ppc_stub_plt_call_notoc, and
781 ppc_stub_plt_call_both.
782 (is_branch_reloc): Add R_PPC64_REL24_NOTOC.
783 (build_offset, size_offset): New functions.
784 (plt_stub_size): Support plt_call_notoc and plt_call_both.
785 (ppc_build_one_stub, ppc_size_one_stub): Support new stubs.
786 (toc_adjusting_stub_needed): Handle R_PPC64_REL24_NOTOC.
787 (ppc64_elf_size_stubs): Likewise, and new stubs.
788 (ppc64_elf_build_stubs, ppc64_elf_relocate_section): Likewise.
789 * reloc.c: Add BFD_RELOC_PPC64_REL24_NOTOC.
790 * bfd-in2.h: Regenerate.
791 * libbfd.h: Regenerate.
792
3f6ff479
AM
7932018-08-05 Alan Modra <amodra@gmail.com>
794
795 * elf64-ppc.c (ppc_build_one_stub): Lose "_r2off" in stub symbols.
796
13755f40
JW
7972018-08-02 Jim Wilson <jimw@sifive.com>
798
799 * elfnn-riscv.c (riscv_elf_create_dynamic_sections): For .tdata.dyn,
800 add SEC_LINKER_CREATED flag.
801
4a9f7d65
NC
8022018-08-01 Nick Clifton <nickc@redhat.com>
803
c25179e7
NC
804 * coff-rs6000.c (_bfd_xcoff_put_ldsymbol_name): Suppress warnings
805 about potentially truncated strncpy operations.
806 (_bfd_xcoff_put_symbol_name): Likewise.
807
4a9f7d65
NC
808 * elf32-avr.c (avr_stub_name): Check for a NULL return from
809 bfd_malloc.
810
103da91b
NC
8112018-08-01 Zenith <zenith432@users.sourceforge.net>
812
813 PR 23460
814 * plugin.c (bfd_plugin_open_input): Close file descriptor if the
815 call to fstat fails.
816 (try_claim): Always close the file descriptor at the end of the
817 function.
818 (try_load_plugin): If a plugin has already been registered, then
819 skip the dlopen and onload steps and go straight to claiming the
820 file. If these is an error, close the plugin.
821
1aa42141
AM
8222018-08-01 Alan Modra <amodra@gmail.com>
823
824 * elf64-ppc.c (plt_stub_pad): Delay plt_stub_size call until needed.
825 (ppc_build_one_stub): Don't set stub_offset, instead assert that
826 it is sane. Don't adjust stub_offset for alignment. Adjust size
827 calculation. Use "targ" temp when calculating offsets.
828 (ppc_size_one_stub): Set stub_offset here. Use "targ" temp when
829 calculating offsets. Adjust for alignment before setting
830 tls_get_addr_opt_bctrl.
831
cb86a42a
AM
8322018-08-01 Alan Modra <amodra@gmail.com>
833
834 * po/SRC-POTFILES.in: Regenerate.
835
a05b9f5e
NC
8362018-07-30 Nick Clifton <nickc@redhat.com>
837
838 PR 22706
839 * elf32-sh.c (sh_elf_relocate_section): When processing
840 translation relocs, fail if the relocation offset is too small.
841 Replace BFD_ASSERTs with more helpful error messages.
842
b8891f8d
AJ
8432018-07-30 Andrew Jenner <andrew@codesourcery.com>
844
845 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES): Add C-SKY.
846 (BFD32_BACKENDS, BFD_BACKENDS_CFILES): Likewise.
847 * Makefile.in: Regenerated.
848 * archures.c (enum bfd_architecture): Add bfd_arch_csky and
849 related bfd_mach defines.
850 (bfd_csky_arch): Declare.
851 (bfd_archures_list): Add C-SKY.
852 * bfd-in.h (elf32_csky_build_stubs): Declare.
853 (elf32_csky_size_stubs): Declare.
854 (elf32_csky_next_input_section: Declare.
855 (elf32_csky_setup_section_lists): Declare.
856 * bfd-in2.h: Regenerated.
857 * config.bfd: Add C-SKY.
858 * configure.ac: Likewise.
859 * configure: Regenerated.
860 * cpu-csky.c: New file.
861 * elf-bfd.h (enum elf_target_id): Add C-SKY.
862 * elf32-csky.c: New file.
863 * libbfd.h: Regenerated.
864 * reloc.c: Add C-SKY relocations.
865 * targets.c (csky_elf32_be_vec, csky_elf32_le_vec): Declare.
866 (_bfd_target_vector): Add C-SKY target vector entries.
867
469d3b57
JD
8682018-07-27 John Darrington <john@darrington.wattle.id.au>
869
870 * elf32-s12z.c (ELF_TARGET_ID): Don't define.
871
370e4b50
JD
8722018-07-27 John Darrington <john@darrington.wattle.id.au>
873
874 * libbfd.c (bfd_getb24, bfd_getl24): New functions.
875 (bfd_get_24, bfd_put_24): New macros.
876 * bfd-in2.h: Regenerate.
877
cd4d353f
JD
8782018-07-27 John Darrington <john@darrington.wattle.id.au>
879
880 * elf32-s12z.c (s12z_elf_set_mach_from_flags): Remove comment.
881
33cb30a1
AM
8822018-07-26 Alan Modra <amodra@gmail.com>
883
884 * elf64-ppc.c (ppc64_elf_size_stubs): Use a ppc_stub_long_branch_r2off
885 for calls to symbols with STO_PPC64_LOCAL_MASK bits set to 1.
886
49199304
AM
8872018-07-25 Alan Modra <amodra@gmail.com>
888
889 * elf32-ppc.c (ppc_elf_relax_section): Ignore common or undef locals.
890 Avoid trashing toff with added when used as a symbol index.
891 Ignore R_PPC_PLTREL24 addends in unused example code. Avoid
892 creating unnecessary fixups when relocatable.
893
be3e27bb
AM
8942018-07-25 Alan Modra <amodra@gmail.com>
895
896 * elf32-arm.c (elf32_arm_nabi_write_core_note): Disable
897 -Wstringop-truncation warning for gcc-8.0 too.
898 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
899 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
900 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
901 * elf32-s390.c (elf_s390_write_core_note): Comment fix.
902 * elf64-s390.c (elf_s390_write_core_note): Likewise.
903
67ce483b
AM
9042018-07-24 Alan Modra <amodra@gmail.com>
905
906 PR 23430
907 * dwarf2.c (dwarf_debug_section_enum): Fix comment typo.
908 * elf.c (bfd_section_from_shdr, elf_sort_sections): Likewise.
909
f82863d7
MF
9102018-07-23 Max Filippov <jcmvbkbc@gmail.com>
911
912 * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Move
913 relocation sections consistency check to always check both
914 .rela.dyn and .rela.plt when they exist. Rearrange variable
915 definition and assignment places.
916
5d3a462f
MF
9172018-07-23 Max Filippov <jcmvbkbc@gmail.com>
918
919 * elf32-xtensa.c (shrink_dynamic_reloc_sections): Shrink dynamic
920 relocations section for dynamic undefined weak symbols when
921 linking a shared object.
922
01bcaf63
TT
9232018-07-23 Tom Tromey <tom@tromey.com>
924
925 * elf.c (bfd_get_elf_phdrs): Don't call memcpy with size 0.
926
2376f038
EB
9272018-07-21 Eric Botcazou <ebotcazou@adacore.com>
928
929 * elf32-arm.c (elf32_arm_final_link_relocate) <R_ARM_GOT32>: Small
930 cleanup for the case of a global symbol that binds locally. Also
931 install a value in the GOT slot in the case of a local symbol in
932 a non-PIC link.
933
241e64e3
L
9342018-07-20 H.J. Lu <hongjiu.lu@intel.com>
935
936 PR ld/23428
937 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): If the
938 separate code program header is needed, make sure that the first
939 read-only PT_LOAD segment has no code by adding a
940 GNU_PROPERTY_X86_ISA_1_USED note.
941
8095d2f7
CX
9422018-07-20 Chenghua Xu <paul.hua.gm@gmail.com>
943 Maciej W. Rozycki <macro@mips.com>
944
945 * elfxx-mips.c (print_mips_ases): Add MMI extension.
946
db841b6f
MR
9472018-07-20 Maciej W. Rozycki <macro@mips.com>
948
949 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Do not
950 create DT_REL, DT_RELSZ or DT_RELENT dynamic entries if the
951 dynamic relocation section will be discarded from output.
952 (_bfd_mips_elf_finish_dynamic_sections) <DT_RELSZ>: Assert that
953 the dynamic relocation section will be retained in output.
954
d3554ec1
MR
9552018-07-18 Maciej W. Rozycki <macro@mips.com>
956
957 * xcofflink.c (xcoff_write_global_symbol): Fix symbol type
958 checks for defined weak symbols.
959
c691de6a
MR
9602018-07-17 Maciej W. Rozycki <macro@mips.com>
961
962 * elf32-nds32.c (nds32_elf_relax_loadstore): Use
963 `bfd_is_abs_symbol' rather than `bfd_is_abs_section' in checking
964 whether the symbol is absolute.
965 (nds32_elf_relax_lo12): Likewise.
966 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
967 (elfNN_aarch64_check_relocs): Likewise.
968 * xcofflink.c (xcoff_need_ldrel_p): Likewise.
969 (bfd_xcoff_import_symbol): Likewise.
970 (xcoff_write_global_symbol): Likewise.
971
d5c928c0
MR
9722018-07-17 Maciej W. Rozycki <macro@mips.com>
973
974 * linker.c (bfd_is_abs_symbol): New macro.
975 * bfd-in2.h: Regenerate.
976
cb2366c1
EBM
9772018-07-16 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
978
979 * elf-bfd.h (elfcore_write_ppc_tar): Add prototype.
980 (elfcore_write_ppc_ppr): Likewise.
981 (elfcore_write_ppc_dscr): Likewise.
982 (elfcore_write_ppc_ebb): Likewise.
983 (elfcore_write_ppc_pmu): Likewise.
984 (elfcore_write_ppc_tm_cgpr): Likewise.
985 (elfcore_write_ppc_tm_cfpr): Likewise.
986 (elfcore_write_ppc_tm_cvmx): Likewise.
987 (elfcore_write_ppc_tm_cvsx): Likewise.
988 (elfcore_write_ppc_tm_spr): Likewise.
989 (elfcore_write_ppc_tm_ctar): Likewise.
990 (elfcore_write_ppc_tm_cppr): Likewise.
991 (elfcore_write_ppc_tm_cdscr): Likewise.
992 * elf.c (elfcore_write_ppc_tar): New function.
993 (elfcore_write_ppc_ppr): Likewise.
994 (elfcore_write_ppc_dscr): Likewise.
995 (elfcore_write_ppc_ebb): Likewise.
996 (elfcore_write_ppc_pmu): Likewise.
997 (elfcore_write_ppc_tm_cgpr): Likewise.
998 (elfcore_write_ppc_tm_cfpr): Likewise.
999 (elfcore_write_ppc_tm_cvmx): Likewise.
1000 (elfcore_write_ppc_tm_cvsx): Likewise.
1001 (elfcore_write_ppc_tm_spr): Likewise.
1002 (elfcore_write_ppc_tm_ctar): Likewise.
1003 (elfcore_write_ppc_tm_cppr): Likewise.
1004 (elfcore_write_ppc_tm_cdscr): Likewise.
1005 (elfcore_write_register_note): Call them.
1006 (elfcore_grok_ppc_tar): New function.
1007 (elfcore_grok_ppc_ppr): Likewise.
1008 (elfcore_grok_ppc_dscr): Likewise.
1009 (elfcore_grok_ppc_ebb): Likewise.
1010 (elfcore_grok_ppc_pmu): Likewise.
1011 (elfcore_grok_ppc_tm_cgpr): Likewise.
1012 (elfcore_grok_ppc_tm_cfpr): Likewise.
1013 (elfcore_grok_ppc_tm_cvmx): Likewise.
1014 (elfcore_grok_ppc_tm_cvsx): Likewise.
1015 (elfcore_grok_ppc_tm_spr): Likewise.
1016 (elfcore_grok_ppc_tm_ctar): Likewise.
1017 (elfcore_grok_ppc_tm_cppr): Likewise.
1018 (elfcore_grok_ppc_tm_cdscr): Likewise.
1019 (elfcore_grok_note): Call them.
1020
1cb83cac
MR
10212018-07-11 Maciej W. Rozycki <macro@mips.com>
1022
1023 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
1024 than `!bfd_link_pic' in determining the dynamic symbol index.
1025 Avoid the index of -1.
1026 (mips_elf_initialize_tls_slots): Likewise. Flatten code by
1027 moving `dyn' to the beginning of the function block.
1028
9143e72c
MR
10292018-07-11 Maciej W. Rozycki <macro@mips.com>
1030 Rich Felker <bugdal@aerifal.cx>
1031
1032 PR ld/22570
1033 * elfxx-mips.c (mips_tls_got_relocs): Use `bfd_link_dll' rather
1034 than `bfd_link_pic' to determine whether dynamic relocations are
1035 to be produced.
1036 (mips_elf_initialize_tls_slots): Likewise.
1037
5270eddc
MR
10382018-07-10 Maciej W. Rozycki <macro@mips.com>
1039
1040 * elflink.c (bfd_elf_final_link): Rename `remove' local variable
1041 to `remove_section'.
1042
1594e052
AM
10432018-07-10 Alan Modra <amodra@gmail.com>
1044
1045 * elf32-xgate.h: Delete.
1046 * elf32-xgate.c: Delete unnecessary forward declarations, add two
1047 that are now needed.
1048 (xgate_elf_bfd_link_hash_table_create)
1049 (xgate_elf_bfd_link_hash_table_free)
1050 (xgate_elf_set_mach_from_flags, struct xgate_scan_param)
1051 (stub_hash_newfunc, elf32_xgate_add_symbol_hook)
1052 (elf32_xgate_setup_section_lists, elf32_xgate_size_stubs)
1053 (elf32_xgate_build_stubs, elf32_xgate_check_relocs)
1054 (elf32_xgate_relocate_section, _bfd_xgate_elf_set_private_flags)
1055 (elf32_xgate_post_process_headers): Delete.
1056 (elf32_xgate_backend_symbol_processing): New function.
1057 (xgate_elf_ignore_reloc, xgate_elf_special_reloc)
1058 (_bfd_xgate_elf_print_private_bfd_data): Make static.
1059 (ELF_TARGET_ID, elf_info_to_howto, elf_backend_check_relocs)
1060 (elf_backend_relocate_section, elf_backend_object_p)
1061 (elf_backend_final_write_processing, elf_backend_can_gc_sections)
1062 (elf_backend_post_process_headers, elf_backend_add_symbol_hook)
1063 (bfd_elf32_bfd_link_hash_table_create)
1064 (bfd_elf32_bfd_set_private_flags)
1065 (xgate_stub_hash_lookup): Don't define.
1066 (elf_backend_symbol_processing): Define.
1067 * elf-bfd.h (elf_target_id): Delete XGATE_ELF_DATA.
1068
4b8377e7
MR
10692018-07-09 Maciej W. Rozycki <macro@mips.com>
1070
1071 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Don't set
1072 `->needs_lazy_stub' if the stubs output section is the absolute
1073 section.
1074
872899f1
L
10752018-07-09 H.J. Lu <hongjiu.lu@intel.com>
1076
1077 PR ld/23388
1078 * configure.ac: Use changequote for "i[3-7]86-*-linux-*".
1079 * configure: Regenerated.
1080
61658d78
AM
10812018-07-09 Alan Modra <amodra@gmail.com>
1082
1083 * elf32-m68hc1x.c (elf32_m68hc11_post_process_headers): Call
1084 _bfd_elf_post_process_headers.
1085
c451bb34
MF
10862018-07-06 Max Filippov <jcmvbkbc@gmail.com>
1087
1088 * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Don't allocate
1089 space for dynamic relocation for undefined weak symbol.
1090 (elf_xtensa_relocate_section): Don't emit R_XTENSA_RELATIVE
1091 relocation for undefined weak symbols.
1092 (shrink_dynamic_reloc_sections): Don't shrink dynamic relocation
1093 section for relocations against undefined weak symbols.
1094
ad1cc4e4
AH
10952018-07-06 Alan Hayward <alan.hayward@arm.com>
1096
1097 * elf.c (elfcore_grok_aarch_sve): New function.
1098 (elfcore_grok_note): Check for Aarch64 SVE.
1099 (elfcore_write_aarch_sve): New function.
1100 (elfcore_write_register_note): Check for Aarch64 SVE.
1101 * elf-bfd.h(elfcore_grok_aarch_sve): New declaration.
1102
fe75810f
AM
11032018-07-06 Alan Modra <amodra@gmail.com>
1104
1105 * elf32-arm.c (elf32_arm_nabi_write_core_note): Don't use
1106 DIAGNOTIC_PUSH and DIAGNOSTIC_POP unconditionally.
1107 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
1108 * elf32-s390.c (elf_s390_write_core_note): Likewise.
1109 * elf64-ppc.c (ppc64_elf_write_core_note): Likewise.
1110 * elf64-s390.c (elf_s390_write_core_note): Likewise.
1111 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
1112
bb11866d
JW
11132018-07-05 Jim Wilson <jimw@sifive.com>
1114
1115 * config.bfd (riscv32*-*-*): Renamed from riscv32-*-*.
1116 (riscv64*-*-*): Likewise.
1117 (riscv-*-*): Add as an alias for riscv32*-*-*.
1118
56ad703d
L
11192018-07-05 H.J. Lu <hongjiu.lu@intel.com>
1120
1121 PR ld/23372
1122 * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove x86
1123 ISA properties with empty bits.
1124
d8dab054
NC
11252018-07-05 Nick Clifton <nickc@redhat.com>
1126
1127 * po/ru.po: Updated Russian translation.
1128
4a91d0ba
AM
11292018-07-05 Alan Modra <amodra@gmail.com>
1130
1131 * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Update prototype.
1132 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Return error
1133 on mismatch. Remove "warning: " from messages. Track last bfd
1134 used to set tags.
1135 (ppc_elf_merge_obj_attributes): Likewise. Handle status from
1136 _bfd_elf_ppc_merge_fp_attributes.
1137 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Handle status
1138 from _bfd_elf_ppc_merge_fp_attributes.
1139
db40acb0
L
11402018-07-04 H.J. Lu <hongjiu.lu@intel.com>
1141
1142 * Makefile.am (bfdinclude_HEADERS): Add $(INCDIR)/diagnostics.h.
1143 * Makefile.in: Regenerated.
1144
b8a6ced7
AM
11452018-07-03 Alan Modra <amodra@gmail.com>
1146
1147 * elflink.c (bfd_elf_final_link): Remove zero size .gnu.attributes
1148 sections.
1149
8d2c8c3d
AM
11502018-07-03 Alan Modra <amodra@gmail.com>
1151
1152 * elf-bfd.h (ATTR_TYPE_FLAG_ERROR, ATTR_TYPE_HAS_ERROR): Define.
1153 * elf-attrs.c (is_default_attr): Handle ATTR_TYPE_HAS_ERROR.
1154 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Use
1155 ATTR_TYPE_FLAG_INT_VAL. Set ATTR_TYPE_HAS_ERROR on finding
1156 incompatible attribute.
1157 (ppc_elf_merge_obj_attributes): Likewise. Return
1158 _bfd_elf_merge_object_attributes result.
1159 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Return
1160 _bfd_elf_merge_object_attributes result.
1161
af0bfb9c
AM
11622018-07-03 Alan Modra <amodra@gmail.com>
1163
1164 PR 17550
1165 * elflink.c (_bfd_elf_fix_symbol_flags): Hide dynamic symbols
1166 in discarded sections.
1167
12f09816
MR
11682018-07-02 Maciej W. Rozycki <macro@mips.com>
1169
1170 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Set
1171 `mark' for symbols created from `mips_elf_dynsym_rtproc_names'
1172 list.
1173
156f2c00
MR
11742018-07-02 Maciej W. Rozycki <macro@mips.com>
1175
1176 * elf64-mips.c (micromips_elf64_howto_table_rel): Add
1177 R_MICROMIPS_HI0_LO16, R_MICROMIPS_TLS_GD, R_MICROMIPS_TLS_LDM,
1178 R_MICROMIPS_TLS_DTPREL_HI16, R_MICROMIPS_TLS_DTPREL_LO16,
1179 R_MICROMIPS_TLS_GOTTPREL, R_MICROMIPS_TLS_TPREL_HI16,
1180 R_MICROMIPS_TLS_TPREL_LO16, R_MICROMIPS_GPREL7_S2 and
1181 R_MICROMIPS_PC23_S2 relocation entries.
1182 (micromips_elf64_howto_table_rela): Likewise.
1183 (micromips_reloc_map): Likewise.
1184 * elfn32-mips.c (elf_micromips_howto_table_rel): Likewise.
1185 (elf_micromips_howto_table_rela): Likewise.
1186 (micromips_reloc_map): Likewise.
1187
b638b5d5
L
11882018-07-02 H.J. Lu <hongjiu.lu@intel.com>
1189
1190 PR ld/23324
1191 * elf64-x86-64.c (elf_x86_64_relocate_section): Clear the
1192 R_X86_64_converted_reloc_bit bit.
1193
eac61af6
TT
11942018-07-02 Jeff Muizelaar <jrmuizel@gmail.com>
1195 Tom Tromey <tom@tromey.com>
1196
1197 PR 13157
1198 PR 21787
1199 * mach-o.c (bfd_mach_o_fat_close_and_cleanup): New function.
1200 (bfd_mach_o_close_and_cleanup): Redefine.
1201 * archive.c (_bfd_unlink_from_archive_parent): New function,
1202 extracted from..
1203 (_bfd_archive_close_and_cleanup): ..here.
1204 (bfd_generic_archive_p): Do not clear archive's format.
1205 * libbfd-in.h (_bfd_unlink_from_archive_parent): Declare.
1206 * libbfd.h: Regenerate.
1207
c0c468d5
TP
12082018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
1209
1210 * archures.c (bfd_mach_arm_5TEJ, bfd_mach_arm_6, bfd_mach_arm_6KZ,
1211 bfd_mach_arm_6T2, bfd_mach_arm_6K, bfd_mach_arm_7, bfd_mach_arm_6M,
1212 bfd_mach_arm_6SM, bfd_mach_arm_7EM, bfd_mach_arm_8, bfd_mach_arm_8R,
1213 bfd_mach_arm_8M_BASE, bfd_mach_arm_8M_MAIN): Define.
1214 * bfd-in2.h: Regenerate.
1215 * cpu-arm.c (arch_info_struct): Add entries for above new
1216 bfd_mach_arm values.
1217 * elf32-arm.c (bfd_arm_get_mach_from_attributes): Add Tag_CPU_arch to
1218 bfd_mach_arm mapping logic for pre Armv4 and Armv5TEJ and later
1219 architectures. Force assert failure for any new Tag_CPU_arch value.
1220
a05a5b64
TP
12212018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
1222
1223 * doc/bfdint.texi: Use command-line consistently when used in a
1224 compount word.
1225 * doc/bfdsumm.texi: Likewise.
1226
262e07d0
MR
12272018-06-29 Maciej W. Rozycki <macro@mips.com>
1228
1229 * elfxx-mips.c (allocate_dynrelocs): Remove extraneous symbol
1230 visibility check made for undefined weak symbols.
1231
30aa1306
NC
12322018-06-26 Nick Clifton <nickc@redhat.com>
1233
1234 * po/uk.po: Updated Ukranian translation.
1235
bb69498c
NC
12362018-06-25 Nick Clifton <nickc@redhat.com>
1237
1238 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_stub_name): Check
1239 for malloc returning NULL.
1240 (_bfd_aarch64_erratum_843419_fixup): Check for
1241 _bfd_aarch64_erratum_835769_stub_name returning NULL.
1242
71300e2c
NC
12432018-06-24 Nick Clifton <nickc@redhat.com>
1244
1245 * po/bfd.pot: Regenerate.
1246
5127f207
NC
12472018-06-24 Nick Clifton <nickc@redhat.com>
1248
1249 * version.m4: Update version string to 2.31.51.
1250 * configure: Regenerate.
1251
719d8288
NC
12522018-06-24 Nick Clifton <nickc@redhat.com>
1253
1254 2.31 branch created.
1255
1ced1a5f
MR
12562018-06-21 Maciej W. Rozycki <macro@mips.com>
1257
1258 * elfxx-mips.c (_bfd_mips_elf_compact_eh_encoding)
1259 (_bfd_mips_elf_cant_unwind_opcode): Correct formatting.
1260
334cd8a7
MR
12612018-06-21 Maciej W. Rozycki <macro@mips.com>
1262
1263 * elfxx-mips.c (_bfd_mips_post_process_headers): Keep
1264 EI_ABIVERSION setting together.
1265
bb29b84d
MR
12662018-06-21 Maciej W. Rozycki <macro@mips.com>
1267
1268 * elfxx-mips.c (MIPS_LIBC_ABI_DEFAULT, MIPS_LIBC_ABI_MIPS_PLT)
1269 (MIPS_LIBC_ABI_UNIQUE, MIPS_LIBC_ABI_MIPS_O32_FP64)
1270 (MIPS_LIBC_ABI_MAX): New enumeration constants.
1271 (_bfd_mips_post_process_headers): Use them in place of magic
1272 numbers.
1273
25eb8346
JW
12742018-06-21 Jim Wilson <jimw@sifive.com>
1275
1276 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Update comment.
1277 Use SYMBOL_REFERENCES_LOCAL. Add asserts for h->got.offset.
1278
d388f643
AM
12792018-06-21 Alan Modra <amodra@gmail.com>
1280
1281 * doc/Makefile.am (AUTOMAKE_OPTIONS): Add "foreign".
1282 * doc/Makefile.in: Regenerate.
1283
b939d8a0
RL
12842018-06-20 Renlin Li <renlin.li@arm.com>
1285
1286 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use PG_OFFSET
1287 to resolve BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
1288 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
1289 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
1290 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC,
1291 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
1292 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
1293 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
1294 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
1295
6077de06
NC
12962018-06-20 Nick Clifton <nickc@redhat.com>
1297
1298 PR 23316
1299 * opncls.c (get_build_id): Check for a negative or excessive data
1300 size in the build-id note.
1301
c6643fcc
NC
13022018-06-20 Nick Clifton <nickc@redhat.com>
1303
1304 PR 23299
1305 * mach-o.c (cputype): New function.
1306 (cpusubtype): New function.
1307 (bfd_mach_o_bfd_print_private_data): New function. Dispalys the
1308 values in the MACH-O file header.
1309 (bfd_mach_o_bfd_copy_private_header_data): Copy the cputype and
1310 cpusubtype fields from the input bfd's mach-o header to the output
1311 bfd.
1312 * mach-o-target.c (bfd_mach_o_bfd_print_private_bfd_data):
1313 Redefine to bfd_mach_o_bfd_print_private_data.
1314 * mach-o.h (bfd_mach_o_bfd_print_private_bfd_data): Prototype.
1315
789ff5b6
MR
13162018-06-19 Maciej W. Rozycki <macro@mips.com>
1317
1318 PR ld/22966
1319 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Verify the
1320 `.got.plt' entry referred is in range.
1321 (mips_finish_exec_plt): Correct the range check for `.got.plt'
1322 start. Replace the assertion used for that with a proper error
1323 message.
1324
6a382bce
MR
13252018-06-19 Maciej W. Rozycki <macro@mips.com>
1326
1327 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Fix
1328 formatting.
1329
d0ac1c44
SM
13302018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1331
1332 * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11.
1333 (INCLUDES): Rename to ...
1334 (AM_CPPFLAGS): ... this.
1335 * configure.ac: Remove AC_PREREQ.
1336 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add
1337 info-in-builddir no-texinfo.tex.
1338 (info_TEXINFOS): Rename bfd.texinfo to bfd.texi.
1339 * doc/bfd.texinfo: Rename to ...
1340 * doc/bfd.texi: ... this.
1341 * Makefile.in: Re-generate.
1342 * aclocal.m4: Re-generate.
1343 * config.in: Re-generate.
1344 * configure: Re-generate.
1345 * doc/Makefile.in: Re-generate.
1346
ed1299fe
M
13472018-06-18 Mephi <mephi42@gmail.com>
1348
1349 PR 23297
1350 * mach-o-x86-64.c (x86_64_howto_table): Add entry for
1351 BFD_RELOC_MACH_O_X86_64_RELOC_TLV.
1352 (bfd_mach_o_x86_64_canonicalize_one_reloc): Handle the new reloc.
1353 (bfd_mach_o_x86_64_swap_reloc_out): Likewise.
1354 * reloc.c (BFD_RELOC_MACH_O_X86_64_TV): New entry.
1355 * bfd-in2.h: Regenerate.
1356 * libbfd.h: Regenerate.
1357
6f20c942
FS
13582018-06-14 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
1359
1360 * elfxx-mips.c (print_mips_ases): Add GINV extension.
1361
1f6f5dba
L
13622018-06-14 H.J. Lu <hongjiu.lu@intel.com>
1363
1364 PR binutils/23267
1365 * elf.c (_bfd_elf_get_symbol_version_string): Check if the first
1366 symbol version is base version.
1367
7f923b7f
AM
13682018-06-14 Alan Modra <amodra@gmail.com>
1369
1370 * elf-bfd.h (struct elf_link_hash_table): Add "dynamic_relocs".
1371 * elflink.c (_bfd_elf_init_2_index_sections): Comment fix.
1372 (_bfd_elf_add_dynamic_entry): Set "dynamic_relocs".
1373 (_bfd_elf_link_renumber_dynsyms): Exclude all section symbols when
1374 "dynamic_relocs" is not set.
1375 * elfxx-mips.c (count_section_dynsyms): Likewise.
1376
ff91d2f0
AM
13772018-06-14 Alan Modra <amodra@gmail.com>
1378
1379 PR 23282
1380 * bfdio.c (bfd_seek): Optimize away seeks to current position.
1381
730c3174
SE
13822018-06-13 Scott Egerton <scott.egerton@imgtec.com>
1383 Faraz Shahbazker <Faraz.Shahbazker@mips.com>
1384
1385 * elfxx-mips.c (print_mips_ases): Add CRC.
1386
ecf99cc0
L
13872018-06-08 H.J. Lu <hongjiu.lu@intel.com>
1388
1389 PR ld/23161
1390 * elfxx-x86.c (elf_x86_hide_linker_defined): New function.
1391 (_bfd_x86_elf_link_check_relocs): Use it to hide hidden
1392 __bss_start, _end and _edata in shared libraries.
1393
527278f3
AM
13942018-06-07 Alan Modra <amodra@gmail.com>
1395
1396 * elf32-tic6x.c (elf32_tic6x_check_relocs): Reference
1397 __c6xabi_DSBT_BASE explicitly for R_C6000_SBR_* relocs.
1398
5c4ce239
AM
13992018-06-05 Alan Modra <amodra@gmail.com>
1400
1401 * bfd.c (struct bfd): Update comment on "where" usage.
1402 * bfdio.c (bfd_bwrite, bfd_stat): Use and update "iovec",
1403 "iostream", and "where" from containing archive file. Return
1404 error on NULL iovec.
1405 (bfd_bread): Similarly, and return error attempted out of
1406 bounds archive element access.
1407 (bfd_tell, bfd_flush): Use and update "iovec", "iostream", and
1408 "where" from containing archive file.
1409 (bfd_seek): Likewise. Return error on NULL iovec. Don't
1410 attempt to optimize away seeks. Don't paper over errors by
1411 calling bfd_tell.
1412 (bfd_get_mtime): Call bfd_stat rather than iovec->bstat.
1413 (bfd_get_size): Likewise.
1414 (bfd_mmap): Operate on and use iovec of containing archive
1415 file. Return error on NULL iovec.
1416 * cache.c (bfd_cache_lookup_worker): Abort if working on
1417 archive element bfd.
1418 (cache_bread_1): Delete bfd parameter, add FILE* parameter.
1419 Don't ignore zero byte reads.
1420 (cache_bread): Look up FILE* in cache here. Error on NULL
1421 lookup.
1422 (cache_bwrite): Rename "where" to "from".
1423 (cache_bmmap): Don't handle archive elements.
1424 * coffcode.h (coff_slurp_line_table): Exit early on zero
1425 lineno count.
1426 * bfd-in2.h: Regenerate.
1427
27b07675
AM
14282018-06-05 Alan Modra <amodra@gmail.com>
1429
1430 PR 23254
1431 * plugin.c (bfd_plugin_open_input): Allow for possibility of
1432 nested archives. Open file again for plugin.
1433 (try_claim): Don't save and restore file position. Close file
1434 if not claimed.
1435 * sysdep.h (O_BINARY): Define.
1436
4b8e28c7
MF
14372018-06-04 Max Filippov <jcmvbkbc@gmail.com>
1438
1439 * elf32-xtensa.c (xtensa_read_table_entries): Make global.
1440 (compute_fill_extra_space): Drop declaration. Rename function to
1441 xtensa_compute_fill_extra_space.
1442 (compute_ebb_actions, remove_dead_literal): Update references to
1443 compute_fill_extra_space.
1444
8255c61b
MF
14452018-06-04 Volodymyr Arbatov <arbatov@cadence.com>
1446
1447 * elf32-xtensa.c (elf32xtensa_separate_props): New global
1448 variable.
1449 (xtensa_add_names): New function.
1450 (xtensa_property_section_name): Add new parameter
1451 separate_sections, use it to choose property section name.
1452 (xtensa_get_separate_property_section): New function.
1453 (xtensa_get_property_section): Invoke
1454 xtensa_get_separate_property_section to get individual property
1455 section if it exists, common property section otherwise.
1456 (xtensa_make_property_section): Pass elf32xtensa_separate_props
1457 to xtensa_property_section_name.
1458
95da9854
L
14592018-06-04 H.J. Lu <hongjiu.lu@intel.com>
1460
1461 PR binutils/23146
1462 * bfd-in.h: Include "diagnostics.h".
1463 * bfd-in2.h: Regenerated.
1464 * elf32-arm.c (elf32_arm_nabi_write_core_note): Use
1465 DIAGNOSTIC_PUSH, DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION and
1466 DIAGNOSTIC_POP to silence GCC 8.1 warnings with
1467 -Wstringop-truncation.
1468 * elf32-ppc.c (ppc_elf_write_core_note): Likewse.
1469 * elf32-s390.c (elf_s390_write_core_note): Likewse.
1470 * elf64-ppc.c (ppc64_elf_write_core_note): Likewse.
1471 * elf64-s390.c (elf_s390_write_core_note): Likewse.
1472 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewse.
1473
137b5cbd
JW
14742018-06-03 Jim Wilson <jimw@sifive.com>
1475
cf7a5066
JW
1476 PR ld/23244
1477 * elfnn-riscv.c (riscv_elf_relocate_section) <R_RISCV_CALL>: Check
1478 for and handle an undefined weak with no PLT.
1479
137b5cbd
JW
1480 PR ld/22756
1481 * elfnn-riscv.c (riscv_relax_delete_bytes): Add versioned_hidden check
1482 to code that ignores duplicate symbols.
1483
55e99962
L
14842018-06-01 H.J. Lu <hongjiu.lu@intel.com>
1485
1486 * version.m4: Bump version to 2.30.52
1487 * configure: Regenerated.
1488
030157d8
AM
14892018-06-01 Alan Modra <amodra@gmail.com>
1490
1491 * bfd.c (_bfd_error_handler): Arrange for this function to be
1492 declared in bfd-in2.h.
1493 * libbfd-in.h (_bfd_error_handler): Don't declare.
1494 * libbfd.h: Regenerate.
1495 * bfd-in2.h: Regenerate.
1496
421acf18
AC
14972018-05-30 Amaan Cheval <amaan.cheval@gmail.com>
1498
1499 * config.bfd (x86_64-*-*): Add pei-x86-64 target to x86_64-*-rtems*
1500 This is needed to generate UEFI application image files from ELFs.
1501
92e68c1d
L
15022018-05-28 H.J. Lu <hongjiu.lu@intel.com>
1503
1504 * elf32-i386.c (elf_i386_lazy_plt): Add plt_tlsdesc_entry,
1505 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
1506 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
1507 plt_tlsdesc_got2_insn_end for TLSDESC entry.
1508 (elf_i386_lazy_ibt_plt): Likewise.
1509 (elf_i386_nacl_plt): Likewise.
1510 * elf64-x86-64.c (tlsdesc_plt_entry): Moved and renamed to ...
1511 (elf_x86_64_tlsdesc_plt_entry): This.
1512 (elf_x86_64_lazy_plt): Add plt_tlsdesc_entry,
1513 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
1514 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
1515 plt_tlsdesc_got2_insn_end for TLSDESC entry.
1516 (elf_x86_64_lazy_bnd_plt): Likewise.
1517 (elf_x86_64_lazy_ibt_plt): Likewise.
1518 (elf_x32_lazy_ibt_plt): Likewise.
1519 (elf_x86_64_nacl_plt): Likewise.
1520 (elf_x86_64_finish_dynamic_sections): Use plt_tlsdesc_entry,
1521 plt_tlsdesc_entry_size, plt_tlsdesc_got1_offset,
1522 plt_tlsdesc_got2_offset, plt_tlsdesc_got1_insn_end and
1523 plt_tlsdesc_got2_insn_end to update TLSDESC entry.
1524 * elfxx-x86.h (elf_x86_lazy_plt_layout): Update comments.
1525 Add plt_tlsdesc_entry, plt_tlsdesc_entry_size,
1526 plt_tlsdesc_got1_offset, plt_tlsdesc_got2_offset,
1527 plt_tlsdesc_got1_insn_end and plt_tlsdesc_got2_insn_end.
1528 (elf_x86_non_lazy_plt_layout): Update comments.
1529 (elf_x86_plt_layout): Likewise.
1530
ac98f9e2
L
15312018-05-28 H.J. Lu <hongjiu.lu@intel.com>
1532
1533 PR ld/23238
1534 * elf-s390-common.c (elf_s390_add_symbol_hook): Removed.
1535 * elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
1536 (elf_backend_add_symbol_hook): Likewise.
1537 * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
1538 (elf_backend_add_symbol_hook): Likewise.
1539 * elf32-s390.c (elf_backend_add_symbol_hook): Likewise.
1540 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
1541 (elf_backend_add_symbol_hook): Likewise.
1542 * elf64-s390.c (elf_backend_add_symbol_hook): Likewise.
1543 * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
1544 * elfxx-aarch64.h (_bfd_aarch64_elf_add_symbol_hook): Likewise.
1545 (elf_backend_add_symbol_hook): Likewise.
1546 * elf32-arm.c (elf32_arm_add_symbol_hook): Remove STT_GNU_IFUNC
1547 handling.
1548 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
1549 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
1550 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
1551 * elflink.c (elf_link_add_object_symbols): Set
1552 elf_gnu_symbol_ifunc for STT_GNU_IFUNC symbols.
1553
099bb8fb
L
15542018-05-26 H.J. Lu <hongjiu.lu@intel.com>
1555
1556 PR ld/23194
1557 * elf-bfd.h (_bfd_elf_link_hide_sym_by_version): New.
1558 * elflink.c (_bfd_elf_link_hide_versioned_symbol): New function.
1559 Extracted from _bfd_elf_link_assign_sym_version.
1560 (_bfd_elf_link_hide_sym_by_version): New function.
1561 (_bfd_elf_link_assign_sym_version): Use
1562 _bfd_elf_link_hide_versioned_symbol.
1563 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Call
1564 _bfd_elf_link_hide_sym_by_version instead of
1565 bfd_hide_sym_by_version. Don't check unversioned symbol.
1566
277eb7f6
AM
15672018-05-25 Alan Modra <amodra@gmail.com>
1568
1569 * Makefile.in: Regenerate.
1570 * po/SRC-POTFILES.in: Regenerate.
1571
629dabe3
AM
15722018-05-25 Alan Modra <amodra@gmail.com>
1573
1574 * configure.ac (bfd_cv_hidden): Run test with -Werror in CFLAGS.
1575 * configure: Regenerate.
1576
9ef6d1e3
L
15772018-05-23 H.J. Lu <hongjiu.lu@intel.com>
1578
1579 * elf64-ppc.c (ppc64_elf_write_core_note): Add ATTRIBUTE_NONSTRING
1580 to data.
1581
215f5271
AM
15822018-05-22 Alan Modra <amodra@gmail.com>
1583
1584 PR 23207
1585 * elf32-hppa.c (hppa_get_stub_entry): Return NULL when link_sec
1586 is NULL.
1587 (elf32_hppa_size_stubs): Only create stubs for load, alloc, code
1588 sections.
1589 (final_link_relocate): Revert last change.
1590
7455c018
AM
15912018-05-22 Alan Modra <amodra@gmail.com>
1592
1593 PR 23207
1594 * elf32-hppa.c (final_link_relocate): Don't look for plt call
1595 stubs in non-alloc sections.
1596
34a87bb0
L
15972018-05-21 H.J. Lu <hongjiu.lu@intel.com>
1598
1599 PR ld/23201
1600 * aout-target.h (MY_bfd_link_hide_symbol): New.
1601 * aout-tic30.c (MY_bfd_link_hide_symbol): Likewise.
1602 * binary.c (binary_bfd_link_hide_symbol): Likewise.
1603 * coff-alpha.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
1604 * coff-mips.c (_bfd_ecoff_bfd_link_hide_symbol): Likewise.
1605 * coff-rs6000.c (_bfd_xcoff_bfd_link_hide_symbol): Likewise.
1606 * coffcode.h (coff_bfd_link_hide_symbol): Likewise.
1607 * elf-bfd.h (_bfd_elf_link_hide_symbol): Likewise.
1608 * elfxx-target.h (bfd_elfNN_bfd_link_hide_symbol): Likewise.
1609 * i386msdos.c (msdos_bfd_link_hide_symbol): Likewise.
1610 * ihex.c (ihex_bfd_link_hide_symbol): Likewise.
1611 * libbfd-in.h (_bfd_nolink_bfd_link_hide_symbol): Likewise.
1612 * linker.c (_bfd_generic_link_hide_symbol): Likewise.
1613 (bfd_link_hide_symbol): Likewise.
1614 * mach-o-target.c (bfd_mach_o_bfd_link_hide_symbol): Likewise.
1615 * mmo.c (mmo_bfd_link_hide_symbol): Likewise.
1616 * pef.c (bfd_pef_bfd_link_hide_symbol): Likewise.
1617 * plugin.c (bfd_plugin_bfd_link_hide_symbol): Likewise.
1618 * ppcboot.c (ppcboot_bfd_link_hide_symbol): Likewise.
1619 * som.c (som_bfd_link_hide_symbol): Likewise.
1620 * srec.c (srec_bfd_link_hide_symbol): Likewise.
1621 * tekhex.c (tekhex_bfd_link_hide_symbol): Likewise.
1622 * vms-alpha.c (vms_bfd_link_hide_symbol): Likewise.
1623 (alpha_vms_bfd_link_hide_symbol): Likewise.
1624 * xsym.c (bfd_sym_bfd_link_hide_symbol): Likewise.
1625 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
1626 _bfd_generic_link_hide_symbol.
1627 (rs6000_xcoff64_aix_vec): Likewise.
1628 * elflink.c (bfd_elf_record_link_assignment): Don't make forced
1629 local symbol dynamic.
1630 (_bfd_elf_link_hide_symbol): New function.
1631 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1632 check root.ldscript_def.
1633 * targets.c (bfd_target): Add _bfd_link_hide_symbol.
1634 (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_link_hide_symbol.
1635 * bfd-in2.h: Regenerated.
1636 * libbfd.h: Likewise.
1637
bae363f1
L
16382018-05-21 H.J. Lu <hongjiu.lu@intel.com>
1639
1640 PR binutils/23199
1641 * elf.c (setup_group): Mark section in a section group with
1642 SHF_GROUP.
1643
97373b2e
L
16442018-05-18 H.J. Lu <hongjiu.lu@intel.com>
1645
1646 PR ld/23194
1647 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1648 set eh->local_ref to 1 if a symbol is versioned and there is a
1649 version script.
1650
7f999549
JW
16512018-05-18 Kito Cheng <kito.cheng@gmail.com>
1652
1653 * elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Handle
1654 EF_RISCV_RVE.
1655
6487709f
JW
16562018-05-18 Jim Wilson <jimw@sifive.com>
1657
1658 * elfnn-riscv.c (allocate_dynrelocs): Discard dynamic relocations if
1659 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1660 (riscv_elf_relocate_section): Don't generate dynamic relocation if
1661 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1662 (riscv_elf_finish_dynamic_symbol): Likewise.
1663
7b4ae824
JD
16642018-05-18 John Darrington <john@darrington.wattle.id.au>
1665
1666 * Makefile.am: Add s12z files.
1667 * Makefile.in: Regenerate.
1668 * archures.c: Add bfd_s12z_arch.
1669 * bfd-in.h: Add exports of bfd_putb24 and bfd_putl24.
1670 * bfd-in2.h: Regenerate.
1671 * config.bfd: Add s12z target.
1672 * configure.ac: Add s12z target.
1673 * configure: Regenerate.
1674 * cpu-s12z.c: New file.
1675 * elf32-s12z.c: New file.
1676 * libbfd.c (bfd_putb24): New function.
1677 (bfd_putl24): New function.
1678 * libbfd.h: Regenerate.
1679 * reloc.c: Add s12z relocations.
1680 (bfd_get_reloc_size): Handle size 5 relocs.
1681 * targets.c: Add s12z_elf32_vec.
1682
011b32fd
L
16832018-05-18 H.J. Lu <hongjiu.lu@intel.com>
1684
1685 PR ld/23189
1686 * elf32-i386.c (elf_i386_relocate_section): Handle R_386_GOT32X
1687 like R_386_GOT32.
1688 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1689 set eh->local_ref to 1 for linker defined symbols.
1690
4bba0fb1
AM
16912018-05-18 Alan Modra <amodra@gmail.com>
1692
1693 PR 23199
1694 * elf.c (setup_group): Formatting. Check that SHT_GROUP entries
1695 don't point at other SHT_GROUP sections. Set shdr corresponding
1696 to invalid entry, to NULL rather than section 0. Identify
1697 SHT_GROUP section index when reporting an error. Cope with NULL
1698 shdr pointer.
1699
8722de9c
AM
17002018-05-18 Alan Modra <amodra@gmail.com>
1701
1702 * libbfd-in.h (ATTRIBUTE_HIDDEN): Define and use throughout.
1703 * configure.ac (HAVE_HIDDEN): Check compiler support for hidden
1704 visibility.
1705 * libbfd.h: Regenerate.
1706 * configure: Regenerate.
1707 * config.in: Regenerate.
1708
0b439543
AM
17092018-05-18 Alan Modra <amodra@gmail.com>
1710
1711 * libbfd-in.h: Add include guard.
1712 * libcoff-in.h: Likewise.
1713 * doc/Makefile.am (libbfd.h, libcoff.h): Append another #endif.
1714 * doc/Makefile.in: Regenerate.
1715 * libbfd.h: Regenerate.
1716 * libcoff.h: Regenerate.
1717
1624c9ca
MR
17182018-05-16 Maciej W. Rozycki <macro@mips.com>
1719
1720 * elf32-nds32.c (nds32_convert_32_to_16): Preset `insn_type'.
1721
7cf7fcc8
AM
17222018-05-16 Alan Modra <amodra@gmail.com>
1723
1724 PR 22458
1725 * format.c (struct bfd_preserve): Add section_id.
1726 (bfd_preserve_save, bfd_preserve_restore): Save and restore
1727 _bfd_section_id.
1728 (bfd_reinit): Set _bfd_section_id.
1729 (bfd_check_format_matches): Put all matches of any priority into
1730 matching_vector. Save initial section id and start each attempted
1731 match at that section id.
1732 * libbfd-in.h (_bfd_section_id): Declare.
1733 * section.c (_bfd_section_id): Rename from section_id and make
1734 global. Adjust uses.
1735 (bfd_get_next_section_id): Delete.
1736 * elf64-ppc.c (ppc64_elf_setup_section_lists): Replace use of
1737 bfd_get_section_id with _bfd_section_id.
1738 * libbfd.h: Regenerate.
1739 * bfd-in2.h: Regenerate.
1740
810ed4db
CG
17412018-05-15 Christophe Guillon <christophe.guillon@st.com>
1742
1743 * coffcode.h (coff_bigobj_swap_aux_in): Make sure that all fields
1744 of the aux structure are initialised.
1745
1678bd35
FT
17462018-05-15 Francois H. Theron <francois.theron@netronome.com>
1747
1748 * targets.c: Wrap nfp_elf64_vec in BFD64 ifdef.
1749
293b4d4f
NC
17502018-05-15 Nick Clifton <nickc@redhat.com>
1751
1752 * po/pt.po: New Portuguese translation.
1753 * configure.ac (ALL_LINGUAS): Add pt.
1754 * configure: Regenerate.
1755
4ec09950
L
17562018-05-14 H.J. Lu <hongjiu.lu@intel.com>
1757
1758 PR ld/23169
1759 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Don't issue
1760 an error on IFUNC pointer defined in PDE.
1761 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Call
1762 _bfd_x86_elf_link_fixup_ifunc_symbol.
1763 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1764 * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): New
1765 function.
1766 * elfxx-x86.h (_bfd_x86_elf_link_fixup_ifunc_symbol): New.
1767
9bc935ef
L
17682018-05-14 H.J. Lu <hongjiu.lu@intel.com>
1769
1770 PR ld/23162
1771 * elfxx-x86.c (elf_x86_linker_defined): New function.
1772 (_bfd_x86_elf_link_check_relocs): Use it to mark __bss_start,
1773 _end and _edata locally defined within executables.
1774
9933dc52
AM
17752018-05-12 Alan Modra <amodra@gmail.com>
1776
1777 PR 20659
1778 * elf.c (rewrite_elf_program_header): Use segment_mark only for
1779 PT_LOAD headers. Delete first_matching_lma and first_suggested_lma.
1780 Instead make matching_lma and suggested_lma pointers to the
1781 sections. Align section vma and lma calculated from segment.
1782 Don't clear includes_phdrs or includes_filehdr based on p_paddr
1783 test. Try to handle alignment padding before first section by
1784 adjusting new segment lma down. Adjust PT_PHDR map p_paddr.
1785
493ffac5
DD
17862018-05-09 Dimitar Dimitrov <dimitar@dinux.eu>
1787
1788 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Make LDI32 relocation
1789 conformant to TI ABI.
1790 (pru_elf32_relax_section): Likewise.
1791 (pru_elf_relax_delete_bytes): Fix offsets for new LDI32 code.
1792 * elf32-pru.c (pru_elf32_do_ldi32_relocate): Ignore addend.
1793 (pru_elf32_pmem_relocate): Trap - should not get here.
1794 (pru_elf32_relocate_section): Add support for REL relocations.
1795 (elf_info_to_howto_rel): Enable REL.
1796 (elf_backend_may_use_rel_p): Likewise.
1797 (elf_backend_may_use_rela_p): Likewise.
1798 (elf_backend_default_use_rela_p): Likewise.
1799
b4560c7d
AM
18002018-05-09 Alan Modra <amodra@gmail.com>
1801
1802 PR 23148
1803 * peXXigen.c (pe_print_edata): Correct minimum size.
1804
53db9cf9
AM
18052018-05-09 Alan Modra <amodra@gmail.com>
1806
1807 PR 23147
1808 * peXXigen.c (pe_print_idata): Bound check hint_addr.
1809
95a6d235
NC
18102018-05-08 Nick Clifton <nickc@redhat.com>
1811
1812 PR 22809
1813 * elf.c (bfd_elf_get_str_section): Check for an excessively large
1814 string section.
1815 * elf-attrs.c (_bfd_elf_parse_attributes): Issue an error if the
1816 attribute section is larger than the size of the file.
1817
7bd8862c
AM
18182018-05-07 Alan Modra <amodra@gmail.com>
1819
1820 * cofflink.c (_bfd_coff_link_input_bfd): Use memcmp rather than
1821 strncmp when checking for ".bf" special symbol.
1822 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Make pe_required_section_flags
1823 section name a char array, remove sentinal known_sections entry,
1824 and adjust loop over known_sections to suit. Use memcmp rather
1825 than strncmp.
1826
602f1657
AM
18272018-05-04 Alan Modra <amodra@gmail.com>
1828
1829 * elf-linux-core.h (struct elf_external_linux_prpsinfo32_ugid32),
1830 (struct elf_external_linux_prpsinfo32_ugid16),
1831 (struct elf_external_linux_prpsinfo64_ugid32),
1832 (struct elf_external_linux_prpsinfo64_ugid16): Add ATTRIBUTE_NONSTRING
1833 to pr_fname and pr_psargs fields. Remove GCC diagnostic pragmas.
1834 Move comment to..
1835 * elf.c (elfcore_write_prpsinfo): ..here. Indent nested preprocessor
1836 directives.
1837 * elf32-arm.c (elf32_arm_nabi_write_core_note): Add ATTRIBUTE_NONSTRING
1838 to data.
1839 * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
1840 * elf32-s390.c (elf_s390_write_core_note): Likewise.
1841 * elf64-s390.c (elf_s390_write_core_note): Likewise.
1842 * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
1843 * elf64-x86-64.c (elf_x86_64_write_core_note): Add GCC diagnostic
1844 pragmas.
1845 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Use strnlen to avoid
1846 false positive gcc-8 warning.
7bd8862c 1847 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
602f1657 1848
a27ca19c
TMQMF
18492018-05-04 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
1850
1851 * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Fix the order
1852 of arguments when warning about different long double types.
1853
3be08ea4
SA
18542018-05-03 Simon Atanasyan <simon@atanasyan.com>
1855
1856 * elf32-mips.c: (elf32_mips_fixup_symbol): New function.
1857 (elf_backend_fixup_symbol): New macro.
1858 * elfxx-mips.c: (mips_elf_output_extsym): Discard _gp_disp
1859 handling.
1860 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
1861
fe944acf
FT
18622018-04-30 Francois H. Theron <francois.theron@netronome.com>
1863
1864 * Makefile.am: Added NFP files to build.
1865 * archures.c: Added bfd_arch_nfp
1866 * config.bfd: Added NFP support.
1867 * configure.ac: Added NFP support.
1868 * cpu-nfp.c: New, for NFP support.
1869 * elf-bfd.h: Added elf_section_info()
1870 * elf64-nfp.c: New, for NFP support.
1871 * po/SRC-POTFILES.in: Added NFP source files.
1872 * targets.c: Added nfp_elf64_vec
1873 * bfd-in2.h: Regenerate.
1874 * Makefile.in: Regenerate.
1875 * configure: Regenerate.
1876
ffa389a3
AM
18772018-04-27 Alan Modra <amodra@gmail.com>
1878
1879 * bfd-in2.h: Regenerate.
1880 * libbfd.h: Regenerate.
1881
04383fd1
AM
18822018-04-27 Alan Modra <amodra@gmail.com>
1883
1884 PR 23123
1885 PR 22374
1886 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt
1887 relocs for ifuncs.
1888 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes.
1889
bfa5bd2a
PA
18902018-04-26 Pedro Alves <palves@redhat.com>
1891
1892 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't consider
1893 ifunc and non-ifunc symbols duplicates.
1894
59029f57
CL
18952018-04-25 Christophe Lyon <christophe.lyon@st.com>
1896 Mickaël Guêné <mickael.guene@st.com>
1897
1898 * elf32-arm.c (elf32_arm_fdpic_thumb_plt_entry): New.
1899 (elf32_arm_plt_needs_thumb_stub_p): Handle thumb-only case.
1900 (elf32_arm_populate_plt_entry): Likewise.
1901 (elf32_arm_output_plt_map_1): Likewise.
1902 (elf32_arm_output_arch_local_syms): Likewise.
1903
fac7bd64
CL
19042018-04-25 Christophe Lyon <christophe.lyon@st.com>
1905 Mickaël Guêné <mickael.guene@st.com>
1906
1907 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle
1908 _GLOBAL_OFFSET_TABLE_ in FDPIC mode.
1909
29e9b073
CL
19102018-04-25 Christophe Lyon <christophe.lyon@st.com>
1911 Mickaël Guêné <mickael.guene@st.com>
1912
1913 * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case
1914 for R_ARM_TARGET2.
1915
cb10292c
CL
19162018-04-25 Christophe Lyon <christophe.lyon@st.com>
1917 Mickaël Guêné <mickael.guene@st.com>
1918
1919 * elf32-arm.c (DEFAULT_STACK_SIZE): New.
1920 (elf32_arm_always_size_sections): Create stack segment.
1921
5c5a4843
CL
19222018-04-25 Christophe Lyon <christophe.lyon@st.com>
1923 Mickaël Guêné <mickael.guene@st.com>
1924
1925 * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC)
1926 (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New
1927 relocations.
1928 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC,
1929 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations.
1930 (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC,
1931 R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC.
1932 (struct elf32_arm_link_hash_table): Update comment.
1933 (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations.
1934 (IS_ARM_TLS_RELOC): Likewise.
1935 (elf32_arm_check_relocs): Likewise.
1936 (allocate_dynrelocs_for_symbol): Likewise.
1937 (elf32_arm_size_dynamic_sections): Update comment.
1938 * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC,
1939 BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC.
1940
7801f98f
CL
19412018-04-25 Christophe Lyon <christophe.lyon@st.com>
1942 Mickaël Guêné <mickael.guene@st.com>
1943
1944 * elf32-arm.c (elf32_arm_fdpic_plt_entry): New.
1945 (elf32_arm_create_dynamic_sections): Handle FDPIC.
1946 (elf32_arm_allocate_plt_entry): Likewise.
1947 (elf32_arm_populate_plt_entry): Likewise.
1948 (elf32_arm_output_plt_map_1): Likewise.
1949
e8b09b87
CL
19502018-04-25 Christophe Lyon <christophe.lyon@st.com>
1951 Mickaël Guêné <mickael.guene@st.com>
1952
1953 * elf32-arm.c (struct fdpic_local): New.
1954 (elf_arm_obj_tdata): Add local_fdpic_cnts field.
1955 (elf32_arm_local_fdpic_cnts): New.
1956 (struct fdpic_global): New.
1957 (elf32_arm_link_hash_entry): Add fdpic_cnts field.
1958 (elf32_arm_link_hash_table): Add srofixup field.
1959 (arm_elf_add_rofixup): New.
1960 (arm_elf_fill_funcdesc): New.
1961 (elf32_arm_link_hash_newfunc): Handle fdpic_cnts.
1962 (elf32_arm_allocate_local_sym_info): Likewise.
1963 (create_got_section): Create .rofixup section.
1964 (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts.
1965 (bfd_elf32_arm_set_target_params): Handle FDPIC.
1966 (elf32_arm_final_link_relocate): Likewise.
1967 (elf32_arm_check_relocs): Likewise.
1968 (allocate_dynrelocs_for_symbol): Likewise.
1969 (elf32_arm_size_dynamic_sections): Likewise.
1970 (elf32_arm_finish_dynamic_sections): Likewise.
1971 (elf32_arm_output_arch_local_syms): Likewise.
1972 (elf32_arm_fdpic_omit_section_dynsym): New.
1973
188fd7ae
CL
19742018-04-25 Christophe Lyon <christophe.lyon@st.com>
1975 Mickaël Guêné <mickael.guene@st.com>
1976
1977 * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC)
1978 (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC)
1979 (BFD_RELOC_ARM_FUNCDESC_VALUE): New.
1980 * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC,
1981 R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE.
1982 (elf32_arm_howto_from_type): Take new members of
1983 elf32_arm_howto_table_2 into account.
1984 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC,
1985 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
1986 BFD_RELOC_ARM_FUNCDESC_VALUE.
1987 * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC,
1988 BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
1989 BFD_RELOC_ARM_FUNCDESC_VALUE.
1990
18a20338
CL
19912018-04-25 Christophe Lyon <christophe.lyon@st.com>
1992 Mickaël Guêné <mickael.guene@st.com>
1993
1994 * elf32-arm.c (elf32_arm_print_private_bfd_data): Support
1995 EF_ARM_PIC and ELFOSABI_ARM_FDPIC.
1996 (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC.
1997 (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC.
1998
617a5ada
CL
19992018-04-25 Christophe Lyon <christophe.lyon@st.com>
2000 Mickaël Guêné <mickael.guene@st.com>
2001
2002 * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and
2003 arm_elf32_fdpic_le_vec to targ_selvecs. Accept
2004 arm*-*-uclinuxfdpiceabi.
2005 * configure.ac: Add support for arm_elf32_fdpic_be_vec and
2006 arm_elf32_fdpic_le_vec.
2007 * configure: Regenerate.
2008 * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p.
2009 (elf32_arm_link_hash_table_create): Initialize fdpic_p.
2010 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM)
2011 (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets.
2012 (elf32_arm_fdpic_link_hash_table_create): New.
2013 * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and
2014 arm_elf32_fdpic_le_vec.
2015
d99b4b92
AM
20162018-04-25 Alan Modra <amodra@gmail.com>
2017
2018 * elf-linux-core.h: Disable gcc-8 string truncation warning.
2019 * elf.c (elfcore_write_prpsinfo): Likewise.
2020
20212018-04-25 Alan Modra <amodra@gmail.com>
2ac93be7
AM
2022
2023 * Makefile.am: Remove arm-aout and arm-coff support.
2024 * config.bfd: Likewise.
2025 * configure.ac: Likewise.
2026 * targets.c: Likewise.
2027 * aout-arm.c: Delete.
2028 * armnetbsd.c: Delete.
2029 * riscix.c: Delete.
2030 * Makefile.in: Regenerate.
2031 * configure: Regenerate.
2032 * po/SRC-POTFILES.in: Regenerate.
2033
aa4a8c2a
NC
20342018-04-24 Nick Clifton <nickc@redhat.com>
2035
db0c309f
NC
2036 PR 23113
2037 * elf.c (ignore_section_sym): Check for the output_section pointer
2038 being NULL before dereferencing it.
2039
aa4a8c2a
NC
2040 PR 23110
2041 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for
2042 a negative PE_DEBUG_DATA size before iterating over the debug data.
2043
b9f26d2e
AM
20442018-04-23 Alan Modra <amodra@gmail.com>
2045
2046 * elf-linux-core.h: Revert last change.
2047 * elf.c: Likewise.
2048
bf82069d
NC
20492018-04-23 Nick Clifton <nickc@redhat.com>
2050
2051 PR 23056
2052 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
2053 the end of the string table, and zero it.
2054
5a6312e8
AM
20552018-04-23 Alan Modra <amodra@gmail.com>
2056
2057 * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable
2058 gcc-8 string truncation warning.
2059 (swap_linux_prpsinfo32_ugid16_out): Likewise.
2060 (swap_linux_prpsinfo64_ugid32_out): Likewise.
2061 (swap_linux_prpsinfo64_ugid16_out): Likewise.
2062 * elf.c (elfcore_write_prpsinfo): Likewise.
2063
bf82069d
NC
20642018-04-23 Nick Clifton <nickc@redhat.com>
2065
2066 PR 23056
2067 * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
2068 the end of the string table, and zero it.
2069
4352556b
AM
20702018-04-20 Alan Modra <amodra@gmail.com>
2071
2072 PR 22978
2073 * elf32-hppa.c (got_relocs_needed): Add extra param to special
2074 case both dtprel and tprel relocs.
2075 (allocate_dynrelocs): Adjust conditions for got relocs.
2076 (elf32_hppa_relocate_section): Likewise for local sym got relocs.
2077 Emit dynamic relocs on TLS GOT entries for shared libraries,
2078 not when pic. Omit dynamic reloc on dtprel entry when local,
2079 and on tprel entry when local and executable.
2080
f6a8b8c7
AM
20812018-04-19 Alan Modra <amodra@gmail.com>
2082
2083 PR 22537
2084 * elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1.
2085 (hppa_type_of_stub): Don't return a long branch stub for
2086 symbols other than those defined statically.
2087
8e415ce8
AM
20882018-04-19 Alan Modra <amodra@gmail.com>
2089
2090 * Makefile.am: Revert 2018-04-18 coff-mips changes.
2091 * config.bfd: Add back mips_ecoff_le_vec and mips_ecoff_be_vec
2092 to selvecs for mips targets change 2018-04-18.
2093 * configure.ac: Reinstate mips_ecoff_le_vec, mips_ecoff_be_vec
2094 and mips_ecoff_bele_vec.
2095 * targets.c: Likewise.
2096 * coff-mips.c: Resurrect.
2097 * Makefile.in: Regenerate.
2098 * configure: Regenerate.
2099 * po/SRC-POTFILES.in: Regenerate.
2100
3596d8ce
AM
21012018-04-18 Alan Modra <amodra@gmail.com>
2102
2103 * Makefile.am: Remove mips aout and coff support.
2104 * config.bfd: Likewise.
2105 * configure.ac: Likewise.
2106 * targets.c: Likewise.
2107 * coff-mips.c: Delete
2108 * mipsbsd.c: Delete
2109 * pe-mips.c: Delete
2110 * pei-mips.c: Delete
2111 * Makefile.in: Regenerate.
2112 * configure: Regenerate.
2113 * po/SRC-POTFILES.in: Regenerate.
2114
d9dd2045
L
21152018-04-17 H.J. Lu <hongjiu.lu@intel.com>
2116
2117 * elf32-i386.c (elf32_bed): Define before including
2118 "elf32-target.h".
2119 * elf64-x86-64.c (elf64_bed): Define before including
2120 "elf64-target.h".
2121 (elf32_bed): Define before including "elf32-target.h".
2122
e4e6a73d
L
21232018-04-17 H.J. Lu <hongjiu.lu@intel.com>
2124
2125 PR ld/23055
2126 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a
2127 normal input file with compatible relocation.
2128
c65c21e1
AM
21292018-04-18 Alan Modra <amodra@gmail.com>
2130
2131 * Makefile.am: Remove support for assorted i386 aout and coff targets.
2132 * config.bfd: Likewise.
2133 * configure.ac: Likewise.
2134 * doc/bfdint.texi: Likewise.
2135 * targets.c: Likewise.
2136 * freebsd.h: Delete.
2137 * i386dynix.c: Delete.
2138 * i386freebsd.c: Delete.
2139 * i386linux.c: Delete.
2140 * i386mach3.c: Delete.
2141 * i386netbsd.c: Delete.
2142 * i386os9k.c: Delete.
2143 * Makefile.in: Regenerate.
2144 * configure: Regenerate.
2145 * po/SRC-POTFILES.in: Regenerate.
2146
884d4d8a 21472018-04-17 Andrew Sadek <andrew.sadek.se@gmail.com>
3f0a5f17
ME
2148
2149 Microblaze Target: PIC data text relative
2150
2151 * bfd/reloc.c (2 new BFD relocations):
2152 BFD_RELOC_MICROBLAZE_64_TEXTPCREL &
2153 BFD_RELOC_MICROBLAZE_64_TEXTPCREL
2154 * bfd/bfd-in2.h: Regenerate
2155 * bfd/libbfd.h: Regenerate
2156 * bfd/elf32-microblaze.c (Handle new relocs): define 'HOWTO' of 3
2157 new relocs and handle them in both relocate and relax functions.
2158 (microblaze_elf_reloc_type_lookup): add mapping between for new
2159 bfd relocs.
2160 (microblaze_elf_relocate_section): Handle new relocs in case of
2161 elf relocation.
2162 (microblaze_elf_relax_section): Handle new relocs for elf relaxation.
2163
6327533b
NC
21642018-04-17 Nick Clifton <nickc@redhat.com>
2165
808346fc
NC
2166 PR 23055
2167 * aoutx.h (find_nearest_line): Check that the symbol name exists
2168 and is long enough, before attempting to see if it is for a .o
2169 file.
2170 * hash.c (bfd_hash_hash): Add an assertion that the string is not
2171 NULL.
2172 * linker.c (bfd_link_hash_lookup): Fail if the table or string are
2173 NULL.
2174 (_bfd_generic_link_add_archive_symbols): Fail if an archive entry
2175 has no name.
2176
6327533b
NC
2177 PR 23065
2178 * dwarf2.c (concat_filename): Check for a NULL table pointer.
2179
e9af4700
NC
21802018-04-16 Nick Clifton <nickc@redhat.com>
2181
2182 PR 23061
2183 * coffgen.c (coff_pointerize_aux): Check for an out of range
2184 fixup.
2185
ddb00039
AM
21862018-04-16 Alan Modra <amodra@gmail.com>
2187
2188 * Makefile.am: Remove arm-epoc-pe support.
2189 * coff-arm.c: Likewise.
2190 * config.bfd: Likewise.
2191 * configure.ac: Likewise.
2192 * targets.c: Likewise.
2193 * epoc-pe-arm.c: Delete.
2194 * epoc-pei-arm.c: Delete.
2195 * Makefile.in: Regenerate.
2196 * configure: Regenerate.
2197 * po/SRC-POTFILES.in: Regenerate.
2198
c9098af4
AM
21992018-04-16 Alan Modra <amodra@gmail.com>
2200
2201 * Makefile.am: Remove sparc-aout and sparc-coff support.
2202 * config.bfd: Likewise.
2203 * configure.ac: Likewise.
2204 * targets.c: Likewise.
2205 * aout-sparcle.c: Delete.
2206 * aoutf1.h: Delete.
2207 * cf-sparclynx.c: Delete.
2208 * coff-sparc.c: Delete.
2209 * demo64.c: Delete.
2210 * sparclinux.c: Delete.
2211 * sparclynx.c: Delete.
2212 * sparcnetbsd.c: Delete.
2213 * sunos.c: Delete.
2214 * Makefile.in: Regenerate.
2215 * configure: Regenerate.
2216 * po/SRC-POTFILES.in: Regenerate.
2217
dc12032b
AM
22182018-04-16 Alan Modra <amodra@gmail.com>
2219
2220 * Makefile.am: Remove m68k-aout and m68k-coff support.
2221 * aoutf1.h: Likewise.
2222 * aoutx.h: Likewise.
2223 * archive.c: Likewise.
2224 * bfd-in.h: Likewise.
2225 * bfd.c: Likewise.
2226 * coffcode.h: Likewise.
2227 * coffswap.h: Likewise.
2228 * config.bfd: Likewise.
2229 * configure.ac: Likewise.
2230 * configure.host: Likewise.
2231 * doc/bfd.texinfo: Likewise.
2232 * doc/bfdint.texi: Likewise.
2233 * freebsd.h: Likewise.
2234 * gen-aout.c: Likewise.
2235 * hpux-core.c: Likewise.
2236 * libaout.h: Likewise.
2237 * libbfd-in.h: Likewise.
2238 * pdp11.c: Likewise.
2239 * peicode.h: Likewise.
2240 * riscix.c: Likewise.
2241 * targets.c: Likewise.
2242 * aout0.c: Delete.
2243 * coff-apollo.c: Delete.
2244 * coff-aux.c: Delete.
2245 * coff-m68k.c: Delete.
2246 * coff-svm68k.c: Delete.
2247 * coff-u68k.c: Delete.
2248 * hosts/delta68.h: Delete.
2249 * hosts/hp300bsd.h: Delete.
2250 * hosts/m68kaux.h: Delete.
2251 * hosts/news.h: Delete.
2252 * hp300bsd.c: Delete.
2253 * hp300hpux.c: Delete.
2254 * liboasys.h: Delete.
2255 * m68k4knetbsd.c: Delete.
2256 * m68klinux.c: Delete.
2257 * m68knetbsd.c: Delete.
2258 * oasys.c: Delete.
2259 * versados.c: Delete.
2260 * Makefile.in: Regenerate.
2261 * bfd-in2.h: Regenerate.
2262 * configure: Regenerate.
2263 * libbfd.h: Regenerate.
2264 * po/SRC-POTFILES.in: Regenerate.
2265
211dc24b
AM
22662018-04-16 Alan Modra <amodra@gmail.com>
2267
2268 * Makefile.am: Remove sh5 and sh64 support.
2269 * archures.c: Likewise.
2270 * config.bfd: Likewise.
2271 * configure.ac: Likewise.
2272 * cpu-sh.c: Likewise.
2273 * elf32-sh-relocs.h: Likewise.
2274 * elf32-sh.c: Likewise.
2275 * targets.c: Likewise.
2276 * elf32-sh64-com.c: Delete.
2277 * elf32-sh64.c: Delete.
2278 * elf32-sh64.h: Delete.
2279 * elf64-sh64.c: Delete.
2280 * Makefile.in: Regenerate.
2281 * bfd-in2.h: Regenerate.
2282 * configure: Regenerate.
2283 * po/SRC-POTFILES.in: Regenerate.
2284
4db9937a
AM
22852018-04-16 Alan Modra <amodra@gmail.com>
2286
2287 * Makefile.am: Remove sh-symbianelf support.
2288 * config.bfd: Likewise.
2289 * configure.ac: Likewise.
2290 * targets.c: Likewise.
2291 * elf32-sh-symbian.c: Delete.
2292 * Makefile.in: Regenerate.
2293 * configure: Regenerate.
2294 * po/SRC-POTFILES.in: Regenerate.
2295
9f5d1593
AM
22962018-04-16 Alan Modra <amodra@gmail.com>
2297
2298 * Makefile.am: Remove vax-bsd and vax-ultrix support.
2299 * config.bfd: Likewise.
2300 * configure.ac: Likewise.
2301 * targets.c: Likewise.
2302 * vaxbsd.c: Delete.
2303 * Makefile.in: Regenerate.
2304 * configure: Regenerate.
2305 * po/SRC-POTFILES.in: Regenerate.
2306
a9a4b302
AM
23072018-04-16 Alan Modra <amodra@gmail.com>
2308
2309 * Makefile.am: Remove w65 support.
2310 * archures.c: Likewise.
2311 * coffcode.h: Likewise.
2312 * config.bfd: Likewise.
2313 * configure.ac: Likewise.
2314 * targets.c: Likewise.
2315 * coff-w65.c: Delete.
2316 * cpu-w65.c: Delete.
2317 * Makefile.in: Regenerate.
2318 * bfd-in2.h: Regenerate.
2319 * configure: Regenerate.
2320 * po/SRC-POTFILES.in: Regenerate.
2321
04cb01fd
AM
23222018-04-16 Alan Modra <amodra@gmail.com>
2323
2324 * Makefile.am: Remove we32k support.
2325 * archures.c: Likewise.
2326 * coffcode.h: Likewise.
2327 * config.bfd: Likewise.
2328 * configure.ac: Likewise.
2329 * targets.c: Likewise.
2330 * coff-we32k.c: Delete.
2331 * cpu-we32k.c: Delete.
2332 * Makefile.in: Regenerate.
2333 * bfd-in2.h: Regenerate.
2334 * configure: Regenerate.
2335 * po/SRC-POTFILES.in: Regenerate.
2336
c2bf1eec
AM
23372018-04-16 Alan Modra <amodra@gmail.com>
2338
2339 * Makefile.am: Remove m88k support.
2340 * aoutx.h: Likewise.
2341 * archures.c: Likewise.
2342 * coffcode.h: Likewise.
2343 * coffswap.h: Likewise.
2344 * config.bfd: Likewise.
2345 * configure.ac: Likewise.
2346 * cpu-ns32k.c: Likewise.
2347 * elf32-nds32.c: Likewise.
2348 * mach-o.c: Likewise.
2349 * netbsd-core.c: Likewise.
2350 * reloc.c: Likewise.
2351 * targets.c: Likewise.
2352 * coff-m88k.c: Delete.
2353 * cpu-m88k.c: Delete.
2354 * elf32-m88k.c: Delete.
2355 * hosts/m88kmach3.h: Delete.
2356 * m88kmach3.c: Delete.
2357 * m88kopenbsd.c: Delete.
2358 * Makefile.in: Regenerate.
2359 * bfd-in2.h: Regenerate.
2360 * configure: Regenerate.
2361 * po/SRC-POTFILES.in: Regenerate.
2362
6793974d
AM
23632018-04-16 Alan Modra <amodra@gmail.com>
2364
2365 * Makefile.am: Remove i370 support.
2366 * archures.c: Likewise.
2367 * config.bfd: Likewise.
2368 * configure.ac: Likewise.
2369 * targets.c: Likewise.
2370 * cpu-i370.c: Delete.
2371 * elf32-i370.c: Delete.
2372 * Makefile.in: Regenerate.
2373 * bfd-in2.h: Regenerate.
2374 * configure: Regenerate.
2375 * po/SRC-POTFILES.in: Regenerate.
2376
e82aa794
AM
23772018-04-16 Alan Modra <amodra@gmail.com>
2378
2379 * Makefile.am: Remove h8500 support.
2380 * archures.c: Likewise.
2381 * coffcode.h: Likewise.
2382 * config.bfd: Likewise.
2383 * configure.ac: Likewise.
2384 * targets.c: Likewise.
2385 * coff-h8500.c: Delete.
2386 * cpu-h8500.c: Delete.
2387 * Makefile.in: Regenerate.
2388 * bfd-in2.h: Regenerate.
2389 * configure: Regenerate.
2390 * po/SRC-POTFILES.in: Regenerate.
2391
fe0bf0fd
AM
23922018-04-16 Alan Modra <amodra@gmail.com>
2393
2394 * Makefile.am: Remove h8300-coff support.
2395 * coffcode.h: Likewise.
2396 * config.bfd: Likewise.
2397 * configure.ac: Likewise.
2398 * reloc16.c: Likewise.
2399 * targets.c: Likewise.
2400 * coff-h8300.c: Delete.
2401 * Makefile.in: Regenerate.
2402 * configure: Regenerate.
2403 * po/SRC-POTFILES.in: Regenerate.
2404
fdef3943
AM
24052018-04-16 Alan Modra <amodra@gmail.com>
2406
2407 * Makefile.am: Remove IEEE 695 support.
2408 * archures.c: Likewise.
2409 * bfd.c: Likewise.
2410 * config.bfd: Likewise.
2411 * configure.ac: Likewise.
2412 * doc/bfd.texinfo: Likewise.
2413 * doc/bfdint.texi: Likewise.
2414 * doc/bfdsumm.texi: Likewise.
2415 * section.c: Likewise.
2416 * targets.c: Likewise.
2417 * ieee.c: Delete.
2418 * libieee.h: Delete.
2419 * Makefile.in: Regenerate.
2420 * bfd-in2.h: Regenerate.
2421 * configure: Regenerate.
2422 * po/SRC-POTFILES.in: Regenerate.
2423
de96689e
AM
24242018-04-16 Alan Modra <amodra@gmail.com>
2425
2426 * config.bfd: Remove tandem support.
2427
5972ac73
AM
24282018-04-16 Alan Modra <amodra@gmail.com>
2429
2430 * Makefile.am: Remove newsos3 support.
2431 * aoutx.h: Likewise.
2432 * config.bfd: Likewise.
2433 * configure.ac: Likewise.
2434 * targets.c: Likewise.
2435 * newsos3.c: Delete.
2436 * Makefile.in: Regenerate.
2437 * configure: Regenerate.
2438 * po/SRC-POTFILES.in: Regenerate.
2439
b4b594e3
AM
24402018-04-16 Alan Modra <amodra@gmail.com>
2441
2442 * Makefile.am: Remove netware support.
2443 * bfd-in.h: Likewise.
2444 * bfd.c: Likewise.
2445 * config.bfd: Likewise.
2446 * configure.ac: Likewise.
2447 * doc/bfdint.texi: Likewise.
2448 * ecoff.c: Likewise.
2449 * targets.c: Likewise.
2450 * libnlm.h: Delete.
2451 * nlm-target.h: Delete.
2452 * nlm.c: Delete.
2453 * nlm32-alpha.c: Delete.
2454 * nlm32-i386.c: Delete.
2455 * nlm32-ppc.c: Delete.
2456 * nlm32-sparc.c: Delete.
2457 * nlm32.c: Delete.
2458 * nlm64.c: Delete.
2459 * nlmcode.h: Delete.
2460 * nlmswap.h: Delete.
2461 * Makefile.in: Regenerate.
2462 * bfd-in2.h: Regenerate.
2463 * configure: Regenerate.
2464 * po/SRC-POTFILES.in: Regenerate.
2465
fceadf09
AM
24662018-04-16 Alan Modra <amodra@gmail.com>
2467
2468 * archures.c: Remove tahoe support.
2469 * config.bfd: Likewise.
2470 * configure.ac: Likewise.
2471 * hosts/tahoe.h: Delete.
2472 * bfd-in2.h: Regenerate.
2473 * configure: Regenerate.
2474
702d1671
AM
24752018-04-14 Alan Modra <amodra@gmail.com>
2476
2477 * elf-bfd.h (struct elf_backend_data): Add relropagesize.
2478 * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and
2479 sanity test.
2480 (elfNN_bed): Init relropagesize.
2481 * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to
2482 select relropagesize.
2483 * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
2484 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
2485 (ELF_MINPAGESIZE): Don't define.
2486 * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
2487 (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
2488 * bfd-in2.h: Regenerate.
2489
03aa9684
AM
24902018-04-14 Alan Modra <amodra@gmail.com>
2491
2492 * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend
2493 on __QNXTARGET__ define.
2494
24acfe5e
AM
24952018-04-14 Alan Modra <amodra@gmail.com>
2496
2497 * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss*
2498 to obsolete list.
2499
a8eb42a8
AM
25002018-04-11 Alan Modra <amodra@gmail.com>
2501
2502 * aout-adobe.c: Delete.
2503 * bout.c: Delete.
2504 * coff-i860.c: Delete.
2505 * coff-i960.c: Delete.
2506 * cpu-i860.c: Delete.
2507 * cpu-i960.c: Delete.
2508 * elf32-i860.c: Delete.
2509 * elf32-i960.c: Delete.
2510 * hosts/i860mach3.h: Delete.
2511 * Makefile.am: Remove i860, i960, bout, and adobe support.
2512 * archures.c: Remove i860 and i960 support.
2513 * coffcode.h: Likewise.
2514 * reloc.c: Likewise.
2515 * aoutx.h: Comment updates.
2516 * archive.c: Remove BOUT and i960 support.
2517 * bfd.c: Remove BOUT support.
2518 * coffswap.h: Remove i960 support.
2519 * config.bfd: Remove i860, i960 and adobe targets.
2520 * configure.ac: Remove adode, bout, i860, i960, icoff targets.
2521 * targets.c: Likewise.
2522 * ieee.c: Remove i960 support.
2523 * mach-o.c: Remove i860 support.
2524 * Makefile.in: Regenerate.
2525 * bfd-in2.h: Regenerate.
2526 * configure: Regenerate.
2527 * libbfd.h: Regenerate.
2528 * po/SRC-POTFILES.in: Regenerate.
2529
aec2e0d2
MR
25302018-04-09 Maciej W. Rozycki <macro@mips.com>
2531
2532 * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer
2533 in the BFD symbol referred by the relocation.
2534 (mips_elf64_write_rela): Likewise.
2535
9ccfa98b
MR
25362018-04-09 Maciej W. Rozycki <macro@mips.com>
2537
2538 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an
2539 error for out-of-range `r_sym' values.
2540
3e04d765
AM
25412018-04-09 Alan Modra <amodra@gmail.com>
2542
2543 * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field.
2544 (struct ppc_link_hash_table): Add can_convert_all_inline_plt.
2545 (ppc64_elf_check_relocs): Set has_pltcall.
2546 (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries.
2547 (ppc64_elf_inline_plt): New function.
2548 (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals.
2549 * elf64-ppc.h (ppc64_elf_inline_plt): Declare.
2550 * elf32-ppc.c (has_pltcall): Define.
2551 (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt.
2552 (ppc_elf_check_relocs): Set has_pltcall.
2553 (ppc_elf_inline_plt): New function.
2554 (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries.
2555 (ppc_elf_size_dynamic_sections): Likewise.
2556 * elf32-ppc.h (ppc_elf_inline_plt): Declare.
2557
23cedd1d
AM
25582018-04-09 Alan Modra <amodra@gmail.com>
2559
2560 * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos.
2561 (is_plt_seq_reloc): New function.
2562 (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs.
2563 (ppc_elf_tls_optimize): Handle inline plt call sequence.
2564 (ppc_elf_relax_section): Handle PLTCALL reloc.
2565 (ppc_elf_relocate_section): Nop out inline plt call sequence when
2566 resolving locally.
2567 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and
2568 R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE.
2569 (has_tls_get_addr_call): Correct comment.
2570 (is_branch_reloc): Add PLTCALL.
2571 (is_plt_seq_reloc): New function.
2572 (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set
2573 has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt
2574 entry for R_PPC64_PLTCALL.
2575 (ppc64_elf_tls_optimize): Handle inline plt call sequence.
2576 (ppc_type_of_stub): Handle PLTCALL reloc.
2577 (toc_adjusting_stub_needed): Likewise.
2578 (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL
2579 reloc insn. Nop out inline plt call sequence when resolving
2580 locally. Handle __tls_get_addr inline plt call optimization.
2581
2d7ad24e
AM
25822018-04-09 Alan Modra <amodra@gmail.com>
2583
2584 * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define.
2585 (struct ppc_stub_hash_entry): Add symtype field.
2586 (PLT_KEEP): Define.
2587 (struct ppc_link_hash_table): Add pltlocal and relpltlocal.
2588 (create_linkage_sections): Create pltlocal and relpltlocal.
2589 (ppc64_elf_check_relocs): Allow PLT relocs on local symbols.
2590 Set PLT_KEEP.
2591 (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
2592 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
2593 (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
2594 Keep PLT entries for inline calls against locals.
2595 (ppc_build_one_stub): Use pltlocal as appropriate.
2596 (ppc_size_one_stub): Likewise.
2597 (ppc64_elf_size_stubs): Set symtype.
2598 (build_global_entry_stubs_and_plt): Init pltlocal and write
2599 relpltlocal for globals.
2600 (write_plt_relocs_for_local_syms): Likewise for local syms.
2601 (ppc64_elf_relocate_section): Support PLT for local syms.
2602 * elf32-ppc.c (PLT_KEEP): Define.
2603 (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal.
2604 (ppc_elf_create_glink): Create pltlocal and relpltlocal.
2605 (ppc_elf_check_relocs): Allow PLT relocs on local symbols.
2606 Set PLT_KEEP. Adjust update_local_sym_info call.
2607 (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
2608 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
2609 (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
2610 (ppc_elf_relocate_section): Support PLT16 relocs for local syms.
2611 (write_global_sym_plt): Init pltlocal and write relpltlocal.
2612 (ppc_finish_symbols): Likewise for locals.
2613
49c09209
AM
26142018-04-09 Alan Modra <amodra@gmail.com>
2615
2616 * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs
2617 for local symbols to..
2618 (write_plt_relocs_for_local_syms): ..here. New function.
2619 (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for
2620 global symbols to..
2621 (build_global_entry_stubs_and_plt): ..here. Rename from
2622 build_global_entry_stubs.
2623 (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt.
2624 Call write_plt_relocs_for_local_syms.
2625 * elf32-ppc.c (get_sym_h): New function.
2626 (ppc_elf_relax_section): Use get_sym_h.
2627 (ppc_elf_relocate_section): Move output of PLT relocs and glink
2628 stubs for local symbols to..
2629 (ppc_finish_symbols): ..here. New function.
2630 (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for
2631 global syms to..
2632 (write_global_sym_plt): ..here. New function.
2633 * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute.
2634 (ppc_finish_symbols): Declare.
2635
08be3224
AM
26362018-04-09 Alan Modra <amodra@gmail.com>
2637
2638 * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs.
2639 (ppc_elf_relocate_section): Likewise.
2640 * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS.
2641 (ppc64_elf_relocate_section): Likewise. Correct PLT16
2642 resolution to plt entry relative to toc pointer.
2643
37da22e5
AM
26442018-04-09 Alan Modra <amodra@gmail.com>
2645
2646 * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
2647 TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout
2648 file when other TLS flags are tested in a mask.
2649 (TLS_MARK, NON_GOT): Define.
2650 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
2651 (update_local_sym_info): Don't create got entry when NON_GOT.
2652 (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
2653 Set TLS_MARK.
2654 (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK.
2655 (ppc64_elf_relocate_section): Likewise.
2656 (ppc64_elf_tls_optimize): Don't attempt to optimize indirect
2657 __tls_get_addr calls lacking a marker reloc.
2658 * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
2659 TLS_TPRELGD): Renumber. Update comment.
2660 (TLS_MARK, NON_GOT): Define.
2661 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
2662 (update_local_sym_info): Don't create got entry when NON_GOT.
2663 (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
2664 Set TLS_MARK.
2665 (ppc_elf_tls_optimize): Don't attempt to optimize indirect
2666 __tls_get_addr calls lacking a marker reloc.
2667
a6fd92b0
L
26682018-04-06 H.J. Lu <hongjiu.lu@intel.com>
2669
2670 * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out
2671 R_X86_64_converted_reloc_bit.
2672
3cba8b6c
L
26732018-04-05 H.J. Lu <hongjiu.lu@intel.com>
2674
2675 PR gas/22318
2676 * configure: Regenerated.
2677
0e8452bb
AM
26782018-04-05 Alan Modra <amodra@gmail.com>
2679
2680 * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
2681 (elf_hppa_info_to_howto_rel): Likewise.
2682
8ee55178
MR
26832018-04-04 Maciej W. Rozycki <macro@mips.com>
2684
2685 * elf-hppa.h (elf_hppa_info_to_howto): Also return
2686 unsuccessfully for unimplemented relocations.
2687 (elf_hppa_info_to_howto_rel): Likewise.
2688
5d7c8b80
MR
26892018-04-04 Maciej W. Rozycki <macro@mips.com>
2690
2691 * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the
2692 `bfd_error_bad_value' error and call `_bfd_error_handler' on a
2693 howto lookup failure.
2694 (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call
2695 accordingly.
2696 (elf32_i860_info_to_howto_rela): Likewise.
2697 (elf32_i860_relocate_splitn): Likewise.
2698 (elf32_i860_relocate_pc16): Likewise.
2699 (elf32_i860_relocate_pc26): Likewise.
2700 (elf32_i860_relocate_section): Likewise.
2701
707bad1b
MR
27022018-04-04 Maciej W. Rozycki <macro@mips.com>
2703
2704 * elf32-visium.c (visium_info_to_howto_rela): Correct the range
2705 check for `visium_elf_howto_table' table access.
2706
0cc919dc
MR
27072018-04-04 Maciej W. Rozycki <macro@mips.com>
2708
2709 * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range
2710 check for `iq2000_elf_howto_table' table access.
2711
f428698e
MR
27122018-04-04 Maciej W. Rozycki <macro@mips.com>
2713
2714 * elf32-frv.c (frv_info_to_howto_rela): Correct the range check
2715 for `elf32_frv_howto_table' table access.
2716
7ed6f92a
MR
27172018-04-04 Maciej W. Rozycki <macro@mips.com>
2718
2719 * elf32-mips.c (mips_elf32_rtype_to_howto): Also return
2720 unsuccessfully for placeholder howtos.
2721 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
2722 * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise.
2723
75def2ab
MR
27242018-03-29 Maciej W. Rozycki <macro@mips.com>
2725
2726 * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
2727 `_bfd_error_handler' and to set the `bfd_error_bad_value' error.
2728
8b6a949a
MR
27292018-03-28 Maciej W. Rozycki <macro@mips.com>
2730
2731 * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove
2732 ATTRIBUTE_UNUSED from `abfd'.
2733
d81270c3
MR
27342018-03-28 Maciej W. Rozycki <macro@mips.com>
2735
2736 * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct
2737 `_bfd_error_handler' call formatting.
2738
60dceb8d 27392018-03-28 Maciej W. Rozycki <macro@mips.com>
8205a328
MR
2740
2741 * elf32-mips.c (mips_info_to_howto_rel): Call
2742 `mips_elf32_rtype_to_howto' directly rather than via
2743 `->elf_backend_mips_rtype_to_howto'.
2744
e04ef022
RL
27452018-03-28 Renlin Li <renlin.li@arm.com>
2746
2747 PR ld/22970
2748 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
2749 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
2750 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
2751 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
2752 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
2753 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
2754 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
2755 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
2756 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
2757 (elfNN_aarch64_final_link_relocate): Support new relocations.
2758 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
2759 relocations.
2760 (_bfd_aarch64_elf_resolve_relocation): Support new relocations.
2761
84f1b9fb
RL
27622018-03-28 Renlin Li <renlin.li@arm.com>
2763
2764 PR ld/22970
2765 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12
2766 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
2767 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
2768 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
2769 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
2770 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
2771 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
2772 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
2773 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
2774 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
2775 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for
2776 TLSLE_LDST16_TPREL_LO12,
2777 TLSLE_LDST16_TPREL_LO12_NC,
2778 TLSLE_LDST32_TPREL_LO12,
2779 TLSLE_LDST32_TPREL_LO12_NC,
2780 TLSLE_LDST64_TPREL_LO12,
2781 TLSLE_LDST64_TPREL_LO12_NC,
2782 TLSLE_LDST8_TPREL_LO12,
2783 TLSLE_LDST8_TPREL_LO12_NC.
2784 * bfd-in2.h: Regenerated.
2785 * libbfd.h: Regenerated.
2786
f8745e1c
EB
27872018-03-28 Eric Botcazou <ebotcazou@adacore.com>
2788
2789 PR ld/22972
2790 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
2791 has_old_style_got_reloc.
2792 (_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
2793 relocations. Fix a couple of long lines.
2794 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
2795 a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style
2796 GOT relocations.
2797
bf54968b
L
27982018-03-25 H.J. Lu <hongjiu.lu@intel.com>
2799
2800 PR ld/23000
2801 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
2802 ENDBR64 to the TLSDESC PLT entry.
2803
0ccf57bd
AM
28042018-03-21 Alan Modra <amodra@gmail.com>
2805
2806 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting
2807 symbols. Use size_t counts. Delete redundant opd test.
2808
4bad6366
AM
28092018-03-21 Alan Modra <amodra@gmail.com>
2810
2811 * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
2812
bac3c8c5
AM
28132018-03-21 Alan Modra <amodra@gmail.com>
2814
2815 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask
2816 field unsigned.
2817 (update_local_sym_info): Likewise for local_got_tls_masks.
2818 (ppc_elf_tls_optimize): Likewise for lgot_masks.
2819
6a3858a6
AM
28202018-03-21 Alan Modra <amodra@gmail.com>
2821
2822 * elf64-ppc.c (ppc_size_one_stub): Fix comment typo.
2823 (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we
2824 do in size_dynamic_sections.
2825
675e2809
AM
28262018-03-21 Alan Modra <amodra@gmail.com>
2827
2828 * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1]
2829 without first checking array bounds.
2830 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2831
416c34d6
L
28322018-03-20 H.J. Lu <hongjiu.lu@intel.com>
2833
2834 PR ld/22983
2835 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
2836 non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
2837
315aa1cf
NC
28382018-03-19 Nick Clifton <nickc@redhat.com>
2839
2840 * po/es.po: Updated Spanish translation.
2841
0854d504
MF
28422018-03-15 Max Filippov <jcmvbkbc@gmail.com>
2843
2844 * elf32-xtensa.c (xlate_map_entry): Change types of address
2845 fields from 'unsigned' to 'bfd_vma'.
2846 (xlate_offset_with_removed_text): Use struct xlate_map_entry as
2847 the key argument to bsearch. Allow offsets past the end of a
2848 section, use the last map entry for translation of such offsets.
2849
f9671640
KLC
28502018-03-15 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2851
2852 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
2853 Not support the target feature.
2854 (nds32_elf_ex9_itb_base): Likewise.
2855 (nds32_elf_ex9_import_table): Likewise.
2856 (nds32_elf_ex9_finish): Likewise.
2857 (nds32_elf_ex9_reloc_jmp): Likewise.
2858 (nds32_elf_get_insn_with_reg): Likewise.
2859 (nds32_get_local_syms): Likewise.
2860 (nds32_elf_ex9_replace_instruction): Likewise.
2861 (nds32_elf_ifc_calc): Likewise.
2862 (nds32_elf_ifc_finish): Likewise.
2863 (nds32_elf_ifc_replace): Likewise.
2864 (nds32_elf_ifc_reloc): Likewise.
2865
7dda8d3c
AM
28662018-03-14 Alan Modra <amodra@gmail.com>
2867
2868 * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
2869 sfpr size added before defining alias symbols.
2870 (ppc64_elf_build_stubs): Add stub section padding before
2871 copying sfpr contents and defining save/restore alias symbols.
2872
9e223787
L
28732018-03-14 H.J. Lu <hongjiu.lu@intel.com>
2874
2875 PR ld/20882
2876 * elflink.c (elf_gc_mark_debug_section): Also check the local
2877 debug definition section.
2878
3e33b239
NC
28792018-03-13 Nick Clifton <nickc@redhat.com>
2880
2881 PR 22113
2882 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
2883 function. Add an end address parameter. Check access of the data
2884 pointer to make sure that they do not extend beyond the end
2885 address. Return FALSE if any check fails. Add the end address
2886 pointer to the ui structure.
2887 (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
2888 codes to make sure that they do not extend beyond the end address
2889 pointer. Print an error message and return immediately if any
2890 check fails.
2891
f657f8c4
NC
28922018-03-09 Nick Clifton <nickc@redhat.com>
2893
2894 * elf64-s390.c (elf_s390_relocate_section): Move check for
2895 relocations against non-allocated sections to before the code that
2896 handles ifunc relocations.
2897 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2898 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
2899 relocs against IFUNC symbols in non-allocated sections as relocs
2900 against FUNC symbols.
2901 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2902
347a8774
L
29032018-03-08 H.J. Lu <hongjiu.lu@intel.com>
2904
2905 PR ld/22929
2906 * elf32-i386.c (elf_i386_relocate_section): Treat relocation
2907 against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
2908 relocation against FUNC symbol.
2909 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2910
0c1ded8d
RL
29112018-03-07 Renlin Li <renlin.li@arm.com>
2912
2913 PR ld/20402
2914 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
2915 symbol, and don't emit relocation in specific case.
2916
0118219e
AM
29172018-03-07 Alan Modra <amodra@gmail.com>
2918
2919 * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
2920 (mips_elf64_slurp_one_reloc_table): Pass on error.
2921
dfb93f11
JC
29222018-03-03 James Cowgill <james.cowgill@mips.com>
2923 Maciej W. Rozycki <macro@mips.com>
2924
2925 PR ld/21900
2926 * elfxx-mips.c (mips_elf_calculate_relocation): Only return
2927 after calling `undefined_symbol' hook if this is an error
2928 condition. Assume the value of 0 for the symbol requested
2929 otherwise.
2930
9a2ebffd
JW
29312018-03-02 Jim Wilson <jimw@sifive.com>
2932
2933 PR 22903
2934 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
2935 and nop instead of 4.
2936 (elfNN_arch64_build_stubs): Add nop after branch. Increase size by
2937 8 instead of 4.
2938
788af978
JW
29392018-03-01 Jim Wilson <jimw@sifive.com>
2940
2941 PR 22756
2942 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
2943 else if instead of if.
2944
5224fa03
AM
29452018-03-01 Alan Modra <amodra@gmail.com>
2946
2947 * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
2948
116acb2c
AM
29492018-02-28 Alan Modra <amodra@gmail.com>
2950
2951 PR 22887
2952 * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
2953
eef10466
NC
29542018-02-28 Nick Clifton <nickc@redhat.com>
2955
12c96342
NC
2956 PR 22895
2957 PR 22893
2958 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
2959 pointer. Drop unused abfd parameter. Check the size of the block
2960 before initialising the data field. Return the end pointer if the
2961 size is invalid.
2962 (read_attribute_value): Adjust invocations of read_n_bytes.
2963
eef10466
NC
2964 PR 22894
2965 * dwarf1.c (parse_die): Check the length of form blocks before
2966 advancing the data pointer.
2967
0d329c0a
AM
29682018-02-28 Alan Modra <amodra@gmail.com>
2969
2970 PR 22887
2971 * aoutx.h (translate_symbol_table): Print an error message and set
2972 bfd_error on finding an invalid name string offset.
2973
f6aec96d
L
29742018-02-27 H.J. Lu <hongjiu.lu@intel.com>
2975
2976 * config.in: Regenerated.
2977 * configure: Likewise.
2978 * configure.ac: Add --enable-separate-code.
2979 (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default
2980 to 1 for Linux/x86 targets,
2981 * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
2982 DEFAULT_LD_Z_SEPARATE_CODE is 1.
2983
f3185997
NC
29842018-02-27 Nick Clifton <nickc@redhat.com>
2985
e8f5af78
NC
2986 * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
2987 message.
2988 * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
2989 * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
2990 * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
2991 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
2992 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
2993 * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
2994 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
2995 * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
2996 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
2997
f3185997
NC
2998 PR 22875
2999 * elf-bfd.h (struct elf_backend_data): Change the return type of
3000 the elf_info_to_howto and elf_info_to_howto_rel function pointers
3001 to bfd_boolean.
3002 * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
3003 value from the info_to_howto function and fail if that function
3004 failed.
3005 * elf32-h8300.c (elf32_h8_relocate_section): Check return value
3006 from the info_to_howto function.
3007 (elf32_h8_relax_section): Likewise.
3008 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
3009 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
3010 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
3011 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
3012 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
3013 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
3014 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
3015 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
3016 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
3017 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
3018 (riscv_elf_relocate_section): Likewise.
3019 * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
3020 bfd_boolean. Issue an error message, set an error value and
3021 return FALSE if the reloc is not recognized.
3022 (elf_hppa_info_to_howto_rel): Likewise.
3023 * elf-m10200.c (mn10200_info_to_howto): Likewise.
3024 * elf-m10300.c (mn10300_info_to_howto): Likewise.
3025 * elf.c (_bfd_elf_no_info_to_howto): Likewise.
3026 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
3027 * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
3028 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
3029 * elf32-bfin.c (bfin_info_to_howto): Likewise.
3030 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
3031 * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
3032 * elf32-cris.c (elf_cr16c_info_to_howto_rel)
3033 (cris_info_to_howto_rela): Likewise.
3034 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
3035 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
3036 * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
3037 Likewise.
3038 * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
3039 (elf32_dlx_info_to_howto_rel): Likewise.
3040 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
3041 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
3042 * elf32-frv.c (frv_info_to_howto_rela)
3043 (frvfdpic_info_to_howto_rel): Likewise.
3044 * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
3045 * elf32-gen.c (elf_generic_info_to_howto)
3046 (elf_generic_info_to_howto_rel): Likewise.
3047 * elf32-h8300.c (elf32_h8_info_to_howto)
3048 (elf32_h8_info_to_howto_rel): Likewise.
3049 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
3050 * elf32-i386.c (elf_i386_reloc_type_lookup)
3051 (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
3052 * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
3053 Likewise.
3054 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
3055 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
3056 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
3057 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
3058 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
3059 * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
3060 Likewise.
3061 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
3062 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
3063 * elf32-m68k.c (rtype_to_howto): Likewise.
3064 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
3065 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
3066 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
3067 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
3068 * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
3069 Likewise.
3070 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
3071 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
3072 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
3073 * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
3074 Likewise.
3075 * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
3076 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
3077 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
3078 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
3079 * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
3080 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
3081 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
3082 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
3083 * elf32-score.c (s3_bfd_score_info_to_howto)
3084 (_bfd_score_info_to_howto): Likewise.
3085 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
3086 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
3087 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
3088 * elf32-tic6x.c (elf32_tic6x_info_to_howto)
3089 (elf32_tic6x_info_to_howto_rel): Likewise.
3090 * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
3091 * elf32-v850.c (v850_elf_info_to_howto_rel)
3092 (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
3093 * elf32-vax.c (rtype_to_howto): Likewise.
3094 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
3095 * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
3096 (elf32_wasm32_info_to_howto_rela): Likewise.
3097 * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
3098 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
3099 * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
3100 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
3101 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
3102 * elf64-gen.c (elf_generic_info_to_howto)
3103 (elf_generic_info_to_howto_rel): Likewise.
3104 * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
3105 * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
3106 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
3107 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
3108 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
3109 * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
3110 Likewise.
3111 * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
3112 * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
3113 Likewise.
3114 * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
3115 * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
3116 * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
3117 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
3118 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
3119 * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
3120 * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
3121 * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
3122 * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
3123 * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
3124 Default to NULL.
3125
1f4bace8
JW
31262018-02-26 Jim Wilson <jimw@sifive.com>
3127 Stephan Schreiber <info@fs-driver.org>
3128
3129 PR 15904
3130 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
3131 call, set changed_contents and changed_relocs. Likewise after
3132 successful ia64_elf_relax_br call.
3133
6838f2be
AM
31342018-02-26 Alan Modra <amodra@gmail.com>
3135
3136 * elf.c (assign_file_positions_except_relocs): Don't segfault
3137 when actual number of phdrs is less than allocated. Delete
3138 outdated comment. Formatting.
3139
38f14ab8
AM
31402018-02-26 Alan Modra <amodra@gmail.com>
3141
3142 * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
3143 * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
3144 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
3145 * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
3146 * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
3147 * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
3148 * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
3149 * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
3150 * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
3151 * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
3152 error/warning messages.
3153
6e05870c
AM
31542018-02-26 Alan Modra <amodra@gmail.com>
3155
3156 * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
3157 * syms.c: Standardize error/warning messages.
3158
59d08d6c
AM
31592018-02-26 Alan Modra <amodra@gmail.com>
3160
3161 * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
3162 * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
3163 * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
3164 * peXXigen.c, * peicode.h: Standardize error/warning messages.
3165
90b6238f
AM
31662018-02-26 Alan Modra <amodra@gmail.com>
3167
3168 * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
3169
2c1c9679
AM
31702018-02-26 Alan Modra <amodra@gmail.com>
3171
3172 * elfxx-mips.c: Standardize error/warning messages.
3173
9793eb77
AM
31742018-02-26 Alan Modra <amodra@gmail.com>
3175
3176 * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
3177 * elflink.c: Standardize error/warning messages. Replace use of
3178 linker callback einfo with _bfd_error_handler when possible.
3179
0aa13fee
AM
31802018-02-26 Alan Modra <amodra@gmail.com>
3181
3182 * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
3183 * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
3184 * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
3185 * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
3186 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
3187 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
3188 * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
3189 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
3190 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
3191 * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
3192 * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
3193 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
3194 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
3195 * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
3196 * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
3197 * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
3198 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
3199 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
3200 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
3201 * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
3202 * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
3203 unrecognized/unsupported reloc message.
3204
cf97bcb0
AM
32052018-02-26 Alan Modra <amodra@gmail.com>
3206
3207 * elf32-ppc.c: Standardize error/warning messages. Use
3208 _bfd_error_handler rather than einfo when einfo features not used.
3209 * elf64-ppc.c: Likewise.
3210
01f7e10c
AM
32112018-02-23 Alan Modra <amodra@gmail.com>
3212
3213 PR 22881
3214 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
3215 segment if no matching LOAD segment.
3216
e859f655
KLC
32172018-02-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3218
3219 * elf32-nds32.h: Define mask for ict_model.
3220
6e8d06db
JD
32212018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
3222
3223 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
3224
b248d650
MR
32252018-02-19 Maciej W. Rozycki <macro@mips.com>
3226
3227 Revert
3228 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
3229
3230 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
3231 .reginfo section has wrong size.
3232
6798f8bf
MR
32332018-02-19 Maciej W. Rozycki <macro@mips.com>
3234
3235 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
3236 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
3237 `.MIPS.abiflags' sections.
3238 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
3239 section's end.
3240
8772de11
MR
32412018-02-19 Maciej W. Rozycki <macro@mips.com>
3242
3243 * section.c (SEC_FIXED_SIZE): New macro.
3244 * bfd-in2.h: Regenerate.
3245
4f7fd351
MR
32462018-02-19 Maciej W. Rozycki <macro@mips.com>
3247
3248 * section.c (SEC_HAS_GOT_REF): Remove macro.
3249 * bfd-in2.h: Regenerate.
3250
f2b740ac
AM
32512018-02-19 Alan Modra <amodra@gmail.com>
3252
3253 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
3254 arguments.
3255 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
3256 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
3257 (_bfd_riscv_relax_pc): Likewise and fix typos.
3258 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
3259 * libbfd.h: Regenerate.
3260
8979927a
AM
32612018-02-19 Alan Modra <amodra@gmail.com>
3262
3263 * dwarf2.c (read_section): Don't use 'll' format modifier.
3264 (find_abstract_instance): Likewise.
3265 * elfcore.h (elf_core_file_p): Likewise.
3266
2dcf00ce
AM
32672018-02-19 Alan Modra <amodra@gmail.com>
3268
3269 * bfd-in.h: Include inttypes.h or if not available define
3270 PRId64, PRIu64 and PRIx64.
3271 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
3272 modifier to print bfd_vma.
3273 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
3274 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
3275 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
3276 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
3277 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
3278 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
3279 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
3280 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
3281 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
3282 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
3283 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
3284 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
3285 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
3286 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
3287 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
3288 and cast input to uint64_t, and similarly for Ld and Lu.
3289 * bfd-in2.h: Regenerate.
3290
c1c8c1ef
AM
32912018-02-19 Alan Modra <amodra@gmail.com>
3292
3293 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
3294 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
3295 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
3296 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
3297 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
3298 * reloc.c: Replace use of %R and %T in format strings passed to
3299 einfo and friends by %pR and %pT.
3300
871b3ab2
AM
33012018-02-19 Alan Modra <amodra@gmail.com>
3302
3303 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
3304 of %A and %B.
3305 * aout-adobe.c: Update all messages using %A and %B.
3306 * aout-cris.c: Likewise.
3307 * aoutx.h: Likewise.
3308 * archive.c: Likewise.
3309 * binary.c: Likewise.
3310 * cache.c: Likewise.
3311 * coff-alpha.c: Likewise.
3312 * coff-arm.c: Likewise.
3313 * coff-i860.c: Likewise.
3314 * coff-mcore.c: Likewise.
3315 * coff-ppc.c: Likewise.
3316 * coff-rs6000.c: Likewise.
3317 * coff-sh.c: Likewise.
3318 * coff-tic4x.c: Likewise.
3319 * coff-tic54x.c: Likewise.
3320 * coff-tic80.c: Likewise.
3321 * coff64-rs6000.c: Likewise.
3322 * coffcode.h: Likewise.
3323 * coffgen.c: Likewise.
3324 * cofflink.c: Likewise.
3325 * coffswap.h: Likewise.
3326 * compress.c: Likewise.
3327 * cpu-arm.c: Likewise.
3328 * ecoff.c: Likewise.
3329 * elf-attrs.c: Likewise.
3330 * elf-eh-frame.c: Likewise.
3331 * elf-ifunc.c: Likewise.
3332 * elf-m10300.c: Likewise.
3333 * elf-properties.c: Likewise.
3334 * elf-s390-common.c: Likewise.
3335 * elf.c: Likewise.
3336 * elf32-arc.c: Likewise.
3337 * elf32-arm.c: Likewise.
3338 * elf32-avr.c: Likewise.
3339 * elf32-bfin.c: Likewise.
3340 * elf32-cr16.c: Likewise.
3341 * elf32-cr16c.c: Likewise.
3342 * elf32-cris.c: Likewise.
3343 * elf32-crx.c: Likewise.
3344 * elf32-d10v.c: Likewise.
3345 * elf32-d30v.c: Likewise.
3346 * elf32-epiphany.c: Likewise.
3347 * elf32-fr30.c: Likewise.
3348 * elf32-frv.c: Likewise.
3349 * elf32-gen.c: Likewise.
3350 * elf32-hppa.c: Likewise.
3351 * elf32-i370.c: Likewise.
3352 * elf32-i386.c: Likewise.
3353 * elf32-i960.c: Likewise.
3354 * elf32-ip2k.c: Likewise.
3355 * elf32-iq2000.c: Likewise.
3356 * elf32-lm32.c: Likewise.
3357 * elf32-m32c.c: Likewise.
3358 * elf32-m32r.c: Likewise.
3359 * elf32-m68hc11.c: Likewise.
3360 * elf32-m68hc12.c: Likewise.
3361 * elf32-m68hc1x.c: Likewise.
3362 * elf32-m68k.c: Likewise.
3363 * elf32-mcore.c: Likewise.
3364 * elf32-mep.c: Likewise.
3365 * elf32-metag.c: Likewise.
3366 * elf32-microblaze.c: Likewise.
3367 * elf32-moxie.c: Likewise.
3368 * elf32-msp430.c: Likewise.
3369 * elf32-mt.c: Likewise.
3370 * elf32-nds32.c: Likewise.
3371 * elf32-nios2.c: Likewise.
3372 * elf32-or1k.c: Likewise.
3373 * elf32-pj.c: Likewise.
3374 * elf32-ppc.c: Likewise.
3375 * elf32-rl78.c: Likewise.
3376 * elf32-rx.c: Likewise.
3377 * elf32-s390.c: Likewise.
3378 * elf32-score.c: Likewise.
3379 * elf32-score7.c: Likewise.
3380 * elf32-sh-symbian.c: Likewise.
3381 * elf32-sh.c: Likewise.
3382 * elf32-sh64.c: Likewise.
3383 * elf32-sparc.c: Likewise.
3384 * elf32-spu.c: Likewise.
3385 * elf32-tic6x.c: Likewise.
3386 * elf32-tilepro.c: Likewise.
3387 * elf32-v850.c: Likewise.
3388 * elf32-vax.c: Likewise.
3389 * elf32-visium.c: Likewise.
3390 * elf32-wasm32.c: Likewise.
3391 * elf32-xgate.c: Likewise.
3392 * elf32-xtensa.c: Likewise.
3393 * elf64-alpha.c: Likewise.
3394 * elf64-gen.c: Likewise.
3395 * elf64-hppa.c: Likewise.
3396 * elf64-ia64-vms.c: Likewise.
3397 * elf64-mmix.c: Likewise.
3398 * elf64-ppc.c: Likewise.
3399 * elf64-s390.c: Likewise.
3400 * elf64-sh64.c: Likewise.
3401 * elf64-sparc.c: Likewise.
3402 * elf64-x86-64.c: Likewise.
3403 * elfcode.h: Likewise.
3404 * elfcore.h: Likewise.
3405 * elflink.c: Likewise.
3406 * elfnn-aarch64.c: Likewise.
3407 * elfnn-ia64.c: Likewise.
3408 * elfnn-riscv.c: Likewise.
3409 * elfxx-mips.c: Likewise.
3410 * elfxx-sparc.c: Likewise.
3411 * elfxx-tilegx.c: Likewise.
3412 * elfxx-x86.c: Likewise.
3413 * hpux-core.c: Likewise.
3414 * ieee.c: Likewise.
3415 * ihex.c: Likewise.
3416 * libbfd.c: Likewise.
3417 * linker.c: Likewise.
3418 * mach-o.c: Likewise.
3419 * merge.c: Likewise.
3420 * mmo.c: Likewise.
3421 * oasys.c: Likewise.
3422 * pdp11.c: Likewise.
3423 * pe-mips.c: Likewise.
3424 * peXXigen.c: Likewise.
3425 * peicode.h: Likewise.
3426 * reloc.c: Likewise.
3427 * rs6000-core.c: Likewise.
3428 * srec.c: Likewise.
3429 * stabs.c: Likewise.
3430 * vms-alpha.c: Likewise.
3431 * xcofflink.c: Likewise.
3432
dbc88fc1
AM
34332018-02-19 Alan Modra <amodra@gmail.com>
3434
3435 PR 22845
3436 * elf.c (IS_TBSS): Define.
3437 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
3438 (assign_file_positions_for_non_load_sections): Revert last change.
3439 Properly calculate load segment limits to compare against relro limits.
3440
325ba6fb
AM
34412018-02-17 Alan Modra <amodra@gmail.com>
3442
3443 PR 22845
3444 * elf.c (assign_file_positions_for_non_load_sections): Ignore
3445 degenerate zero size PT_LOAD segments when finding one overlapping
3446 the PT_GNU_RELRO segment.
3447
d00dd7dc
AM
34482018-02-16 Alan Modra <amodra@gmail.com>
3449
3450 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
3451 (_bfd_bool_bfd_true): Rename from bfd_true.
3452 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
3453 (_bfd_int_bfd_0): Rename from bfd_0.
3454 (_bfd_uint_bfd_0): Rename from bfd_0u.
3455 (_bfd_long_bfd_0): Rename from bfd_0l.
3456 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
3457 (_bfd_void_bfd): Rename from bfd_void.
3458 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
3459 (_bfd_bool_bfd_link_false_error),
3460 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
3461 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
3462 (_bfd_bool_bfd_asection_bfd_asection_true),
3463 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
3464 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
3465 * archive.c (_bfd_noarchive_get_elt_at_index),
3466 (_bfd_noarchive_openr_next_archived_file),
3467 (_bfd_noarchive_construct_extended_name_table),
3468 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
3469 (_bfd_noarchive_write_armap): New functions.
3470 * archures.c (_bfd_nowrite_set_arch_mach): New function.
3471 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
3472 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
3473 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
3474 (alpha_ecoff_swap_coff_lineno_out),
3475 (alpha_ecoff_swap_coff_reloc_out): New functions.
3476 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
3477 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
3478 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
3479 (mips_ecoff_swap_coff_lineno_out),
3480 (mips_ecoff_swap_coff_reloc_out): New functions.
3481 * coffcode.h (coff_set_alignment_hook): Replace define with
3482 new function.
3483 (symname_in_debug_hook): Likewise.
3484 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
3485 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
3486 * elf.c (assign_file_positions_except_relocs): Test
3487 elf_backend_allow_non_load_phdr for NULL.
3488 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
3489 _bfd_elf_link_omit_section_dynsym. Update uses.
3490 (_bfd_elf_omit_section_dynsym_all): New function.
3491 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
3492 (_bfd_elf_omit_section_dynsym_default): Declare.
3493 (_bfd_elf_omit_section_dynsym_all): Declare.
3494 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
3495 (_bfd_nolink_bfd_get_relocated_section_contents),
3496 (_bfd_nolink_bfd_lookup_section_flags),
3497 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
3498 (_bfd_nolink_bfd_link_hash_table_create),
3499 (_bfd_nolink_bfd_link_just_syms),
3500 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
3501 (_bfd_nolink_bfd_link_split_section),
3502 (_bfd_nolink_section_already_linked),
3503 (_bfd_nolink_bfd_define_common_symbol),
3504 (_bfd_nolink_bfd_define_start_stop): New functions.
3505 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
3506 (_bfd_norelocs_bfd_reloc_name_lookup),
3507 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
3508 * section.c (_bfd_nowrite_set_section_contents): New function.
3509 * syms.c (_bfd_nosymbols_canonicalize_symtab),
3510 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
3511 (_bfd_nosymbols_get_symbol_version_string),
3512 (_bfd_nosymbols_bfd_is_local_label_name),
3513 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
3514 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
3515 (_bfd_nosymbols_bfd_make_debug_symbol),
3516 ( _bfd_nosymbols_read_minisymbols),
3517 ( _bfd_nosymbols_minisymbol_to_symbol),
3518 (_bfd_nodynamic_get_synthetic_symtab): New functions.
3519 * libbfd-in.h: Declare new functions. Update existing defines,
3520 removing casts.
3521 * aix386-core.c: Update to use new hooks. Formatting.
3522 * aout-adobe.c: Likewise.
3523 * aout-arm.c: Likewise.
3524 * aout-target.h: Likewise.
3525 * aout-tic30.c: Likewise.
3526 * aoutf1.h: Likewise.
3527 * binary.c: Likewise.
3528 * bout.c: Likewise.
3529 * cisco-core.c: Likewise.
3530 * coff-alpha.c: Likewise.
3531 * coff-i386.c: Likewise.
3532 * coff-i860.c: Likewise.
3533 * coff-i960.c: Likewise.
3534 * coff-ia64.c: Likewise.
3535 * coff-mips.c: Likewise.
3536 * coff-ppc.c: Likewise.
3537 * coff-rs6000.c: Likewise.
3538 * coff-sh.c: Likewise.
3539 * coff-tic30.c: Likewise.
3540 * coff-tic54x.c: Likewise.
3541 * coff-x86_64.c: Likewise.
3542 * coff64-rs6000.c: Likewise.
3543 * coffcode.h: Likewise.
3544 * elf-m10300.c: Likewise.
3545 * elf32-cr16.c: Likewise.
3546 * elf32-lm32.c: Likewise.
3547 * elf32-m32r.c: Likewise.
3548 * elf32-metag.c: Likewise.
3549 * elf32-score.c: Likewise.
3550 * elf32-score7.c: Likewise.
3551 * elf32-tilepro.c: Likewise.
3552 * elf32-xstormy16.c: Likewise.
3553 * elf32-xtensa.c: Likewise.
3554 * elf64-alpha.c: Likewise.
3555 * elf64-hppa.c: Likewise.
3556 * elf64-ia64-vms.c: Likewise.
3557 * elf64-mmix.c: Likewise.
3558 * elf64-sh64.c: Likewise.
3559 * elfnn-ia64.c: Likewise.
3560 * elfxx-sparc.c: Likewise.
3561 * elfxx-target.h: Likewise.
3562 * elfxx-tilegx.c: Likewise.
3563 * elfxx-x86.h: Likewise.
3564 * hp300hpux.c: Likewise.
3565 * hppabsd-core.c: Likewise.
3566 * hpux-core.c: Likewise.
3567 * i386msdos.c: Likewise.
3568 * i386os9k.c: Likewise.
3569 * ieee.c: Likewise.
3570 * ihex.c: Likewise.
3571 * irix-core.c: Likewise.
3572 * libaout.h: Likewise.
3573 * libecoff.h: Likewise.
3574 * mach-o-target.c: Likewise.
3575 * mach-o.c: Likewise.
3576 * mipsbsd.c: Likewise.
3577 * mmo.c: Likewise.
3578 * netbsd-core.c: Likewise.
3579 * nlm-target.h: Likewise.
3580 * oasys.c: Likewise.
3581 * osf-core.c: Likewise.
3582 * pdp11.c: Likewise.
3583 * pe-mips.c: Likewise.
3584 * pe-x86_64.c: Likewise.
3585 * pef.c: Likewise.
3586 * plugin.c: Likewise.
3587 * ppcboot.c: Likewise.
3588 * ptrace-core.c: Likewise.
3589 * sco5-core.c: Likewise.
3590 * som.c: Likewise.
3591 * sparclynx.c: Likewise.
3592 * srec.c: Likewise.
3593 * tekhex.c: Likewise.
3594 * trad-core.c: Likewise.
3595 * verilog.c: Likewise.
3596 * versados.c: Likewise.
3597 * vms-alpha.c: Likewise.
3598 * vms-lib.c: Likewise.
3599 * wasm-module.c: Likewise.
3600 * xsym.c: Likewise.
3601 * libbfd.h: Regenerate.
3602
2a0d9853
JW
36032018-02-15 Jim Wilson <jimw@sifive.com>
3604
09ca4b9d
JW
3605 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
3606 symbols whose section address is zero.
3607
2a0d9853
JW
3608 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
3609 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
3610 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
3611 Add %X%P to error messages.
3612
e513bd38
EB
36132018-02-15 Eric Botcazou <ebotcazou@adacore.com>
3614
3615 PR ld/22832
3616 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
3617 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
3618 and assert that the result of the call is not NULL.
3619
12ef3f5a
NC
36202018-02-14 Nick Clifton <nickc@redhat.com>
3621
3622 PR 22823
3623 Revert previous delta. Add extra casts to avoid compile time
3624 warnings instead.
3625 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
3626 cast to avoid warning from gcc v8 compiler.
3627 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
3628 (_bfd_generic_bfd_set_private_flags): Likewise.
3629 (_bfd_generic_bfd_copy_private_section_data): Likewise.
3630 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
3631 (_bfd_generic_bfd_copy_private_header_data): Likewise.
3632 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
3633 (_bfd_noarchive_construct_extended_name_table): Likewise.
3634 (_bfd_noarchive_truncate_arname): Likewise.
3635 (_bfd_noarchive_write_ar_hdr): Likewise.
3636 (_bfd_noarchive_get_elt_at_index): Likewise.
3637 (_bfd_nosymbols_canonicalize_symtab): Likewise.
3638 (_bfd_nosymbols_print_symbol): Likewise.
3639 (_bfd_nosymbols_get_symbol_info): Likewise.
3640 (_bfd_nosymbols_get_symbol_version_string): Likewise.
3641 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
3642 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
3643 (_bfd_nosymbols_get_lineno): Likewise.
3644 (_bfd_nosymbols_find_nearest_line): Likewise.
3645 (_bfd_nosymbols_find_line): Likewise.
3646 (_bfd_nosymbols_find_inliner_info): Likewise.
3647 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
3648 (_bfd_nosymbols_read_minisymbols): Likewise.
3649 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
3650 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
3651 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
3652 (_bfd_nowrite_set_arch_mach): Likewise.
3653 (_bfd_nowrite_set_section_contents): Likewise.
3654 (_bfd_nolink_sizeof_headers): Likewise.
3655 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
3656 (_bfd_nolink_bfd_relax_section): Likewise.
3657 (_bfd_nolink_bfd_gc_sections): Likewise.
3658 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
3659 (_bfd_nolink_bfd_merge_sections): Likewise.
3660 (_bfd_nolink_bfd_is_group_section): Likewise.
3661 (_bfd_nolink_bfd_discard_group): Likewise.
3662 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
3663 (_bfd_nolink_bfd_link_add_symbols): Likewise.
3664 (_bfd_nolink_bfd_link_just_syms): Likewise.
3665 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
3666 (_bfd_nolink_bfd_final_link): Likewise.
3667 (_bfd_nolink_bfd_link_split_section): Likewise.
3668 (_bfd_nolink_section_already_linked): Likewise.
3669 (_bfd_nolink_bfd_define_common_symbol): Likewise.
3670 (_bfd_nolink_bfd_define_start_stop): Likewise.
3671 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
3672 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
3673 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
3674 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
3675 * libbfd.c (bfd_false_any): Delete.
3676 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
3677 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
3678 * libbfd.h (extern): Regenerate
3679 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
3680 cast to avoid warning from gcc v8 compiler.
3681 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
3682 * binary.c (binary_get_symbol_info): Likewise.
3683 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
3684 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3685 * coffcode.h (coff_set_alignment_hook): Likewise.
3686 (symname_in_debug_hook): Likewise.
3687 (bfd_coff_backend_data bigobj_swap_table): Likewise.
3688 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
3689 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
3690 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
3691 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
3692 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
3693 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
3694 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
3695 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
3696 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
3697 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
3698 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
3699 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
3700 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
3701 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
3702 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
3703 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
3704 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
3705 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
3706 (bfd_elfNN_bfd_set_private_flags): Likewise.
3707 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
3708 (elf_backend_init_index_section): Likewise.
3709 (elf_backend_allow_non_load_phdr): Likewise.
3710 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
3711 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
3712 * ieee.c (ieee_construct_extended_name_table): Likewise.
3713 (ieee_write_armap): Likewise.
3714 (ieee_write_ar_hdr): Likewise.
3715 (ieee_bfd_is_target_special_symbol): Likewise.
3716 * ihex.c (ihex_canonicalize_symtab): Likewise.
3717 (ihex_bfd_is_target_special_symbol): Likewise.
3718 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
3719 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
3720 (_bfd_ecoff_set_alignment_hook): Likewise.
3721 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
3722 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
3723 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
3724 * oasys.c (oasys_construct_extended_name_table): Likewise.
3725 (oasys_write_armap): Likewise.
3726 (oasys_write_ar_hdr): Likewise.
3727 (oasys_bfd_is_target_special_symbol): Likewise.
3728 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
3729 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
3730 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
3731 * som.c (som_bfd_is_target_special_symbol): Likewise.
3732 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
3733 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
3734 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
3735 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
3736 (versados_bfd_reloc_name_lookup): Likewise.
3737 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
3738 (vms_bfd_define_start_stop): Likewise.
3739 (alpha_vms_bfd_is_target_special_symbol): Likewise.
3740 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
3741 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
3742
451875b4
L
37432018-02-14 H.J. Lu <hongjiu.lu@intel.com>
3744
3745 PR ld/22842
3746 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
3747 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
3748 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
3749 R_X86_64_PC32 reloc against dynamic function in data section.
3750 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
3751 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
3752 against dynamic function in data section.
3753 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
3754 function address only if pcrel_plt is true.
3755 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
3756 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
3757 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
3758 PC-relative relocation against a function definition in data
3759 secton in PIE. Remove the obsolete comments.
3760 (elf_x86_link_hash_table): Add pcrel_plt.
3761
1031c264
L
37622018-02-13 H.J. Lu <hongjiu.lu@intel.com>
3763
3764 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
3765 instead of bfd_link_pic, for building shared library.
3766
bd7ab16b
L
37672018-02-13 H.J. Lu <hongjiu.lu@intel.com>
3768
3769 PR gas/22791
3770 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
3771 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
3772 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
3773 against protected function in shared object.
3774
80c96350
ST
37752018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
3776
3777 PR 22828
3778 * po/ru.po: Fix typo in Russian translation.
3779
87993319
MR
37802018-02-13 Maciej W. Rozycki <macro@mips.com>
3781
3782 * wasm-module.c (wasm_scan_name_function_section): Rename
3783 `index' local variable to `idx'.
3784
68d20676
NC
37852018-02-13 Nick Clifton <nickc@redhat.com>
3786
3787 PR 22823
3788 Fix compile time warnings generated by gcc version 8.
3789 * libbfd-in.h: Remove extraneous text from prototypes.
3790 Add prototypes for bfd_false_any, bfd_true_any,
3791 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
3792 bfd_n1_any, bfd_void_any.
3793 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
3794 function.
3795 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
3796 (_bfd_generic_bfd_set_private_flags): Likewise.
3797 (_bfd_generic_bfd_copy_private_section_data): Likewise.
3798 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
3799 (_bfd_generic_bfd_copy_private_header_data): Likewise.
3800 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
3801 (_bfd_noarchive_construct_extended_name_table): Likewise.
3802 (_bfd_noarchive_truncate_arname): Likewise.
3803 (_bfd_noarchive_write_ar_hdr): Likewise.
3804 (_bfd_noarchive_get_elt_at_index): Likewise.
3805 (_bfd_nosymbols_canonicalize_symtab): Likewise.
3806 (_bfd_nosymbols_print_symbol): Likewise.
3807 (_bfd_nosymbols_get_symbol_info): Likewise.
3808 (_bfd_nosymbols_get_symbol_version_string): Likewise.
3809 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
3810 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
3811 (_bfd_nosymbols_get_lineno): Likewise.
3812 (_bfd_nosymbols_find_nearest_line): Likewise.
3813 (_bfd_nosymbols_find_line): Likewise.
3814 (_bfd_nosymbols_find_inliner_info): Likewise.
3815 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
3816 (_bfd_nosymbols_read_minisymbols): Likewise.
3817 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
3818 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
3819 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
3820 (_bfd_nowrite_set_arch_mach): Likewise.
3821 (_bfd_nowrite_set_section_contents): Likewise.
3822 (_bfd_nolink_sizeof_headers): Likewise.
3823 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
3824 (_bfd_nolink_bfd_relax_section): Likewise.
3825 (_bfd_nolink_bfd_gc_sections): Likewise.
3826 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
3827 (_bfd_nolink_bfd_merge_sections): Likewise.
3828 (_bfd_nolink_bfd_is_group_section): Likewise.
3829 (_bfd_nolink_bfd_discard_group): Likewise.
3830 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
3831 (_bfd_nolink_bfd_link_add_symbols): Likewise.
3832 (_bfd_nolink_bfd_link_just_syms): Likewise.
3833 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
3834 (_bfd_nolink_bfd_final_link): Likewise.
3835 (_bfd_nolink_bfd_link_split_section): Likewise.
3836 (_bfd_nolink_section_already_linked): Likewise.
3837 (_bfd_nolink_bfd_define_common_symbol): Likewise.
3838 (_bfd_nolink_bfd_define_start_stop): Likewise.
3839 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
3840 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
3841 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
3842 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
3843 * libbfd.c (bfd_false_any): New function. Like bfd_false but
3844 accepts one or more arguments.
3845 (bfd_true_any): Likewise.
3846 (bfd_nullvoidptr_any): Likewise.
3847 (bfd_0_any): Likewise.
3848 (bfd_0u_any): Likewise.
3849 (bfd_0l_any): Likewise.
3850 (_bfd_n1_any): Likewise.
3851 (bfd_void_any): Likewise.
3852 * libbfd.h (extern): Regenerate
3853 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
3854 based dummy function.
3855 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
3856 * binary.c (binary_get_symbol_info): Likewise.
3857 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
3858 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3859 * coffcode.h (coff_set_alignment_hook): Likewise.
3860 (symname_in_debug_hook): Likewise.
3861 (bfd_coff_backend_data bigobj_swap_table): Likewise.
3862 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
3863 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
3864 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
3865 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
3866 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
3867 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
3868 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
3869 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
3870 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
3871 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
3872 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
3873 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
3874 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
3875 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
3876 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
3877 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
3878 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
3879 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
3880 (bfd_elfNN_bfd_set_private_flags): Likewise.
3881 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
3882 (elf_backend_init_index_section): Likewise.
3883 (elf_backend_allow_non_load_phdr): Likewise.
3884 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
3885 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
3886 * ieee.c (ieee_construct_extended_name_table): Likewise.
3887 (ieee_write_armap): Likewise.
3888 (ieee_write_ar_hdr): Likewise.
3889 (ieee_bfd_is_target_special_symbol): Likewise.
3890 * ihex.c (ihex_canonicalize_symtab): Likewise.
3891 (ihex_bfd_is_target_special_symbol): Likewise.
3892 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
3893 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
3894 (_bfd_ecoff_set_alignment_hook): Likewise.
3895 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
3896 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
3897 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
3898 * oasys.c (oasys_construct_extended_name_table): Likewise.
3899 (oasys_write_armap): Likewise.
3900 (oasys_write_ar_hdr): Likewise.
3901 (oasys_bfd_is_target_special_symbol): Likewise.
3902 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
3903 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
3904 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
3905 * som.c (som_bfd_is_target_special_symbol): Likewise.
3906 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
3907 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
3908 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
3909 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
3910 (versados_bfd_reloc_name_lookup): Likewise.
3911 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
3912 (vms_bfd_define_start_stop): Likewise.
3913 (alpha_vms_bfd_is_target_special_symbol): Likewise.
3914 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
3915 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
3916 * elf32-arc.c (get_replace_function): Assign replacement function
3917 to func pointer.
3918 * elf32-i370.c (i370_noop): Update prototype.
3919
6e5e9d58
AM
39202018-02-13 Alan Modra <amodra@gmail.com>
3921
3922 PR 22836
3923 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
3924 relocation sections. If size reduces to just the flag word,
3925 remove that too and mark with SEC_EXCLUDE.
3926 * elflink.c (bfd_elf_final_link): Strip empty group sections.
3927
f2731e0c
AM
39282018-02-13 Alan Modra <amodra@gmail.com>
3929
3930 PR 22829
3931 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
3932 PT_GNU_RELRO setup.
3933
830db048
ZF
39342018-02-12 Zebediah Figura <z.figura12@gmail.com>
3935
3936 * i386msdos.c (msdos_mkobject); New function.
3937 (msdos_object_p): New function.
3938 (i386_msdos_vec): Use msdos_object_p as the check_format
3939 function.
3940 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
3941 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
3942 IMAGE_NT_SIGNATURE.
3943 * peXXigen.c: Likewise.
3944 * coff-ia64.c: Likewise.
3945
94fe5757
NC
39462018-02-12 Nick Clifton <nickc@redhat.com>
3947
3948 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
3949 assignment.
0b8683b7 3950 * elf32-arc.c (elf_arc_relocate_section): Likewise.
94fe5757 3951
d805612e 39522018-02-09 Eric Botcazou <ebotcazou@adacore.com>
a8735c82
EB
3953
3954 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
3955 (sparc_elf_append_rela): Assert that there is enough room in section.
3956 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
3957 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
3958 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
3959 For a symbol subject to a GOT relocation, reserve a slot in the
3960 relocation section if the symbol isn't dynamic and we are in PIC mode.
3961 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
3962 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
3963 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
3964 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
3965 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
3966 resolved_to_zero. Do not generate a dynamic GOT relocation for an
3967 undefined weak symbol with non-default visibility. Remove superfluous
3968 'else' and fix formatting.
3969
3b4c3844
L
39702018-02-09 H.J. Lu <hongjiu.lu@intel.com>
3971
3972 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
3973 is_solaris.
3974 (i386_elf32_sol2_vec): Don't declare.
3975 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
3976 Don't set need_global_offset_table.
3977 (elf_i386_solaris_arch_bed): New.
3978 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
3979 Solaris.
3980 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
3981 target_os != is_nacl instead of target_os == is_normal.
3982 (x86_64_elf64_sol2_vec): Don't declare.
3983 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
3984 is_nacl instead of target_os == is_normal. Don't set
3985 need_global_offset_table.
3986 (elf_x86_64_solaris_arch_bed): New.
3987 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
3988 Solaris.
3989 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
3990 _GLOBAL_OFFSET_TABLE_ for Solaris.
3991 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
3992 need_global_offset_table.
3993 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
3994 (elf_x86_link_hash_table): Remove need_global_offset_table.
3995 (elf_x86_init_table): Likewise.
3996
15b23f36
L
39972018-02-08 H.J. Lu <hongjiu.lu@intel.com>
3998
3999 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
4000 Remove prototype.
4001 (i386_elf32_sol2_vec): Declared.
4002 (elf_i386_link_setup_gnu_properties): Set
4003 need_global_offset_table with info->output_bfd->xvec.
4004 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
4005 Remove prototype.
4006 (x86_64_elf64_sol2_vec): Declared.
4007 (elf_x86_64_link_setup_gnu_properties): Set
4008 need_global_offset_table with info->output_bfd->xvec.
4009
dc11dea2
L
40102018-02-08 H.J. Lu <hongjiu.lu@intel.com>
4011
4012 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
4013 New prototype.
4014 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
4015 for Solaris.
4016 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
4017 New prototype.
4018 (elf_x86_64_link_setup_gnu_properties): Set
4019 need_global_offset_table for Solaris.
4020 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
4021 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
4022 (_bfd_x86_elf_link_setup_gnu_properties): Copy
4023 need_global_offset_table.
4024 * elfxx-x86.h (elf_x86_link_hash_table): Add
4025 need_global_offset_table.
4026 (elf_x86_init_table): Likewise.
4027
3f48fe4a
JW
40282018-02-08 Jim Wilson <jimw@sifive.com>
4029
4030 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
4031 change.
4032
ef135d43
NC
40332018-02-08 Nick Clifton <nickc@redhat.com>
4034
4035 PR 22788
4036 * elf.c (elf_parse_notes): Reject notes with excessuively large
4037 alignments.
4038
407aa07c
AM
40392018-02-07 Alan Modra <amodra@gmail.com>
4040
4041 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
4042 * elf32-ppc.c: Remove speculation barrier support.
4043 * elf32-ppc.h: Likewise.
4044 * elf64-ppc.c: Likewise.
4045 * elf64-ppc.h: Likewise.
4046
ed01220c
JW
40472018-02-06 Jim Wilson <jimw@sifive.com>
4048
4049 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
4050 callback to report an error.
4051
c20c30f6
EB
40522018-02-06 Eric Botcazou <ebotcazou@adacore.com>
4053
4054 PR ld/22263
4055 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
4056 into call to !bfd_link_executable and tidy up.
4057 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
4058 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
4059 !bfd_link_executable.
4060 <R_SPARC_TLS_IE_HI22>: Likewise.
4061 <GOT relocations>: Remove useless code, tidy and merge related blocks.
4062 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
4063 !bfd_link_executable.
4064 <R_SPARC_WPLT30>: Tidy up.
4065 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
4066 !bfd_link_executable.
4067 (allocate_dynrelocs): Likewise.
4068 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
4069 <R_SPARC_TLS_GD_HI22>: Merge into...
4070 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
4071 sparc_elf_tls_transition and remove redundant code.
4072 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
4073 !bfd_link_executable.
4074 <R_SPARC_TLS_LDO_HIX22>: Likewise.
4075 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
4076 <R_SPARC_TLS_LDM_CALL>: Likewise.
4077 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
4078 <R_SPARC_TLS_GD_ADD>: Likewise.
4079 <R_SPARC_TLS_LDM_ADD>: Likewise.
4080 <R_SPARC_TLS_LDO_ADD>: Likewise.
4081 <R_SPARC_TLS_IE_LD>: Likewise.
4082
46d09186
NC
40832018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
4084
4085 PR 22789
4086 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
4087 functions failed to find the function name, try the generic elf
4088 find function instead.
4089
8278e7ce
SDJ
40902018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
4091
4092 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
4093 'memcpy' instead of 'strncpy' when writing the magic number.
4094
64e234d4
NC
40952018-02-06 Nick Clifton <nickc@redhat.com>
4096
4097 PR 22794
4098 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
4099 section before attempting to read it in.
4100 (bfd_get_alt_debug_link_info): Likewise.
4101
422f3d3d
PC
41022018-02-06 Paul Carroll <pcarroll@codesourcery.com>
4103
4104 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
4105 line information in addition to name, if they can be found.
4106
279b2f94
RL
41072018-02-05 Renlin Li <renlin.li@arm.com>
4108
4109 PR ld/22764
4110 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
4111 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
4112 check for writeable section as well.
4113
cd048363
L
41142018-02-05 H.J. Lu <hongjiu.lu@intel.com>
4115
4116 PR ld/22782
4117 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
4118 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
4119 undefined weak symbol to 0.
4120 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
4121 if _GLOBAL_OFFSET_TABLE_ is referenced.
4122 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
4123 got_referenced instead of ref_regular_nonweak. Remove the
4124 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
4125 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
4126
e65b1a78
MR
41272018-02-05 Maciej W. Rozycki <macro@mips.com>
4128
4129 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
4130 initialize `hi_reloc'.
4131
2d6dda71
MR
41322018-02-05 Maciej W. Rozycki <macro@mips.com>
4133
4134 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
4135 SHT_MIPS_REGINFO sections don't assert the correct size and
4136 report an error instead.
4137
75506100
MR
41382018-02-05 Maciej W. Rozycki <macro@mips.com>
4139
4140 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
4141 status from `->elf_backend_section_processing'.
4142
7f02625e
JW
41432018-02-02 Jim Wilson <jimw@sifive.com>
4144
4145 PR ld/22756
4146 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
4147 If link_info->wrap_hash, check for a duplicate symbol and ignore.
4148 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
4149 Pass new argument to riscv_relax_delete_bytes.
4150 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
4151 ATTRIBUTE_UNUSED from link_info parameter.
4152
d830549d
AM
41532018-02-02 Alan Modra <amodra@gmail.com>
4154
4155 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
4156 emitted for toc sequence optimization. Set and use "howto" later.
4157
e99955cd
SM
41582018-02-01 Simon Marchi <simon.marchi@ericsson.com>
4159
4160 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
4161 arithmetic on NULL pointer.
4162 * elflink.c (_bfd_elf_archive_symbol_lookup,
4163 elf_link_add_archive_symbols): Likewise.
4164
bf3077a6
MM
41652018-01-31 Michael Matz <matz@suse.de>
4166
4167 * elflink.c (bfd_elf_define_start_stop): Fix check of
4168 def_dynamic.
4169
823143c6
L
41702018-01-31 H.J. Lu <hongjiu.lu@intel.com>
4171
4172 PR ld/21964
4173 * elflink.c (bfd_elf_define_start_stop): Check if __start and
4174 __stop symbols are referenced by shared objects.
4175
76cb3a89
AM
41762018-01-30 Alan Modra <amodra@gmail.com>
4177
4178 PR 22758
4179 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
4180 segment when demand paged with lma on the same page. Test this
4181 before load/non-load, executable/non-executable,
4182 writable/non-writable tests and simplify. Delete bogus relro
4183 condition in writable/non-writable test. Delete outdated
4184 comment. Formatting.
4185
36b8fda5
AM
41862018-01-30 Alan Modra <amodra@gmail.com>
4187
4188 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
4189 symbols dynamic.
4190
eb77f6a4
AM
41912018-01-29 Alan Modra <amodra@gmail.com>
4192
4193 PR 22741
4194 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
4195 range before converting to a symbol table pointer.
4196
7d73b4c8
NC
41972018-01-27 Nick Clifton <nickc@redhat.com>
4198
4199 * po/ru.po: Updated Russian translation.
4200
32253bb7
AM
42012018-01-26 Alan Modra <amodra@gmail.com>
4202
4203 * elflink.c (bfd_elf_define_start_stop): Override symbols when
4204 they are defined dynamically.
4205
ba21f564
AM
42062018-01-26 Alan Modra <amodra@gmail.com>
4207
4208 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
4209 .branch_lt changes size.
4210
38e64b0e
AM
42112018-01-25 Alan Modra <amodra@gmail.com>
4212
4213 PR 22746
4214 * elfcode.h (elf_object_p): Avoid integer overflow.
4215
bb363086
EB
42162018-01-25 Eric Botcazou <ebotcazou@adacore.com>
4217
4218 PR ld/22727
4219 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
4220 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
4221
4222 Revert
4223 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
4224
4225 PR ld/22263
4226 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
4227 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
4228 bfd_link_executable for TLS check.
4229 (_bfd_sparc_elf_check_relocs): Likewise.
4230 (allocate_dynrelocs): Likewise.
4231 (_bfd_sparc_elf_relocate_section): Likewise.
4232
1daf502a
RL
42332018-01-24 Renlin Li <renlin.li@arm.com>
4234
4235 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
4236 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
4237 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
4238 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
4239 BFD_RELOC_AARCH64_MOVW_PREL_G3.
4240 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
4241 (_bfd_aarch64_elf_resolve_relocation): Likewise.
4242
32247401
RL
42432018-01-24 Renlin Li <renlin.li@arm.com>
4244
4245 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
4246 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
4247 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
4248 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
4249 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
4250 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
4251 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
4252 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
4253 BFD_RELOC_AARCH64_MOVW_PREL_G3.
4254 * bfd-in2.h: Regenerate.
4255 * libbfd.h: Regenerate.
4256
1c5e4ee9
MR
42572018-01-23 Maciej W. Rozycki <macro@mips.com>
4258
4259 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
4260 `mips_elf32_section_processing' comment reference.
4261
8a1b824a
L
42622018-01-20 H.J. Lu <hongjiu.lu@intel.com>
4263
4264 PR ld/22721
4265 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
4266 versioned __tls_get_addr symbol.
4267
ee3fbc1e
NC
42682018-01-19 Nick Clifton <nickc@redhat.com>
4269
4270 * po/fr.po: Updated French translation.
4271
691d2e9a
AM
42722018-01-18 Alan Modra <amodra@gmail.com>
4273
4274 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
4275 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
4276 (ppc64_elf_build_stubs): Likewise.
4277
4bfce128
NC
42782018-01-17 Nick Clifton <nickc@redhat.com>
4279
4280 * po/ru.po: Updated Russian translation.
4281 * po/uk/po: Updated Ukranian translation.
4282
c75bc4f7
AM
42832018-01-17 Alan Modra <amodra@gmail.com>
4284
4285 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
4286
1be5d8d3
AM
42872018-01-17 Alan Modra <amodra@gmail.com>
4288
4289 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
4290 (CRSETEQ, BEQCTRM): Define.
4291 (is_nonpic_glink_stub): Don't check bctr.
4292 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
4293 (ppc_elf_relax_section): Size speculation barrier.
4294 (output_bctr): New function.
4295 (write_glink_stub): Use output_bctr.
4296 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
4297 (ppc_elf_finish_dynamic_symbol): Likewise.
4298 (ppc_elf_finish_dynamic_sections): Use output_bctr.
4299 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
4300 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
4301 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
4302 (size_global_entry_stubs): Handle speculation barrier sizing.
4303 (plt_stub_size): Likewise.
4304 (output_bctr): New function.
4305 (build_plt_stub, build_tls_get_addr_stub): Output speculation
4306 barrier.
4307 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
4308 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
4309 (build_global_entry_stubs): Output speculation barrier.
4310 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
4311 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
4312
9e390558
AM
43132018-01-17 Alan Modra <amodra@gmail.com>
4314
4315 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
4316 __tls_get_addr_opt, and alignment sizing.
4317 (TLS_GET_ADDR_GLINK_SIZE): Delete.
4318 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
4319 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
4320 or 8 insns.
4321 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
4322 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
4323 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
4324 by PLT reloc count.
4325 (write_glink_stub): Handle __tls_get_addr_opt stub.
4326 Pad out to size given by GLINK_ENTRY_SIZE.
4327 (ppc_elf_relocate_section): Adjust write_glink_stub call.
4328 (ppc_elf_finish_dynamic_symbol): Likewise.
4329 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
4330 insn array since so many need rewriting.
4331 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
4332 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
4333 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
4334 nops. Adjust all uses.
4335 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
4336 in glink_vma calculation.
4337 (struct ppc_link_hash_table): Add global_entry section pointer.
4338 (create_linkage_sections): Create separate section for global
4339 entry stubs.
4340 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
4341 (size_global_entry_stubs): Handle sizing for aligned stubs.
4342 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
4343 and don't stash end of glink branch table in rawsize.
4344 (ppc_build_one_stub): Rewrite stub size calculations.
4345 (build_global_entry_stubs): Use new section.
4346 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
4347 Build lazy link stubs out to end of section. Build global entry
4348 stubs in new section.
4349
616dcb87
NC
43502018-01-15 Nick Clifton <nickc@redhat.com>
4351
4352 * po/uk.po: Updated Ukranian translation.
4353
3957a496
NC
43542018-01-13 Nick Clifton <nickc@redhat.com>
4355
4356 * po/bfd.pot: Regenerated.
4357
769c7ea5
NC
43582018-01-13 Nick Clifton <nickc@redhat.com>
4359
4360 * version.m4: Bump version to 2.30.51
4361 * configure: Regenerate.
4362
faf766e3
NC
43632018-01-13 Nick Clifton <nickc@redhat.com>
4364
4365 2.30 branch created.
4366
564e11c9
JW
43672018-01-12 Jens Widell <jl@opera.com>
4368
4369 * elf.c (setup_group): Optimize search for group by remembering
4370 last found group and restarting search at that index.
4371 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
4372
a78eea16
AM
43732018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
4374
4375 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
4376 bfd_link_common_skip_none in switch.
4377
87e79a65
AM
43782018-01-12 Alan Modra <amodra@gmail.com>
4379
4380 PR ld/22649
4381 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
4382 references on forced local symbols.
4383
58807c48
VI
43842018-01-12 Vlad Ivanov <vlad@ivanov.email>
4385
4386 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
4387 .reginfo section has wrong size.
4388
2888249f
L
43892018-01-11 H.J. Lu <hongjiu.lu@intel.com>
4390
4391 PR ld/22393
4392 * elf.c (_bfd_elf_map_sections_to_segments): When generating
4393 separate code and read-only data LOAD segments, create a new
4394 LOAD segment if the previous section contains text and the
4395 current section doesn't or vice versa. Don't put a writable
4396 section in a read-only segment if there is a RELRO segment.
4397
d664fd41
L
43982018-01-11 H.J. Lu <hongjiu.lu@intel.com>
4399
4400 PR ld/22649
4401 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
4402 references on forced local symbols.
4403
8b6f4cd3
L
44042018-01-11 H.J. Lu <hongjiu.lu@intel.com>
4405
4406 PR ld/22677
4407 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
4408 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
4409
9c70c522 44102018-01-09 Kuan-Lin Chen <kuanlinchentw@gmail.com>
6cef73f9
KLC
4411
4412 PR 22662
4413 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
4414
ddb2bbcf
JB
44152018-01-03 John Baldwin <jhb@FreeBSD.org>
4416
4417 * elf.c (elfcore_grok_freebsd_note): Handle
4418 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
4419 NT_FREEBSD_PROCSTAT_VMMAP.
4420
219d1afa
AM
44212018-01-03 Alan Modra <amodra@gmail.com>
4422
4423 Update year range in copyright notice of all files.
4424
1e563868 4425For older changes see ChangeLog-2017
3499769a 4426\f
1e563868 4427Copyright (C) 2018 Free Software Foundation, Inc.
3499769a
AM
4428
4429Copying and distribution of this file, with or without modification,
4430are permitted in any medium without royalty provided the copyright
4431notice and this notice are preserved.
4432
4433Local Variables:
4434mode: change-log
4435left-margin: 8
4436fill-column: 74
4437version-control: never
4438End:
This page took 0.447818 seconds and 4 git commands to generate.