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