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