]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - bfd/ChangeLog
Remove the ns32k target from the obsolete list.
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
d236cfd4
NC
12017-04-10 Nick Clifton <nickc@redhat.com>
2
3 * config.bfd: Remove ns32k from obsolete list.
4
6f9dbcd4
AM
52017-04-10 Alan Modra <amodra@gmail.com>
6
7 PR 21287
8 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
9 (special_sections_i): Likewise for .init_array.
10 (special_sections_p): Likewise for .preinit_array.
11
8170f769
L
122017-04-07 H.J. Lu <hongjiu.lu@intel.com>
13
14 PR ld/19579
15 PR ld/21306
16 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
17 ELF_COMMON_DEF_P for common symbols.
18 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
19 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
20 * elflink.c (_bfd_elf_merge_symbol): Revert commits
21 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
22 07492f668d2173da7a2bda3707ff0985e0f460b6.
23
49f4617b
PA
242017-04-07 Pedro Alves <palves@redhat.com>
25
26 * opncls.c (bfd_get_debug_link_info): Rename to...
27 (bfd_get_debug_link_info_1): ... this. Change type of second
28 parameter to void pointer. Adjust.
29 (bfd_get_debug_link_info): Reimplement on top of
30 bfd_get_debug_link_info_1.
31 (separate_debug_file_exists, separate_alt_debug_file_exists):
32 Change type of second parameter to void pointer. Adjust.
33 (get_func_type, check_func_type): Change type of second parameter
34 to void pointer.
35 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
36 the callback functions instead of passing the address of a local.
37 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
38 find_separate_debug_file.
39 (get_alt_debug_link_info_shim): Change type of second parameter to
40 void pointer. Adjust.
41 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
42 find_separate_debug_file.
43 (get_build_id_name, bfd_boolean check_build_id_file): Change type
44 of second parameter to void pointer. Adjust.
45 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
46 pointer local to find_separate_debug_file.
47
482017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
1fd6d111
TG
49
50 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
51 external symbols with a definition.
52 (_bfd_coff_gc_mark_extra_sections): Fix typo.
53
86abf93a
AM
542017-04-07 Alan Modra <amodra@gmail.com>
55
56 * po/SRC-POTFILES.in: Regenerate.
57
8dea77f0
AM
582017-04-05 Alan Modra <amodra@gmail.com>
59
60 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
61 reference counting.
62
477bdd39
JT
632017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
64
65 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
66 numbers for DataDirectory entry indicies passed to
67 add_data_entry().
68
a91e1603
L
692017-04-04 H.J. Lu <hongjiu.lu@intel.com>
70
71 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
72 each GNU_MBIND section and align GNU_MBIND section to page size.
73 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
74 segment for each GNU_MBIND section.
75 (_bfd_elf_init_private_section_data): Copy sh_info from input
76 for GNU_MBIND section.
77
b5292032
PD
782017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
79
80 * elfnn-riscv.c (GP_NAME): Delete.
81 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
82 (_bfd_riscv_relax_lui): Likewise.
83
ad32986f
NC
842017-04-04 Nick Clifton <nickc@redhat.com>
85
86 PR binutils/21342
87 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
88 dereference.
89 (bfd_elf_final_link): Only initialize the extended symbol index
90 section if there are extended symbol tables to list.
91
46bed679
L
922017-04-03 H.J. Lu <hongjiu.lu@intel.com>
93
94 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
95 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
96 * configure.ac (elf): Add elf-properties.lo.
97 * Makefile.in: Regenerated.
98 * configure: Likewise.
99 * elf-bfd.h (elf_property_kind): New.
100 (elf_property): Likewise.
101 (elf_property_list): Likewise.
102 (elf_properties): Likewise.
103 (_bfd_elf_parse_gnu_properties): Likewise.
104 (_bfd_elf_get_property): Likewise.
105 (_bfd_elf_link_setup_gnu_properties): Likewise.
106 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
107 and setup_gnu_properties.
108 (elf_obj_tdata): Add properties.
109 * elf-properties.c: New file.
110 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
111 (elf_i386_merge_gnu_properties): Likewise.
112 (elf_backend_parse_gnu_properties): Likewise.
113 (elf_backend_merge_gnu_properties): Likewise.
114 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
115 (elf_x86_64_merge_gnu_properties): Likewise.
116 (elf_backend_parse_gnu_properties): Likewise.
117 (elf_backend_merge_gnu_properties): Likewise.
118 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
119 (elf_backend_parse_gnu_properties): Likewise.
120 (elf_backend_setup_gnu_properties): Likewise.
121 (elfNN_bed): Add elf_backend_parse_gnu_properties,
122 elf_backend_merge_gnu_properties and
123 elf_backend_setup_gnu_properties.
124
f96bd6c2
PC
1252017-03-30 Pip Cet <pipcet@gmail.com>
126
127 * elf32-wasm32.c: Add relocation code, two relocs.
128 * reloc.c: Add wasm32 relocations.
129 * libbfd.h: Regenerate.
130 * bfd-in2.h: Regenerate.
131 * bfd/po/bfd.pot: Regenerate.
132
e643cb45
NC
1332017-03-29 Nick Clifton <nickc@redhat.com>
134
135 PR binutils/18025
136 * coff-bfd.h (struct coff_section_data): Add new fields:
137 saved_bias and bias.
138 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
139 computed for PE binaries.
140 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
141 missing abbrev.
142
086554e8
HPN
1432017-03-28 Hans-Peter Nilsson <hp@axis.com>
144
145 PR ld/16044
146 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
147 to handle a local symbol with a hash-symbol-entry; without PLT.
148 Add BFD_ASSERT for an incidental case with GOT entry present.
149 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
150 isn't forced-or-set local.
151
a6be0538
PC
1522017-03-27 Pip Cet <pipcet@gmail.com>
153
154 * wasm-module.c: New file to support WebAssembly modules.
155 * wasm-module.h: New file to support WebAssembly modules.
156 * doc/webassembly.texi: Start documenting wasm-module.c.
157 * config.bfd: Add wasm_vec.
158 * targets.c: Likewise.
159 * configure.ac: Likewise.
160 * Makefile.am: Add entries for wasm-module.c.
161 * Makefile.in: Regenerate.
162 * configure: Regenerate.
163 * po/SRC-POTFILES.in: Regenerate.
164
79b1d3cb
PC
1652017-03-27 Pip Cet <pipcet@gmail.com>
166
167 * cpu-wasm32.c: New file to support wasm32 architecture.
168 * elf32-wasm32.c: New file to support wasm32 architecture.
169 * Makefile.am: Add wasm32 architecture.
170 * archures.c: Likewise.
171 * config.bfd: Likewise.
172 * configure.ac: Likewise.
173 * targets.c: Likewise.
174 * Makefile.in: Regenerate.
175 * bfd-in2.h: Regenerate.
176 * configure: Regenerate.
177 * po/SRC-POTFILES.in: Regenerate.
178
aaed6f5b
AM
1792017-03-20 Alan Modra <amodra@gmail.com>
180
181 PR 21266
182 * elf64-ppc.c (compare_symbols): Stabilize sort.
183
82e66161
AM
1842017-03-18 Alan Modra <amodra@gmail.com>
185
186 * elf64-ppc.c (struct ppc_link_hash_table): Add
187 local_ifunc_resolver and maybe_local_ifunc_resolver.
188 (ppc_build_one_stub): Set flags on emitting dynamic
189 relocation to ifunc.
190 (ppc64_elf_relocate_section): Likewise.
191 (ppc64_elf_finish_dynamic_symbol): Likewise.
192 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
193 local dynamic relocs to ifuncs.
194 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
195 local_ifunc_resolver and maybe_local_ifunc_resolver.
196 (ppc_elf_relocate_section): Set flag on emitting dynamic
197 relocation to ifuncs.
198 (ppc_elf_finish_dynamic_symbol): Likewise.
199 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
200 dynamic relocs to ifuncs.
201
f955cccf
NC
2022017-03-13 Nick Clifton <nickc@redhat.com>
203
204 PR binutils/21202
205 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
206 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
207 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
208 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
209 * bfd-in2.h: Regenerate.
210 * libbfd.h: Regenerate.
211 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
212 names.
213 (IS_AARCH64_TLSDESC_RELOC): Likewise.
214 (elfNN_aarch64_howto_table): Likewise.
215 (aarch64_tls_transition_without_check): Likewise.
216 (aarch64_reloc_got_type): Likewise.
217 (elfNN_aarch64_final_link_relocate): Likewise.
218 (elfNN_aarch64_tls_relax): Likewise.
219 (elfNN_aarch64_relocate_section): Likewise.
220 (elfNN_aarch64_gc_sweep_hook): Likewise.
221 (elfNN_aarch64_check_relocs): Likewise.
222 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
223 (_bfd_aarch64_elf_resolve_relocation): Likewise.
224
4aef7643
AM
2252017-03-11 Alan Modra <amodra@gmail.com>
226
227 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
228 parameter is in fact used. Whitespace fixes.
229 * elf64-ppc.c: Likewise.
230
f03265d9
ST
2312017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
232
233 * rs6000-core.c (CORE_NEW): Simplify macro when
234 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
235
b1b07054
AM
2362017-03-07 Alan Modra <amodra@gmail.com>
237
238 PR 21224
239 PR 20519
240 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
241 dyn_relocs check.
242
2e0ce1c8
AM
2432017-03-05 Alan Modra <amodra@gmail.com>
244
245 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
246 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
247 (next_cie_fde_offset): New function.
248 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
249 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
250 four bytes. Align CIEs to four or eight bytes depending on
251 per_encoding_aligned8. Align FDEs according to their encoding.
252 Pad last FDE to output section alignment.
253 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
254 assertion.
255 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
256 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
257 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
258
f98450c6
NC
2592017-03-02 Martin Bickel <binutils@ineranves.de>
260
261 PR ld/21212
262 * elf.c (rewrite_elf_program_header): Do not issue a warning for
d20928fa 263 empty segments which have a zero filesz, but a non-zero memsz.
f98450c6 264
673cff9b
AM
2652017-03-02 Alan Modra <amodra@gmail.com>
266
267 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
268
3de43e7b
AM
2692017-02-28 Alan Modra <amodra@gmail.com>
270
271 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
272 (ppc64_elf_relocate_section): Likewise.
273
4ef97a1b
AM
2742017-02-28 Alan Modra <amodra@gmail.com>
275
276 PR 20995
277 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
278 rather than elf32_nios2_hash_table or elf_hash_table.
279 (create_got_section): Likewise.
280 (nios2_elf32_finish_dynamic_symbol): Likewise.
281 (nios2_elf32_adjust_dynamic_symbol): Likewise.
282 (nios2_elf32_size_dynamic_sections): Likewise.
283 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
284 vars. Use htab equivalents directly instead. Don't create
285 all dynamic sections on needing just the GOT. Use a goto
286 rather than a fall-through with reloc test. Ensure
287 htab->dynobj is set when making dynamic sreloc section.
288 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
289 equivalent directly instead. Don't segfault on looking for
290 .dynamic when dynamic sections have not been created. Don't
291 segfault on .got.plt being discarded.
292 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
293 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
294 fixme and another not so relevant comment.
295 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
296 already set, set hash table dynobj on creating .sbss.
297
7ba71655
AM
2982017-02-28 Alan Modra <amodra@gmail.com>
299
300 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
301 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
302 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
303 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
304 (ppc64_elf_relocate_section): Likewise.
305 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
306 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
307 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
308 * libbfd.h: Regenerate.
309 * bfd-in2.h: Regenerate.
310
afbf7e8e
AM
3112017-02-28 Alan Modra <amodra@gmail.com>
312
313 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
314 dynamic .data.rel.ro read-only.
315 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
316 rather than section flags when deciding where copy reloc goes.
317 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
318 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
319 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
320 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
321 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
322 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
323 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
324 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
325 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
326 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
327 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
328 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
329 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
330 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
331 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
332 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
333 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
334 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
335 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
336
0e392101
MR
3372017-02-28 Maciej W. Rozycki <macro@imgtec.com>
338
339 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
340 `jalr $0, $25' instruction encoding.
341
bd757ca7
NC
3422017-02-27 Nick Clifton <nickc@redhat.com>
343
344 PR ld/21180
345 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
346 generating a seg-fault when encountering a symbol that has been
347 deleted by garbage collection.
348
034fed0b
AM
3492017-02-25 Alan Modra <amodra@gmail.com>
350
351 * elf32-arc.c (struct dynamic_sections): Delete.
352 (enum dyn_section_types): Delete.
353 (dyn_section_names): Delete.
354 (arc_create_dynamic_sections): Delete.
355 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
356 segfault on discarded .rela.plt section.
357 (elf_arc_size_dynamic_sections): Formatting. Don't call
358 arc_create_dynamic_sections. Don't allocate memory for sections
359 handled by the generic linker. Correct code finding relocs in
360 read-only sections. Set SEC_EXCLUDE on zero size .got,
361 .got.plt, and .dynbss sections. Do set .interp for pies.
362
d0f744f9
AW
3632017-02-24 Andrew Waterman <andrew@sifive.com>
364
365 * elfnn-riscv.c (GP_NAME): New macro.
366 (riscv_global_pointer_value): Use it.
367 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
368 output section, consider only that section's alignment.
369
5d58c733
MR
3702017-02-23 Maciej W. Rozycki <macro@imgtec.com>
371
372 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
373 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
374 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
375 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
376
c1556ecd
MR
3772017-02-23 Maciej W. Rozycki <macro@imgtec.com>
378
379 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
380 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
381 or misaligned.
382
5499c7c7
AM
3832017-02-23 Alan Modra <amodra@gmail.com>
384
385 PR 20744
386 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
387 16D relocations.
388 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
389 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
390 relocs.
391
902e9fc7
MR
3922017-02-22 Maciej W. Rozycki <macro@imgtec.com>
393
394 PR ld/20828
395 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
396 processing ahead of the call to `elf_gc_sweep_symbol'.
397
758d96d8
NC
3982017-02-22 Nick Clifton <nickc@redhat.com>
399
400 PR binutils/21193
401 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
402 created section 4-byte alignment.
403
6528b6eb
AM
4042017-02-22 Alan Modra <amodra@gmail.com>
405
406 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
407 on .got or .plt output section being discarded by script.
408 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
409 vxworks splt temp.
410
24f1a751
AM
4112017-02-21 Alan Modra <amodra@gmail.com>
412
413 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
414 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
415
64487780
AM
4162017-02-20 Alan Modra <amodra@gmail.com>
417
418 PR 21181
419 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
420 if DT_RELSZ/DT_RELASZ is zero.
421
6438d1be
NC
4222017-02-17 Nick Clifton <nickc@redhat.com>
423
424 * compress.c (bfd_get_full_section_contents): Remember to reduce
425 compressed size by the sizeof the compression header when
426 decompressing the contents.
427
4bc26c69
PA
4282017-02-17 Pedro Alves <palves@redhat.com>
429
430 * srec.c (Chunk): Rename to ...
431 (_bfd_srec_len): ... this.
432 (S3Forced): Rename to ...
433 (_bfd_srec_forceS3): ... this.
434 * objcopy.c: Adjust all references.
435
7ec22e0f
PA
4362017-02-17 Pedro Alves <palves@redhat.com>
437
438 * archive.c (bsd_write_armap): Rename to ...
439 (_bfd_bsd_write_armap): ... this.
440 (coff_write_armap): Rename to ...
441 (_bfd_coff_write_armap): ... this.
442 * libbfd-in.h (bsd_write_armap): Rename to ...
443 (_bfd_bsd_write_armap): ... this.
444 (coff_write_armap): Rename to ...
445 (_bfd_coff_write_armap): ... this.
446 * aout-target.h, aout-tic30.c: Adjust all users.
447 * libbfd.h: Regenerate.
448
8c8402cc
PA
4492017-02-17 Pedro Alves <palves@redhat.com>
450
451 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
452 (warn_deprecated): Rename to ...
453 (_bfd_warn_deprecated): ... this.
454 * libbfd.c (warn_deprecated): Rename to ...
455 (_bfd_warn_deprecated): ... this.
456 * bfd-in2.h: Regenerate.
457
c7c3d11b
PA
4582017-02-17 Pedro Alves <palves@redhat.com>
459
460 * bfdio.c (real_ftell): Rename to ...
461 (_bfd_real_ftell): ... this.
462 (real_fseek): Rename to ...
463 (_bfd_real_fseek): ... this.
464 (real_fopen): Rename to ...
465 (_bfd_real_fopen): ... this.
466 * libbfd-in.h (real_ftell): Rename to ...
467 (_bfd_real_ftell): ... this.
468 (real_fseek): Rename to ...
469 (_bfd_real_fseek): ... this.
470 (real_fopen): Rename to ...
471 (_bfd_real_fopen): ... this.
472 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
473 * libbfd.h: Regenerate.
474
4265548c
PA
4752017-02-17 Pedro Alves <palves@redhat.com>
476
477 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
478 * libbfd.c (read_unsigned_leb128): Rename to ...
479 (_bfd_read_unsigned_leb128): ... this.
480 (read_signed_leb128): Rename to ...
481 (_bfd_read_signed_leb128): ... this.
482 (safe_read_leb128): Rename to ...
483 (_bfd_safe_read_leb128): ... this.
484 * libbfd-in.h (read_unsigned_leb128): Rename to ...
485 (_bfd_read_unsigned_leb128): ... this.
486 (read_signed_leb128): Rename to ...
487 (_bfd_read_signed_leb128): ... this.
488 (safe_read_leb128): Rename to ...
489 (_bfd_safe_read_leb128): ... this.
490 * libbfd.h: Renegerate.
491
3239a423
AB
4922017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
493
494 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
495 before trying to fine matching file and line information.
496
90ed9b8b
AB
4972017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
498
499 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
500 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
501 not match current bfd, then reload debug information. Record bfd
502 we're loading debug info for in the stash. If we have debug
503 informatin in the cache then perform section placement before
504 returning.
505
a8c75b76
AM
5062017-02-16 Alan Modra <amodra@gmail.com>
507
508 PR 21000
509 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
510 * elfxx-target.h (elf_backend_no_page_alias): Define.
511 (elfNN_bed): Init new field.
512 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
513 ensure PT_LOAD segment starts on a new page.
514 * elf32-hppa.c (elf_backend_no_page_alias): Define.
515
247d6c4c
AM
5162017-02-16 Alan Modra <amodra@gmail.com>
517
518 PR 21132
519 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
520 if pic.
521
90571206
JW
5222017-02-16 Jiong Wang <jiong.wang@arm.com>
523
524 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
525 * bfd-in2.h: Regenerated.
526
2a568401
L
5272017-02-15 H.J. Lu <hongjiu.lu@intel.com>
528
529 PR ld/21168
530 * elf32-i386.c (elf_i386_relocate_section): Allow
531 "lea foo@GOT, %reg" in PIC.
532
a5def14f
L
5332017-02-15 H.J. Lu <hongjiu.lu@intel.com>
534
535 PR ld/20244
536 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
537 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
538 error against local IFUNC symbol without a base register for
539 PIC.
540
174d0a74
MR
5412017-02-15 Maciej W. Rozycki <macro@imgtec.com>
542
543 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
544 `%P: %H:' with `info->callbacks->einfo'.
545 (ppc_elf_relocate_section): Likewise.
546 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
547 (ppc64_elf_edit_toc): Likewise.
548 (ppc64_elf_relocate_section): Likewise.
549
e278ae05
AM
5502017-02-14 Alan Modra <amodra@gmail.com>
551
552 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
553 --gc-keep-exported, and test versioned field of sym rather than
554 looking for @ in name.
555
10ddfe62
PD
5562017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
557
558 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
559 __global_pointer$.
560
d11135f5
NC
5612017-02-13 Nick Clifton <nickc@redhat.com>
562
563 PR binutils/21151
564 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
565 unit length field.
566
cc162427
AW
5672017-02-07 Andrew Waterman <andrew@sifive.com>
568
569 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
570 entry size if PLT header is written.
571
3d044c0c
SL
5722017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
573
574 Fix sparc64 dynamic relocation processing to use the dynamic
575 symbol count.
576 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
577 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
578 should be used.
579
1b7e3d2f
NC
5802017-02-03 Nick Clifton <nickc@redhat.com>
581
582 PR 21096
583 * coffcode.h (coff_write_object_contents): Enlarge size of
584 s_name_buf in order to avoid compile time warning about possible
585 integer truncation.
586 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
587 32-bits of insn value before printing into buffer.
588
e17b0c35
MR
5892017-02-02 Maciej W. Rozycki <macro@imgtec.com>
590
591 * elfxx-mips.c (mips_elf_hash_sort_data): Add
592 `max_local_dynindx'.
593 (mips_elf_sort_hash_table): Handle it.
594 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
595 symbols bump up `max_local_dynindx' rather than
596 `max_non_got_dynindx'.
597
55f8b9d2
MR
5982017-02-02 Maciej W. Rozycki <macro@imgtec.com>
599
600 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
601 `min_got_dynindx', `max_unref_got_dynindx' and
602 `max_non_got_dynindx' members to the `bfd_size_type' data type.
603 (mips_elf_sort_hash_table): Adjust accordingly.
604
0f8c4b60
MR
6052017-02-02 Maciej W. Rozycki <macro@imgtec.com>
606
607 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
608 to access the hash table.
609
17a80fa8
MR
6102017-02-02 Maciej W. Rozycki <macro@imgtec.com>
611
612 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
613 non-NULL `htab' to the beginning.
614
8f56d4fd
MR
6152017-02-02 Maciej W. Rozycki <macro@imgtec.com>
616
617 * elflink.c (elf_gc_sweep): Wrap overlong line.
618
8b10b0b3
MR
6192017-01-30 Maciej W. Rozycki <macro@imgtec.com>
620
621 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
622 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
623 * elfxx-mips.c (mips_elf_link_hash_table): Add
624 `ignore_branch_isa' member.
625 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
626 in branch relocation calculation as an error if
627 `ignore_branch_isa' has been set.
628 (_bfd_mips_elf_insn32): Rename to...
629 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
630 parameter to `insn32' and add an `ignore_branch_isa' parameter.
631 Handle the new parameter.
632
1fbd05e1
HPN
6332017-01-27 Hans-Peter Nilsson <hp@axis.com>
634
22d9a0de
HPN
635 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
636 local variable dynobj.
637
1fbd05e1
HPN
638 PR ld/20995
639 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
640 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
641 executable from read-only sections into sdynrelro.
642 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
643 dynamic relocs in sdynrelro.
644 (elf_backend_want_dynrelro): Define.
645
4a7324e1
SH
6462017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
647
648 * config.bfd (*-*-rtemsaout*): Mark as removed.
649
c75b4ebd
SH
6502017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
651
652 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
653 (arm-*-rtems*): Move to (arm*-*-eabi*).
654 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
655 (m68-*-rtems*): Move to (m68*-*-elf*).
656
850d84f6
SH
6572017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
658
659 * config.bfd (*-*-rtemscoff*): Mark as removed.
660
b531344c
MR
6612017-01-24 Maciej W. Rozycki <macro@imgtec.com>
662
663 PR ld/20828
664 * elflink.c (bfd_elf_record_link_assignment): Revert last
665 change and don't ever clear `forced_local'. Set `mark'
666 unconditionally.
667 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
668 file.
669 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
670 (bfd_elf_size_dynamic_sections): ... here.
671 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
672 and set `mark' instead in `__tls_get_addr_opt' processing.
673 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
674
f0158f44
AM
6752017-01-24 Alan Modra <amodra@gmail.com>
676
677 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
678 where dynamic relocs are preferable. Allow ifunc too.
679 (ensure_undefweak_dynamic): New function.
680 (allocate_dynrelocs): Use it here. Move plt handling last and
681 don't make symbols dynamic, simplifying loop. Only make undef
682 weak symbols with GOT entries dynamic. Correct condition
683 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
684 comments. Remove goto.
685 (ppc_elf_relocate_section): Correct test for using dynamic
686 symbol on GOT relocs. Rearrange test for emitting GOT relocs
687 to suit. Set up explicit tls_index entries and implicit GOT
688 tls_index entries resolvable at link time for
689 __tls_get_addr_opt. Simplify test to clear mem for prelink.
690 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
691 (ensure_undefweak_dynamic): New function.
692 (allocate_dynrelocs): Use it here. Only make undef weak symbols
693 with GOT entries dynamic. Remove unnecessary test of
694 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
695 (ppc64_elf_relocate_section): Correct test for using dynamic
696 symbol on GOT relocs. Rearrange test for emitting GOT relocs
697 to suit. Set up explicit tls_index entries and implicit GOT
698 tls_index entries resolvable at link time for __tls_get_addr_opt.
699 Simplify expression to clear mem for prelink.
700
2d0ca824
YN
7012017-01-23 Yury Norov <ynorov@caviumnetworks.com>
702
703 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
704
7f784814
JW
7052017-01-20 Jiong Wang <jiong.wang@arm.com>
706
707 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
708 (elf_backend_hash_symbol): Define.
709
81ff47b3
MR
7102017-01-18 Maciej W. Rozycki <macro@imgtec.com>
711
712 PR ld/20828
713 * elflink.c (bfd_elf_record_link_assignment): Clear any
714 `forced_local' marking for DSO symbols that are not being
715 provided.
716
640d6bfd
KLC
7172017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
718
719 * elfnn-riscv.c (riscv_elf_object_p): New function.
720
8361ed4d
L
7212017-01-12 H.J. Lu <hongjiu.lu@intel.com>
722
723 PR ld/21038
724 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
725 plt_bnd_eh_frame.
726 (elf_x86_64_check_relocs): Create .eh_frame section for the
727 .plt.bnd section.
728 (elf_x86_64_size_dynamic_sections): Allocate and initialize
729 .eh_frame section for the .plt.bnd section.
730 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
731 for the .plt.bnd section.
732
2425a30e
NC
7332017-01-12 Nick Clifton <nickc@redhat.com>
734
735 PR binutils/20876
736 * opncls.c (find_separate_debug_file): Add include_dirs
737 parameter. Only include the directory part of the bfd's filename
738 in search paths if include_dirs is true. Add a couple of extra
739 locations for looking for debug files.
740 ( bfd_follow_gnu_debuglink): Update invocation of
741 find_separate_debug_file.
742 (bfd_follow_gnu_debugaltlink): Likewise.
743 (get_build_id): New function: Finds the build-id of the given bfd.
744 (get_build_id_name): New function: Computes the name of the
745 separate debug info file for a bfd, based upon its build-id.
746 (check_build_id_file): New function: Checks to see if a separate
747 debug info file exists at the given location, and that its
748 build-id matches that of the original bfd.
749 (bfd_follow_build_id_debuglink): New function: Finds a separate
750 debug info file for a given bfd by using the build-id method.
751 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
752 method of locating a separate debug info file before using the
753 debuglink method.
754 * bfd-in2.h: Regenerate.
755
9e659176
L
7562017-01-11 H.J. Lu <hongjiu.lu@intel.com>
757
758 PR ld/21038
759 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
760 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
761 elf_x86_64_eh_frame_plt_got.
762 (elf_x86_64_size_dynamic_sections): Get unwind info from
763 elf_x86_64_bnd_arch_bed for the BND PLT.
764
f2e2d2f5
JS
7652017-01-11 Jeremy Soller <jackpot51@gmail.com>
766
767 * config.bfd: Add entries for i686-redox and x86_64-redox.
768
52b232b3
L
7692017-01-10 H.J. Lu <hongjiu.lu@intel.com>
770
771 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
772 to 4 bytes.
773 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
774 .eh_frame section to 4 bytes for x32.
775 (elf_x86_64_check_relocs): Likewise.
776
fff53dae
L
7772017-01-10 H.J. Lu <hongjiu.lu@intel.com>
778
779 PR ld/20830
780 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
781 (PLT_GOT_FDE_LENGTH): Likewise.
782 (elf_i386_plt_layout): Add eh_frame_plt_got and
783 eh_frame_plt_got_size.
784 (elf_i386_plt): Updated.
785 (elf_i386_link_hash_table): Add plt_got_eh_frame.
786 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
787 (elf_i386_size_dynamic_sections): Allocate and initialize
788 .eh_frame section for .plt.got.
789 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
790 .plt.got.
791 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
792 eh_frame_plt_got_size.
793 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
794 (PLT_GOT_FDE_LENGTH): Likewise.
795 (elf_x86_64_backend_data): Add eh_frame_plt_got and
796 eh_frame_plt_got_size.
797 (elf_x86_64_arch_bed): Updated.
798 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
799 eh_frame_plt_got_size.
800 (elf_x86_64_nacl_arch_bed): Likewise.
801 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
802 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
803 (elf_x86_64_size_dynamic_sections): Allocate and initialize
804 .eh_frame section for .plt.got.
805 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
806 for .plt.got.
807
f129e49f
L
8082017-01-10 H.J. Lu <hongjiu.lu@intel.com>
809
810 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
811 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
812
cd6581da
NC
8132017-01-09 Nick Clifton <nickc@redhat.com>
814
815 * dwarf2.c (lookup_address_in_function_table): Return early if
816 there are no functions in the given comp unit, or if the high
817 address of the last function in the comp unit is less than the
818 desired address.
819
98f02962
NC
8202017-01-09 Nick Clifton <nickc@redhat.com>
821
822 PR binutils/21013
823 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
824 message if there are too many symbols to load.
825
ae4fda66
JC
8262017-01-04 James Clarke <jrtc27@jrtc27.com>
827
828 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
829 if relocs are cached.
830
de1010f4
RF
8312017-01-03 Rich Felker <bugdal@aerifal.cx>
832
833 PR ld/21017
834 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
835 for R_MICROBLAZE_GOTOFF_64.
836
09fe2662
NC
8372017-01-03 Nick Clifton <nickc@redhat.com>
838
839 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
840 warning about using a possibly uninitialised variable.
841
595e0a47
AM
8422017-01-02 Alan Modra <amodra@gmail.com>
843
844 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
845 (allocate_plt_static, allocate_dynrelocs): Use it.
846
7bd9df3b
AM
8472017-01-02 Alan Modra <amodra@gmail.com>
848
849 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
850 .PARISC.unwind section.
851
5b86074c
AM
8522017-01-02 Alan Modra <amodra@gmail.com>
853
854 PR ld/20989
855 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
856 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
857 indirect to GOT pointer relative code edit.
858
2571583a
AM
8592017-01-02 Alan Modra <amodra@gmail.com>
860
861 Update year range in copyright notice of all files.
862
5c1ad6b5 863For older changes see ChangeLog-2016
3499769a 864\f
5c1ad6b5 865Copyright (C) 2017 Free Software Foundation, Inc.
3499769a
AM
866
867Copying and distribution of this file, with or without modification,
868are permitted in any medium without royalty provided the copyright
869notice and this notice are preserved.
870
871Local Variables:
872mode: change-log
873left-margin: 8
874fill-column: 74
875version-control: never
876End: