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