Update the address of the FSF in the copyright notice of files which were using the...
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
863f7a5f
NC
12017-12-14 Nick Clifton <nickc@redhat.com>
2
3 * cpu-mt.c: Update address of FSF in copyright notice.
4 * elf32-m32c.c: Likewise.
5 * elf32-mt.c: Likewise.
6 * elf32-rl78.c: Likewise.
7 * elf32-rx.c: Likewise.
8 * elf32-rx.h: Likewise.
9 * elf32-spu.h: Likewise.
10 * hosts/x86-64linux.h: Likewise.
11
79e74192
RL
122017-12-13 Renlin Li <renlin.li@arm.com>
13
14 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Disallow
15 BFD_RELOC_AARCH64_16 in shared object const section. Disallow
16 BFD_RELOC_AARCH64_32 in shared object const section under LP64.
17
57a2957f
SM
182017-12-11 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
19
20 * bfd.c (bfd_get_sign_extend_vma): Correct typo.
21
a9d44aad
AM
222017-12-09 Alan Modra <amodra@gmail.com>
23
24 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): When emitting
25 dynamic R_SPARC_RELATIVE for GOT entries, ensure the section
26 contents are zeroed.
27
2d054e6b
NC
282017-12-08 Nick Clifton <nickc@redhat.com>
29
30 * elfcode.h (elf_write_relocs): Check for an empty howto field.
31
c8bed570
SM
322017-12-08 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
33
34 * bfd.c (bfd_get_sign_extend_vma): Handle aix5coff64-rs6000.
35
07d6d2b8
AM
362017-12-06 Alan Modra <amodra@gmail.com>
37
38 * doc/header.sed: Trim trailing space when splitting lines.
39 * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c,
40 * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h,
41 * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c,
42 * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c,
43 * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c,
44 * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c,
45 * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c,
46 * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
47 * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c,
48 * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c,
49 * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c,
50 * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c,
51 * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c,
52 * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c,
53 * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c,
54 * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c,
55 * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c,
56 * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c,
57 * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c,
58 * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c,
59 * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c,
60 * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c,
61 * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h,
62 * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c,
63 * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c,
64 * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c,
65 * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c,
66 * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c,
67 * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c,
68 * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c,
69 * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c,
70 * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c,
71 * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c,
72 * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c,
73 * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h,
74 * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c,
75 * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c,
76 * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c,
77 * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c,
78 * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c,
79 * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
80 * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c,
81 * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h,
82 * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
83 * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c,
84 * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c,
85 * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c,
86 * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c,
87 * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c,
88 * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h,
89 * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h,
90 * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c,
91 * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c,
92 * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c,
93 * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h,
94 * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c,
95 * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c,
96 * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c,
97 * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c,
98 * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c,
99 * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c,
100 * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h,
101 * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c,
102 * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c,
103 * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c,
104 * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c,
105 * xsym.c, * xsym.h: Whitespace fixes.
106 * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
107
65281396
AM
1082017-12-06 Alan Modra <amodra@gmail.com>
109
110 * elf32-lm32.c (lm32_elf_check_relocs): Skip non-ALLOC sections.
111 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
112 * elf32-nds32.c (nds32_elf_check_relocs): Likewise.
113 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
114 * elf32-sh.c (sh_elf_check_relocs): Likewise.
115
3bf083ed
AM
1162017-12-06 Alan Modra <amodra@gmail.com>
117
118 * elf32-hppa.c (struct elf32_hppa_dyn_reloc_entry): Delete. Use
119 struct elf_dyn_relocs throughout file instead.
120 (elf32_hppa_adjust_dynamic_symbol): Comment tidy.
121 * elf32-lm32.c (struct elf_lm32_dyn_relocs): Delete. Use
122 struct elf_dyn_relocs throughout file instead.
123 (lm32_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
124 * elf32-m32r.c (struct elf_m32r_dyn_relocs): Delete. Use
125 struct elf_dyn_relocs throughout file instead.
126 (m32r_elf_adjust_dynamic_symbol): Use readonly_dynrelocs, but disable.
127 Disable -z no-copyreloc too.
128 * elf32-metag.c (struct elf_metag_dyn_reloc_entry): Delete. Use
129 struct elf_dyn_relocs throughout file instead.
130 (elf_metag_adjust_dynamic_symbol): Use readonly_dynrelocs.
131 * elf32-microblaze.c (struct elf32_mb_dyn_relocs): Delete. Use
132 struct elf_dyn_relocs throughout file instead.
133 (readonly_dynrelocs): New function.
134 (microblaze_elf_adjust_dynamic_symbol): Use it.
135 * elf32-nds32.c (struct elf_nds32_dyn_relocs): Delete. Use
136 struct elf_dyn_relocs throughout file instead.
137 (nds32_elf_adjust_dynamic_symbol): Use readonly_dynrelocs, but disable.
138 Disable -z no-copyreloc too.
139 * elf32-nios2.c (struct elf32_nios2_dyn_relocs): Delete. Use
140 struct elf_dyn_relocs throughout file instead.
141 * elf32-or1k.c (struct elf_or1k_dyn_relocs): Delete. Use
142 struct elf_dyn_relocs throughout file instead.
143 (or1k_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
144 * elf32-sh.c (struct elf_sh_dyn_relocs): Delete. Use
145 struct elf_dyn_relocs throughout file instead.
146 (sh_elf_adjust_dynamic_symbol): Use readonly_dynrelocs, but disable.
147 Disable -z no-copyreloc too.
148 * elf32-tilepro.c (struct tilepro_elf_dyn_relocs): Delete. Use
149 struct elf_dyn_relocs throughout file instead.
150 (tilepro_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
151 * elfnn-riscv.c (struct riscv_elf_dyn_relocs): Delete. Use
152 struct elf_dyn_relocs throughout file instead.
153 (riscv_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
154 * elfxx-sparc.c (struct _bfd_sparc_elf_dyn_relocs): Delete. Use
155 struct elf_dyn_relocs throughout file instead.
156 (_bfd_sparc_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
157 * elfxx-tilegx.c (struct tilegx_elf_dyn_relocs): Delete. Use
158 struct elf_dyn_relocs throughout file instead.
159 (tilegx_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
160 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Use readonly_dynrelocs.
161 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Use readonly_dynrelocs.
162
dce2246a
AM
1632017-12-06 Alan Modra <amodra@gmail.com>
164
165 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Comment tidy.
166 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
167 * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Likewise.
168
826c3f1e
AM
1692017-12-04 Alan Modra <amodra@gmail.com>
170
171 * elfxx-x86.c (readonly_dynrelocs): New function.
172 (maybe_set_textrel): New function. Always prints via minfo and
173 correct "readonly" to "read-only" in warning message., replacing..
174 (_bfd_x86_elf_readonly_dynrelocs): ..this.
175 (_bfd_x86_elf_size_dynamic_sections): Correct "readonly" to
176 "read-only" in warning message. Formatting.
177 (_bfd_x86_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
178 * linker.c (bfd_link_hash_traverse): Comment typo fix.
179
92f402a7
L
1802017-12-01 H.J. Lu <hongjiu.lu@intel.com>
181
182 * elfxx-x86.c (_bfd_x86_elf_readonly_dynrelocs): Print symbol
183 for map file output.
184
63c1f59d
AM
1852017-12-01 Alan Modra <amodra@gmail.com>
186
187 * elf32-hppa.c (maybe_set_textrel): Print symbol for map file output.
188 * elf32-ppc.c (maybe_set_textrel): Likewise.
189 * elf64-ppc.c (maybe_set_textrel): Likewise.
190 * elf32-arm.c (readonly_dynrelocs): New function.
191 (maybe_set_textrel): New function, replacing..
192 (elf32_arm_readonly_dynrelocs): ..this.
193 * elf32-lm32.c (readonly_dynrelocs): New function.
194 (maybe_set_textrel): New function, replacing old version of..
195 (readonly_dynrelocs): ..this.
196 * elf32-m32r.c (readonly_dynrelocs): New function.
197 (maybe_set_textrel): New function, replacing old version of..
198 (readonly_dynrelocs): ..this.
199 * elf32-metag.c (readonly_dynrelocs): New function.
200 (maybe_set_textrel): New function, replacing old version of..
201 (readonly_dynrelocs): ..this.
202 * elf32-nds32.c: Delete unnecessary forward declarations.
203 (readonly_dynrelocs): New function.
204 (maybe_set_textrel): New function, replacing old version of..
205 (readonly_dynrelocs): ..this.
206 * elf32-or1k.c (readonly_dynrelocs): New function.
207 (maybe_set_textrel): New function, replacing old version of..
208 (readonly_dynrelocs): ..this.
209 * elf32-s390.c (readonly_dynrelocs): New function.
210 (maybe_set_textrel): New function, replacing old version of..
211 (readonly_dynrelocs): ..this.
212 * elf32-sh.c (readonly_dynrelocs): New function.
213 (maybe_set_textrel): New function, replacing old version of..
214 (readonly_dynrelocs): ..this.
215 * elf32-tic6x.c (readonly_dynrelocs): New function.
216 (maybe_set_textrel): New function, replacing..
217 (elf32_tic6x_readonly_dynrelocs): ..this.
218 * elf32-tilepro.c (readonly_dynrelocs): New function.
219 (maybe_set_textrel): New function, replacing old version of..
220 (readonly_dynrelocs): ..this.
221 * elf64-s390.c (readonly_dynrelocs): New function.
222 (maybe_set_textrel): New function, replacing old version of..
223 (readonly_dynrelocs): ..this.
224 * elfnn-aarch64.c (readonly_dynrelocs): New function.
225 (maybe_set_textrel): New function, replacing..
226 (aarch64_readonly_readonly_dynrelocs): ..this.
227 * elfnn-riscv.c (readonly_dynrelocs): New function.
228 (maybe_set_textrel): New function, replacing old version of..
229 (readonly_dynrelocs): ..this.
230 * elfxx-sparc.c (readonly_dynrelocs): New function.
231 (maybe_set_textrel): New function, replacing old version of..
232 (readonly_dynrelocs): ..this.
233 * elfxx-tilegx.c (readonly_dynrelocs): New function.
234 (maybe_set_textrel): New function, replacing old version of..
235 (readonly_dynrelocs): ..this.
236
4a7e5234
AM
2372017-12-01 Alan Modra <amodra@gmail.com>
238
239 PR 22533
240 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Don't do anything
241 special with non_got_ref for weak aliases.
242 (elf32_hppa_check_relocs): Tweak setting of non_got_ref.
243 (elf32_hppa_adjust_dynamic_symbol): When initialising weak aliases,
244 don't uselessly copy non_got_ref. Clear dyn_relocs instead if
245 strong symbol is allocated in dynbss. Tidy comments.
246 (elf32_hppa_relocate_section): Comment fix.
247 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Don't do anything
248 special with non_got_ref for weak aliases.
249 (ppc_elf_adjust_dynamic_symbol): When initialising weak aliases,
250 don't uselessly copy non_got_ref. Clear dyn_relocs instead if
251 strong symbol is allocated in dynbss. Tidy comments.
252 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't do anything
253 special with non_got_ref for weak aliases.
254 (ppc64_elf_adjust_dynamic_symbol): When initialising weak aliases,
255 don't uselessly copy non_got_ref. Clear dyn_relocs instead if
256 strong symbol is allocated in dynbss. Tidy comments.
257
4581a1c7
NC
2582017-11-29 Nick Clifton <nickc@redhat.com>
259
260 PR 22509
261 * coffcode.h (coff_slurp_reloc_table): Check for a NULL symbol
262 pointer when processing relocs.
263
ca39c2f4
SS
2642017-11-29 Stefan Stroe <stroestefan@gmail.com>
265
266 * po/Make-in (datadir): Define as @datadir@.
267 (localedir): Define as @localedir@.
268 (gnulocaledir, gettextsrcdir): Use @datarootdir@.
269
b0029dce
NC
2702017-11-28 Nick Clifton <nickc@redhat.com>
271
272 PR 22507
273 * coffgen.c (_bfd_coff_read_string_table): Check for an excessive
274 size of the external string table.
275
b23dc97f
NC
2762017-11-28 Nick Clifton <nickc@redhat.com>
277
278 PR 22506
279 * reloc.c (reloc_offset_in_range): Rename to
280 bfd_reloc_offset_in_range and export.
281 (bfd_perform_relocation): Rename function invocation.
282 (bfd_install_relocation): Likewise.
283 (bfd_final_link_relocate): Likewise.
284 * bfd-in2.h: Regenerate.
285 * coff-arm.c (coff_arm_reloc): Use bfd_reloc_offset_in_range.
286 * coff-i386.c (coff_i386_reloc): Likewise.
287 * coff-i860.c (coff_i860_reloc): Likewise.
288 * coff-m68k.c (mk68kcoff_common_addend_special_fn): Likewise.
289 * coff-m88k.c (m88k_special_reloc): Likewise.
290 * coff-mips.c (mips_reflo_reloc): Likewise.
291 * coff-x86_64.c (coff_amd64_reloc): Likewise.
292
6c6bc899
L
2932017-11-28 H.J. Lu <hongjiu.lu@intel.com>
294
295 * elf-m10300.c (mn10300_elf_check_relocs): Don't set
296 non_ir_ref_regular.
297 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
298 * elf32-bfin.c (bfin_check_relocs): Likewise.
299 * elf32-cr16.c (cr16_elf_check_relocs): Likewise.
300 * elf32-cris.c (cris_elf_check_relocs): Likewise.
301 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
302 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
303 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
304 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
305 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
306 * elf32-i370.c (i370_elf_check_relocs): Likewise.
307 * elf32-i386.c (elf_i386_check_relocs): Likewise.
308 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
309 * elf32-lm32.c (lm32_elf_check_relocs): Likewise.
310 * elf32-m32c.c (m32c_elf_check_relocs): Likewise.
311 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
312 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
313 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
314 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
315 * elf32-metag.c (elf_metag_check_relocs): Likewise.
316 * elf32-microblaze.c (microblaze_elf_check_relocs): Likewise.
317 * elf32-moxie.c (moxie_elf_check_relocs): Likewise.
318 * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
319 * elf32-mt.c (mt_elf_check_relocs): Likewise.
320 * elf32-nios2.c (nios2_elf32_check_relocs): Likewise.
321 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
322 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
323 * elf32-rl78.c (rl78_elf_check_relocs): Likewise.
324 * elf32-s390.c (elf_s390_check_relocs): Likewise.
325 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
326 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
327 * elf32-sh.c (sh_elf_check_relocs): Likewise.
328 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
329 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
330 * elf32-v850.c (v850_elf_check_relocs): Likewise.
331 * elf32-vax.c (elf_vax_check_relocs): Likewise.
332 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
333 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
334 * elf64-aarch64.c (elf64_aarch64_check_relocs): Likewise.
335 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
336 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
337 * elf64-ia64-vms.c (elf64_ia64_check_relocs): Likewise.
338 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
339 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
340 * elf64-s390.c (elf_s390_check_relocs): Likewise.
341 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
342 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
343 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
344 * elfnn-ia64.c (elfNN_ia64_check_relocs): Likewise.
345 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
346 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
347 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
348 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
349
165f707a
AM
3502017-11-28 Alan Modra <amodra@gmail.com>
351
352 PR 22471
353 * elflink.c (_bfd_elf_merge_symbol): Allow weak symbols to override
354 early passes over linker script symbols.
355 * linker.c (_bfd_generic_link_add_one_symbol): Allow symbols to
356 override early passes over linker script symbols. Clear ldscript_def
357 on symbol definitions.
358
cd5b2bab
AM
3592017-11-28 Alan Modra <amodra@gmail.com>
360
361 * elf64-mmix.c (bfd_elf64_bfd_copy_link_hash_symbol_type): Define.
362
a83ef4d1
L
3632017-11-28 H.J. Lu <hongjiu.lu@intel.com>
364
365 PR ld/22502
366 * elflink.c (_bfd_elf_merge_symbol): Also skip definition from
367 an IR object.
368 (elf_link_add_object_symbols): If linker plugin is enabled, set
369 non_ir_ref_regular on symbols referenced in regular objects so
370 that linker plugin will get the correct symbol resolution.
371
6dda7875
SN
3722017-11-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
373
374 PR ld/22263
375 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Use
376 bfd_link_executable instead of bfd_link_pic for TLS.
377 (elfNN_aarch64_allocate_dynrelocs): Likewise.
378 (aarch64_can_relax_tls): Likewise.
379
a377ae2a
SN
3802017-11-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
381
382 PR ld/22269
383 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Use
384 UNDEFWEAK_NO_DYNAMIC_RELOC to avoid dynamic GOT relocs.
385 (elfNN_aarch64_allocate_dynrelocs): Likewise.
386
276da9b3
L
3872017-11-24 H.J. Lu <hongjiu.lu@intel.com>
388
389 PR binutils/22444
390 * elf.c (elf_read_notes): Add an argument for note aligment.
391 (elf_parse_notes): Likewise.
392 (_bfd_elf_make_section_from_shdr): Pass section aligment to
393 elf_parse_notes.
394 (bfd_section_from_phdr): Pass segment aligment to elf_read_notes.
395 (elf_parse_notes): Add an argument for note aligment. Use
396 ELF_NOTE_DESC_OFFSET to get the offset of the note descriptor.
397 Use ELF_NOTE_NEXT_OFFSET to get the offset of the next note
398 entry.
399 (elf_read_notes): Add an argument for note aligment and pass it
400 to elf_parse_notes.
401
287c7eaf
AM
4022017-11-23 Alan Modra <amodra@gmail.com>
403
404 * elf32-hppa.c (pc_dynrelocs): Define.
405 (elf32_hppa_copy_indirect_symbol): Don't copy dyn_relocs to weakdefs.
406 (alias_readonly_dynrelocs): New function.
407 (elf32_hppa_adjust_dynamic_symbol): Don't clear non_got_ref to
408 indicate dyn_relocs should be discarded, discard them here.
409 Use alias_readonly_dynrelocs.
410 (allocate_dynrelocs): Don't test or clear non_got_ref.
411 (elf32_hppa_relocate_section): Simplify test for dynamic relocs.
412 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Don't copy dyn_relocs
413 to weakdefs.
414 (alias_readonly_dynrelocs, pc_dynrelocs): New functions.
415 (ppc_elf_adjust_dynamic_symbol): Don't clear non_got_ref to
416 indicate dyn_relocs should be discarded, discard them here.
417 Use alias_readonly_dynrelocs.
418 (allocate_dynrelocs): Don't test or clear non_got_ref.
419 (ppc_elf_relocate_section): Simplify test for dynamic relocs.
420
ab2477e1
AM
4212017-11-23 Alan Modra <amodra@gmail.com>
422
423 * elf64-ppc.c (struct ppc_link_hash_entry): Delete weakref field.
424 (ppc64_elf_copy_indirect_symbol): Don't set weakref.
425 (alias_readonly_dynrelocs): Use u.alias rather than weakref.
426 (ppc64_elf_adjust_dynamic_symbol): Don't use
427 alias_readonly_dynrelocs for function symbols.
428
60d67dc8
AM
4292017-11-23 Alan Modra <amodra@gmail.com>
430
431 * elf-bfd.h (struct elf_link_hash_entry): Add is_weakalias.
432 Rename u.weakdef to u.alias and update comment.
433 (weakdef): New static inline function.
434 * elflink.c (bfd_elf_record_link_assignment) Test is_weakalias
435 rather than u.weakdef != NULL, and use weakdef function.
436 (_bfd_elf_adjust_dynamic_symbol): Likewise.
437 (_bfd_elf_fix_symbol_flags): Likewise. Clear is_weakalias on
438 all aliases if def has been overridden in a regular object, not
439 u.weakdef.
440 (elf_link_add_object_symbols): Delete new_weakdef flag. Test
441 is_weakalias and use weakdef. Set is_weakalias and circular
442 u.alias. Update comments.
443 (_bfd_elf_gc_mark_rsec): Test is_weakalias rather than
444 u.weakdef != NULL and use weakdef function.
445 * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Test
446 is_weakalias rather than u.weakdef != NULL and use weakdef
447 function. Assert that def is strong defined.
448 * elf32-arc.c (elf_arc_adjust_dynamic_symbol): Likewise.
449 * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
450 * elf32-bfin.c (elf32_bfinfdpic_adjust_dynamic_symbol): Likewise.
451 (bfin_adjust_dynamic_symbol): Likewise.
452 * elf32-cr16.c (_bfd_cr16_elf_adjust_dynamic_symbol): Likewise.
453 * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
454 * elf32-frv.c (elf32_frvfdpic_adjust_dynamic_symbol): Likewise.
455 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
456 * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
457 * elf32-lm32.c (lm32_elf_adjust_dynamic_symbol): Likewise.
458 * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
459 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
460 * elf32-metag.c (elf_metag_adjust_dynamic_symbol): Likewise.
461 * elf32-microblaze.c (microblaze_elf_adjust_dynamic_symbol): Likewise.
462 * elf32-nds32.c (nds32_elf_adjust_dynamic_symbol): Likewise.
463 * elf32-nios2.c (nios2_elf32_adjust_dynamic_symbol): Likewise.
464 * elf32-or1k.c (or1k_elf_adjust_dynamic_symbol): Likewise.
465 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
466 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
467 * elf32-score.c (s3_bfd_score_elf_adjust_dynamic_symbol): Likewise.
468 * elf32-score7.c (s7_bfd_score_elf_adjust_dynamic_symbol): Likewise.
469 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
470 * elf32-tic6x.c (elf32_tic6x_adjust_dynamic_symbol): Likewise.
471 * elf32-tilepro.c (tilepro_elf_gc_mark_hook): Likewise.
472 (tilepro_elf_adjust_dynamic_symbol): Likewise.
473 * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
474 * elf32-xtensa.c (elf_xtensa_adjust_dynamic_symbol): Likewise.
475 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Likewise.
476 * elf64-hppa.c (elf64_hppa_adjust_dynamic_symbol): Likewise.
477 * elf64-ia64-vms.c (elf64_ia64_adjust_dynamic_symbol): Likewise.
478 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
479 (ppc64_elf_adjust_dynamic_symbol): Likewise.
480 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
481 * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
482 * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Likewise.
483 * elfnn-ia64.c (elfNN_ia64_adjust_dynamic_symbol): Likewise.
484 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Likewise.
485 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Likewise.
486 * elfxx-sparc.c (_bfd_sparc_elf_gc_mark_hook): Likewise.
487 (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
488 * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): Likewise.
489 (tilegx_elf_adjust_dynamic_symbol): Likewise.
490 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
491
0ee5a0e4
AM
4922017-11-21 Alan Modra <amodra@gmail.com>
493
494 * elf-bfd.h (elf_symbol_from): Check for NULL symbol bfd.
495 * elfcode.h (elf_slurp_reloc_table_from_section): Add FIXME comment.
496
b77db948
NC
4972017-11-20 Nick Clifton <nickc@redhat.com>
498
499 PR 22450
500 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Skip
501 objects without a GNU_PROPERTY note section when looking for a bfd
502 onto which notes can be accumulated.
503
28e07a05
AM
5042017-11-20 Alan Modra <amodra@gmail.com>
505
506 PR 22451
507 PR 22460
508 * elf.c (_bfd_elf_init_reloc_shdr): Delete "sec_hdr" parameter
509 and leave rel_hdr->sh_flags zero. Update calls.
510 (bfd_elf_set_group_contents): Check input rel/rela SHF_GROUP
511 flag when !gas before adding rel/rela section to group. Set
512 output rel/rela SHF_GROUP flags.
513
671275c3
JW
5142017-11-18 Jim Wilson <jimw@sifive.com>
515
516 * elfnn-riscv.c (_bfd_riscv_relax_align): Add space between alignment
517 and to in error message.
518
2c244f9b
L
5192017-11-17 H.J. Lu <hongjiu.lu@intel.com>
520
521 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Pass
522 "%F%P:", instead of "%F:", to linker callback in case of error.
523
80a04378
NC
5242017-11-16 Nick Clifton <nickc@redhat.com>
525
526 PR 22421
527 * elf.c (elfcore_grok_netbsd_procinfo): Check that the note is big enough.
528 (elfcore_grok_openbsd_procinfo): Likewise.
529 (elfcore_grok_nto_status): Likewise.
530
38b28f70
NC
5312017-11-16 Nick Clifton <nickc@redhat.com>
532
533 * merge.c (sec_merge_emit): Always create padding buffer. Add
534 asserts to make sure that the buffer is long enough.
535
a5065160
AM
5362017-11-15 Alan Modra <amodra@gmail.com>
537
538 * bfd.c (union _bfd_doprnt_args): Add "Bad".
539 (_bfd_doprnt): Handle more flags.
540 (_bfd_doprnt_scan): Likewise. Tidy setting of args array.
541 (error_handler_internal): Init args type to Bad.
542
06bcf541
AM
5432017-11-14 Alan Modra <amodra@gmail.com>
544
545 PR 22431
546 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Warn on discarding
547 non-empty dynamic section.
548 (ppc_build_one_stub): Take elf_gp from output bfd, not output
549 section owner.
550 (ppc_size_one_stub, ppc64_elf_next_toc_section): Likewise.
551
2d0d44d5
AM
5522017-11-14 Alan Modra <amodra@gmail.com>
553
554 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for user
555 .eh_frame info.
556
5be87c8f
JB
5572017-11-13 Jan Beulich <jbeulich@suse.com>
558
559 * coff-tic80.c (COFF_ENCODE_ALIGNMENT, COFF_DECODE_ALIGNMENT):
560 Define.
561 * coffcode.h (coff_set_alignment_hook): Drop tic80 special case.
562 (coff_write_object_contents): Likewise. Issue diagnostic for too
563 large alignment.
564
f882209d
L
5652017-11-12 H.J. Lu <hongjiu.lu@intel.com>
566
567 PR ld/22423
568 * elf.c (_bfd_elf_map_sections_to_segments): Remove PF_X from
569 PT_PHDR segment.
570
e3e53eed
AM
5712017-11-12 Alan Modra <amodra@gmail.com>
572
573 * elflink.c (elf_link_add_object_symbols): Ignore anything but
574 defined and defweak symbols when setting up weakdefs.
575
529fe20e
AM
5762017-11-12 Alan Modra <amodra@gmail.com>
577
578 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set non_got_ref
579 to keep dyn_relocs, clear to discard. Comment.
580 (allocate_dynrelocs): Always clear non_got_ref when clearing
581 dyn_relocs in non-pic case. Invert non_got_ref test. Also test
582 dynamic_adjusted and ELF_COMMON_DEF_P. Move code deleting
583 dyn_relocs on undefined syms to handle for non-pic too.
584 (elf32_hppa_relocate_section): Simplify test for non-pic dyn relocs.
585 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Set non_got_ref
586 to keep dyn_relocs, clear to discard. Comment.
587 (allocate_dynrelocs): Always clear non_got_ref when clearing
588 dyn_relocs in non-pic case. Invert non_got_ref test. Also test
589 dynamic_adjusted and ELF_COMMON_DEF_P. Move code deleting
590 dyn_relocs on undefined syms to handle for non-pic too.
591 (ppc_elf_relocate_section): Simplify test for non-pic dyn relocs.
592 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Discard
593 dyn_relocs here. Don't bother setting non_got_ref. Comment.
594 (allocate_dynrelocs): Delete special handling of non-pic ELFv2
595 ifuncs. Move code deleting dyn_relocs on undefined symbols to
596 handle for non-pic too. Don't test non_got_ref. Do test
597 dynamic_adjusted and ELF_COMMON_DEF_P.
598
c9ec0e89
DT
5992017-11-08 Djordje Todorovic <djordje.todorovic@rt-rk.com>
600
601 * elf32-mips.c (elf32_mips_grok_psinfo): Extract core->pid.
602 * elf64-mips.c (elf64_mips_grok_psinfo): Likewise.
603 * elfn32-mips.c (elf32_mips_grok_psinfo): Likewise.
604
9031cb4a
DT
6052017-11-08 Djordje Todorovic <djordje.todorovic@rt-rk.com>
606
607 * elf32-mips.c (elf32_mips_write_core_note): New function.
608 (elf_backend_write_core_note): New macro.
609 * elf64-mips.c (elf64_mips_write_core_note): New function.
610 (elf_backend_write_core_note): New macro.
611 * elfn32-mips.c (elf32_mips_write_core_note): New function.
612 (elf_backend_write_core_note): New macro.
613
db84fff3
AM
6142017-11-07 Alan Modra <amodra@gmail.com>
615
616 * elf64-ppc.c (ppc64_elf_build_stubs): Correct pluralization in
617 statistics message.
618
6003e27e
AM
6192017-11-07 Alan Modra <amodra@gmail.com>
620
621 * sysdep.h: Formatting, comment fixes.
622 (gettext, ngettext): Redefine when ENABLE_NLS.
623 (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
624 (_): Define using gettext.
625 (textdomain, bindtextdomain): Use safer "do nothing".
626 * hosts/alphavms.h (textdomain, bindtextdomain): Likewise.
627 (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
628
26a93010
AM
6292017-11-05 Alan Modra <amodra@gmail.com>
630
631 PR 22397
632 * bfd.c (_bfd_doprnt_scan): Check args index before storing, not
633 after.
634
7167fe4c
AM
6352017-11-05 Alan Modra <amodra@gmail.com>
636
637 PR 22397
638 * bfd.c (union _bfd_doprnt_args): New.
639 (PRINT_TYPE): Add FIELD arg. Take value from args.
640 (_bfd_doprnt): Replace ap parameter with args. Adjust all
641 PRINT_TYPE invocations and reading of format args to suit.
642 Move "%%" handling out of switch handling args. Support
643 positional parameters.
644 (_bfd_doprnt_scan): New function.
645 (error_handler_internal): Call _bfd_doprnt_scan and read args.
646
f15d0b54
AM
6472017-11-04 Alan Modra <amodra@gmail.com>
648
649 * elf32-ppc.c (got_entries_needed, got_relocs_needed): New functions.
650 (allocate_dynrelocs, ppc_elf_size_dynamic_sections): Use them here.
651 (ppc_elf_relocate_section): Don't output a dynamic relocation
652 for IE GOT entries in an executable.
653 * elf64-ppc.c (allocate_got): Trim unnecessary TPREL relocs.
654 (ppc64_elf_size_dynamic_sections): Likewise.
655 (ppc64_elf_relocate_section): Likewise.
656
98bbb1b8
AM
6572017-11-04 Alan Modra <amodra@gmail.com>
658
659 * elf32-ppc.c (readonly_dynrelocs): Delete info param. Update all
660 callers. Don't bother with SEC_ALLOC test. Return section pointer.
661 Move minfo call to..
662 (maybe_set_textrel): ..here.
663 * elf64-ppc.c (readonly_dynrelocs): Return section pointer.
664 (maybe_set_textrel): Call minfo to print textrel warning to map file.
665
2e684e75
AM
6662017-11-04 Alan Modra <amodra@gmail.com>
667
668 * elf32-hppa.c (enum _tls_type): Move.
669 (struct elf32_hppa_link_hash_entry): Make tls_type a bitfield.
670 (elf32_hppa_check_relocs): Set DF_STATIC_TLS only for shared libraries.
671 Tidy tls_type handling. Set symbol tls_type for GOT_TLS_LDM too.
672 (got_entries_needed, got_relocs_needed): New functions.
673 (allocate_dynrelocs): Use them.
674 (elf32_hppa_size_dynamic_sections): Likewise.
675 (elf32_hppa_relocate_section): Delete bogus FIXME. Formatting.
676 Correct code emitting relocs on GD/IE got entries. Report an
677 error when a symbol has both normal and TLS GOT relocs.
678
127e8e9f
AM
6792017-11-04 Alan Modra <amodra@gmail.com>
680
681 PR 22394
682 * elf32-hppa.c (elf32_hppa_check_relocs): Don't create dyn_relocs
683 for plabels when non-pic.
684 (maybe_set_textrel): New function.
685 (readonly_dynrelocs): Move and rewrite.
686 (elf32_hppa_adjust_dynamic_symbol): Use it. Don't create copy
687 relocs when def_regular or -z nocopyreloc. Handle non_got_ref
688 for functions. Expand non_got_ref comments.
689 (elf32_hppa_size_dynamic_sections): Use maybe_set_textrel.
690
79b0c981
L
6912017-11-03 H.J. Lu <hongjiu.lu@intel.com>
692
693 * elf32-i386.c (elf_i386_check_relocs): Set plt.refcount to 1.
694 Don't use func_pointer_refcount. Don't set plt.refcount nor
695 non_got_ref for function pointer reference.
696 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
697 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Don't use
698 func_pointer_refcount.
699 (_bfd_x86_elf_copy_indirect_symbol): Don't copy
700 func_pointer_refcount.
701 (_bfd_x86_elf_hide_symbol): Don't use func_pointer_refcount.
702 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Likewise.
703 (elf_x86_link_hash_entry): Remove func_pointer_refcount.
704
6cee8979
NC
7052017-11-03 Mingi Cho <mgcho.minic@gmail.com>
706 Nick Clifton <nickc@redhat.com>
707
708 PR 22385
709 * coffgen.c (_bfd_coff_get_external_symbols): Check for an
710 overlarge raw syment count.
711 (coff_get_normalized_symtab): Likewise.
712
81b42bca
JB
7132017-11-01 James Bowman <james.bowman@ftdichip.com>
714
715 * archures.c: Add bfd_mach_ft32b.
716 * cpu-ft32.c: Add arch_info_struct.
717 * elf32-ft32.c: Add R_FT32_RELAX, SC0, SC1,
718 DIFF32.
719 (ft32_elf_relocate_section): Add clauses for R_FT32_SC0, SC1,
720 DIFF32.
721 (ft32_reloc_shortable, elf32_ft32_is_diff_reloc)
722 (elf32_ft32_adjust_diff_reloc_value)
723 (elf32_ft32_adjust_reloc_if_spans_insn)
724 (elf32_ft32_relax_delete_bytes, elf32_ft32_relax_is_branch_target)
725 (ft32_elf_relax_section): New function.
726 * reloc.c: Add BFD_RELOC_FT32_RELAX, SC0, SC1, DIFF32.
727 * bfd-in2.h: Regenerate.
728 * libbfd.h: Regenerate.
729
a67d66eb
NC
7302017-11-01 Nick Clifton <nickc@redhat.com>
731
732 PR 22376
733 * coffcode.h (coff_slurp_line_table): Check for an excessively
734 large line number count.
735
e0115a84
NC
7362017-11-01 Nick Clifton <nickc@redhat.com>
737
738 PR 22373
739 * peicode.h (pe_bfd_read_buildid): Revise check for invalid size
740 and offset in light of further possible bogus values.
741
3988aed5
AM
7422017-11-01 Alan Modra <amodra@gmail.com>
743
744 PR 22374
745 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't create a plt
746 entry when just a dynamic reloc can serve. Ensure no dynamic
747 relocations when UNDEFWEAK_NO_DYNAMIC_RELOC by setting non_got_ref.
748 Expand and move the non_got_ref comment.
749 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
750
ee357486
NC
7512017-11-01 Nick Clifton <nickc@redhat.com>
752
753 PR 22369
754 * coffgen.c (_bfd_coff_free_symbols): Fail if called on a non-COFF
755 file.
756 * cofflink.c (coff_link_check_archive_element): Skip non-COFF
757 members of an archive.
758
0bb6961f
NC
7592017-10-31 Nick Clifton <nickc@redhat.com>
760
761 PR 22373
762 * peicode.h (pe_bfd_read_buildid): Check for invalid size and data
763 offset values.
764
81742b83
AM
7652017-10-30 Alan Modra <amodra@gmail.com>
766
7f9cb5d2
AM
767 * elf32-frv.c (ELF_TARGET_ID): Don't define for generic
768 elf target.
769
81742b83
AM
770 * elflink.c (elf_gc_sweep): Test elf_object_id in addition to
771 relocs_compatible.
772 (bfd_elf_gc_sections): Likewise.
773
d336fa6d
AM
7742017-10-30 Alan Modra <amodra@gmail.com>
775
776 PR 22269
777 * elf32-hppa.c (elf32_hppa_check_relocs): Move SEC_ALLOC test to
778 ensure non_got_ref is not set due to debug references.
779 (elf32_hppa_adjust_dynamic_symbol): Tidy plabel handling. Use
780 SYMBOL_CALLS_LOCAL and UNDEFWEAK_NO_DYNAMIC_RELOC when determining
781 need for a plt entry.
782 (allocate_dynrelocs): Similarly for got entries. Tidy code discarding
783 dynamic relocs when pic. Remove bogus code attempting to handle
784 commons.
785 (elf32_hppa_relocate_section): Similarly. Delete resolved_to_zero
786 and simplify.
787 (elf32_hppa_finish_dynamic_symbol): Use UNDEFWEAK_NO_DYNAMIC_RELOC
788 and SYMBOL_REFERENCES_LOCAL in GOT handling.
789
c0e331c7
AM
7902017-10-28 Alan Modra <amodra@gmail.com>
791
792 PR 22300
793 * elflink.c (_bfd_elf_merge_symbol): Remove relocs_compatible check.
794 * elf32-hppa.c (elf_backend_relocs_compatible): Define.
795 * elf32-ppc.c (elf_backend_relocs_compatible): Define.
796 * elf64-ppc.c (elf_backend_relocs_compatible): Define.
797
e601d38b
AM
7982017-10-25 Alan Modra <amodra@gmail.com>
799
800 * archive.c (_bfd_compute_and_write_armap): Match "__gnu_lto_slim"
801 optionally prefixed with "_".
802 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
803
3342be5d
AW
8042017-10-24 Andrew Waterman <andrew@sifive.com>
805
806 * elfnn-riscv.c (_bfd_riscv_relax_lui): Don't relax to c.lui
807 when rd is x0.
808
93f4de39
RL
8092017-10-24 Renlin Li <renlin.li@arm.com>
810
811 PR ld/21703
812 * elflink.c (_bfd_elf_merge_symbol): Handle multiple definition case.
813
66cae560
NC
8142017-10-23 Nick Clifton <nickc@redhat.com>
815
816 PR 22319
817 * elflink.c (elf_link_output_extsym): Keep global undefined
818 symbols if they have been marked as needed.
819
defc8e2b
MR
8202017-10-23 Maciej W. Rozycki <macro@imgtec.com>
821
822 * elfn32-mips.c (mips_elf_n32_mkobject): New prototype and
823 function.
824 (bfd_elf32_mkobject): Use `mips_elf_n32_mkobject' rather than
825 `_bfd_mips_elf_mkobject'.
826
56fbd041
HPN
8272017-10-22 Hans-Peter Nilsson <hp@axis.com>
828
829 PR gas/22304
830 * config.bfd (cris-*-* | crisv32-*-*): Require a 64-bit BFD.
831
9d06997a
PD
8322017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
833
834 * elfnn-riscv.c (riscv_pcgp_hi_reloc): New structure.
835 (riscv_pcgp_lo_reloc): Likewise.
836 (riscv_pcgp_relocs): Likewise.
837 (riscv_init_pcgp_relocs): New function.
838 (riscv_free_pcgp_relocs): Likewise.
839 (riscv_record_pcgp_hi_reloc): Likewise.
840 (riscv_record_pcgp_lo_reloc): Likewise.
841 (riscv_delete_pcgp_hi_reloc): Likewise.
842 (riscv_use_pcgp_hi_reloc): Likewise.
843 (riscv_record_pcgp_lo_reloc): Likewise.
844 (riscv_find_pcgp_lo_reloc): Likewise.
845 (riscv_delete_pcgp_lo_reloc): Likewise.
846 (_bfd_riscv_relax_pc): Likewise.
847 (_bfd_riscv_relax_section): Handle R_RISCV_PCREL_* relocations
848 via the new functions above.
849
ff6f4d9b
PD
8502017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
851
852 * elfnn-riscv.c (R_RISCV_DELETE): New define.
853 (_bfd_riscv_relax_delete): New function.
854 (perform_relocation): Handle R_RISCV_DELETE.
855 (_bfd_riscv_relax_section): Likewise.
856
28095894
L
8572017-10-19 H.J. Lu <hongjiu.lu@intel.com>
858
859 PR ld/22263
860 * elfxx-tilegx.c (tilegx_elf_tls_transition): Replace
861 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
862 bfd_link_executable for TLS check.
863 (tilegx_elf_check_relocs): Likewise.
864 (allocate_dynrelocs): Likewise.
865 (tilegx_elf_relocate_section): Likewise.
866
1ba1f393
L
8672017-10-19 H.J. Lu <hongjiu.lu@intel.com>
868
869 PR ld/22263
870 * elf32-tilepro.c (tilepro_elf_tls_transition): Replace
871 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
872 bfd_link_executable for TLS check.
873 (tilepro_elf_check_relocs): Likewise.
874 (allocate_dynrelocs): Likewise.
875 (tilepro_elf_relocate_section): Likewise.
876
8772017-10-19 H.J. Lu <hongjiu.lu@intel.com>
0fb7012e
L
878
879 PR ld/22263
880 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
881 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
882 bfd_link_executable for TLS check.
883 (_bfd_sparc_elf_check_relocs): Likewise.
884 (allocate_dynrelocs): Likewise.
885 (_bfd_sparc_elf_relocate_section): Likewise.
886
8e354058
L
8872017-10-18 H.J. Lu <hongjiu.lu@intel.com>
888
889 * elf32-tilepro.c (tilepro_elf_gc_mark_hook): Call
890 _bfd_generic_link_add_one_symbol to mark __tls_get_addr.
891 * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): Likewise.
892
b7213666
L
8932017-10-17 H.J. Lu <hongjiu.lu@intel.com>
894
895 * elf32-microblaze.c (microblaze_elf_check_relocs): Check for
896 indirect and warning symbols.
897
cf54ebff
AM
8982017-10-17 Alan Modra <amodra@gmail.com>
899
900 PR 22307
901 * elf-properties.c (_bfd_elf_parse_gnu_properties): Compare datasz
902 against size left rather than comparing pointers. Reorganise loop.
903
0301ce14
AM
9042017-10-17 Alan Modra <amodra@gmail.com>
905
906 PR 22306
907 * aoutx.h (aout_get_external_symbols): Handle stringsize of zero,
908 and error for any other size that doesn't cover the header word.
909
5c3261b0
L
9102017-10-16 H.J. Lu <hongjiu.lu@intel.com>
911
912 * elf-bfd.h (elf_backend_data): Remove gc_sweep_hook.
913 * elf32-arm.c (elf32_arm_gc_sweep_hook): Removed.
914 (elf_backend_gc_sweep_hook): Likewise.
915 * elf32-bfin.c (bfin_gc_sweep_hook): Likewise.
916 (bfinfdpic_gc_sweep_hook): Likewise.
917 (elf_backend_gc_sweep_hook): Likewise.
918 * elf32-cr16.c (elf32_cr16_gc_sweep_hook): Likewise.
919 (elf_backend_gc_sweep_hook): Likewise.
920 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
921 (elf_backend_gc_sweep_hook): Likewise.
922 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
923 (elf_backend_gc_sweep_hook): Likewise.
924 * elf32-lm32.c (lm32_elf_gc_sweep_hook): Likewise.
925 (elf_backend_gc_sweep_hook): Likewise.
926 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
927 (elf_backend_gc_sweep_hook): Likewise.
928 * elf32-m68k.c (elf_m68k_got_entry): Remove elf_m68k_gc_sweep_hook
929 from comments.
930 (elf_m68k_remove_got_entry_type): Removed.
931 (elf_m68k_find_got_entry_ptr): Likewise.
932 (elf_m68k_remove_got_entry): Likewise.
933 (elf_m68k_gc_sweep_hook): Likewise.
934 (elf_backend_gc_sweep_hook): Likewise.
935 * elf32-mcore.c (mcore_elf_gc_sweep_hook): Likewise.
936 (elf_backend_gc_sweep_hook): Likewise.
937 * elf32-metag.c (elf_metag_gc_sweep_hook): Likewise.
938 (elf_backend_gc_sweep_hook): Likewise.
939 * elf32-microblaze.c (elf_backend_gc_sweep_hook): Likewise.
940 (elf_backend_gc_sweep_hook): Likewise.
941 * elf32-mips.c (elf_backend_gc_sweep_hook): Likewise.
942 (elf_backend_gc_sweep_hook): Likewise.
943 * elf32-nds32.c (nds32_elf_gc_sweep_hook): Likewise.
944 (elf_backend_gc_sweep_hook): Likewise.
945 * elf32-nios2.c (nios2_elf32_gc_sweep_hook): Likewise.
946 (elf_backend_gc_sweep_hook): Likewise.
947 * elf32-or1k.c (or1k_elf_gc_sweep_hook): Likewise.
948 (elf_backend_gc_sweep_hook): Likewise.
949 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
950 (elf_backend_gc_sweep_hook): Likewise.
951 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
952 (elf_backend_gc_sweep_hook): Likewise.
953 * elf32-sparc.c (elf_backend_gc_sweep_hook): Likewise.
954 * elf32-tic6x.c (elf32_tic6x_gc_sweep_hook): Likewise.
955 (elf_backend_gc_sweep_hook): Likewise.
956 * elf32-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
957 * elf32-tilepro.c (tilepro_elf_gc_sweep_hook): Likewise.
958 (elf_backend_gc_sweep_hook): Likewise.
959 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
960 (elf_backend_gc_sweep_hook): Likewise.
961 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
962 (elf_backend_gc_sweep_hook): Likewise.
963 * elf64-alpha.c (elf64_alpha_gc_sweep_hook): Likewise.
964 (elf_backend_gc_sweep_hook): Likewise.
965 * elf64-mips.c (elf_backend_gc_sweep_hook): Likewise.
966 * elf64-mmix.c (mmix_elf_gc_sweep_hook): Likewise.
967 (elf_backend_gc_sweep_hook): Likewise.
968 * elf64-ppc.c (elf_backend_gc_sweep_hook): Likewise.
969 (ppc64_elf_gc_sweep_hook): Likewise.
970 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
971 (elf_backend_gc_sweep_hook): Likewise.
972 * elf64-sparc.c (elf_backend_gc_sweep_hook): Likewise.
973 * elf64-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
974 * elflink.c (elf_link_add_object_symbols): Don't call
975 _bfd_elf_link_check_relocs here.
976 (gc_sweep_hook_fn): Removed.
977 (elf_gc_sweep): Remove gc_sweep_hook.
978 * elfnn-aarch64.c (elfNN_aarch64_gc_sweep_hook): Removed.
979 (elf_backend_gc_sweep_hook): Likewise.
980 * elfnn-riscv.c (riscv_elf_gc_sweep_hook): Likewise.
981 (elf_backend_gc_sweep_hook): Likewise.
982 * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
983 * elfxx-mips.h (_bfd_mips_elf_gc_sweep_hook): Likewise.
984 (elf_backend_gc_sweep_hook): Likewise.
985 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
986 * elfxx-sparc.h (_bfd_sparc_elf_gc_sweep_hook): Likewise.
987 * elfxx-target.h (elf_backend_gc_sweep_hook): Likewise.
988 (elfNN_bed): Remove elf_backend_gc_sweep_hook.
989 * elfxx-tilegx.c (tilegx_elf_gc_sweep_hook): Removed.
990 * elfxx-tilegx.h (tilegx_elf_gc_sweep_hook): Likewise.
991
851b6fa1
L
9922017-10-14 H.J. Lu <hongjiu.lu@intel.com>
993
994 * elf32-i386.c (elf_i386_backend_data): Removed.
995 (get_elf_i386_backend_data): Likewise.
996 (elf_i386_arch_bed): Replace elf_i386_backend_data with
997 elf_x86_backend_data.
998 (elf_i386_get_synthetic_symtab): Likewise.
999 (elf_i386_nacl_arch_bed): Likewise.
1000 (elf_i386_vxworks_arch_bed): Likewise.
1001 (elf_i386_relocate_section): Check target_os instead of
1002 is_vxworks.
1003 (elf_i386_finish_dynamic_symbol): Likewise.
1004 (elf_i386_finish_dynamic_sections): Use htab->plt0_pad_byte.
1005 Check target_os instead of is_vxworks.
1006 (elf_i386_link_setup_gnu_properties): Remove normal_target and
1007 is_vxworks. Initialize plt0_pad_byte.
1008 * elf64-x86-64.c (elf_x86_64_backend_data); Removed.
1009 (get_elf_x86_64_arch_data): Likewise.
1010 (get_elf_x86_64_backend_data): Likewise.
1011 (elf_x86_64_arch_bed): Replace elf_x86_64_backend_data with
1012 elf_x86_backend_data.
1013 (elf_x86_64_get_synthetic_symtab): Likewise.
1014 (elf_x86_64_nacl_arch_bed): Likewise.
1015 (elf_x86_64_link_setup_gnu_properties): Remove is_vxworks and
1016 normal_target. Initialize plt0_pad_byte.
1017 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check target_os
1018 instead of is_vxworks.
1019 (_bfd_x86_elf_size_dynamic_sections): Likewise.
1020 (_bfd_x86_elf_finish_dynamic_sections): Likewise.
1021 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
1022 (_bfd_x86_elf_link_hash_table_create): Initialize target_os.
1023 (_bfd_x86_elf_link_setup_gnu_properties): Remove is_vxworks.
1024 Update normal_target. Set up plt0_pad_byte. Check target_os
1025 instead of is_vxworks.
1026 * elfxx-x86.h (elf_x86_target_os): New.
1027 (elf_x86_backend_data): Likewise.
1028 (get_elf_x86_backend_data): Likewise.
1029 (elf_x86_link_hash_table): Remove is_vxworks. Add plt0_pad_byte
1030 and target_os.
1031 (elf_x86_init_table): Remove normal_target and is_vxworks. Add
1032 plt0_pad_byte.
1033
9577f60b
L
10342017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1035
1036 * elf32-i386.c (elf_i386_finish_dynamic_sections): Call
1037 _bfd_x86_elf_finish_dynamic_sections.
1038 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Likewise.
1039 * elfxx-x86.c (_bfd_x86_elf_finish_dynamic_sections): New
1040 function.
1041 * elfxx-x86.h (_bfd_x86_elf_finish_dynamic_sections): New
1042 prototype.
1043
5d84490b
L
10442017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1045
1046 PR ld/21384
1047 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
1048 hide symbol which was forced to be dynamic.
1049
e01c16a8
L
10502017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1051
1052 PR ld/22269
1053 * elf32-cris.c (cris_elf_relocate_section): Don't generate
1054 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1055 (cris_elf_check_relocs): Don't allocate dynamic relocation
1056 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1057
6ee6e05a
L
10582017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1059
1060 PR ld/22269
1061 * elf32-sh.c (allocate_dynrelocs): Discard dynamic relocations
1062 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1063 (sh_elf_relocate_section): Don't generate dynamic relocation if
1064 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1065
b27bb18f
L
10662017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1067
1068 PR ld/22269
1069 * elf32-s390.c (allocate_dynrelocs): Discard dynamic
1070 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1071 (elf_s390_relocate_section): Don't generate dynamic relocation
1072 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1073 * elf64-s390.c (allocate_dynrelocs): Discard dynamic
1074 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1075 (elf_s390_relocate_section): Don't generate dynamic relocation
1076 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1077
31a53da5
L
10782017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1079
1080 PR ld/22269
1081 * elf32-nios2.c (nios2_elf32_relocate_section): Don't generate
1082 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1083 (allocate_dynrelocs): Discard dynamic relocations if
1084 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1085
112fef40
L
10862017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1087
1088 PR ld/22269
1089 * elf32-microblaze.c (microblaze_elf_relocate_section): Don't
1090 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
1091 true.
1092 (allocate_dynrelocs): Discard dynamic relocations if
1093 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1094
5056ba1d
L
10952017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1096
1097 PR ld/22269
1098 * elf32-m68k.c (elf_m68k_check_relocs): Don't allocate dynamic
1099 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1100 (elf_m68k_adjust_dynamic_symbol): Don't make symbol dynamic if
1101 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1102 (elf_m68k_relocate_section): Don't generate dynamic relocation
1103 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1104
60c1b909
L
11052017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1106
1107 PR ld/22269
1108 * elf32-hppa.c (ensure_undef_dynamic): Don't make undefined
1109 symbol dynamic if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1110 (allocate_dynrelocs): Discard dynamic relocations if
1111 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1112 (elf32_hppa_relocate_section): Don't generate dynamic
1113 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1114
db41f6eb
L
11152017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1116
1117 PR ld/22269
1118 * elfnn-ia64.c (elfNN_ia64_check_relocs): Don't allocate
1119 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1120 (allocate_fptr): Don't allocate function pointer if
1121 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1122 (allocate_dynrel_entries): Don't allocate dynamic relocation
1123 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1124 (set_got_entry): Don't set GOT entry if
1125 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1126 (set_pltoff_entry): Don't set PLTOFF entry if
1127 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1128 (elfNN_ia64_relocate_section): Don't install dynamic relocation
1129 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1130
ad951203
L
11312017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1132
1133 PR ld/22269
1134 * elfxx-mips.c (mips_elf_calculate_relocation): Don't generate
1135 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1136 (allocate_dynrelocs): Don't allocate dynamic relocations if
1137 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1138
95b03e4a
L
11392017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1140
1141 PR ld/22269
1142 * elf32-arm.c (elf32_arm_final_link_relocate): Don't generate
1143 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1144 (allocate_dynrelocs_for_symbol): Discard dynamic relocations
1145 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1146
a3cd202a
L
11472017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1148
1149 PR ld/22269
1150 * elf32-tilepro.c (allocate_dynrelocs): Discard dynamic
1151 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1152 (tilepro_elf_relocate_section): Don't generate dynamic
1153 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1154 * elfxx-tilegx.c (allocate_dynrelocs): Discard dynamic
1155 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1156 (tilegx_elf_relocate_section): Don't generate dynamic
1157 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1158
ddb7fd0f
L
11592017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1160
1161 PR ld/22269
1162 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Don't
1163 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
1164 true.
1165 (elfNN_aarch64_allocate_dynrelocs): Discard dynamic relocations
1166 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1167
62cd30f1
L
11682017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1169
1170 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Moved to ...
1171 * elf-bfd.h (UNDEFWEAK_NO_DYNAMIC_RELOC): Here.
1172 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Removed.
1173
3b4b0a62
JB
11742017-10-12 James Bowman <james.bowman@ftdichip.com>
1175
1176 * bfd-in2.h: Regenerate.
1177 * libbfd.h: Regenerate.
1178 * elf32-ft32.c: Add HOWTO R_FT32_15.
1179 * reloc.c: Add BFD_RELOC_FT32_15.
1180
1d75a8e2
NC
11812017-10-12 Nick Clifton <nickc@redhat.com>
1182
1183 * reloc.c (enum bfd_reloc_status): Start values at 2.
1184 * bfd-in2.h: Regenerate.
1185 * elfnn-aarch64.c (aarch64_relocate): Invert sense of function, so
1186 that a TRUE return indicates success. Compare the result of
1187 calling _bfd_aarch64_elf_put_addend against bfd_reloc_ok.
1188 (build_one_stub): Change sense of tests against aarch64_relocate
1189 return value.
1190 (elfNN_aarch64_tls_relax): Return bfd_reloc_notsupported, rather
1191 than FALSE, when an error is detected.
1192 (elfNN_aarch64_final_link_relocate): Likewise.
1193
9f857535
L
11942017-10-12 H.J. Lu <hongjiu.lu@intel.com>
1195
1196 * elf32-i386.c (elf_backend_hide_symbol): New.
1197 * elf64-x86-64.c (elf_backend_hide_symbol): Likewise.
1198 * elfxx-x86.c (_bfd_x86_elf_hide_symbol): Likewise.
1199 * elfxx-x86.h (_bfd_x86_elf_hide_symbol): Likewise.
1200
559192d8
AM
12012017-10-12 Alan Modra <amodra@gmail.com>
1202
1203 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Call
1204 elf_backend_hide_symbol, not _bfd_elf_link_hash_hide_symbol.
1205 (bfd_elf_define_start_stop): Likewise.
1206
f5233a16
AM
12072017-10-12 Alan Modra <amodra@gmail.com>
1208
1209 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Set .interp
1210 when executable rather than non-PIC.
1211 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
1212 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
1213
3c9a7b0d
MR
12142017-10-11 Maciej W. Rozycki <macro@imgtec.com>
1215
1216 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo64_ugid16'
1217 member.
1218 * elf-linux-core.h (elf_external_linux_prpsinfo64): Rename to...
1219 (elf_external_linux_prpsinfo64_ugid32): ... this.
1220 (swap_linux_prpsinfo32_out): Rename to...
1221 (swap_linux_prpsinfo32_ugid32_out): ... this.
1222 (elf_external_linux_prpsinfo64_ugid16): New structure.
1223 (swap_linux_prpsinfo64_ugid16_out): New function.
1224 * elfxx-target.h [!elf_backend_linux_prpsinfo64_ugid16]
1225 (elf_backend_linux_prpsinfo64_ugid16): Define.
1226 (elfNN_bed): Initialize `linux_prpsinfo64_ugid16' member.
1227 * elf.c (elfcore_write_linux_prpsinfo64): Handle both variants
1228 of the 64-bit Linux core PRPSINFO note.
1229 * elf64-sh64.c (elf_backend_linux_prpsinfo64_ugid16): Define.
1230
a2f63b2e
MR
12312017-10-11 Maciej W. Rozycki <macro@imgtec.com>
1232
1233 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo32_ugid16'
1234 member.
1235 (elfcore_write_ppc_linux_prpsinfo32): Remove prototype.
1236 * elf32-ppc.c (elfcore_write_ppc_linux_prpsinfo32): Remove.
1237 (elf_external_ppc_linux_prpsinfo32)
1238 (swap_ppc_linux_prpsinfo32_out): Move to...
1239 * elf-linux-core.h (elf_external_linux_prpsinfo32_ugid32)
1240 (swap_linux_prpsinfo32_ugid32_out): ... these.
1241 (elf_external_linux_prpsinfo32): Rename to...
1242 (elf_external_linux_prpsinfo32_ugid16): ... this.
1243 (swap_linux_prpsinfo32_out): Rename to...
1244 (swap_linux_prpsinfo32_ugid16_out): ... this.
1245 * elfxx-target.h [!elf_backend_linux_prpsinfo32_ugid16]
1246 (elf_backend_linux_prpsinfo32_ugid16): Define.
1247 (elfNN_bed): Initialize `linux_prpsinfo32_ugid16' member.
1248 * elf.c (elfcore_write_linux_prpsinfo32): Handle both variants
1249 of the 32-bit Linux core PRPSINFO note.
1250 * elf32-am33lin.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1251 * elf32-arm.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1252 * elf32-cris.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1253 * elf32-frv.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1254 * elf32-i386.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1255 * elf32-m32r.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1256 * elf32-m68k.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1257 * elf32-s390.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1258 * elf32-sh.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1259 * elf32-sparc.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1260
72bc1bb9
MR
12612017-10-11 Maciej W. Rozycki <macro@imgtec.com>
1262
1263 * elf-linux-core.h (elf_external_linux_prpsinfo64): Move the
1264 `gap' member ahead of `pr_flag'.
1265
8f314ad5
PA
12662017-10-11 Pedro Alves <palves@redhat.com>
1267
1268 * bfd.c (_doprnt): Rename to ...
1269 (_bfd_doprnt): ... this.
1270 (error_handler_internal): Adjust.
1271
0f09b4d8
L
12722017-10-10 H.J. Lu <hongjiu.lu@intel.com>
1273
1274 * elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
1275 instead of incrementing it.
1276 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1277
6c699715
RL
12782017-10-10 Renlin Li <renlin.li@arm.com>
1279
1280 PR ld/21402
1281 * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
1282 symbols into dynamic.
1283
fc3c5343
L
12842017-10-09 H.J. Lu <hongjiu.lu@intel.com>
1285
1286 PR ld/22274
1287 * elfnn-riscv.c (riscv_elf_link_hash_table): Add max_alignment.
1288 (riscv_elf_link_hash_table_create): Initialize max_alignment to
1289 (bfd_vma) -1.
1290 (_bfd_riscv_relax_section): Cache the max alignment of output
1291 sections if possible.
1292
b9399fcf
AM
12932017-10-10 Alan Modra <amodra@gmail.com>
1294
1295 * elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
1296 .opd whenever .opd is present and non-zero size. Move code
1297 setting abiversion to/from output file earlier. Only set
1298 u.opd.func_sec when --gc-sections. Read relocs and set up
1299 u.opd.func_sec values here..
1300 (ppc64_elf_check_relocs): ..rather than here. Simplify opd
1301 section tests.
1302 (ppc64_elf_edit_opd): Don't set sec_type for .opd here.
1303
478c006f
L
13042017-10-09 H.J. Lu <hongjiu.lu@intel.com>
1305
1306 * elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
1307 isymbuf.
1308
9d45a7de
L
13092017-10-09 H.J. Lu <hongjiu.lu@intel.com>
1310
1311 * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
1312 .interp section with "ld --no-dynamic-linker".
1313
b55ec8b6
AM
13142017-10-09 Alan Modra <amodra@gmail.com>
1315
1316 PR 22212
1317 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
1318 funcinfo_hash_table and varinfo_hash_table.
1319
a72f95f7
L
13202017-10-08 H.J. Lu <hongjiu.lu@intel.com>
1321
1322 * elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation
1323 in read-only section with minfo.
1324 (sh_elf_size_dynamic_sections): Likewise.
1325
f9799aae
L
13262017-10-08 H.J. Lu <hongjiu.lu@intel.com>
1327
1328 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Remove
1329 a strayed comment.
1330
4c7236d3
L
13312017-10-08 H.J. Lu <hongjiu.lu@intel.com>
1332
1333 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
1334 this_hdr.sh_entsize only if section size > 0.
1335
70090aa5
L
13362017-10-08 H.J. Lu <hongjiu.lu@intel.com>
1337
1338 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Reformat.
1339
f0f07ad1
L
13402017-10-07 H.J. Lu <hongjiu.lu@intel.com>
1341
1342 * elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
1343 in read-only section with minfo.
1344 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
1345
99180bcc
L
13462017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1347
1348 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
1349 comments.
1350
544c67cd
JB
13512017-10-06 John Baldwin <jhb@FreeBSD.org>
1352
1353 * elf-bfd.h (struct elf_backend_data): Add
1354 `elf_backend_grok_freebsd_prstatus'.
1355 * elf.c (elfcore_grok_freebsd_note): Call
1356 `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if
1357 present.
1358 * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New
1359 function.
1360 (elf_backend_grok_freebsd_prstatus): Define.
1361 * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define.
1362 (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
1363
98b273dc
L
13642017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1365
1366 * elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
1367 and has_non_got_reloc with zero_undefweak.
1368 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1369 * elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
1370 zero_undefweak to 1.
1371 (_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
1372 has_non_got_reloc with zero_undefweak.
1373 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
1374 has_got_reloc and has_non_got_reloc with zero_undefweak.
1375 (elf_x86_link_hash_entry): Likewise.
1376
e0d8f431
L
13772017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1378
1379 * elfxx-x86.h (COPY_INPUT_RELOC_P): Add "do/while(0);".
1380 (VERIFY_COPY_RELOC): Likewise.
1381
ff38b4cc
L
13822017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1383
1384 * elfxx-x86.h (VERIFY_COPY_RELOC): New.
1385 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
1386 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1387
f3180fa9
L
13882017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1389
1390 * elfxx-x86.h (VERIFY_PLT_ENTRY): New.
1391 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
1392 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1393
e74399c4
L
13942017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1395
1396 * elfxx-x86.h (COPY_INPUT_RELOC_P): New.
1397 * elf32-i386.c (elf_i386_relocate_section): Use it.
1398 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1399
aebcc8ff
L
14002017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1401
1402 * elf32-i386.c (X86_SIZE_TYPE_P): New.
1403 (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
1404 * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
1405 (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
1406 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
1407
cf1070f1
L
14082017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1409
1410 * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
1411 (PLT_LOCAL_IFUNC_P): Likewise.
1412 * elf32-i386.c (elf_i386_relocate_section): Use them.
1413 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1414
f70656b2
L
14152017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1416
1417 * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
1418 * elf32-i386.c (elf_i386_relocate_section): Use it.
1419 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1420
1f92404c
L
14212017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1422
1423 * elfxx-x86.h (RESOLVED_LOCALLY_P): New.
1424 * elf32-i386.c (elf_i386_relocate_section): Use it.
1425 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1426
daf1c414
L
14272017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1428
1429 * elf32-i386.c (X86_PCREL_TYPE_P): New.
1430 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
1431 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
1432 (X86_PCREL_TYPE_P): This.
1433 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
1434 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
1435 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
1436 X86_PCREL_TYPE_P.
1437 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
1438
51537393
L
14392017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1440
1441 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
1442 * elf32-i386.c (elf_i386_tls_transition): Use it.
1443 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1444
0caf6c82
L
14452017-10-05 H.J. Lu <hongjiu.lu@intel.com>
1446
1447 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
1448 Dump dynamic relocation in read-only section with minfo if
1449 needed.
1450 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
1451 (maybe_set_textrel): Likewise.
1452 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
1453 read-only section with minfo.
1454
6d5be5d6
JB
14552017-10-05 John Baldwin <jhb@FreeBSD.org>
1456
1457 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
1458
007873f5
L
14592017-10-05 H.J. Lu <hongjiu.lu@intel.com>
1460
1461 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
1462 in read-only section with minfo.
1463 (tilepro_elf_size_dynamic_sections): Likewise.
1464 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
1465 (tilegx_elf_size_dynamic_sections): Likewise.
1466
2ca7de37
PA
14672017-10-05 Pedro Alves <palves@redhat.com>
1468
1469 PR 22245
1470 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
1471 ellipsis parameter. Split out bfd_error_on_input code to..
1472 (bfd_set_input_error): .. New function.
1473 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
1474 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
1475 * bfd-in2.h: Regenerate.
1476
8c6716e5
AM
14772017-10-05 Alan Modra <amodra@gmail.com>
1478
1479 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
1480 fini_array error value.
1481
db4677b8
AM
14822017-10-05 Alan Modra <amodra@gmail.com>
1483
1484 PR 21167
1485 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
1486 groups.
1487 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
1488 flag from section.
1489 (elf_fake_sections): Adjust calls. Exit immediately on failure.
1490 (bfd_elf_set_group_contents): Add associated reloc section indices
1491 to group contents.
1492
a5259595
AM
14932017-10-04 Alan Modra <amodra@gmail.com>
1494
1495 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
1496 classify symbols for ELFv2.
1497
9ba5f27c
PK
14982017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
1499
1500 PR 22245
1501 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
1502 undergoes default promotion.
1503 * bfd-in2.h: Regenerate.
1504
dcd2b8a0
AM
15052017-10-02 Alan Modra <amodra@gmail.com>
1506
1507 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
1508 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1509
20230942
AM
15102017-10-01 Alan Modra <amodra@gmail.com>
1511
1512 PR 21957
1513 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
1514 (add_line_info): Always put end_sequence last.
1515
4b04bba2
AM
15162017-10-01 Alan Modra <amodra@gmail.com>
1517
1518 PR 22047
1519 * dwarf2.c (read_section): Allocate buffer with extra byte for
1520 bfd_simple_get_relocated_section_contents rather than copying
1521 afterwards.
1522
f6ac8c52
AM
15232017-09-29 Alan Modra <amodra@gmail.com>
1524
1525 * merge.c (merge_strings): Return FALSE on malloc failure.
1526 (_bfd_merge_sections): Return failures from record_section and
1527 merge_strings.
1528
1a3b5c34
AM
15292017-09-28 Alan Modra <amodra@gmail.com>
1530
1531 PR 22220
1532 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
1533 a case where plugin_notice isn't called.
1534
cd28e7aa
KLC
15352017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1536
1537 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
1538 comparison.
1539
ac69a0d7
L
15402017-09-26 H.J. Lu <hongjiu.lu@intel.com>
1541
1542 PR ld/22199
1543 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
1544 output_bfd to info->callbacks->minfo.
1545
262c0a87
NC
15462017-09-26 Nick Clifton <nickc@redhat.com>
1547
1548 PR 22172
1549 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
1550 assertion failure if elf_x86_64_rtype_to_howto has already issued
1551 an error message.
1552
33e0a9a0
AM
15532017-09-26 Alan Modra <amodra@gmail.com>
1554
1555 PR 22210
1556 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
1557 read data.
1558
30d0157a
NC
15592017-09-26 Nick Clifton <nickc@redhat.com>
1560
1561 PR 22210
1562 * dwarf2.c (read_formatted_entries): Fail early if we know that
1563 the loop parsing data entries will overflow the end of the
1564 section.
1565
1b86808a
AM
15662017-09-26 Alan Modra <amodra@gmail.com>
1567
1568 PR 22209
1569 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
1570 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
1571 to stash->info_ptr_memory, and check die_ref is within that memory.
1572 Set info_ptr_end correctly when another CU is refd. Check die_ref
1573 for DW_FORM_ref4 etc. is within CU.
1574
a54018b7
AM
15752017-09-26 Alan Modra <amodra@gmail.com>
1576
1577 PR 22205
1578 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
1579 (read_formatted_entries): Init "fe".
1580 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
1581
e338894d
AM
15822017-09-26 Alan Modra <amodra@gmail.com>
1583
1584 PR 22204
1585 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
1586 bounds in inner loop.
1587
1da5c9a4
AM
15882017-09-25 Alan Modra <amodra@gmail.com>
1589
1590 PR 22202
1591 * dwarf1.c (parse_die): Sanity check pointer against section limit
1592 before dereferencing.
1593 (parse_line_table): Likewise.
1594
11855d8a
AM
15952017-09-25 Alan Modra <amodra@gmail.com>
1596
1597 PR 22201
1598 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
1599 has string form.
1600 (parse_comp_unit): Likewise.
1601
c361faae
AM
16022017-09-25 Alan Modra <amodra@gmail.com>
1603
1604 PR 22200
1605 * dwarf2.c (read_formatted_entries): Error on format_count zero.
1606
52b36c51
AM
16072017-09-24 Alan Modra <amodra@gmail.com>
1608
1609 PR 22197
1610 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
1611 within section bounds.
1612
a26a013f
AM
16132017-09-24 Alan Modra <amodra@gmail.com>
1614
1615 PR 22191
1616 * dwarf2.c (decode_line_info): Properly free line sequences on error.
1617
52a93b95
AM
16182017-09-24 Alan Modra <amodra@gmail.com>
1619
1620 PR 22187
1621 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
1622 pname param. Return status. Make name const. Don't abort,
1623 return an error. Formatting. Exit if current info_ptr matches
1624 orig_info_ptr. Update callers.
1625 (scan_unit_for_symbols): Start at nesting_level of zero. Make
1626 nested_funcs an array of structs for extensibility. Formatting.
1627
d8010d3e
AM
16282017-09-24 Alan Modra <amodra@gmail.com>
1629
1630 PR 22186
1631 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
1632 rather than dividing by zero.
1633
515f23e6
AM
16342017-09-24 Alan Modra <amodra@gmail.com>
1635
1636 PR 22169
1637 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
1638
0d76029f
AM
16392017-09-24 Alan Modra <amodra@gmail.com>
1640
1641 PR 22167
1642 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
1643
bd61e135
AM
16442017-09-24 Alan Modra <amodra@gmail.com>
1645
1646 PR 22166
1647 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
1648 SHT_GNU_verneed section for sanity. Don't zalloc memory for
1649 verref.
1650
61e3bf5f
L
16512017-09-22 H.J. Lu <hongjiu.lu@intel.com>
1652
1653 PR binutils/22170
1654 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
1655 corrupted PLT.
1656
b69e9267
L
16572017-09-22 H.J. Lu <hongjiu.lu@intel.com>
1658
59ca4c1b 1659 PR binutils/22163
b69e9267
L
1660 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
1661 -1 if bfd_canonicalize_dynamic_reloc returns 0.
1662
b877d21f
PA
16632017-09-22 Pedro Alves <palves@redhat.com>
1664 Alan Modra <amodra@gmail.com>
1665
1666 * version.h: Add comment.
1667
8fe09d74
AA
16682017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1669
1670 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
1671 NT_S390_GS_BC, correct the previously swapped invocations of
1672 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
1673
25516cc5
AM
16742017-09-19 Alan Modra <amodra@gmail.com>
1675
1676 PR 21441
1677 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
1678 size.
1679
3d13f3e9
AM
16802017-09-19 Alan Modra <amodra@gmail.com>
1681
1682 PR 22150
1683 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
1684 symbols before calculating verrefs. Don't renumber dynsyms
1685 after gc. Exclude .gnu.version when zero or one dynsym.
1686 Localize some vars and reindent.
1687
94670f6c
L
16882017-09-18 H.J. Lu <hongjiu.lu@intel.com>
1689
1690 PR ld/22148
1691 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
1692 return from bfd_canonicalize_dynamic_reloc.
1693
21d0a606
AM
16942017-09-15 Alan Modra <amodra@gmail.com>
1695
1696 PR 22116
1697 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
1698 overflows bfd_size_type.
1699
5e5e02ae
L
17002017-09-14 H.J. Lu <hongjiu.lu@intel.com>
1701
1702 PR ld/22135
1703 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
1704 to indicate if conversion is performed.
1705 (elf_i386_check_relocs): Cache section contents and relocations
1706 if conversion is performed.
1707 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
1708 contents and relocations if conversion is performed.
1709
4d465c68
NC
17102017-09-14 Nick Clifton <nickc@redhat.com>
1711
1712 PR binutils/22113
1713 * peXXigen.c (pe_print_idata): Extend check for HintName vector
1714 entries.
1715
f47432d4
L
17162017-09-13 H.J. Lu <hongjiu.lu@intel.com>
1717
1718 * elfxx-x86.h: Fix a typo in comments.
1719
4ec521f2
KLC
17202017-09-09 Kamil Rytarowski <n54@gmx.com>
1721
1722 * elf32-nds32.c: Rename __BIT() to N32_BIT().
1723
2420fff6
AM
17242017-09-09 Alan Modra <amodra@gmail.com>
1725
1726 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
1727 plt_stub_align.
1728
c5bce5c6
L
17292017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1730
1731 * elf32-i386.c (elf_i386_relocate_section): Update usage of
1732 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1733 (elf_i386_finish_dynamic_symbol): Likewise.
1734 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1735 (elf_x86_64_finish_dynamic_symbol): Likewise.
1736 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
1737 (_bfd_x86_elf_fixup_symbol): Likewise.
1738
8fbf0ba1
L
17392017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1740
1741 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1742 check has_non_got_reloc.
1743
0a27fed7
L
17442017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1745
1746 PR ld/22115
1747 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
1748 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1749 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
1750 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1751 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
1752 and linker_def on __ehdr_start if it is referenced and not
1753 defined.
1754 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
1755 and return TRUE when building executable, if a symbol has
1756 non-GOT/non-PLT relocations in text section or there is no
1757 dynamic linker.
1758 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
1759
c7df954f
L
17602017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1761
1762 * elfxx-x86.h: Update comments.
1763
1de031c8
L
17642017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1765
1766 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
1767 elf_x86_plt_layout_table with elf_x86_init_table.
1768 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1769 Likewise.
1770 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
1771 Likewise.
1772 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
1773 (elf_x86_init_table): This.
1774 (_bfd_x86_elf_link_setup_gnu_properties): Replace
1775 elf_x86_plt_layout_table with elf_x86_init_table.
1776
7a382c1c
L
17772017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1778
1779 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
1780 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
1781 * configure: Regenerated.
1782 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
1783 and r_sym fields of plt_layout.
1784 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1785 Likewise.
1786 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
1787 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
1788 r_info nor r_sym fields.
1789 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
1790 fields of htab.
1791 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
1792
9eb7b0ac
PD
17932017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1794
1795 * (_bfd_riscv_relax_align): Call bfd_set_error and
1796 print an error message when unable to relax a .align directive.
1797
b1308d2c
PD
17982017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1799
1800 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
1801 (riscv_record_pcrel_hi_reloc): Add absolute argument.
1802 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
1803 R_RISCV_PCREL_HI20 relocs, and pass the result to
1804 riscv_record_pcrel_hi_reloc.
1805
6999821f
L
18062017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1807
1808 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
1809 r_type_p. Remove the converted argument. Replace
1810 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
1811 the new relocation type via r_type_p.
1812 (elf_i386_relocate_section): Likewise.
1813 (elf_i386_finish_dynamic_symbol): Likewise.
1814 (need_convert_load): Removed.
1815 (check_relocs_failed): Updated.
1816 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
1817 instead of setting need_convert_load.
1818 (_bfd_i386_elf_convert_load): Removed.
1819 * elf64-x86-64.c (need_convert_load): Removed.
1820 (check_relocs_failed): Updated.
1821 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
1822 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
1823 Return the new relocation type via r_type_p.
1824 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
1825 instead of setting need_convert_load.
1826 (elf_x86_64_check_relocs): Don't check PIC if relocation has
1827 been converted.
1828 (_bfd_x86_64_elf_convert_load): Removed.
1829 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
1830 with SYMBOL_REFERENCES_LOCAL_P.
1831 (elf_x86_64_finish_dynamic_symbol): Likewise.
1832 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
1833 set convert_load.
1834 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
1835 (_bfd_x86_elf_link_symbol_references_local): New function.
1836 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
1837 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
1838 SYMBOL_REFERENCES_LOCAL_P.
1839 (elf_x86_link_hash_entry): Add local_ref.
1840 (elf_x86_link_hash_table): Remove convert_load.
1841 (_bfd_i386_elf_convert_load): Removed.
1842 (_bfd_x86_64_elf_convert_load): Likewise.
1843 (_bfd_x86_elf_link_symbol_references_local): New.
1844
78984959
L
18452017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1846
1847 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
1848 (elf_x86_64_info_to_howto): Get the real relocation type by
1849 masking out R_X86_64_converted_reloc_bit.
1850 (elf_x86_64_check_tls_transition): Get the real relocation type
1851 by masking out R_X86_64_converted_reloc_bit.
1852 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
1853 instead of setting converted_reloc.
1854 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
1855 instead of converted_reloc. Get the real relocation type by
1856 masking out R_X86_64_converted_reloc_bit.
1857 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
1858 R_X86_64_converted_reloc_bit is valid.
1859 * elfxx-x86.h (converted_reloc): Removed.
1860
419414ea
L
18612017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1862
1863 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
1864 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
1865 to get the relocation type again.
1866 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
1867 r_type when calling elf_x86_64_tls_transition. Don't use
1868 ELF32_R_TYPE to get the relocation type again.
1869
dc089072
L
18702017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1871
1872 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
1873 converted_reloc.
1874
8b43e456
L
18752017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1876
1877 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
1878 argument. Don't check relocation overflow. Avoid relocation
1879 overflow if --no-relax is used. Set converted_reloc on symbol
1880 if a GOTPCREL relocation is converted.
1881 (elf_x86_64_relocate_section): Issue a fatal error and suggest
1882 --no-relax if GOTPCREL relocation conversion leads to relocation
1883 overflow.
1884 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
1885
83eef883
AFB
18862017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
1887 Edmar Wienskoski <edmar.wienskoski@nxp.com
1888
1889 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
1890 (ppc_elf_check_relocs): Handle it.
1891 (ppc_elf_vle_split20): New function.
1892 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
1893
0e30d991
L
18942017-09-03 H.J. Lu <hongjiu.lu@intel.com>
1895
1896 PR ld/22071
1897 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
1898 for x86-64 if GOT_TLS_GDESC_P is true.
1899
1cf58434
AM
19002017-09-03 Alan Modra <amodra@gmail.com>
1901
1902 PR 22067
1903 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
1904
f04bdfa7
L
19052017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1906
1907 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1908 tls_get_addr for x86-64 in one place.
1909
2ac3a7f5
L
19102017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1911
1912 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
1913 with elfxx-x86.lo for 64-bit BFD.
1914 * configure: Regenerated.
1915
d47a8026
L
19162017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1917
1918 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
1919 (_bfd_i386_elf_convert_load): This. Remove static.
1920 (elf_i386_size_dynamic_sections): Removed.
1921 (elf_backend_size_dynamic_sections): Likewise.
1922 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
1923 (_bfd_x86_64_elf_convert_load): This. Remove static.
1924 (elf_x86_64_size_dynamic_sections): Removed.
1925 (elf_backend_size_dynamic_sections): Likewise.
1926 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
1927 (elf_x86_allocate_dynrelocs): This. Make it static.
1928 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
1929 (elf_x86_allocate_local_dynreloc): This. Make it static.
1930 (elf_i386_is_reloc_section): New function.
1931 (elf_x86_64_is_reloc_section): Likewise.
1932 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
1933 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1934 Rearrange got_entry_size initialization.
1935 (_bfd_x86_elf_size_dynamic_sections): New function.
1936 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
1937 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1938 (_bfd_i386_elf_convert_load): New.
1939 (_bfd_x86_64_elf_convert_load): Likewise.
1940 (_bfd_x86_elf_size_dynamic_sections): Likewise.
1941 (elf_backend_size_dynamic_sections): Likewise.
1942 (_bfd_x86_elf_allocate_dynrelocs): Removed.
1943 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1944
2926eb2c
L
19452017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1946
1947 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
1948 update comments.
1949
92c10f5f
L
19502017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1951
1952 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1953 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
1954
aa595247
L
19552017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1956
1957 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1958 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
1959 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1960 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
1961 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1962 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
1963
b9ce864c
L
19642017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1965
1966 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
1967 (elf_i386_allocate_local_dynrelocs): Likewise.
1968 (elf_i386_size_dynamic_sections): Replace
1969 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
1970 with _bfd_x86_elf_allocate_dynrelocs and
1971 _bfd_x86_elf_allocate_local_dynrelocs.
1972 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
1973 (elf_x86_64_allocate_local_dynrelocs): Likewise.
1974 (elf_x86_64_size_dynamic_sections): Replace
1975 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
1976 with _bfd_x86_elf_allocate_dynrelocs and
1977 _bfd_x86_elf_allocate_local_dynrelocs.
1978 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
1979 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1980 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
1981 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1982
fe53b4a4
L
19832017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1984
1985 * elf32-i386.c (is_i386_elf): Removed.
1986 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
1987 (elf_i386_size_dynamic_sections): Likewise.
1988 (elf_i386_relocate_section): Likewise.
1989 * elf64-x86-64.c (is_x86_64_elf): Removed.
1990 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
1991 is_x86_elf.
1992 (elf_x86_64_size_dynamic_sections): Likewise.
1993 (elf_x86_64_relocate_section): Likewise.
1994 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1995 target_id.
1996 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
1997 (is_x86_elf): New.
1998
9ff114ca
L
19992017-09-02 H.J. Lu <hongjiu.lu@intel.com>
2000
2001 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
2002 (elf_i386_allocate_dynrelocs): Replace
2003 elf_i386_compute_jump_table_size with
2004 elf_x86_compute_jump_table_size.
2005 (elf_i386_size_dynamic_sections): Likewise.
2006 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
2007 (elf_x86_64_allocate_dynrelocs): Replace
2008 elf_x86_64_compute_jump_table_size with
2009 elf_x86_compute_jump_table_size.
2010 (elf_x86_64_size_dynamic_sections): Likewise.
2011 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
2012 got_entry_size.
2013 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
2014 (elf_x86_compute_jump_table_size): New.
2015
503294e7
L
20162017-09-02 H.J. Lu <hongjiu.lu@intel.com>
2017
2018 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
2019 sizeof_reloc.
2020 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
2021 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
2022
9a742a90
L
20232017-09-02 H.J. Lu <hongjiu.lu@intel.com>
2024
2025 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
2026 with htab->is_vxworks.
2027 (elf_i386_size_dynamic_sections): Likewise.
2028 (elf_i386_relocate_section): Likewise.
2029 (elf_i386_finish_dynamic_symbol): Likewise.
2030 (elf_i386_finish_dynamic_sections): Likewise.
2031
6b9553e2
L
20322017-09-02 H.J. Lu <hongjiu.lu@intel.com>
2033
2034 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
2035 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
2036 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
2037 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
2038 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
2039 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
2040 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
2041 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
2042
ad71ce8d
L
20432017-09-01 H.J. Lu <hongjiu.lu@intel.com>
2044
2045 PR ld/22064
2046 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
2047 ELF_COMMON_DEF_P for common symbols.
2048
96d01d93
AM
20492017-09-02 Alan Modra <amodra@gmail.com>
2050
2051 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
2052 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
2053 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
2054
4f501a24
L
20552017-09-01 H.J. Lu <hongjiu.lu@intel.com>
2056
2057 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
2058 (elf_backend_gc_mark_hook): Likewise.
2059 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
2060 (elf_backend_gc_mark_hook): Likewise.
2061 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
2062 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
2063 (elf_backend_gc_mark_hook): Likewise.
2064
eeb2f20a
L
20652017-09-01 H.J. Lu <hongjiu.lu@intel.com>
2066
2067 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
2068 (elf_backend_adjust_dynamic_symbol): Likewise.
2069 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
2070 (elf_backend_adjust_dynamic_symbol): Likewise.
2071 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
2072 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
2073 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
2074 (_bfd_x86_elf_adjust_dynamic_symbol): New.
2075 (elf_backend_adjust_dynamic_symbol): Likewise.
2076
c6295c22
L
20772017-09-01 H.J. Lu <hongjiu.lu@intel.com>
2078
2079 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
2080 comments.
2081
39946cc2
L
20822017-09-01 H.J. Lu <hongjiu.lu@intel.com>
2083
2084 * elf32-i386.c (elf_i386_mkobject): Removed.
2085 (bfd_elf32_mkobject): Likewise.
2086 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
2087 (bfd_elf64_mkobject): Likewise.
2088 (bfd_elf32_mkobject): Likewise.
2089 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
18da07cd 2090 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
39946cc2
L
2091 (bfd_elf64_mkobject): Likewise.
2092 (bfd_elf32_mkobject): Likewise.
2093
a6798bab
L
20942017-09-01 H.J. Lu <hongjiu.lu@intel.com>
2095
2096 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
2097 Call _bfd_x86_elf_link_setup_gnu_properties.
2098 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
2099 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
2100 entries.
2101 (elf_x86_64_non_lazy_plt): Likewise.
2102 (elf_x86_64_lazy_bnd_plt): Likewise.
2103 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2104 (elf_x86_64_lazy_ibt_plt): Likewise.
2105 (elf_x32_lazy_ibt_plt): Likewise.
2106 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2107 (elf_x32_non_lazy_ibt_plt): Likewise.
2108 (elf_x86_64_nacl_plt): Likewise.
2109 (elf_x86_64_link_setup_gnu_properties): Updated. Call
2110 _bfd_x86_elf_link_setup_gnu_properties.
2111 * elfxx-x86.c: Include elf-vxworks.h".
2112 (_bfd_x86_elf_link_setup_gnu_properties): New function.
2113 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
2114 comments for pic_plt0_entry and pic_plt_entry.
2115 (elf_x86_non_lazy_plt_layout): Likewise.
2116 (elf_x86_plt_layout_table): New.
2117 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
2118
e10c9c62
L
21192017-09-01 H.J. Lu <hongjiu.lu@intel.com>
2120
2121 PR ld/22061
2122 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
2123 .eh_frame section for the second PLT.
2124 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
2125 alignment of .eh_frame section for the second PLT.
2126
7e8b6008
NC
21272017-09-01 Nick Clifton <nickc@redhat.com>
2128
2129 PR 22059
2130 * dwarf2.c (decode_line_info): Fix test for an overlong line info
2131 structure.
2132
2a143b99
NC
21332017-09-01 Nick Clifton <nickc@redhat.com>
2134
2135 PR 22058
2136 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
2137 attribute buffer is NUL terminated.
2138
e4f27230
NC
21392017-08-31 Nick Clifton <nickc@redhat.com>
2140
2141 PR 22047
2142 * dwarf2.c (read_section): If necessary add a terminating NUL byte
2143 to dwarf string sections.
2144
686335cd
AM
21452017-08-31 Alan Modra <amodra@gmail.com>
2146
2147 * po/SRC-POTFILES.in: Regenerate.
2148
9866ffe2
AM
21492017-08-31 Alan Modra <amodra@gmail.com>
2150
2151 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
2152 for a section containing just a terminator. Allow multiple
2153 terminators at end of section.
2154 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
2155 sections when not adding alignment. Assert on terminator in
2156 the middle of FDEs.
2157
af471f82
AM
21582017-08-31 Alan Modra <amodra@gmail.com>
2159
2160 PR 21441
2161 PR 22048
2162 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
2163 terminators.
2164
3321e42b
L
21652017-08-30 H.J. Lu <hongjiu.lu@intel.com>
2166
2167 * configure.ac (bfd_backends): Add elf64.lo together with
2168 elfxx-x86.lo for 64-bit BFD.
2169 * configure: Regenerated.
2170
ef32532f
JB
21712017-08-31 James Bowman <james.bowman@ftdichip.com>
2172
2173 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
2174 for R_FT32_18.
2175
e234de6b
AM
21762017-08-31 Alan Modra <amodra@gmail.com>
2177
2178 PR binutils/22032
2179 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
2180 before _close_and_cleanup. Call iovec->bclose after.
2181 (bfd_close): Remove code common to, and call, bfd_close_all_done.
2182
f493882d
L
21832017-08-30 H.J. Lu <hongjiu.lu@intel.com>
2184
2185 * elf32-i386.c (elf_i386_plt_type): Removed.
2186 (elf_i386_plt): Likewise.
2187 (elf_i386_get_synthetic_symtab): Updated. Call
2188 _bfd_x86_elf_get_synthetic_symtab.
2189 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
2190 (elf_x86_64_plt): Likewise.
2191 (elf_x86_64_get_synthetic_symtab): Updated. Call
2192 _bfd_x86_elf_get_synthetic_symtab.
2193 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
2194 (elf_x86_64_get_plt_got_vma): Likewise.
2195 (elf_i386_valid_plt_reloc_p): Likewise.
2196 (elf_x86_64_valid_plt_reloc_p): Likewise.
2197 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
2198 * elfxx-x86.h (elf_x86_plt_type): New.
2199 (elf_x86_plt): Likewise.
2200 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
2201
5b86dbf4
L
22022017-08-30 H.J. Lu <hongjiu.lu@intel.com>
2203
2204 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
2205 target_id instead of elf_machine_code.
2206
765e526c
L
22072017-08-30 H.J. Lu <hongjiu.lu@intel.com>
2208
2209 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
2210 (elf_i386_lazy_plt_layout): Likewise.
2211 (elf_i386_non_lazy_plt_layout): Likewise.
2212 (elf_i386_plt_layout): Likewise.
2213 (elf_i386_link_hash_table): Likewise.
2214 (elf_i386_next_tls_desc_index): Likewise.
2215 (elf_i386_srelplt2): Likewise.
2216 (elf_i386_plt): Likewise.
2217 (elf_i386_lazy_plt): Likewise.
2218 (elf_i386_non_lazy_plt): Likewise.
2219 (elf_i386_link_hash_table_create): Likewise.
2220 (bfd_elf32_bfd_link_hash_table_create): Likewise.
2221 (elf_i386_lazy_plt): Updated.
2222 (elf_i386_non_lazy_plt): Likewise.
2223 (elf_i386_lazy_ibt_plt): Likewise.
2224 (elf_i386_non_lazy_ibt_plt): Likewise.
2225 (elf_i386_allocate_dynrelocs): Likewise.
2226 (elf_i386_size_dynamic_sections): Likewise.
2227 (elf_i386_relocate_section): Likewise.
2228 (elf_i386_finish_dynamic_symbol): Likewise.
2229 (elf_i386_finish_dynamic_sections): Likewise.
2230 (elf_i386_get_synthetic_symtab): Likewise.
2231 (elf_i386_link_setup_gnu_properties): Likewise.
2232 (elf_i386_nacl_plt): Likewise.
2233 * elf64-x86-64.c (ABI_64_P): Removed.
2234 (ELF64_DYNAMIC_INTERPRETER): Likewise.
2235 (ELF32_DYNAMIC_INTERPRETER): Likewise.
2236 (elf_x86_64_lazy_plt_layout): Likewise.
2237 (elf_x86_64_non_lazy_plt_layout): Likewise.
2238 (elf_x86_64_plt_layout): Likewise.
2239 (elf_x86_64_link_hash_table): Likewise.
2240 (elf_x86_64_plt): Likewise.
2241 (elf_x86_64_lazy_plt): Likewise.
2242 (elf_x86_64_non_lazy_plt): Likewise.
2243 (elf_x86_64_link_hash_table_create): Likewise.
2244 (bfd_elf64_bfd_link_hash_table_create): Likewise.
2245 (bfd_elf32_bfd_link_hash_table_create): Likewise.
2246 (elf_x86_64_lazy_plt): Updated.
2247 (elf_x86_64_non_lazy_plt): Likewise.
2248 (elf_x86_64_lazy_bnd_plt): Likewise.
2249 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2250 (elf_x86_64_lazy_ibt_plt): Likewise.
2251 (elf_x32_lazy_ibt_plt): Likewise.
2252 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2253 (elf_x32_non_lazy_ibt_plt): Likewise.
2254 (elf_x86_64_allocate_dynrelocs): Likewise.
2255 (elf_x86_64_size_dynamic_sections): Likewise.
2256 (elf_x86_64_relocate_section): Likewise.
2257 (elf_x86_64_finish_dynamic_symbol): Likewise.
2258 (elf_x86_64_finish_dynamic_sections): Likewise.
2259 (elf_x86_64_get_synthetic_symtab): Likewise.
2260 (elf_x86_64_link_setup_gnu_properties): Likewise.
2261 (elf_x86_64_nacl_plt): Likewise.
2262 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
2263 "elf/x86-64.h".
2264 (ELF32_DYNAMIC_INTERPRETER): New.
2265 (ELF64_DYNAMIC_INTERPRETER): Likewise.
2266 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
2267 (_bfd_x86_elf_link_hash_table_create): Likewise.
2268 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
2269 (elf_x86_link_hash_table_free): This. Make it static.
2270 * elfxx-x86.h: Don't include "objalloc.h".
2271 (ABI_64_P): New.
2272 (elf_x86_lazy_plt_layout): Likewise.
2273 (elf_x86_non_lazy_plt_layout): Likewise.
2274 (elf_x86_plt_layout): Likewise.
2275 (_bfd_x86_elf_link_hash_table_create): Likewise.
2276 (bfd_elf64_bfd_link_hash_table_create): Likewise.
2277 (bfd_elf32_bfd_link_hash_table_create): Likewise.
2278 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
2279 srelplt2 and next_tls_desc_index.
2280 (_bfd_x86_elf_link_hash_table_free): Removed.
2281
70e65ca8
MR
22822017-08-30 Maciej W. Rozycki <macro@imgtec.com>
2283
2284 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
2285 branch offset interpretation.
2286
7c0ed396
L
22872017-08-30 H.J. Lu <hongjiu.lu@intel.com>
2288
2289 PR binutils/22032
2290 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
2291
0f2425c4
L
22922017-08-30 H.J. Lu <hongjiu.lu@intel.com>
2293
2294 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
2295 (elf_x86_64_srelplt2): Likewise.
2296
9a23f96e
AM
22972017-08-30 Alan Modra <amodra@gmail.com>
2298
2299 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
2300 (ppc64_elf_tls_optimize): Set it.
2301 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
2302 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
2303 addis would add zero.
2304 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
2305 (ppc_elf_tls_optimize): Set it.
2306 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
2307 insn on TPREL16_LO relocs to use r2 when addis would add zero.
2308
b9f04fe0
AM
23092017-08-30 Alan Modra <amodra@gmail.com>
2310
2311 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
2312 __tls_get_addr call sequences to LE, don't move the addi down
2313 to the nop. Replace the bl with addi and leave the nop alone.
2314
5f0f0847
L
23152017-08-29 H.J. Lu <hongjiu.lu@intel.com>
2316
2317 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
2318 Re-indent.
2319 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
2320 Likewise.
2321 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
2322
443701f5
L
23232017-08-29 H.J. Lu <hongjiu.lu@intel.com>
2324
2325 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
2326 (BFD64_BACKENDS): Likewise.
2327 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
2328 (BFD64_BACKENDS_CFILES): Likewise.
2329 * Makefile.in: Regenerated.
2330 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
2331 elf32-i386.lo and elf64-x86-64.lo.
2332 * configure: Regenerated.
2333 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
2334 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
2335 "objalloc.h" and "hashtab.h".
2336 (ELIMINATE_COPY_RELOCS): Removed.
2337 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
2338 (SYMBOL_NO_COPYRELOC): Likewise.
2339 (elf_i386_link_hash_entry): Likewise.
2340 (GOT_UNKNOWN): Likewise.
2341 (GOT_NORMAL): Likewise.
2342 (GOT_TLS_GD): Likewise.
2343 (elf_i386_hash_entry): Likewise.
2344 (elf_i386_obj_tdata): Likewise.
2345 (elf_i386_tdata): Likewise.
2346 (elf_i386_local_got_tls_type): Likewise.
2347 (elf_i386_local_tlsdesc_gotent): Likewise.
2348 (elf_i386_hash_table): Likewise.
2349 (elf_i386_link_hash_newfunc): Likewise.
2350 (elf_i386_local_htab_hash): Likewise.
2351 (elf_i386_local_htab_eq): Likewise.
2352 (elf_i386_get_local_sym_hash): Likewise.
2353 (elf_i386_link_hash_table_free): Likewise.
2354 (elf_i386_copy_indirect_symbol): Likewise.
2355 (elf_i386_fixup_symbol): Likewise.
2356 (elf_i386_readonly_dynrelocs): Likewise.
2357 (elf_i386_always_size_sections): Likewise.
2358 (elf_i386_set_tls_module_base): Likewise.
2359 (elf_i386_dtpoff_base): Likewise.
2360 (compare_relocs): Likewise.
2361 (elf_i386_hash_symbol): Likewise.
2362 (elf_i386_parse_gnu_properties): Likewise.
2363 (elf_i386_merge_gnu_properties): Likewise.
2364 (elf_i386_link_check_relocs): Likewise.
2365 (elf_i386_merge_symbol_attribute): Likewise.
2366 (bfd_elf32_bfd_link_check_relocs): Likewise.
2367 (elf_backend_copy_indirect_symbol): Likewise.
2368 (elf_backend_always_size_sections): Likewise.
2369 (elf_backend_omit_section_dynsym): Likewise.
2370 (elf_backend_hash_symbol): Likewise.
2371 (elf_backend_fixup_symbol): Likewise.
2372 (elf_backend_parse_gnu_properties): Likewise.
2373 (elf_backend_merge_gnu_properties): Likewise.
2374 (elf_backend_merge_symbol_attribute): Likewise.
2375 (elf_i386_mkobject): Updated.
2376 (elf_i386_link_hash_table_create): Likewise.
2377 (elf_i386_check_tls_transition): Likewise.
2378 (elf_i386_tls_transition): Likewise.
2379 (elf_i386_convert_load_reloc): Likewise.
2380 (elf_i386_check_relocs): Likewise.
2381 (elf_i386_adjust_dynamic_symbol): Likewise.
2382 (elf_i386_allocate_dynrelocs): Likewise.
2383 (elf_i386_convert_load): Likewise.
2384 (elf_i386_size_dynamic_sections): Likewise.
2385 (elf_i386_relocate_section): Likewise.
2386 (elf_i386_finish_dynamic_symbol ): Likewise.
2387 (elf_i386_finish_dynamic_sections): Likewise.
2388 (elf_i386_output_arch_local_syms): Likewise.
2389 (elf_i386_get_synthetic_symtab): Likewise.
2390 (elf_i386_link_setup_gnu_properties): Likewise.
2391 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
2392 of elf_link_hash_table, as base.
2393 (elf_i386_next_tls_desc_index): New.
2394 (elf_i386_srelplt2): Likewise.
2395 (elf_i386_plt): Likewise.
2396 (elf_i386_lazy_plt): Likewise.
2397 (elf_i386_non_lazy_plt): Likewise.
2398 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
2399 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
2400 "objalloc.h" and "hashtab.h".
2401 (ELIMINATE_COPY_RELOCS): Removed.
2402 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
2403 (SYMBOL_NO_COPYRELOC): Likewise.
2404 (elf_x86_64_link_hash_entry): Likewise.
2405 (GOT_UNKNOWN): Likewise.
2406 (GOT_NORMAL): Likewise.
2407 (GOT_TLS_GD): Likewise.
2408 (elf_x86_64_hash_entry): Likewise.
2409 (elf_x86_64_obj_tdata): Likewise.
2410 (elf_x86_64_tdata): Likewise.
2411 (elf_x86_64_local_got_tls_type): Likewise.
2412 (elf_x86_64_local_tlsdesc_gotent): Likewise.
2413 (elf_x86_64_hash_table): Likewise.
2414 (elf_x86_64_link_hash_newfunc): Likewise.
2415 (elf_x86_64_local_htab_hash): Likewise.
2416 (elf_x86_64_local_htab_eq): Likewise.
2417 (elf_x86_64_get_local_sym_hash): Likewise.
2418 (elf_x86_64_link_hash_table_free): Likewise.
2419 (elf_x86_64_copy_indirect_symbol): Likewise.
2420 (elf_x86_64_fixup_symbol): Likewise.
2421 (elf_x86_64_readonly_dynrelocs): Likewise.
2422 (elf_x86_64_always_size_sections): Likewise.
2423 (elf_x86_64_set_tls_module_base): Likewise.
2424 (elf_x86_64_dtpoff_base): Likewise.
2425 (compare_relocs): Likewise.
2426 (elf_x86_64_merge_symbol_attribute): Likewise.
2427 (elf_x86_64_hash_symbol): Likewise.
2428 (elf_x86_64_parse_gnu_properties): Likewise.
2429 (elf_x86_64_merge_gnu_properties): Likewise.
2430 (elf_x86_64_link_check_relocs): Likewise.
2431 (elf_backend_copy_indirect_symbol): Likewise.
2432 (elf_backend_always_size_sections): Likewise.
2433 (bfd_elf64_bfd_link_check_relocs): Likewise.
2434 (elf_backend_merge_symbol_attribute): Likewise.
2435 (elf_backend_hash_symbol): Likewise.
2436 (elf_backend_omit_section_dynsym): Likewise.
2437 (elf_backend_fixup_symbol): Likewise.
2438 (elf_backend_parse_gnu_properties): Likewise.
2439 (elf_backend_merge_gnu_properties): Likewise.
2440 (bfd_elf32_bfd_link_check_relocs): Likewise.
2441 (elf_x86_64_mkobject): Updated.
2442 (elf_x86_64_link_hash_table_create): Likewise.
2443 (elf_x86_64_check_tls_transition): Likewise.
2444 (elf_x86_64_tls_transition): Likewise.
2445 (elf_x86_64_convert_load_reloc): Likewise.
2446 (elf_x86_64_check_relocs): Likewise.
2447 (elf_x86_64_adjust_dynamic_symbol): Likewise.
2448 (elf_x86_64_allocate_dynrelocs): Likewise.
2449 (elf_x86_64_convert_load): Likewise.
2450 (elf_x86_64_size_dynamic_sections): Likewise.
2451 (elf_x86_64_relocate_section): Likewise.
2452 (elf_x86_64_finish_dynamic_symbol ): Likewise.
2453 (elf_x86_64_finish_dynamic_sections): Likewise.
2454 (elf_x86_64_output_arch_local_syms): Likewise.
2455 (elf_x86_64_get_synthetic_symtab): Likewise.
2456 (elf_x86_64_link_setup_gnu_properties): Likewise.
2457 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
2458 instead of elf_link_hash_table, as base.
2459 (elf_x86_64_next_tls_desc_index): New.
2460 (elf_x86_64_srelplt2): Likewise.
2461 (elf_x86_64_plt): Likewise.
2462 (elf_x86_64_lazy_plt): Likewise.
2463 (elf_x86_64_non_lazy_plt): Likewise.
2464 * elfxx-x86.c: New file.
2465 * elfxx-x86.h: Likewise.
2466
823cb067
L
24672017-08-29 H.J. Lu <hongjiu.lu@intel.com>
2468
2469 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
2470 return.
2471 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2472
37c0b6ee
L
24732017-08-29 H.J. Lu <hongjiu.lu@intel.com>
2474
2475 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
2476 sections before checking dynamic relocations and free invalid
2477 PLT section contents.
2478 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2479
0fb0a767
L
24802017-08-28 H.J. Lu <hongjiu.lu@intel.com>
2481
2482 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
2483 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
2484
90efb642
L
24852017-08-28 H.J. Lu <hongjiu.lu@intel.com>
2486
2487 PR binutils/22018
2488 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
2489 PLT section size.
2490 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2491
596dc58f
L
24922017-08-27 H.J. Lu <hongjiu.lu@intel.com>
2493
2494 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
2495 def_protected.
2496 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
2497
a5b4ee94
L
24982017-08-26 H.J. Lu <hongjiu.lu@intel.com>
2499
2500 PR ld/21997
2501 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
2502 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
2503 Add a has_no_copy_on_protected bitfield.
2504 (elf_has_no_copy_on_protected): New.
2505 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
2506 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
2507 (elf_merge_gnu_property_list): Likewise.
2508 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
2509 to FALSE for elf_has_no_copy_on_protected.
2510 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
2511 (elf_i386_link_hash_entry): Add def_protected.
2512 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
2513 when checking info->nocopyreloc.
2514 (elf_i386_link_setup_gnu_properties): Don't set
2515 extern_protected_data here.
2516 (elf_i386_merge_symbol_attribute): New function.
2517 (elf_backend_merge_symbol_attribute): New.
2518 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
2519 (elf_x86_64_link_hash_entry): Add def_protected.
2520 (elf_x86_64_need_pic): Report protected symbol for def_protected.
2521 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
2522 when checking info->nocopyreloc.
2523 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
2524 relocation run-time overflow and unresolvable R_X86_64_32S
2525 relocation against protected data symbol defined in shared object
2526 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
2527 (elf_x86_64_link_setup_gnu_properties): Don't set
2528 extern_protected_data here.
2529 (elf_x86_64_merge_symbol_attribute): New function.
2530 (elf_backend_merge_symbol_attribute): New.
2531
7c8bbca5
AM
25322017-08-26 Alan Modra <amodra@gmail.com>
2533
2534 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
2535 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
2536 (ppc_elf_relocate_section): Comment fix.
2537 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
2538 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
2539 Support dynamic relocs for TPREL16 when non-pic too.
2540 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
2541 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
2542 when non-pic too.
2543
5fdda9d6
L
25442017-08-25 H.J. Lu <hongjiu.lu@intel.com>
2545
2546 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
2547 "symbol" in comments.
2548 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
2549
7073b5b9
L
25502017-08-24 H.J. Lu <hongjiu.lu@intel.com>
2551
2552 PR ld/22001
2553 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
2554 R_X86_64_PC32 relocation run-time overflow and unresolvable
2555 R_X86_64_32S relocation with -z nocopyreloc.
2556
34bb2571
L
25572017-08-24 H.J. Lu <hongjiu.lu@intel.com>
2558
2559 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
2560 Undefined symbols may not have a type.
2561 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2562
aab921ad
L
25632017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2564
2565 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
2566 bfd_link_info. Report shared, PIE or PDE object based on
2567 bfd_link_info.
2568 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
2569 (elf_x86_64_relocate_section): Likewise.
2570
b1bb697e
L
25712017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2572
2573 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
2574 for function symbols.
2575 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2576
73784fa5
L
25772017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2578
2579 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
2580 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
2581 is set on any input relocatable file.
2582 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
2583
46434633
AM
25842017-08-23 Alan Modra <amodra@gmail.com>
2585
2586 PR 21988
2587 * elf64-ppc.c (ensure_undef_dynamic): Rename from
2588 ensure_undefweak_dynamic. Handle undefined too.
2589 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
2590 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
2591 (allocate_dynrelocs): Discard undefined non-default visibility
2592 relocs first. Make undefined syms dynamic. Tidy goto.
2593
487b6440
AM
25942017-08-21 Alan Modra <amodra@gmail.com>
2595 H.J. Lu <hongjiu.lu@intel.com>
2596
2597 PR ld/21964
2598 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
2599 * elflink.c (bfd_elf_define_start_stop): Rewrite.
2600
284d826d
HPN
26012017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
2602
2603 PR ld/20125
2604 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
2605 undefined weak symbols.
2606
de259397
NC
26072017-08-18 Nick Clifton <nickc@redhat.com>
2608
2609 PR binutils/21962
2610 * tekhex.c (getsym): Fix check for source pointer walking off the
2611 end of the input buffer.
2612
545bc2b3
SN
26132017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
2614
2615 PR ld/18808
2616 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
2617 relocations in debug sections, change abort to _bfd_error_handler.
2618
0c54f692
NC
26192017-08-14 Nick Clifton <nickc@redhat.com>
2620
2621 PR 21957
2622 * elf.c (setup_group): Check for an empty or very small group
2623 section.
2624 * po/bfd.pot: Regenerate.
2625
79a94a2a
AM
26262017-08-14 Alan Modra <amodra@gmail.com>
2627
2628 PR 21441
2629 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
2630 alignment padding here.
2631 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
2632 in a reverse pass over sections.
2633
98c5dfc9
L
26342017-08-11 H.J. Lu <hongjiu.lu@intel.com>
2635
2636 PR binutils/21943
2637 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
2638 for @plt suffixes first.
2639 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2640
24d3e51b
NC
26412017-08-08 Nick Clifton <nickc@redhat.com>
2642
2643 PR 21916
2644 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
2645 small section lengths.
2646 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
2647 table.
2648 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
2649 there is enough data present in the note.
2650
206c9c79
AM
26512017-08-08 Alan Modra <amodra@gmail.com>
2652
2653 PR 21017
2654 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
2655 got.refcount for GOTOFF relocs, just create .got section.
2656
2980ccad
L
26572017-08-07 H.J. Lu <hongjiu.lu@intel.com>
2658
2659 * elflink.c (elf_link_add_object_symbols): Move common symbol
2660 check after bed->common_definition.
2661
b3293efa
AM
26622017-08-07 Alan Modra <amodra@gmail.com>
2663
2664 PR 21910
2665 * elflink.c (bfd_elf_final_link): Don't segfault when sections
2666 needed to define various dynamic tags have been discarded.
2667
b7a18930
NC
26682017-08-07 Nick Clifton <nickc@redhat.com>
2669
2670 PR 21884
2671 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
2672 has not been set then use the bfd returned by
2673 _bfd_elf_link_setup_gnu_properties. If that is null then search
2674 through all the input bfds selecting the first normal, ELF format
2675 one.
2676 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
2677
1d4af308
L
26782017-08-06 H.J. Lu <hongjiu.lu@intel.com>
2679
2680 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
2681 to 1 bit.
2682 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
2683 (elf_i386_check_tls_transition): Check tls_get_addr directly.
2684 (elf_i386_convert_load_reloc): Update tls_get_addr check.
2685 (elf_i386_link_check_relocs): New function.
2686 (bfd_elf32_bfd_link_check_relocs): New.
2687 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
2688 to 1 bit.
2689 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
2690 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
2691 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
2692 (elf_x86_64_link_check_relocs): New function.
2693 (bfd_elf64_bfd_link_check_relocs): New.
2694 (bfd_elf32_bfd_link_check_relocs): Likewise.
2695
a4819f54
L
26962017-08-06 H.J. Lu <hongjiu.lu@intel.com>
2697
2698 PR ld/21903:
2699 * elflink.c (elf_link_add_object_symbols): Treat common symbol
2700 as undefined for --no-define-common.
2701
55ef6584
AM
27022017-08-05 Alan Modra <amodra@gmail.com>
2703
2704 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
2705 hppa_link_hash_table.
2706
d84ed528
MF
27072017-08-02 Max Filippov <jcmvbkbc@gmail.com>
2708
2709 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
2710 entries for sysregs with negative indices.
2711
1ef692ea
AK
27122017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2713
2714 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
2715 isn't the S/390 specific elf data.
2716 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2717
57593436
KLC
27182017-07-31 Kuan-Lin Chen <rufus@andestech.com>
2719
2720 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
2721 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
2722 [R_RISCV_ADD16]: Likewise.
2723 [R_RISCV_ADD32]: Likewise.
2724 [R_RISCV_ADD64]: Likewise.
2725 [R_RISCV_SUB6]: Likewise.
2726 [R_RISCV_SUB8]: Likewise.
2727 [R_RISCV_SUB16]: Likewise.
2728 [R_RISCV_SUB32]: Likewise.
2729 [R_RISCV_SUB64]: Likewise.
2730
d44c746a
AM
27312017-07-31 Alan Modra <amodra@gmail.com>
2732
2733 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
2734 without ld.so checks.
2735
8b5f1ed8
AM
27362017-07-29 Alan Modra <amodra@gmail.com>
2737
2738 PR 21847
2739 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
2740 (ppc64_elf_merge_symbol): Set non_zero_localentry.
2741 (is_elfv2_localentry0): Test non_zero_localentry.
2742 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
2743
894dde0b
AK
27442017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2745
2746 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
2747 pointer check for htab->elf.irelplt.
2748 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2749
8bdf0be1
NC
27502017-07-27 Nick Clifton <nickc@redhat.com>
2751
2752 PR 21840
2753 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
2754 size is -1.
2755 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
2756 with error return.
2757 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
2758 are NULL.
2759 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
2760 of end pointer.
2761 (evax_bfd_print_emh): Check for invalid string lengths.
2762
c26bb067
NC
27632017-07-25 Nick Clifton <nickc@redhat.com>
2764
2765 * po/fr.po: Updated French translation.
2766
cfe7b9bd
BG
27672017-07-25 Benjamin Green <bengreen5mx@gmail.com>
2768
2769 PR 21824
2770 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
2771 16-bit absolute branches into 10-bit pc-relative branches on the
2772 MSP430 as well as the MSP430X.
2773
d4aaa2a0
AM
27742017-07-25 Alan Modra <amodra@gmail.com>
2775
2776 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
2777 (stub_eh_frame_size): New function.
2778 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
2779 (group_sections): Init group tls_get_addr_opt_bctrl.
2780 (ppc64_elf_size_stubs): Update sizing and initialization of
2781 .eh_frame. Iteration over stubs via group list.
2782 (ppc64_elf_build_stubs): Iterate over stubs via group list.
2783 (ppc64_elf_finish_dynamic_sections): Update finalization of
2784 .eh_frame.
2785
ca4cf9b9
NC
27862017-07-24 Nick Clifton <nickc@redhat.com>
2787
2788 PR 21813
2789 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
2790 of the relocs to the canonicalize_one_reloc routine.
2791 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
2792 for the _bfd_mach_o_canonicalize_one_reloc field.
2793 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
2794 res_base parameter. Use to check for corrupt pair relocs.
2795 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
2796 Likewise.
2797 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
2798 Likewise.
2799 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
2800 Likewise.
2801
2802 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
2803 enough data in the record before attempting to parse it.
2804 (_bfd_vms_slurp_eeom): Likewise.
2805
2806 (_bfd_vms_slurp_egsd): Check for an invalid section index.
2807 (image_set_ptr): Likewise.
2808 (alpha_vms_slurp_relocs): Likewise.
2809
8a2df5e2
NC
2810 (alpha_vms_object_p): Check for a truncated record.
2811
47aeb64c
NC
28122017-07-24 Nick Clifton <nickc@redhat.com>
2813
2814 PR 21803
2815 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
2816 an unrecognized reloc and sets the bfd_error value.
2817 * libbfd.h: Regenerate.
2818 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
2819 function.
2820 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2821 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2822 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2823 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
2824 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2825
15a3a14f
AM
28262017-07-23 Alan Modra <amodra@gmail.com>
2827
2828 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
2829 restore of LR.
2830
f2e6a843
SN
28312017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
2832
2833 PR ld/18841
2834 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
2835 reloc_class_ifunc for ifunc symbols.
2836
909e4e71
NC
28372017-07-19 Nick Clifton <nickc@redhat.com>
2838
2839 PR 21787
2840 * archive.c (bfd_generic_archive_p): If the bfd does not have the
2841 correct magic bytes at the start, set the error to wrong format
2842 and clear the format selector before returning NULL.
2843
29866fa1
NC
28442017-07-19 Nick Clifton <nickc@redhat.com>
2845
2846 PR 21786
2847 * coff-rs6000.c (_bfd_strntol): New function.
2848 (_bfd_strntoll): New function.
2849 (GET_VALUE_IN_FIELD): New macro.
2850 (EQ_VALUE_IN_FIELD): new macro.
2851 (_bfd_xcoff_slurp_armap): Use new macros.
2852 (_bfd_xcoff_archive_p): Likewise.
2853 (_bfd_xcoff_read_ar_hdr): Likewise.
2854 (_bfd_xcoff_openr_next_archived_file): Likewise.
2855 (_bfd_xcoff_stat_arch_elt): Likewise.
6c4e7b6b
NC
2856 * coff64-rs6000.c (_bfd_strntol): New function.
2857 (_bfd_strntoll): New function.
2858 (GET_VALUE_IN_FIELD): New macro.
2859 (xcoff64_slurp_armap): Use new macros.
29866fa1 2860
684d5a10
JEM
28612017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
2862 John Eric Martin <John.Martin@emmicro-us.com>
2863
2864 * bfd-in2.h: Regenerate.
2865 * libbfd.h: Regenerate.
2866 * elf32-arc.c (JLI): Define.
2867 * reloc.c: Add JLI relocations.
2868
de194d85
YC
28692017-07-18 Nick Clifton <nickc@redhat.com>
2870
2871 PR 21775
2872 * coff-sh.c: Fix spelling typos.
2873 * compress.c: Likewise.
2874 * cpu-pdp11.c: Likewise.
2875 * ecofflink.c: Likewise.
2876 * elf-m10300.c: Likewise.
2877 * elf.c: Likewise.
2878 * elf32-arm.c: Likewise.
2879 * elf32-m68k.c: Likewise.
2880 * elf32-nds32.c: Likewise.
2881 * elf32-ppc.c: Likewise.
2882 * elf32-sh.c: Likewise.
2883 * elf32-v850.c: Likewise.
2884 * elf64-ppc.c: Likewise.
2885 * elf64-x86-64.c: Likewise.
2886 * elflink.c: Likewise.
2887 * elfnn-aarch64.c: Likewise.
2888 * elfxx-mips.c: Likewise.
2889 * som.c: Likewise.
2890 * sunos.c: Likewise.
2891 * vms-alpha.c: Likewise.
2892 * xcofflink.c: Likewise.
2893
e4e21d9e
NC
28942017-07-18 Nick Clifton <nickc@redhat.com>
2895
2896 PR binutils/21781
2897 * coffcode.h (handle_COMDAT): Replace abort with an error message
2898 and return.
2899
8e85f840
L
29002017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2901
2902 PR ld/21782
2903 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
2904 to shared library.
2905
dd57c19c
L
29062017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2907
2908 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
2909
676ee2b5
AM
29102017-07-16 Alan Modra <amodra@gmail.com>
2911
2912 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
2913 __tls_index GOT entries when using __tls_get_addr_opt stub.
2914 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2915
429d795d
AM
29162017-07-12 Alan Modra <amodra@gmail.com>
2917
2918 * po/es.po: Update from translationproject.org/latest/bfd/.
2919 * po/fi.po: Likewise.
2920 * po/fr.po: Likewise.
2921 * po/id.po: Likewise.
2922 * po/ja.po: Likewise.
2923 * po/ro.po: Likewise.
2924 * po/ru.po: Likewise.
2925 * po/sr.po: Likewise.
2926 * po/sv.po: Likewise.
2927 * po/tr.po: Likewise.
2928 * po/uk.po: Likewise.
2929 * po/vi.po: Likewise.
2930 * po/zh_CN.po: Likewise.
2931 * po/hr.po: New file from translationproject.org.
2932 * configure.ac (ALL_LINGUAS): Add hr. Sort.
2933 * configure: Regenerate.
2934
0bae9e9e
NC
29352017-07-12 Nick Clifton <nickc@redhat.com>
2936
2937 Fix compile time warnings using gcc 7.1.1.
2938 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
2939 plt_name buffer.
2940 (elf_xtensa_get_gotplt_section): Increase length of got_name
2941 buffer.
2942 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
2943 default return of FALSE.
2944 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
2945 default return of FALSE.
2946
d42c267e
AM
29472017-07-12 Alan Modra <amodra@gmail.com>
2948
2949 * binary.c (binary_set_section_contents): Don't print filepos in
2950 error message.
2951 (coff_write_object_contents): Cast size_t for error message.
2952 (coff_slurp_line_table): Don't use bfd_vma symndx.
2953 (coff_slurp_reloc_table): Remove unneeded cast.
2954 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
2955 error message.
2956 (find_abstract_instance_name): Likewise.
2957 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
2958 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
2959 (elf32_arm_check_relocs): Make r_symndx an int.
2960 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
2961 format string.
2962 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
2963 message arg.
2964 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
2965 error message.
2966 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
2967 * elf32-s390.c (elf_s390_check_relocs): Likewise.
2968 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
2969 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
2970 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
2971 * elf64-s390.c (elf_s390_check_relocs): Likewise.
2972 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2973 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
2974 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2975 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
2976 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
2977 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
2978 and use %lu for error message.
2979 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
2980 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
2981 error message.
2982
2983 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
2984 in error message.
2985 (elf32_arm_final_link_relocate): Likewise.
2986 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
2987 * coffcode.h (styp_to_sec_flags): Likewise.
2988 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
2989 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
2990 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
2991 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
2992 (elf32_bfin_merge_private_bfd_data): Likewise.
2993 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2994 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
2995 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
2996 (i370_elf_relocate_section): Likewise.
2997 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
2998 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
2999 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
3000 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
3001 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
3002 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
3003 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
3004 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
3005 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
3006 * ieee.c (ieee_write_id, read_id): Likewise.
3007 * mach-o.c (bfd_mach_o_write_contents): Likewise.
3008 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
3009 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
3010 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
3011 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
3012 * stabs.c (_bfd_link_section_stabs): Likewise.
3013
3014 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
3015 format.
3016 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
3017 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
3018 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
3019 * coff-sh.c (sh_relax_section): Likewise.
3020 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
3021 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
3022 * coffcode.h (coff_slurp_reloc_table): Likewise.
3023 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
3024 (_bfd_coff_read_string_table): Likewise.
3025 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
3026 * compress.c (bfd_get_full_section_contents): Likewise.
3027 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
3028 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
3029 * elf.c (bfd_elf_string_from_elf_section): Likewise.
3030 * elf32-arc.c (arc_special_overflow_checks): Likewise.
3031 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
3032 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
3033 (elf32_arm_write_section): Likewise.
3034 * elf32-bfin.c (bfin_relocate_section): Likewise.
3035 (bfinfdpic_relocate_section): Likewise.
3036 * elf32-hppa.c (hppa_build_one_stub): Likewise.
3037 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
3038 * elf32-i386.c (elf_i386_tls_transition): Likewise.
3039 (elf_i386_relocate_section): Likewise.
3040 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
3041 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
3042 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
3043 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3044 * elf32-metag.c (elf_metag_relocate_section): Likewise.
3045 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
3046 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
3047 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
3048 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
3049 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
3050 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
3051 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
3052 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
3053 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
3054 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
3055 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
3056 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
3057 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
3058 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
3059 * elf32-sh.c (sh_elf_relax_section): Likewise.
3060 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
3061 (sh_elf_relocate_section): Likewise.
3062 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
3063 * elf32-spu.c (spu_elf_relocate_section): Likewise.
3064 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
3065 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
3066 * elf32-v850.c (v850_elf_relax_section): Likewise.
3067 * elf32-vax.c (elf_vax_check_relocs): Likewise.
3068 (elf_vax_relocate_section): Likewise.
3069 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
3070 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
3071 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
3072 (do_fix_for_relocatable_link): Likewise.
3073 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
3074 (elf64_alpha_relax_with_lituse): Likewise.
3075 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
3076 (elf_hppa_final_link_relocate): Likewise.
3077 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
3078 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
3079 (elf64_vms_link_add_object_symbols): Likewise.
3080 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
3081 (mmix_final_link_relocate): Likewise.
3082 * elf64-s390.c (invalid_tls_insn): Likewise.
3083 (elf_s390_relocate_section): Likewise.
3084 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
3085 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
3086 (elf_x86_64_relocate_section): Likewise.
3087 * elfcode.h (elf_slurp_symbol_table): Likewise.
3088 * elfcore.h (elf_core_file_p): Likewise.
3089 * elflink.c (elf_link_read_relocs_from_section): Likewise.
3090 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
3091 (elfNN_aarch64_relocate_section): Likewise.
3092 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
3093 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
3094 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
3095 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
3096 (_bfd_mips_elf_relocate_section): Likewise.
3097 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
3098 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
3099 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
3100 * ieee.c (ieee_slurp_external_symbols): Likewise.
3101 * ihex.c (ihex_write_object_content): Likewise.
3102 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
3103 * merge.c (_bfd_merged_section_offset): Likewise.
3104 * mmo.c (mmo_write_loc_chunk): Likewise.
3105 (mmo_write_object_contents): Likewise.
3106 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
3107 * stabs.c (_bfd_link_section_stabs): Likewise.
3108 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
3109
e3fbc3da
AM
31102017-07-11 Alan Modra <amodra@gmail.com>
3111
3112 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
3113
2c4d9cbe
AM
31142017-07-11 Alan Modra <amodra@gmail.com>
3115
3116 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
3117 instruction" error using _bfd_error_handler, not einfo.
3118
adce5b39
NC
31192017-07-10 Nick Clifton <nickc@redhat.com>
3120
3121 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
3122 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
3123
e6f3b9c3
JB
31242017-07-07 John Baldwin <jhb@FreeBSD.org>
3125
3126 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
3127
532cc313
AM
31282017-07-07 Alan Modra <amodra@gmail.com>
3129
3130 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
3131
1cf9552b
AM
31322017-07-07 Alan Modra <amodra@gmail.com>
3133
3134 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
3135 as long long. Move code replacing "ll" with "I64", and simplify.
3136
a0b7b105
L
31372017-07-06 H.J. Lu <hongjiu.lu@intel.com>
3138
3139 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
3140 to 1.
3141
1d827a72
L
31422017-07-05 H.J. Lu <hongjiu.lu@intel.com>
3143
3144 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
3145 xtime.
3146 (line_info_add_file_name): Likewise.
3147 (decode_line_info): Likewise.
3148
0d702cfe
TG
31492017-07-04 Tristan Gingold <gingold@adacore.com>
3150
3151 * version.m4: Bump version to 2.29.51
3152 * configure: Regenerate.
3153
564e46b7
JW
31542017-07-04 Jiong Wang <jiong.wang@arm.com>
3155
3156 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
3157 sanity check at the head of this function.
3158
0041f7df
JK
31592017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3160
3161 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
3162 dwarf_line_str_size.
3163 (struct attr_abbrev): Add field implicit_const.
3164 (dwarf_debug_sections): Add .debug_line_str.
3165 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
3166 (dwarf_debug_section_assert): Add static assertion.
3167 (read_indirect_line_string): New.
3168 (read_abbrevs): Support DW_FORM_implicit_const.
3169 (is_str_attr): Support DW_FORM_line_strp.
3170 (read_attribute_value): Support DW_FORM_line_strp and
3171 DW_FORM_implicit_const.
3172 (read_attribute): Support DW_FORM_implicit_const.
3173 (line_info_add_include_dir, line_info_add_include_dir_stub):
3174 (line_info_add_file_name, read_formatted_entries): New.
3175 (decode_line_info, parse_comp_unit): Support DWARF 5.
3176 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
3177
d8cd8c1f
EB
31782017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3179
3180 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
3181 abort statement that was put for symbols that are not dynamic.
3182
15e6ed8c
TG
31832017-07-03 Tristan Gingold <gingold@adacore.com>
3184
3185 * po/bfd.pot: Regenerate
3186
76cfced5
AM
31872017-07-03 Alan Modra <amodra@gmail.com>
3188
3189 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
3190 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
3191 * elf.c (setup_group): Use "Lx" to print sh_size.
3192 (_bfd_elf_setup_sections): Remove unnecessary cast and print
3193 unknown section type in hex.
3194 (copy_special_section_fields): Style fix.
3195 (bfd_section_from_shdr): Correct format for sh_link. Use a
3196 common error message for all the variants of unrecognized
3197 section types.
3198 (assign_file_positions_for_load_sections): Use "Lx" for lma
3199 adjust error message.
3200 (assign_file_positions_for_non_load_sections): Formatting.
3201 (rewrite_elf_program_header): Formatting. Use "Lx" for
3202 bfd_vma values in error messages.
3203 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
3204 ELF_R_SYM value to type expected by format.
3205 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
3206 in error messages.
3207 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
3208 (elf_link_input_bfd): Use "Lx" for r_info.
3209 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
3210
ce9116fd
AM
32112017-07-03 Alan Modra <amodra@gmail.com>
3212
3213 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
3214 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
3215 Microsoft C library variant of long long format specifier.
3216 (PRINT20): Cast value to bfd_uint64_t not long long.
3217 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
3218 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
3219 long long. Don't cast to bfd_vma.
3220 * elf32-score.c (score3_bfd_getl48): Likewise.
3221 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
3222
cd9af601
AM
32232017-07-03 Alan Modra <amodra@gmail.com>
3224
3225 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
3226 print d_tag.
3227 (bfd_elf_print_symbol): Don't cast symbol->flags.
3228 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
3229 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
3230 _bfd_error_handler argument order.
3231 (ppc_elf_merge_private_bfd_data): Don't cast flags.
3232
33c734b2
AM
32332017-07-03 Alan Modra <amodra@gmail.com>
3234
3235 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
3236 AC_TYPE_LONG_DOUBLE.
3237 * configure: Regenerate.
3238 * config.in: Regenerate.
3239
3df5cd13
AW
32402017-06-29 Andrew Waterman <andrew@sifive.com>
3241
3242 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
3243 relocs.
3244
ec1acaba
EB
32452017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3246
3247 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
3248 unless it is undefined weak.
3249 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
3250 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
3251 relocation.
3252 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
3253 is not dynamic in PIC, abort.
3254
ff07562f
JW
32552017-06-29 Jiong Wang <jiong.wang@arm.com>
3256
3257 PR ld/21402
3258 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
3259 undefined weak symbols into dynamic.
3260 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
3261 relocation for non-dynamic symbols.
3262 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
3263
2aff25ba
JW
32642017-06-29 Jiong Wang <jiong.wang@arm.com>
3265
3266 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
3267 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
3268 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
3269 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
3270 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
3271 support for them.
3272
88ab90e8
AA
32732017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
3274
3275 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
3276 (elfcore_write_s390_gs_bc): Likewise.
3277 * elf.c (elfcore_grok_s390_gs_cb): New function.
3278 (elfcore_grok_s390_gs_bc): New function.
3279 (elfcore_grok_note): Call them.
3280 (elfcore_write_s390_gs_cb): New function.
3281 (elfcore_write_s390_gs_bc): New function.
3282 (elfcore_write_register_note): Call them.
3283
328ce951
L
32842017-06-28 H.J. Lu <hongjiu.lu@intel.com>
3285
3286 * libbfd.c (_bfd_generic_get_section_contents): Don't call
3287 bfd_get_file_size. Check archive element size.
3288 (_bfd_generic_get_section_contents_in_window): Likewise.
3289
47fdcf63
L
32902017-06-28 H.J. Lu <hongjiu.lu@intel.com>
3291
3292 * bfd-in2.h: Regenerated.
3293 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
3294 (bfd_get_file_size): Likewise.
3295
38bf472a
MR
32962017-06-28 Maciej W. Rozycki <macro@imgtec.com>
3297 Matthew Fortune <matthew.fortune@imgtec.com>
3298
3299 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
3300 * cpu-mips.c (I_interaptiv_mr2): New enum value.
3301 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
3302 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
3303 case.
3304 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
3305 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
3306 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
3307 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
3308 `bfd_mach_mips_interaptiv_mr2' entries.
3309 * bfd-in2.h: Regenerate.
3310
2d68166e
NC
33112017-06-27 Nick Clifton <nickc@redhat.com>
3312
3313 * tekhex.c (pass_over): Revert accidental conversion of a local
3314 array to a static array.
3315
68063779
SKS
33162017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3317
3318 PR ld/13402
3319 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
3320 reloc addend if necessary. Adjust diff only if
3321 shrinked_insn_address < end_address.
3322
ea9aafc4
AM
33232017-06-27 Alan Modra <amodra@gmail.com>
3324
3325 PR binutils/21665
3326 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
3327 (_bfd_generic_get_section_contents_in_window): Likewise.
3328
a6cbf936
KLC
33292017-06-26 Kuan-Lin Chen <rufus@andestech.com>
3330
3331 * elfnn-riscv.c (perform_relocation): Support the new
3332 R_RISCV_32_PCREL relocation.
3333 (riscv_elf_relocate_section): Likewise.
3334 * elfxx-riscv.c (howto_table): Likewise.
3335 (riscv_reloc_map): Likewise.
3336 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
3337 * libbfd.h: Regenerate.
3338
7211ae50
AM
33392017-06-27 Alan Modra <amodra@gmail.com>
3340
3341 PR binutils/21665
3342 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
3343 Use unsigned file pointer type, and remove cast.
3344 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
3345 Add "count", not "sz".
3346
ab27f80c
PA
33472017-06-26 Pedro Alves <palves@redhat.com>
3348
3349 PR binutils/21665
3350 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
3351 "sz".
3352
1f473e3d
L
33532017-06-26 H.J. Lu <hongjiu.lu@intel.com>
3354
3355 PR binutils/21665
3356 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
3357 a missing line.
3358
b417536f
MR
33592017-06-26 Maciej W. Rozycki <macro@imgtec.com>
3360
3361 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
3362 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
3363 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
3364 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
3365 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
3366
0630b49c
L
33672017-06-26 H.J. Lu <hongjiu.lu@intel.com>
3368
3369 PR binutils/21665
3370 * compress.c (bfd_get_full_section_contents): Don't check the
3371 file size here.
3372 * libbfd.c (_bfd_generic_get_section_contents): Check for and
ea9aafc4 3373 reject a section whose size + offset is greater than the size
0630b49c
L
3374 of the entire file.
3375 (_bfd_generic_get_section_contents_in_window): Likewise.
515a4464 3376
04e15b4a
NC
33772017-06-26 Nick Clifton <nickc@redhat.com>
3378
3379 PR binutils/21670
3380 * tekhex.c (getvalue): Check for the source pointer exceeding the
3381 end pointer before the first byte is read.
3382
cfd14a50
NC
33832017-06-26 Nick Clifton <nickc@redhat.com>
3384
3385 PR binutils/21665
ea9aafc4 3386 * opncls.c (get_build_id): Check that the section is big enough
cfd14a50
NC
3387 to contain the whole note.
3388 * compress.c (bfd_get_full_section_contents): Check for and reject
ea9aafc4 3389 a section whose size is greater than the size of the entire file.
cfd14a50
NC
3390 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
3391 contain a notes section.
3392
93ec5e23
AK
33932017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
3394
3395 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
3396 pointer checks.
3397 (elf_s390_modify_segment_map): Likewise.
3398 (bfd_elf_s390_set_options): Lisewise.
3399
57963c05
AM
34002017-06-26 Alan Modra <amodra@gmail.com>
3401
3402 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
3403 a --just-syms bfd.
3404 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
3405 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
3406 .preinit_array on --just-syms bfds.
3407 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
3408 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
3409 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
3410
5cc4ca83
ST
34112017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
3412
3413 * elf.c (find_link): Bounds check "hint".
3414
bff0500d
TP
34152017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
3416
3417 * elf32-arm.c (using_thumb_only): Update list of architectures in
3418 BFD_ASSERT for which the logic is valid.
3419 (using_thumb2_bl): Likewise.
3420 (using_thumb2): Likewise and return true for ARMv8-R.
3421 (arch_has_arm_nop): Likewise.
3422 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
3423 merging logic. Update commentis for value 15 of v8m_baseline,
3424 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
3425 merging of value 15 of Tag_CPU_arch.
3426
4aa57d6a
JW
34272017-06-23 Jiong Wang <jiong.wang@arm.com>
3428
3429 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
3430 BFD_RELOC_AARCH64_ADR_GOT_PAGE
3431 * bfd-in2.h: Regenerate.
3432
5d8763a3
L
34332017-06-22 H.J. Lu <hongjiu.lu@intel.com>
3434
3435 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
3436 the error_alignment label forward. Properly align program
3437 property note section.
3438
e652757b
EC
34392017-06-22 Eric Christopher <echristo@gmail.com>
3440
3441 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
3442 abs to fix a truncation warning.
3443
84da4cf8
L
34442017-06-22 H.J. Lu <hongjiu.lu@intel.com>
3445
3446 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
3447 local undefined weak symbol to 0.
3448 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
3449
48580982
L
34502017-06-22 H.J. Lu <hongjiu.lu@intel.com>
3451
3452 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
3453 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
3454 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
3455 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
3456 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
3457 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
3458 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
3459 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
3460
ee2fdd6f
L
34612017-06-22 H.J. Lu <hongjiu.lu@intel.com>
3462
3463 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
3464 (elf_i386_lazy_ibt_plt_entry): Likewise.
3465 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
3466 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
3467 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
3468 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
3469 (elf_i386_lazy_plt_layout): Likewise.
3470 (elf_i386_non_lazy_plt_layout): Likewise.
3471 (elf_i386_link_hash_entry): Add plt_second.
3472 (elf_i386_link_hash_table): Add plt_second and
3473 plt_second_eh_frame.
3474 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
3475 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
3476 the second PLT. Check the second PLT.
3477 (elf_i386_relocate_section): Use the second PLT to resolve
3478 PLT reference if needed.
3479 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
3480 needed.
3481 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
3482 second PLT. Generate unwind info for the second PLT.
3483 (elf_i386_plt_type): Add plt_second.
3484 (elf_i386_get_synthetic_symtab): Support the second PLT.
3485 (elf_i386_parse_gnu_properties): Support
3486 GNU_PROPERTY_X86_FEATURE_1_AND.
3487 (elf_i386_merge_gnu_properties): Support
3488 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
3489 on GNU_PROPERTY_X86_FEATURE_1_IBT
3490 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
3491 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
3492 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
3493 is set on all relocatable inputs.
3494 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
3495 (elf_x32_lazy_ibt_plt_entry): Likewise.
3496 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
3497 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
3498 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
3499 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
3500 (elf_x86_64_lazy_ibt_plt): Likewise.
3501 (elf_x32_lazy_ibt_plt): Likewise.
3502 (elf_x86_64_non_lazy_ibt_plt): Likewise.
3503 (elf_x32_non_lazy_ibt_plt): Likewise.
3504 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
3505 (elf_x86_64_parse_gnu_properties): Support
3506 GNU_PROPERTY_X86_FEATURE_1_AND.
3507 (elf_x86_64_merge_gnu_properties): Support
3508 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
3509 on GNU_PROPERTY_X86_FEATURE_1_IBT
3510 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
3511 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
3512 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
3513 is set on all relocatable inputs.
3514
d19237d9
NC
35152017-06-22 Nick Clifton <nickc@redhat.com>
3516
3517 PR binutils/21649
3518 * som.c (setup_sections): NUL terminate the space_strings buffer.
3519 Check that the space.name field does not index beyond the end of
3520 the space_strings buffer.
3521
6879f5a9
NC
35222017-06-21 Nick Clifton <nickc@redhat.com>
3523
3524 PR binutils/21646
3525 * coff-sh.c (sh_reloc): Check for an out of range reloc.
3526
7adc0a81
NC
35272017-06-21 Nick Clifton <nickc@redhat.com>
3528
3529 PR binutils/21639
3530 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
3531 type of the size parameter.
3532 (_bfd_vms_save_counted_string): Add second parameter - the maximum
3533 length of the counted string.
3534 * vms.h (_bfd_vms_save_sized_string): Update prototype.
3535 (_bfd_vms_save_counted_string): Likewise.
3536 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
3537 _bfd_vms_save_counted_string.
3538 (_bfd_vms_slurp_ehdr): Likewise.
3539 (_bfd_vms_slurp_egsd): Likewise.
3540 (Parse_module): Likewise.
3541
6e1816be
AM
35422017-06-21 Alan Modra <amodra@gmail.com>
3543
3544 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
3545 calls before tocsave calls.
3546 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
3547 following nop.
3548
20bd1b6b
NC
35492017-06-21 Nick Clifton <nickc@redhat.com>
3550
3551 PR binutils/21645
3552 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
3553 bfd_get_full_section_contents returns no contents.
3554
3de58d95
NC
35552017-06-21 Nick Clifton <nickc@redhat.com>
3556
3557 PR binutils/21638
3558 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
3559 record.
3560
cb06d03a
NC
35612017-06-21 Nick Clifton <nickc@redhat.com>
3562
3563 PR binutils/21637
3564 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
3565 list.
3566 (image_set_ptr): Likewise.
3567 (alpha_vms_fix_sec_rel): Likewise.
3568 (alpha_vms_slurp_relocs): Likewise.
3569
c458d007
NC
35702017-06-21 Nick Clifton <nickc@redhat.com>
3571
3572 PR binutils/21633
3573 * ieee.c (ieee_slurp_sections): Check for a NULL return from
3574 read_id.
3575 (ieee_archive_p): Likewise.
3576 (ieee_object_p): Likewise.
3577
ce497010
NC
35782017-06-21 Nick Clifton <nickc@redhat.com>
3579
3580 PR binutils/21640
3581 * elf.c (setup_group): Zero the group section pointer list after
3582 allocation so that loops can be caught. Check for NULL pointers
3583 when processing a group list.
3584
fd52715c
AK
35852017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
3586
3587 * elf-s390.h: New file.
3588 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
3589 field.
3590 (elf_s390_additional_program_headers): New function.
3591 (elf_s390_modify_segment_map): New function.
3592 (bfd_elf_s390_set_options): New function.
3593 (elf_backend_additional_program_headers)
3594 (elf_backend_modify_segment_map): Add macro definitions.
3595
abfa390d
L
35962017-06-19 H.J. Lu <hongjiu.lu@intel.com>
3597
3598 PR ld/21626
3599 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
3600 the DYNAMIC bit instead of bfd_count_sections.
3601
bc21b167
NC
36022017-06-19 Nick Clifton <nickc@redhat.com>
3603
3604 PR binutils/21618
3605 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
3606 length.
3607 (evax_bfd_print_eeom): Likewise.
3608 (evax_bfd_print_egsd): Check for an overlarge record length.
3609 (evax_bfd_print_etir): Likewise.
3610
acb56a83
NC
36112017-06-19 Nick Clifton <nickc@redhat.com>
3612
3613 PR binutils/21612
3614 * libieee.h (struct common_header_type): Add end_p field.
3615 * ieee.c (this_byte_and_next): Do not advance input_p beyond
3616 end_p.
3617 (read_id): Check for a length that exceeds the remaining bytes in
3618 the input buffer.
3619 (ieee_seek): Initialise end_p.
3620 (ieee_archive_p): Likewise.
3621 (ieee_object_p): Likewise.
3622
72e84f96
NC
36232017-06-19 Nick Clifton <nickc@redhat.com>
3624
80053e46
NC
3625 PR binutils/21611
3626 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
3627 before reading the EIHS structure entries.
3628
36292017-06-19 Nick Clifton <nickc@redhat.com>
3630
3631 PR binutils/21615
72e84f96
NC
3632 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
3633 gsd_size. Check that there are enough bytes remaining to read the
3634 type and size of the next egsd. Check that the size of the egsd
3635 does not exceed the size of the record.
3636
875ffa3e
AM
36372017-06-19 Alan Modra <amodra@gmail.com>
3638
3639 * config.bfd: Correct targ_underscore for cris.
3640
bdd32e03
AM
36412017-06-18 Alan Modra <amodra@gmail.com>
3642
3643 * config.bfd: Correct targ_underscore for epiphany, ip2k,
3644 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
3645
4b48e2f6
NC
36462017-06-16 Nick Clifton <nickc@redhat.com>
3647
3648 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
3649 bucketlist is empty because there are no symbols to add to the
3650 list.
3651
7dba9362
AM
36522017-06-16 Alan Modra <amodra@gmail.com>
3653
3654 PR ld/20022
3655 PR ld/21557
3656 PR ld/21562
3657 PR ld/21571
3658 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
3659 (BFD_JUMP_TABLE_LINK): Likewise.
3660 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
3661 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
3662 (bfd_elf_define_start_stop): New function.
3663 * linker.c (bfd_generic_define_start_stop): New function.
3664 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
3665 new field.
3666 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
3667 * aout-target.h (MY_bfd_define_start_stop): Define.
3668 * aout-tic30.c (MY_bfd_define_start_stop): Define.
3669 * binary.c (binary_bfd_define_start_stop): Define.
3670 * bout.c (b_out_bfd_define_start_stop): Define.
3671 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
3672 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
3673 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
3674 * coffcode.h (coff_bfd_define_start_stop): Define.
3675 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
3676 * i386msdos.c (msdos_bfd_define_start_stop): Define.
3677 * i386os9k.c (os9k_bfd_define_start_stop): Define.
3678 * ieee.c (ieee_bfd_define_start_stop): Define.
3679 * ihex.c (ihex_bfd_define_start_stop): Define.
3680 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
3681 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
3682 * mmo.c (mmo_bfd_define_start_stop): Define.
3683 * nlm-target.h (nlm_bfd_define_start_stop): Define.
3684 * oasys.c (oasys_bfd_define_start_stop): Define.
3685 * pef.c (bfd_pef_bfd_define_start_stop): Define.
3686 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
3687 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
3688 * som.c (som_bfd_define_start_stop): Define.
3689 * srec.c (srec_bfd_define_start_stop): Define.
3690 * tekhex.c (tekhex_bfd_define_start_stop): Define.
3691 * versados.c (versados_bfd_define_start_stop): Define.
3692 * vms-alpha.c (vms_bfd_define_start_stop): Define.
3693 (alpha_vms_bfd_define_start_stop): Define.
3694 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
3695 * bfd-in2.h: Regenerate.
3696 * libbfd.h: Regenerate.
3697
d68f1976
JW
36982017-06-16 Jiong Wang <jiong.wang@arm.com>
3699
3700 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
3701 SYMBOL_REFERENCES_LOCAL.
3702
6353d82b
JW
37032017-06-15 Jiong Wang <jiong.wang@arm.com>
3704
3705 PR ld/21532
3706 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
3707 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
3708 runtime for if there needs copy relocation elimination.
3709 (need_copy_relocation_p): New function. Return true for symbol with
3710 pc-relative references and if it's against read-only sections.
3711 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
3712 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
3713 that are related with accessing external objects.
3714 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
3715 in elfNN_aarch64_check_relocs.
3716
63634bb4
NC
37172017-06-15 Nick Clifton <nickc@redhat.com>
3718
3719 PR binutils/21582
3720 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
3721 bugs.
62b76e4b
NC
3722 PR binutils/21581
3723 (ieee_archive_p): Likewise.
63634bb4 3724
76800cba
NC
37252017-06-15 Nick Clifton <nickc@redhat.com>
3726
3727 PR binutils/21579
3728 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
3729
f7e16c2a
MF
37302017-06-14 Max Filippov <jcmvbkbc@gmail.com>
3731
3732 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
3733 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
3734 keep both windowed and call0 ABI PLT definitions.
3735 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
3736 elf_xtensa_*_plt_entry endex.
3737 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
3738
f461bbd8
NC
37392017-06-14 Nick Clifton <nickc@redhat.com>
3740
3741 PR binutils/21578
3742 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
3743 flag value.
3744
c53d2e6d
NC
37452017-06-14 Nick Clifton <nickc@redhat.com>
3746
3747 PR binutils/21589
3748 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
3749 maximum value for the ascic pointer. Check that name processing
3750 does not read beyond this value.
3751 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
3752 end of etir record.
3753
04f963fd
NC
37542017-06-14 Nick Clifton <nickc@redhat.com>
3755
3756 PR binutils/21591
3757 * versados.c (versados_mkobject): Zero the allocated tdata structure.
3758 (process_otr): Check for an invalid offset in the otr structure.
3759
319c2dbe
SH
37602017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
3761
3762 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
3763
cbd0eecf
L
37642017-06-13 H.J. Lu <hongjiu.lu@intel.com>
3765
3766 PR ld/20022
3767 PR ld/21557
3768 PR ld/21562
3769 PR ld/21571
3770 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
3771 vtable field to a union.
3772 (_bfd_elf_is_start_stop): Removed.
3773 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
3774 __start_SECNAME and __stop_SECNAME symbols.
3775 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
3776 * elflink.c (_bfd_elf_is_start_stop): Removed.
3777 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
3778 _bfd_elf_is_start_stop.
3779 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
3780 __stop_SECNAME symbols. Updated.
3781 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3782 (bfd_elf_gc_record_vtinherit): Likewise.
3783 (bfd_elf_gc_record_vtentry): Likewise.
3784
10bbbc1d
NC
37852017-06-13 Nick Clifton <nickc@redhat.com>
3786
3787 PR ld/21524
3788 * elflink.c (elf_link_adjust_relocs): Generate an error when
3789 encountering a reloc against a symbol removed by garbage
3790 collection.
3791
5c3ce2bc
L
37922017-06-12 H.J. Lu <hongjiu.lu@intel.com>
3793
3794 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
3795 to merge_gnu_properties.
3796 * elf-properties.c (elf_merge_gnu_properties): Add struct
3797 bfd_link_info * and pass it to merge_gnu_properties.
3798 (elf_merge_gnu_property_list): Add struct bfd_link_info *
3799 and pass it to elf_merge_gnu_properties.
3800 (_bfd_elf_link_setup_gnu_properties): Pass info to
3801 elf_merge_gnu_property_list.
3802 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
3803 bfd_link_info *.
3804 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
3805
9b97dfbf
AM
38062017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
3807
3808 PR 21564
3809 * binary.c (binary_set_section_contents): Scale lma by octets
3810 per byte to set filepos.
3811
e3d1d408
CM
38122017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3813
3814 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
3815 dynamic sections.
3816
64aa8e03
CM
38172017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3818
3819 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
3820 require TEXTREL.
3821
a0abe743
CM
38222017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3823
3824 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
3825 patched section contents for TLS IE reloc.
3826 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
3827
f4e6805f
CM
38282017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3829
3830 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
3831 RELOC_FOR_GLOBAL_SYMBOL macro.
3832
cd640291
CM
38332018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3834
3835 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
3836 changes.
3837
7ef0acc1
VG
38382017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3839
3840 * config/tc-arc.c (md_undefined_symbol): Changed.
3841 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
3842
cc89d0b3
CM
38432017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3844
3845 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
3846 symbols.
3847
9d5c718b
CM
38482017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3849
3850 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
3851 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
3852
be9e3704
CM
38532017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3854
3855 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
3856 object is created.
3857
4ec192e6
RE
38582017-06-08 Richard Earnshaw <rearnsha@arm.com>
3859
3860 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
3861 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
3862 is non-zero. Add clarifying comments.
3863
51fa2693
L
38642017-06-08 H.J. Lu <hongjiu.lu@intel.com>
3865
3866 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
3867 name. Use local IFUNC symbol name string to report unsupported
3868 non-PIC call to IFUNC function.
3869 (elf_i386_relocate_section): Dump local IFUNC name with minfo
3870 when generating R_386_IRELATIVE relocation.
3871 (elf_i386_finish_dynamic_symbol): Likewise.
3872 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
3873 IFUNC symbol name.
3874 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
3875 when generating R_X86_64_IRELATIVE relocation.
3876 (elf_x86_64_finish_dynamic_symbol): Likewise.
3877
78e8a2ff
JM
38782017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3879
3880 * elf.c (setup_group): Make sure BFD sections are created for all
3881 group sections in the input file when processing SHF_GROUP
3882 sections.
3883 (bfd_section_from_shdr): Avoid duplicating logic already
3884 implemented in `setup_group'.
3885
9949827b
DBR
38862017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
3887
3888 PR binutils/21546
3889 * peXXigen.c (pe_print_idata): Use the address of the first thunk
3890 if the hint address is zero.
3891
0ee3a6db
JC
38922017-06-06 James Clarke <jrtc27@jrtc27.com>
3893
3894 PR ld/19579
3895 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
3896 ELF_COMMON_DEF_P for common symbols.
3897
7bdf4127
AB
38982017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
3899
3900 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
3901 SEC_GROUP sections as SEC_EXCLUDE.
3902 (bfd_elf_set_group_contents): Replace use of abort with an assert.
3903 (assign_section_numbers): Use resolve_section_groups flag instead
3904 of relocatable link type.
3905 (_bfd_elf_init_private_section_data): Use resolve_section_groups
3906 flag instead of checking the final_link flag for part of the
3907 checks in here. Fix white space as a result.
3908 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
3909 instead of relocatable link type.
3910 (bfd_elf_final_link): Likewise.
3911
458ad2b8
JM
39122017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3913
3914 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
3915 variable `bed'.
3916 * elf32-score.c (score_elf_final_link_relocate): Likewise.
3917 (s3_bfd_score_elf_check_relocs): Likewise.
3918 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
3919 (score_elf_final_link_relocate): Likewise.
3920 (s7_bfd_score_elf_check_relocs): Likewise.
3921
fbebaf4a
JM
39222017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3923
3924 * elflink.c (init_reloc_cookie_rels): Remove unused variable
3925 `bed'.
3926
056bafd4
MR
39272017-06-06 Maciej W. Rozycki <macro@imgtec.com>
3928
3929 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
3930 from `reloc_count' rather than decrementing it.
3931 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
3932 `reloc_count' by `int_rels_per_ext_rel'.
3933 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
3934 `reloc_count' by `int_rels_per_ext_rel' for last relocation
3935 entry determination.
3936 (s3_bfd_score_elf_check_relocs): Likewise.
3937 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
3938 (s7_bfd_score_elf_relocate_section): Likewise.
3939 (s7_bfd_score_elf_check_relocs): Likewise.
3940 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
3941 prototype and function.
3942 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
3943 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
3944 triple rather than once the sum of REL and RELA relocation entry
3945 counts.
3946 (bfd_elf64_get_reloc_upper_bound): Remove macro.
3947 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
3948 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
3949 storage allocation size determination.
3950 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
3951 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
3952 by `int_rels_per_ext_rel' for last relocation entry
3953 determination.
3954 (bfd_elf_final_link): Do not multiply `reloc_count' by
3955 `int_rels_per_ext_rel' for internal relocation storage
3956 allocation size determination.
3957 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
3958 `int_rels_per_ext_rel' for last relocation entry determination.
3959 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3960 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
3961 (_bfd_mips_elf_relocate_section): Likewise.
3962
af54f0eb
AM
39632017-06-05 Alan Modra <amodra@gmail.com>
3964
3965 PR 21529
3966 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
3967
6cf3bf88 39682017-06-01 John Baldwin <jhb@FreeBSD.org>
b5430a3c
JB
3969
3970 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
3971 determine structure sizes.
3972 (elfcore_grok_freebsd_prstatus): Likewise.
3973
f378ab09
AM
39742017-06-01 Alan Modra <amodra@gmail.com>
3975
3976 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
3977 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
3978 dynamic objects.
3979 (is_elfv2_localentry0): New function.
3980 (ppc64_elf_tls_setup): Default params->plt_localentry0.
3981 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
3982 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
3983 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
3984 optimized localentry:0 stubs.
3985 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
3986 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
3987 localentry:0 stubs.
3988 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
3989 DT_PPC64_OPT.
3990 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
3991
8c65b54f
CS
39922017-05-30 Casey Smith <clegg89@gmail.com>
3993
3994 PR ld/21523
3995 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
3996 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
3997
64984c22
AK
39982017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
3999
4000 * cpu-arc.c (arc_compatible): New function.
4001
37cd3877
AK
40022017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
4003
4004 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
4005
8e2f54bc
L
40062017-05-30 H.J. Lu <hongjiu.lu@intel.com>
4007
4008 PR binutils/21519
4009 * bfdio.c (bfd_get_file_size): New function.
4010 * bfd-in2.h: Regenerated.
4011
8e7f04f1 40122017-05-23 Dilian Palauzov <git-dpa@aegee.org>
4013
4014 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
4015 comments.
4016
25f94347
L
40172017-05-22 H.J. Lu <hongjiu.lu@intel.com>
4018
4019 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
4020 dynobj instead of htab->elf.dynobj.
4021
e5713223
MR
40222017-05-19 Maciej W. Rozycki <macro@imgtec.com>
4023
4024 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
4025 and function.
4026 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
4027 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
4028 actual number of internal relocations retrieved. Adjust
4029 function description.
4030 (bfd_elf64_canonicalize_reloc): Remove macro.
4031 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
4032
64517994
JM
40332017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
4034
4035 * archures.c (bfd_mach_sparc_v9m8): Define.
4036 (bfd_mach_sparc_v8plusm8): Likewise.
4037 (bfd_mach_sparc_v9_p): Adjust to M8.
4038 (bfd_mach_sparc_64bit_p): Likewise.
4039 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
4040 bfd_mach_sparc_v8plusm8.
4041 * bfd-in2.h: Regenerated.
4042 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
4043 sparc:v8plusm8.
4044 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
4045 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
4046 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
4047 SHA3.
4048 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
4049 bfd_mach_sparc_v8plusm8.
4050
eb026f09
AM
40512017-05-19 Alan Modra <amodra@gmail.com>
4052
4053 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
4054 debug and special sections when no non-note alloc sections in an
4055 object are kept.
4056
535b785f
AM
40572017-05-18 Alan Modra <amodra@gmail.com>
4058
4059 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
4060 * elf-m10300.c: Likewise.
4061 * elf.c: Likewise.
4062 * elf32-arc.c: Likewise.
4063 * elf32-bfin.c: Likewise.
4064 * elf32-m68k.c: Likewise.
4065 * elf32-nds32.c: Likewise.
4066 * elf32-tilepro.c: Likewise.
4067 * elflink.c: Likewise.
4068 * elfnn-aarch64.c: Likewise.
4069 * elfnn-riscv.c: Likewise.
4070 * elfxx-tilegx.c: Likewise.
4071 * mach-o.c: Likewise.
4072 * peXXigen.c: Likewise.
4073 * vms-alpha.c: Likewise.
4074 * vms-lib.c: Likewise.
4075
b7c871ed
L
40762017-05-17 H.J. Lu <hongjiu.lu@intel.com>
4077
4078 PR ld/20882
4079 * elflink.c (elf_gc_mark_debug_section): New function.
4080 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
4081 referenced by kept debug sections.
4082
bc4e12de
AM
40832017-05-16 Alan Modra <amodra@gmail.com>
4084
4085 * elf-m10300.c: Rename occurrences of non_ir_ref.
4086 * elf32-arm.c: Likewise.
4087 * elf32-bfin.c: Likewise.
4088 * elf32-cr16.c: Likewise.
4089 * elf32-cris.c: Likewise.
4090 * elf32-d10v.c: Likewise.
4091 * elf32-dlx.c: Likewise.
4092 * elf32-fr30.c: Likewise.
4093 * elf32-frv.c: Likewise.
4094 * elf32-hppa.c: Likewise.
4095 * elf32-i370.c: Likewise.
4096 * elf32-i386.c: Likewise.
4097 * elf32-iq2000.c: Likewise.
4098 * elf32-lm32.c: Likewise.
4099 * elf32-m32c.c: Likewise.
4100 * elf32-m32r.c: Likewise.
4101 * elf32-m68hc1x.c: Likewise.
4102 * elf32-m68k.c: Likewise.
4103 * elf32-mcore.c: Likewise.
4104 * elf32-metag.c: Likewise.
4105 * elf32-microblaze.c: Likewise.
4106 * elf32-moxie.c: Likewise.
4107 * elf32-msp430.c: Likewise.
4108 * elf32-mt.c: Likewise.
4109 * elf32-nios2.c: Likewise.
4110 * elf32-or1k.c: Likewise.
4111 * elf32-ppc.c: Likewise.
4112 * elf32-rl78.c: Likewise.
4113 * elf32-s390.c: Likewise.
4114 * elf32-score.c: Likewise.
4115 * elf32-score7.c: Likewise.
4116 * elf32-sh.c: Likewise.
4117 * elf32-tic6x.c: Likewise.
4118 * elf32-tilepro.c: Likewise.
4119 * elf32-v850.c: Likewise.
4120 * elf32-vax.c: Likewise.
4121 * elf32-xstormy16.c: Likewise.
4122 * elf32-xtensa.c: Likewise.
4123 * elf64-alpha.c: Likewise.
4124 * elf64-hppa.c: Likewise.
4125 * elf64-ia64-vms.c: Likewise.
4126 * elf64-mmix.c: Likewise.
4127 * elf64-ppc.c: Likewise.
4128 * elf64-s390.c: Likewise.
4129 * elf64-sh64.c: Likewise.
4130 * elf64-x86-64.c: Likewise.
4131 * elflink.c: Likewise.
4132 * elfnn-aarch64.c: Likewise.
4133 * elfnn-ia64.c: Likewise.
4134 * elfnn-riscv.c: Likewise.
4135 * elfxx-mips.c: Likewise.
4136 * elfxx-sparc.c: Likewise.
4137 * elfxx-tilegx.c: Likewise.
4138 * linker.c: Likewise.
4139
4070765b
AM
41402017-05-16 Alan Modra <amodra@gmail.com>
4141
4142 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
4143 * elflink.c (elf_link_add_object_symbols): Update to use
4144 non_ir_ref_dynamic.
4145 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
4146 non_ir_ref.
4147 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
4148
25499ac7
MR
41492017-05-15 Maciej W. Rozycki <macro@imgtec.com>
4150
4151 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
4152
73caa85d
L
41532017-05-12 H.J. Lu <hongjiu.lu@intel.com>
4154
4155 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
4156 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
4157 properties.
4158 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4159
f2c29a16
L
41602017-05-11 H.J. Lu <hongjiu.lu@intel.com>
4161
4162 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
4163 to plt_second.
4164 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
4165 to plt_second/plt_second_eh_frame.
4166 (elf_x86_64_link_hash_newfunc): Updated.
4167 (elf_x86_64_allocate_dynrelocs): Likewise.
4168 (elf_x86_64_size_dynamic_sections): Likewise.
4169 (elf_x86_64_relocate_section): Likewise.
4170 (elf_x86_64_finish_dynamic_symbol): Likewise.
4171 (elf_x86_64_finish_dynamic_sections): Likewise.
4172 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
4173 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
4174 .plt.sec section.
4175 (elf_backend_setup_gnu_properties): Updated. Create the
4176 .plt.sec section instead of the .plt.sec section.
4177
dc2be3d2
L
41782017-05-11 H.J. Lu <hongjiu.lu@intel.com>
4179
4180 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
4181 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
4182 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
4183
db84b98a
JM
41842017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
4185
4186 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
4187 (bfd_elf64_set_reloc): Define.
4188 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
4189
23186865
JM
41902017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
4191
4192 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
4193 (struct bfd_target): New field _bfd_set_reloc.
4194 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
4195 * reloc.c (_bfd_generic_set_reloc): New function.
4196 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
4197 * nlm-target.h (nlm_set_reloc): Likewise.
4198 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
4199 * aout-tic30.c (MY_set_reloc): Likewise.
4200 * aout-target.h (MY_set_reloc): Likewise.
4201 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
4202 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
4203 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
4204 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
4205 * aout-adobe.c (aout_32_set_reloc): Likewise.
4206 * bout.c (b_out_set_reloc): Likewise.
4207 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
4208 * i386os9k.c (aout_32_set_reloc): Likewise.
4209 * ieee.c (ieee_set_reloc): Likewise.
4210 * oasys.c (oasys_set_reloc): Likewise.
4211 * som.c (som_set_reloc): Likewise.
4212 * versados.c (versados_set_reloc): Likewise.
4213 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
4214 _bfd_generic_set_reloc.
4215 (rs6000_xcoff64_aix_vec): LIkewise.
4216 * libbfd.c (_bfd_norelocs_set_reloc): New function.
4217 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
4218 * i386msdos.c (msdos_set_reloc): Define to
4219 _bfd_norelocs_set_reloc.
4220 * elfcode.h (elf_set_reloc): Define.
4221 * bfd-in2.h: Regenerated.
4222
aab82f4c
L
42232017-05-10 H.J. Lu <hongjiu.lu@intel.com>
4224
4225 PR ld/21481
4226 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
4227 for IFUNC function address.
4228
53a346d8
CZ
42292017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
4230
4231 * elf32-arc.c (FEATURE_LIST_NAME): Define.
4232 (CONFLICT_LIST): Likewise.
4233 (opcode/arc-attrs.h): Include.
4234 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
4235 (arc_extract_features): New file.
4236 (arc_stralloc): Likewise.
4237 (arc_elf_merge_attributes): Likewise.
4238 (arc_elf_merge_private_bfd_data): Use object attributes.
4239 (bfd_arc_get_mach_from_attributes): New function.
4240 (arc_elf_object_p): Use object attributes.
4241 (arc_elf_final_write_processing): Likewise.
4242 (elf32_arc_obj_attrs_arg_type): New function.
4243 (elf32_arc_obj_attrs_handle_unknown): Likewise.
4244 (elf32_arc_section_from_shdr): Likewise.
4245 (elf_backend_obj_attrs_vendor): Define.
4246 (elf_backend_obj_attrs_section): Likewise.
4247 (elf_backend_obj_attrs_arg_type): Likewise.
4248 (elf_backend_obj_attrs_section_type): Likewise.
4249 (elf_backend_obj_attrs_handle_unknown): Likewise.
4250 (elf_backend_section_from_shdr): Likewise.
4251
e645cf40
AG
42522017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
4253
4254 PR ld/21458
4255 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
4256 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
4257 and the destination is a Thumb symbol.
4258
dd9e66ee
L
42592017-05-08 H.J. Lu <hongjiu.lu@intel.com>
4260
4261 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
4262 initializer to silence GCC 4.2.
4263 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
4264
38b12349
L
42652017-05-08 H.J. Lu <hongjiu.lu@intel.com>
4266
4267 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
4268 (LAZY_PLT_ENTRY_SIZE): This.
4269 (NON_LAZY_PLT_ENTRY_SIZE): New.
4270 (elf_x86_64_plt0_entry): Renamed to ...
4271 (elf_x86_64_lazy_plt0_entry): This.
4272 (elf_x86_64_plt_entry): Renamed to ...
4273 (elf_x86_64_lazy_plt_entry): This.
4274 (elf_x86_64_bnd_plt0_entry): Renamed to ...
4275 (elf_x86_64_lazy_bnd_plt0_entry): This.
4276 (elf_x86_64_legacy_plt_entry): Removed.
4277 (elf_x86_64_bnd_plt_entry): Renamed to ...
4278 (elf_x86_64_lazy_bnd_plt_entry): This.
4279 (elf_x86_64_legacy_plt2_entry): Renamed to ...
4280 (elf_x86_64_non_lazy_plt_entry): This.
4281 (elf_x86_64_bnd_plt2_entry): Renamed to ...
4282 (elf_x86_64_non_lazy_bnd_plt_entry): This.
4283 (elf_x86_64_eh_frame_plt): Renamed to ...
4284 (elf_x86_64_eh_frame_lazy_plt): This.
4285 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
4286 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
4287 (elf_x86_64_eh_frame_plt_got): Renamed to ...
4288 (elf_x86_64_eh_frame_non_lazy_plt): This.
4289 (elf_x86_64_lazy_plt_layout): New.
4290 (elf_x86_64_non_lazy_plt_layout): Likewise.
4291 (elf_x86_64_plt_layout): Likewise.
4292 (elf_x86_64_backend_data): Remove PLT layout information. Add
4293 os for target system.
4294 (GET_PLT_ENTRY_SIZE): Removed.
4295 (elf_x86_64_lazy_plt): New.
4296 (elf_x86_64_non_lazy_plt): Likewise.
4297 (elf_x86_64_lazy_bnd_plt): Likewise.
4298 (elf_x86_64_non_lazy_bnd_plt): Likewise.
4299 (elf_x86-64_arch_bed): Updated.
4300 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
4301 (elf_x86_64_create_dynamic_sections): Removed.
4302 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
4303 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
4304 (elf_x86-64_adjust_dynamic_symbol): Updated.
4305 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
4306 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
4307 size for PLT0 if there is no PLT0. Get plt_entry_size from
4308 non_lazy_plt for non-lazy PLT entries.
4309 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
4310 from non_lazy_plt for non-lazy PLT entries.
4311 (elf_x86-64_relocate_section): Updated. Properly get PLT index
4312 if there is no PLT0.
4313 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
4314 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
4315 entries with non-lazy PLT layout. Don't fill the second and third
4316 slots in the PLT entry if there is no PLT0.
4317 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
4318 if there is no PLT0. Set sh_entsize on the .plt.got section.
4319 (compare_relocs): New.
4320 (elf_x86_64_plt_type): Likewise.
4321 (elf_x86_64_plt): Likewise.
4322 (elf_x86_64_nacl_plt): New. Forward declaration.
4323 (elf_x86_64_get_plt_sym_val): Removed.
4324 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
4325 against all dynamic relocations.
4326 (elf_x86_64_link_setup_gnu_properties): New function.
4327 (elf_backend_create_dynamic_sections): Updated.
4328 (elf_backend_setup_gnu_properties): New.
4329 (elf_x86_64_nacl_plt): New.
4330 (elf_x86_64_nacl_arch_bed): Updated.
4331
f604c2a2
L
43322017-05-08 H.J. Lu <hongjiu.lu@intel.com>
4333
4334 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
4335 (LAZY_PLT_ENTRY_SIZE): This.
4336 (NON_LAZY_PLT_ENTRY_SIZE): New.
4337 (elf_i386_plt0_entry): Renamed to ...
4338 (elf_i386_lazy_plt0_entry): This.
4339 (elf_i386_plt_entry): Renamed to ...
4340 (elf_i386_lazy_plt_entry): This.
4341 (elf_i386_pic_plt0_entry): Renamed to ...
4342 (elf_i386_pic_lazy_plt0_entry): This.
4343 (elf_i386_pic_plt_entry): Renamed to ...
4344 (elf_i386_pic_lazy_plt_entry): This.
4345 (elf_i386_got_plt_entry): Renamed to ...
4346 (elf_i386_non_lazy_plt_entry): This.
4347 (elf_i386_pic_got_plt_entry): Renamed to ...
4348 (elf_i386_pic_non_lazy_plt_entry): This.
4349 (elf_i386_eh_frame_plt): Renamed to ...
4350 (elf_i386_eh_frame_lazy_plt): This.
4351 (elf_i386_eh_frame_plt_got): Renamed to ...
4352 (elf_i386_eh_frame_non_lazy_plt): This.
4353 (elf_i386_plt_layout): Renamed to ...
4354 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
4355 eh_frame_plt_got_size.
4356 (elf_i386_non_lazy_plt_layout): New.
4357 (elf_i386_plt_layout): Likewise.
4358 (elf_i386_non_lazy_plt): Likewise.
4359 (GET_PLT_ENTRY_SIZE): Removed.
4360 (elf_i386_plt): Renamed to ...
4361 (elf_i386_lazy_plt): This.
4362 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
4363 (elf_i386_arch_bed): Updated.
4364 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
4365 (elf_i386_create_dynamic_sections): Removed.
4366 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
4367 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
4368 (elf_i386_adjust_dynamic_symbol): Updated.
4369 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
4370 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
4371 size for PLT0 if there is no PLT0.
4372 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
4373 output section is discarded only if GOT isn't empty.
4374 (elf_i386_relocate_section): Updated. Properly get PLT index
4375 if there is no PLT0.
4376 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
4377 second and third slots in the PLT entry if there is no PLT0.
4378 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
4379 if there is no PLT0. Set sh_entsize on the .plt.got section.
4380 (elf_i386_nacl_plt): Forward declaration.
4381 (elf_i386_get_plt_sym_val): Removed.
4382 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
4383 against all dynamic relocations.
4384 (elf_i386_link_setup_gnu_properties): New function.
4385 (elf_backend_create_dynamic_sections): Updated.
4386 (elf_backend_setup_gnu_properties): New.
4387 (elf_i386_nacl_plt): Updated.
4388 (elf_i386_nacl_arch_bed): Likewise.
4389 (elf_i386_vxworks_arch_bed): Likewise.
4390
046734ff
TP
43912017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
4392
4393 * elflink.c (elf_output_implib): Remove executable flag from import
4394 library bfd.
4395 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
4396 library is a relocatable object file.
4397
b660e9eb
SKS
43982017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
4399
4400 PR ld/21404
4401 * elf32-avr.c (avr_should_move_sym): New function.
4402 (avr_should_reduce_sym_size): Likewise.
4403 (avr_should_increase_sym_size): Likewise.
4404 (elf32_avr_relax_delete_bytes): Adjust symbol values
4405 and sizes by calling new functions.
4406
763a5fa4
PD
44072017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
4408
4409 * config.bfd (riscv32-*): Enable rv64.
4410
73ec947d
AM
44112017-05-02 Alan Modra <amodra@gmail.com>
4412
4413 PR 21384
4414 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
4415 rather than h->root.type == bfd_link_hash_new.
4416 (bfd_elf_record_link_assignment): Similarly, call
4417 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
4418
a941291c
AM
44192017-04-29 Alan Modra <amodra@gmail.com>
4420
4421 PR 21432
4422 * reloc.c (reloc_offset_in_range): New function.
4423 (bfd_perform_relocation, bfd_install_relocation): Use it.
4424 (_bfd_final_link_relocate): Likewise.
4425
750eaa47
L
44262017-04-28 H.J. Lu <hongjiu.lu@intel.com>
4427
4428 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
4429 before using .plt.got.
4430 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
4431
5b66fac4
L
44322017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4433
4434 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
4435 instead of "+=" to update 0.
4436
de9a3c42
L
44372017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4438
4439 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
4440 .plt.got section here.
4441 (elf_i386_check_relocs): Don't create the .plt.got section.
4442 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
4443 the .plt.got and .plt.bnd sections here.
4444 (elf_x86_64_check_relocs): Don't create the .plt.got nor
4445 .plt.bnd sections.
4446
da3d25af
L
44472017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4448
4449 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
4450 has_bnd_reloc.
4451 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
4452 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
4453 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
4454 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
4455 has_bnd_reloc.
4456
fba37edd
L
44572017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4458
4459 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
4460 to return bfd *.
4461 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
4462 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
4463 the first relocatable ELF input with GNU properties.
4464
1f78f649
L
44652017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4466
4467 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
4468 VxWorks for non-PIC.
4469
76c20d54
AM
44702017-04-27 Alan Modra <amodra@gmail.com>
4471
4472 * elf-bfd.h (struct elf_backend_data): Make asection param of
4473 elf_backend_eh_frame_address_size const.
4474 (_bfd_elf_eh_frame_address_size): Likewise.
4475 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
4476 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
4477 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
4478 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
4479 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
4480 (next_cie_fde_offset): Constify params.
4481 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
4482
d7153c4a
AM
44832017-04-27 Alan Modra <amodra@gmail.com>
4484
4485 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
4486 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
4487 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
4488 aug_data_len.
4489 (offset_adjust): New function.
4490 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
4491 (adjust_eh_frame_local_symbols): Likewise.
4492 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
4493 after changing anything. Return true if anything changed.
4494 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
4495 _bfd_elf_adjust_eh_frame_global_symbol for globals.
4496
641338d8
AM
44972017-04-27 Alan Modra <amodra@gmail.com>
4498
4499 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
4500 when force_local.
4501
21d68fcd
AM
45022017-04-27 Alan Modra <amodra@gmail.com>
4503
4504 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
4505 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
4506 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
4507 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
4508 for undef and undefweak dyn_relocs.
4509 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
4510 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
4511 (allocate_got, allocate_dynrelocs): Likewise.
4512 (ppc64_elf_relocate_section): Likewise.
4513
97d343d4
L
45142017-04-26 H.J. Lu <hongjiu.lu@intel.com>
4515
4516 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
4517 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
4518 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
4519 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
4520
04b31182
NC
45212017-04-26 Nick Clifton <nickc@redhat.com>
4522
4523 PR binutils/21434
4524 * reloc.c (bfd_perform_relocation): Check for a negative address
4525 in the reloc.
4526
23ec1e32
MR
45272017-04-26 Maciej W. Rozycki <macro@imgtec.com>
4528
4529 PR ld/21334
4530 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
4531 member.
4532 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
4533 (elf_backend_always_renumber_dynsyms): Define.
4534 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
4535 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
4536 * elflink.c (bfd_elf_size_dynamic_sections): Also call
4537 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
4538 it.
4539 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
4540
c46cec3a
MR
45412017-04-26 Maciej W. Rozycki <macro@imgtec.com>
4542
4543 * elflink.c (bfd_elf_size_dynamic_sections): Only call
4544 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
4545 sections have been created.
4546
e63d1232
NC
45472017-04-26 Nick Clifton <nickc@redhat.com>
4548
4549 PR binutils/21431
4550 * compress.c (bfd_init_section_compress_status): Check the return
4551 value from bfd_malloc.
4552
9e9821dd
L
45532017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4554
4555 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
4556 no_finish_dynamic_symbol.
4557 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
4558 0.
4559 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
4560 weak symbol, don't make it dynamic.
4561 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
4562 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
4563 relocation for GOT reference.
4564 (elf_x86_64_finish_dynamic_symbol): Abort if
4565 no_finish_dynamic_symbol isn't 0.
4566
0dc9a308
L
45672017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4568
4569 PR ld/21402
4570 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
4571 undefined weak symbol, don't make it dynamic.
4572 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
4573 set no_finish_dynamic_symbol and generate R_386_RELATIVE
4574 relocation for R_386_GOT32.
4575
1587442d
L
45762017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4577
4578 PR ld/21425
4579 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
4580
7eacd66b
AM
45812017-04-23 Alan Modra <amodra@gmail.com>
4582
4583 PR 21414
4584 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
4585 * elf.c (lcomm_sym): New.
4586 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
4587 * bfd-in2.h: Regenerate.
4588
bce964aa
AM
45892017-04-23 Alan Modra <amodra@gmail.com>
4590
4591 PR 21412
4592 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
4593 parameters and comment.
4594 (_bfd_elf_get_reloc_section): Delete.
4595 (_bfd_elf_plt_get_reloc_section): Declare.
4596 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
4597 New functions. Don't blindly skip over assumed .rel/.rela prefix.
4598 Extracted from..
4599 (_bfd_elf_get_reloc_section): ..here. Delete.
4600 (assign_section_numbers): Call elf_get_reloc_section.
4601 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
4602 * elfxx-target.h (elf_backend_get_reloc_section): Update.
4603
97e83a10
AM
46042017-04-23 Alan Modra <amodra@gmail.com>
4605
4606 PR 21409
4607 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
4608 no symbols.
4609
e133d005
L
46102017-04-21 H.J. Lu <hongjiu.lu@intel.com>
4611
4612 PR ld/21402
4613 * elf32-i386.c (elf_i386_link_hash_entry): Add
4614 no_finish_dynamic_symbol.
4615 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
4616 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
4617 symbol, don't make it dynamic in PIE.
4618 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
4619 set no_finish_dynamic_symbol and generate R_386_RELATIVE
4620 relocation for R_386_GOT32
4621 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
4622 isn't 0.
4623
3c5fce9b
L
46242017-04-21 H.J. Lu <hongjiu.lu@intel.com>
4625
4626 PR ld/19617
4627 PR ld/21086
4628 * elflink.c (elf_link_add_object_symbols): Require
4629 --no-dynamic-linker with -E/--dynamic-list when creating
4630 dynamic sections.
4631
0fad2956
MR
46322017-04-20 Maciej W. Rozycki <macro@imgtec.com>
4633
4634 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
4635 if forced local.
4636
64575f78
MR
46372017-04-20 Maciej W. Rozycki <macro@imgtec.com>
4638
4639 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
4640 dynamic symbol sorting.
4641
59fa66c5
L
46422017-04-20 H.J. Lu <hongjiu.lu@intel.com>
4643
4644 PR ld/21382
4645 * elflink.c (elf_link_add_object_symbols): Preserve
4646 dynamic_ref_after_ir_def when restoring the symbol table for
4647 unneeded dynamic object.
4648
e492d2f8
L
46492017-04-19 H.J. Lu <hongjiu.lu@intel.com>
4650
4651 PR ld/21401
4652 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
4653 on on undefined IFUNC symbol in the second PLT.
4654
10169134
WAF
46552017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
4656
4657 * peXXigen.c (pe_print_reloc): Correct chunk_end.
4658
954b63d4
AM
46592017-04-19 Alan Modra <amodra@gmail.com>
4660
4661 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
4662 or make dynamic for info->dynamic_undefined_weak 0 and 1.
4663 * elf32-ppc.c:Formatting.
4664 (ensure_undefweak_dynamic): Don't make dynamic when
4665 info->dynamic_undefined_weak is zero.
4666 (allocate_dynrelocs): Discard undefweak dyn_relocs for
4667 info->dynamic_undefined_weak. Discard undef dyn_relocs when
4668 not default visibility. Discard undef and undefweak
4669 dyn_relocs earlier.
4670 (ppc_elf_relocate_section): Adjust to suit.
4671 * elf64-ppc.c: Formatting.
4672 (ensure_undefweak_dynamic): Don't make dynamic when
4673 info->dynamic_undefined_weak is zero.
4674 (allocate_dynrelocs): Discard undefweak dyn_relocs for
4675 info->dynamic_undefined_weak. Discard them earlier.
4676
e6699019
L
46772017-04-17 H.J. Lu <hongjiu.lu@intel.com>
4678
4679 PR ld/21389
4680 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
4681 before generating the version definition section.
4682
c5d37467
AM
46832017-04-17 Alan Modra <amodra@gmail.com>
4684
4685 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
4686 state when a regular object file defines a symbol with
4687 incompatible type to that defined by an earlier shared lib.
4688
63a5468a
AM
46892017-04-13 Alan Modra <amodra@gmail.com>
4690
4691 * coffcode.h: Wrap some overly long _bfd_error_handler args.
4692 * elf.c: Likewise.
4693 * elf32-arm.c: Likewise.
4694 * elf32-i386.c: Likewise.
4695 * elf32-mep.c: Likewise.
4696 * elf64-ia64-vms.c: Likewise.
4697 * elf64-x86-64.c: Likewise.
4698 * elflink.c: Likewise.
4699 * elfnn-ia64.c: Likewise.
4700 * elfxx-mips.c: Likewise.
4701
dae82561
AM
47022017-04-13 Alan Modra <amodra@gmail.com>
4703
4704 * aoutx.h: Use %B and %A in error messages throughout file.
4705 * aout-cris.c: Likewise.
4706 * archive.c: Likewise.
4707 * binary.c: Likewise.
4708 * coff-rs6000.c: Likewise.
4709 * coff-tic4x.c: Likewise.
4710 * coffcode.h: Likewise.
4711 * coffgen.c: Likewise.
4712 * cofflink.c: Likewise.
4713 * coffswap.h: Likewise.
4714 * cpu-arm.c: Likewise.
4715 * elf-eh-frame.c: Likewise.
4716 * elf-m10300.c: Likewise.
4717 * elf.c: Likewise.
4718 * elf32-arc.c: Likewise.
4719 * elf32-arm.c: Likewise.
4720 * elf32-bfin.c: Likewise.
4721 * elf32-frv.c: Likewise.
4722 * elf32-iq2000.c: Likewise.
4723 * elf32-m32c.c: Likewise.
4724 * elf32-microblaze.c: Likewise.
4725 * elf32-nds32.c: Likewise.
4726 * elf32-rl78.c: Likewise.
4727 * elf32-rx.c: Likewise.
4728 * elf32-score.c: Likewise.
4729 * elf32-score7.c: Likewise.
4730 * elf32-sh64.c: Likewise.
4731 * elf32-v850.c: Likewise.
4732 * elf32-vax.c: Likewise.
4733 * elf32-visium.c: Likewise.
4734 * elf64-ia64-vms.c: Likewise.
4735 * elf64-mmix.c: Likewise.
4736 * elf64-sh64.c: Likewise.
4737 * elfcode.h: Likewise.
4738 * elfnn-aarch64.c: Likewise.
4739 * elfnn-ia64.c: Likewise.
4740 * elfxx-mips.c: Likewise.
4741 * hpux-core.c: Likewise.
4742 * ieee.c: Likewise.
4743 * ihex.c: Likewise.
4744 * linker.c: Likewise.
4745 * merge.c: Likewise.
4746 * mmo.c: Likewise.
4747 * oasys.c: Likewise.
4748 * pdp11.c: Likewise.
4749 * peXXigen.c: Likewise.
4750 * rs6000-core.c: Likewise.
4751 * vms-alpha.c: Likewise.
4752 * xcofflink.c: Likewise.
4753
c08bb8dd
AM
47542017-04-13 Alan Modra <amodra@gmail.com>
4755
4756 * bfd.c (PRINT_TYPE): Define.
4757 (_doprnt): New function.
4758 (error_handler_internal): Use _doprnt.
4759 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
4760 calls in their natural order, throughout file.
4761 * coff-mcore.c: Likewise.
4762 * coff-ppc.c: Likewise.
4763 * coff-tic80.c: Likewise.
4764 * cofflink.c: Likewise.
4765 * elf-s390-common.c: Likewise.
4766 * elf.c: Likewise.
4767 * elf32-arm.c: Likewise.
4768 * elf32-i386.c: Likewise.
4769 * elf32-m32r.c: Likewise.
4770 * elf32-msp430.c: Likewise.
4771 * elf32-spu.c: Likewise.
4772 * elf64-ia64-vms.c: Likewise.
4773 * elf64-sparc.c: Likewise.
4774 * elf64-x86-64.c: Likewise.
4775 * elflink.c: Likewise.
4776 * elfnn-aarch64.c: Likewise.
4777 * elfnn-ia64.c: Likewise.
4778 * elfxx-mips.c: Likewise.
4779
10463f39
AM
47802017-04-13 Alan Modra <amodra@gmail.com>
4781
4782 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
4783 branch veneers" error. Fix double space and format message.
4784 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
4785 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
4786
4af8774e
AM
47872017-04-13 Alan Modra <amodra@gmail.com>
4788
4789 * bfd-in2.h: Regenerate.
4790
e4097f5e
L
47912017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4792
4793 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
4794 extra `\n' in warning/error messages.
4795 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
4796 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4797
537616aa
L
47982017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4799
4800 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
4801 processor-specific properties with generic ELF target vector.
4802
bb1dd176
QZ
48032017-04-10 Qing Zhao <qing.zhao@oracle.com>
4804
4805 * elf32-sparc.c (elf_backend_fixup_symbol): New.
4806 * elf64-sparc.c (elf_backend_fixup_symbol): New.
4807 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
4808 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
4809 has_non_got_reloc.
4810 (link_hash_newfunc): Initialize has_got_reloc and
4811 has_non_got_reloc.
4812 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
4813 section.
4814 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
4815 has_non_got_reloc.
4816 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
4817 has_non_got_reloc.
4818 (_bfd_sparc_elf_fixup_symbol): New function.
4819 (allocate_dynrelocs): Don't allocate space for dynamic
4820 relocations and discard relocations against resolved undefined
4821 weak symbols in executable. Don't make resolved undefined weak
4822 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
4823 relocation against undefined weak symbols in PIE.
4824 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
4825 relocations against resolved undefined weak symbols in PIE
4826 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
4827 without ynamic PLT/GOT relocations for resolved undefined weak
4828 symbols.
4829 Don't generate dynamic relocation against resolved undefined
4830 weak symbol in executable.
4831 (pie_finish_undefweak_symbol): New function.
4832 (_bfd_sparc_elf_finish_dynamic_sections): Call
4833 pie_finish_undefweak_symbol on all symbols in PIE.
4834 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
4835 (_bfd_sparc_elf_fixup_symbol): New function.
4836
d236cfd4
NC
48372017-04-10 Nick Clifton <nickc@redhat.com>
4838
4839 * config.bfd: Remove ns32k from obsolete list.
4840
6f9dbcd4
AM
48412017-04-10 Alan Modra <amodra@gmail.com>
4842
4843 PR 21287
4844 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
4845 (special_sections_i): Likewise for .init_array.
4846 (special_sections_p): Likewise for .preinit_array.
4847
8170f769
L
48482017-04-07 H.J. Lu <hongjiu.lu@intel.com>
4849
4850 PR ld/19579
4851 PR ld/21306
4852 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
4853 ELF_COMMON_DEF_P for common symbols.
4854 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4855 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
4856 * elflink.c (_bfd_elf_merge_symbol): Revert commits
4857 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
4858 07492f668d2173da7a2bda3707ff0985e0f460b6.
4859
49f4617b
PA
48602017-04-07 Pedro Alves <palves@redhat.com>
4861
4862 * opncls.c (bfd_get_debug_link_info): Rename to...
4863 (bfd_get_debug_link_info_1): ... this. Change type of second
4864 parameter to void pointer. Adjust.
4865 (bfd_get_debug_link_info): Reimplement on top of
4866 bfd_get_debug_link_info_1.
4867 (separate_debug_file_exists, separate_alt_debug_file_exists):
4868 Change type of second parameter to void pointer. Adjust.
4869 (get_func_type, check_func_type): Change type of second parameter
4870 to void pointer.
4871 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
4872 the callback functions instead of passing the address of a local.
4873 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
4874 find_separate_debug_file.
4875 (get_alt_debug_link_info_shim): Change type of second parameter to
4876 void pointer. Adjust.
4877 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
4878 find_separate_debug_file.
4879 (get_build_id_name, bfd_boolean check_build_id_file): Change type
4880 of second parameter to void pointer. Adjust.
4881 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
4882 pointer local to find_separate_debug_file.
4883
48842017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
1fd6d111
TG
4885
4886 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
4887 external symbols with a definition.
4888 (_bfd_coff_gc_mark_extra_sections): Fix typo.
4889
86abf93a
AM
48902017-04-07 Alan Modra <amodra@gmail.com>
4891
4892 * po/SRC-POTFILES.in: Regenerate.
4893
8dea77f0
AM
48942017-04-05 Alan Modra <amodra@gmail.com>
4895
4896 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
4897 reference counting.
4898
477bdd39
JT
48992017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
4900
4901 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
4902 numbers for DataDirectory entry indicies passed to
4903 add_data_entry().
4904
a91e1603
L
49052017-04-04 H.J. Lu <hongjiu.lu@intel.com>
4906
4907 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
4908 each GNU_MBIND section and align GNU_MBIND section to page size.
4909 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
4910 segment for each GNU_MBIND section.
4911 (_bfd_elf_init_private_section_data): Copy sh_info from input
4912 for GNU_MBIND section.
4913
b5292032
PD
49142017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
4915
4916 * elfnn-riscv.c (GP_NAME): Delete.
4917 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
4918 (_bfd_riscv_relax_lui): Likewise.
4919
ad32986f
NC
49202017-04-04 Nick Clifton <nickc@redhat.com>
4921
4922 PR binutils/21342
4923 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
4924 dereference.
4925 (bfd_elf_final_link): Only initialize the extended symbol index
4926 section if there are extended symbol tables to list.
4927
46bed679
L
49282017-04-03 H.J. Lu <hongjiu.lu@intel.com>
4929
4930 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
4931 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
4932 * configure.ac (elf): Add elf-properties.lo.
4933 * Makefile.in: Regenerated.
4934 * configure: Likewise.
4935 * elf-bfd.h (elf_property_kind): New.
4936 (elf_property): Likewise.
4937 (elf_property_list): Likewise.
4938 (elf_properties): Likewise.
4939 (_bfd_elf_parse_gnu_properties): Likewise.
4940 (_bfd_elf_get_property): Likewise.
4941 (_bfd_elf_link_setup_gnu_properties): Likewise.
4942 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
4943 and setup_gnu_properties.
4944 (elf_obj_tdata): Add properties.
4945 * elf-properties.c: New file.
4946 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
4947 (elf_i386_merge_gnu_properties): Likewise.
4948 (elf_backend_parse_gnu_properties): Likewise.
4949 (elf_backend_merge_gnu_properties): Likewise.
4950 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4951 (elf_x86_64_merge_gnu_properties): Likewise.
4952 (elf_backend_parse_gnu_properties): Likewise.
4953 (elf_backend_merge_gnu_properties): Likewise.
4954 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
4955 (elf_backend_parse_gnu_properties): Likewise.
4956 (elf_backend_setup_gnu_properties): Likewise.
4957 (elfNN_bed): Add elf_backend_parse_gnu_properties,
4958 elf_backend_merge_gnu_properties and
4959 elf_backend_setup_gnu_properties.
4960
f96bd6c2
PC
49612017-03-30 Pip Cet <pipcet@gmail.com>
4962
4963 * elf32-wasm32.c: Add relocation code, two relocs.
4964 * reloc.c: Add wasm32 relocations.
4965 * libbfd.h: Regenerate.
4966 * bfd-in2.h: Regenerate.
4967 * bfd/po/bfd.pot: Regenerate.
4968
e643cb45
NC
49692017-03-29 Nick Clifton <nickc@redhat.com>
4970
4971 PR binutils/18025
4972 * coff-bfd.h (struct coff_section_data): Add new fields:
4973 saved_bias and bias.
4974 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
4975 computed for PE binaries.
4976 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
4977 missing abbrev.
4978
086554e8
HPN
49792017-03-28 Hans-Peter Nilsson <hp@axis.com>
4980
4981 PR ld/16044
4982 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
4983 to handle a local symbol with a hash-symbol-entry; without PLT.
4984 Add BFD_ASSERT for an incidental case with GOT entry present.
4985 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
4986 isn't forced-or-set local.
4987
a6be0538
PC
49882017-03-27 Pip Cet <pipcet@gmail.com>
4989
4990 * wasm-module.c: New file to support WebAssembly modules.
4991 * wasm-module.h: New file to support WebAssembly modules.
4992 * doc/webassembly.texi: Start documenting wasm-module.c.
4993 * config.bfd: Add wasm_vec.
4994 * targets.c: Likewise.
4995 * configure.ac: Likewise.
4996 * Makefile.am: Add entries for wasm-module.c.
4997 * Makefile.in: Regenerate.
4998 * configure: Regenerate.
4999 * po/SRC-POTFILES.in: Regenerate.
5000
79b1d3cb
PC
50012017-03-27 Pip Cet <pipcet@gmail.com>
5002
5003 * cpu-wasm32.c: New file to support wasm32 architecture.
5004 * elf32-wasm32.c: New file to support wasm32 architecture.
5005 * Makefile.am: Add wasm32 architecture.
5006 * archures.c: Likewise.
5007 * config.bfd: Likewise.
5008 * configure.ac: Likewise.
5009 * targets.c: Likewise.
5010 * Makefile.in: Regenerate.
5011 * bfd-in2.h: Regenerate.
5012 * configure: Regenerate.
5013 * po/SRC-POTFILES.in: Regenerate.
5014
aaed6f5b
AM
50152017-03-20 Alan Modra <amodra@gmail.com>
5016
5017 PR 21266
5018 * elf64-ppc.c (compare_symbols): Stabilize sort.
5019
82e66161
AM
50202017-03-18 Alan Modra <amodra@gmail.com>
5021
5022 * elf64-ppc.c (struct ppc_link_hash_table): Add
5023 local_ifunc_resolver and maybe_local_ifunc_resolver.
5024 (ppc_build_one_stub): Set flags on emitting dynamic
5025 relocation to ifunc.
5026 (ppc64_elf_relocate_section): Likewise.
5027 (ppc64_elf_finish_dynamic_symbol): Likewise.
5028 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
5029 local dynamic relocs to ifuncs.
5030 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
5031 local_ifunc_resolver and maybe_local_ifunc_resolver.
5032 (ppc_elf_relocate_section): Set flag on emitting dynamic
5033 relocation to ifuncs.
5034 (ppc_elf_finish_dynamic_symbol): Likewise.
5035 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
5036 dynamic relocs to ifuncs.
5037
f955cccf
NC
50382017-03-13 Nick Clifton <nickc@redhat.com>
5039
5040 PR binutils/21202
5041 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
5042 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
5043 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
5044 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
5045 * bfd-in2.h: Regenerate.
5046 * libbfd.h: Regenerate.
5047 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
5048 names.
5049 (IS_AARCH64_TLSDESC_RELOC): Likewise.
5050 (elfNN_aarch64_howto_table): Likewise.
5051 (aarch64_tls_transition_without_check): Likewise.
5052 (aarch64_reloc_got_type): Likewise.
5053 (elfNN_aarch64_final_link_relocate): Likewise.
5054 (elfNN_aarch64_tls_relax): Likewise.
5055 (elfNN_aarch64_relocate_section): Likewise.
5056 (elfNN_aarch64_gc_sweep_hook): Likewise.
5057 (elfNN_aarch64_check_relocs): Likewise.
5058 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
5059 (_bfd_aarch64_elf_resolve_relocation): Likewise.
5060
4aef7643
AM
50612017-03-11 Alan Modra <amodra@gmail.com>
5062
5063 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
5064 parameter is in fact used. Whitespace fixes.
5065 * elf64-ppc.c: Likewise.
5066
f03265d9
ST
50672017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
5068
5069 * rs6000-core.c (CORE_NEW): Simplify macro when
5070 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
5071
b1b07054
AM
50722017-03-07 Alan Modra <amodra@gmail.com>
5073
5074 PR 21224
5075 PR 20519
5076 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
5077 dyn_relocs check.
5078
2e0ce1c8
AM
50792017-03-05 Alan Modra <amodra@gmail.com>
5080
5081 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
5082 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
5083 (next_cie_fde_offset): New function.
5084 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
5085 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
5086 four bytes. Align CIEs to four or eight bytes depending on
5087 per_encoding_aligned8. Align FDEs according to their encoding.
5088 Pad last FDE to output section alignment.
5089 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
5090 assertion.
5091 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
5092 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
5093 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
5094
f98450c6
NC
50952017-03-02 Martin Bickel <binutils@ineranves.de>
5096
5097 PR ld/21212
5098 * elf.c (rewrite_elf_program_header): Do not issue a warning for
d20928fa 5099 empty segments which have a zero filesz, but a non-zero memsz.
f98450c6 5100
673cff9b
AM
51012017-03-02 Alan Modra <amodra@gmail.com>
5102
5103 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
5104
3de43e7b
AM
51052017-02-28 Alan Modra <amodra@gmail.com>
5106
5107 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
5108 (ppc64_elf_relocate_section): Likewise.
5109
4ef97a1b
AM
51102017-02-28 Alan Modra <amodra@gmail.com>
5111
5112 PR 20995
5113 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
5114 rather than elf32_nios2_hash_table or elf_hash_table.
5115 (create_got_section): Likewise.
5116 (nios2_elf32_finish_dynamic_symbol): Likewise.
5117 (nios2_elf32_adjust_dynamic_symbol): Likewise.
5118 (nios2_elf32_size_dynamic_sections): Likewise.
5119 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
5120 vars. Use htab equivalents directly instead. Don't create
5121 all dynamic sections on needing just the GOT. Use a goto
5122 rather than a fall-through with reloc test. Ensure
5123 htab->dynobj is set when making dynamic sreloc section.
5124 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
5125 equivalent directly instead. Don't segfault on looking for
5126 .dynamic when dynamic sections have not been created. Don't
5127 segfault on .got.plt being discarded.
5128 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
5129 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
5130 fixme and another not so relevant comment.
5131 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
5132 already set, set hash table dynobj on creating .sbss.
5133
7ba71655
AM
51342017-02-28 Alan Modra <amodra@gmail.com>
5135
5136 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
5137 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
5138 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
5139 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
5140 (ppc64_elf_relocate_section): Likewise.
5141 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
5142 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
5143 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
5144 * libbfd.h: Regenerate.
5145 * bfd-in2.h: Regenerate.
5146
afbf7e8e
AM
51472017-02-28 Alan Modra <amodra@gmail.com>
5148
5149 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
5150 dynamic .data.rel.ro read-only.
5151 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
5152 rather than section flags when deciding where copy reloc goes.
5153 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
5154 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
5155 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
5156 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
5157 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
5158 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
5159 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
5160 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
5161 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
5162 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
5163 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
5164 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
5165 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
5166 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
5167 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
5168 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
5169 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
5170 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
5171 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
5172
0e392101
MR
51732017-02-28 Maciej W. Rozycki <macro@imgtec.com>
5174
5175 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
5176 `jalr $0, $25' instruction encoding.
5177
bd757ca7
NC
51782017-02-27 Nick Clifton <nickc@redhat.com>
5179
5180 PR ld/21180
5181 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
5182 generating a seg-fault when encountering a symbol that has been
5183 deleted by garbage collection.
5184
034fed0b
AM
51852017-02-25 Alan Modra <amodra@gmail.com>
5186
5187 * elf32-arc.c (struct dynamic_sections): Delete.
5188 (enum dyn_section_types): Delete.
5189 (dyn_section_names): Delete.
5190 (arc_create_dynamic_sections): Delete.
5191 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
5192 segfault on discarded .rela.plt section.
5193 (elf_arc_size_dynamic_sections): Formatting. Don't call
5194 arc_create_dynamic_sections. Don't allocate memory for sections
5195 handled by the generic linker. Correct code finding relocs in
5196 read-only sections. Set SEC_EXCLUDE on zero size .got,
5197 .got.plt, and .dynbss sections. Do set .interp for pies.
5198
d0f744f9
AW
51992017-02-24 Andrew Waterman <andrew@sifive.com>
5200
5201 * elfnn-riscv.c (GP_NAME): New macro.
5202 (riscv_global_pointer_value): Use it.
5203 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
5204 output section, consider only that section's alignment.
5205
5d58c733
MR
52062017-02-23 Maciej W. Rozycki <macro@imgtec.com>
5207
5208 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
5209 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
5210 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
5211 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
5212
c1556ecd
MR
52132017-02-23 Maciej W. Rozycki <macro@imgtec.com>
5214
5215 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
5216 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
5217 or misaligned.
5218
5499c7c7
AM
52192017-02-23 Alan Modra <amodra@gmail.com>
5220
5221 PR 20744
5222 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
5223 16D relocations.
5224 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
5225 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
5226 relocs.
5227
902e9fc7
MR
52282017-02-22 Maciej W. Rozycki <macro@imgtec.com>
5229
5230 PR ld/20828
5231 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
5232 processing ahead of the call to `elf_gc_sweep_symbol'.
5233
758d96d8
NC
52342017-02-22 Nick Clifton <nickc@redhat.com>
5235
5236 PR binutils/21193
5237 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
5238 created section 4-byte alignment.
5239
6528b6eb
AM
52402017-02-22 Alan Modra <amodra@gmail.com>
5241
5242 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
5243 on .got or .plt output section being discarded by script.
5244 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
5245 vxworks splt temp.
5246
24f1a751
AM
52472017-02-21 Alan Modra <amodra@gmail.com>
5248
5249 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
5250 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
5251
64487780
AM
52522017-02-20 Alan Modra <amodra@gmail.com>
5253
5254 PR 21181
5255 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
5256 if DT_RELSZ/DT_RELASZ is zero.
5257
6438d1be
NC
52582017-02-17 Nick Clifton <nickc@redhat.com>
5259
5260 * compress.c (bfd_get_full_section_contents): Remember to reduce
5261 compressed size by the sizeof the compression header when
5262 decompressing the contents.
5263
4bc26c69
PA
52642017-02-17 Pedro Alves <palves@redhat.com>
5265
5266 * srec.c (Chunk): Rename to ...
5267 (_bfd_srec_len): ... this.
5268 (S3Forced): Rename to ...
5269 (_bfd_srec_forceS3): ... this.
5270 * objcopy.c: Adjust all references.
5271
7ec22e0f
PA
52722017-02-17 Pedro Alves <palves@redhat.com>
5273
5274 * archive.c (bsd_write_armap): Rename to ...
5275 (_bfd_bsd_write_armap): ... this.
5276 (coff_write_armap): Rename to ...
5277 (_bfd_coff_write_armap): ... this.
5278 * libbfd-in.h (bsd_write_armap): Rename to ...
5279 (_bfd_bsd_write_armap): ... this.
5280 (coff_write_armap): Rename to ...
5281 (_bfd_coff_write_armap): ... this.
5282 * aout-target.h, aout-tic30.c: Adjust all users.
5283 * libbfd.h: Regenerate.
5284
8c8402cc
PA
52852017-02-17 Pedro Alves <palves@redhat.com>
5286
5287 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
5288 (warn_deprecated): Rename to ...
5289 (_bfd_warn_deprecated): ... this.
5290 * libbfd.c (warn_deprecated): Rename to ...
5291 (_bfd_warn_deprecated): ... this.
5292 * bfd-in2.h: Regenerate.
5293
c7c3d11b
PA
52942017-02-17 Pedro Alves <palves@redhat.com>
5295
5296 * bfdio.c (real_ftell): Rename to ...
5297 (_bfd_real_ftell): ... this.
5298 (real_fseek): Rename to ...
5299 (_bfd_real_fseek): ... this.
5300 (real_fopen): Rename to ...
5301 (_bfd_real_fopen): ... this.
5302 * libbfd-in.h (real_ftell): Rename to ...
5303 (_bfd_real_ftell): ... this.
5304 (real_fseek): Rename to ...
5305 (_bfd_real_fseek): ... this.
5306 (real_fopen): Rename to ...
5307 (_bfd_real_fopen): ... this.
5308 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
5309 * libbfd.h: Regenerate.
5310
4265548c
PA
53112017-02-17 Pedro Alves <palves@redhat.com>
5312
5313 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
5314 * libbfd.c (read_unsigned_leb128): Rename to ...
5315 (_bfd_read_unsigned_leb128): ... this.
5316 (read_signed_leb128): Rename to ...
5317 (_bfd_read_signed_leb128): ... this.
5318 (safe_read_leb128): Rename to ...
5319 (_bfd_safe_read_leb128): ... this.
5320 * libbfd-in.h (read_unsigned_leb128): Rename to ...
5321 (_bfd_read_unsigned_leb128): ... this.
5322 (read_signed_leb128): Rename to ...
5323 (_bfd_read_signed_leb128): ... this.
5324 (safe_read_leb128): Rename to ...
5325 (_bfd_safe_read_leb128): ... this.
5326 * libbfd.h: Renegerate.
5327
3239a423
AB
53282017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
5329
5330 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
5331 before trying to fine matching file and line information.
5332
90ed9b8b
AB
53332017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
5334
5335 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
5336 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
5337 not match current bfd, then reload debug information. Record bfd
5338 we're loading debug info for in the stash. If we have debug
5339 informatin in the cache then perform section placement before
5340 returning.
5341
a8c75b76
AM
53422017-02-16 Alan Modra <amodra@gmail.com>
5343
5344 PR 21000
5345 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
5346 * elfxx-target.h (elf_backend_no_page_alias): Define.
5347 (elfNN_bed): Init new field.
5348 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
5349 ensure PT_LOAD segment starts on a new page.
5350 * elf32-hppa.c (elf_backend_no_page_alias): Define.
5351
247d6c4c
AM
53522017-02-16 Alan Modra <amodra@gmail.com>
5353
5354 PR 21132
5355 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
5356 if pic.
5357
90571206
JW
53582017-02-16 Jiong Wang <jiong.wang@arm.com>
5359
5360 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
5361 * bfd-in2.h: Regenerated.
5362
2a568401
L
53632017-02-15 H.J. Lu <hongjiu.lu@intel.com>
5364
5365 PR ld/21168
5366 * elf32-i386.c (elf_i386_relocate_section): Allow
5367 "lea foo@GOT, %reg" in PIC.
5368
a5def14f
L
53692017-02-15 H.J. Lu <hongjiu.lu@intel.com>
5370
5371 PR ld/20244
5372 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
5373 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
5374 error against local IFUNC symbol without a base register for
5375 PIC.
5376
174d0a74
MR
53772017-02-15 Maciej W. Rozycki <macro@imgtec.com>
5378
5379 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
5380 `%P: %H:' with `info->callbacks->einfo'.
5381 (ppc_elf_relocate_section): Likewise.
5382 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
5383 (ppc64_elf_edit_toc): Likewise.
5384 (ppc64_elf_relocate_section): Likewise.
5385
e278ae05
AM
53862017-02-14 Alan Modra <amodra@gmail.com>
5387
5388 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
5389 --gc-keep-exported, and test versioned field of sym rather than
5390 looking for @ in name.
5391
10ddfe62
PD
53922017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
5393
5394 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
5395 __global_pointer$.
5396
d11135f5
NC
53972017-02-13 Nick Clifton <nickc@redhat.com>
5398
5399 PR binutils/21151
5400 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
5401 unit length field.
5402
cc162427
AW
54032017-02-07 Andrew Waterman <andrew@sifive.com>
5404
5405 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
5406 entry size if PLT header is written.
5407
3d044c0c
SL
54082017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
5409
5410 Fix sparc64 dynamic relocation processing to use the dynamic
5411 symbol count.
5412 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
5413 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
5414 should be used.
5415
1b7e3d2f
NC
54162017-02-03 Nick Clifton <nickc@redhat.com>
5417
5418 PR 21096
5419 * coffcode.h (coff_write_object_contents): Enlarge size of
5420 s_name_buf in order to avoid compile time warning about possible
5421 integer truncation.
5422 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
5423 32-bits of insn value before printing into buffer.
5424
e17b0c35
MR
54252017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5426
5427 * elfxx-mips.c (mips_elf_hash_sort_data): Add
5428 `max_local_dynindx'.
5429 (mips_elf_sort_hash_table): Handle it.
5430 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
5431 symbols bump up `max_local_dynindx' rather than
5432 `max_non_got_dynindx'.
5433
55f8b9d2
MR
54342017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5435
5436 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
5437 `min_got_dynindx', `max_unref_got_dynindx' and
5438 `max_non_got_dynindx' members to the `bfd_size_type' data type.
5439 (mips_elf_sort_hash_table): Adjust accordingly.
5440
0f8c4b60
MR
54412017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5442
5443 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
5444 to access the hash table.
5445
17a80fa8
MR
54462017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5447
5448 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
5449 non-NULL `htab' to the beginning.
5450
8f56d4fd
MR
54512017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5452
5453 * elflink.c (elf_gc_sweep): Wrap overlong line.
5454
8b10b0b3
MR
54552017-01-30 Maciej W. Rozycki <macro@imgtec.com>
5456
5457 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
5458 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
5459 * elfxx-mips.c (mips_elf_link_hash_table): Add
5460 `ignore_branch_isa' member.
5461 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
5462 in branch relocation calculation as an error if
5463 `ignore_branch_isa' has been set.
5464 (_bfd_mips_elf_insn32): Rename to...
5465 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
5466 parameter to `insn32' and add an `ignore_branch_isa' parameter.
5467 Handle the new parameter.
5468
1fbd05e1
HPN
54692017-01-27 Hans-Peter Nilsson <hp@axis.com>
5470
22d9a0de
HPN
5471 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
5472 local variable dynobj.
5473
1fbd05e1
HPN
5474 PR ld/20995
5475 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
5476 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
5477 executable from read-only sections into sdynrelro.
5478 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
5479 dynamic relocs in sdynrelro.
5480 (elf_backend_want_dynrelro): Define.
5481
4a7324e1
SH
54822017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
5483
5484 * config.bfd (*-*-rtemsaout*): Mark as removed.
5485
c75b4ebd
SH
54862017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
5487
5488 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
5489 (arm-*-rtems*): Move to (arm*-*-eabi*).
5490 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
5491 (m68-*-rtems*): Move to (m68*-*-elf*).
5492
850d84f6
SH
54932017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
5494
5495 * config.bfd (*-*-rtemscoff*): Mark as removed.
5496
b531344c
MR
54972017-01-24 Maciej W. Rozycki <macro@imgtec.com>
5498
5499 PR ld/20828
5500 * elflink.c (bfd_elf_record_link_assignment): Revert last
5501 change and don't ever clear `forced_local'. Set `mark'
5502 unconditionally.
5503 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
5504 file.
5505 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
5506 (bfd_elf_size_dynamic_sections): ... here.
5507 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
5508 and set `mark' instead in `__tls_get_addr_opt' processing.
5509 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
5510
f0158f44
AM
55112017-01-24 Alan Modra <amodra@gmail.com>
5512
5513 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
5514 where dynamic relocs are preferable. Allow ifunc too.
5515 (ensure_undefweak_dynamic): New function.
5516 (allocate_dynrelocs): Use it here. Move plt handling last and
5517 don't make symbols dynamic, simplifying loop. Only make undef
5518 weak symbols with GOT entries dynamic. Correct condition
5519 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
5520 comments. Remove goto.
5521 (ppc_elf_relocate_section): Correct test for using dynamic
5522 symbol on GOT relocs. Rearrange test for emitting GOT relocs
5523 to suit. Set up explicit tls_index entries and implicit GOT
5524 tls_index entries resolvable at link time for
5525 __tls_get_addr_opt. Simplify test to clear mem for prelink.
5526 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
5527 (ensure_undefweak_dynamic): New function.
5528 (allocate_dynrelocs): Use it here. Only make undef weak symbols
5529 with GOT entries dynamic. Remove unnecessary test of
5530 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
5531 (ppc64_elf_relocate_section): Correct test for using dynamic
5532 symbol on GOT relocs. Rearrange test for emitting GOT relocs
5533 to suit. Set up explicit tls_index entries and implicit GOT
5534 tls_index entries resolvable at link time for __tls_get_addr_opt.
5535 Simplify expression to clear mem for prelink.
5536
2d0ca824
YN
55372017-01-23 Yury Norov <ynorov@caviumnetworks.com>
5538
5539 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
5540
7f784814
JW
55412017-01-20 Jiong Wang <jiong.wang@arm.com>
5542
5543 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
5544 (elf_backend_hash_symbol): Define.
5545
81ff47b3
MR
55462017-01-18 Maciej W. Rozycki <macro@imgtec.com>
5547
5548 PR ld/20828
5549 * elflink.c (bfd_elf_record_link_assignment): Clear any
5550 `forced_local' marking for DSO symbols that are not being
5551 provided.
5552
640d6bfd
KLC
55532017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
5554
5555 * elfnn-riscv.c (riscv_elf_object_p): New function.
5556
8361ed4d
L
55572017-01-12 H.J. Lu <hongjiu.lu@intel.com>
5558
5559 PR ld/21038
5560 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
5561 plt_bnd_eh_frame.
5562 (elf_x86_64_check_relocs): Create .eh_frame section for the
5563 .plt.bnd section.
5564 (elf_x86_64_size_dynamic_sections): Allocate and initialize
5565 .eh_frame section for the .plt.bnd section.
5566 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
5567 for the .plt.bnd section.
5568
2425a30e
NC
55692017-01-12 Nick Clifton <nickc@redhat.com>
5570
5571 PR binutils/20876
5572 * opncls.c (find_separate_debug_file): Add include_dirs
5573 parameter. Only include the directory part of the bfd's filename
5574 in search paths if include_dirs is true. Add a couple of extra
5575 locations for looking for debug files.
5576 ( bfd_follow_gnu_debuglink): Update invocation of
5577 find_separate_debug_file.
5578 (bfd_follow_gnu_debugaltlink): Likewise.
5579 (get_build_id): New function: Finds the build-id of the given bfd.
5580 (get_build_id_name): New function: Computes the name of the
5581 separate debug info file for a bfd, based upon its build-id.
5582 (check_build_id_file): New function: Checks to see if a separate
5583 debug info file exists at the given location, and that its
5584 build-id matches that of the original bfd.
5585 (bfd_follow_build_id_debuglink): New function: Finds a separate
5586 debug info file for a given bfd by using the build-id method.
5587 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
5588 method of locating a separate debug info file before using the
5589 debuglink method.
5590 * bfd-in2.h: Regenerate.
5591
9e659176
L
55922017-01-11 H.J. Lu <hongjiu.lu@intel.com>
5593
5594 PR ld/21038
5595 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
5596 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
5597 elf_x86_64_eh_frame_plt_got.
5598 (elf_x86_64_size_dynamic_sections): Get unwind info from
5599 elf_x86_64_bnd_arch_bed for the BND PLT.
5600
f2e2d2f5
JS
56012017-01-11 Jeremy Soller <jackpot51@gmail.com>
5602
5603 * config.bfd: Add entries for i686-redox and x86_64-redox.
5604
52b232b3
L
56052017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5606
5607 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
5608 to 4 bytes.
5609 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
5610 .eh_frame section to 4 bytes for x32.
5611 (elf_x86_64_check_relocs): Likewise.
5612
fff53dae
L
56132017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5614
5615 PR ld/20830
5616 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
5617 (PLT_GOT_FDE_LENGTH): Likewise.
5618 (elf_i386_plt_layout): Add eh_frame_plt_got and
5619 eh_frame_plt_got_size.
5620 (elf_i386_plt): Updated.
5621 (elf_i386_link_hash_table): Add plt_got_eh_frame.
5622 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
5623 (elf_i386_size_dynamic_sections): Allocate and initialize
5624 .eh_frame section for .plt.got.
5625 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
5626 .plt.got.
5627 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
5628 eh_frame_plt_got_size.
5629 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
5630 (PLT_GOT_FDE_LENGTH): Likewise.
5631 (elf_x86_64_backend_data): Add eh_frame_plt_got and
5632 eh_frame_plt_got_size.
5633 (elf_x86_64_arch_bed): Updated.
5634 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
5635 eh_frame_plt_got_size.
5636 (elf_x86_64_nacl_arch_bed): Likewise.
5637 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
5638 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
5639 (elf_x86_64_size_dynamic_sections): Allocate and initialize
5640 .eh_frame section for .plt.got.
5641 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
5642 for .plt.got.
5643
f129e49f
L
56442017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5645
5646 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
5647 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
5648
cd6581da
NC
56492017-01-09 Nick Clifton <nickc@redhat.com>
5650
5651 * dwarf2.c (lookup_address_in_function_table): Return early if
5652 there are no functions in the given comp unit, or if the high
5653 address of the last function in the comp unit is less than the
5654 desired address.
5655
98f02962
NC
56562017-01-09 Nick Clifton <nickc@redhat.com>
5657
5658 PR binutils/21013
5659 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
5660 message if there are too many symbols to load.
5661
ae4fda66
JC
56622017-01-04 James Clarke <jrtc27@jrtc27.com>
5663
5664 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
5665 if relocs are cached.
5666
de1010f4
RF
56672017-01-03 Rich Felker <bugdal@aerifal.cx>
5668
5669 PR ld/21017
5670 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
5671 for R_MICROBLAZE_GOTOFF_64.
5672
09fe2662
NC
56732017-01-03 Nick Clifton <nickc@redhat.com>
5674
5675 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
5676 warning about using a possibly uninitialised variable.
5677
595e0a47
AM
56782017-01-02 Alan Modra <amodra@gmail.com>
5679
5680 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
5681 (allocate_plt_static, allocate_dynrelocs): Use it.
5682
7bd9df3b
AM
56832017-01-02 Alan Modra <amodra@gmail.com>
5684
5685 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
5686 .PARISC.unwind section.
5687
5b86074c
AM
56882017-01-02 Alan Modra <amodra@gmail.com>
5689
5690 PR ld/20989
5691 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
5692 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
5693 indirect to GOT pointer relative code edit.
5694
2571583a
AM
56952017-01-02 Alan Modra <amodra@gmail.com>
5696
5697 Update year range in copyright notice of all files.
5698
5c1ad6b5 5699For older changes see ChangeLog-2016
3499769a 5700\f
5c1ad6b5 5701Copyright (C) 2017 Free Software Foundation, Inc.
3499769a
AM
5702
5703Copying and distribution of this file, with or without modification,
5704are permitted in any medium without royalty provided the copyright
5705notice and this notice are preserved.
5706
5707Local Variables:
5708mode: change-log
5709left-margin: 8
5710fill-column: 74
5711version-control: never
5712End:
This page took 0.449117 seconds and 4 git commands to generate.