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