PowerPC64 __tls_get_addr sequence optimization
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
b9f04fe0
AM
12017-08-30 Alan Modra <amodra@gmail.com>
2
3 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
4 __tls_get_addr call sequences to LE, don't move the addi down
5 to the nop. Replace the bl with addi and leave the nop alone.
6
5f0f0847
L
72017-08-29 H.J. Lu <hongjiu.lu@intel.com>
8
9 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
10 Re-indent.
11 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
12 Likewise.
13 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
14
823cb067
L
152017-08-29 H.J. Lu <hongjiu.lu@intel.com>
16
17 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
18 return.
19 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
20
37c0b6ee
L
212017-08-29 H.J. Lu <hongjiu.lu@intel.com>
22
23 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
24 sections before checking dynamic relocations and free invalid
25 PLT section contents.
26 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
27
0fb0a767
L
282017-08-28 H.J. Lu <hongjiu.lu@intel.com>
29
30 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
31 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
32
90efb642
L
332017-08-28 H.J. Lu <hongjiu.lu@intel.com>
34
35 PR binutils/22018
36 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
37 PLT section size.
38 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
39
596dc58f
L
402017-08-27 H.J. Lu <hongjiu.lu@intel.com>
41
42 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
43 def_protected.
44 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
45
a5b4ee94
L
462017-08-26 H.J. Lu <hongjiu.lu@intel.com>
47
48 PR ld/21997
49 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
50 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
51 Add a has_no_copy_on_protected bitfield.
52 (elf_has_no_copy_on_protected): New.
53 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
54 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
55 (elf_merge_gnu_property_list): Likewise.
56 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
57 to FALSE for elf_has_no_copy_on_protected.
58 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
59 (elf_i386_link_hash_entry): Add def_protected.
60 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
61 when checking info->nocopyreloc.
62 (elf_i386_link_setup_gnu_properties): Don't set
63 extern_protected_data here.
64 (elf_i386_merge_symbol_attribute): New function.
65 (elf_backend_merge_symbol_attribute): New.
66 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
67 (elf_x86_64_link_hash_entry): Add def_protected.
68 (elf_x86_64_need_pic): Report protected symbol for def_protected.
69 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
70 when checking info->nocopyreloc.
71 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
72 relocation run-time overflow and unresolvable R_X86_64_32S
73 relocation against protected data symbol defined in shared object
74 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
75 (elf_x86_64_link_setup_gnu_properties): Don't set
76 extern_protected_data here.
77 (elf_x86_64_merge_symbol_attribute): New function.
78 (elf_backend_merge_symbol_attribute): New.
79
7c8bbca5
AM
802017-08-26 Alan Modra <amodra@gmail.com>
81
82 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
83 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
84 (ppc_elf_relocate_section): Comment fix.
85 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
86 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
87 Support dynamic relocs for TPREL16 when non-pic too.
88 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
89 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
90 when non-pic too.
91
5fdda9d6
L
922017-08-25 H.J. Lu <hongjiu.lu@intel.com>
93
94 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
95 "symbol" in comments.
96 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
97
7073b5b9
L
982017-08-24 H.J. Lu <hongjiu.lu@intel.com>
99
100 PR ld/22001
101 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
102 R_X86_64_PC32 relocation run-time overflow and unresolvable
103 R_X86_64_32S relocation with -z nocopyreloc.
104
34bb2571
L
1052017-08-24 H.J. Lu <hongjiu.lu@intel.com>
106
107 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
108 Undefined symbols may not have a type.
109 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
110
aab921ad
L
1112017-08-23 H.J. Lu <hongjiu.lu@intel.com>
112
113 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
114 bfd_link_info. Report shared, PIE or PDE object based on
115 bfd_link_info.
116 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
117 (elf_x86_64_relocate_section): Likewise.
118
b1bb697e
L
1192017-08-23 H.J. Lu <hongjiu.lu@intel.com>
120
121 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
122 for function symbols.
123 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
124
73784fa5
L
1252017-08-23 H.J. Lu <hongjiu.lu@intel.com>
126
127 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
128 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
129 is set on any input relocatable file.
130 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
131
46434633
AM
1322017-08-23 Alan Modra <amodra@gmail.com>
133
134 PR 21988
135 * elf64-ppc.c (ensure_undef_dynamic): Rename from
136 ensure_undefweak_dynamic. Handle undefined too.
137 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
138 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
139 (allocate_dynrelocs): Discard undefined non-default visibility
140 relocs first. Make undefined syms dynamic. Tidy goto.
141
487b6440
AM
1422017-08-21 Alan Modra <amodra@gmail.com>
143 H.J. Lu <hongjiu.lu@intel.com>
144
145 PR ld/21964
146 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
147 * elflink.c (bfd_elf_define_start_stop): Rewrite.
148
284d826d
HPN
1492017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
150
151 PR ld/20125
152 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
153 undefined weak symbols.
154
de259397
NC
1552017-08-18 Nick Clifton <nickc@redhat.com>
156
157 PR binutils/21962
158 * tekhex.c (getsym): Fix check for source pointer walking off the
159 end of the input buffer.
160
545bc2b3
SN
1612017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
162
163 PR ld/18808
164 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
165 relocations in debug sections, change abort to _bfd_error_handler.
166
0c54f692
NC
1672017-08-14 Nick Clifton <nickc@redhat.com>
168
169 PR 21957
170 * elf.c (setup_group): Check for an empty or very small group
171 section.
172 * po/bfd.pot: Regenerate.
173
79a94a2a
AM
1742017-08-14 Alan Modra <amodra@gmail.com>
175
176 PR 21441
177 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
178 alignment padding here.
179 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
180 in a reverse pass over sections.
181
98c5dfc9
L
1822017-08-11 H.J. Lu <hongjiu.lu@intel.com>
183
184 PR binutils/21943
185 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
186 for @plt suffixes first.
187 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
188
24d3e51b
NC
1892017-08-08 Nick Clifton <nickc@redhat.com>
190
191 PR 21916
192 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
193 small section lengths.
194 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
195 table.
196 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
197 there is enough data present in the note.
198
206c9c79
AM
1992017-08-08 Alan Modra <amodra@gmail.com>
200
201 PR 21017
202 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
203 got.refcount for GOTOFF relocs, just create .got section.
204
2980ccad
L
2052017-08-07 H.J. Lu <hongjiu.lu@intel.com>
206
207 * elflink.c (elf_link_add_object_symbols): Move common symbol
208 check after bed->common_definition.
209
b3293efa
AM
2102017-08-07 Alan Modra <amodra@gmail.com>
211
212 PR 21910
213 * elflink.c (bfd_elf_final_link): Don't segfault when sections
214 needed to define various dynamic tags have been discarded.
215
b7a18930
NC
2162017-08-07 Nick Clifton <nickc@redhat.com>
217
218 PR 21884
219 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
220 has not been set then use the bfd returned by
221 _bfd_elf_link_setup_gnu_properties. If that is null then search
222 through all the input bfds selecting the first normal, ELF format
223 one.
224 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
225
1d4af308
L
2262017-08-06 H.J. Lu <hongjiu.lu@intel.com>
227
228 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
229 to 1 bit.
230 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
231 (elf_i386_check_tls_transition): Check tls_get_addr directly.
232 (elf_i386_convert_load_reloc): Update tls_get_addr check.
233 (elf_i386_link_check_relocs): New function.
234 (bfd_elf32_bfd_link_check_relocs): New.
235 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
236 to 1 bit.
237 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
238 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
239 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
240 (elf_x86_64_link_check_relocs): New function.
241 (bfd_elf64_bfd_link_check_relocs): New.
242 (bfd_elf32_bfd_link_check_relocs): Likewise.
243
a4819f54
L
2442017-08-06 H.J. Lu <hongjiu.lu@intel.com>
245
246 PR ld/21903:
247 * elflink.c (elf_link_add_object_symbols): Treat common symbol
248 as undefined for --no-define-common.
249
55ef6584
AM
2502017-08-05 Alan Modra <amodra@gmail.com>
251
252 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
253 hppa_link_hash_table.
254
d84ed528
MF
2552017-08-02 Max Filippov <jcmvbkbc@gmail.com>
256
257 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
258 entries for sysregs with negative indices.
259
1ef692ea
AK
2602017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
261
262 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
263 isn't the S/390 specific elf data.
264 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
265
57593436
KLC
2662017-07-31 Kuan-Lin Chen <rufus@andestech.com>
267
268 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
269 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
270 [R_RISCV_ADD16]: Likewise.
271 [R_RISCV_ADD32]: Likewise.
272 [R_RISCV_ADD64]: Likewise.
273 [R_RISCV_SUB6]: Likewise.
274 [R_RISCV_SUB8]: Likewise.
275 [R_RISCV_SUB16]: Likewise.
276 [R_RISCV_SUB32]: Likewise.
277 [R_RISCV_SUB64]: Likewise.
278
d44c746a
AM
2792017-07-31 Alan Modra <amodra@gmail.com>
280
281 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
282 without ld.so checks.
283
8b5f1ed8
AM
2842017-07-29 Alan Modra <amodra@gmail.com>
285
286 PR 21847
287 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
288 (ppc64_elf_merge_symbol): Set non_zero_localentry.
289 (is_elfv2_localentry0): Test non_zero_localentry.
290 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
291
894dde0b
AK
2922017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
293
294 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
295 pointer check for htab->elf.irelplt.
296 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
297
8bdf0be1
NC
2982017-07-27 Nick Clifton <nickc@redhat.com>
299
300 PR 21840
301 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
302 size is -1.
303 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
304 with error return.
305 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
306 are NULL.
307 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
308 of end pointer.
309 (evax_bfd_print_emh): Check for invalid string lengths.
310
c26bb067
NC
3112017-07-25 Nick Clifton <nickc@redhat.com>
312
313 * po/fr.po: Updated French translation.
314
cfe7b9bd
BG
3152017-07-25 Benjamin Green <bengreen5mx@gmail.com>
316
317 PR 21824
318 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
319 16-bit absolute branches into 10-bit pc-relative branches on the
320 MSP430 as well as the MSP430X.
321
d4aaa2a0
AM
3222017-07-25 Alan Modra <amodra@gmail.com>
323
324 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
325 (stub_eh_frame_size): New function.
326 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
327 (group_sections): Init group tls_get_addr_opt_bctrl.
328 (ppc64_elf_size_stubs): Update sizing and initialization of
329 .eh_frame. Iteration over stubs via group list.
330 (ppc64_elf_build_stubs): Iterate over stubs via group list.
331 (ppc64_elf_finish_dynamic_sections): Update finalization of
332 .eh_frame.
333
ca4cf9b9
NC
3342017-07-24 Nick Clifton <nickc@redhat.com>
335
336 PR 21813
337 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
338 of the relocs to the canonicalize_one_reloc routine.
339 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
340 for the _bfd_mach_o_canonicalize_one_reloc field.
341 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
342 res_base parameter. Use to check for corrupt pair relocs.
343 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
344 Likewise.
345 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
346 Likewise.
347 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
348 Likewise.
349
350 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
351 enough data in the record before attempting to parse it.
352 (_bfd_vms_slurp_eeom): Likewise.
353
354 (_bfd_vms_slurp_egsd): Check for an invalid section index.
355 (image_set_ptr): Likewise.
356 (alpha_vms_slurp_relocs): Likewise.
357
8a2df5e2
NC
358 (alpha_vms_object_p): Check for a truncated record.
359
47aeb64c
NC
3602017-07-24 Nick Clifton <nickc@redhat.com>
361
362 PR 21803
363 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
364 an unrecognized reloc and sets the bfd_error value.
365 * libbfd.h: Regenerate.
366 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
367 function.
368 * elf32-i386.c (elf_i386_relocate_section): Likewise.
369 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
370 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
371 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
372 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
373
15a3a14f
AM
3742017-07-23 Alan Modra <amodra@gmail.com>
375
376 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
377 restore of LR.
378
f2e6a843
SN
3792017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
380
381 PR ld/18841
382 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
383 reloc_class_ifunc for ifunc symbols.
384
909e4e71
NC
3852017-07-19 Nick Clifton <nickc@redhat.com>
386
387 PR 21787
388 * archive.c (bfd_generic_archive_p): If the bfd does not have the
389 correct magic bytes at the start, set the error to wrong format
390 and clear the format selector before returning NULL.
391
29866fa1
NC
3922017-07-19 Nick Clifton <nickc@redhat.com>
393
394 PR 21786
395 * coff-rs6000.c (_bfd_strntol): New function.
396 (_bfd_strntoll): New function.
397 (GET_VALUE_IN_FIELD): New macro.
398 (EQ_VALUE_IN_FIELD): new macro.
399 (_bfd_xcoff_slurp_armap): Use new macros.
400 (_bfd_xcoff_archive_p): Likewise.
401 (_bfd_xcoff_read_ar_hdr): Likewise.
402 (_bfd_xcoff_openr_next_archived_file): Likewise.
403 (_bfd_xcoff_stat_arch_elt): Likewise.
6c4e7b6b
NC
404 * coff64-rs6000.c (_bfd_strntol): New function.
405 (_bfd_strntoll): New function.
406 (GET_VALUE_IN_FIELD): New macro.
407 (xcoff64_slurp_armap): Use new macros.
29866fa1 408
684d5a10
JEM
4092017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
410 John Eric Martin <John.Martin@emmicro-us.com>
411
412 * bfd-in2.h: Regenerate.
413 * libbfd.h: Regenerate.
414 * elf32-arc.c (JLI): Define.
415 * reloc.c: Add JLI relocations.
416
de194d85
YC
4172017-07-18 Nick Clifton <nickc@redhat.com>
418
419 PR 21775
420 * coff-sh.c: Fix spelling typos.
421 * compress.c: Likewise.
422 * cpu-pdp11.c: Likewise.
423 * ecofflink.c: Likewise.
424 * elf-m10300.c: Likewise.
425 * elf.c: Likewise.
426 * elf32-arm.c: Likewise.
427 * elf32-m68k.c: Likewise.
428 * elf32-nds32.c: Likewise.
429 * elf32-ppc.c: Likewise.
430 * elf32-sh.c: Likewise.
431 * elf32-v850.c: Likewise.
432 * elf64-ppc.c: Likewise.
433 * elf64-x86-64.c: Likewise.
434 * elflink.c: Likewise.
435 * elfnn-aarch64.c: Likewise.
436 * elfxx-mips.c: Likewise.
437 * som.c: Likewise.
438 * sunos.c: Likewise.
439 * vms-alpha.c: Likewise.
440 * xcofflink.c: Likewise.
441
e4e21d9e
NC
4422017-07-18 Nick Clifton <nickc@redhat.com>
443
444 PR binutils/21781
445 * coffcode.h (handle_COMDAT): Replace abort with an error message
446 and return.
447
8e85f840
L
4482017-07-17 H.J. Lu <hongjiu.lu@intel.com>
449
450 PR ld/21782
451 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
452 to shared library.
453
dd57c19c
L
4542017-07-17 H.J. Lu <hongjiu.lu@intel.com>
455
456 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
457
676ee2b5
AM
4582017-07-16 Alan Modra <amodra@gmail.com>
459
460 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
461 __tls_index GOT entries when using __tls_get_addr_opt stub.
462 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
463
429d795d
AM
4642017-07-12 Alan Modra <amodra@gmail.com>
465
466 * po/es.po: Update from translationproject.org/latest/bfd/.
467 * po/fi.po: Likewise.
468 * po/fr.po: Likewise.
469 * po/id.po: Likewise.
470 * po/ja.po: Likewise.
471 * po/ro.po: Likewise.
472 * po/ru.po: Likewise.
473 * po/sr.po: Likewise.
474 * po/sv.po: Likewise.
475 * po/tr.po: Likewise.
476 * po/uk.po: Likewise.
477 * po/vi.po: Likewise.
478 * po/zh_CN.po: Likewise.
479 * po/hr.po: New file from translationproject.org.
480 * configure.ac (ALL_LINGUAS): Add hr. Sort.
481 * configure: Regenerate.
482
0bae9e9e
NC
4832017-07-12 Nick Clifton <nickc@redhat.com>
484
485 Fix compile time warnings using gcc 7.1.1.
486 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
487 plt_name buffer.
488 (elf_xtensa_get_gotplt_section): Increase length of got_name
489 buffer.
490 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
491 default return of FALSE.
492 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
493 default return of FALSE.
494
d42c267e
AM
4952017-07-12 Alan Modra <amodra@gmail.com>
496
497 * binary.c (binary_set_section_contents): Don't print filepos in
498 error message.
499 (coff_write_object_contents): Cast size_t for error message.
500 (coff_slurp_line_table): Don't use bfd_vma symndx.
501 (coff_slurp_reloc_table): Remove unneeded cast.
502 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
503 error message.
504 (find_abstract_instance_name): Likewise.
505 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
506 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
507 (elf32_arm_check_relocs): Make r_symndx an int.
508 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
509 format string.
510 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
511 message arg.
512 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
513 error message.
514 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
515 * elf32-s390.c (elf_s390_check_relocs): Likewise.
516 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
517 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
518 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
519 * elf64-s390.c (elf_s390_check_relocs): Likewise.
520 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
521 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
522 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
523 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
524 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
525 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
526 and use %lu for error message.
527 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
528 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
529 error message.
530
531 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
532 in error message.
533 (elf32_arm_final_link_relocate): Likewise.
534 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
535 * coffcode.h (styp_to_sec_flags): Likewise.
536 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
537 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
538 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
539 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
540 (elf32_bfin_merge_private_bfd_data): Likewise.
541 * elf32-cris.c (cris_elf_relocate_section): Likewise.
542 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
543 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
544 (i370_elf_relocate_section): Likewise.
545 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
546 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
547 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
548 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
549 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
550 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
551 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
552 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
553 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
554 * ieee.c (ieee_write_id, read_id): Likewise.
555 * mach-o.c (bfd_mach_o_write_contents): Likewise.
556 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
557 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
558 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
559 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
560 * stabs.c (_bfd_link_section_stabs): Likewise.
561
562 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
563 format.
564 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
565 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
566 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
567 * coff-sh.c (sh_relax_section): Likewise.
568 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
569 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
570 * coffcode.h (coff_slurp_reloc_table): Likewise.
571 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
572 (_bfd_coff_read_string_table): Likewise.
573 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
574 * compress.c (bfd_get_full_section_contents): Likewise.
575 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
576 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
577 * elf.c (bfd_elf_string_from_elf_section): Likewise.
578 * elf32-arc.c (arc_special_overflow_checks): Likewise.
579 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
580 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
581 (elf32_arm_write_section): Likewise.
582 * elf32-bfin.c (bfin_relocate_section): Likewise.
583 (bfinfdpic_relocate_section): Likewise.
584 * elf32-hppa.c (hppa_build_one_stub): Likewise.
585 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
586 * elf32-i386.c (elf_i386_tls_transition): Likewise.
587 (elf_i386_relocate_section): Likewise.
588 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
589 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
590 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
591 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
592 * elf32-metag.c (elf_metag_relocate_section): Likewise.
593 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
594 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
595 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
596 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
597 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
598 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
599 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
600 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
601 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
602 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
603 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
604 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
605 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
606 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
607 * elf32-sh.c (sh_elf_relax_section): Likewise.
608 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
609 (sh_elf_relocate_section): Likewise.
610 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
611 * elf32-spu.c (spu_elf_relocate_section): Likewise.
612 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
613 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
614 * elf32-v850.c (v850_elf_relax_section): Likewise.
615 * elf32-vax.c (elf_vax_check_relocs): Likewise.
616 (elf_vax_relocate_section): Likewise.
617 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
618 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
619 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
620 (do_fix_for_relocatable_link): Likewise.
621 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
622 (elf64_alpha_relax_with_lituse): Likewise.
623 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
624 (elf_hppa_final_link_relocate): Likewise.
625 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
626 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
627 (elf64_vms_link_add_object_symbols): Likewise.
628 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
629 (mmix_final_link_relocate): Likewise.
630 * elf64-s390.c (invalid_tls_insn): Likewise.
631 (elf_s390_relocate_section): Likewise.
632 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
633 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
634 (elf_x86_64_relocate_section): Likewise.
635 * elfcode.h (elf_slurp_symbol_table): Likewise.
636 * elfcore.h (elf_core_file_p): Likewise.
637 * elflink.c (elf_link_read_relocs_from_section): Likewise.
638 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
639 (elfNN_aarch64_relocate_section): Likewise.
640 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
641 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
642 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
643 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
644 (_bfd_mips_elf_relocate_section): Likewise.
645 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
646 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
647 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
648 * ieee.c (ieee_slurp_external_symbols): Likewise.
649 * ihex.c (ihex_write_object_content): Likewise.
650 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
651 * merge.c (_bfd_merged_section_offset): Likewise.
652 * mmo.c (mmo_write_loc_chunk): Likewise.
653 (mmo_write_object_contents): Likewise.
654 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
655 * stabs.c (_bfd_link_section_stabs): Likewise.
656 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
657
e3fbc3da
AM
6582017-07-11 Alan Modra <amodra@gmail.com>
659
660 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
661
2c4d9cbe
AM
6622017-07-11 Alan Modra <amodra@gmail.com>
663
664 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
665 instruction" error using _bfd_error_handler, not einfo.
666
adce5b39
NC
6672017-07-10 Nick Clifton <nickc@redhat.com>
668
669 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
670 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
671
e6f3b9c3
JB
6722017-07-07 John Baldwin <jhb@FreeBSD.org>
673
674 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
675
532cc313
AM
6762017-07-07 Alan Modra <amodra@gmail.com>
677
678 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
679
1cf9552b
AM
6802017-07-07 Alan Modra <amodra@gmail.com>
681
682 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
683 as long long. Move code replacing "ll" with "I64", and simplify.
684
a0b7b105
L
6852017-07-06 H.J. Lu <hongjiu.lu@intel.com>
686
687 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
688 to 1.
689
1d827a72
L
6902017-07-05 H.J. Lu <hongjiu.lu@intel.com>
691
692 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
693 xtime.
694 (line_info_add_file_name): Likewise.
695 (decode_line_info): Likewise.
696
0d702cfe
TG
6972017-07-04 Tristan Gingold <gingold@adacore.com>
698
699 * version.m4: Bump version to 2.29.51
700 * configure: Regenerate.
701
564e46b7
JW
7022017-07-04 Jiong Wang <jiong.wang@arm.com>
703
704 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
705 sanity check at the head of this function.
706
0041f7df
JK
7072017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
708
709 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
710 dwarf_line_str_size.
711 (struct attr_abbrev): Add field implicit_const.
712 (dwarf_debug_sections): Add .debug_line_str.
713 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
714 (dwarf_debug_section_assert): Add static assertion.
715 (read_indirect_line_string): New.
716 (read_abbrevs): Support DW_FORM_implicit_const.
717 (is_str_attr): Support DW_FORM_line_strp.
718 (read_attribute_value): Support DW_FORM_line_strp and
719 DW_FORM_implicit_const.
720 (read_attribute): Support DW_FORM_implicit_const.
721 (line_info_add_include_dir, line_info_add_include_dir_stub):
722 (line_info_add_file_name, read_formatted_entries): New.
723 (decode_line_info, parse_comp_unit): Support DWARF 5.
724 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
725
d8cd8c1f
EB
7262017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
727
728 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
729 abort statement that was put for symbols that are not dynamic.
730
15e6ed8c
TG
7312017-07-03 Tristan Gingold <gingold@adacore.com>
732
733 * po/bfd.pot: Regenerate
734
76cfced5
AM
7352017-07-03 Alan Modra <amodra@gmail.com>
736
737 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
738 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
739 * elf.c (setup_group): Use "Lx" to print sh_size.
740 (_bfd_elf_setup_sections): Remove unnecessary cast and print
741 unknown section type in hex.
742 (copy_special_section_fields): Style fix.
743 (bfd_section_from_shdr): Correct format for sh_link. Use a
744 common error message for all the variants of unrecognized
745 section types.
746 (assign_file_positions_for_load_sections): Use "Lx" for lma
747 adjust error message.
748 (assign_file_positions_for_non_load_sections): Formatting.
749 (rewrite_elf_program_header): Formatting. Use "Lx" for
750 bfd_vma values in error messages.
751 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
752 ELF_R_SYM value to type expected by format.
753 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
754 in error messages.
755 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
756 (elf_link_input_bfd): Use "Lx" for r_info.
757 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
758
ce9116fd
AM
7592017-07-03 Alan Modra <amodra@gmail.com>
760
761 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
762 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
763 Microsoft C library variant of long long format specifier.
764 (PRINT20): Cast value to bfd_uint64_t not long long.
765 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
766 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
767 long long. Don't cast to bfd_vma.
768 * elf32-score.c (score3_bfd_getl48): Likewise.
769 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
770
cd9af601
AM
7712017-07-03 Alan Modra <amodra@gmail.com>
772
773 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
774 print d_tag.
775 (bfd_elf_print_symbol): Don't cast symbol->flags.
776 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
777 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
778 _bfd_error_handler argument order.
779 (ppc_elf_merge_private_bfd_data): Don't cast flags.
780
33c734b2
AM
7812017-07-03 Alan Modra <amodra@gmail.com>
782
783 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
784 AC_TYPE_LONG_DOUBLE.
785 * configure: Regenerate.
786 * config.in: Regenerate.
787
3df5cd13
AW
7882017-06-29 Andrew Waterman <andrew@sifive.com>
789
790 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
791 relocs.
792
ec1acaba
EB
7932017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
794
795 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
796 unless it is undefined weak.
797 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
798 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
799 relocation.
800 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
801 is not dynamic in PIC, abort.
802
ff07562f
JW
8032017-06-29 Jiong Wang <jiong.wang@arm.com>
804
805 PR ld/21402
806 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
807 undefined weak symbols into dynamic.
808 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
809 relocation for non-dynamic symbols.
810 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
811
2aff25ba
JW
8122017-06-29 Jiong Wang <jiong.wang@arm.com>
813
814 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
815 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
816 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
817 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
818 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
819 support for them.
820
88ab90e8
AA
8212017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
822
823 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
824 (elfcore_write_s390_gs_bc): Likewise.
825 * elf.c (elfcore_grok_s390_gs_cb): New function.
826 (elfcore_grok_s390_gs_bc): New function.
827 (elfcore_grok_note): Call them.
828 (elfcore_write_s390_gs_cb): New function.
829 (elfcore_write_s390_gs_bc): New function.
830 (elfcore_write_register_note): Call them.
831
328ce951
L
8322017-06-28 H.J. Lu <hongjiu.lu@intel.com>
833
834 * libbfd.c (_bfd_generic_get_section_contents): Don't call
835 bfd_get_file_size. Check archive element size.
836 (_bfd_generic_get_section_contents_in_window): Likewise.
837
47fdcf63
L
8382017-06-28 H.J. Lu <hongjiu.lu@intel.com>
839
840 * bfd-in2.h: Regenerated.
841 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
842 (bfd_get_file_size): Likewise.
843
38bf472a
MR
8442017-06-28 Maciej W. Rozycki <macro@imgtec.com>
845 Matthew Fortune <matthew.fortune@imgtec.com>
846
847 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
848 * cpu-mips.c (I_interaptiv_mr2): New enum value.
849 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
850 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
851 case.
852 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
853 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
854 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
855 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
856 `bfd_mach_mips_interaptiv_mr2' entries.
857 * bfd-in2.h: Regenerate.
858
2d68166e
NC
8592017-06-27 Nick Clifton <nickc@redhat.com>
860
861 * tekhex.c (pass_over): Revert accidental conversion of a local
862 array to a static array.
863
68063779
SKS
8642017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
865
866 PR ld/13402
867 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
868 reloc addend if necessary. Adjust diff only if
869 shrinked_insn_address < end_address.
870
ea9aafc4
AM
8712017-06-27 Alan Modra <amodra@gmail.com>
872
873 PR binutils/21665
874 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
875 (_bfd_generic_get_section_contents_in_window): Likewise.
876
a6cbf936
KLC
8772017-06-26 Kuan-Lin Chen <rufus@andestech.com>
878
879 * elfnn-riscv.c (perform_relocation): Support the new
880 R_RISCV_32_PCREL relocation.
881 (riscv_elf_relocate_section): Likewise.
882 * elfxx-riscv.c (howto_table): Likewise.
883 (riscv_reloc_map): Likewise.
884 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
885 * libbfd.h: Regenerate.
886
7211ae50
AM
8872017-06-27 Alan Modra <amodra@gmail.com>
888
889 PR binutils/21665
890 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
891 Use unsigned file pointer type, and remove cast.
892 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
893 Add "count", not "sz".
894
ab27f80c
PA
8952017-06-26 Pedro Alves <palves@redhat.com>
896
897 PR binutils/21665
898 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
899 "sz".
900
1f473e3d
L
9012017-06-26 H.J. Lu <hongjiu.lu@intel.com>
902
903 PR binutils/21665
904 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
905 a missing line.
906
b417536f
MR
9072017-06-26 Maciej W. Rozycki <macro@imgtec.com>
908
909 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
910 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
911 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
912 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
913 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
914
0630b49c
L
9152017-06-26 H.J. Lu <hongjiu.lu@intel.com>
916
917 PR binutils/21665
918 * compress.c (bfd_get_full_section_contents): Don't check the
919 file size here.
920 * libbfd.c (_bfd_generic_get_section_contents): Check for and
ea9aafc4 921 reject a section whose size + offset is greater than the size
0630b49c
L
922 of the entire file.
923 (_bfd_generic_get_section_contents_in_window): Likewise.
515a4464 924
04e15b4a
NC
9252017-06-26 Nick Clifton <nickc@redhat.com>
926
927 PR binutils/21670
928 * tekhex.c (getvalue): Check for the source pointer exceeding the
929 end pointer before the first byte is read.
930
cfd14a50
NC
9312017-06-26 Nick Clifton <nickc@redhat.com>
932
933 PR binutils/21665
ea9aafc4 934 * opncls.c (get_build_id): Check that the section is big enough
cfd14a50
NC
935 to contain the whole note.
936 * compress.c (bfd_get_full_section_contents): Check for and reject
ea9aafc4 937 a section whose size is greater than the size of the entire file.
cfd14a50
NC
938 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
939 contain a notes section.
940
93ec5e23
AK
9412017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
942
943 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
944 pointer checks.
945 (elf_s390_modify_segment_map): Likewise.
946 (bfd_elf_s390_set_options): Lisewise.
947
57963c05
AM
9482017-06-26 Alan Modra <amodra@gmail.com>
949
950 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
951 a --just-syms bfd.
952 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
953 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
954 .preinit_array on --just-syms bfds.
955 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
956 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
957 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
958
5cc4ca83
ST
9592017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
960
961 * elf.c (find_link): Bounds check "hint".
962
bff0500d
TP
9632017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
964
965 * elf32-arm.c (using_thumb_only): Update list of architectures in
966 BFD_ASSERT for which the logic is valid.
967 (using_thumb2_bl): Likewise.
968 (using_thumb2): Likewise and return true for ARMv8-R.
969 (arch_has_arm_nop): Likewise.
970 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
971 merging logic. Update commentis for value 15 of v8m_baseline,
972 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
973 merging of value 15 of Tag_CPU_arch.
974
4aa57d6a
JW
9752017-06-23 Jiong Wang <jiong.wang@arm.com>
976
977 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
978 BFD_RELOC_AARCH64_ADR_GOT_PAGE
979 * bfd-in2.h: Regenerate.
980
5d8763a3
L
9812017-06-22 H.J. Lu <hongjiu.lu@intel.com>
982
983 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
984 the error_alignment label forward. Properly align program
985 property note section.
986
e652757b
EC
9872017-06-22 Eric Christopher <echristo@gmail.com>
988
989 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
990 abs to fix a truncation warning.
991
84da4cf8
L
9922017-06-22 H.J. Lu <hongjiu.lu@intel.com>
993
994 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
995 local undefined weak symbol to 0.
996 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
997
48580982
L
9982017-06-22 H.J. Lu <hongjiu.lu@intel.com>
999
1000 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
1001 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1002 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
1003 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1004 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
1005 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
1006 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
1007 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
1008
ee2fdd6f
L
10092017-06-22 H.J. Lu <hongjiu.lu@intel.com>
1010
1011 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
1012 (elf_i386_lazy_ibt_plt_entry): Likewise.
1013 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
1014 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
1015 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
1016 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
1017 (elf_i386_lazy_plt_layout): Likewise.
1018 (elf_i386_non_lazy_plt_layout): Likewise.
1019 (elf_i386_link_hash_entry): Add plt_second.
1020 (elf_i386_link_hash_table): Add plt_second and
1021 plt_second_eh_frame.
1022 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
1023 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
1024 the second PLT. Check the second PLT.
1025 (elf_i386_relocate_section): Use the second PLT to resolve
1026 PLT reference if needed.
1027 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
1028 needed.
1029 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
1030 second PLT. Generate unwind info for the second PLT.
1031 (elf_i386_plt_type): Add plt_second.
1032 (elf_i386_get_synthetic_symtab): Support the second PLT.
1033 (elf_i386_parse_gnu_properties): Support
1034 GNU_PROPERTY_X86_FEATURE_1_AND.
1035 (elf_i386_merge_gnu_properties): Support
1036 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1037 on GNU_PROPERTY_X86_FEATURE_1_IBT
1038 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
1039 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1040 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1041 is set on all relocatable inputs.
1042 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
1043 (elf_x32_lazy_ibt_plt_entry): Likewise.
1044 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
1045 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
1046 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
1047 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
1048 (elf_x86_64_lazy_ibt_plt): Likewise.
1049 (elf_x32_lazy_ibt_plt): Likewise.
1050 (elf_x86_64_non_lazy_ibt_plt): Likewise.
1051 (elf_x32_non_lazy_ibt_plt): Likewise.
1052 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
1053 (elf_x86_64_parse_gnu_properties): Support
1054 GNU_PROPERTY_X86_FEATURE_1_AND.
1055 (elf_x86_64_merge_gnu_properties): Support
1056 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
1057 on GNU_PROPERTY_X86_FEATURE_1_IBT
1058 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
1059 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
1060 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
1061 is set on all relocatable inputs.
1062
d19237d9
NC
10632017-06-22 Nick Clifton <nickc@redhat.com>
1064
1065 PR binutils/21649
1066 * som.c (setup_sections): NUL terminate the space_strings buffer.
1067 Check that the space.name field does not index beyond the end of
1068 the space_strings buffer.
1069
6879f5a9
NC
10702017-06-21 Nick Clifton <nickc@redhat.com>
1071
1072 PR binutils/21646
1073 * coff-sh.c (sh_reloc): Check for an out of range reloc.
1074
7adc0a81
NC
10752017-06-21 Nick Clifton <nickc@redhat.com>
1076
1077 PR binutils/21639
1078 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
1079 type of the size parameter.
1080 (_bfd_vms_save_counted_string): Add second parameter - the maximum
1081 length of the counted string.
1082 * vms.h (_bfd_vms_save_sized_string): Update prototype.
1083 (_bfd_vms_save_counted_string): Likewise.
1084 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
1085 _bfd_vms_save_counted_string.
1086 (_bfd_vms_slurp_ehdr): Likewise.
1087 (_bfd_vms_slurp_egsd): Likewise.
1088 (Parse_module): Likewise.
1089
6e1816be
AM
10902017-06-21 Alan Modra <amodra@gmail.com>
1091
1092 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
1093 calls before tocsave calls.
1094 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
1095 following nop.
1096
20bd1b6b
NC
10972017-06-21 Nick Clifton <nickc@redhat.com>
1098
1099 PR binutils/21645
1100 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
1101 bfd_get_full_section_contents returns no contents.
1102
3de58d95
NC
11032017-06-21 Nick Clifton <nickc@redhat.com>
1104
1105 PR binutils/21638
1106 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
1107 record.
1108
cb06d03a
NC
11092017-06-21 Nick Clifton <nickc@redhat.com>
1110
1111 PR binutils/21637
1112 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
1113 list.
1114 (image_set_ptr): Likewise.
1115 (alpha_vms_fix_sec_rel): Likewise.
1116 (alpha_vms_slurp_relocs): Likewise.
1117
c458d007
NC
11182017-06-21 Nick Clifton <nickc@redhat.com>
1119
1120 PR binutils/21633
1121 * ieee.c (ieee_slurp_sections): Check for a NULL return from
1122 read_id.
1123 (ieee_archive_p): Likewise.
1124 (ieee_object_p): Likewise.
1125
ce497010
NC
11262017-06-21 Nick Clifton <nickc@redhat.com>
1127
1128 PR binutils/21640
1129 * elf.c (setup_group): Zero the group section pointer list after
1130 allocation so that loops can be caught. Check for NULL pointers
1131 when processing a group list.
1132
fd52715c
AK
11332017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1134
1135 * elf-s390.h: New file.
1136 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
1137 field.
1138 (elf_s390_additional_program_headers): New function.
1139 (elf_s390_modify_segment_map): New function.
1140 (bfd_elf_s390_set_options): New function.
1141 (elf_backend_additional_program_headers)
1142 (elf_backend_modify_segment_map): Add macro definitions.
1143
abfa390d
L
11442017-06-19 H.J. Lu <hongjiu.lu@intel.com>
1145
1146 PR ld/21626
1147 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
1148 the DYNAMIC bit instead of bfd_count_sections.
1149
bc21b167
NC
11502017-06-19 Nick Clifton <nickc@redhat.com>
1151
1152 PR binutils/21618
1153 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
1154 length.
1155 (evax_bfd_print_eeom): Likewise.
1156 (evax_bfd_print_egsd): Check for an overlarge record length.
1157 (evax_bfd_print_etir): Likewise.
1158
acb56a83
NC
11592017-06-19 Nick Clifton <nickc@redhat.com>
1160
1161 PR binutils/21612
1162 * libieee.h (struct common_header_type): Add end_p field.
1163 * ieee.c (this_byte_and_next): Do not advance input_p beyond
1164 end_p.
1165 (read_id): Check for a length that exceeds the remaining bytes in
1166 the input buffer.
1167 (ieee_seek): Initialise end_p.
1168 (ieee_archive_p): Likewise.
1169 (ieee_object_p): Likewise.
1170
72e84f96
NC
11712017-06-19 Nick Clifton <nickc@redhat.com>
1172
80053e46
NC
1173 PR binutils/21611
1174 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
1175 before reading the EIHS structure entries.
1176
11772017-06-19 Nick Clifton <nickc@redhat.com>
1178
1179 PR binutils/21615
72e84f96
NC
1180 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
1181 gsd_size. Check that there are enough bytes remaining to read the
1182 type and size of the next egsd. Check that the size of the egsd
1183 does not exceed the size of the record.
1184
875ffa3e
AM
11852017-06-19 Alan Modra <amodra@gmail.com>
1186
1187 * config.bfd: Correct targ_underscore for cris.
1188
bdd32e03
AM
11892017-06-18 Alan Modra <amodra@gmail.com>
1190
1191 * config.bfd: Correct targ_underscore for epiphany, ip2k,
1192 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
1193
4b48e2f6
NC
11942017-06-16 Nick Clifton <nickc@redhat.com>
1195
1196 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
1197 bucketlist is empty because there are no symbols to add to the
1198 list.
1199
7dba9362
AM
12002017-06-16 Alan Modra <amodra@gmail.com>
1201
1202 PR ld/20022
1203 PR ld/21557
1204 PR ld/21562
1205 PR ld/21571
1206 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
1207 (BFD_JUMP_TABLE_LINK): Likewise.
1208 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
1209 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
1210 (bfd_elf_define_start_stop): New function.
1211 * linker.c (bfd_generic_define_start_stop): New function.
1212 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
1213 new field.
1214 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
1215 * aout-target.h (MY_bfd_define_start_stop): Define.
1216 * aout-tic30.c (MY_bfd_define_start_stop): Define.
1217 * binary.c (binary_bfd_define_start_stop): Define.
1218 * bout.c (b_out_bfd_define_start_stop): Define.
1219 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
1220 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
1221 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
1222 * coffcode.h (coff_bfd_define_start_stop): Define.
1223 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
1224 * i386msdos.c (msdos_bfd_define_start_stop): Define.
1225 * i386os9k.c (os9k_bfd_define_start_stop): Define.
1226 * ieee.c (ieee_bfd_define_start_stop): Define.
1227 * ihex.c (ihex_bfd_define_start_stop): Define.
1228 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
1229 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
1230 * mmo.c (mmo_bfd_define_start_stop): Define.
1231 * nlm-target.h (nlm_bfd_define_start_stop): Define.
1232 * oasys.c (oasys_bfd_define_start_stop): Define.
1233 * pef.c (bfd_pef_bfd_define_start_stop): Define.
1234 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
1235 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
1236 * som.c (som_bfd_define_start_stop): Define.
1237 * srec.c (srec_bfd_define_start_stop): Define.
1238 * tekhex.c (tekhex_bfd_define_start_stop): Define.
1239 * versados.c (versados_bfd_define_start_stop): Define.
1240 * vms-alpha.c (vms_bfd_define_start_stop): Define.
1241 (alpha_vms_bfd_define_start_stop): Define.
1242 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
1243 * bfd-in2.h: Regenerate.
1244 * libbfd.h: Regenerate.
1245
d68f1976
JW
12462017-06-16 Jiong Wang <jiong.wang@arm.com>
1247
1248 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
1249 SYMBOL_REFERENCES_LOCAL.
1250
6353d82b
JW
12512017-06-15 Jiong Wang <jiong.wang@arm.com>
1252
1253 PR ld/21532
1254 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
1255 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
1256 runtime for if there needs copy relocation elimination.
1257 (need_copy_relocation_p): New function. Return true for symbol with
1258 pc-relative references and if it's against read-only sections.
1259 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
1260 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
1261 that are related with accessing external objects.
1262 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
1263 in elfNN_aarch64_check_relocs.
1264
63634bb4
NC
12652017-06-15 Nick Clifton <nickc@redhat.com>
1266
1267 PR binutils/21582
1268 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
1269 bugs.
62b76e4b
NC
1270 PR binutils/21581
1271 (ieee_archive_p): Likewise.
63634bb4 1272
76800cba
NC
12732017-06-15 Nick Clifton <nickc@redhat.com>
1274
1275 PR binutils/21579
1276 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
1277
f7e16c2a
MF
12782017-06-14 Max Filippov <jcmvbkbc@gmail.com>
1279
1280 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
1281 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
1282 keep both windowed and call0 ABI PLT definitions.
1283 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
1284 elf_xtensa_*_plt_entry endex.
1285 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
1286
f461bbd8
NC
12872017-06-14 Nick Clifton <nickc@redhat.com>
1288
1289 PR binutils/21578
1290 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
1291 flag value.
1292
c53d2e6d
NC
12932017-06-14 Nick Clifton <nickc@redhat.com>
1294
1295 PR binutils/21589
1296 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
1297 maximum value for the ascic pointer. Check that name processing
1298 does not read beyond this value.
1299 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
1300 end of etir record.
1301
04f963fd
NC
13022017-06-14 Nick Clifton <nickc@redhat.com>
1303
1304 PR binutils/21591
1305 * versados.c (versados_mkobject): Zero the allocated tdata structure.
1306 (process_otr): Check for an invalid offset in the otr structure.
1307
319c2dbe
SH
13082017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
1309
1310 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
1311
cbd0eecf
L
13122017-06-13 H.J. Lu <hongjiu.lu@intel.com>
1313
1314 PR ld/20022
1315 PR ld/21557
1316 PR ld/21562
1317 PR ld/21571
1318 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
1319 vtable field to a union.
1320 (_bfd_elf_is_start_stop): Removed.
1321 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
1322 __start_SECNAME and __stop_SECNAME symbols.
1323 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
1324 * elflink.c (_bfd_elf_is_start_stop): Removed.
1325 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
1326 _bfd_elf_is_start_stop.
1327 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
1328 __stop_SECNAME symbols. Updated.
1329 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1330 (bfd_elf_gc_record_vtinherit): Likewise.
1331 (bfd_elf_gc_record_vtentry): Likewise.
1332
10bbbc1d
NC
13332017-06-13 Nick Clifton <nickc@redhat.com>
1334
1335 PR ld/21524
1336 * elflink.c (elf_link_adjust_relocs): Generate an error when
1337 encountering a reloc against a symbol removed by garbage
1338 collection.
1339
5c3ce2bc
L
13402017-06-12 H.J. Lu <hongjiu.lu@intel.com>
1341
1342 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
1343 to merge_gnu_properties.
1344 * elf-properties.c (elf_merge_gnu_properties): Add struct
1345 bfd_link_info * and pass it to merge_gnu_properties.
1346 (elf_merge_gnu_property_list): Add struct bfd_link_info *
1347 and pass it to elf_merge_gnu_properties.
1348 (_bfd_elf_link_setup_gnu_properties): Pass info to
1349 elf_merge_gnu_property_list.
1350 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
1351 bfd_link_info *.
1352 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
1353
9b97dfbf
AM
13542017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
1355
1356 PR 21564
1357 * binary.c (binary_set_section_contents): Scale lma by octets
1358 per byte to set filepos.
1359
e3d1d408
CM
13602017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1361
1362 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
1363 dynamic sections.
1364
64aa8e03
CM
13652017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1366
1367 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
1368 require TEXTREL.
1369
a0abe743
CM
13702017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1371
1372 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
1373 patched section contents for TLS IE reloc.
1374 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
1375
f4e6805f
CM
13762017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1377
1378 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
1379 RELOC_FOR_GLOBAL_SYMBOL macro.
1380
cd640291
CM
13812018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1382
1383 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
1384 changes.
1385
7ef0acc1
VG
13862017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1387
1388 * config/tc-arc.c (md_undefined_symbol): Changed.
1389 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
1390
cc89d0b3
CM
13912017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1392
1393 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
1394 symbols.
1395
9d5c718b
CM
13962017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1397
1398 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
1399 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
1400
be9e3704
CM
14012017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
1402
1403 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
1404 object is created.
1405
4ec192e6
RE
14062017-06-08 Richard Earnshaw <rearnsha@arm.com>
1407
1408 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
1409 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
1410 is non-zero. Add clarifying comments.
1411
51fa2693
L
14122017-06-08 H.J. Lu <hongjiu.lu@intel.com>
1413
1414 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
1415 name. Use local IFUNC symbol name string to report unsupported
1416 non-PIC call to IFUNC function.
1417 (elf_i386_relocate_section): Dump local IFUNC name with minfo
1418 when generating R_386_IRELATIVE relocation.
1419 (elf_i386_finish_dynamic_symbol): Likewise.
1420 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
1421 IFUNC symbol name.
1422 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
1423 when generating R_X86_64_IRELATIVE relocation.
1424 (elf_x86_64_finish_dynamic_symbol): Likewise.
1425
78e8a2ff
JM
14262017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1427
1428 * elf.c (setup_group): Make sure BFD sections are created for all
1429 group sections in the input file when processing SHF_GROUP
1430 sections.
1431 (bfd_section_from_shdr): Avoid duplicating logic already
1432 implemented in `setup_group'.
1433
9949827b
DBR
14342017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
1435
1436 PR binutils/21546
1437 * peXXigen.c (pe_print_idata): Use the address of the first thunk
1438 if the hint address is zero.
1439
0ee3a6db
JC
14402017-06-06 James Clarke <jrtc27@jrtc27.com>
1441
1442 PR ld/19579
1443 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
1444 ELF_COMMON_DEF_P for common symbols.
1445
7bdf4127
AB
14462017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
1447
1448 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
1449 SEC_GROUP sections as SEC_EXCLUDE.
1450 (bfd_elf_set_group_contents): Replace use of abort with an assert.
1451 (assign_section_numbers): Use resolve_section_groups flag instead
1452 of relocatable link type.
1453 (_bfd_elf_init_private_section_data): Use resolve_section_groups
1454 flag instead of checking the final_link flag for part of the
1455 checks in here. Fix white space as a result.
1456 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
1457 instead of relocatable link type.
1458 (bfd_elf_final_link): Likewise.
1459
458ad2b8
JM
14602017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1461
1462 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
1463 variable `bed'.
1464 * elf32-score.c (score_elf_final_link_relocate): Likewise.
1465 (s3_bfd_score_elf_check_relocs): Likewise.
1466 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1467 (score_elf_final_link_relocate): Likewise.
1468 (s7_bfd_score_elf_check_relocs): Likewise.
1469
fbebaf4a
JM
14702017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
1471
1472 * elflink.c (init_reloc_cookie_rels): Remove unused variable
1473 `bed'.
1474
056bafd4
MR
14752017-06-06 Maciej W. Rozycki <macro@imgtec.com>
1476
1477 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
1478 from `reloc_count' rather than decrementing it.
1479 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
1480 `reloc_count' by `int_rels_per_ext_rel'.
1481 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
1482 `reloc_count' by `int_rels_per_ext_rel' for last relocation
1483 entry determination.
1484 (s3_bfd_score_elf_check_relocs): Likewise.
1485 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
1486 (s7_bfd_score_elf_relocate_section): Likewise.
1487 (s7_bfd_score_elf_check_relocs): Likewise.
1488 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
1489 prototype and function.
1490 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
1491 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
1492 triple rather than once the sum of REL and RELA relocation entry
1493 counts.
1494 (bfd_elf64_get_reloc_upper_bound): Remove macro.
1495 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
1496 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
1497 storage allocation size determination.
1498 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
1499 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
1500 by `int_rels_per_ext_rel' for last relocation entry
1501 determination.
1502 (bfd_elf_final_link): Do not multiply `reloc_count' by
1503 `int_rels_per_ext_rel' for internal relocation storage
1504 allocation size determination.
1505 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
1506 `int_rels_per_ext_rel' for last relocation entry determination.
1507 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1508 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1509 (_bfd_mips_elf_relocate_section): Likewise.
1510
af54f0eb
AM
15112017-06-05 Alan Modra <amodra@gmail.com>
1512
1513 PR 21529
1514 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
1515
6cf3bf88 15162017-06-01 John Baldwin <jhb@FreeBSD.org>
b5430a3c
JB
1517
1518 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
1519 determine structure sizes.
1520 (elfcore_grok_freebsd_prstatus): Likewise.
1521
f378ab09
AM
15222017-06-01 Alan Modra <amodra@gmail.com>
1523
1524 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
1525 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
1526 dynamic objects.
1527 (is_elfv2_localentry0): New function.
1528 (ppc64_elf_tls_setup): Default params->plt_localentry0.
1529 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
1530 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
1531 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
1532 optimized localentry:0 stubs.
1533 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
1534 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
1535 localentry:0 stubs.
1536 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
1537 DT_PPC64_OPT.
1538 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
1539
8c65b54f
CS
15402017-05-30 Casey Smith <clegg89@gmail.com>
1541
1542 PR ld/21523
1543 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
1544 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
1545
64984c22
AK
15462017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
1547
1548 * cpu-arc.c (arc_compatible): New function.
1549
37cd3877
AK
15502017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
1551
1552 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
1553
8e2f54bc
L
15542017-05-30 H.J. Lu <hongjiu.lu@intel.com>
1555
1556 PR binutils/21519
1557 * bfdio.c (bfd_get_file_size): New function.
1558 * bfd-in2.h: Regenerated.
1559
8e7f04f1 15602017-05-23 Dilian Palauzov <git-dpa@aegee.org>
1561
1562 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
1563 comments.
1564
25f94347
L
15652017-05-22 H.J. Lu <hongjiu.lu@intel.com>
1566
1567 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
1568 dynobj instead of htab->elf.dynobj.
1569
e5713223
MR
15702017-05-19 Maciej W. Rozycki <macro@imgtec.com>
1571
1572 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
1573 and function.
1574 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
1575 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
1576 actual number of internal relocations retrieved. Adjust
1577 function description.
1578 (bfd_elf64_canonicalize_reloc): Remove macro.
1579 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
1580
64517994
JM
15812017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
1582
1583 * archures.c (bfd_mach_sparc_v9m8): Define.
1584 (bfd_mach_sparc_v8plusm8): Likewise.
1585 (bfd_mach_sparc_v9_p): Adjust to M8.
1586 (bfd_mach_sparc_64bit_p): Likewise.
1587 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
1588 bfd_mach_sparc_v8plusm8.
1589 * bfd-in2.h: Regenerated.
1590 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
1591 sparc:v8plusm8.
1592 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
1593 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
1594 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
1595 SHA3.
1596 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
1597 bfd_mach_sparc_v8plusm8.
1598
eb026f09
AM
15992017-05-19 Alan Modra <amodra@gmail.com>
1600
1601 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
1602 debug and special sections when no non-note alloc sections in an
1603 object are kept.
1604
535b785f
AM
16052017-05-18 Alan Modra <amodra@gmail.com>
1606
1607 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
1608 * elf-m10300.c: Likewise.
1609 * elf.c: Likewise.
1610 * elf32-arc.c: Likewise.
1611 * elf32-bfin.c: Likewise.
1612 * elf32-m68k.c: Likewise.
1613 * elf32-nds32.c: Likewise.
1614 * elf32-tilepro.c: Likewise.
1615 * elflink.c: Likewise.
1616 * elfnn-aarch64.c: Likewise.
1617 * elfnn-riscv.c: Likewise.
1618 * elfxx-tilegx.c: Likewise.
1619 * mach-o.c: Likewise.
1620 * peXXigen.c: Likewise.
1621 * vms-alpha.c: Likewise.
1622 * vms-lib.c: Likewise.
1623
b7c871ed
L
16242017-05-17 H.J. Lu <hongjiu.lu@intel.com>
1625
1626 PR ld/20882
1627 * elflink.c (elf_gc_mark_debug_section): New function.
1628 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
1629 referenced by kept debug sections.
1630
bc4e12de
AM
16312017-05-16 Alan Modra <amodra@gmail.com>
1632
1633 * elf-m10300.c: Rename occurrences of non_ir_ref.
1634 * elf32-arm.c: Likewise.
1635 * elf32-bfin.c: Likewise.
1636 * elf32-cr16.c: Likewise.
1637 * elf32-cris.c: Likewise.
1638 * elf32-d10v.c: Likewise.
1639 * elf32-dlx.c: Likewise.
1640 * elf32-fr30.c: Likewise.
1641 * elf32-frv.c: Likewise.
1642 * elf32-hppa.c: Likewise.
1643 * elf32-i370.c: Likewise.
1644 * elf32-i386.c: Likewise.
1645 * elf32-iq2000.c: Likewise.
1646 * elf32-lm32.c: Likewise.
1647 * elf32-m32c.c: Likewise.
1648 * elf32-m32r.c: Likewise.
1649 * elf32-m68hc1x.c: Likewise.
1650 * elf32-m68k.c: Likewise.
1651 * elf32-mcore.c: Likewise.
1652 * elf32-metag.c: Likewise.
1653 * elf32-microblaze.c: Likewise.
1654 * elf32-moxie.c: Likewise.
1655 * elf32-msp430.c: Likewise.
1656 * elf32-mt.c: Likewise.
1657 * elf32-nios2.c: Likewise.
1658 * elf32-or1k.c: Likewise.
1659 * elf32-ppc.c: Likewise.
1660 * elf32-rl78.c: Likewise.
1661 * elf32-s390.c: Likewise.
1662 * elf32-score.c: Likewise.
1663 * elf32-score7.c: Likewise.
1664 * elf32-sh.c: Likewise.
1665 * elf32-tic6x.c: Likewise.
1666 * elf32-tilepro.c: Likewise.
1667 * elf32-v850.c: Likewise.
1668 * elf32-vax.c: Likewise.
1669 * elf32-xstormy16.c: Likewise.
1670 * elf32-xtensa.c: Likewise.
1671 * elf64-alpha.c: Likewise.
1672 * elf64-hppa.c: Likewise.
1673 * elf64-ia64-vms.c: Likewise.
1674 * elf64-mmix.c: Likewise.
1675 * elf64-ppc.c: Likewise.
1676 * elf64-s390.c: Likewise.
1677 * elf64-sh64.c: Likewise.
1678 * elf64-x86-64.c: Likewise.
1679 * elflink.c: Likewise.
1680 * elfnn-aarch64.c: Likewise.
1681 * elfnn-ia64.c: Likewise.
1682 * elfnn-riscv.c: Likewise.
1683 * elfxx-mips.c: Likewise.
1684 * elfxx-sparc.c: Likewise.
1685 * elfxx-tilegx.c: Likewise.
1686 * linker.c: Likewise.
1687
4070765b
AM
16882017-05-16 Alan Modra <amodra@gmail.com>
1689
1690 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
1691 * elflink.c (elf_link_add_object_symbols): Update to use
1692 non_ir_ref_dynamic.
1693 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
1694 non_ir_ref.
1695 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
1696
25499ac7
MR
16972017-05-15 Maciej W. Rozycki <macro@imgtec.com>
1698
1699 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
1700
73caa85d
L
17012017-05-12 H.J. Lu <hongjiu.lu@intel.com>
1702
1703 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
1704 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
1705 properties.
1706 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1707
f2c29a16
L
17082017-05-11 H.J. Lu <hongjiu.lu@intel.com>
1709
1710 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
1711 to plt_second.
1712 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
1713 to plt_second/plt_second_eh_frame.
1714 (elf_x86_64_link_hash_newfunc): Updated.
1715 (elf_x86_64_allocate_dynrelocs): Likewise.
1716 (elf_x86_64_size_dynamic_sections): Likewise.
1717 (elf_x86_64_relocate_section): Likewise.
1718 (elf_x86_64_finish_dynamic_symbol): Likewise.
1719 (elf_x86_64_finish_dynamic_sections): Likewise.
1720 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
1721 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
1722 .plt.sec section.
1723 (elf_backend_setup_gnu_properties): Updated. Create the
1724 .plt.sec section instead of the .plt.sec section.
1725
dc2be3d2
L
17262017-05-11 H.J. Lu <hongjiu.lu@intel.com>
1727
1728 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
1729 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
1730 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
1731
db84b98a
JM
17322017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
1733
1734 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
1735 (bfd_elf64_set_reloc): Define.
1736 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
1737
23186865
JM
17382017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
1739
1740 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
1741 (struct bfd_target): New field _bfd_set_reloc.
1742 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
1743 * reloc.c (_bfd_generic_set_reloc): New function.
1744 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
1745 * nlm-target.h (nlm_set_reloc): Likewise.
1746 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
1747 * aout-tic30.c (MY_set_reloc): Likewise.
1748 * aout-target.h (MY_set_reloc): Likewise.
1749 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
1750 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
1751 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
1752 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
1753 * aout-adobe.c (aout_32_set_reloc): Likewise.
1754 * bout.c (b_out_set_reloc): Likewise.
1755 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
1756 * i386os9k.c (aout_32_set_reloc): Likewise.
1757 * ieee.c (ieee_set_reloc): Likewise.
1758 * oasys.c (oasys_set_reloc): Likewise.
1759 * som.c (som_set_reloc): Likewise.
1760 * versados.c (versados_set_reloc): Likewise.
1761 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
1762 _bfd_generic_set_reloc.
1763 (rs6000_xcoff64_aix_vec): LIkewise.
1764 * libbfd.c (_bfd_norelocs_set_reloc): New function.
1765 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
1766 * i386msdos.c (msdos_set_reloc): Define to
1767 _bfd_norelocs_set_reloc.
1768 * elfcode.h (elf_set_reloc): Define.
1769 * bfd-in2.h: Regenerated.
1770
aab82f4c
L
17712017-05-10 H.J. Lu <hongjiu.lu@intel.com>
1772
1773 PR ld/21481
1774 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
1775 for IFUNC function address.
1776
53a346d8
CZ
17772017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
1778
1779 * elf32-arc.c (FEATURE_LIST_NAME): Define.
1780 (CONFLICT_LIST): Likewise.
1781 (opcode/arc-attrs.h): Include.
1782 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
1783 (arc_extract_features): New file.
1784 (arc_stralloc): Likewise.
1785 (arc_elf_merge_attributes): Likewise.
1786 (arc_elf_merge_private_bfd_data): Use object attributes.
1787 (bfd_arc_get_mach_from_attributes): New function.
1788 (arc_elf_object_p): Use object attributes.
1789 (arc_elf_final_write_processing): Likewise.
1790 (elf32_arc_obj_attrs_arg_type): New function.
1791 (elf32_arc_obj_attrs_handle_unknown): Likewise.
1792 (elf32_arc_section_from_shdr): Likewise.
1793 (elf_backend_obj_attrs_vendor): Define.
1794 (elf_backend_obj_attrs_section): Likewise.
1795 (elf_backend_obj_attrs_arg_type): Likewise.
1796 (elf_backend_obj_attrs_section_type): Likewise.
1797 (elf_backend_obj_attrs_handle_unknown): Likewise.
1798 (elf_backend_section_from_shdr): Likewise.
1799
e645cf40
AG
18002017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
1801
1802 PR ld/21458
1803 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
1804 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
1805 and the destination is a Thumb symbol.
1806
dd9e66ee
L
18072017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1808
1809 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
1810 initializer to silence GCC 4.2.
1811 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1812
38b12349
L
18132017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1814
1815 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
1816 (LAZY_PLT_ENTRY_SIZE): This.
1817 (NON_LAZY_PLT_ENTRY_SIZE): New.
1818 (elf_x86_64_plt0_entry): Renamed to ...
1819 (elf_x86_64_lazy_plt0_entry): This.
1820 (elf_x86_64_plt_entry): Renamed to ...
1821 (elf_x86_64_lazy_plt_entry): This.
1822 (elf_x86_64_bnd_plt0_entry): Renamed to ...
1823 (elf_x86_64_lazy_bnd_plt0_entry): This.
1824 (elf_x86_64_legacy_plt_entry): Removed.
1825 (elf_x86_64_bnd_plt_entry): Renamed to ...
1826 (elf_x86_64_lazy_bnd_plt_entry): This.
1827 (elf_x86_64_legacy_plt2_entry): Renamed to ...
1828 (elf_x86_64_non_lazy_plt_entry): This.
1829 (elf_x86_64_bnd_plt2_entry): Renamed to ...
1830 (elf_x86_64_non_lazy_bnd_plt_entry): This.
1831 (elf_x86_64_eh_frame_plt): Renamed to ...
1832 (elf_x86_64_eh_frame_lazy_plt): This.
1833 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
1834 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
1835 (elf_x86_64_eh_frame_plt_got): Renamed to ...
1836 (elf_x86_64_eh_frame_non_lazy_plt): This.
1837 (elf_x86_64_lazy_plt_layout): New.
1838 (elf_x86_64_non_lazy_plt_layout): Likewise.
1839 (elf_x86_64_plt_layout): Likewise.
1840 (elf_x86_64_backend_data): Remove PLT layout information. Add
1841 os for target system.
1842 (GET_PLT_ENTRY_SIZE): Removed.
1843 (elf_x86_64_lazy_plt): New.
1844 (elf_x86_64_non_lazy_plt): Likewise.
1845 (elf_x86_64_lazy_bnd_plt): Likewise.
1846 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1847 (elf_x86-64_arch_bed): Updated.
1848 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
1849 (elf_x86_64_create_dynamic_sections): Removed.
1850 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
1851 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
1852 (elf_x86-64_adjust_dynamic_symbol): Updated.
1853 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
1854 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
1855 size for PLT0 if there is no PLT0. Get plt_entry_size from
1856 non_lazy_plt for non-lazy PLT entries.
1857 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
1858 from non_lazy_plt for non-lazy PLT entries.
1859 (elf_x86-64_relocate_section): Updated. Properly get PLT index
1860 if there is no PLT0.
1861 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
1862 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
1863 entries with non-lazy PLT layout. Don't fill the second and third
1864 slots in the PLT entry if there is no PLT0.
1865 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
1866 if there is no PLT0. Set sh_entsize on the .plt.got section.
1867 (compare_relocs): New.
1868 (elf_x86_64_plt_type): Likewise.
1869 (elf_x86_64_plt): Likewise.
1870 (elf_x86_64_nacl_plt): New. Forward declaration.
1871 (elf_x86_64_get_plt_sym_val): Removed.
1872 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
1873 against all dynamic relocations.
1874 (elf_x86_64_link_setup_gnu_properties): New function.
1875 (elf_backend_create_dynamic_sections): Updated.
1876 (elf_backend_setup_gnu_properties): New.
1877 (elf_x86_64_nacl_plt): New.
1878 (elf_x86_64_nacl_arch_bed): Updated.
1879
f604c2a2
L
18802017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1881
1882 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
1883 (LAZY_PLT_ENTRY_SIZE): This.
1884 (NON_LAZY_PLT_ENTRY_SIZE): New.
1885 (elf_i386_plt0_entry): Renamed to ...
1886 (elf_i386_lazy_plt0_entry): This.
1887 (elf_i386_plt_entry): Renamed to ...
1888 (elf_i386_lazy_plt_entry): This.
1889 (elf_i386_pic_plt0_entry): Renamed to ...
1890 (elf_i386_pic_lazy_plt0_entry): This.
1891 (elf_i386_pic_plt_entry): Renamed to ...
1892 (elf_i386_pic_lazy_plt_entry): This.
1893 (elf_i386_got_plt_entry): Renamed to ...
1894 (elf_i386_non_lazy_plt_entry): This.
1895 (elf_i386_pic_got_plt_entry): Renamed to ...
1896 (elf_i386_pic_non_lazy_plt_entry): This.
1897 (elf_i386_eh_frame_plt): Renamed to ...
1898 (elf_i386_eh_frame_lazy_plt): This.
1899 (elf_i386_eh_frame_plt_got): Renamed to ...
1900 (elf_i386_eh_frame_non_lazy_plt): This.
1901 (elf_i386_plt_layout): Renamed to ...
1902 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
1903 eh_frame_plt_got_size.
1904 (elf_i386_non_lazy_plt_layout): New.
1905 (elf_i386_plt_layout): Likewise.
1906 (elf_i386_non_lazy_plt): Likewise.
1907 (GET_PLT_ENTRY_SIZE): Removed.
1908 (elf_i386_plt): Renamed to ...
1909 (elf_i386_lazy_plt): This.
1910 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
1911 (elf_i386_arch_bed): Updated.
1912 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
1913 (elf_i386_create_dynamic_sections): Removed.
1914 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
1915 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
1916 (elf_i386_adjust_dynamic_symbol): Updated.
1917 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
1918 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
1919 size for PLT0 if there is no PLT0.
1920 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
1921 output section is discarded only if GOT isn't empty.
1922 (elf_i386_relocate_section): Updated. Properly get PLT index
1923 if there is no PLT0.
1924 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
1925 second and third slots in the PLT entry if there is no PLT0.
1926 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
1927 if there is no PLT0. Set sh_entsize on the .plt.got section.
1928 (elf_i386_nacl_plt): Forward declaration.
1929 (elf_i386_get_plt_sym_val): Removed.
1930 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
1931 against all dynamic relocations.
1932 (elf_i386_link_setup_gnu_properties): New function.
1933 (elf_backend_create_dynamic_sections): Updated.
1934 (elf_backend_setup_gnu_properties): New.
1935 (elf_i386_nacl_plt): Updated.
1936 (elf_i386_nacl_arch_bed): Likewise.
1937 (elf_i386_vxworks_arch_bed): Likewise.
1938
046734ff
TP
19392017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
1940
1941 * elflink.c (elf_output_implib): Remove executable flag from import
1942 library bfd.
1943 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
1944 library is a relocatable object file.
1945
b660e9eb
SKS
19462017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1947
1948 PR ld/21404
1949 * elf32-avr.c (avr_should_move_sym): New function.
1950 (avr_should_reduce_sym_size): Likewise.
1951 (avr_should_increase_sym_size): Likewise.
1952 (elf32_avr_relax_delete_bytes): Adjust symbol values
1953 and sizes by calling new functions.
1954
763a5fa4
PD
19552017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
1956
1957 * config.bfd (riscv32-*): Enable rv64.
1958
73ec947d
AM
19592017-05-02 Alan Modra <amodra@gmail.com>
1960
1961 PR 21384
1962 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
1963 rather than h->root.type == bfd_link_hash_new.
1964 (bfd_elf_record_link_assignment): Similarly, call
1965 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
1966
a941291c
AM
19672017-04-29 Alan Modra <amodra@gmail.com>
1968
1969 PR 21432
1970 * reloc.c (reloc_offset_in_range): New function.
1971 (bfd_perform_relocation, bfd_install_relocation): Use it.
1972 (_bfd_final_link_relocate): Likewise.
1973
750eaa47
L
19742017-04-28 H.J. Lu <hongjiu.lu@intel.com>
1975
1976 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
1977 before using .plt.got.
1978 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
1979
5b66fac4
L
19802017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1981
1982 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
1983 instead of "+=" to update 0.
1984
de9a3c42
L
19852017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1986
1987 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
1988 .plt.got section here.
1989 (elf_i386_check_relocs): Don't create the .plt.got section.
1990 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
1991 the .plt.got and .plt.bnd sections here.
1992 (elf_x86_64_check_relocs): Don't create the .plt.got nor
1993 .plt.bnd sections.
1994
da3d25af
L
19952017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1996
1997 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
1998 has_bnd_reloc.
1999 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
2000 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
2001 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
2002 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
2003 has_bnd_reloc.
2004
fba37edd
L
20052017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2006
2007 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
2008 to return bfd *.
2009 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
2010 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
2011 the first relocatable ELF input with GNU properties.
2012
1f78f649
L
20132017-04-27 H.J. Lu <hongjiu.lu@intel.com>
2014
2015 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
2016 VxWorks for non-PIC.
2017
76c20d54
AM
20182017-04-27 Alan Modra <amodra@gmail.com>
2019
2020 * elf-bfd.h (struct elf_backend_data): Make asection param of
2021 elf_backend_eh_frame_address_size const.
2022 (_bfd_elf_eh_frame_address_size): Likewise.
2023 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
2024 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
2025 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
2026 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
2027 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
2028 (next_cie_fde_offset): Constify params.
2029 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
2030
d7153c4a
AM
20312017-04-27 Alan Modra <amodra@gmail.com>
2032
2033 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
2034 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
2035 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
2036 aug_data_len.
2037 (offset_adjust): New function.
2038 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
2039 (adjust_eh_frame_local_symbols): Likewise.
2040 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
2041 after changing anything. Return true if anything changed.
2042 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
2043 _bfd_elf_adjust_eh_frame_global_symbol for globals.
2044
641338d8
AM
20452017-04-27 Alan Modra <amodra@gmail.com>
2046
2047 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
2048 when force_local.
2049
21d68fcd
AM
20502017-04-27 Alan Modra <amodra@gmail.com>
2051
2052 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2053 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
2054 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
2055 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
2056 for undef and undefweak dyn_relocs.
2057 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
2058 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
2059 (allocate_got, allocate_dynrelocs): Likewise.
2060 (ppc64_elf_relocate_section): Likewise.
2061
97d343d4
L
20622017-04-26 H.J. Lu <hongjiu.lu@intel.com>
2063
2064 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
2065 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
2066 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
2067 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
2068
04b31182
NC
20692017-04-26 Nick Clifton <nickc@redhat.com>
2070
2071 PR binutils/21434
2072 * reloc.c (bfd_perform_relocation): Check for a negative address
2073 in the reloc.
2074
23ec1e32
MR
20752017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2076
2077 PR ld/21334
2078 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
2079 member.
2080 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
2081 (elf_backend_always_renumber_dynsyms): Define.
2082 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
2083 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
2084 * elflink.c (bfd_elf_size_dynamic_sections): Also call
2085 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
2086 it.
2087 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
2088
c46cec3a
MR
20892017-04-26 Maciej W. Rozycki <macro@imgtec.com>
2090
2091 * elflink.c (bfd_elf_size_dynamic_sections): Only call
2092 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
2093 sections have been created.
2094
e63d1232
NC
20952017-04-26 Nick Clifton <nickc@redhat.com>
2096
2097 PR binutils/21431
2098 * compress.c (bfd_init_section_compress_status): Check the return
2099 value from bfd_malloc.
2100
9e9821dd
L
21012017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2102
2103 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
2104 no_finish_dynamic_symbol.
2105 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
2106 0.
2107 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
2108 weak symbol, don't make it dynamic.
2109 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
2110 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
2111 relocation for GOT reference.
2112 (elf_x86_64_finish_dynamic_symbol): Abort if
2113 no_finish_dynamic_symbol isn't 0.
2114
0dc9a308
L
21152017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2116
2117 PR ld/21402
2118 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
2119 undefined weak symbol, don't make it dynamic.
2120 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
2121 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2122 relocation for R_386_GOT32.
2123
1587442d
L
21242017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2125
2126 PR ld/21425
2127 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
2128
7eacd66b
AM
21292017-04-23 Alan Modra <amodra@gmail.com>
2130
2131 PR 21414
2132 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
2133 * elf.c (lcomm_sym): New.
2134 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
2135 * bfd-in2.h: Regenerate.
2136
bce964aa
AM
21372017-04-23 Alan Modra <amodra@gmail.com>
2138
2139 PR 21412
2140 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
2141 parameters and comment.
2142 (_bfd_elf_get_reloc_section): Delete.
2143 (_bfd_elf_plt_get_reloc_section): Declare.
2144 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
2145 New functions. Don't blindly skip over assumed .rel/.rela prefix.
2146 Extracted from..
2147 (_bfd_elf_get_reloc_section): ..here. Delete.
2148 (assign_section_numbers): Call elf_get_reloc_section.
2149 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
2150 * elfxx-target.h (elf_backend_get_reloc_section): Update.
2151
97e83a10
AM
21522017-04-23 Alan Modra <amodra@gmail.com>
2153
2154 PR 21409
2155 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
2156 no symbols.
2157
e133d005
L
21582017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2159
2160 PR ld/21402
2161 * elf32-i386.c (elf_i386_link_hash_entry): Add
2162 no_finish_dynamic_symbol.
2163 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
2164 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
2165 symbol, don't make it dynamic in PIE.
2166 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
2167 set no_finish_dynamic_symbol and generate R_386_RELATIVE
2168 relocation for R_386_GOT32
2169 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
2170 isn't 0.
2171
3c5fce9b
L
21722017-04-21 H.J. Lu <hongjiu.lu@intel.com>
2173
2174 PR ld/19617
2175 PR ld/21086
2176 * elflink.c (elf_link_add_object_symbols): Require
2177 --no-dynamic-linker with -E/--dynamic-list when creating
2178 dynamic sections.
2179
0fad2956
MR
21802017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2181
2182 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
2183 if forced local.
2184
64575f78
MR
21852017-04-20 Maciej W. Rozycki <macro@imgtec.com>
2186
2187 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
2188 dynamic symbol sorting.
2189
59fa66c5
L
21902017-04-20 H.J. Lu <hongjiu.lu@intel.com>
2191
2192 PR ld/21382
2193 * elflink.c (elf_link_add_object_symbols): Preserve
2194 dynamic_ref_after_ir_def when restoring the symbol table for
2195 unneeded dynamic object.
2196
e492d2f8
L
21972017-04-19 H.J. Lu <hongjiu.lu@intel.com>
2198
2199 PR ld/21401
2200 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
2201 on on undefined IFUNC symbol in the second PLT.
2202
10169134
WAF
22032017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
2204
2205 * peXXigen.c (pe_print_reloc): Correct chunk_end.
2206
954b63d4
AM
22072017-04-19 Alan Modra <amodra@gmail.com>
2208
2209 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
2210 or make dynamic for info->dynamic_undefined_weak 0 and 1.
2211 * elf32-ppc.c:Formatting.
2212 (ensure_undefweak_dynamic): Don't make dynamic when
2213 info->dynamic_undefined_weak is zero.
2214 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2215 info->dynamic_undefined_weak. Discard undef dyn_relocs when
2216 not default visibility. Discard undef and undefweak
2217 dyn_relocs earlier.
2218 (ppc_elf_relocate_section): Adjust to suit.
2219 * elf64-ppc.c: Formatting.
2220 (ensure_undefweak_dynamic): Don't make dynamic when
2221 info->dynamic_undefined_weak is zero.
2222 (allocate_dynrelocs): Discard undefweak dyn_relocs for
2223 info->dynamic_undefined_weak. Discard them earlier.
2224
e6699019
L
22252017-04-17 H.J. Lu <hongjiu.lu@intel.com>
2226
2227 PR ld/21389
2228 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
2229 before generating the version definition section.
2230
c5d37467
AM
22312017-04-17 Alan Modra <amodra@gmail.com>
2232
2233 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
2234 state when a regular object file defines a symbol with
2235 incompatible type to that defined by an earlier shared lib.
2236
63a5468a
AM
22372017-04-13 Alan Modra <amodra@gmail.com>
2238
2239 * coffcode.h: Wrap some overly long _bfd_error_handler args.
2240 * elf.c: Likewise.
2241 * elf32-arm.c: Likewise.
2242 * elf32-i386.c: Likewise.
2243 * elf32-mep.c: Likewise.
2244 * elf64-ia64-vms.c: Likewise.
2245 * elf64-x86-64.c: Likewise.
2246 * elflink.c: Likewise.
2247 * elfnn-ia64.c: Likewise.
2248 * elfxx-mips.c: Likewise.
2249
dae82561
AM
22502017-04-13 Alan Modra <amodra@gmail.com>
2251
2252 * aoutx.h: Use %B and %A in error messages throughout file.
2253 * aout-cris.c: Likewise.
2254 * archive.c: Likewise.
2255 * binary.c: Likewise.
2256 * coff-rs6000.c: Likewise.
2257 * coff-tic4x.c: Likewise.
2258 * coffcode.h: Likewise.
2259 * coffgen.c: Likewise.
2260 * cofflink.c: Likewise.
2261 * coffswap.h: Likewise.
2262 * cpu-arm.c: Likewise.
2263 * elf-eh-frame.c: Likewise.
2264 * elf-m10300.c: Likewise.
2265 * elf.c: Likewise.
2266 * elf32-arc.c: Likewise.
2267 * elf32-arm.c: Likewise.
2268 * elf32-bfin.c: Likewise.
2269 * elf32-frv.c: Likewise.
2270 * elf32-iq2000.c: Likewise.
2271 * elf32-m32c.c: Likewise.
2272 * elf32-microblaze.c: Likewise.
2273 * elf32-nds32.c: Likewise.
2274 * elf32-rl78.c: Likewise.
2275 * elf32-rx.c: Likewise.
2276 * elf32-score.c: Likewise.
2277 * elf32-score7.c: Likewise.
2278 * elf32-sh64.c: Likewise.
2279 * elf32-v850.c: Likewise.
2280 * elf32-vax.c: Likewise.
2281 * elf32-visium.c: Likewise.
2282 * elf64-ia64-vms.c: Likewise.
2283 * elf64-mmix.c: Likewise.
2284 * elf64-sh64.c: Likewise.
2285 * elfcode.h: Likewise.
2286 * elfnn-aarch64.c: Likewise.
2287 * elfnn-ia64.c: Likewise.
2288 * elfxx-mips.c: Likewise.
2289 * hpux-core.c: Likewise.
2290 * ieee.c: Likewise.
2291 * ihex.c: Likewise.
2292 * linker.c: Likewise.
2293 * merge.c: Likewise.
2294 * mmo.c: Likewise.
2295 * oasys.c: Likewise.
2296 * pdp11.c: Likewise.
2297 * peXXigen.c: Likewise.
2298 * rs6000-core.c: Likewise.
2299 * vms-alpha.c: Likewise.
2300 * xcofflink.c: Likewise.
2301
c08bb8dd
AM
23022017-04-13 Alan Modra <amodra@gmail.com>
2303
2304 * bfd.c (PRINT_TYPE): Define.
2305 (_doprnt): New function.
2306 (error_handler_internal): Use _doprnt.
2307 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
2308 calls in their natural order, throughout file.
2309 * coff-mcore.c: Likewise.
2310 * coff-ppc.c: Likewise.
2311 * coff-tic80.c: Likewise.
2312 * cofflink.c: Likewise.
2313 * elf-s390-common.c: Likewise.
2314 * elf.c: Likewise.
2315 * elf32-arm.c: Likewise.
2316 * elf32-i386.c: Likewise.
2317 * elf32-m32r.c: Likewise.
2318 * elf32-msp430.c: Likewise.
2319 * elf32-spu.c: Likewise.
2320 * elf64-ia64-vms.c: Likewise.
2321 * elf64-sparc.c: Likewise.
2322 * elf64-x86-64.c: Likewise.
2323 * elflink.c: Likewise.
2324 * elfnn-aarch64.c: Likewise.
2325 * elfnn-ia64.c: Likewise.
2326 * elfxx-mips.c: Likewise.
2327
10463f39
AM
23282017-04-13 Alan Modra <amodra@gmail.com>
2329
2330 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
2331 branch veneers" error. Fix double space and format message.
2332 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
2333 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
2334
4af8774e
AM
23352017-04-13 Alan Modra <amodra@gmail.com>
2336
2337 * bfd-in2.h: Regenerate.
2338
e4097f5e
L
23392017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2340
2341 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
2342 extra `\n' in warning/error messages.
2343 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
2344 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2345
537616aa
L
23462017-04-11 H.J. Lu <hongjiu.lu@intel.com>
2347
2348 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
2349 processor-specific properties with generic ELF target vector.
2350
bb1dd176
QZ
23512017-04-10 Qing Zhao <qing.zhao@oracle.com>
2352
2353 * elf32-sparc.c (elf_backend_fixup_symbol): New.
2354 * elf64-sparc.c (elf_backend_fixup_symbol): New.
2355 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
2356 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
2357 has_non_got_reloc.
2358 (link_hash_newfunc): Initialize has_got_reloc and
2359 has_non_got_reloc.
2360 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
2361 section.
2362 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
2363 has_non_got_reloc.
2364 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
2365 has_non_got_reloc.
2366 (_bfd_sparc_elf_fixup_symbol): New function.
2367 (allocate_dynrelocs): Don't allocate space for dynamic
2368 relocations and discard relocations against resolved undefined
2369 weak symbols in executable. Don't make resolved undefined weak
2370 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
2371 relocation against undefined weak symbols in PIE.
2372 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
2373 relocations against resolved undefined weak symbols in PIE
2374 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
2375 without ynamic PLT/GOT relocations for resolved undefined weak
2376 symbols.
2377 Don't generate dynamic relocation against resolved undefined
2378 weak symbol in executable.
2379 (pie_finish_undefweak_symbol): New function.
2380 (_bfd_sparc_elf_finish_dynamic_sections): Call
2381 pie_finish_undefweak_symbol on all symbols in PIE.
2382 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
2383 (_bfd_sparc_elf_fixup_symbol): New function.
2384
d236cfd4
NC
23852017-04-10 Nick Clifton <nickc@redhat.com>
2386
2387 * config.bfd: Remove ns32k from obsolete list.
2388
6f9dbcd4
AM
23892017-04-10 Alan Modra <amodra@gmail.com>
2390
2391 PR 21287
2392 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
2393 (special_sections_i): Likewise for .init_array.
2394 (special_sections_p): Likewise for .preinit_array.
2395
8170f769
L
23962017-04-07 H.J. Lu <hongjiu.lu@intel.com>
2397
2398 PR ld/19579
2399 PR ld/21306
2400 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
2401 ELF_COMMON_DEF_P for common symbols.
2402 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2403 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2404 * elflink.c (_bfd_elf_merge_symbol): Revert commits
2405 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
2406 07492f668d2173da7a2bda3707ff0985e0f460b6.
2407
49f4617b
PA
24082017-04-07 Pedro Alves <palves@redhat.com>
2409
2410 * opncls.c (bfd_get_debug_link_info): Rename to...
2411 (bfd_get_debug_link_info_1): ... this. Change type of second
2412 parameter to void pointer. Adjust.
2413 (bfd_get_debug_link_info): Reimplement on top of
2414 bfd_get_debug_link_info_1.
2415 (separate_debug_file_exists, separate_alt_debug_file_exists):
2416 Change type of second parameter to void pointer. Adjust.
2417 (get_func_type, check_func_type): Change type of second parameter
2418 to void pointer.
2419 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
2420 the callback functions instead of passing the address of a local.
2421 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
2422 find_separate_debug_file.
2423 (get_alt_debug_link_info_shim): Change type of second parameter to
2424 void pointer. Adjust.
2425 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
2426 find_separate_debug_file.
2427 (get_build_id_name, bfd_boolean check_build_id_file): Change type
2428 of second parameter to void pointer. Adjust.
2429 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
2430 pointer local to find_separate_debug_file.
2431
24322017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
1fd6d111
TG
2433
2434 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
2435 external symbols with a definition.
2436 (_bfd_coff_gc_mark_extra_sections): Fix typo.
2437
86abf93a
AM
24382017-04-07 Alan Modra <amodra@gmail.com>
2439
2440 * po/SRC-POTFILES.in: Regenerate.
2441
8dea77f0
AM
24422017-04-05 Alan Modra <amodra@gmail.com>
2443
2444 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
2445 reference counting.
2446
477bdd39
JT
24472017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
2448
2449 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
2450 numbers for DataDirectory entry indicies passed to
2451 add_data_entry().
2452
a91e1603
L
24532017-04-04 H.J. Lu <hongjiu.lu@intel.com>
2454
2455 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
2456 each GNU_MBIND section and align GNU_MBIND section to page size.
2457 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
2458 segment for each GNU_MBIND section.
2459 (_bfd_elf_init_private_section_data): Copy sh_info from input
2460 for GNU_MBIND section.
2461
b5292032
PD
24622017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
2463
2464 * elfnn-riscv.c (GP_NAME): Delete.
2465 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
2466 (_bfd_riscv_relax_lui): Likewise.
2467
ad32986f
NC
24682017-04-04 Nick Clifton <nickc@redhat.com>
2469
2470 PR binutils/21342
2471 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
2472 dereference.
2473 (bfd_elf_final_link): Only initialize the extended symbol index
2474 section if there are extended symbol tables to list.
2475
46bed679
L
24762017-04-03 H.J. Lu <hongjiu.lu@intel.com>
2477
2478 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
2479 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
2480 * configure.ac (elf): Add elf-properties.lo.
2481 * Makefile.in: Regenerated.
2482 * configure: Likewise.
2483 * elf-bfd.h (elf_property_kind): New.
2484 (elf_property): Likewise.
2485 (elf_property_list): Likewise.
2486 (elf_properties): Likewise.
2487 (_bfd_elf_parse_gnu_properties): Likewise.
2488 (_bfd_elf_get_property): Likewise.
2489 (_bfd_elf_link_setup_gnu_properties): Likewise.
2490 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
2491 and setup_gnu_properties.
2492 (elf_obj_tdata): Add properties.
2493 * elf-properties.c: New file.
2494 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
2495 (elf_i386_merge_gnu_properties): Likewise.
2496 (elf_backend_parse_gnu_properties): Likewise.
2497 (elf_backend_merge_gnu_properties): Likewise.
2498 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
2499 (elf_x86_64_merge_gnu_properties): Likewise.
2500 (elf_backend_parse_gnu_properties): Likewise.
2501 (elf_backend_merge_gnu_properties): Likewise.
2502 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
2503 (elf_backend_parse_gnu_properties): Likewise.
2504 (elf_backend_setup_gnu_properties): Likewise.
2505 (elfNN_bed): Add elf_backend_parse_gnu_properties,
2506 elf_backend_merge_gnu_properties and
2507 elf_backend_setup_gnu_properties.
2508
f96bd6c2
PC
25092017-03-30 Pip Cet <pipcet@gmail.com>
2510
2511 * elf32-wasm32.c: Add relocation code, two relocs.
2512 * reloc.c: Add wasm32 relocations.
2513 * libbfd.h: Regenerate.
2514 * bfd-in2.h: Regenerate.
2515 * bfd/po/bfd.pot: Regenerate.
2516
e643cb45
NC
25172017-03-29 Nick Clifton <nickc@redhat.com>
2518
2519 PR binutils/18025
2520 * coff-bfd.h (struct coff_section_data): Add new fields:
2521 saved_bias and bias.
2522 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
2523 computed for PE binaries.
2524 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
2525 missing abbrev.
2526
086554e8
HPN
25272017-03-28 Hans-Peter Nilsson <hp@axis.com>
2528
2529 PR ld/16044
2530 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
2531 to handle a local symbol with a hash-symbol-entry; without PLT.
2532 Add BFD_ASSERT for an incidental case with GOT entry present.
2533 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
2534 isn't forced-or-set local.
2535
a6be0538
PC
25362017-03-27 Pip Cet <pipcet@gmail.com>
2537
2538 * wasm-module.c: New file to support WebAssembly modules.
2539 * wasm-module.h: New file to support WebAssembly modules.
2540 * doc/webassembly.texi: Start documenting wasm-module.c.
2541 * config.bfd: Add wasm_vec.
2542 * targets.c: Likewise.
2543 * configure.ac: Likewise.
2544 * Makefile.am: Add entries for wasm-module.c.
2545 * Makefile.in: Regenerate.
2546 * configure: Regenerate.
2547 * po/SRC-POTFILES.in: Regenerate.
2548
79b1d3cb
PC
25492017-03-27 Pip Cet <pipcet@gmail.com>
2550
2551 * cpu-wasm32.c: New file to support wasm32 architecture.
2552 * elf32-wasm32.c: New file to support wasm32 architecture.
2553 * Makefile.am: Add wasm32 architecture.
2554 * archures.c: Likewise.
2555 * config.bfd: Likewise.
2556 * configure.ac: Likewise.
2557 * targets.c: Likewise.
2558 * Makefile.in: Regenerate.
2559 * bfd-in2.h: Regenerate.
2560 * configure: Regenerate.
2561 * po/SRC-POTFILES.in: Regenerate.
2562
aaed6f5b
AM
25632017-03-20 Alan Modra <amodra@gmail.com>
2564
2565 PR 21266
2566 * elf64-ppc.c (compare_symbols): Stabilize sort.
2567
82e66161
AM
25682017-03-18 Alan Modra <amodra@gmail.com>
2569
2570 * elf64-ppc.c (struct ppc_link_hash_table): Add
2571 local_ifunc_resolver and maybe_local_ifunc_resolver.
2572 (ppc_build_one_stub): Set flags on emitting dynamic
2573 relocation to ifunc.
2574 (ppc64_elf_relocate_section): Likewise.
2575 (ppc64_elf_finish_dynamic_symbol): Likewise.
2576 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
2577 local dynamic relocs to ifuncs.
2578 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
2579 local_ifunc_resolver and maybe_local_ifunc_resolver.
2580 (ppc_elf_relocate_section): Set flag on emitting dynamic
2581 relocation to ifuncs.
2582 (ppc_elf_finish_dynamic_symbol): Likewise.
2583 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
2584 dynamic relocs to ifuncs.
2585
f955cccf
NC
25862017-03-13 Nick Clifton <nickc@redhat.com>
2587
2588 PR binutils/21202
2589 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
2590 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
2591 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
2592 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
2593 * bfd-in2.h: Regenerate.
2594 * libbfd.h: Regenerate.
2595 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
2596 names.
2597 (IS_AARCH64_TLSDESC_RELOC): Likewise.
2598 (elfNN_aarch64_howto_table): Likewise.
2599 (aarch64_tls_transition_without_check): Likewise.
2600 (aarch64_reloc_got_type): Likewise.
2601 (elfNN_aarch64_final_link_relocate): Likewise.
2602 (elfNN_aarch64_tls_relax): Likewise.
2603 (elfNN_aarch64_relocate_section): Likewise.
2604 (elfNN_aarch64_gc_sweep_hook): Likewise.
2605 (elfNN_aarch64_check_relocs): Likewise.
2606 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
2607 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2608
4aef7643
AM
26092017-03-11 Alan Modra <amodra@gmail.com>
2610
2611 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
2612 parameter is in fact used. Whitespace fixes.
2613 * elf64-ppc.c: Likewise.
2614
f03265d9
ST
26152017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
2616
2617 * rs6000-core.c (CORE_NEW): Simplify macro when
2618 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
2619
b1b07054
AM
26202017-03-07 Alan Modra <amodra@gmail.com>
2621
2622 PR 21224
2623 PR 20519
2624 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
2625 dyn_relocs check.
2626
2e0ce1c8
AM
26272017-03-05 Alan Modra <amodra@gmail.com>
2628
2629 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
2630 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
2631 (next_cie_fde_offset): New function.
2632 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
2633 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
2634 four bytes. Align CIEs to four or eight bytes depending on
2635 per_encoding_aligned8. Align FDEs according to their encoding.
2636 Pad last FDE to output section alignment.
2637 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
2638 assertion.
2639 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
2640 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
2641 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
2642
f98450c6
NC
26432017-03-02 Martin Bickel <binutils@ineranves.de>
2644
2645 PR ld/21212
2646 * elf.c (rewrite_elf_program_header): Do not issue a warning for
d20928fa 2647 empty segments which have a zero filesz, but a non-zero memsz.
f98450c6 2648
673cff9b
AM
26492017-03-02 Alan Modra <amodra@gmail.com>
2650
2651 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
2652
3de43e7b
AM
26532017-02-28 Alan Modra <amodra@gmail.com>
2654
2655 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
2656 (ppc64_elf_relocate_section): Likewise.
2657
4ef97a1b
AM
26582017-02-28 Alan Modra <amodra@gmail.com>
2659
2660 PR 20995
2661 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
2662 rather than elf32_nios2_hash_table or elf_hash_table.
2663 (create_got_section): Likewise.
2664 (nios2_elf32_finish_dynamic_symbol): Likewise.
2665 (nios2_elf32_adjust_dynamic_symbol): Likewise.
2666 (nios2_elf32_size_dynamic_sections): Likewise.
2667 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
2668 vars. Use htab equivalents directly instead. Don't create
2669 all dynamic sections on needing just the GOT. Use a goto
2670 rather than a fall-through with reloc test. Ensure
2671 htab->dynobj is set when making dynamic sreloc section.
2672 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
2673 equivalent directly instead. Don't segfault on looking for
2674 .dynamic when dynamic sections have not been created. Don't
2675 segfault on .got.plt being discarded.
2676 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
2677 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
2678 fixme and another not so relevant comment.
2679 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
2680 already set, set hash table dynobj on creating .sbss.
2681
7ba71655
AM
26822017-02-28 Alan Modra <amodra@gmail.com>
2683
2684 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
2685 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
2686 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
2687 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
2688 (ppc64_elf_relocate_section): Likewise.
2689 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
2690 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
2691 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
2692 * libbfd.h: Regenerate.
2693 * bfd-in2.h: Regenerate.
2694
afbf7e8e
AM
26952017-02-28 Alan Modra <amodra@gmail.com>
2696
2697 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
2698 dynamic .data.rel.ro read-only.
2699 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
2700 rather than section flags when deciding where copy reloc goes.
2701 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
2702 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
2703 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
2704 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
2705 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
2706 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
2707 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
2708 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
2709 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2710 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
2711 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
2712 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
2713 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2714 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
2715 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
2716 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
2717 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
2718 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
2719 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
2720
0e392101
MR
27212017-02-28 Maciej W. Rozycki <macro@imgtec.com>
2722
2723 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
2724 `jalr $0, $25' instruction encoding.
2725
bd757ca7
NC
27262017-02-27 Nick Clifton <nickc@redhat.com>
2727
2728 PR ld/21180
2729 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
2730 generating a seg-fault when encountering a symbol that has been
2731 deleted by garbage collection.
2732
034fed0b
AM
27332017-02-25 Alan Modra <amodra@gmail.com>
2734
2735 * elf32-arc.c (struct dynamic_sections): Delete.
2736 (enum dyn_section_types): Delete.
2737 (dyn_section_names): Delete.
2738 (arc_create_dynamic_sections): Delete.
2739 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
2740 segfault on discarded .rela.plt section.
2741 (elf_arc_size_dynamic_sections): Formatting. Don't call
2742 arc_create_dynamic_sections. Don't allocate memory for sections
2743 handled by the generic linker. Correct code finding relocs in
2744 read-only sections. Set SEC_EXCLUDE on zero size .got,
2745 .got.plt, and .dynbss sections. Do set .interp for pies.
2746
d0f744f9
AW
27472017-02-24 Andrew Waterman <andrew@sifive.com>
2748
2749 * elfnn-riscv.c (GP_NAME): New macro.
2750 (riscv_global_pointer_value): Use it.
2751 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
2752 output section, consider only that section's alignment.
2753
5d58c733
MR
27542017-02-23 Maciej W. Rozycki <macro@imgtec.com>
2755
2756 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
2757 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
2758 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
2759 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
2760
c1556ecd
MR
27612017-02-23 Maciej W. Rozycki <macro@imgtec.com>
2762
2763 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
2764 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
2765 or misaligned.
2766
5499c7c7
AM
27672017-02-23 Alan Modra <amodra@gmail.com>
2768
2769 PR 20744
2770 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
2771 16D relocations.
2772 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
2773 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
2774 relocs.
2775
902e9fc7
MR
27762017-02-22 Maciej W. Rozycki <macro@imgtec.com>
2777
2778 PR ld/20828
2779 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
2780 processing ahead of the call to `elf_gc_sweep_symbol'.
2781
758d96d8
NC
27822017-02-22 Nick Clifton <nickc@redhat.com>
2783
2784 PR binutils/21193
2785 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
2786 created section 4-byte alignment.
2787
6528b6eb
AM
27882017-02-22 Alan Modra <amodra@gmail.com>
2789
2790 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
2791 on .got or .plt output section being discarded by script.
2792 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
2793 vxworks splt temp.
2794
24f1a751
AM
27952017-02-21 Alan Modra <amodra@gmail.com>
2796
2797 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
2798 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
2799
64487780
AM
28002017-02-20 Alan Modra <amodra@gmail.com>
2801
2802 PR 21181
2803 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
2804 if DT_RELSZ/DT_RELASZ is zero.
2805
6438d1be
NC
28062017-02-17 Nick Clifton <nickc@redhat.com>
2807
2808 * compress.c (bfd_get_full_section_contents): Remember to reduce
2809 compressed size by the sizeof the compression header when
2810 decompressing the contents.
2811
4bc26c69
PA
28122017-02-17 Pedro Alves <palves@redhat.com>
2813
2814 * srec.c (Chunk): Rename to ...
2815 (_bfd_srec_len): ... this.
2816 (S3Forced): Rename to ...
2817 (_bfd_srec_forceS3): ... this.
2818 * objcopy.c: Adjust all references.
2819
7ec22e0f
PA
28202017-02-17 Pedro Alves <palves@redhat.com>
2821
2822 * archive.c (bsd_write_armap): Rename to ...
2823 (_bfd_bsd_write_armap): ... this.
2824 (coff_write_armap): Rename to ...
2825 (_bfd_coff_write_armap): ... this.
2826 * libbfd-in.h (bsd_write_armap): Rename to ...
2827 (_bfd_bsd_write_armap): ... this.
2828 (coff_write_armap): Rename to ...
2829 (_bfd_coff_write_armap): ... this.
2830 * aout-target.h, aout-tic30.c: Adjust all users.
2831 * libbfd.h: Regenerate.
2832
8c8402cc
PA
28332017-02-17 Pedro Alves <palves@redhat.com>
2834
2835 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
2836 (warn_deprecated): Rename to ...
2837 (_bfd_warn_deprecated): ... this.
2838 * libbfd.c (warn_deprecated): Rename to ...
2839 (_bfd_warn_deprecated): ... this.
2840 * bfd-in2.h: Regenerate.
2841
c7c3d11b
PA
28422017-02-17 Pedro Alves <palves@redhat.com>
2843
2844 * bfdio.c (real_ftell): Rename to ...
2845 (_bfd_real_ftell): ... this.
2846 (real_fseek): Rename to ...
2847 (_bfd_real_fseek): ... this.
2848 (real_fopen): Rename to ...
2849 (_bfd_real_fopen): ... this.
2850 * libbfd-in.h (real_ftell): Rename to ...
2851 (_bfd_real_ftell): ... this.
2852 (real_fseek): Rename to ...
2853 (_bfd_real_fseek): ... this.
2854 (real_fopen): Rename to ...
2855 (_bfd_real_fopen): ... this.
2856 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
2857 * libbfd.h: Regenerate.
2858
4265548c
PA
28592017-02-17 Pedro Alves <palves@redhat.com>
2860
2861 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
2862 * libbfd.c (read_unsigned_leb128): Rename to ...
2863 (_bfd_read_unsigned_leb128): ... this.
2864 (read_signed_leb128): Rename to ...
2865 (_bfd_read_signed_leb128): ... this.
2866 (safe_read_leb128): Rename to ...
2867 (_bfd_safe_read_leb128): ... this.
2868 * libbfd-in.h (read_unsigned_leb128): Rename to ...
2869 (_bfd_read_unsigned_leb128): ... this.
2870 (read_signed_leb128): Rename to ...
2871 (_bfd_read_signed_leb128): ... this.
2872 (safe_read_leb128): Rename to ...
2873 (_bfd_safe_read_leb128): ... this.
2874 * libbfd.h: Renegerate.
2875
3239a423
AB
28762017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
2877
2878 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
2879 before trying to fine matching file and line information.
2880
90ed9b8b
AB
28812017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
2882
2883 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
2884 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
2885 not match current bfd, then reload debug information. Record bfd
2886 we're loading debug info for in the stash. If we have debug
2887 informatin in the cache then perform section placement before
2888 returning.
2889
a8c75b76
AM
28902017-02-16 Alan Modra <amodra@gmail.com>
2891
2892 PR 21000
2893 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
2894 * elfxx-target.h (elf_backend_no_page_alias): Define.
2895 (elfNN_bed): Init new field.
2896 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
2897 ensure PT_LOAD segment starts on a new page.
2898 * elf32-hppa.c (elf_backend_no_page_alias): Define.
2899
247d6c4c
AM
29002017-02-16 Alan Modra <amodra@gmail.com>
2901
2902 PR 21132
2903 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
2904 if pic.
2905
90571206
JW
29062017-02-16 Jiong Wang <jiong.wang@arm.com>
2907
2908 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
2909 * bfd-in2.h: Regenerated.
2910
2a568401
L
29112017-02-15 H.J. Lu <hongjiu.lu@intel.com>
2912
2913 PR ld/21168
2914 * elf32-i386.c (elf_i386_relocate_section): Allow
2915 "lea foo@GOT, %reg" in PIC.
2916
a5def14f
L
29172017-02-15 H.J. Lu <hongjiu.lu@intel.com>
2918
2919 PR ld/20244
2920 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
2921 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
2922 error against local IFUNC symbol without a base register for
2923 PIC.
2924
174d0a74
MR
29252017-02-15 Maciej W. Rozycki <macro@imgtec.com>
2926
2927 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
2928 `%P: %H:' with `info->callbacks->einfo'.
2929 (ppc_elf_relocate_section): Likewise.
2930 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
2931 (ppc64_elf_edit_toc): Likewise.
2932 (ppc64_elf_relocate_section): Likewise.
2933
e278ae05
AM
29342017-02-14 Alan Modra <amodra@gmail.com>
2935
2936 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
2937 --gc-keep-exported, and test versioned field of sym rather than
2938 looking for @ in name.
2939
10ddfe62
PD
29402017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
2941
2942 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
2943 __global_pointer$.
2944
d11135f5
NC
29452017-02-13 Nick Clifton <nickc@redhat.com>
2946
2947 PR binutils/21151
2948 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
2949 unit length field.
2950
cc162427
AW
29512017-02-07 Andrew Waterman <andrew@sifive.com>
2952
2953 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
2954 entry size if PLT header is written.
2955
3d044c0c
SL
29562017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
2957
2958 Fix sparc64 dynamic relocation processing to use the dynamic
2959 symbol count.
2960 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
2961 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
2962 should be used.
2963
1b7e3d2f
NC
29642017-02-03 Nick Clifton <nickc@redhat.com>
2965
2966 PR 21096
2967 * coffcode.h (coff_write_object_contents): Enlarge size of
2968 s_name_buf in order to avoid compile time warning about possible
2969 integer truncation.
2970 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
2971 32-bits of insn value before printing into buffer.
2972
e17b0c35
MR
29732017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2974
2975 * elfxx-mips.c (mips_elf_hash_sort_data): Add
2976 `max_local_dynindx'.
2977 (mips_elf_sort_hash_table): Handle it.
2978 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
2979 symbols bump up `max_local_dynindx' rather than
2980 `max_non_got_dynindx'.
2981
55f8b9d2
MR
29822017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2983
2984 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
2985 `min_got_dynindx', `max_unref_got_dynindx' and
2986 `max_non_got_dynindx' members to the `bfd_size_type' data type.
2987 (mips_elf_sort_hash_table): Adjust accordingly.
2988
0f8c4b60
MR
29892017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2990
2991 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
2992 to access the hash table.
2993
17a80fa8
MR
29942017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2995
2996 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
2997 non-NULL `htab' to the beginning.
2998
8f56d4fd
MR
29992017-02-02 Maciej W. Rozycki <macro@imgtec.com>
3000
3001 * elflink.c (elf_gc_sweep): Wrap overlong line.
3002
8b10b0b3
MR
30032017-01-30 Maciej W. Rozycki <macro@imgtec.com>
3004
3005 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
3006 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
3007 * elfxx-mips.c (mips_elf_link_hash_table): Add
3008 `ignore_branch_isa' member.
3009 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
3010 in branch relocation calculation as an error if
3011 `ignore_branch_isa' has been set.
3012 (_bfd_mips_elf_insn32): Rename to...
3013 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
3014 parameter to `insn32' and add an `ignore_branch_isa' parameter.
3015 Handle the new parameter.
3016
1fbd05e1
HPN
30172017-01-27 Hans-Peter Nilsson <hp@axis.com>
3018
22d9a0de
HPN
3019 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
3020 local variable dynobj.
3021
1fbd05e1
HPN
3022 PR ld/20995
3023 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
3024 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
3025 executable from read-only sections into sdynrelro.
3026 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
3027 dynamic relocs in sdynrelro.
3028 (elf_backend_want_dynrelro): Define.
3029
4a7324e1
SH
30302017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3031
3032 * config.bfd (*-*-rtemsaout*): Mark as removed.
3033
c75b4ebd
SH
30342017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3035
3036 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
3037 (arm-*-rtems*): Move to (arm*-*-eabi*).
3038 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
3039 (m68-*-rtems*): Move to (m68*-*-elf*).
3040
850d84f6
SH
30412017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
3042
3043 * config.bfd (*-*-rtemscoff*): Mark as removed.
3044
b531344c
MR
30452017-01-24 Maciej W. Rozycki <macro@imgtec.com>
3046
3047 PR ld/20828
3048 * elflink.c (bfd_elf_record_link_assignment): Revert last
3049 change and don't ever clear `forced_local'. Set `mark'
3050 unconditionally.
3051 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
3052 file.
3053 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
3054 (bfd_elf_size_dynamic_sections): ... here.
3055 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
3056 and set `mark' instead in `__tls_get_addr_opt' processing.
3057 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
3058
f0158f44
AM
30592017-01-24 Alan Modra <amodra@gmail.com>
3060
3061 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
3062 where dynamic relocs are preferable. Allow ifunc too.
3063 (ensure_undefweak_dynamic): New function.
3064 (allocate_dynrelocs): Use it here. Move plt handling last and
3065 don't make symbols dynamic, simplifying loop. Only make undef
3066 weak symbols with GOT entries dynamic. Correct condition
3067 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
3068 comments. Remove goto.
3069 (ppc_elf_relocate_section): Correct test for using dynamic
3070 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3071 to suit. Set up explicit tls_index entries and implicit GOT
3072 tls_index entries resolvable at link time for
3073 __tls_get_addr_opt. Simplify test to clear mem for prelink.
3074 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
3075 (ensure_undefweak_dynamic): New function.
3076 (allocate_dynrelocs): Use it here. Only make undef weak symbols
3077 with GOT entries dynamic. Remove unnecessary test of
3078 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
3079 (ppc64_elf_relocate_section): Correct test for using dynamic
3080 symbol on GOT relocs. Rearrange test for emitting GOT relocs
3081 to suit. Set up explicit tls_index entries and implicit GOT
3082 tls_index entries resolvable at link time for __tls_get_addr_opt.
3083 Simplify expression to clear mem for prelink.
3084
2d0ca824
YN
30852017-01-23 Yury Norov <ynorov@caviumnetworks.com>
3086
3087 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
3088
7f784814
JW
30892017-01-20 Jiong Wang <jiong.wang@arm.com>
3090
3091 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
3092 (elf_backend_hash_symbol): Define.
3093
81ff47b3
MR
30942017-01-18 Maciej W. Rozycki <macro@imgtec.com>
3095
3096 PR ld/20828
3097 * elflink.c (bfd_elf_record_link_assignment): Clear any
3098 `forced_local' marking for DSO symbols that are not being
3099 provided.
3100
640d6bfd
KLC
31012017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3102
3103 * elfnn-riscv.c (riscv_elf_object_p): New function.
3104
8361ed4d
L
31052017-01-12 H.J. Lu <hongjiu.lu@intel.com>
3106
3107 PR ld/21038
3108 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
3109 plt_bnd_eh_frame.
3110 (elf_x86_64_check_relocs): Create .eh_frame section for the
3111 .plt.bnd section.
3112 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3113 .eh_frame section for the .plt.bnd section.
3114 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3115 for the .plt.bnd section.
3116
2425a30e
NC
31172017-01-12 Nick Clifton <nickc@redhat.com>
3118
3119 PR binutils/20876
3120 * opncls.c (find_separate_debug_file): Add include_dirs
3121 parameter. Only include the directory part of the bfd's filename
3122 in search paths if include_dirs is true. Add a couple of extra
3123 locations for looking for debug files.
3124 ( bfd_follow_gnu_debuglink): Update invocation of
3125 find_separate_debug_file.
3126 (bfd_follow_gnu_debugaltlink): Likewise.
3127 (get_build_id): New function: Finds the build-id of the given bfd.
3128 (get_build_id_name): New function: Computes the name of the
3129 separate debug info file for a bfd, based upon its build-id.
3130 (check_build_id_file): New function: Checks to see if a separate
3131 debug info file exists at the given location, and that its
3132 build-id matches that of the original bfd.
3133 (bfd_follow_build_id_debuglink): New function: Finds a separate
3134 debug info file for a given bfd by using the build-id method.
3135 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
3136 method of locating a separate debug info file before using the
3137 debuglink method.
3138 * bfd-in2.h: Regenerate.
3139
9e659176
L
31402017-01-11 H.J. Lu <hongjiu.lu@intel.com>
3141
3142 PR ld/21038
3143 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
3144 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
3145 elf_x86_64_eh_frame_plt_got.
3146 (elf_x86_64_size_dynamic_sections): Get unwind info from
3147 elf_x86_64_bnd_arch_bed for the BND PLT.
3148
f2e2d2f5
JS
31492017-01-11 Jeremy Soller <jackpot51@gmail.com>
3150
3151 * config.bfd: Add entries for i686-redox and x86_64-redox.
3152
52b232b3
L
31532017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3154
3155 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
3156 to 4 bytes.
3157 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
3158 .eh_frame section to 4 bytes for x32.
3159 (elf_x86_64_check_relocs): Likewise.
3160
fff53dae
L
31612017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3162
3163 PR ld/20830
3164 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
3165 (PLT_GOT_FDE_LENGTH): Likewise.
3166 (elf_i386_plt_layout): Add eh_frame_plt_got and
3167 eh_frame_plt_got_size.
3168 (elf_i386_plt): Updated.
3169 (elf_i386_link_hash_table): Add plt_got_eh_frame.
3170 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
3171 (elf_i386_size_dynamic_sections): Allocate and initialize
3172 .eh_frame section for .plt.got.
3173 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
3174 .plt.got.
3175 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
3176 eh_frame_plt_got_size.
3177 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
3178 (PLT_GOT_FDE_LENGTH): Likewise.
3179 (elf_x86_64_backend_data): Add eh_frame_plt_got and
3180 eh_frame_plt_got_size.
3181 (elf_x86_64_arch_bed): Updated.
3182 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
3183 eh_frame_plt_got_size.
3184 (elf_x86_64_nacl_arch_bed): Likewise.
3185 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
3186 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
3187 (elf_x86_64_size_dynamic_sections): Allocate and initialize
3188 .eh_frame section for .plt.got.
3189 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
3190 for .plt.got.
3191
f129e49f
L
31922017-01-10 H.J. Lu <hongjiu.lu@intel.com>
3193
3194 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
3195 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
3196
cd6581da
NC
31972017-01-09 Nick Clifton <nickc@redhat.com>
3198
3199 * dwarf2.c (lookup_address_in_function_table): Return early if
3200 there are no functions in the given comp unit, or if the high
3201 address of the last function in the comp unit is less than the
3202 desired address.
3203
98f02962
NC
32042017-01-09 Nick Clifton <nickc@redhat.com>
3205
3206 PR binutils/21013
3207 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
3208 message if there are too many symbols to load.
3209
ae4fda66
JC
32102017-01-04 James Clarke <jrtc27@jrtc27.com>
3211
3212 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
3213 if relocs are cached.
3214
de1010f4
RF
32152017-01-03 Rich Felker <bugdal@aerifal.cx>
3216
3217 PR ld/21017
3218 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
3219 for R_MICROBLAZE_GOTOFF_64.
3220
09fe2662
NC
32212017-01-03 Nick Clifton <nickc@redhat.com>
3222
3223 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
3224 warning about using a possibly uninitialised variable.
3225
595e0a47
AM
32262017-01-02 Alan Modra <amodra@gmail.com>
3227
3228 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
3229 (allocate_plt_static, allocate_dynrelocs): Use it.
3230
7bd9df3b
AM
32312017-01-02 Alan Modra <amodra@gmail.com>
3232
3233 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
3234 .PARISC.unwind section.
3235
5b86074c
AM
32362017-01-02 Alan Modra <amodra@gmail.com>
3237
3238 PR ld/20989
3239 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
3240 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
3241 indirect to GOT pointer relative code edit.
3242
2571583a
AM
32432017-01-02 Alan Modra <amodra@gmail.com>
3244
3245 Update year range in copyright notice of all files.
3246
5c1ad6b5 3247For older changes see ChangeLog-2016
3499769a 3248\f
5c1ad6b5 3249Copyright (C) 2017 Free Software Foundation, Inc.
3499769a
AM
3250
3251Copying and distribution of this file, with or without modification,
3252are permitted in any medium without royalty provided the copyright
3253notice and this notice are preserved.
3254
3255Local Variables:
3256mode: change-log
3257left-margin: 8
3258fill-column: 74
3259version-control: never
3260End:
This page took 0.338205 seconds and 4 git commands to generate.