[ARC] Generate DT_RELACOUNT.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2016-06-13 Cupertino Miranda <cmiranda@synospsy.com>
2
3 * elf32-arc.c (elf32_arc_reloc_type_class): Defined function to
4 enable support for "-z combreloc" and DT_RELACOUNT.
5 (elf_backend_reloc_type_class): Likewise
6
7 2016-06-11 H.J. Lu <hongjiu.lu@intel.com>
8
9 PR ld/20244
10 * elf32-i386.c (elf_i386_relocate_section): When relocating
11 R_386_GOT32, return error without a base register for PIC and
12 subtract the .got.plt section address only with a base register.
13
14 2016-06-10 Alan Modra <amodra@gmail.com>
15
16 * elf-strtab.c (struct strtab_save): Use size_t for "size".
17 (struct elf_strtab_hash): Likewise for "size" and "alloced".
18 (_bfd_elf_strtab_init): Formatting.
19 (_bfd_elf_strtab_add): Return size_t rather than bfd_size_type.
20 (_bfd_elf_strtab_addref): Take size_t idx param.
21 (_bfd_elf_strtab_delref, _bfd_elf_strtab_refcount): Likewise.
22 (_bfd_elf_strtab_offset): Likewise.
23 (_bfd_elf_strtab_clear_all_refs): Use size_t idx.
24 (_bfd_elf_strtab_save): Use size_t "idx" and "size" vars.
25 (_bfd_elf_strtab_restore, _bfd_elf_strtab_emit): Similarly.
26 (_bfd_elf_strtab_finalize): Similarly.
27 * elf-bfd.h (_bfd_elf_strtab_add): Update prototypes.
28 (_bfd_elf_strtab_addref, _bfd_elf_strtab_delref): Likewise.
29 (_bfd_elf_strtab_refcount, _bfd_elf_strtab_offset): Likewise.
30 * elf.c (bfd_elf_get_elf_syms): Calculate symbol buffer size
31 using bfd_size_type.
32 (bfd_section_from_shdr): Delete amt.
33 (_bfd_elf_init_reloc_shdr): Likewise.
34 (_bfd_elf_link_assign_sym_version): Likewise.
35 (assign_section_numbers): Use size_t reloc_count.
36 * elflink.c (struct elf_symbuf_head): Use size_t "count".
37 (bfd_elf_link_record_dynamic_symbol): Use size_t for some vars.
38 (elf_link_is_defined_archive_symbol): Likewise.
39 (elf_add_dt_needed_tag): Likewise.
40 (elf_finalize_dynstr): Likewise.
41 (elf_link_add_object_symbols): Likewise.
42 (bfd_elf_size_dynamic_sections): Likewise.
43 (elf_create_symbuf): Similarly.
44 (bfd_elf_match_symbols_in_sections): Likewise.
45 (elf_link_swap_symbols_out): Likewise.
46 (elf_link_check_versioned_symbol): Likewise.
47 (bfd_elf_gc_record_vtinherit): Likewise.
48 (bfd_elf_gc_common_finalize_got_offsets): Likewise.
49
50 2016-06-08 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
51
52 PR ld/20221
53 * elf32-avr.c (elf32_avr_relax_delete_bytes): Adjust syms
54 and relocs only if shrinking occurred.
55
56 2016-06-08 H.J. Lu <hongjiu.lu@intel.com>
57
58 * elf64-i386.c (elf_i386_link_hash_entry): Add tls_get_addr.
59 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 2.
60 (elf_i386_check_tls_transition): Check indirect call and direct
61 call with the addr32 prefix for general and local dynamic models.
62 Set the tls_get_addr feild.
63 (elf_i386_convert_load_reloc): Always use addr32 prefix for
64 indirect ___tls_get_addr call via GOT.
65 (elf_i386_relocate_section): Handle GD->LE, GD->IE and LD->LE
66 transitions with indirect call and direct call with the addr32
67 prefix.
68
69 2016-06-07 Marcin Koƛcielnicki <koriakin@0x04.net>
70
71 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Fix comment.
72 * elf64-s390.c (elf_s390x_plt_entry): Fix comment.
73 (elf_s390_relocate_section): Fix comment.
74 (elf_s390_finish_dynamic_sections): Fix initialization of fixed
75 .got.plt entries.
76
77 2016-06-07 Ulrich Weigand <ulrich.weigand@de.ibm.com>
78
79 * elf64-s390.c (elf_s390_finish_dynamic_sections): Subtract plt
80 section offset when calculation the larl operand in the first PLT
81 entry.
82
83 2016-06-07 Alan Modra <amodra@gmail.com>
84
85 * cpu-powerpc.c (powerpc_compatible): Allow bfd_mach_ppc_vle entry
86 to match other 32-bit archs.
87 * elf32-ppc.c (_bfd_elf_ppc_set_arch): New function.
88 (ppc_elf_object_p): Call it.
89 (ppc_elf_special_sections): Use APUINFO_SECTION_NAME. Fix
90 overlong line.
91 (APUINFO_SECTION_NAME, APUINFO_LABEL): Don't define here.
92 * elf64-ppc.c (ppc64_elf_object_p): Call _bfd_elf_ppc_set_arch.
93 * bfd-in.h (_bfd_elf_ppc_at_tls_transform,
94 _bfd_elf_ppc_at_tprel_transform): Move to..
95 * elf-bfd.h: ..here.
96 (_bfd_elf_ppc_set_arch): Declare.
97 * bfd-in2.h: Regenerate.
98
99 2016-06-06 H.J. Lu <hongjiu.lu@intel.com>
100
101 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add tls_get_addr.
102 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 2.
103 (elf_x86_64_check_tls_transition): Check indirect call and
104 direct call with the addr32 prefix for general and local dynamic
105 models. Set the tls_get_addr feild.
106 (elf_x86_64_convert_load_reloc): Always use addr32 prefix for
107 indirect __tls_get_addr call via GOT.
108 (elf_x86_64_relocate_section): Handle GD->LE, GD->IE and LD->LE
109 transitions with indirect call and direct call with the addr32
110 prefix.
111
112 2016-06-04 Christian Groessler <chris@groessler.org>
113
114 * coff-z8k.c (extra_case): Fix range check for R_JR relocation.
115
116 2016-06-02 Nick Clifton <nickc@redhat.com>
117
118 PR target/20088
119 * cpu-arm.c (processors): Add "arm_any" type to match any ARM
120 architecture.
121 (arch_info_struct): Likewise.
122 (architectures): Likewise.
123
124 2016-06-02 Vineet Gupta <Vineet.Gupta1@synopsys.com>
125
126 * config.bfd: Replace -uclibc with *.
127
128 2016-06-02 H.J. Lu <hongjiu.lu@intel.com>
129
130 * elf64-x86-64.c: Replace data32 with data16 in comments.
131
132 2016-05-31 Alan Modra <amodra@gmail.com>
133
134 PR ld/20159
135 PR ld/16467
136 * elflink.c (_bfd_elf_merge_symbol): Revert PR16467 change.
137 (_bfd_elf_add_default_symbol): Don't indirect to/from defined
138 symbol given a version by a script different to the version
139 of the symbol being added.
140 (elf_link_add_object_symbols): Use _bfd_elf_strtab_save and
141 _bfd_elf_strtab_restore. Don't fudge dynstr references.
142 * elf-strtab.c (_bfd_elf_strtab_restore_size): Delete.
143 (struct strtab_save): New.
144 (_bfd_elf_strtab_save, _bfd_elf_strtab_restore): New functions.
145 * elf-bfd.h (_bfd_elf_strtab_restore_size): Delete.
146 (_bfd_elf_strtab_save, _bfd_elf_strtab_restore): Declare.
147
148 2016-06-01 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
149
150 * elf32-hppa.h: Add extern "C".
151 * elf32-nds32.h: Likewise.
152 * elf32-tic6x.h: Likewise.
153
154 2016-06-01 Nick Clifton <nickc@redhat.com>
155
156 * po/sr.po: New Serbian translation.
157 * configure.ac (ALL_LINGUAS): Add sr.
158 * configure: Regenerate.
159
160 2016-05-28 Maciej W. Rozycki <macro@imgtec.com>
161
162 * elfxx-mips.c (b_reloc_p): New function.
163 (_bfd_mips_elf_relocate_section) <bfd_reloc_outofrange>: Handle
164 branch relocations.
165
166 2016-05-28 Maciej W. Rozycki <macro@imgtec.com>
167
168 * elfxx-mips.c (mips_elf_calculate_relocation): <R_MIPS16_26>
169 <R_MIPS_26, R_MICROMIPS_26_S1>: Drop the region bits of the
170 reloc location from calculation, treat the addend as signed with
171 local non-section symbols and enable overflow detection.
172
173 2016-05-28 Alan Modra <amodra@gmail.com>
174
175 * aoutx.h: Adjust linker callback calls throughout file,
176 removing dead code.
177 * bout.c: Likewise.
178 * coff-alpha.c: Likewise.
179 * coff-arm.c: Likewise.
180 * coff-h8300.c: Likewise.
181 * coff-h8500.c: Likewise.
182 * coff-i960.c: Likewise.
183 * coff-mcore.c: Likewise.
184 * coff-mips.c: Likewise.
185 * coff-ppc.c: Likewise.
186 * coff-rs6000.c: Likewise.
187 * coff-sh.c: Likewise.
188 * coff-tic80.c: Likewise.
189 * coff-w65.c: Likewise.
190 * coff-z80.c: Likewise.
191 * coff-z8k.c: Likewise.
192 * coff64-rs6000.c: Likewise.
193 * cofflink.c: Likewise.
194 * ecoff.c: Likewise.
195 * elf-bfd.h: Likewise.
196 * elf-m10200.c: Likewise.
197 * elf-m10300.c: Likewise.
198 * elf32-arc.c: Likewise.
199 * elf32-arm.c: Likewise.
200 * elf32-avr.c: Likewise.
201 * elf32-bfin.c: Likewise.
202 * elf32-cr16.c: Likewise.
203 * elf32-cr16c.c: Likewise.
204 * elf32-cris.c: Likewise.
205 * elf32-crx.c: Likewise.
206 * elf32-d10v.c: Likewise.
207 * elf32-epiphany.c: Likewise.
208 * elf32-fr30.c: Likewise.
209 * elf32-frv.c: Likewise.
210 * elf32-ft32.c: Likewise.
211 * elf32-h8300.c: Likewise.
212 * elf32-hppa.c: Likewise.
213 * elf32-i370.c: Likewise.
214 * elf32-i386.c: Likewise.
215 * elf32-i860.c: Likewise.
216 * elf32-ip2k.c: Likewise.
217 * elf32-iq2000.c: Likewise.
218 * elf32-lm32.c: Likewise.
219 * elf32-m32c.c: Likewise.
220 * elf32-m32r.c: Likewise.
221 * elf32-m68hc1x.c: Likewise.
222 * elf32-m68k.c: Likewise.
223 * elf32-mep.c: Likewise.
224 * elf32-metag.c: Likewise.
225 * elf32-microblaze.c: Likewise.
226 * elf32-moxie.c: Likewise.
227 * elf32-msp430.c: Likewise.
228 * elf32-mt.c: Likewise.
229 * elf32-nds32.c: Likewise.
230 * elf32-nios2.c: Likewise.
231 * elf32-or1k.c: Likewise.
232 * elf32-ppc.c: Likewise.
233 * elf32-s390.c: Likewise.
234 * elf32-score.c: Likewise.
235 * elf32-score7.c: Likewise.
236 * elf32-sh.c: Likewise.
237 * elf32-sh64.c: Likewise.
238 * elf32-spu.c: Likewise.
239 * elf32-tic6x.c: Likewise.
240 * elf32-tilepro.c: Likewise.
241 * elf32-v850.c: Likewise.
242 * elf32-vax.c: Likewise.
243 * elf32-visium.c: Likewise.
244 * elf32-xstormy16.c: Likewise.
245 * elf32-xtensa.c: Likewise.
246 * elf64-alpha.c: Likewise.
247 * elf64-hppa.c: Likewise.
248 * elf64-ia64-vms.c: Likewise.
249 * elf64-mmix.c: Likewise.
250 * elf64-ppc.c: Likewise.
251 * elf64-s390.c: Likewise.
252 * elf64-sh64.c: Likewise.
253 * elf64-x86-64.c: Likewise.
254 * elflink.c: Likewise.
255 * elfnn-aarch64.c: Likewise.
256 * elfnn-ia64.c: Likewise.
257 * elfxx-mips.c: Likewise.
258 * elfxx-sparc.c: Likewise.
259 * elfxx-tilegx.c: Likewise.
260 * linker.c: Likewise.
261 * pdp11.c: Likewise.
262 * pe-mips.c: Likewise.
263 * reloc.c: Likewise.
264 * reloc16.c: Likewise.
265 * simple.c: Likewise.
266 * vms-alpha.c: Likewise.
267 * xcofflink.c: Likewise.
268 * elf32-rl78.c (get_symbol_value, get_romstart, get_ramstart): Delete
269 status param. Adjust calls to these and linker callbacks throughout.
270 * elf32-rx.c: (get_symbol_value, get_gp, get_romstart,
271 get_ramstart): Delete status param. Adjust calls to these and
272 linker callbacks throughout.
273
274 2016-05-27 Maciej W. Rozycki <macro@imgtec.com>
275
276 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS16_26>
277 <R_MIPS_26, R_MICROMIPS_26_S1>: Include the addend in JALX's
278 target alignment verification.
279
280 2016-05-27 Maciej W. Rozycki <macro@imgtec.com>
281
282 * elfxx-mips.c (mips_elf_calculate_relocation): Also use the
283 section name if `bfd_elf_string_from_elf_section' returns an
284 empty string.
285
286 2016-05-26 Maciej W. Rozycki <macro@imgtec.com>
287
288 * elfxx-mips.c (_bfd_mips_elf_relocate_section)
289 <bfd_reloc_outofrange>: Use the `%X%H' rather than `%C' format
290 for message. Continue processing rather than returning failure.
291
292 2016-05-25 Maciej W. Rozycki <macro@imgtec.com>
293
294 * elfxx-mips.c (_bfd_mips_elf_relocate_section)
295 <bfd_reloc_outofrange>: Call `->einfo' rather than `->warning'.
296 Call `bfd_set_error'.
297
298 2016-05-25 H.J. Lu <hongjiu.lu@intel.com>
299
300 PR binutils/14625
301 * archive.c (bfd_slurp_armap): Replace
302 bfd_elf64_archive_slurp_armap with
303 _bfd_archive_64_bit_slurp_armap.
304 (bsd_write_armap): Call _bfd_archive_64_bit_write_armap if
305 BFD64 is defined and the archive is too big.
306 (coff_write_armap): Likewise.
307 * archive64.c (bfd_elf64_archive_slurp_armap): Renamed to ...
308 (_bfd_archive_64_bit_slurp_armap): This.
309 (bfd_elf64_archive_write_armap): Renamed to ...
310 (_bfd_archive_64_bit_write_armap): This.
311 * configure.ac: Add --enable-64-bit-archive.
312 (want_64_bit_archive): New. Set to true by default for 64-bit
313 MIPS and s390 ELF targets.
314 (USE_64_BIT_ARCHIVE): New AC_DEFINE.
315 * config.in: Regenerated.
316 * configure: Likewise.
317 * elf64-mips.c (bfd_elf64_archive_functions): Removed.
318 (bfd_elf64_archive_slurp_armap): Likewise.
319 (bfd_elf64_archive_write_armap): Likewise.
320 (bfd_elf64_archive_slurp_extended_name_table): Likewise.
321 (bfd_elf64_archive_construct_extended_name_table): Likewise.
322 (bfd_elf64_archive_truncate_arname): Likewise.
323 (bfd_elf64_archive_read_ar_hdr): Likewise.
324 (bfd_elf64_archive_write_ar_hdr): Likewise.
325 (bfd_elf64_archive_openr_next_archived_file): Likewise.
326 (bfd_elf64_archive_get_elt_at_index): Likewise.
327 (bfd_elf64_archive_generic_stat_arch_elt): Likewise.
328 (bfd_elf64_archive_update_armap_timestamp): Likewise.
329 * elf64-s390.c (bfd_elf64_archive_functions): Removed.
330 (bfd_elf64_archive_slurp_armap): Likewise.
331 (bfd_elf64_archive_write_armap): Likewise.
332 (bfd_elf64_archive_slurp_extended_name_table): Likewise.
333 (bfd_elf64_archive_construct_extended_name_table): Likewise.
334 (bfd_elf64_archive_truncate_arname): Likewise.
335 (bfd_elf64_archive_read_ar_hdr): Likewise.
336 (bfd_elf64_archive_write_ar_hdr): Likewise.
337 (bfd_elf64_archive_openr_next_archived_file): Likewise.
338 (bfd_elf64_archive_get_elt_at_index): Likewise.
339 (bfd_elf64_archive_generic_stat_arch_elt): Likewise.
340 (bfd_elf64_archive_update_armap_timestamp): Likewise.
341 * elfxx-target.h (TARGET_BIG_SYM): Use _bfd_archive_64_bit on
342 BFD_JUMP_TABLE_ARCHIVE if USE_64_BIT_ARCHIVE is defined and
343 bfd_elfNN_archive_functions isn't defined.
344 (TARGET_LITTLE_SYM): Likewise.
345 * libbfd-in.h (_bfd_archive_64_bit_slurp_armap): New prototype.
346 (_bfd_archive_64_bit_write_armap): Likewise.
347 (_bfd_archive_64_bit_slurp_extended_name_table): New macro.
348 (_bfd_archive_64_bit_construct_extended_name_table): Likewise.
349 (_bfd_archive_64_bit_truncate_arname): Likewise.
350 (_bfd_archive_64_bit_read_ar_hdr): Likewise.
351 (_bfd_archive_64_bit_write_ar_hdr): Likewise.
352 (_bfd_archive_64_bit_openr_next_archived_file): Likewise.
353 (_bfd_archive_64_bit_get_elt_at_index): Likewise.
354 (_bfd_archive_64_bit_generic_stat_arch_elt): Likewise.
355 (_bfd_archive_64_bit_update_armap_timestamp): Likewise.
356 * libbfd.h: Regenerated.
357 * plugin.c (plugin_vec): Use _bfd_archive_64_bit on
358 BFD_JUMP_TABLE_ARCHIVE if USE_64_BIT_ARCHIVE is defined.
359
360 2016-05-25 H.J. Lu <hongjiu.lu@intel.com>
361
362 PR ld/20103
363 * cofflink.c (coff_link_check_archive_element): Return TRUE if
364 linker add_archive_element callback returns FALSE.
365 * ecoff.c (ecoff_link_check_archive_element): Likewise.
366 * elf64-ia64-vms.c (elf64_vms_link_add_archive_symbols): Skip
367 archive element if linker add_archive_element callback returns
368 FALSE.
369 * elflink.c (elf_link_add_archive_symbols): Likewise.
370 * pdp11.c (aout_link_check_ar_symbols): Likewise.
371 * vms-alpha.c (alpha_vms_link_add_archive_symbols): Likewise.
372 * xcofflink.c (xcoff_link_check_dynamic_ar_symbols): Likewise.
373 (xcoff_link_check_ar_symbols): Likewise.
374
375 2016-05-24 Maciej W. Rozycki <macro@imgtec.com>
376
377 * elfxx-mips.c (_bfd_mips_elf_relocate_section)
378 <bfd_reloc_outofrange>: Unify error reporting code.
379
380 2016-05-23 Jim Wilson <jim.wilson@linaro.org>
381
382 * elfnn-aarch64.c: Unconditionally enable R_AARCH64_NULL and
383 R_AARCH64_NONE. Use HOWTO64 for R_AARCH64_NULL.
384 * relocs.c: Add BFD_RELOC_AARCH64_NULL.
385 * bfd-in2.h: Regenerate.
386 * libbfd.h: Likewise.
387
388 2016-05-23 Kuba Sejdak <jakub.sejdak@phoesys.com>
389
390 * config.bfd: Add entry for arm-phoenix.
391
392 2016-05-23 Thomas Preud'homme <thomas.preudhomme@arm.com>
393
394 * elf32-arm.c (arm_dedicated_stub_section_padding): New function.
395 (elf32_arm_size_stubs): Declare stub_type in a more outer scope and
396 account for padding for stub section requiring one.
397 (elf32_arm_build_stubs): Add comment to stress the importance of
398 zeroing veneer section content.
399
400 2016-05-23 Thomas Preud'homme <thomas.preudhomme@arm.com>
401
402 * bfd-in.h (bfd_elf32_arm_keep_private_stub_output_sections): Declare
403 bfd hook.
404 * bfd-in2.h: Regenerate.
405 * elf32-arm.c (arm_dedicated_stub_output_section_required): New
406 function.
407 (arm_dedicated_stub_output_section_required_alignment): Likewise.
408 (arm_dedicated_stub_output_section_name): Likewise.
409 (arm_dedicated_stub_input_section_ptr): Likewise.
410 (elf32_arm_create_or_find_stub_sec): Add stub type parameter and
411 function description comment. Add support for dedicated output stub
412 section to given stub types.
413 (elf32_arm_add_stub): Add a stub type parameter and pass it down to
414 elf32_arm_create_or_find_stub_sec.
415 (elf32_arm_create_stub): Pass stub type down to elf32_arm_add_stub.
416 (elf32_arm_size_stubs): Pass stub type when calling
417 elf32_arm_create_or_find_stub_sec for Cortex-A8 erratum veneers.
418 (bfd_elf32_arm_keep_private_stub_output_sections): New function.
419
420 2016-05-20 H.J. Lu <hongjiu.lu@intel.com>
421
422 * elf32-i386.c (elf_i386_check_relocs): Don't check R_386_GOT32
423 when setting need_convert_load.
424
425 2016-05-20 Maciej W. Rozycki <macro@imgtec.com>
426
427 * elfxx-mips.c (mips_elf_read_rel_addend): Adjust the addend for
428 microMIPS JALX.
429
430 2016-05-19 H.J. Lu <hongjiu.lu@intel.com>
431
432 PR ld/20117
433 * elf32-i386.c (elf_i386_convert_load_reloc): Don't check
434 R_386_GOT32X.
435 (elf_i386_convert_load): Don't convert R_386_GOT32.
436
437 2016-05-20 Alan Modra <amodra@gmail.com>
438
439 PR gas/20118
440 * elf.c (elf_fake_sections): Set sh_entsize for SHT_INIT_ARRAY,
441 SHT_FINI_ARRAY, and SHT_PREINIT_ARRAY.
442
443 2016-05-19 Cupertino Miranda <cmiranda@synopsys.com>
444
445 * elf32-arc.c (arc_elf_final_write_processing): Changed.
446 (debug_arc_reloc): Likewise.
447 (elf_arc_relocate_section): Likewise.
448 (elf_arc_check_relocs): Likewise.
449 (elf_arc_adjust_dynamic_symbol): Likewise.
450 (elf_arc_add_symbol_hook): Likewise.
451
452 2016-05-19 Maciej W. Rozycki <macro@imgtec.com>
453
454 * config.bfd: Remove `am34-*-linux*' support.
455
456 2016-05-19 Alan Modra <amodra@gmail.com>
457
458 * elf64-ppc.c (allocate_dynrelocs): Allocate got and other dynamic
459 relocs before plt relocs.
460
461 2016-05-19 Alan Modra <amodra@gmail.com>
462
463 * elf64-ppc.c (ppc64_elf_branch_reloc): Check for NULL owner
464 before dereferencing.
465
466 2016-05-18 Nick Clifton <nickc@redhat.com>
467
468 * po/sv.po: Updated Swedish translation.
469
470 2016-05-18 Alan Modra <amodra@gmail.com>
471
472 * elf32-arm.c (elf32_arm_size_stubs): Free or cache local syms
473 for each BFD. Don't goto error_ret_free_local from outside loop.
474
475 2016-05-17 Maciej W. Rozycki <macro@imgtec.com>
476
477 * elf-s390-common.c (elf_s390_add_symbol_hook): Remove
478 STB_GNU_UNIQUE handling.
479 * elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
480 * elf32-arm.c (elf32_arm_add_symbol_hook): Likewise.
481 * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
482 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
483 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
484 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
485 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
486 * elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise.
487 * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
488 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Likewise.
489 * elf32-i386.c (elf_i386_add_symbol_hook): Remove function.
490 (elf_backend_add_symbol_hook): Remove macro.
491 * elflink.c (elf_link_add_object_symbols): Set `has_gnu_symbols'
492 for STB_GNU_UNIQUE symbols.
493
494 2016-05-16 Maciej W. Rozycki <macro@imgtec.com>
495
496 * elf32-v850.c (v850_elf_copy_notes): New function, factored out
497 from...
498 (v850_elf_copy_private_bfd_data): ... here. Call the new
499 function and `_bfd_elf_copy_private_bfd_data'.
500
501 2016-05-13 H.J. Lu <hongjiu.lu@intel.com>
502
503 PR ld/20093
504 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Don't convert
505 GOTPCREL relocation against large section.
506
507 2016-05-13 Alan Modra <amodra@gmail.com>
508
509 * elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_sections): Use
510 linker dynamic sections in calculating size and address of
511 dynamic tags rather than using output sections. Remove asserts.
512 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Likewise.
513 * elf32-cr16.c (_bfd_cr16_elf_finish_dynamic_sections): Likewise.
514 * elf32-cris.c (elf_cris_finish_dynamic_sections): Likewise.
515 * elf32-i370.c (i370_elf_finish_dynamic_sections): Likewise.
516 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
517 * elf32-m32r.c (m32r_elf_finish_dynamic_sections): Likewise.
518 * elf32-m68k.c (elf_m68k_finish_dynamic_sections): Likewise.
519 * elf32-metag.c (elf_metag_finish_dynamic_sections): Likewise.
520 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Likewise.
521 * elf32-nds32.c (nds32_elf_finish_dynamic_sections): Likewise.
522 * elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Likewise.
523 * elf32-or1k.c (or1k_elf_finish_dynamic_sections): Likewise.
524 * elf32-s390.c (elf_s390_finish_dynamic_sections): Likewise.
525 * elf32-score.c (s3_bfd_score_elf_finish_dynamic_sections): Likewise.
526 * elf32-score7.c (s7_bfd_score_elf_finish_dynamic_sections): Likewise.
527 * elf32-vax.c (elf_vax_finish_dynamic_sections): Likewise.
528 * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Likewise.
529 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Likewise.
530 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
531 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
532 * elflink.c (bfd_elf_final_link): Likewise.
533 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Likewise.
534 * elfxx-sparc.c (sparc_finish_dyn): Likewise. Adjust error message.
535 * elf32-arc.c (GET_SYMBOL_OR_SECTION): Remove ASSERT arg and
536 don't set doit. Look up dynobj section.
537 (elf_arc_finish_dynamic_sections): Adjust GET_SYMBOL_OR_SECTION
538 invocation and dynamic tag vma calculation. Don't test
539 boolean var == TRUE.
540 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_sections): Fix
541 DT_JMPREL calc.
542
543 2016-05-13 Alan Modra <amodra@gmail.com>
544
545 * elflink.c (elf_link_sort_relocs): Wrap overlong lines. Fix
546 octets_per_byte. Put dynamic .rela.plt last in link orders.
547 Assign output_offset for reloc sections rather than writing
548 sorted relocs from block corresponding to output_offset.
549
550 2016-05-12 Alan Modra <amodra@gmail.com>
551
552 * elf-bfd.h (elf_reloc_type_class): Put reloc_class_plt last.
553
554 2016-05-11 Andrew Bennett <andrew.bennett@imgtec.com>
555
556 * elfxx-mips.c (print_mips_ases): Add DSPR3.
557
558 2016-05-11 Alan Modra <amodra@gmail.com>
559
560 * elf32-hppa.c (elf32_hppa_init_stub_bfd): New function.
561 (elf32_hppa_check_relocs): Don't set dynobj.
562 (elf32_hppa_size_stubs): Test !SEC_LINKER_CREATED for stub sections.
563 (elf32_hppa_build_stubs): Likewise.
564 * elf32-hppa.h (elf32_hppa_init_stub_bfd): Declare.
565
566 2016-05-11 Alan Modra <amodra@gmail.com>
567
568 PR 20060
569 * elf64-ppc.c (ppc64_elf_tls_setup): Clear forced_local.
570 * elf32-ppc.c (ppc_elf_tls_setup): Likewise.
571
572 2016-05-10 Jiong Wang <jiong.wang@arm.com>
573
574 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Remove redundant
575 aarch64_tls_transition check.
576
577 2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
578
579 * elf32-arm.c (enum elf32_arm_stub_type): New max_stub_type
580 enumerator.
581 (arm_stub_sym_claimed): New function.
582 (elf32_arm_create_stub): Use veneered symbol name and section if
583 veneer needs to claim its symbol, and keep logic unchanged otherwise.
584 (arm_stub_claim_sym): New function.
585 (arm_map_one_stub): Call arm_stub_claim_sym if veneer needs to claim
586 veneered symbol, otherwise create local symbol as before.
587
588 2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
589
590 * elf32-arm.c (elf32_arm_size_stubs): Use new macros
591 ARM_GET_SYM_BRANCH_TYPE and ARM_SET_SYM_BRANCH_TYPE to respectively get
592 and set branch type of a symbol.
593 (bfd_elf32_arm_process_before_allocation): Likewise.
594 (elf32_arm_relocate_section): Likewise and fix identation along the
595 way.
596 (allocate_dynrelocs_for_symbol): Likewise.
597 (elf32_arm_finish_dynamic_symbol): Likewise.
598 (elf32_arm_swap_symbol_in): Likewise.
599 (elf32_arm_swap_symbol_out): Likewise.
600
601 2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
602
603 * bfd-in.h (elf32_arm_size_stubs): Add an output section parameter.
604 * bfd-in2.h: Regenerated.
605 * elf32-arm.c (struct elf32_arm_link_hash_table): Add an output section
606 parameter to add_stub_section callback.
607 (elf32_arm_create_or_find_stub_sec): Get output section from link_sec
608 and pass it down to add_stub_section.
609 (elf32_arm_add_stub): Set section to stub_sec if NULL before using it
610 for error message.
611 (elf32_arm_size_stubs): Add output section parameter to
612 add_stub_section function pointer parameter.
613
614 2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
615
616 * elf32-arm.c (elf32_arm_create_stub): New function.
617 (elf32_arm_size_stubs): Use elf32_arm_create_stub for stub creation.
618
619 2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
620
621 * elf32-arm.c (enum elf32_arm_stub_type): Delete
622 arm_stub_a8_veneer_lwm enumerator.
623 (arm_stub_a8_veneer_lwm): New unsigned constant to replace
624 aforementioned enumerator.
625 (struct elf32_arm_stub_hash_entry): Delete target_addend
626 field and add source_value.
627 (struct a8_erratum_fix): Delete addend field and add target_offset.
628 (stub_hash_newfunc): Initialize source_value field amd remove
629 initialization for target_addend.
630 (arm_build_one_stub): Stop special casing Thumb relocations: promote
631 the else to being always executed, moving the
632 arm_stub_a8_veneer_b_cond specific code in it. Remove
633 stub_entry->target_addend from points_to computation.
634 (cortex_a8_erratum_scan): Store in a8_erratum_fix structure the offset
635 to target symbol from start of section rather than the offset from the
636 stub address.
637 (elf32_arm_size_stubs): Set stub_entry's source_value and target_value
638 fields from struct a8_erratum_fix's offset and target_offset
639 respectively.
640 (make_branch_to_a8_stub): Rename target variable to loc. Compute
641 veneered_insn_loc and loc using stub_entry's source_value.
642
643 2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
644
645 (elf32_arm_merge_eabi_attributes): Add merging logic for
646 Tag_DSP_extension.
647
648 2016-05-10 Pip Cet <pipcet@gmail.com>
649
650 PR ld/20059
651 * elfxx-target.h (bfd_elfNN_bfd_copy_link_hash_symbol_type):
652 Define as _bfd_generic_copy_link_hash_symbol_type when using
653 generic hash table.
654
655 2016-05-09 Nick Clifton <nickc@redhat.com>
656
657 PR binutils/20063
658 * elf.c (bfd_elf_get_elf_syms): Check for out of range sh_link
659 field before accessing sections array.
660
661 2016-05-09 Christophe Monat <christophe.monat@st.com>
662
663 PR ld/20030
664 * elf32-arm.c (is_thumb2_vldm): Account for T1 (DP) encoding.
665 (stm32l4xx_need_create_replacing_stub): Rename ambiguous nb_regs
666 to nb_words.
667 (create_instruction_vldmia): Add is_dp to disambiguate SP/DP
668 encoding.
669 (create_instruction_vldmdb): Likewise.
670 (stm32l4xx_create_replacing_stub_vldm): is_dp detects DP encoding,
671 uses it to re-encode.
672
673 2016-05-09 Nick Clifton <nickc@redhat.com>
674
675 PR 19938
676 * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Revert accidental
677 commit.
678
679 2016-05-09 Alan Modra <amodra@gmail.com>
680
681 * elf64-ppc.c (ppc64_elf_init_stub_bfd): Remove redundant NULL check.
682
683 2016-05-06 H.J. Lu <hongjiu.lu@intel.com>
684
685 PR ld/17550
686 * elf-bfd.h (elf_link_hash_entry): Update comments for indx,
687 documenting that indx == -3 if symbol is defined in a discarded
688 section.
689 * elflink.c (elf_link_add_object_symbols): Set indx to -3 if
690 symbol is defined in a discarded section.
691 (elf_link_output_extsym): Strip a global symbol defined in a
692 discarded section.
693
694 2016-05-06 H.J. Lu <hongjiu.lu@intel.com>
695
696 * elf32-i386.c (elf_backend_add_symbol_hook): Defined for Intel
697 MCU.
698
699 2016-05-05 H.J. Lu <hongjiu.lu@intel.com>
700
701 * elf32-i386.c (elf_i386_convert_load): Extract the GOT load
702 conversion to ...
703 (elf_i386_convert_load_reloc): This. New function.
704 * elf64-x86-64.c (elf_x86_64_convert_load): Extract the GOT load
705 conversion to ...
706 (elf_x86_64_convert_load_reloc): This. New function.
707
708 2016-05-05 H.J. Lu <hongjiu.lu@intel.com>
709
710 * elf32-i386.c (elf_i386_check_tls_transition): Remove abfd.
711 Don't check if contents == NULL.
712 (elf_i386_tls_transition): Add from_relocate_section. Check
713 from_relocate_section instead of contents != NULL. Update
714 elf_i386_check_tls_transition call.
715 (elf_i386_check_relocs): Cache the section contents if
716 keep_memory is FALSE. Pass FALSE as from_relocate_section to
717 elf_i386_tls_transition.
718 (elf_i386_relocate_section): Pass TRUE as from_relocate_section
719 to elf_i386_tls_transition.
720 (elf_backend_caches_rawsize): New.
721 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Don't check
722 if contents == NULL.
723 (elf_x86_64_tls_transition): Add from_relocate_section. Check
724 from_relocate_section instead of contents != NULL.
725 (elf_x86_64_check_relocs): Cache the section contents if
726 keep_memory is FALSE. Pass FALSE as from_relocate_section to
727 elf_x86_64_tls_transition.
728 (elf_x86_64_relocate_section): Pass TRUE as from_relocate_section
729 to elf_x86_64_tls_transition.
730 (elf_backend_caches_rawsize): New.
731
732 2016-05-03 Maciej W. Rozycki <macro@imgtec.com>
733
734 PR 10549
735 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Handle
736 STB_GNU_UNIQUE.
737
738 2016-05-03 Jiong Wang <jiong.wang@arm.com>
739
740 * bfd-in.h (bfd_elf64_aarch64_set_options): Update prototype.
741 * bfd-in2.h (bfd_elf64_aarch64_set_options): Likewise.
742 * elfnn-aarch64.c (bfd_elfNN_aarch64_set_options): Initialize
743 no_apply_dynamic_relocs.
744 (elfNN_aarch64_final_link_relocate): Apply absolute relocations even though
745 dynamic relocations generated.
746
747 2016-04-29 H.J. Lu <hongjiu.lu@intel.com>
748
749 * elf32-i386.c (elf_i386_size_dynamic_sections): Move interp
750 setting to ...
751 (elf_i386_create_dynamic_sections): Here.
752 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Move
753 interp setting to ...
754 (elf_x86_64_create_dynamic_sections): Here.
755
756 2016-04-29 H.J. Lu <hongjiu.lu@intel.com>
757
758 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take GOT_RELOC
759 and replace (EH)->has_got_reloc with GOT_RELOC.
760 (elf_i386_fixup_symbol): Pass has_got_reloc to
761 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
762 (elf_i386_allocate_dynrelocs): Likewise.
763 (elf_i386_relocate_section): Likewise.
764 (elf_i386_finish_dynamic_symbol): Likewise.
765 (elf_i386_convert_load): Pass TRUE to
766 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
767 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take
768 GOT_RELOC and replace (EH)->has_got_reloc with GOT_RELOC.
769 (elf_x86_64_fixup_symbol): Pass has_got_reloc to
770 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
771 (elf_x86_64_allocate_dynrelocs): Likewise.
772 (elf_x86_64_relocate_section): Likewise.
773 (elf_x86_64_finish_dynamic_symbol): Likewise.
774 (elf_x86_64_convert_load): Pass TRUE to
775 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
776
777 2016-04-29 H.J. Lu <hongjiu.lu@intel.com>
778
779 * elf32-i386.c (check_relocs_failed): New.
780 (elf_i386_check_relocs): Set check_relocs_failed on error.
781 (elf_i386_relocate_section): Skip if check_relocs failed.
782
783 2016-04-29 H.J. Lu <hongjiu.lu@intel.com>
784
785 * elf64-x86-64.c (elf_x86_64_check_relocs): Set
786 check_relocs_failed on error.
787
788 2016-04-29 Nick Clifton <nickc@redhat.com>
789
790 PR 19938
791 * elf-bfd.h (struct elf_backend_data): Rename
792 elf_backend_set_special_section_info_and_link to
793 elf_backend_copy_special_section_fields.
794 * elfxx-target.h: Likewise.
795 * elf.c (section_match): Ignore the SHF_INFO_LINK flag when
796 comparing section flags.
797 (copy_special_section_fields): New function.
798 (_bfd_elf_copy_private_bfd_data): Copy the EI_ABIVERSION field.
799 Perform two scans over special sections. The first one looks for
800 a direct mapping between the output section and an input section.
801 The second scan looks for a possible match based upon section
802 characteristics.
803 * elf32-arm.c (elf32_arm_copy_special_section_fields): New
804 function. Handle setting the sh_link field of SHT_ARM_EXIDX
805 sections.
806 * elf32-i386.c (elf32_i386_set_special_info_link): Rename to
807 elf32_i386_copy_solaris_special_section_fields.
808 * elf32-sparc.c (elf32_sparc_set_special_section_info_link):
809 Rename to elf32_sparc_copy_solaris_special_section_fields.
810 * elf64-x86-64.c (elf64_x86_64_set_special_info_link): Rename to
811 elf64_x86_64_copy_solaris_special_section_fields.
812
813 2016-04-28 Nick Clifton <nickc@redhat.com>
814
815 * po/zh_CN.po: Updated Chinese (simplified) translation.
816
817 2016-04-27 H.J. Lu <hongjiu.lu@intel.com>
818
819 PR ld/20006
820 * elf64-x86-64.c (elf_x86_64_convert_load): Skip debug sections
821 when estimating distances between output sections.
822
823 2016-04-27 Alan Modra <amodra@gmail.com>
824
825 * elflink.c (_bfd_elf_is_start_stop): New function.
826 (_bfd_elf_gc_mark_rsec): Use it.
827 * elf-bfd.h (_bfd_elf_is_start_stop): Declare.
828
829 2016-04-26 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
830
831 * elf32-rx.c (rx_set_section_contents): Avoid arithmetic on void *.
832 * mmo.c (mmo_get_section_contents): Likewise.
833 (mmo_set_section_contents): Likewise.
834
835 2016-04-26 H.J. Lu <hongjiu.lu@intel.com>
836
837 * elf-bfd.h (elf_link_hash_table): Update comments for
838 dynsymcount.
839 * elflink.c (_bfd_elf_link_renumber_dynsyms): Always count for
840 the unused NULL entry at the head of dynamic symbol table.
841 (bfd_elf_size_dynsym_hash_dynstr): Remove dynsymcount != 0
842 checks.
843
844 2016-04-21 H.J. Lu <hongjiu.lu@intel.com>
845
846 * elflink.c (_bfd_elf_link_create_dynstrtab): Exclude linker
847 created file from dynobj.
848
849 2016-04-21 H.J. Lu <hongjiu.lu@intel.com>
850
851 * elflink.c (_bfd_elf_link_create_dynstrtab): Set dynobj to a
852 normal input file if possible.
853
854 2016-04-21 Nick Clifton <nickc@redhat.com>
855
856 * aout-adobe.c: Use _bfd_generic_link_check_relocs.
857 * aout-target.h: Likewise.
858 * aout-tic30.c: Likewise.
859 * binary.c: Likewise.
860 * bout.c: Likewise.
861 * coff-alpha.c: Likewise.
862 * coff-rs6000.c: Likewise.
863 * coff64-rs6000.c: Likewise.
864 * coffcode.h: Likewise.
865 * i386msdos.c: Likewise.
866 * i386os9k.c: Likewise.
867 * ieee.c: Likewise.
868 * ihex.c: Likewise.
869 * libbfd-in.h: Likewise.
870 * libecoff.h: Likewise.
871 * mach-o-target.c: Likewise.
872 * mmo.c: Likewise.
873 * nlm-target.h: Likewise.
874 * oasys.c: Likewise.
875 * pef.c: Likewise.
876 * plugin.c: Likewise.
877 * ppcboot.c: Likewise.
878 * som.c: Likewise.
879 * srec.c: Likewise.
880 * tekhex.c: Likewise.
881 * versados.c: Likewise.
882 * vms-alpha.c: Likewise.
883 * xsym.c: Likewise.
884 * elfxx-target.h: Use _bfd_elf_link_check_relocs.
885 * linker.c (bfd_link_check_relocs): New function.
886 (_bfd_generic_link_check_relocs): New function.
887 * targets.c (BFD_JUMP_TABLE_LINK): Add initialization of
888 _bfd_link_check_relocs field.
889 (struct bfd_target)L Add _bfd_link_check_relocs field.
890 * bfd-in2.h: Regenerate.
891 * libbfd.h: Regenerate.
892
893 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
894
895 * elf32-i386.c (elf_i386_gc_sweep_hook): Removed.
896 (elf_backend_gc_sweep_hook): Likewise.
897 * elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise.
898 (elf_backend_gc_sweep_hook): Likewise.
899
900 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
901
902 * elflink.c (_bfd_elf_link_check_relocs): Don't check relocations
903 in excluded sections
904
905 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
906
907 PR ld/19969
908 * elf64-x86-64.c (check_relocs_failed): New.
909 (elf_x86_64_need_pic): Moved before elf_x86_64_check_relocs.
910 Support relocation agaist local symbol. Set check_relocs_failed.
911 (elf_x86_64_check_relocs): Use elf_x86_64_need_pic. Check
912 R_X86_64_32 relocation overflow.
913 (elf_x86_64_relocate_section): Skip if check_relocs failed.
914 Update one elf_x86_64_need_pic and remove one elf_x86_64_need_pic.
915
916 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
917
918 * elf32-i386.c (elf_i386_check_relocs): Call
919 _bfd_elf_create_ifunc_sections only for STT_GNU_IFUNC symbol.
920 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
921
922 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
923
924 * elf-bfd.h (_bfd_elf_link_check_relocs): New.
925 * elflink.c (_bfd_elf_link_check_relocs): New function.
926 (elf_link_add_object_symbols): Call _bfd_elf_link_check_relocs
927 if check_relocs_after_open_input is FALSE.
928
929 2016-04-20 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
930
931 * cache.c: Update old style function definitions.
932 * elf32-m68k.c: Likewise.
933 * elf64-mmix.c: Likewise.
934 * stab-syms.c: Likewise.
935
936 2016-04-20 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
937
938 * elf32-arm.c (put_thumb2_insn): Change argument type to bfd_byte *.
939
940 2016-04-15 H.J. Lu <hongjiu.lu@intel.com>
941
942 * Makefile.in: Regenerated with automake 1.11.6.
943 * aclocal.m4: Likewise.
944 * doc/Makefile.in: Likewise.
945
946 2016-04-14 Andrew Burgess <andrew.burgess@embecosm.com>
947
948 * reloc.c: Add BFD_RELOC_ARC_NPS_CMEM16 entry.
949 * bfd-in2.h: Regenerate.
950 * libbfd.h: Regenerate.
951 * elf32-arc.c: Add 'opcode/arc.h' include.
952 (struct arc_relocation_data): Add symbol_name.
953 (arc_special_overflow_checks): New function.
954 (arc_do_relocation): Use arc_special_overflow_checks, reindent as
955 required, add an extra comment.
956 (elf_arc_relocate_section): Setup symbol_name in reloc_data.
957
958 2016-04-14 Andrew Burgess <andrew.burgess@embecosm.com>
959
960 * elf32-arc.c (tls_got_entries): Add 'TLS_GOT_' prefix to all
961 entries.
962 (elf_arc_relocate_section): Update enum uses.
963 (elf_arc_check_relocs): Likewise.
964 (elf_arc_finish_dynamic_symbol): Likewise.
965
966 2016-04-14 H.J. Lu <hongjiu.lu@intel.com>
967
968 * elf.c (_bfd_elf_copy_private_bfd_data): Replace "link" with
969 "sh_link".
970
971 2016-04-14 Nick Clifton <nickc@redhat.com>
972
973 PR target/19938
974 * elf-bbfd.h (struct elf_backend_data): New field:
975 elf_strtab_flags.
976 New field: elf_backend_set_special_section_info_and_link
977 * elfxx-target.h (elf_backend_strtab_flags): Define if not already
978 defined.
979 (elf_backend_set_special_section_info_and_link): Define if not
980 already defined.
981 (elfNN_bed): Use elf_backend_set_special_section_info_and_link and
982 elf_backend_strtab_flags macros to initialise fields in structure.
983 * elf.c (_bfd_elf_make_section_from_shdr): Check for SHF_STRINGS
984 being set even if SHF_MERGE is not set.
985 (elf_fake_sections): Likewise.
986 (section_match): New function. Matches two ELF sections based
987 upon fixed characteristics.
988 (find_link): New function. Locates a section in a BFD that
989 matches a section in a different BFD.
990 (_bfd_elf_copy_private_bfd_data): Copy the sh_info and sh_link
991 fields of reserved sections.
992 (bfd_elf_compute_section_file_positions): Set the flags for the
993 .shstrtab section based upon the elf_strtab_flags field in the
994 elf_backend_data structure.
995 (swap_out_syms): Likewise for the .strtab section.
996 * elflink.c (bfd_elf_final_link): Set the flags for the
997 .strtab section based upon the elf_strtab_flags field in the
998 elf_backend_data structure.
999 * elf32-i386.c (elf32_i386_set_special_info_link): New function.
1000 (elf_backend_strtab_flags): Set to SHF_STRINGS for Solaris
1001 targets.
1002 (elf_backend_set_special_section_info_and_link): Define for
1003 Solaris targets.
1004 * elf32-sparc.c: Likewise.
1005 * elf64-x86-64.c: Likewise.
1006
1007 2016-04-11 H.J. Lu <hongjiu.lu@intel.com>
1008
1009 PR ld/19939
1010 * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): Add a pointer
1011 to bfd_boolean.
1012 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Updated.
1013 Set *readonly_dynrelocs_against_ifunc_p to TRUE if dynamic reloc
1014 applies to read-only section.
1015 * elf32-i386.c (elf_i386_link_hash_table): Add
1016 readonly_dynrelocs_against_ifunc.
1017 (elf_i386_allocate_dynrelocs): Updated.
1018 (elf_i386_size_dynamic_sections): Issue an error for read-only
1019 segment with dynamic IFUNC relocations only if
1020 readonly_dynrelocs_against_ifunc is TRUE.
1021 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
1022 readonly_dynrelocs_against_ifunc.
1023 (elf_x86_64_allocate_dynrelocs): Updated.
1024 (elf_x86_64_size_dynamic_sections): Issue an error for read-only
1025 segment with dynamic IFUNC relocations only if
1026 readonly_dynrelocs_against_ifunc is TRUE.
1027 * elfnn-aarch64.c (elfNN_aarch64_allocate_ifunc_dynrelocs):
1028 Updated.
1029
1030 2016-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
1031
1032 * elf32-arm.c (elf32_arm_size_stubs): Move error_ret_free_local to be
1033 a fall through from error_ret_free_internal. Free local_syms in
1034 error_ret_free_local if allocated from bfd_elf_get_elf_syms ().
1035
1036 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
1037
1038 * elf32-arc.c (plt_do_relocs_for_symbol): Changed.
1039 (relocate_plt_for_entry): Likewise.
1040
1041 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
1042
1043 * elf32-arc.c (elf_arc_check_relocs): Changed
1044
1045 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
1046
1047 * elf32-arc.c (name_for_global_symbol): Changed assert.
1048 (get_replace_function): Created.:
1049 (struct arc_relocation_data): Changed to signed types.
1050 (defines S, L, P, PDATA): Casted to signed type.
1051 (defines SECTSTART, _SDA_BASE_, TLS_REL): Likewise.
1052 (PRINT_DEBUG_RELOC_INFO_BEFORE): Changed.
1053 (arc_do_relocation): Changed.
1054
1055 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
1056
1057 * elf32-arc.c (name_for_global_symbol): Added assert to check for
1058 symbol index.
1059 (elf_arc_relocate_section): Added and changed asserts, validating
1060 the synamic symbol index.
1061 (elf_arc_finish_dynamic_symbol): Do not fill the dynamic
1062 relocation if symbol has dynindx set to -1.
1063
1064 2016-04-05 Maciej W. Rozycki <macro@imgtec.com>
1065
1066 * elflink.c (elf_link_add_object_symbols): Always turn hidden
1067 and internal symbols which have a dynamic index into local
1068 ones.
1069
1070 2016-04-04 Nick Clifton <nickc@redhat.com>
1071
1072 PR 19872
1073 * dwarf2.c (parse_comp_unit): Skip warning about unrecognised
1074 version number if the version is zero.
1075
1076 2016-04-01 Alan Modra <amodra@gmail.com>
1077
1078 PR 19886
1079 * elflink.c (on_needed_list): Recursively check needed status.
1080 (elf_link_add_object_symbols): Adjust.
1081
1082 2016-03-30 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1083
1084 * elf32-avr.c (avr_elf32_load_records_from_section): Free
1085 internal_relocs only if they aren't cached.
1086
1087 2016-03-29 Nick Clifton <nickc@redhat.com>
1088
1089 PR 17334
1090 * elf32-bfin.c (elf32_bfinfdpic_finish_dynamic_sections): Relax
1091 assertion on the size of the got section to allow it to be bigger
1092 than the number of relocs.
1093
1094 2016-03-29 Toni Spets <toni.spets@iki.fi>
1095
1096 PR 19878
1097 * coffcode.h (coff_write_object_contents): Revert accidental
1098 2014-11-10 change.
1099
1100 2016-03-22 Alan Modra <amodra@gmail.com>
1101
1102 PR 19850
1103 * dwarf2.c (read_attribute_value): Skip info_ptr check for
1104 DW_FORM_flag_present.
1105
1106 2016-03-22 Nick Clifton <nickc@redhat.com>
1107
1108 * cpu-v850_rh850.c (arch_info_struct): Restore v850-rh850 as an
1109 architecture name for backwards compatibility.
1110
1111 * peXXigen.c (_bfd_XXi_write_codeview_record): Fix possible
1112 unbounded stack use.
1113
1114 * warning.m4 (GCC_WARN_CFLAGS): Only add -Wstack-usage if using a
1115 sufficiently recent version of GCC.
1116 * configure: Regenerate.
1117
1118 2016-03-22 Alan Modra <amodra@gmail.com>
1119
1120 PR 19851
1121 * plugin.c (try_load_plugin): Avoid -Wstack-usage warning.
1122
1123 2016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
1124
1125 * archures.c (bfd_mach_arc_nps400): Define.
1126 * bfd-in2.h: Regenerate.
1127 * cpu-arc.c (arch_info_struct): New entry for nps400, renumber
1128 some existing entries to make space.
1129 * elf32-arc.c (arc_elf_object_p): Add nps400 case.
1130 (arc_elf_final_write_processing): Likewise.
1131
1132 2016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
1133
1134 * elf32-arc.c (arc_elf_print_private_bfd_data): Remove use of
1135 EF_ARC_CPU_GENERIC.
1136 (arc_elf_final_write_processing): Don't bother setting cpu field
1137 in e_flags, this will have been set elsewhere.
1138
1139 2016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
1140
1141 * elf32-arc.c (arc_elf_final_write_processing): Switch to using
1142 EF_ARC_MACH_MSK.
1143
1144 2016-03-21 Nick Clifton <nickc@redhat.com>
1145
1146 * warning.m4 (GCC_WARN_CFLAGS): Add -Wstack-usage=262144
1147 * configure: Regenerate.
1148 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Replace use of
1149 alloca with call to xmalloc.
1150 * elf32-nds32.c: Likewise.
1151 * elf64-hppa.c: Likewise.
1152 * elfxx-mips.c: Likewise.
1153 * pef.c: Likewise.
1154 * pei-x86_64.c: Likewise.
1155 * som.c: Likewise.
1156 * xsym.c: Likewise.
1157
1158 2016-03-15 H.J. Lu <hongjiu.lu@intel.com>
1159
1160 PR ld/19827
1161 * elf32-i386.c (elf_i386_check_relocs): Bind defined symbol
1162 locally in PIE.
1163 (elf_i386_relocate_section): Likewise.
1164 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1165 (elf_x86_64_relocate_section): Likewise.
1166
1167 2016-03-15 H.J. Lu <hongjiu.lu@intel.com>
1168
1169 PR ld/19807
1170 * elf64-x86-64.c (elf_x86_64_relocate_section): Check
1171 no_reloc_overflow_check to diable R_X86_64_32/R_X86_64_32S
1172 relocation overflow check.
1173
1174 2016-03-14 H.J. Lu <hongjiu.lu@intel.com>
1175
1176 * bfd-in2.h: Regenerated.
1177
1178 2016-03-11 Dan Gissel <dgisselq@ieee.org>
1179
1180 PR 19713
1181 * elf.c (_bfd_elf_section_offset): Ensure that the returned offset
1182 uses bytes not octets.
1183 * elflink.c (resolve_section): Likewise.
1184 Add a bfd parameter.
1185 (eval_section): Pass the input_bfd to resolve_section.
1186 (bfd_elf_perform_complex_relocation): Convert byte offset to
1187 octets before read and writing values.
1188 (elf_link_input_bfd): Add byte to octet conversions.
1189 (elf_reloc_link_order): Likewise.
1190 (elf_fixup_link_order): Likewise.
1191 (bfd_elf_final_link): Likewise.
1192 * reloc.c (_bfd_final_link_relocate): Likewise.
1193 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
1194
1195 2016-03-10 Nick Clifton <nickc@redhat.com>
1196
1197 * config.bfd: Mark the i370 target as obsolete.
1198
1199 2016-03-09 Pedro Alves <palves@redhat.com>
1200
1201 * cpu-v850.c (N): Append ":old-gcc-abi" instead of " (using old
1202 gcc ABI)" to printable name.
1203 * cpu-v850_rh850.c (bfd_v850_rh850_arch): Use "v850:rh850" instead
1204 of "v850-rh850" as printable name.
1205
1206 2016-03-09 Leon Winter <winter-gcc@bfw-online.de>
1207
1208 PR ld/19623
1209 * cofflink.c (_bfd_coff_generic_relocate_section): Do not apply
1210 relocations against absolute symbols.
1211
1212 2016-03-09 Alan Modra <amodra@gmail.com>
1213
1214 PR binutils/19775
1215 * coff-alpha.c (alpha_ecoff_openr_next_archived_file): Allow zero
1216 length elements in the archive.
1217
1218 2016-03-08 H.J. Lu <hongjiu.lu@intel.com>
1219
1220 PR ld/19789
1221 * elflink.c (elf_link_add_object_symbols): Create dynamic sections
1222 for -E/--dynamic-list only when not relocatable.
1223
1224 2016-03-08 H.J. Lu <hongjiu.lu@intel.com>
1225
1226 PR ld/19784
1227 * elf32-i386.c (elf_i386_check_relocs): Increment PLT reference
1228 count for locally defined local IFUNC symbols in shared object.
1229 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1230
1231 2016-03-08 H.J. Lu <hongjiu.lu@intel.com>
1232
1233 PR ld/19579
1234 * elflink.c (_bfd_elf_merge_symbol): Group common symbol checking
1235 together.
1236
1237 2016-03-08 Cupertino Miranda <Cupertino.Miranda@synopsys.com>
1238 Andrew Burgess <andrew.burgess@embecosm.com>
1239
1240 * elf32-arc.c (arc_bfd_get_32): Becomes an alias for bfd_get_32.
1241 (arc_bfd_put_32): Becomes an alias for bfd_put_32.
1242 (arc_elf_howto_init): Added assert to validate relocations.
1243 (get_middle_endian_relocation): Delete.
1244 (middle_endian_convert): New function.
1245 (ME): Redefine, now does nothing.
1246 (IS_ME): New define.
1247 (arc_do_relocation): Extend the attached 'ARC_RELOC_HOWTO'
1248 definition to call middle_endian_convert. Add a new local
1249 variable and make use of this throughout. Added call to
1250 arc_bfd_get_8 and arc_bfd_put_8 for 8 bit relocations.
1251
1252 2016-03-07 Nick Clifton <nickc@redhat.com>
1253
1254 PR binutils/19775
1255 * archive.c (bfd_generic_openr_next_archived_file): Allow zero
1256 length elements in the archive.
1257
1258 2016-03-07 Jiong Wang <jiong.wang@arm.com>
1259
1260 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Always create .got
1261 section if the symbol "_GLOBAL_OFFSET_TABLE_" is referenced.
1262
1263 2016-03-04 H.J. Lu <hongjiu.lu@intel.com>
1264
1265 PR ld/19579
1266 * elflink.c (_bfd_elf_merge_symbol): Treat common symbol in
1267 executable as definition if the new definition comes from a
1268 shared library.
1269
1270 2016-03-02 Alan Modra <amodra@gmail.com>
1271
1272 * Makefile.in: Regenerate.
1273 * po/SRC-POTFILES.in: Regenerate.
1274
1275 2016-02-29 Cupertino Miranda <cmiranda@synopsys.com>
1276
1277 * elf32-arc.c (elf_arc_relocate_section): Added rules to fix the
1278 relocation addend when sections get merged.
1279
1280 2016-02-29 Cupertino Miranda <Cupertino.Miranda@synopsys.com>
1281
1282 * elf32-arc.c (arc_elf_final_write_processing): Add condition to
1283 the flag change.
1284 (elf_arc_relocate_section): Fixes and conditions to support PIE.
1285 Assert for code sections dynamic relocs.
1286
1287 2016-02-26 Renlin Li <renlin.li@arm.com>
1288
1289 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix signed overflow
1290 check for MOVW_SABS_G0, MOVW_SABS_G1, MOVW_SABS_G2.
1291
1292 2016-02-26 H.J. Lu <hongjiu.lu@intel.com>
1293
1294 PR ld/19609
1295 * elf32-i386.c (elf_i386_convert_load): Convert to R_386_32 for
1296 load with locally bound symbols if PIC is false or there is no
1297 base register. Optimize branch to 0 if PIC is false.
1298 (elf_i386_relocate_section): Don't generate dynamic relocations
1299 against undefined weak symbols if PIC is false.
1300 * elf64-x86-64.c (elf_x86_64_convert_load): Disable optimization
1301 if we can't estimate relocation overflow with --no-relax.
1302 Convert to R_X86_64_32S/R_X86_64_32 for load with locally bound
1303 symbols if PIC is false. Optimize branch to 0 if PIC is false.
1304 (elf_x86_64_relocate_section): Don't generate dynamic relocations
1305 against undefined weak symbols if PIC is false.
1306
1307 2016-02-26 H.J. Lu <hongjiu.lu@intel.com>
1308
1309 PR ld/19645
1310 * bfd.c (bfd): Change flags to 20 bits.
1311 (BFD_CONVERT_ELF_COMMON): New.
1312 (BFD_USE_ELF_STT_COMMON): Likewise.
1313 (BFD_FLAGS_SAVED): Add BFD_CONVERT_ELF_COMMON and
1314 BFD_USE_ELF_STT_COMMON.
1315 (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
1316 * configure.ac: Remove --enable-elf-stt-common.
1317 * elf.c (swap_out_syms): Choose STT_COMMON or STT_OBJECT for
1318 common symbol depending on BFD_CONVERT_ELF_COMMON and
1319 BFD_USE_ELF_STT_COMMON.
1320 * elfcode.h (elf_slurp_symbol_table): Set BSF_ELF_COMMON for
1321 STT_COMMON.
1322 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Also check
1323 STT_COMMON.
1324 (elf_link_convert_common_type): New function.
1325 (elf_link_output_extsym): Choose STT_COMMON or STT_OBJECT for
1326 common symbol depending on BFD_CONVERT_ELF_COMMON and
1327 BFD_USE_ELF_STT_COMMON. Set sym.st_info after sym.st_shndx.
1328 * elfxx-target.h (TARGET_BIG_SYM): Add BFD_CONVERT_ELF_COMMON
1329 and BFD_USE_ELF_STT_COMMON to object_flags.
1330 (TARGET_LITTLE_SYM): Likewise.
1331 * syms.c (BSF_KEEP_G): Renamed to ...
1332 (BSF_ELF_COMMON): This.
1333 * bfd-in2.h: Regenerated.
1334 * config.in: Likewise.
1335 * configure: Likewise.
1336
1337 2016-02-26 H.J. Lu <hongjiu.lu@intel.com>
1338
1339 PR ld/19636
1340 PR ld/19704
1341 PR ld/19719
1342 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
1343 (elf_i386_link_hash_entry): Add has_got_reloc and
1344 has_non_got_reloc.
1345 (elf_i386_link_hash_table): Add interp.
1346 (elf_i386_link_hash_newfunc): Initialize has_got_reloc and
1347 has_non_got_reloc.
1348 (elf_i386_copy_indirect_symbol): Copy has_got_reloc and
1349 has_non_got_reloc.
1350 (elf_i386_check_relocs): Set has_got_reloc and has_non_got_reloc.
1351 (elf_i386_fixup_symbol): New function.
1352 (elf_i386_pie_finish_undefweak_symbol): Likewise.
1353 (elf_i386_allocate_dynrelocs): Don't allocate space for dynamic
1354 relocations and discard relocations against resolved undefined
1355 weak symbols in executable. Don't make resolved undefined weak
1356 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
1357 relocation against undefined weak symbols in PIE.
1358 (elf_i386_size_dynamic_sections): Set interp to .interp section.
1359 (elf_i386_relocate_section): Don't generate dynamic relocations
1360 against resolved undefined weak symbols in PIE, except for
1361 R_386_PC32.
1362 (elf_i386_finish_dynamic_symbol): Keep PLT/GOT entries without
1363 dynamic PLT/GOT relocations for resolved undefined weak symbols.
1364 Don't generate dynamic relocation against resolved undefined weak
1365 symbol in executable.
1366 (elf_i386_finish_dynamic_sections): Call
1367 elf_i386_pie_finish_undefweak_symbol on all symbols in PIE.
1368 (elf_backend_fixup_symbol): New.
1369 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
1370 (elf_x86_64_link_hash_entry): Add has_got_reloc and
1371 has_non_got_reloc.
1372 (elf_x86_64_link_hash_table): Add interp.
1373 (elf_x86_64_link_hash_newfunc): Initialize has_got_reloc and
1374 has_non_got_reloc.
1375 (elf_x86_64_copy_indirect_symbol): Copy has_got_reloc and
1376 has_non_got_reloc.
1377 (elf_x86_64_check_relocs): Set has_got_reloc and
1378 has_non_got_reloc.
1379 (elf_x86_64_fixup_symbol): New function.
1380 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
1381 (elf_x86_64_allocate_dynrelocs): Don't allocate space for dynamic
1382 relocations and discard relocations against resolved undefined
1383 weak symbols in executable. Don't make resolved undefined weak
1384 symbols in executable dynamic.
1385 (elf_x86_64_size_dynamic_sections): Set interp to .interp section.
1386 (elf_x86_64_relocate_section): Check relocation overflow for
1387 dynamic relocations against unresolved weak undefined symbols.
1388 Don't generate dynamic relocations against resolved weak
1389 undefined symbols in PIE.
1390 (elf_x86_64_finish_dynamic_symbol): Keep PLT/GOT entries without
1391 dynamic PLT/GOT relocations for resolved undefined weak symbols.
1392 Don't generate dynamic relocation against resolved undefined weak
1393 symbol in executable.
1394 (elf_x86_64_finish_dynamic_sections): Call
1395 elf_x86_64_pie_finish_undefweak_symbol on all symbols in PIE.
1396 (elf_backend_fixup_symbol): New.
1397
1398 2016-02-26 Alan Modra <amodra@gmail.com>
1399
1400 * elf64-ppc.c (create_linkage_sections): Create sfpr when
1401 save_restore_funcs, rest of sections when not relocatable.
1402 (ppc64_elf_init_stub_bfd): Always call create_linkage_sections.
1403 (sfpr_define): Define all symbols on emitted code.
1404 (ppc64_elf_func_desc_adjust): Adjust for sfpr now being created
1405 when relocatable. Move sfpr_define loop earlier.
1406
1407 2016-02-24 H.J. Lu <hongjiu.lu@intel.com>
1408
1409 * elf64-x86-64.c (elf_x86_64_need_pic): New function.
1410 (elf_x86_64_relocate_section): Use it. Replace
1411 x86_64_elf_howto_table[r_type] with howto.
1412
1413 2016-02-24 H.J. Lu <hongjiu.lu@intel.com>
1414
1415 PR ld/19698
1416 * elflink.c (bfd_elf_record_link_assignment): Set versioned if
1417 symbol version is unknown.
1418
1419 2016-02-24 H.J. Lu <hongjiu.lu@intel.com>
1420
1421 * elf32-i386.c (elf_i386_allocate_dynrelocs): Set plt_got.offset
1422 to (bfd_vma) -1 when setting needs_plt to 0.
1423 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
1424
1425 2016-02-23 H.J. Lu <hongjiu.lu@intel.com>
1426
1427 * elflink.c (bfd_elf_record_link_assignment): Check for shared
1428 library, instead of PIC, and don't check PDE when making linker
1429 assigned symbol dynamic.
1430
1431 2016-02-23 Faraz Shahbazker <faraz.shahbazker@imgtec.com>
1432
1433 * bfd/elfxx-mips.c (_bfd_mips_post_process_headers): Increment
1434 ABIVERSION for non-executable stack.
1435
1436 2016-02-23 Rich Felker <bugdal@aerifal.cx>
1437
1438 PR target/19516
1439 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol):
1440 Always produce a RELATIVE reloc for a local symbol.
1441
1442 2016-02-23 Hans-Peter Nilsson <hp@axis.com>
1443
1444 Fix test-case ld-elf/pr19617b
1445 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
1446 discard unused non-function symbols when --dynamic-list-data.
1447
1448 2016-02-22 H.J. Lu <hongjiu.lu@intel.com>
1449
1450 * elflink.c (_bfd_elf_link_renumber_dynsyms): Always create the
1451 dynsym section, even if it is empty, with dynamic sections.
1452
1453 2016-02-22 H.J. Lu <hongjiu.lu@intel.com>
1454
1455 * syms.c: Remove BSF_COMMON from comments.
1456 * bfd-in2.h: Regenerated.
1457
1458 2016-02-22 Jiong Wang <jiong.wang@arm.com>
1459
1460 * elfnn-aarch64. (aarch64_type_of_stub): Remove redundation calcuation
1461 for destination. Remove useless function parameters.
1462 (elfNN_aarch64_size_stubs): Update parameters for aarch64_type_of_stub.
1463
1464 2016-02-19 Nick Clifton <nickc@redhat.com>
1465
1466 PR ld/19629
1467 * aoutx.h (aout_link_add_symbols): Check for out of range string
1468 table offsets.
1469
1470 PR ld/19628
1471 * reloc.c (bfd_generic_get_relocated_section_contents): Stop
1472 processing if we encounter a reloc without an associated symbol.
1473
1474 2016-02-18 H.J. Lu <hongjiu.lu@intel.com>
1475
1476 PR ld/19617
1477 * elflink.c (elf_link_add_object_symbols): Always create dynamic
1478 sections for -E/--dynamic-list.
1479
1480 2016-02-17 H.J. Lu <hongjiu.lu@intel.com>
1481
1482 * elf64-x86-64.c (elf_backend_omit_section_dynsym): New. Defined
1483 to bfd_true.
1484
1485 2016-02-16 Joseph Myers <joseph@codesourcery.com>
1486
1487 * plugin.c (plugin_vec): Set match priority to 255.
1488 * format.c (bfd_check_format_matches) [BFD_SUPPORTS_PLUGINS]: When
1489 matching against the plugin vector, take priority from there not
1490 from TEMP.
1491
1492 2016-02-15 Nick Clifton <nickc@redhat.com>
1493
1494 * elf-bfd.h (struct bfd_elf_special_section): Use unsigned values
1495 for length and type fields. Use a signed value for the
1496 suffix_length field.
1497
1498 2016-02-10 H.J. Lu <hongjiu.lu@intel.com>
1499
1500 PR ld/19601
1501 * elf32-i386.c (elf_i386_relocate_section): Mask off the least
1502 significant bit in GOT offset for R_386_GOT32X.
1503
1504 2016-02-10 Nick Clifton <nickc@redhat.com>
1505
1506 PR 19405
1507 * elf32-nios2.c (nios2_elf32_install_imm16): Allow for signed
1508 immediate values.
1509 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Limit the
1510 number of messages about FDE encoding preventing .eh_frame_hdr
1511 generation.
1512
1513 2016-02-09 Nick Clifton <nickc@redhat.com>
1514
1515 * oasys.c (oasys_archive_p): Fix indentation.
1516 * elf32-nds32.c (nds32_elf_relax_section): Use an unsigned
1517 constant for left shifting.
1518
1519 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Add a more
1520 helpful warning message to explain why certain AArch64 relocs
1521 might overflow.
1522
1523 2016-02-05 Simon Marchi <simon.marchi@ericsson.com>
1524
1525 * pe-mips.c (coff_mips_reloc): Fix formatting.
1526
1527 2016-02-05 Cupertino Miranda <Cupertino.Miranda@synopsys.com>
1528
1529 * cpu-arc.c: Change default archure from bfd_mach_arc_arcv2
1530 to bfd_mach_arc_arc600.
1531
1532 2016-02-04 Alan Modra <amodra@gmail.com>
1533
1534 * elf64-ppc.c (ppc64_elf_relocate_section): Adjust last patch
1535 for big-endian.
1536
1537 2016-02-02 H.J. Lu <hongjiu.lu@intel.com>
1538
1539 PR ld/19542
1540 * elf64-x86-64.c (elf_x86_64_convert_load): Store the estimated
1541 distances in the compressed_size field of the output section.
1542
1543 2016-02-02 Alan Modra <amodra@gmail.com>
1544
1545 * elf64-ppc.c (ppc64_elf_relocate_section): Further restrict
1546 ELFv2 entry optimization.
1547
1548 2016-02-02 H.J. Lu <hongjiu.lu@intel.com>
1549
1550 PR binutils/19547
1551 * elf.c (assign_section_numbers): Clear HAS_RELOC if there are
1552 no relocations in relocatable files.
1553
1554 2016-02-01 H.J. Lu <hongjiu.lu@intel.com>
1555
1556 PR ld/19553
1557 * elflink.c (elf_link_add_object_symbols): Don't add DT_NEEDED
1558 if a symbol from a library loaded via DT_NEEDED doesn't match
1559 the symbol referenced by regular object.
1560
1561 2016-02-01 Nathaniel Smith <njs@pobox.com>
1562
1563 * peicode.h (pe_ILF_build_a_bfd): Create an import symbol for both
1564 CODE and DATA.
1565
1566 2016-02-01 Alan Modra <amodra@gmail.com>
1567
1568 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Don't abort on
1569 an out of range reloc_index.
1570 * elf32-i386.c (elf_i386_get_plt_sym_val): Likewise.
1571
1572 2016-02-01 Kamil Rytarowski <n54@gmx.com>
1573
1574 * Makefile.am (OPTIONAL_BACKENDS): Add netbsd-core.lo.
1575 (OPTIONAL_BACKENDS_CFILES): Add netbsd-core.c.
1576 * Makefile.in: Regenerated.
1577
1578 2016-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
1579
1580 * elf64-s390.c (elf_s390_reloc_name_lookup): Fix indentation.
1581
1582 2016-01-31 John David Anglin <danglin@gcc.gnu.org>
1583
1584 PR ld/19526
1585 * elf32-hppa.c (elf32_hppa_final_link): Don't sort non-regular output
1586 files.
1587 * elf64-hppa.c (elf32_hppa_final_link): Likewise. Remove retval.
1588
1589 2016-01-30 H.J. Lu <hongjiu.lu@intel.com>
1590
1591 PR ld/19539
1592 * elf32-i386.c (elf_i386_reloc_type_class): Check relocation
1593 against STT_GNU_IFUNC symbol only with dynamic symbols.
1594 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise.
1595
1596 2016-01-28 H.J. Lu <hongjiu.lu@intel.com>
1597
1598 PR binutils/19523
1599 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Set BFD_DECOMPRESS to
1600 decompress debug sections.
1601
1602 2016-01-25 Maciej W. Rozycki <macro@imgtec.com>
1603
1604 * elf32-arc.c (elf_arc_finish_dynamic_symbol): Rename `index' to
1605 `dynindx'.
1606
1607 2016-01-25 Nick Clifton <nickc@redhat.com>
1608
1609 PR target/19435
1610 * mach-o.c (bfd_mach_o_close_and_cleanup): Suppress code to free
1611 dsym filename buffer.
1612
1613 2016-01-24 Maciej W. Rozycki <macro@imgtec.com>
1614
1615 * elfxx-mips.c (BZ16_REG_FIELD): Simplify calculation.
1616
1617 2016-01-24 Maciej W. Rozycki <macro@imgtec.com>
1618
1619 * elfxx-mips.c (BZ16_REG): Correct calculation.
1620
1621 2016-01-21 Nick Clifton <nickc@redhat.com>
1622
1623 * elf32-arc.c (ADD_RELA): Fix compile time warning errors by
1624 changing the type of _loc to be bfd_byte *.
1625 (elf_arc_finish_dynamic_symbol): Likewise.
1626
1627 2016-01-21 Nick Clifton <nickc@redhat.com>
1628
1629 PR ld/19455
1630 * elf32-arm.c (elf32_arm_create_dynamic_sections): Set the ELF
1631 class of the linker stub bfd.
1632 (elf32_arm_check_relocs): Skip check for pic format after
1633 processing a vxWorks R_ARM_ABS12 reloc.
1634 * elflink.c (bfd_elf_final_link): Check for ELFCLASSNONE when
1635 reporting a class mismatch.
1636
1637 2016-01-21 Jiong Wang <jiong.wang@arm.com>
1638
1639 * elfnn-aarch64.c (aarch64_type_of_stub): Allow insert long branch
1640 veneer for sym_sec != input_sec.
1641 (elfNN_aarch64_size_stub): Support STT_SECTION symbol.
1642 (elfNN_aarch64_final_link_relocate): Take rela addend into account when
1643 calculation destination.
1644
1645 2016-01-21 Alan Modra <amodra@gmail.com>
1646
1647 * elf-linux-core.h (swap_linux_prpsinfo32_out): New function.
1648 (swap_linux_prpsinfo64_out): New function.
1649 (LINUX_PRPSINFO32_SWAP_FIELDS): Delete.
1650 (LINUX_PRPSINFO64_SWAP_FIELDS): Delete.
1651 * elf.c (elfcore_write_linux_prpsinfo32): Adjust. Don't memset.
1652 (elfcore_write_linux_prpsinfo64): Likewise.
1653 * elf32-ppc.c (swap_ppc_linux_prpsinfo32_out): New function.
1654 (PPC_LINUX_PRPSINFO32_SWAP_FIELDS): Delete.
1655 (elfcore_write_ppc_linux_prpsinfo32): Adjust. Don't memset.
1656
1657 2016-01-21 Alan Modra <amodra@gmail.com>
1658
1659 * elf-linux-core.h: Rename from elf-linux-psinfo.h.
1660 * elf.c: Adjust #include.
1661 * elf32-ppc.c: Don't #include elf-linux-psinfo.h
1662 * Makefile.am (SOURCE_HFILES): Update.
1663 * Makefile.in: Regenerate.
1664 * po/SRC-PORFILES.in: Regenerate.
1665
1666 2016-01-21 Alan Modra <amodra@gmail.com>
1667
1668 * configure.ac: Move corefile selection later in file. Move
1669 tdefaults code immediately after other target vector code.
1670 * configure: Regenerate.
1671
1672 2016-01-20 Mickael Guene <mickael.guene@st.com>
1673
1674 * elf32-arm.c (elf32_arm_special_sections): Remove catch of noread
1675 section using '.text.noread' pattern.
1676
1677 2016-01-19 John Baldwin <jhb@FreeBSD.org>
1678
1679 * elf.c (elfcore_grok_note): Recognize NT_FREEBSD_THRMISC notes.
1680
1681 2016-01-18 Miranda Cupertino <Cupertino.Miranda@synopsys.com>
1682 Zissulescu Claudiu <Claudiu.Zissulescu@synopsys.com>
1683
1684 * arc-plt.def: New file.
1685 * arc-plt.h: Likewise.
1686 * elf32-arc.c (elf_arc_abs_plt0_entry, elf_arc_abs_pltn_entry,
1687 elf_arcV2_abs_plt0_entry, elf_arcV2_abs_pltn_entry,
1688 elf_arc_pic_plt0_entry, elf_arc_pic_pltn_entry,
1689 elf_arcV2_pic_plt0_entry, elf_arcV2_pic_pltn_entry): Remove.
1690 (name_for_global_symbol): Added.
1691 (ADD_RELA): Helper to create dynamic relocs.
1692 (new_got_entry_to_list): Create a new got entry in linked list.
1693 (symbol_has_entry_of_type): Search for specific type of entry in
1694 list.
1695 (is_reloc_for_GOT): return FALSE for any TLS related relocs.
1696 (is_reloc_for_TLS, arc_elf_set_private_flags)
1697 (arc_elf_print_private_bfd_data, arc_elf_copy_private_bfd_data)
1698 (arc_elf_merge_private_bfd_data): New functions.
1699 (debug_arc_reloc): Cleaned debug info printing.
1700 (PDATA reloc): Changed not to perform address alignment.
1701 (reverse_me): Added. Fix for ARC_32 relocs.
1702 (arc_do_relocation): Return bfd_reloc_of when no relocation should
1703 occur.
1704 (arc_get_local_got_ents): Renamed from arc_get_local_got_offsets.
1705 Changed function to access an array of list of GOT entries instead
1706 of just an array of offsets.
1707 (elf_arc_relocate_section): Added support for PIC and TLS related relocations.
1708 (elf_arc_check_relocs): Likewise.
1709 (elf_arc_adjust_dynamic_symbol, elf_arc_finish_dynamic_symbol,
1710 (elf_arc_finish_dynamic_sections): Likewise
1711 (arc_create_dynamic_sections): Modified conditions to create
1712 dynamic sections.
1713 (ADD_SYMBOL_REF_SEC_AND_RELOC): New macro.
1714 (plt_do_relocs_for_symbol, relocate_plt_for_symbol)
1715 (relocate_plt_for_entry): Changed to support new way to define PLT
1716 related code.
1717 (add_symbol_to_plt): Likewise.
1718 (arc_elf_link_hash_table_create): New function.
1719
1720 2016-01-18 Nick Clifton <nickc@redhat.com>
1721
1722 PR ld/19440
1723 * coff-rs6000.c (_bfd_xcoff_swap_sym_in): Sign extend external
1724 section number into internal section number.
1725 * coff64-rs6000.c (_bfd_xcoff64_swap_sym_in): Likewise.
1726 * coffswap.h (coff_swap_sym_in): Likewise.
1727 * peXXigen.c (_bfd_XXi_swap_sym_in): Likewise.
1728 * coffcode.h (_coff_bigobj_swap_sym_in): Make sure that internal
1729 section number field is big enough to hold the external value.
1730
1731 2016-01-17 Alan Modra <amodra@gmail.com>
1732
1733 * configure: Regenerate.
1734
1735 2016-01-12 Yury Usishchev <y.usishchev@samsung.com>
1736
1737 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Insert cantunwind
1738 when address in first unwind entry does not match start of
1739 section.
1740
1741 2016-01-08 Richard Sandiford <richard.sandiford@arm.com>
1742 Jiong Wang <jiong.wang@arm.com>
1743
1744 PR ld/19368
1745 * elf32-arm.c (elf32_arm_reloc_type_class): Map R_ARM_IRELATIVE to
1746 reloc_class_ifunc.
1747
1748 2016-01-06 Andrew Burgess <andrew.burgess@embecosm.com>
1749
1750 * elf32-arc.c (reloc_type_to_name): Change ARC_RELOC_HOWTO to
1751 place 'R_' before the reloc name returned.
1752 (elf_arc_howto_table): Change ARC_RELOC_HOWTO to place 'R_' before
1753 the relocation string.
1754
1755 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1756
1757 * elfxx-mips.c (mips_elf_merge_obj_abiflags): New function,
1758 factored out from...
1759 (_bfd_mips_elf_merge_private_bfd_data): ... here.
1760
1761 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1762
1763 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Move
1764 attribute check after ELF file header flag check.
1765
1766 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1767
1768 * elfxx-mips.c (mips_elf_merge_obj_attributes): Propagate the
1769 return status from `_bfd_elf_merge_object_attributes'.
1770
1771 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1772
1773 * elfxx-mips.c (mips_elf_merge_obj_e_flags): New function,
1774 factored out from...
1775 (_bfd_mips_elf_merge_private_bfd_data): ... here.
1776
1777 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1778
1779 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Fold the
1780 handling of input MIPS ABI flags together.
1781
1782 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1783
1784 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Suppress
1785 attribute checks for null input.
1786
1787 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1788
1789 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Use local
1790 pointers to target data.
1791
1792 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1793
1794 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
1795 an FP ABI warning.
1796
1797 2016-01-01 Alan Modra <amodra@gmail.com>
1798
1799 Update year range in copyright notice of all files.
1800
1801 For older changes see ChangeLog-2015 and doc/ChangeLog-0415
1802 \f
1803 Copyright (C) 2016 Free Software Foundation, Inc.
1804
1805 Copying and distribution of this file, with or without modification,
1806 are permitted in any medium without royalty provided the copyright
1807 notice and this notice are preserved.
1808
1809 Local Variables:
1810 mode: change-log
1811 left-margin: 8
1812 fill-column: 74
1813 version-control: never
1814 End:
This page took 0.079742 seconds and 4 git commands to generate.