xtensa_pseudo_register_read/write - Use regcache_raw_read_unsigned
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
9e9821dd
L
12017-04-24 H.J. Lu <hongjiu.lu@intel.com>
2
3 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
4 no_finish_dynamic_symbol.
5 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
6 0.
7 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
8 weak symbol, don't make it dynamic.
9 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
10 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
11 relocation for GOT reference.
12 (elf_x86_64_finish_dynamic_symbol): Abort if
13 no_finish_dynamic_symbol isn't 0.
14
0dc9a308
L
152017-04-24 H.J. Lu <hongjiu.lu@intel.com>
16
17 PR ld/21402
18 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
19 undefined weak symbol, don't make it dynamic.
20 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
21 set no_finish_dynamic_symbol and generate R_386_RELATIVE
22 relocation for R_386_GOT32.
23
1587442d
L
242017-04-24 H.J. Lu <hongjiu.lu@intel.com>
25
26 PR ld/21425
27 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
28
7eacd66b
AM
292017-04-23 Alan Modra <amodra@gmail.com>
30
31 PR 21414
32 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
33 * elf.c (lcomm_sym): New.
34 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
35 * bfd-in2.h: Regenerate.
36
bce964aa
AM
372017-04-23 Alan Modra <amodra@gmail.com>
38
39 PR 21412
40 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
41 parameters and comment.
42 (_bfd_elf_get_reloc_section): Delete.
43 (_bfd_elf_plt_get_reloc_section): Declare.
44 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
45 New functions. Don't blindly skip over assumed .rel/.rela prefix.
46 Extracted from..
47 (_bfd_elf_get_reloc_section): ..here. Delete.
48 (assign_section_numbers): Call elf_get_reloc_section.
49 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
50 * elfxx-target.h (elf_backend_get_reloc_section): Update.
51
97e83a10
AM
522017-04-23 Alan Modra <amodra@gmail.com>
53
54 PR 21409
55 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
56 no symbols.
57
e133d005
L
582017-04-21 H.J. Lu <hongjiu.lu@intel.com>
59
60 PR ld/21402
61 * elf32-i386.c (elf_i386_link_hash_entry): Add
62 no_finish_dynamic_symbol.
63 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
64 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
65 symbol, don't make it dynamic in PIE.
66 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
67 set no_finish_dynamic_symbol and generate R_386_RELATIVE
68 relocation for R_386_GOT32
69 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
70 isn't 0.
71
3c5fce9b
L
722017-04-21 H.J. Lu <hongjiu.lu@intel.com>
73
74 PR ld/19617
75 PR ld/21086
76 * elflink.c (elf_link_add_object_symbols): Require
77 --no-dynamic-linker with -E/--dynamic-list when creating
78 dynamic sections.
79
0fad2956
MR
802017-04-20 Maciej W. Rozycki <macro@imgtec.com>
81
82 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
83 if forced local.
84
64575f78
MR
852017-04-20 Maciej W. Rozycki <macro@imgtec.com>
86
87 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
88 dynamic symbol sorting.
89
59fa66c5
L
902017-04-20 H.J. Lu <hongjiu.lu@intel.com>
91
92 PR ld/21382
93 * elflink.c (elf_link_add_object_symbols): Preserve
94 dynamic_ref_after_ir_def when restoring the symbol table for
95 unneeded dynamic object.
96
e492d2f8
L
972017-04-19 H.J. Lu <hongjiu.lu@intel.com>
98
99 PR ld/21401
100 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
101 on on undefined IFUNC symbol in the second PLT.
102
10169134
WAF
1032017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
104
105 * peXXigen.c (pe_print_reloc): Correct chunk_end.
106
954b63d4
AM
1072017-04-19 Alan Modra <amodra@gmail.com>
108
109 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
110 or make dynamic for info->dynamic_undefined_weak 0 and 1.
111 * elf32-ppc.c:Formatting.
112 (ensure_undefweak_dynamic): Don't make dynamic when
113 info->dynamic_undefined_weak is zero.
114 (allocate_dynrelocs): Discard undefweak dyn_relocs for
115 info->dynamic_undefined_weak. Discard undef dyn_relocs when
116 not default visibility. Discard undef and undefweak
117 dyn_relocs earlier.
118 (ppc_elf_relocate_section): Adjust to suit.
119 * elf64-ppc.c: Formatting.
120 (ensure_undefweak_dynamic): Don't make dynamic when
121 info->dynamic_undefined_weak is zero.
122 (allocate_dynrelocs): Discard undefweak dyn_relocs for
123 info->dynamic_undefined_weak. Discard them earlier.
124
e6699019
L
1252017-04-17 H.J. Lu <hongjiu.lu@intel.com>
126
127 PR ld/21389
128 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
129 before generating the version definition section.
130
c5d37467
AM
1312017-04-17 Alan Modra <amodra@gmail.com>
132
133 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
134 state when a regular object file defines a symbol with
135 incompatible type to that defined by an earlier shared lib.
136
63a5468a
AM
1372017-04-13 Alan Modra <amodra@gmail.com>
138
139 * coffcode.h: Wrap some overly long _bfd_error_handler args.
140 * elf.c: Likewise.
141 * elf32-arm.c: Likewise.
142 * elf32-i386.c: Likewise.
143 * elf32-mep.c: Likewise.
144 * elf64-ia64-vms.c: Likewise.
145 * elf64-x86-64.c: Likewise.
146 * elflink.c: Likewise.
147 * elfnn-ia64.c: Likewise.
148 * elfxx-mips.c: Likewise.
149
dae82561
AM
1502017-04-13 Alan Modra <amodra@gmail.com>
151
152 * aoutx.h: Use %B and %A in error messages throughout file.
153 * aout-cris.c: Likewise.
154 * archive.c: Likewise.
155 * binary.c: Likewise.
156 * coff-rs6000.c: Likewise.
157 * coff-tic4x.c: Likewise.
158 * coffcode.h: Likewise.
159 * coffgen.c: Likewise.
160 * cofflink.c: Likewise.
161 * coffswap.h: Likewise.
162 * cpu-arm.c: Likewise.
163 * elf-eh-frame.c: Likewise.
164 * elf-m10300.c: Likewise.
165 * elf.c: Likewise.
166 * elf32-arc.c: Likewise.
167 * elf32-arm.c: Likewise.
168 * elf32-bfin.c: Likewise.
169 * elf32-frv.c: Likewise.
170 * elf32-iq2000.c: Likewise.
171 * elf32-m32c.c: Likewise.
172 * elf32-microblaze.c: Likewise.
173 * elf32-nds32.c: Likewise.
174 * elf32-rl78.c: Likewise.
175 * elf32-rx.c: Likewise.
176 * elf32-score.c: Likewise.
177 * elf32-score7.c: Likewise.
178 * elf32-sh64.c: Likewise.
179 * elf32-v850.c: Likewise.
180 * elf32-vax.c: Likewise.
181 * elf32-visium.c: Likewise.
182 * elf64-ia64-vms.c: Likewise.
183 * elf64-mmix.c: Likewise.
184 * elf64-sh64.c: Likewise.
185 * elfcode.h: Likewise.
186 * elfnn-aarch64.c: Likewise.
187 * elfnn-ia64.c: Likewise.
188 * elfxx-mips.c: Likewise.
189 * hpux-core.c: Likewise.
190 * ieee.c: Likewise.
191 * ihex.c: Likewise.
192 * linker.c: Likewise.
193 * merge.c: Likewise.
194 * mmo.c: Likewise.
195 * oasys.c: Likewise.
196 * pdp11.c: Likewise.
197 * peXXigen.c: Likewise.
198 * rs6000-core.c: Likewise.
199 * vms-alpha.c: Likewise.
200 * xcofflink.c: Likewise.
201
c08bb8dd
AM
2022017-04-13 Alan Modra <amodra@gmail.com>
203
204 * bfd.c (PRINT_TYPE): Define.
205 (_doprnt): New function.
206 (error_handler_internal): Use _doprnt.
207 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
208 calls in their natural order, throughout file.
209 * coff-mcore.c: Likewise.
210 * coff-ppc.c: Likewise.
211 * coff-tic80.c: Likewise.
212 * cofflink.c: Likewise.
213 * elf-s390-common.c: Likewise.
214 * elf.c: Likewise.
215 * elf32-arm.c: Likewise.
216 * elf32-i386.c: Likewise.
217 * elf32-m32r.c: Likewise.
218 * elf32-msp430.c: Likewise.
219 * elf32-spu.c: Likewise.
220 * elf64-ia64-vms.c: Likewise.
221 * elf64-sparc.c: Likewise.
222 * elf64-x86-64.c: Likewise.
223 * elflink.c: Likewise.
224 * elfnn-aarch64.c: Likewise.
225 * elfnn-ia64.c: Likewise.
226 * elfxx-mips.c: Likewise.
227
10463f39
AM
2282017-04-13 Alan Modra <amodra@gmail.com>
229
230 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
231 branch veneers" error. Fix double space and format message.
232 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
233 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
234
4af8774e
AM
2352017-04-13 Alan Modra <amodra@gmail.com>
236
237 * bfd-in2.h: Regenerate.
238
e4097f5e
L
2392017-04-11 H.J. Lu <hongjiu.lu@intel.com>
240
241 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
242 extra `\n' in warning/error messages.
243 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
244 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
245
537616aa
L
2462017-04-11 H.J. Lu <hongjiu.lu@intel.com>
247
248 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
249 processor-specific properties with generic ELF target vector.
250
bb1dd176
QZ
2512017-04-10 Qing Zhao <qing.zhao@oracle.com>
252
253 * elf32-sparc.c (elf_backend_fixup_symbol): New.
254 * elf64-sparc.c (elf_backend_fixup_symbol): New.
255 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
256 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
257 has_non_got_reloc.
258 (link_hash_newfunc): Initialize has_got_reloc and
259 has_non_got_reloc.
260 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
261 section.
262 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
263 has_non_got_reloc.
264 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
265 has_non_got_reloc.
266 (_bfd_sparc_elf_fixup_symbol): New function.
267 (allocate_dynrelocs): Don't allocate space for dynamic
268 relocations and discard relocations against resolved undefined
269 weak symbols in executable. Don't make resolved undefined weak
270 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
271 relocation against undefined weak symbols in PIE.
272 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
273 relocations against resolved undefined weak symbols in PIE
274 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
275 without ynamic PLT/GOT relocations for resolved undefined weak
276 symbols.
277 Don't generate dynamic relocation against resolved undefined
278 weak symbol in executable.
279 (pie_finish_undefweak_symbol): New function.
280 (_bfd_sparc_elf_finish_dynamic_sections): Call
281 pie_finish_undefweak_symbol on all symbols in PIE.
282 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
283 (_bfd_sparc_elf_fixup_symbol): New function.
284
d236cfd4
NC
2852017-04-10 Nick Clifton <nickc@redhat.com>
286
287 * config.bfd: Remove ns32k from obsolete list.
288
6f9dbcd4
AM
2892017-04-10 Alan Modra <amodra@gmail.com>
290
291 PR 21287
292 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
293 (special_sections_i): Likewise for .init_array.
294 (special_sections_p): Likewise for .preinit_array.
295
8170f769
L
2962017-04-07 H.J. Lu <hongjiu.lu@intel.com>
297
298 PR ld/19579
299 PR ld/21306
300 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
301 ELF_COMMON_DEF_P for common symbols.
302 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
303 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
304 * elflink.c (_bfd_elf_merge_symbol): Revert commits
305 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
306 07492f668d2173da7a2bda3707ff0985e0f460b6.
307
49f4617b
PA
3082017-04-07 Pedro Alves <palves@redhat.com>
309
310 * opncls.c (bfd_get_debug_link_info): Rename to...
311 (bfd_get_debug_link_info_1): ... this. Change type of second
312 parameter to void pointer. Adjust.
313 (bfd_get_debug_link_info): Reimplement on top of
314 bfd_get_debug_link_info_1.
315 (separate_debug_file_exists, separate_alt_debug_file_exists):
316 Change type of second parameter to void pointer. Adjust.
317 (get_func_type, check_func_type): Change type of second parameter
318 to void pointer.
319 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
320 the callback functions instead of passing the address of a local.
321 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
322 find_separate_debug_file.
323 (get_alt_debug_link_info_shim): Change type of second parameter to
324 void pointer. Adjust.
325 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
326 find_separate_debug_file.
327 (get_build_id_name, bfd_boolean check_build_id_file): Change type
328 of second parameter to void pointer. Adjust.
329 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
330 pointer local to find_separate_debug_file.
331
3322017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
1fd6d111
TG
333
334 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
335 external symbols with a definition.
336 (_bfd_coff_gc_mark_extra_sections): Fix typo.
337
86abf93a
AM
3382017-04-07 Alan Modra <amodra@gmail.com>
339
340 * po/SRC-POTFILES.in: Regenerate.
341
8dea77f0
AM
3422017-04-05 Alan Modra <amodra@gmail.com>
343
344 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
345 reference counting.
346
477bdd39
JT
3472017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
348
349 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
350 numbers for DataDirectory entry indicies passed to
351 add_data_entry().
352
a91e1603
L
3532017-04-04 H.J. Lu <hongjiu.lu@intel.com>
354
355 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
356 each GNU_MBIND section and align GNU_MBIND section to page size.
357 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
358 segment for each GNU_MBIND section.
359 (_bfd_elf_init_private_section_data): Copy sh_info from input
360 for GNU_MBIND section.
361
b5292032
PD
3622017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
363
364 * elfnn-riscv.c (GP_NAME): Delete.
365 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
366 (_bfd_riscv_relax_lui): Likewise.
367
ad32986f
NC
3682017-04-04 Nick Clifton <nickc@redhat.com>
369
370 PR binutils/21342
371 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
372 dereference.
373 (bfd_elf_final_link): Only initialize the extended symbol index
374 section if there are extended symbol tables to list.
375
46bed679
L
3762017-04-03 H.J. Lu <hongjiu.lu@intel.com>
377
378 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
379 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
380 * configure.ac (elf): Add elf-properties.lo.
381 * Makefile.in: Regenerated.
382 * configure: Likewise.
383 * elf-bfd.h (elf_property_kind): New.
384 (elf_property): Likewise.
385 (elf_property_list): Likewise.
386 (elf_properties): Likewise.
387 (_bfd_elf_parse_gnu_properties): Likewise.
388 (_bfd_elf_get_property): Likewise.
389 (_bfd_elf_link_setup_gnu_properties): Likewise.
390 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
391 and setup_gnu_properties.
392 (elf_obj_tdata): Add properties.
393 * elf-properties.c: New file.
394 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
395 (elf_i386_merge_gnu_properties): Likewise.
396 (elf_backend_parse_gnu_properties): Likewise.
397 (elf_backend_merge_gnu_properties): Likewise.
398 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
399 (elf_x86_64_merge_gnu_properties): Likewise.
400 (elf_backend_parse_gnu_properties): Likewise.
401 (elf_backend_merge_gnu_properties): Likewise.
402 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
403 (elf_backend_parse_gnu_properties): Likewise.
404 (elf_backend_setup_gnu_properties): Likewise.
405 (elfNN_bed): Add elf_backend_parse_gnu_properties,
406 elf_backend_merge_gnu_properties and
407 elf_backend_setup_gnu_properties.
408
f96bd6c2
PC
4092017-03-30 Pip Cet <pipcet@gmail.com>
410
411 * elf32-wasm32.c: Add relocation code, two relocs.
412 * reloc.c: Add wasm32 relocations.
413 * libbfd.h: Regenerate.
414 * bfd-in2.h: Regenerate.
415 * bfd/po/bfd.pot: Regenerate.
416
e643cb45
NC
4172017-03-29 Nick Clifton <nickc@redhat.com>
418
419 PR binutils/18025
420 * coff-bfd.h (struct coff_section_data): Add new fields:
421 saved_bias and bias.
422 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
423 computed for PE binaries.
424 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
425 missing abbrev.
426
086554e8
HPN
4272017-03-28 Hans-Peter Nilsson <hp@axis.com>
428
429 PR ld/16044
430 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
431 to handle a local symbol with a hash-symbol-entry; without PLT.
432 Add BFD_ASSERT for an incidental case with GOT entry present.
433 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
434 isn't forced-or-set local.
435
a6be0538
PC
4362017-03-27 Pip Cet <pipcet@gmail.com>
437
438 * wasm-module.c: New file to support WebAssembly modules.
439 * wasm-module.h: New file to support WebAssembly modules.
440 * doc/webassembly.texi: Start documenting wasm-module.c.
441 * config.bfd: Add wasm_vec.
442 * targets.c: Likewise.
443 * configure.ac: Likewise.
444 * Makefile.am: Add entries for wasm-module.c.
445 * Makefile.in: Regenerate.
446 * configure: Regenerate.
447 * po/SRC-POTFILES.in: Regenerate.
448
79b1d3cb
PC
4492017-03-27 Pip Cet <pipcet@gmail.com>
450
451 * cpu-wasm32.c: New file to support wasm32 architecture.
452 * elf32-wasm32.c: New file to support wasm32 architecture.
453 * Makefile.am: Add wasm32 architecture.
454 * archures.c: Likewise.
455 * config.bfd: Likewise.
456 * configure.ac: Likewise.
457 * targets.c: Likewise.
458 * Makefile.in: Regenerate.
459 * bfd-in2.h: Regenerate.
460 * configure: Regenerate.
461 * po/SRC-POTFILES.in: Regenerate.
462
aaed6f5b
AM
4632017-03-20 Alan Modra <amodra@gmail.com>
464
465 PR 21266
466 * elf64-ppc.c (compare_symbols): Stabilize sort.
467
82e66161
AM
4682017-03-18 Alan Modra <amodra@gmail.com>
469
470 * elf64-ppc.c (struct ppc_link_hash_table): Add
471 local_ifunc_resolver and maybe_local_ifunc_resolver.
472 (ppc_build_one_stub): Set flags on emitting dynamic
473 relocation to ifunc.
474 (ppc64_elf_relocate_section): Likewise.
475 (ppc64_elf_finish_dynamic_symbol): Likewise.
476 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
477 local dynamic relocs to ifuncs.
478 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
479 local_ifunc_resolver and maybe_local_ifunc_resolver.
480 (ppc_elf_relocate_section): Set flag on emitting dynamic
481 relocation to ifuncs.
482 (ppc_elf_finish_dynamic_symbol): Likewise.
483 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
484 dynamic relocs to ifuncs.
485
f955cccf
NC
4862017-03-13 Nick Clifton <nickc@redhat.com>
487
488 PR binutils/21202
489 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
490 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
491 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
492 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
493 * bfd-in2.h: Regenerate.
494 * libbfd.h: Regenerate.
495 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
496 names.
497 (IS_AARCH64_TLSDESC_RELOC): Likewise.
498 (elfNN_aarch64_howto_table): Likewise.
499 (aarch64_tls_transition_without_check): Likewise.
500 (aarch64_reloc_got_type): Likewise.
501 (elfNN_aarch64_final_link_relocate): Likewise.
502 (elfNN_aarch64_tls_relax): Likewise.
503 (elfNN_aarch64_relocate_section): Likewise.
504 (elfNN_aarch64_gc_sweep_hook): Likewise.
505 (elfNN_aarch64_check_relocs): Likewise.
506 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
507 (_bfd_aarch64_elf_resolve_relocation): Likewise.
508
4aef7643
AM
5092017-03-11 Alan Modra <amodra@gmail.com>
510
511 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
512 parameter is in fact used. Whitespace fixes.
513 * elf64-ppc.c: Likewise.
514
f03265d9
ST
5152017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
516
517 * rs6000-core.c (CORE_NEW): Simplify macro when
518 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
519
b1b07054
AM
5202017-03-07 Alan Modra <amodra@gmail.com>
521
522 PR 21224
523 PR 20519
524 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
525 dyn_relocs check.
526
2e0ce1c8
AM
5272017-03-05 Alan Modra <amodra@gmail.com>
528
529 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
530 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
531 (next_cie_fde_offset): New function.
532 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
533 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
534 four bytes. Align CIEs to four or eight bytes depending on
535 per_encoding_aligned8. Align FDEs according to their encoding.
536 Pad last FDE to output section alignment.
537 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
538 assertion.
539 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
540 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
541 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
542
f98450c6
NC
5432017-03-02 Martin Bickel <binutils@ineranves.de>
544
545 PR ld/21212
546 * elf.c (rewrite_elf_program_header): Do not issue a warning for
d20928fa 547 empty segments which have a zero filesz, but a non-zero memsz.
f98450c6 548
673cff9b
AM
5492017-03-02 Alan Modra <amodra@gmail.com>
550
551 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
552
3de43e7b
AM
5532017-02-28 Alan Modra <amodra@gmail.com>
554
555 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
556 (ppc64_elf_relocate_section): Likewise.
557
4ef97a1b
AM
5582017-02-28 Alan Modra <amodra@gmail.com>
559
560 PR 20995
561 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
562 rather than elf32_nios2_hash_table or elf_hash_table.
563 (create_got_section): Likewise.
564 (nios2_elf32_finish_dynamic_symbol): Likewise.
565 (nios2_elf32_adjust_dynamic_symbol): Likewise.
566 (nios2_elf32_size_dynamic_sections): Likewise.
567 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
568 vars. Use htab equivalents directly instead. Don't create
569 all dynamic sections on needing just the GOT. Use a goto
570 rather than a fall-through with reloc test. Ensure
571 htab->dynobj is set when making dynamic sreloc section.
572 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
573 equivalent directly instead. Don't segfault on looking for
574 .dynamic when dynamic sections have not been created. Don't
575 segfault on .got.plt being discarded.
576 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
577 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
578 fixme and another not so relevant comment.
579 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
580 already set, set hash table dynobj on creating .sbss.
581
7ba71655
AM
5822017-02-28 Alan Modra <amodra@gmail.com>
583
584 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
585 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
586 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
587 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
588 (ppc64_elf_relocate_section): Likewise.
589 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
590 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
591 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
592 * libbfd.h: Regenerate.
593 * bfd-in2.h: Regenerate.
594
afbf7e8e
AM
5952017-02-28 Alan Modra <amodra@gmail.com>
596
597 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
598 dynamic .data.rel.ro read-only.
599 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
600 rather than section flags when deciding where copy reloc goes.
601 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
602 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
603 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
604 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
605 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
606 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
607 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
608 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
609 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
610 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
611 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
612 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
613 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
614 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
615 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
616 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
617 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
618 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
619 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
620
0e392101
MR
6212017-02-28 Maciej W. Rozycki <macro@imgtec.com>
622
623 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
624 `jalr $0, $25' instruction encoding.
625
bd757ca7
NC
6262017-02-27 Nick Clifton <nickc@redhat.com>
627
628 PR ld/21180
629 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
630 generating a seg-fault when encountering a symbol that has been
631 deleted by garbage collection.
632
034fed0b
AM
6332017-02-25 Alan Modra <amodra@gmail.com>
634
635 * elf32-arc.c (struct dynamic_sections): Delete.
636 (enum dyn_section_types): Delete.
637 (dyn_section_names): Delete.
638 (arc_create_dynamic_sections): Delete.
639 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
640 segfault on discarded .rela.plt section.
641 (elf_arc_size_dynamic_sections): Formatting. Don't call
642 arc_create_dynamic_sections. Don't allocate memory for sections
643 handled by the generic linker. Correct code finding relocs in
644 read-only sections. Set SEC_EXCLUDE on zero size .got,
645 .got.plt, and .dynbss sections. Do set .interp for pies.
646
d0f744f9
AW
6472017-02-24 Andrew Waterman <andrew@sifive.com>
648
649 * elfnn-riscv.c (GP_NAME): New macro.
650 (riscv_global_pointer_value): Use it.
651 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
652 output section, consider only that section's alignment.
653
5d58c733
MR
6542017-02-23 Maciej W. Rozycki <macro@imgtec.com>
655
656 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
657 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
658 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
659 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
660
c1556ecd
MR
6612017-02-23 Maciej W. Rozycki <macro@imgtec.com>
662
663 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
664 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
665 or misaligned.
666
5499c7c7
AM
6672017-02-23 Alan Modra <amodra@gmail.com>
668
669 PR 20744
670 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
671 16D relocations.
672 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
673 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
674 relocs.
675
902e9fc7
MR
6762017-02-22 Maciej W. Rozycki <macro@imgtec.com>
677
678 PR ld/20828
679 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
680 processing ahead of the call to `elf_gc_sweep_symbol'.
681
758d96d8
NC
6822017-02-22 Nick Clifton <nickc@redhat.com>
683
684 PR binutils/21193
685 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
686 created section 4-byte alignment.
687
6528b6eb
AM
6882017-02-22 Alan Modra <amodra@gmail.com>
689
690 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
691 on .got or .plt output section being discarded by script.
692 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
693 vxworks splt temp.
694
24f1a751
AM
6952017-02-21 Alan Modra <amodra@gmail.com>
696
697 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
698 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
699
64487780
AM
7002017-02-20 Alan Modra <amodra@gmail.com>
701
702 PR 21181
703 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
704 if DT_RELSZ/DT_RELASZ is zero.
705
6438d1be
NC
7062017-02-17 Nick Clifton <nickc@redhat.com>
707
708 * compress.c (bfd_get_full_section_contents): Remember to reduce
709 compressed size by the sizeof the compression header when
710 decompressing the contents.
711
4bc26c69
PA
7122017-02-17 Pedro Alves <palves@redhat.com>
713
714 * srec.c (Chunk): Rename to ...
715 (_bfd_srec_len): ... this.
716 (S3Forced): Rename to ...
717 (_bfd_srec_forceS3): ... this.
718 * objcopy.c: Adjust all references.
719
7ec22e0f
PA
7202017-02-17 Pedro Alves <palves@redhat.com>
721
722 * archive.c (bsd_write_armap): Rename to ...
723 (_bfd_bsd_write_armap): ... this.
724 (coff_write_armap): Rename to ...
725 (_bfd_coff_write_armap): ... this.
726 * libbfd-in.h (bsd_write_armap): Rename to ...
727 (_bfd_bsd_write_armap): ... this.
728 (coff_write_armap): Rename to ...
729 (_bfd_coff_write_armap): ... this.
730 * aout-target.h, aout-tic30.c: Adjust all users.
731 * libbfd.h: Regenerate.
732
8c8402cc
PA
7332017-02-17 Pedro Alves <palves@redhat.com>
734
735 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
736 (warn_deprecated): Rename to ...
737 (_bfd_warn_deprecated): ... this.
738 * libbfd.c (warn_deprecated): Rename to ...
739 (_bfd_warn_deprecated): ... this.
740 * bfd-in2.h: Regenerate.
741
c7c3d11b
PA
7422017-02-17 Pedro Alves <palves@redhat.com>
743
744 * bfdio.c (real_ftell): Rename to ...
745 (_bfd_real_ftell): ... this.
746 (real_fseek): Rename to ...
747 (_bfd_real_fseek): ... this.
748 (real_fopen): Rename to ...
749 (_bfd_real_fopen): ... this.
750 * libbfd-in.h (real_ftell): Rename to ...
751 (_bfd_real_ftell): ... this.
752 (real_fseek): Rename to ...
753 (_bfd_real_fseek): ... this.
754 (real_fopen): Rename to ...
755 (_bfd_real_fopen): ... this.
756 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
757 * libbfd.h: Regenerate.
758
4265548c
PA
7592017-02-17 Pedro Alves <palves@redhat.com>
760
761 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
762 * libbfd.c (read_unsigned_leb128): Rename to ...
763 (_bfd_read_unsigned_leb128): ... this.
764 (read_signed_leb128): Rename to ...
765 (_bfd_read_signed_leb128): ... this.
766 (safe_read_leb128): Rename to ...
767 (_bfd_safe_read_leb128): ... this.
768 * libbfd-in.h (read_unsigned_leb128): Rename to ...
769 (_bfd_read_unsigned_leb128): ... this.
770 (read_signed_leb128): Rename to ...
771 (_bfd_read_signed_leb128): ... this.
772 (safe_read_leb128): Rename to ...
773 (_bfd_safe_read_leb128): ... this.
774 * libbfd.h: Renegerate.
775
3239a423
AB
7762017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
777
778 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
779 before trying to fine matching file and line information.
780
90ed9b8b
AB
7812017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
782
783 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
784 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
785 not match current bfd, then reload debug information. Record bfd
786 we're loading debug info for in the stash. If we have debug
787 informatin in the cache then perform section placement before
788 returning.
789
a8c75b76
AM
7902017-02-16 Alan Modra <amodra@gmail.com>
791
792 PR 21000
793 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
794 * elfxx-target.h (elf_backend_no_page_alias): Define.
795 (elfNN_bed): Init new field.
796 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
797 ensure PT_LOAD segment starts on a new page.
798 * elf32-hppa.c (elf_backend_no_page_alias): Define.
799
247d6c4c
AM
8002017-02-16 Alan Modra <amodra@gmail.com>
801
802 PR 21132
803 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
804 if pic.
805
90571206
JW
8062017-02-16 Jiong Wang <jiong.wang@arm.com>
807
808 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
809 * bfd-in2.h: Regenerated.
810
2a568401
L
8112017-02-15 H.J. Lu <hongjiu.lu@intel.com>
812
813 PR ld/21168
814 * elf32-i386.c (elf_i386_relocate_section): Allow
815 "lea foo@GOT, %reg" in PIC.
816
a5def14f
L
8172017-02-15 H.J. Lu <hongjiu.lu@intel.com>
818
819 PR ld/20244
820 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
821 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
822 error against local IFUNC symbol without a base register for
823 PIC.
824
174d0a74
MR
8252017-02-15 Maciej W. Rozycki <macro@imgtec.com>
826
827 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
828 `%P: %H:' with `info->callbacks->einfo'.
829 (ppc_elf_relocate_section): Likewise.
830 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
831 (ppc64_elf_edit_toc): Likewise.
832 (ppc64_elf_relocate_section): Likewise.
833
e278ae05
AM
8342017-02-14 Alan Modra <amodra@gmail.com>
835
836 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
837 --gc-keep-exported, and test versioned field of sym rather than
838 looking for @ in name.
839
10ddfe62
PD
8402017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
841
842 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
843 __global_pointer$.
844
d11135f5
NC
8452017-02-13 Nick Clifton <nickc@redhat.com>
846
847 PR binutils/21151
848 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
849 unit length field.
850
cc162427
AW
8512017-02-07 Andrew Waterman <andrew@sifive.com>
852
853 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
854 entry size if PLT header is written.
855
3d044c0c
SL
8562017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
857
858 Fix sparc64 dynamic relocation processing to use the dynamic
859 symbol count.
860 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
861 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
862 should be used.
863
1b7e3d2f
NC
8642017-02-03 Nick Clifton <nickc@redhat.com>
865
866 PR 21096
867 * coffcode.h (coff_write_object_contents): Enlarge size of
868 s_name_buf in order to avoid compile time warning about possible
869 integer truncation.
870 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
871 32-bits of insn value before printing into buffer.
872
e17b0c35
MR
8732017-02-02 Maciej W. Rozycki <macro@imgtec.com>
874
875 * elfxx-mips.c (mips_elf_hash_sort_data): Add
876 `max_local_dynindx'.
877 (mips_elf_sort_hash_table): Handle it.
878 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
879 symbols bump up `max_local_dynindx' rather than
880 `max_non_got_dynindx'.
881
55f8b9d2
MR
8822017-02-02 Maciej W. Rozycki <macro@imgtec.com>
883
884 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
885 `min_got_dynindx', `max_unref_got_dynindx' and
886 `max_non_got_dynindx' members to the `bfd_size_type' data type.
887 (mips_elf_sort_hash_table): Adjust accordingly.
888
0f8c4b60
MR
8892017-02-02 Maciej W. Rozycki <macro@imgtec.com>
890
891 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
892 to access the hash table.
893
17a80fa8
MR
8942017-02-02 Maciej W. Rozycki <macro@imgtec.com>
895
896 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
897 non-NULL `htab' to the beginning.
898
8f56d4fd
MR
8992017-02-02 Maciej W. Rozycki <macro@imgtec.com>
900
901 * elflink.c (elf_gc_sweep): Wrap overlong line.
902
8b10b0b3
MR
9032017-01-30 Maciej W. Rozycki <macro@imgtec.com>
904
905 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
906 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
907 * elfxx-mips.c (mips_elf_link_hash_table): Add
908 `ignore_branch_isa' member.
909 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
910 in branch relocation calculation as an error if
911 `ignore_branch_isa' has been set.
912 (_bfd_mips_elf_insn32): Rename to...
913 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
914 parameter to `insn32' and add an `ignore_branch_isa' parameter.
915 Handle the new parameter.
916
1fbd05e1
HPN
9172017-01-27 Hans-Peter Nilsson <hp@axis.com>
918
22d9a0de
HPN
919 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
920 local variable dynobj.
921
1fbd05e1
HPN
922 PR ld/20995
923 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
924 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
925 executable from read-only sections into sdynrelro.
926 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
927 dynamic relocs in sdynrelro.
928 (elf_backend_want_dynrelro): Define.
929
4a7324e1
SH
9302017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
931
932 * config.bfd (*-*-rtemsaout*): Mark as removed.
933
c75b4ebd
SH
9342017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
935
936 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
937 (arm-*-rtems*): Move to (arm*-*-eabi*).
938 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
939 (m68-*-rtems*): Move to (m68*-*-elf*).
940
850d84f6
SH
9412017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
942
943 * config.bfd (*-*-rtemscoff*): Mark as removed.
944
b531344c
MR
9452017-01-24 Maciej W. Rozycki <macro@imgtec.com>
946
947 PR ld/20828
948 * elflink.c (bfd_elf_record_link_assignment): Revert last
949 change and don't ever clear `forced_local'. Set `mark'
950 unconditionally.
951 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
952 file.
953 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
954 (bfd_elf_size_dynamic_sections): ... here.
955 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
956 and set `mark' instead in `__tls_get_addr_opt' processing.
957 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
958
f0158f44
AM
9592017-01-24 Alan Modra <amodra@gmail.com>
960
961 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
962 where dynamic relocs are preferable. Allow ifunc too.
963 (ensure_undefweak_dynamic): New function.
964 (allocate_dynrelocs): Use it here. Move plt handling last and
965 don't make symbols dynamic, simplifying loop. Only make undef
966 weak symbols with GOT entries dynamic. Correct condition
967 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
968 comments. Remove goto.
969 (ppc_elf_relocate_section): Correct test for using dynamic
970 symbol on GOT relocs. Rearrange test for emitting GOT relocs
971 to suit. Set up explicit tls_index entries and implicit GOT
972 tls_index entries resolvable at link time for
973 __tls_get_addr_opt. Simplify test to clear mem for prelink.
974 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
975 (ensure_undefweak_dynamic): New function.
976 (allocate_dynrelocs): Use it here. Only make undef weak symbols
977 with GOT entries dynamic. Remove unnecessary test of
978 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
979 (ppc64_elf_relocate_section): Correct test for using dynamic
980 symbol on GOT relocs. Rearrange test for emitting GOT relocs
981 to suit. Set up explicit tls_index entries and implicit GOT
982 tls_index entries resolvable at link time for __tls_get_addr_opt.
983 Simplify expression to clear mem for prelink.
984
2d0ca824
YN
9852017-01-23 Yury Norov <ynorov@caviumnetworks.com>
986
987 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
988
7f784814
JW
9892017-01-20 Jiong Wang <jiong.wang@arm.com>
990
991 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
992 (elf_backend_hash_symbol): Define.
993
81ff47b3
MR
9942017-01-18 Maciej W. Rozycki <macro@imgtec.com>
995
996 PR ld/20828
997 * elflink.c (bfd_elf_record_link_assignment): Clear any
998 `forced_local' marking for DSO symbols that are not being
999 provided.
1000
640d6bfd
KLC
10012017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1002
1003 * elfnn-riscv.c (riscv_elf_object_p): New function.
1004
8361ed4d
L
10052017-01-12 H.J. Lu <hongjiu.lu@intel.com>
1006
1007 PR ld/21038
1008 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
1009 plt_bnd_eh_frame.
1010 (elf_x86_64_check_relocs): Create .eh_frame section for the
1011 .plt.bnd section.
1012 (elf_x86_64_size_dynamic_sections): Allocate and initialize
1013 .eh_frame section for the .plt.bnd section.
1014 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1015 for the .plt.bnd section.
1016
2425a30e
NC
10172017-01-12 Nick Clifton <nickc@redhat.com>
1018
1019 PR binutils/20876
1020 * opncls.c (find_separate_debug_file): Add include_dirs
1021 parameter. Only include the directory part of the bfd's filename
1022 in search paths if include_dirs is true. Add a couple of extra
1023 locations for looking for debug files.
1024 ( bfd_follow_gnu_debuglink): Update invocation of
1025 find_separate_debug_file.
1026 (bfd_follow_gnu_debugaltlink): Likewise.
1027 (get_build_id): New function: Finds the build-id of the given bfd.
1028 (get_build_id_name): New function: Computes the name of the
1029 separate debug info file for a bfd, based upon its build-id.
1030 (check_build_id_file): New function: Checks to see if a separate
1031 debug info file exists at the given location, and that its
1032 build-id matches that of the original bfd.
1033 (bfd_follow_build_id_debuglink): New function: Finds a separate
1034 debug info file for a given bfd by using the build-id method.
1035 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
1036 method of locating a separate debug info file before using the
1037 debuglink method.
1038 * bfd-in2.h: Regenerate.
1039
9e659176
L
10402017-01-11 H.J. Lu <hongjiu.lu@intel.com>
1041
1042 PR ld/21038
1043 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
1044 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
1045 elf_x86_64_eh_frame_plt_got.
1046 (elf_x86_64_size_dynamic_sections): Get unwind info from
1047 elf_x86_64_bnd_arch_bed for the BND PLT.
1048
f2e2d2f5
JS
10492017-01-11 Jeremy Soller <jackpot51@gmail.com>
1050
1051 * config.bfd: Add entries for i686-redox and x86_64-redox.
1052
52b232b3
L
10532017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1054
1055 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
1056 to 4 bytes.
1057 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
1058 .eh_frame section to 4 bytes for x32.
1059 (elf_x86_64_check_relocs): Likewise.
1060
fff53dae
L
10612017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1062
1063 PR ld/20830
1064 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
1065 (PLT_GOT_FDE_LENGTH): Likewise.
1066 (elf_i386_plt_layout): Add eh_frame_plt_got and
1067 eh_frame_plt_got_size.
1068 (elf_i386_plt): Updated.
1069 (elf_i386_link_hash_table): Add plt_got_eh_frame.
1070 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
1071 (elf_i386_size_dynamic_sections): Allocate and initialize
1072 .eh_frame section for .plt.got.
1073 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
1074 .plt.got.
1075 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
1076 eh_frame_plt_got_size.
1077 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
1078 (PLT_GOT_FDE_LENGTH): Likewise.
1079 (elf_x86_64_backend_data): Add eh_frame_plt_got and
1080 eh_frame_plt_got_size.
1081 (elf_x86_64_arch_bed): Updated.
1082 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
1083 eh_frame_plt_got_size.
1084 (elf_x86_64_nacl_arch_bed): Likewise.
1085 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
1086 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
1087 (elf_x86_64_size_dynamic_sections): Allocate and initialize
1088 .eh_frame section for .plt.got.
1089 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1090 for .plt.got.
1091
f129e49f
L
10922017-01-10 H.J. Lu <hongjiu.lu@intel.com>
1093
1094 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1095 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
1096
cd6581da
NC
10972017-01-09 Nick Clifton <nickc@redhat.com>
1098
1099 * dwarf2.c (lookup_address_in_function_table): Return early if
1100 there are no functions in the given comp unit, or if the high
1101 address of the last function in the comp unit is less than the
1102 desired address.
1103
98f02962
NC
11042017-01-09 Nick Clifton <nickc@redhat.com>
1105
1106 PR binutils/21013
1107 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
1108 message if there are too many symbols to load.
1109
ae4fda66
JC
11102017-01-04 James Clarke <jrtc27@jrtc27.com>
1111
1112 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
1113 if relocs are cached.
1114
de1010f4
RF
11152017-01-03 Rich Felker <bugdal@aerifal.cx>
1116
1117 PR ld/21017
1118 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
1119 for R_MICROBLAZE_GOTOFF_64.
1120
09fe2662
NC
11212017-01-03 Nick Clifton <nickc@redhat.com>
1122
1123 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
1124 warning about using a possibly uninitialised variable.
1125
595e0a47
AM
11262017-01-02 Alan Modra <amodra@gmail.com>
1127
1128 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
1129 (allocate_plt_static, allocate_dynrelocs): Use it.
1130
7bd9df3b
AM
11312017-01-02 Alan Modra <amodra@gmail.com>
1132
1133 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
1134 .PARISC.unwind section.
1135
5b86074c
AM
11362017-01-02 Alan Modra <amodra@gmail.com>
1137
1138 PR ld/20989
1139 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
1140 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
1141 indirect to GOT pointer relative code edit.
1142
2571583a
AM
11432017-01-02 Alan Modra <amodra@gmail.com>
1144
1145 Update year range in copyright notice of all files.
1146
5c1ad6b5 1147For older changes see ChangeLog-2016
3499769a 1148\f
5c1ad6b5 1149Copyright (C) 2017 Free Software Foundation, Inc.
3499769a
AM
1150
1151Copying and distribution of this file, with or without modification,
1152are permitted in any medium without royalty provided the copyright
1153notice and this notice are preserved.
1154
1155Local Variables:
1156mode: change-log
1157left-margin: 8
1158fill-column: 74
1159version-control: never
1160End:
This page took 0.141099 seconds and 4 git commands to generate.