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