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