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