bfd: Rename bsd_write_armap and coff_write_armap
[external/binutils.git] / bfd / ChangeLog
1 2017-02-17  Pedro Alves  <palves@redhat.com>
2
3         * archive.c (bsd_write_armap): Rename to ...
4         (_bfd_bsd_write_armap): ... this.
5         (coff_write_armap): Rename to ...
6         (_bfd_coff_write_armap): ... this.
7         * libbfd-in.h (bsd_write_armap): Rename to ...
8         (_bfd_bsd_write_armap): ... this.
9         (coff_write_armap): Rename to ...
10         (_bfd_coff_write_armap): ... this.
11         * aout-target.h, aout-tic30.c: Adjust all users.
12         * libbfd.h: Regenerate.
13
14 2017-02-17  Pedro Alves  <palves@redhat.com>
15
16         * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
17         (warn_deprecated): Rename to ...
18         (_bfd_warn_deprecated): ... this.
19         * libbfd.c (warn_deprecated): Rename to ...
20         (_bfd_warn_deprecated): ... this.
21         * bfd-in2.h: Regenerate.
22
23 2017-02-17  Pedro Alves  <palves@redhat.com>
24
25         * bfdio.c (real_ftell): Rename to ...
26         (_bfd_real_ftell): ... this.
27         (real_fseek): Rename to ...
28         (_bfd_real_fseek): ... this.
29         (real_fopen): Rename to ...
30         (_bfd_real_fopen): ... this.
31         * libbfd-in.h (real_ftell): Rename to ...
32         (_bfd_real_ftell): ... this.
33         (real_fseek): Rename to ...
34         (_bfd_real_fseek): ... this.
35         (real_fopen): Rename to ...
36         (_bfd_real_fopen): ... this.
37         * cache.c, dwarf2.c, opncls.c: Adjust all callers.
38         * libbfd.h: Regenerate.
39
40 2017-02-17  Pedro Alves  <palves@redhat.com>
41
42         * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
43         * libbfd.c (read_unsigned_leb128): Rename to ...
44         (_bfd_read_unsigned_leb128): ... this.
45         (read_signed_leb128): Rename to ...
46         (_bfd_read_signed_leb128): ... this.
47         (safe_read_leb128): Rename to ...
48         (_bfd_safe_read_leb128): ... this.
49         * libbfd-in.h (read_unsigned_leb128): Rename to ...
50         (_bfd_read_unsigned_leb128): ... this.
51         (read_signed_leb128): Rename to ...
52         (_bfd_read_signed_leb128): ... this.
53         (safe_read_leb128): Rename to ...
54         (_bfd_safe_read_leb128): ... this.
55         * libbfd.h: Renegerate.
56
57 2017-02-16  Andrew Burgess  <andrew.burgess@embecosm.com>
58
59         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
60         before trying to fine matching file and line information.
61
62 2017-02-16  Andrew Burgess  <andrew.burgess@embecosm.com>
63
64         * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
65         (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
66         not match current bfd, then reload debug information.  Record bfd
67         we're loading debug info for in the stash.  If we have debug
68         informatin in the cache then perform section placement before
69         returning.
70
71 2017-02-16  Alan Modra  <amodra@gmail.com>
72
73         PR 21000
74         * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
75         * elfxx-target.h (elf_backend_no_page_alias): Define.
76         (elfNN_bed): Init new field.
77         * elf.c (assign_file_positions_for_load_sections): If no_page_alias
78         ensure PT_LOAD segment starts on a new page.
79         * elf32-hppa.c (elf_backend_no_page_alias): Define.
80
81 2017-02-16  Alan Modra  <amodra@gmail.com>
82
83         PR 21132
84         * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
85         if pic.
86
87 2017-02-16  Jiong Wang <jiong.wang@arm.com>
88
89         * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
90         * bfd-in2.h: Regenerated.
91
92 2017-02-15  H.J. Lu  <hongjiu.lu@intel.com>
93
94         PR ld/21168
95         * elf32-i386.c (elf_i386_relocate_section): Allow
96         "lea foo@GOT, %reg" in PIC.
97
98 2017-02-15  H.J. Lu  <hongjiu.lu@intel.com>
99
100         PR ld/20244
101         * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
102         symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
103         error against local IFUNC symbol without a base register for
104         PIC.
105
106 2017-02-15  Maciej W. Rozycki  <macro@imgtec.com>
107
108         * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
109         `%P: %H:' with `info->callbacks->einfo'.
110         (ppc_elf_relocate_section): Likewise.
111         * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
112         (ppc64_elf_edit_toc): Likewise.
113         (ppc64_elf_relocate_section): Likewise.
114
115 2017-02-14  Alan Modra  <amodra@gmail.com>
116
117         * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
118         --gc-keep-exported, and test versioned field of sym rather than
119         looking for @ in name.
120
121 2017-02-13  Palmer Dabbelt  <palmer@dabbelt.com>
122
123         * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
124         __global_pointer$.
125
126 2017-02-13  Nick Clifton  <nickc@redhat.com>
127
128         PR binutils/21151
129         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
130         unit length field.
131
132 2017-02-07  Andrew Waterman  <andrew@sifive.com>
133
134         * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
135         entry size if PLT header is written.
136
137 2017-02-06  Sheldon Lobo  <sheldon.lobo@oracle.com>
138
139         Fix sparc64 dynamic relocation processing to use the dynamic
140         symbol count.
141         * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
142         to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
143         should be used.
144
145 2017-02-03  Nick Clifton  <nickc@redhat.com>
146
147         PR 21096
148         * coffcode.h (coff_write_object_contents): Enlarge size of
149         s_name_buf in order to avoid compile time warning about possible
150         integer truncation.
151         * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
152         32-bits of insn value before printing into buffer.
153
154 2017-02-02  Maciej W. Rozycki  <macro@imgtec.com>
155
156         * elfxx-mips.c (mips_elf_hash_sort_data): Add
157         `max_local_dynindx'.
158         (mips_elf_sort_hash_table): Handle it.
159         (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
160         symbols bump up `max_local_dynindx' rather than
161         `max_non_got_dynindx'.
162
163 2017-02-02  Maciej W. Rozycki  <macro@imgtec.com>
164
165         * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
166         `min_got_dynindx', `max_unref_got_dynindx' and
167         `max_non_got_dynindx' members to the `bfd_size_type' data type.
168         (mips_elf_sort_hash_table): Adjust accordingly.
169
170 2017-02-02  Maciej W. Rozycki  <macro@imgtec.com>
171
172         * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
173         to access the hash table.
174
175 2017-02-02  Maciej W. Rozycki  <macro@imgtec.com>
176
177         * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
178         non-NULL `htab' to the beginning.
179
180 2017-02-02  Maciej W. Rozycki  <macro@imgtec.com>
181
182         * elflink.c (elf_gc_sweep): Wrap overlong line.
183
184 2017-01-30  Maciej W. Rozycki  <macro@imgtec.com>
185
186         * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
187         (_bfd_mips_elf_linker_flags): ... this.  Add another parameter.
188         * elfxx-mips.c (mips_elf_link_hash_table): Add
189         `ignore_branch_isa' member.
190         (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
191         in branch relocation calculation as an error if
192         `ignore_branch_isa' has been set.
193         (_bfd_mips_elf_insn32): Rename to...
194         (_bfd_mips_elf_linker_flags): ... this.  Rename the `on'
195         parameter to `insn32' and add an `ignore_branch_isa' parameter.
196         Handle the new parameter.
197
198 2017-01-27  Hans-Peter Nilsson  <hp@axis.com>
199
200         * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
201         local variable dynobj.
202
203         PR ld/20995
204         * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
205         (elf_cris_adjust_dynamic_symbol): Place variables copied into the
206         executable from read-only sections into sdynrelro.
207         (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
208         dynamic relocs in sdynrelro.
209         (elf_backend_want_dynrelro): Define.
210
211 2017-01-25  Sebastian Huber  <sebastian.huber@embedded-brains.de>
212
213         * config.bfd (*-*-rtemsaout*): Mark as removed.
214
215 2017-01-25  Sebastian Huber  <sebastian.huber@embedded-brains.de>
216
217         * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
218         (arm-*-rtems*): Move to (arm*-*-eabi*).
219         (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
220         (m68-*-rtems*): Move to (m68*-*-elf*).
221
222 2017-01-25  Sebastian Huber  <sebastian.huber@embedded-brains.de>
223
224         * config.bfd (*-*-rtemscoff*): Mark as removed.
225
226 2017-01-24  Maciej W. Rozycki  <macro@imgtec.com>
227
228         PR ld/20828
229         * elflink.c (bfd_elf_record_link_assignment): Revert last
230         change and don't ever clear `forced_local'.  Set `mark'
231         unconditionally.
232         (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
233         file.
234         (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
235         (bfd_elf_size_dynamic_sections): ... here.
236         * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
237         and set `mark' instead in `__tls_get_addr_opt' processing.
238         * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
239
240 2017-01-24  Alan Modra  <amodra@gmail.com>
241
242         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
243         where dynamic relocs are preferable.  Allow ifunc too.
244         (ensure_undefweak_dynamic): New function.
245         (allocate_dynrelocs): Use it here.  Move plt handling last and
246         don't make symbols dynamic, simplifying loop.  Only make undef
247         weak symbols with GOT entries dynamic.  Correct condition
248         for GOT relocs.  Handle dynamic relocs on ifuncs.  Correct
249         comments.  Remove goto.
250         (ppc_elf_relocate_section): Correct test for using dynamic
251         symbol on GOT relocs.  Rearrange test for emitting GOT relocs
252         to suit.  Set up explicit tls_index entries and implicit GOT
253         tls_index entries resolvable at link time for
254         __tls_get_addr_opt.  Simplify test to clear mem for prelink.
255         * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
256         (ensure_undefweak_dynamic): New function.
257         (allocate_dynrelocs): Use it here.  Only make undef weak symbols
258         with GOT entries dynamic.  Remove unnecessary test of
259         WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
260         (ppc64_elf_relocate_section): Correct test for using dynamic
261         symbol on GOT relocs.  Rearrange test for emitting GOT relocs
262         to suit.  Set up explicit tls_index entries and implicit GOT
263         tls_index entries resolvable at link time for __tls_get_addr_opt.
264         Simplify expression to clear mem for prelink.
265
266 2017-01-23  Yury Norov  <ynorov@caviumnetworks.com>
267
268         * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
269
270 2017-01-20  Jiong Wang <jiong.wang@arm.com>
271
272         * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
273         (elf_backend_hash_symbol): Define.
274
275 2017-01-18  Maciej W. Rozycki  <macro@imgtec.com>
276
277         PR ld/20828
278         * elflink.c (bfd_elf_record_link_assignment): Clear any
279         `forced_local' marking for DSO symbols that are not being
280         provided.
281
282 2017-01-17  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
283
284         * elfnn-riscv.c (riscv_elf_object_p): New function.
285
286 2017-01-12  H.J. Lu  <hongjiu.lu@intel.com>
287
288         PR ld/21038
289         * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
290         plt_bnd_eh_frame.
291         (elf_x86_64_check_relocs): Create .eh_frame section for the
292         .plt.bnd section.
293         (elf_x86_64_size_dynamic_sections): Allocate and initialize
294         .eh_frame section for the .plt.bnd section.
295         (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
296         for the .plt.bnd section.
297
298 2017-01-12  Nick Clifton  <nickc@redhat.com>
299
300         PR binutils/20876
301         * opncls.c (find_separate_debug_file): Add include_dirs
302         parameter.  Only include the directory part of the bfd's filename
303         in search paths if include_dirs is true.  Add a couple of extra
304         locations for looking for debug files.
305         ( bfd_follow_gnu_debuglink): Update invocation of
306         find_separate_debug_file.
307         (bfd_follow_gnu_debugaltlink): Likewise.
308         (get_build_id): New function: Finds the build-id of the given bfd.
309         (get_build_id_name): New function: Computes the name of the
310         separate debug info file for a bfd, based upon its build-id.
311         (check_build_id_file): New function: Checks to see if a separate
312         debug info file exists at the given location, and that its
313         build-id matches that of the original bfd.
314         (bfd_follow_build_id_debuglink): New function: Finds a separate
315         debug info file for a given bfd by using the build-id method.
316         * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
317         method of locating a separate debug info file before using the
318         debuglink method.
319         * bfd-in2.h: Regenerate.
320
321 2017-01-11  H.J. Lu  <hongjiu.lu@intel.com>
322
323         PR ld/21038
324         * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
325         (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
326         elf_x86_64_eh_frame_plt_got.
327         (elf_x86_64_size_dynamic_sections): Get unwind info from
328         elf_x86_64_bnd_arch_bed for the BND PLT.
329
330 2017-01-11  Jeremy Soller  <jackpot51@gmail.com>
331
332         * config.bfd: Add entries for i686-redox and x86_64-redox.
333
334 2017-01-10  H.J. Lu  <hongjiu.lu@intel.com>
335
336         * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
337         to 4 bytes.
338         * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
339         .eh_frame section to 4 bytes for x32.
340         (elf_x86_64_check_relocs): Likewise.
341
342 2017-01-10  H.J. Lu  <hongjiu.lu@intel.com>
343
344         PR ld/20830
345         * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
346         (PLT_GOT_FDE_LENGTH): Likewise.
347         (elf_i386_plt_layout): Add eh_frame_plt_got and
348         eh_frame_plt_got_size.
349         (elf_i386_plt): Updated.
350         (elf_i386_link_hash_table): Add plt_got_eh_frame.
351         (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
352         (elf_i386_size_dynamic_sections): Allocate and initialize
353         .eh_frame section for .plt.got.
354         (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
355         .plt.got.
356         (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
357         eh_frame_plt_got_size.
358         * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
359         (PLT_GOT_FDE_LENGTH): Likewise.
360         (elf_x86_64_backend_data): Add eh_frame_plt_got and
361         eh_frame_plt_got_size.
362         (elf_x86_64_arch_bed): Updated.
363         (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
364         eh_frame_plt_got_size.
365         (elf_x86_64_nacl_arch_bed): Likewise.
366         (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
367         (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
368         (elf_x86_64_size_dynamic_sections): Allocate and initialize
369         .eh_frame section for .plt.got.
370         (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
371         for .plt.got.
372
373 2017-01-10  H.J. Lu  <hongjiu.lu@intel.com>
374
375         * elf32-i386.c (elf_i386_size_dynamic_sections): Set
376         plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
377
378 2017-01-09  Nick Clifton  <nickc@redhat.com>
379
380         * dwarf2.c (lookup_address_in_function_table): Return early if
381         there are no functions in the given comp unit, or if the high
382         address of the last function in the comp unit is less than the
383         desired address.
384
385 2017-01-09  Nick Clifton  <nickc@redhat.com>
386
387         PR binutils/21013
388         * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
389         message if there are too many symbols to load.
390
391 2017-01-04  James Clarke  <jrtc27@jrtc27.com>
392
393         * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
394         if relocs are cached.
395
396 2017-01-03  Rich Felker  <bugdal@aerifal.cx>
397
398         PR ld/21017
399         * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
400         for R_MICROBLAZE_GOTOFF_64.
401
402 2017-01-03  Nick Clifton  <nickc@redhat.com>
403
404         * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
405         warning about using a possibly uninitialised variable.
406
407 2017-01-02  Alan Modra  <amodra@gmail.com>
408
409         * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
410         (allocate_plt_static, allocate_dynrelocs): Use it.
411
412 2017-01-02  Alan Modra  <amodra@gmail.com>
413
414         * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
415         .PARISC.unwind section.
416
417 2017-01-02  Alan Modra  <amodra@gmail.com>
418
419         PR ld/20989
420         * elfxx-sparc.c (gdop_relative_offset_ok): New function.
421         (_bfd_sparc_elf_relocate_section): Use it to validate GOT
422         indirect to GOT pointer relative code edit.
423
424 2017-01-02  Alan Modra  <amodra@gmail.com>
425
426         Update year range in copyright notice of all files.
427
428 For older changes see ChangeLog-2016
429 \f
430 Copyright (C) 2017 Free Software Foundation, Inc.
431
432 Copying and distribution of this file, with or without modification,
433 are permitted in any medium without royalty provided the copyright
434 notice and this notice are preserved.
435
436 Local Variables:
437 mode: change-log
438 left-margin: 8
439 fill-column: 74
440 version-control: never
441 End: