[HPPA] Attach linker created dynamic sections to stub bfd
[external/binutils.git] / bfd / ChangeLog
1 2016-05-11  Alan Modra  <amodra@gmail.com>
2
3         * elf32-hppa.c (elf32_hppa_init_stub_bfd): New function.
4         (elf32_hppa_check_relocs): Don't set dynobj.
5         (elf32_hppa_size_stubs): Test !SEC_LINKER_CREATED for stub sections.
6         (elf32_hppa_build_stubs): Likewise.
7         * elf32-hppa.h (elf32_hppa_init_stub_bfd): Declare.
8
9 2016-05-11  Alan Modra  <amodra@gmail.com>
10
11         PR 20060
12         * elf64-ppc.c (ppc64_elf_tls_setup): Clear forced_local.
13         * elf32-ppc.c (ppc_elf_tls_setup): Likewise.
14
15 2016-05-10  Jiong Wang  <jiong.wang@arm.com>
16
17         * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Remove redundant
18         aarch64_tls_transition check.
19
20 2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
21
22         * elf32-arm.c (enum elf32_arm_stub_type): New max_stub_type
23         enumerator.
24         (arm_stub_sym_claimed): New function.
25         (elf32_arm_create_stub): Use veneered symbol name and section if
26         veneer needs to claim its symbol, and keep logic unchanged otherwise.
27         (arm_stub_claim_sym): New function.
28         (arm_map_one_stub): Call arm_stub_claim_sym if veneer needs to claim
29         veneered symbol, otherwise create local symbol as before.
30
31 2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
32
33         * elf32-arm.c (elf32_arm_size_stubs): Use new macros
34         ARM_GET_SYM_BRANCH_TYPE and ARM_SET_SYM_BRANCH_TYPE to respectively get
35         and set branch type of a symbol.
36         (bfd_elf32_arm_process_before_allocation): Likewise.
37         (elf32_arm_relocate_section): Likewise and fix identation along the
38         way.
39         (allocate_dynrelocs_for_symbol): Likewise.
40         (elf32_arm_finish_dynamic_symbol): Likewise.
41         (elf32_arm_swap_symbol_in): Likewise.
42         (elf32_arm_swap_symbol_out): Likewise.
43
44 2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
45
46         * bfd-in.h (elf32_arm_size_stubs): Add an output section parameter.
47         * bfd-in2.h: Regenerated.
48         * elf32-arm.c (struct elf32_arm_link_hash_table): Add an output section
49         parameter to add_stub_section callback.
50         (elf32_arm_create_or_find_stub_sec): Get output section from link_sec
51         and pass it down to add_stub_section.
52         (elf32_arm_add_stub): Set section to stub_sec if NULL before using it
53         for error message.
54         (elf32_arm_size_stubs): Add output section parameter to
55         add_stub_section function pointer parameter.
56
57 2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
58
59         * elf32-arm.c (elf32_arm_create_stub): New function.
60         (elf32_arm_size_stubs): Use elf32_arm_create_stub for stub creation.
61
62 2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
63
64         * elf32-arm.c (enum elf32_arm_stub_type): Delete
65         arm_stub_a8_veneer_lwm enumerator.
66         (arm_stub_a8_veneer_lwm): New unsigned constant to replace
67         aforementioned enumerator.
68         (struct elf32_arm_stub_hash_entry): Delete target_addend
69         field and add source_value.
70         (struct a8_erratum_fix): Delete addend field and add target_offset.
71         (stub_hash_newfunc): Initialize source_value field amd remove
72         initialization for target_addend.
73         (arm_build_one_stub): Stop special casing Thumb relocations: promote
74         the else to being always executed, moving the
75         arm_stub_a8_veneer_b_cond specific code in it.  Remove
76         stub_entry->target_addend from points_to computation.
77         (cortex_a8_erratum_scan): Store in a8_erratum_fix structure the offset
78         to target symbol from start of section rather than the offset from the
79         stub address.
80         (elf32_arm_size_stubs): Set stub_entry's source_value and target_value
81         fields from struct a8_erratum_fix's offset and target_offset
82         respectively.
83         (make_branch_to_a8_stub): Rename target variable to loc.  Compute
84         veneered_insn_loc and loc using stub_entry's source_value.
85
86 2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
87
88         (elf32_arm_merge_eabi_attributes): Add merging logic for
89         Tag_DSP_extension.
90
91 2016-05-10  Pip Cet  <pipcet@gmail.com>
92
93         PR ld/20059
94         * elfxx-target.h (bfd_elfNN_bfd_copy_link_hash_symbol_type):
95         Define as _bfd_generic_copy_link_hash_symbol_type when using
96         generic hash table.
97
98 2016-05-09  Nick Clifton  <nickc@redhat.com>
99
100         PR binutils/20063
101         * elf.c (bfd_elf_get_elf_syms): Check for out of range sh_link
102         field before accessing sections array.
103
104 2016-05-09  Christophe Monat  <christophe.monat@st.com>
105
106         PR ld/20030
107         * elf32-arm.c (is_thumb2_vldm): Account for T1 (DP) encoding.
108         (stm32l4xx_need_create_replacing_stub): Rename ambiguous nb_regs
109         to nb_words.
110         (create_instruction_vldmia): Add is_dp to disambiguate SP/DP
111         encoding.
112         (create_instruction_vldmdb): Likewise.
113         (stm32l4xx_create_replacing_stub_vldm): is_dp detects DP encoding,
114         uses it to re-encode.
115
116 2016-05-09  Nick Clifton  <nickc@redhat.com>
117
118         PR 19938
119         * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Revert accidental
120         commit.
121
122 2016-05-09  Alan Modra  <amodra@gmail.com>
123
124         * elf64-ppc.c (ppc64_elf_init_stub_bfd): Remove redundant NULL check.
125
126 2016-05-06  H.J. Lu  <hongjiu.lu@intel.com>
127
128         PR ld/17550
129         * elf-bfd.h (elf_link_hash_entry): Update comments for indx,
130         documenting that indx == -3 if symbol is defined in a discarded
131         section.
132         * elflink.c (elf_link_add_object_symbols): Set indx to -3 if
133         symbol is defined in a discarded section.
134         (elf_link_output_extsym): Strip a global symbol defined in a
135         discarded section.
136
137 2016-05-06  H.J. Lu  <hongjiu.lu@intel.com>
138
139         * elf32-i386.c (elf_backend_add_symbol_hook): Defined for Intel
140         MCU.
141
142 2016-05-05  H.J. Lu  <hongjiu.lu@intel.com>
143
144         * elf32-i386.c (elf_i386_convert_load): Extract the GOT load
145         conversion to ...
146         (elf_i386_convert_load_reloc): This.  New function.
147         * elf64-x86-64.c (elf_x86_64_convert_load): Extract the GOT load
148         conversion to ...
149         (elf_x86_64_convert_load_reloc): This.  New function.
150
151 2016-05-05  H.J. Lu  <hongjiu.lu@intel.com>
152
153         * elf32-i386.c (elf_i386_check_tls_transition): Remove abfd.
154         Don't check if contents == NULL.
155         (elf_i386_tls_transition): Add from_relocate_section.  Check
156         from_relocate_section instead of contents != NULL.  Update
157         elf_i386_check_tls_transition call.
158         (elf_i386_check_relocs): Cache the section contents if
159         keep_memory is FALSE.  Pass FALSE as from_relocate_section to
160         elf_i386_tls_transition.
161         (elf_i386_relocate_section): Pass TRUE as from_relocate_section
162         to elf_i386_tls_transition.
163         (elf_backend_caches_rawsize): New.
164         * elf64-x86-64.c (elf_x86_64_check_tls_transition): Don't check
165         if contents == NULL.
166         (elf_x86_64_tls_transition): Add from_relocate_section.  Check
167         from_relocate_section instead of contents != NULL.
168         (elf_x86_64_check_relocs): Cache the section contents if
169         keep_memory is FALSE.  Pass FALSE as from_relocate_section to
170         elf_x86_64_tls_transition.
171         (elf_x86_64_relocate_section): Pass TRUE as from_relocate_section
172         to elf_x86_64_tls_transition.
173         (elf_backend_caches_rawsize): New.
174
175 2016-05-03  Maciej W. Rozycki  <macro@imgtec.com>
176
177         PR 10549
178         * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Handle
179         STB_GNU_UNIQUE.
180
181 2016-05-03  Jiong Wang  <jiong.wang@arm.com>
182
183         * bfd-in.h (bfd_elf64_aarch64_set_options): Update prototype.
184         * bfd-in2.h (bfd_elf64_aarch64_set_options): Likewise.
185         * elfnn-aarch64.c (bfd_elfNN_aarch64_set_options): Initialize
186         no_apply_dynamic_relocs.
187         (elfNN_aarch64_final_link_relocate): Apply absolute relocations even though
188         dynamic relocations generated.
189
190 2016-04-29  H.J. Lu  <hongjiu.lu@intel.com>
191
192         * elf32-i386.c (elf_i386_size_dynamic_sections): Move interp
193         setting to ...
194         (elf_i386_create_dynamic_sections): Here.
195         * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Move
196         interp setting to ...
197         (elf_x86_64_create_dynamic_sections): Here.
198
199 2016-04-29  H.J. Lu  <hongjiu.lu@intel.com>
200
201         * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take GOT_RELOC
202         and replace (EH)->has_got_reloc with GOT_RELOC.
203         (elf_i386_fixup_symbol): Pass has_got_reloc to
204         UNDEFINED_WEAK_RESOLVED_TO_ZERO.
205         (elf_i386_allocate_dynrelocs): Likewise.
206         (elf_i386_relocate_section): Likewise.
207         (elf_i386_finish_dynamic_symbol): Likewise.
208         (elf_i386_convert_load): Pass TRUE to
209         UNDEFINED_WEAK_RESOLVED_TO_ZERO.
210         * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take
211         GOT_RELOC and replace (EH)->has_got_reloc with GOT_RELOC.
212         (elf_x86_64_fixup_symbol): Pass has_got_reloc to
213         UNDEFINED_WEAK_RESOLVED_TO_ZERO.
214         (elf_x86_64_allocate_dynrelocs): Likewise.
215         (elf_x86_64_relocate_section): Likewise.
216         (elf_x86_64_finish_dynamic_symbol): Likewise.
217         (elf_x86_64_convert_load): Pass TRUE to
218         UNDEFINED_WEAK_RESOLVED_TO_ZERO.
219
220 2016-04-29  H.J. Lu  <hongjiu.lu@intel.com>
221
222         * elf32-i386.c (check_relocs_failed): New.
223         (elf_i386_check_relocs): Set check_relocs_failed on error.
224         (elf_i386_relocate_section): Skip if check_relocs failed.
225
226 2016-04-29  H.J. Lu  <hongjiu.lu@intel.com>
227
228         * elf64-x86-64.c (elf_x86_64_check_relocs): Set
229         check_relocs_failed on error.
230
231 2016-04-29  Nick Clifton  <nickc@redhat.com>
232
233         PR 19938
234         * elf-bfd.h (struct elf_backend_data): Rename
235         elf_backend_set_special_section_info_and_link to
236         elf_backend_copy_special_section_fields.
237         * elfxx-target.h: Likewise.
238         * elf.c (section_match): Ignore the SHF_INFO_LINK flag when
239         comparing section flags.
240         (copy_special_section_fields): New function.
241         (_bfd_elf_copy_private_bfd_data): Copy the EI_ABIVERSION field.
242         Perform two scans over special sections.  The first one looks for
243         a direct mapping between the output section and an input section.
244         The second scan looks for a possible match based upon section
245         characteristics.
246         * elf32-arm.c (elf32_arm_copy_special_section_fields): New
247         function.  Handle setting the sh_link field of SHT_ARM_EXIDX
248         sections.
249         * elf32-i386.c (elf32_i386_set_special_info_link): Rename to
250         elf32_i386_copy_solaris_special_section_fields.
251         * elf32-sparc.c (elf32_sparc_set_special_section_info_link):
252         Rename to elf32_sparc_copy_solaris_special_section_fields.
253         * elf64-x86-64.c (elf64_x86_64_set_special_info_link): Rename to
254         elf64_x86_64_copy_solaris_special_section_fields.
255
256 2016-04-28  Nick Clifton  <nickc@redhat.com>
257
258         * po/zh_CN.po: Updated Chinese (simplified) translation.
259
260 2016-04-27  H.J. Lu  <hongjiu.lu@intel.com>
261
262         PR ld/20006
263         * elf64-x86-64.c (elf_x86_64_convert_load): Skip debug sections
264         when estimating distances between output sections.
265
266 2016-04-27  Alan Modra  <amodra@gmail.com>
267
268         * elflink.c (_bfd_elf_is_start_stop): New function.
269         (_bfd_elf_gc_mark_rsec): Use it.
270         * elf-bfd.h (_bfd_elf_is_start_stop): Declare.
271
272 2016-04-26  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
273
274         * elf32-rx.c (rx_set_section_contents): Avoid arithmetic on void *.
275         * mmo.c (mmo_get_section_contents): Likewise.
276         (mmo_set_section_contents): Likewise.
277
278 2016-04-26  H.J. Lu  <hongjiu.lu@intel.com>
279
280         * elf-bfd.h (elf_link_hash_table): Update comments for
281         dynsymcount.
282         * elflink.c (_bfd_elf_link_renumber_dynsyms): Always count for
283         the unused NULL entry at the head of dynamic symbol table.
284         (bfd_elf_size_dynsym_hash_dynstr): Remove dynsymcount != 0
285         checks.
286
287 2016-04-21  H.J. Lu  <hongjiu.lu@intel.com>
288
289         * elflink.c (_bfd_elf_link_create_dynstrtab): Exclude linker
290         created file from dynobj.
291
292 2016-04-21  H.J. Lu  <hongjiu.lu@intel.com>
293
294         * elflink.c (_bfd_elf_link_create_dynstrtab): Set dynobj to a
295         normal input file if possible.
296
297 2016-04-21  Nick Clifton  <nickc@redhat.com>
298
299         * aout-adobe.c: Use _bfd_generic_link_check_relocs.
300         * aout-target.h: Likewise.
301         * aout-tic30.c: Likewise.
302         * binary.c: Likewise.
303         * bout.c: Likewise.
304         * coff-alpha.c: Likewise.
305         * coff-rs6000.c: Likewise.
306         * coff64-rs6000.c: Likewise.
307         * coffcode.h: Likewise.
308         * i386msdos.c: Likewise.
309         * i386os9k.c: Likewise.
310         * ieee.c: Likewise.
311         * ihex.c: Likewise.
312         * libbfd-in.h: Likewise.
313         * libecoff.h: Likewise.
314         * mach-o-target.c: Likewise.
315         * mmo.c: Likewise.
316         * nlm-target.h: Likewise.
317         * oasys.c: Likewise.
318         * pef.c: Likewise.
319         * plugin.c: Likewise.
320         * ppcboot.c: Likewise.
321         * som.c: Likewise.
322         * srec.c: Likewise.
323         * tekhex.c: Likewise.
324         * versados.c: Likewise.
325         * vms-alpha.c: Likewise.
326         * xsym.c: Likewise.
327         * elfxx-target.h: Use _bfd_elf_link_check_relocs.
328         * linker.c (bfd_link_check_relocs): New function.
329         (_bfd_generic_link_check_relocs): New function.
330         * targets.c (BFD_JUMP_TABLE_LINK): Add initialization of
331         _bfd_link_check_relocs field.
332         (struct bfd_target)L Add _bfd_link_check_relocs field.
333         * bfd-in2.h: Regenerate.
334         * libbfd.h: Regenerate.
335
336 2016-04-20  H.J. Lu  <hongjiu.lu@intel.com>
337
338         * elf32-i386.c (elf_i386_gc_sweep_hook): Removed.
339         (elf_backend_gc_sweep_hook): Likewise.
340         * elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise.
341         (elf_backend_gc_sweep_hook): Likewise.
342
343 2016-04-20  H.J. Lu  <hongjiu.lu@intel.com>
344
345         * elflink.c (_bfd_elf_link_check_relocs): Don't check relocations
346         in excluded sections
347
348 2016-04-20  H.J. Lu  <hongjiu.lu@intel.com>
349
350         PR ld/19969
351         * elf64-x86-64.c (check_relocs_failed): New.
352         (elf_x86_64_need_pic): Moved before elf_x86_64_check_relocs.
353         Support relocation agaist local symbol.  Set check_relocs_failed.
354         (elf_x86_64_check_relocs): Use elf_x86_64_need_pic.  Check
355         R_X86_64_32 relocation overflow.
356         (elf_x86_64_relocate_section): Skip if check_relocs failed.
357         Update one elf_x86_64_need_pic and remove one elf_x86_64_need_pic.
358
359 2016-04-20  H.J. Lu  <hongjiu.lu@intel.com>
360
361         * elf32-i386.c (elf_i386_check_relocs): Call
362         _bfd_elf_create_ifunc_sections only for STT_GNU_IFUNC symbol.
363         * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
364
365 2016-04-20  H.J. Lu  <hongjiu.lu@intel.com>
366
367         * elf-bfd.h (_bfd_elf_link_check_relocs): New.
368         * elflink.c (_bfd_elf_link_check_relocs): New function.
369         (elf_link_add_object_symbols): Call _bfd_elf_link_check_relocs
370         if check_relocs_after_open_input is FALSE.
371
372 2016-04-20  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
373
374         * cache.c: Update old style function definitions.
375         * elf32-m68k.c: Likewise.
376         * elf64-mmix.c: Likewise.
377         * stab-syms.c: Likewise.
378
379 2016-04-20  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
380
381         * elf32-arm.c (put_thumb2_insn): Change argument type to bfd_byte *.
382
383 2016-04-15  H.J. Lu  <hongjiu.lu@intel.com>
384
385         * Makefile.in: Regenerated with automake 1.11.6.
386         * aclocal.m4: Likewise.
387         * doc/Makefile.in: Likewise.
388
389 2016-04-14  Andrew Burgess  <andrew.burgess@embecosm.com>
390
391         * reloc.c: Add BFD_RELOC_ARC_NPS_CMEM16 entry.
392         * bfd-in2.h: Regenerate.
393         * libbfd.h: Regenerate.
394         * elf32-arc.c: Add 'opcode/arc.h' include.
395         (struct arc_relocation_data): Add symbol_name.
396         (arc_special_overflow_checks): New function.
397         (arc_do_relocation): Use arc_special_overflow_checks, reindent as
398         required, add an extra comment.
399         (elf_arc_relocate_section): Setup symbol_name in reloc_data.
400
401 2016-04-14  Andrew Burgess  <andrew.burgess@embecosm.com>
402
403         * elf32-arc.c (tls_got_entries): Add 'TLS_GOT_' prefix to all
404         entries.
405         (elf_arc_relocate_section): Update enum uses.
406         (elf_arc_check_relocs): Likewise.
407         (elf_arc_finish_dynamic_symbol): Likewise.
408
409 2016-04-14  H.J. Lu  <hongjiu.lu@intel.com>
410
411         * elf.c (_bfd_elf_copy_private_bfd_data): Replace "link" with
412         "sh_link".
413
414 2016-04-14  Nick Clifton  <nickc@redhat.com>
415
416         PR target/19938
417         * elf-bbfd.h (struct elf_backend_data): New field:
418         elf_strtab_flags.
419         New field: elf_backend_set_special_section_info_and_link
420         * elfxx-target.h (elf_backend_strtab_flags): Define if not already
421         defined.
422         (elf_backend_set_special_section_info_and_link): Define if not
423         already defined.
424         (elfNN_bed): Use elf_backend_set_special_section_info_and_link and
425         elf_backend_strtab_flags macros to initialise fields in structure.
426         * elf.c (_bfd_elf_make_section_from_shdr): Check for SHF_STRINGS
427         being set even if SHF_MERGE is not set.
428         (elf_fake_sections): Likewise.
429         (section_match): New function.  Matches two ELF sections based
430         upon fixed characteristics.
431         (find_link): New function.  Locates a section in a BFD that
432         matches a section in a different BFD.
433         (_bfd_elf_copy_private_bfd_data): Copy the sh_info and sh_link
434         fields of reserved sections.
435         (bfd_elf_compute_section_file_positions): Set the flags for the
436         .shstrtab section based upon the elf_strtab_flags field in the
437         elf_backend_data structure.
438         (swap_out_syms): Likewise for the .strtab section.
439         * elflink.c (bfd_elf_final_link): Set the flags for the
440         .strtab section based upon the elf_strtab_flags field in the
441         elf_backend_data structure.
442         * elf32-i386.c (elf32_i386_set_special_info_link): New function.
443         (elf_backend_strtab_flags): Set to SHF_STRINGS for Solaris
444         targets.
445         (elf_backend_set_special_section_info_and_link): Define for
446         Solaris targets.
447         * elf32-sparc.c: Likewise.
448         * elf64-x86-64.c: Likewise.
449
450 2016-04-11  H.J. Lu  <hongjiu.lu@intel.com>
451
452         PR ld/19939
453         * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): Add a pointer
454         to bfd_boolean.
455         * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Updated.
456         Set *readonly_dynrelocs_against_ifunc_p to TRUE if dynamic reloc
457         applies to read-only section.
458         * elf32-i386.c (elf_i386_link_hash_table): Add
459         readonly_dynrelocs_against_ifunc.
460         (elf_i386_allocate_dynrelocs): Updated.
461         (elf_i386_size_dynamic_sections): Issue an error for read-only
462         segment with dynamic IFUNC relocations only if
463         readonly_dynrelocs_against_ifunc is TRUE.
464         * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
465         readonly_dynrelocs_against_ifunc.
466         (elf_x86_64_allocate_dynrelocs): Updated.
467         (elf_x86_64_size_dynamic_sections): Issue an error for read-only
468         segment with dynamic IFUNC relocations only if
469         readonly_dynrelocs_against_ifunc is TRUE.
470         * elfnn-aarch64.c (elfNN_aarch64_allocate_ifunc_dynrelocs):
471         Updated.
472
473 2016-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
474
475         * elf32-arm.c (elf32_arm_size_stubs): Move error_ret_free_local to be
476         a fall through from error_ret_free_internal.  Free local_syms in
477         error_ret_free_local if allocated from bfd_elf_get_elf_syms ().
478
479 2016-04-05  Cupertino Miranda  <cmiranda@synopsys.com>
480
481         * elf32-arc.c (plt_do_relocs_for_symbol): Changed.
482         (relocate_plt_for_entry): Likewise.
483
484 2016-04-05  Cupertino Miranda  <cmiranda@synopsys.com>
485
486         * elf32-arc.c (elf_arc_check_relocs): Changed
487
488 2016-04-05  Cupertino Miranda  <cmiranda@synopsys.com>
489
490         * elf32-arc.c (name_for_global_symbol): Changed assert.
491         (get_replace_function): Created.:
492         (struct arc_relocation_data): Changed to signed types.
493         (defines S, L, P, PDATA): Casted to signed type.
494         (defines SECTSTART, _SDA_BASE_, TLS_REL): Likewise.
495         (PRINT_DEBUG_RELOC_INFO_BEFORE): Changed.
496         (arc_do_relocation): Changed.
497
498 2016-04-05  Cupertino Miranda  <cmiranda@synopsys.com>
499
500         * elf32-arc.c (name_for_global_symbol): Added assert to check for
501         symbol index.
502         (elf_arc_relocate_section): Added and changed asserts, validating
503         the synamic symbol index.
504         (elf_arc_finish_dynamic_symbol): Do not fill the dynamic
505         relocation if symbol has dynindx set to -1.
506
507 2016-04-05  Maciej W. Rozycki  <macro@imgtec.com>
508
509         * elflink.c (elf_link_add_object_symbols): Always turn hidden
510         and internal symbols which have a dynamic index into local
511         ones.
512
513 2016-04-04  Nick Clifton  <nickc@redhat.com>
514
515         PR 19872
516         * dwarf2.c (parse_comp_unit): Skip warning about unrecognised
517         version number if the version is zero.
518
519 2016-04-01  Alan Modra  <amodra@gmail.com>
520
521         PR 19886
522         * elflink.c (on_needed_list): Recursively check needed status.
523         (elf_link_add_object_symbols): Adjust.
524
525 2016-03-30  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
526
527         * elf32-avr.c (avr_elf32_load_records_from_section): Free
528         internal_relocs only if they aren't cached.
529
530 2016-03-29  Nick Clifton  <nickc@redhat.com>
531
532         PR 17334
533         * elf32-bfin.c (elf32_bfinfdpic_finish_dynamic_sections): Relax
534         assertion on the size of the got section to allow it to be bigger
535         than the number of relocs.
536
537 2016-03-29  Toni Spets  <toni.spets@iki.fi>
538
539         PR 19878
540         * coffcode.h (coff_write_object_contents): Revert accidental
541         2014-11-10 change.
542
543 2016-03-22  Alan Modra  <amodra@gmail.com>
544
545         PR 19850
546         * dwarf2.c (read_attribute_value): Skip info_ptr check for
547         DW_FORM_flag_present.
548
549 2016-03-22  Nick Clifton  <nickc@redhat.com>
550
551         * cpu-v850_rh850.c (arch_info_struct): Restore v850-rh850 as an
552         architecture name for backwards compatibility.
553
554         * peXXigen.c (_bfd_XXi_write_codeview_record): Fix possible
555         unbounded stack use.
556
557         * warning.m4 (GCC_WARN_CFLAGS): Only add -Wstack-usage if using a
558         sufficiently recent version of GCC.
559         * configure: Regenerate.
560
561 2016-03-22  Alan Modra  <amodra@gmail.com>
562
563         PR 19851
564         * plugin.c (try_load_plugin): Avoid -Wstack-usage warning.
565
566 2016-03-21  Andrew Burgess  <andrew.burgess@embecosm.com>
567
568         * archures.c (bfd_mach_arc_nps400): Define.
569         * bfd-in2.h: Regenerate.
570         * cpu-arc.c (arch_info_struct): New entry for nps400, renumber
571         some existing entries to make space.
572         * elf32-arc.c (arc_elf_object_p): Add nps400 case.
573         (arc_elf_final_write_processing): Likewise.
574
575 2016-03-21  Andrew Burgess  <andrew.burgess@embecosm.com>
576
577         * elf32-arc.c (arc_elf_print_private_bfd_data): Remove use of
578         EF_ARC_CPU_GENERIC.
579         (arc_elf_final_write_processing): Don't bother setting cpu field
580         in e_flags, this will have been set elsewhere.
581
582 2016-03-21  Andrew Burgess  <andrew.burgess@embecosm.com>
583
584         * elf32-arc.c (arc_elf_final_write_processing): Switch to using
585         EF_ARC_MACH_MSK.
586
587 2016-03-21  Nick Clifton  <nickc@redhat.com>
588
589         * warning.m4 (GCC_WARN_CFLAGS): Add -Wstack-usage=262144
590         * configure: Regenerate.
591         * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Replace use of
592         alloca with call to xmalloc.
593         * elf32-nds32.c: Likewise.
594         * elf64-hppa.c: Likewise.
595         * elfxx-mips.c: Likewise.
596         * pef.c: Likewise.
597         * pei-x86_64.c: Likewise.
598         * som.c: Likewise.
599         * xsym.c: Likewise.
600
601 2016-03-15  H.J. Lu  <hongjiu.lu@intel.com>
602
603         PR ld/19827
604         * elf32-i386.c (elf_i386_check_relocs): Bind defined symbol
605         locally in PIE.
606         (elf_i386_relocate_section): Likewise.
607         * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
608         (elf_x86_64_relocate_section): Likewise.
609
610 2016-03-15  H.J. Lu  <hongjiu.lu@intel.com>
611
612         PR ld/19807
613         * elf64-x86-64.c (elf_x86_64_relocate_section): Check
614         no_reloc_overflow_check to diable R_X86_64_32/R_X86_64_32S
615         relocation overflow check.
616
617 2016-03-14  H.J. Lu  <hongjiu.lu@intel.com>
618
619         * bfd-in2.h: Regenerated.
620
621 2016-03-11  Dan Gissel  <dgisselq@ieee.org>
622
623         PR 19713
624         * elf.c (_bfd_elf_section_offset): Ensure that the returned offset
625         uses bytes not octets.
626         * elflink.c (resolve_section): Likewise.
627         Add a bfd parameter.
628         (eval_section): Pass the input_bfd to resolve_section.
629         (bfd_elf_perform_complex_relocation): Convert byte offset to
630         octets before read and writing values.
631         (elf_link_input_bfd): Add byte to octet conversions.
632         (elf_reloc_link_order): Likewise.
633         (elf_fixup_link_order): Likewise.
634         (bfd_elf_final_link): Likewise.
635         * reloc.c (_bfd_final_link_relocate): Likewise.
636         * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
637
638 2016-03-10  Nick Clifton  <nickc@redhat.com>
639
640         * config.bfd: Mark the i370 target as obsolete.
641
642 2016-03-09  Pedro Alves  <palves@redhat.com>
643
644         * cpu-v850.c (N): Append ":old-gcc-abi" instead of " (using old
645         gcc ABI)" to printable name.
646         * cpu-v850_rh850.c (bfd_v850_rh850_arch): Use "v850:rh850" instead
647         of "v850-rh850" as printable name.
648
649 2016-03-09  Leon Winter  <winter-gcc@bfw-online.de>
650
651         PR ld/19623
652         * cofflink.c (_bfd_coff_generic_relocate_section): Do not apply
653         relocations against absolute symbols.
654
655 2016-03-09  Alan Modra  <amodra@gmail.com>
656
657         PR binutils/19775
658         * coff-alpha.c (alpha_ecoff_openr_next_archived_file): Allow zero
659         length elements in the archive.
660
661 2016-03-08  H.J. Lu  <hongjiu.lu@intel.com>
662
663         PR ld/19789
664         * elflink.c (elf_link_add_object_symbols): Create dynamic sections
665         for -E/--dynamic-list only when not relocatable.
666
667 2016-03-08  H.J. Lu  <hongjiu.lu@intel.com>
668
669         PR ld/19784
670         * elf32-i386.c (elf_i386_check_relocs): Increment PLT reference
671         count for locally defined local IFUNC symbols in shared object.
672         * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
673
674 2016-03-08  H.J. Lu  <hongjiu.lu@intel.com>
675
676         PR ld/19579
677         * elflink.c (_bfd_elf_merge_symbol): Group common symbol checking
678         together.
679
680 2016-03-08  Cupertino Miranda  <Cupertino.Miranda@synopsys.com>
681             Andrew Burgess  <andrew.burgess@embecosm.com>
682
683         * elf32-arc.c (arc_bfd_get_32): Becomes an alias for bfd_get_32.
684         (arc_bfd_put_32): Becomes an alias for bfd_put_32.
685         (arc_elf_howto_init): Added assert to validate relocations.
686         (get_middle_endian_relocation): Delete.
687         (middle_endian_convert): New function.
688         (ME): Redefine, now does nothing.
689         (IS_ME): New define.
690         (arc_do_relocation): Extend the attached 'ARC_RELOC_HOWTO'
691         definition to call middle_endian_convert.  Add a new local
692         variable and make use of this throughout. Added call to
693         arc_bfd_get_8 and arc_bfd_put_8 for 8 bit relocations.
694
695 2016-03-07  Nick Clifton  <nickc@redhat.com>
696
697         PR binutils/19775
698         * archive.c (bfd_generic_openr_next_archived_file): Allow zero
699         length elements in the archive.
700
701 2016-03-07  Jiong Wang  <jiong.wang@arm.com>
702
703         * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Always create .got
704         section if the symbol "_GLOBAL_OFFSET_TABLE_" is referenced.
705
706 2016-03-04  H.J. Lu  <hongjiu.lu@intel.com>
707
708         PR ld/19579
709         * elflink.c (_bfd_elf_merge_symbol): Treat common symbol in
710         executable as definition if the new definition comes from a
711         shared library.
712
713 2016-03-02  Alan Modra  <amodra@gmail.com>
714
715         * Makefile.in: Regenerate.
716         * po/SRC-POTFILES.in: Regenerate.
717
718 2016-02-29  Cupertino Miranda  <cmiranda@synopsys.com>
719
720         * elf32-arc.c (elf_arc_relocate_section): Added rules to fix the
721         relocation addend when sections get merged.
722
723 2016-02-29  Cupertino Miranda <Cupertino.Miranda@synopsys.com>
724
725         * elf32-arc.c (arc_elf_final_write_processing): Add condition to
726         the flag change.
727         (elf_arc_relocate_section): Fixes and conditions to support PIE.
728         Assert for code sections dynamic relocs.
729
730 2016-02-26  Renlin Li  <renlin.li@arm.com>
731
732         * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix signed overflow
733         check for MOVW_SABS_G0, MOVW_SABS_G1, MOVW_SABS_G2.
734
735 2016-02-26  H.J. Lu  <hongjiu.lu@intel.com>
736
737         PR ld/19609
738         * elf32-i386.c (elf_i386_convert_load): Convert to R_386_32 for
739         load with locally bound symbols if PIC is false or there is no
740         base register.  Optimize branch to 0 if PIC is false.
741         (elf_i386_relocate_section): Don't generate dynamic relocations
742         against undefined weak symbols if PIC is false.
743         * elf64-x86-64.c (elf_x86_64_convert_load): Disable optimization
744         if we can't estimate relocation overflow with --no-relax.
745         Convert to R_X86_64_32S/R_X86_64_32 for load with locally bound
746         symbols if PIC is false.  Optimize branch to 0 if PIC is false.
747         (elf_x86_64_relocate_section): Don't generate dynamic relocations
748         against undefined weak symbols if PIC is false.
749
750 2016-02-26  H.J. Lu  <hongjiu.lu@intel.com>
751
752         PR ld/19645
753         * bfd.c (bfd): Change flags to 20 bits.
754         (BFD_CONVERT_ELF_COMMON): New.
755         (BFD_USE_ELF_STT_COMMON): Likewise.
756         (BFD_FLAGS_SAVED): Add BFD_CONVERT_ELF_COMMON and
757         BFD_USE_ELF_STT_COMMON.
758         (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
759         * configure.ac: Remove --enable-elf-stt-common.
760         * elf.c (swap_out_syms): Choose STT_COMMON or STT_OBJECT for
761         common symbol depending on BFD_CONVERT_ELF_COMMON and
762         BFD_USE_ELF_STT_COMMON.
763         * elfcode.h (elf_slurp_symbol_table): Set BSF_ELF_COMMON for
764         STT_COMMON.
765         * elflink.c (bfd_elf_link_mark_dynamic_symbol): Also check
766         STT_COMMON.
767         (elf_link_convert_common_type): New function.
768         (elf_link_output_extsym): Choose STT_COMMON or STT_OBJECT for
769         common symbol depending on BFD_CONVERT_ELF_COMMON and
770         BFD_USE_ELF_STT_COMMON.  Set sym.st_info after sym.st_shndx.
771         * elfxx-target.h (TARGET_BIG_SYM): Add BFD_CONVERT_ELF_COMMON
772         and BFD_USE_ELF_STT_COMMON to object_flags.
773         (TARGET_LITTLE_SYM): Likewise.
774         * syms.c (BSF_KEEP_G): Renamed to ...
775         (BSF_ELF_COMMON): This.
776         * bfd-in2.h: Regenerated.
777         * config.in: Likewise.
778         * configure: Likewise.
779
780 2016-02-26  H.J. Lu  <hongjiu.lu@intel.com>
781
782         PR ld/19636
783         PR ld/19704
784         PR ld/19719
785         * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
786         (elf_i386_link_hash_entry): Add has_got_reloc and
787         has_non_got_reloc.
788         (elf_i386_link_hash_table): Add interp.
789         (elf_i386_link_hash_newfunc): Initialize has_got_reloc and
790         has_non_got_reloc.
791         (elf_i386_copy_indirect_symbol): Copy has_got_reloc and
792         has_non_got_reloc.
793         (elf_i386_check_relocs): Set has_got_reloc and has_non_got_reloc.
794         (elf_i386_fixup_symbol): New function.
795         (elf_i386_pie_finish_undefweak_symbol): Likewise.
796         (elf_i386_allocate_dynrelocs): Don't allocate space for dynamic
797         relocations and discard relocations against resolved undefined
798         weak symbols in executable.  Don't make resolved undefined weak
799         symbols in executable dynamic.  Keep dynamic non-GOT/non-PLT
800         relocation against undefined weak symbols in PIE.
801         (elf_i386_size_dynamic_sections): Set interp to .interp section.
802         (elf_i386_relocate_section): Don't generate dynamic relocations
803         against resolved undefined weak symbols in PIE, except for
804         R_386_PC32.
805         (elf_i386_finish_dynamic_symbol): Keep PLT/GOT entries without
806         dynamic PLT/GOT relocations for resolved undefined weak symbols.
807         Don't generate dynamic relocation against resolved undefined weak
808         symbol in executable.
809         (elf_i386_finish_dynamic_sections): Call
810         elf_i386_pie_finish_undefweak_symbol on all symbols in PIE.
811         (elf_backend_fixup_symbol): New.
812         * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
813         (elf_x86_64_link_hash_entry): Add has_got_reloc and
814         has_non_got_reloc.
815         (elf_x86_64_link_hash_table): Add interp.
816         (elf_x86_64_link_hash_newfunc): Initialize has_got_reloc and
817         has_non_got_reloc.
818         (elf_x86_64_copy_indirect_symbol): Copy has_got_reloc and
819         has_non_got_reloc.
820         (elf_x86_64_check_relocs): Set has_got_reloc and
821         has_non_got_reloc.
822         (elf_x86_64_fixup_symbol): New function.
823         (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
824         (elf_x86_64_allocate_dynrelocs): Don't allocate space for dynamic
825         relocations and discard relocations against resolved undefined
826         weak symbols in executable.  Don't make resolved undefined weak
827         symbols in executable dynamic.
828         (elf_x86_64_size_dynamic_sections): Set interp to .interp section.
829         (elf_x86_64_relocate_section): Check relocation overflow for
830         dynamic relocations against unresolved weak undefined symbols.
831         Don't generate dynamic relocations against resolved weak
832         undefined symbols in PIE.
833         (elf_x86_64_finish_dynamic_symbol): Keep PLT/GOT entries without
834         dynamic PLT/GOT relocations for resolved undefined weak symbols.
835         Don't generate dynamic relocation against resolved undefined weak
836         symbol in executable.
837         (elf_x86_64_finish_dynamic_sections): Call
838         elf_x86_64_pie_finish_undefweak_symbol on all symbols in PIE.
839         (elf_backend_fixup_symbol): New.
840
841 2016-02-26  Alan Modra  <amodra@gmail.com>
842
843         * elf64-ppc.c (create_linkage_sections): Create sfpr when
844         save_restore_funcs, rest of sections when not relocatable.
845         (ppc64_elf_init_stub_bfd): Always call create_linkage_sections.
846         (sfpr_define): Define all symbols on emitted code.
847         (ppc64_elf_func_desc_adjust): Adjust for sfpr now being created
848         when relocatable.  Move sfpr_define loop earlier.
849
850 2016-02-24  H.J. Lu  <hongjiu.lu@intel.com>
851
852         * elf64-x86-64.c (elf_x86_64_need_pic): New function.
853         (elf_x86_64_relocate_section): Use it.  Replace
854         x86_64_elf_howto_table[r_type] with howto.
855
856 2016-02-24  H.J. Lu  <hongjiu.lu@intel.com>
857
858         PR ld/19698
859         * elflink.c (bfd_elf_record_link_assignment): Set versioned if
860         symbol version is unknown.
861
862 2016-02-24  H.J. Lu  <hongjiu.lu@intel.com>
863
864         * elf32-i386.c (elf_i386_allocate_dynrelocs): Set plt_got.offset
865         to (bfd_vma) -1 when setting needs_plt to 0.
866         * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
867
868 2016-02-23  H.J. Lu  <hongjiu.lu@intel.com>
869
870         * elflink.c (bfd_elf_record_link_assignment): Check for shared
871         library, instead of PIC, and don't check PDE when making linker
872         assigned symbol dynamic.
873
874 2016-02-23  Faraz Shahbazker  <faraz.shahbazker@imgtec.com>
875
876         * bfd/elfxx-mips.c (_bfd_mips_post_process_headers): Increment
877         ABIVERSION for non-executable stack.
878
879 2016-02-23  Rich Felker  <bugdal@aerifal.cx>
880
881         PR target/19516
882         * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol):
883         Always produce a RELATIVE reloc for a local symbol.
884
885 2016-02-23  Hans-Peter Nilsson  <hp@axis.com>
886
887         Fix test-case ld-elf/pr19617b
888         * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
889         discard unused non-function symbols when --dynamic-list-data.
890
891 2016-02-22  H.J. Lu  <hongjiu.lu@intel.com>
892
893         * elflink.c (_bfd_elf_link_renumber_dynsyms): Always create the
894         dynsym section, even if it is empty, with dynamic sections.
895
896 2016-02-22  H.J. Lu  <hongjiu.lu@intel.com>
897
898         * syms.c: Remove BSF_COMMON from comments.
899         * bfd-in2.h: Regenerated.
900
901 2016-02-22  Jiong Wang  <jiong.wang@arm.com>
902
903         * elfnn-aarch64. (aarch64_type_of_stub): Remove redundation calcuation
904         for destination.  Remove useless function parameters.
905         (elfNN_aarch64_size_stubs): Update parameters for aarch64_type_of_stub.
906
907 2016-02-19  Nick Clifton  <nickc@redhat.com>
908
909         PR ld/19629
910         * aoutx.h (aout_link_add_symbols): Check for out of range string
911         table offsets.
912
913         PR ld/19628
914         * reloc.c (bfd_generic_get_relocated_section_contents): Stop
915         processing if we encounter a reloc without an associated symbol.
916
917 2016-02-18  H.J. Lu  <hongjiu.lu@intel.com>
918
919         PR ld/19617
920         * elflink.c (elf_link_add_object_symbols): Always create dynamic
921         sections for -E/--dynamic-list.
922
923 2016-02-17  H.J. Lu  <hongjiu.lu@intel.com>
924
925         * elf64-x86-64.c (elf_backend_omit_section_dynsym): New.  Defined
926         to bfd_true.
927
928 2016-02-16  Joseph Myers  <joseph@codesourcery.com>
929
930         * plugin.c (plugin_vec): Set match priority to 255.
931         * format.c (bfd_check_format_matches) [BFD_SUPPORTS_PLUGINS]: When
932         matching against the plugin vector, take priority from there not
933         from TEMP.
934
935 2016-02-15  Nick Clifton  <nickc@redhat.com>
936
937         * elf-bfd.h (struct bfd_elf_special_section): Use unsigned values
938         for length and type fields.  Use a signed value for the
939         suffix_length field.
940
941 2016-02-10  H.J. Lu  <hongjiu.lu@intel.com>
942
943         PR ld/19601
944         * elf32-i386.c (elf_i386_relocate_section): Mask off the least
945         significant bit in GOT offset for R_386_GOT32X.
946
947 2016-02-10  Nick Clifton  <nickc@redhat.com>
948
949         PR 19405
950         * elf32-nios2.c (nios2_elf32_install_imm16): Allow for signed
951         immediate values.
952         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Limit the
953         number of messages about FDE encoding preventing .eh_frame_hdr
954         generation.
955
956 2016-02-09  Nick Clifton  <nickc@redhat.com>
957
958         * oasys.c (oasys_archive_p): Fix indentation.
959         * elf32-nds32.c (nds32_elf_relax_section): Use an unsigned
960         constant for left shifting.
961
962         * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Add a more
963         helpful warning message to explain why certain AArch64 relocs
964         might overflow.
965
966 2016-02-05  Simon Marchi  <simon.marchi@ericsson.com>
967
968         * pe-mips.c (coff_mips_reloc): Fix formatting.
969
970 2016-02-05  Cupertino Miranda  <Cupertino.Miranda@synopsys.com>
971
972         * cpu-arc.c: Change default archure from bfd_mach_arc_arcv2
973         to bfd_mach_arc_arc600.
974
975 2016-02-04  Alan Modra  <amodra@gmail.com>
976
977         * elf64-ppc.c (ppc64_elf_relocate_section): Adjust last patch
978         for big-endian.
979
980 2016-02-02  H.J. Lu  <hongjiu.lu@intel.com>
981
982         PR ld/19542
983         * elf64-x86-64.c (elf_x86_64_convert_load): Store the estimated
984         distances in the compressed_size field of the output section.
985
986 2016-02-02  Alan Modra  <amodra@gmail.com>
987
988         * elf64-ppc.c (ppc64_elf_relocate_section): Further restrict
989         ELFv2 entry optimization.
990
991 2016-02-02  H.J. Lu  <hongjiu.lu@intel.com>
992
993         PR binutils/19547
994         * elf.c (assign_section_numbers): Clear HAS_RELOC if there are
995         no relocations in relocatable files.
996
997 2016-02-01  H.J. Lu  <hongjiu.lu@intel.com>
998
999         PR ld/19553
1000         * elflink.c (elf_link_add_object_symbols): Don't add DT_NEEDED
1001         if a symbol from a library loaded via DT_NEEDED doesn't match
1002         the symbol referenced by regular object.
1003
1004 2016-02-01  Nathaniel Smith  <njs@pobox.com>
1005
1006         * peicode.h (pe_ILF_build_a_bfd): Create an import symbol for both
1007         CODE and DATA.
1008
1009 2016-02-01  Alan Modra  <amodra@gmail.com>
1010
1011         * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Don't abort on
1012         an out of range reloc_index.
1013         * elf32-i386.c (elf_i386_get_plt_sym_val): Likewise.
1014
1015 2016-02-01  Kamil Rytarowski  <n54@gmx.com>
1016
1017         * Makefile.am (OPTIONAL_BACKENDS): Add netbsd-core.lo.
1018         (OPTIONAL_BACKENDS_CFILES): Add netbsd-core.c.
1019         * Makefile.in: Regenerated.
1020
1021 2016-02-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
1022
1023         * elf64-s390.c (elf_s390_reloc_name_lookup): Fix indentation.
1024
1025 2016-01-31  John David Anglin  <danglin@gcc.gnu.org>
1026
1027         PR ld/19526
1028         * elf32-hppa.c (elf32_hppa_final_link): Don't sort non-regular output
1029         files.
1030         * elf64-hppa.c (elf32_hppa_final_link): Likewise.  Remove retval.
1031
1032 2016-01-30  H.J. Lu  <hongjiu.lu@intel.com>
1033
1034         PR ld/19539
1035         * elf32-i386.c (elf_i386_reloc_type_class): Check relocation
1036         against STT_GNU_IFUNC symbol only with dynamic symbols.
1037         * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise.
1038
1039 2016-01-28  H.J. Lu  <hongjiu.lu@intel.com>
1040
1041         PR binutils/19523
1042         * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Set BFD_DECOMPRESS to
1043         decompress debug sections.
1044
1045 2016-01-25  Maciej W. Rozycki  <macro@imgtec.com>
1046
1047         * elf32-arc.c (elf_arc_finish_dynamic_symbol): Rename `index' to
1048         `dynindx'.
1049
1050 2016-01-25  Nick Clifton  <nickc@redhat.com>
1051
1052         PR target/19435
1053         * mach-o.c (bfd_mach_o_close_and_cleanup): Suppress code to free
1054         dsym filename buffer.
1055
1056 2016-01-24  Maciej W. Rozycki  <macro@imgtec.com>
1057
1058         * elfxx-mips.c (BZ16_REG_FIELD): Simplify calculation.
1059
1060 2016-01-24  Maciej W. Rozycki  <macro@imgtec.com>
1061
1062         * elfxx-mips.c (BZ16_REG): Correct calculation.
1063
1064 2016-01-21  Nick Clifton  <nickc@redhat.com>
1065
1066         * elf32-arc.c (ADD_RELA): Fix compile time warning errors by
1067         changing the type of _loc to be bfd_byte *.
1068         (elf_arc_finish_dynamic_symbol): Likewise.
1069
1070 2016-01-21  Nick Clifton  <nickc@redhat.com>
1071
1072         PR ld/19455
1073         * elf32-arm.c (elf32_arm_create_dynamic_sections): Set the ELF
1074         class of the linker stub bfd.
1075         (elf32_arm_check_relocs): Skip check for pic format after
1076         processing a vxWorks R_ARM_ABS12 reloc.
1077         * elflink.c (bfd_elf_final_link): Check for ELFCLASSNONE when
1078         reporting a class mismatch.
1079
1080 2016-01-21  Jiong Wang  <jiong.wang@arm.com>
1081
1082         * elfnn-aarch64.c (aarch64_type_of_stub): Allow insert long branch
1083         veneer for sym_sec != input_sec.
1084         (elfNN_aarch64_size_stub): Support STT_SECTION symbol.
1085         (elfNN_aarch64_final_link_relocate): Take rela addend into account when
1086         calculation destination.
1087
1088 2016-01-21  Alan Modra  <amodra@gmail.com>
1089
1090         * elf-linux-core.h (swap_linux_prpsinfo32_out): New function.
1091         (swap_linux_prpsinfo64_out): New function.
1092         (LINUX_PRPSINFO32_SWAP_FIELDS): Delete.
1093         (LINUX_PRPSINFO64_SWAP_FIELDS): Delete.
1094         * elf.c (elfcore_write_linux_prpsinfo32): Adjust.  Don't memset.
1095         (elfcore_write_linux_prpsinfo64): Likewise.
1096         * elf32-ppc.c (swap_ppc_linux_prpsinfo32_out): New function.
1097         (PPC_LINUX_PRPSINFO32_SWAP_FIELDS): Delete.
1098         (elfcore_write_ppc_linux_prpsinfo32): Adjust.  Don't memset.
1099
1100 2016-01-21  Alan Modra  <amodra@gmail.com>
1101
1102         * elf-linux-core.h: Rename from elf-linux-psinfo.h.
1103         * elf.c: Adjust #include.
1104         * elf32-ppc.c: Don't #include elf-linux-psinfo.h
1105         * Makefile.am (SOURCE_HFILES): Update.
1106         * Makefile.in: Regenerate.
1107         * po/SRC-PORFILES.in: Regenerate.
1108
1109 2016-01-21  Alan Modra  <amodra@gmail.com>
1110
1111         * configure.ac: Move corefile selection later in file.  Move
1112         tdefaults code immediately after other target vector code.
1113         * configure: Regenerate.
1114
1115 2016-01-20  Mickael Guene  <mickael.guene@st.com>
1116
1117         * elf32-arm.c (elf32_arm_special_sections): Remove catch of noread
1118         section using '.text.noread' pattern.
1119
1120 2016-01-19  John Baldwin  <jhb@FreeBSD.org>
1121
1122         * elf.c (elfcore_grok_note): Recognize NT_FREEBSD_THRMISC notes.
1123
1124 2016-01-18  Miranda Cupertino  <Cupertino.Miranda@synopsys.com>
1125             Zissulescu Claudiu  <Claudiu.Zissulescu@synopsys.com>
1126
1127         * arc-plt.def: New file.
1128         * arc-plt.h: Likewise.
1129         * elf32-arc.c (elf_arc_abs_plt0_entry, elf_arc_abs_pltn_entry,
1130                        elf_arcV2_abs_plt0_entry, elf_arcV2_abs_pltn_entry,
1131                        elf_arc_pic_plt0_entry, elf_arc_pic_pltn_entry,
1132                        elf_arcV2_pic_plt0_entry, elf_arcV2_pic_pltn_entry): Remove.
1133         (name_for_global_symbol): Added.
1134         (ADD_RELA): Helper to create dynamic relocs.
1135         (new_got_entry_to_list): Create a new got entry in linked list.
1136         (symbol_has_entry_of_type): Search for specific type of entry in
1137         list.
1138         (is_reloc_for_GOT): return FALSE for any TLS related relocs.
1139         (is_reloc_for_TLS, arc_elf_set_private_flags)
1140         (arc_elf_print_private_bfd_data, arc_elf_copy_private_bfd_data)
1141         (arc_elf_merge_private_bfd_data): New functions.
1142         (debug_arc_reloc): Cleaned debug info printing.
1143         (PDATA reloc): Changed not to perform address alignment.
1144         (reverse_me): Added. Fix for ARC_32 relocs.
1145         (arc_do_relocation): Return bfd_reloc_of when no relocation should
1146         occur.
1147         (arc_get_local_got_ents): Renamed from arc_get_local_got_offsets.
1148         Changed function to access an array of list of GOT entries instead
1149         of just an array of offsets.
1150         (elf_arc_relocate_section): Added support for PIC and TLS related relocations.
1151         (elf_arc_check_relocs): Likewise.
1152         (elf_arc_adjust_dynamic_symbol, elf_arc_finish_dynamic_symbol,
1153         (elf_arc_finish_dynamic_sections): Likewise
1154         (arc_create_dynamic_sections): Modified conditions to create
1155         dynamic sections.
1156         (ADD_SYMBOL_REF_SEC_AND_RELOC): New macro.
1157         (plt_do_relocs_for_symbol, relocate_plt_for_symbol)
1158         (relocate_plt_for_entry): Changed to support new way to define PLT
1159         related code.
1160         (add_symbol_to_plt): Likewise.
1161         (arc_elf_link_hash_table_create): New function.
1162
1163 2016-01-18  Nick Clifton  <nickc@redhat.com>
1164
1165         PR ld/19440
1166         * coff-rs6000.c (_bfd_xcoff_swap_sym_in): Sign extend external
1167         section number into internal section number.
1168         * coff64-rs6000.c (_bfd_xcoff64_swap_sym_in): Likewise.
1169         * coffswap.h (coff_swap_sym_in): Likewise.
1170         * peXXigen.c (_bfd_XXi_swap_sym_in): Likewise.
1171         * coffcode.h (_coff_bigobj_swap_sym_in): Make sure that internal
1172         section number field is big enough to hold the external value.
1173
1174 2016-01-17  Alan Modra  <amodra@gmail.com>
1175
1176         * configure: Regenerate.
1177
1178 2016-01-12  Yury Usishchev  <y.usishchev@samsung.com>
1179
1180         * elf32-arm.c (elf32_arm_fix_exidx_coverage): Insert cantunwind
1181         when address in first unwind entry does not match start of
1182         section.
1183
1184 2016-01-08  Richard Sandiford  <richard.sandiford@arm.com>
1185             Jiong Wang  <jiong.wang@arm.com>
1186
1187         PR ld/19368
1188         * elf32-arm.c (elf32_arm_reloc_type_class): Map R_ARM_IRELATIVE to
1189         reloc_class_ifunc.
1190
1191 2016-01-06  Andrew Burgess  <andrew.burgess@embecosm.com>
1192
1193         * elf32-arc.c (reloc_type_to_name): Change ARC_RELOC_HOWTO to
1194         place 'R_' before the reloc name returned.
1195         (elf_arc_howto_table): Change ARC_RELOC_HOWTO to place 'R_' before
1196         the relocation string.
1197
1198 2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
1199
1200         * elfxx-mips.c (mips_elf_merge_obj_abiflags): New function,
1201         factored out from...
1202         (_bfd_mips_elf_merge_private_bfd_data): ... here.
1203
1204 2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
1205
1206         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Move
1207         attribute check after ELF file header flag check.
1208
1209 2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
1210
1211         * elfxx-mips.c (mips_elf_merge_obj_attributes): Propagate the
1212         return status from `_bfd_elf_merge_object_attributes'.
1213
1214 2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
1215
1216         * elfxx-mips.c (mips_elf_merge_obj_e_flags): New function,
1217         factored out from...
1218         (_bfd_mips_elf_merge_private_bfd_data): ... here.
1219
1220 2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
1221
1222         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Fold the
1223         handling of input MIPS ABI flags together.
1224
1225 2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
1226
1227         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Suppress
1228         attribute checks for null input.
1229
1230 2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
1231
1232         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Use local
1233         pointers to target data.
1234
1235 2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
1236
1237         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
1238         an FP ABI warning.
1239
1240 2016-01-01  Alan Modra  <amodra@gmail.com>
1241
1242         Update year range in copyright notice of all files.
1243
1244 For older changes see ChangeLog-2015 and doc/ChangeLog-0415
1245 \f
1246 Copyright (C) 2016 Free Software Foundation, Inc.
1247
1248 Copying and distribution of this file, with or without modification,
1249 are permitted in any medium without royalty provided the copyright
1250 notice and this notice are preserved.
1251
1252 Local Variables:
1253 mode: change-log
1254 left-margin: 8
1255 fill-column: 74
1256 version-control: never
1257 End: