1 2017-12-11 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
3 * bfd.c (bfd_get_sign_extend_vma): Correct typo.
5 2017-12-09 Alan Modra <amodra@gmail.com>
7 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): When emitting
8 dynamic R_SPARC_RELATIVE for GOT entries, ensure the section
11 2017-12-08 Nick Clifton <nickc@redhat.com>
13 * elfcode.h (elf_write_relocs): Check for an empty howto field.
15 2017-12-08 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
17 * bfd.c (bfd_get_sign_extend_vma): Handle aix5coff64-rs6000.
19 2017-12-06 Alan Modra <amodra@gmail.com>
21 * doc/header.sed: Trim trailing space when splitting lines.
22 * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-cris.c,
23 * aout-ns32k.c, * aout-target.h, * aout-tic30.c, * aoutf1.h, * aoutx.h,
24 * arc-got.h, * arc-plt.def, * arc-plt.h, * archive.c, * archive64.c,
25 * archures.c, * armnetbsd.c, * bfd-in.h, * bfd.c, * bfdio.c, * binary.c,
26 * bout.c, * cache.c, * cisco-core.c, * coff-alpha.c, * coff-apollo.c,
27 * coff-arm.c, * coff-h8300.c, * coff-i386.c, * coff-i860.c,
28 * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mcore.c,
29 * coff-mips.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
30 * coff-stgo32.c, * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c,
31 * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c,
32 * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c,
33 * coffswap.h, * compress.c, * corefile.c, * cpu-alpha.c, * cpu-arm.c,
34 * cpu-avr.c, * cpu-bfin.c, * cpu-cr16.c, * cpu-cr16c.c, * cpu-crx.c,
35 * cpu-d10v.c, * cpu-frv.c, * cpu-ft32.c, * cpu-i370.c, * cpu-i960.c,
36 * cpu-ia64-opc.c, * cpu-ip2k.c, * cpu-lm32.c, * cpu-m32r.c,
37 * cpu-mcore.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-moxie.c,
38 * cpu-mt.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-powerpc.c,
39 * cpu-pru.c, * cpu-sh.c, * cpu-spu.c, * cpu-v850.c, * cpu-v850_rh850.c,
40 * cpu-xgate.c, * cpu-z80.c, * dwarf1.c, * dwarf2.c, * ecoff.c,
41 * ecofflink.c, * ecoffswap.h, * elf-bfd.h, * elf-eh-frame.c,
42 * elf-hppa.h, * elf-m10200.c, * elf-m10300.c, * elf-s390-common.c,
43 * elf-strtab.c, * elf-vxworks.c, * elf.c, * elf32-am33lin.c,
44 * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-avr.h,
45 * elf32-bfin.c, * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c,
46 * elf32-crx.c, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c,
47 * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c,
48 * elf32-h8300.c, * elf32-hppa.c, * elf32-i386.c, * elf32-i860.c,
49 * elf32-i960.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32c.c,
50 * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c,
51 * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c,
52 * elf32-mep.c, * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c,
53 * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c,
54 * elf32-nds32.h, * elf32-nios2.c, * elf32-or1k.c, * elf32-pj.c,
55 * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c,
56 * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h,
57 * elf32-score7.c, * elf32-sh-symbian.c, * elf32-sh.c, * elf32-sh64.c,
58 * elf32-sparc.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilegx.c,
59 * elf32-tilegx.h, * elf32-tilepro.c, * elf32-tilepro.h, * elf32-v850.c,
60 * elf32-vax.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c,
61 * elf32-xgate.h, * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c,
62 * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
63 * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c,
64 * elf64-tilegx.c, * elf64-tilegx.h, * elf64-x86-64.c, * elfcore.h,
65 * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
66 * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c,
67 * elfxx-ia64.h, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-sparc.c,
68 * elfxx-tilegx.c, * elfxx-x86.c, * elfxx-x86.h, * freebsd.h, * hash.c,
69 * host-aout.c, * hp300hpux.c, * hppabsd-core.c, * hpux-core.c,
70 * i386aout.c, * i386linux.c, * i386lynx.c, * i386mach3.c, * i386msdos.c,
71 * i386netbsd.c, * ieee.c, * ihex.c, * irix-core.c, * libaout.h,
72 * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libnlm.h, * libpei.h,
73 * libxcoff.h, * linker.c, * lynx-core.c, * m68k4knetbsd.c,
74 * m68klinux.c, * m68knetbsd.c, * m88kmach3.c, * mach-o-aarch64.c,
75 * mach-o-arm.c, * mach-o-i386.c, * mach-o-target.c, * mach-o-x86-64.c,
76 * mach-o.c, * mach-o.h, * merge.c, * mipsbsd.c, * mmo.c, * netbsd.h,
77 * netbsd-core.c, * newsos3.c, * nlm-target.h, * nlm32-ppc.c,
78 * nlm32-sparc.c, * nlmcode.h, * ns32k.h, * ns32knetbsd.c, * oasys.c,
79 * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c,
80 * pe-mcore.c, * pe-mips.c, * pe-x86_64.c, * peXXigen.c, * pef.c,
81 * pef.h, * pei-arm.c, * pei-i386.c, * pei-mcore.c, * pei-x86_64.c,
82 * peicode.h, * plugin.c, * ppcboot.c, * ptrace-core.c, * reloc.c,
83 * riscix.c, * rs6000-core.c, * section.c, * som.c, * som.h,
84 * sparclinux.c, * sparcnetbsd.c, * srec.c, * stabs.c, * sunos.c,
85 * syms.c, * targets.c, * tekhex.c, * trad-core.c, * vax1knetbsd.c,
86 * vaxnetbsd.c, * verilog.c, * versados.c, * vms-alpha.c, * vms-lib.c,
87 * vms-misc.c, * wasm-module.c, * wasm-module.h, * xcofflink.c,
88 * xsym.c, * xsym.h: Whitespace fixes.
89 * bfd-in2.h, * libbfd.h, * libcoff.h: Regenerate.
91 2017-12-06 Alan Modra <amodra@gmail.com>
93 * elf32-lm32.c (lm32_elf_check_relocs): Skip non-ALLOC sections.
94 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
95 * elf32-nds32.c (nds32_elf_check_relocs): Likewise.
96 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
97 * elf32-sh.c (sh_elf_check_relocs): Likewise.
99 2017-12-06 Alan Modra <amodra@gmail.com>
101 * elf32-hppa.c (struct elf32_hppa_dyn_reloc_entry): Delete. Use
102 struct elf_dyn_relocs throughout file instead.
103 (elf32_hppa_adjust_dynamic_symbol): Comment tidy.
104 * elf32-lm32.c (struct elf_lm32_dyn_relocs): Delete. Use
105 struct elf_dyn_relocs throughout file instead.
106 (lm32_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
107 * elf32-m32r.c (struct elf_m32r_dyn_relocs): Delete. Use
108 struct elf_dyn_relocs throughout file instead.
109 (m32r_elf_adjust_dynamic_symbol): Use readonly_dynrelocs, but disable.
110 Disable -z no-copyreloc too.
111 * elf32-metag.c (struct elf_metag_dyn_reloc_entry): Delete. Use
112 struct elf_dyn_relocs throughout file instead.
113 (elf_metag_adjust_dynamic_symbol): Use readonly_dynrelocs.
114 * elf32-microblaze.c (struct elf32_mb_dyn_relocs): Delete. Use
115 struct elf_dyn_relocs throughout file instead.
116 (readonly_dynrelocs): New function.
117 (microblaze_elf_adjust_dynamic_symbol): Use it.
118 * elf32-nds32.c (struct elf_nds32_dyn_relocs): Delete. Use
119 struct elf_dyn_relocs throughout file instead.
120 (nds32_elf_adjust_dynamic_symbol): Use readonly_dynrelocs, but disable.
121 Disable -z no-copyreloc too.
122 * elf32-nios2.c (struct elf32_nios2_dyn_relocs): Delete. Use
123 struct elf_dyn_relocs throughout file instead.
124 * elf32-or1k.c (struct elf_or1k_dyn_relocs): Delete. Use
125 struct elf_dyn_relocs throughout file instead.
126 (or1k_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
127 * elf32-sh.c (struct elf_sh_dyn_relocs): Delete. Use
128 struct elf_dyn_relocs throughout file instead.
129 (sh_elf_adjust_dynamic_symbol): Use readonly_dynrelocs, but disable.
130 Disable -z no-copyreloc too.
131 * elf32-tilepro.c (struct tilepro_elf_dyn_relocs): Delete. Use
132 struct elf_dyn_relocs throughout file instead.
133 (tilepro_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
134 * elfnn-riscv.c (struct riscv_elf_dyn_relocs): Delete. Use
135 struct elf_dyn_relocs throughout file instead.
136 (riscv_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
137 * elfxx-sparc.c (struct _bfd_sparc_elf_dyn_relocs): Delete. Use
138 struct elf_dyn_relocs throughout file instead.
139 (_bfd_sparc_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
140 * elfxx-tilegx.c (struct tilegx_elf_dyn_relocs): Delete. Use
141 struct elf_dyn_relocs throughout file instead.
142 (tilegx_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
143 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Use readonly_dynrelocs.
144 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Use readonly_dynrelocs.
146 2017-12-06 Alan Modra <amodra@gmail.com>
148 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Comment tidy.
149 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
150 * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Likewise.
152 2017-12-04 Alan Modra <amodra@gmail.com>
154 * elfxx-x86.c (readonly_dynrelocs): New function.
155 (maybe_set_textrel): New function. Always prints via minfo and
156 correct "readonly" to "read-only" in warning message., replacing..
157 (_bfd_x86_elf_readonly_dynrelocs): ..this.
158 (_bfd_x86_elf_size_dynamic_sections): Correct "readonly" to
159 "read-only" in warning message. Formatting.
160 (_bfd_x86_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
161 * linker.c (bfd_link_hash_traverse): Comment typo fix.
163 2017-12-01 H.J. Lu <hongjiu.lu@intel.com>
165 * elfxx-x86.c (_bfd_x86_elf_readonly_dynrelocs): Print symbol
168 2017-12-01 Alan Modra <amodra@gmail.com>
170 * elf32-hppa.c (maybe_set_textrel): Print symbol for map file output.
171 * elf32-ppc.c (maybe_set_textrel): Likewise.
172 * elf64-ppc.c (maybe_set_textrel): Likewise.
173 * elf32-arm.c (readonly_dynrelocs): New function.
174 (maybe_set_textrel): New function, replacing..
175 (elf32_arm_readonly_dynrelocs): ..this.
176 * elf32-lm32.c (readonly_dynrelocs): New function.
177 (maybe_set_textrel): New function, replacing old version of..
178 (readonly_dynrelocs): ..this.
179 * elf32-m32r.c (readonly_dynrelocs): New function.
180 (maybe_set_textrel): New function, replacing old version of..
181 (readonly_dynrelocs): ..this.
182 * elf32-metag.c (readonly_dynrelocs): New function.
183 (maybe_set_textrel): New function, replacing old version of..
184 (readonly_dynrelocs): ..this.
185 * elf32-nds32.c: Delete unnecessary forward declarations.
186 (readonly_dynrelocs): New function.
187 (maybe_set_textrel): New function, replacing old version of..
188 (readonly_dynrelocs): ..this.
189 * elf32-or1k.c (readonly_dynrelocs): New function.
190 (maybe_set_textrel): New function, replacing old version of..
191 (readonly_dynrelocs): ..this.
192 * elf32-s390.c (readonly_dynrelocs): New function.
193 (maybe_set_textrel): New function, replacing old version of..
194 (readonly_dynrelocs): ..this.
195 * elf32-sh.c (readonly_dynrelocs): New function.
196 (maybe_set_textrel): New function, replacing old version of..
197 (readonly_dynrelocs): ..this.
198 * elf32-tic6x.c (readonly_dynrelocs): New function.
199 (maybe_set_textrel): New function, replacing..
200 (elf32_tic6x_readonly_dynrelocs): ..this.
201 * elf32-tilepro.c (readonly_dynrelocs): New function.
202 (maybe_set_textrel): New function, replacing old version of..
203 (readonly_dynrelocs): ..this.
204 * elf64-s390.c (readonly_dynrelocs): New function.
205 (maybe_set_textrel): New function, replacing old version of..
206 (readonly_dynrelocs): ..this.
207 * elfnn-aarch64.c (readonly_dynrelocs): New function.
208 (maybe_set_textrel): New function, replacing..
209 (aarch64_readonly_readonly_dynrelocs): ..this.
210 * elfnn-riscv.c (readonly_dynrelocs): New function.
211 (maybe_set_textrel): New function, replacing old version of..
212 (readonly_dynrelocs): ..this.
213 * elfxx-sparc.c (readonly_dynrelocs): New function.
214 (maybe_set_textrel): New function, replacing old version of..
215 (readonly_dynrelocs): ..this.
216 * elfxx-tilegx.c (readonly_dynrelocs): New function.
217 (maybe_set_textrel): New function, replacing old version of..
218 (readonly_dynrelocs): ..this.
220 2017-12-01 Alan Modra <amodra@gmail.com>
223 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Don't do anything
224 special with non_got_ref for weak aliases.
225 (elf32_hppa_check_relocs): Tweak setting of non_got_ref.
226 (elf32_hppa_adjust_dynamic_symbol): When initialising weak aliases,
227 don't uselessly copy non_got_ref. Clear dyn_relocs instead if
228 strong symbol is allocated in dynbss. Tidy comments.
229 (elf32_hppa_relocate_section): Comment fix.
230 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Don't do anything
231 special with non_got_ref for weak aliases.
232 (ppc_elf_adjust_dynamic_symbol): When initialising weak aliases,
233 don't uselessly copy non_got_ref. Clear dyn_relocs instead if
234 strong symbol is allocated in dynbss. Tidy comments.
235 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't do anything
236 special with non_got_ref for weak aliases.
237 (ppc64_elf_adjust_dynamic_symbol): When initialising weak aliases,
238 don't uselessly copy non_got_ref. Clear dyn_relocs instead if
239 strong symbol is allocated in dynbss. Tidy comments.
241 2017-11-29 Nick Clifton <nickc@redhat.com>
244 * coffcode.h (coff_slurp_reloc_table): Check for a NULL symbol
245 pointer when processing relocs.
247 2017-11-29 Stefan Stroe <stroestefan@gmail.com>
249 * po/Make-in (datadir): Define as @datadir@.
250 (localedir): Define as @localedir@.
251 (gnulocaledir, gettextsrcdir): Use @datarootdir@.
253 2017-11-28 Nick Clifton <nickc@redhat.com>
256 * coffgen.c (_bfd_coff_read_string_table): Check for an excessive
257 size of the external string table.
259 2017-11-28 Nick Clifton <nickc@redhat.com>
262 * reloc.c (reloc_offset_in_range): Rename to
263 bfd_reloc_offset_in_range and export.
264 (bfd_perform_relocation): Rename function invocation.
265 (bfd_install_relocation): Likewise.
266 (bfd_final_link_relocate): Likewise.
267 * bfd-in2.h: Regenerate.
268 * coff-arm.c (coff_arm_reloc): Use bfd_reloc_offset_in_range.
269 * coff-i386.c (coff_i386_reloc): Likewise.
270 * coff-i860.c (coff_i860_reloc): Likewise.
271 * coff-m68k.c (mk68kcoff_common_addend_special_fn): Likewise.
272 * coff-m88k.c (m88k_special_reloc): Likewise.
273 * coff-mips.c (mips_reflo_reloc): Likewise.
274 * coff-x86_64.c (coff_amd64_reloc): Likewise.
276 2017-11-28 H.J. Lu <hongjiu.lu@intel.com>
278 * elf-m10300.c (mn10300_elf_check_relocs): Don't set
280 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
281 * elf32-bfin.c (bfin_check_relocs): Likewise.
282 * elf32-cr16.c (cr16_elf_check_relocs): Likewise.
283 * elf32-cris.c (cris_elf_check_relocs): Likewise.
284 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
285 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
286 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
287 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
288 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
289 * elf32-i370.c (i370_elf_check_relocs): Likewise.
290 * elf32-i386.c (elf_i386_check_relocs): Likewise.
291 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
292 * elf32-lm32.c (lm32_elf_check_relocs): Likewise.
293 * elf32-m32c.c (m32c_elf_check_relocs): Likewise.
294 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
295 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
296 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
297 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
298 * elf32-metag.c (elf_metag_check_relocs): Likewise.
299 * elf32-microblaze.c (microblaze_elf_check_relocs): Likewise.
300 * elf32-moxie.c (moxie_elf_check_relocs): Likewise.
301 * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
302 * elf32-mt.c (mt_elf_check_relocs): Likewise.
303 * elf32-nios2.c (nios2_elf32_check_relocs): Likewise.
304 * elf32-or1k.c (or1k_elf_check_relocs): Likewise.
305 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
306 * elf32-rl78.c (rl78_elf_check_relocs): Likewise.
307 * elf32-s390.c (elf_s390_check_relocs): Likewise.
308 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
309 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
310 * elf32-sh.c (sh_elf_check_relocs): Likewise.
311 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
312 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
313 * elf32-v850.c (v850_elf_check_relocs): Likewise.
314 * elf32-vax.c (elf_vax_check_relocs): Likewise.
315 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
316 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
317 * elf64-aarch64.c (elf64_aarch64_check_relocs): Likewise.
318 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
319 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
320 * elf64-ia64-vms.c (elf64_ia64_check_relocs): Likewise.
321 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
322 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
323 * elf64-s390.c (elf_s390_check_relocs): Likewise.
324 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
325 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
326 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
327 * elfnn-ia64.c (elfNN_ia64_check_relocs): Likewise.
328 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
329 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
330 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
331 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
333 2017-11-28 Alan Modra <amodra@gmail.com>
336 * elflink.c (_bfd_elf_merge_symbol): Allow weak symbols to override
337 early passes over linker script symbols.
338 * linker.c (_bfd_generic_link_add_one_symbol): Allow symbols to
339 override early passes over linker script symbols. Clear ldscript_def
340 on symbol definitions.
342 2017-11-28 Alan Modra <amodra@gmail.com>
344 * elf64-mmix.c (bfd_elf64_bfd_copy_link_hash_symbol_type): Define.
346 2017-11-28 H.J. Lu <hongjiu.lu@intel.com>
349 * elflink.c (_bfd_elf_merge_symbol): Also skip definition from
351 (elf_link_add_object_symbols): If linker plugin is enabled, set
352 non_ir_ref_regular on symbols referenced in regular objects so
353 that linker plugin will get the correct symbol resolution.
355 2017-11-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
358 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Use
359 bfd_link_executable instead of bfd_link_pic for TLS.
360 (elfNN_aarch64_allocate_dynrelocs): Likewise.
361 (aarch64_can_relax_tls): Likewise.
363 2017-11-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
366 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Use
367 UNDEFWEAK_NO_DYNAMIC_RELOC to avoid dynamic GOT relocs.
368 (elfNN_aarch64_allocate_dynrelocs): Likewise.
370 2017-11-24 H.J. Lu <hongjiu.lu@intel.com>
373 * elf.c (elf_read_notes): Add an argument for note aligment.
374 (elf_parse_notes): Likewise.
375 (_bfd_elf_make_section_from_shdr): Pass section aligment to
377 (bfd_section_from_phdr): Pass segment aligment to elf_read_notes.
378 (elf_parse_notes): Add an argument for note aligment. Use
379 ELF_NOTE_DESC_OFFSET to get the offset of the note descriptor.
380 Use ELF_NOTE_NEXT_OFFSET to get the offset of the next note
382 (elf_read_notes): Add an argument for note aligment and pass it
385 2017-11-23 Alan Modra <amodra@gmail.com>
387 * elf32-hppa.c (pc_dynrelocs): Define.
388 (elf32_hppa_copy_indirect_symbol): Don't copy dyn_relocs to weakdefs.
389 (alias_readonly_dynrelocs): New function.
390 (elf32_hppa_adjust_dynamic_symbol): Don't clear non_got_ref to
391 indicate dyn_relocs should be discarded, discard them here.
392 Use alias_readonly_dynrelocs.
393 (allocate_dynrelocs): Don't test or clear non_got_ref.
394 (elf32_hppa_relocate_section): Simplify test for dynamic relocs.
395 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Don't copy dyn_relocs
397 (alias_readonly_dynrelocs, pc_dynrelocs): New functions.
398 (ppc_elf_adjust_dynamic_symbol): Don't clear non_got_ref to
399 indicate dyn_relocs should be discarded, discard them here.
400 Use alias_readonly_dynrelocs.
401 (allocate_dynrelocs): Don't test or clear non_got_ref.
402 (ppc_elf_relocate_section): Simplify test for dynamic relocs.
404 2017-11-23 Alan Modra <amodra@gmail.com>
406 * elf64-ppc.c (struct ppc_link_hash_entry): Delete weakref field.
407 (ppc64_elf_copy_indirect_symbol): Don't set weakref.
408 (alias_readonly_dynrelocs): Use u.alias rather than weakref.
409 (ppc64_elf_adjust_dynamic_symbol): Don't use
410 alias_readonly_dynrelocs for function symbols.
412 2017-11-23 Alan Modra <amodra@gmail.com>
414 * elf-bfd.h (struct elf_link_hash_entry): Add is_weakalias.
415 Rename u.weakdef to u.alias and update comment.
416 (weakdef): New static inline function.
417 * elflink.c (bfd_elf_record_link_assignment) Test is_weakalias
418 rather than u.weakdef != NULL, and use weakdef function.
419 (_bfd_elf_adjust_dynamic_symbol): Likewise.
420 (_bfd_elf_fix_symbol_flags): Likewise. Clear is_weakalias on
421 all aliases if def has been overridden in a regular object, not
423 (elf_link_add_object_symbols): Delete new_weakdef flag. Test
424 is_weakalias and use weakdef. Set is_weakalias and circular
425 u.alias. Update comments.
426 (_bfd_elf_gc_mark_rsec): Test is_weakalias rather than
427 u.weakdef != NULL and use weakdef function.
428 * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Test
429 is_weakalias rather than u.weakdef != NULL and use weakdef
430 function. Assert that def is strong defined.
431 * elf32-arc.c (elf_arc_adjust_dynamic_symbol): Likewise.
432 * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
433 * elf32-bfin.c (elf32_bfinfdpic_adjust_dynamic_symbol): Likewise.
434 (bfin_adjust_dynamic_symbol): Likewise.
435 * elf32-cr16.c (_bfd_cr16_elf_adjust_dynamic_symbol): Likewise.
436 * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
437 * elf32-frv.c (elf32_frvfdpic_adjust_dynamic_symbol): Likewise.
438 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
439 * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
440 * elf32-lm32.c (lm32_elf_adjust_dynamic_symbol): Likewise.
441 * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
442 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
443 * elf32-metag.c (elf_metag_adjust_dynamic_symbol): Likewise.
444 * elf32-microblaze.c (microblaze_elf_adjust_dynamic_symbol): Likewise.
445 * elf32-nds32.c (nds32_elf_adjust_dynamic_symbol): Likewise.
446 * elf32-nios2.c (nios2_elf32_adjust_dynamic_symbol): Likewise.
447 * elf32-or1k.c (or1k_elf_adjust_dynamic_symbol): Likewise.
448 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
449 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
450 * elf32-score.c (s3_bfd_score_elf_adjust_dynamic_symbol): Likewise.
451 * elf32-score7.c (s7_bfd_score_elf_adjust_dynamic_symbol): Likewise.
452 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
453 * elf32-tic6x.c (elf32_tic6x_adjust_dynamic_symbol): Likewise.
454 * elf32-tilepro.c (tilepro_elf_gc_mark_hook): Likewise.
455 (tilepro_elf_adjust_dynamic_symbol): Likewise.
456 * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
457 * elf32-xtensa.c (elf_xtensa_adjust_dynamic_symbol): Likewise.
458 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Likewise.
459 * elf64-hppa.c (elf64_hppa_adjust_dynamic_symbol): Likewise.
460 * elf64-ia64-vms.c (elf64_ia64_adjust_dynamic_symbol): Likewise.
461 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
462 (ppc64_elf_adjust_dynamic_symbol): Likewise.
463 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
464 * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
465 * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Likewise.
466 * elfnn-ia64.c (elfNN_ia64_adjust_dynamic_symbol): Likewise.
467 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Likewise.
468 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Likewise.
469 * elfxx-sparc.c (_bfd_sparc_elf_gc_mark_hook): Likewise.
470 (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
471 * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): Likewise.
472 (tilegx_elf_adjust_dynamic_symbol): Likewise.
473 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
475 2017-11-21 Alan Modra <amodra@gmail.com>
477 * elf-bfd.h (elf_symbol_from): Check for NULL symbol bfd.
478 * elfcode.h (elf_slurp_reloc_table_from_section): Add FIXME comment.
480 2017-11-20 Nick Clifton <nickc@redhat.com>
483 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Skip
484 objects without a GNU_PROPERTY note section when looking for a bfd
485 onto which notes can be accumulated.
487 2017-11-20 Alan Modra <amodra@gmail.com>
491 * elf.c (_bfd_elf_init_reloc_shdr): Delete "sec_hdr" parameter
492 and leave rel_hdr->sh_flags zero. Update calls.
493 (bfd_elf_set_group_contents): Check input rel/rela SHF_GROUP
494 flag when !gas before adding rel/rela section to group. Set
495 output rel/rela SHF_GROUP flags.
497 2017-11-18 Jim Wilson <jimw@sifive.com>
499 * elfnn-riscv.c (_bfd_riscv_relax_align): Add space between alignment
500 and to in error message.
502 2017-11-17 H.J. Lu <hongjiu.lu@intel.com>
504 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Pass
505 "%F%P:", instead of "%F:", to linker callback in case of error.
507 2017-11-16 Nick Clifton <nickc@redhat.com>
510 * elf.c (elfcore_grok_netbsd_procinfo): Check that the note is big enough.
511 (elfcore_grok_openbsd_procinfo): Likewise.
512 (elfcore_grok_nto_status): Likewise.
514 2017-11-16 Nick Clifton <nickc@redhat.com>
516 * merge.c (sec_merge_emit): Always create padding buffer. Add
517 asserts to make sure that the buffer is long enough.
519 2017-11-15 Alan Modra <amodra@gmail.com>
521 * bfd.c (union _bfd_doprnt_args): Add "Bad".
522 (_bfd_doprnt): Handle more flags.
523 (_bfd_doprnt_scan): Likewise. Tidy setting of args array.
524 (error_handler_internal): Init args type to Bad.
526 2017-11-14 Alan Modra <amodra@gmail.com>
529 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Warn on discarding
530 non-empty dynamic section.
531 (ppc_build_one_stub): Take elf_gp from output bfd, not output
533 (ppc_size_one_stub, ppc64_elf_next_toc_section): Likewise.
535 2017-11-14 Alan Modra <amodra@gmail.com>
537 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for user
540 2017-11-13 Jan Beulich <jbeulich@suse.com>
542 * coff-tic80.c (COFF_ENCODE_ALIGNMENT, COFF_DECODE_ALIGNMENT):
544 * coffcode.h (coff_set_alignment_hook): Drop tic80 special case.
545 (coff_write_object_contents): Likewise. Issue diagnostic for too
548 2017-11-12 H.J. Lu <hongjiu.lu@intel.com>
551 * elf.c (_bfd_elf_map_sections_to_segments): Remove PF_X from
554 2017-11-12 Alan Modra <amodra@gmail.com>
556 * elflink.c (elf_link_add_object_symbols): Ignore anything but
557 defined and defweak symbols when setting up weakdefs.
559 2017-11-12 Alan Modra <amodra@gmail.com>
561 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set non_got_ref
562 to keep dyn_relocs, clear to discard. Comment.
563 (allocate_dynrelocs): Always clear non_got_ref when clearing
564 dyn_relocs in non-pic case. Invert non_got_ref test. Also test
565 dynamic_adjusted and ELF_COMMON_DEF_P. Move code deleting
566 dyn_relocs on undefined syms to handle for non-pic too.
567 (elf32_hppa_relocate_section): Simplify test for non-pic dyn relocs.
568 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Set non_got_ref
569 to keep dyn_relocs, clear to discard. Comment.
570 (allocate_dynrelocs): Always clear non_got_ref when clearing
571 dyn_relocs in non-pic case. Invert non_got_ref test. Also test
572 dynamic_adjusted and ELF_COMMON_DEF_P. Move code deleting
573 dyn_relocs on undefined syms to handle for non-pic too.
574 (ppc_elf_relocate_section): Simplify test for non-pic dyn relocs.
575 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Discard
576 dyn_relocs here. Don't bother setting non_got_ref. Comment.
577 (allocate_dynrelocs): Delete special handling of non-pic ELFv2
578 ifuncs. Move code deleting dyn_relocs on undefined symbols to
579 handle for non-pic too. Don't test non_got_ref. Do test
580 dynamic_adjusted and ELF_COMMON_DEF_P.
582 2017-11-08 Djordje Todorovic <djordje.todorovic@rt-rk.com>
584 * elf32-mips.c (elf32_mips_grok_psinfo): Extract core->pid.
585 * elf64-mips.c (elf64_mips_grok_psinfo): Likewise.
586 * elfn32-mips.c (elf32_mips_grok_psinfo): Likewise.
588 2017-11-08 Djordje Todorovic <djordje.todorovic@rt-rk.com>
590 * elf32-mips.c (elf32_mips_write_core_note): New function.
591 (elf_backend_write_core_note): New macro.
592 * elf64-mips.c (elf64_mips_write_core_note): New function.
593 (elf_backend_write_core_note): New macro.
594 * elfn32-mips.c (elf32_mips_write_core_note): New function.
595 (elf_backend_write_core_note): New macro.
597 2017-11-07 Alan Modra <amodra@gmail.com>
599 * elf64-ppc.c (ppc64_elf_build_stubs): Correct pluralization in
602 2017-11-07 Alan Modra <amodra@gmail.com>
604 * sysdep.h: Formatting, comment fixes.
605 (gettext, ngettext): Redefine when ENABLE_NLS.
606 (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
607 (_): Define using gettext.
608 (textdomain, bindtextdomain): Use safer "do nothing".
609 * hosts/alphavms.h (textdomain, bindtextdomain): Likewise.
610 (ngettext, dngettext, dcngettext): Define when !ENABLE_NLS.
612 2017-11-05 Alan Modra <amodra@gmail.com>
615 * bfd.c (_bfd_doprnt_scan): Check args index before storing, not
618 2017-11-05 Alan Modra <amodra@gmail.com>
621 * bfd.c (union _bfd_doprnt_args): New.
622 (PRINT_TYPE): Add FIELD arg. Take value from args.
623 (_bfd_doprnt): Replace ap parameter with args. Adjust all
624 PRINT_TYPE invocations and reading of format args to suit.
625 Move "%%" handling out of switch handling args. Support
626 positional parameters.
627 (_bfd_doprnt_scan): New function.
628 (error_handler_internal): Call _bfd_doprnt_scan and read args.
630 2017-11-04 Alan Modra <amodra@gmail.com>
632 * elf32-ppc.c (got_entries_needed, got_relocs_needed): New functions.
633 (allocate_dynrelocs, ppc_elf_size_dynamic_sections): Use them here.
634 (ppc_elf_relocate_section): Don't output a dynamic relocation
635 for IE GOT entries in an executable.
636 * elf64-ppc.c (allocate_got): Trim unnecessary TPREL relocs.
637 (ppc64_elf_size_dynamic_sections): Likewise.
638 (ppc64_elf_relocate_section): Likewise.
640 2017-11-04 Alan Modra <amodra@gmail.com>
642 * elf32-ppc.c (readonly_dynrelocs): Delete info param. Update all
643 callers. Don't bother with SEC_ALLOC test. Return section pointer.
645 (maybe_set_textrel): ..here.
646 * elf64-ppc.c (readonly_dynrelocs): Return section pointer.
647 (maybe_set_textrel): Call minfo to print textrel warning to map file.
649 2017-11-04 Alan Modra <amodra@gmail.com>
651 * elf32-hppa.c (enum _tls_type): Move.
652 (struct elf32_hppa_link_hash_entry): Make tls_type a bitfield.
653 (elf32_hppa_check_relocs): Set DF_STATIC_TLS only for shared libraries.
654 Tidy tls_type handling. Set symbol tls_type for GOT_TLS_LDM too.
655 (got_entries_needed, got_relocs_needed): New functions.
656 (allocate_dynrelocs): Use them.
657 (elf32_hppa_size_dynamic_sections): Likewise.
658 (elf32_hppa_relocate_section): Delete bogus FIXME. Formatting.
659 Correct code emitting relocs on GD/IE got entries. Report an
660 error when a symbol has both normal and TLS GOT relocs.
662 2017-11-04 Alan Modra <amodra@gmail.com>
665 * elf32-hppa.c (elf32_hppa_check_relocs): Don't create dyn_relocs
666 for plabels when non-pic.
667 (maybe_set_textrel): New function.
668 (readonly_dynrelocs): Move and rewrite.
669 (elf32_hppa_adjust_dynamic_symbol): Use it. Don't create copy
670 relocs when def_regular or -z nocopyreloc. Handle non_got_ref
671 for functions. Expand non_got_ref comments.
672 (elf32_hppa_size_dynamic_sections): Use maybe_set_textrel.
674 2017-11-03 H.J. Lu <hongjiu.lu@intel.com>
676 * elf32-i386.c (elf_i386_check_relocs): Set plt.refcount to 1.
677 Don't use func_pointer_refcount. Don't set plt.refcount nor
678 non_got_ref for function pointer reference.
679 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
680 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Don't use
681 func_pointer_refcount.
682 (_bfd_x86_elf_copy_indirect_symbol): Don't copy
683 func_pointer_refcount.
684 (_bfd_x86_elf_hide_symbol): Don't use func_pointer_refcount.
685 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): Likewise.
686 (elf_x86_link_hash_entry): Remove func_pointer_refcount.
688 2017-11-03 Mingi Cho <mgcho.minic@gmail.com>
689 Nick Clifton <nickc@redhat.com>
692 * coffgen.c (_bfd_coff_get_external_symbols): Check for an
693 overlarge raw syment count.
694 (coff_get_normalized_symtab): Likewise.
696 2017-11-01 James Bowman <james.bowman@ftdichip.com>
698 * archures.c: Add bfd_mach_ft32b.
699 * cpu-ft32.c: Add arch_info_struct.
700 * elf32-ft32.c: Add R_FT32_RELAX, SC0, SC1,
702 (ft32_elf_relocate_section): Add clauses for R_FT32_SC0, SC1,
704 (ft32_reloc_shortable, elf32_ft32_is_diff_reloc)
705 (elf32_ft32_adjust_diff_reloc_value)
706 (elf32_ft32_adjust_reloc_if_spans_insn)
707 (elf32_ft32_relax_delete_bytes, elf32_ft32_relax_is_branch_target)
708 (ft32_elf_relax_section): New function.
709 * reloc.c: Add BFD_RELOC_FT32_RELAX, SC0, SC1, DIFF32.
710 * bfd-in2.h: Regenerate.
711 * libbfd.h: Regenerate.
713 2017-11-01 Nick Clifton <nickc@redhat.com>
716 * coffcode.h (coff_slurp_line_table): Check for an excessively
717 large line number count.
719 2017-11-01 Nick Clifton <nickc@redhat.com>
722 * peicode.h (pe_bfd_read_buildid): Revise check for invalid size
723 and offset in light of further possible bogus values.
725 2017-11-01 Alan Modra <amodra@gmail.com>
728 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't create a plt
729 entry when just a dynamic reloc can serve. Ensure no dynamic
730 relocations when UNDEFWEAK_NO_DYNAMIC_RELOC by setting non_got_ref.
731 Expand and move the non_got_ref comment.
732 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
734 2017-11-01 Nick Clifton <nickc@redhat.com>
737 * coffgen.c (_bfd_coff_free_symbols): Fail if called on a non-COFF
739 * cofflink.c (coff_link_check_archive_element): Skip non-COFF
740 members of an archive.
742 2017-10-31 Nick Clifton <nickc@redhat.com>
745 * peicode.h (pe_bfd_read_buildid): Check for invalid size and data
748 2017-10-30 Alan Modra <amodra@gmail.com>
750 * elf32-frv.c (ELF_TARGET_ID): Don't define for generic
753 * elflink.c (elf_gc_sweep): Test elf_object_id in addition to
755 (bfd_elf_gc_sections): Likewise.
757 2017-10-30 Alan Modra <amodra@gmail.com>
760 * elf32-hppa.c (elf32_hppa_check_relocs): Move SEC_ALLOC test to
761 ensure non_got_ref is not set due to debug references.
762 (elf32_hppa_adjust_dynamic_symbol): Tidy plabel handling. Use
763 SYMBOL_CALLS_LOCAL and UNDEFWEAK_NO_DYNAMIC_RELOC when determining
764 need for a plt entry.
765 (allocate_dynrelocs): Similarly for got entries. Tidy code discarding
766 dynamic relocs when pic. Remove bogus code attempting to handle
768 (elf32_hppa_relocate_section): Similarly. Delete resolved_to_zero
770 (elf32_hppa_finish_dynamic_symbol): Use UNDEFWEAK_NO_DYNAMIC_RELOC
771 and SYMBOL_REFERENCES_LOCAL in GOT handling.
773 2017-10-28 Alan Modra <amodra@gmail.com>
776 * elflink.c (_bfd_elf_merge_symbol): Remove relocs_compatible check.
777 * elf32-hppa.c (elf_backend_relocs_compatible): Define.
778 * elf32-ppc.c (elf_backend_relocs_compatible): Define.
779 * elf64-ppc.c (elf_backend_relocs_compatible): Define.
781 2017-10-25 Alan Modra <amodra@gmail.com>
783 * archive.c (_bfd_compute_and_write_armap): Match "__gnu_lto_slim"
784 optionally prefixed with "_".
785 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
787 2017-10-24 Andrew Waterman <andrew@sifive.com>
789 * elfnn-riscv.c (_bfd_riscv_relax_lui): Don't relax to c.lui
792 2017-10-24 Renlin Li <renlin.li@arm.com>
795 * elflink.c (_bfd_elf_merge_symbol): Handle multiple definition case.
797 2017-10-23 Nick Clifton <nickc@redhat.com>
800 * elflink.c (elf_link_output_extsym): Keep global undefined
801 symbols if they have been marked as needed.
803 2017-10-23 Maciej W. Rozycki <macro@imgtec.com>
805 * elfn32-mips.c (mips_elf_n32_mkobject): New prototype and
807 (bfd_elf32_mkobject): Use `mips_elf_n32_mkobject' rather than
808 `_bfd_mips_elf_mkobject'.
810 2017-10-22 Hans-Peter Nilsson <hp@axis.com>
813 * config.bfd (cris-*-* | crisv32-*-*): Require a 64-bit BFD.
815 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
817 * elfnn-riscv.c (riscv_pcgp_hi_reloc): New structure.
818 (riscv_pcgp_lo_reloc): Likewise.
819 (riscv_pcgp_relocs): Likewise.
820 (riscv_init_pcgp_relocs): New function.
821 (riscv_free_pcgp_relocs): Likewise.
822 (riscv_record_pcgp_hi_reloc): Likewise.
823 (riscv_record_pcgp_lo_reloc): Likewise.
824 (riscv_delete_pcgp_hi_reloc): Likewise.
825 (riscv_use_pcgp_hi_reloc): Likewise.
826 (riscv_record_pcgp_lo_reloc): Likewise.
827 (riscv_find_pcgp_lo_reloc): Likewise.
828 (riscv_delete_pcgp_lo_reloc): Likewise.
829 (_bfd_riscv_relax_pc): Likewise.
830 (_bfd_riscv_relax_section): Handle R_RISCV_PCREL_* relocations
831 via the new functions above.
833 2017-10-19 Palmer Dabbelt <palmer@dabbelt.com>
835 * elfnn-riscv.c (R_RISCV_DELETE): New define.
836 (_bfd_riscv_relax_delete): New function.
837 (perform_relocation): Handle R_RISCV_DELETE.
838 (_bfd_riscv_relax_section): Likewise.
840 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
843 * elfxx-tilegx.c (tilegx_elf_tls_transition): Replace
844 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
845 bfd_link_executable for TLS check.
846 (tilegx_elf_check_relocs): Likewise.
847 (allocate_dynrelocs): Likewise.
848 (tilegx_elf_relocate_section): Likewise.
850 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
853 * elf32-tilepro.c (tilepro_elf_tls_transition): Replace
854 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
855 bfd_link_executable for TLS check.
856 (tilepro_elf_check_relocs): Likewise.
857 (allocate_dynrelocs): Likewise.
858 (tilepro_elf_relocate_section): Likewise.
860 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
863 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
864 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
865 bfd_link_executable for TLS check.
866 (_bfd_sparc_elf_check_relocs): Likewise.
867 (allocate_dynrelocs): Likewise.
868 (_bfd_sparc_elf_relocate_section): Likewise.
870 2017-10-18 H.J. Lu <hongjiu.lu@intel.com>
872 * elf32-tilepro.c (tilepro_elf_gc_mark_hook): Call
873 _bfd_generic_link_add_one_symbol to mark __tls_get_addr.
874 * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): Likewise.
876 2017-10-17 H.J. Lu <hongjiu.lu@intel.com>
878 * elf32-microblaze.c (microblaze_elf_check_relocs): Check for
879 indirect and warning symbols.
881 2017-10-17 Alan Modra <amodra@gmail.com>
884 * elf-properties.c (_bfd_elf_parse_gnu_properties): Compare datasz
885 against size left rather than comparing pointers. Reorganise loop.
887 2017-10-17 Alan Modra <amodra@gmail.com>
890 * aoutx.h (aout_get_external_symbols): Handle stringsize of zero,
891 and error for any other size that doesn't cover the header word.
893 2017-10-16 H.J. Lu <hongjiu.lu@intel.com>
895 * elf-bfd.h (elf_backend_data): Remove gc_sweep_hook.
896 * elf32-arm.c (elf32_arm_gc_sweep_hook): Removed.
897 (elf_backend_gc_sweep_hook): Likewise.
898 * elf32-bfin.c (bfin_gc_sweep_hook): Likewise.
899 (bfinfdpic_gc_sweep_hook): Likewise.
900 (elf_backend_gc_sweep_hook): Likewise.
901 * elf32-cr16.c (elf32_cr16_gc_sweep_hook): Likewise.
902 (elf_backend_gc_sweep_hook): Likewise.
903 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
904 (elf_backend_gc_sweep_hook): Likewise.
905 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
906 (elf_backend_gc_sweep_hook): Likewise.
907 * elf32-lm32.c (lm32_elf_gc_sweep_hook): Likewise.
908 (elf_backend_gc_sweep_hook): Likewise.
909 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
910 (elf_backend_gc_sweep_hook): Likewise.
911 * elf32-m68k.c (elf_m68k_got_entry): Remove elf_m68k_gc_sweep_hook
913 (elf_m68k_remove_got_entry_type): Removed.
914 (elf_m68k_find_got_entry_ptr): Likewise.
915 (elf_m68k_remove_got_entry): Likewise.
916 (elf_m68k_gc_sweep_hook): Likewise.
917 (elf_backend_gc_sweep_hook): Likewise.
918 * elf32-mcore.c (mcore_elf_gc_sweep_hook): Likewise.
919 (elf_backend_gc_sweep_hook): Likewise.
920 * elf32-metag.c (elf_metag_gc_sweep_hook): Likewise.
921 (elf_backend_gc_sweep_hook): Likewise.
922 * elf32-microblaze.c (elf_backend_gc_sweep_hook): Likewise.
923 (elf_backend_gc_sweep_hook): Likewise.
924 * elf32-mips.c (elf_backend_gc_sweep_hook): Likewise.
925 (elf_backend_gc_sweep_hook): Likewise.
926 * elf32-nds32.c (nds32_elf_gc_sweep_hook): Likewise.
927 (elf_backend_gc_sweep_hook): Likewise.
928 * elf32-nios2.c (nios2_elf32_gc_sweep_hook): Likewise.
929 (elf_backend_gc_sweep_hook): Likewise.
930 * elf32-or1k.c (or1k_elf_gc_sweep_hook): Likewise.
931 (elf_backend_gc_sweep_hook): Likewise.
932 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
933 (elf_backend_gc_sweep_hook): Likewise.
934 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
935 (elf_backend_gc_sweep_hook): Likewise.
936 * elf32-sparc.c (elf_backend_gc_sweep_hook): Likewise.
937 * elf32-tic6x.c (elf32_tic6x_gc_sweep_hook): Likewise.
938 (elf_backend_gc_sweep_hook): Likewise.
939 * elf32-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
940 * elf32-tilepro.c (tilepro_elf_gc_sweep_hook): Likewise.
941 (elf_backend_gc_sweep_hook): Likewise.
942 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
943 (elf_backend_gc_sweep_hook): Likewise.
944 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
945 (elf_backend_gc_sweep_hook): Likewise.
946 * elf64-alpha.c (elf64_alpha_gc_sweep_hook): Likewise.
947 (elf_backend_gc_sweep_hook): Likewise.
948 * elf64-mips.c (elf_backend_gc_sweep_hook): Likewise.
949 * elf64-mmix.c (mmix_elf_gc_sweep_hook): Likewise.
950 (elf_backend_gc_sweep_hook): Likewise.
951 * elf64-ppc.c (elf_backend_gc_sweep_hook): Likewise.
952 (ppc64_elf_gc_sweep_hook): Likewise.
953 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
954 (elf_backend_gc_sweep_hook): Likewise.
955 * elf64-sparc.c (elf_backend_gc_sweep_hook): Likewise.
956 * elf64-tilegx.c (elf_backend_gc_sweep_hook): Likewise.
957 * elflink.c (elf_link_add_object_symbols): Don't call
958 _bfd_elf_link_check_relocs here.
959 (gc_sweep_hook_fn): Removed.
960 (elf_gc_sweep): Remove gc_sweep_hook.
961 * elfnn-aarch64.c (elfNN_aarch64_gc_sweep_hook): Removed.
962 (elf_backend_gc_sweep_hook): Likewise.
963 * elfnn-riscv.c (riscv_elf_gc_sweep_hook): Likewise.
964 (elf_backend_gc_sweep_hook): Likewise.
965 * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
966 * elfxx-mips.h (_bfd_mips_elf_gc_sweep_hook): Likewise.
967 (elf_backend_gc_sweep_hook): Likewise.
968 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
969 * elfxx-sparc.h (_bfd_sparc_elf_gc_sweep_hook): Likewise.
970 * elfxx-target.h (elf_backend_gc_sweep_hook): Likewise.
971 (elfNN_bed): Remove elf_backend_gc_sweep_hook.
972 * elfxx-tilegx.c (tilegx_elf_gc_sweep_hook): Removed.
973 * elfxx-tilegx.h (tilegx_elf_gc_sweep_hook): Likewise.
975 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
977 * elf32-i386.c (elf_i386_backend_data): Removed.
978 (get_elf_i386_backend_data): Likewise.
979 (elf_i386_arch_bed): Replace elf_i386_backend_data with
980 elf_x86_backend_data.
981 (elf_i386_get_synthetic_symtab): Likewise.
982 (elf_i386_nacl_arch_bed): Likewise.
983 (elf_i386_vxworks_arch_bed): Likewise.
984 (elf_i386_relocate_section): Check target_os instead of
986 (elf_i386_finish_dynamic_symbol): Likewise.
987 (elf_i386_finish_dynamic_sections): Use htab->plt0_pad_byte.
988 Check target_os instead of is_vxworks.
989 (elf_i386_link_setup_gnu_properties): Remove normal_target and
990 is_vxworks. Initialize plt0_pad_byte.
991 * elf64-x86-64.c (elf_x86_64_backend_data); Removed.
992 (get_elf_x86_64_arch_data): Likewise.
993 (get_elf_x86_64_backend_data): Likewise.
994 (elf_x86_64_arch_bed): Replace elf_x86_64_backend_data with
995 elf_x86_backend_data.
996 (elf_x86_64_get_synthetic_symtab): Likewise.
997 (elf_x86_64_nacl_arch_bed): Likewise.
998 (elf_x86_64_link_setup_gnu_properties): Remove is_vxworks and
999 normal_target. Initialize plt0_pad_byte.
1000 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check target_os
1001 instead of is_vxworks.
1002 (_bfd_x86_elf_size_dynamic_sections): Likewise.
1003 (_bfd_x86_elf_finish_dynamic_sections): Likewise.
1004 (_bfd_x86_elf_adjust_dynamic_symbol): Likewise.
1005 (_bfd_x86_elf_link_hash_table_create): Initialize target_os.
1006 (_bfd_x86_elf_link_setup_gnu_properties): Remove is_vxworks.
1007 Update normal_target. Set up plt0_pad_byte. Check target_os
1008 instead of is_vxworks.
1009 * elfxx-x86.h (elf_x86_target_os): New.
1010 (elf_x86_backend_data): Likewise.
1011 (get_elf_x86_backend_data): Likewise.
1012 (elf_x86_link_hash_table): Remove is_vxworks. Add plt0_pad_byte
1014 (elf_x86_init_table): Remove normal_target and is_vxworks. Add
1017 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1019 * elf32-i386.c (elf_i386_finish_dynamic_sections): Call
1020 _bfd_x86_elf_finish_dynamic_sections.
1021 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Likewise.
1022 * elfxx-x86.c (_bfd_x86_elf_finish_dynamic_sections): New
1024 * elfxx-x86.h (_bfd_x86_elf_finish_dynamic_sections): New
1027 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1030 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
1031 hide symbol which was forced to be dynamic.
1033 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1036 * elf32-cris.c (cris_elf_relocate_section): Don't generate
1037 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1038 (cris_elf_check_relocs): Don't allocate dynamic relocation
1039 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1041 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1044 * elf32-sh.c (allocate_dynrelocs): Discard dynamic relocations
1045 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1046 (sh_elf_relocate_section): Don't generate dynamic relocation if
1047 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1049 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1052 * elf32-s390.c (allocate_dynrelocs): Discard dynamic
1053 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1054 (elf_s390_relocate_section): Don't generate dynamic relocation
1055 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1056 * elf64-s390.c (allocate_dynrelocs): Discard dynamic
1057 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1058 (elf_s390_relocate_section): Don't generate dynamic relocation
1059 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1061 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1064 * elf32-nios2.c (nios2_elf32_relocate_section): Don't generate
1065 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1066 (allocate_dynrelocs): Discard dynamic relocations if
1067 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1069 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1072 * elf32-microblaze.c (microblaze_elf_relocate_section): Don't
1073 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
1075 (allocate_dynrelocs): Discard dynamic relocations if
1076 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1078 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1081 * elf32-m68k.c (elf_m68k_check_relocs): Don't allocate dynamic
1082 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1083 (elf_m68k_adjust_dynamic_symbol): Don't make symbol dynamic if
1084 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1085 (elf_m68k_relocate_section): Don't generate dynamic relocation
1086 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1088 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1091 * elf32-hppa.c (ensure_undef_dynamic): Don't make undefined
1092 symbol dynamic if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1093 (allocate_dynrelocs): Discard dynamic relocations if
1094 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1095 (elf32_hppa_relocate_section): Don't generate dynamic
1096 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1098 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1101 * elfnn-ia64.c (elfNN_ia64_check_relocs): Don't allocate
1102 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1103 (allocate_fptr): Don't allocate function pointer if
1104 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1105 (allocate_dynrel_entries): Don't allocate dynamic relocation
1106 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1107 (set_got_entry): Don't set GOT entry if
1108 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1109 (set_pltoff_entry): Don't set PLTOFF entry if
1110 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1111 (elfNN_ia64_relocate_section): Don't install dynamic relocation
1112 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1114 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1117 * elfxx-mips.c (mips_elf_calculate_relocation): Don't generate
1118 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1119 (allocate_dynrelocs): Don't allocate dynamic relocations if
1120 UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1122 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1125 * elf32-arm.c (elf32_arm_final_link_relocate): Don't generate
1126 dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1127 (allocate_dynrelocs_for_symbol): Discard dynamic relocations
1128 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1130 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1133 * elf32-tilepro.c (allocate_dynrelocs): Discard dynamic
1134 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1135 (tilepro_elf_relocate_section): Don't generate dynamic
1136 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1137 * elfxx-tilegx.c (allocate_dynrelocs): Discard dynamic
1138 relocations if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1139 (tilegx_elf_relocate_section): Don't generate dynamic
1140 relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1142 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1145 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Don't
1146 generate dynamic relocation if UNDEFWEAK_NO_DYNAMIC_RELOC is
1148 (elfNN_aarch64_allocate_dynrelocs): Discard dynamic relocations
1149 if UNDEFWEAK_NO_DYNAMIC_RELOC is true.
1151 2017-10-14 H.J. Lu <hongjiu.lu@intel.com>
1153 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Moved to ...
1154 * elf-bfd.h (UNDEFWEAK_NO_DYNAMIC_RELOC): Here.
1155 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Removed.
1157 2017-10-12 James Bowman <james.bowman@ftdichip.com>
1159 * bfd-in2.h: Regenerate.
1160 * libbfd.h: Regenerate.
1161 * elf32-ft32.c: Add HOWTO R_FT32_15.
1162 * reloc.c: Add BFD_RELOC_FT32_15.
1164 2017-10-12 Nick Clifton <nickc@redhat.com>
1166 * reloc.c (enum bfd_reloc_status): Start values at 2.
1167 * bfd-in2.h: Regenerate.
1168 * elfnn-aarch64.c (aarch64_relocate): Invert sense of function, so
1169 that a TRUE return indicates success. Compare the result of
1170 calling _bfd_aarch64_elf_put_addend against bfd_reloc_ok.
1171 (build_one_stub): Change sense of tests against aarch64_relocate
1173 (elfNN_aarch64_tls_relax): Return bfd_reloc_notsupported, rather
1174 than FALSE, when an error is detected.
1175 (elfNN_aarch64_final_link_relocate): Likewise.
1177 2017-10-12 H.J. Lu <hongjiu.lu@intel.com>
1179 * elf32-i386.c (elf_backend_hide_symbol): New.
1180 * elf64-x86-64.c (elf_backend_hide_symbol): Likewise.
1181 * elfxx-x86.c (_bfd_x86_elf_hide_symbol): Likewise.
1182 * elfxx-x86.h (_bfd_x86_elf_hide_symbol): Likewise.
1184 2017-10-12 Alan Modra <amodra@gmail.com>
1186 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Call
1187 elf_backend_hide_symbol, not _bfd_elf_link_hash_hide_symbol.
1188 (bfd_elf_define_start_stop): Likewise.
1190 2017-10-12 Alan Modra <amodra@gmail.com>
1192 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Set .interp
1193 when executable rather than non-PIC.
1194 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
1195 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
1197 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
1199 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo64_ugid16'
1201 * elf-linux-core.h (elf_external_linux_prpsinfo64): Rename to...
1202 (elf_external_linux_prpsinfo64_ugid32): ... this.
1203 (swap_linux_prpsinfo32_out): Rename to...
1204 (swap_linux_prpsinfo32_ugid32_out): ... this.
1205 (elf_external_linux_prpsinfo64_ugid16): New structure.
1206 (swap_linux_prpsinfo64_ugid16_out): New function.
1207 * elfxx-target.h [!elf_backend_linux_prpsinfo64_ugid16]
1208 (elf_backend_linux_prpsinfo64_ugid16): Define.
1209 (elfNN_bed): Initialize `linux_prpsinfo64_ugid16' member.
1210 * elf.c (elfcore_write_linux_prpsinfo64): Handle both variants
1211 of the 64-bit Linux core PRPSINFO note.
1212 * elf64-sh64.c (elf_backend_linux_prpsinfo64_ugid16): Define.
1214 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
1216 * elf-bfd.h (elf_backend_data): Add `linux_prpsinfo32_ugid16'
1218 (elfcore_write_ppc_linux_prpsinfo32): Remove prototype.
1219 * elf32-ppc.c (elfcore_write_ppc_linux_prpsinfo32): Remove.
1220 (elf_external_ppc_linux_prpsinfo32)
1221 (swap_ppc_linux_prpsinfo32_out): Move to...
1222 * elf-linux-core.h (elf_external_linux_prpsinfo32_ugid32)
1223 (swap_linux_prpsinfo32_ugid32_out): ... these.
1224 (elf_external_linux_prpsinfo32): Rename to...
1225 (elf_external_linux_prpsinfo32_ugid16): ... this.
1226 (swap_linux_prpsinfo32_out): Rename to...
1227 (swap_linux_prpsinfo32_ugid16_out): ... this.
1228 * elfxx-target.h [!elf_backend_linux_prpsinfo32_ugid16]
1229 (elf_backend_linux_prpsinfo32_ugid16): Define.
1230 (elfNN_bed): Initialize `linux_prpsinfo32_ugid16' member.
1231 * elf.c (elfcore_write_linux_prpsinfo32): Handle both variants
1232 of the 32-bit Linux core PRPSINFO note.
1233 * elf32-am33lin.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1234 * elf32-arm.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1235 * elf32-cris.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1236 * elf32-frv.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1237 * elf32-i386.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1238 * elf32-m32r.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1239 * elf32-m68k.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1240 * elf32-s390.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1241 * elf32-sh.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1242 * elf32-sparc.c (elf_backend_linux_prpsinfo32_ugid16): Define.
1244 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
1246 * elf-linux-core.h (elf_external_linux_prpsinfo64): Move the
1247 `gap' member ahead of `pr_flag'.
1249 2017-10-11 Pedro Alves <palves@redhat.com>
1251 * bfd.c (_doprnt): Rename to ...
1252 (_bfd_doprnt): ... this.
1253 (error_handler_internal): Adjust.
1255 2017-10-10 H.J. Lu <hongjiu.lu@intel.com>
1257 * elf32-i386.c (elf_i386_check_relocs): Set GOT refcount to 1
1258 instead of incrementing it.
1259 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1261 2017-10-10 Renlin Li <renlin.li@arm.com>
1264 * elf32-arm.c (allocate_dynrelocs_for_symbol): Only make undefined weak
1265 symbols into dynamic.
1267 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
1270 * elfnn-riscv.c (riscv_elf_link_hash_table): Add max_alignment.
1271 (riscv_elf_link_hash_table_create): Initialize max_alignment to
1273 (_bfd_riscv_relax_section): Cache the max alignment of output
1274 sections if possible.
1276 2017-10-10 Alan Modra <amodra@gmail.com>
1278 * elf64-ppc.c (ppc64_elf_before_check_relocs): Set sec_type for
1279 .opd whenever .opd is present and non-zero size. Move code
1280 setting abiversion to/from output file earlier. Only set
1281 u.opd.func_sec when --gc-sections. Read relocs and set up
1282 u.opd.func_sec values here..
1283 (ppc64_elf_check_relocs): ..rather than here. Simplify opd
1285 (ppc64_elf_edit_opd): Don't set sec_type for .opd here.
1287 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
1289 * elf-m10300.c (mn10300_elf_check_relocs): Don't free cached
1292 2017-10-09 H.J. Lu <hongjiu.lu@intel.com>
1294 * elf32-bfin.c (bfin_size_dynamic_sections): Don't create the
1295 .interp section with "ld --no-dynamic-linker".
1297 2017-10-09 Alan Modra <amodra@gmail.com>
1300 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free
1301 funcinfo_hash_table and varinfo_hash_table.
1303 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
1305 * elf32-sh.c (readonly_dynrelocs): Dump dynamic relocation
1306 in read-only section with minfo.
1307 (sh_elf_size_dynamic_sections): Likewise.
1309 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
1311 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Remove
1314 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
1316 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_sections): Set
1317 this_hdr.sh_entsize only if section size > 0.
1319 2017-10-08 H.J. Lu <hongjiu.lu@intel.com>
1321 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Reformat.
1323 2017-10-07 H.J. Lu <hongjiu.lu@intel.com>
1325 * elfxx-sparc.c (readonly_dynrelocs): Dump dynamic relocation
1326 in read-only section with minfo.
1327 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
1329 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1331 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Update
1334 2017-10-06 John Baldwin <jhb@FreeBSD.org>
1336 * elf-bfd.h (struct elf_backend_data): Add
1337 `elf_backend_grok_freebsd_prstatus'.
1338 * elf.c (elfcore_grok_freebsd_note): Call
1339 `elf_backend_grok_freebsd_prstatus' to handle NT_PRSTATUS if
1341 * elfn32-mips.c (elf_n32_mips_grok_freebsd_prstatus): New
1343 (elf_backend_grok_freebsd_prstatus): Define.
1344 * elfxx-target.h (elf_backend_grok_freebsd_prstatus): Define.
1345 (elfNN_bed): Initialize `elf_backend_grok_freebsd_prstatus'.
1347 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1349 * elf32-i386.c (elf_i386_check_relocs): Replace has_got_reloc
1350 and has_non_got_reloc with zero_undefweak.
1351 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1352 * elfxx-x86.c (_bfd_x86_elf_link_hash_newfunc): Initialize
1353 zero_undefweak to 1.
1354 (_bfd_x86_elf_copy_indirect_symbol): Replace has_got_reloc and
1355 has_non_got_reloc with zero_undefweak.
1356 * elfxx-x86.h (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace
1357 has_got_reloc and has_non_got_reloc with zero_undefweak.
1358 (elf_x86_link_hash_entry): Likewise.
1360 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1362 * elfxx-x86.h (COPY_INPUT_RELOC_P): Add "do/while(0);".
1363 (VERIFY_COPY_RELOC): Likewise.
1365 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1367 * elfxx-x86.h (VERIFY_COPY_RELOC): New.
1368 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
1369 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1371 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1373 * elfxx-x86.h (VERIFY_PLT_ENTRY): New.
1374 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use it.
1375 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1377 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1379 * elfxx-x86.h (COPY_INPUT_RELOC_P): New.
1380 * elf32-i386.c (elf_i386_relocate_section): Use it.
1381 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1383 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1385 * elf32-i386.c (X86_SIZE_TYPE_P): New.
1386 (elf_i386_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
1387 * elf64-x86-64.c (X86_SIZE_TYPE_P): New.
1388 (elf_x86_64_relocate_section): Use GENERATE_DYNAMIC_RELOCATION_P.
1389 * elfxx-x86.h (GENERATE_DYNAMIC_RELOCATION_P): New.
1391 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1393 * elfxx-x86.h (POINTER_LOCAL_IFUNC_P): New.
1394 (PLT_LOCAL_IFUNC_P): Likewise.
1395 * elf32-i386.c (elf_i386_relocate_section): Use them.
1396 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1398 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1400 * elfxx-x86.h (GENERATE_RELATIVE_RELOC_P): New.
1401 * elf32-i386.c (elf_i386_relocate_section): Use it.
1402 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1404 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1406 * elfxx-x86.h (RESOLVED_LOCALLY_P): New.
1407 * elf32-i386.c (elf_i386_relocate_section): Use it.
1408 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1410 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1412 * elf32-i386.c (X86_PCREL_TYPE_P): New.
1413 (elf_i386_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
1414 * elf64-x86-64.c (IS_X86_64_PCREL_TYPE): Renamed to ...
1415 (X86_PCREL_TYPE_P): This.
1416 (elf_x86_64_check_relocs): Use NEED_DYNAMIC_RELOCATION_P.
1417 Replace IS_X86_64_PCREL_TYPE with X86_PCREL_TYPE_P.
1418 (elf_x86_64_relocate_section): Replace IS_X86_64_PCREL_TYPE with
1420 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): New.
1422 2017-10-06 H.J. Lu <hongjiu.lu@intel.com>
1424 * elfxx-x86.h (TLS_TRANSITION_IE_TO_LE_P): New.
1425 * elf32-i386.c (elf_i386_tls_transition): Use it.
1426 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1428 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
1430 * elf32-ppc.c (readonly_dynrelocs): Add a link_info argument.
1431 Dump dynamic relocation in read-only section with minfo if
1433 (ppc_elf_adjust_dynamic_symbol): Pass NULL to readonly_dynrelocs.
1434 (maybe_set_textrel): Likewise.
1435 (ppc_elf_size_dynamic_sections): Dump dynamic relocation in
1436 read-only section with minfo.
1438 2017-10-05 John Baldwin <jhb@FreeBSD.org>
1440 * elf.c (elfcore_grok_freebsd_note): Handle NT_ARM_VFP.
1442 2017-10-05 H.J. Lu <hongjiu.lu@intel.com>
1444 * elf32-tilepro.c (readonly_dynrelocs): Dump dynamic relocation
1445 in read-only section with minfo.
1446 (tilepro_elf_size_dynamic_sections): Likewise.
1447 * elfxx-tilegx.c (readonly_dynrelocs): Likewise.
1448 (tilegx_elf_size_dynamic_sections): Likewise.
1450 2017-10-05 Pedro Alves <palves@redhat.com>
1453 * bfd.c (bfd_set_error): Revert 2017-10-04 change. Remove
1454 ellipsis parameter. Split out bfd_error_on_input code to..
1455 (bfd_set_input_error): .. New function.
1456 * archive.c (_bfd_write_archive_contents): Use bfd_set_input_error.
1457 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Likewise.
1458 * bfd-in2.h: Regenerate.
1460 2017-10-05 Alan Modra <amodra@gmail.com>
1462 * elflink.c (elf_link_input_bfd): Correct ctor/dtor in init_array/
1463 fini_array error value.
1465 2017-10-05 Alan Modra <amodra@gmail.com>
1468 * elf.c (_bfd_elf_setup_sections): Don't trim reloc sections from
1470 (_bfd_elf_init_reloc_shdr): Pass sec_hdr, use it to copy SHF_GROUP
1472 (elf_fake_sections): Adjust calls. Exit immediately on failure.
1473 (bfd_elf_set_group_contents): Add associated reloc section indices
1476 2017-10-04 Alan Modra <amodra@gmail.com>
1478 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't sort or
1479 classify symbols for ELFv2.
1481 2017-10-04 Pavel I. Kryukov <kryukov@frtk.ru>
1484 * bfd.c (bfd_set_error): Avoid UB on passing arg to va_start that
1485 undergoes default promotion.
1486 * bfd-in2.h: Regenerate.
1488 2017-10-02 Alan Modra <amodra@gmail.com>
1490 * elf32-ppc.c (ppc_elf_relocate_section): Fix comment typo.
1491 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1493 2017-10-01 Alan Modra <amodra@gmail.com>
1496 * dwarf2.c (new_line_sorts_after): Remove end_sequence comparison.
1497 (add_line_info): Always put end_sequence last.
1499 2017-10-01 Alan Modra <amodra@gmail.com>
1502 * dwarf2.c (read_section): Allocate buffer with extra byte for
1503 bfd_simple_get_relocated_section_contents rather than copying
1506 2017-09-29 Alan Modra <amodra@gmail.com>
1508 * merge.c (merge_strings): Return FALSE on malloc failure.
1509 (_bfd_merge_sections): Return failures from record_section and
1512 2017-09-28 Alan Modra <amodra@gmail.com>
1515 * elflink.c (_bfd_elf_merge_symbol): Set non_ir_ref_dynamic in
1516 a case where plugin_notice isn't called.
1518 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1520 * elf32-nds32.c (nds32_elf_relax_section): Fix a tautological
1523 2017-09-26 H.J. Lu <hongjiu.lu@intel.com>
1526 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't pass
1527 output_bfd to info->callbacks->minfo.
1529 2017-09-26 Nick Clifton <nickc@redhat.com>
1532 * elf64-x86-64.c (elf_x86_64_info_to_howto): Do not trigger an
1533 assertion failure if elf_x86_64_rtype_to_howto has already issued
1536 2017-09-26 Alan Modra <amodra@gmail.com>
1539 * dwarf2.c (read_formatted_entries): Use read_attribute_value to
1542 2017-09-26 Nick Clifton <nickc@redhat.com>
1545 * dwarf2.c (read_formatted_entries): Fail early if we know that
1546 the loop parsing data entries will overflow the end of the
1549 2017-09-26 Alan Modra <amodra@gmail.com>
1552 * dwarf2.c (struct comp_unit): Delete sec_info_ptr field.
1553 (find_abstract_instance_name): Calculate DW_FORM_ref_addr relative
1554 to stash->info_ptr_memory, and check die_ref is within that memory.
1555 Set info_ptr_end correctly when another CU is refd. Check die_ref
1556 for DW_FORM_ref4 etc. is within CU.
1558 2017-09-26 Alan Modra <amodra@gmail.com>
1561 * dwarf2.c (concat_filename): Return "<unknown>" on NULL filename.
1562 (read_formatted_entries): Init "fe".
1563 (decode_line_info <DW_LNE_define_file>): Use line_info_add_file_name.
1565 2017-09-26 Alan Modra <amodra@gmail.com>
1568 * dwarf2.c (decode_line_info): Ensure line_ptr stays within
1569 bounds in inner loop.
1571 2017-09-25 Alan Modra <amodra@gmail.com>
1574 * dwarf1.c (parse_die): Sanity check pointer against section limit
1575 before dereferencing.
1576 (parse_line_table): Likewise.
1578 2017-09-25 Alan Modra <amodra@gmail.com>
1581 * dwarf2.c (scan_unit_for_symbols): Ignore DW_AT_name unless it
1583 (parse_comp_unit): Likewise.
1585 2017-09-25 Alan Modra <amodra@gmail.com>
1588 * dwarf2.c (read_formatted_entries): Error on format_count zero.
1590 2017-09-24 Alan Modra <amodra@gmail.com>
1593 * opncls.c (bfd_get_debug_link_info_1): Properly check that crc is
1594 within section bounds.
1596 2017-09-24 Alan Modra <amodra@gmail.com>
1599 * dwarf2.c (decode_line_info): Properly free line sequences on error.
1601 2017-09-24 Alan Modra <amodra@gmail.com>
1604 * dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
1605 pname param. Return status. Make name const. Don't abort,
1606 return an error. Formatting. Exit if current info_ptr matches
1607 orig_info_ptr. Update callers.
1608 (scan_unit_for_symbols): Start at nesting_level of zero. Make
1609 nested_funcs an array of structs for extensibility. Formatting.
1611 2017-09-24 Alan Modra <amodra@gmail.com>
1614 * dwarf2.c (decode_line_info): Fail on lh.line_range of zero
1615 rather than dividing by zero.
1617 2017-09-24 Alan Modra <amodra@gmail.com>
1620 * dwarf2.c (decode_line_info): Correct .debug_line unit_length check.
1622 2017-09-24 Alan Modra <amodra@gmail.com>
1625 * dwarf2.c (scan_unit_for_symbols): Check u.blk->data is non-NULL.
1627 2017-09-24 Alan Modra <amodra@gmail.com>
1630 * elf.c (_bfd_elf_slurp_version_tables): Test sh_info on
1631 SHT_GNU_verneed section for sanity. Don't zalloc memory for
1634 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
1637 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Guard against
1640 2017-09-22 H.J. Lu <hongjiu.lu@intel.com>
1643 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Also return
1644 -1 if bfd_canonicalize_dynamic_reloc returns 0.
1646 2017-09-22 Pedro Alves <palves@redhat.com>
1647 Alan Modra <amodra@gmail.com>
1649 * version.h: Add comment.
1651 2017-09-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1653 * elf.c (elfcore_grok_note): For the cases NT_S390_GS_CB and
1654 NT_S390_GS_BC, correct the previously swapped invocations of
1655 elfcore_grok_s390_gs_bc and elfcore_grok_s390_gs_cb.
1657 2017-09-19 Alan Modra <amodra@gmail.com>
1660 * elf64-ppc.c (ppc64_elf_build_stubs): Don't check glink_eh_frame
1663 2017-09-19 Alan Modra <amodra@gmail.com>
1666 * elflink.c (bfd_elf_size_dynamic_sections): Garbage collect
1667 symbols before calculating verrefs. Don't renumber dynsyms
1668 after gc. Exclude .gnu.version when zero or one dynsym.
1669 Localize some vars and reindent.
1671 2017-09-18 H.J. Lu <hongjiu.lu@intel.com>
1674 * elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Check error
1675 return from bfd_canonicalize_dynamic_reloc.
1677 2017-09-15 Alan Modra <amodra@gmail.com>
1680 * archive.c (bfd_ar_hdr_from_filesystem): Detect when status.st_size
1681 overflows bfd_size_type.
1683 2017-09-14 H.J. Lu <hongjiu.lu@intel.com>
1686 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument
1687 to indicate if conversion is performed.
1688 (elf_i386_check_relocs): Cache section contents and relocations
1689 if conversion is performed.
1690 * elf64-x86-64.c (elf_x86_64_check_relocs): Cache section
1691 contents and relocations if conversion is performed.
1693 2017-09-14 Nick Clifton <nickc@redhat.com>
1696 * peXXigen.c (pe_print_idata): Extend check for HintName vector
1699 2017-09-13 H.J. Lu <hongjiu.lu@intel.com>
1701 * elfxx-x86.h: Fix a typo in comments.
1703 2017-09-09 Kamil Rytarowski <n54@gmx.com>
1705 * elf32-nds32.c: Rename __BIT() to N32_BIT().
1707 2017-09-09 Alan Modra <amodra@gmail.com>
1709 * elf64-ppp.c (plt_stub_pad): Handle positive and negative
1712 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1714 * elf32-i386.c (elf_i386_relocate_section): Update usage of
1715 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1716 (elf_i386_finish_dynamic_symbol): Likewise.
1717 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1718 (elf_x86_64_finish_dynamic_symbol): Likewise.
1719 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Likewise.
1720 (_bfd_x86_elf_fixup_symbol): Likewise.
1722 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1724 * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
1725 check has_non_got_reloc.
1727 2017-09-09 H.J. Lu <hongjiu.lu@intel.com>
1730 * elf32-i386.c (elf_i386_convert_load_reloc): Check linker_def.
1731 Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1732 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Check
1733 linker_def. Don't use UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1734 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set local_ref
1735 and linker_def on __ehdr_start if it is referenced and not
1737 (_bfd_x86_elf_link_symbol_references_local): Also set local_ref
1738 and return TRUE when building executable, if a symbol has
1739 non-GOT/non-PLT relocations in text section or there is no
1741 * elfxx-x86.h (elf_x86_link_hash_entry): Add linker_def.
1743 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1745 * elfxx-x86.h: Update comments.
1747 2017-09-08 H.J. Lu <hongjiu.lu@intel.com>
1749 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Replace
1750 elf_x86_plt_layout_table with elf_x86_init_table.
1751 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1753 * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties):
1755 * elfxx-x86.h (elf_x86_plt_layout_table): Renamed to ...
1756 (elf_x86_init_table): This.
1757 (_bfd_x86_elf_link_setup_gnu_properties): Replace
1758 elf_x86_plt_layout_table with elf_x86_init_table.
1760 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1762 * configure.ac (bfd_backends): Don't add elf64-x86-64.lo nor
1763 elf64.lo together with elfxx-x86.lo for 64-bit BFD.
1764 * configure: Regenerated.
1765 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set r_info
1766 and r_sym fields of plt_layout.
1767 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties):
1769 * elfxx-x86.c (elf_x86_64_is_reloc_section): Remove BFD64 check.
1770 (_bfd_x86_elf_link_hash_table_create): Likewise. Don't set
1771 r_info nor r_sym fields.
1772 (_bfd_x86_elf_link_setup_gnu_properties): Set r_info and r_sym
1774 * elfxx-x86.h (elf_x86_plt_layout_table): Add r_info and r_sym.
1776 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1778 * (_bfd_riscv_relax_align): Call bfd_set_error and
1779 print an error message when unable to relax a .align directive.
1781 2017-09-07 Palmer Dabbelt <palmer@dabbelt.com>
1783 * elfnn-riscv.c (riscv_zero_pcrel_hi_reloc): New function.
1784 (riscv_record_pcrel_hi_reloc): Add absolute argument.
1785 (riscv_elf_relocate_section): Call riscv_zero_pcrel_hi_reloc for
1786 R_RISCV_PCREL_HI20 relocs, and pass the result to
1787 riscv_record_pcrel_hi_reloc.
1789 2017-09-07 H.J. Lu <hongjiu.lu@intel.com>
1791 * elf32-i386.c (elf_i386_convert_load_reloc): Add an argument,
1792 r_type_p. Remove the converted argument. Replace
1793 SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P. Return
1794 the new relocation type via r_type_p.
1795 (elf_i386_relocate_section): Likewise.
1796 (elf_i386_finish_dynamic_symbol): Likewise.
1797 (need_convert_load): Removed.
1798 (check_relocs_failed): Updated.
1799 (elf_i386_check_relocs): Call elf_i386_convert_load_reloc,
1800 instead of setting need_convert_load.
1801 (_bfd_i386_elf_convert_load): Removed.
1802 * elf64-x86-64.c (need_convert_load): Removed.
1803 (check_relocs_failed): Updated.
1804 (elf_x86_64_convert_load_reloc): Add an argument, r_type_p.
1805 Replace SYMBOL_REFERENCES_LOCAL with SYMBOL_REFERENCES_LOCAL_P.
1806 Return the new relocation type via r_type_p.
1807 (elf_x86_64_check_relocs): Call elf_x86_64_convert_load_reloc,
1808 instead of setting need_convert_load.
1809 (elf_x86_64_check_relocs): Don't check PIC if relocation has
1811 (_bfd_x86_64_elf_convert_load): Removed.
1812 (elf_x86_64_relocate_section): Replace SYMBOL_REFERENCES_LOCAL
1813 with SYMBOL_REFERENCES_LOCAL_P.
1814 (elf_x86_64_finish_dynamic_symbol): Likewise.
1815 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Don't
1817 (_bfd_x86_elf_size_dynamic_sections): Don't call convert_load.
1818 (_bfd_x86_elf_link_symbol_references_local): New function.
1819 * elfxx-x86.h (SYMBOL_REFERENCES_LOCAL_P): New.
1820 (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Replace elf.forced_local with
1821 SYMBOL_REFERENCES_LOCAL_P.
1822 (elf_x86_link_hash_entry): Add local_ref.
1823 (elf_x86_link_hash_table): Remove convert_load.
1824 (_bfd_i386_elf_convert_load): Removed.
1825 (_bfd_x86_64_elf_convert_load): Likewise.
1826 (_bfd_x86_elf_link_symbol_references_local): New.
1828 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1830 * elf64-x86-64.c (R_X86_64_converted_reloc_bit): New.
1831 (elf_x86_64_info_to_howto): Get the real relocation type by
1832 masking out R_X86_64_converted_reloc_bit.
1833 (elf_x86_64_check_tls_transition): Get the real relocation type
1834 by masking out R_X86_64_converted_reloc_bit.
1835 (elf_x86_64_convert_load_reloc): Set R_X86_64_converted_reloc_bit
1836 instead of setting converted_reloc.
1837 (elf_x86_64_relocate_section): Check R_X86_64_converted_reloc_bit
1838 instead of converted_reloc. Get the real relocation type by
1839 masking out R_X86_64_converted_reloc_bit.
1840 (elf_x86_64_link_setup_gnu_properties): Verify that the value of
1841 R_X86_64_converted_reloc_bit is valid.
1842 * elfxx-x86.h (converted_reloc): Removed.
1844 2017-09-06 H.J. Lu <hongjiu.lu@intel.com>
1846 * elf32-i386.c (elf_i386_relocate_section): Don't change r_type
1847 when calling elf_i386_tls_transition. Don't use ELF32_R_TYPE
1848 to get the relocation type again.
1849 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't change
1850 r_type when calling elf_x86_64_tls_transition. Don't use
1851 ELF32_R_TYPE to get the relocation type again.
1853 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1855 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Properly set
1858 2017-09-05 H.J. Lu <hongjiu.lu@intel.com>
1860 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Remove the sec
1861 argument. Don't check relocation overflow. Avoid relocation
1862 overflow if --no-relax is used. Set converted_reloc on symbol
1863 if a GOTPCREL relocation is converted.
1864 (elf_x86_64_relocate_section): Issue a fatal error and suggest
1865 --no-relax if GOTPCREL relocation conversion leads to relocation
1867 * elfxx-x86.h (elf_x86_link_hash_entry): Add converted_reloc.
1869 2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
1870 Edmar Wienskoski <edmar.wienskoski@nxp.com
1872 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_VLE_ADDR20.
1873 (ppc_elf_check_relocs): Handle it.
1874 (ppc_elf_vle_split20): New function.
1875 (ppc_elf_relocate_section): Handle R_PPC_VLE_ADDR20.
1877 2017-09-03 H.J. Lu <hongjiu.lu@intel.com>
1880 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Set tlsdesc_plt
1881 for x86-64 if GOT_TLS_GDESC_P is true.
1883 2017-09-03 Alan Modra <amodra@gmail.com>
1886 * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
1888 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1890 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1891 tls_get_addr for x86-64 in one place.
1893 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1895 * configure.ac (bfd_backends): Add elf64-x86-64.lo together
1896 with elfxx-x86.lo for 64-bit BFD.
1897 * configure: Regenerated.
1899 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1901 * elf32-i386.c (elf_i386_convert_load): Renamed to ...
1902 (_bfd_i386_elf_convert_load): This. Remove static.
1903 (elf_i386_size_dynamic_sections): Removed.
1904 (elf_backend_size_dynamic_sections): Likewise.
1905 * elf64-x86-64.c (elf_x86_64_convert_load): Renamed to ...
1906 (_bfd_x86_64_elf_convert_load): This. Remove static.
1907 (elf_x86_64_size_dynamic_sections): Removed.
1908 (elf_backend_size_dynamic_sections): Likewise.
1909 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): Renamed to ...
1910 (elf_x86_allocate_dynrelocs): This. Make it static.
1911 (_bfd_x86_elf_allocate_local_dynrelocs): Renamed to ...
1912 (elf_x86_allocate_local_dynreloc): This. Make it static.
1913 (elf_i386_is_reloc_section): New function.
1914 (elf_x86_64_is_reloc_section): Likewise.
1915 (_bfd_x86_elf_link_hash_table_create): Initialize convert_load,
1916 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1917 Rearrange got_entry_size initialization.
1918 (_bfd_x86_elf_size_dynamic_sections): New function.
1919 * elfxx-x86.h (elf_x86_link_hash_table): Add convert_load,
1920 is_reloc_section, dt_reloc, dt_reloc_sz and dt_reloc_ent.
1921 (_bfd_i386_elf_convert_load): New.
1922 (_bfd_x86_64_elf_convert_load): Likewise.
1923 (_bfd_x86_elf_size_dynamic_sections): Likewise.
1924 (elf_backend_size_dynamic_sections): Likewise.
1925 (_bfd_x86_elf_allocate_dynrelocs): Removed.
1926 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1928 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1930 * elfxx-x86.h (elf_x86_link_hash_table): Rearrange fields and
1933 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1935 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1936 sgotplt_jump_table_size with elf_x86_compute_jump_table_size.
1938 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1940 * elf32-i386.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1941 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Moved to ...
1942 * elfxx-x86.h (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1943 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Here.
1944 * elf64-x86-64.c (PLT_CIE_LENGTH, PLT_FDE_LENGTH,
1945 PLT_FDE_START_OFFSET, PLT_FDE_LEN_OFFSET): Removed.
1947 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1949 * elf32-i386.c (elf_i386_allocate_dynrelocs): Removed.
1950 (elf_i386_allocate_local_dynrelocs): Likewise.
1951 (elf_i386_size_dynamic_sections): Replace
1952 elf_i386_allocate_dynrelocs/elf_i386_allocate_local_dynrelocs
1953 with _bfd_x86_elf_allocate_dynrelocs and
1954 _bfd_x86_elf_allocate_local_dynrelocs.
1955 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Removed.
1956 (elf_x86_64_allocate_local_dynrelocs): Likewise.
1957 (elf_x86_64_size_dynamic_sections): Replace
1958 elf_x86_64_allocate_dynrelocs/elf_x86_64_allocate_local_dynrelocs
1959 with _bfd_x86_elf_allocate_dynrelocs and
1960 _bfd_x86_elf_allocate_local_dynrelocs.
1961 * elfxx-x86.c (_bfd_x86_elf_allocate_dynrelocs): New function.
1962 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1963 * elfxx-x86.h (_bfd_x86_elf_allocate_dynrelocs): New prototype.
1964 (_bfd_x86_elf_allocate_local_dynrelocs): Likewise.
1966 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1968 * elf32-i386.c (is_i386_elf): Removed.
1969 (elf_i386_check_relocs): Replace is_i386_elf with is_x86_elf.
1970 (elf_i386_size_dynamic_sections): Likewise.
1971 (elf_i386_relocate_section): Likewise.
1972 * elf64-x86-64.c (is_x86_64_elf): Removed.
1973 (elf_x86_64_check_relocs): Replace is_x86_64_elf with
1975 (elf_x86_64_size_dynamic_sections): Likewise.
1976 (elf_x86_64_relocate_section): Likewise.
1977 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1979 * elfxx-x86.h (elf_x86_link_hash_table): Add target_id.
1982 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
1984 * elf32-i386.c (elf_i386_compute_jump_table_size): Removed.
1985 (elf_i386_allocate_dynrelocs): Replace
1986 elf_i386_compute_jump_table_size with
1987 elf_x86_compute_jump_table_size.
1988 (elf_i386_size_dynamic_sections): Likewise.
1989 * elf64-x86-64.c (elf_x86_64_compute_jump_table_size): Removed.
1990 (elf_x86_64_allocate_dynrelocs): Replace
1991 elf_x86_64_compute_jump_table_size with
1992 elf_x86_compute_jump_table_size.
1993 (elf_x86_64_size_dynamic_sections): Likewise.
1994 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
1996 * elfxx-x86.h (elf_x86_link_hash_table): Add got_entry_size.
1997 (elf_x86_compute_jump_table_size): New.
1999 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
2001 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
2003 (_bfd_x86_elf_adjust_dynamic_symbol): Use sizeof_reloc.
2004 * elfxx-x86.h (elf_x86_link_hash_table): Add sizeof_reloc.
2006 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
2008 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check VxWorks
2009 with htab->is_vxworks.
2010 (elf_i386_size_dynamic_sections): Likewise.
2011 (elf_i386_relocate_section): Likewise.
2012 (elf_i386_finish_dynamic_symbol): Likewise.
2013 (elf_i386_finish_dynamic_sections): Likewise.
2015 2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
2017 * elf32-i386.c (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
2018 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
2019 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Moved to ...
2020 * elfxx-x86.h (GOT_TLS_IE, GOT_TLS_IE_POS, GOT_TLS_IE_NEG,
2021 GOT_TLS_IE_BOTH, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
2022 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Here.
2023 * elf64-x86-64.c (GOT_TLS_IE, GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P,
2024 GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): Removed.
2026 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
2029 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
2030 ELF_COMMON_DEF_P for common symbols.
2032 2017-09-02 Alan Modra <amodra@gmail.com>
2034 * elf-eh-frame.c (offset_adjust): Avoid false positive gcc warning.
2035 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Likewise.
2036 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
2038 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
2040 * elf32-i386.c (elf_i386_gc_mark_hook): Removed.
2041 (elf_backend_gc_mark_hook): Likewise.
2042 * elf64-x86-64.c (elf_x86_64_gc_mark_hook): Likewise.
2043 (elf_backend_gc_mark_hook): Likewise.
2044 * elfxx-x86.c (_bfd_x86_elf_gc_mark_hook): New function.
2045 * elfxx-x86.h (_bfd_x86_elf_gc_mark_hook): New.
2046 (elf_backend_gc_mark_hook): Likewise.
2048 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
2050 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Removed.
2051 (elf_backend_adjust_dynamic_symbol): Likewise.
2052 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
2053 (elf_backend_adjust_dynamic_symbol): Likewise.
2054 * elfxx-x86.c (_bfd_x86_elf_adjust_dynamic_symbol): New function.
2055 (_bfd_x86_elf_link_setup_gnu_properties): Copy is_vxworks.
2056 * elfxx-x86.h (elf_x86_link_hash_table): Add is_vxworks.
2057 (_bfd_x86_elf_adjust_dynamic_symbol): New.
2058 (elf_backend_adjust_dynamic_symbol): Likewise.
2060 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
2062 * elfxx-x86.h (elf_x86_plt_layout_table): Fix a typo in
2065 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
2067 * elf32-i386.c (elf_i386_mkobject): Removed.
2068 (bfd_elf32_mkobject): Likewise.
2069 * elf64-x86-64.c (elf_x86_64_mkobject): Likewise.
2070 (bfd_elf64_mkobject): Likewise.
2071 (bfd_elf32_mkobject): Likewise.
2072 * elfxx-x86.c (_bfd_x86_elf_mkobject): New function.
2073 * elfxx-x86.h (_bfd_x86_elf_mkobject): New.
2074 (bfd_elf64_mkobject): Likewise.
2075 (bfd_elf32_mkobject): Likewise.
2077 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
2079 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Updated.
2080 Call _bfd_x86_elf_link_setup_gnu_properties.
2081 * elf64-x86-64.c (elf_x86_lazy_plt_layout): Initialize
2082 pic_plt0_entry and pic_plt_entry fields with the non-PIC PLT
2084 (elf_x86_64_non_lazy_plt): Likewise.
2085 (elf_x86_64_lazy_bnd_plt): Likewise.
2086 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2087 (elf_x86_64_lazy_ibt_plt): Likewise.
2088 (elf_x32_lazy_ibt_plt): Likewise.
2089 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2090 (elf_x32_non_lazy_ibt_plt): Likewise.
2091 (elf_x86_64_nacl_plt): Likewise.
2092 (elf_x86_64_link_setup_gnu_properties): Updated. Call
2093 _bfd_x86_elf_link_setup_gnu_properties.
2094 * elfxx-x86.c: Include elf-vxworks.h".
2095 (_bfd_x86_elf_link_setup_gnu_properties): New function.
2096 * elfxx-x86.h (elf_x86_lazy_plt_layout): Remove "for i386 only"
2097 comments for pic_plt0_entry and pic_plt_entry.
2098 (elf_x86_non_lazy_plt_layout): Likewise.
2099 (elf_x86_plt_layout_table): New.
2100 (_bfd_x86_elf_link_setup_gnu_properties): Likewise.
2102 2017-09-01 H.J. Lu <hongjiu.lu@intel.com>
2105 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
2106 .eh_frame section for the second PLT.
2107 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
2108 alignment of .eh_frame section for the second PLT.
2110 2017-09-01 Nick Clifton <nickc@redhat.com>
2113 * dwarf2.c (decode_line_info): Fix test for an overlong line info
2116 2017-09-01 Nick Clifton <nickc@redhat.com>
2119 * elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
2120 attribute buffer is NUL terminated.
2122 2017-08-31 Nick Clifton <nickc@redhat.com>
2125 * dwarf2.c (read_section): If necessary add a terminating NUL byte
2126 to dwarf string sections.
2128 2017-08-31 Alan Modra <amodra@gmail.com>
2130 * po/SRC-POTFILES.in: Regenerate.
2132 2017-08-31 Alan Modra <amodra@gmail.com>
2134 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't exit early
2135 for a section containing just a terminator. Allow multiple
2136 terminators at end of section.
2137 * elflink.c (bfd_elf_discard_info): Iterate over .eh_frame
2138 sections when not adding alignment. Assert on terminator in
2141 2017-08-31 Alan Modra <amodra@gmail.com>
2145 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero
2148 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
2150 * configure.ac (bfd_backends): Add elf64.lo together with
2151 elfxx-x86.lo for 64-bit BFD.
2152 * configure: Regenerated.
2154 2017-08-31 James Bowman <james.bowman@ftdichip.com>
2156 * elf32-ft32.c (ft32_elf_howto_table): Use complain_overflow_dont
2159 2017-08-31 Alan Modra <amodra@gmail.com>
2162 * opncls.c (bfd_close_all_done): Don't call bfd_cache_close
2163 before _close_and_cleanup. Call iovec->bclose after.
2164 (bfd_close): Remove code common to, and call, bfd_close_all_done.
2166 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
2168 * elf32-i386.c (elf_i386_plt_type): Removed.
2169 (elf_i386_plt): Likewise.
2170 (elf_i386_get_synthetic_symtab): Updated. Call
2171 _bfd_x86_elf_get_synthetic_symtab.
2172 * elf64-x86-64.c (elf_x86_64_plt_type): Removed.
2173 (elf_x86_64_plt): Likewise.
2174 (elf_x86_64_get_synthetic_symtab): Updated. Call
2175 _bfd_x86_elf_get_synthetic_symtab.
2176 * elfxx-x86.c (elf_i386_get_plt_got_vma): New function.
2177 (elf_x86_64_get_plt_got_vma): Likewise.
2178 (elf_i386_valid_plt_reloc_p): Likewise.
2179 (elf_x86_64_valid_plt_reloc_p): Likewise.
2180 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
2181 * elfxx-x86.h (elf_x86_plt_type): New.
2182 (elf_x86_plt): Likewise.
2183 (_bfd_x86_elf_get_synthetic_symtab): Likewise.
2185 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
2187 * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Check
2188 target_id instead of elf_machine_code.
2190 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
2192 * elf32-i386.c (ELF_DYNAMIC_INTERPRETER): Removed.
2193 (elf_i386_lazy_plt_layout): Likewise.
2194 (elf_i386_non_lazy_plt_layout): Likewise.
2195 (elf_i386_plt_layout): Likewise.
2196 (elf_i386_link_hash_table): Likewise.
2197 (elf_i386_next_tls_desc_index): Likewise.
2198 (elf_i386_srelplt2): Likewise.
2199 (elf_i386_plt): Likewise.
2200 (elf_i386_lazy_plt): Likewise.
2201 (elf_i386_non_lazy_plt): Likewise.
2202 (elf_i386_link_hash_table_create): Likewise.
2203 (bfd_elf32_bfd_link_hash_table_create): Likewise.
2204 (elf_i386_lazy_plt): Updated.
2205 (elf_i386_non_lazy_plt): Likewise.
2206 (elf_i386_lazy_ibt_plt): Likewise.
2207 (elf_i386_non_lazy_ibt_plt): Likewise.
2208 (elf_i386_allocate_dynrelocs): Likewise.
2209 (elf_i386_size_dynamic_sections): Likewise.
2210 (elf_i386_relocate_section): Likewise.
2211 (elf_i386_finish_dynamic_symbol): Likewise.
2212 (elf_i386_finish_dynamic_sections): Likewise.
2213 (elf_i386_get_synthetic_symtab): Likewise.
2214 (elf_i386_link_setup_gnu_properties): Likewise.
2215 (elf_i386_nacl_plt): Likewise.
2216 * elf64-x86-64.c (ABI_64_P): Removed.
2217 (ELF64_DYNAMIC_INTERPRETER): Likewise.
2218 (ELF32_DYNAMIC_INTERPRETER): Likewise.
2219 (elf_x86_64_lazy_plt_layout): Likewise.
2220 (elf_x86_64_non_lazy_plt_layout): Likewise.
2221 (elf_x86_64_plt_layout): Likewise.
2222 (elf_x86_64_link_hash_table): Likewise.
2223 (elf_x86_64_plt): Likewise.
2224 (elf_x86_64_lazy_plt): Likewise.
2225 (elf_x86_64_non_lazy_plt): Likewise.
2226 (elf_x86_64_link_hash_table_create): Likewise.
2227 (bfd_elf64_bfd_link_hash_table_create): Likewise.
2228 (bfd_elf32_bfd_link_hash_table_create): Likewise.
2229 (elf_x86_64_lazy_plt): Updated.
2230 (elf_x86_64_non_lazy_plt): Likewise.
2231 (elf_x86_64_lazy_bnd_plt): Likewise.
2232 (elf_x86_64_non_lazy_bnd_plt): Likewise.
2233 (elf_x86_64_lazy_ibt_plt): Likewise.
2234 (elf_x32_lazy_ibt_plt): Likewise.
2235 (elf_x86_64_non_lazy_ibt_plt): Likewise.
2236 (elf_x32_non_lazy_ibt_plt): Likewise.
2237 (elf_x86_64_allocate_dynrelocs): Likewise.
2238 (elf_x86_64_size_dynamic_sections): Likewise.
2239 (elf_x86_64_relocate_section): Likewise.
2240 (elf_x86_64_finish_dynamic_symbol): Likewise.
2241 (elf_x86_64_finish_dynamic_sections): Likewise.
2242 (elf_x86_64_get_synthetic_symtab): Likewise.
2243 (elf_x86_64_link_setup_gnu_properties): Likewise.
2244 (elf_x86_64_nacl_plt): Likewise.
2245 * elfxx-x86.c: Include "objalloc.h", "elf/i386.h" and
2247 (ELF32_DYNAMIC_INTERPRETER): New.
2248 (ELF64_DYNAMIC_INTERPRETER): Likewise.
2249 (ELFX32_DYNAMIC_INTERPRETER): Likewise.
2250 (_bfd_x86_elf_link_hash_table_create): Likewise.
2251 (_bfd_x86_elf_link_hash_table_free): Renamed to ...
2252 (elf_x86_link_hash_table_free): This. Make it static.
2253 * elfxx-x86.h: Don't include "objalloc.h".
2255 (elf_x86_lazy_plt_layout): Likewise.
2256 (elf_x86_non_lazy_plt_layout): Likewise.
2257 (elf_x86_plt_layout): Likewise.
2258 (_bfd_x86_elf_link_hash_table_create): Likewise.
2259 (bfd_elf64_bfd_link_hash_table_create): Likewise.
2260 (bfd_elf32_bfd_link_hash_table_create): Likewise.
2261 (elf_x86_link_hash_table): Add plt, lazy_plt, non_lazy_plt,
2262 srelplt2 and next_tls_desc_index.
2263 (_bfd_x86_elf_link_hash_table_free): Removed.
2265 2017-08-30 Maciej W. Rozycki <macro@imgtec.com>
2267 * elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
2268 branch offset interpretation.
2270 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
2273 * opncls.c (bfd_close_all_done): Call _close_and_cleanup.
2275 2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
2277 * elf64-x86-64.c (elf_x86_64_next_tls_desc_index): Removed.
2278 (elf_x86_64_srelplt2): Likewise.
2280 2017-08-30 Alan Modra <amodra@gmail.com>
2282 * elf64-ppc.c (struct ppc_link_hash_table): Add do_tls_opt.
2283 (ppc64_elf_tls_optimize): Set it.
2284 (ppc64_elf_relocate_section): Nop addis on TPREL16_HA, and convert
2285 insn on TPREL16_LO and TPREL16_LO_DS relocs to use r13 when
2286 addis would add zero.
2287 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add do_tls_opt.
2288 (ppc_elf_tls_optimize): Set it.
2289 (ppc_elf_relocate_section): Nop addis on TPREL16_HA, and convert
2290 insn on TPREL16_LO relocs to use r2 when addis would add zero.
2292 2017-08-30 Alan Modra <amodra@gmail.com>
2294 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing
2295 __tls_get_addr call sequences to LE, don't move the addi down
2296 to the nop. Replace the bl with addi and leave the nop alone.
2298 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
2300 * elf32-i386.c (elf_i386_pie_finish_undefweak_symbol):
2302 * elf64-x86-64.c (elf_x86_64_finish_local_dynamic_symbol):
2304 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
2306 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
2308 * Makefile.am (BFD32_BACKENDS): Add elfxx-x86.lo.
2309 (BFD64_BACKENDS): Likewise.
2310 (BFD32_BACKENDS_CFILES): Add elfxx-x86.c.
2311 (BFD64_BACKENDS_CFILES): Likewise.
2312 * Makefile.in: Regenerated.
2313 * configure.ac (bfd_backends): Add elfxx-x86.lo together with
2314 elf32-i386.lo and elf64-x86-64.lo.
2315 * configure: Regenerated.
2316 * elf32-i386.c: Include "elfxx-x86.h" instead of "sysdep.h",
2317 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
2318 "objalloc.h" and "hashtab.h".
2319 (ELIMINATE_COPY_RELOCS): Removed.
2320 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
2321 (SYMBOL_NO_COPYRELOC): Likewise.
2322 (elf_i386_link_hash_entry): Likewise.
2323 (GOT_UNKNOWN): Likewise.
2324 (GOT_NORMAL): Likewise.
2325 (GOT_TLS_GD): Likewise.
2326 (elf_i386_hash_entry): Likewise.
2327 (elf_i386_obj_tdata): Likewise.
2328 (elf_i386_tdata): Likewise.
2329 (elf_i386_local_got_tls_type): Likewise.
2330 (elf_i386_local_tlsdesc_gotent): Likewise.
2331 (elf_i386_hash_table): Likewise.
2332 (elf_i386_link_hash_newfunc): Likewise.
2333 (elf_i386_local_htab_hash): Likewise.
2334 (elf_i386_local_htab_eq): Likewise.
2335 (elf_i386_get_local_sym_hash): Likewise.
2336 (elf_i386_link_hash_table_free): Likewise.
2337 (elf_i386_copy_indirect_symbol): Likewise.
2338 (elf_i386_fixup_symbol): Likewise.
2339 (elf_i386_readonly_dynrelocs): Likewise.
2340 (elf_i386_always_size_sections): Likewise.
2341 (elf_i386_set_tls_module_base): Likewise.
2342 (elf_i386_dtpoff_base): Likewise.
2343 (compare_relocs): Likewise.
2344 (elf_i386_hash_symbol): Likewise.
2345 (elf_i386_parse_gnu_properties): Likewise.
2346 (elf_i386_merge_gnu_properties): Likewise.
2347 (elf_i386_link_check_relocs): Likewise.
2348 (elf_i386_merge_symbol_attribute): Likewise.
2349 (bfd_elf32_bfd_link_check_relocs): Likewise.
2350 (elf_backend_copy_indirect_symbol): Likewise.
2351 (elf_backend_always_size_sections): Likewise.
2352 (elf_backend_omit_section_dynsym): Likewise.
2353 (elf_backend_hash_symbol): Likewise.
2354 (elf_backend_fixup_symbol): Likewise.
2355 (elf_backend_parse_gnu_properties): Likewise.
2356 (elf_backend_merge_gnu_properties): Likewise.
2357 (elf_backend_merge_symbol_attribute): Likewise.
2358 (elf_i386_mkobject): Updated.
2359 (elf_i386_link_hash_table_create): Likewise.
2360 (elf_i386_check_tls_transition): Likewise.
2361 (elf_i386_tls_transition): Likewise.
2362 (elf_i386_convert_load_reloc): Likewise.
2363 (elf_i386_check_relocs): Likewise.
2364 (elf_i386_adjust_dynamic_symbol): Likewise.
2365 (elf_i386_allocate_dynrelocs): Likewise.
2366 (elf_i386_convert_load): Likewise.
2367 (elf_i386_size_dynamic_sections): Likewise.
2368 (elf_i386_relocate_section): Likewise.
2369 (elf_i386_finish_dynamic_symbol ): Likewise.
2370 (elf_i386_finish_dynamic_sections): Likewise.
2371 (elf_i386_output_arch_local_syms): Likewise.
2372 (elf_i386_get_synthetic_symtab): Likewise.
2373 (elf_i386_link_setup_gnu_properties): Likewise.
2374 (elf_i386_link_hash_table): Use elf_x86_link_hash_table, instead
2375 of elf_link_hash_table, as base.
2376 (elf_i386_next_tls_desc_index): New.
2377 (elf_i386_srelplt2): Likewise.
2378 (elf_i386_plt): Likewise.
2379 (elf_i386_lazy_plt): Likewise.
2380 (elf_i386_non_lazy_plt): Likewise.
2381 * elf32-x86-64.c: Include "elfxx-x86.h" instead of "sysdep.h",
2382 "bfd.h", "bfdlink.h", "libbfd.h", "elf-bfd.h", "bfd_stdint.h",
2383 "objalloc.h" and "hashtab.h".
2384 (ELIMINATE_COPY_RELOCS): Removed.
2385 (UNDEFINED_WEAK_RESOLVED_TO_ZERO):Likewise.
2386 (SYMBOL_NO_COPYRELOC): Likewise.
2387 (elf_x86_64_link_hash_entry): Likewise.
2388 (GOT_UNKNOWN): Likewise.
2389 (GOT_NORMAL): Likewise.
2390 (GOT_TLS_GD): Likewise.
2391 (elf_x86_64_hash_entry): Likewise.
2392 (elf_x86_64_obj_tdata): Likewise.
2393 (elf_x86_64_tdata): Likewise.
2394 (elf_x86_64_local_got_tls_type): Likewise.
2395 (elf_x86_64_local_tlsdesc_gotent): Likewise.
2396 (elf_x86_64_hash_table): Likewise.
2397 (elf_x86_64_link_hash_newfunc): Likewise.
2398 (elf_x86_64_local_htab_hash): Likewise.
2399 (elf_x86_64_local_htab_eq): Likewise.
2400 (elf_x86_64_get_local_sym_hash): Likewise.
2401 (elf_x86_64_link_hash_table_free): Likewise.
2402 (elf_x86_64_copy_indirect_symbol): Likewise.
2403 (elf_x86_64_fixup_symbol): Likewise.
2404 (elf_x86_64_readonly_dynrelocs): Likewise.
2405 (elf_x86_64_always_size_sections): Likewise.
2406 (elf_x86_64_set_tls_module_base): Likewise.
2407 (elf_x86_64_dtpoff_base): Likewise.
2408 (compare_relocs): Likewise.
2409 (elf_x86_64_merge_symbol_attribute): Likewise.
2410 (elf_x86_64_hash_symbol): Likewise.
2411 (elf_x86_64_parse_gnu_properties): Likewise.
2412 (elf_x86_64_merge_gnu_properties): Likewise.
2413 (elf_x86_64_link_check_relocs): Likewise.
2414 (elf_backend_copy_indirect_symbol): Likewise.
2415 (elf_backend_always_size_sections): Likewise.
2416 (bfd_elf64_bfd_link_check_relocs): Likewise.
2417 (elf_backend_merge_symbol_attribute): Likewise.
2418 (elf_backend_hash_symbol): Likewise.
2419 (elf_backend_omit_section_dynsym): Likewise.
2420 (elf_backend_fixup_symbol): Likewise.
2421 (elf_backend_parse_gnu_properties): Likewise.
2422 (elf_backend_merge_gnu_properties): Likewise.
2423 (bfd_elf32_bfd_link_check_relocs): Likewise.
2424 (elf_x86_64_mkobject): Updated.
2425 (elf_x86_64_link_hash_table_create): Likewise.
2426 (elf_x86_64_check_tls_transition): Likewise.
2427 (elf_x86_64_tls_transition): Likewise.
2428 (elf_x86_64_convert_load_reloc): Likewise.
2429 (elf_x86_64_check_relocs): Likewise.
2430 (elf_x86_64_adjust_dynamic_symbol): Likewise.
2431 (elf_x86_64_allocate_dynrelocs): Likewise.
2432 (elf_x86_64_convert_load): Likewise.
2433 (elf_x86_64_size_dynamic_sections): Likewise.
2434 (elf_x86_64_relocate_section): Likewise.
2435 (elf_x86_64_finish_dynamic_symbol ): Likewise.
2436 (elf_x86_64_finish_dynamic_sections): Likewise.
2437 (elf_x86_64_output_arch_local_syms): Likewise.
2438 (elf_x86_64_get_synthetic_symtab): Likewise.
2439 (elf_x86_64_link_setup_gnu_properties): Likewise.
2440 (elf_x86_64_link_hash_table): Use elf_x86_link_hash_table,
2441 instead of elf_link_hash_table, as base.
2442 (elf_x86_64_next_tls_desc_index): New.
2443 (elf_x86_64_srelplt2): Likewise.
2444 (elf_x86_64_plt): Likewise.
2445 (elf_x86_64_lazy_plt): Likewise.
2446 (elf_x86_64_non_lazy_plt): Likewise.
2447 * elfxx-x86.c: New file.
2448 * elfxx-x86.h: Likewise.
2450 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
2452 * elf32-i386.c (elf_i386_get_synthetic_symtab): Simplify bad
2454 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2456 2017-08-29 H.J. Lu <hongjiu.lu@intel.com>
2458 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check valid PLT
2459 sections before checking dynamic relocations and free invalid
2460 PLT section contents.
2461 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2463 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
2465 * elf-bfd.h (_bfd_elf_ifunc_get_synthetic_symtab): Removed.
2466 * elf-ifunc.c (_bfd_elf_ifunc_get_synthetic_symtab): Likewise.
2468 2017-08-28 H.J. Lu <hongjiu.lu@intel.com>
2471 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
2473 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2475 2017-08-27 H.J. Lu <hongjiu.lu@intel.com>
2477 * elf32-i386.c (elf_i386_link_hash_newfunc): Initialize
2479 * elf64-x86-64.c (elf_x86_64_link_hash_newfunc): Likewise.
2481 2017-08-26 H.J. Lu <hongjiu.lu@intel.com>
2484 * elf-bfd.h (elf_obj_tdata): Use ENUM_BITFIELD on object_id,
2485 dyn_lib_class and has_gnu_symbols. Change bad_symtab to bitfield.
2486 Add a has_no_copy_on_protected bitfield.
2487 (elf_has_no_copy_on_protected): New.
2488 * elf-properties.c (_bfd_elf_parse_gnu_properties): Set
2489 elf_has_no_copy_on_protected for GNU_PROPERTY_NO_COPY_ON_PROTECTED.
2490 (elf_merge_gnu_property_list): Likewise.
2491 (_bfd_elf_link_setup_gnu_properties): Set extern_protected_data
2492 to FALSE for elf_has_no_copy_on_protected.
2493 * elf32-i386.c (SYMBOL_NO_COPYRELOC): New.
2494 (elf_i386_link_hash_entry): Add def_protected.
2495 (elf_i386_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
2496 when checking info->nocopyreloc.
2497 (elf_i386_link_setup_gnu_properties): Don't set
2498 extern_protected_data here.
2499 (elf_i386_merge_symbol_attribute): New function.
2500 (elf_backend_merge_symbol_attribute): New.
2501 * elf64-x86-64.c (SYMBOL_NO_COPYRELOC): New.
2502 (elf_x86_64_link_hash_entry): Add def_protected.
2503 (elf_x86_64_need_pic): Report protected symbol for def_protected.
2504 (elf_x86_64_adjust_dynamic_symbol): Also check SYMBOL_NO_COPYRELOC
2505 when checking info->nocopyreloc.
2506 (elf_x86_64_relocate_section): Also check for R_X86_64_PC32
2507 relocation run-time overflow and unresolvable R_X86_64_32S
2508 relocation against protected data symbol defined in shared object
2509 with GNU_PROPERTY_NO_COPY_ON_PROTECTED.
2510 (elf_x86_64_link_setup_gnu_properties): Don't set
2511 extern_protected_data here.
2512 (elf_x86_64_merge_symbol_attribute): New function.
2513 (elf_backend_merge_symbol_attribute): New.
2515 2017-08-26 Alan Modra <amodra@gmail.com>
2517 * elf32-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
2518 (ppc_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
2519 (ppc_elf_relocate_section): Comment fix.
2520 * elf64-ppc.c (must_be_dyn_reloc): Use bfd_link_dll. Comment.
2521 (ppc64_elf_check_relocs): Only set DF_STATIC_TLS in shared libs.
2522 Support dynamic relocs for TPREL16 when non-pic too.
2523 (dec_dynrel_count): Adjust TPREL16 handling as per check_relocs.
2524 (ppc64_elf_relocate_section): Support dynamic relocs for TPREL16
2527 2017-08-25 H.J. Lu <hongjiu.lu@intel.com>
2529 * elf32-i386.c (elf_i386_link_hash_entry): Remove redundant
2530 "symbol" in comments.
2531 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Likewise.
2533 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
2536 * elf64-x86-64.c (elf_x86_64_relocate_section): Check for
2537 R_X86_64_PC32 relocation run-time overflow and unresolvable
2538 R_X86_64_32S relocation with -z nocopyreloc.
2540 2017-08-24 H.J. Lu <hongjiu.lu@intel.com>
2542 * elf32-i386.c (elf_i386_check_relocs): Revert the last change.
2543 Undefined symbols may not have a type.
2544 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2546 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2548 * elf64-x86-64.c (elf_x86_64_need_pic): Add an argument for
2549 bfd_link_info. Report shared, PIE or PDE object based on
2551 (elf_x86_64_check_relocs): Update elf_x86_64_need_pic call.
2552 (elf_x86_64_relocate_section): Likewise.
2554 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2556 * elf32-i386.c (elf_i386_check_relocs): Increment PLT count only
2557 for function symbols.
2558 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2560 2017-08-23 H.J. Lu <hongjiu.lu@intel.com>
2562 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Set
2563 extern_protected_data to FALSE if GNU_PROPERTY_NO_COPY_ON_PROTECTED
2564 is set on any input relocatable file.
2565 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
2567 2017-08-23 Alan Modra <amodra@gmail.com>
2570 * elf64-ppc.c (ensure_undef_dynamic): Rename from
2571 ensure_undefweak_dynamic. Handle undefined too.
2572 * elf32-ppc.c (ensure_undef_dynamic): Likewise.
2573 * elf32-hppa.c (ensure_undef_dynamic): Likewise.
2574 (allocate_dynrelocs): Discard undefined non-default visibility
2575 relocs first. Make undefined syms dynamic. Tidy goto.
2577 2017-08-21 Alan Modra <amodra@gmail.com>
2578 H.J. Lu <hongjiu.lu@intel.com>
2581 * elf-bfd.h (SYMBOLIC_BIND): Return TRUE for __start/__stop symbols.
2582 * elflink.c (bfd_elf_define_start_stop): Rewrite.
2584 2017-08-21 Hans-Peter Nilsson <hp@bitrange.com>
2587 * elf64-mmix.c (mmix_elf_relax_section): Correct handling of
2588 undefined weak symbols.
2590 2017-08-18 Nick Clifton <nickc@redhat.com>
2593 * tekhex.c (getsym): Fix check for source pointer walking off the
2594 end of the input buffer.
2596 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
2599 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Skip IFUNC
2600 relocations in debug sections, change abort to _bfd_error_handler.
2602 2017-08-14 Nick Clifton <nickc@redhat.com>
2605 * elf.c (setup_group): Check for an empty or very small group
2607 * po/bfd.pot: Regenerate.
2609 2017-08-14 Alan Modra <amodra@gmail.com>
2612 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
2613 alignment padding here.
2614 * elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
2615 in a reverse pass over sections.
2617 2017-08-11 H.J. Lu <hongjiu.lu@intel.com>
2620 * elf32-i386.c (elf_i386_get_synthetic_symtab): Allocate space
2621 for @plt suffixes first.
2622 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
2624 2017-08-08 Nick Clifton <nickc@redhat.com>
2627 * elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
2628 small section lengths.
2629 * elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
2631 (elfcore_grok_freebsd_prstatus): Add checks to make sure that
2632 there is enough data present in the note.
2634 2017-08-08 Alan Modra <amodra@gmail.com>
2637 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump
2638 got.refcount for GOTOFF relocs, just create .got section.
2640 2017-08-07 H.J. Lu <hongjiu.lu@intel.com>
2642 * elflink.c (elf_link_add_object_symbols): Move common symbol
2643 check after bed->common_definition.
2645 2017-08-07 Alan Modra <amodra@gmail.com>
2648 * elflink.c (bfd_elf_final_link): Don't segfault when sections
2649 needed to define various dynamic tags have been discarded.
2651 2017-08-07 Nick Clifton <nickc@redhat.com>
2654 * elf32-i386.c (elf_i386_link_setup_gnu_properties): If the dynobj
2655 has not been set then use the bfd returned by
2656 _bfd_elf_link_setup_gnu_properties. If that is null then search
2657 through all the input bfds selecting the first normal, ELF format
2659 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Likewise.
2661 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
2663 * elf32-i386.c (elf_i386_link_hash_entry): Change tls_get_addr
2665 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 0.
2666 (elf_i386_check_tls_transition): Check tls_get_addr directly.
2667 (elf_i386_convert_load_reloc): Update tls_get_addr check.
2668 (elf_i386_link_check_relocs): New function.
2669 (bfd_elf32_bfd_link_check_relocs): New.
2670 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Change tls_get_addr
2672 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 0.
2673 (elf_x86_64_check_tls_transition): Check tls_get_addr directly.
2674 (elf_x86_64_convert_load_reloc): Update tls_get_addr check.
2675 (elf_x86_64_link_check_relocs): New function.
2676 (bfd_elf64_bfd_link_check_relocs): New.
2677 (bfd_elf32_bfd_link_check_relocs): Likewise.
2679 2017-08-06 H.J. Lu <hongjiu.lu@intel.com>
2682 * elflink.c (elf_link_add_object_symbols): Treat common symbol
2683 as undefined for --no-define-common.
2685 2017-08-05 Alan Modra <amodra@gmail.com>
2687 * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
2688 hppa_link_hash_table.
2690 2017-08-02 Max Filippov <jcmvbkbc@gmail.com>
2692 * xtensa-isa.c (xtensa_isa_init): Don't update lookup table
2693 entries for sysregs with negative indices.
2695 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2697 * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
2698 isn't the S/390 specific elf data.
2699 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2701 2017-07-31 Kuan-Lin Chen <rufus@andestech.com>
2703 * elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
2704 * (howto_table) [R_RISCV_ADD8]: Use riscv_elf_add_sub_reloc.
2705 [R_RISCV_ADD16]: Likewise.
2706 [R_RISCV_ADD32]: Likewise.
2707 [R_RISCV_ADD64]: Likewise.
2708 [R_RISCV_SUB6]: Likewise.
2709 [R_RISCV_SUB8]: Likewise.
2710 [R_RISCV_SUB16]: Likewise.
2711 [R_RISCV_SUB32]: Likewise.
2712 [R_RISCV_SUB64]: Likewise.
2714 2017-07-31 Alan Modra <amodra@gmail.com>
2716 * elf64-ppc.c (ppc64_elf_tls_setup): Warn on --plt-localentry
2717 without ld.so checks.
2719 2017-07-29 Alan Modra <amodra@gmail.com>
2722 * elf64-ppc.c (struct ppc_link_hash_entry): Add non_zero_localentry.
2723 (ppc64_elf_merge_symbol): Set non_zero_localentry.
2724 (is_elfv2_localentry0): Test non_zero_localentry.
2725 (ppc64_elf_tls_setup): Default to --no-plt-localentry.
2727 2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2729 * elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
2730 pointer check for htab->elf.irelplt.
2731 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
2733 2017-07-27 Nick Clifton <nickc@redhat.com>
2736 * mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
2738 * nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
2740 * section.c (bfd_make_section_with_flags): Fail if the name or bfd
2742 * vms-alpha.c (bfd_make_section_with_flags): Correct computation
2744 (evax_bfd_print_emh): Check for invalid string lengths.
2746 2017-07-25 Nick Clifton <nickc@redhat.com>
2748 * po/fr.po: Updated French translation.
2750 2017-07-25 Benjamin Green <bengreen5mx@gmail.com>
2753 * elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
2754 16-bit absolute branches into 10-bit pc-relative branches on the
2755 MSP430 as well as the MSP430X.
2757 2017-07-25 Alan Modra <amodra@gmail.com>
2759 * elf64-ppc.c (struct map_stub): Add tls_get_addr_opt_bctrl.
2760 (stub_eh_frame_size): New function.
2761 (ppc_size_one_stub): Set group tls_get_addr_opt_bctrl.
2762 (group_sections): Init group tls_get_addr_opt_bctrl.
2763 (ppc64_elf_size_stubs): Update sizing and initialization of
2764 .eh_frame. Iteration over stubs via group list.
2765 (ppc64_elf_build_stubs): Iterate over stubs via group list.
2766 (ppc64_elf_finish_dynamic_sections): Update finalization of
2769 2017-07-24 Nick Clifton <nickc@redhat.com>
2772 * mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
2773 of the relocs to the canonicalize_one_reloc routine.
2774 * mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
2775 for the _bfd_mach_o_canonicalize_one_reloc field.
2776 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
2777 res_base parameter. Use to check for corrupt pair relocs.
2778 * mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
2780 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
2782 * mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
2785 * vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
2786 enough data in the record before attempting to parse it.
2787 (_bfd_vms_slurp_eeom): Likewise.
2789 (_bfd_vms_slurp_egsd): Check for an invalid section index.
2790 (image_set_ptr): Likewise.
2791 (alpha_vms_slurp_relocs): Likewise.
2793 (alpha_vms_object_p): Check for a truncated record.
2795 2017-07-24 Nick Clifton <nickc@redhat.com>
2798 * reloc.c (_bfd_unrecognized_reloc): New function. Reports
2799 an unrecognized reloc and sets the bfd_error value.
2800 * libbfd.h: Regenerate.
2801 * elf32-arm.c (elf32_arm_final_link_relocate): Use the new
2803 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2804 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2805 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2806 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise.
2807 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2809 2017-07-23 Alan Modra <amodra@gmail.com>
2811 * elf64-ppc.c (ppc64_elf_size_stubs): Correct advance to
2814 2017-07-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
2817 * elfnn-aarch64.c (elfNN_aarch64_reloc_type_class): Return
2818 reloc_class_ifunc for ifunc symbols.
2820 2017-07-19 Nick Clifton <nickc@redhat.com>
2823 * archive.c (bfd_generic_archive_p): If the bfd does not have the
2824 correct magic bytes at the start, set the error to wrong format
2825 and clear the format selector before returning NULL.
2827 2017-07-19 Nick Clifton <nickc@redhat.com>
2830 * coff-rs6000.c (_bfd_strntol): New function.
2831 (_bfd_strntoll): New function.
2832 (GET_VALUE_IN_FIELD): New macro.
2833 (EQ_VALUE_IN_FIELD): new macro.
2834 (_bfd_xcoff_slurp_armap): Use new macros.
2835 (_bfd_xcoff_archive_p): Likewise.
2836 (_bfd_xcoff_read_ar_hdr): Likewise.
2837 (_bfd_xcoff_openr_next_archived_file): Likewise.
2838 (_bfd_xcoff_stat_arch_elt): Likewise.
2839 * coff64-rs6000.c (_bfd_strntol): New function.
2840 (_bfd_strntoll): New function.
2841 (GET_VALUE_IN_FIELD): New macro.
2842 (xcoff64_slurp_armap): Use new macros.
2844 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
2845 John Eric Martin <John.Martin@emmicro-us.com>
2847 * bfd-in2.h: Regenerate.
2848 * libbfd.h: Regenerate.
2849 * elf32-arc.c (JLI): Define.
2850 * reloc.c: Add JLI relocations.
2852 2017-07-18 Nick Clifton <nickc@redhat.com>
2855 * coff-sh.c: Fix spelling typos.
2856 * compress.c: Likewise.
2857 * cpu-pdp11.c: Likewise.
2858 * ecofflink.c: Likewise.
2859 * elf-m10300.c: Likewise.
2861 * elf32-arm.c: Likewise.
2862 * elf32-m68k.c: Likewise.
2863 * elf32-nds32.c: Likewise.
2864 * elf32-ppc.c: Likewise.
2865 * elf32-sh.c: Likewise.
2866 * elf32-v850.c: Likewise.
2867 * elf64-ppc.c: Likewise.
2868 * elf64-x86-64.c: Likewise.
2869 * elflink.c: Likewise.
2870 * elfnn-aarch64.c: Likewise.
2871 * elfxx-mips.c: Likewise.
2873 * sunos.c: Likewise.
2874 * vms-alpha.c: Likewise.
2875 * xcofflink.c: Likewise.
2877 2017-07-18 Nick Clifton <nickc@redhat.com>
2880 * coffcode.h (handle_COMDAT): Replace abort with an error message
2883 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2886 * elf64-x86-64.c (elf_x86_64_relocate_section): Limit PIC check
2889 2017-07-17 H.J. Lu <hongjiu.lu@intel.com>
2891 * elf64-x86-64.c (elf_x86_64_relocate_section): Re-indent.
2893 2017-07-16 Alan Modra <amodra@gmail.com>
2895 * elf64-ppc.c (ppc64_elf_relocate_section): Don't optimize
2896 __tls_index GOT entries when using __tls_get_addr_opt stub.
2897 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2899 2017-07-12 Alan Modra <amodra@gmail.com>
2901 * po/es.po: Update from translationproject.org/latest/bfd/.
2902 * po/fi.po: Likewise.
2903 * po/fr.po: Likewise.
2904 * po/id.po: Likewise.
2905 * po/ja.po: Likewise.
2906 * po/ro.po: Likewise.
2907 * po/ru.po: Likewise.
2908 * po/sr.po: Likewise.
2909 * po/sv.po: Likewise.
2910 * po/tr.po: Likewise.
2911 * po/uk.po: Likewise.
2912 * po/vi.po: Likewise.
2913 * po/zh_CN.po: Likewise.
2914 * po/hr.po: New file from translationproject.org.
2915 * configure.ac (ALL_LINGUAS): Add hr. Sort.
2916 * configure: Regenerate.
2918 2017-07-12 Nick Clifton <nickc@redhat.com>
2920 Fix compile time warnings using gcc 7.1.1.
2921 * elf32-xtensa.c (elf_xtensa_get_plt_section): Increase length of
2923 (elf_xtensa_get_gotplt_section): Increase length of got_name
2925 * mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add a
2926 default return of FALSE.
2927 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Add a
2928 default return of FALSE.
2930 2017-07-12 Alan Modra <amodra@gmail.com>
2932 * binary.c (binary_set_section_contents): Don't print filepos in
2934 (coff_write_object_contents): Cast size_t for error message.
2935 (coff_slurp_line_table): Don't use bfd_vma symndx.
2936 (coff_slurp_reloc_table): Remove unneeded cast.
2937 * dwarf2.c (read_section): Cast bfd_int64_t to long long for
2939 (find_abstract_instance_name): Likewise.
2940 * elf32-arm.c (arm_type_of_stub): Correct error arg order.
2941 (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
2942 (elf32_arm_check_relocs): Make r_symndx an int.
2943 * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
2945 * elf32-metag.c (elf_metag_relocate_section): Delete extra error
2947 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
2949 * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
2950 * elf32-s390.c (elf_s390_check_relocs): Likewise.
2951 * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
2952 * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
2953 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
2954 * elf64-s390.c (elf_s390_check_relocs): Likewise.
2955 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2956 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
2957 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
2958 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
2959 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
2960 * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
2961 and use %lu for error message.
2962 * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
2963 * mmo.c (mmo_scan): Make stab_loc a file_ptr. Cast expression for
2966 * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
2968 (elf32_arm_final_link_relocate): Likewise.
2969 * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
2970 * coffcode.h (styp_to_sec_flags): Likewise.
2971 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
2972 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
2973 * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
2974 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
2975 (elf32_bfin_merge_private_bfd_data): Likewise.
2976 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2977 * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
2978 * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
2979 (i370_elf_relocate_section): Likewise.
2980 * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
2981 * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
2982 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
2983 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2984 * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
2985 * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
2986 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
2987 * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
2988 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
2989 * ieee.c (ieee_write_id, read_id): Likewise.
2990 * mach-o.c (bfd_mach_o_write_contents): Likewise.
2991 (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
2992 (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
2993 (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
2994 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
2995 * stabs.c (_bfd_link_section_stabs): Likewise.
2997 * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
2999 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
3000 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
3001 * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
3002 * coff-sh.c (sh_relax_section): Likewise.
3003 (sh_relax_delete_bytes, sh_swap_insns): Likewise.
3004 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
3005 * coffcode.h (coff_slurp_reloc_table): Likewise.
3006 * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
3007 (_bfd_coff_read_string_table): Likewise.
3008 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
3009 * compress.c (bfd_get_full_section_contents): Likewise.
3010 * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
3011 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
3012 * elf.c (bfd_elf_string_from_elf_section): Likewise.
3013 * elf32-arc.c (arc_special_overflow_checks): Likewise.
3014 * elf32-arm.c (elf32_arm_tls_relax): Likewise.
3015 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
3016 (elf32_arm_write_section): Likewise.
3017 * elf32-bfin.c (bfin_relocate_section): Likewise.
3018 (bfinfdpic_relocate_section): Likewise.
3019 * elf32-hppa.c (hppa_build_one_stub): Likewise.
3020 (final_link_relocate, elf32_hppa_relocate_section): Likewise.
3021 * elf32-i386.c (elf_i386_tls_transition): Likewise.
3022 (elf_i386_relocate_section): Likewise.
3023 * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
3024 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
3025 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
3026 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3027 * elf32-metag.c (elf_metag_relocate_section): Likewise.
3028 * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
3029 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
3030 (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
3031 (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
3032 (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
3033 (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
3034 (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
3035 (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
3036 (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
3037 * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
3038 * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
3039 * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
3040 * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
3041 * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
3042 * elf32-sh.c (sh_elf_relax_section): Likewise.
3043 (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
3044 (sh_elf_relocate_section): Likewise.
3045 * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
3046 * elf32-spu.c (spu_elf_relocate_section): Likewise.
3047 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
3048 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
3049 * elf32-v850.c (v850_elf_relax_section): Likewise.
3050 * elf32-vax.c (elf_vax_check_relocs): Likewise.
3051 (elf_vax_relocate_section): Likewise.
3052 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
3053 (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
3054 (compute_text_actions, compute_ebb_proposed_actions): Likewise.
3055 (do_fix_for_relocatable_link): Likewise.
3056 * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
3057 (elf64_alpha_relax_with_lituse): Likewise.
3058 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
3059 (elf_hppa_final_link_relocate): Likewise.
3060 * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
3061 (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
3062 (elf64_vms_link_add_object_symbols): Likewise.
3063 * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
3064 (mmix_final_link_relocate): Likewise.
3065 * elf64-s390.c (invalid_tls_insn): Likewise.
3066 (elf_s390_relocate_section): Likewise.
3067 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
3068 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
3069 (elf_x86_64_relocate_section): Likewise.
3070 * elfcode.h (elf_slurp_symbol_table): Likewise.
3071 * elfcore.h (elf_core_file_p): Likewise.
3072 * elflink.c (elf_link_read_relocs_from_section): Likewise.
3073 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
3074 (elfNN_aarch64_relocate_section): Likewise.
3075 * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
3076 (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
3077 * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
3078 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
3079 (_bfd_mips_elf_relocate_section): Likewise.
3080 (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
3081 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
3082 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
3083 * ieee.c (ieee_slurp_external_symbols): Likewise.
3084 * ihex.c (ihex_write_object_content): Likewise.
3085 * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
3086 * merge.c (_bfd_merged_section_offset): Likewise.
3087 * mmo.c (mmo_write_loc_chunk): Likewise.
3088 (mmo_write_object_contents): Likewise.
3089 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
3090 * stabs.c (_bfd_link_section_stabs): Likewise.
3091 * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
3093 2017-07-11 Alan Modra <amodra@gmail.com>
3095 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
3097 2017-07-11 Alan Modra <amodra@gmail.com>
3099 * elf32-ppc.c (ppc_elf_relocate_section): Emit "unexpected
3100 instruction" error using _bfd_error_handler, not einfo.
3102 2017-07-10 Nick Clifton <nickc@redhat.com>
3104 * coffcode.h (coff_slurp_symbol_table): Do not include an entry
3105 for C_AIX_WEAKEXT if it has the same value as C_WEAKEXT.
3107 2017-07-07 John Baldwin <jhb@FreeBSD.org>
3109 * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PTLWPINFO.
3111 2017-07-07 Alan Modra <amodra@gmail.com>
3113 * coffcode.h (coff_slurp_symbol_table): Handle C_AIX_WEAKEXT.
3115 2017-07-07 Alan Modra <amodra@gmail.com>
3117 * bfd.c (_doprnt): Replace "L" with "ll" when printing bfd_vma
3118 as long long. Move code replacing "ll" with "I64", and simplify.
3120 2017-07-06 H.J. Lu <hongjiu.lu@intel.com>
3122 * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width
3125 2017-07-05 H.J. Lu <hongjiu.lu@intel.com>
3127 * dwarf2.c (line_info_add_include_dir_stub): Replace time with
3129 (line_info_add_file_name): Likewise.
3130 (decode_line_info): Likewise.
3132 2017-07-04 Tristan Gingold <gingold@adacore.com>
3134 * version.m4: Bump version to 2.29.51
3135 * configure: Regenerate.
3137 2017-07-04 Jiong Wang <jiong.wang@arm.com>
3139 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
3140 sanity check at the head of this function.
3142 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3144 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
3145 dwarf_line_str_size.
3146 (struct attr_abbrev): Add field implicit_const.
3147 (dwarf_debug_sections): Add .debug_line_str.
3148 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
3149 (dwarf_debug_section_assert): Add static assertion.
3150 (read_indirect_line_string): New.
3151 (read_abbrevs): Support DW_FORM_implicit_const.
3152 (is_str_attr): Support DW_FORM_line_strp.
3153 (read_attribute_value): Support DW_FORM_line_strp and
3154 DW_FORM_implicit_const.
3155 (read_attribute): Support DW_FORM_implicit_const.
3156 (line_info_add_include_dir, line_info_add_include_dir_stub):
3157 (line_info_add_file_name, read_formatted_entries): New.
3158 (decode_line_info, parse_comp_unit): Support DWARF 5.
3159 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
3161 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3163 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
3164 abort statement that was put for symbols that are not dynamic.
3166 2017-07-03 Tristan Gingold <gingold@adacore.com>
3168 * po/bfd.pot: Regenerate
3170 2017-07-03 Alan Modra <amodra@gmail.com>
3172 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
3173 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
3174 * elf.c (setup_group): Use "Lx" to print sh_size.
3175 (_bfd_elf_setup_sections): Remove unnecessary cast and print
3176 unknown section type in hex.
3177 (copy_special_section_fields): Style fix.
3178 (bfd_section_from_shdr): Correct format for sh_link. Use a
3179 common error message for all the variants of unrecognized
3181 (assign_file_positions_for_load_sections): Use "Lx" for lma
3182 adjust error message.
3183 (assign_file_positions_for_non_load_sections): Formatting.
3184 (rewrite_elf_program_header): Formatting. Use "Lx" for
3185 bfd_vma values in error messages.
3186 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
3187 ELF_R_SYM value to type expected by format.
3188 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
3190 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
3191 (elf_link_input_bfd): Use "Lx" for r_info.
3192 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
3194 2017-07-03 Alan Modra <amodra@gmail.com>
3196 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
3197 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
3198 Microsoft C library variant of long long format specifier.
3199 (PRINT20): Cast value to bfd_uint64_t not long long.
3200 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
3201 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
3202 long long. Don't cast to bfd_vma.
3203 * elf32-score.c (score3_bfd_getl48): Likewise.
3204 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
3206 2017-07-03 Alan Modra <amodra@gmail.com>
3208 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
3210 (bfd_elf_print_symbol): Don't cast symbol->flags.
3211 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
3212 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
3213 _bfd_error_handler argument order.
3214 (ppc_elf_merge_private_bfd_data): Don't cast flags.
3216 2017-07-03 Alan Modra <amodra@gmail.com>
3218 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
3219 AC_TYPE_LONG_DOUBLE.
3220 * configure: Regenerate.
3221 * config.in: Regenerate.
3223 2017-06-29 Andrew Waterman <andrew@sifive.com>
3225 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
3228 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
3230 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
3231 unless it is undefined weak.
3232 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
3233 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
3235 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
3236 is not dynamic in PIC, abort.
3238 2017-06-29 Jiong Wang <jiong.wang@arm.com>
3241 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
3242 undefined weak symbols into dynamic.
3243 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
3244 relocation for non-dynamic symbols.
3245 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
3247 2017-06-29 Jiong Wang <jiong.wang@arm.com>
3249 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
3250 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
3251 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
3252 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
3253 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
3256 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
3258 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
3259 (elfcore_write_s390_gs_bc): Likewise.
3260 * elf.c (elfcore_grok_s390_gs_cb): New function.
3261 (elfcore_grok_s390_gs_bc): New function.
3262 (elfcore_grok_note): Call them.
3263 (elfcore_write_s390_gs_cb): New function.
3264 (elfcore_write_s390_gs_bc): New function.
3265 (elfcore_write_register_note): Call them.
3267 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
3269 * libbfd.c (_bfd_generic_get_section_contents): Don't call
3270 bfd_get_file_size. Check archive element size.
3271 (_bfd_generic_get_section_contents_in_window): Likewise.
3273 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
3275 * bfd-in2.h: Regenerated.
3276 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
3277 (bfd_get_file_size): Likewise.
3279 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
3280 Matthew Fortune <matthew.fortune@imgtec.com>
3282 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
3283 * cpu-mips.c (I_interaptiv_mr2): New enum value.
3284 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
3285 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
3287 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
3288 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
3289 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
3290 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
3291 `bfd_mach_mips_interaptiv_mr2' entries.
3292 * bfd-in2.h: Regenerate.
3294 2017-06-27 Nick Clifton <nickc@redhat.com>
3296 * tekhex.c (pass_over): Revert accidental conversion of a local
3297 array to a static array.
3299 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
3302 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
3303 reloc addend if necessary. Adjust diff only if
3304 shrinked_insn_address < end_address.
3306 2017-06-27 Alan Modra <amodra@gmail.com>
3309 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
3310 (_bfd_generic_get_section_contents_in_window): Likewise.
3312 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
3314 * elfnn-riscv.c (perform_relocation): Support the new
3315 R_RISCV_32_PCREL relocation.
3316 (riscv_elf_relocate_section): Likewise.
3317 * elfxx-riscv.c (howto_table): Likewise.
3318 (riscv_reloc_map): Likewise.
3319 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
3320 * libbfd.h: Regenerate.
3322 2017-06-27 Alan Modra <amodra@gmail.com>
3325 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
3326 Use unsigned file pointer type, and remove cast.
3327 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
3328 Add "count", not "sz".
3330 2017-06-26 Pedro Alves <palves@redhat.com>
3333 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
3336 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
3339 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
3342 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
3344 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
3345 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
3346 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
3347 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
3348 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
3350 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
3353 * compress.c (bfd_get_full_section_contents): Don't check the
3355 * libbfd.c (_bfd_generic_get_section_contents): Check for and
3356 reject a section whose size + offset is greater than the size
3358 (_bfd_generic_get_section_contents_in_window): Likewise.
3360 2017-06-26 Nick Clifton <nickc@redhat.com>
3363 * tekhex.c (getvalue): Check for the source pointer exceeding the
3364 end pointer before the first byte is read.
3366 2017-06-26 Nick Clifton <nickc@redhat.com>
3369 * opncls.c (get_build_id): Check that the section is big enough
3370 to contain the whole note.
3371 * compress.c (bfd_get_full_section_contents): Check for and reject
3372 a section whose size is greater than the size of the entire file.
3373 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
3374 contain a notes section.
3376 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
3378 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
3380 (elf_s390_modify_segment_map): Likewise.
3381 (bfd_elf_s390_set_options): Lisewise.
3383 2017-06-26 Alan Modra <amodra@gmail.com>
3385 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
3387 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
3388 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
3389 .preinit_array on --just-syms bfds.
3390 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
3391 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
3392 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
3394 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
3396 * elf.c (find_link): Bounds check "hint".
3398 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
3400 * elf32-arm.c (using_thumb_only): Update list of architectures in
3401 BFD_ASSERT for which the logic is valid.
3402 (using_thumb2_bl): Likewise.
3403 (using_thumb2): Likewise and return true for ARMv8-R.
3404 (arch_has_arm_nop): Likewise.
3405 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
3406 merging logic. Update commentis for value 15 of v8m_baseline,
3407 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
3408 merging of value 15 of Tag_CPU_arch.
3410 2017-06-23 Jiong Wang <jiong.wang@arm.com>
3412 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
3413 BFD_RELOC_AARCH64_ADR_GOT_PAGE
3414 * bfd-in2.h: Regenerate.
3416 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
3418 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
3419 the error_alignment label forward. Properly align program
3420 property note section.
3422 2017-06-22 Eric Christopher <echristo@gmail.com>
3424 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
3425 abs to fix a truncation warning.
3427 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
3429 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
3430 local undefined weak symbol to 0.
3431 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
3433 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
3435 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
3436 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
3437 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
3438 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
3439 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
3440 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
3441 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
3442 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
3444 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
3446 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
3447 (elf_i386_lazy_ibt_plt_entry): Likewise.
3448 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
3449 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
3450 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
3451 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
3452 (elf_i386_lazy_plt_layout): Likewise.
3453 (elf_i386_non_lazy_plt_layout): Likewise.
3454 (elf_i386_link_hash_entry): Add plt_second.
3455 (elf_i386_link_hash_table): Add plt_second and
3456 plt_second_eh_frame.
3457 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
3458 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
3459 the second PLT. Check the second PLT.
3460 (elf_i386_relocate_section): Use the second PLT to resolve
3461 PLT reference if needed.
3462 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
3464 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
3465 second PLT. Generate unwind info for the second PLT.
3466 (elf_i386_plt_type): Add plt_second.
3467 (elf_i386_get_synthetic_symtab): Support the second PLT.
3468 (elf_i386_parse_gnu_properties): Support
3469 GNU_PROPERTY_X86_FEATURE_1_AND.
3470 (elf_i386_merge_gnu_properties): Support
3471 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
3472 on GNU_PROPERTY_X86_FEATURE_1_IBT
3473 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
3474 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
3475 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
3476 is set on all relocatable inputs.
3477 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
3478 (elf_x32_lazy_ibt_plt_entry): Likewise.
3479 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
3480 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
3481 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
3482 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
3483 (elf_x86_64_lazy_ibt_plt): Likewise.
3484 (elf_x32_lazy_ibt_plt): Likewise.
3485 (elf_x86_64_non_lazy_ibt_plt): Likewise.
3486 (elf_x32_non_lazy_ibt_plt): Likewise.
3487 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
3488 (elf_x86_64_parse_gnu_properties): Support
3489 GNU_PROPERTY_X86_FEATURE_1_AND.
3490 (elf_x86_64_merge_gnu_properties): Support
3491 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
3492 on GNU_PROPERTY_X86_FEATURE_1_IBT
3493 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
3494 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
3495 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
3496 is set on all relocatable inputs.
3498 2017-06-22 Nick Clifton <nickc@redhat.com>
3501 * som.c (setup_sections): NUL terminate the space_strings buffer.
3502 Check that the space.name field does not index beyond the end of
3503 the space_strings buffer.
3505 2017-06-21 Nick Clifton <nickc@redhat.com>
3508 * coff-sh.c (sh_reloc): Check for an out of range reloc.
3510 2017-06-21 Nick Clifton <nickc@redhat.com>
3513 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
3514 type of the size parameter.
3515 (_bfd_vms_save_counted_string): Add second parameter - the maximum
3516 length of the counted string.
3517 * vms.h (_bfd_vms_save_sized_string): Update prototype.
3518 (_bfd_vms_save_counted_string): Likewise.
3519 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
3520 _bfd_vms_save_counted_string.
3521 (_bfd_vms_slurp_ehdr): Likewise.
3522 (_bfd_vms_slurp_egsd): Likewise.
3523 (Parse_module): Likewise.
3525 2017-06-21 Alan Modra <amodra@gmail.com>
3527 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
3528 calls before tocsave calls.
3529 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
3532 2017-06-21 Nick Clifton <nickc@redhat.com>
3535 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
3536 bfd_get_full_section_contents returns no contents.
3538 2017-06-21 Nick Clifton <nickc@redhat.com>
3541 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
3544 2017-06-21 Nick Clifton <nickc@redhat.com>
3547 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
3549 (image_set_ptr): Likewise.
3550 (alpha_vms_fix_sec_rel): Likewise.
3551 (alpha_vms_slurp_relocs): Likewise.
3553 2017-06-21 Nick Clifton <nickc@redhat.com>
3556 * ieee.c (ieee_slurp_sections): Check for a NULL return from
3558 (ieee_archive_p): Likewise.
3559 (ieee_object_p): Likewise.
3561 2017-06-21 Nick Clifton <nickc@redhat.com>
3564 * elf.c (setup_group): Zero the group section pointer list after
3565 allocation so that loops can be caught. Check for NULL pointers
3566 when processing a group list.
3568 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
3570 * elf-s390.h: New file.
3571 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
3573 (elf_s390_additional_program_headers): New function.
3574 (elf_s390_modify_segment_map): New function.
3575 (bfd_elf_s390_set_options): New function.
3576 (elf_backend_additional_program_headers)
3577 (elf_backend_modify_segment_map): Add macro definitions.
3579 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
3582 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
3583 the DYNAMIC bit instead of bfd_count_sections.
3585 2017-06-19 Nick Clifton <nickc@redhat.com>
3588 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
3590 (evax_bfd_print_eeom): Likewise.
3591 (evax_bfd_print_egsd): Check for an overlarge record length.
3592 (evax_bfd_print_etir): Likewise.
3594 2017-06-19 Nick Clifton <nickc@redhat.com>
3597 * libieee.h (struct common_header_type): Add end_p field.
3598 * ieee.c (this_byte_and_next): Do not advance input_p beyond
3600 (read_id): Check for a length that exceeds the remaining bytes in
3602 (ieee_seek): Initialise end_p.
3603 (ieee_archive_p): Likewise.
3604 (ieee_object_p): Likewise.
3606 2017-06-19 Nick Clifton <nickc@redhat.com>
3609 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
3610 before reading the EIHS structure entries.
3612 2017-06-19 Nick Clifton <nickc@redhat.com>
3615 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
3616 gsd_size. Check that there are enough bytes remaining to read the
3617 type and size of the next egsd. Check that the size of the egsd
3618 does not exceed the size of the record.
3620 2017-06-19 Alan Modra <amodra@gmail.com>
3622 * config.bfd: Correct targ_underscore for cris.
3624 2017-06-18 Alan Modra <amodra@gmail.com>
3626 * config.bfd: Correct targ_underscore for epiphany, ip2k,
3627 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
3629 2017-06-16 Nick Clifton <nickc@redhat.com>
3631 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
3632 bucketlist is empty because there are no symbols to add to the
3635 2017-06-16 Alan Modra <amodra@gmail.com>
3641 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
3642 (BFD_JUMP_TABLE_LINK): Likewise.
3643 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
3644 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
3645 (bfd_elf_define_start_stop): New function.
3646 * linker.c (bfd_generic_define_start_stop): New function.
3647 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
3649 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
3650 * aout-target.h (MY_bfd_define_start_stop): Define.
3651 * aout-tic30.c (MY_bfd_define_start_stop): Define.
3652 * binary.c (binary_bfd_define_start_stop): Define.
3653 * bout.c (b_out_bfd_define_start_stop): Define.
3654 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
3655 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
3656 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
3657 * coffcode.h (coff_bfd_define_start_stop): Define.
3658 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
3659 * i386msdos.c (msdos_bfd_define_start_stop): Define.
3660 * i386os9k.c (os9k_bfd_define_start_stop): Define.
3661 * ieee.c (ieee_bfd_define_start_stop): Define.
3662 * ihex.c (ihex_bfd_define_start_stop): Define.
3663 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
3664 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
3665 * mmo.c (mmo_bfd_define_start_stop): Define.
3666 * nlm-target.h (nlm_bfd_define_start_stop): Define.
3667 * oasys.c (oasys_bfd_define_start_stop): Define.
3668 * pef.c (bfd_pef_bfd_define_start_stop): Define.
3669 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
3670 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
3671 * som.c (som_bfd_define_start_stop): Define.
3672 * srec.c (srec_bfd_define_start_stop): Define.
3673 * tekhex.c (tekhex_bfd_define_start_stop): Define.
3674 * versados.c (versados_bfd_define_start_stop): Define.
3675 * vms-alpha.c (vms_bfd_define_start_stop): Define.
3676 (alpha_vms_bfd_define_start_stop): Define.
3677 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
3678 * bfd-in2.h: Regenerate.
3679 * libbfd.h: Regenerate.
3681 2017-06-16 Jiong Wang <jiong.wang@arm.com>
3683 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
3684 SYMBOL_REFERENCES_LOCAL.
3686 2017-06-15 Jiong Wang <jiong.wang@arm.com>
3689 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
3690 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
3691 runtime for if there needs copy relocation elimination.
3692 (need_copy_relocation_p): New function. Return true for symbol with
3693 pc-relative references and if it's against read-only sections.
3694 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
3695 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
3696 that are related with accessing external objects.
3697 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
3698 in elfNN_aarch64_check_relocs.
3700 2017-06-15 Nick Clifton <nickc@redhat.com>
3703 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
3706 (ieee_archive_p): Likewise.
3708 2017-06-15 Nick Clifton <nickc@redhat.com>
3711 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
3713 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
3715 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
3716 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
3717 keep both windowed and call0 ABI PLT definitions.
3718 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
3719 elf_xtensa_*_plt_entry endex.
3720 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
3722 2017-06-14 Nick Clifton <nickc@redhat.com>
3725 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
3728 2017-06-14 Nick Clifton <nickc@redhat.com>
3731 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
3732 maximum value for the ascic pointer. Check that name processing
3733 does not read beyond this value.
3734 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
3737 2017-06-14 Nick Clifton <nickc@redhat.com>
3740 * versados.c (versados_mkobject): Zero the allocated tdata structure.
3741 (process_otr): Check for an invalid offset in the otr structure.
3743 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
3745 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
3747 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
3753 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
3754 vtable field to a union.
3755 (_bfd_elf_is_start_stop): Removed.
3756 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
3757 __start_SECNAME and __stop_SECNAME symbols.
3758 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
3759 * elflink.c (_bfd_elf_is_start_stop): Removed.
3760 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
3761 _bfd_elf_is_start_stop.
3762 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
3763 __stop_SECNAME symbols. Updated.
3764 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3765 (bfd_elf_gc_record_vtinherit): Likewise.
3766 (bfd_elf_gc_record_vtentry): Likewise.
3768 2017-06-13 Nick Clifton <nickc@redhat.com>
3771 * elflink.c (elf_link_adjust_relocs): Generate an error when
3772 encountering a reloc against a symbol removed by garbage
3775 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
3777 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
3778 to merge_gnu_properties.
3779 * elf-properties.c (elf_merge_gnu_properties): Add struct
3780 bfd_link_info * and pass it to merge_gnu_properties.
3781 (elf_merge_gnu_property_list): Add struct bfd_link_info *
3782 and pass it to elf_merge_gnu_properties.
3783 (_bfd_elf_link_setup_gnu_properties): Pass info to
3784 elf_merge_gnu_property_list.
3785 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
3787 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
3789 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
3792 * binary.c (binary_set_section_contents): Scale lma by octets
3793 per byte to set filepos.
3795 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3797 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
3800 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3802 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
3805 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3807 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
3808 patched section contents for TLS IE reloc.
3809 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
3811 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3813 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
3814 RELOC_FOR_GLOBAL_SYMBOL macro.
3816 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3818 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
3821 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3823 * config/tc-arc.c (md_undefined_symbol): Changed.
3824 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
3826 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3828 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
3831 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3833 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
3834 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
3836 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
3838 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
3841 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
3843 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
3844 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
3845 is non-zero. Add clarifying comments.
3847 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
3849 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
3850 name. Use local IFUNC symbol name string to report unsupported
3851 non-PIC call to IFUNC function.
3852 (elf_i386_relocate_section): Dump local IFUNC name with minfo
3853 when generating R_386_IRELATIVE relocation.
3854 (elf_i386_finish_dynamic_symbol): Likewise.
3855 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
3857 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
3858 when generating R_X86_64_IRELATIVE relocation.
3859 (elf_x86_64_finish_dynamic_symbol): Likewise.
3861 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3863 * elf.c (setup_group): Make sure BFD sections are created for all
3864 group sections in the input file when processing SHF_GROUP
3866 (bfd_section_from_shdr): Avoid duplicating logic already
3867 implemented in `setup_group'.
3869 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
3872 * peXXigen.c (pe_print_idata): Use the address of the first thunk
3873 if the hint address is zero.
3875 2017-06-06 James Clarke <jrtc27@jrtc27.com>
3878 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
3879 ELF_COMMON_DEF_P for common symbols.
3881 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
3883 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
3884 SEC_GROUP sections as SEC_EXCLUDE.
3885 (bfd_elf_set_group_contents): Replace use of abort with an assert.
3886 (assign_section_numbers): Use resolve_section_groups flag instead
3887 of relocatable link type.
3888 (_bfd_elf_init_private_section_data): Use resolve_section_groups
3889 flag instead of checking the final_link flag for part of the
3890 checks in here. Fix white space as a result.
3891 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
3892 instead of relocatable link type.
3893 (bfd_elf_final_link): Likewise.
3895 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3897 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
3899 * elf32-score.c (score_elf_final_link_relocate): Likewise.
3900 (s3_bfd_score_elf_check_relocs): Likewise.
3901 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
3902 (score_elf_final_link_relocate): Likewise.
3903 (s7_bfd_score_elf_check_relocs): Likewise.
3905 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
3907 * elflink.c (init_reloc_cookie_rels): Remove unused variable
3910 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
3912 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
3913 from `reloc_count' rather than decrementing it.
3914 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
3915 `reloc_count' by `int_rels_per_ext_rel'.
3916 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
3917 `reloc_count' by `int_rels_per_ext_rel' for last relocation
3918 entry determination.
3919 (s3_bfd_score_elf_check_relocs): Likewise.
3920 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
3921 (s7_bfd_score_elf_relocate_section): Likewise.
3922 (s7_bfd_score_elf_check_relocs): Likewise.
3923 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
3924 prototype and function.
3925 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
3926 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
3927 triple rather than once the sum of REL and RELA relocation entry
3929 (bfd_elf64_get_reloc_upper_bound): Remove macro.
3930 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
3931 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
3932 storage allocation size determination.
3933 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
3934 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
3935 by `int_rels_per_ext_rel' for last relocation entry
3937 (bfd_elf_final_link): Do not multiply `reloc_count' by
3938 `int_rels_per_ext_rel' for internal relocation storage
3939 allocation size determination.
3940 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
3941 `int_rels_per_ext_rel' for last relocation entry determination.
3942 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3943 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
3944 (_bfd_mips_elf_relocate_section): Likewise.
3946 2017-06-05 Alan Modra <amodra@gmail.com>
3949 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
3951 2017-06-01 John Baldwin <jhb@FreeBSD.org>
3953 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
3954 determine structure sizes.
3955 (elfcore_grok_freebsd_prstatus): Likewise.
3957 2017-06-01 Alan Modra <amodra@gmail.com>
3959 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
3960 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
3962 (is_elfv2_localentry0): New function.
3963 (ppc64_elf_tls_setup): Default params->plt_localentry0.
3964 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
3965 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
3966 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
3967 optimized localentry:0 stubs.
3968 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
3969 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
3971 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
3973 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
3975 2017-05-30 Casey Smith <clegg89@gmail.com>
3978 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
3979 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
3981 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
3983 * cpu-arc.c (arc_compatible): New function.
3985 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
3987 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
3989 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
3992 * bfdio.c (bfd_get_file_size): New function.
3993 * bfd-in2.h: Regenerated.
3995 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
3997 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
4000 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
4002 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
4003 dynobj instead of htab->elf.dynobj.
4005 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
4007 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
4009 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
4010 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
4011 actual number of internal relocations retrieved. Adjust
4012 function description.
4013 (bfd_elf64_canonicalize_reloc): Remove macro.
4014 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
4016 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
4018 * archures.c (bfd_mach_sparc_v9m8): Define.
4019 (bfd_mach_sparc_v8plusm8): Likewise.
4020 (bfd_mach_sparc_v9_p): Adjust to M8.
4021 (bfd_mach_sparc_64bit_p): Likewise.
4022 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
4023 bfd_mach_sparc_v8plusm8.
4024 * bfd-in2.h: Regenerated.
4025 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
4027 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
4028 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
4029 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
4031 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
4032 bfd_mach_sparc_v8plusm8.
4034 2017-05-19 Alan Modra <amodra@gmail.com>
4036 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
4037 debug and special sections when no non-note alloc sections in an
4040 2017-05-18 Alan Modra <amodra@gmail.com>
4042 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
4043 * elf-m10300.c: Likewise.
4045 * elf32-arc.c: Likewise.
4046 * elf32-bfin.c: Likewise.
4047 * elf32-m68k.c: Likewise.
4048 * elf32-nds32.c: Likewise.
4049 * elf32-tilepro.c: Likewise.
4050 * elflink.c: Likewise.
4051 * elfnn-aarch64.c: Likewise.
4052 * elfnn-riscv.c: Likewise.
4053 * elfxx-tilegx.c: Likewise.
4054 * mach-o.c: Likewise.
4055 * peXXigen.c: Likewise.
4056 * vms-alpha.c: Likewise.
4057 * vms-lib.c: Likewise.
4059 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
4062 * elflink.c (elf_gc_mark_debug_section): New function.
4063 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
4064 referenced by kept debug sections.
4066 2017-05-16 Alan Modra <amodra@gmail.com>
4068 * elf-m10300.c: Rename occurrences of non_ir_ref.
4069 * elf32-arm.c: Likewise.
4070 * elf32-bfin.c: Likewise.
4071 * elf32-cr16.c: Likewise.
4072 * elf32-cris.c: Likewise.
4073 * elf32-d10v.c: Likewise.
4074 * elf32-dlx.c: Likewise.
4075 * elf32-fr30.c: Likewise.
4076 * elf32-frv.c: Likewise.
4077 * elf32-hppa.c: Likewise.
4078 * elf32-i370.c: Likewise.
4079 * elf32-i386.c: Likewise.
4080 * elf32-iq2000.c: Likewise.
4081 * elf32-lm32.c: Likewise.
4082 * elf32-m32c.c: Likewise.
4083 * elf32-m32r.c: Likewise.
4084 * elf32-m68hc1x.c: Likewise.
4085 * elf32-m68k.c: Likewise.
4086 * elf32-mcore.c: Likewise.
4087 * elf32-metag.c: Likewise.
4088 * elf32-microblaze.c: Likewise.
4089 * elf32-moxie.c: Likewise.
4090 * elf32-msp430.c: Likewise.
4091 * elf32-mt.c: Likewise.
4092 * elf32-nios2.c: Likewise.
4093 * elf32-or1k.c: Likewise.
4094 * elf32-ppc.c: Likewise.
4095 * elf32-rl78.c: Likewise.
4096 * elf32-s390.c: Likewise.
4097 * elf32-score.c: Likewise.
4098 * elf32-score7.c: Likewise.
4099 * elf32-sh.c: Likewise.
4100 * elf32-tic6x.c: Likewise.
4101 * elf32-tilepro.c: Likewise.
4102 * elf32-v850.c: Likewise.
4103 * elf32-vax.c: Likewise.
4104 * elf32-xstormy16.c: Likewise.
4105 * elf32-xtensa.c: Likewise.
4106 * elf64-alpha.c: Likewise.
4107 * elf64-hppa.c: Likewise.
4108 * elf64-ia64-vms.c: Likewise.
4109 * elf64-mmix.c: Likewise.
4110 * elf64-ppc.c: Likewise.
4111 * elf64-s390.c: Likewise.
4112 * elf64-sh64.c: Likewise.
4113 * elf64-x86-64.c: Likewise.
4114 * elflink.c: Likewise.
4115 * elfnn-aarch64.c: Likewise.
4116 * elfnn-ia64.c: Likewise.
4117 * elfnn-riscv.c: Likewise.
4118 * elfxx-mips.c: Likewise.
4119 * elfxx-sparc.c: Likewise.
4120 * elfxx-tilegx.c: Likewise.
4121 * linker.c: Likewise.
4123 2017-05-16 Alan Modra <amodra@gmail.com>
4125 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
4126 * elflink.c (elf_link_add_object_symbols): Update to use
4128 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
4130 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
4132 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
4134 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
4136 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
4138 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
4139 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
4141 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4143 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
4145 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
4147 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
4148 to plt_second/plt_second_eh_frame.
4149 (elf_x86_64_link_hash_newfunc): Updated.
4150 (elf_x86_64_allocate_dynrelocs): Likewise.
4151 (elf_x86_64_size_dynamic_sections): Likewise.
4152 (elf_x86_64_relocate_section): Likewise.
4153 (elf_x86_64_finish_dynamic_symbol): Likewise.
4154 (elf_x86_64_finish_dynamic_sections): Likewise.
4155 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
4156 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
4158 (elf_backend_setup_gnu_properties): Updated. Create the
4159 .plt.sec section instead of the .plt.sec section.
4161 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
4163 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
4164 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
4165 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
4167 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
4169 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
4170 (bfd_elf64_set_reloc): Define.
4171 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
4173 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
4175 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
4176 (struct bfd_target): New field _bfd_set_reloc.
4177 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
4178 * reloc.c (_bfd_generic_set_reloc): New function.
4179 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
4180 * nlm-target.h (nlm_set_reloc): Likewise.
4181 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
4182 * aout-tic30.c (MY_set_reloc): Likewise.
4183 * aout-target.h (MY_set_reloc): Likewise.
4184 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
4185 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
4186 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
4187 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
4188 * aout-adobe.c (aout_32_set_reloc): Likewise.
4189 * bout.c (b_out_set_reloc): Likewise.
4190 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
4191 * i386os9k.c (aout_32_set_reloc): Likewise.
4192 * ieee.c (ieee_set_reloc): Likewise.
4193 * oasys.c (oasys_set_reloc): Likewise.
4194 * som.c (som_set_reloc): Likewise.
4195 * versados.c (versados_set_reloc): Likewise.
4196 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
4197 _bfd_generic_set_reloc.
4198 (rs6000_xcoff64_aix_vec): LIkewise.
4199 * libbfd.c (_bfd_norelocs_set_reloc): New function.
4200 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
4201 * i386msdos.c (msdos_set_reloc): Define to
4202 _bfd_norelocs_set_reloc.
4203 * elfcode.h (elf_set_reloc): Define.
4204 * bfd-in2.h: Regenerated.
4206 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
4209 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
4210 for IFUNC function address.
4212 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
4214 * elf32-arc.c (FEATURE_LIST_NAME): Define.
4215 (CONFLICT_LIST): Likewise.
4216 (opcode/arc-attrs.h): Include.
4217 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
4218 (arc_extract_features): New file.
4219 (arc_stralloc): Likewise.
4220 (arc_elf_merge_attributes): Likewise.
4221 (arc_elf_merge_private_bfd_data): Use object attributes.
4222 (bfd_arc_get_mach_from_attributes): New function.
4223 (arc_elf_object_p): Use object attributes.
4224 (arc_elf_final_write_processing): Likewise.
4225 (elf32_arc_obj_attrs_arg_type): New function.
4226 (elf32_arc_obj_attrs_handle_unknown): Likewise.
4227 (elf32_arc_section_from_shdr): Likewise.
4228 (elf_backend_obj_attrs_vendor): Define.
4229 (elf_backend_obj_attrs_section): Likewise.
4230 (elf_backend_obj_attrs_arg_type): Likewise.
4231 (elf_backend_obj_attrs_section_type): Likewise.
4232 (elf_backend_obj_attrs_handle_unknown): Likewise.
4233 (elf_backend_section_from_shdr): Likewise.
4235 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
4238 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
4239 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
4240 and the destination is a Thumb symbol.
4242 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
4244 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
4245 initializer to silence GCC 4.2.
4246 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
4248 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
4250 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
4251 (LAZY_PLT_ENTRY_SIZE): This.
4252 (NON_LAZY_PLT_ENTRY_SIZE): New.
4253 (elf_x86_64_plt0_entry): Renamed to ...
4254 (elf_x86_64_lazy_plt0_entry): This.
4255 (elf_x86_64_plt_entry): Renamed to ...
4256 (elf_x86_64_lazy_plt_entry): This.
4257 (elf_x86_64_bnd_plt0_entry): Renamed to ...
4258 (elf_x86_64_lazy_bnd_plt0_entry): This.
4259 (elf_x86_64_legacy_plt_entry): Removed.
4260 (elf_x86_64_bnd_plt_entry): Renamed to ...
4261 (elf_x86_64_lazy_bnd_plt_entry): This.
4262 (elf_x86_64_legacy_plt2_entry): Renamed to ...
4263 (elf_x86_64_non_lazy_plt_entry): This.
4264 (elf_x86_64_bnd_plt2_entry): Renamed to ...
4265 (elf_x86_64_non_lazy_bnd_plt_entry): This.
4266 (elf_x86_64_eh_frame_plt): Renamed to ...
4267 (elf_x86_64_eh_frame_lazy_plt): This.
4268 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
4269 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
4270 (elf_x86_64_eh_frame_plt_got): Renamed to ...
4271 (elf_x86_64_eh_frame_non_lazy_plt): This.
4272 (elf_x86_64_lazy_plt_layout): New.
4273 (elf_x86_64_non_lazy_plt_layout): Likewise.
4274 (elf_x86_64_plt_layout): Likewise.
4275 (elf_x86_64_backend_data): Remove PLT layout information. Add
4276 os for target system.
4277 (GET_PLT_ENTRY_SIZE): Removed.
4278 (elf_x86_64_lazy_plt): New.
4279 (elf_x86_64_non_lazy_plt): Likewise.
4280 (elf_x86_64_lazy_bnd_plt): Likewise.
4281 (elf_x86_64_non_lazy_bnd_plt): Likewise.
4282 (elf_x86-64_arch_bed): Updated.
4283 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
4284 (elf_x86_64_create_dynamic_sections): Removed.
4285 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
4286 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
4287 (elf_x86-64_adjust_dynamic_symbol): Updated.
4288 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
4289 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
4290 size for PLT0 if there is no PLT0. Get plt_entry_size from
4291 non_lazy_plt for non-lazy PLT entries.
4292 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
4293 from non_lazy_plt for non-lazy PLT entries.
4294 (elf_x86-64_relocate_section): Updated. Properly get PLT index
4295 if there is no PLT0.
4296 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
4297 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
4298 entries with non-lazy PLT layout. Don't fill the second and third
4299 slots in the PLT entry if there is no PLT0.
4300 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
4301 if there is no PLT0. Set sh_entsize on the .plt.got section.
4302 (compare_relocs): New.
4303 (elf_x86_64_plt_type): Likewise.
4304 (elf_x86_64_plt): Likewise.
4305 (elf_x86_64_nacl_plt): New. Forward declaration.
4306 (elf_x86_64_get_plt_sym_val): Removed.
4307 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
4308 against all dynamic relocations.
4309 (elf_x86_64_link_setup_gnu_properties): New function.
4310 (elf_backend_create_dynamic_sections): Updated.
4311 (elf_backend_setup_gnu_properties): New.
4312 (elf_x86_64_nacl_plt): New.
4313 (elf_x86_64_nacl_arch_bed): Updated.
4315 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
4317 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
4318 (LAZY_PLT_ENTRY_SIZE): This.
4319 (NON_LAZY_PLT_ENTRY_SIZE): New.
4320 (elf_i386_plt0_entry): Renamed to ...
4321 (elf_i386_lazy_plt0_entry): This.
4322 (elf_i386_plt_entry): Renamed to ...
4323 (elf_i386_lazy_plt_entry): This.
4324 (elf_i386_pic_plt0_entry): Renamed to ...
4325 (elf_i386_pic_lazy_plt0_entry): This.
4326 (elf_i386_pic_plt_entry): Renamed to ...
4327 (elf_i386_pic_lazy_plt_entry): This.
4328 (elf_i386_got_plt_entry): Renamed to ...
4329 (elf_i386_non_lazy_plt_entry): This.
4330 (elf_i386_pic_got_plt_entry): Renamed to ...
4331 (elf_i386_pic_non_lazy_plt_entry): This.
4332 (elf_i386_eh_frame_plt): Renamed to ...
4333 (elf_i386_eh_frame_lazy_plt): This.
4334 (elf_i386_eh_frame_plt_got): Renamed to ...
4335 (elf_i386_eh_frame_non_lazy_plt): This.
4336 (elf_i386_plt_layout): Renamed to ...
4337 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
4338 eh_frame_plt_got_size.
4339 (elf_i386_non_lazy_plt_layout): New.
4340 (elf_i386_plt_layout): Likewise.
4341 (elf_i386_non_lazy_plt): Likewise.
4342 (GET_PLT_ENTRY_SIZE): Removed.
4343 (elf_i386_plt): Renamed to ...
4344 (elf_i386_lazy_plt): This.
4345 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
4346 (elf_i386_arch_bed): Updated.
4347 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
4348 (elf_i386_create_dynamic_sections): Removed.
4349 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
4350 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
4351 (elf_i386_adjust_dynamic_symbol): Updated.
4352 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
4353 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
4354 size for PLT0 if there is no PLT0.
4355 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
4356 output section is discarded only if GOT isn't empty.
4357 (elf_i386_relocate_section): Updated. Properly get PLT index
4358 if there is no PLT0.
4359 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
4360 second and third slots in the PLT entry if there is no PLT0.
4361 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
4362 if there is no PLT0. Set sh_entsize on the .plt.got section.
4363 (elf_i386_nacl_plt): Forward declaration.
4364 (elf_i386_get_plt_sym_val): Removed.
4365 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
4366 against all dynamic relocations.
4367 (elf_i386_link_setup_gnu_properties): New function.
4368 (elf_backend_create_dynamic_sections): Updated.
4369 (elf_backend_setup_gnu_properties): New.
4370 (elf_i386_nacl_plt): Updated.
4371 (elf_i386_nacl_arch_bed): Likewise.
4372 (elf_i386_vxworks_arch_bed): Likewise.
4374 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
4376 * elflink.c (elf_output_implib): Remove executable flag from import
4378 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
4379 library is a relocatable object file.
4381 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
4384 * elf32-avr.c (avr_should_move_sym): New function.
4385 (avr_should_reduce_sym_size): Likewise.
4386 (avr_should_increase_sym_size): Likewise.
4387 (elf32_avr_relax_delete_bytes): Adjust symbol values
4388 and sizes by calling new functions.
4390 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
4392 * config.bfd (riscv32-*): Enable rv64.
4394 2017-05-02 Alan Modra <amodra@gmail.com>
4397 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
4398 rather than h->root.type == bfd_link_hash_new.
4399 (bfd_elf_record_link_assignment): Similarly, call
4400 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
4402 2017-04-29 Alan Modra <amodra@gmail.com>
4405 * reloc.c (reloc_offset_in_range): New function.
4406 (bfd_perform_relocation, bfd_install_relocation): Use it.
4407 (_bfd_final_link_relocate): Likewise.
4409 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
4411 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
4412 before using .plt.got.
4413 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
4415 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4417 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
4418 instead of "+=" to update 0.
4420 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4422 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
4423 .plt.got section here.
4424 (elf_i386_check_relocs): Don't create the .plt.got section.
4425 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
4426 the .plt.got and .plt.bnd sections here.
4427 (elf_x86_64_check_relocs): Don't create the .plt.got nor
4430 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4432 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
4434 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
4435 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
4436 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
4437 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
4440 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4442 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
4444 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
4445 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
4446 the first relocatable ELF input with GNU properties.
4448 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
4450 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
4451 VxWorks for non-PIC.
4453 2017-04-27 Alan Modra <amodra@gmail.com>
4455 * elf-bfd.h (struct elf_backend_data): Make asection param of
4456 elf_backend_eh_frame_address_size const.
4457 (_bfd_elf_eh_frame_address_size): Likewise.
4458 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
4459 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
4460 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
4461 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
4462 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
4463 (next_cie_fde_offset): Constify params.
4464 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
4466 2017-04-27 Alan Modra <amodra@gmail.com>
4468 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
4469 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
4470 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
4472 (offset_adjust): New function.
4473 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
4474 (adjust_eh_frame_local_symbols): Likewise.
4475 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
4476 after changing anything. Return true if anything changed.
4477 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
4478 _bfd_elf_adjust_eh_frame_global_symbol for globals.
4480 2017-04-27 Alan Modra <amodra@gmail.com>
4482 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
4485 2017-04-27 Alan Modra <amodra@gmail.com>
4487 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
4488 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
4489 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
4490 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
4491 for undef and undefweak dyn_relocs.
4492 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
4493 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
4494 (allocate_got, allocate_dynrelocs): Likewise.
4495 (ppc64_elf_relocate_section): Likewise.
4497 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
4499 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
4500 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
4501 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
4502 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
4504 2017-04-26 Nick Clifton <nickc@redhat.com>
4507 * reloc.c (bfd_perform_relocation): Check for a negative address
4510 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
4513 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
4515 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
4516 (elf_backend_always_renumber_dynsyms): Define.
4517 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
4518 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
4519 * elflink.c (bfd_elf_size_dynamic_sections): Also call
4520 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
4522 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
4524 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
4526 * elflink.c (bfd_elf_size_dynamic_sections): Only call
4527 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
4528 sections have been created.
4530 2017-04-26 Nick Clifton <nickc@redhat.com>
4533 * compress.c (bfd_init_section_compress_status): Check the return
4534 value from bfd_malloc.
4536 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4538 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
4539 no_finish_dynamic_symbol.
4540 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
4542 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
4543 weak symbol, don't make it dynamic.
4544 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
4545 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
4546 relocation for GOT reference.
4547 (elf_x86_64_finish_dynamic_symbol): Abort if
4548 no_finish_dynamic_symbol isn't 0.
4550 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4553 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
4554 undefined weak symbol, don't make it dynamic.
4555 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
4556 set no_finish_dynamic_symbol and generate R_386_RELATIVE
4557 relocation for R_386_GOT32.
4559 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
4562 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
4564 2017-04-23 Alan Modra <amodra@gmail.com>
4567 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
4568 * elf.c (lcomm_sym): New.
4569 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
4570 * bfd-in2.h: Regenerate.
4572 2017-04-23 Alan Modra <amodra@gmail.com>
4575 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
4576 parameters and comment.
4577 (_bfd_elf_get_reloc_section): Delete.
4578 (_bfd_elf_plt_get_reloc_section): Declare.
4579 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
4580 New functions. Don't blindly skip over assumed .rel/.rela prefix.
4582 (_bfd_elf_get_reloc_section): ..here. Delete.
4583 (assign_section_numbers): Call elf_get_reloc_section.
4584 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
4585 * elfxx-target.h (elf_backend_get_reloc_section): Update.
4587 2017-04-23 Alan Modra <amodra@gmail.com>
4590 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
4593 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
4596 * elf32-i386.c (elf_i386_link_hash_entry): Add
4597 no_finish_dynamic_symbol.
4598 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
4599 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
4600 symbol, don't make it dynamic in PIE.
4601 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
4602 set no_finish_dynamic_symbol and generate R_386_RELATIVE
4603 relocation for R_386_GOT32
4604 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
4607 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
4611 * elflink.c (elf_link_add_object_symbols): Require
4612 --no-dynamic-linker with -E/--dynamic-list when creating
4615 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
4617 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
4620 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
4622 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
4623 dynamic symbol sorting.
4625 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
4628 * elflink.c (elf_link_add_object_symbols): Preserve
4629 dynamic_ref_after_ir_def when restoring the symbol table for
4630 unneeded dynamic object.
4632 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
4635 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
4636 on on undefined IFUNC symbol in the second PLT.
4638 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
4640 * peXXigen.c (pe_print_reloc): Correct chunk_end.
4642 2017-04-19 Alan Modra <amodra@gmail.com>
4644 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
4645 or make dynamic for info->dynamic_undefined_weak 0 and 1.
4646 * elf32-ppc.c:Formatting.
4647 (ensure_undefweak_dynamic): Don't make dynamic when
4648 info->dynamic_undefined_weak is zero.
4649 (allocate_dynrelocs): Discard undefweak dyn_relocs for
4650 info->dynamic_undefined_weak. Discard undef dyn_relocs when
4651 not default visibility. Discard undef and undefweak
4653 (ppc_elf_relocate_section): Adjust to suit.
4654 * elf64-ppc.c: Formatting.
4655 (ensure_undefweak_dynamic): Don't make dynamic when
4656 info->dynamic_undefined_weak is zero.
4657 (allocate_dynrelocs): Discard undefweak dyn_relocs for
4658 info->dynamic_undefined_weak. Discard them earlier.
4660 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
4663 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
4664 before generating the version definition section.
4666 2017-04-17 Alan Modra <amodra@gmail.com>
4668 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
4669 state when a regular object file defines a symbol with
4670 incompatible type to that defined by an earlier shared lib.
4672 2017-04-13 Alan Modra <amodra@gmail.com>
4674 * coffcode.h: Wrap some overly long _bfd_error_handler args.
4676 * elf32-arm.c: Likewise.
4677 * elf32-i386.c: Likewise.
4678 * elf32-mep.c: Likewise.
4679 * elf64-ia64-vms.c: Likewise.
4680 * elf64-x86-64.c: Likewise.
4681 * elflink.c: Likewise.
4682 * elfnn-ia64.c: Likewise.
4683 * elfxx-mips.c: Likewise.
4685 2017-04-13 Alan Modra <amodra@gmail.com>
4687 * aoutx.h: Use %B and %A in error messages throughout file.
4688 * aout-cris.c: Likewise.
4689 * archive.c: Likewise.
4690 * binary.c: Likewise.
4691 * coff-rs6000.c: Likewise.
4692 * coff-tic4x.c: Likewise.
4693 * coffcode.h: Likewise.
4694 * coffgen.c: Likewise.
4695 * cofflink.c: Likewise.
4696 * coffswap.h: Likewise.
4697 * cpu-arm.c: Likewise.
4698 * elf-eh-frame.c: Likewise.
4699 * elf-m10300.c: Likewise.
4701 * elf32-arc.c: Likewise.
4702 * elf32-arm.c: Likewise.
4703 * elf32-bfin.c: Likewise.
4704 * elf32-frv.c: Likewise.
4705 * elf32-iq2000.c: Likewise.
4706 * elf32-m32c.c: Likewise.
4707 * elf32-microblaze.c: Likewise.
4708 * elf32-nds32.c: Likewise.
4709 * elf32-rl78.c: Likewise.
4710 * elf32-rx.c: Likewise.
4711 * elf32-score.c: Likewise.
4712 * elf32-score7.c: Likewise.
4713 * elf32-sh64.c: Likewise.
4714 * elf32-v850.c: Likewise.
4715 * elf32-vax.c: Likewise.
4716 * elf32-visium.c: Likewise.
4717 * elf64-ia64-vms.c: Likewise.
4718 * elf64-mmix.c: Likewise.
4719 * elf64-sh64.c: Likewise.
4720 * elfcode.h: Likewise.
4721 * elfnn-aarch64.c: Likewise.
4722 * elfnn-ia64.c: Likewise.
4723 * elfxx-mips.c: Likewise.
4724 * hpux-core.c: Likewise.
4727 * linker.c: Likewise.
4728 * merge.c: Likewise.
4730 * oasys.c: Likewise.
4731 * pdp11.c: Likewise.
4732 * peXXigen.c: Likewise.
4733 * rs6000-core.c: Likewise.
4734 * vms-alpha.c: Likewise.
4735 * xcofflink.c: Likewise.
4737 2017-04-13 Alan Modra <amodra@gmail.com>
4739 * bfd.c (PRINT_TYPE): Define.
4740 (_doprnt): New function.
4741 (error_handler_internal): Use _doprnt.
4742 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
4743 calls in their natural order, throughout file.
4744 * coff-mcore.c: Likewise.
4745 * coff-ppc.c: Likewise.
4746 * coff-tic80.c: Likewise.
4747 * cofflink.c: Likewise.
4748 * elf-s390-common.c: Likewise.
4750 * elf32-arm.c: Likewise.
4751 * elf32-i386.c: Likewise.
4752 * elf32-m32r.c: Likewise.
4753 * elf32-msp430.c: Likewise.
4754 * elf32-spu.c: Likewise.
4755 * elf64-ia64-vms.c: Likewise.
4756 * elf64-sparc.c: Likewise.
4757 * elf64-x86-64.c: Likewise.
4758 * elflink.c: Likewise.
4759 * elfnn-aarch64.c: Likewise.
4760 * elfnn-ia64.c: Likewise.
4761 * elfxx-mips.c: Likewise.
4763 2017-04-13 Alan Modra <amodra@gmail.com>
4765 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
4766 branch veneers" error. Fix double space and format message.
4767 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
4768 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
4770 2017-04-13 Alan Modra <amodra@gmail.com>
4772 * bfd-in2.h: Regenerate.
4774 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4776 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
4777 extra `\n' in warning/error messages.
4778 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
4779 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4781 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
4783 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
4784 processor-specific properties with generic ELF target vector.
4786 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
4788 * elf32-sparc.c (elf_backend_fixup_symbol): New.
4789 * elf64-sparc.c (elf_backend_fixup_symbol): New.
4790 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
4791 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
4793 (link_hash_newfunc): Initialize has_got_reloc and
4795 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
4797 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
4799 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
4801 (_bfd_sparc_elf_fixup_symbol): New function.
4802 (allocate_dynrelocs): Don't allocate space for dynamic
4803 relocations and discard relocations against resolved undefined
4804 weak symbols in executable. Don't make resolved undefined weak
4805 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
4806 relocation against undefined weak symbols in PIE.
4807 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
4808 relocations against resolved undefined weak symbols in PIE
4809 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
4810 without ynamic PLT/GOT relocations for resolved undefined weak
4812 Don't generate dynamic relocation against resolved undefined
4813 weak symbol in executable.
4814 (pie_finish_undefweak_symbol): New function.
4815 (_bfd_sparc_elf_finish_dynamic_sections): Call
4816 pie_finish_undefweak_symbol on all symbols in PIE.
4817 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
4818 (_bfd_sparc_elf_fixup_symbol): New function.
4820 2017-04-10 Nick Clifton <nickc@redhat.com>
4822 * config.bfd: Remove ns32k from obsolete list.
4824 2017-04-10 Alan Modra <amodra@gmail.com>
4827 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
4828 (special_sections_i): Likewise for .init_array.
4829 (special_sections_p): Likewise for .preinit_array.
4831 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
4835 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
4836 ELF_COMMON_DEF_P for common symbols.
4837 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
4838 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
4839 * elflink.c (_bfd_elf_merge_symbol): Revert commits
4840 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
4841 07492f668d2173da7a2bda3707ff0985e0f460b6.
4843 2017-04-07 Pedro Alves <palves@redhat.com>
4845 * opncls.c (bfd_get_debug_link_info): Rename to...
4846 (bfd_get_debug_link_info_1): ... this. Change type of second
4847 parameter to void pointer. Adjust.
4848 (bfd_get_debug_link_info): Reimplement on top of
4849 bfd_get_debug_link_info_1.
4850 (separate_debug_file_exists, separate_alt_debug_file_exists):
4851 Change type of second parameter to void pointer. Adjust.
4852 (get_func_type, check_func_type): Change type of second parameter
4854 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
4855 the callback functions instead of passing the address of a local.
4856 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
4857 find_separate_debug_file.
4858 (get_alt_debug_link_info_shim): Change type of second parameter to
4859 void pointer. Adjust.
4860 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
4861 find_separate_debug_file.
4862 (get_build_id_name, bfd_boolean check_build_id_file): Change type
4863 of second parameter to void pointer. Adjust.
4864 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
4865 pointer local to find_separate_debug_file.
4867 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
4869 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
4870 external symbols with a definition.
4871 (_bfd_coff_gc_mark_extra_sections): Fix typo.
4873 2017-04-07 Alan Modra <amodra@gmail.com>
4875 * po/SRC-POTFILES.in: Regenerate.
4877 2017-04-05 Alan Modra <amodra@gmail.com>
4879 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
4882 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
4884 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
4885 numbers for DataDirectory entry indicies passed to
4888 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
4890 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
4891 each GNU_MBIND section and align GNU_MBIND section to page size.
4892 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
4893 segment for each GNU_MBIND section.
4894 (_bfd_elf_init_private_section_data): Copy sh_info from input
4895 for GNU_MBIND section.
4897 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
4899 * elfnn-riscv.c (GP_NAME): Delete.
4900 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
4901 (_bfd_riscv_relax_lui): Likewise.
4903 2017-04-04 Nick Clifton <nickc@redhat.com>
4906 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
4908 (bfd_elf_final_link): Only initialize the extended symbol index
4909 section if there are extended symbol tables to list.
4911 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
4913 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
4914 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
4915 * configure.ac (elf): Add elf-properties.lo.
4916 * Makefile.in: Regenerated.
4917 * configure: Likewise.
4918 * elf-bfd.h (elf_property_kind): New.
4919 (elf_property): Likewise.
4920 (elf_property_list): Likewise.
4921 (elf_properties): Likewise.
4922 (_bfd_elf_parse_gnu_properties): Likewise.
4923 (_bfd_elf_get_property): Likewise.
4924 (_bfd_elf_link_setup_gnu_properties): Likewise.
4925 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
4926 and setup_gnu_properties.
4927 (elf_obj_tdata): Add properties.
4928 * elf-properties.c: New file.
4929 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
4930 (elf_i386_merge_gnu_properties): Likewise.
4931 (elf_backend_parse_gnu_properties): Likewise.
4932 (elf_backend_merge_gnu_properties): Likewise.
4933 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
4934 (elf_x86_64_merge_gnu_properties): Likewise.
4935 (elf_backend_parse_gnu_properties): Likewise.
4936 (elf_backend_merge_gnu_properties): Likewise.
4937 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
4938 (elf_backend_parse_gnu_properties): Likewise.
4939 (elf_backend_setup_gnu_properties): Likewise.
4940 (elfNN_bed): Add elf_backend_parse_gnu_properties,
4941 elf_backend_merge_gnu_properties and
4942 elf_backend_setup_gnu_properties.
4944 2017-03-30 Pip Cet <pipcet@gmail.com>
4946 * elf32-wasm32.c: Add relocation code, two relocs.
4947 * reloc.c: Add wasm32 relocations.
4948 * libbfd.h: Regenerate.
4949 * bfd-in2.h: Regenerate.
4950 * bfd/po/bfd.pot: Regenerate.
4952 2017-03-29 Nick Clifton <nickc@redhat.com>
4955 * coff-bfd.h (struct coff_section_data): Add new fields:
4956 saved_bias and bias.
4957 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
4958 computed for PE binaries.
4959 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
4962 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
4965 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
4966 to handle a local symbol with a hash-symbol-entry; without PLT.
4967 Add BFD_ASSERT for an incidental case with GOT entry present.
4968 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
4969 isn't forced-or-set local.
4971 2017-03-27 Pip Cet <pipcet@gmail.com>
4973 * wasm-module.c: New file to support WebAssembly modules.
4974 * wasm-module.h: New file to support WebAssembly modules.
4975 * doc/webassembly.texi: Start documenting wasm-module.c.
4976 * config.bfd: Add wasm_vec.
4977 * targets.c: Likewise.
4978 * configure.ac: Likewise.
4979 * Makefile.am: Add entries for wasm-module.c.
4980 * Makefile.in: Regenerate.
4981 * configure: Regenerate.
4982 * po/SRC-POTFILES.in: Regenerate.
4984 2017-03-27 Pip Cet <pipcet@gmail.com>
4986 * cpu-wasm32.c: New file to support wasm32 architecture.
4987 * elf32-wasm32.c: New file to support wasm32 architecture.
4988 * Makefile.am: Add wasm32 architecture.
4989 * archures.c: Likewise.
4990 * config.bfd: Likewise.
4991 * configure.ac: Likewise.
4992 * targets.c: Likewise.
4993 * Makefile.in: Regenerate.
4994 * bfd-in2.h: Regenerate.
4995 * configure: Regenerate.
4996 * po/SRC-POTFILES.in: Regenerate.
4998 2017-03-20 Alan Modra <amodra@gmail.com>
5001 * elf64-ppc.c (compare_symbols): Stabilize sort.
5003 2017-03-18 Alan Modra <amodra@gmail.com>
5005 * elf64-ppc.c (struct ppc_link_hash_table): Add
5006 local_ifunc_resolver and maybe_local_ifunc_resolver.
5007 (ppc_build_one_stub): Set flags on emitting dynamic
5008 relocation to ifunc.
5009 (ppc64_elf_relocate_section): Likewise.
5010 (ppc64_elf_finish_dynamic_symbol): Likewise.
5011 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
5012 local dynamic relocs to ifuncs.
5013 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
5014 local_ifunc_resolver and maybe_local_ifunc_resolver.
5015 (ppc_elf_relocate_section): Set flag on emitting dynamic
5016 relocation to ifuncs.
5017 (ppc_elf_finish_dynamic_symbol): Likewise.
5018 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
5019 dynamic relocs to ifuncs.
5021 2017-03-13 Nick Clifton <nickc@redhat.com>
5024 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
5025 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
5026 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
5027 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
5028 * bfd-in2.h: Regenerate.
5029 * libbfd.h: Regenerate.
5030 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
5032 (IS_AARCH64_TLSDESC_RELOC): Likewise.
5033 (elfNN_aarch64_howto_table): Likewise.
5034 (aarch64_tls_transition_without_check): Likewise.
5035 (aarch64_reloc_got_type): Likewise.
5036 (elfNN_aarch64_final_link_relocate): Likewise.
5037 (elfNN_aarch64_tls_relax): Likewise.
5038 (elfNN_aarch64_relocate_section): Likewise.
5039 (elfNN_aarch64_gc_sweep_hook): Likewise.
5040 (elfNN_aarch64_check_relocs): Likewise.
5041 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
5042 (_bfd_aarch64_elf_resolve_relocation): Likewise.
5044 2017-03-11 Alan Modra <amodra@gmail.com>
5046 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
5047 parameter is in fact used. Whitespace fixes.
5048 * elf64-ppc.c: Likewise.
5050 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
5052 * rs6000-core.c (CORE_NEW): Simplify macro when
5053 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
5055 2017-03-07 Alan Modra <amodra@gmail.com>
5059 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
5062 2017-03-05 Alan Modra <amodra@gmail.com>
5064 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
5065 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
5066 (next_cie_fde_offset): New function.
5067 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
5068 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
5069 four bytes. Align CIEs to four or eight bytes depending on
5070 per_encoding_aligned8. Align FDEs according to their encoding.
5071 Pad last FDE to output section alignment.
5072 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
5074 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
5075 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
5076 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
5078 2017-03-02 Martin Bickel <binutils@ineranves.de>
5081 * elf.c (rewrite_elf_program_header): Do not issue a warning for
5082 empty segments which have a zero filesz, but a non-zero memsz.
5084 2017-03-02 Alan Modra <amodra@gmail.com>
5086 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
5088 2017-02-28 Alan Modra <amodra@gmail.com>
5090 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
5091 (ppc64_elf_relocate_section): Likewise.
5093 2017-02-28 Alan Modra <amodra@gmail.com>
5096 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
5097 rather than elf32_nios2_hash_table or elf_hash_table.
5098 (create_got_section): Likewise.
5099 (nios2_elf32_finish_dynamic_symbol): Likewise.
5100 (nios2_elf32_adjust_dynamic_symbol): Likewise.
5101 (nios2_elf32_size_dynamic_sections): Likewise.
5102 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
5103 vars. Use htab equivalents directly instead. Don't create
5104 all dynamic sections on needing just the GOT. Use a goto
5105 rather than a fall-through with reloc test. Ensure
5106 htab->dynobj is set when making dynamic sreloc section.
5107 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
5108 equivalent directly instead. Don't segfault on looking for
5109 .dynamic when dynamic sections have not been created. Don't
5110 segfault on .got.plt being discarded.
5111 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
5112 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
5113 fixme and another not so relevant comment.
5114 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
5115 already set, set hash table dynobj on creating .sbss.
5117 2017-02-28 Alan Modra <amodra@gmail.com>
5119 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
5120 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
5121 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
5122 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
5123 (ppc64_elf_relocate_section): Likewise.
5124 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
5125 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
5126 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
5127 * libbfd.h: Regenerate.
5128 * bfd-in2.h: Regenerate.
5130 2017-02-28 Alan Modra <amodra@gmail.com>
5132 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
5133 dynamic .data.rel.ro read-only.
5134 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
5135 rather than section flags when deciding where copy reloc goes.
5136 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
5137 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
5138 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
5139 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
5140 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
5141 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
5142 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
5143 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
5144 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
5145 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
5146 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
5147 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
5148 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
5149 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
5150 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
5151 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
5152 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
5153 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
5154 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
5156 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
5158 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
5159 `jalr $0, $25' instruction encoding.
5161 2017-02-27 Nick Clifton <nickc@redhat.com>
5164 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
5165 generating a seg-fault when encountering a symbol that has been
5166 deleted by garbage collection.
5168 2017-02-25 Alan Modra <amodra@gmail.com>
5170 * elf32-arc.c (struct dynamic_sections): Delete.
5171 (enum dyn_section_types): Delete.
5172 (dyn_section_names): Delete.
5173 (arc_create_dynamic_sections): Delete.
5174 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
5175 segfault on discarded .rela.plt section.
5176 (elf_arc_size_dynamic_sections): Formatting. Don't call
5177 arc_create_dynamic_sections. Don't allocate memory for sections
5178 handled by the generic linker. Correct code finding relocs in
5179 read-only sections. Set SEC_EXCLUDE on zero size .got,
5180 .got.plt, and .dynbss sections. Do set .interp for pies.
5182 2017-02-24 Andrew Waterman <andrew@sifive.com>
5184 * elfnn-riscv.c (GP_NAME): New macro.
5185 (riscv_global_pointer_value): Use it.
5186 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
5187 output section, consider only that section's alignment.
5189 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
5191 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
5192 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
5193 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
5194 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
5196 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
5198 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
5199 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
5202 2017-02-23 Alan Modra <amodra@gmail.com>
5205 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
5207 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
5208 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
5211 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
5214 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
5215 processing ahead of the call to `elf_gc_sweep_symbol'.
5217 2017-02-22 Nick Clifton <nickc@redhat.com>
5220 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
5221 created section 4-byte alignment.
5223 2017-02-22 Alan Modra <amodra@gmail.com>
5225 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
5226 on .got or .plt output section being discarded by script.
5227 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
5230 2017-02-21 Alan Modra <amodra@gmail.com>
5232 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
5233 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
5235 2017-02-20 Alan Modra <amodra@gmail.com>
5238 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
5239 if DT_RELSZ/DT_RELASZ is zero.
5241 2017-02-17 Nick Clifton <nickc@redhat.com>
5243 * compress.c (bfd_get_full_section_contents): Remember to reduce
5244 compressed size by the sizeof the compression header when
5245 decompressing the contents.
5247 2017-02-17 Pedro Alves <palves@redhat.com>
5249 * srec.c (Chunk): Rename to ...
5250 (_bfd_srec_len): ... this.
5251 (S3Forced): Rename to ...
5252 (_bfd_srec_forceS3): ... this.
5253 * objcopy.c: Adjust all references.
5255 2017-02-17 Pedro Alves <palves@redhat.com>
5257 * archive.c (bsd_write_armap): Rename to ...
5258 (_bfd_bsd_write_armap): ... this.
5259 (coff_write_armap): Rename to ...
5260 (_bfd_coff_write_armap): ... this.
5261 * libbfd-in.h (bsd_write_armap): Rename to ...
5262 (_bfd_bsd_write_armap): ... this.
5263 (coff_write_armap): Rename to ...
5264 (_bfd_coff_write_armap): ... this.
5265 * aout-target.h, aout-tic30.c: Adjust all users.
5266 * libbfd.h: Regenerate.
5268 2017-02-17 Pedro Alves <palves@redhat.com>
5270 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
5271 (warn_deprecated): Rename to ...
5272 (_bfd_warn_deprecated): ... this.
5273 * libbfd.c (warn_deprecated): Rename to ...
5274 (_bfd_warn_deprecated): ... this.
5275 * bfd-in2.h: Regenerate.
5277 2017-02-17 Pedro Alves <palves@redhat.com>
5279 * bfdio.c (real_ftell): Rename to ...
5280 (_bfd_real_ftell): ... this.
5281 (real_fseek): Rename to ...
5282 (_bfd_real_fseek): ... this.
5283 (real_fopen): Rename to ...
5284 (_bfd_real_fopen): ... this.
5285 * libbfd-in.h (real_ftell): Rename to ...
5286 (_bfd_real_ftell): ... this.
5287 (real_fseek): Rename to ...
5288 (_bfd_real_fseek): ... this.
5289 (real_fopen): Rename to ...
5290 (_bfd_real_fopen): ... this.
5291 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
5292 * libbfd.h: Regenerate.
5294 2017-02-17 Pedro Alves <palves@redhat.com>
5296 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
5297 * libbfd.c (read_unsigned_leb128): Rename to ...
5298 (_bfd_read_unsigned_leb128): ... this.
5299 (read_signed_leb128): Rename to ...
5300 (_bfd_read_signed_leb128): ... this.
5301 (safe_read_leb128): Rename to ...
5302 (_bfd_safe_read_leb128): ... this.
5303 * libbfd-in.h (read_unsigned_leb128): Rename to ...
5304 (_bfd_read_unsigned_leb128): ... this.
5305 (read_signed_leb128): Rename to ...
5306 (_bfd_read_signed_leb128): ... this.
5307 (safe_read_leb128): Rename to ...
5308 (_bfd_safe_read_leb128): ... this.
5309 * libbfd.h: Renegerate.
5311 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
5313 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
5314 before trying to fine matching file and line information.
5316 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
5318 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
5319 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
5320 not match current bfd, then reload debug information. Record bfd
5321 we're loading debug info for in the stash. If we have debug
5322 informatin in the cache then perform section placement before
5325 2017-02-16 Alan Modra <amodra@gmail.com>
5328 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
5329 * elfxx-target.h (elf_backend_no_page_alias): Define.
5330 (elfNN_bed): Init new field.
5331 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
5332 ensure PT_LOAD segment starts on a new page.
5333 * elf32-hppa.c (elf_backend_no_page_alias): Define.
5335 2017-02-16 Alan Modra <amodra@gmail.com>
5338 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
5341 2017-02-16 Jiong Wang <jiong.wang@arm.com>
5343 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
5344 * bfd-in2.h: Regenerated.
5346 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
5349 * elf32-i386.c (elf_i386_relocate_section): Allow
5350 "lea foo@GOT, %reg" in PIC.
5352 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
5355 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
5356 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
5357 error against local IFUNC symbol without a base register for
5360 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
5362 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
5363 `%P: %H:' with `info->callbacks->einfo'.
5364 (ppc_elf_relocate_section): Likewise.
5365 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
5366 (ppc64_elf_edit_toc): Likewise.
5367 (ppc64_elf_relocate_section): Likewise.
5369 2017-02-14 Alan Modra <amodra@gmail.com>
5371 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
5372 --gc-keep-exported, and test versioned field of sym rather than
5373 looking for @ in name.
5375 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
5377 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
5380 2017-02-13 Nick Clifton <nickc@redhat.com>
5383 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
5386 2017-02-07 Andrew Waterman <andrew@sifive.com>
5388 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
5389 entry size if PLT header is written.
5391 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
5393 Fix sparc64 dynamic relocation processing to use the dynamic
5395 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
5396 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
5399 2017-02-03 Nick Clifton <nickc@redhat.com>
5402 * coffcode.h (coff_write_object_contents): Enlarge size of
5403 s_name_buf in order to avoid compile time warning about possible
5405 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
5406 32-bits of insn value before printing into buffer.
5408 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5410 * elfxx-mips.c (mips_elf_hash_sort_data): Add
5411 `max_local_dynindx'.
5412 (mips_elf_sort_hash_table): Handle it.
5413 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
5414 symbols bump up `max_local_dynindx' rather than
5415 `max_non_got_dynindx'.
5417 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5419 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
5420 `min_got_dynindx', `max_unref_got_dynindx' and
5421 `max_non_got_dynindx' members to the `bfd_size_type' data type.
5422 (mips_elf_sort_hash_table): Adjust accordingly.
5424 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5426 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
5427 to access the hash table.
5429 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5431 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
5432 non-NULL `htab' to the beginning.
5434 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
5436 * elflink.c (elf_gc_sweep): Wrap overlong line.
5438 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
5440 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
5441 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
5442 * elfxx-mips.c (mips_elf_link_hash_table): Add
5443 `ignore_branch_isa' member.
5444 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
5445 in branch relocation calculation as an error if
5446 `ignore_branch_isa' has been set.
5447 (_bfd_mips_elf_insn32): Rename to...
5448 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
5449 parameter to `insn32' and add an `ignore_branch_isa' parameter.
5450 Handle the new parameter.
5452 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
5454 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
5455 local variable dynobj.
5458 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
5459 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
5460 executable from read-only sections into sdynrelro.
5461 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
5462 dynamic relocs in sdynrelro.
5463 (elf_backend_want_dynrelro): Define.
5465 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
5467 * config.bfd (*-*-rtemsaout*): Mark as removed.
5469 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
5471 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
5472 (arm-*-rtems*): Move to (arm*-*-eabi*).
5473 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
5474 (m68-*-rtems*): Move to (m68*-*-elf*).
5476 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
5478 * config.bfd (*-*-rtemscoff*): Mark as removed.
5480 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
5483 * elflink.c (bfd_elf_record_link_assignment): Revert last
5484 change and don't ever clear `forced_local'. Set `mark'
5486 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
5488 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
5489 (bfd_elf_size_dynamic_sections): ... here.
5490 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
5491 and set `mark' instead in `__tls_get_addr_opt' processing.
5492 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
5494 2017-01-24 Alan Modra <amodra@gmail.com>
5496 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
5497 where dynamic relocs are preferable. Allow ifunc too.
5498 (ensure_undefweak_dynamic): New function.
5499 (allocate_dynrelocs): Use it here. Move plt handling last and
5500 don't make symbols dynamic, simplifying loop. Only make undef
5501 weak symbols with GOT entries dynamic. Correct condition
5502 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
5503 comments. Remove goto.
5504 (ppc_elf_relocate_section): Correct test for using dynamic
5505 symbol on GOT relocs. Rearrange test for emitting GOT relocs
5506 to suit. Set up explicit tls_index entries and implicit GOT
5507 tls_index entries resolvable at link time for
5508 __tls_get_addr_opt. Simplify test to clear mem for prelink.
5509 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
5510 (ensure_undefweak_dynamic): New function.
5511 (allocate_dynrelocs): Use it here. Only make undef weak symbols
5512 with GOT entries dynamic. Remove unnecessary test of
5513 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
5514 (ppc64_elf_relocate_section): Correct test for using dynamic
5515 symbol on GOT relocs. Rearrange test for emitting GOT relocs
5516 to suit. Set up explicit tls_index entries and implicit GOT
5517 tls_index entries resolvable at link time for __tls_get_addr_opt.
5518 Simplify expression to clear mem for prelink.
5520 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
5522 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
5524 2017-01-20 Jiong Wang <jiong.wang@arm.com>
5526 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
5527 (elf_backend_hash_symbol): Define.
5529 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
5532 * elflink.c (bfd_elf_record_link_assignment): Clear any
5533 `forced_local' marking for DSO symbols that are not being
5536 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
5538 * elfnn-riscv.c (riscv_elf_object_p): New function.
5540 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
5543 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
5545 (elf_x86_64_check_relocs): Create .eh_frame section for the
5547 (elf_x86_64_size_dynamic_sections): Allocate and initialize
5548 .eh_frame section for the .plt.bnd section.
5549 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
5550 for the .plt.bnd section.
5552 2017-01-12 Nick Clifton <nickc@redhat.com>
5555 * opncls.c (find_separate_debug_file): Add include_dirs
5556 parameter. Only include the directory part of the bfd's filename
5557 in search paths if include_dirs is true. Add a couple of extra
5558 locations for looking for debug files.
5559 ( bfd_follow_gnu_debuglink): Update invocation of
5560 find_separate_debug_file.
5561 (bfd_follow_gnu_debugaltlink): Likewise.
5562 (get_build_id): New function: Finds the build-id of the given bfd.
5563 (get_build_id_name): New function: Computes the name of the
5564 separate debug info file for a bfd, based upon its build-id.
5565 (check_build_id_file): New function: Checks to see if a separate
5566 debug info file exists at the given location, and that its
5567 build-id matches that of the original bfd.
5568 (bfd_follow_build_id_debuglink): New function: Finds a separate
5569 debug info file for a given bfd by using the build-id method.
5570 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
5571 method of locating a separate debug info file before using the
5573 * bfd-in2.h: Regenerate.
5575 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
5578 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
5579 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
5580 elf_x86_64_eh_frame_plt_got.
5581 (elf_x86_64_size_dynamic_sections): Get unwind info from
5582 elf_x86_64_bnd_arch_bed for the BND PLT.
5584 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
5586 * config.bfd: Add entries for i686-redox and x86_64-redox.
5588 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5590 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
5592 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
5593 .eh_frame section to 4 bytes for x32.
5594 (elf_x86_64_check_relocs): Likewise.
5596 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5599 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
5600 (PLT_GOT_FDE_LENGTH): Likewise.
5601 (elf_i386_plt_layout): Add eh_frame_plt_got and
5602 eh_frame_plt_got_size.
5603 (elf_i386_plt): Updated.
5604 (elf_i386_link_hash_table): Add plt_got_eh_frame.
5605 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
5606 (elf_i386_size_dynamic_sections): Allocate and initialize
5607 .eh_frame section for .plt.got.
5608 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
5610 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
5611 eh_frame_plt_got_size.
5612 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
5613 (PLT_GOT_FDE_LENGTH): Likewise.
5614 (elf_x86_64_backend_data): Add eh_frame_plt_got and
5615 eh_frame_plt_got_size.
5616 (elf_x86_64_arch_bed): Updated.
5617 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
5618 eh_frame_plt_got_size.
5619 (elf_x86_64_nacl_arch_bed): Likewise.
5620 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
5621 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
5622 (elf_x86_64_size_dynamic_sections): Allocate and initialize
5623 .eh_frame section for .plt.got.
5624 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
5627 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
5629 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
5630 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
5632 2017-01-09 Nick Clifton <nickc@redhat.com>
5634 * dwarf2.c (lookup_address_in_function_table): Return early if
5635 there are no functions in the given comp unit, or if the high
5636 address of the last function in the comp unit is less than the
5639 2017-01-09 Nick Clifton <nickc@redhat.com>
5642 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
5643 message if there are too many symbols to load.
5645 2017-01-04 James Clarke <jrtc27@jrtc27.com>
5647 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
5648 if relocs are cached.
5650 2017-01-03 Rich Felker <bugdal@aerifal.cx>
5653 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
5654 for R_MICROBLAZE_GOTOFF_64.
5656 2017-01-03 Nick Clifton <nickc@redhat.com>
5658 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
5659 warning about using a possibly uninitialised variable.
5661 2017-01-02 Alan Modra <amodra@gmail.com>
5663 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
5664 (allocate_plt_static, allocate_dynrelocs): Use it.
5666 2017-01-02 Alan Modra <amodra@gmail.com>
5668 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
5669 .PARISC.unwind section.
5671 2017-01-02 Alan Modra <amodra@gmail.com>
5674 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
5675 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
5676 indirect to GOT pointer relative code edit.
5678 2017-01-02 Alan Modra <amodra@gmail.com>
5680 Update year range in copyright notice of all files.
5682 For older changes see ChangeLog-2016
5684 Copyright (C) 2017 Free Software Foundation, Inc.
5686 Copying and distribution of this file, with or without modification,
5687 are permitted in any medium without royalty provided the copyright
5688 notice and this notice are preserved.
5694 version-control: never