]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - bfd/ChangeLog
Automatic date update in version.in
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
61e3bf5f
L
12017-09-22 H.J. Lu <hongjiu.lu@intel.com>
2
3 PR binutils/22170
4 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
5 corrupted PLT.
6
b69e9267
L
72017-09-22 H.J. Lu <hongjiu.lu@intel.com>
8
59ca4c1b 9 PR binutils/22163
b69e9267
L
10 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
11 -1 if bfd_canonicalize_dynamic_reloc returns 0.
12
b877d21f
PA
132017-09-22 Pedro Alves <palves@redhat.com>
14 Alan Modra <amodra@gmail.com>
15
16 * version.h: Add comment.
17
8fe09d74
AA
182017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
19
20 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
21 NT_S390_GS_BC, correct the previously swapped invocations of
22 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
23
25516cc5
AM
242017-09-19 Alan Modra <amodra@gmail.com>
25
26 PR 21441
27 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
28 size.
29
3d13f3e9
AM
302017-09-19 Alan Modra <amodra@gmail.com>
31
32 PR 22150
33 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
34 symbols before calculating verrefs. Don't renumber dynsyms
35 after gc. Exclude .gnu.version when zero or one dynsym.
36 Localize some vars and reindent.
37
94670f6c
L
382017-09-18 H.J. Lu <hongjiu.lu@intel.com>
39
40 PR ld/22148
41 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
42 return from bfd_canonicalize_dynamic_reloc.
43
21d0a606
AM
442017-09-15 Alan Modra <amodra@gmail.com>
45
46 PR 22116
47 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
48 overflows bfd_size_type.
49
5e5e02ae
L
502017-09-14 H.J. Lu <hongjiu.lu@intel.com>
51
52 PR ld/22135
53 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
54 to indicate if conversion is performed.
55 (elf_i386_check_relocs): Cache section contents and relocations
56 if conversion is performed.
57 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
58 contents and relocations if conversion is performed.
59
4d465c68
NC
602017-09-14 Nick Clifton <nickc@redhat.com>
61
62 PR binutils/22113
63 * peXXigen.c (pe_print_idata): Extend check for HintName vector
64 entries.
65
f47432d4
L
662017-09-13 H.J. Lu <hongjiu.lu@intel.com>
67
68 * elfxx-x86.h: Fix a typo in comments.
69
4ec521f2
KLC
702017-09-09 Kamil Rytarowski <n54@gmx.com>
71
72 * elf32-nds32.c: Rename __BIT() to N32_BIT().
73
2420fff6
AM
742017-09-09 Alan Modra <amodra@gmail.com>
75
76 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
77 plt_stub_align.
78
c5bce5c6
L
792017-09-09 H.J. Lu <hongjiu.lu@intel.com>
80
81 * elf32-i386.c (elf_i386_relocate_section): Update usage of
82 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
83 (elf_i386_finish_dynamic_symbol): Likewise.
84 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
85 (elf_x86_64_finish_dynamic_symbol): Likewise.
86 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
87 (_bfd_x86_elf_fixup_symbol): Likewise.
88
8fbf0ba1
L
892017-09-09 H.J. Lu <hongjiu.lu@intel.com>
90
91 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
92 check has_non_got_reloc.
93
0a27fed7
L
942017-09-09 H.J. Lu <hongjiu.lu@intel.com>
95
96 PR ld/22115
97 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
98 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
99 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
100 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
101 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
102 and linker_def on __ehdr_start if it is referenced and not
103 defined.
104 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
105 and return TRUE when building executable, if a symbol has
106 non-GOT/non-PLT relocations in text section or there is no
107 dynamic linker.
108 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
109
c7df954f
L
1102017-09-08 H.J. Lu <hongjiu.lu@intel.com>
111
112 * elfxx-x86.h: Update comments.
113
1de031c8
L
1142017-09-08 H.J. Lu <hongjiu.lu@intel.com>
115
116 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
117 elf_x86_plt_layout_table with elf_x86_init_table.
118 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
119 Likewise.
120 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
121 Likewise.
122 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
123 (elf_x86_init_table): This.
124 (_bfd_x86_elf_link_setup_gnu_properties): Replace
125 elf_x86_plt_layout_table with elf_x86_init_table.
126
7a382c1c
L
1272017-09-07 H.J. Lu <hongjiu.lu@intel.com>
128
129 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
130 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
131 * configure: Regenerated.
132 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
133 and r_sym fields of plt_layout.
134 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
135 Likewise.
136 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
137 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
138 r_info nor r_sym fields.
139 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
140 fields of htab.
141 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
142
9eb7b0ac
PD
1432017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
144
145 * (_bfd_riscv_relax_align): Call bfd_set_error and
146 print an error message when unable to relax a .align directive.
147
b1308d2c
PD
1482017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
149
150 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
151 (riscv_record_pcrel_hi_reloc): Add absolute argument.
152 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
153 R_RISCV_PCREL_HI20 relocs, and pass the result to
154 riscv_record_pcrel_hi_reloc.
155
6999821f
L
1562017-09-07 H.J. Lu <hongjiu.lu@intel.com>
157
158 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
159 r_type_p. Remove the converted argument. Replace
160 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
161 the new relocation type via r_type_p.
162 (elf_i386_relocate_section): Likewise.
163 (elf_i386_finish_dynamic_symbol): Likewise.
164 (need_convert_load): Removed.
165 (check_relocs_failed): Updated.
166 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
167 instead of setting need_convert_load.
168 (_bfd_i386_elf_convert_load): Removed.
169 * elf64-x86-64.c (need_convert_load): Removed.
170 (check_relocs_failed): Updated.
171 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
172 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
173 Return the new relocation type via r_type_p.
174 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
175 instead of setting need_convert_load.
176 (elf_x86_64_check_relocs): Don't check PIC if relocation has
177 been converted.
178 (_bfd_x86_64_elf_convert_load): Removed.
179 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
180 with SYMBOL_REFERENCES_LOCAL_P.
181 (elf_x86_64_finish_dynamic_symbol): Likewise.
182 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
183 set convert_load.
184 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
185 (_bfd_x86_elf_link_symbol_references_local): New function.
186 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
187 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
188 SYMBOL_REFERENCES_LOCAL_P.
189 (elf_x86_link_hash_entry): Add local_ref.
190 (elf_x86_link_hash_table): Remove convert_load.
191 (_bfd_i386_elf_convert_load): Removed.
192 (_bfd_x86_64_elf_convert_load): Likewise.
193 (_bfd_x86_elf_link_symbol_references_local): New.
194
78984959
L
1952017-09-06 H.J. Lu <hongjiu.lu@intel.com>
196
197 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
198 (elf_x86_64_info_to_howto): Get the real relocation type by
199 masking out R_X86_64_converted_reloc_bit.
200 (elf_x86_64_check_tls_transition): Get the real relocation type
201 by masking out R_X86_64_converted_reloc_bit.
202 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
203 instead of setting converted_reloc.
204 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
205 instead of converted_reloc. Get the real relocation type by
206 masking out R_X86_64_converted_reloc_bit.
207 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
208 R_X86_64_converted_reloc_bit is valid.
209 * elfxx-x86.h (converted_reloc): Removed.
210
419414ea
L
2112017-09-06 H.J. Lu <hongjiu.lu@intel.com>
212
213 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
214 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
215 to get the relocation type again.
216 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
217 r_type when calling elf_x86_64_tls_transition. Don't use
218 ELF32_R_TYPE to get the relocation type again.
219
dc089072
L
2202017-09-05 H.J. Lu <hongjiu.lu@intel.com>
221
222 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
223 converted_reloc.
224
8b43e456
L
2252017-09-05 H.J. Lu <hongjiu.lu@intel.com>
226
227 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
228 argument. Don't check relocation overflow. Avoid relocation
229 overflow if --no-relax is used. Set converted_reloc on symbol
230 if a GOTPCREL relocation is converted.
231 (elf_x86_64_relocate_section): Issue a fatal error and suggest
232 --no-relax if GOTPCREL relocation conversion leads to relocation
233 overflow.
234 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
235
83eef883
AFB
2362017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
237 Edmar Wienskoski <edmar.wienskoski@nxp.com
238
239 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
240 (ppc_elf_check_relocs): Handle it.
241 (ppc_elf_vle_split20): New function.
242 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
243
0e30d991
L
2442017-09-03 H.J. Lu <hongjiu.lu@intel.com>
245
246 PR ld/22071
247 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
248 for x86-64 if GOT_TLS_GDESC_P is true.
249
1cf58434
AM
2502017-09-03 Alan Modra <amodra@gmail.com>
251
252 PR 22067
253 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
254
f04bdfa7
L
2552017-09-02 H.J. Lu <hongjiu.lu@intel.com>
256
257 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
258 tls_get_addr for x86-64 in one place.
259
2ac3a7f5
L
2602017-09-02 H.J. Lu <hongjiu.lu@intel.com>
261
262 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
263 with elfxx-x86.lo for 64-bit BFD.
264 * configure: Regenerated.
265
d47a8026
L
2662017-09-02 H.J. Lu <hongjiu.lu@intel.com>
267
268 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
269 (_bfd_i386_elf_convert_load): This. Remove static.
270 (elf_i386_size_dynamic_sections): Removed.
271 (elf_backend_size_dynamic_sections): Likewise.
272 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
273 (_bfd_x86_64_elf_convert_load): This. Remove static.
274 (elf_x86_64_size_dynamic_sections): Removed.
275 (elf_backend_size_dynamic_sections): Likewise.
276 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
277 (elf_x86_allocate_dynrelocs): This. Make it static.
278 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
279 (elf_x86_allocate_local_dynreloc): This. Make it static.
280 (elf_i386_is_reloc_section): New function.
281 (elf_x86_64_is_reloc_section): Likewise.
282 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
283 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
284 Rearrange got_entry_size initialization.
285 (_bfd_x86_elf_size_dynamic_sections): New function.
286 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
287 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
288 (_bfd_i386_elf_convert_load): New.
289 (_bfd_x86_64_elf_convert_load): Likewise.
290 (_bfd_x86_elf_size_dynamic_sections): Likewise.
291 (elf_backend_size_dynamic_sections): Likewise.
292 (_bfd_x86_elf_allocate_dynrelocs): Removed.
293 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
294
2926eb2c
L
2952017-09-02 H.J. Lu <hongjiu.lu@intel.com>
296
297 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
298 update comments.
299
92c10f5f
L
3002017-09-02 H.J. Lu <hongjiu.lu@intel.com>
301
302 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
303 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
304
aa595247
L
3052017-09-02 H.J. Lu <hongjiu.lu@intel.com>
306
307 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
308 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
309 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
310 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
311 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
312 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
313
b9ce864c
L
3142017-09-02 H.J. Lu <hongjiu.lu@intel.com>
315
316 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
317 (elf_i386_allocate_local_dynrelocs): Likewise.
318 (elf_i386_size_dynamic_sections): Replace
319 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
320 with _bfd_x86_elf_allocate_dynrelocs and
321 _bfd_x86_elf_allocate_local_dynrelocs.
322 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
323 (elf_x86_64_allocate_local_dynrelocs): Likewise.
324 (elf_x86_64_size_dynamic_sections): Replace
325 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
326 with _bfd_x86_elf_allocate_dynrelocs and
327 _bfd_x86_elf_allocate_local_dynrelocs.
328 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
329 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
330 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
331 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
332
fe53b4a4
L
3332017-09-02 H.J. Lu <hongjiu.lu@intel.com>
334
335 * elf32-i386.c (is_i386_elf): Removed.
336 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
337 (elf_i386_size_dynamic_sections): Likewise.
338 (elf_i386_relocate_section): Likewise.
339 * elf64-x86-64.c (is_x86_64_elf): Removed.
340 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
341 is_x86_elf.
342 (elf_x86_64_size_dynamic_sections): Likewise.
343 (elf_x86_64_relocate_section): Likewise.
344 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
345 target_id.
346 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
347 (is_x86_elf): New.
348
9ff114ca
L
3492017-09-02 H.J. Lu <hongjiu.lu@intel.com>
350
351 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
352 (elf_i386_allocate_dynrelocs): Replace
353 elf_i386_compute_jump_table_size with
354 elf_x86_compute_jump_table_size.
355 (elf_i386_size_dynamic_sections): Likewise.
356 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
357 (elf_x86_64_allocate_dynrelocs): Replace
358 elf_x86_64_compute_jump_table_size with
359 elf_x86_compute_jump_table_size.
360 (elf_x86_64_size_dynamic_sections): Likewise.
361 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
362 got_entry_size.
363 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
364 (elf_x86_compute_jump_table_size): New.
365
503294e7
L
3662017-09-02 H.J. Lu <hongjiu.lu@intel.com>
367
368 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
369 sizeof_reloc.
370 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
371 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
372
9a742a90
L
3732017-09-02 H.J. Lu <hongjiu.lu@intel.com>
374
375 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
376 with htab->is_vxworks.
377 (elf_i386_size_dynamic_sections): Likewise.
378 (elf_i386_relocate_section): Likewise.
379 (elf_i386_finish_dynamic_symbol): Likewise.
380 (elf_i386_finish_dynamic_sections): Likewise.
381
6b9553e2
L
3822017-09-02 H.J. Lu <hongjiu.lu@intel.com>
383
384 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
385 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
386 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
387 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
388 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
389 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
390 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
391 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
392
ad71ce8d
L
3932017-09-01 H.J. Lu <hongjiu.lu@intel.com>
394
395 PR ld/22064
396 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
397 ELF_COMMON_DEF_P for common symbols.
398
96d01d93
AM
3992017-09-02 Alan Modra <amodra@gmail.com>
400
401 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
402 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
403 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
404
4f501a24
L
4052017-09-01 H.J. Lu <hongjiu.lu@intel.com>
406
407 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
408 (elf_backend_gc_mark_hook): Likewise.
409 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
410 (elf_backend_gc_mark_hook): Likewise.
411 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
412 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
413 (elf_backend_gc_mark_hook): Likewise.
414
eeb2f20a
L
4152017-09-01 H.J. Lu <hongjiu.lu@intel.com>
416
417 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
418 (elf_backend_adjust_dynamic_symbol): Likewise.
419 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
420 (elf_backend_adjust_dynamic_symbol): Likewise.
421 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
422 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
423 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
424 (_bfd_x86_elf_adjust_dynamic_symbol): New.
425 (elf_backend_adjust_dynamic_symbol): Likewise.
426
c6295c22
L
4272017-09-01 H.J. Lu <hongjiu.lu@intel.com>
428
429 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
430 comments.
431
39946cc2
L
4322017-09-01 H.J. Lu <hongjiu.lu@intel.com>
433
434 * elf32-i386.c (elf_i386_mkobject): Removed.
435 (bfd_elf32_mkobject): Likewise.
436 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
437 (bfd_elf64_mkobject): Likewise.
438 (bfd_elf32_mkobject): Likewise.
439 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
18da07cd 440 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
39946cc2
L
441 (bfd_elf64_mkobject): Likewise.
442 (bfd_elf32_mkobject): Likewise.
443
a6798bab
L
4442017-09-01 H.J. Lu <hongjiu.lu@intel.com>
445
446 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
447 Call _bfd_x86_elf_link_setup_gnu_properties.
448 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
449 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
450 entries.
451 (elf_x86_64_non_lazy_plt): Likewise.
452 (elf_x86_64_lazy_bnd_plt): Likewise.
453 (elf_x86_64_non_lazy_bnd_plt): Likewise.
454 (elf_x86_64_lazy_ibt_plt): Likewise.
455 (elf_x32_lazy_ibt_plt): Likewise.
456 (elf_x86_64_non_lazy_ibt_plt): Likewise.
457 (elf_x32_non_lazy_ibt_plt): Likewise.
458 (elf_x86_64_nacl_plt): Likewise.
459 (elf_x86_64_link_setup_gnu_properties): Updated. Call
460 _bfd_x86_elf_link_setup_gnu_properties.
461 * elfxx-x86.c: Include elf-vxworks.h".
462 (_bfd_x86_elf_link_setup_gnu_properties): New function.
463 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
464 comments for pic_plt0_entry and pic_plt_entry.
465 (elf_x86_non_lazy_plt_layout): Likewise.
466 (elf_x86_plt_layout_table): New.
467 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
468
e10c9c62
L
4692017-09-01 H.J. Lu <hongjiu.lu@intel.com>
470
471 PR ld/22061
472 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
473 .eh_frame section for the second PLT.
474 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
475 alignment of .eh_frame section for the second PLT.
476
7e8b6008
NC
4772017-09-01 Nick Clifton <nickc@redhat.com>
478
479 PR 22059
480 * dwarf2.c (decode_line_info): Fix test for an overlong line info
481 structure.
482
2a143b99
NC
4832017-09-01 Nick Clifton <nickc@redhat.com>
484
485 PR 22058
486 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
487 attribute buffer is NUL terminated.
488
e4f27230
NC
4892017-08-31 Nick Clifton <nickc@redhat.com>
490
491 PR 22047
492 * dwarf2.c (read_section): If necessary add a terminating NUL byte
493 to dwarf string sections.
494
686335cd
AM
4952017-08-31 Alan Modra <amodra@gmail.com>
496
497 * po/SRC-POTFILES.in: Regenerate.
498
9866ffe2
AM
4992017-08-31 Alan Modra <amodra@gmail.com>
500
501 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
502 for a section containing just a terminator. Allow multiple
503 terminators at end of section.
504 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
505 sections when not adding alignment. Assert on terminator in
506 the middle of FDEs.
507
af471f82
AM
5082017-08-31 Alan Modra <amodra@gmail.com>
509
510 PR 21441
511 PR 22048
512 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
513 terminators.
514
3321e42b
L
5152017-08-30 H.J. Lu <hongjiu.lu@intel.com>
516
517 * configure.ac (bfd_backends): Add elf64.lo together with
518 elfxx-x86.lo for 64-bit BFD.
519 * configure: Regenerated.
520
ef32532f
JB
5212017-08-31 James Bowman <james.bowman@ftdichip.com>
522
523 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
524 for R_FT32_18.
525
e234de6b
AM
5262017-08-31 Alan Modra <amodra@gmail.com>
527
528 PR binutils/22032
529 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
530 before _close_and_cleanup. Call iovec->bclose after.
531 (bfd_close): Remove code common to, and call, bfd_close_all_done.
532
f493882d
L
5332017-08-30 H.J. Lu <hongjiu.lu@intel.com>
534
535 * elf32-i386.c (elf_i386_plt_type): Removed.
536 (elf_i386_plt): Likewise.
537 (elf_i386_get_synthetic_symtab): Updated. Call
538 _bfd_x86_elf_get_synthetic_symtab.
539 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
540 (elf_x86_64_plt): Likewise.
541 (elf_x86_64_get_synthetic_symtab): Updated. Call
542 _bfd_x86_elf_get_synthetic_symtab.
543 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
544 (elf_x86_64_get_plt_got_vma): Likewise.
545 (elf_i386_valid_plt_reloc_p): Likewise.
546 (elf_x86_64_valid_plt_reloc_p): Likewise.
547 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
548 * elfxx-x86.h (elf_x86_plt_type): New.
549 (elf_x86_plt): Likewise.
550 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
551
5b86dbf4
L
5522017-08-30 H.J. Lu <hongjiu.lu@intel.com>
553
554 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
555 target_id instead of elf_machine_code.
556
765e526c
L
5572017-08-30 H.J. Lu <hongjiu.lu@intel.com>
558
559 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
560 (elf_i386_lazy_plt_layout): Likewise.
561 (elf_i386_non_lazy_plt_layout): Likewise.
562 (elf_i386_plt_layout): Likewise.
563 (elf_i386_link_hash_table): Likewise.
564 (elf_i386_next_tls_desc_index): Likewise.
565 (elf_i386_srelplt2): Likewise.
566 (elf_i386_plt): Likewise.
567 (elf_i386_lazy_plt): Likewise.
568 (elf_i386_non_lazy_plt): Likewise.
569 (elf_i386_link_hash_table_create): Likewise.
570 (bfd_elf32_bfd_link_hash_table_create): Likewise.
571 (elf_i386_lazy_plt): Updated.
572 (elf_i386_non_lazy_plt): Likewise.
573 (elf_i386_lazy_ibt_plt): Likewise.
574 (elf_i386_non_lazy_ibt_plt): Likewise.
575 (elf_i386_allocate_dynrelocs): Likewise.
576 (elf_i386_size_dynamic_sections): Likewise.
577 (elf_i386_relocate_section): Likewise.
578 (elf_i386_finish_dynamic_symbol): Likewise.
579 (elf_i386_finish_dynamic_sections): Likewise.
580 (elf_i386_get_synthetic_symtab): Likewise.
581 (elf_i386_link_setup_gnu_properties): Likewise.
582 (elf_i386_nacl_plt): Likewise.
583 * elf64-x86-64.c (ABI_64_P): Removed.
584 (ELF64_DYNAMIC_INTERPRETER): Likewise.
585 (ELF32_DYNAMIC_INTERPRETER): Likewise.
586 (elf_x86_64_lazy_plt_layout): Likewise.
587 (elf_x86_64_non_lazy_plt_layout): Likewise.
588 (elf_x86_64_plt_layout): Likewise.
589 (elf_x86_64_link_hash_table): Likewise.
590 (elf_x86_64_plt): Likewise.
591 (elf_x86_64_lazy_plt): Likewise.
592 (elf_x86_64_non_lazy_plt): Likewise.
593 (elf_x86_64_link_hash_table_create): Likewise.
594 (bfd_elf64_bfd_link_hash_table_create): Likewise.
595 (bfd_elf32_bfd_link_hash_table_create): Likewise.
596 (elf_x86_64_lazy_plt): Updated.
597 (elf_x86_64_non_lazy_plt): Likewise.
598 (elf_x86_64_lazy_bnd_plt): Likewise.
599 (elf_x86_64_non_lazy_bnd_plt): Likewise.
600 (elf_x86_64_lazy_ibt_plt): Likewise.
601 (elf_x32_lazy_ibt_plt): Likewise.
602 (elf_x86_64_non_lazy_ibt_plt): Likewise.
603 (elf_x32_non_lazy_ibt_plt): Likewise.
604 (elf_x86_64_allocate_dynrelocs): Likewise.
605 (elf_x86_64_size_dynamic_sections): Likewise.
606 (elf_x86_64_relocate_section): Likewise.
607 (elf_x86_64_finish_dynamic_symbol): Likewise.
608 (elf_x86_64_finish_dynamic_sections): Likewise.
609 (elf_x86_64_get_synthetic_symtab): Likewise.
610 (elf_x86_64_link_setup_gnu_properties): Likewise.
611 (elf_x86_64_nacl_plt): Likewise.
612 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
613 "elf/x86-64.h".
614 (ELF32_DYNAMIC_INTERPRETER): New.
615 (ELF64_DYNAMIC_INTERPRETER): Likewise.
616 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
617 (_bfd_x86_elf_link_hash_table_create): Likewise.
618 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
619 (elf_x86_link_hash_table_free): This. Make it static.
620 * elfxx-x86.h: Don't include "objalloc.h".
621 (ABI_64_P): New.
622 (elf_x86_lazy_plt_layout): Likewise.
623 (elf_x86_non_lazy_plt_layout): Likewise.
624 (elf_x86_plt_layout): Likewise.
625 (_bfd_x86_elf_link_hash_table_create): Likewise.
626 (bfd_elf64_bfd_link_hash_table_create): Likewise.
627 (bfd_elf32_bfd_link_hash_table_create): Likewise.
628 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
629 srelplt2 and next_tls_desc_index.
630 (_bfd_x86_elf_link_hash_table_free): Removed.
631
70e65ca8
MR
6322017-08-30 Maciej W. Rozycki <macro@imgtec.com>
633
634 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
635 branch offset interpretation.
636
7c0ed396
L
6372017-08-30 H.J. Lu <hongjiu.lu@intel.com>
638
639 PR binutils/22032
640 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
641
0f2425c4
L
6422017-08-30 H.J. Lu <hongjiu.lu@intel.com>
643
644 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
645 (elf_x86_64_srelplt2): Likewise.
646
9a23f96e
AM
6472017-08-30 Alan Modra <amodra@gmail.com>
648
649 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
650 (ppc64_elf_tls_optimize): Set it.
651 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
652 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
653 addis would add zero.
654 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
655 (ppc_elf_tls_optimize): Set it.
656 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
657 insn on TPREL16_LO relocs to use r2 when addis would add zero.
658
b9f04fe0
AM
6592017-08-30 Alan Modra <amodra@gmail.com>
660
661 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
662 __tls_get_addr call sequences to LE, don't move the addi down
663 to the nop. Replace the bl with addi and leave the nop alone.
664
5f0f0847
L
6652017-08-29 H.J. Lu <hongjiu.lu@intel.com>
666
667 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
668 Re-indent.
669 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
670 Likewise.
671 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
672
443701f5
L
6732017-08-29 H.J. Lu <hongjiu.lu@intel.com>
674
675 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
676 (BFD64_BACKENDS): Likewise.
677 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
678 (BFD64_BACKENDS_CFILES): Likewise.
679 * Makefile.in: Regenerated.
680 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
681 elf32-i386.lo and elf64-x86-64.lo.
682 * configure: Regenerated.
683 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
684 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
685 "objalloc.h" and "hashtab.h".
686 (ELIMINATE_COPY_RELOCS): Removed.
687 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
688 (SYMBOL_NO_COPYRELOC): Likewise.
689 (elf_i386_link_hash_entry): Likewise.
690 (GOT_UNKNOWN): Likewise.
691 (GOT_NORMAL): Likewise.
692 (GOT_TLS_GD): Likewise.
693 (elf_i386_hash_entry): Likewise.
694 (elf_i386_obj_tdata): Likewise.
695 (elf_i386_tdata): Likewise.
696 (elf_i386_local_got_tls_type): Likewise.
697 (elf_i386_local_tlsdesc_gotent): Likewise.
698 (elf_i386_hash_table): Likewise.
699 (elf_i386_link_hash_newfunc): Likewise.
700 (elf_i386_local_htab_hash): Likewise.
701 (elf_i386_local_htab_eq): Likewise.
702 (elf_i386_get_local_sym_hash): Likewise.
703 (elf_i386_link_hash_table_free): Likewise.
704 (elf_i386_copy_indirect_symbol): Likewise.
705 (elf_i386_fixup_symbol): Likewise.
706 (elf_i386_readonly_dynrelocs): Likewise.
707 (elf_i386_always_size_sections): Likewise.
708 (elf_i386_set_tls_module_base): Likewise.
709 (elf_i386_dtpoff_base): Likewise.
710 (compare_relocs): Likewise.
711 (elf_i386_hash_symbol): Likewise.
712 (elf_i386_parse_gnu_properties): Likewise.
713 (elf_i386_merge_gnu_properties): Likewise.
714 (elf_i386_link_check_relocs): Likewise.
715 (elf_i386_merge_symbol_attribute): Likewise.
716 (bfd_elf32_bfd_link_check_relocs): Likewise.
717 (elf_backend_copy_indirect_symbol): Likewise.
718 (elf_backend_always_size_sections): Likewise.
719 (elf_backend_omit_section_dynsym): Likewise.
720 (elf_backend_hash_symbol): Likewise.
721 (elf_backend_fixup_symbol): Likewise.
722 (elf_backend_parse_gnu_properties): Likewise.
723 (elf_backend_merge_gnu_properties): Likewise.
724 (elf_backend_merge_symbol_attribute): Likewise.
725 (elf_i386_mkobject): Updated.
726 (elf_i386_link_hash_table_create): Likewise.
727 (elf_i386_check_tls_transition): Likewise.
728 (elf_i386_tls_transition): Likewise.
729 (elf_i386_convert_load_reloc): Likewise.
730 (elf_i386_check_relocs): Likewise.
731 (elf_i386_adjust_dynamic_symbol): Likewise.
732 (elf_i386_allocate_dynrelocs): Likewise.
733 (elf_i386_convert_load): Likewise.
734 (elf_i386_size_dynamic_sections): Likewise.
735 (elf_i386_relocate_section): Likewise.
736 (elf_i386_finish_dynamic_symbol ): Likewise.
737 (elf_i386_finish_dynamic_sections): Likewise.
738 (elf_i386_output_arch_local_syms): Likewise.
739 (elf_i386_get_synthetic_symtab): Likewise.
740 (elf_i386_link_setup_gnu_properties): Likewise.
741 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
742 of elf_link_hash_table, as base.
743 (elf_i386_next_tls_desc_index): New.
744 (elf_i386_srelplt2): Likewise.
745 (elf_i386_plt): Likewise.
746 (elf_i386_lazy_plt): Likewise.
747 (elf_i386_non_lazy_plt): Likewise.
748 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
749 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
750 "objalloc.h" and "hashtab.h".
751 (ELIMINATE_COPY_RELOCS): Removed.
752 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
753 (SYMBOL_NO_COPYRELOC): Likewise.
754 (elf_x86_64_link_hash_entry): Likewise.
755 (GOT_UNKNOWN): Likewise.
756 (GOT_NORMAL): Likewise.
757 (GOT_TLS_GD): Likewise.
758 (elf_x86_64_hash_entry): Likewise.
759 (elf_x86_64_obj_tdata): Likewise.
760 (elf_x86_64_tdata): Likewise.
761 (elf_x86_64_local_got_tls_type): Likewise.
762 (elf_x86_64_local_tlsdesc_gotent): Likewise.
763 (elf_x86_64_hash_table): Likewise.
764 (elf_x86_64_link_hash_newfunc): Likewise.
765 (elf_x86_64_local_htab_hash): Likewise.
766 (elf_x86_64_local_htab_eq): Likewise.
767 (elf_x86_64_get_local_sym_hash): Likewise.
768 (elf_x86_64_link_hash_table_free): Likewise.
769 (elf_x86_64_copy_indirect_symbol): Likewise.
770 (elf_x86_64_fixup_symbol): Likewise.
771 (elf_x86_64_readonly_dynrelocs): Likewise.
772 (elf_x86_64_always_size_sections): Likewise.
773 (elf_x86_64_set_tls_module_base): Likewise.
774 (elf_x86_64_dtpoff_base): Likewise.
775 (compare_relocs): Likewise.
776 (elf_x86_64_merge_symbol_attribute): Likewise.
777 (elf_x86_64_hash_symbol): Likewise.
778 (elf_x86_64_parse_gnu_properties): Likewise.
779 (elf_x86_64_merge_gnu_properties): Likewise.
780 (elf_x86_64_link_check_relocs): Likewise.
781 (elf_backend_copy_indirect_symbol): Likewise.
782 (elf_backend_always_size_sections): Likewise.
783 (bfd_elf64_bfd_link_check_relocs): Likewise.
784 (elf_backend_merge_symbol_attribute): Likewise.
785 (elf_backend_hash_symbol): Likewise.
786 (elf_backend_omit_section_dynsym): Likewise.
787 (elf_backend_fixup_symbol): Likewise.
788 (elf_backend_parse_gnu_properties): Likewise.
789 (elf_backend_merge_gnu_properties): Likewise.
790 (bfd_elf32_bfd_link_check_relocs): Likewise.
791 (elf_x86_64_mkobject): Updated.
792 (elf_x86_64_link_hash_table_create): Likewise.
793 (elf_x86_64_check_tls_transition): Likewise.
794 (elf_x86_64_tls_transition): Likewise.
795 (elf_x86_64_convert_load_reloc): Likewise.
796 (elf_x86_64_check_relocs): Likewise.
797 (elf_x86_64_adjust_dynamic_symbol): Likewise.
798 (elf_x86_64_allocate_dynrelocs): Likewise.
799 (elf_x86_64_convert_load): Likewise.
800 (elf_x86_64_size_dynamic_sections): Likewise.
801 (elf_x86_64_relocate_section): Likewise.
802 (elf_x86_64_finish_dynamic_symbol ): Likewise.
803 (elf_x86_64_finish_dynamic_sections): Likewise.
804 (elf_x86_64_output_arch_local_syms): Likewise.
805 (elf_x86_64_get_synthetic_symtab): Likewise.
806 (elf_x86_64_link_setup_gnu_properties): Likewise.
807 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
808 instead of elf_link_hash_table, as base.
809 (elf_x86_64_next_tls_desc_index): New.
810 (elf_x86_64_srelplt2): Likewise.
811 (elf_x86_64_plt): Likewise.
812 (elf_x86_64_lazy_plt): Likewise.
813 (elf_x86_64_non_lazy_plt): Likewise.
814 * elfxx-x86.c: New file.
815 * elfxx-x86.h: Likewise.
816
823cb067
L
8172017-08-29 H.J. Lu <hongjiu.lu@intel.com>
818
819 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
820 return.
821 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
822
37c0b6ee
L
8232017-08-29 H.J. Lu <hongjiu.lu@intel.com>
824
825 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
826 sections before checking dynamic relocations and free invalid
827 PLT section contents.
828 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
829
0fb0a767
L
8302017-08-28 H.J. Lu <hongjiu.lu@intel.com>
831
832 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
833 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
834
90efb642
L
8352017-08-28 H.J. Lu <hongjiu.lu@intel.com>
836
837 PR binutils/22018
838 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
839 PLT section size.
840 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
841
596dc58f
L
8422017-08-27 H.J. Lu <hongjiu.lu@intel.com>
843
844 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
845 def_protected.
846 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
847
a5b4ee94
L
8482017-08-26 H.J. Lu <hongjiu.lu@intel.com>
849
850 PR ld/21997
851 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
852 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
853 Add a has_no_copy_on_protected bitfield.
854 (elf_has_no_copy_on_protected): New.
855 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
856 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
857 (elf_merge_gnu_property_list): Likewise.
858 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
859 to FALSE for elf_has_no_copy_on_protected.
860 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
861 (elf_i386_link_hash_entry): Add def_protected.
862 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
863 when checking info->nocopyreloc.
864 (elf_i386_link_setup_gnu_properties): Don't set
865 extern_protected_data here.
866 (elf_i386_merge_symbol_attribute): New function.
867 (elf_backend_merge_symbol_attribute): New.
868 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
869 (elf_x86_64_link_hash_entry): Add def_protected.
870 (elf_x86_64_need_pic): Report protected symbol for def_protected.
871 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
872 when checking info->nocopyreloc.
873 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
874 relocation run-time overflow and unresolvable R_X86_64_32S
875 relocation against protected data symbol defined in shared object
876 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
877 (elf_x86_64_link_setup_gnu_properties): Don't set
878 extern_protected_data here.
879 (elf_x86_64_merge_symbol_attribute): New function.
880 (elf_backend_merge_symbol_attribute): New.
881
7c8bbca5
AM
8822017-08-26 Alan Modra <amodra@gmail.com>
883
884 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
885 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
886 (ppc_elf_relocate_section): Comment fix.
887 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
888 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
889 Support dynamic relocs for TPREL16 when non-pic too.
890 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
891 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
892 when non-pic too.
893
5fdda9d6
L
8942017-08-25 H.J. Lu <hongjiu.lu@intel.com>
895
896 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
897 "symbol" in comments.
898 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
899
7073b5b9
L
9002017-08-24 H.J. Lu <hongjiu.lu@intel.com>
901
902 PR ld/22001
903 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
904 R_X86_64_PC32 relocation run-time overflow and unresolvable
905 R_X86_64_32S relocation with -z nocopyreloc.
906
34bb2571
L
9072017-08-24 H.J. Lu <hongjiu.lu@intel.com>
908
909 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
910 Undefined symbols may not have a type.
911 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
912
aab921ad
L
9132017-08-23 H.J. Lu <hongjiu.lu@intel.com>
914
915 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
916 bfd_link_info. Report shared, PIE or PDE object based on
917 bfd_link_info.
918 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
919 (elf_x86_64_relocate_section): Likewise.
920
b1bb697e
L
9212017-08-23 H.J. Lu <hongjiu.lu@intel.com>
922
923 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
924 for function symbols.
925 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
926
73784fa5
L
9272017-08-23 H.J. Lu <hongjiu.lu@intel.com>
928
929 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
930 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
931 is set on any input relocatable file.
932 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
933
46434633
AM
9342017-08-23 Alan Modra <amodra@gmail.com>
935
936 PR 21988
937 * elf64-ppc.c (ensure_undef_dynamic): Rename from
938 ensure_undefweak_dynamic. Handle undefined too.
939 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
940 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
941 (allocate_dynrelocs): Discard undefined non-default visibility
942 relocs first. Make undefined syms dynamic. Tidy goto.
943
487b6440
AM
9442017-08-21 Alan Modra <amodra@gmail.com>
945 H.J. Lu <hongjiu.lu@intel.com>
946
947 PR ld/21964
948 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
949 * elflink.c (bfd_elf_define_start_stop): Rewrite.
950
284d826d
HPN
9512017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
952
953 PR ld/20125
954 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
955 undefined weak symbols.
956
de259397
NC
9572017-08-18 Nick Clifton <nickc@redhat.com>
958
959 PR binutils/21962
960 * tekhex.c (getsym): Fix check for source pointer walking off the
961 end of the input buffer.
962
545bc2b3
SN
9632017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
964
965 PR ld/18808
966 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
967 relocations in debug sections, change abort to _bfd_error_handler.
968
0c54f692
NC
9692017-08-14 Nick Clifton <nickc@redhat.com>
970
971 PR 21957
972 * elf.c (setup_group): Check for an empty or very small group
973 section.
974 * po/bfd.pot: Regenerate.
975
79a94a2a
AM
9762017-08-14 Alan Modra <amodra@gmail.com>
977
978 PR 21441
979 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
980 alignment padding here.
981 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
982 in a reverse pass over sections.
983
98c5dfc9
L
9842017-08-11 H.J. Lu <hongjiu.lu@intel.com>
985
986 PR binutils/21943
987 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
988 for @plt suffixes first.
989 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
990
24d3e51b
NC
9912017-08-08 Nick Clifton <nickc@redhat.com>
992
993 PR 21916
994 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
995 small section lengths.
996 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
997 table.
998 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
999 there is enough data present in the note.
1000
206c9c79
AM
10012017-08-08 Alan Modra <amodra@gmail.com>
1002
1003 PR 21017
1004 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
1005 got.refcount for GOTOFF relocs, just create .got section.
1006
2980ccad
L
10072017-08-07 H.J. Lu <hongjiu.lu@intel.com>
1008
1009 * elflink.c (elf_link_add_object_symbols): Move common symbol
1010 check after bed->common_definition.
1011
b3293efa
AM
10122017-08-07 Alan Modra <amodra@gmail.com>
1013
1014 PR 21910
1015 * elflink.c (bfd_elf_final_link): Don't segfault when sections
1016 needed to define various dynamic tags have been discarded.
1017
b7a18930
NC
10182017-08-07 Nick Clifton <nickc@redhat.com>
1019
1020 PR 21884
1021 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
1022 has not been set then use the bfd returned by
1023 _bfd_elf_link_setup_gnu_properties. If that is null then search
1024 through all the input bfds selecting the first normal, ELF format
1025 one.
1026 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
1027
1d4af308
L
10282017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1029
1030 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
1031 to 1 bit.
1032 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
1033 (elf_i386_check_tls_transition): Check tls_get_addr directly.
1034 (elf_i386_convert_load_reloc): Update tls_get_addr check.
1035 (elf_i386_link_check_relocs): New function.
1036 (bfd_elf32_bfd_link_check_relocs): New.
1037 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
1038 to 1 bit.
1039 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
1040 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
1041 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
1042 (elf_x86_64_link_check_relocs): New function.
1043 (bfd_elf64_bfd_link_check_relocs): New.
1044 (bfd_elf32_bfd_link_check_relocs): Likewise.
1045
a4819f54
L
10462017-08-06 H.J. Lu <hongjiu.lu@intel.com>
1047
1048 PR ld/21903:
1049 * elflink.c (elf_link_add_object_symbols): Treat common symbol
1050 as undefined for --no-define-common.
1051
55ef6584
AM
10522017-08-05 Alan Modra <amodra@gmail.com>
1053
1054 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
1055 hppa_link_hash_table.
1056
d84ed528
MF
10572017-08-02 Max Filippov <jcmvbkbc@gmail.com>
1058
1059 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
1060 entries for sysregs with negative indices.
1061
1ef692ea
AK
10622017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1063
1064 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
1065 isn't the S/390 specific elf data.
1066 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1067
57593436
KLC
10682017-07-31 Kuan-Lin Chen <rufus@andestech.com>
1069
1070 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
1071 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
1072 [R_RISCV_ADD16]: Likewise.
1073 [R_RISCV_ADD32]: Likewise.
1074 [R_RISCV_ADD64]: Likewise.
1075 [R_RISCV_SUB6]: Likewise.
1076 [R_RISCV_SUB8]: Likewise.
1077 [R_RISCV_SUB16]: Likewise.
1078 [R_RISCV_SUB32]: Likewise.
1079 [R_RISCV_SUB64]: Likewise.
1080
d44c746a
AM
10812017-07-31 Alan Modra <amodra@gmail.com>
1082
1083 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
1084 without ld.so checks.
1085
8b5f1ed8
AM
10862017-07-29 Alan Modra <amodra@gmail.com>
1087
1088 PR 21847
1089 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
1090 (ppc64_elf_merge_symbol): Set non_zero_localentry.
1091 (is_elfv2_localentry0): Test non_zero_localentry.
1092 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
1093
894dde0b
AK
10942017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1095
1096 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
1097 pointer check for htab->elf.irelplt.
1098 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
1099
8bdf0be1
NC
11002017-07-27 Nick Clifton <nickc@redhat.com>
1101
1102 PR 21840
1103 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
1104 size is -1.
1105 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
1106 with error return.
1107 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
1108 are NULL.
1109 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
1110 of end pointer.
1111 (evax_bfd_print_emh): Check for invalid string lengths.
1112
c26bb067
NC
11132017-07-25 Nick Clifton <nickc@redhat.com>
1114
1115 * po/fr.po: Updated French translation.
1116
cfe7b9bd
BG
11172017-07-25 Benjamin Green <bengreen5mx@gmail.com>
1118
1119 PR 21824
1120 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
1121 16-bit absolute branches into 10-bit pc-relative branches on the
1122 MSP430 as well as the MSP430X.
1123
d4aaa2a0
AM
11242017-07-25 Alan Modra <amodra@gmail.com>
1125
1126 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
1127 (stub_eh_frame_size): New function.
1128 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
1129 (group_sections): Init group tls_get_addr_opt_bctrl.
1130 (ppc64_elf_size_stubs): Update sizing and initialization of
1131 .eh_frame. Iteration over stubs via group list.
1132 (ppc64_elf_build_stubs): Iterate over stubs via group list.
1133 (ppc64_elf_finish_dynamic_sections): Update finalization of
1134 .eh_frame.
1135
ca4cf9b9
NC
11362017-07-24 Nick Clifton <nickc@redhat.com>
1137
1138 PR 21813
1139 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
1140 of the relocs to the canonicalize_one_reloc routine.
1141 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
1142 for the _bfd_mach_o_canonicalize_one_reloc field.
1143 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
1144 res_base parameter. Use to check for corrupt pair relocs.
1145 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
1146 Likewise.
1147 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
1148 Likewise.
1149 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
1150 Likewise.
1151
1152 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
1153 enough data in the record before attempting to parse it.
1154 (_bfd_vms_slurp_eeom): Likewise.
1155
1156 (_bfd_vms_slurp_egsd): Check for an invalid section index.
1157 (image_set_ptr): Likewise.
1158 (alpha_vms_slurp_relocs): Likewise.
1159
8a2df5e2
NC
1160 (alpha_vms_object_p): Check for a truncated record.
1161
47aeb64c
NC
11622017-07-24 Nick Clifton <nickc@redhat.com>
1163
1164 PR 21803
1165 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
1166 an unrecognized reloc and sets the bfd_error value.
1167 * libbfd.h: Regenerate.
1168 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
1169 function.
1170 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1171 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1172 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1173 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
1174 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1175
15a3a14f
AM
11762017-07-23 Alan Modra <amodra@gmail.com>
1177
1178 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
1179 restore of LR.
1180
f2e6a843
SN
11812017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
1182
1183 PR ld/18841
1184 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
1185 reloc_class_ifunc for ifunc symbols.
1186
909e4e71
NC
11872017-07-19 Nick Clifton <nickc@redhat.com>
1188
1189 PR 21787
1190 * archive.c (bfd_generic_archive_p): If the bfd does not have the
1191 correct magic bytes at the start, set the error to wrong format
1192 and clear the format selector before returning NULL.
1193
29866fa1
NC
11942017-07-19 Nick Clifton <nickc@redhat.com>
1195
1196 PR 21786
1197 * coff-rs6000.c (_bfd_strntol): New function.
1198 (_bfd_strntoll): New function.
1199 (GET_VALUE_IN_FIELD): New macro.
1200 (EQ_VALUE_IN_FIELD): new macro.
1201 (_bfd_xcoff_slurp_armap): Use new macros.
1202 (_bfd_xcoff_archive_p): Likewise.
1203 (_bfd_xcoff_read_ar_hdr): Likewise.
1204 (_bfd_xcoff_openr_next_archived_file): Likewise.
1205 (_bfd_xcoff_stat_arch_elt): Likewise.
6c4e7b6b
NC
1206 * coff64-rs6000.c (_bfd_strntol): New function.
1207 (_bfd_strntoll): New function.
1208 (GET_VALUE_IN_FIELD): New macro.
1209 (xcoff64_slurp_armap): Use new macros.
29866fa1 1210
684d5a10
JEM
12112017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
1212 John Eric Martin <John.Martin@emmicro-us.com>
1213
1214 * bfd-in2.h: Regenerate.
1215 * libbfd.h: Regenerate.
1216 * elf32-arc.c (JLI): Define.
1217 * reloc.c: Add JLI relocations.
1218
de194d85
YC
12192017-07-18 Nick Clifton <nickc@redhat.com>
1220
1221 PR 21775
1222 * coff-sh.c: Fix spelling typos.
1223 * compress.c: Likewise.
1224 * cpu-pdp11.c: Likewise.
1225 * ecofflink.c: Likewise.
1226 * elf-m10300.c: Likewise.
1227 * elf.c: Likewise.
1228 * elf32-arm.c: Likewise.
1229 * elf32-m68k.c: Likewise.
1230 * elf32-nds32.c: Likewise.
1231 * elf32-ppc.c: Likewise.
1232 * elf32-sh.c: Likewise.
1233 * elf32-v850.c: Likewise.
1234 * elf64-ppc.c: Likewise.
1235 * elf64-x86-64.c: Likewise.
1236 * elflink.c: Likewise.
1237 * elfnn-aarch64.c: Likewise.
1238 * elfxx-mips.c: Likewise.
1239 * som.c: Likewise.
1240 * sunos.c: Likewise.
1241 * vms-alpha.c: Likewise.
1242 * xcofflink.c: Likewise.
1243
e4e21d9e
NC
12442017-07-18 Nick Clifton <nickc@redhat.com>
1245
1246 PR binutils/21781
1247 * coffcode.h (handle_COMDAT): Replace abort with an error message
1248 and return.
1249
8e85f840
L
12502017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1251
1252 PR ld/21782
1253 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
1254 to shared library.
1255
dd57c19c
L
12562017-07-17 H.J. Lu <hongjiu.lu@intel.com>
1257
1258 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
1259
676ee2b5
AM
12602017-07-16 Alan Modra <amodra@gmail.com>
1261
1262 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
1263 __tls_index GOT entries when using __tls_get_addr_opt stub.
1264 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1265
429d795d
AM
12662017-07-12 Alan Modra <amodra@gmail.com>
1267
1268 * po/es.po: Update from translationproject.org/latest/bfd/.
1269 * po/fi.po: Likewise.
1270 * po/fr.po: Likewise.
1271 * po/id.po: Likewise.
1272 * po/ja.po: Likewise.
1273 * po/ro.po: Likewise.
1274 * po/ru.po: Likewise.
1275 * po/sr.po: Likewise.
1276 * po/sv.po: Likewise.
1277 * po/tr.po: Likewise.
1278 * po/uk.po: Likewise.
1279 * po/vi.po: Likewise.
1280 * po/zh_CN.po: Likewise.
1281 * po/hr.po: New file from translationproject.org.
1282 * configure.ac (ALL_LINGUAS): Add hr. Sort.
1283 * configure: Regenerate.
1284
0bae9e9e
NC
12852017-07-12 Nick Clifton <nickc@redhat.com>
1286
1287 Fix compile time warnings using gcc 7.1.1.
1288 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
1289 plt_name buffer.
1290 (elf_xtensa_get_gotplt_section): Increase length of got_name
1291 buffer.
1292 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
1293 default return of FALSE.
1294 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
1295 default return of FALSE.
1296
d42c267e
AM
12972017-07-12 Alan Modra <amodra@gmail.com>
1298
1299 * binary.c (binary_set_section_contents): Don't print filepos in
1300 error message.
1301 (coff_write_object_contents): Cast size_t for error message.
1302 (coff_slurp_line_table): Don't use bfd_vma symndx.
1303 (coff_slurp_reloc_table): Remove unneeded cast.
1304 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
1305 error message.
1306 (find_abstract_instance_name): Likewise.
1307 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
1308 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
1309 (elf32_arm_check_relocs): Make r_symndx an int.
1310 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
1311 format string.
1312 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
1313 message arg.
1314 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
1315 error message.
1316 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
1317 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1318 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1319 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1320 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1321 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1322 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1323 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
1324 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1325 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1326 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1327 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
1328 and use %lu for error message.
1329 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
1330 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
1331 error message.
1332
1333 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
1334 in error message.
1335 (elf32_arm_final_link_relocate): Likewise.
1336 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
1337 * coffcode.h (styp_to_sec_flags): Likewise.
1338 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1339 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
1340 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1341 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
1342 (elf32_bfin_merge_private_bfd_data): Likewise.
1343 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1344 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1345 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1346 (i370_elf_relocate_section): Likewise.
1347 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1348 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1349 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1350 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1351 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1352 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1353 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1354 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1355 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1356 * ieee.c (ieee_write_id, read_id): Likewise.
1357 * mach-o.c (bfd_mach_o_write_contents): Likewise.
1358 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
1359 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
1360 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
1361 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
1362 * stabs.c (_bfd_link_section_stabs): Likewise.
1363
1364 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
1365 format.
1366 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1367 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1368 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
1369 * coff-sh.c (sh_relax_section): Likewise.
1370 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
1371 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1372 * coffcode.h (coff_slurp_reloc_table): Likewise.
1373 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
1374 (_bfd_coff_read_string_table): Likewise.
1375 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
1376 * compress.c (bfd_get_full_section_contents): Likewise.
1377 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
1378 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1379 * elf.c (bfd_elf_string_from_elf_section): Likewise.
1380 * elf32-arc.c (arc_special_overflow_checks): Likewise.
1381 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
1382 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
1383 (elf32_arm_write_section): Likewise.
1384 * elf32-bfin.c (bfin_relocate_section): Likewise.
1385 (bfinfdpic_relocate_section): Likewise.
1386 * elf32-hppa.c (hppa_build_one_stub): Likewise.
1387 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
1388 * elf32-i386.c (elf_i386_tls_transition): Likewise.
1389 (elf_i386_relocate_section): Likewise.
1390 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
1391 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
1392 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1393 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1394 * elf32-metag.c (elf_metag_relocate_section): Likewise.
1395 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
1396 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
1397 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
1398 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
1399 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
1400 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
1401 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
1402 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
1403 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
1404 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
1405 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
1406 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
1407 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
1408 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
1409 * elf32-sh.c (sh_elf_relax_section): Likewise.
1410 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
1411 (sh_elf_relocate_section): Likewise.
1412 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
1413 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1414 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1415 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1416 * elf32-v850.c (v850_elf_relax_section): Likewise.
1417 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1418 (elf_vax_relocate_section): Likewise.
1419 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1420 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
1421 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
1422 (do_fix_for_relocatable_link): Likewise.
1423 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
1424 (elf64_alpha_relax_with_lituse): Likewise.
1425 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
1426 (elf_hppa_final_link_relocate): Likewise.
1427 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
1428 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
1429 (elf64_vms_link_add_object_symbols): Likewise.
1430 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
1431 (mmix_final_link_relocate): Likewise.
1432 * elf64-s390.c (invalid_tls_insn): Likewise.
1433 (elf_s390_relocate_section): Likewise.
1434 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1435 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1436 (elf_x86_64_relocate_section): Likewise.
1437 * elfcode.h (elf_slurp_symbol_table): Likewise.
1438 * elfcore.h (elf_core_file_p): Likewise.
1439 * elflink.c (elf_link_read_relocs_from_section): Likewise.
1440 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
1441 (elfNN_aarch64_relocate_section): Likewise.
1442 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
1443 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
1444 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
1445 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1446 (_bfd_mips_elf_relocate_section): Likewise.
1447 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
1448 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1449 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1450 * ieee.c (ieee_slurp_external_symbols): Likewise.
1451 * ihex.c (ihex_write_object_content): Likewise.
1452 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
1453 * merge.c (_bfd_merged_section_offset): Likewise.
1454 * mmo.c (mmo_write_loc_chunk): Likewise.
1455 (mmo_write_object_contents): Likewise.
1456 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
1457 * stabs.c (_bfd_link_section_stabs): Likewise.
1458 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
1459
e3fbc3da
AM
14602017-07-11 Alan Modra <amodra@gmail.com>
1461
1462 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
1463
2c4d9cbe
AM
14642017-07-11 Alan Modra <amodra@gmail.com>
1465
1466 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
1467 instruction" error using _bfd_error_handler, not einfo.
1468
adce5b39
NC
14692017-07-10 Nick Clifton <nickc@redhat.com>
1470
1471 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
1472 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
1473
e6f3b9c3
JB
14742017-07-07 John Baldwin <jhb@FreeBSD.org>
1475
1476 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
1477
532cc313
AM
14782017-07-07 Alan Modra <amodra@gmail.com>
1479
1480 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
1481
1cf9552b
AM
14822017-07-07 Alan Modra <amodra@gmail.com>
1483
1484 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
1485 as long long. Move code replacing "ll" with "I64", and simplify.
1486
a0b7b105
L
14872017-07-06 H.J. Lu <hongjiu.lu@intel.com>
1488
1489 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
1490 to 1.
1491
1d827a72
L
14922017-07-05 H.J. Lu <hongjiu.lu@intel.com>
1493
1494 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
1495 xtime.
1496 (line_info_add_file_name): Likewise.
1497 (decode_line_info): Likewise.
1498
0d702cfe
TG
14992017-07-04 Tristan Gingold <gingold@adacore.com>
1500
1501 * version.m4: Bump version to 2.29.51
1502 * configure: Regenerate.
1503
564e46b7
JW
15042017-07-04 Jiong Wang <jiong.wang@arm.com>
1505
1506 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
1507 sanity check at the head of this function.
1508
0041f7df
JK
15092017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1510
1511 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
1512 dwarf_line_str_size.
1513 (struct attr_abbrev): Add field implicit_const.
1514 (dwarf_debug_sections): Add .debug_line_str.
1515 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
1516 (dwarf_debug_section_assert): Add static assertion.
1517 (read_indirect_line_string): New.
1518 (read_abbrevs): Support DW_FORM_implicit_const.
1519 (is_str_attr): Support DW_FORM_line_strp.
1520 (read_attribute_value): Support DW_FORM_line_strp and
1521 DW_FORM_implicit_const.
1522 (read_attribute): Support DW_FORM_implicit_const.
1523 (line_info_add_include_dir, line_info_add_include_dir_stub):
1524 (line_info_add_file_name, read_formatted_entries): New.
1525 (decode_line_info, parse_comp_unit): Support DWARF 5.
1526 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
1527
d8cd8c1f
EB
15282017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1529
1530 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
1531 abort statement that was put for symbols that are not dynamic.
1532
15e6ed8c
TG
15332017-07-03 Tristan Gingold <gingold@adacore.com>
1534
1535 * po/bfd.pot: Regenerate
1536
76cfced5
AM
15372017-07-03 Alan Modra <amodra@gmail.com>
1538
1539 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
1540 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
1541 * elf.c (setup_group): Use "Lx" to print sh_size.
1542 (_bfd_elf_setup_sections): Remove unnecessary cast and print
1543 unknown section type in hex.
1544 (copy_special_section_fields): Style fix.
1545 (bfd_section_from_shdr): Correct format for sh_link. Use a
1546 common error message for all the variants of unrecognized
1547 section types.
1548 (assign_file_positions_for_load_sections): Use "Lx" for lma
1549 adjust error message.
1550 (assign_file_positions_for_non_load_sections): Formatting.
1551 (rewrite_elf_program_header): Formatting. Use "Lx" for
1552 bfd_vma values in error messages.
1553 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
1554 ELF_R_SYM value to type expected by format.
1555 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
1556 in error messages.
1557 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
1558 (elf_link_input_bfd): Use "Lx" for r_info.
1559 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
1560
ce9116fd
AM
15612017-07-03 Alan Modra <amodra@gmail.com>
1562
1563 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
1564 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
1565 Microsoft C library variant of long long format specifier.
1566 (PRINT20): Cast value to bfd_uint64_t not long long.
1567 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
1568 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
1569 long long. Don't cast to bfd_vma.
1570 * elf32-score.c (score3_bfd_getl48): Likewise.
1571 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
1572
cd9af601
AM
15732017-07-03 Alan Modra <amodra@gmail.com>
1574
1575 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
1576 print d_tag.
1577 (bfd_elf_print_symbol): Don't cast symbol->flags.
1578 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
1579 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
1580 _bfd_error_handler argument order.
1581 (ppc_elf_merge_private_bfd_data): Don't cast flags.
1582
33c734b2
AM
15832017-07-03 Alan Modra <amodra@gmail.com>
1584
1585 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
1586 AC_TYPE_LONG_DOUBLE.
1587 * configure: Regenerate.
1588 * config.in: Regenerate.
1589
3df5cd13
AW
15902017-06-29 Andrew Waterman <andrew@sifive.com>
1591
1592 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
1593 relocs.
1594
ec1acaba
EB
15952017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1596
1597 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
1598 unless it is undefined weak.
1599 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
1600 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
1601 relocation.
1602 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
1603 is not dynamic in PIC, abort.
1604
ff07562f
JW
16052017-06-29 Jiong Wang <jiong.wang@arm.com>
1606
1607 PR ld/21402
1608 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
1609 undefined weak symbols into dynamic.
1610 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
1611 relocation for non-dynamic symbols.
1612 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
1613
2aff25ba
JW
16142017-06-29 Jiong Wang <jiong.wang@arm.com>
1615
1616 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
1617 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
1618 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
1619 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
1620 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
1621 support for them.
1622
88ab90e8
AA
16232017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
1624
1625 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
1626 (elfcore_write_s390_gs_bc): Likewise.
1627 * elf.c (elfcore_grok_s390_gs_cb): New function.
1628 (elfcore_grok_s390_gs_bc): New function.
1629 (elfcore_grok_note): Call them.
1630 (elfcore_write_s390_gs_cb): New function.
1631 (elfcore_write_s390_gs_bc): New function.
1632 (elfcore_write_register_note): Call them.
1633
328ce951
L
16342017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1635
1636 * libbfd.c (_bfd_generic_get_section_contents): Don't call
1637 bfd_get_file_size. Check archive element size.
1638 (_bfd_generic_get_section_contents_in_window): Likewise.
1639
47fdcf63
L
16402017-06-28 H.J. Lu <hongjiu.lu@intel.com>
1641
1642 * bfd-in2.h: Regenerated.
1643 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
1644 (bfd_get_file_size): Likewise.
1645
38bf472a
MR
16462017-06-28 Maciej W. Rozycki <macro@imgtec.com>
1647 Matthew Fortune <matthew.fortune@imgtec.com>
1648
1649 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
1650 * cpu-mips.c (I_interaptiv_mr2): New enum value.
1651 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
1652 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
1653 case.
1654 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1655 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
1656 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
1657 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
1658 `bfd_mach_mips_interaptiv_mr2' entries.
1659 * bfd-in2.h: Regenerate.
1660
2d68166e
NC
16612017-06-27 Nick Clifton <nickc@redhat.com>
1662
1663 * tekhex.c (pass_over): Revert accidental conversion of a local
1664 array to a static array.
1665
68063779
SKS
16662017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1667
1668 PR ld/13402
1669 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
1670 reloc addend if necessary. Adjust diff only if
1671 shrinked_insn_address < end_address.
1672
ea9aafc4
AM
16732017-06-27 Alan Modra <amodra@gmail.com>
1674
1675 PR binutils/21665
1676 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
1677 (_bfd_generic_get_section_contents_in_window): Likewise.
1678
a6cbf936
KLC
16792017-06-26 Kuan-Lin Chen <rufus@andestech.com>
1680
1681 * elfnn-riscv.c (perform_relocation): Support the new
1682 R_RISCV_32_PCREL relocation.
1683 (riscv_elf_relocate_section): Likewise.
1684 * elfxx-riscv.c (howto_table): Likewise.
1685 (riscv_reloc_map): Likewise.
1686 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
1687 * libbfd.h: Regenerate.
1688
7211ae50
AM
16892017-06-27 Alan Modra <amodra@gmail.com>
1690
1691 PR binutils/21665
1692 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
1693 Use unsigned file pointer type, and remove cast.
1694 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
1695 Add "count", not "sz".
1696
ab27f80c
PA
16972017-06-26 Pedro Alves <palves@redhat.com>
1698
1699 PR binutils/21665
1700 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
1701 "sz".
1702
1f473e3d
L
17032017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1704
1705 PR binutils/21665
1706 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
1707 a missing line.
1708
b417536f
MR
17092017-06-26 Maciej W. Rozycki <macro@imgtec.com>
1710
1711 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
1712 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
1713 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
1714 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
1715 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
1716
0630b49c
L
17172017-06-26 H.J. Lu <hongjiu.lu@intel.com>
1718
1719 PR binutils/21665
1720 * compress.c (bfd_get_full_section_contents): Don't check the
1721 file size here.
1722 * libbfd.c (_bfd_generic_get_section_contents): Check for and
ea9aafc4 1723 reject a section whose size + offset is greater than the size
0630b49c
L
1724 of the entire file.
1725 (_bfd_generic_get_section_contents_in_window): Likewise.
515a4464 1726
04e15b4a
NC
17272017-06-26 Nick Clifton <nickc@redhat.com>
1728
1729 PR binutils/21670
1730 * tekhex.c (getvalue): Check for the source pointer exceeding the
1731 end pointer before the first byte is read.
1732
cfd14a50
NC
17332017-06-26 Nick Clifton <nickc@redhat.com>
1734
1735 PR binutils/21665
ea9aafc4 1736 * opncls.c (get_build_id): Check that the section is big enough
cfd14a50
NC
1737 to contain the whole note.
1738 * compress.c (bfd_get_full_section_contents): Check for and reject
ea9aafc4 1739 a section whose size is greater than the size of the entire file.
cfd14a50
NC
1740 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
1741 contain a notes section.
1742
93ec5e23
AK
17432017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1744
1745 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
1746 pointer checks.
1747 (elf_s390_modify_segment_map): Likewise.
1748 (bfd_elf_s390_set_options): Lisewise.
1749
57963c05
AM
17502017-06-26 Alan Modra <amodra@gmail.com>
1751
1752 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
1753 a --just-syms bfd.
1754 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
1755 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
1756 .preinit_array on --just-syms bfds.
1757 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
1758 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
1759 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
1760
5cc4ca83
ST
17612017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
1762
1763 * elf.c (find_link): Bounds check "hint".
1764
bff0500d
TP
17652017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
1766
1767 * elf32-arm.c (using_thumb_only): Update list of architectures in
1768 BFD_ASSERT for which the logic is valid.
1769 (using_thumb2_bl): Likewise.
1770 (using_thumb2): Likewise and return true for ARMv8-R.
1771 (arch_has_arm_nop): Likewise.
1772 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
1773 merging logic. Update commentis for value 15 of v8m_baseline,
1774 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
1775 merging of value 15 of Tag_CPU_arch.
1776
4aa57d6a
JW
17772017-06-23 Jiong Wang <jiong.wang@arm.com>
1778
1779 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
1780 BFD_RELOC_AARCH64_ADR_GOT_PAGE
1781 * bfd-in2.h: Regenerate.
1782
5d8763a3
L
17832017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1784
1785 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
1786 the error_alignment label forward. Properly align program
1787 property note section.
1788
e652757b
EC
17892017-06-22 Eric Christopher <echristo@gmail.com>
1790
1791 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
1792 abs to fix a truncation warning.
1793
84da4cf8
L
17942017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1795
1796 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
1797 local undefined weak symbol to 0.
1798 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
1799
48580982
L
18002017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1801
1802 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
1803 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1804 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
1805 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1806 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
1807 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1808 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
1809 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1810
ee2fdd6f
L
18112017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1812
1813 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
1814 (elf_i386_lazy_ibt_plt_entry): Likewise.
1815 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
1816 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
1817 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
1818 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
1819 (elf_i386_lazy_plt_layout): Likewise.
1820 (elf_i386_non_lazy_plt_layout): Likewise.
1821 (elf_i386_link_hash_entry): Add plt_second.
1822 (elf_i386_link_hash_table): Add plt_second and
1823 plt_second_eh_frame.
1824 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
1825 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
1826 the second PLT. Check the second PLT.
1827 (elf_i386_relocate_section): Use the second PLT to resolve
1828 PLT reference if needed.
1829 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
1830 needed.
1831 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
1832 second PLT. Generate unwind info for the second PLT.
1833 (elf_i386_plt_type): Add plt_second.
1834 (elf_i386_get_synthetic_symtab): Support the second PLT.
1835 (elf_i386_parse_gnu_properties): Support
1836 GNU_PROPERTY_X86_FEATURE_1_AND.
1837 (elf_i386_merge_gnu_properties): Support
1838 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1839 on GNU_PROPERTY_X86_FEATURE_1_IBT
1840 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
1841 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1842 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1843 is set on all relocatable inputs.
1844 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
1845 (elf_x32_lazy_ibt_plt_entry): Likewise.
1846 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
1847 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
1848 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
1849 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
1850 (elf_x86_64_lazy_ibt_plt): Likewise.
1851 (elf_x32_lazy_ibt_plt): Likewise.
1852 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1853 (elf_x32_non_lazy_ibt_plt): Likewise.
1854 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
1855 (elf_x86_64_parse_gnu_properties): Support
1856 GNU_PROPERTY_X86_FEATURE_1_AND.
1857 (elf_x86_64_merge_gnu_properties): Support
1858 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1859 on GNU_PROPERTY_X86_FEATURE_1_IBT
1860 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
1861 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1862 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1863 is set on all relocatable inputs.
1864
d19237d9
NC
18652017-06-22 Nick Clifton <nickc@redhat.com>
1866
1867 PR binutils/21649
1868 * som.c (setup_sections): NUL terminate the space_strings buffer.
1869 Check that the space.name field does not index beyond the end of
1870 the space_strings buffer.
1871
6879f5a9
NC
18722017-06-21 Nick Clifton <nickc@redhat.com>
1873
1874 PR binutils/21646
1875 * coff-sh.c (sh_reloc): Check for an out of range reloc.
1876
7adc0a81
NC
18772017-06-21 Nick Clifton <nickc@redhat.com>
1878
1879 PR binutils/21639
1880 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
1881 type of the size parameter.
1882 (_bfd_vms_save_counted_string): Add second parameter - the maximum
1883 length of the counted string.
1884 * vms.h (_bfd_vms_save_sized_string): Update prototype.
1885 (_bfd_vms_save_counted_string): Likewise.
1886 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
1887 _bfd_vms_save_counted_string.
1888 (_bfd_vms_slurp_ehdr): Likewise.
1889 (_bfd_vms_slurp_egsd): Likewise.
1890 (Parse_module): Likewise.
1891
6e1816be
AM
18922017-06-21 Alan Modra <amodra@gmail.com>
1893
1894 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
1895 calls before tocsave calls.
1896 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
1897 following nop.
1898
20bd1b6b
NC
18992017-06-21 Nick Clifton <nickc@redhat.com>
1900
1901 PR binutils/21645
1902 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
1903 bfd_get_full_section_contents returns no contents.
1904
3de58d95
NC
19052017-06-21 Nick Clifton <nickc@redhat.com>
1906
1907 PR binutils/21638
1908 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
1909 record.
1910
cb06d03a
NC
19112017-06-21 Nick Clifton <nickc@redhat.com>
1912
1913 PR binutils/21637
1914 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
1915 list.
1916 (image_set_ptr): Likewise.
1917 (alpha_vms_fix_sec_rel): Likewise.
1918 (alpha_vms_slurp_relocs): Likewise.
1919
c458d007
NC
19202017-06-21 Nick Clifton <nickc@redhat.com>
1921
1922 PR binutils/21633
1923 * ieee.c (ieee_slurp_sections): Check for a NULL return from
1924 read_id.
1925 (ieee_archive_p): Likewise.
1926 (ieee_object_p): Likewise.
1927
ce497010
NC
19282017-06-21 Nick Clifton <nickc@redhat.com>
1929
1930 PR binutils/21640
1931 * elf.c (setup_group): Zero the group section pointer list after
1932 allocation so that loops can be caught. Check for NULL pointers
1933 when processing a group list.
1934
fd52715c
AK
19352017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1936
1937 * elf-s390.h: New file.
1938 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
1939 field.
1940 (elf_s390_additional_program_headers): New function.
1941 (elf_s390_modify_segment_map): New function.
1942 (bfd_elf_s390_set_options): New function.
1943 (elf_backend_additional_program_headers)
1944 (elf_backend_modify_segment_map): Add macro definitions.
1945
abfa390d
L
19462017-06-19 H.J. Lu <hongjiu.lu@intel.com>
1947
1948 PR ld/21626
1949 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
1950 the DYNAMIC bit instead of bfd_count_sections.
1951
bc21b167
NC
19522017-06-19 Nick Clifton <nickc@redhat.com>
1953
1954 PR binutils/21618
1955 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
1956 length.
1957 (evax_bfd_print_eeom): Likewise.
1958 (evax_bfd_print_egsd): Check for an overlarge record length.
1959 (evax_bfd_print_etir): Likewise.
1960
acb56a83
NC
19612017-06-19 Nick Clifton <nickc@redhat.com>
1962
1963 PR binutils/21612
1964 * libieee.h (struct common_header_type): Add end_p field.
1965 * ieee.c (this_byte_and_next): Do not advance input_p beyond
1966 end_p.
1967 (read_id): Check for a length that exceeds the remaining bytes in
1968 the input buffer.
1969 (ieee_seek): Initialise end_p.
1970 (ieee_archive_p): Likewise.
1971 (ieee_object_p): Likewise.
1972
72e84f96
NC
19732017-06-19 Nick Clifton <nickc@redhat.com>
1974
80053e46
NC
1975 PR binutils/21611
1976 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
1977 before reading the EIHS structure entries.
1978
19792017-06-19 Nick Clifton <nickc@redhat.com>
1980
1981 PR binutils/21615
72e84f96
NC
1982 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
1983 gsd_size. Check that there are enough bytes remaining to read the
1984 type and size of the next egsd. Check that the size of the egsd
1985 does not exceed the size of the record.
1986
875ffa3e
AM
19872017-06-19 Alan Modra <amodra@gmail.com>
1988
1989 * config.bfd: Correct targ_underscore for cris.
1990
bdd32e03
AM
19912017-06-18 Alan Modra <amodra@gmail.com>
1992
1993 * config.bfd: Correct targ_underscore for epiphany, ip2k,
1994 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
1995
4b48e2f6
NC
19962017-06-16 Nick Clifton <nickc@redhat.com>
1997
1998 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
1999 bucketlist is empty because there are no symbols to add to the
2000 list.
2001
7dba9362
AM
20022017-06-16 Alan Modra <amodra@gmail.com>
2003
2004 PR ld/20022
2005 PR ld/21557
2006 PR ld/21562
2007 PR ld/21571
2008 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
2009 (BFD_JUMP_TABLE_LINK): Likewise.
2010 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
2011 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
2012 (bfd_elf_define_start_stop): New function.
2013 * linker.c (bfd_generic_define_start_stop): New function.
2014 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
2015 new field.
2016 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
2017 * aout-target.h (MY_bfd_define_start_stop): Define.
2018 * aout-tic30.c (MY_bfd_define_start_stop): Define.
2019 * binary.c (binary_bfd_define_start_stop): Define.
2020 * bout.c (b_out_bfd_define_start_stop): Define.
2021 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
2022 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
2023 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
2024 * coffcode.h (coff_bfd_define_start_stop): Define.
2025 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
2026 * i386msdos.c (msdos_bfd_define_start_stop): Define.
2027 * i386os9k.c (os9k_bfd_define_start_stop): Define.
2028 * ieee.c (ieee_bfd_define_start_stop): Define.
2029 * ihex.c (ihex_bfd_define_start_stop): Define.
2030 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
2031 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
2032 * mmo.c (mmo_bfd_define_start_stop): Define.
2033 * nlm-target.h (nlm_bfd_define_start_stop): Define.
2034 * oasys.c (oasys_bfd_define_start_stop): Define.
2035 * pef.c (bfd_pef_bfd_define_start_stop): Define.
2036 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
2037 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
2038 * som.c (som_bfd_define_start_stop): Define.
2039 * srec.c (srec_bfd_define_start_stop): Define.
2040 * tekhex.c (tekhex_bfd_define_start_stop): Define.
2041 * versados.c (versados_bfd_define_start_stop): Define.
2042 * vms-alpha.c (vms_bfd_define_start_stop): Define.
2043 (alpha_vms_bfd_define_start_stop): Define.
2044 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
2045 * bfd-in2.h: Regenerate.
2046 * libbfd.h: Regenerate.
2047
d68f1976
JW
20482017-06-16 Jiong Wang <jiong.wang@arm.com>
2049
2050 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
2051 SYMBOL_REFERENCES_LOCAL.
2052
6353d82b
JW
20532017-06-15 Jiong Wang <jiong.wang@arm.com>
2054
2055 PR ld/21532
2056 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
2057 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
2058 runtime for if there needs copy relocation elimination.
2059 (need_copy_relocation_p): New function. Return true for symbol with
2060 pc-relative references and if it's against read-only sections.
2061 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
2062 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
2063 that are related with accessing external objects.
2064 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
2065 in elfNN_aarch64_check_relocs.
2066
63634bb4
NC
20672017-06-15 Nick Clifton <nickc@redhat.com>
2068
2069 PR binutils/21582
2070 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
2071 bugs.
62b76e4b
NC
2072 PR binutils/21581
2073 (ieee_archive_p): Likewise.
63634bb4 2074
76800cba
NC
20752017-06-15 Nick Clifton <nickc@redhat.com>
2076
2077 PR binutils/21579
2078 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
2079
f7e16c2a
MF
20802017-06-14 Max Filippov <jcmvbkbc@gmail.com>
2081
2082 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
2083 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
2084 keep both windowed and call0 ABI PLT definitions.
2085 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
2086 elf_xtensa_*_plt_entry endex.
2087 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
2088
f461bbd8
NC
20892017-06-14 Nick Clifton <nickc@redhat.com>
2090
2091 PR binutils/21578
2092 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
2093 flag value.
2094
c53d2e6d
NC
20952017-06-14 Nick Clifton <nickc@redhat.com>
2096
2097 PR binutils/21589
2098 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
2099 maximum value for the ascic pointer. Check that name processing
2100 does not read beyond this value.
2101 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
2102 end of etir record.
2103
04f963fd
NC
21042017-06-14 Nick Clifton <nickc@redhat.com>
2105
2106 PR binutils/21591
2107 * versados.c (versados_mkobject): Zero the allocated tdata structure.
2108 (process_otr): Check for an invalid offset in the otr structure.
2109
319c2dbe
SH
21102017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
2111
2112 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
2113
cbd0eecf
L
21142017-06-13 H.J. Lu <hongjiu.lu@intel.com>
2115
2116 PR ld/20022
2117 PR ld/21557
2118 PR ld/21562
2119 PR ld/21571
2120 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
2121 vtable field to a union.
2122 (_bfd_elf_is_start_stop): Removed.
2123 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
2124 __start_SECNAME and __stop_SECNAME symbols.
2125 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
2126 * elflink.c (_bfd_elf_is_start_stop): Removed.
2127 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
2128 _bfd_elf_is_start_stop.
2129 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
2130 __stop_SECNAME symbols. Updated.
2131 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2132 (bfd_elf_gc_record_vtinherit): Likewise.
2133 (bfd_elf_gc_record_vtentry): Likewise.
2134
10bbbc1d
NC
21352017-06-13 Nick Clifton <nickc@redhat.com>
2136
2137 PR ld/21524
2138 * elflink.c (elf_link_adjust_relocs): Generate an error when
2139 encountering a reloc against a symbol removed by garbage
2140 collection.
2141
5c3ce2bc
L
21422017-06-12 H.J. Lu <hongjiu.lu@intel.com>
2143
2144 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
2145 to merge_gnu_properties.
2146 * elf-properties.c (elf_merge_gnu_properties): Add struct
2147 bfd_link_info * and pass it to merge_gnu_properties.
2148 (elf_merge_gnu_property_list): Add struct bfd_link_info *
2149 and pass it to elf_merge_gnu_properties.
2150 (_bfd_elf_link_setup_gnu_properties): Pass info to
2151 elf_merge_gnu_property_list.
2152 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
2153 bfd_link_info *.
2154 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
2155
9b97dfbf
AM
21562017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
2157
2158 PR 21564
2159 * binary.c (binary_set_section_contents): Scale lma by octets
2160 per byte to set filepos.
2161
e3d1d408
CM
21622017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2163
2164 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
2165 dynamic sections.
2166
64aa8e03
CM
21672017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2168
2169 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
2170 require TEXTREL.
2171
a0abe743
CM
21722017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2173
2174 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
2175 patched section contents for TLS IE reloc.
2176 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
2177
f4e6805f
CM
21782017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2179
2180 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
2181 RELOC_FOR_GLOBAL_SYMBOL macro.
2182
cd640291
CM
21832018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2184
2185 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
2186 changes.
2187
7ef0acc1
VG
21882017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2189
2190 * config/tc-arc.c (md_undefined_symbol): Changed.
2191 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
2192
cc89d0b3
CM
21932017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2194
2195 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
2196 symbols.
2197
9d5c718b
CM
21982017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2199
2200 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
2201 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
2202
be9e3704
CM
22032017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
2204
2205 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
2206 object is created.
2207
4ec192e6
RE
22082017-06-08 Richard Earnshaw <rearnsha@arm.com>
2209
2210 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
2211 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
2212 is non-zero. Add clarifying comments.
2213
51fa2693
L
22142017-06-08 H.J. Lu <hongjiu.lu@intel.com>
2215
2216 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
2217 name. Use local IFUNC symbol name string to report unsupported
2218 non-PIC call to IFUNC function.
2219 (elf_i386_relocate_section): Dump local IFUNC name with minfo
2220 when generating R_386_IRELATIVE relocation.
2221 (elf_i386_finish_dynamic_symbol): Likewise.
2222 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
2223 IFUNC symbol name.
2224 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
2225 when generating R_X86_64_IRELATIVE relocation.
2226 (elf_x86_64_finish_dynamic_symbol): Likewise.
2227
78e8a2ff
JM
22282017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2229
2230 * elf.c (setup_group): Make sure BFD sections are created for all
2231 group sections in the input file when processing SHF_GROUP
2232 sections.
2233 (bfd_section_from_shdr): Avoid duplicating logic already
2234 implemented in `setup_group'.
2235
9949827b
DBR
22362017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
2237
2238 PR binutils/21546
2239 * peXXigen.c (pe_print_idata): Use the address of the first thunk
2240 if the hint address is zero.
2241
0ee3a6db
JC
22422017-06-06 James Clarke <jrtc27@jrtc27.com>
2243
2244 PR ld/19579
2245 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
2246 ELF_COMMON_DEF_P for common symbols.
2247
7bdf4127
AB
22482017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
2249
2250 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
2251 SEC_GROUP sections as SEC_EXCLUDE.
2252 (bfd_elf_set_group_contents): Replace use of abort with an assert.
2253 (assign_section_numbers): Use resolve_section_groups flag instead
2254 of relocatable link type.
2255 (_bfd_elf_init_private_section_data): Use resolve_section_groups
2256 flag instead of checking the final_link flag for part of the
2257 checks in here. Fix white space as a result.
2258 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
2259 instead of relocatable link type.
2260 (bfd_elf_final_link): Likewise.
2261
458ad2b8
JM
22622017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2263
2264 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
2265 variable `bed'.
2266 * elf32-score.c (score_elf_final_link_relocate): Likewise.
2267 (s3_bfd_score_elf_check_relocs): Likewise.
2268 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2269 (score_elf_final_link_relocate): Likewise.
2270 (s7_bfd_score_elf_check_relocs): Likewise.
2271
fbebaf4a
JM
22722017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
2273
2274 * elflink.c (init_reloc_cookie_rels): Remove unused variable
2275 `bed'.
2276
056bafd4
MR
22772017-06-06 Maciej W. Rozycki <macro@imgtec.com>
2278
2279 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
2280 from `reloc_count' rather than decrementing it.
2281 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
2282 `reloc_count' by `int_rels_per_ext_rel'.
2283 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
2284 `reloc_count' by `int_rels_per_ext_rel' for last relocation
2285 entry determination.
2286 (s3_bfd_score_elf_check_relocs): Likewise.
2287 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
2288 (s7_bfd_score_elf_relocate_section): Likewise.
2289 (s7_bfd_score_elf_check_relocs): Likewise.
2290 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
2291 prototype and function.
2292 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
2293 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
2294 triple rather than once the sum of REL and RELA relocation entry
2295 counts.
2296 (bfd_elf64_get_reloc_upper_bound): Remove macro.
2297 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
2298 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
2299 storage allocation size determination.
2300 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
2301 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
2302 by `int_rels_per_ext_rel' for last relocation entry
2303 determination.
2304 (bfd_elf_final_link): Do not multiply `reloc_count' by
2305 `int_rels_per_ext_rel' for internal relocation storage
2306 allocation size determination.
2307 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
2308 `int_rels_per_ext_rel' for last relocation entry determination.
2309 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2310 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
2311 (_bfd_mips_elf_relocate_section): Likewise.
2312
af54f0eb
AM
23132017-06-05 Alan Modra <amodra@gmail.com>
2314
2315 PR 21529
2316 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
2317
6cf3bf88 23182017-06-01 John Baldwin <jhb@FreeBSD.org>
b5430a3c
JB
2319
2320 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
2321 determine structure sizes.
2322 (elfcore_grok_freebsd_prstatus): Likewise.
2323
f378ab09
AM
23242017-06-01 Alan Modra <amodra@gmail.com>
2325
2326 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
2327 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
2328 dynamic objects.
2329 (is_elfv2_localentry0): New function.
2330 (ppc64_elf_tls_setup): Default params->plt_localentry0.
2331 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
2332 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
2333 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
2334 optimized localentry:0 stubs.
2335 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
2336 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
2337 localentry:0 stubs.
2338 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
2339 DT_PPC64_OPT.
2340 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
2341
8c65b54f
CS
23422017-05-30 Casey Smith <clegg89@gmail.com>
2343
2344 PR ld/21523
2345 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
2346 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
2347
64984c22
AK
23482017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
2349
2350 * cpu-arc.c (arc_compatible): New function.
2351
37cd3877
AK
23522017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
2353
2354 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
2355
8e2f54bc
L
23562017-05-30 H.J. Lu <hongjiu.lu@intel.com>
2357
2358 PR binutils/21519
2359 * bfdio.c (bfd_get_file_size): New function.
2360 * bfd-in2.h: Regenerated.
2361
8e7f04f1 23622017-05-23 Dilian Palauzov <git-dpa@aegee.org>
2363
2364 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
2365 comments.
2366
25f94347
L
23672017-05-22 H.J. Lu <hongjiu.lu@intel.com>
2368
2369 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
2370 dynobj instead of htab->elf.dynobj.
2371
e5713223
MR
23722017-05-19 Maciej W. Rozycki <macro@imgtec.com>
2373
2374 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
2375 and function.
2376 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
2377 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
2378 actual number of internal relocations retrieved. Adjust
2379 function description.
2380 (bfd_elf64_canonicalize_reloc): Remove macro.
2381 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
2382
64517994
JM
23832017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
2384
2385 * archures.c (bfd_mach_sparc_v9m8): Define.
2386 (bfd_mach_sparc_v8plusm8): Likewise.
2387 (bfd_mach_sparc_v9_p): Adjust to M8.
2388 (bfd_mach_sparc_64bit_p): Likewise.
2389 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
2390 bfd_mach_sparc_v8plusm8.
2391 * bfd-in2.h: Regenerated.
2392 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
2393 sparc:v8plusm8.
2394 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
2395 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
2396 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
2397 SHA3.
2398 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
2399 bfd_mach_sparc_v8plusm8.
2400
eb026f09
AM
24012017-05-19 Alan Modra <amodra@gmail.com>
2402
2403 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
2404 debug and special sections when no non-note alloc sections in an
2405 object are kept.
2406
535b785f
AM
24072017-05-18 Alan Modra <amodra@gmail.com>
2408
2409 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
2410 * elf-m10300.c: Likewise.
2411 * elf.c: Likewise.
2412 * elf32-arc.c: Likewise.
2413 * elf32-bfin.c: Likewise.
2414 * elf32-m68k.c: Likewise.
2415 * elf32-nds32.c: Likewise.
2416 * elf32-tilepro.c: Likewise.
2417 * elflink.c: Likewise.
2418 * elfnn-aarch64.c: Likewise.
2419 * elfnn-riscv.c: Likewise.
2420 * elfxx-tilegx.c: Likewise.
2421 * mach-o.c: Likewise.
2422 * peXXigen.c: Likewise.
2423 * vms-alpha.c: Likewise.
2424 * vms-lib.c: Likewise.
2425
b7c871ed
L
24262017-05-17 H.J. Lu <hongjiu.lu@intel.com>
2427
2428 PR ld/20882
2429 * elflink.c (elf_gc_mark_debug_section): New function.
2430 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
2431 referenced by kept debug sections.
2432
bc4e12de
AM
24332017-05-16 Alan Modra <amodra@gmail.com>
2434
2435 * elf-m10300.c: Rename occurrences of non_ir_ref.
2436 * elf32-arm.c: Likewise.
2437 * elf32-bfin.c: Likewise.
2438 * elf32-cr16.c: Likewise.
2439 * elf32-cris.c: Likewise.
2440 * elf32-d10v.c: Likewise.
2441 * elf32-dlx.c: Likewise.
2442 * elf32-fr30.c: Likewise.
2443 * elf32-frv.c: Likewise.
2444 * elf32-hppa.c: Likewise.
2445 * elf32-i370.c: Likewise.
2446 * elf32-i386.c: Likewise.
2447 * elf32-iq2000.c: Likewise.
2448 * elf32-lm32.c: Likewise.
2449 * elf32-m32c.c: Likewise.
2450 * elf32-m32r.c: Likewise.
2451 * elf32-m68hc1x.c: Likewise.
2452 * elf32-m68k.c: Likewise.
2453 * elf32-mcore.c: Likewise.
2454 * elf32-metag.c: Likewise.
2455 * elf32-microblaze.c: Likewise.
2456 * elf32-moxie.c: Likewise.
2457 * elf32-msp430.c: Likewise.
2458 * elf32-mt.c: Likewise.
2459 * elf32-nios2.c: Likewise.
2460 * elf32-or1k.c: Likewise.
2461 * elf32-ppc.c: Likewise.
2462 * elf32-rl78.c: Likewise.
2463 * elf32-s390.c: Likewise.
2464 * elf32-score.c: Likewise.
2465 * elf32-score7.c: Likewise.
2466 * elf32-sh.c: Likewise.
2467 * elf32-tic6x.c: Likewise.
2468 * elf32-tilepro.c: Likewise.
2469 * elf32-v850.c: Likewise.
2470 * elf32-vax.c: Likewise.
2471 * elf32-xstormy16.c: Likewise.
2472 * elf32-xtensa.c: Likewise.
2473 * elf64-alpha.c: Likewise.
2474 * elf64-hppa.c: Likewise.
2475 * elf64-ia64-vms.c: Likewise.
2476 * elf64-mmix.c: Likewise.
2477 * elf64-ppc.c: Likewise.
2478 * elf64-s390.c: Likewise.
2479 * elf64-sh64.c: Likewise.
2480 * elf64-x86-64.c: Likewise.
2481 * elflink.c: Likewise.
2482 * elfnn-aarch64.c: Likewise.
2483 * elfnn-ia64.c: Likewise.
2484 * elfnn-riscv.c: Likewise.
2485 * elfxx-mips.c: Likewise.
2486 * elfxx-sparc.c: Likewise.
2487 * elfxx-tilegx.c: Likewise.
2488 * linker.c: Likewise.
2489
4070765b
AM
24902017-05-16 Alan Modra <amodra@gmail.com>
2491
2492 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
2493 * elflink.c (elf_link_add_object_symbols): Update to use
2494 non_ir_ref_dynamic.
2495 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
2496 non_ir_ref.
2497 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2498
25499ac7
MR
24992017-05-15 Maciej W. Rozycki <macro@imgtec.com>
2500
2501 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
2502
73caa85d
L
25032017-05-12 H.J. Lu <hongjiu.lu@intel.com>
2504
2505 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
2506 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
2507 properties.
2508 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2509
f2c29a16
L
25102017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2511
2512 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
2513 to plt_second.
2514 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
2515 to plt_second/plt_second_eh_frame.
2516 (elf_x86_64_link_hash_newfunc): Updated.
2517 (elf_x86_64_allocate_dynrelocs): Likewise.
2518 (elf_x86_64_size_dynamic_sections): Likewise.
2519 (elf_x86_64_relocate_section): Likewise.
2520 (elf_x86_64_finish_dynamic_symbol): Likewise.
2521 (elf_x86_64_finish_dynamic_sections): Likewise.
2522 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
2523 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
2524 .plt.sec section.
2525 (elf_backend_setup_gnu_properties): Updated. Create the
2526 .plt.sec section instead of the .plt.sec section.
2527
dc2be3d2
L
25282017-05-11 H.J. Lu <hongjiu.lu@intel.com>
2529
2530 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
2531 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
2532 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
2533
db84b98a
JM
25342017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2535
2536 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
2537 (bfd_elf64_set_reloc): Define.
2538 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
2539
23186865
JM
25402017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
2541
2542 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
2543 (struct bfd_target): New field _bfd_set_reloc.
2544 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
2545 * reloc.c (_bfd_generic_set_reloc): New function.
2546 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
2547 * nlm-target.h (nlm_set_reloc): Likewise.
2548 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
2549 * aout-tic30.c (MY_set_reloc): Likewise.
2550 * aout-target.h (MY_set_reloc): Likewise.
2551 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
2552 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
2553 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
2554 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
2555 * aout-adobe.c (aout_32_set_reloc): Likewise.
2556 * bout.c (b_out_set_reloc): Likewise.
2557 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
2558 * i386os9k.c (aout_32_set_reloc): Likewise.
2559 * ieee.c (ieee_set_reloc): Likewise.
2560 * oasys.c (oasys_set_reloc): Likewise.
2561 * som.c (som_set_reloc): Likewise.
2562 * versados.c (versados_set_reloc): Likewise.
2563 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
2564 _bfd_generic_set_reloc.
2565 (rs6000_xcoff64_aix_vec): LIkewise.
2566 * libbfd.c (_bfd_norelocs_set_reloc): New function.
2567 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
2568 * i386msdos.c (msdos_set_reloc): Define to
2569 _bfd_norelocs_set_reloc.
2570 * elfcode.h (elf_set_reloc): Define.
2571 * bfd-in2.h: Regenerated.
2572
aab82f4c
L
25732017-05-10 H.J. Lu <hongjiu.lu@intel.com>
2574
2575 PR ld/21481
2576 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
2577 for IFUNC function address.
2578
53a346d8
CZ
25792017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
2580
2581 * elf32-arc.c (FEATURE_LIST_NAME): Define.
2582 (CONFLICT_LIST): Likewise.
2583 (opcode/arc-attrs.h): Include.
2584 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
2585 (arc_extract_features): New file.
2586 (arc_stralloc): Likewise.
2587 (arc_elf_merge_attributes): Likewise.
2588 (arc_elf_merge_private_bfd_data): Use object attributes.
2589 (bfd_arc_get_mach_from_attributes): New function.
2590 (arc_elf_object_p): Use object attributes.
2591 (arc_elf_final_write_processing): Likewise.
2592 (elf32_arc_obj_attrs_arg_type): New function.
2593 (elf32_arc_obj_attrs_handle_unknown): Likewise.
2594 (elf32_arc_section_from_shdr): Likewise.
2595 (elf_backend_obj_attrs_vendor): Define.
2596 (elf_backend_obj_attrs_section): Likewise.
2597 (elf_backend_obj_attrs_arg_type): Likewise.
2598 (elf_backend_obj_attrs_section_type): Likewise.
2599 (elf_backend_obj_attrs_handle_unknown): Likewise.
2600 (elf_backend_section_from_shdr): Likewise.
2601
e645cf40
AG
26022017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
2603
2604 PR ld/21458
2605 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
2606 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
2607 and the destination is a Thumb symbol.
2608
dd9e66ee
L
26092017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2610
2611 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
2612 initializer to silence GCC 4.2.
2613 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2614
38b12349
L
26152017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2616
2617 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
2618 (LAZY_PLT_ENTRY_SIZE): This.
2619 (NON_LAZY_PLT_ENTRY_SIZE): New.
2620 (elf_x86_64_plt0_entry): Renamed to ...
2621 (elf_x86_64_lazy_plt0_entry): This.
2622 (elf_x86_64_plt_entry): Renamed to ...
2623 (elf_x86_64_lazy_plt_entry): This.
2624 (elf_x86_64_bnd_plt0_entry): Renamed to ...
2625 (elf_x86_64_lazy_bnd_plt0_entry): This.
2626 (elf_x86_64_legacy_plt_entry): Removed.
2627 (elf_x86_64_bnd_plt_entry): Renamed to ...
2628 (elf_x86_64_lazy_bnd_plt_entry): This.
2629 (elf_x86_64_legacy_plt2_entry): Renamed to ...
2630 (elf_x86_64_non_lazy_plt_entry): This.
2631 (elf_x86_64_bnd_plt2_entry): Renamed to ...
2632 (elf_x86_64_non_lazy_bnd_plt_entry): This.
2633 (elf_x86_64_eh_frame_plt): Renamed to ...
2634 (elf_x86_64_eh_frame_lazy_plt): This.
2635 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
2636 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
2637 (elf_x86_64_eh_frame_plt_got): Renamed to ...
2638 (elf_x86_64_eh_frame_non_lazy_plt): This.
2639 (elf_x86_64_lazy_plt_layout): New.
2640 (elf_x86_64_non_lazy_plt_layout): Likewise.
2641 (elf_x86_64_plt_layout): Likewise.
2642 (elf_x86_64_backend_data): Remove PLT layout information. Add
2643 os for target system.
2644 (GET_PLT_ENTRY_SIZE): Removed.
2645 (elf_x86_64_lazy_plt): New.
2646 (elf_x86_64_non_lazy_plt): Likewise.
2647 (elf_x86_64_lazy_bnd_plt): Likewise.
2648 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2649 (elf_x86-64_arch_bed): Updated.
2650 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2651 (elf_x86_64_create_dynamic_sections): Removed.
2652 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
2653 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2654 (elf_x86-64_adjust_dynamic_symbol): Updated.
2655 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
2656 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2657 size for PLT0 if there is no PLT0. Get plt_entry_size from
2658 non_lazy_plt for non-lazy PLT entries.
2659 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
2660 from non_lazy_plt for non-lazy PLT entries.
2661 (elf_x86-64_relocate_section): Updated. Properly get PLT index
2662 if there is no PLT0.
2663 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
2664 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
2665 entries with non-lazy PLT layout. Don't fill the second and third
2666 slots in the PLT entry if there is no PLT0.
2667 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
2668 if there is no PLT0. Set sh_entsize on the .plt.got section.
2669 (compare_relocs): New.
2670 (elf_x86_64_plt_type): Likewise.
2671 (elf_x86_64_plt): Likewise.
2672 (elf_x86_64_nacl_plt): New. Forward declaration.
2673 (elf_x86_64_get_plt_sym_val): Removed.
2674 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
2675 against all dynamic relocations.
2676 (elf_x86_64_link_setup_gnu_properties): New function.
2677 (elf_backend_create_dynamic_sections): Updated.
2678 (elf_backend_setup_gnu_properties): New.
2679 (elf_x86_64_nacl_plt): New.
2680 (elf_x86_64_nacl_arch_bed): Updated.
2681
f604c2a2
L
26822017-05-08 H.J. Lu <hongjiu.lu@intel.com>
2683
2684 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
2685 (LAZY_PLT_ENTRY_SIZE): This.
2686 (NON_LAZY_PLT_ENTRY_SIZE): New.
2687 (elf_i386_plt0_entry): Renamed to ...
2688 (elf_i386_lazy_plt0_entry): This.
2689 (elf_i386_plt_entry): Renamed to ...
2690 (elf_i386_lazy_plt_entry): This.
2691 (elf_i386_pic_plt0_entry): Renamed to ...
2692 (elf_i386_pic_lazy_plt0_entry): This.
2693 (elf_i386_pic_plt_entry): Renamed to ...
2694 (elf_i386_pic_lazy_plt_entry): This.
2695 (elf_i386_got_plt_entry): Renamed to ...
2696 (elf_i386_non_lazy_plt_entry): This.
2697 (elf_i386_pic_got_plt_entry): Renamed to ...
2698 (elf_i386_pic_non_lazy_plt_entry): This.
2699 (elf_i386_eh_frame_plt): Renamed to ...
2700 (elf_i386_eh_frame_lazy_plt): This.
2701 (elf_i386_eh_frame_plt_got): Renamed to ...
2702 (elf_i386_eh_frame_non_lazy_plt): This.
2703 (elf_i386_plt_layout): Renamed to ...
2704 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
2705 eh_frame_plt_got_size.
2706 (elf_i386_non_lazy_plt_layout): New.
2707 (elf_i386_plt_layout): Likewise.
2708 (elf_i386_non_lazy_plt): Likewise.
2709 (GET_PLT_ENTRY_SIZE): Removed.
2710 (elf_i386_plt): Renamed to ...
2711 (elf_i386_lazy_plt): This.
2712 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
2713 (elf_i386_arch_bed): Updated.
2714 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
2715 (elf_i386_create_dynamic_sections): Removed.
2716 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
2717 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
2718 (elf_i386_adjust_dynamic_symbol): Updated.
2719 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
2720 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
2721 size for PLT0 if there is no PLT0.
2722 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
2723 output section is discarded only if GOT isn't empty.
2724 (elf_i386_relocate_section): Updated. Properly get PLT index
2725 if there is no PLT0.
2726 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
2727 second and third slots in the PLT entry if there is no PLT0.
2728 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
2729 if there is no PLT0. Set sh_entsize on the .plt.got section.
2730 (elf_i386_nacl_plt): Forward declaration.
2731 (elf_i386_get_plt_sym_val): Removed.
2732 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
2733 against all dynamic relocations.
2734 (elf_i386_link_setup_gnu_properties): New function.
2735 (elf_backend_create_dynamic_sections): Updated.
2736 (elf_backend_setup_gnu_properties): New.
2737 (elf_i386_nacl_plt): Updated.
2738 (elf_i386_nacl_arch_bed): Likewise.
2739 (elf_i386_vxworks_arch_bed): Likewise.
2740
046734ff
TP
27412017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
2742
2743 * elflink.c (elf_output_implib): Remove executable flag from import
2744 library bfd.
2745 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
2746 library is a relocatable object file.
2747
b660e9eb
SKS
27482017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2749
2750 PR ld/21404
2751 * elf32-avr.c (avr_should_move_sym): New function.
2752 (avr_should_reduce_sym_size): Likewise.
2753 (avr_should_increase_sym_size): Likewise.
2754 (elf32_avr_relax_delete_bytes): Adjust symbol values
2755 and sizes by calling new functions.
2756
763a5fa4
PD
27572017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
2758
2759 * config.bfd (riscv32-*): Enable rv64.
2760
73ec947d
AM
27612017-05-02 Alan Modra <amodra@gmail.com>
2762
2763 PR 21384
2764 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
2765 rather than h->root.type == bfd_link_hash_new.
2766 (bfd_elf_record_link_assignment): Similarly, call
2767 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
2768
a941291c
AM
27692017-04-29 Alan Modra <amodra@gmail.com>
2770
2771 PR 21432
2772 * reloc.c (reloc_offset_in_range): New function.
2773 (bfd_perform_relocation, bfd_install_relocation): Use it.
2774 (_bfd_final_link_relocate): Likewise.
2775
750eaa47
L
27762017-04-28 H.J. Lu <hongjiu.lu@intel.com>
2777
2778 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
2779 before using .plt.got.
2780 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2781
5b66fac4
L
27822017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2783
2784 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
2785 instead of "+=" to update 0.
2786
de9a3c42
L
27872017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2788
2789 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
2790 .plt.got section here.
2791 (elf_i386_check_relocs): Don't create the .plt.got section.
2792 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
2793 the .plt.got and .plt.bnd sections here.
2794 (elf_x86_64_check_relocs): Don't create the .plt.got nor
2795 .plt.bnd sections.
2796
da3d25af
L
27972017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2798
2799 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
2800 has_bnd_reloc.
2801 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
2802 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
2803 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
2804 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
2805 has_bnd_reloc.
2806
fba37edd
L
28072017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2808
2809 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
2810 to return bfd *.
2811 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
2812 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
2813 the first relocatable ELF input with GNU properties.
2814
1f78f649
L
28152017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2816
2817 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
2818 VxWorks for non-PIC.
2819
76c20d54
AM
28202017-04-27 Alan Modra <amodra@gmail.com>
2821
2822 * elf-bfd.h (struct elf_backend_data): Make asection param of
2823 elf_backend_eh_frame_address_size const.
2824 (_bfd_elf_eh_frame_address_size): Likewise.
2825 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
2826 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
2827 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
2828 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
2829 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
2830 (next_cie_fde_offset): Constify params.
2831 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
2832
d7153c4a
AM
28332017-04-27 Alan Modra <amodra@gmail.com>
2834
2835 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
2836 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
2837 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
2838 aug_data_len.
2839 (offset_adjust): New function.
2840 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
2841 (adjust_eh_frame_local_symbols): Likewise.
2842 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
2843 after changing anything. Return true if anything changed.
2844 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
2845 _bfd_elf_adjust_eh_frame_global_symbol for globals.
2846
641338d8
AM
28472017-04-27 Alan Modra <amodra@gmail.com>
2848
2849 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
2850 when force_local.
2851
21d68fcd
AM
28522017-04-27 Alan Modra <amodra@gmail.com>
2853
2854 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2855 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
2856 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
2857 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
2858 for undef and undefweak dyn_relocs.
2859 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2860 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
2861 (allocate_got, allocate_dynrelocs): Likewise.
2862 (ppc64_elf_relocate_section): Likewise.
2863
97d343d4
L
28642017-04-26 H.J. Lu <hongjiu.lu@intel.com>
2865
2866 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
2867 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
2868 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
2869 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
2870
04b31182
NC
28712017-04-26 Nick Clifton <nickc@redhat.com>
2872
2873 PR binutils/21434
2874 * reloc.c (bfd_perform_relocation): Check for a negative address
2875 in the reloc.
2876
23ec1e32
MR
28772017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2878
2879 PR ld/21334
2880 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
2881 member.
2882 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
2883 (elf_backend_always_renumber_dynsyms): Define.
2884 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
2885 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
2886 * elflink.c (bfd_elf_size_dynamic_sections): Also call
2887 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
2888 it.
2889 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
2890
c46cec3a
MR
28912017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2892
2893 * elflink.c (bfd_elf_size_dynamic_sections): Only call
2894 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
2895 sections have been created.
2896
e63d1232
NC
28972017-04-26 Nick Clifton <nickc@redhat.com>
2898
2899 PR binutils/21431
2900 * compress.c (bfd_init_section_compress_status): Check the return
2901 value from bfd_malloc.
2902
9e9821dd
L
29032017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2904
2905 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
2906 no_finish_dynamic_symbol.
2907 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
2908 0.
2909 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
2910 weak symbol, don't make it dynamic.
2911 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
2912 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
2913 relocation for GOT reference.
2914 (elf_x86_64_finish_dynamic_symbol): Abort if
2915 no_finish_dynamic_symbol isn't 0.
2916
0dc9a308
L
29172017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2918
2919 PR ld/21402
2920 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
2921 undefined weak symbol, don't make it dynamic.
2922 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
2923 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2924 relocation for R_386_GOT32.
2925
1587442d
L
29262017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2927
2928 PR ld/21425
2929 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
2930
7eacd66b
AM
29312017-04-23 Alan Modra <amodra@gmail.com>
2932
2933 PR 21414
2934 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
2935 * elf.c (lcomm_sym): New.
2936 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
2937 * bfd-in2.h: Regenerate.
2938
bce964aa
AM
29392017-04-23 Alan Modra <amodra@gmail.com>
2940
2941 PR 21412
2942 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
2943 parameters and comment.
2944 (_bfd_elf_get_reloc_section): Delete.
2945 (_bfd_elf_plt_get_reloc_section): Declare.
2946 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
2947 New functions. Don't blindly skip over assumed .rel/.rela prefix.
2948 Extracted from..
2949 (_bfd_elf_get_reloc_section): ..here. Delete.
2950 (assign_section_numbers): Call elf_get_reloc_section.
2951 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
2952 * elfxx-target.h (elf_backend_get_reloc_section): Update.
2953
97e83a10
AM
29542017-04-23 Alan Modra <amodra@gmail.com>
2955
2956 PR 21409
2957 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
2958 no symbols.
2959
e133d005
L
29602017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2961
2962 PR ld/21402
2963 * elf32-i386.c (elf_i386_link_hash_entry): Add
2964 no_finish_dynamic_symbol.
2965 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
2966 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
2967 symbol, don't make it dynamic in PIE.
2968 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
2969 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2970 relocation for R_386_GOT32
2971 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
2972 isn't 0.
2973
3c5fce9b
L
29742017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2975
2976 PR ld/19617
2977 PR ld/21086
2978 * elflink.c (elf_link_add_object_symbols): Require
2979 --no-dynamic-linker with -E/--dynamic-list when creating
2980 dynamic sections.
2981
0fad2956
MR
29822017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2983
2984 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
2985 if forced local.
2986
64575f78
MR
29872017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2988
2989 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
2990 dynamic symbol sorting.
2991
59fa66c5
L
29922017-04-20 H.J. Lu <hongjiu.lu@intel.com>
2993
2994 PR ld/21382
2995 * elflink.c (elf_link_add_object_symbols): Preserve
2996 dynamic_ref_after_ir_def when restoring the symbol table for
2997 unneeded dynamic object.
2998
e492d2f8
L
29992017-04-19 H.J. Lu <hongjiu.lu@intel.com>
3000
3001 PR ld/21401
3002 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
3003 on on undefined IFUNC symbol in the second PLT.
3004
10169134
WAF
30052017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
3006
3007 * peXXigen.c (pe_print_reloc): Correct chunk_end.
3008
954b63d4
AM
30092017-04-19 Alan Modra <amodra@gmail.com>
3010
3011 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
3012 or make dynamic for info->dynamic_undefined_weak 0 and 1.
3013 * elf32-ppc.c:Formatting.
3014 (ensure_undefweak_dynamic): Don't make dynamic when
3015 info->dynamic_undefined_weak is zero.
3016 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3017 info->dynamic_undefined_weak. Discard undef dyn_relocs when
3018 not default visibility. Discard undef and undefweak
3019 dyn_relocs earlier.
3020 (ppc_elf_relocate_section): Adjust to suit.
3021 * elf64-ppc.c: Formatting.
3022 (ensure_undefweak_dynamic): Don't make dynamic when
3023 info->dynamic_undefined_weak is zero.
3024 (allocate_dynrelocs): Discard undefweak dyn_relocs for
3025 info->dynamic_undefined_weak. Discard them earlier.
3026
e6699019
L
30272017-04-17 H.J. Lu <hongjiu.lu@intel.com>
3028
3029 PR ld/21389
3030 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
3031 before generating the version definition section.
3032
c5d37467
AM
30332017-04-17 Alan Modra <amodra@gmail.com>
3034
3035 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
3036 state when a regular object file defines a symbol with
3037 incompatible type to that defined by an earlier shared lib.
3038
63a5468a
AM
30392017-04-13 Alan Modra <amodra@gmail.com>
3040
3041 * coffcode.h: Wrap some overly long _bfd_error_handler args.
3042 * elf.c: Likewise.
3043 * elf32-arm.c: Likewise.
3044 * elf32-i386.c: Likewise.
3045 * elf32-mep.c: Likewise.
3046 * elf64-ia64-vms.c: Likewise.
3047 * elf64-x86-64.c: Likewise.
3048 * elflink.c: Likewise.
3049 * elfnn-ia64.c: Likewise.
3050 * elfxx-mips.c: Likewise.
3051
dae82561
AM
30522017-04-13 Alan Modra <amodra@gmail.com>
3053
3054 * aoutx.h: Use %B and %A in error messages throughout file.
3055 * aout-cris.c: Likewise.
3056 * archive.c: Likewise.
3057 * binary.c: Likewise.
3058 * coff-rs6000.c: Likewise.
3059 * coff-tic4x.c: Likewise.
3060 * coffcode.h: Likewise.
3061 * coffgen.c: Likewise.
3062 * cofflink.c: Likewise.
3063 * coffswap.h: Likewise.
3064 * cpu-arm.c: Likewise.
3065 * elf-eh-frame.c: Likewise.
3066 * elf-m10300.c: Likewise.
3067 * elf.c: Likewise.
3068 * elf32-arc.c: Likewise.
3069 * elf32-arm.c: Likewise.
3070 * elf32-bfin.c: Likewise.
3071 * elf32-frv.c: Likewise.
3072 * elf32-iq2000.c: Likewise.
3073 * elf32-m32c.c: Likewise.
3074 * elf32-microblaze.c: Likewise.
3075 * elf32-nds32.c: Likewise.
3076 * elf32-rl78.c: Likewise.
3077 * elf32-rx.c: Likewise.
3078 * elf32-score.c: Likewise.
3079 * elf32-score7.c: Likewise.
3080 * elf32-sh64.c: Likewise.
3081 * elf32-v850.c: Likewise.
3082 * elf32-vax.c: Likewise.
3083 * elf32-visium.c: Likewise.
3084 * elf64-ia64-vms.c: Likewise.
3085 * elf64-mmix.c: Likewise.
3086 * elf64-sh64.c: Likewise.
3087 * elfcode.h: Likewise.
3088 * elfnn-aarch64.c: Likewise.
3089 * elfnn-ia64.c: Likewise.
3090 * elfxx-mips.c: Likewise.
3091 * hpux-core.c: Likewise.
3092 * ieee.c: Likewise.
3093 * ihex.c: Likewise.
3094 * linker.c: Likewise.
3095 * merge.c: Likewise.
3096 * mmo.c: Likewise.
3097 * oasys.c: Likewise.
3098 * pdp11.c: Likewise.
3099 * peXXigen.c: Likewise.
3100 * rs6000-core.c: Likewise.
3101 * vms-alpha.c: Likewise.
3102 * xcofflink.c: Likewise.
3103
c08bb8dd
AM
31042017-04-13 Alan Modra <amodra@gmail.com>
3105
3106 * bfd.c (PRINT_TYPE): Define.
3107 (_doprnt): New function.
3108 (error_handler_internal): Use _doprnt.
3109 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
3110 calls in their natural order, throughout file.
3111 * coff-mcore.c: Likewise.
3112 * coff-ppc.c: Likewise.
3113 * coff-tic80.c: Likewise.
3114 * cofflink.c: Likewise.
3115 * elf-s390-common.c: Likewise.
3116 * elf.c: Likewise.
3117 * elf32-arm.c: Likewise.
3118 * elf32-i386.c: Likewise.
3119 * elf32-m32r.c: Likewise.
3120 * elf32-msp430.c: Likewise.
3121 * elf32-spu.c: Likewise.
3122 * elf64-ia64-vms.c: Likewise.
3123 * elf64-sparc.c: Likewise.
3124 * elf64-x86-64.c: Likewise.
3125 * elflink.c: Likewise.
3126 * elfnn-aarch64.c: Likewise.
3127 * elfnn-ia64.c: Likewise.
3128 * elfxx-mips.c: Likewise.
3129
10463f39
AM
31302017-04-13 Alan Modra <amodra@gmail.com>
3131
3132 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
3133 branch veneers" error. Fix double space and format message.
3134 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
3135 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
3136
4af8774e
AM
31372017-04-13 Alan Modra <amodra@gmail.com>
3138
3139 * bfd-in2.h: Regenerate.
3140
e4097f5e
L
31412017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3142
3143 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
3144 extra `\n' in warning/error messages.
3145 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
3146 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3147
537616aa
L
31482017-04-11 H.J. Lu <hongjiu.lu@intel.com>
3149
3150 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
3151 processor-specific properties with generic ELF target vector.
3152
bb1dd176
QZ
31532017-04-10 Qing Zhao <qing.zhao@oracle.com>
3154
3155 * elf32-sparc.c (elf_backend_fixup_symbol): New.
3156 * elf64-sparc.c (elf_backend_fixup_symbol): New.
3157 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
3158 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
3159 has_non_got_reloc.
3160 (link_hash_newfunc): Initialize has_got_reloc and
3161 has_non_got_reloc.
3162 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
3163 section.
3164 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
3165 has_non_got_reloc.
3166 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
3167 has_non_got_reloc.
3168 (_bfd_sparc_elf_fixup_symbol): New function.
3169 (allocate_dynrelocs): Don't allocate space for dynamic
3170 relocations and discard relocations against resolved undefined
3171 weak symbols in executable. Don't make resolved undefined weak
3172 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
3173 relocation against undefined weak symbols in PIE.
3174 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
3175 relocations against resolved undefined weak symbols in PIE
3176 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
3177 without ynamic PLT/GOT relocations for resolved undefined weak
3178 symbols.
3179 Don't generate dynamic relocation against resolved undefined
3180 weak symbol in executable.
3181 (pie_finish_undefweak_symbol): New function.
3182 (_bfd_sparc_elf_finish_dynamic_sections): Call
3183 pie_finish_undefweak_symbol on all symbols in PIE.
3184 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
3185 (_bfd_sparc_elf_fixup_symbol): New function.
3186
d236cfd4
NC
31872017-04-10 Nick Clifton <nickc@redhat.com>
3188
3189 * config.bfd: Remove ns32k from obsolete list.
3190
6f9dbcd4
AM
31912017-04-10 Alan Modra <amodra@gmail.com>
3192
3193 PR 21287
3194 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
3195 (special_sections_i): Likewise for .init_array.
3196 (special_sections_p): Likewise for .preinit_array.
3197
8170f769
L
31982017-04-07 H.J. Lu <hongjiu.lu@intel.com>
3199
3200 PR ld/19579
3201 PR ld/21306
3202 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
3203 ELF_COMMON_DEF_P for common symbols.
3204 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3205 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
3206 * elflink.c (_bfd_elf_merge_symbol): Revert commits
3207 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
3208 07492f668d2173da7a2bda3707ff0985e0f460b6.
3209
49f4617b
PA
32102017-04-07 Pedro Alves <palves@redhat.com>
3211
3212 * opncls.c (bfd_get_debug_link_info): Rename to...
3213 (bfd_get_debug_link_info_1): ... this. Change type of second
3214 parameter to void pointer. Adjust.
3215 (bfd_get_debug_link_info): Reimplement on top of
3216 bfd_get_debug_link_info_1.
3217 (separate_debug_file_exists, separate_alt_debug_file_exists):
3218 Change type of second parameter to void pointer. Adjust.
3219 (get_func_type, check_func_type): Change type of second parameter
3220 to void pointer.
3221 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
3222 the callback functions instead of passing the address of a local.
3223 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
3224 find_separate_debug_file.
3225 (get_alt_debug_link_info_shim): Change type of second parameter to
3226 void pointer. Adjust.
3227 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
3228 find_separate_debug_file.
3229 (get_build_id_name, bfd_boolean check_build_id_file): Change type
3230 of second parameter to void pointer. Adjust.
3231 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
3232 pointer local to find_separate_debug_file.
3233
32342017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
1fd6d111
TG
3235
3236 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
3237 external symbols with a definition.
3238 (_bfd_coff_gc_mark_extra_sections): Fix typo.
3239
86abf93a
AM
32402017-04-07 Alan Modra <amodra@gmail.com>
3241
3242 * po/SRC-POTFILES.in: Regenerate.
3243
8dea77f0
AM
32442017-04-05 Alan Modra <amodra@gmail.com>
3245
3246 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
3247 reference counting.
3248
477bdd39
JT
32492017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
3250
3251 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
3252 numbers for DataDirectory entry indicies passed to
3253 add_data_entry().
3254
a91e1603
L
32552017-04-04 H.J. Lu <hongjiu.lu@intel.com>
3256
3257 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
3258 each GNU_MBIND section and align GNU_MBIND section to page size.
3259 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
3260 segment for each GNU_MBIND section.
3261 (_bfd_elf_init_private_section_data): Copy sh_info from input
3262 for GNU_MBIND section.
3263
b5292032
PD
32642017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
3265
3266 * elfnn-riscv.c (GP_NAME): Delete.
3267 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
3268 (_bfd_riscv_relax_lui): Likewise.
3269
ad32986f
NC
32702017-04-04 Nick Clifton <nickc@redhat.com>
3271
3272 PR binutils/21342
3273 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
3274 dereference.
3275 (bfd_elf_final_link): Only initialize the extended symbol index
3276 section if there are extended symbol tables to list.
3277
46bed679
L
32782017-04-03 H.J. Lu <hongjiu.lu@intel.com>
3279
3280 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
3281 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
3282 * configure.ac (elf): Add elf-properties.lo.
3283 * Makefile.in: Regenerated.
3284 * configure: Likewise.
3285 * elf-bfd.h (elf_property_kind): New.
3286 (elf_property): Likewise.
3287 (elf_property_list): Likewise.
3288 (elf_properties): Likewise.
3289 (_bfd_elf_parse_gnu_properties): Likewise.
3290 (_bfd_elf_get_property): Likewise.
3291 (_bfd_elf_link_setup_gnu_properties): Likewise.
3292 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
3293 and setup_gnu_properties.
3294 (elf_obj_tdata): Add properties.
3295 * elf-properties.c: New file.
3296 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
3297 (elf_i386_merge_gnu_properties): Likewise.
3298 (elf_backend_parse_gnu_properties): Likewise.
3299 (elf_backend_merge_gnu_properties): Likewise.
3300 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
3301 (elf_x86_64_merge_gnu_properties): Likewise.
3302 (elf_backend_parse_gnu_properties): Likewise.
3303 (elf_backend_merge_gnu_properties): Likewise.
3304 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
3305 (elf_backend_parse_gnu_properties): Likewise.
3306 (elf_backend_setup_gnu_properties): Likewise.
3307 (elfNN_bed): Add elf_backend_parse_gnu_properties,
3308 elf_backend_merge_gnu_properties and
3309 elf_backend_setup_gnu_properties.
3310
f96bd6c2
PC
33112017-03-30 Pip Cet <pipcet@gmail.com>
3312
3313 * elf32-wasm32.c: Add relocation code, two relocs.
3314 * reloc.c: Add wasm32 relocations.
3315 * libbfd.h: Regenerate.
3316 * bfd-in2.h: Regenerate.
3317 * bfd/po/bfd.pot: Regenerate.
3318
e643cb45
NC
33192017-03-29 Nick Clifton <nickc@redhat.com>
3320
3321 PR binutils/18025
3322 * coff-bfd.h (struct coff_section_data): Add new fields:
3323 saved_bias and bias.
3324 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
3325 computed for PE binaries.
3326 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
3327 missing abbrev.
3328
086554e8
HPN
33292017-03-28 Hans-Peter Nilsson <hp@axis.com>
3330
3331 PR ld/16044
3332 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
3333 to handle a local symbol with a hash-symbol-entry; without PLT.
3334 Add BFD_ASSERT for an incidental case with GOT entry present.
3335 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
3336 isn't forced-or-set local.
3337
a6be0538
PC
33382017-03-27 Pip Cet <pipcet@gmail.com>
3339
3340 * wasm-module.c: New file to support WebAssembly modules.
3341 * wasm-module.h: New file to support WebAssembly modules.
3342 * doc/webassembly.texi: Start documenting wasm-module.c.
3343 * config.bfd: Add wasm_vec.
3344 * targets.c: Likewise.
3345 * configure.ac: Likewise.
3346 * Makefile.am: Add entries for wasm-module.c.
3347 * Makefile.in: Regenerate.
3348 * configure: Regenerate.
3349 * po/SRC-POTFILES.in: Regenerate.
3350
79b1d3cb
PC
33512017-03-27 Pip Cet <pipcet@gmail.com>
3352
3353 * cpu-wasm32.c: New file to support wasm32 architecture.
3354 * elf32-wasm32.c: New file to support wasm32 architecture.
3355 * Makefile.am: Add wasm32 architecture.
3356 * archures.c: Likewise.
3357 * config.bfd: Likewise.
3358 * configure.ac: Likewise.
3359 * targets.c: Likewise.
3360 * Makefile.in: Regenerate.
3361 * bfd-in2.h: Regenerate.
3362 * configure: Regenerate.
3363 * po/SRC-POTFILES.in: Regenerate.
3364
aaed6f5b
AM
33652017-03-20 Alan Modra <amodra@gmail.com>
3366
3367 PR 21266
3368 * elf64-ppc.c (compare_symbols): Stabilize sort.
3369
82e66161
AM
33702017-03-18 Alan Modra <amodra@gmail.com>
3371
3372 * elf64-ppc.c (struct ppc_link_hash_table): Add
3373 local_ifunc_resolver and maybe_local_ifunc_resolver.
3374 (ppc_build_one_stub): Set flags on emitting dynamic
3375 relocation to ifunc.
3376 (ppc64_elf_relocate_section): Likewise.
3377 (ppc64_elf_finish_dynamic_symbol): Likewise.
3378 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
3379 local dynamic relocs to ifuncs.
3380 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
3381 local_ifunc_resolver and maybe_local_ifunc_resolver.
3382 (ppc_elf_relocate_section): Set flag on emitting dynamic
3383 relocation to ifuncs.
3384 (ppc_elf_finish_dynamic_symbol): Likewise.
3385 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
3386 dynamic relocs to ifuncs.
3387
f955cccf
NC
33882017-03-13 Nick Clifton <nickc@redhat.com>
3389
3390 PR binutils/21202
3391 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
3392 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
3393 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
3394 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
3395 * bfd-in2.h: Regenerate.
3396 * libbfd.h: Regenerate.
3397 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
3398 names.
3399 (IS_AARCH64_TLSDESC_RELOC): Likewise.
3400 (elfNN_aarch64_howto_table): Likewise.
3401 (aarch64_tls_transition_without_check): Likewise.
3402 (aarch64_reloc_got_type): Likewise.
3403 (elfNN_aarch64_final_link_relocate): Likewise.
3404 (elfNN_aarch64_tls_relax): Likewise.
3405 (elfNN_aarch64_relocate_section): Likewise.
3406 (elfNN_aarch64_gc_sweep_hook): Likewise.
3407 (elfNN_aarch64_check_relocs): Likewise.
3408 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3409 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3410
4aef7643
AM
34112017-03-11 Alan Modra <amodra@gmail.com>
3412
3413 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
3414 parameter is in fact used. Whitespace fixes.
3415 * elf64-ppc.c: Likewise.
3416
f03265d9
ST
34172017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
3418
3419 * rs6000-core.c (CORE_NEW): Simplify macro when
3420 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
3421
b1b07054
AM
34222017-03-07 Alan Modra <amodra@gmail.com>
3423
3424 PR 21224
3425 PR 20519
3426 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
3427 dyn_relocs check.
3428
2e0ce1c8
AM
34292017-03-05 Alan Modra <amodra@gmail.com>
3430
3431 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
3432 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
3433 (next_cie_fde_offset): New function.
3434 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
3435 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
3436 four bytes. Align CIEs to four or eight bytes depending on
3437 per_encoding_aligned8. Align FDEs according to their encoding.
3438 Pad last FDE to output section alignment.
3439 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
3440 assertion.
3441 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
3442 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
3443 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
3444
f98450c6
NC
34452017-03-02 Martin Bickel <binutils@ineranves.de>
3446
3447 PR ld/21212
3448 * elf.c (rewrite_elf_program_header): Do not issue a warning for
d20928fa 3449 empty segments which have a zero filesz, but a non-zero memsz.
f98450c6 3450
673cff9b
AM
34512017-03-02 Alan Modra <amodra@gmail.com>
3452
3453 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
3454
3de43e7b
AM
34552017-02-28 Alan Modra <amodra@gmail.com>
3456
3457 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
3458 (ppc64_elf_relocate_section): Likewise.
3459
4ef97a1b
AM
34602017-02-28 Alan Modra <amodra@gmail.com>
3461
3462 PR 20995
3463 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
3464 rather than elf32_nios2_hash_table or elf_hash_table.
3465 (create_got_section): Likewise.
3466 (nios2_elf32_finish_dynamic_symbol): Likewise.
3467 (nios2_elf32_adjust_dynamic_symbol): Likewise.
3468 (nios2_elf32_size_dynamic_sections): Likewise.
3469 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
3470 vars. Use htab equivalents directly instead. Don't create
3471 all dynamic sections on needing just the GOT. Use a goto
3472 rather than a fall-through with reloc test. Ensure
3473 htab->dynobj is set when making dynamic sreloc section.
3474 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
3475 equivalent directly instead. Don't segfault on looking for
3476 .dynamic when dynamic sections have not been created. Don't
3477 segfault on .got.plt being discarded.
3478 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
3479 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
3480 fixme and another not so relevant comment.
3481 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
3482 already set, set hash table dynobj on creating .sbss.
3483
7ba71655
AM
34842017-02-28 Alan Modra <amodra@gmail.com>
3485
3486 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
3487 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
3488 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
3489 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
3490 (ppc64_elf_relocate_section): Likewise.
3491 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
3492 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
3493 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
3494 * libbfd.h: Regenerate.
3495 * bfd-in2.h: Regenerate.
3496
afbf7e8e
AM
34972017-02-28 Alan Modra <amodra@gmail.com>
3498
3499 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
3500 dynamic .data.rel.ro read-only.
3501 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
3502 rather than section flags when deciding where copy reloc goes.
3503 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
3504 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
3505 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
3506 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
3507 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
3508 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
3509 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
3510 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
3511 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3512 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
3513 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
3514 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
3515 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
3516 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
3517 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
3518 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
3519 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
3520 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
3521 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
3522
0e392101
MR
35232017-02-28 Maciej W. Rozycki <macro@imgtec.com>
3524
3525 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
3526 `jalr $0, $25' instruction encoding.
3527
bd757ca7
NC
35282017-02-27 Nick Clifton <nickc@redhat.com>
3529
3530 PR ld/21180
3531 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
3532 generating a seg-fault when encountering a symbol that has been
3533 deleted by garbage collection.
3534
034fed0b
AM
35352017-02-25 Alan Modra <amodra@gmail.com>
3536
3537 * elf32-arc.c (struct dynamic_sections): Delete.
3538 (enum dyn_section_types): Delete.
3539 (dyn_section_names): Delete.
3540 (arc_create_dynamic_sections): Delete.
3541 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
3542 segfault on discarded .rela.plt section.
3543 (elf_arc_size_dynamic_sections): Formatting. Don't call
3544 arc_create_dynamic_sections. Don't allocate memory for sections
3545 handled by the generic linker. Correct code finding relocs in
3546 read-only sections. Set SEC_EXCLUDE on zero size .got,
3547 .got.plt, and .dynbss sections. Do set .interp for pies.
3548
d0f744f9
AW
35492017-02-24 Andrew Waterman <andrew@sifive.com>
3550
3551 * elfnn-riscv.c (GP_NAME): New macro.
3552 (riscv_global_pointer_value): Use it.
3553 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
3554 output section, consider only that section's alignment.
3555
5d58c733
MR
35562017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3557
3558 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
3559 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
3560 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
3561 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
3562
c1556ecd
MR
35632017-02-23 Maciej W. Rozycki <macro@imgtec.com>
3564
3565 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
3566 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
3567 or misaligned.
3568
5499c7c7
AM
35692017-02-23 Alan Modra <amodra@gmail.com>
3570
3571 PR 20744
3572 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
3573 16D relocations.
3574 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
3575 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
3576 relocs.
3577
902e9fc7
MR
35782017-02-22 Maciej W. Rozycki <macro@imgtec.com>
3579
3580 PR ld/20828
3581 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
3582 processing ahead of the call to `elf_gc_sweep_symbol'.
3583
758d96d8
NC
35842017-02-22 Nick Clifton <nickc@redhat.com>
3585
3586 PR binutils/21193
3587 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
3588 created section 4-byte alignment.
3589
6528b6eb
AM
35902017-02-22 Alan Modra <amodra@gmail.com>
3591
3592 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
3593 on .got or .plt output section being discarded by script.
3594 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
3595 vxworks splt temp.
3596
24f1a751
AM
35972017-02-21 Alan Modra <amodra@gmail.com>
3598
3599 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
3600 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
3601
64487780
AM
36022017-02-20 Alan Modra <amodra@gmail.com>
3603
3604 PR 21181
3605 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
3606 if DT_RELSZ/DT_RELASZ is zero.
3607
6438d1be
NC
36082017-02-17 Nick Clifton <nickc@redhat.com>
3609
3610 * compress.c (bfd_get_full_section_contents): Remember to reduce
3611 compressed size by the sizeof the compression header when
3612 decompressing the contents.
3613
4bc26c69
PA
36142017-02-17 Pedro Alves <palves@redhat.com>
3615
3616 * srec.c (Chunk): Rename to ...
3617 (_bfd_srec_len): ... this.
3618 (S3Forced): Rename to ...
3619 (_bfd_srec_forceS3): ... this.
3620 * objcopy.c: Adjust all references.
3621
7ec22e0f
PA
36222017-02-17 Pedro Alves <palves@redhat.com>
3623
3624 * archive.c (bsd_write_armap): Rename to ...
3625 (_bfd_bsd_write_armap): ... this.
3626 (coff_write_armap): Rename to ...
3627 (_bfd_coff_write_armap): ... this.
3628 * libbfd-in.h (bsd_write_armap): Rename to ...
3629 (_bfd_bsd_write_armap): ... this.
3630 (coff_write_armap): Rename to ...
3631 (_bfd_coff_write_armap): ... this.
3632 * aout-target.h, aout-tic30.c: Adjust all users.
3633 * libbfd.h: Regenerate.
3634
8c8402cc
PA
36352017-02-17 Pedro Alves <palves@redhat.com>
3636
3637 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
3638 (warn_deprecated): Rename to ...
3639 (_bfd_warn_deprecated): ... this.
3640 * libbfd.c (warn_deprecated): Rename to ...
3641 (_bfd_warn_deprecated): ... this.
3642 * bfd-in2.h: Regenerate.
3643
c7c3d11b
PA
36442017-02-17 Pedro Alves <palves@redhat.com>
3645
3646 * bfdio.c (real_ftell): Rename to ...
3647 (_bfd_real_ftell): ... this.
3648 (real_fseek): Rename to ...
3649 (_bfd_real_fseek): ... this.
3650 (real_fopen): Rename to ...
3651 (_bfd_real_fopen): ... this.
3652 * libbfd-in.h (real_ftell): Rename to ...
3653 (_bfd_real_ftell): ... this.
3654 (real_fseek): Rename to ...
3655 (_bfd_real_fseek): ... this.
3656 (real_fopen): Rename to ...
3657 (_bfd_real_fopen): ... this.
3658 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
3659 * libbfd.h: Regenerate.
3660
4265548c
PA
36612017-02-17 Pedro Alves <palves@redhat.com>
3662
3663 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
3664 * libbfd.c (read_unsigned_leb128): Rename to ...
3665 (_bfd_read_unsigned_leb128): ... this.
3666 (read_signed_leb128): Rename to ...
3667 (_bfd_read_signed_leb128): ... this.
3668 (safe_read_leb128): Rename to ...
3669 (_bfd_safe_read_leb128): ... this.
3670 * libbfd-in.h (read_unsigned_leb128): Rename to ...
3671 (_bfd_read_unsigned_leb128): ... this.
3672 (read_signed_leb128): Rename to ...
3673 (_bfd_read_signed_leb128): ... this.
3674 (safe_read_leb128): Rename to ...
3675 (_bfd_safe_read_leb128): ... this.
3676 * libbfd.h: Renegerate.
3677
3239a423
AB
36782017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3679
3680 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
3681 before trying to fine matching file and line information.
3682
90ed9b8b
AB
36832017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
3684
3685 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
3686 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
3687 not match current bfd, then reload debug information. Record bfd
3688 we're loading debug info for in the stash. If we have debug
3689 informatin in the cache then perform section placement before
3690 returning.
3691
a8c75b76
AM
36922017-02-16 Alan Modra <amodra@gmail.com>
3693
3694 PR 21000
3695 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
3696 * elfxx-target.h (elf_backend_no_page_alias): Define.
3697 (elfNN_bed): Init new field.
3698 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
3699 ensure PT_LOAD segment starts on a new page.
3700 * elf32-hppa.c (elf_backend_no_page_alias): Define.
3701
247d6c4c
AM
37022017-02-16 Alan Modra <amodra@gmail.com>
3703
3704 PR 21132
3705 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
3706 if pic.
3707
90571206
JW
37082017-02-16 Jiong Wang <jiong.wang@arm.com>
3709
3710 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
3711 * bfd-in2.h: Regenerated.
3712
2a568401
L
37132017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3714
3715 PR ld/21168
3716 * elf32-i386.c (elf_i386_relocate_section): Allow
3717 "lea foo@GOT, %reg" in PIC.
3718
a5def14f
L
37192017-02-15 H.J. Lu <hongjiu.lu@intel.com>
3720
3721 PR ld/20244
3722 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
3723 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
3724 error against local IFUNC symbol without a base register for
3725 PIC.
3726
174d0a74
MR
37272017-02-15 Maciej W. Rozycki <macro@imgtec.com>
3728
3729 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
3730 `%P: %H:' with `info->callbacks->einfo'.
3731 (ppc_elf_relocate_section): Likewise.
3732 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
3733 (ppc64_elf_edit_toc): Likewise.
3734 (ppc64_elf_relocate_section): Likewise.
3735
e278ae05
AM
37362017-02-14 Alan Modra <amodra@gmail.com>
3737
3738 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
3739 --gc-keep-exported, and test versioned field of sym rather than
3740 looking for @ in name.
3741
10ddfe62
PD
37422017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
3743
3744 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
3745 __global_pointer$.
3746
d11135f5
NC
37472017-02-13 Nick Clifton <nickc@redhat.com>
3748
3749 PR binutils/21151
3750 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
3751 unit length field.
3752
cc162427
AW
37532017-02-07 Andrew Waterman <andrew@sifive.com>
3754
3755 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
3756 entry size if PLT header is written.
3757
3d044c0c
SL
37582017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
3759
3760 Fix sparc64 dynamic relocation processing to use the dynamic
3761 symbol count.
3762 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
3763 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
3764 should be used.
3765
1b7e3d2f
NC
37662017-02-03 Nick Clifton <nickc@redhat.com>
3767
3768 PR 21096
3769 * coffcode.h (coff_write_object_contents): Enlarge size of
3770 s_name_buf in order to avoid compile time warning about possible
3771 integer truncation.
3772 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
3773 32-bits of insn value before printing into buffer.
3774
e17b0c35
MR
37752017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3776
3777 * elfxx-mips.c (mips_elf_hash_sort_data): Add
3778 `max_local_dynindx'.
3779 (mips_elf_sort_hash_table): Handle it.
3780 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
3781 symbols bump up `max_local_dynindx' rather than
3782 `max_non_got_dynindx'.
3783
55f8b9d2
MR
37842017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3785
3786 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
3787 `min_got_dynindx', `max_unref_got_dynindx' and
3788 `max_non_got_dynindx' members to the `bfd_size_type' data type.
3789 (mips_elf_sort_hash_table): Adjust accordingly.
3790
0f8c4b60
MR
37912017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3792
3793 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
3794 to access the hash table.
3795
17a80fa8
MR
37962017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3797
3798 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
3799 non-NULL `htab' to the beginning.
3800
8f56d4fd
MR
38012017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3802
3803 * elflink.c (elf_gc_sweep): Wrap overlong line.
3804
8b10b0b3
MR
38052017-01-30 Maciej W. Rozycki <macro@imgtec.com>
3806
3807 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
3808 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
3809 * elfxx-mips.c (mips_elf_link_hash_table): Add
3810 `ignore_branch_isa' member.
3811 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
3812 in branch relocation calculation as an error if
3813 `ignore_branch_isa' has been set.
3814 (_bfd_mips_elf_insn32): Rename to...
3815 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
3816 parameter to `insn32' and add an `ignore_branch_isa' parameter.
3817 Handle the new parameter.
3818
1fbd05e1
HPN
38192017-01-27 Hans-Peter Nilsson <hp@axis.com>
3820
22d9a0de
HPN
3821 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
3822 local variable dynobj.
3823
1fbd05e1
HPN
3824 PR ld/20995
3825 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
3826 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
3827 executable from read-only sections into sdynrelro.
3828 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
3829 dynamic relocs in sdynrelro.
3830 (elf_backend_want_dynrelro): Define.
3831
4a7324e1
SH
38322017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3833
3834 * config.bfd (*-*-rtemsaout*): Mark as removed.
3835
c75b4ebd
SH
38362017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3837
3838 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
3839 (arm-*-rtems*): Move to (arm*-*-eabi*).
3840 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
3841 (m68-*-rtems*): Move to (m68*-*-elf*).
3842
850d84f6
SH
38432017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3844
3845 * config.bfd (*-*-rtemscoff*): Mark as removed.
3846
b531344c
MR
38472017-01-24 Maciej W. Rozycki <macro@imgtec.com>
3848
3849 PR ld/20828
3850 * elflink.c (bfd_elf_record_link_assignment): Revert last
3851 change and don't ever clear `forced_local'. Set `mark'
3852 unconditionally.
3853 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
3854 file.
3855 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
3856 (bfd_elf_size_dynamic_sections): ... here.
3857 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
3858 and set `mark' instead in `__tls_get_addr_opt' processing.
3859 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
3860
f0158f44
AM
38612017-01-24 Alan Modra <amodra@gmail.com>
3862
3863 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
3864 where dynamic relocs are preferable. Allow ifunc too.
3865 (ensure_undefweak_dynamic): New function.
3866 (allocate_dynrelocs): Use it here. Move plt handling last and
3867 don't make symbols dynamic, simplifying loop. Only make undef
3868 weak symbols with GOT entries dynamic. Correct condition
3869 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
3870 comments. Remove goto.
3871 (ppc_elf_relocate_section): Correct test for using dynamic
3872 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3873 to suit. Set up explicit tls_index entries and implicit GOT
3874 tls_index entries resolvable at link time for
3875 __tls_get_addr_opt. Simplify test to clear mem for prelink.
3876 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
3877 (ensure_undefweak_dynamic): New function.
3878 (allocate_dynrelocs): Use it here. Only make undef weak symbols
3879 with GOT entries dynamic. Remove unnecessary test of
3880 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
3881 (ppc64_elf_relocate_section): Correct test for using dynamic
3882 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3883 to suit. Set up explicit tls_index entries and implicit GOT
3884 tls_index entries resolvable at link time for __tls_get_addr_opt.
3885 Simplify expression to clear mem for prelink.
3886
2d0ca824
YN
38872017-01-23 Yury Norov <ynorov@caviumnetworks.com>
3888
3889 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
3890
7f784814
JW
38912017-01-20 Jiong Wang <jiong.wang@arm.com>
3892
3893 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
3894 (elf_backend_hash_symbol): Define.
3895
81ff47b3
MR
38962017-01-18 Maciej W. Rozycki <macro@imgtec.com>
3897
3898 PR ld/20828
3899 * elflink.c (bfd_elf_record_link_assignment): Clear any
3900 `forced_local' marking for DSO symbols that are not being
3901 provided.
3902
640d6bfd
KLC
39032017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3904
3905 * elfnn-riscv.c (riscv_elf_object_p): New function.
3906
8361ed4d
L
39072017-01-12 H.J. Lu <hongjiu.lu@intel.com>
3908
3909 PR ld/21038
3910 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
3911 plt_bnd_eh_frame.
3912 (elf_x86_64_check_relocs): Create .eh_frame section for the
3913 .plt.bnd section.
3914 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3915 .eh_frame section for the .plt.bnd section.
3916 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3917 for the .plt.bnd section.
3918
2425a30e
NC
39192017-01-12 Nick Clifton <nickc@redhat.com>
3920
3921 PR binutils/20876
3922 * opncls.c (find_separate_debug_file): Add include_dirs
3923 parameter. Only include the directory part of the bfd's filename
3924 in search paths if include_dirs is true. Add a couple of extra
3925 locations for looking for debug files.
3926 ( bfd_follow_gnu_debuglink): Update invocation of
3927 find_separate_debug_file.
3928 (bfd_follow_gnu_debugaltlink): Likewise.
3929 (get_build_id): New function: Finds the build-id of the given bfd.
3930 (get_build_id_name): New function: Computes the name of the
3931 separate debug info file for a bfd, based upon its build-id.
3932 (check_build_id_file): New function: Checks to see if a separate
3933 debug info file exists at the given location, and that its
3934 build-id matches that of the original bfd.
3935 (bfd_follow_build_id_debuglink): New function: Finds a separate
3936 debug info file for a given bfd by using the build-id method.
3937 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
3938 method of locating a separate debug info file before using the
3939 debuglink method.
3940 * bfd-in2.h: Regenerate.
3941
9e659176
L
39422017-01-11 H.J. Lu <hongjiu.lu@intel.com>
3943
3944 PR ld/21038
3945 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
3946 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
3947 elf_x86_64_eh_frame_plt_got.
3948 (elf_x86_64_size_dynamic_sections): Get unwind info from
3949 elf_x86_64_bnd_arch_bed for the BND PLT.
3950
f2e2d2f5
JS
39512017-01-11 Jeremy Soller <jackpot51@gmail.com>
3952
3953 * config.bfd: Add entries for i686-redox and x86_64-redox.
3954
52b232b3
L
39552017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3956
3957 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
3958 to 4 bytes.
3959 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
3960 .eh_frame section to 4 bytes for x32.
3961 (elf_x86_64_check_relocs): Likewise.
3962
fff53dae
L
39632017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3964
3965 PR ld/20830
3966 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
3967 (PLT_GOT_FDE_LENGTH): Likewise.
3968 (elf_i386_plt_layout): Add eh_frame_plt_got and
3969 eh_frame_plt_got_size.
3970 (elf_i386_plt): Updated.
3971 (elf_i386_link_hash_table): Add plt_got_eh_frame.
3972 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
3973 (elf_i386_size_dynamic_sections): Allocate and initialize
3974 .eh_frame section for .plt.got.
3975 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
3976 .plt.got.
3977 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
3978 eh_frame_plt_got_size.
3979 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
3980 (PLT_GOT_FDE_LENGTH): Likewise.
3981 (elf_x86_64_backend_data): Add eh_frame_plt_got and
3982 eh_frame_plt_got_size.
3983 (elf_x86_64_arch_bed): Updated.
3984 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
3985 eh_frame_plt_got_size.
3986 (elf_x86_64_nacl_arch_bed): Likewise.
3987 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
3988 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
3989 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3990 .eh_frame section for .plt.got.
3991 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3992 for .plt.got.
3993
f129e49f
L
39942017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3995
3996 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
3997 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
3998
cd6581da
NC
39992017-01-09 Nick Clifton <nickc@redhat.com>
4000
4001 * dwarf2.c (lookup_address_in_function_table): Return early if
4002 there are no functions in the given comp unit, or if the high
4003 address of the last function in the comp unit is less than the
4004 desired address.
4005
98f02962
NC
40062017-01-09 Nick Clifton <nickc@redhat.com>
4007
4008 PR binutils/21013
4009 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
4010 message if there are too many symbols to load.
4011
ae4fda66
JC
40122017-01-04 James Clarke <jrtc27@jrtc27.com>
4013
4014 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
4015 if relocs are cached.
4016
de1010f4
RF
40172017-01-03 Rich Felker <bugdal@aerifal.cx>
4018
4019 PR ld/21017
4020 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
4021 for R_MICROBLAZE_GOTOFF_64.
4022
09fe2662
NC
40232017-01-03 Nick Clifton <nickc@redhat.com>
4024
4025 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
4026 warning about using a possibly uninitialised variable.
4027
595e0a47
AM
40282017-01-02 Alan Modra <amodra@gmail.com>
4029
4030 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
4031 (allocate_plt_static, allocate_dynrelocs): Use it.
4032
7bd9df3b
AM
40332017-01-02 Alan Modra <amodra@gmail.com>
4034
4035 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
4036 .PARISC.unwind section.
4037
5b86074c
AM
40382017-01-02 Alan Modra <amodra@gmail.com>
4039
4040 PR ld/20989
4041 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
4042 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
4043 indirect to GOT pointer relative code edit.
4044
2571583a
AM
40452017-01-02 Alan Modra <amodra@gmail.com>
4046
4047 Update year range in copyright notice of all files.
4048
5c1ad6b5 4049For older changes see ChangeLog-2016
3499769a 4050\f
5c1ad6b5 4051Copyright (C) 2017 Free Software Foundation, Inc.
3499769a
AM
4052
4053Copying and distribution of this file, with or without modification,
4054are permitted in any medium without royalty provided the copyright
4055notice and this notice are preserved.
4056
4057Local Variables:
4058mode: change-log
4059left-margin: 8
4060fill-column: 74
4061version-control: never
4062End: