xref: /netbsd-src/external/gpl3/binutils.old/dist/bfd/ChangeLog-2016 (revision e6c7e151de239c49d2e38720a061ed9d1fa99309)
1*e6c7e151Schristos2016-12-31  Alan Modra  <amodra@gmail.com>
2*e6c7e151Schristos
3*e6c7e151Schristos	* elfn32-mips.c (elf_backend_want_dynrelro): Define.
4*e6c7e151Schristos
5*e6c7e151Schristos2016-12-31  Dimitar Dimitrov  <dimitar@dinux.eu>
6*e6c7e151Schristos
7*e6c7e151Schristos	* archures.c: Add bfd_arch_pru.
8*e6c7e151Schristos	* Makefile.am: Add PRU target.
9*e6c7e151Schristos	* config.bfd: Ditto.
10*e6c7e151Schristos	* configure.ac: Ditto.
11*e6c7e151Schristos	* elf-bfd.h (enum elf_target_id): Add PRU_ELF_DATA.
12*e6c7e151Schristos	* targets.c: Add pru_elf32_vec.
13*e6c7e151Schristos	* reloc.c: Add PRU relocations.
14*e6c7e151Schristos	* cpu-pru.c: New file.
15*e6c7e151Schristos	* elf32-pru.c: New file.
16*e6c7e151Schristos	* Makefile.in: Regenerate.
17*e6c7e151Schristos	* configure: Regenerate.
18*e6c7e151Schristos	* po/SRC-POTFILES.in: Regenerate.
19*e6c7e151Schristos	* bfd-in2.h: Regenerate
20*e6c7e151Schristos	* libbfd.h: Regenerate.
21*e6c7e151Schristos
22*e6c7e151Schristos2016-12-29  Alan Modra  <amodra@gmail.com>
23*e6c7e151Schristos
24*e6c7e151Schristos	* elflink.c (_bfd_elf_link_hash_copy_indirect): Only omit
25*e6c7e151Schristos	copying one flag, ref_dynamic, when versioned_hidden.
26*e6c7e151Schristos	* elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
27*e6c7e151Schristos	* elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Use same
28*e6c7e151Schristos	logic for copying weakdef flags.  Copy plabel flag and merge
29*e6c7e151Schristos	tls_type.
30*e6c7e151Schristos	* elf32-i386.c (elf_i386_copy_indirect_symbol): Use same logic
31*e6c7e151Schristos	for copying weakdef flags.
32*e6c7e151Schristos	* elf32-ppc.c (ppc_elf_copy_indirect_symbol): Likewise.
33*e6c7e151Schristos	* elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
34*e6c7e151Schristos	* elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise.
35*e6c7e151Schristos	* elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
36*e6c7e151Schristos	* elfnn-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
37*e6c7e151Schristos	* elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Likewise.
38*e6c7e151Schristos	Simplify.
39*e6c7e151Schristos
40*e6c7e151Schristos2016-12-28  Alan Modra  <amodra@gmail.com>
41*e6c7e151Schristos
42*e6c7e151Schristos	PR ld/20995
43*e6c7e151Schristos	* elflink.c (elf_link_add_object_symbols): Mark relro sections
44*e6c7e151Schristos	in dynamic objects SEC_READONLY.
45*e6c7e151Schristos
46*e6c7e151Schristos2016-12-26  Alan Modra  <amodra@gmail.com>
47*e6c7e151Schristos
48*e6c7e151Schristos	PR ld/20995
49*e6c7e151Schristos	* elf-bfd.h (struct elf_link_hash_table): Add sdynrelro and
50*e6c7e151Schristos	sreldynrelro.
51*e6c7e151Schristos	(struct elf_backend_data): Add want_dynrelro.
52*e6c7e151Schristos	* elfxx-target.h (elf_backend_want_dynrelro): Define.
53*e6c7e151Schristos	(elfNN_bed): Update initializer.
54*e6c7e151Schristos	* elflink.c (_bfd_elf_create_dynamic_sections): Create
55*e6c7e151Schristos	sdynrelro and sreldynrelro sections.
56*e6c7e151Schristos	* elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Place variables
57*e6c7e151Schristos	copied into the executable from read-only sections into sdynrelro.
58*e6c7e151Schristos	(elf32_arm_size_dynamic_sections): Handle sdynrelro.
59*e6c7e151Schristos	(elf32_arm_finish_dynamic_symbol): Select sreldynrelro for
60*e6c7e151Schristos	dynamic relocs in sdynrelro.
61*e6c7e151Schristos	(elf_backend_want_dynrelro): Define.
62*e6c7e151Schristos	* elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol)
63*e6c7e151Schristos	(elf32_hppa_size_dynamic_sections, elf32_hppa_finish_dynamic_symbol)
64*e6c7e151Schristos	(elf_backend_want_dynrelro): As above.
65*e6c7e151Schristos	* elf32-i386.c (elf_i386_adjust_dynamic_symbol)
66*e6c7e151Schristos	(elf_i386_size_dynamic_sections, elf_i386_finish_dynamic_symbol)
67*e6c7e151Schristos	(elf_backend_want_dynrelro): As above.
68*e6c7e151Schristos	* elf32-metag.c (elf_metag_adjust_dynamic_symbol)
69*e6c7e151Schristos	(elf_metag_size_dynamic_sections, elf_metag_finish_dynamic_symbol)
70*e6c7e151Schristos	(elf_backend_want_dynrelro): As above.
71*e6c7e151Schristos	* elf32-microblaze.c (microblaze_elf_adjust_dynamic_symbol)
72*e6c7e151Schristos	(microblaze_elf_size_dynamic_sections)
73*e6c7e151Schristos	(microblaze_elf_finish_dynamic_symbol)
74*e6c7e151Schristos	(elf_backend_want_dynrelro): As above.
75*e6c7e151Schristos	* elf32-nios2.c (nios2_elf32_finish_dynamic_symbol)
76*e6c7e151Schristos	(nios2_elf32_adjust_dynamic_symbol)
77*e6c7e151Schristos	(nios2_elf32_size_dynamic_sections)
78*e6c7e151Schristos	(elf_backend_want_dynrelro): As above.
79*e6c7e151Schristos	* elf32-or1k.c (or1k_elf_finish_dynamic_symbol)
80*e6c7e151Schristos	(or1k_elf_adjust_dynamic_symbol, or1k_elf_size_dynamic_sections)
81*e6c7e151Schristos	(elf_backend_want_dynrelro): As above.
82*e6c7e151Schristos	* elf32-ppc.c (ppc_elf_adjust_dynamic_symbol)
83*e6c7e151Schristos	(ppc_elf_size_dynamic_sections, ppc_elf_finish_dynamic_symbol)
84*e6c7e151Schristos	(elf_backend_want_dynrelro): As above.
85*e6c7e151Schristos	* elf32-s390.c (elf_s390_adjust_dynamic_symbol)
86*e6c7e151Schristos	(elf_s390_size_dynamic_sections, elf_s390_finish_dynamic_symbol)
87*e6c7e151Schristos	(elf_backend_want_dynrelro): As above.
88*e6c7e151Schristos	* elf32-tic6x.c (elf32_tic6x_adjust_dynamic_symbol)
89*e6c7e151Schristos	(elf32_tic6x_size_dynamic_sections)
90*e6c7e151Schristos	(elf32_tic6x_finish_dynamic_symbol)
91*e6c7e151Schristos	(elf_backend_want_dynrelro): As above.
92*e6c7e151Schristos	* elf32-tilepro.c (tilepro_elf_adjust_dynamic_symbol)
93*e6c7e151Schristos	(tilepro_elf_size_dynamic_sections)
94*e6c7e151Schristos	(tilepro_elf_finish_dynamic_symbol)
95*e6c7e151Schristos	(elf_backend_want_dynrelro): As above.
96*e6c7e151Schristos	* elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol)
97*e6c7e151Schristos	(ppc64_elf_size_dynamic_sections, ppc64_elf_finish_dynamic_symbol)
98*e6c7e151Schristos	(elf_backend_want_dynrelro): As above.
99*e6c7e151Schristos	* elf64-s390.c (elf_s390_adjust_dynamic_symbol)
100*e6c7e151Schristos	(elf_s390_size_dynamic_sections, elf_s390_finish_dynamic_symbol)
101*e6c7e151Schristos	(elf_backend_want_dynrelro): As above.
102*e6c7e151Schristos	* elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol)
103*e6c7e151Schristos	(elf_x86_64_size_dynamic_sections)
104*e6c7e151Schristos	(elf_x86_64_finish_dynamic_symbol)
105*e6c7e151Schristos	(elf_backend_want_dynrelro): As above.
106*e6c7e151Schristos	* elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol)
107*e6c7e151Schristos	(elfNN_aarch64_size_dynamic_sections)
108*e6c7e151Schristos	(elfNN_aarch64_finish_dynamic_symbol)
109*e6c7e151Schristos	(elf_backend_want_dynrelro): As above.
110*e6c7e151Schristos	* elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol)
111*e6c7e151Schristos	(riscv_elf_size_dynamic_sections, riscv_elf_finish_dynamic_symbol)
112*e6c7e151Schristos	(elf_backend_want_dynrelro): As above.
113*e6c7e151Schristos	* elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol)
114*e6c7e151Schristos	(_bfd_mips_elf_size_dynamic_sections)
115*e6c7e151Schristos	(_bfd_mips_vxworks_finish_dynamic_symbol): As above.
116*e6c7e151Schristos	* elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol)
117*e6c7e151Schristos	(_bfd_sparc_elf_size_dynamic_sections)
118*e6c7e151Schristos	(_bfd_sparc_elf_finish_dynamic_symbol): As above.
119*e6c7e151Schristos	* elfxx-tilegx.c (tilegx_elf_adjust_dynamic_symbol)
120*e6c7e151Schristos	(tilegx_elf_size_dynamic_sections)
121*e6c7e151Schristos	(tilegx_elf_finish_dynamic_symbol): As above.
122*e6c7e151Schristos	* elf32-mips.c (elf_backend_want_dynrelro): Define.
123*e6c7e151Schristos	* elf64-mips.c (elf_backend_want_dynrelro): Define.
124*e6c7e151Schristos	* elf32-sparc.c (elf_backend_want_dynrelro): Define.
125*e6c7e151Schristos	* elf64-sparc.c (elf_backend_want_dynrelro): Define.
126*e6c7e151Schristos	* elf32-tilegx.c (elf_backend_want_dynrelro): Define.
127*e6c7e151Schristos	* elf64-tilegx.c (elf_backend_want_dynrelro): Define.
128*e6c7e151Schristos	* elf32-microblaze.c (microblaze_elf_adjust_dynamic_symbol): Tidy.
129*e6c7e151Schristos	(microblaze_elf_size_dynamic_sections): Handle sdynbss.
130*e6c7e151Schristos	* elf32-nios2.c (nios2_elf32_size_dynamic_sections): Make use
131*e6c7e151Schristos	of linker shortcuts to dynamic sections rather than comparing
132*e6c7e151Schristos	names.  Correctly set "got" flag.
133*e6c7e151Schristos
134*e6c7e151Schristos2016-12-26  Alan Modra  <amodra@gmail.com>
135*e6c7e151Schristos
136*e6c7e151Schristos	* elf-bfd.h (struct elf_link_hash_table): Add sdynbss and srelbss.
137*e6c7e151Schristos	* elflink.c (_bfd_elf_create_dynamic_sections): Set them.  Create
138*e6c7e151Schristos	.rel.bss/.rela.bss for executables, both PIE and non-PIE.
139*e6c7e151Schristos	* elf32-arc.c (struct elf_arc_link_hash_table): Delete srelbss.
140*e6c7e151Schristos	Use ELF hash table var throughout.
141*e6c7e151Schristos	* elf32-arm.c (struct elf32_arm_link_hash_table): Delete sdynbss
142*e6c7e151Schristos	and srelbss.  Use ELF hash table vars throughout.
143*e6c7e151Schristos	* elf32-hppa.c (struct elf32_hppa_link_hash_table): Likewise.
144*e6c7e151Schristos	* elf32-i386.c (struct elf_i386_link_hash_table): Likewise.
145*e6c7e151Schristos	* elf32-metag.c (struct elf_metag_link_hash_table): Likewise.
146*e6c7e151Schristos	* elf32-microblaze.c (struct elf32_mb_link_hash_table): Likewise.
147*e6c7e151Schristos	* elf32-nios2.c (struct elf32_nios2_link_hash_table): Likewise.
148*e6c7e151Schristos	* elf32-or1k.c (struct elf_or1k_link_hash_table): Likewise.
149*e6c7e151Schristos	* elf32-ppc.c (struct ppc_elf_link_hash_table): Likewise.
150*e6c7e151Schristos	* elf32-s390.c (struct elf_s390_link_hash_table): Likewise.
151*e6c7e151Schristos	* elf32-tic6x.c (struct elf32_tic6x_link_hash_table): Likewise.
152*e6c7e151Schristos	* elf32-tilepro.c (struct tilepro_elf_link_hash_table): Likewise.
153*e6c7e151Schristos	* elf64-ppc.c (struct ppc_link_hash_table): Likewise.
154*e6c7e151Schristos	* elf64-s390.c (struct elf_s390_link_hash_table): Likewise.
155*e6c7e151Schristos	* elf64-x86-64.c (struct elf_x86_64_link_hash_table): Likewise.
156*e6c7e151Schristos	* elfnn-aarch64.c (struct elf_aarch64_link_hash_table): Likewise.
157*e6c7e151Schristos	* elfnn-riscv.c (struct riscv_elf_link_hash_table): Likewise.
158*e6c7e151Schristos	* elfxx-mips.c (struct mips_elf_link_hash_table): Likewise.
159*e6c7e151Schristos	* elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Likewise.
160*e6c7e151Schristos	* elfxx-sparc.c: Likewise.
161*e6c7e151Schristos	* elfxx-tilegx.c (struct tilegx_elf_link_hash_table): Likewise.
162*e6c7e151Schristos
163*e6c7e151Schristos	* elf32-arc.c (arc_elf_create_dynamic_sections): Delete.
164*e6c7e151Schristos	(elf_backend_create_dynamic_sections): Use base ELF version.
165*e6c7e151Schristos	* elf32-microblaze.c (microblaze_elf_create_dynamic_sections): Delete.
166*e6c7e151Schristos	(elf_backend_create_dynamic_sections): Use base ELF version.
167*e6c7e151Schristos	* elf32-or1k.c (or1k_elf_create_dynamic_sections): Delete.
168*e6c7e151Schristos	(elf_backend_create_dynamic_sections): Use base ELF version.
169*e6c7e151Schristos	* elf32-s390.c (elf_s390_create_dynamic_sections): Delete.
170*e6c7e151Schristos	(elf_backend_create_dynamic_sections): Use base ELF version.
171*e6c7e151Schristos	* elf64-ppc.c (ppc64_elf_create_dynamic_sections): Delete.
172*e6c7e151Schristos	(elf_backend_create_dynamic_sections): Use base ELF version.
173*e6c7e151Schristos	* elf64-s390.c (elf_s390_create_dynamic_sections): Delete.
174*e6c7e151Schristos	(elf_backend_create_dynamic_sections): Use base ELF version.
175*e6c7e151Schristos
176*e6c7e151Schristos	* elf32-tilepro.c (tilepro_elf_create_dynamic_sections): Remove
177*e6c7e151Schristos	extraneous tests.
178*e6c7e151Schristos	* elfnn-aarch64.c (elfNN_aarch64_create_dynamic_sections): Likewise.
179*e6c7e151Schristos	* elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Likewise.
180*e6c7e151Schristos	* elfxx-tilegx.c (tilegx_elf_create_dynamic_sections): Likewise.
181*e6c7e151Schristos
182*e6c7e151Schristos	* elf32-i386.c (elf_i386_create_dynamic_sections): Don't create
183*e6c7e151Schristos	".rel.bss" for executables.
184*e6c7e151Schristos	* elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Don't create
185*e6c7e151Schristos	".rela.bss" for executables.
186*e6c7e151Schristos	* elf32-nios2.c (nios2_elf32_create_dynamic_sections): Don't
187*e6c7e151Schristos	ignore return status from _bfd_elf_create_dynamic_sections.
188*e6c7e151Schristos
189*e6c7e151Schristos2016-12-23  Maciej W. Rozycki  <macro@imgtec.com>
190*e6c7e151Schristos
191*e6c7e151Schristos	* bfd/elfxx-mips.c (_bfd_mips_post_process_headers): Revert
192*e6c7e151Schristos	2016-02-23 change and remove EI_ABIVERSION 5 support.
193*e6c7e151Schristos
194*e6c7e151Schristos2016-12-23  Alan Modra  <amodra@gmail.com>
195*e6c7e151Schristos
196*e6c7e151Schristos	* linker.c (generic_link_check_archive_element): Call target
197*e6c7e151Schristos	bfd_link_add_symbols to add element symbols.
198*e6c7e151Schristos
199*e6c7e151Schristos2016-12-23  Alan Modra  <amodra@gmail.com>
200*e6c7e151Schristos
201*e6c7e151Schristos	* linker.c (generic_link_add_symbols): Delete.  Merge into..
202*e6c7e151Schristos	(_bfd_generic_link_add_symbols): ..here.
203*e6c7e151Schristos	(generic_link_check_archive_element_no_collect): Delete.
204*e6c7e151Schristos	(generic_link_check_archive_element_collect): Likewise.
205*e6c7e151Schristos	(generic_link_add_object_symbols): Remove "collect" param.  Update
206*e6c7e151Schristos	callers.
207*e6c7e151Schristos	(generic_link_add_symbol_list): Likewise.
208*e6c7e151Schristos	(generic_link_check_archive_element): Likewise.  Call
209*e6c7e151Schristos	bfd_link_add_symbols rather than generic_link_add_object_symbols.
210*e6c7e151Schristos	* libbfd-in.h (_bfd_generic_link_add_symbols_collect): Delete.
211*e6c7e151Schristos	* libbfd.h: Regenerate.
212*e6c7e151Schristos
213*e6c7e151Schristos2016-12-23  Alan Modra  <amodra@gmail.com>
214*e6c7e151Schristos
215*e6c7e151Schristos	PR binutils/20464
216*e6c7e151Schristos	PR binutils/14625
217*e6c7e151Schristos	* configure.ac: Revert 2016-05-25 configure change setting
218*e6c7e151Schristos	want_64_bit_archive for mips64 and s390x.  Revise USE_64_BIT_ARCHIVE
219*e6c7e151Schristos	description.
220*e6c7e151Schristos	* configure: Regenerate.
221*e6c7e151Schristos	* config.in: Regenerate.
222*e6c7e151Schristos
223*e6c7e151Schristos2016-12-23  Tristan Gingold  <gingold@adacore.com>
224*e6c7e151Schristos
225*e6c7e151Schristos	* version.m4: Bump version to 2.28.51
226*e6c7e151Schristos	* configure: Regenerate.
227*e6c7e151Schristos
228*e6c7e151Schristos2016-12-23  Tristan Gingold  <gingold@adacore.com>
229*e6c7e151Schristos
230*e6c7e151Schristos	* po/bfd.pot: Regenerate.
231*e6c7e151Schristos
232*e6c7e151Schristos2016-12-22  Alan Modra  <amodra@gmail.com>
233*e6c7e151Schristos
234*e6c7e151Schristos	* libbfd-in.h (_bfd_vms_lib_slurp_armap): Use _bfd_noarchive function.
235*e6c7e151Schristos	(_bfd_vms_lib_slurp_extended_name_table: Likewise.
236*e6c7e151Schristos	(_bfd_vms_lib_construct_extended_name_table: Likewise.
237*e6c7e151Schristos	(_bfd_vms_lib_truncate_arname: Likewise.
238*e6c7e151Schristos	(_bfd_vms_lib_write_armap: Likewise.
239*e6c7e151Schristos	(_bfd_vms_lib_read_ar_hdr: Likewise.
240*e6c7e151Schristos	(_bfd_vms_lib_write_ar_hdr: Likewise.
241*e6c7e151Schristos	* libbfd.h: Regenerate.
242*e6c7e151Schristos
243*e6c7e151Schristos2016-12-21: Yury Norov <ynorov@caviumnetworks.com>
244*e6c7e151Schristos            Andreas Schwab <schwab@suse.de>
245*e6c7e151Schristos
246*e6c7e151Schristos	* cpu-aarch64.c: Fix word and address size declaration in
247*e6c7e151Schristos	ilp32 mode in bfd_arch_info_type bfd_aarch64_arch_ilp32
248*e6c7e151Schristos	structure.
249*e6c7e151Schristos
250*e6c7e151Schristos2016-12-20  Andrew Waterman  <andrew@sifive.com>
251*e6c7e151Schristos
252*e6c7e151Schristos	* elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Use
253*e6c7e151Schristos	EF_RISCV_FLOAT_ABI_SOFT instead of EF_RISCV_SOFT_FLOAT.
254*e6c7e151Schristos
255*e6c7e151Schristos2016-12-20  Andrew Waterman  <andrew@sifive.com>
256*e6c7e151Schristos
257*e6c7e151Schristos	* elfnn-riscv.c (bfd_riscv_get_max_alignment): Return bfd_vma
258*e6c7e151Schristos	instead of unsigned int.
259*e6c7e151Schristos
260*e6c7e151Schristos2016-12-20  Andrew Waterman  <andrew@sifive.com>
261*e6c7e151Schristos	    Kuan-Lin Chen  <kuanlinchentw@gmail.com>
262*e6c7e151Schristos
263*e6c7e151Schristos	* reloc.c (BFD_RELOC_RISCV_TPREL_I): New relocation.
264*e6c7e151Schristos	(BFD_RELOC_RISCV_TPREL_S): Likewise.
265*e6c7e151Schristos	(BFD_RELOC_RISCV_RELAX): Likewise.
266*e6c7e151Schristos	(BFD_RELOC_RISCV_CFA): Likewise.
267*e6c7e151Schristos	(BFD_RELOC_RISCV_SUB6): Likewise.
268*e6c7e151Schristos	(BFD_RELOC_RISCV_SET8): Likewise.
269*e6c7e151Schristos	(BFD_RELOC_RISCV_SET8): Likewise.
270*e6c7e151Schristos	(BFD_RELOC_RISCV_SET16): Likewise.
271*e6c7e151Schristos	(BFD_RELOC_RISCV_SET32): Likewise.
272*e6c7e151Schristos	* elfnn-riscv.c (perform_relocation): Handle the new
273*e6c7e151Schristos	relocations.
274*e6c7e151Schristos	(_bfd_riscv_relax_tls_le): Likewise.
275*e6c7e151Schristos	(_bfd_riscv_relax_align): Likewise.
276*e6c7e151Schristos	(_bfd_riscv_relax_section): Likewise.
277*e6c7e151Schristos	(howto_table): Likewise.
278*e6c7e151Schristos	(riscv_reloc_map): Likewise.
279*e6c7e151Schristos	(relax_func_t): New type.
280*e6c7e151Schristos	(_bfd_riscv_relax_call): Add reserve_size argument, which
281*e6c7e151Schristos	controls the maximal offset pessimism.  Correct type of max_alignment.
282*e6c7e151Schristos	(_bfd_riscv_relax_lui): Likewise.
283*e6c7e151Schristos	(_bfd_riscv_relax_tls_le): Likewise.
284*e6c7e151Schristos	(_bfd_riscv_relax_align): Likewise.
285*e6c7e151Schristos	(_bfd_riscv_relax_section): Compute the required reserve size
286*e6c7e151Schristos	when relocating and use it to when calling relax_func.
287*e6c7e151Schristos	* bfd-in2.h: Regenerate.
288*e6c7e151Schristos	* libbfd.h: Likewise.
289*e6c7e151Schristos
290*e6c7e151Schristos2016-12-20  Andrew Waterman  <andrew@sifive.com>
291*e6c7e151Schristos
292*e6c7e151Schristos	* elfnn-riscv.c: Formatting and comment fixes throughout.
293*e6c7e151Schristos	* elfxx-riscv.c: Likewise.
294*e6c7e151Schristos	(howto_table): Change the src_mask field from MINUS_ONE to 0 for
295*e6c7e151Schristos	R_RISCV_TLS_DTPMOD32, R_RISCV_TLS_DTPMOD64, R_RISCV_TLS_DTPREL32,
296*e6c7e151Schristos	R_RISCV_TLS_DTPREL64, R_RISCV_TLS_TPREL32, R_RISCV_TLS_TPREL64.
297*e6c7e151Schristos
298*e6c7e151Schristos2016-12-20  Palmer Dabbelt  <palmer@dabbelt.com>
299*e6c7e151Schristos
300*e6c7e151Schristos	* elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Improve
301*e6c7e151Schristos	error message when linking elf32 and elf64.
302*e6c7e151Schristos
303*e6c7e151Schristos2016-12-19  Christian Groessler  <chris@groessler.org>
304*e6c7e151Schristos
305*e6c7e151Schristos	* elf32-arm.c (elf32_arm_popcount): Rename from 'popcount'.  Make
306*e6c7e151Schristos	'sum' local variable signed.
307*e6c7e151Schristos
308*e6c7e151Schristos2016-12-16  fincs  <fincs.alt1@gmail.com>
309*e6c7e151Schristos
310*e6c7e151Schristos	* elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Add handling
311*e6c7e151Schristos	for info->gc_keep_exported.
312*e6c7e151Schristos	(bfd_elf_gc_sections): Likewise.
313*e6c7e151Schristos
314*e6c7e151Schristos2016-12-15  Alan Modra  <amodra@gmail.com>
315*e6c7e151Schristos
316*e6c7e151Schristos	PR ld/20968
317*e6c7e151Schristos	PR ld/20908
318*e6c7e151Schristos	* elflink.c (bfd_elf_final_link): Revert 2016-12-02 change.  Move
319*e6c7e151Schristos	reloc counting code later after ELF flavour test.
320*e6c7e151Schristos
321*e6c7e151Schristos2016-12-14  Maciej W. Rozycki  <macro@imgtec.com>
322*e6c7e151Schristos
323*e6c7e151Schristos	* bfd-in.h (elf_internal_abiflags_v0): New struct declaration.
324*e6c7e151Schristos	(bfd_mips_elf_get_abiflags): New prototype.
325*e6c7e151Schristos	* elfxx-mips.c (bfd_mips_elf_get_abiflags): New function.
326*e6c7e151Schristos	* bfd-in2.h: Regenerate.
327*e6c7e151Schristos
328*e6c7e151Schristos2016-12-14  Yury Norov <ynorov@caviumnetworks.com>
329*e6c7e151Schristos
330*e6c7e151Schristos         * bfd/elfnn-aarch64.c: fix TLS relaxations for ilp32 where
331*e6c7e151Schristos         TCB_SIZE is used.
332*e6c7e151Schristos
333*e6c7e151Schristos2016-12-13  Alan Modra  <amodra@gmail.com>
334*e6c7e151Schristos
335*e6c7e151Schristos	* elf64-hppa.c (elf64_hppa_modify_segment_map): Don't add PHDR
336*e6c7e151Schristos	for objcopy/strip or when a ld script specifies PHDRS.
337*e6c7e151Schristos
338*e6c7e151Schristos2016-12-13  Alan Modra  <amodra@gmail.com>
339*e6c7e151Schristos
340*e6c7e151Schristos	* elf32-rx.c (elf32_rx_modify_program_headers): Don't adjust
341*e6c7e151Schristos	segments that include the ELF file header or program headers.
342*e6c7e151Schristos
343*e6c7e151Schristos2016-12-08  Alan Modra  <amodra@gmail.com>
344*e6c7e151Schristos
345*e6c7e151Schristos	PR ld/20932
346*e6c7e151Schristos	* elflink.c (bfd_elf_record_link_assignment): Handle warning symbols.
347*e6c7e151Schristos
348*e6c7e151Schristos2016-12-07  Nick Clifton  <nickc@redhat.com>
349*e6c7e151Schristos
350*e6c7e151Schristos	PR ld/20932
351*e6c7e151Schristos	* elflink.c (bfd_elf_record_link_assignment): Replace call to
352*e6c7e151Schristos	abort with an error message and error return value.
353*e6c7e151Schristos
354*e6c7e151Schristos2016-12-06  Nick Clifton  <nickc@redhat.com>
355*e6c7e151Schristos
356*e6c7e151Schristos	PR binutils/20931
357*e6c7e151Schristos	* elf.c (copy_special_section_fields): Check for an invalid
358*e6c7e151Schristos	sh_link field before attempting to follow it.
359*e6c7e151Schristos
360*e6c7e151Schristos	PR binutils/20929
361*e6c7e151Schristos	* aoutx.h (squirt_out_relocs): Check for relocs without an
362*e6c7e151Schristos	associated symbol.
363*e6c7e151Schristos
364*e6c7e151Schristos2016-12-06  Alan Modra  <amodra@gmail.com>
365*e6c7e151Schristos
366*e6c7e151Schristos	* elf64-ppc.c (ok_lo_toc_insn): Add r_type param.  Recognize
367*e6c7e151Schristos	lq,lfq,lxv,lxsd,lxssp,lfdp,stq,stfq,stxv,stxsd,stxssp,stfdp.
368*e6c7e151Schristos	Don't match lmd and stmd.
369*e6c7e151Schristos
370*e6c7e151Schristos2016-12-05  Alyssa Milburn <amilburn@zall.org>
371*e6c7e151Schristos
372*e6c7e151Schristos	* elfxx-sparc.c: Do not stop processing relocations after
373*e6c7e151Schristos	partially relaxing a call with WDISP30.
374*e6c7e151Schristos
375*e6c7e151Schristos2016-12-05  Nick Clifton  <nickc@redhat.com>
376*e6c7e151Schristos
377*e6c7e151Schristos	PR binutils/20905
378*e6c7e151Schristos	* peicode.h (pe_ILF_object_p): Use strnlen to avoid running over
379*e6c7e151Schristos	the end of the string buffer.
380*e6c7e151Schristos
381*e6c7e151Schristos	PR binutils/20907
382*e6c7e151Schristos	* peicode.h (pe_ILF_build_a_bfd): Replace abort with error return.
383*e6c7e151Schristos
384*e6c7e151Schristos	PR binutils/20921
385*e6c7e151Schristos	* aoutx.h (squirt_out_relocs): Check for and report any relocs
386*e6c7e151Schristos	that could not be recognised.
387*e6c7e151Schristos
388*e6c7e151Schristos	PR binutils/20922
389*e6c7e151Schristos	* elf.c (find_link): Check for null headers before attempting to
390*e6c7e151Schristos	match them.
391*e6c7e151Schristos
392*e6c7e151Schristos	PR ld/20925
393*e6c7e151Schristos	* aoutx.h (aout_link_add_symbols): Replace BFD_ASSERT with return
394*e6c7e151Schristos	FALSE.
395*e6c7e151Schristos
396*e6c7e151Schristos	PR ld/20924
397*e6c7e151Schristos	(aout_link_add_symbols): Fix off by one error checking for
398*e6c7e151Schristos	overflow of string offset.
399*e6c7e151Schristos
400*e6c7e151Schristos2016-12-03  Alan Modra  <amodra@gmail.com>
401*e6c7e151Schristos
402*e6c7e151Schristos	* elf64-ppc.c (struct ppc_link_hash_entry): Delete "was_undefined".
403*e6c7e151Schristos	(struct ppc_link_hash_table): Delete "twiddled_syms".  Add
404*e6c7e151Schristos	"need_func_desc_adj".
405*e6c7e151Schristos	(lookup_fdh): Link direct fdh sym via oh field and set flags.
406*e6c7e151Schristos	(make_fdh): Make strong and weak undefined function descriptor
407*e6c7e151Schristos	symbols.
408*e6c7e151Schristos	(ppc64_elf_merge_symbol): New function.
409*e6c7e151Schristos	(elf_backend_merge_symbol): Define.
410*e6c7e151Schristos	(ppc64_elf_archive_symbol_lookup): Don't test undefweak for fake
411*e6c7e151Schristos	function descriptors.
412*e6c7e151Schristos	(add_symbol_adjust): Don't twiddle symbols to undefweak.
413*e6c7e151Schristos	Propagate more ref flags to function descriptor symbol.  Make
414*e6c7e151Schristos	some function descriptor symbols dynamic.
415*e6c7e151Schristos	(ppc64_elf_before_check_relocs): Only run add_symbol_adjust for
416*e6c7e151Schristos	ELFv1.  Set need_func_desc_adj.  Don't fix undefs list.
417*e6c7e151Schristos	(ppc64_elf_check_relocs): Set non_ir_ref for descriptors.
418*e6c7e151Schristos	Don't call lookup_fdh here.
419*e6c7e151Schristos	(ppc64_elf_gc_sections): New function.
420*e6c7e151Schristos	(bfd_elf64_bfd_gc_sections): Define.
421*e6c7e151Schristos	(ppc64_elf_gc_mark_hook): Mark descriptor.
422*e6c7e151Schristos	(func_desc_adjust): Don't make fake function descriptor syms strong
423*e6c7e151Schristos	here.  Exit earlier on non-dotsyms.  Take note of elf.dynamic
424*e6c7e151Schristos	flag when deciding whether a dynamic function descriptor might
425*e6c7e151Schristos	be needed.  Transfer elf.dynamic and set elf.needs_plt.  Move
426*e6c7e151Schristos	plt regardless of visibility.  Make descriptor dynamic if
427*e6c7e151Schristos	entry sym is dynamic, not for other cases.
428*e6c7e151Schristos	(ppc64_elf_func_desc_adjust): Don't run func_desc_adjust if
429*e6c7e151Schristos	already done.
430*e6c7e151Schristos	(ppc64_elf_edit_opd): Use oh field rather than lookup_fdh.
431*e6c7e151Schristos	(ppc64_elf_size_stubs): Likewise.
432*e6c7e151Schristos	(ppc_build_one_stub): Don't clear was_undefined.  Only set sym
433*e6c7e151Schristos	undefweak if stub symbol is defined.
434*e6c7e151Schristos	(undo_symbol_twiddle, ppc64_elf_restore_symbols): Delete.
435*e6c7e151Schristos	* elf64-ppc.h (ppc64_elf_restore_symbols): Don't declare.
436*e6c7e151Schristos
437*e6c7e151Schristos2016-12-03  Alan Modra  <amodra@gmail.com>
438*e6c7e151Schristos
439*e6c7e151Schristos	* elf64-ppc.c (ppc64_elf_hide_symbol): Access hash table as
440*e6c7e151Schristos	elf_link_hash_table rather than ppc_link_hash_table.
441*e6c7e151Schristos
442*e6c7e151Schristos2016-12-03  Alan Modra  <amodra@gmail.com>
443*e6c7e151Schristos
444*e6c7e151Schristos	* elf64-ppc.c (add_symbol_adjust): Delete dead code.
445*e6c7e151Schristos
446*e6c7e151Schristos2016-12-03  Alan Modra  <amodra@gmail.com>
447*e6c7e151Schristos
448*e6c7e151Schristos	* elf64-ppc.c (add_symbol_adjust): Correct order of tests for
449*e6c7e151Schristos	warning and indirect symbols.
450*e6c7e151Schristos
451*e6c7e151Schristos2016-12-03  Alan Modra  <amodra@gmail.com>
452*e6c7e151Schristos
453*e6c7e151Schristos	* elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy dynamic
454*e6c7e151Schristos	flags when direct symbol is versioned_hidden.
455*e6c7e151Schristos
456*e6c7e151Schristos2016-12-02  Nick Clifton  <nickc@redhat.com>
457*e6c7e151Schristos
458*e6c7e151Schristos	PR ld/20908
459*e6c7e151Schristos	* elflink.c (bfd_elf_final_link): Check for ELF flavour binaries
460*e6c7e151Schristos	when following indirect links.
461*e6c7e151Schristos
462*e6c7e151Schristos	PR ld/20909
463*e6c7e151Schristos	* aoutx.h (aout_link_add_symbols): Fix off-by-one error in check
464*e6c7e151Schristos	for an illegal string offset.
465*e6c7e151Schristos
466*e6c7e151Schristos2016-12-02  Gary Benson  <gbenson@redhat.com>
467*e6c7e151Schristos
468*e6c7e151Schristos	* elf.c (_bfd_elf_make_section_from_shdr): Pass offset to
469*e6c7e151Schristos	elf_parse_notes.
470*e6c7e151Schristos
471*e6c7e151Schristos2016-12-02  Josh Conner  <joshconner@google.com>
472*e6c7e151Schristos
473*e6c7e151Schristos	* config.bfd: Add support for fuchsia (OS).
474*e6c7e151Schristos
475*e6c7e151Schristos2016-12-01  Yury Norov  <ynorov@caviumnetworks.com>
476*e6c7e151Schristos
477*e6c7e151Schristos	PR ld/20868
478*e6c7e151Schristos	* elfnn-aarch64.c (elfNN_aarch64_tls_relax): Use 32-bit accesses
479*e6c7e151Schristos	to the GOT when operating in 32-bit mode.
480*e6c7e151Schristos
481*e6c7e151Schristos2016-12-01  Ma Jiang  <ma.jiang@zte.com.cn>
482*e6c7e151Schristos
483*e6c7e151Schristos	PR ld/16720
484*e6c7e151Schristos	* elfxx-mips.c (mips_elf_calculate_relocation): Remove overflow
485*e6c7e151Schristos	test for HI16 relocs.
486*e6c7e151Schristos
487*e6c7e151Schristos2016-12-01  Nick Clifton  <nickc@redhat.com>
488*e6c7e151Schristos
489*e6c7e151Schristos	PR binutils/20891
490*e6c7e151Schristos	* aoutx.h (find_nearest_line): Handle the case where the main file
491*e6c7e151Schristos	name and the directory name are both empty.
492*e6c7e151Schristos
493*e6c7e151Schristos	PR binutils/20892
494*e6c7e151Schristos	* aoutx.h (find_nearest_line): Handle the case where the function
495*e6c7e151Schristos	name is empty.
496*e6c7e151Schristos
497*e6c7e151Schristos2016-11-30  Alan Modra  <amodra@gmail.com>
498*e6c7e151Schristos
499*e6c7e151Schristos	* elf.c (get_program_header_size): Revert accidental change.
500*e6c7e151Schristos
501*e6c7e151Schristos2016-11-30  Alan Modra  <amodra@gmail.com>
502*e6c7e151Schristos
503*e6c7e151Schristos	PR ld/20886
504*e6c7e151Schristos	* elf64-ppc.c (ppc64_elf_size_stubs): Make rawsize max size seen
505*e6c7e151Schristos	on any pass past STUB_SHRINK_ITER.
506*e6c7e151Schristos
507*e6c7e151Schristos2016-11-28  H.J. Lu  <hongjiu.lu@intel.com>
508*e6c7e151Schristos
509*e6c7e151Schristos	* elflink.c (_bfd_elf_fix_symbol_flags): Hide hidden versioned
510*e6c7e151Schristos	symbol in executable.
511*e6c7e151Schristos	(elf_link_output_extsym): Don't change bind from global to
512*e6c7e151Schristos	local when linking executable.
513*e6c7e151Schristos
514*e6c7e151Schristos2016-11-28  Nick Clifton  <nickc@redhat.com>
515*e6c7e151Schristos
516*e6c7e151Schristos	PR ld/20815
517*e6c7e151Schristos	* elf.c (phdr_sorter): Delete.
518*e6c7e151Schristos	(assign_file_positions_except_relocs): Do not sort program
519*e6c7e151Schristos	headers.
520*e6c7e151Schristos
521*e6c7e151Schristos2016-11-25  Jon Turney  <jon.turney@dronecode.org.uk>
522*e6c7e151Schristos
523*e6c7e151Schristos	PR ld/20193
524*e6c7e151Schristos	* peXXigen.c (rsrc_process_section): Do not shrink the merged
525*e6c7e151Schristos	.rsrc section.
526*e6c7e151Schristos
527*e6c7e151Schristos2016-11-24  Jiong Wang  <jiong.wang@arm.com>
528*e6c7e151Schristos
529*e6c7e151Schristos	PR target/20737
530*e6c7e151Schristos	* elf32-arm.c (elf32_arm_final_link_relocate): Bind defined symbol
531*e6c7e151Schristos	locally in PIE.
532*e6c7e151Schristos
533*e6c7e151Schristos2016-11-24  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
534*e6c7e151Schristos
535*e6c7e151Schristos	* bfd/elfxx-riscv.c (howto_table): Fix bitsize of R_RISCV_ADD8.
536*e6c7e151Schristos
537*e6c7e151Schristos2016-11-23  Nick Clifton  <nickc@redhat.com>
538*e6c7e151Schristos
539*e6c7e151Schristos	PR ld/20815
540*e6c7e151Schristos	* elf.c (elf_modify_segment_map): Allow empty LOAD segments if
541*e6c7e151Schristos	they contain the program headers.
542*e6c7e151Schristos	(_bfd_elf_map_sections_to_segments): If the linker created the
543*e6c7e151Schristos	PHDR segment then always attempt to include it in a LOAD segment.
544*e6c7e151Schristos	(assign_file_positions_for_non_load_sections): Allow LOAD segments
545*e6c7e151Schristos	to overlap PHDR segments.
546*e6c7e151Schristos	(phdr_sorter): New function.  Sorts program headers.
547*e6c7e151Schristos	(assign_file_positions_except_relocs): Sort the program headers
548*e6c7e151Schristos	before writing them out.  Issue an error if the PHDR segment is
549*e6c7e151Schristos	not covered by a LOAD segment, unless the backend allows it.
550*e6c7e151Schristos	* elf-bfd.h (struct elf_backend_data): Add
551*e6c7e151Schristos	elf_backend_allow_non_load_phdr.
552*e6c7e151Schristos	* elfxx-target.h (elf_backend_allow_non_load_phdr): Provide
553*e6c7e151Schristos	default definition that returns FALSE.
554*e6c7e151Schristos	(elfNN_bed): Initialise the elf_backend_allow_non_load_phdr
555*e6c7e151Schristos	field.
556*e6c7e151Schristos	* elf64-hppa.c (elf64_hppa_allow_non_load_phdr): New function.
557*e6c7e151Schristos	Returns TRUE.
558*e6c7e151Schristos	(elf_backend_allow_non_load_phdr): Define.
559*e6c7e151Schristos	* elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Do not
560*e6c7e151Schristos	place the interpreter string into the .interp section if the
561*e6c7e151Schristos	nointerp flag is set in the link info structure.
562*e6c7e151Schristos	* elf32-arc.c (elf_arc_size_dynamic_sections): Likewise.
563*e6c7e151Schristos	* elf32-score7.c (score_elf_final_link_relocate): Allow for the
564*e6c7e151Schristos	_gp symbol not being part of the output.
565*e6c7e151Schristos
566*e6c7e151Schristos2016-11-23  Alan Modra  <amodra@gmail.com>
567*e6c7e151Schristos
568*e6c7e151Schristos	* elf-bfd.h (struct elf_backend_data): Add dtrel_excludes_plt.
569*e6c7e151Schristos	* elfxx-target.h (elf_backend_dtrel_excludes_plt): Define.
570*e6c7e151Schristos	(elfNN_bed): Init new field.
571*e6c7e151Schristos	* elflink.c (bfd_elf_final_link): Add and use htab variable.  Handle
572*e6c7e151Schristos	dtrel_excludes_plt.
573*e6c7e151Schristos	* elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_sections): Delete
574*e6c7e151Schristos	DT_RELASZ code.
575*e6c7e151Schristos	(elf_backend_dtrel_excludes_plt): Define.
576*e6c7e151Schristos	* elf32-arc.c (elf_arc_finish_dynamic_sections): Delete DT_RELASZ code.
577*e6c7e151Schristos	(elf_backend_dtrel_excludes_plt): Define.
578*e6c7e151Schristos	* elf32-arm.c (elf32_arm_finish_dynamic_sections): Delete code
579*e6c7e151Schristos	subtracting off plt relocs from DT_RELSZ, DT_RELASZ.
580*e6c7e151Schristos	(elf_backend_dtrel_excludes_plt): Define.
581*e6c7e151Schristos	* elf32-cr16.c (_bfd_cr16_elf_finish_dynamic_sections): Delete
582*e6c7e151Schristos	DT_RELASZ code.
583*e6c7e151Schristos	(elf_backend_dtrel_excludes_plt): Define.
584*e6c7e151Schristos	* elf32-cris.c (elf_cris_finish_dynamic_sections): Delete DT_RELASZ
585*e6c7e151Schristos	code.
586*e6c7e151Schristos	(elf_backend_dtrel_excludes_plt): Define.
587*e6c7e151Schristos	* elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Delete DT_RELASZ
588*e6c7e151Schristos	and DT_RELA code.
589*e6c7e151Schristos	(elf_backend_dtrel_excludes_plt): Define.
590*e6c7e151Schristos	* elf32-i386.c (elf_i386_finish_dynamic_sections): Delete DT_RELSZ
591*e6c7e151Schristos	and DT_REL code.
592*e6c7e151Schristos	(elf_backend_dtrel_excludes_plt): Define.
593*e6c7e151Schristos	* elf32-lm32.c (lm32_elf_finish_dynamic_sections): Delete DT_RELASZ
594*e6c7e151Schristos	code.
595*e6c7e151Schristos	(elf_backend_dtrel_excludes_plt): Define.
596*e6c7e151Schristos	* elf32-m32r.c (m32r_elf_finish_dynamic_sections): Delete DT_RELASZ
597*e6c7e151Schristos	code.
598*e6c7e151Schristos	(elf_backend_dtrel_excludes_plt): Define.
599*e6c7e151Schristos	* elf32-m68k.c (elf_m68k_finish_dynamic_sections): Delete DT_RELASZ
600*e6c7e151Schristos	code.
601*e6c7e151Schristos	(elf_backend_dtrel_excludes_plt): Define.
602*e6c7e151Schristos	* elf32-metag.c (elf_metag_finish_dynamic_sections): Delete DT_RELASZ
603*e6c7e151Schristos	and DT_RELA code.
604*e6c7e151Schristos	(elf_backend_dtrel_excludes_plt): Define.
605*e6c7e151Schristos	* elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Delete
606*e6c7e151Schristos	DT_RELASZ and DT_RELA code.  Use ELF htab shortcuts for other
607*e6c7e151Schristos	dynamic sections.
608*e6c7e151Schristos	(elf_backend_dtrel_excludes_plt): Define.
609*e6c7e151Schristos	* elf32-mips.c (elf_backend_dtrel_excludes_plt): Define.
610*e6c7e151Schristos	* elf32-nds32.c (nds32_elf_finish_dynamic_sections): Delete DT_RELASZ
611*e6c7e151Schristos	code.
612*e6c7e151Schristos	(elf_backend_dtrel_excludes_plt): Define.
613*e6c7e151Schristos	* elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Delete DT_RELASZ
614*e6c7e151Schristos	code.
615*e6c7e151Schristos	(elf_backend_dtrel_excludes_plt): Define.
616*e6c7e151Schristos	* elf32-or1k.c (or1k_elf_finish_dynamic_sections): Delete DT_RELASZ
617*e6c7e151Schristos	code.
618*e6c7e151Schristos	(elf_backend_dtrel_excludes_plt): Define.
619*e6c7e151Schristos	* elf32-ppc.c (ppc_elf_finish_dynamic_sections): Delete DT_RELASZ
620*e6c7e151Schristos	code.
621*e6c7e151Schristos	(elf_backend_dtrel_excludes_plt): Define.
622*e6c7e151Schristos	* elf32-sh.c (sh_elf_finish_dynamic_sections): Delete DT_RELASZ
623*e6c7e151Schristos	code.
624*e6c7e151Schristos	(elf_backend_dtrel_excludes_plt): Define.
625*e6c7e151Schristos	* elf32-sparc.c (elf_backend_dtrel_excludes_plt): Define.
626*e6c7e151Schristos	* elf32-vax.c (elf_vax_finish_dynamic_sections): Delete DT_RELASZ
627*e6c7e151Schristos	code.
628*e6c7e151Schristos	(elf_backend_dtrel_excludes_plt): Define.
629*e6c7e151Schristos	* elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Delete DT_RELASZ
630*e6c7e151Schristos	code.
631*e6c7e151Schristos	(elf_backend_dtrel_excludes_plt): Define.
632*e6c7e151Schristos	* elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Delete DT_RELASZ
633*e6c7e151Schristos	code.
634*e6c7e151Schristos	(elf_backend_dtrel_excludes_plt): Define.
635*e6c7e151Schristos	* elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Delete DT_RELASZ
636*e6c7e151Schristos	and DT_RELA code.
637*e6c7e151Schristos	(elf_backend_dtrel_excludes_plt): Define.
638*e6c7e151Schristos	* elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Delete DT_RELASZ
639*e6c7e151Schristos	code.
640*e6c7e151Schristos	(elf_backend_dtrel_excludes_plt): Define.
641*e6c7e151Schristos	* elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Delete DT_RELASZ
642*e6c7e151Schristos	code.
643*e6c7e151Schristos	(elf_backend_dtrel_excludes_plt): Define.
644*e6c7e151Schristos	* elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_sections): Delete
645*e6c7e151Schristos	DT_RELASZ code.
646*e6c7e151Schristos	(elf_backend_dtrel_excludes_plt): Define.
647*e6c7e151Schristos	* elfnn-ia64.c (elfNN_ia64_finish_dynamic_sections): Delete DT_RELASZ
648*e6c7e151Schristos	code.
649*e6c7e151Schristos	(elf_backend_dtrel_excludes_plt): Define.
650*e6c7e151Schristos	* elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Delete
651*e6c7e151Schristos	DT_RELASZ code.
652*e6c7e151Schristos	* elfxx-sparc.c (sparc_finish_dyn): Delete DT_RELASZ code.
653*e6c7e151Schristos
654*e6c7e151Schristos2016-11-23  Alan Modra  <amodra@gmail.com>
655*e6c7e151Schristos
656*e6c7e151Schristos	* elf-m10300.c (mn10300_elf_check_relocs): Use elf htab shortcuts
657*e6c7e151Schristos	to dynamic sections.
658*e6c7e151Schristos	(mn10300_elf_final_link_relocate): Likewise.
659*e6c7e151Schristos	(_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
660*e6c7e151Schristos	(_bfd_mn10300_elf_size_dynamic_sections): Likewise.
661*e6c7e151Schristos	(_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
662*e6c7e151Schristos	(_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
663*e6c7e151Schristos	* elf32-bfin.c (bfin_check_relocs): Likewise.
664*e6c7e151Schristos	(bfin_relocate_section): Likewise.
665*e6c7e151Schristos	(bfin_gc_sweep_hook): Likewise.
666*e6c7e151Schristos	(struct bfinfdpic_elf_link_hash_table): Delete sgot, sgotrel, splt
667*e6c7e151Schristos	and spltrel.
668*e6c7e151Schristos	(bfinfdpic_got_section, bfinfdpic_gotrel_section,
669*e6c7e151Schristos	bfinfdpic_plt_section, bfinfdpic_pltrel_section): Define using elf
670*e6c7e151Schristos	shortcut sections.
671*e6c7e151Schristos	(_bfin_create_got_section): Use elf htab shortcuts to dyn sections.
672*e6c7e151Schristos	Delete dead code.
673*e6c7e151Schristos	(bfin_finish_dynamic_symbol): Use elf htab shortcuts to dyn sections.
674*e6c7e151Schristos	(bfin_size_dynamic_sections): Likewise.
675*e6c7e151Schristos	* elf32-cr16.c (_bfd_cr16_elf_create_got_section): Likewise.
676*e6c7e151Schristos	(cr16_elf_check_relocs): Likewise.
677*e6c7e151Schristos	(cr16_elf_final_link_relocate): Likewise.
678*e6c7e151Schristos	(_bfd_cr16_elf_create_dynamic_sections): Likewise.
679*e6c7e151Schristos	(_bfd_cr16_elf_adjust_dynamic_symbol): Likewise.
680*e6c7e151Schristos	(_bfd_cr16_elf_size_dynamic_sections): Likewise.
681*e6c7e151Schristos	(_bfd_cr16_elf_finish_dynamic_symbol): Likewise.
682*e6c7e151Schristos	(_bfd_cr16_elf_finish_dynamic_sections): Likewise.
683*e6c7e151Schristos	* elf32-cris.c (cris_elf_relocate_section): Likewise.
684*e6c7e151Schristos	(elf_cris_finish_dynamic_symbol): Likewise.
685*e6c7e151Schristos	(elf_cris_finish_dynamic_sections): Likewise.
686*e6c7e151Schristos	(cris_elf_gc_sweep_hook): Likewise.
687*e6c7e151Schristos	(elf_cris_adjust_gotplt_to_got): Likewise.
688*e6c7e151Schristos	(elf_cris_adjust_dynamic_symbol): Likewise.
689*e6c7e151Schristos	(cris_elf_check_relocs): Likewise.  Delete dead code.
690*e6c7e151Schristos	(elf_cris_size_dynamic_sections): Use elf htab shortcuts to dynamic
691*e6c7e151Schristos	sections.
692*e6c7e151Schristos	(elf_cris_discard_excess_program_dynamics): Likewise.
693*e6c7e151Schristos	* elf32-frv.c (struct frvfdpic_elf_link_hash_table): Delete sgot,
694*e6c7e151Schristos	sgotrel, splt and spltrel.
695*e6c7e151Schristos	(frvfdpic_got_section, frvfdpic_gotrel_section,
696*e6c7e151Schristos	frvfdpic_plt_section, frvfdpic_pltrel_section): Define using elf
697*e6c7e151Schristos	shortcut sections.
698*e6c7e151Schristos	(_frv_create_got_section): Likewise.
699*e6c7e151Schristos	* elf32-hppa.c (struct elf32_hppa_link_hash_table): Delete sgot,
700*e6c7e151Schristos	srelgot, splt and srelplt.
701*e6c7e151Schristos	(hppa_build_one_stub): Use elf htab shortcuts to dynamic sections.
702*e6c7e151Schristos	(elf32_hppa_create_dynamic_sections): Likewise.
703*e6c7e151Schristos	(elf32_hppa_check_relocs): Likewise.
704*e6c7e151Schristos	(allocate_plt_static): Likewise.
705*e6c7e151Schristos	(allocate_dynrelocs): Likewise.
706*e6c7e151Schristos	(elf32_hppa_size_dynamic_sections): Likewise.
707*e6c7e151Schristos	(elf32_hppa_relocate_section): Likewise.
708*e6c7e151Schristos	(elf32_hppa_finish_dynamic_symbol): Likewise.
709*e6c7e151Schristos	(elf32_hppa_finish_dynamic_sections): Likewise.
710*e6c7e151Schristos	* elf32-i370.c (i370_elf_finish_dynamic_sections): Likewise.
711*e6c7e151Schristos	* elf32-lm32.c (struct elf_lm32_link_hash_table): Delete sgot,
712*e6c7e151Schristos	sgotplt, srelgot, splt and srelplt.
713*e6c7e151Schristos	(lm32fdpic_got_section, lm32fdpic_gotrel_section): Define using elf
714*e6c7e151Schristos	shortcut sections.
715*e6c7e151Schristos	(create_got_section): Delete.  Use _bfd_elf_create_got_section instead.
716*e6c7e151Schristos	(lm32_elf_relocate_section): Use elf htab shortcuts to dyn sections.
717*e6c7e151Schristos	(lm32_elf_check_relocs): Likewise.
718*e6c7e151Schristos	(lm32_elf_finish_dynamic_sections): Likewise.
719*e6c7e151Schristos	(lm32_elf_finish_dynamic_symbol): Likewise.
720*e6c7e151Schristos	(allocate_dynrelocs): Likewise.
721*e6c7e151Schristos	(lm32_elf_size_dynamic_sections): Likewise.
722*e6c7e151Schristos	(lm32_elf_create_dynamic_sections): Likewise.
723*e6c7e151Schristos	* elf32-m32c.c (m32c_elf_relocate_section): Likewise.
724*e6c7e151Schristos	(m32c_elf_check_relocs): Likewise.
725*e6c7e151Schristos	(m32c_elf_finish_dynamic_sections): Likewise.
726*e6c7e151Schristos	(m32c_elf_always_size_sections): Likewise.
727*e6c7e151Schristos	* elf32-m32r.c (struct elf_m32r_link_hash_table): Delete sgot,
728*e6c7e151Schristos	sgotplt, srelgot, splt and srelplt.
729*e6c7e151Schristos	(create_got_section): Delete.  Use _bfd_elf_create_got_section instead.
730*e6c7e151Schristos	(m32r_elf_create_dynamic_sections): Use elf htab shortcuts to dynamic
731*e6c7e151Schristos	sections.
732*e6c7e151Schristos	(allocate_dynrelocs): Likewise.
733*e6c7e151Schristos	(m32r_elf_size_dynamic_sections): Likewise.
734*e6c7e151Schristos	(m32r_elf_relocate_section): Likewise.
735*e6c7e151Schristos	(m32r_elf_finish_dynamic_symbol): Likewise.
736*e6c7e151Schristos	(m32r_elf_finish_dynamic_sections): Likewise.
737*e6c7e151Schristos	(m32r_elf_check_relocs): Likewise.
738*e6c7e151Schristos	* elf32-m68k.c (elf_m68k_partition_multi_got): Likewise.
739*e6c7e151Schristos	(elf_m68k_check_relocs): Likewise.
740*e6c7e151Schristos	(elf_m68k_adjust_dynamic_symbol): Likewise.
741*e6c7e151Schristos	(elf_m68k_size_dynamic_sections): Likewise.
742*e6c7e151Schristos	(elf_m68k_relocate_section): Likewise.
743*e6c7e151Schristos	(elf_m68k_finish_dynamic_symbol): Likewise.
744*e6c7e151Schristos	(elf_m68k_finish_dynamic_sections): Likewise.
745*e6c7e151Schristos	* elf32-metag.c (struct elf_metag_link_hash_table): Delete sgot,
746*e6c7e151Schristos	sgotplt, srelgot, splt and srelplt.
747*e6c7e151Schristos	(elf_metag_relocate_section): Use elf htab shortcuts to dynamic
748*e6c7e151Schristos	sections.
749*e6c7e151Schristos	(elf_metag_create_dynamic_sections): Likewise.  Allocate got header
750*e6c7e151Schristos	here in .got.
751*e6c7e151Schristos	(elf_metag_check_relocs): Use elf htab shortcuts to dynamic sections.
752*e6c7e151Schristos	(allocate_dynrelocs): Likewise.
753*e6c7e151Schristos	(elf_metag_size_dynamic_sections): Likewise.
754*e6c7e151Schristos	(elf_metag_finish_dynamic_symbol): Likewise.
755*e6c7e151Schristos	(elf_metag_finish_dynamic_sections): Likewise.
756*e6c7e151Schristos	(elf_metag_size_stubs): Likewise.
757*e6c7e151Schristos	(elf_backend_got_header_size): Don't define.
758*e6c7e151Schristos	(elf_backend_want_got_plt): Define.
759*e6c7e151Schristos	* elf32-microblaze.c (struct elf32_mb_link_hash_table): Delete sgot,
760*e6c7e151Schristos	sgotplt, srelgot, splt and srelpl.
761*e6c7e151Schristos	(microblaze_elf_relocate_section): Use elf htab shortcuts to dynamic
762*e6c7e151Schristos	sections.
763*e6c7e151Schristos	(create_got_section): Delete.  Use _bfd_elf_create_got_section instead.
764*e6c7e151Schristos	(microblaze_elf_check_relocs): Use elf htab shortcuts to dyn sections.
765*e6c7e151Schristos	(microblaze_elf_create_dynamic_sections): Likewise.
766*e6c7e151Schristos	(allocate_dynrelocs): Likewise.
767*e6c7e151Schristos	(microblaze_elf_size_dynamic_sections): Likewise.
768*e6c7e151Schristos	(microblaze_elf_finish_dynamic_symbol): Likewise.
769*e6c7e151Schristos	(microblaze_elf_finish_dynamic_sections): Likewise.
770*e6c7e151Schristos	* elf32-nds32.c (nds32_elf_link_hash_table_create): Don't NULL
771*e6c7e151Schristos	already zero fields.
772*e6c7e151Schristos	(create_got_section): Delete.  Use _bfd_elf_create_got_section instead.
773*e6c7e151Schristos	(nds32_elf_create_dynamic_sections): Use elf htab shortcuts to dynamic
774*e6c7e151Schristos	sections.
775*e6c7e151Schristos	(allocate_dynrelocs): Likewise.
776*e6c7e151Schristos	(nds32_elf_size_dynamic_sections): Likewise.
777*e6c7e151Schristos	(nds32_elf_relocate_section): Likewise.
778*e6c7e151Schristos	(nds32_elf_finish_dynamic_symbol): Likewise.
779*e6c7e151Schristos	(nds32_elf_finish_dynamic_sections): Likewise.
780*e6c7e151Schristos	(nds32_elf_check_relocs): Likewise.
781*e6c7e151Schristos	(calculate_plt_memory_address): Likewise.
782*e6c7e151Schristos	(calculate_got_memory_address): Likewise.
783*e6c7e151Schristos	* elf32-nds32.h (struct elf_nds32_link_hash_table): Delete sgot,
784*e6c7e151Schristos	sgotplt, srelgot, splt and srelplt.
785*e6c7e151Schristos	* elf32-or1k.c (struct elf_or1k_link_hash_table): Likewise.
786*e6c7e151Schristos	(or1k_elf_relocate_section): Use elf htab shortcuts to dyn sections.
787*e6c7e151Schristos	(create_got_section): Delete.  Use _bfd_elf_create_got_section instead.
788*e6c7e151Schristos	(or1k_elf_check_relocs): Use elf htab shortcuts to dynamic sections.
789*e6c7e151Schristos	(or1k_elf_finish_dynamic_sections): Likewise.
790*e6c7e151Schristos	(or1k_elf_finish_dynamic_symbol): Likewise.
791*e6c7e151Schristos	(allocate_dynrelocs): Likewise.
792*e6c7e151Schristos	(or1k_elf_size_dynamic_sections): Likewise.
793*e6c7e151Schristos	(or1k_elf_create_dynamic_sections): Likewise.
794*e6c7e151Schristos	* elf32-ppc.c (struct ppc_elf_link_hash_table): Delete got, relgot,
795*e6c7e151Schristos	plt, relplt, iplt, reliplt and sgotplt.
796*e6c7e151Schristos	(ppc_elf_create_got): Use elf htab shortcuts to dynamic sections.
797*e6c7e151Schristos	(ppc_elf_create_glink): Likewise.
798*e6c7e151Schristos	(ppc_elf_create_dynamic_sections): Likewise.
799*e6c7e151Schristos	(ppc_elf_check_relocs): Likewise.
800*e6c7e151Schristos	(ppc_elf_select_plt_layout): Likewise.
801*e6c7e151Schristos	(ppc_elf_tls_setup): Likewise.
802*e6c7e151Schristos	(allocate_got): Likewise.
803*e6c7e151Schristos	(allocate_dynrelocs): Likewise.
804*e6c7e151Schristos	(ppc_elf_size_dynamic_sections): Likewise.
805*e6c7e151Schristos	(ppc_elf_relax_section): Likewise.
806*e6c7e151Schristos	(ppc_elf_relocate_section): Likewise.
807*e6c7e151Schristos	(ppc_elf_finish_dynamic_symbol): Likewise.
808*e6c7e151Schristos	(ppc_elf_reloc_type_class): Likewise.
809*e6c7e151Schristos	(ppc_elf_finish_dynamic_sections): Likewise.
810*e6c7e151Schristos	* elf32-rl78.c (rl78_elf_relocate_section): Likewise.
811*e6c7e151Schristos	(rl78_elf_check_relocs): Likewise.
812*e6c7e151Schristos	(rl78_elf_finish_dynamic_sections): Likewise.
813*e6c7e151Schristos	(rl78_elf_always_size_sections): Likewise.
814*e6c7e151Schristos	* elf32-s390.c 	(create_got_section): Delete.
815*e6c7e151Schristos	(elf_s390_create_dynamic_sections): Use _bfd_elf_create_got_section.
816*e6c7e151Schristos	(elf_s390_check_relocs): Likewise.
817*e6c7e151Schristos	* elf32-score.c (score_elf_create_got_section): Set elf shortcuts.
818*e6c7e151Schristos	(s3_bfd_score_elf_finish_dynamic_sections): Use elf shortcuts.
819*e6c7e151Schristos	* elf32-score7.c (score_elf_create_got_section): As above.
820*e6c7e151Schristos	(s7_bfd_score_elf_finish_dynamic_sections): As above.
821*e6c7e151Schristos	* elf32-sh.c (struct elf_sh_link_hash_table): Delete sgot,
822*e6c7e151Schristos	sgotplt, srelgot, splt and srelplt.
823*e6c7e151Schristos	(create_got_section): Don't set them.
824*e6c7e151Schristos	(sh_elf_create_dynamic_sections): Use elf htab shortcuts to dynamic
825*e6c7e151Schristos	sections.
826*e6c7e151Schristos	(allocate_dynrelocs): Likewise.
827*e6c7e151Schristos	(sh_elf_size_dynamic_sections): Likewise.
828*e6c7e151Schristos	(sh_elf_add_rofixup): Likewise.
829*e6c7e151Schristos	(sh_elf_relocate_section): Likewise.
830*e6c7e151Schristos	(sh_elf_check_relocs): Likewise.
831*e6c7e151Schristos	(sh_elf_finish_dynamic_symbol): Likewise.
832*e6c7e151Schristos	(sh_elf_finish_dynamic_sections): Likewise.
833*e6c7e151Schristos	* elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
834*e6c7e151Schristos	* elf32-tilepro.c (tilepro_elf_create_got_section): Likewise.
835*e6c7e151Schristos	* elf32-vax.c (elf_vax_check_relocs): Likewise.
836*e6c7e151Schristos	(elf_vax_adjust_dynamic_symbol): Likewise.
837*e6c7e151Schristos	(elf_vax_always_size_sections): Likewise.
838*e6c7e151Schristos	(elf_vax_instantiate_got_entries): Likewise.
839*e6c7e151Schristos	(elf_vax_relocate_section): Likewise.
840*e6c7e151Schristos	(elf_vax_finish_dynamic_symbol): Likewise.
841*e6c7e151Schristos	(elf_vax_finish_dynamic_sections): Likewise.
842*e6c7e151Schristos	* elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
843*e6c7e151Schristos	(xstormy16_elf_always_size_sections): Likewise.
844*e6c7e151Schristos	(xstormy16_elf_relocate_section): Likewise.
845*e6c7e151Schristos	(xstormy16_elf_finish_dynamic_sections): Likewise.
846*e6c7e151Schristos	* elf32-xtensa.c (struct elf_xtensa_link_hash_table): Delete sgot,
847*e6c7e151Schristos	sgotplt, srelgot, splt and srelplt.
848*e6c7e151Schristos	(elf_xtensa_create_dynamic_sections): Use elf htab shortcuts to
849*e6c7e151Schristos	dynamic sections.
850*e6c7e151Schristos	(elf_xtensa_allocate_dynrelocs): Likewise.
851*e6c7e151Schristos	(elf_xtensa_allocate_local_got_size): Likewise.
852*e6c7e151Schristos	(elf_xtensa_size_dynamic_sections): Likewise.
853*e6c7e151Schristos	(elf_xtensa_relocate_section): Likewise.
854*e6c7e151Schristos	(elf_xtensa_finish_dynamic_sections): Likewise.
855*e6c7e151Schristos	(shrink_dynamic_reloc_sections): Likewise.
856*e6c7e151Schristos	(elf_xtensa_get_plt_section): Likewise.
857*e6c7e151Schristos	(elf_xtensa_get_gotplt_section): Likewise.
858*e6c7e151Schristos	(xtensa_callback_required_dependence): Likewise.
859*e6c7e151Schristos	* elf64-alpha.c (elf64_alpha_create_dynamic_sections): Set elf htab
860*e6c7e151Schristos	shortcuts to dynamic sections.
861*e6c7e151Schristos	(elf64_alpha_adjust_dynamic_symbol): Use elf htab shortcuts to
862*e6c7e151Schristos	dynamic sections.
863*e6c7e151Schristos	(elf64_alpha_size_plt_section): Likewise.
864*e6c7e151Schristos	(elf64_alpha_size_rela_got_1): Likewise.
865*e6c7e151Schristos	(elf64_alpha_size_rela_got_section): Likewise.
866*e6c7e151Schristos	(elf64_alpha_relocate_section): Likewise.
867*e6c7e151Schristos	(elf64_alpha_finish_dynamic_symbol): Likewise.
868*e6c7e151Schristos	(elf64_alpha_finish_dynamic_sections): Likewise.
869*e6c7e151Schristos	* elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
870*e6c7e151Schristos	* elf64-s390.c (create_got_section): Delete.
871*e6c7e151Schristos	(elf_s390_create_dynamic_sections): Use _bfd_elf_create_got_section.
872*e6c7e151Schristos	(elf_s390_check_relocs): Likewise.
873*e6c7e151Schristos	* elf64-sh64.c (sh_elf64_relocate_section): Use elf htab shortcuts to
874*e6c7e151Schristos	dynamic sections.
875*e6c7e151Schristos	(sh_elf64_check_relocs): Likewise.
876*e6c7e151Schristos	(sh64_elf64_adjust_dynamic_symbol): Likewise.
877*e6c7e151Schristos	(sh64_elf64_size_dynamic_sections): Likewise.
878*e6c7e151Schristos	(sh64_elf64_finish_dynamic_symbol): Likewise.
879*e6c7e151Schristos	(sh64_elf64_finish_dynamic_sections): Likewise.
880*e6c7e151Schristos	* elflink.c (_bfd_elf_create_got_section): Likewise.
881*e6c7e151Schristos	* elfnn-aarch64.c (aarch64_elf_create_got_section): Likewise.
882*e6c7e151Schristos	* elfnn-ia64.c (elfNN_ia64_size_dynamic_sections): Likewise.
883*e6c7e151Schristos	(elfNN_ia64_finish_dynamic_sections): Likewise.
884*e6c7e151Schristos	* elfnn-riscv.c (riscv_elf_create_got_section): Likewise.
885*e6c7e151Schristos	* elfxx-mips.c (struct mips_elf_link_hash_table): Delete srellt,
886*e6c7e151Schristos	sgotplt, splt and sgot.
887*e6c7e151Schristos	(mips_elf_initialize_tls_slots): Use elf htab shortcuts to dynamic
888*e6c7e151Schristos	sections.
889*e6c7e151Schristos	(mips_elf_gotplt_index): Likewise.
890*e6c7e151Schristos	(mips_elf_primary_global_got_index): Likewise.
891*e6c7e151Schristos	(mips_elf_global_got_index): Likewise.
892*e6c7e151Schristos	(mips_elf_got_offset_from_index): Likewise.
893*e6c7e151Schristos	(mips_elf_create_local_got_entry): Likewise.
894*e6c7e151Schristos	(mips_elf_create_got_section): Likewise.
895*e6c7e151Schristos	(mips_elf_calculate_relocation): Likewise.
896*e6c7e151Schristos	(_bfd_mips_elf_create_dynamic_sections): Likewise.
897*e6c7e151Schristos	(_bfd_mips_elf_adjust_dynamic_symbol): Likewise.
898*e6c7e151Schristos	(mips_elf_lay_out_got): Likewise.
899*e6c7e151Schristos	(mips_elf_set_plt_sym_value): Likewise.
900*e6c7e151Schristos	(_bfd_mips_elf_size_dynamic_sections): Likewise.
901*e6c7e151Schristos	(_bfd_mips_elf_finish_dynamic_symbol): Likewise.
902*e6c7e151Schristos	(_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
903*e6c7e151Schristos	(mips_finish_exec_plt): Likewise.
904*e6c7e151Schristos	(mips_vxworks_finish_exec_plt): Likewise.
905*e6c7e151Schristos	(mips_vxworks_finish_shared_plt): Likewise.
906*e6c7e151Schristos	(_bfd_mips_elf_finish_dynamic_sections): Likewise.
907*e6c7e151Schristos	* elfxx-sparc.c (sparc_finish_dyn): Likewise.
908*e6c7e151Schristos	* elfxx-tilegx.c (tilegx_elf_create_got_section): Likewise.
909*e6c7e151Schristos
910*e6c7e151Schristos2016-11-23  Alan Modra  <amodra@gmail.com>
911*e6c7e151Schristos
912*e6c7e151Schristos	* po/BLD-POTFILES.in: Regenerate.
913*e6c7e151Schristos	* po/SRC-POTFILES.in: Regenerate.
914*e6c7e151Schristos
915*e6c7e151Schristos2016-11-22  Ambrogino Modigliani  <ambrogino.modigliani@gmail.com>
916*e6c7e151Schristos
917*e6c7e151Schristos        * warning.m4: Fix spelling in comments.
918*e6c7e151Schristos        * configure.ac: Fix spelling in comments.
919*e6c7e151Schristos        * configure: Regenerate.
920*e6c7e151Schristos
921*e6c7e151Schristos2016-11-22  Alan Modra  <amodra@gmail.com>
922*e6c7e151Schristos
923*e6c7e151Schristos	PR 20744
924*e6c7e151Schristos	* elf32-ppc.h (struct ppc_elf_params): Add vle_reloc_fixup field.
925*e6c7e151Schristos	* elf32-ppc.c: Include opcode/ppc.h.
926*e6c7e151Schristos	(ppc_elf_howto_raw): Correct dst_mask for R_PPC_VLE_LO16A,
927*e6c7e151Schristos	R_PPC_VLE_LO16D, R_PPC_VLE_HI16A, R_PPC_VLE_HI16D, R_PPC_VLE_HA16A,
928*e6c7e151Schristos	R_PPC_VLE_HA16D, R_PPC_VLE_SDAREL_LO16A, R_PPC_VLE_SDAREL_LO16D,
929*e6c7e151Schristos	R_PPC_VLE_SDAREL_HI16A, R_PPC_VLE_SDAREL_HI16D,
930*e6c7e151Schristos	R_PPC_VLE_SDAREL_HA16A, and R_PPC_VLE_SDAREL_HA16D relocs.
931*e6c7e151Schristos	(ppc_elf_link_hash_table_create): Update default_params init.
932*e6c7e151Schristos	(ppc_elf_vle_split16): Correct shift and mask.  Add params.
933*e6c7e151Schristos	Report or fix insn/reloc mismatches.
934*e6c7e151Schristos	(ppc_elf_relocate_section): Pass input_section, offset and fixup
935*e6c7e151Schristos	to ppc_elf_vle_split16.
936*e6c7e151Schristos
937*e6c7e151Schristos2016-11-22  Alan Modra  <amodra@gmail.com>
938*e6c7e151Schristos
939*e6c7e151Schristos	* elf32-ppc.c (ppc64_elf_relocate_section): Calculate d_offset for
940*e6c7e151Schristos	input_bfd.  Replace occurrences of output_bfd as bfd_get_32 and
941*e6c7e151Schristos	bfd_put_32 param with input_bfd.
942*e6c7e151Schristos	* elf32-ppc.c (ppc_elf_relocate_section): Likewise.  Also
943*e6c7e151Schristos	ppc_elf_vle_split16 param.
944*e6c7e151Schristos	(ppc_elf_vle_split16): Rename output_bfd param to input_bfd.
945*e6c7e151Schristos
946*e6c7e151Schristos2016-11-21  Maciej W. Rozycki  <macro@imgtec.com>
947*e6c7e151Schristos
948*e6c7e151Schristos	* dwarf2.c (build_line_info_table): Rename `index' local
949*e6c7e151Schristos	variable to `line_index'.
950*e6c7e151Schristos	(build_lookup_funcinfo_table): Rename `index' local variable to
951*e6c7e151Schristos	`func_index'.
952*e6c7e151Schristos
953*e6c7e151Schristos2016-11-19  Jose E. Marchesi  <jose.marchesi@oracle.com>
954*e6c7e151Schristos
955*e6c7e151Schristos	* elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Do not
956*e6c7e151Schristos	apply the negative GOT offset optimization in 64-bit code.
957*e6c7e151Schristos
958*e6c7e151Schristos2016-11-18  James Clarke  <jrtc27@jrtc27.com>
959*e6c7e151Schristos
960*e6c7e151Schristos	* elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Don't convert
961*e6c7e151Schristos	R_SPARC_GOTDATA_OP_HIX22 and R_SPARC_GOTDATA_OP_LOX10 to
962*e6c7e151Schristos	R_SPARC_GOT* for non-local references. Instead, treat them like
963*e6c7e151Schristos	R_SPARC_GOTDATA_HIX22/R_SPARC_GOTDATA_LOX10 when filling in the
964*e6c7e151Schristos	immediate with the calculated relocation.
965*e6c7e151Schristos
966*e6c7e151Schristos2016-11-18  Nick Clifton  <nickc@redhat.com>
967*e6c7e151Schristos
968*e6c7e151Schristos	PR ld/20675
969*e6c7e151Schristos	* elf32-metag.c (elf_metag_relocate_section): Replace abort with
970*e6c7e151Schristos	an informative error message.
971*e6c7e151Schristos
972*e6c7e151Schristos2016-11-15  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
973*e6c7e151Schristos
974*e6c7e151Schristos	PR ld/20789
975*e6c7e151Schristos	* bfd/elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Do signed
976*e6c7e151Schristos	manipulation of diff value, and don't assume sym2 is less than sym1.
977*e6c7e151Schristos	(elf32_avr_adjust_reloc_if_spans_insn): New function.
978*e6c7e151Schristos	(elf32_avr_relax_delete_bytes): Use elf32_avr_adjust_diff_reloc_value,
979*e6c7e151Schristos	and remove redundant did_pad.
980*e6c7e151Schristos
981*e6c7e151Schristos
982*e6c7e151Schristos2016-11-14  H.J. Lu  <hongjiu.lu@intel.com>
983*e6c7e151Schristos
984*e6c7e151Schristos	PR ld/20800
985*e6c7e151Schristos	* elf64-x86-64.c (elf_x86_64_relocate_section): Also check
986*e6c7e151Schristos	plt_got.offset for R_X86_64_PLTOFF64.
987*e6c7e151Schristos
988*e6c7e151Schristos2016-11-14  Nick Clifton  <nickc@redhat.com>
989*e6c7e151Schristos
990*e6c7e151Schristos	* coffcode.h (coff_slurp_symbol_table): Fix typo: Faal -> Fall.
991*e6c7e151Schristos
992*e6c7e151Schristos2016-11-11  Luke Allardyce  <lukeallardyce@gmail.com>
993*e6c7e151Schristos
994*e6c7e151Schristos	PR ld/20722
995*e6c7e151Schristos	* coffcode.h (coff_slurp_symbol_table): Accept C_HIDDEN symbols,
996*e6c7e151Schristos	but treat them as debugging symbols.
997*e6c7e151Schristos
998*e6c7e151Schristos2016-11-10  Jiong Wang  <jiong.wang@arm.com>
999*e6c7e151Schristos
1000*e6c7e151Schristos	PR target/20737
1001*e6c7e151Schristos	* elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Bind defined
1002*e6c7e151Schristos	symbol locally in PIE.
1003*e6c7e151Schristos
1004*e6c7e151Schristos2016-11-10  Nick Clifton  <nickc@redhat.com>
1005*e6c7e151Schristos
1006*e6c7e151Schristos	PR binutils/20801
1007*e6c7e151Schristos	* compress.c (bfd_get_full_section_contents): Provide a more
1008*e6c7e151Schristos	helpful error message when a section is too large to load.
1009*e6c7e151Schristos
1010*e6c7e151Schristos2016-11-08  Pedro Alves  <palves@redhat.com>
1011*e6c7e151Schristos
1012*e6c7e151Schristos	* dwarf2.c (struct funcinfo) <is_linkage>: Type is bfd_boolean,
1013*e6c7e151Schristos	not "bfd boolean".
1014*e6c7e151Schristos
1015*e6c7e151Schristos2016-11-08  Igor Tsimbalist  <tigor.tools@gmail.com>
1016*e6c7e151Schristos
1017*e6c7e151Schristos	* dwarf2.c (comp_unit): Add new fields 'lookup_funcinfo_table' and
1018*e6c7e151Schristos	'number_of_functions' to keep lookup table and number of entries in
1019*e6c7e151Schristos	the table.
1020*e6c7e151Schristos	(line_sequence): Add new fields 'line_info_lookup' and 'num_lines'
1021*e6c7e151Schristos	to keep lookup table and number of entries in the table.
1022*e6c7e151Schristos	(lookup_funcinfo): New structure for lookup table for function
1023*e6c7e151Schristos	references.
1024*e6c7e151Schristos	(build_line_info_table): New function to create and build the lookup
1025*e6c7e151Schristos	table for line information.
1026*e6c7e151Schristos	(lookup_address_in_line_info_table): Use the lookup table instead of
1027*e6c7e151Schristos	traverse a linked list.
1028*e6c7e151Schristos	(compare_lookup_funcinfos): New compare fuction used in sorting of
1029*e6c7e151Schristos	lookup table for function references.
1030*e6c7e151Schristos	(build_lookup_funcinfo_table): New function to create, build and
1031*e6c7e151Schristos	sort the lookup table for functions references.
1032*e6c7e151Schristos	(lookup_address_in_function_table): Use the table instead of
1033*e6c7e151Schristos	traverse a linked list.
1034*e6c7e151Schristos	(_bfd_dwarf2_cleanup_debug_info): Free memory from function references
1035*e6c7e151Schristos	lookup table.
1036*e6c7e151Schristos
1037*e6c7e151Schristos2016-11-04  Nick Clifton  <nickc@redhat.com>
1038*e6c7e151Schristos
1039*e6c7e151Schristos	* targets.c (bfd_target_vector): Only add riscv_elf32_vec target
1040*e6c7e151Schristos	when supporting 64-bit BFD targets.
1041*e6c7e151Schristos
1042*e6c7e151Schristos2016-11-03  Tristan Gingold  <gingold@adacore.com>
1043*e6c7e151Schristos
1044*e6c7e151Schristos	* config.bfd: Deprecate many old triplets.
1045*e6c7e151Schristos
1046*e6c7e151Schristos2016-11-03  Nick Clifton  <nickc@redhat.com>
1047*e6c7e151Schristos
1048*e6c7e151Schristos	* po/da.po: Updated Danish translation.
1049*e6c7e151Schristos
1050*e6c7e151Schristos2016-11-01  Maciej W. Rozycki  <macro@imgtec.com>
1051*e6c7e151Schristos
1052*e6c7e151Schristos	* reloc.c (bfd_default_reloc_type_lookup) <BFD_RELOC_CTOR>: Do
1053*e6c7e151Schristos	not fall through to the default case.
1054*e6c7e151Schristos
1055*e6c7e151Schristos2016-11-01  Palmer Dabbelt  <palmer@dabbelt.com>
1056*e6c7e151Schristos	    Andrew Waterman <andrew@sifive.com>
1057*e6c7e151Schristos
1058*e6c7e151Schristos	Add support for RISC-V architecture.
1059*e6c7e151Schristos	* Makefile.am: Add entries for riscv32-elf and riscv64-elf.
1060*e6c7e151Schristos	* config.bdf: Likewise.
1061*e6c7e151Schristos	* configure.ac: Likewise.
1062*e6c7e151Schristos	* Makefile.in: Regenerate.
1063*e6c7e151Schristos	* configure: Regenerate.
1064*e6c7e151Schristos	* archures.c: Add bfd_riscv_arch.
1065*e6c7e151Schristos	* reloc.c: Add riscv relocs.
1066*e6c7e151Schristos	* targets.c: Add riscv_elf32_vec and riscv_elf64_vec.
1067*e6c7e151Schristos	* bfd-in2.h: Regenerate.
1068*e6c7e151Schristos	* libbfd.h: Regenerate.
1069*e6c7e151Schristos	* elf-bfd.h: Add RISCV_ELF_DATA to enum elf_target_id.
1070*e6c7e151Schristos	* elfnn-riscv.c: New file.
1071*e6c7e151Schristos	* elfxx-riscv.c: New file.
1072*e6c7e151Schristos	* elfxx-riscv.h: New file.
1073*e6c7e151Schristos
1074*e6c7e151Schristos2016-10-31  Alan Modra  <amodra@gmail.com>
1075*e6c7e151Schristos
1076*e6c7e151Schristos	PR 20748
1077*e6c7e151Schristos	* elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Revert
1078*e6c7e151Schristos	2016-05-13 change.
1079*e6c7e151Schristos
1080*e6c7e151Schristos2016-10-27  Andrew Burgess  <andrew.burgess@embecosm.com>
1081*e6c7e151Schristos
1082*e6c7e151Schristos	* cpu-arc.c (arc_get_mach): Delete.
1083*e6c7e151Schristos
1084*e6c7e151Schristos2016-10-25  Maciej W. Rozycki  <macro@imgtec.com>
1085*e6c7e151Schristos
1086*e6c7e151Schristos	* elfxx-mips.c (STUB_JALR): Correct description.
1087*e6c7e151Schristos
1088*e6c7e151Schristos2016-10-20  Nick Clifton  <nickc@redhat.com>
1089*e6c7e151Schristos
1090*e6c7e151Schristos	* po/gas.pot: Regenerate.
1091*e6c7e151Schristos
1092*e6c7e151Schristos2016-10-19  Nick Clifton  <nickc@redhat.com>
1093*e6c7e151Schristos
1094*e6c7e151Schristos	* aout-adobe.c: Add missing c-format tags for translatable strings.
1095*e6c7e151Schristos	* aout-cris.c: Likewise.
1096*e6c7e151Schristos	* aoutx.h: Likewise.
1097*e6c7e151Schristos	* bfd.c: Likewise.
1098*e6c7e151Schristos	* binary.c: Likewise.
1099*e6c7e151Schristos	* cache.c: Likewise.
1100*e6c7e151Schristos	* coff-alpha.c: Likewise.
1101*e6c7e151Schristos	* coff-arm.c: Likewise.
1102*e6c7e151Schristos	* coff-i860.c: Likewise.
1103*e6c7e151Schristos	* coff-mcore.c: Likewise.
1104*e6c7e151Schristos	* coff-ppc.c: Likewise.
1105*e6c7e151Schristos	* coff-rs6000.c: Likewise.
1106*e6c7e151Schristos	* coff-sh.c: Likewise.
1107*e6c7e151Schristos	* coff-tic4x.c: Likewise.
1108*e6c7e151Schristos	* coff-tic54x.c: Likewise.
1109*e6c7e151Schristos	* coff-tic80.c: Likewise.
1110*e6c7e151Schristos	* coff64-rs6000.c: Likewise.
1111*e6c7e151Schristos	* coffcode.h: Likewise.
1112*e6c7e151Schristos	* coffgen.c: Likewise.
1113*e6c7e151Schristos	* cofflink.c: Likewise.
1114*e6c7e151Schristos	* coffswap.h: Likewise.
1115*e6c7e151Schristos	* cpu-arm.c: Likewise.
1116*e6c7e151Schristos	* dwarf2.c: Likewise.
1117*e6c7e151Schristos	* ecoff.c: Likewise.
1118*e6c7e151Schristos	* elf-attrs.c: Likewise.
1119*e6c7e151Schristos	* elf-eh-frame.c: Likewise.
1120*e6c7e151Schristos	* elf-ifunc.c: Likewise.
1121*e6c7e151Schristos	* elf-m10300.c: Likewise.
1122*e6c7e151Schristos	* elf-s390-common.c: Likewise.
1123*e6c7e151Schristos	* elf.c: Likewise.
1124*e6c7e151Schristos	* elf32-arc.c: Likewise.
1125*e6c7e151Schristos	* elf32-arm.c: Likewise.
1126*e6c7e151Schristos	* elf32-avr.c: Likewise.
1127*e6c7e151Schristos	* elf32-bfin.c: Likewise.
1128*e6c7e151Schristos	* elf32-cr16.c: Likewise.
1129*e6c7e151Schristos	* elf32-cr16c.c: Likewise.
1130*e6c7e151Schristos	* elf32-cris.c: Likewise.
1131*e6c7e151Schristos	* elf32-crx.c: Likewise.
1132*e6c7e151Schristos	* elf32-d10v.c: Likewise.
1133*e6c7e151Schristos	* elf32-d30v.c: Likewise.
1134*e6c7e151Schristos	* elf32-epiphany.c: Likewise.
1135*e6c7e151Schristos	* elf32-fr30.c: Likewise.
1136*e6c7e151Schristos	* elf32-frv.c: Likewise.
1137*e6c7e151Schristos	* elf32-gen.c: Likewise.
1138*e6c7e151Schristos	* elf32-hppa.c: Likewise.
1139*e6c7e151Schristos	* elf32-i370.c: Likewise.
1140*e6c7e151Schristos	* elf32-i386.c: Likewise.
1141*e6c7e151Schristos	* elf32-i960.c: Likewise.
1142*e6c7e151Schristos	* elf32-ip2k.c: Likewise.
1143*e6c7e151Schristos	* elf32-iq2000.c: Likewise.
1144*e6c7e151Schristos	* elf32-lm32.c: Likewise.
1145*e6c7e151Schristos	* elf32-m32c.c: Likewise.
1146*e6c7e151Schristos	* elf32-m32r.c: Likewise.
1147*e6c7e151Schristos	* elf32-m68hc11.c: Likewise.
1148*e6c7e151Schristos	* elf32-m68hc12.c: Likewise.
1149*e6c7e151Schristos	* elf32-m68hc1x.c: Likewise.
1150*e6c7e151Schristos	* elf32-m68k.c: Likewise.
1151*e6c7e151Schristos	* elf32-mcore.c: Likewise.
1152*e6c7e151Schristos	* elf32-mep.c: Likewise.
1153*e6c7e151Schristos	* elf32-metag.c: Likewise.
1154*e6c7e151Schristos	* elf32-microblaze.c: Likewise.
1155*e6c7e151Schristos	* elf32-moxie.c: Likewise.
1156*e6c7e151Schristos	* elf32-msp430.c: Likewise.
1157*e6c7e151Schristos	* elf32-mt.c: Likewise.
1158*e6c7e151Schristos	* elf32-nds32.c: Likewise.
1159*e6c7e151Schristos	* elf32-nios2.c: Likewise.
1160*e6c7e151Schristos	* elf32-or1k.c: Likewise.
1161*e6c7e151Schristos	* elf32-pj.c: Likewise.
1162*e6c7e151Schristos	* elf32-ppc.c: Likewise.
1163*e6c7e151Schristos	* elf32-rl78.c: Likewise.
1164*e6c7e151Schristos	* elf32-rx.c: Likewise.
1165*e6c7e151Schristos	* elf32-s390.c: Likewise.
1166*e6c7e151Schristos	* elf32-score.c: Likewise.
1167*e6c7e151Schristos	* elf32-score7.c: Likewise.
1168*e6c7e151Schristos	* elf32-sh-symbian.c: Likewise.
1169*e6c7e151Schristos	* elf32-sh.c: Likewise.
1170*e6c7e151Schristos	* elf32-sh64.c: Likewise.
1171*e6c7e151Schristos	* elf32-spu.c: Likewise.
1172*e6c7e151Schristos	* elf32-tic6x.c: Likewise.
1173*e6c7e151Schristos	* elf32-tilepro.c: Likewise.
1174*e6c7e151Schristos	* elf32-v850.c: Likewise.
1175*e6c7e151Schristos	* elf32-vax.c: Likewise.
1176*e6c7e151Schristos	* elf32-visium.c: Likewise.
1177*e6c7e151Schristos	* elf32-xgate.c: Likewise.
1178*e6c7e151Schristos	* elf32-xtensa.c: Likewise.
1179*e6c7e151Schristos	* elf64-alpha.c: Likewise.
1180*e6c7e151Schristos	* elf64-gen.c: Likewise.
1181*e6c7e151Schristos	* elf64-hppa.c: Likewise.
1182*e6c7e151Schristos	* elf64-ia64-vms.c: Likewise.
1183*e6c7e151Schristos	* elf64-mmix.c: Likewise.
1184*e6c7e151Schristos	* elf64-ppc.c: Likewise.
1185*e6c7e151Schristos	* elf64-s390.c: Likewise.
1186*e6c7e151Schristos	* elf64-sh64.c: Likewise.
1187*e6c7e151Schristos	* elf64-sparc.c: Likewise.
1188*e6c7e151Schristos	* elf64-x86-64.c: Likewise.
1189*e6c7e151Schristos	* elfcode.h: Likewise.
1190*e6c7e151Schristos	* elfcore.h: Likewise.
1191*e6c7e151Schristos	* elflink.c: Likewise.
1192*e6c7e151Schristos	* elfnn-aarch64.c: Likewise.
1193*e6c7e151Schristos	* elfnn-ia64.c: Likewise.
1194*e6c7e151Schristos	* elfxx-mips.c: Likewise.
1195*e6c7e151Schristos	* elfxx-sparc.c: Likewise.
1196*e6c7e151Schristos	* elfxx-tilegx.c: Likewise.
1197*e6c7e151Schristos	* ieee.c: Likewise.
1198*e6c7e151Schristos	* ihex.c: Likewise.
1199*e6c7e151Schristos	* libbfd.c: Likewise.
1200*e6c7e151Schristos	* linker.c: Likewise.
1201*e6c7e151Schristos	* m68klinux.c: Likewise.
1202*e6c7e151Schristos	* mach-o.c: Likewise.
1203*e6c7e151Schristos	* merge.c: Likewise.
1204*e6c7e151Schristos	* mmo.c: Likewise.
1205*e6c7e151Schristos	* oasys.c: Likewise.
1206*e6c7e151Schristos	* pdp11.c: Likewise.
1207*e6c7e151Schristos	* pe-mips.c: Likewise.
1208*e6c7e151Schristos	* peXXigen.c: Likewise.
1209*e6c7e151Schristos	* pei-x86_64.c: Likewise.
1210*e6c7e151Schristos	* peicode.h: Likewise.
1211*e6c7e151Schristos	* ppcboot.c: Likewise.
1212*e6c7e151Schristos	* reloc.c: Likewise.
1213*e6c7e151Schristos	* sparclinux.c: Likewise.
1214*e6c7e151Schristos	* srec.c: Likewise.
1215*e6c7e151Schristos	* stabs.c: Likewise.
1216*e6c7e151Schristos	* vms-alpha.c: Likewise.
1217*e6c7e151Schristos	* vms-lib.c: Likewise.
1218*e6c7e151Schristos	* xcofflink.c: Likewise.
1219*e6c7e151Schristos
1220*e6c7e151Schristos2016-10-18  Nick Clifton  <nickc@redhat.com>
1221*e6c7e151Schristos
1222*e6c7e151Schristos	* po/da.po: Updated Danish translation.
1223*e6c7e151Schristos
1224*e6c7e151Schristos2016-10-18  Maciej W. Rozycki  <macro@imgtec.com>
1225*e6c7e151Schristos
1226*e6c7e151Schristos	* elf32-nds32.c (nds32_elf_check_relocs): Avoid aliasing warning
1227*e6c7e151Schristos	from GCC.
1228*e6c7e151Schristos
1229*e6c7e151Schristos2016-10-18  Maciej W. Rozycki  <macro@imgtec.com>
1230*e6c7e151Schristos
1231*e6c7e151Schristos	* elf32-arm.c (elf32_arm_update_relocs): Rename `index' local
1232*e6c7e151Schristos	variable to `reloc_index'.
1233*e6c7e151Schristos
1234*e6c7e151Schristos2016-10-12  Alan Modra  <amodra@gmail.com>
1235*e6c7e151Schristos
1236*e6c7e151Schristos	* section.c (BFD_FAKE_SECTION): Reorder parameters.  Formatting.
1237*e6c7e151Schristos	(STD_SECTION): Adjust to suit.
1238*e6c7e151Schristos	* elf.c (_bfd_elf_large_com_section): Likewise.
1239*e6c7e151Schristos	* bfd-in2.h: Regenerate.
1240*e6c7e151Schristos
1241*e6c7e151Schristos2016-10-11  Alan Modra  <amodra@gmail.com>
1242*e6c7e151Schristos
1243*e6c7e151Schristos	* elf64-x86-64.c (elf_x86_64_convert_load_reloc): Handle symbols
1244*e6c7e151Schristos	defined temporarily with bfd_und_section.
1245*e6c7e151Schristos	* elflink.c (_bfd_elf_gc_keep): Don't set SEC_KEEP for bfd_und_section.
1246*e6c7e151Schristos	* elfxx-mips.c (mips_elf_local_pic_function_p): Exclude defined
1247*e6c7e151Schristos	symbols with bfd_und_section.
1248*e6c7e151Schristos
1249*e6c7e151Schristos2016-10-07  Alan Modra  <amodra@gmail.com>
1250*e6c7e151Schristos
1251*e6c7e151Schristos	* targets.c (bfd_target <_bfd_merge_private_bfd_data>): Replace
1252*e6c7e151Schristos	obfd param with struct bfd_link_info param.  Update all callers.
1253*e6c7e151Schristos	* linker.c (bfd_merge_private_bfd_data): Likewise.
1254*e6c7e151Schristos	(_bfd_generic_verify_endian_match): Likewise.
1255*e6c7e151Schristos	* aoutf1.h (sunos_merge_private_bfd_data): Likewise.
1256*e6c7e151Schristos	* coff-arm.c (coff_arm_merge_private_bfd_data): Likewise.
1257*e6c7e151Schristos	* elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise.
1258*e6c7e151Schristos	* elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Likewise.
1259*e6c7e151Schristos	(_bfd_elf_merge_object_attributes): Likewise.
1260*e6c7e151Schristos	* elf-m10300.c (_bfd_mn10300_elf_merge_private_bfd_data): Likewise.
1261*e6c7e151Schristos	* elf-s390-common.c (elf_s390_merge_obj_attributes): Likewise.
1262*e6c7e151Schristos	* elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
1263*e6c7e151Schristos	* elf32-arm.c (elf32_arm_merge_eabi_attributes): Likewise.
1264*e6c7e151Schristos	(elf32_arm_merge_private_bfd_data): Likewise.
1265*e6c7e151Schristos	* elf32-bfin.c (elf32_bfin_merge_private_bfd_data): Likewise.
1266*e6c7e151Schristos	* elf32-cr16.c (_bfd_cr16_elf_merge_private_bfd_data): Likewise.
1267*e6c7e151Schristos	* elf32-cris.c (cris_elf_merge_private_bfd_data): Likewise.
1268*e6c7e151Schristos	* elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
1269*e6c7e151Schristos	* elf32-h8300.c (elf32_h8_merge_private_bfd_data): Likewise.
1270*e6c7e151Schristos	* elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
1271*e6c7e151Schristos	* elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
1272*e6c7e151Schristos	* elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
1273*e6c7e151Schristos	* elf32-m32r.c (m32r_elf_merge_private_bfd_data): Likewise.
1274*e6c7e151Schristos	* elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1275*e6c7e151Schristos	* elf32-m68hc1x.h (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
1276*e6c7e151Schristos	* elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Likewise.
1277*e6c7e151Schristos	* elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
1278*e6c7e151Schristos	* elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
1279*e6c7e151Schristos	* elf32-msp430.c (elf32_msp430_merge_mspabi_attributes): Likewise.
1280*e6c7e151Schristos	(elf32_msp430_merge_private_bfd_data): Likewise.
1281*e6c7e151Schristos	* elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
1282*e6c7e151Schristos	* elf32-nds32.c (nds32_elf_merge_private_bfd_data): Likewise.
1283*e6c7e151Schristos	* elf32-nios2.c (nios2_elf32_merge_private_bfd_data): Likewise.
1284*e6c7e151Schristos	* elf32-or1k.c (elf32_or1k_merge_private_bfd_data): Likewise.
1285*e6c7e151Schristos	* elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Likewise.
1286*e6c7e151Schristos	(ppc_elf_merge_obj_attributes): Likewise.
1287*e6c7e151Schristos	(ppc_elf_merge_private_bfd_data): Likewise.
1288*e6c7e151Schristos	* elf32-rl78.c (rl78_elf_merge_private_bfd_data): Likewise.
1289*e6c7e151Schristos	* elf32-rx.c (rx_elf_merge_private_bfd_data): Likewise.
1290*e6c7e151Schristos	* elf32-s390.c (elf32_s390_merge_private_bfd_data): Likewise.
1291*e6c7e151Schristos	* elf32-score.c (s3_elf32_score_merge_private_bfd_data): Likewise.
1292*e6c7e151Schristos	(elf32_score_merge_private_bfd_data): Likewise.
1293*e6c7e151Schristos	* elf32-score.h (s7_elf32_score_merge_private_bfd_data): Likewise.
1294*e6c7e151Schristos	* elf32-score7.c (s7_elf32_score_merge_private_bfd_data): Likewise.
1295*e6c7e151Schristos	* elf32-sh.c (sh_merge_bfd_arch, sh_elf_merge_private_data): Likewise.
1296*e6c7e151Schristos	* elf32-sh64.c (sh64_elf_merge_private_data): Likewise.
1297*e6c7e151Schristos	* elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Likewise.
1298*e6c7e151Schristos	* elf32-tic6x.c (elf32_tic6x_merge_attributes): Likewise.
1299*e6c7e151Schristos	(elf32_tic6x_merge_private_bfd_data): Likewise.
1300*e6c7e151Schristos	* elf32-v850.c (v850_elf_merge_private_bfd_data): Likewise.
1301*e6c7e151Schristos	* elf32-vax.c (elf32_vax_merge_private_bfd_data): Likewise.
1302*e6c7e151Schristos	* elf32-visium.c (visium_elf_merge_private_bfd_data): Likewise.
1303*e6c7e151Schristos	* elf32-xtensa.c (elf_xtensa_merge_private_bfd_data): Likewise.
1304*e6c7e151Schristos	* elf64-ia64-vms.c (elf64_ia64_merge_private_bfd_data): Likewise.
1305*e6c7e151Schristos	* elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Likewise.
1306*e6c7e151Schristos	* elf64-s390.c (elf64_s390_merge_private_bfd_data): Likewise.
1307*e6c7e151Schristos	* elf64-sh64.c (sh_elf64_merge_private_data): Likewise.
1308*e6c7e151Schristos	* elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
1309*e6c7e151Schristos	* elfnn-aarch64.c (elfNN_aarch64_merge_private_bfd_data): Likewise.
1310*e6c7e151Schristos	* elfnn-ia64.c (elfNN_ia64_merge_private_bfd_data): Likewise.
1311*e6c7e151Schristos	* elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
1312*e6c7e151Schristos	(mips_elf_merge_obj_attributes): Likewise.
1313*e6c7e151Schristos	(_bfd_mips_elf_merge_private_bfd_data): Likewise.
1314*e6c7e151Schristos	* elfxx-mips.h (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1315*e6c7e151Schristos	* elfxx-sparc.c (_bfd_sparc_elf_merge_private_bfd_data): Likewise.
1316*e6c7e151Schristos	* elfxx-sparc.h (_bfd_sparc_elf_merge_private_bfd_data): Likewise.
1317*e6c7e151Schristos	* elfxx-target.h (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
1318*e6c7e151Schristos	* elfxx-tilegx.c (_bfd_tilegx_elf_merge_private_bfd_data): Likewise.
1319*e6c7e151Schristos	* elfxx-tilegx.h (_bfd_tilegx_elf_merge_private_bfd_data): Likewise.
1320*e6c7e151Schristos	* libbfd-in.h (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
1321*e6c7e151Schristos	* bfd-in2.h: Regenerate.
1322*e6c7e151Schristos	* libbfd.h: Regenerate.
1323*e6c7e151Schristos
1324*e6c7e151Schristos2016-10-07  Alan Modra  <amodra@gmail.com>
1325*e6c7e151Schristos
1326*e6c7e151Schristos	* Makefile.am (LIBBFD_H_FILES): Update.
1327*e6c7e151Schristos	* doc/Makefile.am (LIBBFD_H_DEP): Likewise.
1328*e6c7e151Schristos	* cpu-sh.c (sh_merge_bfd_arch): Move to..
1329*e6c7e151Schristos	* elf32-sh.c: ..here, and make static.
1330*e6c7e151Schristos	* elf32-arc.c (arc_elf_merge_private_bfd_data): Delete extraneous
1331*e6c7e151Schristos	error.
1332*e6c7e151Schristos	* elf32-cris.c (cris_elf_merge_private_bfd_data): Don't call
1333*e6c7e151Schristos	_bfd_generic_verify_endian_match.
1334*e6c7e151Schristos	* elf32-microblaze.c (microblaze_elf_merge_private_bfd_data): Delete.
1335*e6c7e151Schristos	(bfd_elf32_bfd_merge_private_bfd_data): Define as
1336*e6c7e151Schristos	_bfd_generic_verify_endian_match.
1337*e6c7e151Schristos	* elf32-mt.c (mt_elf_merge_private_bfd_data): Don't test
1338*e6c7e151Schristos	boolean == FALSE.
1339*e6c7e151Schristos	* elf32-xgate.c (_bfd_xgate_elf_merge_private_bfd_data): Delete.
1340*e6c7e151Schristos	(bfd_elf32_bfd_merge_private_bfd_data): Don't define.
1341*e6c7e151Schristos	* elf32-xgate.h (_bfd_xgate_elf_merge_private_bfd_data): Delete.
1342*e6c7e151Schristos	* libbfd-in.h (_bfd_generic_verify_endian_match): Delete.
1343*e6c7e151Schristos	* libbfd.c (_bfd_generic_verify_endian_match): Move to..
1344*e6c7e151Schristos	* linker.c: ..here, and make internal.
1345*e6c7e151Schristos	* bfd.c (bfd_merge_private_bfd_data): Move to..
1346*e6c7e151Schristos	* linker.c: ..here.
1347*e6c7e151Schristos	* Makefile.in: Regenerate.
1348*e6c7e151Schristos	* doc/Makefile.in: Regenerate.
1349*e6c7e151Schristos	* bfd-in2.h: Regenerate.
1350*e6c7e151Schristos	* libbfd.h: Regenerate.
1351*e6c7e151Schristos
1352*e6c7e151Schristos2016-10-06  Alan Modra  <amodra@gmail.com>
1353*e6c7e151Schristos
1354*e6c7e151Schristos	* coff-h8300.c: Spell fall through comments consistently.
1355*e6c7e151Schristos	* coffgen.c: Likewise.
1356*e6c7e151Schristos	* elf32-hppa.c: Likewise.
1357*e6c7e151Schristos	* elf32-ppc.c: Likewise.
1358*e6c7e151Schristos	* elf32-score.c: Likewise.
1359*e6c7e151Schristos	* elf32-score7.c: Likewise.
1360*e6c7e151Schristos	* elf64-ppc.c: Likewise.
1361*e6c7e151Schristos	* elfxx-aarch64.c: Likewise.
1362*e6c7e151Schristos	* elfxx-mips.c: Likewise.
1363*e6c7e151Schristos	* cpu-ns32k.c: Add missing fall through comments.
1364*e6c7e151Schristos	* elf-m10300.c: Likewise.
1365*e6c7e151Schristos	* elf32-arm.c: Likewise.
1366*e6c7e151Schristos	* elf32-avr.c: Likewise.
1367*e6c7e151Schristos	* elf32-bfin.c: Likewise.
1368*e6c7e151Schristos	* elf32-frv.c: Likewise.
1369*e6c7e151Schristos	* elf32-i386.c: Likewise.
1370*e6c7e151Schristos	* elf32-microblaze.c: Likewise.
1371*e6c7e151Schristos	* elf32-nds32.c: Likewise.
1372*e6c7e151Schristos	* elf32-ppc.c: Likewise.
1373*e6c7e151Schristos	* elf32-rl78.c: Likewise.
1374*e6c7e151Schristos	* elf32-rx.c: Likewise.
1375*e6c7e151Schristos	* elf32-s390.c: Likewise.
1376*e6c7e151Schristos	* elf32-sh.c: Likewise.
1377*e6c7e151Schristos	* elf32-tic6x.c: Likewise.
1378*e6c7e151Schristos	* elf64-ia64-vms.c: Likewise.
1379*e6c7e151Schristos	* elf64-ppc.c: Likewise.
1380*e6c7e151Schristos	* elf64-s390.c: Likewise.
1381*e6c7e151Schristos	* elf64-x86-64.c: Likewise.
1382*e6c7e151Schristos	* elflink.c: Likewise.
1383*e6c7e151Schristos	* elfnn-aarch64.c: Likewise.
1384*e6c7e151Schristos	* elfnn-ia64.c: Likewise.
1385*e6c7e151Schristos	* ieee.c: Likewise.
1386*e6c7e151Schristos	* oasys.c: Likewise.
1387*e6c7e151Schristos	* pdp11.c: Likewise.
1388*e6c7e151Schristos	* srec.c: Likewise.
1389*e6c7e151Schristos	* versados.c: Likewise.
1390*e6c7e151Schristos
1391*e6c7e151Schristos2016-10-06  Alan Modra  <amodra@gmail.com>
1392*e6c7e151Schristos
1393*e6c7e151Schristos	* coffcode.h (coff_slurp_symbol_table): Revert accidental commit
1394*e6c7e151Schristos	made 2015-01-08.
1395*e6c7e151Schristos	* elf32-nds32.c (nds32_elf_grok_psinfo): Add missing break.
1396*e6c7e151Schristos	* reloc.c (bfd_default_reloc_type_lookup): Add missing breaks.
1397*e6c7e151Schristos
1398*e6c7e151Schristos2016-10-06  Alan Modra  <amodra@gmail.com>
1399*e6c7e151Schristos
1400*e6c7e151Schristos	* elf32-epiphany.c (epiphany_final_link_relocate): Use bitwise
1401*e6c7e151Schristos	OR in arithmetic expression, not boolean OR.
1402*e6c7e151Schristos
1403*e6c7e151Schristos2016-09-30  Alan Modra  <amodra@gmail.com>
1404*e6c7e151Schristos
1405*e6c7e151Schristos	* Makefile.am (BFD_H_FILES): Add linker.c and simple.c.  Sort
1406*e6c7e151Schristos	as per comment at head of bfd-in2.h.
1407*e6c7e151Schristos	* Makefile.in: Regenerate.
1408*e6c7e151Schristos
1409*e6c7e151Schristos2016-09-30  Alan Modra  <amodra@gmail.com>
1410*e6c7e151Schristos
1411*e6c7e151Schristos	* aout-adobe.c: Replace (*_bfd_error_handler) (...) with
1412*e6c7e151Schristos	_bfd_error_handler (...) throughout.
1413*e6c7e151Schristos	* aout-cris.c, * aoutx.h, * archive.c, * bfd.c, * binary.c,
1414*e6c7e151Schristos	* cache.c, * coff-alpha.c, * coff-arm.c, * coff-h8300.c,
1415*e6c7e151Schristos	* coff-i860.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
1416*e6c7e151Schristos	* coff-sh.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c,
1417*e6c7e151Schristos	* coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c,
1418*e6c7e151Schristos	* coffswap.h, * cpu-arm.c, * cpu-m68k.c, * cpu-sh.c, * dwarf2.c,
1419*e6c7e151Schristos	* ecoff.c, * elf-eh-frame.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
1420*e6c7e151Schristos	* elf32-arm.c, * elf32-avr.c, * elf32-bfin.c, * elf32-cr16.c,
1421*e6c7e151Schristos	* elf32-cris.c, * elf32-crx.c, * elf32-dlx.c, * elf32-frv.c,
1422*e6c7e151Schristos	* elf32-hppa.c, * elf32-i370.c, * elf32-i386.c, * elf32-lm32.c,
1423*e6c7e151Schristos	* elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
1424*e6c7e151Schristos	* elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c,
1425*e6c7e151Schristos	* elf32-mips.c, * elf32-nds32.c, * elf32-nios2.c, * elf32-or1k.c,
1426*e6c7e151Schristos	* elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-s390.c,
1427*e6c7e151Schristos	* elf32-score.c, * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c,
1428*e6c7e151Schristos	* elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilepro.c,
1429*e6c7e151Schristos	* elf32-v850.c, * elf32-vax.c, * elf32-xtensa.c, * elf64-alpha.c,
1430*e6c7e151Schristos	* elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
1431*e6c7e151Schristos	* elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c,
1432*e6c7e151Schristos	* elf64-x86-64.c, * elfcode.h, * elfcore.h, * elflink.c,
1433*e6c7e151Schristos	* elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfxx-mips.c,
1434*e6c7e151Schristos	* elfxx-sparc.c, * elfxx-tilegx.c, * hpux-core.c, * i386linux.c,
1435*e6c7e151Schristos	* ieee.c, * ihex.c, * libbfd.c, * linker.c, * m68klinux.c,
1436*e6c7e151Schristos	* mach-o.c, * merge.c, * mmo.c, * oasys.c, * osf-core.c, * pdp11.c,
1437*e6c7e151Schristos	* pe-mips.c, * peXXigen.c, * pef.c, * plugin.c, * reloc.c,
1438*e6c7e151Schristos	* rs6000-core.c, * sco5-core.c, * som.c, * sparclinux.c, * srec.c,
1439*e6c7e151Schristos	* stabs.c, * syms.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c,
1440*e6c7e151Schristos	* xcofflink.c: Likewise.
1441*e6c7e151Schristos
1442*e6c7e151Schristos2016-09-30  Alan Modra  <amodra@gmail.com>
1443*e6c7e151Schristos
1444*e6c7e151Schristos	* bfd-in.h: Include stdarg.h.
1445*e6c7e151Schristos	* bfd.c (bfd_error_handler_type): Make like vprintf.
1446*e6c7e151Schristos	(_bfd_error_internal): Rename from _bfd_error_handler.  Make static.
1447*e6c7e151Schristos	(error_handler_internal): New function, split out from..
1448*e6c7e151Schristos	(_bfd_default_error_handler): ..here.  Rename to _bfd_error_handler.
1449*e6c7e151Schristos	(bfd_set_error_handler): Update.
1450*e6c7e151Schristos	(bfd_get_error_handler, bfd_get_assert_handler): Delete.
1451*e6c7e151Schristos	(_bfd_assert_handler): Make static.
1452*e6c7e151Schristos	* coffgen.c (null_error_handler): Update params.
1453*e6c7e151Schristos	* elf-bfd.h (struct elf_backend_data <link_order_error_handler>):
1454*e6c7e151Schristos	Don't use bfd_error_handler_type.
1455*e6c7e151Schristos	* elf64-mmix.c (mmix_dump_bpo_gregs): Likewise.
1456*e6c7e151Schristos	* elfxx-target.h (elf_backend_link_order_error_handler): Default
1457*e6c7e151Schristos	to _bfd_error_handler.
1458*e6c7e151Schristos	* libbfd-in.h (_bfd_default_error_handler): Don't declare.
1459*e6c7e151Schristos	(bfd_assert_handler_type): Likewise.
1460*e6c7e151Schristos	(_bfd_error_handler): Update.
1461*e6c7e151Schristos	* bfd-in2.h: Regenerate.
1462*e6c7e151Schristos	* libbfd.h: Regenerate.
1463*e6c7e151Schristos
1464*e6c7e151Schristos2016-09-28  Akihiko Odaki  <akihiko.odaki.4i@stu.hosei.ac.jp>
1465*e6c7e151Schristos
1466*e6c7e151Schristos	PR ld/20636
1467*e6c7e151Schristos	* elf-bfd.h (struct elf_backend_data): Delete
1468*e6c7e151Schristos	elf_backend_count_output_relocs callback and add
1469*e6c7e151Schristos	elf_backend_update_relocs.
1470*e6c7e151Schristos	* elf32-arm.c (elf32_arm_count_output_relocs): Deleted.
1471*e6c7e151Schristos	(emit_relocs): Deleted.
1472*e6c7e151Schristos	(elf32_arm_emit_relocs): Deleted.
1473*e6c7e151Schristos	(elf_backend_emit_relocs): Updated not to use the old functions.
1474*e6c7e151Schristos	(elf32_arm_update_relocs): New function.
1475*e6c7e151Schristos	(elf_backend_update_relocs): New define.
1476*e6c7e151Schristos	* elflink.c (bfd_elf_final_link): Add additional_reloc_count to the
1477*e6c7e151Schristos	relocation count. Call elf_backend_emit_relocs.
1478*e6c7e151Schristos	(_bfd_elf_size_reloc_section): Do not call
1479*e6c7e151Schristos	elf_backend_count_output_relocs.
1480*e6c7e151Schristos	* elfxx-target.h (elf_backend_count_output_relocs): Deleted.
1481*e6c7e151Schristos	(elf_backend_update_relocs): New define.
1482*e6c7e151Schristos
1483*e6c7e151Schristos2016-09-28  Christophe Lyon  <christophe.lyon@linaro.org>
1484*e6c7e151Schristos
1485*e6c7e151Schristos	PR ld/20608
1486*e6c7e151Schristos	* elf32-arm.c (arm_type_of_stub): Handle the case when the pre-PLT
1487*e6c7e151Schristos	Thumb-ARM stub is too far.
1488*e6c7e151Schristos
1489*e6c7e151Schristos2016-09-27  Nick Clifton  <nickc@redhat.com>
1490*e6c7e151Schristos
1491*e6c7e151Schristos	PR ld/20634
1492*e6c7e151Schristos	* peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Put 0 in the
1493*e6c7e151Schristos	timestamp field if real time values are not being stored.
1494*e6c7e151Schristos
1495*e6c7e151Schristos2016-09-26  Vlad Zakharov  <vzakhar@synopsys.com>
1496*e6c7e151Schristos
1497*e6c7e151Schristos	* warning.m4 (AC_EGREP_CPP_FOR_BUILD): Introduce macro
1498*e6c7e151Schristos	to verify CC_FOR_BUILD compiler.
1499*e6c7e151Schristos	(AM_BINUTILS_WARNINGS): Introduce ac_cpp_for_build variable
1500*e6c7e151Schristos	and add CC_FOR_BUILD compiler checks.
1501*e6c7e151Schristos	* Makefile.in: Regenerate.
1502*e6c7e151Schristos	* configure: Likewise.
1503*e6c7e151Schristos	* doc/Makefile.in: Likewise.
1504*e6c7e151Schristos
1505*e6c7e151Schristos2016-09-26  Awson  <kyrab@mail.ru>
1506*e6c7e151Schristos
1507*e6c7e151Schristos	PR ld/17955
1508*e6c7e151Schristos	* coff-x86_64.c (coff_amd64_rtype_to_howto): Use an 8 byte offset
1509*e6c7e151Schristos	for R_AMD64_PCRQUAD relocations.
1510*e6c7e151Schristos
1511*e6c7e151Schristos2016-09-26  Alan Modra  <amodra@gmail.com>
1512*e6c7e151Schristos
1513*e6c7e151Schristos	* elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Declare.
1514*e6c7e151Schristos	* elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): New function.
1515*e6c7e151Schristos	(ppc_elf_merge_obj_attributes): Use it.  Don't copy first file
1516*e6c7e151Schristos	attributes, merge them.  Don't warn about undefined tag bits,
1517*e6c7e151Schristos	or copy unknown values to output.
1518*e6c7e151Schristos	* elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Call
1519*e6c7e151Schristos	_bfd_elf_ppc_merge_fp_attributes.
1520*e6c7e151Schristos
1521*e6c7e151Schristos2016-09-23  Akihiko Odaki  <akihiko.odaki.4i@stu.hosei.ac.jp>
1522*e6c7e151Schristos
1523*e6c7e151Schristos	PR ld/20595
1524*e6c7e151Schristos	* elf-bfd.h (struct elf_backend_data): Add
1525*e6c7e151Schristos	elf_backend_count_output_relocs callback to count relocations in
1526*e6c7e151Schristos	the final output.
1527*e6c7e151Schristos	* elf-arm.c (elf32_arm_add_relocation): Deleted.
1528*e6c7e151Schristos	(elf32_arm_write_section): Move additional relocation to emit_relocs.
1529*e6c7e151Schristos	(elf32_arm_count_output_relocs): New function.
1530*e6c7e151Schristos	(emit_relocs): New function.
1531*e6c7e151Schristos	(elf32_arm_emit_relocs): New function.
1532*e6c7e151Schristos	(elf32_arm_vxworks_emit_relocs): New function.
1533*e6c7e151Schristos	(elf_backend_emit_relocs): Updated to use the new functions.
1534*e6c7e151Schristos	(elf_backend_count_output_relocs): New define.
1535*e6c7e151Schristos	* bfd/elflink.c (bfd_elf_final_link): Do not add additional_reloc_count
1536*e6c7e151Schristos	to the relocation count.
1537*e6c7e151Schristos	(_bfd_elf_link_size_reloc_section): Use callback to count the
1538*e6c7e151Schristos	relocations which will be in output.
1539*e6c7e151Schristos	(_bfd_elf_default_count_output_relocs): New function.
1540*e6c7e151Schristos	* bfd/elfxx-target.h (elf_backend_count_output_relocs): New define.
1541*e6c7e151Schristos
1542*e6c7e151Schristos2016-09-19  Jose E. Marchesi  <jose.marchesi@oracle.com>
1543*e6c7e151Schristos
1544*e6c7e151Schristos	* elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Allow
1545*e6c7e151Schristos	negative offsets to _GLOBAL_OFFSET_TABLE_ if the .got section is
1546*e6c7e151Schristos	bigger than 0x1000 bytes.
1547*e6c7e151Schristos
1548*e6c7e151Schristos2016-09-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
1549*e6c7e151Schristos
1550*e6c7e151Schristos	* elf32-arm.c (elf32_arm_gc_mark_extra_sections): Only mark section
1551*e6c7e151Schristos	not already marked.
1552*e6c7e151Schristos
1553*e6c7e151Schristos2016-09-14  Nick Clifton  <nickc@redhat.com>
1554*e6c7e151Schristos
1555*e6c7e151Schristos	PR binutils/20605
1556*e6c7e151Schristos	* peicode.h (pe_bfd_read_buildid): Check that the Data Directory
1557*e6c7e151Schristos	contains a valid size for the Debug directory.
1558*e6c7e151Schristos
1559*e6c7e151Schristos2016-09-14  Bhushan Attarde  <bhushan.attarde@imgtec.com>
1560*e6c7e151Schristos
1561*e6c7e151Schristos	* format.c (struct bfd_preserve): New "build_id" field.
1562*e6c7e151Schristos	(bfd_preserve_save): Save "build_id".
1563*e6c7e151Schristos	(bfd_preserve_restore): Restore "build_id".
1564*e6c7e151Schristos
1565*e6c7e151Schristos2016-09-06  H.J. Lu  <hongjiu.lu@intel.com>
1566*e6c7e151Schristos
1567*e6c7e151Schristos	PR ld/20550
1568*e6c7e151Schristos	* elf64-x86-64.c (elf_x86_64_relocate_section): Resolve size
1569*e6c7e151Schristos	relocation with copy relocation when building executable.
1570*e6c7e151Schristos
1571*e6c7e151Schristos2016-09-02  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
1572*e6c7e151Schristos
1573*e6c7e151Schristos	PR ld/20545
1574*e6c7e151Schristos	* elf32-avr.c (elf32_avr_relax_delete_bytes): Add parameter
1575*e6c7e151Schristos	delete_shrinks_insn. Modify computation of shrinked_insn_address.
1576*e6c7e151Schristos	Compute shrink_boundary and adjust addend only if
1577*e6c7e151Schristos	addend_within_shrink_boundary.
1578*e6c7e151Schristos	(elf32_avr_relax_section): Modify calls to
1579*e6c7e151Schristos	elf32_avr_relax_delete_bytes to pass extra parameter.
1580*e6c7e151Schristos
1581*e6c7e151Schristos2016-09-01  Thomas Preud'homme  <thomas.preudhomme@arm.com>
1582*e6c7e151Schristos
1583*e6c7e151Schristos	* elf32-arm.c (cmse_entry_fct_p): Store instruction encoding in an
1584*e6c7e151Schristos	array of bytes and use bfd_get_16 to interpret its encoding according
1585*e6c7e151Schristos	to endianness of target.
1586*e6c7e151Schristos
1587*e6c7e151Schristos2016-09-01  Alan Modra  <amodra@gmail.com>
1588*e6c7e151Schristos
1589*e6c7e151Schristos	* elf64-ppc.c (synthetic_opd): New static var.
1590*e6c7e151Schristos	(compare_symbols): Don't treat symbols in .opd specially for ELFv2.
1591*e6c7e151Schristos	(ppc64_elf_get_synthetic_symtab): Likewise.  Comment.
1592*e6c7e151Schristos
1593*e6c7e151Schristos2016-08-31  Alan Modra  <amodra@gmail.com>
1594*e6c7e151Schristos
1595*e6c7e151Schristos	* elf64-ppc.c (group_sections): Delete stub14_group_size.  Instead,
1596*e6c7e151Schristos	track max group size with a new "group_size" var that is reduced
1597*e6c7e151Schristos	by a factor of 1024 from the 24-bit branch size whenever a 14-bit
1598*e6c7e151Schristos	branch is seen.
1599*e6c7e151Schristos
1600*e6c7e151Schristos2016-08-31  Alan Modra  <amodra@gmail.com>
1601*e6c7e151Schristos
1602*e6c7e151Schristos	* elf32-ppc.c (ppc_elf_section_processing): Delete.
1603*e6c7e151Schristos	(elf_backend_section_processing): Don't define.
1604*e6c7e151Schristos	(ppc_elf_modify_segment_map): Set p_flags and mark valid.  Don't
1605*e6c7e151Schristos	split on non-exec sections differing in SHF_PPC_VLE.  When
1606*e6c7e151Schristos	splitting segments, mark size invalid.
1607*e6c7e151Schristos
1608*e6c7e151Schristos2016-08-30  Alan Modra  <amodra@gmail.com>
1609*e6c7e151Schristos
1610*e6c7e151Schristos	PR 20531
1611*e6c7e151Schristos	* elf32-ppc.c (_bfd_elf_ppc_set_arch): Add missing "break".
1612*e6c7e151Schristos
1613*e6c7e151Schristos2016-08-29  H.J. Lu  <hongjiu.lu@intel.com>
1614*e6c7e151Schristos
1615*e6c7e151Schristos	PR ld/14961
1616*e6c7e151Schristos	PR ld/20515
1617*e6c7e151Schristos	* elf32-i386.c (elf_i386_check_relocs): Issue an error when
1618*e6c7e151Schristos	R_386_PC32 relocation is used to call IFUNC function in PIC
1619*e6c7e151Schristos	object.
1620*e6c7e151Schristos
1621*e6c7e151Schristos2016-08-27  Alan Modra  <amodra@gmail.com>
1622*e6c7e151Schristos
1623*e6c7e151Schristos	PR 20520
1624*e6c7e151Schristos	* elf.c (_bfd_elf_setup_sections): Check that SHT_GROUP sections
1625*e6c7e151Schristos	have corresponding SHF_GROUP sections.
1626*e6c7e151Schristos	(bfd_elf_set_group_contents): Comment.
1627*e6c7e151Schristos
1628*e6c7e151Schristos2016-08-27  Alan Modra  <amodra@gmail.com>
1629*e6c7e151Schristos
1630*e6c7e151Schristos	PR 20519
1631*e6c7e151Schristos	* elf64-ppc.c (pc_dynrelocs): New function.
1632*e6c7e151Schristos	(ppc64_elf_relocate_section): Use it and must_be_dyn_reloc to
1633*e6c7e151Schristos	handle pic dynamic relocs.
1634*e6c7e151Schristos
1635*e6c7e151Schristos2016-08-26  Thomas Preud'homme  <thomas.preudhomme@arm.com>
1636*e6c7e151Schristos
1637*e6c7e151Schristos	* bfd-in.h (struct elf32_arm_params): Define.
1638*e6c7e151Schristos	(bfd_elf32_arm_set_target_relocs): Rename into ...
1639*e6c7e151Schristos	(bfd_elf32_arm_set_target_params): This.  Use a struct
1640*e6c7e151Schristos	elf32_arm_params to pass all parameters but the bfd and bfd_link_info.
1641*e6c7e151Schristos	* bfd-in2.h: Regenerate.
1642*e6c7e151Schristos	* elf32-arm.c (bfd_elf32_arm_set_target_relocs): Rename into ...
1643*e6c7e151Schristos	(bfd_elf32_arm_set_target_params): This.  Pass all values via a struct
1644*e6c7e151Schristos	elf32_arm_params rather than as individual parameters.
1645*e6c7e151Schristos
1646*e6c7e151Schristos2016-08-26  Thomas Preud'homme  <thomas.preudhomme@arm.com>
1647*e6c7e151Schristos
1648*e6c7e151Schristos	* elf32-arm.c (elf32_arm_get_stub_entry): Assert that we don't access
1649*e6c7e151Schristos	passed the end of htab->stub_group array.
1650*e6c7e151Schristos	(elf32_arm_create_or_find_stub_sec): Likewise.
1651*e6c7e151Schristos	(elf32_arm_create_stub): Likewise.
1652*e6c7e151Schristos
1653*e6c7e151Schristos2016-08-26  Cupertino Miranda  <cmiranda@synopsys.com>
1654*e6c7e151Schristos
1655*e6c7e151Schristos	* elf32-arc.c (elf_arc_relocate_section): Changed. Set should_relocate
1656*e6c7e151Schristos	to TRUE for GOT and TLS relocs.
1657*e6c7e151Schristos
1658*e6c7e151Schristos2016-08-26  Cupertino Miranda  <cmiranda@synospsys.com>
1659*e6c7e151Schristos
1660*e6c7e151Schristos	* elf32-arc.c (elf_arc_finish_dynamic_sections): Changed.
1661*e6c7e151Schristos
1662*e6c7e151Schristos2016-08-26  Cupertino Miranda  <cmiranda@synopsys.com>
1663*e6c7e151Schristos
1664*e6c7e151Schristos	* elf-bfd.h: Added ARC_ELF_DATA to enum elf_target_id.
1665*e6c7e151Schristos	* elf32-arc.c (struct elf_arc_link_hash_entry): Added.
1666*e6c7e151Schristos	(struct elf_arc_link_hash_table): Likewise.
1667*e6c7e151Schristos	(elf_arc_link_hash_newfunc): Likewise.
1668*e6c7e151Schristos	(elf_arc_link_hash_table_free): Likewise.
1669*e6c7e151Schristos	(arc_elf_link_hash_table_create): Likewise.
1670*e6c7e151Schristos	(elf_arc_relocate_section): Fixed conditions related to dynamic
1671*e6c7e151Schristos	(elf_arc_check_relocs): Likewise.
1672*e6c7e151Schristos	(arc_elf_create_dynamic_sections): Added
1673*e6c7e151Schristos	(elf_arc_adjust_dynamic_symbol): Changed access to .rela.bss to be done
1674*e6c7e151Schristos	through the hash table.
1675*e6c7e151Schristos
1676*e6c7e151Schristos2016-08-26  Cupertino Miranda  <cmiranda@synopsys.com>
1677*e6c7e151Schristos
1678*e6c7e151Schristos	* arc-got.h (relocate_fix_got_relocs_for_got_info): Fixed addresses in
1679*e6c7e151Schristos	debug comments. Fixed address in .got related to TLS_IE_GOT dynamic
1680*e6c7e151Schristos	relocation.
1681*e6c7e151Schristos
1682*e6c7e151Schristos2016-08-26  Cupertino Miranda  <cmiranda@synopsys.com>
1683*e6c7e151Schristos
1684*e6c7e151Schristos	* reloc.c: Fixed type in ARC_SECTOFF relocations. Added ARC_SDA_12
1685*e6c7e151Schristos	relocation.
1686*e6c7e151Schristos	* bfd-in2.h: Regenerated from the previous changes.
1687*e6c7e151Schristos	* libbfd.h: Regenerated from the previous changes.
1688*e6c7e151Schristos
1689*e6c7e151Schristos2016-08-26  Thomas Preud'homme  <thomas.preudhomme@arm.com>
1690*e6c7e151Schristos
1691*e6c7e151Schristos	* bfd-in.h (bfd_elf32_arm_set_target_relocs): Add a new parameter for
1692*e6c7e151Schristos	the input import library bfd.
1693*e6c7e151Schristos	* bfd-in2.h: Regenerate.
1694*e6c7e151Schristos	* elf32-arm.c (struct elf32_arm_link_hash_table): New in_implib_bfd
1695*e6c7e151Schristos	and new_cmse_stub_offset fields.
1696*e6c7e151Schristos	(stub_hash_newfunc): Initialize stub_offset and stub_template_size to
1697*e6c7e151Schristos	-1.
1698*e6c7e151Schristos	(elf32_arm_add_stub): Likewise for stub_offset.
1699*e6c7e151Schristos	(arm_new_stubs_start_offset_ptr): New function.
1700*e6c7e151Schristos	(arm_build_one_stub): Only allocate a stub_offset if it is -1.  Allow
1701*e6c7e151Schristos	empty SG veneers to have zero relocations.
1702*e6c7e151Schristos	(arm_size_one_stub): Only initialize stub size and template
1703*e6c7e151Schristos	information for non empty veneers.  Do not update veneer section size
1704*e6c7e151Schristos	if veneer already has an offset.
1705*e6c7e151Schristos	(elf32_arm_create_stub): Return the stub entry pointer or NULL instead
1706*e6c7e151Schristos	of a boolean indicating success or failure.
1707*e6c7e151Schristos	(cmse_scan): Change stub_changed parameter into an integer pointer
1708*e6c7e151Schristos	parameter cmse_stub_created to count the number of stub created and
1709*e6c7e151Schristos	adapt to change of return value in elf32_arm_create_stub.
1710*e6c7e151Schristos	(cmse_entry_fct_p): New function.
1711*e6c7e151Schristos	(arm_list_new_cmse_stub): Likewise.
1712*e6c7e151Schristos	(set_cmse_veneer_addr_from_implib): Likewise.
1713*e6c7e151Schristos	(elf32_arm_size_stubs): Define cmse_stub_created, pass its address to
1714*e6c7e151Schristos	cmse_scan instead of that of cmse_stub_changed to compute the number
1715*e6c7e151Schristos	of stub created and use it to initialize stub_changed.  Call
1716*e6c7e151Schristos	set_cmse_veneer_addr_from_implib after all cmse_scan.  Adapt to change
1717*e6c7e151Schristos	of return value in elf32_arm_create_stub.  Use
1718*e6c7e151Schristos	arm_stub_section_start_offset () if not NULL to initialize size of
1719*e6c7e151Schristos	secure gateway veneers section.  Initialize stub_offset of Cortex-A8
1720*e6c7e151Schristos	erratum fix to -1.  Use ret to hold return value.
1721*e6c7e151Schristos	(elf32_arm_build_stubs): Use arm_stub_section_start_offset () if not
1722*e6c7e151Schristos	NULL to initialize size of secure gateway veneers section.  Adapt
1723*e6c7e151Schristos	comment to stress the importance of zeroing veneer section content.
1724*e6c7e151Schristos	(bfd_elf32_arm_set_target_relocs): Add new in_implib_bfd parameter to
1725*e6c7e151Schristos	initialize eponymous field in struct elf32_arm_link_hash_table.
1726*e6c7e151Schristos
1727*e6c7e151Schristos2016-08-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1728*e6c7e151Schristos
1729*e6c7e151Schristos	* elf32-s390.c (stdarg.h): New include.
1730*e6c7e151Schristos	(elf_s390_grok_psinfo): New function.
1731*e6c7e151Schristos	(elf_s390_write_core_note): New function.
1732*e6c7e151Schristos	(elf_backend_grok_psinfo): Declare backend hook.
1733*e6c7e151Schristos	(elf_backend_write_core_note): Likewise.
1734*e6c7e151Schristos	* elf64-s390.c (stdarg.h): New include.
1735*e6c7e151Schristos	(elf_s390_grok_prstatus): New function.
1736*e6c7e151Schristos	(elf_s390_grok_psinfo): New function.
1737*e6c7e151Schristos	(elf_s390_write_core_note): New function.
1738*e6c7e151Schristos	(elf_backend_grok_prstatus): Declare backend hook.
1739*e6c7e151Schristos	(elf_backend_grok_psinfo): Likewise.
1740*e6c7e151Schristos	(elf_backend_write_core_note): Likewise.
1741*e6c7e151Schristos
1742*e6c7e151Schristos2016-08-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1743*e6c7e151Schristos
1744*e6c7e151Schristos	* elf32-s390.c (allocate_dynrelocs): Fix indentation.
1745*e6c7e151Schristos	(elf_s390_finish_ifunc_symbol): Likewise.
1746*e6c7e151Schristos	(elf_s390_finish_dynamic_symbol): Likewise.
1747*e6c7e151Schristos	(elf_s390_finish_dynamic_sections): Likewise.
1748*e6c7e151Schristos	(elf_s390_grok_prstatus): Likewise.
1749*e6c7e151Schristos	* elf64-s390.c (elf_s390_hash_table): Fix indentation.
1750*e6c7e151Schristos	(elf_s390_finish_dynamic_symbol): Likewise.
1751*e6c7e151Schristos
1752*e6c7e151Schristos2016-08-24  Anton Kolesov  <Anton.Kolesov@synopsys.com>
1753*e6c7e151Schristos
1754*e6c7e151Schristos	* elf32-arc.c (elf32_arc_grok_prstatus): New function.
1755*e6c7e151Schristos
1756*e6c7e151Schristos2016-08-23  Nick Clifton  <nickc@redhat.com>
1757*e6c7e151Schristos
1758*e6c7e151Schristos	* elf32-arm.c (elf32_arm_count_additional_relocs): Return zero if
1759*e6c7e151Schristos	there is no arm data associated with the section.
1760*e6c7e151Schristos
1761*e6c7e151Schristos2016-08-23  Alan Modra  <amodra@gmail.com>
1762*e6c7e151Schristos
1763*e6c7e151Schristos	PR 20475
1764*e6c7e151Schristos	* elf32-or1k.c (or1k_elf_relocate_section): Offset from
1765*e6c7e151Schristos	_GLOBAL_OFFSET_TABLE_, not start of .got section.
1766*e6c7e151Schristos
1767*e6c7e151Schristos2016-08-22  Nick Clifton  <nickc@redhat.com>
1768*e6c7e151Schristos
1769*e6c7e151Schristos	* doc/chew.c (main): Free the string buffer used to files as they
1770*e6c7e151Schristos	are parsed.
1771*e6c7e151Schristos
1772*e6c7e151Schristos2016-08-22  Alan Modra  <amodra@gmail.com>
1773*e6c7e151Schristos
1774*e6c7e151Schristos	* elf32-ppc.c (ppc_elf_check_relocs): Move error for @local ifunc..
1775*e6c7e151Schristos	(ppc_elf_relocate_section): ..to here.  Comment.  Error on
1776*e6c7e151Schristos	detecting -mbss-plt -fPIC local ifuncs too.
1777*e6c7e151Schristos	(ppc_elf_size_dynamic_sections): Comment on unnecessary glink
1778*e6c7e151Schristos	branch table entries.
1779*e6c7e151Schristos
1780*e6c7e151Schristos2016-08-19  Nick Clifton  <nickc@redhat.com>
1781*e6c7e151Schristos
1782*e6c7e151Schristos	* elf.c (assign_section_numbers): Assign number for the .shstrtab
1783*e6c7e151Schristos	section after the symbol table and string table sections.
1784*e6c7e151Schristos
1785*e6c7e151Schristos2016-08-19  Alan Modra  <amodra@gmail.com>
1786*e6c7e151Schristos
1787*e6c7e151Schristos	* elf64-ppc.c (struct ppc_link_hash_entry): Add weakref.
1788*e6c7e151Schristos	(ppc64_elf_copy_indirect_symbol): Set weakref.  Don't merge
1789*e6c7e151Schristos	dyn_relocs for weakdefs.
1790*e6c7e151Schristos	(alias_readonly_dynrelocs): New function.
1791*e6c7e151Schristos	(ppc64_elf_adjust_dynamic_symbol): Use alias_readonly_dynrelocs.
1792*e6c7e151Schristos	(ppc64_elf_relocate_section): Simplify condition under which
1793*e6c7e151Schristos	dyn_relocs are emitted.
1794*e6c7e151Schristos
1795*e6c7e151Schristos2016-08-19  Alan Modra  <amodra@gmail.com>
1796*e6c7e151Schristos
1797*e6c7e151Schristos	PR 20472
1798*e6c7e151Schristos	* elf64-ppc.c (ppc64_elf_before_check_relocs): Tweak abiversion test.
1799*e6c7e151Schristos	(readonly_dynrelocs): Comment fix.
1800*e6c7e151Schristos	(global_entry_stub): New function.
1801*e6c7e151Schristos	(ppc64_elf_adjust_dynamic_symbol): Tweak abiversion test.  Match
1802*e6c7e151Schristos	ELFv2 code deciding on dynamic relocs vs. global entry stubs to
1803*e6c7e151Schristos	that in size_global_entry_stubs, handling ifunc too.  Delete dead
1804*e6c7e151Schristos	weak sym code.
1805*e6c7e151Schristos	(allocate_dynrelocs): Ensure dyn_relocs field is cleared when no
1806*e6c7e151Schristos	dyn_relocs are needed.  Correct handling of ifunc dyn_relocs.
1807*e6c7e151Schristos	Tidy ELIMINATE_COPY_RELOCS code, only setting dynindx for
1808*e6c7e151Schristos	undefweak syms.  Expand and correct comments.
1809*e6c7e151Schristos	(size_global_entry_stubs): Ensure symbol is defined.
1810*e6c7e151Schristos	(ppc64_elf_relocate_section): Match condition under which
1811*e6c7e151Schristos	dyn_relocs are emitted to that in allocate_dynrelocs.
1812*e6c7e151Schristos
1813*e6c7e151Schristos2016-08-12  Alan Modra  <amodra@gmail.com>
1814*e6c7e151Schristos
1815*e6c7e151Schristos	* elf-bfd.h (struct elf_link_hash_table): Add local_dynsymcount.
1816*e6c7e151Schristos	* elflink.c (_bfd_elf_link_renumber_dynsyms): Set local_dynsymcount.
1817*e6c7e151Schristos	(bfd_elf_final_link): Set .dynsym sh_info from local_dynsymcount.
1818*e6c7e151Schristos
1819*e6c7e151Schristos2016-08-11  Alan Modra  <amodra@gmail.com>
1820*e6c7e151Schristos
1821*e6c7e151Schristos	* elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Don't exit with
1822*e6c7e151Schristos	non_got_ref true in any case where we could have generated dynbss
1823*e6c7e151Schristos	copies but decide not to do so.
1824*e6c7e151Schristos
1825*e6c7e151Schristos2016-08-10  Maciej W. Rozycki  <macro@imgtec.com>
1826*e6c7e151Schristos
1827*e6c7e151Schristos	* elfxx-mips.c (mips_elf_add_la25_stub): Clear the ISA bit of
1828*e6c7e151Schristos	the stub address retrieved if associated with a microMIPS
1829*e6c7e151Schristos	function.
1830*e6c7e151Schristos
1831*e6c7e151Schristos2016-08-10  Maciej W. Rozycki  <macro@imgtec.com>
1832*e6c7e151Schristos
1833*e6c7e151Schristos	* elfxx-mips.c (mips_elf_create_stub_symbol): For a microMIPS
1834*e6c7e151Schristos	stub also add STO_MICROMIPS annotation.
1835*e6c7e151Schristos
1836*e6c7e151Schristos2016-08-10  Maciej W. Rozycki  <macro@imgtec.com>
1837*e6c7e151Schristos
1838*e6c7e151Schristos	* elfxx-mips.c (mips_elf_calculate_relocation): Set the ISA bit
1839*e6c7e151Schristos	in microMIPS LA25 stub references.
1840*e6c7e151Schristos
1841*e6c7e151Schristos2016-08-09  Jiaming Wei  <jmwei@hxgpt.com>
1842*e6c7e151Schristos
1843*e6c7e151Schristos	* elf64-alpha.c (elf64_alpha_copy_indirect_symbol): Fix thinko
1844*e6c7e151Schristos	adjusting the use_count of merged .got entries.
1845*e6c7e151Schristos
1846*e6c7e151Schristos2016-08-08  Nick Clifton  <nickc@redhat.com>
1847*e6c7e151Schristos
1848*e6c7e151Schristos	* doc/chew.c (delete_string): Only free the string buffer if it is
1849*e6c7e151Schristos	there.  Mark the buffer as NULL after freeing.
1850*e6c7e151Schristos	(drop): Free the dropped string.
1851*e6c7e151Schristos	(free_words): New function: Frees the memory allocated to the
1852*e6c7e151Schristos	dictionary.
1853*e6c7e151Schristos	(add_instrinsic): Duplicate the name string, so that it can be
1854*e6c7e151Schristos	freed later on.
1855*e6c7e151Schristos	(compile): Free unused words.
1856*e6c7e151Schristos	(main): Free the dictionary and top level string buffers at the
1857*e6c7e151Schristos	end.
1858*e6c7e151Schristos
1859*e6c7e151Schristos2016-08-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
1860*e6c7e151Schristos
1861*e6c7e151Schristos	* bfd-in.h (bfd_elf32_arm_set_target_relocs): Add one parameter.
1862*e6c7e151Schristos	* bfd-in2.h: Regenerate.
1863*e6c7e151Schristos	* elf32-arm.c (struct elf32_arm_link_hash_table): Declare new
1864*e6c7e151Schristos	cmse_implib field.
1865*e6c7e151Schristos	(bfd_elf32_arm_set_target_relocs): Add new parameter to initialize
1866*e6c7e151Schristos	cmse_implib field in struct elf32_arm_link_hash_table.
1867*e6c7e151Schristos	(elf32_arm_filter_cmse_symbols): New function.
1868*e6c7e151Schristos	(elf32_arm_filter_implib_symbols): Likewise.
1869*e6c7e151Schristos	(elf_backend_filter_implib_symbols): Define to
1870*e6c7e151Schristos	elf32_arm_filter_implib_symbols.
1871*e6c7e151Schristos
1872*e6c7e151Schristos2016-08-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
1873*e6c7e151Schristos
1874*e6c7e151Schristos	* elf32-arm.c (CMSE_PREFIX): Define macro.
1875*e6c7e151Schristos	(elf32_arm_stub_cmse_branch_thumb_only): Define stub sequence.
1876*e6c7e151Schristos	(cmse_branch_thumb_only): Declare stub.
1877*e6c7e151Schristos	(struct elf32_arm_link_hash_table): Define cmse_stub_sec field.
1878*e6c7e151Schristos	(elf32_arm_get_plt_info): Add globals parameter.  Use it to return
1879*e6c7e151Schristos	FALSE if there is no PLT.
1880*e6c7e151Schristos	(arm_type_of_stub): Adapt to new elf32_arm_get_plt_info signature.
1881*e6c7e151Schristos	(elf32_arm_final_link_relocate): Likewise.
1882*e6c7e151Schristos	(elf32_arm_gc_sweep_hook): Likewise.
1883*e6c7e151Schristos	(elf32_arm_gc_mark_extra_sections): Mark sections holding ARMv8-M
1884*e6c7e151Schristos	secure entry functions.
1885*e6c7e151Schristos	(arm_stub_is_thumb): Add case for arm_stub_cmse_branch_thumb_only.
1886*e6c7e151Schristos	(arm_dedicated_stub_output_section_required): Change to a switch case
1887*e6c7e151Schristos	and add a case for arm_stub_cmse_branch_thumb_only.
1888*e6c7e151Schristos	(arm_dedicated_stub_output_section_required_alignment): Likewise.
1889*e6c7e151Schristos	(arm_stub_dedicated_output_section_name): Likewise.
1890*e6c7e151Schristos	(arm_stub_dedicated_input_section_ptr): Likewise and remove
1891*e6c7e151Schristos	ATTRIBUTE_UNUSED for htab parameter.
1892*e6c7e151Schristos	(arm_stub_required_alignment): Likewise.
1893*e6c7e151Schristos	(arm_stub_sym_claimed): Likewise.
1894*e6c7e151Schristos	(arm_dedicated_stub_section_padding): Likewise.
1895*e6c7e151Schristos	(cmse_scan): New function.
1896*e6c7e151Schristos	(elf32_arm_size_stubs): Call cmse_scan for ARM M profile targets.
1897*e6c7e151Schristos	Set stub_changed to TRUE if such veneers were created.
1898*e6c7e151Schristos	(elf32_arm_swap_symbol_in): Add detection code for CMSE special
1899*e6c7e151Schristos	symbols.
1900*e6c7e151Schristos
1901*e6c7e151Schristos2016-08-02  Alan Modra  <amodra@gmail.com>
1902*e6c7e151Schristos
1903*e6c7e151Schristos	PR ld/20428
1904*e6c7e151Schristos	* elf64-ppc.c (ppc_get_stub_entry): Don't segfault on NULL group.
1905*e6c7e151Schristos
1906*e6c7e151Schristos2016-08-02  Nick Clifton  <nickc@redhat.com>
1907*e6c7e151Schristos
1908*e6c7e151Schristos	PR ld/17739
1909*e6c7e151Schristos	* elf32-sh.c (sh_elf_gc_sweep_hook): Delete.
1910*e6c7e151Schristos	(elf_backend_sweep_hook): Delete.
1911*e6c7e151Schristos
1912*e6c7e151Schristos2016-08-01  Andrew Jenner  <andrew@codesourcery.com>
1913*e6c7e151Schristos	Kwok Cheung Yeung  <kcy@codesourcery.com>
1914*e6c7e151Schristos
1915*e6c7e151Schristos	* elf32-ppc.c (is_branch_reloc): Recognise VLE branch relocations.
1916*e6c7e151Schristos	(ppc_elf_howto_raw): Fix dst_mask of R_PPC_VLE_REL15.
1917*e6c7e151Schristos	(ppc_elf_vle_split16): Clear field before inserting.
1918*e6c7e151Schristos
1919*e6c7e151Schristos2016-08-01  Nick Clifton  <nickc@redhat.com>
1920*e6c7e151Schristos
1921*e6c7e151Schristos	* po/sv.po: Updated Swedish translation.
1922*e6c7e151Schristos
1923*e6c7e151Schristos2016-07-27  Ozkan Sezer  <sezeroz@gmail.com>
1924*e6c7e151Schristos	    Nick Clifton  <nickc@redhat.com>
1925*e6c7e151Schristos
1926*e6c7e151Schristos	PR ld/20401
1927*e6c7e151Schristos	* coffgen.c (fini_reloc_cookie_rels): Check for the extistence
1928*e6c7e151Schristos	of the coff_section_data before using it.
1929*e6c7e151Schristos
1930*e6c7e151Schristos2016-07-26  Maciej W. Rozycki  <macro@imgtec.com>
1931*e6c7e151Schristos
1932*e6c7e151Schristos	* elfxx-mips.c (mips_elf_calculate_relocation): Handle branches
1933*e6c7e151Schristos	in PLT compression selection.
1934*e6c7e151Schristos	(_bfd_mips_elf_check_relocs): Likewise.
1935*e6c7e151Schristos
1936*e6c7e151Schristos2016-07-22  Cupertino Miranda  <cmiranda@synopsys.com>
1937*e6c7e151Schristos
1938*e6c7e151Schristos	* arc-got.h (relocate_fix_got_relocs_for_got_info): Handle the
1939*e6c7e151Schristos	case where there's no elf_link_hash_entry while processing
1940*e6c7e151Schristos	GOT_NORMAL got entries.
1941*e6c7e151Schristos
1942*e6c7e151Schristos2016-07-21  H.J. Lu  <hongjiu.lu@intel.com>
1943*e6c7e151Schristos
1944*e6c7e151Schristos	* version.m4 (BFD_VERSION): Set to 2.27.51.
1945*e6c7e151Schristos	* configure: Regenerated.
1946*e6c7e151Schristos
1947*e6c7e151Schristos2016-07-21  Nick Clifton  <nickc@redhat.com>
1948*e6c7e151Schristos
1949*e6c7e151Schristos	* elf.c (_bfd_elf_filter_global_symbols): Skip local symbols.
1950*e6c7e151Schristos	(swap_out_syms): Return an error when not finding ELF output
1951*e6c7e151Schristos	section rather than asserting.
1952*e6c7e151Schristos
1953*e6c7e151Schristos2016-07-21  Thomas Preud'homme  <thomas.preudhomme@arm.com>
1954*e6c7e151Schristos
1955*e6c7e151Schristos	* elflink.c (elf_output_implib): Call bfd_set_error on no symbols.
1956*e6c7e151Schristos
1957*e6c7e151Schristos2016-07-20  John Baldwin  <jhb@FreeBSD.org>
1958*e6c7e151Schristos
1959*e6c7e151Schristos	* elf.c (elfcore_grok_freebsd_psinfo): Check for minimum note size
1960*e6c7e151Schristos	and handle pr_pid if present.
1961*e6c7e151Schristos
1962*e6c7e151Schristos2016-07-20  H.J. Lu  <hongjiu.lu@intel.com>
1963*e6c7e151Schristos
1964*e6c7e151Schristos	PR ld/20376
1965*e6c7e151Schristos	* elf.c (assign_file_positions_for_load_sections): Also check
1966*e6c7e151Schristos	p_paddr for program header space.
1967*e6c7e151Schristos
1968*e6c7e151Schristos2016-07-20  Alan Modra  <amodra@gmail.com>
1969*e6c7e151Schristos
1970*e6c7e151Schristos	* elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_PLTREL32>): Put
1971*e6c7e151Schristos	ppc64_elf_unhandled_reloc for special_function.
1972*e6c7e151Schristos	* elf32-ppc.c (ppc_elf_howto_raw): Similarly for lots of relocs.
1973*e6c7e151Schristos
1974*e6c7e151Schristos2016-07-19  Maciej W. Rozycki  <macro@imgtec.com>
1975*e6c7e151Schristos
1976*e6c7e151Schristos	* elfxx-mips.c (mips_elf_perform_relocation): Convert cross-mode
1977*e6c7e151Schristos	BAL to JALX.
1978*e6c7e151Schristos	(_bfd_mips_elf_relocate_section) <bfd_reloc_outofrange>: Add a
1979*e6c7e151Schristos	corresponding error message.
1980*e6c7e151Schristos
1981*e6c7e151Schristos2016-07-19  Maciej W. Rozycki  <macro@imgtec.com>
1982*e6c7e151Schristos
1983*e6c7e151Schristos	* elfxx-mips.c (b_reloc_p): Add R_MICROMIPS_PC16_S1,
1984*e6c7e151Schristos	R_MICROMIPS_PC10_S1 and R_MICROMIPS_PC7_S1.
1985*e6c7e151Schristos	(branch_reloc_p): New function.
1986*e6c7e151Schristos	(mips_elf_calculate_relocation): Handle ISA mode determination
1987*e6c7e151Schristos	for relocations against section symbols, against absolute
1988*e6c7e151Schristos	symbols and absolute relocations.  Also set `*cross_mode_jump_p'
1989*e6c7e151Schristos	for branches.
1990*e6c7e151Schristos	<R_MIPS16_26, R_MIPS_26, R_MICROMIPS_26_S1>: Suppress alignment
1991*e6c7e151Schristos	checks for weak undefined symbols.  Also check target alignment
1992*e6c7e151Schristos	within the same ISA mode.
1993*e6c7e151Schristos	<R_MIPS_PC16, R_MIPS_GNU_REL16_S2>: Handle cross-mode branches
1994*e6c7e151Schristos	in the alignment check.
1995*e6c7e151Schristos	<R_MICROMIPS_PC7_S1>: Add an alignment check.
1996*e6c7e151Schristos	<R_MICROMIPS_PC10_S1>: Likewise.
1997*e6c7e151Schristos	<R_MICROMIPS_PC16_S1>: Likewise.
1998*e6c7e151Schristos	(mips_elf_perform_relocation): Report a failure for unsupported
1999*e6c7e151Schristos	same-mode JALX instructions and cross-mode branches.
2000*e6c7e151Schristos	(_bfd_mips_elf_relocate_section) <bfd_reloc_outofrange>: Add
2001*e6c7e151Schristos	error messages for jumps to misaligned addresses.
2002*e6c7e151Schristos
2003*e6c7e151Schristos2016-07-16  Alan Modra  <amodra@gmail.com>
2004*e6c7e151Schristos
2005*e6c7e151Schristos	* elflink.c: Include plugin-api.h.
2006*e6c7e151Schristos	* plugin.c (bfd_plugin_open_input): New function, extracted from..
2007*e6c7e151Schristos	(try_claim): ..here.
2008*e6c7e151Schristos	* plugin.h: Don't include bfd.h.
2009*e6c7e151Schristos	(bfd_plugin_open_input): Declare.
2010*e6c7e151Schristos
2011*e6c7e151Schristos2016-07-16  Alan Modra  <amodra@gmail.com>
2012*e6c7e151Schristos
2013*e6c7e151Schristos	* targets.c (bfd_seach_for_target): Rename to..
2014*e6c7e151Schristos	(bfd_iterate_over_targets): ..this.  Rewrite doc.
2015*e6c7e151Schristos	* bfd-in2.h: Regenerate.
2016*e6c7e151Schristos
2017*e6c7e151Schristos2016-07-16  Alan Modra  <amodra@gmail.com>
2018*e6c7e151Schristos
2019*e6c7e151Schristos	* archures.c (bfd_default_set_arch_mach): Make available in bfd.h.
2020*e6c7e151Schristos	* libbfd.h: Regenerate.
2021*e6c7e151Schristos	* bfd-in2.h: Regenerate.
2022*e6c7e151Schristos
2023*e6c7e151Schristos2016-07-16  Alan Modra  <amodra@gmail.com>
2024*e6c7e151Schristos
2025*e6c7e151Schristos	* libbfd-in.h (BFD_ALIGN): Move to..
2026*e6c7e151Schristos	* bfd-in.h: ..here.
2027*e6c7e151Schristos	* elf32-ppc.h (struct ppc_elf_params): Add pagesize.
2028*e6c7e151Schristos	* elf32-ppc.c (default_params): Adjust init.
2029*e6c7e151Schristos	(ppc_elf_link_params): Set pagesize_p2.
2030*e6c7e151Schristos	* libbfd.h: Regenerate.
2031*e6c7e151Schristos	* bfd-in2.h: Regenerate.
2032*e6c7e151Schristos
2033*e6c7e151Schristos2016-07-15  Thomas Preud'homme  <thomas.preudhomme@arm.com>
2034*e6c7e151Schristos
2035*e6c7e151Schristos	* elf-bfd.h (elf_backend_filter_implib_symbols): Declare backend hook.
2036*e6c7e151Schristos	(_bfd_elf_filter_global_symbols): Declare.
2037*e6c7e151Schristos	* elf.c (_bfd_elf_filter_global_symbols): New function.
2038*e6c7e151Schristos	* elflink.c (elf_filter_global_symbols): Likewise.
2039*e6c7e151Schristos	(elf_output_implib): Likewise.
2040*e6c7e151Schristos	(bfd_elf_final_link): Call above function, failing if it does.
2041*e6c7e151Schristos	* elfxx-target.h (elf_backend_filter_implib_symbols): Define macro and
2042*e6c7e151Schristos	default it to NULL.
2043*e6c7e151Schristos	(elf_backend_copy_indirect_symbol): Fix spacing.
2044*e6c7e151Schristos	(elf_backend_hide_symbol): Likewise.
2045*e6c7e151Schristos	(elfNN_bed): Initialize elf_backend_filter_implib_symbols backend hook.
2046*e6c7e151Schristos
2047*e6c7e151Schristos2016-07-15  Andrew Burgess  <andrew.burgess@embecosm.com>
2048*e6c7e151Schristos	    Nick Clifton  <nickc@redhat.com>
2049*e6c7e151Schristos
2050*e6c7e151Schristos	* elf32-arc.c (PR_DEBUG): Delete.
2051*e6c7e151Schristos	Fix printing of debug information.  Fix formatting of debug
2052*e6c7e151Schristos	statements.
2053*e6c7e151Schristos	(debug_arc_reloc): Handle symbols that are not from an input file.
2054*e6c7e151Schristos	(arc_do_relocation): Remove excessive exclamation points.
2055*e6c7e151Schristos
2056*e6c7e151Schristos	* arc-got.h: Fix formatting.  Fix printing of debug information.
2057*e6c7e151Schristos	(new_got_entry_to_list): Use xmalloc.
2058*e6c7e151Schristos	* config.bfd: use the big-endian arc vector as the default vector
2059*e6c7e151Schristos	for big-endian arc targets.
2060*e6c7e151Schristos
2061*e6c7e151Schristos2016-07-15  Alan Modra  <amodra@gmail.com>
2062*e6c7e151Schristos
2063*e6c7e151Schristos	* cofflink.c (mark_relocs): Exclude relocs with -1 r_symndx
2064*e6c7e151Schristos	from marking sym_indices.
2065*e6c7e151Schristos
2066*e6c7e151Schristos2016-07-14  Maciej W. Rozycki  <macro@imgtec.com>
2067*e6c7e151Schristos
2068*e6c7e151Schristos	* reloc.c (bfd_perform_relocation): Try the `howto' handler
2069*e6c7e151Schristos	first with relocations against absolute symbols.
2070*e6c7e151Schristos	(bfd_install_relocation): Likewise.
2071*e6c7e151Schristos
2072*e6c7e151Schristos2016-07-12  H.J. Lu  <hongjiu.lu@intel.com>
2073*e6c7e151Schristos
2074*e6c7e151Schristos	* elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
2075*e6c7e151Schristos	.got/.got.plt sections to 8 bytes.
2076*e6c7e151Schristos
2077*e6c7e151Schristos2016-07-12  Nick Clifton  <nickc@redhat.com>
2078*e6c7e151Schristos
2079*e6c7e151Schristos	* binary.c (binary_set_section_contents): Second grammar fix.
2080*e6c7e151Schristos
2081*e6c7e151Schristos2016-07-12  Douglas B Rupp  <rupp@adacore.com>
2082*e6c7e151Schristos
2083*e6c7e151Schristos	* binary.c (binary_set_section_contents): Fix grammar in warning
2084*e6c7e151Schristos	message.
2085*e6c7e151Schristos
2086*e6c7e151Schristos2016-07-11  Cupertino Miranda  <cmiranda@synopsys.com>
2087*e6c7e151Schristos
2088*e6c7e151Schristos	* elf32-arc.c: made PR_DEBUG always defined.
2089*e6c7e151Schristos
2090*e6c7e151Schristos2016-07-11  Cupertino Miranda  <cmiranda@synopsys.com>
2091*e6c7e151Schristos
2092*e6c7e151Schristos	* arc-got.h: Moved got related structures from elf32-arc.c to
2093*e6c7e151Schristos	this file. More precisely, tls_type_e, tls_got_entries, got_entry.
2094*e6c7e151Schristos	* (arc_get_local_got_ents, got_entry_for_type, new_got_entry_to_list,
2095*e6c7e151Schristos	tls_type_for_reloc, symbol_has_entry_of_type,
2096*e6c7e151Schristos	get_got_entry_list_for_symbol, arc_got_entry_type_for_reloc,
2097*e6c7e151Schristos	ADD_SYMBOL_REF_SEC_AND_RELOC, rc_fill_got_info_for_reloc,
2098*e6c7e151Schristos	relocate_fix_got_relocs_for_got_info,
2099*e6c7e151Schristos	create_got_dynrelocs_for_single_entry,
2100*e6c7e151Schristos	create_got_dynrelocs_for_got_info): Added to file.
2101*e6c7e151Schristos	* elf32-arc.c: Removed GOT & TLS related structs and functions to
2102*e6c7e151Schristos	arc-got.h.
2103*e6c7e151Schristos
2104*e6c7e151Schristos2016-07-08  James Bowman  <james.bowman@ftdichip.com>
2105*e6c7e151Schristos
2106*e6c7e151Schristos	* elf32-ft32.c (ft32_reloc_map): Use R_FT32_32 for BFD_RELOC_32.
2107*e6c7e151Schristos
2108*e6c7e151Schristos2016-07-05  Andre Vieria  <andre.simoesdiasvieira@arm.com>
2109*e6c7e151Schristos
2110*e6c7e151Schristos	* elf32-arm.c (THUMB32_MOVT): New veneer macro.
2111*e6c7e151Schristos	(THUMB32_MOVW): Likewise.
2112*e6c7e151Schristos	(elf32_arm_stub_long_branch_thumb2_only_pure): New.
2113*e6c7e151Schristos	(DEF_STUBS): Define long_branch_thumb2_only_pure.
2114*e6c7e151Schristos	(arm_stub_is_thumb): Add new veneer stub.
2115*e6c7e151Schristos	(arm_type_of_stub): Use new veneer.
2116*e6c7e151Schristos	(arm_stub_required_alignment): Add new veneer.
2117*e6c7e151Schristos
2118*e6c7e151Schristos2016-07-05  Andre Vieria  <andre.simoesdiasvieira@arm.com>
2119*e6c7e151Schristos
2120*e6c7e151Schristos	* bfd-in2.h (SEC_ELF_NOREAD): Rename to ...
2121*e6c7e151Schristos	(SEC_ELF_PURECODE): ... this.
2122*e6c7e151Schristos	* elf32-arm.c (elf32_arm_post_process_headers): Rename SEC_ELF_NOREAD
2123*e6c7e151Schristos	to SEC_ELF_NOREAD.
2124*e6c7e151Schristos	(elf32_arm_fake_sections): Likewise.
2125*e6c7e151Schristos	(elf_32_arm_section_flags): Likewise.
2126*e6c7e151Schristos	(elf_32_arm_lookup_section_flags): Likewise.
2127*e6c7e151Schristos	* section.c (SEC_ELF_NOREAD): Rename to ...
2128*e6c7e151Schristos	(SEC_ELF_PURECODE): ... this.
2129*e6c7e151Schristos
2130*e6c7e151Schristos2016-07-01  Thomas Preud'homme  <thomas.preudhomme@arm.com>
2131*e6c7e151Schristos
2132*e6c7e151Schristos	* elf32-arm.c (using_thumb2_bl): New function.
2133*e6c7e151Schristos	(arm_type_of_stub): Declare thumb2 variable together and change type
2134*e6c7e151Schristos	to bfd_boolean.  Use using_thumb2_bl () to determine whether
2135*e6c7e151Schristos	THM_MAX_FWD_BRANCH_OFFSET or THM2_MAX_FWD_BRANCH_OFFSET should be
2136*e6c7e151Schristos	checked for BL range.
2137*e6c7e151Schristos	(elf32_arm_final_link_relocate): Use using_thumb2_bl () to determine
2138*e6c7e151Schristos	the bit size of BL offset.
2139*e6c7e151Schristos
2140*e6c7e151Schristos2016-06-29  Nick Clifton  <nickc@redhat.com>
2141*e6c7e151Schristos
2142*e6c7e151Schristos	* elfnn-aarch64.c (is_aarch64_mapping_symbol): New function.
2143*e6c7e151Schristos	Returns TRUE for AArch64 mapping symbols.
2144*e6c7e151Schristos	(elfNN_aarch64_backend_symbol_processing): New function.  Marks
2145*e6c7e151Schristos	mapping symbols as precious in object files so that they will not
2146*e6c7e151Schristos	be stripped.
2147*e6c7e151Schristos	(elf_backend_symbol_processing): Define.
2148*e6c7e151Schristos
2149*e6c7e151Schristos	* elf32-arm.c (is_arm_mapping_symbol): New function.  Returns TRUE
2150*e6c7e151Schristos	for ARM mapping symbols.
2151*e6c7e151Schristos	(elf32_arm_backend_symbol_processing): Make use of the new function.
2152*e6c7e151Schristos
2153*e6c7e151Schristos2016-06-28  H.J. Lu  <hongjiu.lu@intel.com>
2154*e6c7e151Schristos
2155*e6c7e151Schristos	PR ld/20306
2156*e6c7e151Schristos	* elflink.c (elf_link_check_versioned_symbol): Return false
2157*e6c7e151Schristos	for unreferenced undefined symbol.
2158*e6c7e151Schristos
2159*e6c7e151Schristos2016-06-28  Nick Clifton  <nickc@redhat.com>
2160*e6c7e151Schristos
2161*e6c7e151Schristos	* elf32-bfin.c (bfin_adjust_dynamic_symbol): Fail if a COPY reloc
2162*e6c7e151Schristos	is needed.
2163*e6c7e151Schristos
2164*e6c7e151Schristos	* elf32-arm.c (elf32_arm_backend_symbol_processing): New
2165*e6c7e151Schristos	function.  Marks mapping symbols in object files as precious, so
2166*e6c7e151Schristos	that strip will not remove them.
2167*e6c7e151Schristos	(elf_backend_symbol_processing): Define.
2168*e6c7e151Schristos
2169*e6c7e151Schristos2016-06-28  James Clarke  <jrtc27@jrtc27.com>
2170*e6c7e151Schristos
2171*e6c7e151Schristos	* elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Don't convert
2172*e6c7e151Schristos	R_SPARC_32 to R_SPARC_RELATIVE if class is ELFCLASS64.
2173*e6c7e151Schristos
2174*e6c7e151Schristos2016-06-28  Maciej W. Rozycki  <macro@imgtec.com>
2175*e6c7e151Schristos
2176*e6c7e151Schristos	* elf32-mips.c (elf_mips16_howto_table_rel): Add
2177*e6c7e151Schristos	R_MIPS16_PC16_S1.
2178*e6c7e151Schristos	(mips16_reloc_map): Likewise.
2179*e6c7e151Schristos	* elf64-mips.c (mips16_elf64_howto_table_rel): Likewise.
2180*e6c7e151Schristos	(mips16_elf64_howto_table_rela): Likewise.
2181*e6c7e151Schristos	(mips16_reloc_map): Likewise.
2182*e6c7e151Schristos	* elfn32-mips.c (elf_mips16_howto_table_rel): Likewise.
2183*e6c7e151Schristos	(elf_mips16_howto_table_rela): Likewise.
2184*e6c7e151Schristos	(mips16_reloc_map): Likewise.
2185*e6c7e151Schristos	* elfxx-mips.c (mips16_branch_reloc_p): New function.
2186*e6c7e151Schristos	(mips16_reloc_p): Handle R_MIPS16_PC16_S1.
2187*e6c7e151Schristos	(b_reloc_p): Likewise.
2188*e6c7e151Schristos	(mips_elf_calculate_relocation): Likewise.
2189*e6c7e151Schristos	(_bfd_mips_elf_check_relocs): Likewise.
2190*e6c7e151Schristos	* reloc.c (BFD_RELOC_MIPS16_16_PCREL_S1): New relocation.
2191*e6c7e151Schristos	* bfd-in2.h: Regenerate.
2192*e6c7e151Schristos	* libbfd.h: Regenerate.
2193*e6c7e151Schristos
2194*e6c7e151Schristos2016-06-27  Alan Modra  <amodra@gmail.com>
2195*e6c7e151Schristos
2196*e6c7e151Schristos	PR ld/19264
2197*e6c7e151Schristos	* elf64-ppc.c (STUB_SHRINK_ITER): Define.
2198*e6c7e151Schristos	(ppc64_elf_size_stubs): Exit stub sizing loop past STUB_SHRINK_ITER
2199*e6c7e151Schristos	if shrinking stubs.
2200*e6c7e151Schristos	(ppc64_elf_size_stubs): Adjust to suit.
2201*e6c7e151Schristos
2202*e6c7e151Schristos2016-06-27  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
2203*e6c7e151Schristos
2204*e6c7e151Schristos	* elf32-dlx.h: New file.
2205*e6c7e151Schristos	* elf32-dlx.c: Adjust.
2206*e6c7e151Schristos
2207*e6c7e151Schristos2016-06-25  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
2208*e6c7e151Schristos
2209*e6c7e151Schristos	* elf32-xtensa.c (xtensa_make_property_section): Remove prototype.
2210*e6c7e151Schristos
2211*e6c7e151Schristos2016-06-24  John Baldwin  <jhb@FreeBSD.org>
2212*e6c7e151Schristos
2213*e6c7e151Schristos	* elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PROCSTAT_AUXV
2214*e6c7e151Schristos	notes.
2215*e6c7e151Schristos
2216*e6c7e151Schristos2016-06-24  John Baldwin  <jhb@FreeBSD.org>
2217*e6c7e151Schristos
2218*e6c7e151Schristos	* elf.c (elfcore_grok_note): Remove handling of NT_X86_XSTATE for
2219*e6c7e151Schristos	FreeBSD.  Remove case for NT_FREEBSD_THRMISC.
2220*e6c7e151Schristos	(elfcore_grok_freebsd_psinfo): New function.
2221*e6c7e151Schristos	(elfcore_grok_freebsd_prstatus): New function.
2222*e6c7e151Schristos	(elfcore_grok_freebsd_note): New function.
2223*e6c7e151Schristos	(elf_parse_notes): Use "elfcore_grok_freebsd_note" for "FreeBSD"
2224*e6c7e151Schristos	notes.
2225*e6c7e151Schristos
2226*e6c7e151Schristos2016-06-24  Joel Brobecker  <brobecker@adacore.com>
2227*e6c7e151Schristos
2228*e6c7e151Schristos	* elflink.c: Check the value of BFD_SUPPORTS_PLUGINS rather
2229*e6c7e151Schristos	than its existance.
2230*e6c7e151Schristos
2231*e6c7e151Schristos2016-06-24  Alan Modra  <amodra@gmail.com>
2232*e6c7e151Schristos
2233*e6c7e151Schristos	* config.bfd: Delete mips vxworks patterns matched earlier.
2234*e6c7e151Schristos	Combine mips*-*-none with mips*-*-elf*.
2235*e6c7e151Schristos
2236*e6c7e151Schristos2016-06-21  Maciej W. Rozycki  <macro@imgtec.com>
2237*e6c7e151Schristos
2238*e6c7e151Schristos	* elfxx-mips.c (mips_elf_perform_relocation): Call
2239*e6c7e151Schristos	`info->callbacks->einfo' rather than `*_bfd_error_handler' and
2240*e6c7e151Schristos	use the `%X%H' format for the cross-mode jump conversion error
2241*e6c7e151Schristos	message.  Remove the full stop from the end of the message.
2242*e6c7e151Schristos	Continue processing rather than returning failure.
2243*e6c7e151Schristos
2244*e6c7e151Schristos2016-06-21  Graham Markall  <graham.markall@embecosm.com>
2245*e6c7e151Schristos
2246*e6c7e151Schristos	* archures.c: Remove bfd_mach_arc_nps400.
2247*e6c7e151Schristos	* bfd-in2.h: Likewise.
2248*e6c7e151Schristos	* cpu-arc.c (arch_info_struct): Likewise.
2249*e6c7e151Schristos	* elf32-arc.c (arc_elf_object_p, arc_elf_final_write_processing):
2250*e6c7e151Schristos	Likewise.
2251*e6c7e151Schristos
2252*e6c7e151Schristos2016-06-20  H.J. Lu  <hongjiu.lu@intel.com>
2253*e6c7e151Schristos
2254*e6c7e151Schristos	PR ld/18250
2255*e6c7e151Schristos	PR ld/20267
2256*e6c7e151Schristos	* elflink.c: Include plugin.h if BFD_SUPPORTS_PLUGINS is
2257*e6c7e151Schristos	defined.
2258*e6c7e151Schristos	(elf_link_is_defined_archive_symbol): Call
2259*e6c7e151Schristos	bfd_link_plugin_object_p on unknown plugin object and use the
2260*e6c7e151Schristos	IR symbol table if the input is an IR object.
2261*e6c7e151Schristos	* plugin.c (bfd_link_plugin_object_p): New function.
2262*e6c7e151Schristos	* plugin.h (bfd_link_plugin_object_p): New prototype.
2263*e6c7e151Schristos
2264*e6c7e151Schristos2016-06-20  H.J. Lu  <hongjiu.lu@intel.com>
2265*e6c7e151Schristos
2266*e6c7e151Schristos	PR ld/20276
2267*e6c7e151Schristos	* elflink.c (elf_link_add_object_symbols): Don't check alignment
2268*e6c7e151Schristos	on symbol from plugin dummy input.
2269*e6c7e151Schristos
2270*e6c7e151Schristos2016-06-18  H.J. Lu  <hongjiu.lu@intel.com>
2271*e6c7e151Schristos
2272*e6c7e151Schristos	* bfd.c (bfd_plugin_format): Rename bfd_plugin_uknown to
2273*e6c7e151Schristos	bfd_plugin_unknown.
2274*e6c7e151Schristos	* bfd-in2.h: Regenerated.
2275*e6c7e151Schristos	* plugin.c (bfd_plugin_object_p): Replace bfd_plugin_uknown
2276*e6c7e151Schristos	with bfd_plugin_unknown.
2277*e6c7e151Schristos
2278*e6c7e151Schristos2016-06-18  H.J. Lu  <hongjiu.lu@intel.com>
2279*e6c7e151Schristos
2280*e6c7e151Schristos	PR ld/20253
2281*e6c7e151Schristos	* elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): Add an
2282*e6c7e151Schristos	bfd_boolean argument.
2283*e6c7e151Schristos	* elf-ifunc.c (_bfd_elf_create_ifunc_sections): Replace
2284*e6c7e151Schristos	"shared object" with "PIC object" in comments.
2285*e6c7e151Schristos	(_bfd_elf_allocate_ifunc_dyn_relocs): Updated.  Replace
2286*e6c7e151Schristos	"shared object" with "PIC object" in comments.  Avoid PLT if
2287*e6c7e151Schristos	requested.  Generate dynamic relocations for non-GOT references.
2288*e6c7e151Schristos	Make room for the special first entry in PLT and allocate PLT
2289*e6c7e151Schristos	entry only for PLT and PC-relative references.  Store dynamic
2290*e6c7e151Schristos	GOT relocations in .rel[a].iplt section for static executables.
2291*e6c7e151Schristos	If PLT isn't used, always use GOT for symbol value.  Don't
2292*e6c7e151Schristos	allocate GOT entry if it isn't used.
2293*e6c7e151Schristos	* elf32-i386.c (elf_i386_check_relocs): Increment PLT reference
2294*e6c7e151Schristos	count only in the code section.  Allocate dynamic pointer
2295*e6c7e151Schristos	relocation against STT_GNU_IFUNC symbol in the non-code section.
2296*e6c7e151Schristos	(elf_i386_adjust_dynamic_symbol): Increment PLT reference count
2297*e6c7e151Schristos	only for PC-relative references.
2298*e6c7e151Schristos	(elf_i386_allocate_dynrelocs): Pass TRUE to
2299*e6c7e151Schristos	_bfd_elf_allocate_ifunc_dyn_relocs.
2300*e6c7e151Schristos	(elf_i386_relocate_section): Allow R_386_GOT32/R_386_GOT32X
2301*e6c7e151Schristos	relocations against STT_GNU_IFUNC symbols without PLT.  Generate
2302*e6c7e151Schristos	dynamic pointer relocation against STT_GNU_IFUNC symbol in
2303*e6c7e151Schristos	the non-code section and store it in the proper REL section.
2304*e6c7e151Schristos	Don't allow non-pointer relocation against STT_GNU_IFUNC symbol
2305*e6c7e151Schristos	without PLT.
2306*e6c7e151Schristos	(elf_i386_finish_dynamic_symbol): Generate dynamic
2307*e6c7e151Schristos	R_386_IRELATIVE and R_386_GLOB_DAT GOT relocations against
2308*e6c7e151Schristos	STT_GNU_IFUNC symbols without PLT.
2309*e6c7e151Schristos	(elf_i386_finish_dynamic_sections): Don't handle local
2310*e6c7e151Schristos	STT_GNU_IFUNC symbols here.
2311*e6c7e151Schristos	(elf_i386_output_arch_local_syms): Handle local STT_GNU_IFUNC
2312*e6c7e151Schristos	symbols here.
2313*e6c7e151Schristos	(elf_backend_output_arch_local_syms): New.
2314*e6c7e151Schristos	* elf32-x86-64.c (elf_i386_check_relocs): Increment PLT reference
2315*e6c7e151Schristos	count only in the code section.  Allocate dynamic pointer
2316*e6c7e151Schristos	relocation against STT_GNU_IFUNC symbol in the non-code section.
2317*e6c7e151Schristos	(elf_x86_64_adjust_dynamic_symbol): Increment PLT reference
2318*e6c7e151Schristos	count only for PC-relative references.
2319*e6c7e151Schristos	(elf_x86_64_allocate_dynrelocs): Pass TRUE to
2320*e6c7e151Schristos	_bfd_elf_allocate_ifunc_dyn_relocs.
2321*e6c7e151Schristos	(elf_x86_64_relocate_section): Allow R_X86_64_GOTPCREL,
2322*e6c7e151Schristos	R_X86_64_GOTPCRELX, R_X86_64_REX_GOTPCRELX and
2323*e6c7e151Schristos	R_X86_64_GOTPCREL64 relocations against STT_GNU_IFUNC symbols
2324*e6c7e151Schristos	without PLT.  Generate dynamic pointer relocation against
2325*e6c7e151Schristos	STT_GNU_IFUNC symbol in the non-code section and store it in
2326*e6c7e151Schristos	the proper RELA section.  Don't allow non-pointer relocation
2327*e6c7e151Schristos	against STT_GNU_IFUNC symbol without PLT.
2328*e6c7e151Schristos	(elf_x86_64_finish_dynamic_symbol): Generate dynamic
2329*e6c7e151Schristos	R_X86_64_IRELATIVE and R_X86_64_GLOB_DAT GOT relocations against
2330*e6c7e151Schristos	STT_GNU_IFUNC symbols without PLT.
2331*e6c7e151Schristos	(elf_x86_64_finish_dynamic_sections): Don't handle local
2332*e6c7e151Schristos	STT_GNU_IFUNC symbols here.
2333*e6c7e151Schristos	(elf_x86_64_output_arch_local_syms): Handle local STT_GNU_IFUNC
2334*e6c7e151Schristos	symbols here.
2335*e6c7e151Schristos	(elf_backend_output_arch_local_syms): New.
2336*e6c7e151Schristos	* elfnn-aarch64.c (elfNN_aarch64_allocate_ifunc_dynrelocs):
2337*e6c7e151Schristos	Pass FALSE to _bfd_elf_allocate_ifunc_dyn_relocs.
2338*e6c7e151Schristos
2339*e6c7e151Schristos2016-06-17  Thomas Preud'homme  <thomas.preudhomme@arm.com>
2340*e6c7e151Schristos	    Tony Wang  <tony.wang@arm.com>
2341*e6c7e151Schristos
2342*e6c7e151Schristos	* elf32-arm.c (elf32_arm_stub_long_branch_thumb2_only): Define stub
2343*e6c7e151Schristos	sequence.
2344*e6c7e151Schristos	(stub_long_branch_thumb2_only): Define stub.
2345*e6c7e151Schristos	(arm_stub_is_thumb): Add case for arm_stub_long_branch_thumb2_only.
2346*e6c7e151Schristos	(arm_stub_long_branch_thumb2_only): Likewise.
2347*e6c7e151Schristos	(arm_type_of_stub): Use arm_stub_long_branch_thumb2_only for Thumb-2
2348*e6c7e151Schristos	capable targets.
2349*e6c7e151Schristos
2350*e6c7e151Schristos2016-06-17  Jose E. Marchesi  <jose.marchesi@oracle.com>
2351*e6c7e151Schristos
2352*e6c7e151Schristos	* archures.c (bfd_mach_sparc_v8plusc): Define.
2353*e6c7e151Schristos	(bfd_mach_sparc_v9c): Likewise.
2354*e6c7e151Schristos	(bfd_mach_sparc_v8plusd): Likewise.
2355*e6c7e151Schristos	(bfd_mach_sparc_v9d): Likewise.
2356*e6c7e151Schristos	(bfd_mach_sparc_v8pluse): Likewise.
2357*e6c7e151Schristos	(bfd_mach_sparc_v9e): Likewise.
2358*e6c7e151Schristos	(bfd_mach_sparc_v8plusv): Likewise
2359*e6c7e151Schristos	(bfd_mach_sparc_v9v): Likewise.
2360*e6c7e151Schristos	(bfd_mach_sparc_v8plusm): Likewise.
2361*e6c7e151Schristos	(bfd_mach_sparc_v9m): Likewise.
2362*e6c7e151Schristos	(bfd_mach_sparc_v9_p): Adapt to v8plusm and v9m.
2363*e6c7e151Schristos	(bfd_mach_sparc_64bit_p): Likewise.
2364*e6c7e151Schristos	* bfd-in2.h: Regenerate.
2365*e6c7e151Schristos	* cpu-sparc.c (arch_info_struct): Add entries for
2366*e6c7e151Schristos	bfd_mach_sparc_v8plus{c,d,e,v,m} and bfd_mach_sparc_v9{c,d,e,v,m}.
2367*e6c7e151Schristos	* aoutx.h (machine_type): Handle bfd_mach_sparc_v8plus{c,d,e,v,m}
2368*e6c7e151Schristos	and bfd_mach_sparc_v9{c,d,e,v,m}.
2369*e6c7e151Schristos	* elf32-sparc.c (elf32_sparc_final_write_processing): Likewise.
2370*e6c7e151Schristos	* elfxx-sparc.c (_bfd_sparc_elf_object_p): Likewise.
2371*e6c7e151Schristos
2372*e6c7e151Schristos2016-06-16  H.J. Lu  <hongjiu.lu@intel.com>
2373*e6c7e151Schristos
2374*e6c7e151Schristos	* elf32-i386.c (elf_i386_check_relocs): Don't check undefined
2375*e6c7e151Schristos	symbols for relocations against IFUNC symbols.
2376*e6c7e151Schristos	* elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2377*e6c7e151Schristos
2378*e6c7e151Schristos2016-06-16  Marcin Kościelnicki  <koriakin@0x04.net>
2379*e6c7e151Schristos
2380*e6c7e151Schristos	* elf32-s390.c (elf_s390_finish_dynamic_sections): Include
2381*e6c7e151Schristos	.rela.iplt in DT_PLTRELSZ.
2382*e6c7e151Schristos	* elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise,
2383*e6c7e151Schristos	for DT_PLTRELSZ and DT_RELASZ as well.
2384*e6c7e151Schristos
2385*e6c7e151Schristos2016-06-16  H.J. Lu  <hongjiu.lu@intel.com>
2386*e6c7e151Schristos
2387*e6c7e151Schristos	* elf32-i386.c (elf_i386_check_relocs): Skip relocations in
2388*e6c7e151Schristos	non-loaded, non-alloced sections.
2389*e6c7e151Schristos	* elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2390*e6c7e151Schristos
2391*e6c7e151Schristos2016-06-15  H.J. Lu  <hongjiu.lu@intel.com>
2392*e6c7e151Schristos
2393*e6c7e151Schristos	* elf32-i386.c (elf_i386_check_relocs): Check SEC_ALLOC before
2394*e6c7e151Schristos	allocating dynamic relocation.
2395*e6c7e151Schristos	* elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2396*e6c7e151Schristos
2397*e6c7e151Schristos2016-06-14  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
2398*e6c7e151Schristos
2399*e6c7e151Schristos	PR ld/20254
2400*e6c7e151Schristos	* elf32-avr.c (elf32_avr_relax_delete_bytes): Adjust reloc
2401*e6c7e151Schristos	offsets until reloc_toaddr.
2402*e6c7e151Schristos
2403*e6c7e151Schristos2016-06-14  H.J. Lu  <hongjiu.lu@intel.com>
2404*e6c7e151Schristos
2405*e6c7e151Schristos	* elf32-i386.c (elf_i386_reloc_type_class): Check R_386_IRELATIVE.
2406*e6c7e151Schristos	Don't check symbol type for STN_UNDEF symbol index.
2407*e6c7e151Schristos	* elf64-x86-64.c (elf_x86_64_reloc_type_class): Check
2408*e6c7e151Schristos	R_X86_64_IRELATIVE.  Don't check symbol type for STN_UNDEF symbol
2409*e6c7e151Schristos	index.
2410*e6c7e151Schristos
2411*e6c7e151Schristos2016-06-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
2412*e6c7e151Schristos
2413*e6c7e151Schristos	* elf32-arm.c (using_thumb_only): Force review of arch check logic for
2414*e6c7e151Schristos	new architecture.
2415*e6c7e151Schristos	(using_thumb2): Try Tag_THUMB_ISA_use first and check
2416*e6c7e151Schristos	for exact arch value then.  Force review of arch check logic for new
2417*e6c7e151Schristos	architecture.
2418*e6c7e151Schristos	(arch_has_arm_nop): Update and fix arch check logic.  Force review of
2419*e6c7e151Schristos	that logic for new architecture.
2420*e6c7e151Schristos	(arch_has_thumb2_nop): Remove.
2421*e6c7e151Schristos	(elf32_arm_tls_relax): Use using_thumb2 instead of above function.
2422*e6c7e151Schristos	(elf32_arm_final_link_relocate): Likewise but using thumb2.
2423*e6c7e151Schristos
2424*e6c7e151Schristos2016-06-14  Alan Modra  <amodra@gmail.com>
2425*e6c7e151Schristos
2426*e6c7e151Schristos	* bfd-in.h (bfd_my_archive): Delete.
2427*e6c7e151Schristos	* bfd-in2.h: Regenerate.
2428*e6c7e151Schristos
2429*e6c7e151Schristos2016-06-14  Alan Modra  <amodra@gmail.com>
2430*e6c7e151Schristos
2431*e6c7e151Schristos	PR ld/20241
2432*e6c7e151Schristos	* archive.c (open_nested_file): Set my_archive.
2433*e6c7e151Schristos	* bfd.c (_bfd_default_error_handler <%B>): Exclude archive file name
2434*e6c7e151Schristos	for thin archives.
2435*e6c7e151Schristos	* bfdio.c (bfd_tell): Don't adjust origin for thin archives.
2436*e6c7e151Schristos	(bfd_seek): Likewise.
2437*e6c7e151Schristos	* bfdwin.c (bfd_get_file_window): Likewise.
2438*e6c7e151Schristos	* cache.c (cache_bmmap): Likewise.
2439*e6c7e151Schristos	(bfd_cache_lookup_worker): Don't look in my_archive for thin archives.
2440*e6c7e151Schristos	* mach-o.c (bfd_mach_o_follow_dsym): Don't open my_archive for
2441*e6c7e151Schristos	thin archives.
2442*e6c7e151Schristos	* plugin.c (try_claim): Likewise.
2443*e6c7e151Schristos	* xcofflink.c (xcoff_link_add_dynamic_symbols): Use import path of
2444*e6c7e151Schristos	file within thin archive, not the archive.
2445*e6c7e151Schristos
2446*e6c7e151Schristos2016-06-13  H.J. Lu  <hongjiu.lu@intel.com>
2447*e6c7e151Schristos
2448*e6c7e151Schristos	PR ld/20244
2449*e6c7e151Schristos	* elf32-i386.c (elf_i386_relocate_section): Add the .got.plt
2450*e6c7e151Schristos	section address for R_386_GOT32/R_386_GOT32X relocations against
2451*e6c7e151Schristos	IFUNC symbols if there is no base register and return error for
2452*e6c7e151Schristos	PIC.
2453*e6c7e151Schristos
2454*e6c7e151Schristos2016-06-13  H.J. Lu  <hongjiu.lu@intel.com>
2455*e6c7e151Schristos
2456*e6c7e151Schristos	* elf32-i386.c (elf_i386_relocate_section): Simplify IFUNC
2457*e6c7e151Schristos	GOT32 adjustment for static executables.
2458*e6c7e151Schristos
2459*e6c7e151Schristos2016-06-13  Maciej W. Rozycki  <macro@imgtec.com>
2460*e6c7e151Schristos
2461*e6c7e151Schristos	* elf32-mips.c (elf_mips_gnu_pcrel32): Update comment.
2462*e6c7e151Schristos
2463*e6c7e151Schristos2016-06-13  Cupertino Miranda  <cmiranda@synospsy.com>
2464*e6c7e151Schristos
2465*e6c7e151Schristos	* elf32-arc.c (elf_arc_relocate_section): Fixed condition.
2466*e6c7e151Schristos
2467*e6c7e151Schristos2016-06-13  Cupertino Miranda  <cmiranda@synospsy.com>
2468*e6c7e151Schristos
2469*e6c7e151Schristos	* elf32-arc.c (elf_arc_finish_dynamic_sections): Changed.
2470*e6c7e151Schristos
2471*e6c7e151Schristos2016-06-13  Cupertino Miranda  <cmiranda@synospsy.com>
2472*e6c7e151Schristos
2473*e6c7e151Schristos	* elf32-arc.c (arc_local_data, arc_local_data): Removed.
2474*e6c7e151Schristos	(SECTSTART): Changed.
2475*e6c7e151Schristos	(elf_arc_relocate_section): Fixed mistake in PIE related
2476*e6c7e151Schristos	condition.
2477*e6c7e151Schristos	(elf_arc_size_dynamic_sections): Changed DT_RELENT to DT_RELAENT.
2478*e6c7e151Schristos
2479*e6c7e151Schristos2016-06-13  Cupertino Miranda  <cmiranda@synospsy.com>
2480*e6c7e151Schristos
2481*e6c7e151Schristos	* elf32-arc.c (elf32_arc_reloc_type_class): Defined function to
2482*e6c7e151Schristos	enable support for "-z combreloc" and DT_RELACOUNT.
2483*e6c7e151Schristos	(elf_backend_reloc_type_class): Likewise
2484*e6c7e151Schristos
2485*e6c7e151Schristos2016-06-11  H.J. Lu  <hongjiu.lu@intel.com>
2486*e6c7e151Schristos
2487*e6c7e151Schristos	PR ld/20244
2488*e6c7e151Schristos	* elf32-i386.c (elf_i386_relocate_section): When relocating
2489*e6c7e151Schristos	R_386_GOT32, return error without a base register for PIC and
2490*e6c7e151Schristos	subtract the .got.plt section address only with a base register.
2491*e6c7e151Schristos
2492*e6c7e151Schristos2016-06-10  Alan Modra  <amodra@gmail.com>
2493*e6c7e151Schristos
2494*e6c7e151Schristos	* elf-strtab.c (struct strtab_save): Use size_t for "size".
2495*e6c7e151Schristos	(struct elf_strtab_hash): Likewise for "size" and "alloced".
2496*e6c7e151Schristos	(_bfd_elf_strtab_init): Formatting.
2497*e6c7e151Schristos	(_bfd_elf_strtab_add): Return size_t rather than bfd_size_type.
2498*e6c7e151Schristos	(_bfd_elf_strtab_addref): Take size_t idx param.
2499*e6c7e151Schristos	(_bfd_elf_strtab_delref, _bfd_elf_strtab_refcount): Likewise.
2500*e6c7e151Schristos	(_bfd_elf_strtab_offset): Likewise.
2501*e6c7e151Schristos	(_bfd_elf_strtab_clear_all_refs): Use size_t idx.
2502*e6c7e151Schristos	(_bfd_elf_strtab_save): Use size_t "idx" and "size" vars.
2503*e6c7e151Schristos	(_bfd_elf_strtab_restore, _bfd_elf_strtab_emit): Similarly.
2504*e6c7e151Schristos	(_bfd_elf_strtab_finalize): Similarly.
2505*e6c7e151Schristos	* elf-bfd.h (_bfd_elf_strtab_add): Update prototypes.
2506*e6c7e151Schristos	(_bfd_elf_strtab_addref, _bfd_elf_strtab_delref): Likewise.
2507*e6c7e151Schristos	(_bfd_elf_strtab_refcount, _bfd_elf_strtab_offset): Likewise.
2508*e6c7e151Schristos	* elf.c (bfd_elf_get_elf_syms): Calculate symbol buffer size
2509*e6c7e151Schristos	using bfd_size_type.
2510*e6c7e151Schristos	(bfd_section_from_shdr): Delete amt.
2511*e6c7e151Schristos	(_bfd_elf_init_reloc_shdr): Likewise.
2512*e6c7e151Schristos	(_bfd_elf_link_assign_sym_version): Likewise.
2513*e6c7e151Schristos	(assign_section_numbers): Use size_t reloc_count.
2514*e6c7e151Schristos	* elflink.c (struct elf_symbuf_head): Use size_t "count".
2515*e6c7e151Schristos	(bfd_elf_link_record_dynamic_symbol): Use size_t for some vars.
2516*e6c7e151Schristos	(elf_link_is_defined_archive_symbol): Likewise.
2517*e6c7e151Schristos	(elf_add_dt_needed_tag): Likewise.
2518*e6c7e151Schristos	(elf_finalize_dynstr): Likewise.
2519*e6c7e151Schristos	(elf_link_add_object_symbols): Likewise.
2520*e6c7e151Schristos	(bfd_elf_size_dynamic_sections): Likewise.
2521*e6c7e151Schristos	(elf_create_symbuf): Similarly.
2522*e6c7e151Schristos	(bfd_elf_match_symbols_in_sections): Likewise.
2523*e6c7e151Schristos	(elf_link_swap_symbols_out): Likewise.
2524*e6c7e151Schristos	(elf_link_check_versioned_symbol): Likewise.
2525*e6c7e151Schristos	(bfd_elf_gc_record_vtinherit): Likewise.
2526*e6c7e151Schristos	(bfd_elf_gc_common_finalize_got_offsets): Likewise.
2527*e6c7e151Schristos
2528*e6c7e151Schristos2016-06-08  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
2529*e6c7e151Schristos
2530*e6c7e151Schristos	PR ld/20221
2531*e6c7e151Schristos	* elf32-avr.c (elf32_avr_relax_delete_bytes): Adjust syms
2532*e6c7e151Schristos	and relocs only if shrinking occurred.
2533*e6c7e151Schristos
2534*e6c7e151Schristos2016-06-08  H.J. Lu  <hongjiu.lu@intel.com>
2535*e6c7e151Schristos
2536*e6c7e151Schristos	* elf64-i386.c (elf_i386_link_hash_entry): Add tls_get_addr.
2537*e6c7e151Schristos	(elf_i386_link_hash_newfunc): Initialize tls_get_addr to 2.
2538*e6c7e151Schristos	(elf_i386_check_tls_transition): Check indirect call and direct
2539*e6c7e151Schristos	call with the addr32 prefix for general and local dynamic models.
2540*e6c7e151Schristos	Set the tls_get_addr feild.
2541*e6c7e151Schristos	(elf_i386_convert_load_reloc): Always use addr32 prefix for
2542*e6c7e151Schristos	indirect ___tls_get_addr call via GOT.
2543*e6c7e151Schristos	(elf_i386_relocate_section): Handle GD->LE, GD->IE and LD->LE
2544*e6c7e151Schristos	transitions with indirect call and direct call with the addr32
2545*e6c7e151Schristos	prefix.
2546*e6c7e151Schristos
2547*e6c7e151Schristos2016-06-07  Marcin Kościelnicki  <koriakin@0x04.net>
2548*e6c7e151Schristos
2549*e6c7e151Schristos	* elf32-s390.c (elf_s390_finish_dynamic_symbol): Fix comment.
2550*e6c7e151Schristos	* elf64-s390.c (elf_s390x_plt_entry): Fix comment.
2551*e6c7e151Schristos	(elf_s390_relocate_section): Fix comment.
2552*e6c7e151Schristos	(elf_s390_finish_dynamic_sections): Fix initialization of fixed
2553*e6c7e151Schristos	.got.plt entries.
2554*e6c7e151Schristos
2555*e6c7e151Schristos2016-06-07  Ulrich Weigand  <ulrich.weigand@de.ibm.com>
2556*e6c7e151Schristos
2557*e6c7e151Schristos	* elf64-s390.c (elf_s390_finish_dynamic_sections): Subtract plt
2558*e6c7e151Schristos	section offset when calculation the larl operand in the first PLT
2559*e6c7e151Schristos	entry.
2560*e6c7e151Schristos
2561*e6c7e151Schristos2016-06-07  Alan Modra  <amodra@gmail.com>
2562*e6c7e151Schristos
2563*e6c7e151Schristos	* cpu-powerpc.c (powerpc_compatible): Allow bfd_mach_ppc_vle entry
2564*e6c7e151Schristos	to match other 32-bit archs.
2565*e6c7e151Schristos	* elf32-ppc.c (_bfd_elf_ppc_set_arch): New function.
2566*e6c7e151Schristos	(ppc_elf_object_p): Call it.
2567*e6c7e151Schristos	(ppc_elf_special_sections): Use APUINFO_SECTION_NAME.  Fix
2568*e6c7e151Schristos	overlong line.
2569*e6c7e151Schristos	(APUINFO_SECTION_NAME, APUINFO_LABEL): Don't define here.
2570*e6c7e151Schristos	* elf64-ppc.c (ppc64_elf_object_p): Call _bfd_elf_ppc_set_arch.
2571*e6c7e151Schristos	* bfd-in.h (_bfd_elf_ppc_at_tls_transform,
2572*e6c7e151Schristos	_bfd_elf_ppc_at_tprel_transform): Move to..
2573*e6c7e151Schristos	* elf-bfd.h: ..here.
2574*e6c7e151Schristos	(_bfd_elf_ppc_set_arch): Declare.
2575*e6c7e151Schristos	* bfd-in2.h: Regenerate.
2576*e6c7e151Schristos
2577*e6c7e151Schristos2016-06-06  H.J. Lu  <hongjiu.lu@intel.com>
2578*e6c7e151Schristos
2579*e6c7e151Schristos	* elf64-x86-64.c (elf_x86_64_link_hash_entry): Add tls_get_addr.
2580*e6c7e151Schristos	(elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 2.
2581*e6c7e151Schristos	(elf_x86_64_check_tls_transition): Check indirect call and
2582*e6c7e151Schristos	direct call with the addr32 prefix for general and local dynamic
2583*e6c7e151Schristos	models.  Set the tls_get_addr feild.
2584*e6c7e151Schristos	(elf_x86_64_convert_load_reloc): Always use addr32 prefix for
2585*e6c7e151Schristos	indirect __tls_get_addr call via GOT.
2586*e6c7e151Schristos	(elf_x86_64_relocate_section): Handle GD->LE, GD->IE and LD->LE
2587*e6c7e151Schristos	transitions with indirect call and direct call with the addr32
2588*e6c7e151Schristos	prefix.
2589*e6c7e151Schristos
2590*e6c7e151Schristos2016-06-04  Christian Groessler  <chris@groessler.org>
2591*e6c7e151Schristos
2592*e6c7e151Schristos	* coff-z8k.c (extra_case): Fix range check for R_JR relocation.
2593*e6c7e151Schristos
2594*e6c7e151Schristos2016-06-02  Nick Clifton  <nickc@redhat.com>
2595*e6c7e151Schristos
2596*e6c7e151Schristos	PR target/20088
2597*e6c7e151Schristos	* cpu-arm.c (processors): Add "arm_any" type to match any ARM
2598*e6c7e151Schristos	architecture.
2599*e6c7e151Schristos	(arch_info_struct): Likewise.
2600*e6c7e151Schristos	(architectures): Likewise.
2601*e6c7e151Schristos
2602*e6c7e151Schristos2016-06-02  Vineet Gupta  <Vineet.Gupta1@synopsys.com>
2603*e6c7e151Schristos
2604*e6c7e151Schristos	* config.bfd: Replace -uclibc with *.
2605*e6c7e151Schristos
2606*e6c7e151Schristos2016-06-02  H.J. Lu  <hongjiu.lu@intel.com>
2607*e6c7e151Schristos
2608*e6c7e151Schristos	* elf64-x86-64.c: Replace data32 with data16 in comments.
2609*e6c7e151Schristos
2610*e6c7e151Schristos2016-05-31  Alan Modra  <amodra@gmail.com>
2611*e6c7e151Schristos
2612*e6c7e151Schristos	PR ld/20159
2613*e6c7e151Schristos	PR ld/16467
2614*e6c7e151Schristos	* elflink.c (_bfd_elf_merge_symbol): Revert PR16467 change.
2615*e6c7e151Schristos	(_bfd_elf_add_default_symbol): Don't indirect to/from defined
2616*e6c7e151Schristos	symbol given a version by a script different to the version
2617*e6c7e151Schristos	of the symbol being added.
2618*e6c7e151Schristos	(elf_link_add_object_symbols): Use _bfd_elf_strtab_save and
2619*e6c7e151Schristos	_bfd_elf_strtab_restore.  Don't fudge dynstr references.
2620*e6c7e151Schristos	* elf-strtab.c (_bfd_elf_strtab_restore_size): Delete.
2621*e6c7e151Schristos	(struct strtab_save): New.
2622*e6c7e151Schristos	(_bfd_elf_strtab_save, _bfd_elf_strtab_restore): New functions.
2623*e6c7e151Schristos	* elf-bfd.h (_bfd_elf_strtab_restore_size): Delete.
2624*e6c7e151Schristos	(_bfd_elf_strtab_save, _bfd_elf_strtab_restore): Declare.
2625*e6c7e151Schristos
2626*e6c7e151Schristos2016-06-01  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
2627*e6c7e151Schristos
2628*e6c7e151Schristos	* elf32-hppa.h: Add extern "C".
2629*e6c7e151Schristos	* elf32-nds32.h: Likewise.
2630*e6c7e151Schristos	* elf32-tic6x.h: Likewise.
2631*e6c7e151Schristos
2632*e6c7e151Schristos2016-06-01  Nick Clifton  <nickc@redhat.com>
2633*e6c7e151Schristos
2634*e6c7e151Schristos	* po/sr.po: New Serbian translation.
2635*e6c7e151Schristos	* configure.ac (ALL_LINGUAS): Add sr.
2636*e6c7e151Schristos	* configure: Regenerate.
2637*e6c7e151Schristos
2638*e6c7e151Schristos2016-05-28  Maciej W. Rozycki  <macro@imgtec.com>
2639*e6c7e151Schristos
2640*e6c7e151Schristos	* elfxx-mips.c (b_reloc_p): New function.
2641*e6c7e151Schristos	(_bfd_mips_elf_relocate_section) <bfd_reloc_outofrange>: Handle
2642*e6c7e151Schristos	branch relocations.
2643*e6c7e151Schristos
2644*e6c7e151Schristos2016-05-28  Maciej W. Rozycki  <macro@imgtec.com>
2645*e6c7e151Schristos
2646*e6c7e151Schristos	* elfxx-mips.c (mips_elf_calculate_relocation): <R_MIPS16_26>
2647*e6c7e151Schristos	<R_MIPS_26, R_MICROMIPS_26_S1>: Drop the region bits of the
2648*e6c7e151Schristos	reloc location from calculation, treat the addend as signed with
2649*e6c7e151Schristos	local non-section symbols and enable overflow detection.
2650*e6c7e151Schristos
2651*e6c7e151Schristos2016-05-28  Alan Modra  <amodra@gmail.com>
2652*e6c7e151Schristos
2653*e6c7e151Schristos	* aoutx.h: Adjust linker callback calls throughout file,
2654*e6c7e151Schristos	removing dead code.
2655*e6c7e151Schristos	* bout.c: Likewise.
2656*e6c7e151Schristos	* coff-alpha.c: Likewise.
2657*e6c7e151Schristos	* coff-arm.c: Likewise.
2658*e6c7e151Schristos	* coff-h8300.c: Likewise.
2659*e6c7e151Schristos	* coff-h8500.c: Likewise.
2660*e6c7e151Schristos	* coff-i960.c: Likewise.
2661*e6c7e151Schristos	* coff-mcore.c: Likewise.
2662*e6c7e151Schristos	* coff-mips.c: Likewise.
2663*e6c7e151Schristos	* coff-ppc.c: Likewise.
2664*e6c7e151Schristos	* coff-rs6000.c: Likewise.
2665*e6c7e151Schristos	* coff-sh.c: Likewise.
2666*e6c7e151Schristos	* coff-tic80.c: Likewise.
2667*e6c7e151Schristos	* coff-w65.c: Likewise.
2668*e6c7e151Schristos	* coff-z80.c: Likewise.
2669*e6c7e151Schristos	* coff-z8k.c: Likewise.
2670*e6c7e151Schristos	* coff64-rs6000.c: Likewise.
2671*e6c7e151Schristos	* cofflink.c: Likewise.
2672*e6c7e151Schristos	* ecoff.c: Likewise.
2673*e6c7e151Schristos	* elf-bfd.h: Likewise.
2674*e6c7e151Schristos	* elf-m10200.c: Likewise.
2675*e6c7e151Schristos	* elf-m10300.c: Likewise.
2676*e6c7e151Schristos	* elf32-arc.c: Likewise.
2677*e6c7e151Schristos	* elf32-arm.c: Likewise.
2678*e6c7e151Schristos	* elf32-avr.c: Likewise.
2679*e6c7e151Schristos	* elf32-bfin.c: Likewise.
2680*e6c7e151Schristos	* elf32-cr16.c: Likewise.
2681*e6c7e151Schristos	* elf32-cr16c.c: Likewise.
2682*e6c7e151Schristos	* elf32-cris.c: Likewise.
2683*e6c7e151Schristos	* elf32-crx.c: Likewise.
2684*e6c7e151Schristos	* elf32-d10v.c: Likewise.
2685*e6c7e151Schristos	* elf32-epiphany.c: Likewise.
2686*e6c7e151Schristos	* elf32-fr30.c: Likewise.
2687*e6c7e151Schristos	* elf32-frv.c: Likewise.
2688*e6c7e151Schristos	* elf32-ft32.c: Likewise.
2689*e6c7e151Schristos	* elf32-h8300.c: Likewise.
2690*e6c7e151Schristos	* elf32-hppa.c: Likewise.
2691*e6c7e151Schristos	* elf32-i370.c: Likewise.
2692*e6c7e151Schristos	* elf32-i386.c: Likewise.
2693*e6c7e151Schristos	* elf32-i860.c: Likewise.
2694*e6c7e151Schristos	* elf32-ip2k.c: Likewise.
2695*e6c7e151Schristos	* elf32-iq2000.c: Likewise.
2696*e6c7e151Schristos	* elf32-lm32.c: Likewise.
2697*e6c7e151Schristos	* elf32-m32c.c: Likewise.
2698*e6c7e151Schristos	* elf32-m32r.c: Likewise.
2699*e6c7e151Schristos	* elf32-m68hc1x.c: Likewise.
2700*e6c7e151Schristos	* elf32-m68k.c: Likewise.
2701*e6c7e151Schristos	* elf32-mep.c: Likewise.
2702*e6c7e151Schristos	* elf32-metag.c: Likewise.
2703*e6c7e151Schristos	* elf32-microblaze.c: Likewise.
2704*e6c7e151Schristos	* elf32-moxie.c: Likewise.
2705*e6c7e151Schristos	* elf32-msp430.c: Likewise.
2706*e6c7e151Schristos	* elf32-mt.c: Likewise.
2707*e6c7e151Schristos	* elf32-nds32.c: Likewise.
2708*e6c7e151Schristos	* elf32-nios2.c: Likewise.
2709*e6c7e151Schristos	* elf32-or1k.c: Likewise.
2710*e6c7e151Schristos	* elf32-ppc.c: Likewise.
2711*e6c7e151Schristos	* elf32-s390.c: Likewise.
2712*e6c7e151Schristos	* elf32-score.c: Likewise.
2713*e6c7e151Schristos	* elf32-score7.c: Likewise.
2714*e6c7e151Schristos	* elf32-sh.c: Likewise.
2715*e6c7e151Schristos	* elf32-sh64.c: Likewise.
2716*e6c7e151Schristos	* elf32-spu.c: Likewise.
2717*e6c7e151Schristos	* elf32-tic6x.c: Likewise.
2718*e6c7e151Schristos	* elf32-tilepro.c: Likewise.
2719*e6c7e151Schristos	* elf32-v850.c: Likewise.
2720*e6c7e151Schristos	* elf32-vax.c: Likewise.
2721*e6c7e151Schristos	* elf32-visium.c: Likewise.
2722*e6c7e151Schristos	* elf32-xstormy16.c: Likewise.
2723*e6c7e151Schristos	* elf32-xtensa.c: Likewise.
2724*e6c7e151Schristos	* elf64-alpha.c: Likewise.
2725*e6c7e151Schristos	* elf64-hppa.c: Likewise.
2726*e6c7e151Schristos	* elf64-ia64-vms.c: Likewise.
2727*e6c7e151Schristos	* elf64-mmix.c: Likewise.
2728*e6c7e151Schristos	* elf64-ppc.c: Likewise.
2729*e6c7e151Schristos	* elf64-s390.c: Likewise.
2730*e6c7e151Schristos	* elf64-sh64.c: Likewise.
2731*e6c7e151Schristos	* elf64-x86-64.c: Likewise.
2732*e6c7e151Schristos	* elflink.c: Likewise.
2733*e6c7e151Schristos	* elfnn-aarch64.c: Likewise.
2734*e6c7e151Schristos	* elfnn-ia64.c: Likewise.
2735*e6c7e151Schristos	* elfxx-mips.c: Likewise.
2736*e6c7e151Schristos	* elfxx-sparc.c: Likewise.
2737*e6c7e151Schristos	* elfxx-tilegx.c: Likewise.
2738*e6c7e151Schristos	* linker.c: Likewise.
2739*e6c7e151Schristos	* pdp11.c: Likewise.
2740*e6c7e151Schristos	* pe-mips.c: Likewise.
2741*e6c7e151Schristos	* reloc.c: Likewise.
2742*e6c7e151Schristos	* reloc16.c: Likewise.
2743*e6c7e151Schristos	* simple.c: Likewise.
2744*e6c7e151Schristos	* vms-alpha.c: Likewise.
2745*e6c7e151Schristos	* xcofflink.c: Likewise.
2746*e6c7e151Schristos	* elf32-rl78.c (get_symbol_value, get_romstart, get_ramstart): Delete
2747*e6c7e151Schristos	status param.  Adjust calls to these and linker callbacks throughout.
2748*e6c7e151Schristos	* elf32-rx.c: (get_symbol_value, get_gp, get_romstart,
2749*e6c7e151Schristos	get_ramstart): Delete status param.  Adjust calls to these and
2750*e6c7e151Schristos	linker callbacks throughout.
2751*e6c7e151Schristos
2752*e6c7e151Schristos2016-05-27  Maciej W. Rozycki  <macro@imgtec.com>
2753*e6c7e151Schristos
2754*e6c7e151Schristos	* elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS16_26>
2755*e6c7e151Schristos	<R_MIPS_26, R_MICROMIPS_26_S1>: Include the addend in JALX's
2756*e6c7e151Schristos	target alignment verification.
2757*e6c7e151Schristos
2758*e6c7e151Schristos2016-05-27  Maciej W. Rozycki  <macro@imgtec.com>
2759*e6c7e151Schristos
2760*e6c7e151Schristos	* elfxx-mips.c (mips_elf_calculate_relocation): Also use the
2761*e6c7e151Schristos	section name if `bfd_elf_string_from_elf_section' returns an
2762*e6c7e151Schristos	empty string.
2763*e6c7e151Schristos
2764*e6c7e151Schristos2016-05-26  Maciej W. Rozycki  <macro@imgtec.com>
2765*e6c7e151Schristos
2766*e6c7e151Schristos	* elfxx-mips.c (_bfd_mips_elf_relocate_section)
2767*e6c7e151Schristos	<bfd_reloc_outofrange>: Use the `%X%H' rather than `%C' format
2768*e6c7e151Schristos	for message.  Continue processing rather than returning failure.
2769*e6c7e151Schristos
2770*e6c7e151Schristos2016-05-25  Maciej W. Rozycki  <macro@imgtec.com>
2771*e6c7e151Schristos
2772*e6c7e151Schristos	* elfxx-mips.c (_bfd_mips_elf_relocate_section)
2773*e6c7e151Schristos	<bfd_reloc_outofrange>: Call `->einfo' rather than `->warning'.
2774*e6c7e151Schristos	Call `bfd_set_error'.
2775*e6c7e151Schristos
2776*e6c7e151Schristos2016-05-25  H.J. Lu  <hongjiu.lu@intel.com>
2777*e6c7e151Schristos
2778*e6c7e151Schristos	PR binutils/14625
2779*e6c7e151Schristos	* archive.c (bfd_slurp_armap): Replace
2780*e6c7e151Schristos	bfd_elf64_archive_slurp_armap with
2781*e6c7e151Schristos	_bfd_archive_64_bit_slurp_armap.
2782*e6c7e151Schristos	(bsd_write_armap): Call _bfd_archive_64_bit_write_armap if
2783*e6c7e151Schristos	BFD64 is defined and the archive is too big.
2784*e6c7e151Schristos	(coff_write_armap): Likewise.
2785*e6c7e151Schristos	* archive64.c (bfd_elf64_archive_slurp_armap): Renamed to ...
2786*e6c7e151Schristos	(_bfd_archive_64_bit_slurp_armap): This.
2787*e6c7e151Schristos	(bfd_elf64_archive_write_armap): Renamed to ...
2788*e6c7e151Schristos	(_bfd_archive_64_bit_write_armap): This.
2789*e6c7e151Schristos	* configure.ac: Add --enable-64-bit-archive.
2790*e6c7e151Schristos	(want_64_bit_archive): New.  Set to true by default for 64-bit
2791*e6c7e151Schristos	MIPS and s390 ELF targets.
2792*e6c7e151Schristos	(USE_64_BIT_ARCHIVE): New AC_DEFINE.
2793*e6c7e151Schristos	* config.in: Regenerated.
2794*e6c7e151Schristos	* configure: Likewise.
2795*e6c7e151Schristos	* elf64-mips.c (bfd_elf64_archive_functions): Removed.
2796*e6c7e151Schristos	(bfd_elf64_archive_slurp_armap): Likewise.
2797*e6c7e151Schristos	(bfd_elf64_archive_write_armap): Likewise.
2798*e6c7e151Schristos	(bfd_elf64_archive_slurp_extended_name_table): Likewise.
2799*e6c7e151Schristos	(bfd_elf64_archive_construct_extended_name_table): Likewise.
2800*e6c7e151Schristos	(bfd_elf64_archive_truncate_arname): Likewise.
2801*e6c7e151Schristos	(bfd_elf64_archive_read_ar_hdr): Likewise.
2802*e6c7e151Schristos	(bfd_elf64_archive_write_ar_hdr): Likewise.
2803*e6c7e151Schristos	(bfd_elf64_archive_openr_next_archived_file): Likewise.
2804*e6c7e151Schristos	(bfd_elf64_archive_get_elt_at_index): Likewise.
2805*e6c7e151Schristos	(bfd_elf64_archive_generic_stat_arch_elt): Likewise.
2806*e6c7e151Schristos	(bfd_elf64_archive_update_armap_timestamp): Likewise.
2807*e6c7e151Schristos	* elf64-s390.c (bfd_elf64_archive_functions): Removed.
2808*e6c7e151Schristos	(bfd_elf64_archive_slurp_armap): Likewise.
2809*e6c7e151Schristos	(bfd_elf64_archive_write_armap): Likewise.
2810*e6c7e151Schristos	(bfd_elf64_archive_slurp_extended_name_table): Likewise.
2811*e6c7e151Schristos	(bfd_elf64_archive_construct_extended_name_table): Likewise.
2812*e6c7e151Schristos	(bfd_elf64_archive_truncate_arname): Likewise.
2813*e6c7e151Schristos	(bfd_elf64_archive_read_ar_hdr): Likewise.
2814*e6c7e151Schristos	(bfd_elf64_archive_write_ar_hdr): Likewise.
2815*e6c7e151Schristos	(bfd_elf64_archive_openr_next_archived_file): Likewise.
2816*e6c7e151Schristos	(bfd_elf64_archive_get_elt_at_index): Likewise.
2817*e6c7e151Schristos	(bfd_elf64_archive_generic_stat_arch_elt): Likewise.
2818*e6c7e151Schristos	(bfd_elf64_archive_update_armap_timestamp): Likewise.
2819*e6c7e151Schristos	* elfxx-target.h (TARGET_BIG_SYM): Use _bfd_archive_64_bit on
2820*e6c7e151Schristos	BFD_JUMP_TABLE_ARCHIVE if USE_64_BIT_ARCHIVE is defined and
2821*e6c7e151Schristos	bfd_elfNN_archive_functions isn't defined.
2822*e6c7e151Schristos	(TARGET_LITTLE_SYM): Likewise.
2823*e6c7e151Schristos	* libbfd-in.h (_bfd_archive_64_bit_slurp_armap): New prototype.
2824*e6c7e151Schristos	(_bfd_archive_64_bit_write_armap): Likewise.
2825*e6c7e151Schristos	(_bfd_archive_64_bit_slurp_extended_name_table): New macro.
2826*e6c7e151Schristos	(_bfd_archive_64_bit_construct_extended_name_table): Likewise.
2827*e6c7e151Schristos	(_bfd_archive_64_bit_truncate_arname): Likewise.
2828*e6c7e151Schristos	(_bfd_archive_64_bit_read_ar_hdr): Likewise.
2829*e6c7e151Schristos	(_bfd_archive_64_bit_write_ar_hdr): Likewise.
2830*e6c7e151Schristos	(_bfd_archive_64_bit_openr_next_archived_file): Likewise.
2831*e6c7e151Schristos	(_bfd_archive_64_bit_get_elt_at_index): Likewise.
2832*e6c7e151Schristos	(_bfd_archive_64_bit_generic_stat_arch_elt): Likewise.
2833*e6c7e151Schristos	(_bfd_archive_64_bit_update_armap_timestamp): Likewise.
2834*e6c7e151Schristos	* libbfd.h: Regenerated.
2835*e6c7e151Schristos	* plugin.c (plugin_vec): Use _bfd_archive_64_bit on
2836*e6c7e151Schristos	BFD_JUMP_TABLE_ARCHIVE if USE_64_BIT_ARCHIVE is defined.
2837*e6c7e151Schristos
2838*e6c7e151Schristos2016-05-25  H.J. Lu  <hongjiu.lu@intel.com>
2839*e6c7e151Schristos
2840*e6c7e151Schristos	PR ld/20103
2841*e6c7e151Schristos	* cofflink.c (coff_link_check_archive_element): Return TRUE if
2842*e6c7e151Schristos	linker add_archive_element callback returns FALSE.
2843*e6c7e151Schristos	* ecoff.c (ecoff_link_check_archive_element): Likewise.
2844*e6c7e151Schristos	* elf64-ia64-vms.c (elf64_vms_link_add_archive_symbols): Skip
2845*e6c7e151Schristos	archive element if linker add_archive_element callback returns
2846*e6c7e151Schristos	FALSE.
2847*e6c7e151Schristos	* elflink.c (elf_link_add_archive_symbols): Likewise.
2848*e6c7e151Schristos	* pdp11.c (aout_link_check_ar_symbols): Likewise.
2849*e6c7e151Schristos	* vms-alpha.c (alpha_vms_link_add_archive_symbols): Likewise.
2850*e6c7e151Schristos	* xcofflink.c (xcoff_link_check_dynamic_ar_symbols): Likewise.
2851*e6c7e151Schristos	(xcoff_link_check_ar_symbols): Likewise.
2852*e6c7e151Schristos
2853*e6c7e151Schristos2016-05-24  Maciej W. Rozycki  <macro@imgtec.com>
2854*e6c7e151Schristos
2855*e6c7e151Schristos	* elfxx-mips.c (_bfd_mips_elf_relocate_section)
2856*e6c7e151Schristos	<bfd_reloc_outofrange>: Unify error reporting code.
2857*e6c7e151Schristos
2858*e6c7e151Schristos2016-05-23  Jim Wilson  <jim.wilson@linaro.org>
2859*e6c7e151Schristos
2860*e6c7e151Schristos	* elfnn-aarch64.c: Unconditionally enable R_AARCH64_NULL and
2861*e6c7e151Schristos	R_AARCH64_NONE.  Use HOWTO64 for R_AARCH64_NULL.
2862*e6c7e151Schristos	* relocs.c: Add BFD_RELOC_AARCH64_NULL.
2863*e6c7e151Schristos	* bfd-in2.h: Regenerate.
2864*e6c7e151Schristos	* libbfd.h: Likewise.
2865*e6c7e151Schristos
2866*e6c7e151Schristos2016-05-23  Kuba Sejdak  <jakub.sejdak@phoesys.com>
2867*e6c7e151Schristos
2868*e6c7e151Schristos	* config.bfd: Add entry for arm-phoenix.
2869*e6c7e151Schristos
2870*e6c7e151Schristos2016-05-23  Thomas Preud'homme  <thomas.preudhomme@arm.com>
2871*e6c7e151Schristos
2872*e6c7e151Schristos	* elf32-arm.c (arm_dedicated_stub_section_padding): New function.
2873*e6c7e151Schristos	(elf32_arm_size_stubs): Declare stub_type in a more outer scope and
2874*e6c7e151Schristos	account for padding for stub section requiring one.
2875*e6c7e151Schristos	(elf32_arm_build_stubs): Add comment to stress the importance of
2876*e6c7e151Schristos	zeroing veneer section content.
2877*e6c7e151Schristos
2878*e6c7e151Schristos2016-05-23  Thomas Preud'homme  <thomas.preudhomme@arm.com>
2879*e6c7e151Schristos
2880*e6c7e151Schristos	* bfd-in.h (bfd_elf32_arm_keep_private_stub_output_sections): Declare
2881*e6c7e151Schristos	bfd hook.
2882*e6c7e151Schristos	* bfd-in2.h: Regenerate.
2883*e6c7e151Schristos	* elf32-arm.c (arm_dedicated_stub_output_section_required): New
2884*e6c7e151Schristos	function.
2885*e6c7e151Schristos	(arm_dedicated_stub_output_section_required_alignment): Likewise.
2886*e6c7e151Schristos	(arm_dedicated_stub_output_section_name): Likewise.
2887*e6c7e151Schristos	(arm_dedicated_stub_input_section_ptr): Likewise.
2888*e6c7e151Schristos	(elf32_arm_create_or_find_stub_sec): Add stub type parameter and
2889*e6c7e151Schristos	function description comment. Add support for dedicated output stub
2890*e6c7e151Schristos	section to given stub types.
2891*e6c7e151Schristos	(elf32_arm_add_stub): Add a stub type parameter and pass it down to
2892*e6c7e151Schristos	elf32_arm_create_or_find_stub_sec.
2893*e6c7e151Schristos	(elf32_arm_create_stub): Pass stub type down to elf32_arm_add_stub.
2894*e6c7e151Schristos	(elf32_arm_size_stubs): Pass stub type when calling
2895*e6c7e151Schristos	elf32_arm_create_or_find_stub_sec for Cortex-A8 erratum veneers.
2896*e6c7e151Schristos	(bfd_elf32_arm_keep_private_stub_output_sections): New function.
2897*e6c7e151Schristos
2898*e6c7e151Schristos2016-05-20  H.J. Lu  <hongjiu.lu@intel.com>
2899*e6c7e151Schristos
2900*e6c7e151Schristos	* elf32-i386.c (elf_i386_check_relocs): Don't check R_386_GOT32
2901*e6c7e151Schristos	when setting need_convert_load.
2902*e6c7e151Schristos
2903*e6c7e151Schristos2016-05-20  Maciej W. Rozycki  <macro@imgtec.com>
2904*e6c7e151Schristos
2905*e6c7e151Schristos	* elfxx-mips.c (mips_elf_read_rel_addend): Adjust the addend for
2906*e6c7e151Schristos	microMIPS JALX.
2907*e6c7e151Schristos
2908*e6c7e151Schristos2016-05-19  H.J. Lu  <hongjiu.lu@intel.com>
2909*e6c7e151Schristos
2910*e6c7e151Schristos	PR ld/20117
2911*e6c7e151Schristos	* elf32-i386.c (elf_i386_convert_load_reloc): Don't check
2912*e6c7e151Schristos	R_386_GOT32X.
2913*e6c7e151Schristos	(elf_i386_convert_load): Don't convert R_386_GOT32.
2914*e6c7e151Schristos
2915*e6c7e151Schristos2016-05-20  Alan Modra  <amodra@gmail.com>
2916*e6c7e151Schristos
2917*e6c7e151Schristos	PR gas/20118
2918*e6c7e151Schristos	* elf.c (elf_fake_sections): Set sh_entsize for SHT_INIT_ARRAY,
2919*e6c7e151Schristos	SHT_FINI_ARRAY, and SHT_PREINIT_ARRAY.
2920*e6c7e151Schristos
2921*e6c7e151Schristos2016-05-19  Cupertino Miranda  <cmiranda@synopsys.com>
2922*e6c7e151Schristos
2923*e6c7e151Schristos	* elf32-arc.c (arc_elf_final_write_processing): Changed.
2924*e6c7e151Schristos	(debug_arc_reloc): Likewise.
2925*e6c7e151Schristos	(elf_arc_relocate_section): Likewise.
2926*e6c7e151Schristos	(elf_arc_check_relocs): Likewise.
2927*e6c7e151Schristos	(elf_arc_adjust_dynamic_symbol): Likewise.
2928*e6c7e151Schristos	(elf_arc_add_symbol_hook): Likewise.
2929*e6c7e151Schristos
2930*e6c7e151Schristos2016-05-19  Maciej W. Rozycki  <macro@imgtec.com>
2931*e6c7e151Schristos
2932*e6c7e151Schristos	* config.bfd: Remove `am34-*-linux*' support.
2933*e6c7e151Schristos
2934*e6c7e151Schristos2016-05-19  Alan Modra  <amodra@gmail.com>
2935*e6c7e151Schristos
2936*e6c7e151Schristos	* elf64-ppc.c (allocate_dynrelocs): Allocate got and other dynamic
2937*e6c7e151Schristos	relocs before plt relocs.
2938*e6c7e151Schristos
2939*e6c7e151Schristos2016-05-19  Alan Modra  <amodra@gmail.com>
2940*e6c7e151Schristos
2941*e6c7e151Schristos	* elf64-ppc.c (ppc64_elf_branch_reloc): Check for NULL owner
2942*e6c7e151Schristos	before dereferencing.
2943*e6c7e151Schristos
2944*e6c7e151Schristos2016-05-18  Nick Clifton  <nickc@redhat.com>
2945*e6c7e151Schristos
2946*e6c7e151Schristos	* po/sv.po: Updated Swedish translation.
2947*e6c7e151Schristos
2948*e6c7e151Schristos2016-05-18  Alan Modra  <amodra@gmail.com>
2949*e6c7e151Schristos
2950*e6c7e151Schristos	* elf32-arm.c (elf32_arm_size_stubs): Free or cache local syms
2951*e6c7e151Schristos	for each BFD.  Don't goto error_ret_free_local from outside loop.
2952*e6c7e151Schristos
2953*e6c7e151Schristos2016-05-17  Maciej W. Rozycki  <macro@imgtec.com>
2954*e6c7e151Schristos
2955*e6c7e151Schristos	* elf-s390-common.c (elf_s390_add_symbol_hook): Remove
2956*e6c7e151Schristos	STB_GNU_UNIQUE handling.
2957*e6c7e151Schristos	* elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
2958*e6c7e151Schristos	* elf32-arm.c (elf32_arm_add_symbol_hook): Likewise.
2959*e6c7e151Schristos	* elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
2960*e6c7e151Schristos	* elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
2961*e6c7e151Schristos	* elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
2962*e6c7e151Schristos	* elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
2963*e6c7e151Schristos	* elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
2964*e6c7e151Schristos	* elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise.
2965*e6c7e151Schristos	* elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
2966*e6c7e151Schristos	* elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Likewise.
2967*e6c7e151Schristos	* elf32-i386.c (elf_i386_add_symbol_hook): Remove function.
2968*e6c7e151Schristos	(elf_backend_add_symbol_hook): Remove macro.
2969*e6c7e151Schristos	* elflink.c (elf_link_add_object_symbols): Set `has_gnu_symbols'
2970*e6c7e151Schristos	for STB_GNU_UNIQUE symbols.
2971*e6c7e151Schristos
2972*e6c7e151Schristos2016-05-16  Maciej W. Rozycki  <macro@imgtec.com>
2973*e6c7e151Schristos
2974*e6c7e151Schristos	* elf32-v850.c (v850_elf_copy_notes): New function, factored out
2975*e6c7e151Schristos	from...
2976*e6c7e151Schristos	(v850_elf_copy_private_bfd_data): ... here.  Call the new
2977*e6c7e151Schristos	function and `_bfd_elf_copy_private_bfd_data'.
2978*e6c7e151Schristos
2979*e6c7e151Schristos2016-05-13  H.J. Lu  <hongjiu.lu@intel.com>
2980*e6c7e151Schristos
2981*e6c7e151Schristos	PR ld/20093
2982*e6c7e151Schristos	* elf64-x86-64.c (elf_x86_64_convert_load_reloc): Don't convert
2983*e6c7e151Schristos	GOTPCREL relocation against large section.
2984*e6c7e151Schristos
2985*e6c7e151Schristos2016-05-13  Alan Modra  <amodra@gmail.com>
2986*e6c7e151Schristos
2987*e6c7e151Schristos	* elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_sections): Use
2988*e6c7e151Schristos	linker dynamic sections in calculating size and address of
2989*e6c7e151Schristos	dynamic tags rather than using output sections.  Remove asserts.
2990*e6c7e151Schristos	* elf32-arm.c (elf32_arm_finish_dynamic_sections): Likewise.
2991*e6c7e151Schristos	* elf32-cr16.c (_bfd_cr16_elf_finish_dynamic_sections): Likewise.
2992*e6c7e151Schristos	* elf32-cris.c (elf_cris_finish_dynamic_sections): Likewise.
2993*e6c7e151Schristos	* elf32-i370.c (i370_elf_finish_dynamic_sections): Likewise.
2994*e6c7e151Schristos	* elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
2995*e6c7e151Schristos	* elf32-m32r.c (m32r_elf_finish_dynamic_sections): Likewise.
2996*e6c7e151Schristos	* elf32-m68k.c (elf_m68k_finish_dynamic_sections): Likewise.
2997*e6c7e151Schristos	* elf32-metag.c (elf_metag_finish_dynamic_sections): Likewise.
2998*e6c7e151Schristos	* elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Likewise.
2999*e6c7e151Schristos	* elf32-nds32.c (nds32_elf_finish_dynamic_sections): Likewise.
3000*e6c7e151Schristos	* elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Likewise.
3001*e6c7e151Schristos	* elf32-or1k.c (or1k_elf_finish_dynamic_sections): Likewise.
3002*e6c7e151Schristos	* elf32-s390.c (elf_s390_finish_dynamic_sections): Likewise.
3003*e6c7e151Schristos	* elf32-score.c (s3_bfd_score_elf_finish_dynamic_sections): Likewise.
3004*e6c7e151Schristos	* elf32-score7.c (s7_bfd_score_elf_finish_dynamic_sections): Likewise.
3005*e6c7e151Schristos	* elf32-vax.c (elf_vax_finish_dynamic_sections): Likewise.
3006*e6c7e151Schristos	* elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Likewise.
3007*e6c7e151Schristos	* elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Likewise.
3008*e6c7e151Schristos	* elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
3009*e6c7e151Schristos	* elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
3010*e6c7e151Schristos	* elflink.c (bfd_elf_final_link): Likewise.
3011*e6c7e151Schristos	* elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Likewise.
3012*e6c7e151Schristos	* elfxx-sparc.c (sparc_finish_dyn): Likewise.  Adjust error message.
3013*e6c7e151Schristos	* elf32-arc.c (GET_SYMBOL_OR_SECTION): Remove ASSERT arg and
3014*e6c7e151Schristos	don't set doit.  Look up dynobj section.
3015*e6c7e151Schristos	(elf_arc_finish_dynamic_sections): Adjust GET_SYMBOL_OR_SECTION
3016*e6c7e151Schristos	invocation and dynamic tag vma calculation.  Don't test
3017*e6c7e151Schristos	boolean var == TRUE.
3018*e6c7e151Schristos	* elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_sections): Fix
3019*e6c7e151Schristos	DT_JMPREL calc.
3020*e6c7e151Schristos
3021*e6c7e151Schristos2016-05-13  Alan Modra  <amodra@gmail.com>
3022*e6c7e151Schristos
3023*e6c7e151Schristos	* elflink.c (elf_link_sort_relocs): Wrap overlong lines.  Fix
3024*e6c7e151Schristos	octets_per_byte.  Put dynamic .rela.plt last in link orders.
3025*e6c7e151Schristos	Assign output_offset for reloc sections rather than writing
3026*e6c7e151Schristos	sorted relocs from block corresponding to output_offset.
3027*e6c7e151Schristos
3028*e6c7e151Schristos2016-05-12  Alan Modra  <amodra@gmail.com>
3029*e6c7e151Schristos
3030*e6c7e151Schristos	* elf-bfd.h (elf_reloc_type_class): Put reloc_class_plt last.
3031*e6c7e151Schristos
3032*e6c7e151Schristos2016-05-11  Andrew Bennett  <andrew.bennett@imgtec.com>
3033*e6c7e151Schristos
3034*e6c7e151Schristos	* elfxx-mips.c (print_mips_ases): Add DSPR3.
3035*e6c7e151Schristos
3036*e6c7e151Schristos2016-05-11  Alan Modra  <amodra@gmail.com>
3037*e6c7e151Schristos
3038*e6c7e151Schristos	* elf32-hppa.c (elf32_hppa_init_stub_bfd): New function.
3039*e6c7e151Schristos	(elf32_hppa_check_relocs): Don't set dynobj.
3040*e6c7e151Schristos	(elf32_hppa_size_stubs): Test !SEC_LINKER_CREATED for stub sections.
3041*e6c7e151Schristos	(elf32_hppa_build_stubs): Likewise.
3042*e6c7e151Schristos	* elf32-hppa.h (elf32_hppa_init_stub_bfd): Declare.
3043*e6c7e151Schristos
3044*e6c7e151Schristos2016-05-11  Alan Modra  <amodra@gmail.com>
3045*e6c7e151Schristos
3046*e6c7e151Schristos	PR 20060
3047*e6c7e151Schristos	* elf64-ppc.c (ppc64_elf_tls_setup): Clear forced_local.
3048*e6c7e151Schristos	* elf32-ppc.c (ppc_elf_tls_setup): Likewise.
3049*e6c7e151Schristos
3050*e6c7e151Schristos2016-05-10  Jiong Wang  <jiong.wang@arm.com>
3051*e6c7e151Schristos
3052*e6c7e151Schristos	* elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Remove redundant
3053*e6c7e151Schristos	aarch64_tls_transition check.
3054*e6c7e151Schristos
3055*e6c7e151Schristos2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
3056*e6c7e151Schristos
3057*e6c7e151Schristos	* elf32-arm.c (enum elf32_arm_stub_type): New max_stub_type
3058*e6c7e151Schristos	enumerator.
3059*e6c7e151Schristos	(arm_stub_sym_claimed): New function.
3060*e6c7e151Schristos	(elf32_arm_create_stub): Use veneered symbol name and section if
3061*e6c7e151Schristos	veneer needs to claim its symbol, and keep logic unchanged otherwise.
3062*e6c7e151Schristos	(arm_stub_claim_sym): New function.
3063*e6c7e151Schristos	(arm_map_one_stub): Call arm_stub_claim_sym if veneer needs to claim
3064*e6c7e151Schristos	veneered symbol, otherwise create local symbol as before.
3065*e6c7e151Schristos
3066*e6c7e151Schristos2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
3067*e6c7e151Schristos
3068*e6c7e151Schristos	* elf32-arm.c (elf32_arm_size_stubs): Use new macros
3069*e6c7e151Schristos	ARM_GET_SYM_BRANCH_TYPE and ARM_SET_SYM_BRANCH_TYPE to respectively get
3070*e6c7e151Schristos	and set branch type of a symbol.
3071*e6c7e151Schristos	(bfd_elf32_arm_process_before_allocation): Likewise.
3072*e6c7e151Schristos	(elf32_arm_relocate_section): Likewise and fix identation along the
3073*e6c7e151Schristos	way.
3074*e6c7e151Schristos	(allocate_dynrelocs_for_symbol): Likewise.
3075*e6c7e151Schristos	(elf32_arm_finish_dynamic_symbol): Likewise.
3076*e6c7e151Schristos	(elf32_arm_swap_symbol_in): Likewise.
3077*e6c7e151Schristos	(elf32_arm_swap_symbol_out): Likewise.
3078*e6c7e151Schristos
3079*e6c7e151Schristos2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
3080*e6c7e151Schristos
3081*e6c7e151Schristos	* bfd-in.h (elf32_arm_size_stubs): Add an output section parameter.
3082*e6c7e151Schristos	* bfd-in2.h: Regenerated.
3083*e6c7e151Schristos	* elf32-arm.c (struct elf32_arm_link_hash_table): Add an output section
3084*e6c7e151Schristos	parameter to add_stub_section callback.
3085*e6c7e151Schristos	(elf32_arm_create_or_find_stub_sec): Get output section from link_sec
3086*e6c7e151Schristos	and pass it down to add_stub_section.
3087*e6c7e151Schristos	(elf32_arm_add_stub): Set section to stub_sec if NULL before using it
3088*e6c7e151Schristos	for error message.
3089*e6c7e151Schristos	(elf32_arm_size_stubs): Add output section parameter to
3090*e6c7e151Schristos	add_stub_section function pointer parameter.
3091*e6c7e151Schristos
3092*e6c7e151Schristos2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
3093*e6c7e151Schristos
3094*e6c7e151Schristos	* elf32-arm.c (elf32_arm_create_stub): New function.
3095*e6c7e151Schristos	(elf32_arm_size_stubs): Use elf32_arm_create_stub for stub creation.
3096*e6c7e151Schristos
3097*e6c7e151Schristos2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
3098*e6c7e151Schristos
3099*e6c7e151Schristos	* elf32-arm.c (enum elf32_arm_stub_type): Delete
3100*e6c7e151Schristos	arm_stub_a8_veneer_lwm enumerator.
3101*e6c7e151Schristos	(arm_stub_a8_veneer_lwm): New unsigned constant to replace
3102*e6c7e151Schristos	aforementioned enumerator.
3103*e6c7e151Schristos	(struct elf32_arm_stub_hash_entry): Delete target_addend
3104*e6c7e151Schristos	field and add source_value.
3105*e6c7e151Schristos	(struct a8_erratum_fix): Delete addend field and add target_offset.
3106*e6c7e151Schristos	(stub_hash_newfunc): Initialize source_value field amd remove
3107*e6c7e151Schristos	initialization for target_addend.
3108*e6c7e151Schristos	(arm_build_one_stub): Stop special casing Thumb relocations: promote
3109*e6c7e151Schristos	the else to being always executed, moving the
3110*e6c7e151Schristos	arm_stub_a8_veneer_b_cond specific code in it.  Remove
3111*e6c7e151Schristos	stub_entry->target_addend from points_to computation.
3112*e6c7e151Schristos	(cortex_a8_erratum_scan): Store in a8_erratum_fix structure the offset
3113*e6c7e151Schristos	to target symbol from start of section rather than the offset from the
3114*e6c7e151Schristos	stub address.
3115*e6c7e151Schristos	(elf32_arm_size_stubs): Set stub_entry's source_value and target_value
3116*e6c7e151Schristos	fields from struct a8_erratum_fix's offset and target_offset
3117*e6c7e151Schristos	respectively.
3118*e6c7e151Schristos	(make_branch_to_a8_stub): Rename target variable to loc.  Compute
3119*e6c7e151Schristos	veneered_insn_loc and loc using stub_entry's source_value.
3120*e6c7e151Schristos
3121*e6c7e151Schristos2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
3122*e6c7e151Schristos
3123*e6c7e151Schristos	(elf32_arm_merge_eabi_attributes): Add merging logic for
3124*e6c7e151Schristos	Tag_DSP_extension.
3125*e6c7e151Schristos
3126*e6c7e151Schristos2016-05-10  Pip Cet  <pipcet@gmail.com>
3127*e6c7e151Schristos
3128*e6c7e151Schristos	PR ld/20059
3129*e6c7e151Schristos	* elfxx-target.h (bfd_elfNN_bfd_copy_link_hash_symbol_type):
3130*e6c7e151Schristos	Define as _bfd_generic_copy_link_hash_symbol_type when using
3131*e6c7e151Schristos	generic hash table.
3132*e6c7e151Schristos
3133*e6c7e151Schristos2016-05-09  Nick Clifton  <nickc@redhat.com>
3134*e6c7e151Schristos
3135*e6c7e151Schristos	PR binutils/20063
3136*e6c7e151Schristos	* elf.c (bfd_elf_get_elf_syms): Check for out of range sh_link
3137*e6c7e151Schristos	field before accessing sections array.
3138*e6c7e151Schristos
3139*e6c7e151Schristos2016-05-09  Christophe Monat  <christophe.monat@st.com>
3140*e6c7e151Schristos
3141*e6c7e151Schristos	PR ld/20030
3142*e6c7e151Schristos	* elf32-arm.c (is_thumb2_vldm): Account for T1 (DP) encoding.
3143*e6c7e151Schristos	(stm32l4xx_need_create_replacing_stub): Rename ambiguous nb_regs
3144*e6c7e151Schristos	to nb_words.
3145*e6c7e151Schristos	(create_instruction_vldmia): Add is_dp to disambiguate SP/DP
3146*e6c7e151Schristos	encoding.
3147*e6c7e151Schristos	(create_instruction_vldmdb): Likewise.
3148*e6c7e151Schristos	(stm32l4xx_create_replacing_stub_vldm): is_dp detects DP encoding,
3149*e6c7e151Schristos	uses it to re-encode.
3150*e6c7e151Schristos
3151*e6c7e151Schristos2016-05-09  Nick Clifton  <nickc@redhat.com>
3152*e6c7e151Schristos
3153*e6c7e151Schristos	PR 19938
3154*e6c7e151Schristos	* elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Revert accidental
3155*e6c7e151Schristos	commit.
3156*e6c7e151Schristos
3157*e6c7e151Schristos2016-05-09  Alan Modra  <amodra@gmail.com>
3158*e6c7e151Schristos
3159*e6c7e151Schristos	* elf64-ppc.c (ppc64_elf_init_stub_bfd): Remove redundant NULL check.
3160*e6c7e151Schristos
3161*e6c7e151Schristos2016-05-06  H.J. Lu  <hongjiu.lu@intel.com>
3162*e6c7e151Schristos
3163*e6c7e151Schristos	PR ld/17550
3164*e6c7e151Schristos	* elf-bfd.h (elf_link_hash_entry): Update comments for indx,
3165*e6c7e151Schristos	documenting that indx == -3 if symbol is defined in a discarded
3166*e6c7e151Schristos	section.
3167*e6c7e151Schristos	* elflink.c (elf_link_add_object_symbols): Set indx to -3 if
3168*e6c7e151Schristos	symbol is defined in a discarded section.
3169*e6c7e151Schristos	(elf_link_output_extsym): Strip a global symbol defined in a
3170*e6c7e151Schristos	discarded section.
3171*e6c7e151Schristos
3172*e6c7e151Schristos2016-05-06  H.J. Lu  <hongjiu.lu@intel.com>
3173*e6c7e151Schristos
3174*e6c7e151Schristos	* elf32-i386.c (elf_backend_add_symbol_hook): Defined for Intel
3175*e6c7e151Schristos	MCU.
3176*e6c7e151Schristos
3177*e6c7e151Schristos2016-05-05  H.J. Lu  <hongjiu.lu@intel.com>
3178*e6c7e151Schristos
3179*e6c7e151Schristos	* elf32-i386.c (elf_i386_convert_load): Extract the GOT load
3180*e6c7e151Schristos	conversion to ...
3181*e6c7e151Schristos	(elf_i386_convert_load_reloc): This.  New function.
3182*e6c7e151Schristos	* elf64-x86-64.c (elf_x86_64_convert_load): Extract the GOT load
3183*e6c7e151Schristos	conversion to ...
3184*e6c7e151Schristos	(elf_x86_64_convert_load_reloc): This.  New function.
3185*e6c7e151Schristos
3186*e6c7e151Schristos2016-05-05  H.J. Lu  <hongjiu.lu@intel.com>
3187*e6c7e151Schristos
3188*e6c7e151Schristos	* elf32-i386.c (elf_i386_check_tls_transition): Remove abfd.
3189*e6c7e151Schristos	Don't check if contents == NULL.
3190*e6c7e151Schristos	(elf_i386_tls_transition): Add from_relocate_section.  Check
3191*e6c7e151Schristos	from_relocate_section instead of contents != NULL.  Update
3192*e6c7e151Schristos	elf_i386_check_tls_transition call.
3193*e6c7e151Schristos	(elf_i386_check_relocs): Cache the section contents if
3194*e6c7e151Schristos	keep_memory is FALSE.  Pass FALSE as from_relocate_section to
3195*e6c7e151Schristos	elf_i386_tls_transition.
3196*e6c7e151Schristos	(elf_i386_relocate_section): Pass TRUE as from_relocate_section
3197*e6c7e151Schristos	to elf_i386_tls_transition.
3198*e6c7e151Schristos	(elf_backend_caches_rawsize): New.
3199*e6c7e151Schristos	* elf64-x86-64.c (elf_x86_64_check_tls_transition): Don't check
3200*e6c7e151Schristos	if contents == NULL.
3201*e6c7e151Schristos	(elf_x86_64_tls_transition): Add from_relocate_section.  Check
3202*e6c7e151Schristos	from_relocate_section instead of contents != NULL.
3203*e6c7e151Schristos	(elf_x86_64_check_relocs): Cache the section contents if
3204*e6c7e151Schristos	keep_memory is FALSE.  Pass FALSE as from_relocate_section to
3205*e6c7e151Schristos	elf_x86_64_tls_transition.
3206*e6c7e151Schristos	(elf_x86_64_relocate_section): Pass TRUE as from_relocate_section
3207*e6c7e151Schristos	to elf_x86_64_tls_transition.
3208*e6c7e151Schristos	(elf_backend_caches_rawsize): New.
3209*e6c7e151Schristos
3210*e6c7e151Schristos2016-05-03  Maciej W. Rozycki  <macro@imgtec.com>
3211*e6c7e151Schristos
3212*e6c7e151Schristos	PR 10549
3213*e6c7e151Schristos	* elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Handle
3214*e6c7e151Schristos	STB_GNU_UNIQUE.
3215*e6c7e151Schristos
3216*e6c7e151Schristos2016-05-03  Jiong Wang  <jiong.wang@arm.com>
3217*e6c7e151Schristos
3218*e6c7e151Schristos	* bfd-in.h (bfd_elf64_aarch64_set_options): Update prototype.
3219*e6c7e151Schristos	* bfd-in2.h (bfd_elf64_aarch64_set_options): Likewise.
3220*e6c7e151Schristos	* elfnn-aarch64.c (bfd_elfNN_aarch64_set_options): Initialize
3221*e6c7e151Schristos	no_apply_dynamic_relocs.
3222*e6c7e151Schristos	(elfNN_aarch64_final_link_relocate): Apply absolute relocations even though
3223*e6c7e151Schristos	dynamic relocations generated.
3224*e6c7e151Schristos
3225*e6c7e151Schristos2016-04-29  H.J. Lu  <hongjiu.lu@intel.com>
3226*e6c7e151Schristos
3227*e6c7e151Schristos	* elf32-i386.c (elf_i386_size_dynamic_sections): Move interp
3228*e6c7e151Schristos	setting to ...
3229*e6c7e151Schristos	(elf_i386_create_dynamic_sections): Here.
3230*e6c7e151Schristos	* elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Move
3231*e6c7e151Schristos	interp setting to ...
3232*e6c7e151Schristos	(elf_x86_64_create_dynamic_sections): Here.
3233*e6c7e151Schristos
3234*e6c7e151Schristos2016-04-29  H.J. Lu  <hongjiu.lu@intel.com>
3235*e6c7e151Schristos
3236*e6c7e151Schristos	* elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take GOT_RELOC
3237*e6c7e151Schristos	and replace (EH)->has_got_reloc with GOT_RELOC.
3238*e6c7e151Schristos	(elf_i386_fixup_symbol): Pass has_got_reloc to
3239*e6c7e151Schristos	UNDEFINED_WEAK_RESOLVED_TO_ZERO.
3240*e6c7e151Schristos	(elf_i386_allocate_dynrelocs): Likewise.
3241*e6c7e151Schristos	(elf_i386_relocate_section): Likewise.
3242*e6c7e151Schristos	(elf_i386_finish_dynamic_symbol): Likewise.
3243*e6c7e151Schristos	(elf_i386_convert_load): Pass TRUE to
3244*e6c7e151Schristos	UNDEFINED_WEAK_RESOLVED_TO_ZERO.
3245*e6c7e151Schristos	* elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take
3246*e6c7e151Schristos	GOT_RELOC and replace (EH)->has_got_reloc with GOT_RELOC.
3247*e6c7e151Schristos	(elf_x86_64_fixup_symbol): Pass has_got_reloc to
3248*e6c7e151Schristos	UNDEFINED_WEAK_RESOLVED_TO_ZERO.
3249*e6c7e151Schristos	(elf_x86_64_allocate_dynrelocs): Likewise.
3250*e6c7e151Schristos	(elf_x86_64_relocate_section): Likewise.
3251*e6c7e151Schristos	(elf_x86_64_finish_dynamic_symbol): Likewise.
3252*e6c7e151Schristos	(elf_x86_64_convert_load): Pass TRUE to
3253*e6c7e151Schristos	UNDEFINED_WEAK_RESOLVED_TO_ZERO.
3254*e6c7e151Schristos
3255*e6c7e151Schristos2016-04-29  H.J. Lu  <hongjiu.lu@intel.com>
3256*e6c7e151Schristos
3257*e6c7e151Schristos	* elf32-i386.c (check_relocs_failed): New.
3258*e6c7e151Schristos	(elf_i386_check_relocs): Set check_relocs_failed on error.
3259*e6c7e151Schristos	(elf_i386_relocate_section): Skip if check_relocs failed.
3260*e6c7e151Schristos
3261*e6c7e151Schristos2016-04-29  H.J. Lu  <hongjiu.lu@intel.com>
3262*e6c7e151Schristos
3263*e6c7e151Schristos	* elf64-x86-64.c (elf_x86_64_check_relocs): Set
3264*e6c7e151Schristos	check_relocs_failed on error.
3265*e6c7e151Schristos
3266*e6c7e151Schristos2016-04-29  Nick Clifton  <nickc@redhat.com>
3267*e6c7e151Schristos
3268*e6c7e151Schristos	PR 19938
3269*e6c7e151Schristos	* elf-bfd.h (struct elf_backend_data): Rename
3270*e6c7e151Schristos	elf_backend_set_special_section_info_and_link to
3271*e6c7e151Schristos	elf_backend_copy_special_section_fields.
3272*e6c7e151Schristos	* elfxx-target.h: Likewise.
3273*e6c7e151Schristos	* elf.c (section_match): Ignore the SHF_INFO_LINK flag when
3274*e6c7e151Schristos	comparing section flags.
3275*e6c7e151Schristos	(copy_special_section_fields): New function.
3276*e6c7e151Schristos	(_bfd_elf_copy_private_bfd_data): Copy the EI_ABIVERSION field.
3277*e6c7e151Schristos	Perform two scans over special sections.  The first one looks for
3278*e6c7e151Schristos	a direct mapping between the output section and an input section.
3279*e6c7e151Schristos	The second scan looks for a possible match based upon section
3280*e6c7e151Schristos	characteristics.
3281*e6c7e151Schristos	* elf32-arm.c (elf32_arm_copy_special_section_fields): New
3282*e6c7e151Schristos	function.  Handle setting the sh_link field of SHT_ARM_EXIDX
3283*e6c7e151Schristos	sections.
3284*e6c7e151Schristos	* elf32-i386.c (elf32_i386_set_special_info_link): Rename to
3285*e6c7e151Schristos	elf32_i386_copy_solaris_special_section_fields.
3286*e6c7e151Schristos	* elf32-sparc.c (elf32_sparc_set_special_section_info_link):
3287*e6c7e151Schristos	Rename to elf32_sparc_copy_solaris_special_section_fields.
3288*e6c7e151Schristos	* elf64-x86-64.c (elf64_x86_64_set_special_info_link): Rename to
3289*e6c7e151Schristos	elf64_x86_64_copy_solaris_special_section_fields.
3290*e6c7e151Schristos
3291*e6c7e151Schristos2016-04-28  Nick Clifton  <nickc@redhat.com>
3292*e6c7e151Schristos
3293*e6c7e151Schristos	* po/zh_CN.po: Updated Chinese (simplified) translation.
3294*e6c7e151Schristos
3295*e6c7e151Schristos2016-04-27  H.J. Lu  <hongjiu.lu@intel.com>
3296*e6c7e151Schristos
3297*e6c7e151Schristos	PR ld/20006
3298*e6c7e151Schristos	* elf64-x86-64.c (elf_x86_64_convert_load): Skip debug sections
3299*e6c7e151Schristos	when estimating distances between output sections.
3300*e6c7e151Schristos
3301*e6c7e151Schristos2016-04-27  Alan Modra  <amodra@gmail.com>
3302*e6c7e151Schristos
3303*e6c7e151Schristos	* elflink.c (_bfd_elf_is_start_stop): New function.
3304*e6c7e151Schristos	(_bfd_elf_gc_mark_rsec): Use it.
3305*e6c7e151Schristos	* elf-bfd.h (_bfd_elf_is_start_stop): Declare.
3306*e6c7e151Schristos
3307*e6c7e151Schristos2016-04-26  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
3308*e6c7e151Schristos
3309*e6c7e151Schristos	* elf32-rx.c (rx_set_section_contents): Avoid arithmetic on void *.
3310*e6c7e151Schristos	* mmo.c (mmo_get_section_contents): Likewise.
3311*e6c7e151Schristos	(mmo_set_section_contents): Likewise.
3312*e6c7e151Schristos
3313*e6c7e151Schristos2016-04-26  H.J. Lu  <hongjiu.lu@intel.com>
3314*e6c7e151Schristos
3315*e6c7e151Schristos	* elf-bfd.h (elf_link_hash_table): Update comments for
3316*e6c7e151Schristos	dynsymcount.
3317*e6c7e151Schristos	* elflink.c (_bfd_elf_link_renumber_dynsyms): Always count for
3318*e6c7e151Schristos	the unused NULL entry at the head of dynamic symbol table.
3319*e6c7e151Schristos	(bfd_elf_size_dynsym_hash_dynstr): Remove dynsymcount != 0
3320*e6c7e151Schristos	checks.
3321*e6c7e151Schristos
3322*e6c7e151Schristos2016-04-21  H.J. Lu  <hongjiu.lu@intel.com>
3323*e6c7e151Schristos
3324*e6c7e151Schristos	* elflink.c (_bfd_elf_link_create_dynstrtab): Exclude linker
3325*e6c7e151Schristos	created file from dynobj.
3326*e6c7e151Schristos
3327*e6c7e151Schristos2016-04-21  H.J. Lu  <hongjiu.lu@intel.com>
3328*e6c7e151Schristos
3329*e6c7e151Schristos	* elflink.c (_bfd_elf_link_create_dynstrtab): Set dynobj to a
3330*e6c7e151Schristos	normal input file if possible.
3331*e6c7e151Schristos
3332*e6c7e151Schristos2016-04-21  Nick Clifton  <nickc@redhat.com>
3333*e6c7e151Schristos
3334*e6c7e151Schristos	* aout-adobe.c: Use _bfd_generic_link_check_relocs.
3335*e6c7e151Schristos	* aout-target.h: Likewise.
3336*e6c7e151Schristos	* aout-tic30.c: Likewise.
3337*e6c7e151Schristos	* binary.c: Likewise.
3338*e6c7e151Schristos	* bout.c: Likewise.
3339*e6c7e151Schristos	* coff-alpha.c: Likewise.
3340*e6c7e151Schristos	* coff-rs6000.c: Likewise.
3341*e6c7e151Schristos	* coff64-rs6000.c: Likewise.
3342*e6c7e151Schristos	* coffcode.h: Likewise.
3343*e6c7e151Schristos	* i386msdos.c: Likewise.
3344*e6c7e151Schristos	* i386os9k.c: Likewise.
3345*e6c7e151Schristos	* ieee.c: Likewise.
3346*e6c7e151Schristos	* ihex.c: Likewise.
3347*e6c7e151Schristos	* libbfd-in.h: Likewise.
3348*e6c7e151Schristos	* libecoff.h: Likewise.
3349*e6c7e151Schristos	* mach-o-target.c: Likewise.
3350*e6c7e151Schristos	* mmo.c: Likewise.
3351*e6c7e151Schristos	* nlm-target.h: Likewise.
3352*e6c7e151Schristos	* oasys.c: Likewise.
3353*e6c7e151Schristos	* pef.c: Likewise.
3354*e6c7e151Schristos	* plugin.c: Likewise.
3355*e6c7e151Schristos	* ppcboot.c: Likewise.
3356*e6c7e151Schristos	* som.c: Likewise.
3357*e6c7e151Schristos	* srec.c: Likewise.
3358*e6c7e151Schristos	* tekhex.c: Likewise.
3359*e6c7e151Schristos	* versados.c: Likewise.
3360*e6c7e151Schristos	* vms-alpha.c: Likewise.
3361*e6c7e151Schristos	* xsym.c: Likewise.
3362*e6c7e151Schristos	* elfxx-target.h: Use _bfd_elf_link_check_relocs.
3363*e6c7e151Schristos	* linker.c (bfd_link_check_relocs): New function.
3364*e6c7e151Schristos	(_bfd_generic_link_check_relocs): New function.
3365*e6c7e151Schristos	* targets.c (BFD_JUMP_TABLE_LINK): Add initialization of
3366*e6c7e151Schristos	_bfd_link_check_relocs field.
3367*e6c7e151Schristos	(struct bfd_target)L Add _bfd_link_check_relocs field.
3368*e6c7e151Schristos	* bfd-in2.h: Regenerate.
3369*e6c7e151Schristos	* libbfd.h: Regenerate.
3370*e6c7e151Schristos
3371*e6c7e151Schristos2016-04-20  H.J. Lu  <hongjiu.lu@intel.com>
3372*e6c7e151Schristos
3373*e6c7e151Schristos	* elf32-i386.c (elf_i386_gc_sweep_hook): Removed.
3374*e6c7e151Schristos	(elf_backend_gc_sweep_hook): Likewise.
3375*e6c7e151Schristos	* elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise.
3376*e6c7e151Schristos	(elf_backend_gc_sweep_hook): Likewise.
3377*e6c7e151Schristos
3378*e6c7e151Schristos2016-04-20  H.J. Lu  <hongjiu.lu@intel.com>
3379*e6c7e151Schristos
3380*e6c7e151Schristos	* elflink.c (_bfd_elf_link_check_relocs): Don't check relocations
3381*e6c7e151Schristos	in excluded sections
3382*e6c7e151Schristos
3383*e6c7e151Schristos2016-04-20  H.J. Lu  <hongjiu.lu@intel.com>
3384*e6c7e151Schristos
3385*e6c7e151Schristos	PR ld/19969
3386*e6c7e151Schristos	* elf64-x86-64.c (check_relocs_failed): New.
3387*e6c7e151Schristos	(elf_x86_64_need_pic): Moved before elf_x86_64_check_relocs.
3388*e6c7e151Schristos	Support relocation agaist local symbol.  Set check_relocs_failed.
3389*e6c7e151Schristos	(elf_x86_64_check_relocs): Use elf_x86_64_need_pic.  Check
3390*e6c7e151Schristos	R_X86_64_32 relocation overflow.
3391*e6c7e151Schristos	(elf_x86_64_relocate_section): Skip if check_relocs failed.
3392*e6c7e151Schristos	Update one elf_x86_64_need_pic and remove one elf_x86_64_need_pic.
3393*e6c7e151Schristos
3394*e6c7e151Schristos2016-04-20  H.J. Lu  <hongjiu.lu@intel.com>
3395*e6c7e151Schristos
3396*e6c7e151Schristos	* elf32-i386.c (elf_i386_check_relocs): Call
3397*e6c7e151Schristos	_bfd_elf_create_ifunc_sections only for STT_GNU_IFUNC symbol.
3398*e6c7e151Schristos	* elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
3399*e6c7e151Schristos
3400*e6c7e151Schristos2016-04-20  H.J. Lu  <hongjiu.lu@intel.com>
3401*e6c7e151Schristos
3402*e6c7e151Schristos	* elf-bfd.h (_bfd_elf_link_check_relocs): New.
3403*e6c7e151Schristos	* elflink.c (_bfd_elf_link_check_relocs): New function.
3404*e6c7e151Schristos	(elf_link_add_object_symbols): Call _bfd_elf_link_check_relocs
3405*e6c7e151Schristos	if check_relocs_after_open_input is FALSE.
3406*e6c7e151Schristos
3407*e6c7e151Schristos2016-04-20  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
3408*e6c7e151Schristos
3409*e6c7e151Schristos	* cache.c: Update old style function definitions.
3410*e6c7e151Schristos	* elf32-m68k.c: Likewise.
3411*e6c7e151Schristos	* elf64-mmix.c: Likewise.
3412*e6c7e151Schristos	* stab-syms.c: Likewise.
3413*e6c7e151Schristos
3414*e6c7e151Schristos2016-04-20  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
3415*e6c7e151Schristos
3416*e6c7e151Schristos	* elf32-arm.c (put_thumb2_insn): Change argument type to bfd_byte *.
3417*e6c7e151Schristos
3418*e6c7e151Schristos2016-04-15  H.J. Lu  <hongjiu.lu@intel.com>
3419*e6c7e151Schristos
3420*e6c7e151Schristos	* Makefile.in: Regenerated with automake 1.11.6.
3421*e6c7e151Schristos	* aclocal.m4: Likewise.
3422*e6c7e151Schristos	* doc/Makefile.in: Likewise.
3423*e6c7e151Schristos
3424*e6c7e151Schristos2016-04-14  Andrew Burgess  <andrew.burgess@embecosm.com>
3425*e6c7e151Schristos
3426*e6c7e151Schristos	* reloc.c: Add BFD_RELOC_ARC_NPS_CMEM16 entry.
3427*e6c7e151Schristos	* bfd-in2.h: Regenerate.
3428*e6c7e151Schristos	* libbfd.h: Regenerate.
3429*e6c7e151Schristos	* elf32-arc.c: Add 'opcode/arc.h' include.
3430*e6c7e151Schristos	(struct arc_relocation_data): Add symbol_name.
3431*e6c7e151Schristos	(arc_special_overflow_checks): New function.
3432*e6c7e151Schristos	(arc_do_relocation): Use arc_special_overflow_checks, reindent as
3433*e6c7e151Schristos	required, add an extra comment.
3434*e6c7e151Schristos	(elf_arc_relocate_section): Setup symbol_name in reloc_data.
3435*e6c7e151Schristos
3436*e6c7e151Schristos2016-04-14  Andrew Burgess  <andrew.burgess@embecosm.com>
3437*e6c7e151Schristos
3438*e6c7e151Schristos	* elf32-arc.c (tls_got_entries): Add 'TLS_GOT_' prefix to all
3439*e6c7e151Schristos	entries.
3440*e6c7e151Schristos	(elf_arc_relocate_section): Update enum uses.
3441*e6c7e151Schristos	(elf_arc_check_relocs): Likewise.
3442*e6c7e151Schristos	(elf_arc_finish_dynamic_symbol): Likewise.
3443*e6c7e151Schristos
3444*e6c7e151Schristos2016-04-14  H.J. Lu  <hongjiu.lu@intel.com>
3445*e6c7e151Schristos
3446*e6c7e151Schristos	* elf.c (_bfd_elf_copy_private_bfd_data): Replace "link" with
3447*e6c7e151Schristos	"sh_link".
3448*e6c7e151Schristos
3449*e6c7e151Schristos2016-04-14  Nick Clifton  <nickc@redhat.com>
3450*e6c7e151Schristos
3451*e6c7e151Schristos	PR target/19938
3452*e6c7e151Schristos	* elf-bbfd.h (struct elf_backend_data): New field:
3453*e6c7e151Schristos	elf_strtab_flags.
3454*e6c7e151Schristos	New field: elf_backend_set_special_section_info_and_link
3455*e6c7e151Schristos	* elfxx-target.h (elf_backend_strtab_flags): Define if not already
3456*e6c7e151Schristos	defined.
3457*e6c7e151Schristos	(elf_backend_set_special_section_info_and_link): Define if not
3458*e6c7e151Schristos	already defined.
3459*e6c7e151Schristos	(elfNN_bed): Use elf_backend_set_special_section_info_and_link and
3460*e6c7e151Schristos	elf_backend_strtab_flags macros to initialise fields in structure.
3461*e6c7e151Schristos	* elf.c (_bfd_elf_make_section_from_shdr): Check for SHF_STRINGS
3462*e6c7e151Schristos	being set even if SHF_MERGE is not set.
3463*e6c7e151Schristos	(elf_fake_sections): Likewise.
3464*e6c7e151Schristos	(section_match): New function.  Matches two ELF sections based
3465*e6c7e151Schristos	upon fixed characteristics.
3466*e6c7e151Schristos	(find_link): New function.  Locates a section in a BFD that
3467*e6c7e151Schristos	matches a section in a different BFD.
3468*e6c7e151Schristos	(_bfd_elf_copy_private_bfd_data): Copy the sh_info and sh_link
3469*e6c7e151Schristos	fields of reserved sections.
3470*e6c7e151Schristos	(bfd_elf_compute_section_file_positions): Set the flags for the
3471*e6c7e151Schristos	.shstrtab section based upon the elf_strtab_flags field in the
3472*e6c7e151Schristos	elf_backend_data structure.
3473*e6c7e151Schristos	(swap_out_syms): Likewise for the .strtab section.
3474*e6c7e151Schristos	* elflink.c (bfd_elf_final_link): Set the flags for the
3475*e6c7e151Schristos	.strtab section based upon the elf_strtab_flags field in the
3476*e6c7e151Schristos	elf_backend_data structure.
3477*e6c7e151Schristos	* elf32-i386.c (elf32_i386_set_special_info_link): New function.
3478*e6c7e151Schristos	(elf_backend_strtab_flags): Set to SHF_STRINGS for Solaris
3479*e6c7e151Schristos	targets.
3480*e6c7e151Schristos	(elf_backend_set_special_section_info_and_link): Define for
3481*e6c7e151Schristos	Solaris targets.
3482*e6c7e151Schristos	* elf32-sparc.c: Likewise.
3483*e6c7e151Schristos	* elf64-x86-64.c: Likewise.
3484*e6c7e151Schristos
3485*e6c7e151Schristos2016-04-11  H.J. Lu  <hongjiu.lu@intel.com>
3486*e6c7e151Schristos
3487*e6c7e151Schristos	PR ld/19939
3488*e6c7e151Schristos	* elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): Add a pointer
3489*e6c7e151Schristos	to bfd_boolean.
3490*e6c7e151Schristos	* elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Updated.
3491*e6c7e151Schristos	Set *readonly_dynrelocs_against_ifunc_p to TRUE if dynamic reloc
3492*e6c7e151Schristos	applies to read-only section.
3493*e6c7e151Schristos	* elf32-i386.c (elf_i386_link_hash_table): Add
3494*e6c7e151Schristos	readonly_dynrelocs_against_ifunc.
3495*e6c7e151Schristos	(elf_i386_allocate_dynrelocs): Updated.
3496*e6c7e151Schristos	(elf_i386_size_dynamic_sections): Issue an error for read-only
3497*e6c7e151Schristos	segment with dynamic IFUNC relocations only if
3498*e6c7e151Schristos	readonly_dynrelocs_against_ifunc is TRUE.
3499*e6c7e151Schristos	* elf64-x86-64.c (elf_x86_64_link_hash_table): Add
3500*e6c7e151Schristos	readonly_dynrelocs_against_ifunc.
3501*e6c7e151Schristos	(elf_x86_64_allocate_dynrelocs): Updated.
3502*e6c7e151Schristos	(elf_x86_64_size_dynamic_sections): Issue an error for read-only
3503*e6c7e151Schristos	segment with dynamic IFUNC relocations only if
3504*e6c7e151Schristos	readonly_dynrelocs_against_ifunc is TRUE.
3505*e6c7e151Schristos	* elfnn-aarch64.c (elfNN_aarch64_allocate_ifunc_dynrelocs):
3506*e6c7e151Schristos	Updated.
3507*e6c7e151Schristos
3508*e6c7e151Schristos2016-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
3509*e6c7e151Schristos
3510*e6c7e151Schristos	* elf32-arm.c (elf32_arm_size_stubs): Move error_ret_free_local to be
3511*e6c7e151Schristos	a fall through from error_ret_free_internal.  Free local_syms in
3512*e6c7e151Schristos	error_ret_free_local if allocated from bfd_elf_get_elf_syms ().
3513*e6c7e151Schristos
3514*e6c7e151Schristos2016-04-05  Cupertino Miranda  <cmiranda@synopsys.com>
3515*e6c7e151Schristos
3516*e6c7e151Schristos	* elf32-arc.c (plt_do_relocs_for_symbol): Changed.
3517*e6c7e151Schristos	(relocate_plt_for_entry): Likewise.
3518*e6c7e151Schristos
3519*e6c7e151Schristos2016-04-05  Cupertino Miranda  <cmiranda@synopsys.com>
3520*e6c7e151Schristos
3521*e6c7e151Schristos	* elf32-arc.c (elf_arc_check_relocs): Changed
3522*e6c7e151Schristos
3523*e6c7e151Schristos2016-04-05  Cupertino Miranda  <cmiranda@synopsys.com>
3524*e6c7e151Schristos
3525*e6c7e151Schristos	* elf32-arc.c (name_for_global_symbol): Changed assert.
3526*e6c7e151Schristos	(get_replace_function): Created.:
3527*e6c7e151Schristos	(struct arc_relocation_data): Changed to signed types.
3528*e6c7e151Schristos	(defines S, L, P, PDATA): Casted to signed type.
3529*e6c7e151Schristos	(defines SECTSTART, _SDA_BASE_, TLS_REL): Likewise.
3530*e6c7e151Schristos	(PRINT_DEBUG_RELOC_INFO_BEFORE): Changed.
3531*e6c7e151Schristos	(arc_do_relocation): Changed.
3532*e6c7e151Schristos
3533*e6c7e151Schristos2016-04-05  Cupertino Miranda  <cmiranda@synopsys.com>
3534*e6c7e151Schristos
3535*e6c7e151Schristos	* elf32-arc.c (name_for_global_symbol): Added assert to check for
3536*e6c7e151Schristos	symbol index.
3537*e6c7e151Schristos	(elf_arc_relocate_section): Added and changed asserts, validating
3538*e6c7e151Schristos	the synamic symbol index.
3539*e6c7e151Schristos	(elf_arc_finish_dynamic_symbol): Do not fill the dynamic
3540*e6c7e151Schristos	relocation if symbol has dynindx set to -1.
3541*e6c7e151Schristos
3542*e6c7e151Schristos2016-04-05  Maciej W. Rozycki  <macro@imgtec.com>
3543*e6c7e151Schristos
3544*e6c7e151Schristos	PR ld/19908
3545*e6c7e151Schristos	* elflink.c (elf_link_add_object_symbols): Always turn hidden
3546*e6c7e151Schristos	and internal symbols which have a dynamic index into local
3547*e6c7e151Schristos	ones.
3548*e6c7e151Schristos
3549*e6c7e151Schristos2016-04-04  Nick Clifton  <nickc@redhat.com>
3550*e6c7e151Schristos
3551*e6c7e151Schristos	PR 19872
3552*e6c7e151Schristos	* dwarf2.c (parse_comp_unit): Skip warning about unrecognised
3553*e6c7e151Schristos	version number if the version is zero.
3554*e6c7e151Schristos
3555*e6c7e151Schristos2016-04-01  Alan Modra  <amodra@gmail.com>
3556*e6c7e151Schristos
3557*e6c7e151Schristos	PR 19886
3558*e6c7e151Schristos	* elflink.c (on_needed_list): Recursively check needed status.
3559*e6c7e151Schristos	(elf_link_add_object_symbols): Adjust.
3560*e6c7e151Schristos
3561*e6c7e151Schristos2016-03-30  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
3562*e6c7e151Schristos
3563*e6c7e151Schristos	* elf32-avr.c (avr_elf32_load_records_from_section): Free
3564*e6c7e151Schristos	internal_relocs only if they aren't cached.
3565*e6c7e151Schristos
3566*e6c7e151Schristos2016-03-29  Nick Clifton  <nickc@redhat.com>
3567*e6c7e151Schristos
3568*e6c7e151Schristos	PR 17334
3569*e6c7e151Schristos	* elf32-bfin.c (elf32_bfinfdpic_finish_dynamic_sections): Relax
3570*e6c7e151Schristos	assertion on the size of the got section to allow it to be bigger
3571*e6c7e151Schristos	than the number of relocs.
3572*e6c7e151Schristos
3573*e6c7e151Schristos2016-03-29  Toni Spets  <toni.spets@iki.fi>
3574*e6c7e151Schristos
3575*e6c7e151Schristos	PR 19878
3576*e6c7e151Schristos	* coffcode.h (coff_write_object_contents): Revert accidental
3577*e6c7e151Schristos	2014-11-10 change.
3578*e6c7e151Schristos
3579*e6c7e151Schristos2016-03-22  Alan Modra  <amodra@gmail.com>
3580*e6c7e151Schristos
3581*e6c7e151Schristos	PR 19850
3582*e6c7e151Schristos	* dwarf2.c (read_attribute_value): Skip info_ptr check for
3583*e6c7e151Schristos	DW_FORM_flag_present.
3584*e6c7e151Schristos
3585*e6c7e151Schristos2016-03-22  Nick Clifton  <nickc@redhat.com>
3586*e6c7e151Schristos
3587*e6c7e151Schristos	* cpu-v850_rh850.c (arch_info_struct): Restore v850-rh850 as an
3588*e6c7e151Schristos	architecture name for backwards compatibility.
3589*e6c7e151Schristos
3590*e6c7e151Schristos	* peXXigen.c (_bfd_XXi_write_codeview_record): Fix possible
3591*e6c7e151Schristos	unbounded stack use.
3592*e6c7e151Schristos
3593*e6c7e151Schristos	* warning.m4 (GCC_WARN_CFLAGS): Only add -Wstack-usage if using a
3594*e6c7e151Schristos	sufficiently recent version of GCC.
3595*e6c7e151Schristos	* configure: Regenerate.
3596*e6c7e151Schristos
3597*e6c7e151Schristos2016-03-22  Alan Modra  <amodra@gmail.com>
3598*e6c7e151Schristos
3599*e6c7e151Schristos	PR 19851
3600*e6c7e151Schristos	* plugin.c (try_load_plugin): Avoid -Wstack-usage warning.
3601*e6c7e151Schristos
3602*e6c7e151Schristos2016-03-21  Andrew Burgess  <andrew.burgess@embecosm.com>
3603*e6c7e151Schristos
3604*e6c7e151Schristos	* archures.c (bfd_mach_arc_nps400): Define.
3605*e6c7e151Schristos	* bfd-in2.h: Regenerate.
3606*e6c7e151Schristos	* cpu-arc.c (arch_info_struct): New entry for nps400, renumber
3607*e6c7e151Schristos	some existing entries to make space.
3608*e6c7e151Schristos	* elf32-arc.c (arc_elf_object_p): Add nps400 case.
3609*e6c7e151Schristos	(arc_elf_final_write_processing): Likewise.
3610*e6c7e151Schristos
3611*e6c7e151Schristos2016-03-21  Andrew Burgess  <andrew.burgess@embecosm.com>
3612*e6c7e151Schristos
3613*e6c7e151Schristos	* elf32-arc.c (arc_elf_print_private_bfd_data): Remove use of
3614*e6c7e151Schristos	EF_ARC_CPU_GENERIC.
3615*e6c7e151Schristos	(arc_elf_final_write_processing): Don't bother setting cpu field
3616*e6c7e151Schristos	in e_flags, this will have been set elsewhere.
3617*e6c7e151Schristos
3618*e6c7e151Schristos2016-03-21  Andrew Burgess  <andrew.burgess@embecosm.com>
3619*e6c7e151Schristos
3620*e6c7e151Schristos	* elf32-arc.c (arc_elf_final_write_processing): Switch to using
3621*e6c7e151Schristos	EF_ARC_MACH_MSK.
3622*e6c7e151Schristos
3623*e6c7e151Schristos2016-03-21  Nick Clifton  <nickc@redhat.com>
3624*e6c7e151Schristos
3625*e6c7e151Schristos	* warning.m4 (GCC_WARN_CFLAGS): Add -Wstack-usage=262144
3626*e6c7e151Schristos	* configure: Regenerate.
3627*e6c7e151Schristos	* elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Replace use of
3628*e6c7e151Schristos	alloca with call to xmalloc.
3629*e6c7e151Schristos	* elf32-nds32.c: Likewise.
3630*e6c7e151Schristos	* elf64-hppa.c: Likewise.
3631*e6c7e151Schristos	* elfxx-mips.c: Likewise.
3632*e6c7e151Schristos	* pef.c: Likewise.
3633*e6c7e151Schristos	* pei-x86_64.c: Likewise.
3634*e6c7e151Schristos	* som.c: Likewise.
3635*e6c7e151Schristos	* xsym.c: Likewise.
3636*e6c7e151Schristos
3637*e6c7e151Schristos2016-03-15  H.J. Lu  <hongjiu.lu@intel.com>
3638*e6c7e151Schristos
3639*e6c7e151Schristos	PR ld/19827
3640*e6c7e151Schristos	* elf32-i386.c (elf_i386_check_relocs): Bind defined symbol
3641*e6c7e151Schristos	locally in PIE.
3642*e6c7e151Schristos	(elf_i386_relocate_section): Likewise.
3643*e6c7e151Schristos	* elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
3644*e6c7e151Schristos	(elf_x86_64_relocate_section): Likewise.
3645*e6c7e151Schristos
3646*e6c7e151Schristos2016-03-15  H.J. Lu  <hongjiu.lu@intel.com>
3647*e6c7e151Schristos
3648*e6c7e151Schristos	PR ld/19807
3649*e6c7e151Schristos	* elf64-x86-64.c (elf_x86_64_relocate_section): Check
3650*e6c7e151Schristos	no_reloc_overflow_check to diable R_X86_64_32/R_X86_64_32S
3651*e6c7e151Schristos	relocation overflow check.
3652*e6c7e151Schristos
3653*e6c7e151Schristos2016-03-14  H.J. Lu  <hongjiu.lu@intel.com>
3654*e6c7e151Schristos
3655*e6c7e151Schristos	* bfd-in2.h: Regenerated.
3656*e6c7e151Schristos
3657*e6c7e151Schristos2016-03-11  Dan Gissel  <dgisselq@ieee.org>
3658*e6c7e151Schristos
3659*e6c7e151Schristos	PR 19713
3660*e6c7e151Schristos	* elf.c (_bfd_elf_section_offset): Ensure that the returned offset
3661*e6c7e151Schristos	uses bytes not octets.
3662*e6c7e151Schristos	* elflink.c (resolve_section): Likewise.
3663*e6c7e151Schristos	Add a bfd parameter.
3664*e6c7e151Schristos	(eval_section): Pass the input_bfd to resolve_section.
3665*e6c7e151Schristos	(bfd_elf_perform_complex_relocation): Convert byte offset to
3666*e6c7e151Schristos	octets before read and writing values.
3667*e6c7e151Schristos	(elf_link_input_bfd): Add byte to octet conversions.
3668*e6c7e151Schristos	(elf_reloc_link_order): Likewise.
3669*e6c7e151Schristos	(elf_fixup_link_order): Likewise.
3670*e6c7e151Schristos	(bfd_elf_final_link): Likewise.
3671*e6c7e151Schristos	* reloc.c (_bfd_final_link_relocate): Likewise.
3672*e6c7e151Schristos	* syms.c (_bfd_stab_section_find_nearest_line): Likewise.
3673*e6c7e151Schristos
3674*e6c7e151Schristos2016-03-10  Nick Clifton  <nickc@redhat.com>
3675*e6c7e151Schristos
3676*e6c7e151Schristos	* config.bfd: Mark the i370 target as obsolete.
3677*e6c7e151Schristos
3678*e6c7e151Schristos2016-03-09  Pedro Alves  <palves@redhat.com>
3679*e6c7e151Schristos
3680*e6c7e151Schristos	* cpu-v850.c (N): Append ":old-gcc-abi" instead of " (using old
3681*e6c7e151Schristos	gcc ABI)" to printable name.
3682*e6c7e151Schristos	* cpu-v850_rh850.c (bfd_v850_rh850_arch): Use "v850:rh850" instead
3683*e6c7e151Schristos	of "v850-rh850" as printable name.
3684*e6c7e151Schristos
3685*e6c7e151Schristos2016-03-09  Leon Winter  <winter-gcc@bfw-online.de>
3686*e6c7e151Schristos
3687*e6c7e151Schristos	PR ld/19623
3688*e6c7e151Schristos	* cofflink.c (_bfd_coff_generic_relocate_section): Do not apply
3689*e6c7e151Schristos	relocations against absolute symbols.
3690*e6c7e151Schristos
3691*e6c7e151Schristos2016-03-09  Alan Modra  <amodra@gmail.com>
3692*e6c7e151Schristos
3693*e6c7e151Schristos	PR binutils/19775
3694*e6c7e151Schristos	* coff-alpha.c (alpha_ecoff_openr_next_archived_file): Allow zero
3695*e6c7e151Schristos	length elements in the archive.
3696*e6c7e151Schristos
3697*e6c7e151Schristos2016-03-08  H.J. Lu  <hongjiu.lu@intel.com>
3698*e6c7e151Schristos
3699*e6c7e151Schristos	PR ld/19789
3700*e6c7e151Schristos	* elflink.c (elf_link_add_object_symbols): Create dynamic sections
3701*e6c7e151Schristos	for -E/--dynamic-list only when not relocatable.
3702*e6c7e151Schristos
3703*e6c7e151Schristos2016-03-08  H.J. Lu  <hongjiu.lu@intel.com>
3704*e6c7e151Schristos
3705*e6c7e151Schristos	PR ld/19784
3706*e6c7e151Schristos	* elf32-i386.c (elf_i386_check_relocs): Increment PLT reference
3707*e6c7e151Schristos	count for locally defined local IFUNC symbols in shared object.
3708*e6c7e151Schristos	* elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
3709*e6c7e151Schristos
3710*e6c7e151Schristos2016-03-08  H.J. Lu  <hongjiu.lu@intel.com>
3711*e6c7e151Schristos
3712*e6c7e151Schristos	PR ld/19579
3713*e6c7e151Schristos	* elflink.c (_bfd_elf_merge_symbol): Group common symbol checking
3714*e6c7e151Schristos	together.
3715*e6c7e151Schristos
3716*e6c7e151Schristos2016-03-08  Cupertino Miranda  <Cupertino.Miranda@synopsys.com>
3717*e6c7e151Schristos	    Andrew Burgess  <andrew.burgess@embecosm.com>
3718*e6c7e151Schristos
3719*e6c7e151Schristos	* elf32-arc.c (arc_bfd_get_32): Becomes an alias for bfd_get_32.
3720*e6c7e151Schristos	(arc_bfd_put_32): Becomes an alias for bfd_put_32.
3721*e6c7e151Schristos	(arc_elf_howto_init): Added assert to validate relocations.
3722*e6c7e151Schristos	(get_middle_endian_relocation): Delete.
3723*e6c7e151Schristos	(middle_endian_convert): New function.
3724*e6c7e151Schristos	(ME): Redefine, now does nothing.
3725*e6c7e151Schristos	(IS_ME): New define.
3726*e6c7e151Schristos	(arc_do_relocation): Extend the attached 'ARC_RELOC_HOWTO'
3727*e6c7e151Schristos	definition to call middle_endian_convert.  Add a new local
3728*e6c7e151Schristos	variable and make use of this throughout. Added call to
3729*e6c7e151Schristos	arc_bfd_get_8 and arc_bfd_put_8 for 8 bit relocations.
3730*e6c7e151Schristos
3731*e6c7e151Schristos2016-03-07  Nick Clifton  <nickc@redhat.com>
3732*e6c7e151Schristos
3733*e6c7e151Schristos	PR binutils/19775
3734*e6c7e151Schristos	* archive.c (bfd_generic_openr_next_archived_file): Allow zero
3735*e6c7e151Schristos	length elements in the archive.
3736*e6c7e151Schristos
3737*e6c7e151Schristos2016-03-07  Jiong Wang  <jiong.wang@arm.com>
3738*e6c7e151Schristos
3739*e6c7e151Schristos	* elfnn-aarch64.c (elfNN_aarch64_check_relocs): Always create .got
3740*e6c7e151Schristos	section if the symbol "_GLOBAL_OFFSET_TABLE_" is referenced.
3741*e6c7e151Schristos
3742*e6c7e151Schristos2016-03-04  H.J. Lu  <hongjiu.lu@intel.com>
3743*e6c7e151Schristos
3744*e6c7e151Schristos	PR ld/19579
3745*e6c7e151Schristos	* elflink.c (_bfd_elf_merge_symbol): Treat common symbol in
3746*e6c7e151Schristos	executable as definition if the new definition comes from a
3747*e6c7e151Schristos	shared library.
3748*e6c7e151Schristos
3749*e6c7e151Schristos2016-03-02  Alan Modra  <amodra@gmail.com>
3750*e6c7e151Schristos
3751*e6c7e151Schristos	* Makefile.in: Regenerate.
3752*e6c7e151Schristos	* po/SRC-POTFILES.in: Regenerate.
3753*e6c7e151Schristos
3754*e6c7e151Schristos2016-02-29  Cupertino Miranda  <cmiranda@synopsys.com>
3755*e6c7e151Schristos
3756*e6c7e151Schristos	* elf32-arc.c (elf_arc_relocate_section): Added rules to fix the
3757*e6c7e151Schristos	relocation addend when sections get merged.
3758*e6c7e151Schristos
3759*e6c7e151Schristos2016-02-29  Cupertino Miranda <Cupertino.Miranda@synopsys.com>
3760*e6c7e151Schristos
3761*e6c7e151Schristos	* elf32-arc.c (arc_elf_final_write_processing): Add condition to
3762*e6c7e151Schristos	the flag change.
3763*e6c7e151Schristos        (elf_arc_relocate_section): Fixes and conditions to support PIE.
3764*e6c7e151Schristos	Assert for code sections dynamic relocs.
3765*e6c7e151Schristos
3766*e6c7e151Schristos2016-02-26  Renlin Li  <renlin.li@arm.com>
3767*e6c7e151Schristos
3768*e6c7e151Schristos	* elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix signed overflow
3769*e6c7e151Schristos	check for MOVW_SABS_G0, MOVW_SABS_G1, MOVW_SABS_G2.
3770*e6c7e151Schristos
3771*e6c7e151Schristos2016-02-26  H.J. Lu  <hongjiu.lu@intel.com>
3772*e6c7e151Schristos
3773*e6c7e151Schristos	PR ld/19609
3774*e6c7e151Schristos	* elf32-i386.c (elf_i386_convert_load): Convert to R_386_32 for
3775*e6c7e151Schristos	load with locally bound symbols if PIC is false or there is no
3776*e6c7e151Schristos	base register.  Optimize branch to 0 if PIC is false.
3777*e6c7e151Schristos	(elf_i386_relocate_section): Don't generate dynamic relocations
3778*e6c7e151Schristos	against undefined weak symbols if PIC is false.
3779*e6c7e151Schristos	* elf64-x86-64.c (elf_x86_64_convert_load): Disable optimization
3780*e6c7e151Schristos	if we can't estimate relocation overflow with --no-relax.
3781*e6c7e151Schristos	Convert to R_X86_64_32S/R_X86_64_32 for load with locally bound
3782*e6c7e151Schristos	symbols if PIC is false.  Optimize branch to 0 if PIC is false.
3783*e6c7e151Schristos	(elf_x86_64_relocate_section): Don't generate dynamic relocations
3784*e6c7e151Schristos	against undefined weak symbols if PIC is false.
3785*e6c7e151Schristos
3786*e6c7e151Schristos2016-02-26  H.J. Lu  <hongjiu.lu@intel.com>
3787*e6c7e151Schristos
3788*e6c7e151Schristos	PR ld/19645
3789*e6c7e151Schristos	* bfd.c (bfd): Change flags to 20 bits.
3790*e6c7e151Schristos	(BFD_CONVERT_ELF_COMMON): New.
3791*e6c7e151Schristos	(BFD_USE_ELF_STT_COMMON): Likewise.
3792*e6c7e151Schristos	(BFD_FLAGS_SAVED): Add BFD_CONVERT_ELF_COMMON and
3793*e6c7e151Schristos	BFD_USE_ELF_STT_COMMON.
3794*e6c7e151Schristos	(BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
3795*e6c7e151Schristos	* configure.ac: Remove --enable-elf-stt-common.
3796*e6c7e151Schristos	* elf.c (swap_out_syms): Choose STT_COMMON or STT_OBJECT for
3797*e6c7e151Schristos	common symbol depending on BFD_CONVERT_ELF_COMMON and
3798*e6c7e151Schristos	BFD_USE_ELF_STT_COMMON.
3799*e6c7e151Schristos	* elfcode.h (elf_slurp_symbol_table): Set BSF_ELF_COMMON for
3800*e6c7e151Schristos	STT_COMMON.
3801*e6c7e151Schristos	* elflink.c (bfd_elf_link_mark_dynamic_symbol): Also check
3802*e6c7e151Schristos	STT_COMMON.
3803*e6c7e151Schristos	(elf_link_convert_common_type): New function.
3804*e6c7e151Schristos	(elf_link_output_extsym): Choose STT_COMMON or STT_OBJECT for
3805*e6c7e151Schristos	common symbol depending on BFD_CONVERT_ELF_COMMON and
3806*e6c7e151Schristos	BFD_USE_ELF_STT_COMMON.  Set sym.st_info after sym.st_shndx.
3807*e6c7e151Schristos	* elfxx-target.h (TARGET_BIG_SYM): Add BFD_CONVERT_ELF_COMMON
3808*e6c7e151Schristos	and BFD_USE_ELF_STT_COMMON to object_flags.
3809*e6c7e151Schristos	(TARGET_LITTLE_SYM): Likewise.
3810*e6c7e151Schristos	* syms.c (BSF_KEEP_G): Renamed to ...
3811*e6c7e151Schristos	(BSF_ELF_COMMON): This.
3812*e6c7e151Schristos	* bfd-in2.h: Regenerated.
3813*e6c7e151Schristos	* config.in: Likewise.
3814*e6c7e151Schristos	* configure: Likewise.
3815*e6c7e151Schristos
3816*e6c7e151Schristos2016-02-26  H.J. Lu  <hongjiu.lu@intel.com>
3817*e6c7e151Schristos
3818*e6c7e151Schristos	PR ld/19636
3819*e6c7e151Schristos	PR ld/19704
3820*e6c7e151Schristos	PR ld/19719
3821*e6c7e151Schristos	* elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
3822*e6c7e151Schristos	(elf_i386_link_hash_entry): Add has_got_reloc and
3823*e6c7e151Schristos	has_non_got_reloc.
3824*e6c7e151Schristos	(elf_i386_link_hash_table): Add interp.
3825*e6c7e151Schristos	(elf_i386_link_hash_newfunc): Initialize has_got_reloc and
3826*e6c7e151Schristos	has_non_got_reloc.
3827*e6c7e151Schristos	(elf_i386_copy_indirect_symbol): Copy has_got_reloc and
3828*e6c7e151Schristos	has_non_got_reloc.
3829*e6c7e151Schristos	(elf_i386_check_relocs): Set has_got_reloc and has_non_got_reloc.
3830*e6c7e151Schristos	(elf_i386_fixup_symbol): New function.
3831*e6c7e151Schristos	(elf_i386_pie_finish_undefweak_symbol): Likewise.
3832*e6c7e151Schristos	(elf_i386_allocate_dynrelocs): Don't allocate space for dynamic
3833*e6c7e151Schristos	relocations and discard relocations against resolved undefined
3834*e6c7e151Schristos	weak symbols in executable.  Don't make resolved undefined weak
3835*e6c7e151Schristos	symbols in executable dynamic.  Keep dynamic non-GOT/non-PLT
3836*e6c7e151Schristos	relocation against undefined weak symbols in PIE.
3837*e6c7e151Schristos	(elf_i386_size_dynamic_sections): Set interp to .interp section.
3838*e6c7e151Schristos	(elf_i386_relocate_section): Don't generate dynamic relocations
3839*e6c7e151Schristos	against resolved undefined weak symbols in PIE, except for
3840*e6c7e151Schristos	R_386_PC32.
3841*e6c7e151Schristos	(elf_i386_finish_dynamic_symbol): Keep PLT/GOT entries without
3842*e6c7e151Schristos	dynamic PLT/GOT relocations for resolved undefined weak symbols.
3843*e6c7e151Schristos	Don't generate dynamic relocation against resolved undefined weak
3844*e6c7e151Schristos	symbol in executable.
3845*e6c7e151Schristos	(elf_i386_finish_dynamic_sections): Call
3846*e6c7e151Schristos	elf_i386_pie_finish_undefweak_symbol on all symbols in PIE.
3847*e6c7e151Schristos	(elf_backend_fixup_symbol): New.
3848*e6c7e151Schristos	* elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
3849*e6c7e151Schristos	(elf_x86_64_link_hash_entry): Add has_got_reloc and
3850*e6c7e151Schristos	has_non_got_reloc.
3851*e6c7e151Schristos	(elf_x86_64_link_hash_table): Add interp.
3852*e6c7e151Schristos	(elf_x86_64_link_hash_newfunc): Initialize has_got_reloc and
3853*e6c7e151Schristos	has_non_got_reloc.
3854*e6c7e151Schristos	(elf_x86_64_copy_indirect_symbol): Copy has_got_reloc and
3855*e6c7e151Schristos	has_non_got_reloc.
3856*e6c7e151Schristos	(elf_x86_64_check_relocs): Set has_got_reloc and
3857*e6c7e151Schristos	has_non_got_reloc.
3858*e6c7e151Schristos	(elf_x86_64_fixup_symbol): New function.
3859*e6c7e151Schristos	(elf_x86_64_pie_finish_undefweak_symbol): Likewise.
3860*e6c7e151Schristos	(elf_x86_64_allocate_dynrelocs): Don't allocate space for dynamic
3861*e6c7e151Schristos	relocations and discard relocations against resolved undefined
3862*e6c7e151Schristos	weak symbols in executable.  Don't make resolved undefined weak
3863*e6c7e151Schristos	symbols in executable dynamic.
3864*e6c7e151Schristos	(elf_x86_64_size_dynamic_sections): Set interp to .interp section.
3865*e6c7e151Schristos	(elf_x86_64_relocate_section): Check relocation overflow for
3866*e6c7e151Schristos	dynamic relocations against unresolved weak undefined symbols.
3867*e6c7e151Schristos	Don't generate dynamic relocations against resolved weak
3868*e6c7e151Schristos	undefined symbols in PIE.
3869*e6c7e151Schristos	(elf_x86_64_finish_dynamic_symbol): Keep PLT/GOT entries without
3870*e6c7e151Schristos	dynamic PLT/GOT relocations for resolved undefined weak symbols.
3871*e6c7e151Schristos	Don't generate dynamic relocation against resolved undefined weak
3872*e6c7e151Schristos	symbol in executable.
3873*e6c7e151Schristos	(elf_x86_64_finish_dynamic_sections): Call
3874*e6c7e151Schristos	elf_x86_64_pie_finish_undefweak_symbol on all symbols in PIE.
3875*e6c7e151Schristos	(elf_backend_fixup_symbol): New.
3876*e6c7e151Schristos
3877*e6c7e151Schristos2016-02-26  Alan Modra  <amodra@gmail.com>
3878*e6c7e151Schristos
3879*e6c7e151Schristos	* elf64-ppc.c (create_linkage_sections): Create sfpr when
3880*e6c7e151Schristos	save_restore_funcs, rest of sections when not relocatable.
3881*e6c7e151Schristos	(ppc64_elf_init_stub_bfd): Always call create_linkage_sections.
3882*e6c7e151Schristos	(sfpr_define): Define all symbols on emitted code.
3883*e6c7e151Schristos	(ppc64_elf_func_desc_adjust): Adjust for sfpr now being created
3884*e6c7e151Schristos	when relocatable.  Move sfpr_define loop earlier.
3885*e6c7e151Schristos
3886*e6c7e151Schristos2016-02-24  H.J. Lu  <hongjiu.lu@intel.com>
3887*e6c7e151Schristos
3888*e6c7e151Schristos	* elf64-x86-64.c (elf_x86_64_need_pic): New function.
3889*e6c7e151Schristos	(elf_x86_64_relocate_section): Use it.  Replace
3890*e6c7e151Schristos	x86_64_elf_howto_table[r_type] with howto.
3891*e6c7e151Schristos
3892*e6c7e151Schristos2016-02-24  H.J. Lu  <hongjiu.lu@intel.com>
3893*e6c7e151Schristos
3894*e6c7e151Schristos	PR ld/19698
3895*e6c7e151Schristos	* elflink.c (bfd_elf_record_link_assignment): Set versioned if
3896*e6c7e151Schristos	symbol version is unknown.
3897*e6c7e151Schristos
3898*e6c7e151Schristos2016-02-24  H.J. Lu  <hongjiu.lu@intel.com>
3899*e6c7e151Schristos
3900*e6c7e151Schristos	* elf32-i386.c (elf_i386_allocate_dynrelocs): Set plt_got.offset
3901*e6c7e151Schristos	to (bfd_vma) -1 when setting needs_plt to 0.
3902*e6c7e151Schristos	* elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
3903*e6c7e151Schristos
3904*e6c7e151Schristos2016-02-23  H.J. Lu  <hongjiu.lu@intel.com>
3905*e6c7e151Schristos
3906*e6c7e151Schristos	* elflink.c (bfd_elf_record_link_assignment): Check for shared
3907*e6c7e151Schristos	library, instead of PIC, and don't check PDE when making linker
3908*e6c7e151Schristos	assigned symbol dynamic.
3909*e6c7e151Schristos
3910*e6c7e151Schristos2016-02-23  Faraz Shahbazker  <faraz.shahbazker@imgtec.com>
3911*e6c7e151Schristos
3912*e6c7e151Schristos	* bfd/elfxx-mips.c (_bfd_mips_post_process_headers): Increment
3913*e6c7e151Schristos	ABIVERSION for non-executable stack.
3914*e6c7e151Schristos
3915*e6c7e151Schristos2016-02-23  Rich Felker  <bugdal@aerifal.cx>
3916*e6c7e151Schristos
3917*e6c7e151Schristos	PR target/19516
3918*e6c7e151Schristos	* elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol):
3919*e6c7e151Schristos	Always produce a RELATIVE reloc for a local symbol.
3920*e6c7e151Schristos
3921*e6c7e151Schristos2016-02-23  Hans-Peter Nilsson  <hp@axis.com>
3922*e6c7e151Schristos
3923*e6c7e151Schristos	Fix test-case ld-elf/pr19617b
3924*e6c7e151Schristos	* elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
3925*e6c7e151Schristos	discard unused non-function symbols when --dynamic-list-data.
3926*e6c7e151Schristos
3927*e6c7e151Schristos2016-02-22  H.J. Lu  <hongjiu.lu@intel.com>
3928*e6c7e151Schristos
3929*e6c7e151Schristos	* elflink.c (_bfd_elf_link_renumber_dynsyms): Always create the
3930*e6c7e151Schristos	dynsym section, even if it is empty, with dynamic sections.
3931*e6c7e151Schristos
3932*e6c7e151Schristos2016-02-22  H.J. Lu  <hongjiu.lu@intel.com>
3933*e6c7e151Schristos
3934*e6c7e151Schristos	* syms.c: Remove BSF_COMMON from comments.
3935*e6c7e151Schristos	* bfd-in2.h: Regenerated.
3936*e6c7e151Schristos
3937*e6c7e151Schristos2016-02-22  Jiong Wang  <jiong.wang@arm.com>
3938*e6c7e151Schristos
3939*e6c7e151Schristos	* elfnn-aarch64. (aarch64_type_of_stub): Remove redundation calcuation
3940*e6c7e151Schristos	for destination.  Remove useless function parameters.
3941*e6c7e151Schristos	(elfNN_aarch64_size_stubs): Update parameters for aarch64_type_of_stub.
3942*e6c7e151Schristos
3943*e6c7e151Schristos2016-02-19  Nick Clifton  <nickc@redhat.com>
3944*e6c7e151Schristos
3945*e6c7e151Schristos	PR ld/19629
3946*e6c7e151Schristos	* aoutx.h (aout_link_add_symbols): Check for out of range string
3947*e6c7e151Schristos	table offsets.
3948*e6c7e151Schristos
3949*e6c7e151Schristos	PR ld/19628
3950*e6c7e151Schristos	* reloc.c (bfd_generic_get_relocated_section_contents): Stop
3951*e6c7e151Schristos	processing if we encounter a reloc without an associated symbol.
3952*e6c7e151Schristos
3953*e6c7e151Schristos2016-02-18  H.J. Lu  <hongjiu.lu@intel.com>
3954*e6c7e151Schristos
3955*e6c7e151Schristos	PR ld/19617
3956*e6c7e151Schristos	* elflink.c (elf_link_add_object_symbols): Always create dynamic
3957*e6c7e151Schristos	sections for -E/--dynamic-list.
3958*e6c7e151Schristos
3959*e6c7e151Schristos2016-02-17  H.J. Lu  <hongjiu.lu@intel.com>
3960*e6c7e151Schristos
3961*e6c7e151Schristos	* elf64-x86-64.c (elf_backend_omit_section_dynsym): New.  Defined
3962*e6c7e151Schristos	to bfd_true.
3963*e6c7e151Schristos
3964*e6c7e151Schristos2016-02-16  Joseph Myers  <joseph@codesourcery.com>
3965*e6c7e151Schristos
3966*e6c7e151Schristos	* plugin.c (plugin_vec): Set match priority to 255.
3967*e6c7e151Schristos	* format.c (bfd_check_format_matches) [BFD_SUPPORTS_PLUGINS]: When
3968*e6c7e151Schristos	matching against the plugin vector, take priority from there not
3969*e6c7e151Schristos	from TEMP.
3970*e6c7e151Schristos
3971*e6c7e151Schristos2016-02-15  Nick Clifton  <nickc@redhat.com>
3972*e6c7e151Schristos
3973*e6c7e151Schristos	* elf-bfd.h (struct bfd_elf_special_section): Use unsigned values
3974*e6c7e151Schristos	for length and type fields.  Use a signed value for the
3975*e6c7e151Schristos	suffix_length field.
3976*e6c7e151Schristos
3977*e6c7e151Schristos2016-02-10  H.J. Lu  <hongjiu.lu@intel.com>
3978*e6c7e151Schristos
3979*e6c7e151Schristos	PR ld/19601
3980*e6c7e151Schristos	* elf32-i386.c (elf_i386_relocate_section): Mask off the least
3981*e6c7e151Schristos	significant bit in GOT offset for R_386_GOT32X.
3982*e6c7e151Schristos
3983*e6c7e151Schristos2016-02-10  Nick Clifton  <nickc@redhat.com>
3984*e6c7e151Schristos
3985*e6c7e151Schristos	PR 19405
3986*e6c7e151Schristos	* elf32-nios2.c (nios2_elf32_install_imm16): Allow for signed
3987*e6c7e151Schristos	immediate values.
3988*e6c7e151Schristos	* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Limit the
3989*e6c7e151Schristos	number of messages about FDE encoding preventing .eh_frame_hdr
3990*e6c7e151Schristos	generation.
3991*e6c7e151Schristos
3992*e6c7e151Schristos2016-02-09  Nick Clifton  <nickc@redhat.com>
3993*e6c7e151Schristos
3994*e6c7e151Schristos	* oasys.c (oasys_archive_p): Fix indentation.
3995*e6c7e151Schristos	* elf32-nds32.c (nds32_elf_relax_section): Use an unsigned
3996*e6c7e151Schristos	constant for left shifting.
3997*e6c7e151Schristos
3998*e6c7e151Schristos	* elfnn-aarch64.c (elfNN_aarch64_relocate_section): Add a more
3999*e6c7e151Schristos	helpful warning message to explain why certain AArch64 relocs
4000*e6c7e151Schristos	might overflow.
4001*e6c7e151Schristos
4002*e6c7e151Schristos2016-02-05  Simon Marchi  <simon.marchi@ericsson.com>
4003*e6c7e151Schristos
4004*e6c7e151Schristos	* pe-mips.c (coff_mips_reloc): Fix formatting.
4005*e6c7e151Schristos
4006*e6c7e151Schristos2016-02-05  Cupertino Miranda  <Cupertino.Miranda@synopsys.com>
4007*e6c7e151Schristos
4008*e6c7e151Schristos	* cpu-arc.c: Change default archure from bfd_mach_arc_arcv2
4009*e6c7e151Schristos	to bfd_mach_arc_arc600.
4010*e6c7e151Schristos
4011*e6c7e151Schristos2016-02-04  Alan Modra  <amodra@gmail.com>
4012*e6c7e151Schristos
4013*e6c7e151Schristos	* elf64-ppc.c (ppc64_elf_relocate_section): Adjust last patch
4014*e6c7e151Schristos	for big-endian.
4015*e6c7e151Schristos
4016*e6c7e151Schristos2016-02-02  H.J. Lu  <hongjiu.lu@intel.com>
4017*e6c7e151Schristos
4018*e6c7e151Schristos	PR ld/19542
4019*e6c7e151Schristos	* elf64-x86-64.c (elf_x86_64_convert_load): Store the estimated
4020*e6c7e151Schristos	distances in the compressed_size field of the output section.
4021*e6c7e151Schristos
4022*e6c7e151Schristos2016-02-02  Alan Modra  <amodra@gmail.com>
4023*e6c7e151Schristos
4024*e6c7e151Schristos	* elf64-ppc.c (ppc64_elf_relocate_section): Further restrict
4025*e6c7e151Schristos	ELFv2 entry optimization.
4026*e6c7e151Schristos
4027*e6c7e151Schristos2016-02-02  H.J. Lu  <hongjiu.lu@intel.com>
4028*e6c7e151Schristos
4029*e6c7e151Schristos	PR binutils/19547
4030*e6c7e151Schristos	* elf.c (assign_section_numbers): Clear HAS_RELOC if there are
4031*e6c7e151Schristos	no relocations in relocatable files.
4032*e6c7e151Schristos
4033*e6c7e151Schristos2016-02-01  H.J. Lu  <hongjiu.lu@intel.com>
4034*e6c7e151Schristos
4035*e6c7e151Schristos	PR ld/19553
4036*e6c7e151Schristos	* elflink.c (elf_link_add_object_symbols): Don't add DT_NEEDED
4037*e6c7e151Schristos	if a symbol from a library loaded via DT_NEEDED doesn't match
4038*e6c7e151Schristos	the symbol referenced by regular object.
4039*e6c7e151Schristos
4040*e6c7e151Schristos2016-02-01  Nathaniel Smith  <njs@pobox.com>
4041*e6c7e151Schristos
4042*e6c7e151Schristos	* peicode.h (pe_ILF_build_a_bfd): Create an import symbol for both
4043*e6c7e151Schristos	CODE and DATA.
4044*e6c7e151Schristos
4045*e6c7e151Schristos2016-02-01  Alan Modra  <amodra@gmail.com>
4046*e6c7e151Schristos
4047*e6c7e151Schristos	* elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Don't abort on
4048*e6c7e151Schristos	an out of range reloc_index.
4049*e6c7e151Schristos	* elf32-i386.c (elf_i386_get_plt_sym_val): Likewise.
4050*e6c7e151Schristos
4051*e6c7e151Schristos2016-02-01  Kamil Rytarowski  <n54@gmx.com>
4052*e6c7e151Schristos
4053*e6c7e151Schristos	* Makefile.am (OPTIONAL_BACKENDS): Add netbsd-core.lo.
4054*e6c7e151Schristos	(OPTIONAL_BACKENDS_CFILES): Add netbsd-core.c.
4055*e6c7e151Schristos	* Makefile.in: Regenerated.
4056*e6c7e151Schristos
4057*e6c7e151Schristos2016-02-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
4058*e6c7e151Schristos
4059*e6c7e151Schristos	* elf64-s390.c (elf_s390_reloc_name_lookup): Fix indentation.
4060*e6c7e151Schristos
4061*e6c7e151Schristos2016-01-31  John David Anglin  <danglin@gcc.gnu.org>
4062*e6c7e151Schristos
4063*e6c7e151Schristos	PR ld/19526
4064*e6c7e151Schristos	* elf32-hppa.c (elf32_hppa_final_link): Don't sort non-regular output
4065*e6c7e151Schristos	files.
4066*e6c7e151Schristos	* elf64-hppa.c (elf32_hppa_final_link): Likewise.  Remove retval.
4067*e6c7e151Schristos
4068*e6c7e151Schristos2016-01-30  H.J. Lu  <hongjiu.lu@intel.com>
4069*e6c7e151Schristos
4070*e6c7e151Schristos	PR ld/19539
4071*e6c7e151Schristos	* elf32-i386.c (elf_i386_reloc_type_class): Check relocation
4072*e6c7e151Schristos	against STT_GNU_IFUNC symbol only with dynamic symbols.
4073*e6c7e151Schristos	* elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise.
4074*e6c7e151Schristos
4075*e6c7e151Schristos2016-01-28  H.J. Lu  <hongjiu.lu@intel.com>
4076*e6c7e151Schristos
4077*e6c7e151Schristos	PR binutils/19523
4078*e6c7e151Schristos	* dwarf2.c (_bfd_dwarf2_slurp_debug_info): Set BFD_DECOMPRESS to
4079*e6c7e151Schristos	decompress debug sections.
4080*e6c7e151Schristos
4081*e6c7e151Schristos2016-01-25  Maciej W. Rozycki  <macro@imgtec.com>
4082*e6c7e151Schristos
4083*e6c7e151Schristos	* elf32-arc.c (elf_arc_finish_dynamic_symbol): Rename `index' to
4084*e6c7e151Schristos	`dynindx'.
4085*e6c7e151Schristos
4086*e6c7e151Schristos2016-01-25  Nick Clifton  <nickc@redhat.com>
4087*e6c7e151Schristos
4088*e6c7e151Schristos	PR target/19435
4089*e6c7e151Schristos	* mach-o.c (bfd_mach_o_close_and_cleanup): Suppress code to free
4090*e6c7e151Schristos	dsym filename buffer.
4091*e6c7e151Schristos
4092*e6c7e151Schristos2016-01-24  Maciej W. Rozycki  <macro@imgtec.com>
4093*e6c7e151Schristos
4094*e6c7e151Schristos	* elfxx-mips.c (BZ16_REG_FIELD): Simplify calculation.
4095*e6c7e151Schristos
4096*e6c7e151Schristos2016-01-24  Maciej W. Rozycki  <macro@imgtec.com>
4097*e6c7e151Schristos
4098*e6c7e151Schristos	* elfxx-mips.c (BZ16_REG): Correct calculation.
4099*e6c7e151Schristos
4100*e6c7e151Schristos2016-01-21  Nick Clifton  <nickc@redhat.com>
4101*e6c7e151Schristos
4102*e6c7e151Schristos	* elf32-arc.c (ADD_RELA): Fix compile time warning errors by
4103*e6c7e151Schristos	changing the type of _loc to be bfd_byte *.
4104*e6c7e151Schristos	(elf_arc_finish_dynamic_symbol): Likewise.
4105*e6c7e151Schristos
4106*e6c7e151Schristos2016-01-21  Nick Clifton  <nickc@redhat.com>
4107*e6c7e151Schristos
4108*e6c7e151Schristos	PR ld/19455
4109*e6c7e151Schristos	* elf32-arm.c (elf32_arm_create_dynamic_sections): Set the ELF
4110*e6c7e151Schristos	class of the linker stub bfd.
4111*e6c7e151Schristos	(elf32_arm_check_relocs): Skip check for pic format after
4112*e6c7e151Schristos	processing a vxWorks R_ARM_ABS12 reloc.
4113*e6c7e151Schristos	* elflink.c (bfd_elf_final_link): Check for ELFCLASSNONE when
4114*e6c7e151Schristos	reporting a class mismatch.
4115*e6c7e151Schristos
4116*e6c7e151Schristos2016-01-21  Jiong Wang  <jiong.wang@arm.com>
4117*e6c7e151Schristos
4118*e6c7e151Schristos	* elfnn-aarch64.c (aarch64_type_of_stub): Allow insert long branch
4119*e6c7e151Schristos	veneer for sym_sec != input_sec.
4120*e6c7e151Schristos	(elfNN_aarch64_size_stub): Support STT_SECTION symbol.
4121*e6c7e151Schristos	(elfNN_aarch64_final_link_relocate): Take rela addend into account when
4122*e6c7e151Schristos	calculation destination.
4123*e6c7e151Schristos
4124*e6c7e151Schristos2016-01-21  Alan Modra  <amodra@gmail.com>
4125*e6c7e151Schristos
4126*e6c7e151Schristos	* elf-linux-core.h (swap_linux_prpsinfo32_out): New function.
4127*e6c7e151Schristos	(swap_linux_prpsinfo64_out): New function.
4128*e6c7e151Schristos	(LINUX_PRPSINFO32_SWAP_FIELDS): Delete.
4129*e6c7e151Schristos	(LINUX_PRPSINFO64_SWAP_FIELDS): Delete.
4130*e6c7e151Schristos	* elf.c (elfcore_write_linux_prpsinfo32): Adjust.  Don't memset.
4131*e6c7e151Schristos	(elfcore_write_linux_prpsinfo64): Likewise.
4132*e6c7e151Schristos	* elf32-ppc.c (swap_ppc_linux_prpsinfo32_out): New function.
4133*e6c7e151Schristos	(PPC_LINUX_PRPSINFO32_SWAP_FIELDS): Delete.
4134*e6c7e151Schristos	(elfcore_write_ppc_linux_prpsinfo32): Adjust.  Don't memset.
4135*e6c7e151Schristos
4136*e6c7e151Schristos2016-01-21  Alan Modra  <amodra@gmail.com>
4137*e6c7e151Schristos
4138*e6c7e151Schristos	* elf-linux-core.h: Rename from elf-linux-psinfo.h.
4139*e6c7e151Schristos	* elf.c: Adjust #include.
4140*e6c7e151Schristos	* elf32-ppc.c: Don't #include elf-linux-psinfo.h
4141*e6c7e151Schristos	* Makefile.am (SOURCE_HFILES): Update.
4142*e6c7e151Schristos	* Makefile.in: Regenerate.
4143*e6c7e151Schristos	* po/SRC-PORFILES.in: Regenerate.
4144*e6c7e151Schristos
4145*e6c7e151Schristos2016-01-21  Alan Modra  <amodra@gmail.com>
4146*e6c7e151Schristos
4147*e6c7e151Schristos	* configure.ac: Move corefile selection later in file.  Move
4148*e6c7e151Schristos	tdefaults code immediately after other target vector code.
4149*e6c7e151Schristos	* configure: Regenerate.
4150*e6c7e151Schristos
4151*e6c7e151Schristos2016-01-20  Mickael Guene  <mickael.guene@st.com>
4152*e6c7e151Schristos
4153*e6c7e151Schristos	* elf32-arm.c (elf32_arm_special_sections): Remove catch of noread
4154*e6c7e151Schristos	section using '.text.noread' pattern.
4155*e6c7e151Schristos
4156*e6c7e151Schristos2016-01-19  John Baldwin  <jhb@FreeBSD.org>
4157*e6c7e151Schristos
4158*e6c7e151Schristos	* elf.c (elfcore_grok_note): Recognize NT_FREEBSD_THRMISC notes.
4159*e6c7e151Schristos
4160*e6c7e151Schristos2016-01-18  Miranda Cupertino  <Cupertino.Miranda@synopsys.com>
4161*e6c7e151Schristos	    Zissulescu Claudiu  <Claudiu.Zissulescu@synopsys.com>
4162*e6c7e151Schristos
4163*e6c7e151Schristos	* arc-plt.def: New file.
4164*e6c7e151Schristos	* arc-plt.h: Likewise.
4165*e6c7e151Schristos	* elf32-arc.c (elf_arc_abs_plt0_entry, elf_arc_abs_pltn_entry,
4166*e6c7e151Schristos		       elf_arcV2_abs_plt0_entry, elf_arcV2_abs_pltn_entry,
4167*e6c7e151Schristos		       elf_arc_pic_plt0_entry, elf_arc_pic_pltn_entry,
4168*e6c7e151Schristos		       elf_arcV2_pic_plt0_entry, elf_arcV2_pic_pltn_entry): Remove.
4169*e6c7e151Schristos	(name_for_global_symbol): Added.
4170*e6c7e151Schristos	(ADD_RELA): Helper to create dynamic relocs.
4171*e6c7e151Schristos	(new_got_entry_to_list): Create a new got entry in linked list.
4172*e6c7e151Schristos	(symbol_has_entry_of_type): Search for specific type of entry in
4173*e6c7e151Schristos	list.
4174*e6c7e151Schristos	(is_reloc_for_GOT): return FALSE for any TLS related relocs.
4175*e6c7e151Schristos	(is_reloc_for_TLS, arc_elf_set_private_flags)
4176*e6c7e151Schristos	(arc_elf_print_private_bfd_data, arc_elf_copy_private_bfd_data)
4177*e6c7e151Schristos	(arc_elf_merge_private_bfd_data): New functions.
4178*e6c7e151Schristos	(debug_arc_reloc): Cleaned debug info printing.
4179*e6c7e151Schristos	(PDATA reloc): Changed not to perform address alignment.
4180*e6c7e151Schristos	(reverse_me): Added. Fix for ARC_32 relocs.
4181*e6c7e151Schristos	(arc_do_relocation): Return bfd_reloc_of when no relocation should
4182*e6c7e151Schristos	occur.
4183*e6c7e151Schristos	(arc_get_local_got_ents): Renamed from arc_get_local_got_offsets.
4184*e6c7e151Schristos	Changed function to access an array of list of GOT entries instead
4185*e6c7e151Schristos	of just an array of offsets.
4186*e6c7e151Schristos	(elf_arc_relocate_section): Added support for PIC and TLS related relocations.
4187*e6c7e151Schristos	(elf_arc_check_relocs): Likewise.
4188*e6c7e151Schristos	(elf_arc_adjust_dynamic_symbol, elf_arc_finish_dynamic_symbol,
4189*e6c7e151Schristos	(elf_arc_finish_dynamic_sections): Likewise
4190*e6c7e151Schristos	(arc_create_dynamic_sections): Modified conditions to create
4191*e6c7e151Schristos	dynamic sections.
4192*e6c7e151Schristos	(ADD_SYMBOL_REF_SEC_AND_RELOC): New macro.
4193*e6c7e151Schristos	(plt_do_relocs_for_symbol, relocate_plt_for_symbol)
4194*e6c7e151Schristos	(relocate_plt_for_entry): Changed to support new way to define PLT
4195*e6c7e151Schristos	related code.
4196*e6c7e151Schristos	(add_symbol_to_plt): Likewise.
4197*e6c7e151Schristos	(arc_elf_link_hash_table_create): New function.
4198*e6c7e151Schristos
4199*e6c7e151Schristos2016-01-18  Nick Clifton  <nickc@redhat.com>
4200*e6c7e151Schristos
4201*e6c7e151Schristos	PR ld/19440
4202*e6c7e151Schristos	* coff-rs6000.c (_bfd_xcoff_swap_sym_in): Sign extend external
4203*e6c7e151Schristos	section number into internal section number.
4204*e6c7e151Schristos	* coff64-rs6000.c (_bfd_xcoff64_swap_sym_in): Likewise.
4205*e6c7e151Schristos	* coffswap.h (coff_swap_sym_in): Likewise.
4206*e6c7e151Schristos	* peXXigen.c (_bfd_XXi_swap_sym_in): Likewise.
4207*e6c7e151Schristos	* coffcode.h (_coff_bigobj_swap_sym_in): Make sure that internal
4208*e6c7e151Schristos	section number field is big enough to hold the external value.
4209*e6c7e151Schristos
4210*e6c7e151Schristos2016-01-17  Alan Modra  <amodra@gmail.com>
4211*e6c7e151Schristos
4212*e6c7e151Schristos	* configure: Regenerate.
4213*e6c7e151Schristos
4214*e6c7e151Schristos2016-01-12  Yury Usishchev  <y.usishchev@samsung.com>
4215*e6c7e151Schristos
4216*e6c7e151Schristos	* elf32-arm.c (elf32_arm_fix_exidx_coverage): Insert cantunwind
4217*e6c7e151Schristos	when address in first unwind entry does not match start of
4218*e6c7e151Schristos	section.
4219*e6c7e151Schristos
4220*e6c7e151Schristos2016-01-08  Richard Sandiford  <richard.sandiford@arm.com>
4221*e6c7e151Schristos	    Jiong Wang  <jiong.wang@arm.com>
4222*e6c7e151Schristos
4223*e6c7e151Schristos	PR ld/19368
4224*e6c7e151Schristos	* elf32-arm.c (elf32_arm_reloc_type_class): Map R_ARM_IRELATIVE to
4225*e6c7e151Schristos	reloc_class_ifunc.
4226*e6c7e151Schristos
4227*e6c7e151Schristos2016-01-06  Andrew Burgess  <andrew.burgess@embecosm.com>
4228*e6c7e151Schristos
4229*e6c7e151Schristos	* elf32-arc.c (reloc_type_to_name): Change ARC_RELOC_HOWTO to
4230*e6c7e151Schristos	place 'R_' before the reloc name returned.
4231*e6c7e151Schristos	(elf_arc_howto_table): Change ARC_RELOC_HOWTO to place 'R_' before
4232*e6c7e151Schristos	the relocation string.
4233*e6c7e151Schristos
4234*e6c7e151Schristos2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
4235*e6c7e151Schristos
4236*e6c7e151Schristos	* elfxx-mips.c (mips_elf_merge_obj_abiflags): New function,
4237*e6c7e151Schristos	factored out from...
4238*e6c7e151Schristos	(_bfd_mips_elf_merge_private_bfd_data): ... here.
4239*e6c7e151Schristos
4240*e6c7e151Schristos2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
4241*e6c7e151Schristos
4242*e6c7e151Schristos	* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Move
4243*e6c7e151Schristos	attribute check after ELF file header flag check.
4244*e6c7e151Schristos
4245*e6c7e151Schristos2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
4246*e6c7e151Schristos
4247*e6c7e151Schristos	* elfxx-mips.c (mips_elf_merge_obj_attributes): Propagate the
4248*e6c7e151Schristos	return status from `_bfd_elf_merge_object_attributes'.
4249*e6c7e151Schristos
4250*e6c7e151Schristos2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
4251*e6c7e151Schristos
4252*e6c7e151Schristos	* elfxx-mips.c (mips_elf_merge_obj_e_flags): New function,
4253*e6c7e151Schristos	factored out from...
4254*e6c7e151Schristos	(_bfd_mips_elf_merge_private_bfd_data): ... here.
4255*e6c7e151Schristos
4256*e6c7e151Schristos2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
4257*e6c7e151Schristos
4258*e6c7e151Schristos	* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Fold the
4259*e6c7e151Schristos	handling of input MIPS ABI flags together.
4260*e6c7e151Schristos
4261*e6c7e151Schristos2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
4262*e6c7e151Schristos
4263*e6c7e151Schristos	* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Suppress
4264*e6c7e151Schristos	attribute checks for null input.
4265*e6c7e151Schristos
4266*e6c7e151Schristos2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
4267*e6c7e151Schristos
4268*e6c7e151Schristos	* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Use local
4269*e6c7e151Schristos	pointers to target data.
4270*e6c7e151Schristos
4271*e6c7e151Schristos2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
4272*e6c7e151Schristos
4273*e6c7e151Schristos	* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
4274*e6c7e151Schristos	an FP ABI warning.
4275*e6c7e151Schristos
4276*e6c7e151Schristos2016-01-01  Alan Modra  <amodra@gmail.com>
4277*e6c7e151Schristos
4278*e6c7e151Schristos	Update year range in copyright notice of all files.
4279*e6c7e151Schristos
4280*e6c7e151SchristosFor older changes see ChangeLog-2015 and doc/ChangeLog-0415
4281*e6c7e151Schristos
4282*e6c7e151SchristosCopyright (C) 2016 Free Software Foundation, Inc.
4283*e6c7e151Schristos
4284*e6c7e151SchristosCopying and distribution of this file, with or without modification,
4285*e6c7e151Schristosare permitted in any medium without royalty provided the copyright
4286*e6c7e151Schristosnotice and this notice are preserved.
4287*e6c7e151Schristos
4288*e6c7e151SchristosLocal Variables:
4289*e6c7e151Schristosmode: change-log
4290*e6c7e151Schristosleft-margin: 8
4291*e6c7e151Schristosfill-column: 74
4292*e6c7e151Schristosversion-control: never
4293*e6c7e151SchristosEnd:
4294