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