RISC-V: Don't enable relaxation in relocatable link
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
f9671640
KLC
12018-03-15 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2
3 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
4 Not support the target feature.
5 (nds32_elf_ex9_itb_base): Likewise.
6 (nds32_elf_ex9_import_table): Likewise.
7 (nds32_elf_ex9_finish): Likewise.
8 (nds32_elf_ex9_reloc_jmp): Likewise.
9 (nds32_elf_get_insn_with_reg): Likewise.
10 (nds32_get_local_syms): Likewise.
11 (nds32_elf_ex9_replace_instruction): Likewise.
12 (nds32_elf_ifc_calc): Likewise.
13 (nds32_elf_ifc_finish): Likewise.
14 (nds32_elf_ifc_replace): Likewise.
15 (nds32_elf_ifc_reloc): Likewise.
16
7dda8d3c
AM
172018-03-14 Alan Modra <amodra@gmail.com>
18
19 * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
20 sfpr size added before defining alias symbols.
21 (ppc64_elf_build_stubs): Add stub section padding before
22 copying sfpr contents and defining save/restore alias symbols.
23
9e223787
L
242018-03-14 H.J. Lu <hongjiu.lu@intel.com>
25
26 PR ld/20882
27 * elflink.c (elf_gc_mark_debug_section): Also check the local
28 debug definition section.
29
3e33b239
NC
302018-03-13 Nick Clifton <nickc@redhat.com>
31
32 PR 22113
33 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
34 function. Add an end address parameter. Check access of the data
35 pointer to make sure that they do not extend beyond the end
36 address. Return FALSE if any check fails. Add the end address
37 pointer to the ui structure.
38 (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
39 codes to make sure that they do not extend beyond the end address
40 pointer. Print an error message and return immediately if any
41 check fails.
42
f657f8c4
NC
432018-03-09 Nick Clifton <nickc@redhat.com>
44
45 * elf64-s390.c (elf_s390_relocate_section): Move check for
46 relocations against non-allocated sections to before the code that
47 handles ifunc relocations.
48 * elf32-s390.c (elf_s390_relocate_section): Likewise.
49 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
50 relocs against IFUNC symbols in non-allocated sections as relocs
51 against FUNC symbols.
52 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
53
347a8774
L
542018-03-08 H.J. Lu <hongjiu.lu@intel.com>
55
56 PR ld/22929
57 * elf32-i386.c (elf_i386_relocate_section): Treat relocation
58 against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
59 relocation against FUNC symbol.
60 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
61
0c1ded8d
RL
622018-03-07 Renlin Li <renlin.li@arm.com>
63
64 PR ld/20402
65 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
66 symbol, and don't emit relocation in specific case.
67
0118219e
AM
682018-03-07 Alan Modra <amodra@gmail.com>
69
70 * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
71 (mips_elf64_slurp_one_reloc_table): Pass on error.
72
dfb93f11
JC
732018-03-03 James Cowgill <james.cowgill@mips.com>
74 Maciej W. Rozycki <macro@mips.com>
75
76 PR ld/21900
77 * elfxx-mips.c (mips_elf_calculate_relocation): Only return
78 after calling `undefined_symbol' hook if this is an error
79 condition. Assume the value of 0 for the symbol requested
80 otherwise.
81
9a2ebffd
JW
822018-03-02 Jim Wilson <jimw@sifive.com>
83
84 PR 22903
85 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
86 and nop instead of 4.
87 (elfNN_arch64_build_stubs): Add nop after branch. Increase size by
88 8 instead of 4.
89
788af978
JW
902018-03-01 Jim Wilson <jimw@sifive.com>
91
92 PR 22756
93 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
94 else if instead of if.
95
5224fa03
AM
962018-03-01 Alan Modra <amodra@gmail.com>
97
98 * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
99
116acb2c
AM
1002018-02-28 Alan Modra <amodra@gmail.com>
101
102 PR 22887
103 * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
104
eef10466
NC
1052018-02-28 Nick Clifton <nickc@redhat.com>
106
12c96342
NC
107 PR 22895
108 PR 22893
109 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
110 pointer. Drop unused abfd parameter. Check the size of the block
111 before initialising the data field. Return the end pointer if the
112 size is invalid.
113 (read_attribute_value): Adjust invocations of read_n_bytes.
114
eef10466
NC
115 PR 22894
116 * dwarf1.c (parse_die): Check the length of form blocks before
117 advancing the data pointer.
118
0d329c0a
AM
1192018-02-28 Alan Modra <amodra@gmail.com>
120
121 PR 22887
122 * aoutx.h (translate_symbol_table): Print an error message and set
123 bfd_error on finding an invalid name string offset.
124
f6aec96d
L
1252018-02-27 H.J. Lu <hongjiu.lu@intel.com>
126
127 * config.in: Regenerated.
128 * configure: Likewise.
129 * configure.ac: Add --enable-separate-code.
130 (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default
131 to 1 for Linux/x86 targets,
132 * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
133 DEFAULT_LD_Z_SEPARATE_CODE is 1.
134
f3185997
NC
1352018-02-27 Nick Clifton <nickc@redhat.com>
136
e8f5af78
NC
137 * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
138 message.
139 * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
140 * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
141 * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
142 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
143 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
144 * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
145 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
146 * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
147 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
148
f3185997
NC
149 PR 22875
150 * elf-bfd.h (struct elf_backend_data): Change the return type of
151 the elf_info_to_howto and elf_info_to_howto_rel function pointers
152 to bfd_boolean.
153 * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
154 value from the info_to_howto function and fail if that function
155 failed.
156 * elf32-h8300.c (elf32_h8_relocate_section): Check return value
157 from the info_to_howto function.
158 (elf32_h8_relax_section): Likewise.
159 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
160 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
161 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
162 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
163 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
164 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
165 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
166 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
167 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
168 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
169 (riscv_elf_relocate_section): Likewise.
170 * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
171 bfd_boolean. Issue an error message, set an error value and
172 return FALSE if the reloc is not recognized.
173 (elf_hppa_info_to_howto_rel): Likewise.
174 * elf-m10200.c (mn10200_info_to_howto): Likewise.
175 * elf-m10300.c (mn10300_info_to_howto): Likewise.
176 * elf.c (_bfd_elf_no_info_to_howto): Likewise.
177 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
178 * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
179 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
180 * elf32-bfin.c (bfin_info_to_howto): Likewise.
181 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
182 * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
183 * elf32-cris.c (elf_cr16c_info_to_howto_rel)
184 (cris_info_to_howto_rela): Likewise.
185 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
186 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
187 * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
188 Likewise.
189 * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
190 (elf32_dlx_info_to_howto_rel): Likewise.
191 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
192 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
193 * elf32-frv.c (frv_info_to_howto_rela)
194 (frvfdpic_info_to_howto_rel): Likewise.
195 * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
196 * elf32-gen.c (elf_generic_info_to_howto)
197 (elf_generic_info_to_howto_rel): Likewise.
198 * elf32-h8300.c (elf32_h8_info_to_howto)
199 (elf32_h8_info_to_howto_rel): Likewise.
200 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
201 * elf32-i386.c (elf_i386_reloc_type_lookup)
202 (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
203 * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
204 Likewise.
205 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
206 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
207 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
208 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
209 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
210 * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
211 Likewise.
212 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
213 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
214 * elf32-m68k.c (rtype_to_howto): Likewise.
215 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
216 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
217 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
218 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
219 * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
220 Likewise.
221 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
222 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
223 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
224 * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
225 Likewise.
226 * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
227 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
228 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
229 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
230 * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
231 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
232 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
233 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
234 * elf32-score.c (s3_bfd_score_info_to_howto)
235 (_bfd_score_info_to_howto): Likewise.
236 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
237 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
238 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
239 * elf32-tic6x.c (elf32_tic6x_info_to_howto)
240 (elf32_tic6x_info_to_howto_rel): Likewise.
241 * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
242 * elf32-v850.c (v850_elf_info_to_howto_rel)
243 (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
244 * elf32-vax.c (rtype_to_howto): Likewise.
245 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
246 * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
247 (elf32_wasm32_info_to_howto_rela): Likewise.
248 * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
249 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
250 * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
251 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
252 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
253 * elf64-gen.c (elf_generic_info_to_howto)
254 (elf_generic_info_to_howto_rel): Likewise.
255 * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
256 * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
257 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
258 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
259 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
260 * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
261 Likewise.
262 * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
263 * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
264 Likewise.
265 * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
266 * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
267 * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
268 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
269 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
270 * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
271 * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
272 * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
273 * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
274 * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
275 Default to NULL.
276
1f4bace8
JW
2772018-02-26 Jim Wilson <jimw@sifive.com>
278 Stephan Schreiber <info@fs-driver.org>
279
280 PR 15904
281 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
282 call, set changed_contents and changed_relocs. Likewise after
283 successful ia64_elf_relax_br call.
284
6838f2be
AM
2852018-02-26 Alan Modra <amodra@gmail.com>
286
287 * elf.c (assign_file_positions_except_relocs): Don't segfault
288 when actual number of phdrs is less than allocated. Delete
289 outdated comment. Formatting.
290
38f14ab8
AM
2912018-02-26 Alan Modra <amodra@gmail.com>
292
293 * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
294 * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
295 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
296 * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
297 * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
298 * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
299 * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
300 * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
301 * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
302 * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
303 error/warning messages.
304
6e05870c
AM
3052018-02-26 Alan Modra <amodra@gmail.com>
306
307 * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
308 * syms.c: Standardize error/warning messages.
309
59d08d6c
AM
3102018-02-26 Alan Modra <amodra@gmail.com>
311
312 * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
313 * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
314 * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
315 * peXXigen.c, * peicode.h: Standardize error/warning messages.
316
90b6238f
AM
3172018-02-26 Alan Modra <amodra@gmail.com>
318
319 * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
320
2c1c9679
AM
3212018-02-26 Alan Modra <amodra@gmail.com>
322
323 * elfxx-mips.c: Standardize error/warning messages.
324
9793eb77
AM
3252018-02-26 Alan Modra <amodra@gmail.com>
326
327 * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
328 * elflink.c: Standardize error/warning messages. Replace use of
329 linker callback einfo with _bfd_error_handler when possible.
330
0aa13fee
AM
3312018-02-26 Alan Modra <amodra@gmail.com>
332
333 * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
334 * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
335 * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
336 * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
337 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
338 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
339 * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
340 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
341 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
342 * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
343 * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
344 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
345 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
346 * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
347 * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
348 * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
349 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
350 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
351 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
352 * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
353 * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
354 unrecognized/unsupported reloc message.
355
cf97bcb0
AM
3562018-02-26 Alan Modra <amodra@gmail.com>
357
358 * elf32-ppc.c: Standardize error/warning messages. Use
359 _bfd_error_handler rather than einfo when einfo features not used.
360 * elf64-ppc.c: Likewise.
361
01f7e10c
AM
3622018-02-23 Alan Modra <amodra@gmail.com>
363
364 PR 22881
365 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
366 segment if no matching LOAD segment.
367
e859f655
KLC
3682018-02-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
369
370 * elf32-nds32.h: Define mask for ict_model.
371
6e8d06db
JD
3722018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
373
374 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
375
b248d650
MR
3762018-02-19 Maciej W. Rozycki <macro@mips.com>
377
378 Revert
379 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
380
381 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
382 .reginfo section has wrong size.
383
6798f8bf
MR
3842018-02-19 Maciej W. Rozycki <macro@mips.com>
385
386 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
387 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
388 `.MIPS.abiflags' sections.
389 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
390 section's end.
391
8772de11
MR
3922018-02-19 Maciej W. Rozycki <macro@mips.com>
393
394 * section.c (SEC_FIXED_SIZE): New macro.
395 * bfd-in2.h: Regenerate.
396
4f7fd351
MR
3972018-02-19 Maciej W. Rozycki <macro@mips.com>
398
399 * section.c (SEC_HAS_GOT_REF): Remove macro.
400 * bfd-in2.h: Regenerate.
401
f2b740ac
AM
4022018-02-19 Alan Modra <amodra@gmail.com>
403
404 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
405 arguments.
406 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
407 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
408 (_bfd_riscv_relax_pc): Likewise and fix typos.
409 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
410 * libbfd.h: Regenerate.
411
8979927a
AM
4122018-02-19 Alan Modra <amodra@gmail.com>
413
414 * dwarf2.c (read_section): Don't use 'll' format modifier.
415 (find_abstract_instance): Likewise.
416 * elfcore.h (elf_core_file_p): Likewise.
417
2dcf00ce
AM
4182018-02-19 Alan Modra <amodra@gmail.com>
419
420 * bfd-in.h: Include inttypes.h or if not available define
421 PRId64, PRIu64 and PRIx64.
422 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
423 modifier to print bfd_vma.
424 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
425 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
426 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
427 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
428 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
429 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
430 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
431 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
432 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
433 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
434 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
435 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
436 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
437 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
438 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
439 and cast input to uint64_t, and similarly for Ld and Lu.
440 * bfd-in2.h: Regenerate.
441
c1c8c1ef
AM
4422018-02-19 Alan Modra <amodra@gmail.com>
443
444 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
445 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
446 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
447 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
448 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
449 * reloc.c: Replace use of %R and %T in format strings passed to
450 einfo and friends by %pR and %pT.
451
871b3ab2
AM
4522018-02-19 Alan Modra <amodra@gmail.com>
453
454 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
455 of %A and %B.
456 * aout-adobe.c: Update all messages using %A and %B.
457 * aout-cris.c: Likewise.
458 * aoutx.h: Likewise.
459 * archive.c: Likewise.
460 * binary.c: Likewise.
461 * cache.c: Likewise.
462 * coff-alpha.c: Likewise.
463 * coff-arm.c: Likewise.
464 * coff-i860.c: Likewise.
465 * coff-mcore.c: Likewise.
466 * coff-ppc.c: Likewise.
467 * coff-rs6000.c: Likewise.
468 * coff-sh.c: Likewise.
469 * coff-tic4x.c: Likewise.
470 * coff-tic54x.c: Likewise.
471 * coff-tic80.c: Likewise.
472 * coff64-rs6000.c: Likewise.
473 * coffcode.h: Likewise.
474 * coffgen.c: Likewise.
475 * cofflink.c: Likewise.
476 * coffswap.h: Likewise.
477 * compress.c: Likewise.
478 * cpu-arm.c: Likewise.
479 * ecoff.c: Likewise.
480 * elf-attrs.c: Likewise.
481 * elf-eh-frame.c: Likewise.
482 * elf-ifunc.c: Likewise.
483 * elf-m10300.c: Likewise.
484 * elf-properties.c: Likewise.
485 * elf-s390-common.c: Likewise.
486 * elf.c: Likewise.
487 * elf32-arc.c: Likewise.
488 * elf32-arm.c: Likewise.
489 * elf32-avr.c: Likewise.
490 * elf32-bfin.c: Likewise.
491 * elf32-cr16.c: Likewise.
492 * elf32-cr16c.c: Likewise.
493 * elf32-cris.c: Likewise.
494 * elf32-crx.c: Likewise.
495 * elf32-d10v.c: Likewise.
496 * elf32-d30v.c: Likewise.
497 * elf32-epiphany.c: Likewise.
498 * elf32-fr30.c: Likewise.
499 * elf32-frv.c: Likewise.
500 * elf32-gen.c: Likewise.
501 * elf32-hppa.c: Likewise.
502 * elf32-i370.c: Likewise.
503 * elf32-i386.c: Likewise.
504 * elf32-i960.c: Likewise.
505 * elf32-ip2k.c: Likewise.
506 * elf32-iq2000.c: Likewise.
507 * elf32-lm32.c: Likewise.
508 * elf32-m32c.c: Likewise.
509 * elf32-m32r.c: Likewise.
510 * elf32-m68hc11.c: Likewise.
511 * elf32-m68hc12.c: Likewise.
512 * elf32-m68hc1x.c: Likewise.
513 * elf32-m68k.c: Likewise.
514 * elf32-mcore.c: Likewise.
515 * elf32-mep.c: Likewise.
516 * elf32-metag.c: Likewise.
517 * elf32-microblaze.c: Likewise.
518 * elf32-moxie.c: Likewise.
519 * elf32-msp430.c: Likewise.
520 * elf32-mt.c: Likewise.
521 * elf32-nds32.c: Likewise.
522 * elf32-nios2.c: Likewise.
523 * elf32-or1k.c: Likewise.
524 * elf32-pj.c: Likewise.
525 * elf32-ppc.c: Likewise.
526 * elf32-rl78.c: Likewise.
527 * elf32-rx.c: Likewise.
528 * elf32-s390.c: Likewise.
529 * elf32-score.c: Likewise.
530 * elf32-score7.c: Likewise.
531 * elf32-sh-symbian.c: Likewise.
532 * elf32-sh.c: Likewise.
533 * elf32-sh64.c: Likewise.
534 * elf32-sparc.c: Likewise.
535 * elf32-spu.c: Likewise.
536 * elf32-tic6x.c: Likewise.
537 * elf32-tilepro.c: Likewise.
538 * elf32-v850.c: Likewise.
539 * elf32-vax.c: Likewise.
540 * elf32-visium.c: Likewise.
541 * elf32-wasm32.c: Likewise.
542 * elf32-xgate.c: Likewise.
543 * elf32-xtensa.c: Likewise.
544 * elf64-alpha.c: Likewise.
545 * elf64-gen.c: Likewise.
546 * elf64-hppa.c: Likewise.
547 * elf64-ia64-vms.c: Likewise.
548 * elf64-mmix.c: Likewise.
549 * elf64-ppc.c: Likewise.
550 * elf64-s390.c: Likewise.
551 * elf64-sh64.c: Likewise.
552 * elf64-sparc.c: Likewise.
553 * elf64-x86-64.c: Likewise.
554 * elfcode.h: Likewise.
555 * elfcore.h: Likewise.
556 * elflink.c: Likewise.
557 * elfnn-aarch64.c: Likewise.
558 * elfnn-ia64.c: Likewise.
559 * elfnn-riscv.c: Likewise.
560 * elfxx-mips.c: Likewise.
561 * elfxx-sparc.c: Likewise.
562 * elfxx-tilegx.c: Likewise.
563 * elfxx-x86.c: Likewise.
564 * hpux-core.c: Likewise.
565 * ieee.c: Likewise.
566 * ihex.c: Likewise.
567 * libbfd.c: Likewise.
568 * linker.c: Likewise.
569 * mach-o.c: Likewise.
570 * merge.c: Likewise.
571 * mmo.c: Likewise.
572 * oasys.c: Likewise.
573 * pdp11.c: Likewise.
574 * pe-mips.c: Likewise.
575 * peXXigen.c: Likewise.
576 * peicode.h: Likewise.
577 * reloc.c: Likewise.
578 * rs6000-core.c: Likewise.
579 * srec.c: Likewise.
580 * stabs.c: Likewise.
581 * vms-alpha.c: Likewise.
582 * xcofflink.c: Likewise.
583
dbc88fc1
AM
5842018-02-19 Alan Modra <amodra@gmail.com>
585
586 PR 22845
587 * elf.c (IS_TBSS): Define.
588 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
589 (assign_file_positions_for_non_load_sections): Revert last change.
590 Properly calculate load segment limits to compare against relro limits.
591
325ba6fb
AM
5922018-02-17 Alan Modra <amodra@gmail.com>
593
594 PR 22845
595 * elf.c (assign_file_positions_for_non_load_sections): Ignore
596 degenerate zero size PT_LOAD segments when finding one overlapping
597 the PT_GNU_RELRO segment.
598
d00dd7dc
AM
5992018-02-16 Alan Modra <amodra@gmail.com>
600
601 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
602 (_bfd_bool_bfd_true): Rename from bfd_true.
603 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
604 (_bfd_int_bfd_0): Rename from bfd_0.
605 (_bfd_uint_bfd_0): Rename from bfd_0u.
606 (_bfd_long_bfd_0): Rename from bfd_0l.
607 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
608 (_bfd_void_bfd): Rename from bfd_void.
609 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
610 (_bfd_bool_bfd_link_false_error),
611 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
612 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
613 (_bfd_bool_bfd_asection_bfd_asection_true),
614 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
615 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
616 * archive.c (_bfd_noarchive_get_elt_at_index),
617 (_bfd_noarchive_openr_next_archived_file),
618 (_bfd_noarchive_construct_extended_name_table),
619 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
620 (_bfd_noarchive_write_armap): New functions.
621 * archures.c (_bfd_nowrite_set_arch_mach): New function.
622 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
623 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
624 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
625 (alpha_ecoff_swap_coff_lineno_out),
626 (alpha_ecoff_swap_coff_reloc_out): New functions.
627 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
628 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
629 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
630 (mips_ecoff_swap_coff_lineno_out),
631 (mips_ecoff_swap_coff_reloc_out): New functions.
632 * coffcode.h (coff_set_alignment_hook): Replace define with
633 new function.
634 (symname_in_debug_hook): Likewise.
635 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
636 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
637 * elf.c (assign_file_positions_except_relocs): Test
638 elf_backend_allow_non_load_phdr for NULL.
639 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
640 _bfd_elf_link_omit_section_dynsym. Update uses.
641 (_bfd_elf_omit_section_dynsym_all): New function.
642 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
643 (_bfd_elf_omit_section_dynsym_default): Declare.
644 (_bfd_elf_omit_section_dynsym_all): Declare.
645 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
646 (_bfd_nolink_bfd_get_relocated_section_contents),
647 (_bfd_nolink_bfd_lookup_section_flags),
648 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
649 (_bfd_nolink_bfd_link_hash_table_create),
650 (_bfd_nolink_bfd_link_just_syms),
651 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
652 (_bfd_nolink_bfd_link_split_section),
653 (_bfd_nolink_section_already_linked),
654 (_bfd_nolink_bfd_define_common_symbol),
655 (_bfd_nolink_bfd_define_start_stop): New functions.
656 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
657 (_bfd_norelocs_bfd_reloc_name_lookup),
658 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
659 * section.c (_bfd_nowrite_set_section_contents): New function.
660 * syms.c (_bfd_nosymbols_canonicalize_symtab),
661 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
662 (_bfd_nosymbols_get_symbol_version_string),
663 (_bfd_nosymbols_bfd_is_local_label_name),
664 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
665 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
666 (_bfd_nosymbols_bfd_make_debug_symbol),
667 ( _bfd_nosymbols_read_minisymbols),
668 ( _bfd_nosymbols_minisymbol_to_symbol),
669 (_bfd_nodynamic_get_synthetic_symtab): New functions.
670 * libbfd-in.h: Declare new functions. Update existing defines,
671 removing casts.
672 * aix386-core.c: Update to use new hooks. Formatting.
673 * aout-adobe.c: Likewise.
674 * aout-arm.c: Likewise.
675 * aout-target.h: Likewise.
676 * aout-tic30.c: Likewise.
677 * aoutf1.h: Likewise.
678 * binary.c: Likewise.
679 * bout.c: Likewise.
680 * cisco-core.c: Likewise.
681 * coff-alpha.c: Likewise.
682 * coff-i386.c: Likewise.
683 * coff-i860.c: Likewise.
684 * coff-i960.c: Likewise.
685 * coff-ia64.c: Likewise.
686 * coff-mips.c: Likewise.
687 * coff-ppc.c: Likewise.
688 * coff-rs6000.c: Likewise.
689 * coff-sh.c: Likewise.
690 * coff-tic30.c: Likewise.
691 * coff-tic54x.c: Likewise.
692 * coff-x86_64.c: Likewise.
693 * coff64-rs6000.c: Likewise.
694 * coffcode.h: Likewise.
695 * elf-m10300.c: Likewise.
696 * elf32-cr16.c: Likewise.
697 * elf32-lm32.c: Likewise.
698 * elf32-m32r.c: Likewise.
699 * elf32-metag.c: Likewise.
700 * elf32-score.c: Likewise.
701 * elf32-score7.c: Likewise.
702 * elf32-tilepro.c: Likewise.
703 * elf32-xstormy16.c: Likewise.
704 * elf32-xtensa.c: Likewise.
705 * elf64-alpha.c: Likewise.
706 * elf64-hppa.c: Likewise.
707 * elf64-ia64-vms.c: Likewise.
708 * elf64-mmix.c: Likewise.
709 * elf64-sh64.c: Likewise.
710 * elfnn-ia64.c: Likewise.
711 * elfxx-sparc.c: Likewise.
712 * elfxx-target.h: Likewise.
713 * elfxx-tilegx.c: Likewise.
714 * elfxx-x86.h: Likewise.
715 * hp300hpux.c: Likewise.
716 * hppabsd-core.c: Likewise.
717 * hpux-core.c: Likewise.
718 * i386msdos.c: Likewise.
719 * i386os9k.c: Likewise.
720 * ieee.c: Likewise.
721 * ihex.c: Likewise.
722 * irix-core.c: Likewise.
723 * libaout.h: Likewise.
724 * libecoff.h: Likewise.
725 * mach-o-target.c: Likewise.
726 * mach-o.c: Likewise.
727 * mipsbsd.c: Likewise.
728 * mmo.c: Likewise.
729 * netbsd-core.c: Likewise.
730 * nlm-target.h: Likewise.
731 * oasys.c: Likewise.
732 * osf-core.c: Likewise.
733 * pdp11.c: Likewise.
734 * pe-mips.c: Likewise.
735 * pe-x86_64.c: Likewise.
736 * pef.c: Likewise.
737 * plugin.c: Likewise.
738 * ppcboot.c: Likewise.
739 * ptrace-core.c: Likewise.
740 * sco5-core.c: Likewise.
741 * som.c: Likewise.
742 * sparclynx.c: Likewise.
743 * srec.c: Likewise.
744 * tekhex.c: Likewise.
745 * trad-core.c: Likewise.
746 * verilog.c: Likewise.
747 * versados.c: Likewise.
748 * vms-alpha.c: Likewise.
749 * vms-lib.c: Likewise.
750 * wasm-module.c: Likewise.
751 * xsym.c: Likewise.
752 * libbfd.h: Regenerate.
753
2a0d9853
JW
7542018-02-15 Jim Wilson <jimw@sifive.com>
755
09ca4b9d
JW
756 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
757 symbols whose section address is zero.
758
2a0d9853
JW
759 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
760 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
761 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
762 Add %X%P to error messages.
763
e513bd38
EB
7642018-02-15 Eric Botcazou <ebotcazou@adacore.com>
765
766 PR ld/22832
767 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
768 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
769 and assert that the result of the call is not NULL.
770
12ef3f5a
NC
7712018-02-14 Nick Clifton <nickc@redhat.com>
772
773 PR 22823
774 Revert previous delta. Add extra casts to avoid compile time
775 warnings instead.
776 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
777 cast to avoid warning from gcc v8 compiler.
778 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
779 (_bfd_generic_bfd_set_private_flags): Likewise.
780 (_bfd_generic_bfd_copy_private_section_data): Likewise.
781 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
782 (_bfd_generic_bfd_copy_private_header_data): Likewise.
783 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
784 (_bfd_noarchive_construct_extended_name_table): Likewise.
785 (_bfd_noarchive_truncate_arname): Likewise.
786 (_bfd_noarchive_write_ar_hdr): Likewise.
787 (_bfd_noarchive_get_elt_at_index): Likewise.
788 (_bfd_nosymbols_canonicalize_symtab): Likewise.
789 (_bfd_nosymbols_print_symbol): Likewise.
790 (_bfd_nosymbols_get_symbol_info): Likewise.
791 (_bfd_nosymbols_get_symbol_version_string): Likewise.
792 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
793 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
794 (_bfd_nosymbols_get_lineno): Likewise.
795 (_bfd_nosymbols_find_nearest_line): Likewise.
796 (_bfd_nosymbols_find_line): Likewise.
797 (_bfd_nosymbols_find_inliner_info): Likewise.
798 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
799 (_bfd_nosymbols_read_minisymbols): Likewise.
800 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
801 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
802 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
803 (_bfd_nowrite_set_arch_mach): Likewise.
804 (_bfd_nowrite_set_section_contents): Likewise.
805 (_bfd_nolink_sizeof_headers): Likewise.
806 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
807 (_bfd_nolink_bfd_relax_section): Likewise.
808 (_bfd_nolink_bfd_gc_sections): Likewise.
809 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
810 (_bfd_nolink_bfd_merge_sections): Likewise.
811 (_bfd_nolink_bfd_is_group_section): Likewise.
812 (_bfd_nolink_bfd_discard_group): Likewise.
813 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
814 (_bfd_nolink_bfd_link_add_symbols): Likewise.
815 (_bfd_nolink_bfd_link_just_syms): Likewise.
816 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
817 (_bfd_nolink_bfd_final_link): Likewise.
818 (_bfd_nolink_bfd_link_split_section): Likewise.
819 (_bfd_nolink_section_already_linked): Likewise.
820 (_bfd_nolink_bfd_define_common_symbol): Likewise.
821 (_bfd_nolink_bfd_define_start_stop): Likewise.
822 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
823 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
824 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
825 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
826 * libbfd.c (bfd_false_any): Delete.
827 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
828 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
829 * libbfd.h (extern): Regenerate
830 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
831 cast to avoid warning from gcc v8 compiler.
832 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
833 * binary.c (binary_get_symbol_info): Likewise.
834 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
835 * coff-mips.c (mips_ecoff_backend_data): Likewise.
836 * coffcode.h (coff_set_alignment_hook): Likewise.
837 (symname_in_debug_hook): Likewise.
838 (bfd_coff_backend_data bigobj_swap_table): Likewise.
839 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
840 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
841 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
842 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
843 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
844 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
845 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
846 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
847 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
848 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
849 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
850 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
851 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
852 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
853 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
854 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
855 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
856 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
857 (bfd_elfNN_bfd_set_private_flags): Likewise.
858 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
859 (elf_backend_init_index_section): Likewise.
860 (elf_backend_allow_non_load_phdr): Likewise.
861 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
862 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
863 * ieee.c (ieee_construct_extended_name_table): Likewise.
864 (ieee_write_armap): Likewise.
865 (ieee_write_ar_hdr): Likewise.
866 (ieee_bfd_is_target_special_symbol): Likewise.
867 * ihex.c (ihex_canonicalize_symtab): Likewise.
868 (ihex_bfd_is_target_special_symbol): Likewise.
869 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
870 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
871 (_bfd_ecoff_set_alignment_hook): Likewise.
872 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
873 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
874 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
875 * oasys.c (oasys_construct_extended_name_table): Likewise.
876 (oasys_write_armap): Likewise.
877 (oasys_write_ar_hdr): Likewise.
878 (oasys_bfd_is_target_special_symbol): Likewise.
879 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
880 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
881 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
882 * som.c (som_bfd_is_target_special_symbol): Likewise.
883 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
884 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
885 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
886 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
887 (versados_bfd_reloc_name_lookup): Likewise.
888 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
889 (vms_bfd_define_start_stop): Likewise.
890 (alpha_vms_bfd_is_target_special_symbol): Likewise.
891 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
892 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
893
451875b4
L
8942018-02-14 H.J. Lu <hongjiu.lu@intel.com>
895
896 PR ld/22842
897 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
898 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
899 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
900 R_X86_64_PC32 reloc against dynamic function in data section.
901 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
902 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
903 against dynamic function in data section.
904 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
905 function address only if pcrel_plt is true.
906 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
907 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
908 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
909 PC-relative relocation against a function definition in data
910 secton in PIE. Remove the obsolete comments.
911 (elf_x86_link_hash_table): Add pcrel_plt.
912
1031c264
L
9132018-02-13 H.J. Lu <hongjiu.lu@intel.com>
914
915 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
916 instead of bfd_link_pic, for building shared library.
917
bd7ab16b
L
9182018-02-13 H.J. Lu <hongjiu.lu@intel.com>
919
920 PR gas/22791
921 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
922 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
923 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
924 against protected function in shared object.
925
80c96350
ST
9262018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
927
928 PR 22828
929 * po/ru.po: Fix typo in Russian translation.
930
87993319
MR
9312018-02-13 Maciej W. Rozycki <macro@mips.com>
932
933 * wasm-module.c (wasm_scan_name_function_section): Rename
934 `index' local variable to `idx'.
935
68d20676
NC
9362018-02-13 Nick Clifton <nickc@redhat.com>
937
938 PR 22823
939 Fix compile time warnings generated by gcc version 8.
940 * libbfd-in.h: Remove extraneous text from prototypes.
941 Add prototypes for bfd_false_any, bfd_true_any,
942 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
943 bfd_n1_any, bfd_void_any.
944 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
945 function.
946 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
947 (_bfd_generic_bfd_set_private_flags): Likewise.
948 (_bfd_generic_bfd_copy_private_section_data): Likewise.
949 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
950 (_bfd_generic_bfd_copy_private_header_data): Likewise.
951 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
952 (_bfd_noarchive_construct_extended_name_table): Likewise.
953 (_bfd_noarchive_truncate_arname): Likewise.
954 (_bfd_noarchive_write_ar_hdr): Likewise.
955 (_bfd_noarchive_get_elt_at_index): Likewise.
956 (_bfd_nosymbols_canonicalize_symtab): Likewise.
957 (_bfd_nosymbols_print_symbol): Likewise.
958 (_bfd_nosymbols_get_symbol_info): Likewise.
959 (_bfd_nosymbols_get_symbol_version_string): Likewise.
960 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
961 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
962 (_bfd_nosymbols_get_lineno): Likewise.
963 (_bfd_nosymbols_find_nearest_line): Likewise.
964 (_bfd_nosymbols_find_line): Likewise.
965 (_bfd_nosymbols_find_inliner_info): Likewise.
966 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
967 (_bfd_nosymbols_read_minisymbols): Likewise.
968 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
969 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
970 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
971 (_bfd_nowrite_set_arch_mach): Likewise.
972 (_bfd_nowrite_set_section_contents): Likewise.
973 (_bfd_nolink_sizeof_headers): Likewise.
974 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
975 (_bfd_nolink_bfd_relax_section): Likewise.
976 (_bfd_nolink_bfd_gc_sections): Likewise.
977 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
978 (_bfd_nolink_bfd_merge_sections): Likewise.
979 (_bfd_nolink_bfd_is_group_section): Likewise.
980 (_bfd_nolink_bfd_discard_group): Likewise.
981 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
982 (_bfd_nolink_bfd_link_add_symbols): Likewise.
983 (_bfd_nolink_bfd_link_just_syms): Likewise.
984 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
985 (_bfd_nolink_bfd_final_link): Likewise.
986 (_bfd_nolink_bfd_link_split_section): Likewise.
987 (_bfd_nolink_section_already_linked): Likewise.
988 (_bfd_nolink_bfd_define_common_symbol): Likewise.
989 (_bfd_nolink_bfd_define_start_stop): Likewise.
990 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
991 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
992 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
993 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
994 * libbfd.c (bfd_false_any): New function. Like bfd_false but
995 accepts one or more arguments.
996 (bfd_true_any): Likewise.
997 (bfd_nullvoidptr_any): Likewise.
998 (bfd_0_any): Likewise.
999 (bfd_0u_any): Likewise.
1000 (bfd_0l_any): Likewise.
1001 (_bfd_n1_any): Likewise.
1002 (bfd_void_any): Likewise.
1003 * libbfd.h (extern): Regenerate
1004 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
1005 based dummy function.
1006 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
1007 * binary.c (binary_get_symbol_info): Likewise.
1008 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
1009 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1010 * coffcode.h (coff_set_alignment_hook): Likewise.
1011 (symname_in_debug_hook): Likewise.
1012 (bfd_coff_backend_data bigobj_swap_table): Likewise.
1013 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
1014 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
1015 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
1016 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
1017 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
1018 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
1019 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
1020 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
1021 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
1022 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
1023 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
1024 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
1025 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
1026 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
1027 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
1028 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
1029 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
1030 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
1031 (bfd_elfNN_bfd_set_private_flags): Likewise.
1032 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
1033 (elf_backend_init_index_section): Likewise.
1034 (elf_backend_allow_non_load_phdr): Likewise.
1035 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
1036 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
1037 * ieee.c (ieee_construct_extended_name_table): Likewise.
1038 (ieee_write_armap): Likewise.
1039 (ieee_write_ar_hdr): Likewise.
1040 (ieee_bfd_is_target_special_symbol): Likewise.
1041 * ihex.c (ihex_canonicalize_symtab): Likewise.
1042 (ihex_bfd_is_target_special_symbol): Likewise.
1043 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
1044 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
1045 (_bfd_ecoff_set_alignment_hook): Likewise.
1046 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
1047 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
1048 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
1049 * oasys.c (oasys_construct_extended_name_table): Likewise.
1050 (oasys_write_armap): Likewise.
1051 (oasys_write_ar_hdr): Likewise.
1052 (oasys_bfd_is_target_special_symbol): Likewise.
1053 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
1054 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
1055 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
1056 * som.c (som_bfd_is_target_special_symbol): Likewise.
1057 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
1058 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
1059 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
1060 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
1061 (versados_bfd_reloc_name_lookup): Likewise.
1062 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
1063 (vms_bfd_define_start_stop): Likewise.
1064 (alpha_vms_bfd_is_target_special_symbol): Likewise.
1065 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
1066 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
1067 * elf32-arc.c (get_replace_function): Assign replacement function
1068 to func pointer.
1069 * elf32-i370.c (i370_noop): Update prototype.
1070
6e5e9d58
AM
10712018-02-13 Alan Modra <amodra@gmail.com>
1072
1073 PR 22836
1074 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
1075 relocation sections. If size reduces to just the flag word,
1076 remove that too and mark with SEC_EXCLUDE.
1077 * elflink.c (bfd_elf_final_link): Strip empty group sections.
1078
f2731e0c
AM
10792018-02-13 Alan Modra <amodra@gmail.com>
1080
1081 PR 22829
1082 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
1083 PT_GNU_RELRO setup.
1084
830db048
ZF
10852018-02-12 Zebediah Figura <z.figura12@gmail.com>
1086
1087 * i386msdos.c (msdos_mkobject); New function.
1088 (msdos_object_p): New function.
1089 (i386_msdos_vec): Use msdos_object_p as the check_format
1090 function.
1091 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
1092 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
1093 IMAGE_NT_SIGNATURE.
1094 * peXXigen.c: Likewise.
1095 * coff-ia64.c: Likewise.
1096
94fe5757
NC
10972018-02-12 Nick Clifton <nickc@redhat.com>
1098
1099 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
1100 assignment.
0b8683b7 1101 * elf32-arc.c (elf_arc_relocate_section): Likewise.
94fe5757 1102
d805612e 11032018-02-09 Eric Botcazou <ebotcazou@adacore.com>
a8735c82
EB
1104
1105 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
1106 (sparc_elf_append_rela): Assert that there is enough room in section.
1107 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
1108 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
1109 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
1110 For a symbol subject to a GOT relocation, reserve a slot in the
1111 relocation section if the symbol isn't dynamic and we are in PIC mode.
1112 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
1113 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
1114 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
1115 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
1116 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
1117 resolved_to_zero. Do not generate a dynamic GOT relocation for an
1118 undefined weak symbol with non-default visibility. Remove superfluous
1119 'else' and fix formatting.
1120
3b4c3844
L
11212018-02-09 H.J. Lu <hongjiu.lu@intel.com>
1122
1123 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
1124 is_solaris.
1125 (i386_elf32_sol2_vec): Don't declare.
1126 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
1127 Don't set need_global_offset_table.
1128 (elf_i386_solaris_arch_bed): New.
1129 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
1130 Solaris.
1131 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
1132 target_os != is_nacl instead of target_os == is_normal.
1133 (x86_64_elf64_sol2_vec): Don't declare.
1134 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
1135 is_nacl instead of target_os == is_normal. Don't set
1136 need_global_offset_table.
1137 (elf_x86_64_solaris_arch_bed): New.
1138 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
1139 Solaris.
1140 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
1141 _GLOBAL_OFFSET_TABLE_ for Solaris.
1142 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
1143 need_global_offset_table.
1144 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
1145 (elf_x86_link_hash_table): Remove need_global_offset_table.
1146 (elf_x86_init_table): Likewise.
1147
15b23f36
L
11482018-02-08 H.J. Lu <hongjiu.lu@intel.com>
1149
1150 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
1151 Remove prototype.
1152 (i386_elf32_sol2_vec): Declared.
1153 (elf_i386_link_setup_gnu_properties): Set
1154 need_global_offset_table with info->output_bfd->xvec.
1155 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
1156 Remove prototype.
1157 (x86_64_elf64_sol2_vec): Declared.
1158 (elf_x86_64_link_setup_gnu_properties): Set
1159 need_global_offset_table with info->output_bfd->xvec.
1160
dc11dea2
L
11612018-02-08 H.J. Lu <hongjiu.lu@intel.com>
1162
1163 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
1164 New prototype.
1165 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
1166 for Solaris.
1167 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
1168 New prototype.
1169 (elf_x86_64_link_setup_gnu_properties): Set
1170 need_global_offset_table for Solaris.
1171 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
1172 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
1173 (_bfd_x86_elf_link_setup_gnu_properties): Copy
1174 need_global_offset_table.
1175 * elfxx-x86.h (elf_x86_link_hash_table): Add
1176 need_global_offset_table.
1177 (elf_x86_init_table): Likewise.
1178
3f48fe4a
JW
11792018-02-08 Jim Wilson <jimw@sifive.com>
1180
1181 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
1182 change.
1183
ef135d43
NC
11842018-02-08 Nick Clifton <nickc@redhat.com>
1185
1186 PR 22788
1187 * elf.c (elf_parse_notes): Reject notes with excessuively large
1188 alignments.
1189
407aa07c
AM
11902018-02-07 Alan Modra <amodra@gmail.com>
1191
1192 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
1193 * elf32-ppc.c: Remove speculation barrier support.
1194 * elf32-ppc.h: Likewise.
1195 * elf64-ppc.c: Likewise.
1196 * elf64-ppc.h: Likewise.
1197
ed01220c
JW
11982018-02-06 Jim Wilson <jimw@sifive.com>
1199
1200 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
1201 callback to report an error.
1202
c20c30f6
EB
12032018-02-06 Eric Botcazou <ebotcazou@adacore.com>
1204
1205 PR ld/22263
1206 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
1207 into call to !bfd_link_executable and tidy up.
1208 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
1209 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
1210 !bfd_link_executable.
1211 <R_SPARC_TLS_IE_HI22>: Likewise.
1212 <GOT relocations>: Remove useless code, tidy and merge related blocks.
1213 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
1214 !bfd_link_executable.
1215 <R_SPARC_WPLT30>: Tidy up.
1216 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
1217 !bfd_link_executable.
1218 (allocate_dynrelocs): Likewise.
1219 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
1220 <R_SPARC_TLS_GD_HI22>: Merge into...
1221 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
1222 sparc_elf_tls_transition and remove redundant code.
1223 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
1224 !bfd_link_executable.
1225 <R_SPARC_TLS_LDO_HIX22>: Likewise.
1226 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
1227 <R_SPARC_TLS_LDM_CALL>: Likewise.
1228 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
1229 <R_SPARC_TLS_GD_ADD>: Likewise.
1230 <R_SPARC_TLS_LDM_ADD>: Likewise.
1231 <R_SPARC_TLS_LDO_ADD>: Likewise.
1232 <R_SPARC_TLS_IE_LD>: Likewise.
1233
46d09186
NC
12342018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
1235
1236 PR 22789
1237 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
1238 functions failed to find the function name, try the generic elf
1239 find function instead.
1240
8278e7ce
SDJ
12412018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
1242
1243 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
1244 'memcpy' instead of 'strncpy' when writing the magic number.
1245
64e234d4
NC
12462018-02-06 Nick Clifton <nickc@redhat.com>
1247
1248 PR 22794
1249 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
1250 section before attempting to read it in.
1251 (bfd_get_alt_debug_link_info): Likewise.
1252
422f3d3d
PC
12532018-02-06 Paul Carroll <pcarroll@codesourcery.com>
1254
1255 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
1256 line information in addition to name, if they can be found.
1257
279b2f94
RL
12582018-02-05 Renlin Li <renlin.li@arm.com>
1259
1260 PR ld/22764
1261 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
1262 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
1263 check for writeable section as well.
1264
cd048363
L
12652018-02-05 H.J. Lu <hongjiu.lu@intel.com>
1266
1267 PR ld/22782
1268 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
1269 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
1270 undefined weak symbol to 0.
1271 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
1272 if _GLOBAL_OFFSET_TABLE_ is referenced.
1273 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
1274 got_referenced instead of ref_regular_nonweak. Remove the
1275 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
1276 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
1277
e65b1a78
MR
12782018-02-05 Maciej W. Rozycki <macro@mips.com>
1279
1280 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
1281 initialize `hi_reloc'.
1282
2d6dda71
MR
12832018-02-05 Maciej W. Rozycki <macro@mips.com>
1284
1285 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
1286 SHT_MIPS_REGINFO sections don't assert the correct size and
1287 report an error instead.
1288
75506100
MR
12892018-02-05 Maciej W. Rozycki <macro@mips.com>
1290
1291 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
1292 status from `->elf_backend_section_processing'.
1293
7f02625e
JW
12942018-02-02 Jim Wilson <jimw@sifive.com>
1295
1296 PR ld/22756
1297 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
1298 If link_info->wrap_hash, check for a duplicate symbol and ignore.
1299 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
1300 Pass new argument to riscv_relax_delete_bytes.
1301 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
1302 ATTRIBUTE_UNUSED from link_info parameter.
1303
d830549d
AM
13042018-02-02 Alan Modra <amodra@gmail.com>
1305
1306 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
1307 emitted for toc sequence optimization. Set and use "howto" later.
1308
e99955cd
SM
13092018-02-01 Simon Marchi <simon.marchi@ericsson.com>
1310
1311 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
1312 arithmetic on NULL pointer.
1313 * elflink.c (_bfd_elf_archive_symbol_lookup,
1314 elf_link_add_archive_symbols): Likewise.
1315
bf3077a6
MM
13162018-01-31 Michael Matz <matz@suse.de>
1317
1318 * elflink.c (bfd_elf_define_start_stop): Fix check of
1319 def_dynamic.
1320
823143c6
L
13212018-01-31 H.J. Lu <hongjiu.lu@intel.com>
1322
1323 PR ld/21964
1324 * elflink.c (bfd_elf_define_start_stop): Check if __start and
1325 __stop symbols are referenced by shared objects.
1326
76cb3a89
AM
13272018-01-30 Alan Modra <amodra@gmail.com>
1328
1329 PR 22758
1330 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
1331 segment when demand paged with lma on the same page. Test this
1332 before load/non-load, executable/non-executable,
1333 writable/non-writable tests and simplify. Delete bogus relro
1334 condition in writable/non-writable test. Delete outdated
1335 comment. Formatting.
1336
36b8fda5
AM
13372018-01-30 Alan Modra <amodra@gmail.com>
1338
1339 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
1340 symbols dynamic.
1341
eb77f6a4
AM
13422018-01-29 Alan Modra <amodra@gmail.com>
1343
1344 PR 22741
1345 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
1346 range before converting to a symbol table pointer.
1347
7d73b4c8
NC
13482018-01-27 Nick Clifton <nickc@redhat.com>
1349
1350 * po/ru.po: Updated Russian translation.
1351
32253bb7
AM
13522018-01-26 Alan Modra <amodra@gmail.com>
1353
1354 * elflink.c (bfd_elf_define_start_stop): Override symbols when
1355 they are defined dynamically.
1356
ba21f564
AM
13572018-01-26 Alan Modra <amodra@gmail.com>
1358
1359 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
1360 .branch_lt changes size.
1361
38e64b0e
AM
13622018-01-25 Alan Modra <amodra@gmail.com>
1363
1364 PR 22746
1365 * elfcode.h (elf_object_p): Avoid integer overflow.
1366
bb363086
EB
13672018-01-25 Eric Botcazou <ebotcazou@adacore.com>
1368
1369 PR ld/22727
1370 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
1371 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
1372
1373 Revert
1374 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
1375
1376 PR ld/22263
1377 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
1378 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
1379 bfd_link_executable for TLS check.
1380 (_bfd_sparc_elf_check_relocs): Likewise.
1381 (allocate_dynrelocs): Likewise.
1382 (_bfd_sparc_elf_relocate_section): Likewise.
1383
1daf502a
RL
13842018-01-24 Renlin Li <renlin.li@arm.com>
1385
1386 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
1387 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
1388 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
1389 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
1390 BFD_RELOC_AARCH64_MOVW_PREL_G3.
1391 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1392 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1393
32247401
RL
13942018-01-24 Renlin Li <renlin.li@arm.com>
1395
1396 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
1397 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
1398 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
1399 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
1400 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
1401 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
1402 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
1403 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
1404 BFD_RELOC_AARCH64_MOVW_PREL_G3.
1405 * bfd-in2.h: Regenerate.
1406 * libbfd.h: Regenerate.
1407
1c5e4ee9
MR
14082018-01-23 Maciej W. Rozycki <macro@mips.com>
1409
1410 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
1411 `mips_elf32_section_processing' comment reference.
1412
8a1b824a
L
14132018-01-20 H.J. Lu <hongjiu.lu@intel.com>
1414
1415 PR ld/22721
1416 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
1417 versioned __tls_get_addr symbol.
1418
ee3fbc1e
NC
14192018-01-19 Nick Clifton <nickc@redhat.com>
1420
1421 * po/fr.po: Updated French translation.
1422
691d2e9a
AM
14232018-01-18 Alan Modra <amodra@gmail.com>
1424
1425 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
1426 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
1427 (ppc64_elf_build_stubs): Likewise.
1428
4bfce128
NC
14292018-01-17 Nick Clifton <nickc@redhat.com>
1430
1431 * po/ru.po: Updated Russian translation.
1432 * po/uk/po: Updated Ukranian translation.
1433
c75bc4f7
AM
14342018-01-17 Alan Modra <amodra@gmail.com>
1435
1436 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
1437
1be5d8d3
AM
14382018-01-17 Alan Modra <amodra@gmail.com>
1439
1440 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
1441 (CRSETEQ, BEQCTRM): Define.
1442 (is_nonpic_glink_stub): Don't check bctr.
1443 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
1444 (ppc_elf_relax_section): Size speculation barrier.
1445 (output_bctr): New function.
1446 (write_glink_stub): Use output_bctr.
1447 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
1448 (ppc_elf_finish_dynamic_symbol): Likewise.
1449 (ppc_elf_finish_dynamic_sections): Use output_bctr.
1450 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
1451 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
1452 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
1453 (size_global_entry_stubs): Handle speculation barrier sizing.
1454 (plt_stub_size): Likewise.
1455 (output_bctr): New function.
1456 (build_plt_stub, build_tls_get_addr_stub): Output speculation
1457 barrier.
1458 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
1459 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
1460 (build_global_entry_stubs): Output speculation barrier.
1461 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
1462 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
1463
9e390558
AM
14642018-01-17 Alan Modra <amodra@gmail.com>
1465
1466 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
1467 __tls_get_addr_opt, and alignment sizing.
1468 (TLS_GET_ADDR_GLINK_SIZE): Delete.
1469 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
1470 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
1471 or 8 insns.
1472 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
1473 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
1474 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
1475 by PLT reloc count.
1476 (write_glink_stub): Handle __tls_get_addr_opt stub.
1477 Pad out to size given by GLINK_ENTRY_SIZE.
1478 (ppc_elf_relocate_section): Adjust write_glink_stub call.
1479 (ppc_elf_finish_dynamic_symbol): Likewise.
1480 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
1481 insn array since so many need rewriting.
1482 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
1483 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
1484 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
1485 nops. Adjust all uses.
1486 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
1487 in glink_vma calculation.
1488 (struct ppc_link_hash_table): Add global_entry section pointer.
1489 (create_linkage_sections): Create separate section for global
1490 entry stubs.
1491 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
1492 (size_global_entry_stubs): Handle sizing for aligned stubs.
1493 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
1494 and don't stash end of glink branch table in rawsize.
1495 (ppc_build_one_stub): Rewrite stub size calculations.
1496 (build_global_entry_stubs): Use new section.
1497 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
1498 Build lazy link stubs out to end of section. Build global entry
1499 stubs in new section.
1500
616dcb87
NC
15012018-01-15 Nick Clifton <nickc@redhat.com>
1502
1503 * po/uk.po: Updated Ukranian translation.
1504
3957a496
NC
15052018-01-13 Nick Clifton <nickc@redhat.com>
1506
1507 * po/bfd.pot: Regenerated.
1508
769c7ea5
NC
15092018-01-13 Nick Clifton <nickc@redhat.com>
1510
1511 * version.m4: Bump version to 2.30.51
1512 * configure: Regenerate.
1513
faf766e3
NC
15142018-01-13 Nick Clifton <nickc@redhat.com>
1515
1516 2.30 branch created.
1517
564e11c9
JW
15182018-01-12 Jens Widell <jl@opera.com>
1519
1520 * elf.c (setup_group): Optimize search for group by remembering
1521 last found group and restarting search at that index.
1522 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
1523
a78eea16
AM
15242018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
1525
1526 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
1527 bfd_link_common_skip_none in switch.
1528
87e79a65
AM
15292018-01-12 Alan Modra <amodra@gmail.com>
1530
1531 PR ld/22649
1532 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
1533 references on forced local symbols.
1534
58807c48
VI
15352018-01-12 Vlad Ivanov <vlad@ivanov.email>
1536
1537 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
1538 .reginfo section has wrong size.
1539
2888249f
L
15402018-01-11 H.J. Lu <hongjiu.lu@intel.com>
1541
1542 PR ld/22393
1543 * elf.c (_bfd_elf_map_sections_to_segments): When generating
1544 separate code and read-only data LOAD segments, create a new
1545 LOAD segment if the previous section contains text and the
1546 current section doesn't or vice versa. Don't put a writable
1547 section in a read-only segment if there is a RELRO segment.
1548
d664fd41
L
15492018-01-11 H.J. Lu <hongjiu.lu@intel.com>
1550
1551 PR ld/22649
1552 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
1553 references on forced local symbols.
1554
8b6f4cd3
L
15552018-01-11 H.J. Lu <hongjiu.lu@intel.com>
1556
1557 PR ld/22677
1558 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
1559 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
1560
9c70c522 15612018-01-09 Kuan-Lin Chen <kuanlinchentw@gmail.com>
6cef73f9
KLC
1562
1563 PR 22662
1564 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
1565
ddb2bbcf
JB
15662018-01-03 John Baldwin <jhb@FreeBSD.org>
1567
1568 * elf.c (elfcore_grok_freebsd_note): Handle
1569 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
1570 NT_FREEBSD_PROCSTAT_VMMAP.
1571
219d1afa
AM
15722018-01-03 Alan Modra <amodra@gmail.com>
1573
1574 Update year range in copyright notice of all files.
1575
1e563868 1576For older changes see ChangeLog-2017
3499769a 1577\f
1e563868 1578Copyright (C) 2018 Free Software Foundation, Inc.
3499769a
AM
1579
1580Copying and distribution of this file, with or without modification,
1581are permitted in any medium without royalty provided the copyright
1582notice and this notice are preserved.
1583
1584Local Variables:
1585mode: change-log
1586left-margin: 8
1587fill-column: 74
1588version-control: never
1589End:
This page took 0.210644 seconds and 4 git commands to generate.