i386-dis: Add 2 tests with invalid bnd register
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
63634bb4
NC
12017-06-15 Nick Clifton <nickc@redhat.com>
2
3 PR binutils/21582
4 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
5 bugs.
62b76e4b
NC
6 PR binutils/21581
7 (ieee_archive_p): Likewise.
63634bb4 8
76800cba
NC
92017-06-15 Nick Clifton <nickc@redhat.com>
10
11 PR binutils/21579
12 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
13
f7e16c2a
MF
142017-06-14 Max Filippov <jcmvbkbc@gmail.com>
15
16 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
17 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
18 keep both windowed and call0 ABI PLT definitions.
19 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
20 elf_xtensa_*_plt_entry endex.
21 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
22
f461bbd8
NC
232017-06-14 Nick Clifton <nickc@redhat.com>
24
25 PR binutils/21578
26 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
27 flag value.
28
c53d2e6d
NC
292017-06-14 Nick Clifton <nickc@redhat.com>
30
31 PR binutils/21589
32 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
33 maximum value for the ascic pointer. Check that name processing
34 does not read beyond this value.
35 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
36 end of etir record.
37
04f963fd
NC
382017-06-14 Nick Clifton <nickc@redhat.com>
39
40 PR binutils/21591
41 * versados.c (versados_mkobject): Zero the allocated tdata structure.
42 (process_otr): Check for an invalid offset in the otr structure.
43
319c2dbe
SH
442017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
45
46 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
47
cbd0eecf
L
482017-06-13 H.J. Lu <hongjiu.lu@intel.com>
49
50 PR ld/20022
51 PR ld/21557
52 PR ld/21562
53 PR ld/21571
54 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
55 vtable field to a union.
56 (_bfd_elf_is_start_stop): Removed.
57 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
58 __start_SECNAME and __stop_SECNAME symbols.
59 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
60 * elflink.c (_bfd_elf_is_start_stop): Removed.
61 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
62 _bfd_elf_is_start_stop.
63 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
64 __stop_SECNAME symbols. Updated.
65 (elf_gc_smash_unused_vtentry_relocs): Likewise.
66 (bfd_elf_gc_record_vtinherit): Likewise.
67 (bfd_elf_gc_record_vtentry): Likewise.
68
10bbbc1d
NC
692017-06-13 Nick Clifton <nickc@redhat.com>
70
71 PR ld/21524
72 * elflink.c (elf_link_adjust_relocs): Generate an error when
73 encountering a reloc against a symbol removed by garbage
74 collection.
75
5c3ce2bc
L
762017-06-12 H.J. Lu <hongjiu.lu@intel.com>
77
78 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
79 to merge_gnu_properties.
80 * elf-properties.c (elf_merge_gnu_properties): Add struct
81 bfd_link_info * and pass it to merge_gnu_properties.
82 (elf_merge_gnu_property_list): Add struct bfd_link_info *
83 and pass it to elf_merge_gnu_properties.
84 (_bfd_elf_link_setup_gnu_properties): Pass info to
85 elf_merge_gnu_property_list.
86 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
87 bfd_link_info *.
88 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
89
9b97dfbf
AM
902017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
91
92 PR 21564
93 * binary.c (binary_set_section_contents): Scale lma by octets
94 per byte to set filepos.
95
e3d1d408
CM
962017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
97
98 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
99 dynamic sections.
100
64aa8e03
CM
1012017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
102
103 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
104 require TEXTREL.
105
a0abe743
CM
1062017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
107
108 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
109 patched section contents for TLS IE reloc.
110 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
111
f4e6805f
CM
1122017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
113
114 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
115 RELOC_FOR_GLOBAL_SYMBOL macro.
116
cd640291
CM
1172018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
118
119 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
120 changes.
121
7ef0acc1
VG
1222017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
123
124 * config/tc-arc.c (md_undefined_symbol): Changed.
125 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
126
cc89d0b3
CM
1272017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
128
129 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
130 symbols.
131
9d5c718b
CM
1322017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
133
134 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
135 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
136
be9e3704
CM
1372017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
138
139 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
140 object is created.
141
4ec192e6
RE
1422017-06-08 Richard Earnshaw <rearnsha@arm.com>
143
144 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
145 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
146 is non-zero. Add clarifying comments.
147
51fa2693
L
1482017-06-08 H.J. Lu <hongjiu.lu@intel.com>
149
150 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
151 name. Use local IFUNC symbol name string to report unsupported
152 non-PIC call to IFUNC function.
153 (elf_i386_relocate_section): Dump local IFUNC name with minfo
154 when generating R_386_IRELATIVE relocation.
155 (elf_i386_finish_dynamic_symbol): Likewise.
156 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
157 IFUNC symbol name.
158 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
159 when generating R_X86_64_IRELATIVE relocation.
160 (elf_x86_64_finish_dynamic_symbol): Likewise.
161
78e8a2ff
JM
1622017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
163
164 * elf.c (setup_group): Make sure BFD sections are created for all
165 group sections in the input file when processing SHF_GROUP
166 sections.
167 (bfd_section_from_shdr): Avoid duplicating logic already
168 implemented in `setup_group'.
169
9949827b
DBR
1702017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
171
172 PR binutils/21546
173 * peXXigen.c (pe_print_idata): Use the address of the first thunk
174 if the hint address is zero.
175
0ee3a6db
JC
1762017-06-06 James Clarke <jrtc27@jrtc27.com>
177
178 PR ld/19579
179 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
180 ELF_COMMON_DEF_P for common symbols.
181
7bdf4127
AB
1822017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
183
184 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
185 SEC_GROUP sections as SEC_EXCLUDE.
186 (bfd_elf_set_group_contents): Replace use of abort with an assert.
187 (assign_section_numbers): Use resolve_section_groups flag instead
188 of relocatable link type.
189 (_bfd_elf_init_private_section_data): Use resolve_section_groups
190 flag instead of checking the final_link flag for part of the
191 checks in here. Fix white space as a result.
192 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
193 instead of relocatable link type.
194 (bfd_elf_final_link): Likewise.
195
458ad2b8
JM
1962017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
197
198 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
199 variable `bed'.
200 * elf32-score.c (score_elf_final_link_relocate): Likewise.
201 (s3_bfd_score_elf_check_relocs): Likewise.
202 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
203 (score_elf_final_link_relocate): Likewise.
204 (s7_bfd_score_elf_check_relocs): Likewise.
205
fbebaf4a
JM
2062017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
207
208 * elflink.c (init_reloc_cookie_rels): Remove unused variable
209 `bed'.
210
056bafd4
MR
2112017-06-06 Maciej W. Rozycki <macro@imgtec.com>
212
213 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
214 from `reloc_count' rather than decrementing it.
215 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
216 `reloc_count' by `int_rels_per_ext_rel'.
217 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
218 `reloc_count' by `int_rels_per_ext_rel' for last relocation
219 entry determination.
220 (s3_bfd_score_elf_check_relocs): Likewise.
221 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
222 (s7_bfd_score_elf_relocate_section): Likewise.
223 (s7_bfd_score_elf_check_relocs): Likewise.
224 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
225 prototype and function.
226 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
227 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
228 triple rather than once the sum of REL and RELA relocation entry
229 counts.
230 (bfd_elf64_get_reloc_upper_bound): Remove macro.
231 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
232 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
233 storage allocation size determination.
234 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
235 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
236 by `int_rels_per_ext_rel' for last relocation entry
237 determination.
238 (bfd_elf_final_link): Do not multiply `reloc_count' by
239 `int_rels_per_ext_rel' for internal relocation storage
240 allocation size determination.
241 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
242 `int_rels_per_ext_rel' for last relocation entry determination.
243 (elf_gc_smash_unused_vtentry_relocs): Likewise.
244 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
245 (_bfd_mips_elf_relocate_section): Likewise.
246
af54f0eb
AM
2472017-06-05 Alan Modra <amodra@gmail.com>
248
249 PR 21529
250 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
251
6cf3bf88 2522017-06-01 John Baldwin <jhb@FreeBSD.org>
b5430a3c
JB
253
254 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
255 determine structure sizes.
256 (elfcore_grok_freebsd_prstatus): Likewise.
257
f378ab09
AM
2582017-06-01 Alan Modra <amodra@gmail.com>
259
260 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
261 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
262 dynamic objects.
263 (is_elfv2_localentry0): New function.
264 (ppc64_elf_tls_setup): Default params->plt_localentry0.
265 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
266 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
267 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
268 optimized localentry:0 stubs.
269 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
270 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
271 localentry:0 stubs.
272 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
273 DT_PPC64_OPT.
274 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
275
8c65b54f
CS
2762017-05-30 Casey Smith <clegg89@gmail.com>
277
278 PR ld/21523
279 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
280 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
281
64984c22
AK
2822017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
283
284 * cpu-arc.c (arc_compatible): New function.
285
37cd3877
AK
2862017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
287
288 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
289
8e2f54bc
L
2902017-05-30 H.J. Lu <hongjiu.lu@intel.com>
291
292 PR binutils/21519
293 * bfdio.c (bfd_get_file_size): New function.
294 * bfd-in2.h: Regenerated.
295
8e7f04f1 2962017-05-23 Dilian Palauzov <git-dpa@aegee.org>
297
298 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
299 comments.
300
25f94347
L
3012017-05-22 H.J. Lu <hongjiu.lu@intel.com>
302
303 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
304 dynobj instead of htab->elf.dynobj.
305
e5713223
MR
3062017-05-19 Maciej W. Rozycki <macro@imgtec.com>
307
308 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
309 and function.
310 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
311 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
312 actual number of internal relocations retrieved. Adjust
313 function description.
314 (bfd_elf64_canonicalize_reloc): Remove macro.
315 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
316
64517994
JM
3172017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
318
319 * archures.c (bfd_mach_sparc_v9m8): Define.
320 (bfd_mach_sparc_v8plusm8): Likewise.
321 (bfd_mach_sparc_v9_p): Adjust to M8.
322 (bfd_mach_sparc_64bit_p): Likewise.
323 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
324 bfd_mach_sparc_v8plusm8.
325 * bfd-in2.h: Regenerated.
326 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
327 sparc:v8plusm8.
328 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
329 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
330 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
331 SHA3.
332 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
333 bfd_mach_sparc_v8plusm8.
334
eb026f09
AM
3352017-05-19 Alan Modra <amodra@gmail.com>
336
337 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
338 debug and special sections when no non-note alloc sections in an
339 object are kept.
340
535b785f
AM
3412017-05-18 Alan Modra <amodra@gmail.com>
342
343 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
344 * elf-m10300.c: Likewise.
345 * elf.c: Likewise.
346 * elf32-arc.c: Likewise.
347 * elf32-bfin.c: Likewise.
348 * elf32-m68k.c: Likewise.
349 * elf32-nds32.c: Likewise.
350 * elf32-tilepro.c: Likewise.
351 * elflink.c: Likewise.
352 * elfnn-aarch64.c: Likewise.
353 * elfnn-riscv.c: Likewise.
354 * elfxx-tilegx.c: Likewise.
355 * mach-o.c: Likewise.
356 * peXXigen.c: Likewise.
357 * vms-alpha.c: Likewise.
358 * vms-lib.c: Likewise.
359
b7c871ed
L
3602017-05-17 H.J. Lu <hongjiu.lu@intel.com>
361
362 PR ld/20882
363 * elflink.c (elf_gc_mark_debug_section): New function.
364 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
365 referenced by kept debug sections.
366
bc4e12de
AM
3672017-05-16 Alan Modra <amodra@gmail.com>
368
369 * elf-m10300.c: Rename occurrences of non_ir_ref.
370 * elf32-arm.c: Likewise.
371 * elf32-bfin.c: Likewise.
372 * elf32-cr16.c: Likewise.
373 * elf32-cris.c: Likewise.
374 * elf32-d10v.c: Likewise.
375 * elf32-dlx.c: Likewise.
376 * elf32-fr30.c: Likewise.
377 * elf32-frv.c: Likewise.
378 * elf32-hppa.c: Likewise.
379 * elf32-i370.c: Likewise.
380 * elf32-i386.c: Likewise.
381 * elf32-iq2000.c: Likewise.
382 * elf32-lm32.c: Likewise.
383 * elf32-m32c.c: Likewise.
384 * elf32-m32r.c: Likewise.
385 * elf32-m68hc1x.c: Likewise.
386 * elf32-m68k.c: Likewise.
387 * elf32-mcore.c: Likewise.
388 * elf32-metag.c: Likewise.
389 * elf32-microblaze.c: Likewise.
390 * elf32-moxie.c: Likewise.
391 * elf32-msp430.c: Likewise.
392 * elf32-mt.c: Likewise.
393 * elf32-nios2.c: Likewise.
394 * elf32-or1k.c: Likewise.
395 * elf32-ppc.c: Likewise.
396 * elf32-rl78.c: Likewise.
397 * elf32-s390.c: Likewise.
398 * elf32-score.c: Likewise.
399 * elf32-score7.c: Likewise.
400 * elf32-sh.c: Likewise.
401 * elf32-tic6x.c: Likewise.
402 * elf32-tilepro.c: Likewise.
403 * elf32-v850.c: Likewise.
404 * elf32-vax.c: Likewise.
405 * elf32-xstormy16.c: Likewise.
406 * elf32-xtensa.c: Likewise.
407 * elf64-alpha.c: Likewise.
408 * elf64-hppa.c: Likewise.
409 * elf64-ia64-vms.c: Likewise.
410 * elf64-mmix.c: Likewise.
411 * elf64-ppc.c: Likewise.
412 * elf64-s390.c: Likewise.
413 * elf64-sh64.c: Likewise.
414 * elf64-x86-64.c: Likewise.
415 * elflink.c: Likewise.
416 * elfnn-aarch64.c: Likewise.
417 * elfnn-ia64.c: Likewise.
418 * elfnn-riscv.c: Likewise.
419 * elfxx-mips.c: Likewise.
420 * elfxx-sparc.c: Likewise.
421 * elfxx-tilegx.c: Likewise.
422 * linker.c: Likewise.
423
4070765b
AM
4242017-05-16 Alan Modra <amodra@gmail.com>
425
426 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
427 * elflink.c (elf_link_add_object_symbols): Update to use
428 non_ir_ref_dynamic.
429 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
430 non_ir_ref.
431 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
432
25499ac7
MR
4332017-05-15 Maciej W. Rozycki <macro@imgtec.com>
434
435 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
436
73caa85d
L
4372017-05-12 H.J. Lu <hongjiu.lu@intel.com>
438
439 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
440 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
441 properties.
442 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
443
f2c29a16
L
4442017-05-11 H.J. Lu <hongjiu.lu@intel.com>
445
446 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
447 to plt_second.
448 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
449 to plt_second/plt_second_eh_frame.
450 (elf_x86_64_link_hash_newfunc): Updated.
451 (elf_x86_64_allocate_dynrelocs): Likewise.
452 (elf_x86_64_size_dynamic_sections): Likewise.
453 (elf_x86_64_relocate_section): Likewise.
454 (elf_x86_64_finish_dynamic_symbol): Likewise.
455 (elf_x86_64_finish_dynamic_sections): Likewise.
456 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
457 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
458 .plt.sec section.
459 (elf_backend_setup_gnu_properties): Updated. Create the
460 .plt.sec section instead of the .plt.sec section.
461
dc2be3d2
L
4622017-05-11 H.J. Lu <hongjiu.lu@intel.com>
463
464 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
465 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
466 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
467
db84b98a
JM
4682017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
469
470 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
471 (bfd_elf64_set_reloc): Define.
472 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
473
23186865
JM
4742017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
475
476 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
477 (struct bfd_target): New field _bfd_set_reloc.
478 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
479 * reloc.c (_bfd_generic_set_reloc): New function.
480 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
481 * nlm-target.h (nlm_set_reloc): Likewise.
482 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
483 * aout-tic30.c (MY_set_reloc): Likewise.
484 * aout-target.h (MY_set_reloc): Likewise.
485 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
486 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
487 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
488 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
489 * aout-adobe.c (aout_32_set_reloc): Likewise.
490 * bout.c (b_out_set_reloc): Likewise.
491 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
492 * i386os9k.c (aout_32_set_reloc): Likewise.
493 * ieee.c (ieee_set_reloc): Likewise.
494 * oasys.c (oasys_set_reloc): Likewise.
495 * som.c (som_set_reloc): Likewise.
496 * versados.c (versados_set_reloc): Likewise.
497 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
498 _bfd_generic_set_reloc.
499 (rs6000_xcoff64_aix_vec): LIkewise.
500 * libbfd.c (_bfd_norelocs_set_reloc): New function.
501 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
502 * i386msdos.c (msdos_set_reloc): Define to
503 _bfd_norelocs_set_reloc.
504 * elfcode.h (elf_set_reloc): Define.
505 * bfd-in2.h: Regenerated.
506
aab82f4c
L
5072017-05-10 H.J. Lu <hongjiu.lu@intel.com>
508
509 PR ld/21481
510 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
511 for IFUNC function address.
512
53a346d8
CZ
5132017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
514
515 * elf32-arc.c (FEATURE_LIST_NAME): Define.
516 (CONFLICT_LIST): Likewise.
517 (opcode/arc-attrs.h): Include.
518 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
519 (arc_extract_features): New file.
520 (arc_stralloc): Likewise.
521 (arc_elf_merge_attributes): Likewise.
522 (arc_elf_merge_private_bfd_data): Use object attributes.
523 (bfd_arc_get_mach_from_attributes): New function.
524 (arc_elf_object_p): Use object attributes.
525 (arc_elf_final_write_processing): Likewise.
526 (elf32_arc_obj_attrs_arg_type): New function.
527 (elf32_arc_obj_attrs_handle_unknown): Likewise.
528 (elf32_arc_section_from_shdr): Likewise.
529 (elf_backend_obj_attrs_vendor): Define.
530 (elf_backend_obj_attrs_section): Likewise.
531 (elf_backend_obj_attrs_arg_type): Likewise.
532 (elf_backend_obj_attrs_section_type): Likewise.
533 (elf_backend_obj_attrs_handle_unknown): Likewise.
534 (elf_backend_section_from_shdr): Likewise.
535
e645cf40
AG
5362017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
537
538 PR ld/21458
539 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
540 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
541 and the destination is a Thumb symbol.
542
dd9e66ee
L
5432017-05-08 H.J. Lu <hongjiu.lu@intel.com>
544
545 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
546 initializer to silence GCC 4.2.
547 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
548
38b12349
L
5492017-05-08 H.J. Lu <hongjiu.lu@intel.com>
550
551 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
552 (LAZY_PLT_ENTRY_SIZE): This.
553 (NON_LAZY_PLT_ENTRY_SIZE): New.
554 (elf_x86_64_plt0_entry): Renamed to ...
555 (elf_x86_64_lazy_plt0_entry): This.
556 (elf_x86_64_plt_entry): Renamed to ...
557 (elf_x86_64_lazy_plt_entry): This.
558 (elf_x86_64_bnd_plt0_entry): Renamed to ...
559 (elf_x86_64_lazy_bnd_plt0_entry): This.
560 (elf_x86_64_legacy_plt_entry): Removed.
561 (elf_x86_64_bnd_plt_entry): Renamed to ...
562 (elf_x86_64_lazy_bnd_plt_entry): This.
563 (elf_x86_64_legacy_plt2_entry): Renamed to ...
564 (elf_x86_64_non_lazy_plt_entry): This.
565 (elf_x86_64_bnd_plt2_entry): Renamed to ...
566 (elf_x86_64_non_lazy_bnd_plt_entry): This.
567 (elf_x86_64_eh_frame_plt): Renamed to ...
568 (elf_x86_64_eh_frame_lazy_plt): This.
569 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
570 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
571 (elf_x86_64_eh_frame_plt_got): Renamed to ...
572 (elf_x86_64_eh_frame_non_lazy_plt): This.
573 (elf_x86_64_lazy_plt_layout): New.
574 (elf_x86_64_non_lazy_plt_layout): Likewise.
575 (elf_x86_64_plt_layout): Likewise.
576 (elf_x86_64_backend_data): Remove PLT layout information. Add
577 os for target system.
578 (GET_PLT_ENTRY_SIZE): Removed.
579 (elf_x86_64_lazy_plt): New.
580 (elf_x86_64_non_lazy_plt): Likewise.
581 (elf_x86_64_lazy_bnd_plt): Likewise.
582 (elf_x86_64_non_lazy_bnd_plt): Likewise.
583 (elf_x86-64_arch_bed): Updated.
584 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
585 (elf_x86_64_create_dynamic_sections): Removed.
586 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
587 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
588 (elf_x86-64_adjust_dynamic_symbol): Updated.
589 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
590 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
591 size for PLT0 if there is no PLT0. Get plt_entry_size from
592 non_lazy_plt for non-lazy PLT entries.
593 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
594 from non_lazy_plt for non-lazy PLT entries.
595 (elf_x86-64_relocate_section): Updated. Properly get PLT index
596 if there is no PLT0.
597 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
598 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
599 entries with non-lazy PLT layout. Don't fill the second and third
600 slots in the PLT entry if there is no PLT0.
601 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
602 if there is no PLT0. Set sh_entsize on the .plt.got section.
603 (compare_relocs): New.
604 (elf_x86_64_plt_type): Likewise.
605 (elf_x86_64_plt): Likewise.
606 (elf_x86_64_nacl_plt): New. Forward declaration.
607 (elf_x86_64_get_plt_sym_val): Removed.
608 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
609 against all dynamic relocations.
610 (elf_x86_64_link_setup_gnu_properties): New function.
611 (elf_backend_create_dynamic_sections): Updated.
612 (elf_backend_setup_gnu_properties): New.
613 (elf_x86_64_nacl_plt): New.
614 (elf_x86_64_nacl_arch_bed): Updated.
615
f604c2a2
L
6162017-05-08 H.J. Lu <hongjiu.lu@intel.com>
617
618 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
619 (LAZY_PLT_ENTRY_SIZE): This.
620 (NON_LAZY_PLT_ENTRY_SIZE): New.
621 (elf_i386_plt0_entry): Renamed to ...
622 (elf_i386_lazy_plt0_entry): This.
623 (elf_i386_plt_entry): Renamed to ...
624 (elf_i386_lazy_plt_entry): This.
625 (elf_i386_pic_plt0_entry): Renamed to ...
626 (elf_i386_pic_lazy_plt0_entry): This.
627 (elf_i386_pic_plt_entry): Renamed to ...
628 (elf_i386_pic_lazy_plt_entry): This.
629 (elf_i386_got_plt_entry): Renamed to ...
630 (elf_i386_non_lazy_plt_entry): This.
631 (elf_i386_pic_got_plt_entry): Renamed to ...
632 (elf_i386_pic_non_lazy_plt_entry): This.
633 (elf_i386_eh_frame_plt): Renamed to ...
634 (elf_i386_eh_frame_lazy_plt): This.
635 (elf_i386_eh_frame_plt_got): Renamed to ...
636 (elf_i386_eh_frame_non_lazy_plt): This.
637 (elf_i386_plt_layout): Renamed to ...
638 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
639 eh_frame_plt_got_size.
640 (elf_i386_non_lazy_plt_layout): New.
641 (elf_i386_plt_layout): Likewise.
642 (elf_i386_non_lazy_plt): Likewise.
643 (GET_PLT_ENTRY_SIZE): Removed.
644 (elf_i386_plt): Renamed to ...
645 (elf_i386_lazy_plt): This.
646 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
647 (elf_i386_arch_bed): Updated.
648 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
649 (elf_i386_create_dynamic_sections): Removed.
650 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
651 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
652 (elf_i386_adjust_dynamic_symbol): Updated.
653 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
654 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
655 size for PLT0 if there is no PLT0.
656 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
657 output section is discarded only if GOT isn't empty.
658 (elf_i386_relocate_section): Updated. Properly get PLT index
659 if there is no PLT0.
660 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
661 second and third slots in the PLT entry if there is no PLT0.
662 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
663 if there is no PLT0. Set sh_entsize on the .plt.got section.
664 (elf_i386_nacl_plt): Forward declaration.
665 (elf_i386_get_plt_sym_val): Removed.
666 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
667 against all dynamic relocations.
668 (elf_i386_link_setup_gnu_properties): New function.
669 (elf_backend_create_dynamic_sections): Updated.
670 (elf_backend_setup_gnu_properties): New.
671 (elf_i386_nacl_plt): Updated.
672 (elf_i386_nacl_arch_bed): Likewise.
673 (elf_i386_vxworks_arch_bed): Likewise.
674
046734ff
TP
6752017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
676
677 * elflink.c (elf_output_implib): Remove executable flag from import
678 library bfd.
679 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
680 library is a relocatable object file.
681
b660e9eb
SKS
6822017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
683
684 PR ld/21404
685 * elf32-avr.c (avr_should_move_sym): New function.
686 (avr_should_reduce_sym_size): Likewise.
687 (avr_should_increase_sym_size): Likewise.
688 (elf32_avr_relax_delete_bytes): Adjust symbol values
689 and sizes by calling new functions.
690
763a5fa4
PD
6912017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
692
693 * config.bfd (riscv32-*): Enable rv64.
694
73ec947d
AM
6952017-05-02 Alan Modra <amodra@gmail.com>
696
697 PR 21384
698 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
699 rather than h->root.type == bfd_link_hash_new.
700 (bfd_elf_record_link_assignment): Similarly, call
701 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
702
a941291c
AM
7032017-04-29 Alan Modra <amodra@gmail.com>
704
705 PR 21432
706 * reloc.c (reloc_offset_in_range): New function.
707 (bfd_perform_relocation, bfd_install_relocation): Use it.
708 (_bfd_final_link_relocate): Likewise.
709
750eaa47
L
7102017-04-28 H.J. Lu <hongjiu.lu@intel.com>
711
712 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
713 before using .plt.got.
714 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
715
5b66fac4
L
7162017-04-27 H.J. Lu <hongjiu.lu@intel.com>
717
718 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
719 instead of "+=" to update 0.
720
de9a3c42
L
7212017-04-27 H.J. Lu <hongjiu.lu@intel.com>
722
723 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
724 .plt.got section here.
725 (elf_i386_check_relocs): Don't create the .plt.got section.
726 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
727 the .plt.got and .plt.bnd sections here.
728 (elf_x86_64_check_relocs): Don't create the .plt.got nor
729 .plt.bnd sections.
730
da3d25af
L
7312017-04-27 H.J. Lu <hongjiu.lu@intel.com>
732
733 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
734 has_bnd_reloc.
735 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
736 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
737 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
738 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
739 has_bnd_reloc.
740
fba37edd
L
7412017-04-27 H.J. Lu <hongjiu.lu@intel.com>
742
743 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
744 to return bfd *.
745 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
746 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
747 the first relocatable ELF input with GNU properties.
748
1f78f649
L
7492017-04-27 H.J. Lu <hongjiu.lu@intel.com>
750
751 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
752 VxWorks for non-PIC.
753
76c20d54
AM
7542017-04-27 Alan Modra <amodra@gmail.com>
755
756 * elf-bfd.h (struct elf_backend_data): Make asection param of
757 elf_backend_eh_frame_address_size const.
758 (_bfd_elf_eh_frame_address_size): Likewise.
759 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
760 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
761 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
762 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
763 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
764 (next_cie_fde_offset): Constify params.
765 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
766
d7153c4a
AM
7672017-04-27 Alan Modra <amodra@gmail.com>
768
769 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
770 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
771 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
772 aug_data_len.
773 (offset_adjust): New function.
774 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
775 (adjust_eh_frame_local_symbols): Likewise.
776 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
777 after changing anything. Return true if anything changed.
778 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
779 _bfd_elf_adjust_eh_frame_global_symbol for globals.
780
641338d8
AM
7812017-04-27 Alan Modra <amodra@gmail.com>
782
783 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
784 when force_local.
785
21d68fcd
AM
7862017-04-27 Alan Modra <amodra@gmail.com>
787
788 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
789 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
790 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
791 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
792 for undef and undefweak dyn_relocs.
793 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
794 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
795 (allocate_got, allocate_dynrelocs): Likewise.
796 (ppc64_elf_relocate_section): Likewise.
797
97d343d4
L
7982017-04-26 H.J. Lu <hongjiu.lu@intel.com>
799
800 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
801 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
802 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
803 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
804
04b31182
NC
8052017-04-26 Nick Clifton <nickc@redhat.com>
806
807 PR binutils/21434
808 * reloc.c (bfd_perform_relocation): Check for a negative address
809 in the reloc.
810
23ec1e32
MR
8112017-04-26 Maciej W. Rozycki <macro@imgtec.com>
812
813 PR ld/21334
814 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
815 member.
816 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
817 (elf_backend_always_renumber_dynsyms): Define.
818 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
819 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
820 * elflink.c (bfd_elf_size_dynamic_sections): Also call
821 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
822 it.
823 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
824
c46cec3a
MR
8252017-04-26 Maciej W. Rozycki <macro@imgtec.com>
826
827 * elflink.c (bfd_elf_size_dynamic_sections): Only call
828 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
829 sections have been created.
830
e63d1232
NC
8312017-04-26 Nick Clifton <nickc@redhat.com>
832
833 PR binutils/21431
834 * compress.c (bfd_init_section_compress_status): Check the return
835 value from bfd_malloc.
836
9e9821dd
L
8372017-04-24 H.J. Lu <hongjiu.lu@intel.com>
838
839 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
840 no_finish_dynamic_symbol.
841 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
842 0.
843 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
844 weak symbol, don't make it dynamic.
845 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
846 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
847 relocation for GOT reference.
848 (elf_x86_64_finish_dynamic_symbol): Abort if
849 no_finish_dynamic_symbol isn't 0.
850
0dc9a308
L
8512017-04-24 H.J. Lu <hongjiu.lu@intel.com>
852
853 PR ld/21402
854 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
855 undefined weak symbol, don't make it dynamic.
856 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
857 set no_finish_dynamic_symbol and generate R_386_RELATIVE
858 relocation for R_386_GOT32.
859
1587442d
L
8602017-04-24 H.J. Lu <hongjiu.lu@intel.com>
861
862 PR ld/21425
863 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
864
7eacd66b
AM
8652017-04-23 Alan Modra <amodra@gmail.com>
866
867 PR 21414
868 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
869 * elf.c (lcomm_sym): New.
870 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
871 * bfd-in2.h: Regenerate.
872
bce964aa
AM
8732017-04-23 Alan Modra <amodra@gmail.com>
874
875 PR 21412
876 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
877 parameters and comment.
878 (_bfd_elf_get_reloc_section): Delete.
879 (_bfd_elf_plt_get_reloc_section): Declare.
880 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
881 New functions. Don't blindly skip over assumed .rel/.rela prefix.
882 Extracted from..
883 (_bfd_elf_get_reloc_section): ..here. Delete.
884 (assign_section_numbers): Call elf_get_reloc_section.
885 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
886 * elfxx-target.h (elf_backend_get_reloc_section): Update.
887
97e83a10
AM
8882017-04-23 Alan Modra <amodra@gmail.com>
889
890 PR 21409
891 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
892 no symbols.
893
e133d005
L
8942017-04-21 H.J. Lu <hongjiu.lu@intel.com>
895
896 PR ld/21402
897 * elf32-i386.c (elf_i386_link_hash_entry): Add
898 no_finish_dynamic_symbol.
899 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
900 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
901 symbol, don't make it dynamic in PIE.
902 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
903 set no_finish_dynamic_symbol and generate R_386_RELATIVE
904 relocation for R_386_GOT32
905 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
906 isn't 0.
907
3c5fce9b
L
9082017-04-21 H.J. Lu <hongjiu.lu@intel.com>
909
910 PR ld/19617
911 PR ld/21086
912 * elflink.c (elf_link_add_object_symbols): Require
913 --no-dynamic-linker with -E/--dynamic-list when creating
914 dynamic sections.
915
0fad2956
MR
9162017-04-20 Maciej W. Rozycki <macro@imgtec.com>
917
918 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
919 if forced local.
920
64575f78
MR
9212017-04-20 Maciej W. Rozycki <macro@imgtec.com>
922
923 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
924 dynamic symbol sorting.
925
59fa66c5
L
9262017-04-20 H.J. Lu <hongjiu.lu@intel.com>
927
928 PR ld/21382
929 * elflink.c (elf_link_add_object_symbols): Preserve
930 dynamic_ref_after_ir_def when restoring the symbol table for
931 unneeded dynamic object.
932
e492d2f8
L
9332017-04-19 H.J. Lu <hongjiu.lu@intel.com>
934
935 PR ld/21401
936 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
937 on on undefined IFUNC symbol in the second PLT.
938
10169134
WAF
9392017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
940
941 * peXXigen.c (pe_print_reloc): Correct chunk_end.
942
954b63d4
AM
9432017-04-19 Alan Modra <amodra@gmail.com>
944
945 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
946 or make dynamic for info->dynamic_undefined_weak 0 and 1.
947 * elf32-ppc.c:Formatting.
948 (ensure_undefweak_dynamic): Don't make dynamic when
949 info->dynamic_undefined_weak is zero.
950 (allocate_dynrelocs): Discard undefweak dyn_relocs for
951 info->dynamic_undefined_weak. Discard undef dyn_relocs when
952 not default visibility. Discard undef and undefweak
953 dyn_relocs earlier.
954 (ppc_elf_relocate_section): Adjust to suit.
955 * elf64-ppc.c: Formatting.
956 (ensure_undefweak_dynamic): Don't make dynamic when
957 info->dynamic_undefined_weak is zero.
958 (allocate_dynrelocs): Discard undefweak dyn_relocs for
959 info->dynamic_undefined_weak. Discard them earlier.
960
e6699019
L
9612017-04-17 H.J. Lu <hongjiu.lu@intel.com>
962
963 PR ld/21389
964 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
965 before generating the version definition section.
966
c5d37467
AM
9672017-04-17 Alan Modra <amodra@gmail.com>
968
969 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
970 state when a regular object file defines a symbol with
971 incompatible type to that defined by an earlier shared lib.
972
63a5468a
AM
9732017-04-13 Alan Modra <amodra@gmail.com>
974
975 * coffcode.h: Wrap some overly long _bfd_error_handler args.
976 * elf.c: Likewise.
977 * elf32-arm.c: Likewise.
978 * elf32-i386.c: Likewise.
979 * elf32-mep.c: Likewise.
980 * elf64-ia64-vms.c: Likewise.
981 * elf64-x86-64.c: Likewise.
982 * elflink.c: Likewise.
983 * elfnn-ia64.c: Likewise.
984 * elfxx-mips.c: Likewise.
985
dae82561
AM
9862017-04-13 Alan Modra <amodra@gmail.com>
987
988 * aoutx.h: Use %B and %A in error messages throughout file.
989 * aout-cris.c: Likewise.
990 * archive.c: Likewise.
991 * binary.c: Likewise.
992 * coff-rs6000.c: Likewise.
993 * coff-tic4x.c: Likewise.
994 * coffcode.h: Likewise.
995 * coffgen.c: Likewise.
996 * cofflink.c: Likewise.
997 * coffswap.h: Likewise.
998 * cpu-arm.c: Likewise.
999 * elf-eh-frame.c: Likewise.
1000 * elf-m10300.c: Likewise.
1001 * elf.c: Likewise.
1002 * elf32-arc.c: Likewise.
1003 * elf32-arm.c: Likewise.
1004 * elf32-bfin.c: Likewise.
1005 * elf32-frv.c: Likewise.
1006 * elf32-iq2000.c: Likewise.
1007 * elf32-m32c.c: Likewise.
1008 * elf32-microblaze.c: Likewise.
1009 * elf32-nds32.c: Likewise.
1010 * elf32-rl78.c: Likewise.
1011 * elf32-rx.c: Likewise.
1012 * elf32-score.c: Likewise.
1013 * elf32-score7.c: Likewise.
1014 * elf32-sh64.c: Likewise.
1015 * elf32-v850.c: Likewise.
1016 * elf32-vax.c: Likewise.
1017 * elf32-visium.c: Likewise.
1018 * elf64-ia64-vms.c: Likewise.
1019 * elf64-mmix.c: Likewise.
1020 * elf64-sh64.c: Likewise.
1021 * elfcode.h: Likewise.
1022 * elfnn-aarch64.c: Likewise.
1023 * elfnn-ia64.c: Likewise.
1024 * elfxx-mips.c: Likewise.
1025 * hpux-core.c: Likewise.
1026 * ieee.c: Likewise.
1027 * ihex.c: Likewise.
1028 * linker.c: Likewise.
1029 * merge.c: Likewise.
1030 * mmo.c: Likewise.
1031 * oasys.c: Likewise.
1032 * pdp11.c: Likewise.
1033 * peXXigen.c: Likewise.
1034 * rs6000-core.c: Likewise.
1035 * vms-alpha.c: Likewise.
1036 * xcofflink.c: Likewise.
1037
c08bb8dd
AM
10382017-04-13 Alan Modra <amodra@gmail.com>
1039
1040 * bfd.c (PRINT_TYPE): Define.
1041 (_doprnt): New function.
1042 (error_handler_internal): Use _doprnt.
1043 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
1044 calls in their natural order, throughout file.
1045 * coff-mcore.c: Likewise.
1046 * coff-ppc.c: Likewise.
1047 * coff-tic80.c: Likewise.
1048 * cofflink.c: Likewise.
1049 * elf-s390-common.c: Likewise.
1050 * elf.c: Likewise.
1051 * elf32-arm.c: Likewise.
1052 * elf32-i386.c: Likewise.
1053 * elf32-m32r.c: Likewise.
1054 * elf32-msp430.c: Likewise.
1055 * elf32-spu.c: Likewise.
1056 * elf64-ia64-vms.c: Likewise.
1057 * elf64-sparc.c: Likewise.
1058 * elf64-x86-64.c: Likewise.
1059 * elflink.c: Likewise.
1060 * elfnn-aarch64.c: Likewise.
1061 * elfnn-ia64.c: Likewise.
1062 * elfxx-mips.c: Likewise.
1063
10463f39
AM
10642017-04-13 Alan Modra <amodra@gmail.com>
1065
1066 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
1067 branch veneers" error. Fix double space and format message.
1068 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
1069 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
1070
4af8774e
AM
10712017-04-13 Alan Modra <amodra@gmail.com>
1072
1073 * bfd-in2.h: Regenerate.
1074
e4097f5e
L
10752017-04-11 H.J. Lu <hongjiu.lu@intel.com>
1076
1077 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
1078 extra `\n' in warning/error messages.
1079 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
1080 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1081
537616aa
L
10822017-04-11 H.J. Lu <hongjiu.lu@intel.com>
1083
1084 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
1085 processor-specific properties with generic ELF target vector.
1086
bb1dd176
QZ
10872017-04-10 Qing Zhao <qing.zhao@oracle.com>
1088
1089 * elf32-sparc.c (elf_backend_fixup_symbol): New.
1090 * elf64-sparc.c (elf_backend_fixup_symbol): New.
1091 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
1092 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
1093 has_non_got_reloc.
1094 (link_hash_newfunc): Initialize has_got_reloc and
1095 has_non_got_reloc.
1096 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
1097 section.
1098 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
1099 has_non_got_reloc.
1100 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
1101 has_non_got_reloc.
1102 (_bfd_sparc_elf_fixup_symbol): New function.
1103 (allocate_dynrelocs): Don't allocate space for dynamic
1104 relocations and discard relocations against resolved undefined
1105 weak symbols in executable. Don't make resolved undefined weak
1106 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
1107 relocation against undefined weak symbols in PIE.
1108 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
1109 relocations against resolved undefined weak symbols in PIE
1110 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
1111 without ynamic PLT/GOT relocations for resolved undefined weak
1112 symbols.
1113 Don't generate dynamic relocation against resolved undefined
1114 weak symbol in executable.
1115 (pie_finish_undefweak_symbol): New function.
1116 (_bfd_sparc_elf_finish_dynamic_sections): Call
1117 pie_finish_undefweak_symbol on all symbols in PIE.
1118 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
1119 (_bfd_sparc_elf_fixup_symbol): New function.
1120
d236cfd4
NC
11212017-04-10 Nick Clifton <nickc@redhat.com>
1122
1123 * config.bfd: Remove ns32k from obsolete list.
1124
6f9dbcd4
AM
11252017-04-10 Alan Modra <amodra@gmail.com>
1126
1127 PR 21287
1128 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
1129 (special_sections_i): Likewise for .init_array.
1130 (special_sections_p): Likewise for .preinit_array.
1131
8170f769
L
11322017-04-07 H.J. Lu <hongjiu.lu@intel.com>
1133
1134 PR ld/19579
1135 PR ld/21306
1136 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
1137 ELF_COMMON_DEF_P for common symbols.
1138 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1139 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1140 * elflink.c (_bfd_elf_merge_symbol): Revert commits
1141 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
1142 07492f668d2173da7a2bda3707ff0985e0f460b6.
1143
49f4617b
PA
11442017-04-07 Pedro Alves <palves@redhat.com>
1145
1146 * opncls.c (bfd_get_debug_link_info): Rename to...
1147 (bfd_get_debug_link_info_1): ... this. Change type of second
1148 parameter to void pointer. Adjust.
1149 (bfd_get_debug_link_info): Reimplement on top of
1150 bfd_get_debug_link_info_1.
1151 (separate_debug_file_exists, separate_alt_debug_file_exists):
1152 Change type of second parameter to void pointer. Adjust.
1153 (get_func_type, check_func_type): Change type of second parameter
1154 to void pointer.
1155 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
1156 the callback functions instead of passing the address of a local.
1157 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
1158 find_separate_debug_file.
1159 (get_alt_debug_link_info_shim): Change type of second parameter to
1160 void pointer. Adjust.
1161 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
1162 find_separate_debug_file.
1163 (get_build_id_name, bfd_boolean check_build_id_file): Change type
1164 of second parameter to void pointer. Adjust.
1165 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
1166 pointer local to find_separate_debug_file.
1167
11682017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
1fd6d111
TG
1169
1170 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
1171 external symbols with a definition.
1172 (_bfd_coff_gc_mark_extra_sections): Fix typo.
1173
86abf93a
AM
11742017-04-07 Alan Modra <amodra@gmail.com>
1175
1176 * po/SRC-POTFILES.in: Regenerate.
1177
8dea77f0
AM
11782017-04-05 Alan Modra <amodra@gmail.com>
1179
1180 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
1181 reference counting.
1182
477bdd39
JT
11832017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
1184
1185 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
1186 numbers for DataDirectory entry indicies passed to
1187 add_data_entry().
1188
a91e1603
L
11892017-04-04 H.J. Lu <hongjiu.lu@intel.com>
1190
1191 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
1192 each GNU_MBIND section and align GNU_MBIND section to page size.
1193 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
1194 segment for each GNU_MBIND section.
1195 (_bfd_elf_init_private_section_data): Copy sh_info from input
1196 for GNU_MBIND section.
1197
b5292032
PD
11982017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
1199
1200 * elfnn-riscv.c (GP_NAME): Delete.
1201 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
1202 (_bfd_riscv_relax_lui): Likewise.
1203
ad32986f
NC
12042017-04-04 Nick Clifton <nickc@redhat.com>
1205
1206 PR binutils/21342
1207 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
1208 dereference.
1209 (bfd_elf_final_link): Only initialize the extended symbol index
1210 section if there are extended symbol tables to list.
1211
46bed679
L
12122017-04-03 H.J. Lu <hongjiu.lu@intel.com>
1213
1214 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
1215 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
1216 * configure.ac (elf): Add elf-properties.lo.
1217 * Makefile.in: Regenerated.
1218 * configure: Likewise.
1219 * elf-bfd.h (elf_property_kind): New.
1220 (elf_property): Likewise.
1221 (elf_property_list): Likewise.
1222 (elf_properties): Likewise.
1223 (_bfd_elf_parse_gnu_properties): Likewise.
1224 (_bfd_elf_get_property): Likewise.
1225 (_bfd_elf_link_setup_gnu_properties): Likewise.
1226 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
1227 and setup_gnu_properties.
1228 (elf_obj_tdata): Add properties.
1229 * elf-properties.c: New file.
1230 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
1231 (elf_i386_merge_gnu_properties): Likewise.
1232 (elf_backend_parse_gnu_properties): Likewise.
1233 (elf_backend_merge_gnu_properties): Likewise.
1234 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1235 (elf_x86_64_merge_gnu_properties): Likewise.
1236 (elf_backend_parse_gnu_properties): Likewise.
1237 (elf_backend_merge_gnu_properties): Likewise.
1238 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
1239 (elf_backend_parse_gnu_properties): Likewise.
1240 (elf_backend_setup_gnu_properties): Likewise.
1241 (elfNN_bed): Add elf_backend_parse_gnu_properties,
1242 elf_backend_merge_gnu_properties and
1243 elf_backend_setup_gnu_properties.
1244
f96bd6c2
PC
12452017-03-30 Pip Cet <pipcet@gmail.com>
1246
1247 * elf32-wasm32.c: Add relocation code, two relocs.
1248 * reloc.c: Add wasm32 relocations.
1249 * libbfd.h: Regenerate.
1250 * bfd-in2.h: Regenerate.
1251 * bfd/po/bfd.pot: Regenerate.
1252
e643cb45
NC
12532017-03-29 Nick Clifton <nickc@redhat.com>
1254
1255 PR binutils/18025
1256 * coff-bfd.h (struct coff_section_data): Add new fields:
1257 saved_bias and bias.
1258 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
1259 computed for PE binaries.
1260 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
1261 missing abbrev.
1262
086554e8
HPN
12632017-03-28 Hans-Peter Nilsson <hp@axis.com>
1264
1265 PR ld/16044
1266 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
1267 to handle a local symbol with a hash-symbol-entry; without PLT.
1268 Add BFD_ASSERT for an incidental case with GOT entry present.
1269 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
1270 isn't forced-or-set local.
1271
a6be0538
PC
12722017-03-27 Pip Cet <pipcet@gmail.com>
1273
1274 * wasm-module.c: New file to support WebAssembly modules.
1275 * wasm-module.h: New file to support WebAssembly modules.
1276 * doc/webassembly.texi: Start documenting wasm-module.c.
1277 * config.bfd: Add wasm_vec.
1278 * targets.c: Likewise.
1279 * configure.ac: Likewise.
1280 * Makefile.am: Add entries for wasm-module.c.
1281 * Makefile.in: Regenerate.
1282 * configure: Regenerate.
1283 * po/SRC-POTFILES.in: Regenerate.
1284
79b1d3cb
PC
12852017-03-27 Pip Cet <pipcet@gmail.com>
1286
1287 * cpu-wasm32.c: New file to support wasm32 architecture.
1288 * elf32-wasm32.c: New file to support wasm32 architecture.
1289 * Makefile.am: Add wasm32 architecture.
1290 * archures.c: Likewise.
1291 * config.bfd: Likewise.
1292 * configure.ac: Likewise.
1293 * targets.c: Likewise.
1294 * Makefile.in: Regenerate.
1295 * bfd-in2.h: Regenerate.
1296 * configure: Regenerate.
1297 * po/SRC-POTFILES.in: Regenerate.
1298
aaed6f5b
AM
12992017-03-20 Alan Modra <amodra@gmail.com>
1300
1301 PR 21266
1302 * elf64-ppc.c (compare_symbols): Stabilize sort.
1303
82e66161
AM
13042017-03-18 Alan Modra <amodra@gmail.com>
1305
1306 * elf64-ppc.c (struct ppc_link_hash_table): Add
1307 local_ifunc_resolver and maybe_local_ifunc_resolver.
1308 (ppc_build_one_stub): Set flags on emitting dynamic
1309 relocation to ifunc.
1310 (ppc64_elf_relocate_section): Likewise.
1311 (ppc64_elf_finish_dynamic_symbol): Likewise.
1312 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
1313 local dynamic relocs to ifuncs.
1314 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
1315 local_ifunc_resolver and maybe_local_ifunc_resolver.
1316 (ppc_elf_relocate_section): Set flag on emitting dynamic
1317 relocation to ifuncs.
1318 (ppc_elf_finish_dynamic_symbol): Likewise.
1319 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
1320 dynamic relocs to ifuncs.
1321
f955cccf
NC
13222017-03-13 Nick Clifton <nickc@redhat.com>
1323
1324 PR binutils/21202
1325 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
1326 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
1327 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
1328 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
1329 * bfd-in2.h: Regenerate.
1330 * libbfd.h: Regenerate.
1331 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
1332 names.
1333 (IS_AARCH64_TLSDESC_RELOC): Likewise.
1334 (elfNN_aarch64_howto_table): Likewise.
1335 (aarch64_tls_transition_without_check): Likewise.
1336 (aarch64_reloc_got_type): Likewise.
1337 (elfNN_aarch64_final_link_relocate): Likewise.
1338 (elfNN_aarch64_tls_relax): Likewise.
1339 (elfNN_aarch64_relocate_section): Likewise.
1340 (elfNN_aarch64_gc_sweep_hook): Likewise.
1341 (elfNN_aarch64_check_relocs): Likewise.
1342 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1343 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1344
4aef7643
AM
13452017-03-11 Alan Modra <amodra@gmail.com>
1346
1347 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
1348 parameter is in fact used. Whitespace fixes.
1349 * elf64-ppc.c: Likewise.
1350
f03265d9
ST
13512017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
1352
1353 * rs6000-core.c (CORE_NEW): Simplify macro when
1354 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
1355
b1b07054
AM
13562017-03-07 Alan Modra <amodra@gmail.com>
1357
1358 PR 21224
1359 PR 20519
1360 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
1361 dyn_relocs check.
1362
2e0ce1c8
AM
13632017-03-05 Alan Modra <amodra@gmail.com>
1364
1365 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
1366 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
1367 (next_cie_fde_offset): New function.
1368 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
1369 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
1370 four bytes. Align CIEs to four or eight bytes depending on
1371 per_encoding_aligned8. Align FDEs according to their encoding.
1372 Pad last FDE to output section alignment.
1373 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
1374 assertion.
1375 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
1376 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
1377 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
1378
f98450c6
NC
13792017-03-02 Martin Bickel <binutils@ineranves.de>
1380
1381 PR ld/21212
1382 * elf.c (rewrite_elf_program_header): Do not issue a warning for
d20928fa 1383 empty segments which have a zero filesz, but a non-zero memsz.
f98450c6 1384
673cff9b
AM
13852017-03-02 Alan Modra <amodra@gmail.com>
1386
1387 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
1388
3de43e7b
AM
13892017-02-28 Alan Modra <amodra@gmail.com>
1390
1391 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
1392 (ppc64_elf_relocate_section): Likewise.
1393
4ef97a1b
AM
13942017-02-28 Alan Modra <amodra@gmail.com>
1395
1396 PR 20995
1397 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
1398 rather than elf32_nios2_hash_table or elf_hash_table.
1399 (create_got_section): Likewise.
1400 (nios2_elf32_finish_dynamic_symbol): Likewise.
1401 (nios2_elf32_adjust_dynamic_symbol): Likewise.
1402 (nios2_elf32_size_dynamic_sections): Likewise.
1403 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
1404 vars. Use htab equivalents directly instead. Don't create
1405 all dynamic sections on needing just the GOT. Use a goto
1406 rather than a fall-through with reloc test. Ensure
1407 htab->dynobj is set when making dynamic sreloc section.
1408 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
1409 equivalent directly instead. Don't segfault on looking for
1410 .dynamic when dynamic sections have not been created. Don't
1411 segfault on .got.plt being discarded.
1412 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
1413 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
1414 fixme and another not so relevant comment.
1415 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
1416 already set, set hash table dynobj on creating .sbss.
1417
7ba71655
AM
14182017-02-28 Alan Modra <amodra@gmail.com>
1419
1420 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
1421 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
1422 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
1423 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
1424 (ppc64_elf_relocate_section): Likewise.
1425 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
1426 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
1427 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
1428 * libbfd.h: Regenerate.
1429 * bfd-in2.h: Regenerate.
1430
afbf7e8e
AM
14312017-02-28 Alan Modra <amodra@gmail.com>
1432
1433 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
1434 dynamic .data.rel.ro read-only.
1435 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
1436 rather than section flags when deciding where copy reloc goes.
1437 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
1438 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
1439 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
1440 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
1441 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
1442 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
1443 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
1444 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
1445 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1446 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
1447 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
1448 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
1449 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1450 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1451 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
1452 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
1453 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
1454 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
1455 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
1456
0e392101
MR
14572017-02-28 Maciej W. Rozycki <macro@imgtec.com>
1458
1459 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
1460 `jalr $0, $25' instruction encoding.
1461
bd757ca7
NC
14622017-02-27 Nick Clifton <nickc@redhat.com>
1463
1464 PR ld/21180
1465 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
1466 generating a seg-fault when encountering a symbol that has been
1467 deleted by garbage collection.
1468
034fed0b
AM
14692017-02-25 Alan Modra <amodra@gmail.com>
1470
1471 * elf32-arc.c (struct dynamic_sections): Delete.
1472 (enum dyn_section_types): Delete.
1473 (dyn_section_names): Delete.
1474 (arc_create_dynamic_sections): Delete.
1475 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
1476 segfault on discarded .rela.plt section.
1477 (elf_arc_size_dynamic_sections): Formatting. Don't call
1478 arc_create_dynamic_sections. Don't allocate memory for sections
1479 handled by the generic linker. Correct code finding relocs in
1480 read-only sections. Set SEC_EXCLUDE on zero size .got,
1481 .got.plt, and .dynbss sections. Do set .interp for pies.
1482
d0f744f9
AW
14832017-02-24 Andrew Waterman <andrew@sifive.com>
1484
1485 * elfnn-riscv.c (GP_NAME): New macro.
1486 (riscv_global_pointer_value): Use it.
1487 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
1488 output section, consider only that section's alignment.
1489
5d58c733
MR
14902017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1491
1492 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
1493 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
1494 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
1495 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
1496
c1556ecd
MR
14972017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1498
1499 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
1500 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
1501 or misaligned.
1502
5499c7c7
AM
15032017-02-23 Alan Modra <amodra@gmail.com>
1504
1505 PR 20744
1506 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
1507 16D relocations.
1508 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
1509 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
1510 relocs.
1511
902e9fc7
MR
15122017-02-22 Maciej W. Rozycki <macro@imgtec.com>
1513
1514 PR ld/20828
1515 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
1516 processing ahead of the call to `elf_gc_sweep_symbol'.
1517
758d96d8
NC
15182017-02-22 Nick Clifton <nickc@redhat.com>
1519
1520 PR binutils/21193
1521 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
1522 created section 4-byte alignment.
1523
6528b6eb
AM
15242017-02-22 Alan Modra <amodra@gmail.com>
1525
1526 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
1527 on .got or .plt output section being discarded by script.
1528 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
1529 vxworks splt temp.
1530
24f1a751
AM
15312017-02-21 Alan Modra <amodra@gmail.com>
1532
1533 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
1534 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
1535
64487780
AM
15362017-02-20 Alan Modra <amodra@gmail.com>
1537
1538 PR 21181
1539 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
1540 if DT_RELSZ/DT_RELASZ is zero.
1541
6438d1be
NC
15422017-02-17 Nick Clifton <nickc@redhat.com>
1543
1544 * compress.c (bfd_get_full_section_contents): Remember to reduce
1545 compressed size by the sizeof the compression header when
1546 decompressing the contents.
1547
4bc26c69
PA
15482017-02-17 Pedro Alves <palves@redhat.com>
1549
1550 * srec.c (Chunk): Rename to ...
1551 (_bfd_srec_len): ... this.
1552 (S3Forced): Rename to ...
1553 (_bfd_srec_forceS3): ... this.
1554 * objcopy.c: Adjust all references.
1555
7ec22e0f
PA
15562017-02-17 Pedro Alves <palves@redhat.com>
1557
1558 * archive.c (bsd_write_armap): Rename to ...
1559 (_bfd_bsd_write_armap): ... this.
1560 (coff_write_armap): Rename to ...
1561 (_bfd_coff_write_armap): ... this.
1562 * libbfd-in.h (bsd_write_armap): Rename to ...
1563 (_bfd_bsd_write_armap): ... this.
1564 (coff_write_armap): Rename to ...
1565 (_bfd_coff_write_armap): ... this.
1566 * aout-target.h, aout-tic30.c: Adjust all users.
1567 * libbfd.h: Regenerate.
1568
8c8402cc
PA
15692017-02-17 Pedro Alves <palves@redhat.com>
1570
1571 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
1572 (warn_deprecated): Rename to ...
1573 (_bfd_warn_deprecated): ... this.
1574 * libbfd.c (warn_deprecated): Rename to ...
1575 (_bfd_warn_deprecated): ... this.
1576 * bfd-in2.h: Regenerate.
1577
c7c3d11b
PA
15782017-02-17 Pedro Alves <palves@redhat.com>
1579
1580 * bfdio.c (real_ftell): Rename to ...
1581 (_bfd_real_ftell): ... this.
1582 (real_fseek): Rename to ...
1583 (_bfd_real_fseek): ... this.
1584 (real_fopen): Rename to ...
1585 (_bfd_real_fopen): ... this.
1586 * libbfd-in.h (real_ftell): Rename to ...
1587 (_bfd_real_ftell): ... this.
1588 (real_fseek): Rename to ...
1589 (_bfd_real_fseek): ... this.
1590 (real_fopen): Rename to ...
1591 (_bfd_real_fopen): ... this.
1592 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
1593 * libbfd.h: Regenerate.
1594
4265548c
PA
15952017-02-17 Pedro Alves <palves@redhat.com>
1596
1597 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
1598 * libbfd.c (read_unsigned_leb128): Rename to ...
1599 (_bfd_read_unsigned_leb128): ... this.
1600 (read_signed_leb128): Rename to ...
1601 (_bfd_read_signed_leb128): ... this.
1602 (safe_read_leb128): Rename to ...
1603 (_bfd_safe_read_leb128): ... this.
1604 * libbfd-in.h (read_unsigned_leb128): Rename to ...
1605 (_bfd_read_unsigned_leb128): ... this.
1606 (read_signed_leb128): Rename to ...
1607 (_bfd_read_signed_leb128): ... this.
1608 (safe_read_leb128): Rename to ...
1609 (_bfd_safe_read_leb128): ... this.
1610 * libbfd.h: Renegerate.
1611
3239a423
AB
16122017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1613
1614 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
1615 before trying to fine matching file and line information.
1616
90ed9b8b
AB
16172017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1618
1619 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
1620 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
1621 not match current bfd, then reload debug information. Record bfd
1622 we're loading debug info for in the stash. If we have debug
1623 informatin in the cache then perform section placement before
1624 returning.
1625
a8c75b76
AM
16262017-02-16 Alan Modra <amodra@gmail.com>
1627
1628 PR 21000
1629 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
1630 * elfxx-target.h (elf_backend_no_page_alias): Define.
1631 (elfNN_bed): Init new field.
1632 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
1633 ensure PT_LOAD segment starts on a new page.
1634 * elf32-hppa.c (elf_backend_no_page_alias): Define.
1635
247d6c4c
AM
16362017-02-16 Alan Modra <amodra@gmail.com>
1637
1638 PR 21132
1639 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
1640 if pic.
1641
90571206
JW
16422017-02-16 Jiong Wang <jiong.wang@arm.com>
1643
1644 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
1645 * bfd-in2.h: Regenerated.
1646
2a568401
L
16472017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1648
1649 PR ld/21168
1650 * elf32-i386.c (elf_i386_relocate_section): Allow
1651 "lea foo@GOT, %reg" in PIC.
1652
a5def14f
L
16532017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1654
1655 PR ld/20244
1656 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
1657 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
1658 error against local IFUNC symbol without a base register for
1659 PIC.
1660
174d0a74
MR
16612017-02-15 Maciej W. Rozycki <macro@imgtec.com>
1662
1663 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
1664 `%P: %H:' with `info->callbacks->einfo'.
1665 (ppc_elf_relocate_section): Likewise.
1666 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1667 (ppc64_elf_edit_toc): Likewise.
1668 (ppc64_elf_relocate_section): Likewise.
1669
e278ae05
AM
16702017-02-14 Alan Modra <amodra@gmail.com>
1671
1672 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
1673 --gc-keep-exported, and test versioned field of sym rather than
1674 looking for @ in name.
1675
10ddfe62
PD
16762017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
1677
1678 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
1679 __global_pointer$.
1680
d11135f5
NC
16812017-02-13 Nick Clifton <nickc@redhat.com>
1682
1683 PR binutils/21151
1684 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
1685 unit length field.
1686
cc162427
AW
16872017-02-07 Andrew Waterman <andrew@sifive.com>
1688
1689 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
1690 entry size if PLT header is written.
1691
3d044c0c
SL
16922017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
1693
1694 Fix sparc64 dynamic relocation processing to use the dynamic
1695 symbol count.
1696 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
1697 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
1698 should be used.
1699
1b7e3d2f
NC
17002017-02-03 Nick Clifton <nickc@redhat.com>
1701
1702 PR 21096
1703 * coffcode.h (coff_write_object_contents): Enlarge size of
1704 s_name_buf in order to avoid compile time warning about possible
1705 integer truncation.
1706 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
1707 32-bits of insn value before printing into buffer.
1708
e17b0c35
MR
17092017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1710
1711 * elfxx-mips.c (mips_elf_hash_sort_data): Add
1712 `max_local_dynindx'.
1713 (mips_elf_sort_hash_table): Handle it.
1714 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
1715 symbols bump up `max_local_dynindx' rather than
1716 `max_non_got_dynindx'.
1717
55f8b9d2
MR
17182017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1719
1720 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
1721 `min_got_dynindx', `max_unref_got_dynindx' and
1722 `max_non_got_dynindx' members to the `bfd_size_type' data type.
1723 (mips_elf_sort_hash_table): Adjust accordingly.
1724
0f8c4b60
MR
17252017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1726
1727 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
1728 to access the hash table.
1729
17a80fa8
MR
17302017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1731
1732 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
1733 non-NULL `htab' to the beginning.
1734
8f56d4fd
MR
17352017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1736
1737 * elflink.c (elf_gc_sweep): Wrap overlong line.
1738
8b10b0b3
MR
17392017-01-30 Maciej W. Rozycki <macro@imgtec.com>
1740
1741 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
1742 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
1743 * elfxx-mips.c (mips_elf_link_hash_table): Add
1744 `ignore_branch_isa' member.
1745 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
1746 in branch relocation calculation as an error if
1747 `ignore_branch_isa' has been set.
1748 (_bfd_mips_elf_insn32): Rename to...
1749 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
1750 parameter to `insn32' and add an `ignore_branch_isa' parameter.
1751 Handle the new parameter.
1752
1fbd05e1
HPN
17532017-01-27 Hans-Peter Nilsson <hp@axis.com>
1754
22d9a0de
HPN
1755 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
1756 local variable dynobj.
1757
1fbd05e1
HPN
1758 PR ld/20995
1759 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
1760 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
1761 executable from read-only sections into sdynrelro.
1762 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
1763 dynamic relocs in sdynrelro.
1764 (elf_backend_want_dynrelro): Define.
1765
4a7324e1
SH
17662017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1767
1768 * config.bfd (*-*-rtemsaout*): Mark as removed.
1769
c75b4ebd
SH
17702017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1771
1772 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
1773 (arm-*-rtems*): Move to (arm*-*-eabi*).
1774 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
1775 (m68-*-rtems*): Move to (m68*-*-elf*).
1776
850d84f6
SH
17772017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
1778
1779 * config.bfd (*-*-rtemscoff*): Mark as removed.
1780
b531344c
MR
17812017-01-24 Maciej W. Rozycki <macro@imgtec.com>
1782
1783 PR ld/20828
1784 * elflink.c (bfd_elf_record_link_assignment): Revert last
1785 change and don't ever clear `forced_local'. Set `mark'
1786 unconditionally.
1787 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
1788 file.
1789 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
1790 (bfd_elf_size_dynamic_sections): ... here.
1791 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
1792 and set `mark' instead in `__tls_get_addr_opt' processing.
1793 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
1794
f0158f44
AM
17952017-01-24 Alan Modra <amodra@gmail.com>
1796
1797 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
1798 where dynamic relocs are preferable. Allow ifunc too.
1799 (ensure_undefweak_dynamic): New function.
1800 (allocate_dynrelocs): Use it here. Move plt handling last and
1801 don't make symbols dynamic, simplifying loop. Only make undef
1802 weak symbols with GOT entries dynamic. Correct condition
1803 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
1804 comments. Remove goto.
1805 (ppc_elf_relocate_section): Correct test for using dynamic
1806 symbol on GOT relocs. Rearrange test for emitting GOT relocs
1807 to suit. Set up explicit tls_index entries and implicit GOT
1808 tls_index entries resolvable at link time for
1809 __tls_get_addr_opt. Simplify test to clear mem for prelink.
1810 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
1811 (ensure_undefweak_dynamic): New function.
1812 (allocate_dynrelocs): Use it here. Only make undef weak symbols
1813 with GOT entries dynamic. Remove unnecessary test of
1814 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
1815 (ppc64_elf_relocate_section): Correct test for using dynamic
1816 symbol on GOT relocs. Rearrange test for emitting GOT relocs
1817 to suit. Set up explicit tls_index entries and implicit GOT
1818 tls_index entries resolvable at link time for __tls_get_addr_opt.
1819 Simplify expression to clear mem for prelink.
1820
2d0ca824
YN
18212017-01-23 Yury Norov <ynorov@caviumnetworks.com>
1822
1823 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
1824
7f784814
JW
18252017-01-20 Jiong Wang <jiong.wang@arm.com>
1826
1827 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
1828 (elf_backend_hash_symbol): Define.
1829
81ff47b3
MR
18302017-01-18 Maciej W. Rozycki <macro@imgtec.com>
1831
1832 PR ld/20828
1833 * elflink.c (bfd_elf_record_link_assignment): Clear any
1834 `forced_local' marking for DSO symbols that are not being
1835 provided.
1836
640d6bfd
KLC
18372017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1838
1839 * elfnn-riscv.c (riscv_elf_object_p): New function.
1840
8361ed4d
L
18412017-01-12 H.J. Lu <hongjiu.lu@intel.com>
1842
1843 PR ld/21038
1844 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
1845 plt_bnd_eh_frame.
1846 (elf_x86_64_check_relocs): Create .eh_frame section for the
1847 .plt.bnd section.
1848 (elf_x86_64_size_dynamic_sections): Allocate and initialize
1849 .eh_frame section for the .plt.bnd section.
1850 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1851 for the .plt.bnd section.
1852
2425a30e
NC
18532017-01-12 Nick Clifton <nickc@redhat.com>
1854
1855 PR binutils/20876
1856 * opncls.c (find_separate_debug_file): Add include_dirs
1857 parameter. Only include the directory part of the bfd's filename
1858 in search paths if include_dirs is true. Add a couple of extra
1859 locations for looking for debug files.
1860 ( bfd_follow_gnu_debuglink): Update invocation of
1861 find_separate_debug_file.
1862 (bfd_follow_gnu_debugaltlink): Likewise.
1863 (get_build_id): New function: Finds the build-id of the given bfd.
1864 (get_build_id_name): New function: Computes the name of the
1865 separate debug info file for a bfd, based upon its build-id.
1866 (check_build_id_file): New function: Checks to see if a separate
1867 debug info file exists at the given location, and that its
1868 build-id matches that of the original bfd.
1869 (bfd_follow_build_id_debuglink): New function: Finds a separate
1870 debug info file for a given bfd by using the build-id method.
1871 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
1872 method of locating a separate debug info file before using the
1873 debuglink method.
1874 * bfd-in2.h: Regenerate.
1875
9e659176
L
18762017-01-11 H.J. Lu <hongjiu.lu@intel.com>
1877
1878 PR ld/21038
1879 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
1880 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
1881 elf_x86_64_eh_frame_plt_got.
1882 (elf_x86_64_size_dynamic_sections): Get unwind info from
1883 elf_x86_64_bnd_arch_bed for the BND PLT.
1884
f2e2d2f5
JS
18852017-01-11 Jeremy Soller <jackpot51@gmail.com>
1886
1887 * config.bfd: Add entries for i686-redox and x86_64-redox.
1888
52b232b3
L
18892017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1890
1891 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
1892 to 4 bytes.
1893 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
1894 .eh_frame section to 4 bytes for x32.
1895 (elf_x86_64_check_relocs): Likewise.
1896
fff53dae
L
18972017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1898
1899 PR ld/20830
1900 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
1901 (PLT_GOT_FDE_LENGTH): Likewise.
1902 (elf_i386_plt_layout): Add eh_frame_plt_got and
1903 eh_frame_plt_got_size.
1904 (elf_i386_plt): Updated.
1905 (elf_i386_link_hash_table): Add plt_got_eh_frame.
1906 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
1907 (elf_i386_size_dynamic_sections): Allocate and initialize
1908 .eh_frame section for .plt.got.
1909 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
1910 .plt.got.
1911 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
1912 eh_frame_plt_got_size.
1913 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
1914 (PLT_GOT_FDE_LENGTH): Likewise.
1915 (elf_x86_64_backend_data): Add eh_frame_plt_got and
1916 eh_frame_plt_got_size.
1917 (elf_x86_64_arch_bed): Updated.
1918 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
1919 eh_frame_plt_got_size.
1920 (elf_x86_64_nacl_arch_bed): Likewise.
1921 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
1922 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
1923 (elf_x86_64_size_dynamic_sections): Allocate and initialize
1924 .eh_frame section for .plt.got.
1925 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1926 for .plt.got.
1927
f129e49f
L
19282017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1929
1930 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1931 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
1932
cd6581da
NC
19332017-01-09 Nick Clifton <nickc@redhat.com>
1934
1935 * dwarf2.c (lookup_address_in_function_table): Return early if
1936 there are no functions in the given comp unit, or if the high
1937 address of the last function in the comp unit is less than the
1938 desired address.
1939
98f02962
NC
19402017-01-09 Nick Clifton <nickc@redhat.com>
1941
1942 PR binutils/21013
1943 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
1944 message if there are too many symbols to load.
1945
ae4fda66
JC
19462017-01-04 James Clarke <jrtc27@jrtc27.com>
1947
1948 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
1949 if relocs are cached.
1950
de1010f4
RF
19512017-01-03 Rich Felker <bugdal@aerifal.cx>
1952
1953 PR ld/21017
1954 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
1955 for R_MICROBLAZE_GOTOFF_64.
1956
09fe2662
NC
19572017-01-03 Nick Clifton <nickc@redhat.com>
1958
1959 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
1960 warning about using a possibly uninitialised variable.
1961
595e0a47
AM
19622017-01-02 Alan Modra <amodra@gmail.com>
1963
1964 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
1965 (allocate_plt_static, allocate_dynrelocs): Use it.
1966
7bd9df3b
AM
19672017-01-02 Alan Modra <amodra@gmail.com>
1968
1969 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
1970 .PARISC.unwind section.
1971
5b86074c
AM
19722017-01-02 Alan Modra <amodra@gmail.com>
1973
1974 PR ld/20989
1975 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
1976 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
1977 indirect to GOT pointer relative code edit.
1978
2571583a
AM
19792017-01-02 Alan Modra <amodra@gmail.com>
1980
1981 Update year range in copyright notice of all files.
1982
5c1ad6b5 1983For older changes see ChangeLog-2016
3499769a 1984\f
5c1ad6b5 1985Copyright (C) 2017 Free Software Foundation, Inc.
3499769a
AM
1986
1987Copying and distribution of this file, with or without modification,
1988are permitted in any medium without royalty provided the copyright
1989notice and this notice are preserved.
1990
1991Local Variables:
1992mode: change-log
1993left-margin: 8
1994fill-column: 74
1995version-control: never
1996End:
This page took 0.207577 seconds and 4 git commands to generate.