1 2016-05-06 H.J. Lu <hongjiu.lu@intel.com>
3 * elf32-i386.c (elf_backend_add_symbol_hook): Defined for Intel
6 2016-05-05 H.J. Lu <hongjiu.lu@intel.com>
8 * elf32-i386.c (elf_i386_convert_load): Extract the GOT load
10 (elf_i386_convert_load_reloc): This. New function.
11 * elf64-x86-64.c (elf_x86_64_convert_load): Extract the GOT load
13 (elf_x86_64_convert_load_reloc): This. New function.
15 2016-05-05 H.J. Lu <hongjiu.lu@intel.com>
17 * elf32-i386.c (elf_i386_check_tls_transition): Remove abfd.
18 Don't check if contents == NULL.
19 (elf_i386_tls_transition): Add from_relocate_section. Check
20 from_relocate_section instead of contents != NULL. Update
21 elf_i386_check_tls_transition call.
22 (elf_i386_check_relocs): Cache the section contents if
23 keep_memory is FALSE. Pass FALSE as from_relocate_section to
24 elf_i386_tls_transition.
25 (elf_i386_relocate_section): Pass TRUE as from_relocate_section
26 to elf_i386_tls_transition.
27 (elf_backend_caches_rawsize): New.
28 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Don't check
30 (elf_x86_64_tls_transition): Add from_relocate_section. Check
31 from_relocate_section instead of contents != NULL.
32 (elf_x86_64_check_relocs): Cache the section contents if
33 keep_memory is FALSE. Pass FALSE as from_relocate_section to
34 elf_x86_64_tls_transition.
35 (elf_x86_64_relocate_section): Pass TRUE as from_relocate_section
36 to elf_x86_64_tls_transition.
37 (elf_backend_caches_rawsize): New.
39 2016-05-03 Maciej W. Rozycki <macro@imgtec.com>
42 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Handle
45 2016-05-03 Jiong Wang <jiong.wang@arm.com>
47 * bfd-in.h (bfd_elf64_aarch64_set_options): Update prototype.
48 * bfd-in2.h (bfd_elf64_aarch64_set_options): Likewise.
49 * elfnn-aarch64.c (bfd_elfNN_aarch64_set_options): Initialize
50 no_apply_dynamic_relocs.
51 (elfNN_aarch64_final_link_relocate): Apply absolute relocations even though
52 dynamic relocations generated.
54 2016-04-29 H.J. Lu <hongjiu.lu@intel.com>
56 * elf32-i386.c (elf_i386_size_dynamic_sections): Move interp
58 (elf_i386_create_dynamic_sections): Here.
59 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Move
61 (elf_x86_64_create_dynamic_sections): Here.
63 2016-04-29 H.J. Lu <hongjiu.lu@intel.com>
65 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take GOT_RELOC
66 and replace (EH)->has_got_reloc with GOT_RELOC.
67 (elf_i386_fixup_symbol): Pass has_got_reloc to
68 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
69 (elf_i386_allocate_dynrelocs): Likewise.
70 (elf_i386_relocate_section): Likewise.
71 (elf_i386_finish_dynamic_symbol): Likewise.
72 (elf_i386_convert_load): Pass TRUE to
73 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
74 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take
75 GOT_RELOC and replace (EH)->has_got_reloc with GOT_RELOC.
76 (elf_x86_64_fixup_symbol): Pass has_got_reloc to
77 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
78 (elf_x86_64_allocate_dynrelocs): Likewise.
79 (elf_x86_64_relocate_section): Likewise.
80 (elf_x86_64_finish_dynamic_symbol): Likewise.
81 (elf_x86_64_convert_load): Pass TRUE to
82 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
84 2016-04-29 H.J. Lu <hongjiu.lu@intel.com>
86 * elf32-i386.c (check_relocs_failed): New.
87 (elf_i386_check_relocs): Set check_relocs_failed on error.
88 (elf_i386_relocate_section): Skip if check_relocs failed.
90 2016-04-29 H.J. Lu <hongjiu.lu@intel.com>
92 * elf64-x86-64.c (elf_x86_64_check_relocs): Set
93 check_relocs_failed on error.
95 2016-04-29 Nick Clifton <nickc@redhat.com>
98 * elf-bfd.h (struct elf_backend_data): Rename
99 elf_backend_set_special_section_info_and_link to
100 elf_backend_copy_special_section_fields.
101 * elfxx-target.h: Likewise.
102 * elf.c (section_match): Ignore the SHF_INFO_LINK flag when
103 comparing section flags.
104 (copy_special_section_fields): New function.
105 (_bfd_elf_copy_private_bfd_data): Copy the EI_ABIVERSION field.
106 Perform two scans over special sections. The first one looks for
107 a direct mapping between the output section and an input section.
108 The second scan looks for a possible match based upon section
110 * elf32-arm.c (elf32_arm_copy_special_section_fields): New
111 function. Handle setting the sh_link field of SHT_ARM_EXIDX
113 * elf32-i386.c (elf32_i386_set_special_info_link): Rename to
114 elf32_i386_copy_solaris_special_section_fields.
115 * elf32-sparc.c (elf32_sparc_set_special_section_info_link):
116 Rename to elf32_sparc_copy_solaris_special_section_fields.
117 * elf64-x86-64.c (elf64_x86_64_set_special_info_link): Rename to
118 elf64_x86_64_copy_solaris_special_section_fields.
120 2016-04-28 Nick Clifton <nickc@redhat.com>
122 * po/zh_CN.po: Updated Chinese (simplified) translation.
124 2016-04-27 H.J. Lu <hongjiu.lu@intel.com>
127 * elf64-x86-64.c (elf_x86_64_convert_load): Skip debug sections
128 when estimating distances between output sections.
130 2016-04-27 Alan Modra <amodra@gmail.com>
132 * elflink.c (_bfd_elf_is_start_stop): New function.
133 (_bfd_elf_gc_mark_rsec): Use it.
134 * elf-bfd.h (_bfd_elf_is_start_stop): Declare.
136 2016-04-26 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
138 * elf32-rx.c (rx_set_section_contents): Avoid arithmetic on void *.
139 * mmo.c (mmo_get_section_contents): Likewise.
140 (mmo_set_section_contents): Likewise.
142 2016-04-26 H.J. Lu <hongjiu.lu@intel.com>
144 * elf-bfd.h (elf_link_hash_table): Update comments for
146 * elflink.c (_bfd_elf_link_renumber_dynsyms): Always count for
147 the unused NULL entry at the head of dynamic symbol table.
148 (bfd_elf_size_dynsym_hash_dynstr): Remove dynsymcount != 0
151 2016-04-21 H.J. Lu <hongjiu.lu@intel.com>
153 * elflink.c (_bfd_elf_link_create_dynstrtab): Exclude linker
154 created file from dynobj.
156 2016-04-21 H.J. Lu <hongjiu.lu@intel.com>
158 * elflink.c (_bfd_elf_link_create_dynstrtab): Set dynobj to a
159 normal input file if possible.
161 2016-04-21 Nick Clifton <nickc@redhat.com>
163 * aout-adobe.c: Use _bfd_generic_link_check_relocs.
164 * aout-target.h: Likewise.
165 * aout-tic30.c: Likewise.
166 * binary.c: Likewise.
168 * coff-alpha.c: Likewise.
169 * coff-rs6000.c: Likewise.
170 * coff64-rs6000.c: Likewise.
171 * coffcode.h: Likewise.
172 * i386msdos.c: Likewise.
173 * i386os9k.c: Likewise.
176 * libbfd-in.h: Likewise.
177 * libecoff.h: Likewise.
178 * mach-o-target.c: Likewise.
180 * nlm-target.h: Likewise.
183 * plugin.c: Likewise.
184 * ppcboot.c: Likewise.
187 * tekhex.c: Likewise.
188 * versados.c: Likewise.
189 * vms-alpha.c: Likewise.
191 * elfxx-target.h: Use _bfd_elf_link_check_relocs.
192 * linker.c (bfd_link_check_relocs): New function.
193 (_bfd_generic_link_check_relocs): New function.
194 * targets.c (BFD_JUMP_TABLE_LINK): Add initialization of
195 _bfd_link_check_relocs field.
196 (struct bfd_target)L Add _bfd_link_check_relocs field.
197 * bfd-in2.h: Regenerate.
198 * libbfd.h: Regenerate.
200 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
202 * elf32-i386.c (elf_i386_gc_sweep_hook): Removed.
203 (elf_backend_gc_sweep_hook): Likewise.
204 * elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise.
205 (elf_backend_gc_sweep_hook): Likewise.
207 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
209 * elflink.c (_bfd_elf_link_check_relocs): Don't check relocations
212 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
215 * elf64-x86-64.c (check_relocs_failed): New.
216 (elf_x86_64_need_pic): Moved before elf_x86_64_check_relocs.
217 Support relocation agaist local symbol. Set check_relocs_failed.
218 (elf_x86_64_check_relocs): Use elf_x86_64_need_pic. Check
219 R_X86_64_32 relocation overflow.
220 (elf_x86_64_relocate_section): Skip if check_relocs failed.
221 Update one elf_x86_64_need_pic and remove one elf_x86_64_need_pic.
223 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
225 * elf32-i386.c (elf_i386_check_relocs): Call
226 _bfd_elf_create_ifunc_sections only for STT_GNU_IFUNC symbol.
227 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
229 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
231 * elf-bfd.h (_bfd_elf_link_check_relocs): New.
232 * elflink.c (_bfd_elf_link_check_relocs): New function.
233 (elf_link_add_object_symbols): Call _bfd_elf_link_check_relocs
234 if check_relocs_after_open_input is FALSE.
236 2016-04-20 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
238 * cache.c: Update old style function definitions.
239 * elf32-m68k.c: Likewise.
240 * elf64-mmix.c: Likewise.
241 * stab-syms.c: Likewise.
243 2016-04-20 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
245 * elf32-arm.c (put_thumb2_insn): Change argument type to bfd_byte *.
247 2016-04-15 H.J. Lu <hongjiu.lu@intel.com>
249 * Makefile.in: Regenerated with automake 1.11.6.
250 * aclocal.m4: Likewise.
251 * doc/Makefile.in: Likewise.
253 2016-04-14 Andrew Burgess <andrew.burgess@embecosm.com>
255 * reloc.c: Add BFD_RELOC_ARC_NPS_CMEM16 entry.
256 * bfd-in2.h: Regenerate.
257 * libbfd.h: Regenerate.
258 * elf32-arc.c: Add 'opcode/arc.h' include.
259 (struct arc_relocation_data): Add symbol_name.
260 (arc_special_overflow_checks): New function.
261 (arc_do_relocation): Use arc_special_overflow_checks, reindent as
262 required, add an extra comment.
263 (elf_arc_relocate_section): Setup symbol_name in reloc_data.
265 2016-04-14 Andrew Burgess <andrew.burgess@embecosm.com>
267 * elf32-arc.c (tls_got_entries): Add 'TLS_GOT_' prefix to all
269 (elf_arc_relocate_section): Update enum uses.
270 (elf_arc_check_relocs): Likewise.
271 (elf_arc_finish_dynamic_symbol): Likewise.
273 2016-04-14 H.J. Lu <hongjiu.lu@intel.com>
275 * elf.c (_bfd_elf_copy_private_bfd_data): Replace "link" with
278 2016-04-14 Nick Clifton <nickc@redhat.com>
281 * elf-bbfd.h (struct elf_backend_data): New field:
283 New field: elf_backend_set_special_section_info_and_link
284 * elfxx-target.h (elf_backend_strtab_flags): Define if not already
286 (elf_backend_set_special_section_info_and_link): Define if not
288 (elfNN_bed): Use elf_backend_set_special_section_info_and_link and
289 elf_backend_strtab_flags macros to initialise fields in structure.
290 * elf.c (_bfd_elf_make_section_from_shdr): Check for SHF_STRINGS
291 being set even if SHF_MERGE is not set.
292 (elf_fake_sections): Likewise.
293 (section_match): New function. Matches two ELF sections based
294 upon fixed characteristics.
295 (find_link): New function. Locates a section in a BFD that
296 matches a section in a different BFD.
297 (_bfd_elf_copy_private_bfd_data): Copy the sh_info and sh_link
298 fields of reserved sections.
299 (bfd_elf_compute_section_file_positions): Set the flags for the
300 .shstrtab section based upon the elf_strtab_flags field in the
301 elf_backend_data structure.
302 (swap_out_syms): Likewise for the .strtab section.
303 * elflink.c (bfd_elf_final_link): Set the flags for the
304 .strtab section based upon the elf_strtab_flags field in the
305 elf_backend_data structure.
306 * elf32-i386.c (elf32_i386_set_special_info_link): New function.
307 (elf_backend_strtab_flags): Set to SHF_STRINGS for Solaris
309 (elf_backend_set_special_section_info_and_link): Define for
311 * elf32-sparc.c: Likewise.
312 * elf64-x86-64.c: Likewise.
314 2016-04-11 H.J. Lu <hongjiu.lu@intel.com>
317 * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): Add a pointer
319 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Updated.
320 Set *readonly_dynrelocs_against_ifunc_p to TRUE if dynamic reloc
321 applies to read-only section.
322 * elf32-i386.c (elf_i386_link_hash_table): Add
323 readonly_dynrelocs_against_ifunc.
324 (elf_i386_allocate_dynrelocs): Updated.
325 (elf_i386_size_dynamic_sections): Issue an error for read-only
326 segment with dynamic IFUNC relocations only if
327 readonly_dynrelocs_against_ifunc is TRUE.
328 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
329 readonly_dynrelocs_against_ifunc.
330 (elf_x86_64_allocate_dynrelocs): Updated.
331 (elf_x86_64_size_dynamic_sections): Issue an error for read-only
332 segment with dynamic IFUNC relocations only if
333 readonly_dynrelocs_against_ifunc is TRUE.
334 * elfnn-aarch64.c (elfNN_aarch64_allocate_ifunc_dynrelocs):
337 2016-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
339 * elf32-arm.c (elf32_arm_size_stubs): Move error_ret_free_local to be
340 a fall through from error_ret_free_internal. Free local_syms in
341 error_ret_free_local if allocated from bfd_elf_get_elf_syms ().
343 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
345 * elf32-arc.c (plt_do_relocs_for_symbol): Changed.
346 (relocate_plt_for_entry): Likewise.
348 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
350 * elf32-arc.c (elf_arc_check_relocs): Changed
352 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
354 * elf32-arc.c (name_for_global_symbol): Changed assert.
355 (get_replace_function): Created.:
356 (struct arc_relocation_data): Changed to signed types.
357 (defines S, L, P, PDATA): Casted to signed type.
358 (defines SECTSTART, _SDA_BASE_, TLS_REL): Likewise.
359 (PRINT_DEBUG_RELOC_INFO_BEFORE): Changed.
360 (arc_do_relocation): Changed.
362 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
364 * elf32-arc.c (name_for_global_symbol): Added assert to check for
366 (elf_arc_relocate_section): Added and changed asserts, validating
367 the synamic symbol index.
368 (elf_arc_finish_dynamic_symbol): Do not fill the dynamic
369 relocation if symbol has dynindx set to -1.
371 2016-04-05 Maciej W. Rozycki <macro@imgtec.com>
373 * elflink.c (elf_link_add_object_symbols): Always turn hidden
374 and internal symbols which have a dynamic index into local
377 2016-04-04 Nick Clifton <nickc@redhat.com>
380 * dwarf2.c (parse_comp_unit): Skip warning about unrecognised
381 version number if the version is zero.
383 2016-04-01 Alan Modra <amodra@gmail.com>
386 * elflink.c (on_needed_list): Recursively check needed status.
387 (elf_link_add_object_symbols): Adjust.
389 2016-03-30 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
391 * elf32-avr.c (avr_elf32_load_records_from_section): Free
392 internal_relocs only if they aren't cached.
394 2016-03-29 Nick Clifton <nickc@redhat.com>
397 * elf32-bfin.c (elf32_bfinfdpic_finish_dynamic_sections): Relax
398 assertion on the size of the got section to allow it to be bigger
399 than the number of relocs.
401 2016-03-29 Toni Spets <toni.spets@iki.fi>
404 * coffcode.h (coff_write_object_contents): Revert accidental
407 2016-03-22 Alan Modra <amodra@gmail.com>
410 * dwarf2.c (read_attribute_value): Skip info_ptr check for
411 DW_FORM_flag_present.
413 2016-03-22 Nick Clifton <nickc@redhat.com>
415 * cpu-v850_rh850.c (arch_info_struct): Restore v850-rh850 as an
416 architecture name for backwards compatibility.
418 * peXXigen.c (_bfd_XXi_write_codeview_record): Fix possible
421 * warning.m4 (GCC_WARN_CFLAGS): Only add -Wstack-usage if using a
422 sufficiently recent version of GCC.
423 * configure: Regenerate.
425 2016-03-22 Alan Modra <amodra@gmail.com>
428 * plugin.c (try_load_plugin): Avoid -Wstack-usage warning.
430 2016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
432 * archures.c (bfd_mach_arc_nps400): Define.
433 * bfd-in2.h: Regenerate.
434 * cpu-arc.c (arch_info_struct): New entry for nps400, renumber
435 some existing entries to make space.
436 * elf32-arc.c (arc_elf_object_p): Add nps400 case.
437 (arc_elf_final_write_processing): Likewise.
439 2016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
441 * elf32-arc.c (arc_elf_print_private_bfd_data): Remove use of
443 (arc_elf_final_write_processing): Don't bother setting cpu field
444 in e_flags, this will have been set elsewhere.
446 2016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
448 * elf32-arc.c (arc_elf_final_write_processing): Switch to using
451 2016-03-21 Nick Clifton <nickc@redhat.com>
453 * warning.m4 (GCC_WARN_CFLAGS): Add -Wstack-usage=262144
454 * configure: Regenerate.
455 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Replace use of
456 alloca with call to xmalloc.
457 * elf32-nds32.c: Likewise.
458 * elf64-hppa.c: Likewise.
459 * elfxx-mips.c: Likewise.
461 * pei-x86_64.c: Likewise.
465 2016-03-15 H.J. Lu <hongjiu.lu@intel.com>
468 * elf32-i386.c (elf_i386_check_relocs): Bind defined symbol
470 (elf_i386_relocate_section): Likewise.
471 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
472 (elf_x86_64_relocate_section): Likewise.
474 2016-03-15 H.J. Lu <hongjiu.lu@intel.com>
477 * elf64-x86-64.c (elf_x86_64_relocate_section): Check
478 no_reloc_overflow_check to diable R_X86_64_32/R_X86_64_32S
479 relocation overflow check.
481 2016-03-14 H.J. Lu <hongjiu.lu@intel.com>
483 * bfd-in2.h: Regenerated.
485 2016-03-11 Dan Gissel <dgisselq@ieee.org>
488 * elf.c (_bfd_elf_section_offset): Ensure that the returned offset
489 uses bytes not octets.
490 * elflink.c (resolve_section): Likewise.
492 (eval_section): Pass the input_bfd to resolve_section.
493 (bfd_elf_perform_complex_relocation): Convert byte offset to
494 octets before read and writing values.
495 (elf_link_input_bfd): Add byte to octet conversions.
496 (elf_reloc_link_order): Likewise.
497 (elf_fixup_link_order): Likewise.
498 (bfd_elf_final_link): Likewise.
499 * reloc.c (_bfd_final_link_relocate): Likewise.
500 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
502 2016-03-10 Nick Clifton <nickc@redhat.com>
504 * config.bfd: Mark the i370 target as obsolete.
506 2016-03-09 Pedro Alves <palves@redhat.com>
508 * cpu-v850.c (N): Append ":old-gcc-abi" instead of " (using old
509 gcc ABI)" to printable name.
510 * cpu-v850_rh850.c (bfd_v850_rh850_arch): Use "v850:rh850" instead
511 of "v850-rh850" as printable name.
513 2016-03-09 Leon Winter <winter-gcc@bfw-online.de>
516 * cofflink.c (_bfd_coff_generic_relocate_section): Do not apply
517 relocations against absolute symbols.
519 2016-03-09 Alan Modra <amodra@gmail.com>
522 * coff-alpha.c (alpha_ecoff_openr_next_archived_file): Allow zero
523 length elements in the archive.
525 2016-03-08 H.J. Lu <hongjiu.lu@intel.com>
528 * elflink.c (elf_link_add_object_symbols): Create dynamic sections
529 for -E/--dynamic-list only when not relocatable.
531 2016-03-08 H.J. Lu <hongjiu.lu@intel.com>
534 * elf32-i386.c (elf_i386_check_relocs): Increment PLT reference
535 count for locally defined local IFUNC symbols in shared object.
536 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
538 2016-03-08 H.J. Lu <hongjiu.lu@intel.com>
541 * elflink.c (_bfd_elf_merge_symbol): Group common symbol checking
544 2016-03-08 Cupertino Miranda <Cupertino.Miranda@synopsys.com>
545 Andrew Burgess <andrew.burgess@embecosm.com>
547 * elf32-arc.c (arc_bfd_get_32): Becomes an alias for bfd_get_32.
548 (arc_bfd_put_32): Becomes an alias for bfd_put_32.
549 (arc_elf_howto_init): Added assert to validate relocations.
550 (get_middle_endian_relocation): Delete.
551 (middle_endian_convert): New function.
552 (ME): Redefine, now does nothing.
554 (arc_do_relocation): Extend the attached 'ARC_RELOC_HOWTO'
555 definition to call middle_endian_convert. Add a new local
556 variable and make use of this throughout. Added call to
557 arc_bfd_get_8 and arc_bfd_put_8 for 8 bit relocations.
559 2016-03-07 Nick Clifton <nickc@redhat.com>
562 * archive.c (bfd_generic_openr_next_archived_file): Allow zero
563 length elements in the archive.
565 2016-03-07 Jiong Wang <jiong.wang@arm.com>
567 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Always create .got
568 section if the symbol "_GLOBAL_OFFSET_TABLE_" is referenced.
570 2016-03-04 H.J. Lu <hongjiu.lu@intel.com>
573 * elflink.c (_bfd_elf_merge_symbol): Treat common symbol in
574 executable as definition if the new definition comes from a
577 2016-03-02 Alan Modra <amodra@gmail.com>
579 * Makefile.in: Regenerate.
580 * po/SRC-POTFILES.in: Regenerate.
582 2016-02-29 Cupertino Miranda <cmiranda@synopsys.com>
584 * elf32-arc.c (elf_arc_relocate_section): Added rules to fix the
585 relocation addend when sections get merged.
587 2016-02-29 Cupertino Miranda <Cupertino.Miranda@synopsys.com>
589 * elf32-arc.c (arc_elf_final_write_processing): Add condition to
591 (elf_arc_relocate_section): Fixes and conditions to support PIE.
592 Assert for code sections dynamic relocs.
594 2016-02-26 Renlin Li <renlin.li@arm.com>
596 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix signed overflow
597 check for MOVW_SABS_G0, MOVW_SABS_G1, MOVW_SABS_G2.
599 2016-02-26 H.J. Lu <hongjiu.lu@intel.com>
602 * elf32-i386.c (elf_i386_convert_load): Convert to R_386_32 for
603 load with locally bound symbols if PIC is false or there is no
604 base register. Optimize branch to 0 if PIC is false.
605 (elf_i386_relocate_section): Don't generate dynamic relocations
606 against undefined weak symbols if PIC is false.
607 * elf64-x86-64.c (elf_x86_64_convert_load): Disable optimization
608 if we can't estimate relocation overflow with --no-relax.
609 Convert to R_X86_64_32S/R_X86_64_32 for load with locally bound
610 symbols if PIC is false. Optimize branch to 0 if PIC is false.
611 (elf_x86_64_relocate_section): Don't generate dynamic relocations
612 against undefined weak symbols if PIC is false.
614 2016-02-26 H.J. Lu <hongjiu.lu@intel.com>
617 * bfd.c (bfd): Change flags to 20 bits.
618 (BFD_CONVERT_ELF_COMMON): New.
619 (BFD_USE_ELF_STT_COMMON): Likewise.
620 (BFD_FLAGS_SAVED): Add BFD_CONVERT_ELF_COMMON and
621 BFD_USE_ELF_STT_COMMON.
622 (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
623 * configure.ac: Remove --enable-elf-stt-common.
624 * elf.c (swap_out_syms): Choose STT_COMMON or STT_OBJECT for
625 common symbol depending on BFD_CONVERT_ELF_COMMON and
626 BFD_USE_ELF_STT_COMMON.
627 * elfcode.h (elf_slurp_symbol_table): Set BSF_ELF_COMMON for
629 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Also check
631 (elf_link_convert_common_type): New function.
632 (elf_link_output_extsym): Choose STT_COMMON or STT_OBJECT for
633 common symbol depending on BFD_CONVERT_ELF_COMMON and
634 BFD_USE_ELF_STT_COMMON. Set sym.st_info after sym.st_shndx.
635 * elfxx-target.h (TARGET_BIG_SYM): Add BFD_CONVERT_ELF_COMMON
636 and BFD_USE_ELF_STT_COMMON to object_flags.
637 (TARGET_LITTLE_SYM): Likewise.
638 * syms.c (BSF_KEEP_G): Renamed to ...
639 (BSF_ELF_COMMON): This.
640 * bfd-in2.h: Regenerated.
641 * config.in: Likewise.
642 * configure: Likewise.
644 2016-02-26 H.J. Lu <hongjiu.lu@intel.com>
649 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
650 (elf_i386_link_hash_entry): Add has_got_reloc and
652 (elf_i386_link_hash_table): Add interp.
653 (elf_i386_link_hash_newfunc): Initialize has_got_reloc and
655 (elf_i386_copy_indirect_symbol): Copy has_got_reloc and
657 (elf_i386_check_relocs): Set has_got_reloc and has_non_got_reloc.
658 (elf_i386_fixup_symbol): New function.
659 (elf_i386_pie_finish_undefweak_symbol): Likewise.
660 (elf_i386_allocate_dynrelocs): Don't allocate space for dynamic
661 relocations and discard relocations against resolved undefined
662 weak symbols in executable. Don't make resolved undefined weak
663 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
664 relocation against undefined weak symbols in PIE.
665 (elf_i386_size_dynamic_sections): Set interp to .interp section.
666 (elf_i386_relocate_section): Don't generate dynamic relocations
667 against resolved undefined weak symbols in PIE, except for
669 (elf_i386_finish_dynamic_symbol): Keep PLT/GOT entries without
670 dynamic PLT/GOT relocations for resolved undefined weak symbols.
671 Don't generate dynamic relocation against resolved undefined weak
672 symbol in executable.
673 (elf_i386_finish_dynamic_sections): Call
674 elf_i386_pie_finish_undefweak_symbol on all symbols in PIE.
675 (elf_backend_fixup_symbol): New.
676 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
677 (elf_x86_64_link_hash_entry): Add has_got_reloc and
679 (elf_x86_64_link_hash_table): Add interp.
680 (elf_x86_64_link_hash_newfunc): Initialize has_got_reloc and
682 (elf_x86_64_copy_indirect_symbol): Copy has_got_reloc and
684 (elf_x86_64_check_relocs): Set has_got_reloc and
686 (elf_x86_64_fixup_symbol): New function.
687 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
688 (elf_x86_64_allocate_dynrelocs): Don't allocate space for dynamic
689 relocations and discard relocations against resolved undefined
690 weak symbols in executable. Don't make resolved undefined weak
691 symbols in executable dynamic.
692 (elf_x86_64_size_dynamic_sections): Set interp to .interp section.
693 (elf_x86_64_relocate_section): Check relocation overflow for
694 dynamic relocations against unresolved weak undefined symbols.
695 Don't generate dynamic relocations against resolved weak
696 undefined symbols in PIE.
697 (elf_x86_64_finish_dynamic_symbol): Keep PLT/GOT entries without
698 dynamic PLT/GOT relocations for resolved undefined weak symbols.
699 Don't generate dynamic relocation against resolved undefined weak
700 symbol in executable.
701 (elf_x86_64_finish_dynamic_sections): Call
702 elf_x86_64_pie_finish_undefweak_symbol on all symbols in PIE.
703 (elf_backend_fixup_symbol): New.
705 2016-02-26 Alan Modra <amodra@gmail.com>
707 * elf64-ppc.c (create_linkage_sections): Create sfpr when
708 save_restore_funcs, rest of sections when not relocatable.
709 (ppc64_elf_init_stub_bfd): Always call create_linkage_sections.
710 (sfpr_define): Define all symbols on emitted code.
711 (ppc64_elf_func_desc_adjust): Adjust for sfpr now being created
712 when relocatable. Move sfpr_define loop earlier.
714 2016-02-24 H.J. Lu <hongjiu.lu@intel.com>
716 * elf64-x86-64.c (elf_x86_64_need_pic): New function.
717 (elf_x86_64_relocate_section): Use it. Replace
718 x86_64_elf_howto_table[r_type] with howto.
720 2016-02-24 H.J. Lu <hongjiu.lu@intel.com>
723 * elflink.c (bfd_elf_record_link_assignment): Set versioned if
724 symbol version is unknown.
726 2016-02-24 H.J. Lu <hongjiu.lu@intel.com>
728 * elf32-i386.c (elf_i386_allocate_dynrelocs): Set plt_got.offset
729 to (bfd_vma) -1 when setting needs_plt to 0.
730 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
732 2016-02-23 H.J. Lu <hongjiu.lu@intel.com>
734 * elflink.c (bfd_elf_record_link_assignment): Check for shared
735 library, instead of PIC, and don't check PDE when making linker
736 assigned symbol dynamic.
738 2016-02-23 Faraz Shahbazker <faraz.shahbazker@imgtec.com>
740 * bfd/elfxx-mips.c (_bfd_mips_post_process_headers): Increment
741 ABIVERSION for non-executable stack.
743 2016-02-23 Rich Felker <bugdal@aerifal.cx>
746 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol):
747 Always produce a RELATIVE reloc for a local symbol.
749 2016-02-23 Hans-Peter Nilsson <hp@axis.com>
751 Fix test-case ld-elf/pr19617b
752 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
753 discard unused non-function symbols when --dynamic-list-data.
755 2016-02-22 H.J. Lu <hongjiu.lu@intel.com>
757 * elflink.c (_bfd_elf_link_renumber_dynsyms): Always create the
758 dynsym section, even if it is empty, with dynamic sections.
760 2016-02-22 H.J. Lu <hongjiu.lu@intel.com>
762 * syms.c: Remove BSF_COMMON from comments.
763 * bfd-in2.h: Regenerated.
765 2016-02-22 Jiong Wang <jiong.wang@arm.com>
767 * elfnn-aarch64. (aarch64_type_of_stub): Remove redundation calcuation
768 for destination. Remove useless function parameters.
769 (elfNN_aarch64_size_stubs): Update parameters for aarch64_type_of_stub.
771 2016-02-19 Nick Clifton <nickc@redhat.com>
774 * aoutx.h (aout_link_add_symbols): Check for out of range string
778 * reloc.c (bfd_generic_get_relocated_section_contents): Stop
779 processing if we encounter a reloc without an associated symbol.
781 2016-02-18 H.J. Lu <hongjiu.lu@intel.com>
784 * elflink.c (elf_link_add_object_symbols): Always create dynamic
785 sections for -E/--dynamic-list.
787 2016-02-17 H.J. Lu <hongjiu.lu@intel.com>
789 * elf64-x86-64.c (elf_backend_omit_section_dynsym): New. Defined
792 2016-02-16 Joseph Myers <joseph@codesourcery.com>
794 * plugin.c (plugin_vec): Set match priority to 255.
795 * format.c (bfd_check_format_matches) [BFD_SUPPORTS_PLUGINS]: When
796 matching against the plugin vector, take priority from there not
799 2016-02-15 Nick Clifton <nickc@redhat.com>
801 * elf-bfd.h (struct bfd_elf_special_section): Use unsigned values
802 for length and type fields. Use a signed value for the
805 2016-02-10 H.J. Lu <hongjiu.lu@intel.com>
808 * elf32-i386.c (elf_i386_relocate_section): Mask off the least
809 significant bit in GOT offset for R_386_GOT32X.
811 2016-02-10 Nick Clifton <nickc@redhat.com>
814 * elf32-nios2.c (nios2_elf32_install_imm16): Allow for signed
816 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Limit the
817 number of messages about FDE encoding preventing .eh_frame_hdr
820 2016-02-09 Nick Clifton <nickc@redhat.com>
822 * oasys.c (oasys_archive_p): Fix indentation.
823 * elf32-nds32.c (nds32_elf_relax_section): Use an unsigned
824 constant for left shifting.
826 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Add a more
827 helpful warning message to explain why certain AArch64 relocs
830 2016-02-05 Simon Marchi <simon.marchi@ericsson.com>
832 * pe-mips.c (coff_mips_reloc): Fix formatting.
834 2016-02-05 Cupertino Miranda <Cupertino.Miranda@synopsys.com>
836 * cpu-arc.c: Change default archure from bfd_mach_arc_arcv2
837 to bfd_mach_arc_arc600.
839 2016-02-04 Alan Modra <amodra@gmail.com>
841 * elf64-ppc.c (ppc64_elf_relocate_section): Adjust last patch
844 2016-02-02 H.J. Lu <hongjiu.lu@intel.com>
847 * elf64-x86-64.c (elf_x86_64_convert_load): Store the estimated
848 distances in the compressed_size field of the output section.
850 2016-02-02 Alan Modra <amodra@gmail.com>
852 * elf64-ppc.c (ppc64_elf_relocate_section): Further restrict
853 ELFv2 entry optimization.
855 2016-02-02 H.J. Lu <hongjiu.lu@intel.com>
858 * elf.c (assign_section_numbers): Clear HAS_RELOC if there are
859 no relocations in relocatable files.
861 2016-02-01 H.J. Lu <hongjiu.lu@intel.com>
864 * elflink.c (elf_link_add_object_symbols): Don't add DT_NEEDED
865 if a symbol from a library loaded via DT_NEEDED doesn't match
866 the symbol referenced by regular object.
868 2016-02-01 Nathaniel Smith <njs@pobox.com>
870 * peicode.h (pe_ILF_build_a_bfd): Create an import symbol for both
873 2016-02-01 Alan Modra <amodra@gmail.com>
875 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Don't abort on
876 an out of range reloc_index.
877 * elf32-i386.c (elf_i386_get_plt_sym_val): Likewise.
879 2016-02-01 Kamil Rytarowski <n54@gmx.com>
881 * Makefile.am (OPTIONAL_BACKENDS): Add netbsd-core.lo.
882 (OPTIONAL_BACKENDS_CFILES): Add netbsd-core.c.
883 * Makefile.in: Regenerated.
885 2016-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
887 * elf64-s390.c (elf_s390_reloc_name_lookup): Fix indentation.
889 2016-01-31 John David Anglin <danglin@gcc.gnu.org>
892 * elf32-hppa.c (elf32_hppa_final_link): Don't sort non-regular output
894 * elf64-hppa.c (elf32_hppa_final_link): Likewise. Remove retval.
896 2016-01-30 H.J. Lu <hongjiu.lu@intel.com>
899 * elf32-i386.c (elf_i386_reloc_type_class): Check relocation
900 against STT_GNU_IFUNC symbol only with dynamic symbols.
901 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise.
903 2016-01-28 H.J. Lu <hongjiu.lu@intel.com>
906 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Set BFD_DECOMPRESS to
907 decompress debug sections.
909 2016-01-25 Maciej W. Rozycki <macro@imgtec.com>
911 * elf32-arc.c (elf_arc_finish_dynamic_symbol): Rename `index' to
914 2016-01-25 Nick Clifton <nickc@redhat.com>
917 * mach-o.c (bfd_mach_o_close_and_cleanup): Suppress code to free
918 dsym filename buffer.
920 2016-01-24 Maciej W. Rozycki <macro@imgtec.com>
922 * elfxx-mips.c (BZ16_REG_FIELD): Simplify calculation.
924 2016-01-24 Maciej W. Rozycki <macro@imgtec.com>
926 * elfxx-mips.c (BZ16_REG): Correct calculation.
928 2016-01-21 Nick Clifton <nickc@redhat.com>
930 * elf32-arc.c (ADD_RELA): Fix compile time warning errors by
931 changing the type of _loc to be bfd_byte *.
932 (elf_arc_finish_dynamic_symbol): Likewise.
934 2016-01-21 Nick Clifton <nickc@redhat.com>
937 * elf32-arm.c (elf32_arm_create_dynamic_sections): Set the ELF
938 class of the linker stub bfd.
939 (elf32_arm_check_relocs): Skip check for pic format after
940 processing a vxWorks R_ARM_ABS12 reloc.
941 * elflink.c (bfd_elf_final_link): Check for ELFCLASSNONE when
942 reporting a class mismatch.
944 2016-01-21 Jiong Wang <jiong.wang@arm.com>
946 * elfnn-aarch64.c (aarch64_type_of_stub): Allow insert long branch
947 veneer for sym_sec != input_sec.
948 (elfNN_aarch64_size_stub): Support STT_SECTION symbol.
949 (elfNN_aarch64_final_link_relocate): Take rela addend into account when
950 calculation destination.
952 2016-01-21 Alan Modra <amodra@gmail.com>
954 * elf-linux-core.h (swap_linux_prpsinfo32_out): New function.
955 (swap_linux_prpsinfo64_out): New function.
956 (LINUX_PRPSINFO32_SWAP_FIELDS): Delete.
957 (LINUX_PRPSINFO64_SWAP_FIELDS): Delete.
958 * elf.c (elfcore_write_linux_prpsinfo32): Adjust. Don't memset.
959 (elfcore_write_linux_prpsinfo64): Likewise.
960 * elf32-ppc.c (swap_ppc_linux_prpsinfo32_out): New function.
961 (PPC_LINUX_PRPSINFO32_SWAP_FIELDS): Delete.
962 (elfcore_write_ppc_linux_prpsinfo32): Adjust. Don't memset.
964 2016-01-21 Alan Modra <amodra@gmail.com>
966 * elf-linux-core.h: Rename from elf-linux-psinfo.h.
967 * elf.c: Adjust #include.
968 * elf32-ppc.c: Don't #include elf-linux-psinfo.h
969 * Makefile.am (SOURCE_HFILES): Update.
970 * Makefile.in: Regenerate.
971 * po/SRC-PORFILES.in: Regenerate.
973 2016-01-21 Alan Modra <amodra@gmail.com>
975 * configure.ac: Move corefile selection later in file. Move
976 tdefaults code immediately after other target vector code.
977 * configure: Regenerate.
979 2016-01-20 Mickael Guene <mickael.guene@st.com>
981 * elf32-arm.c (elf32_arm_special_sections): Remove catch of noread
982 section using '.text.noread' pattern.
984 2016-01-19 John Baldwin <jhb@FreeBSD.org>
986 * elf.c (elfcore_grok_note): Recognize NT_FREEBSD_THRMISC notes.
988 2016-01-18 Miranda Cupertino <Cupertino.Miranda@synopsys.com>
989 Zissulescu Claudiu <Claudiu.Zissulescu@synopsys.com>
991 * arc-plt.def: New file.
992 * arc-plt.h: Likewise.
993 * elf32-arc.c (elf_arc_abs_plt0_entry, elf_arc_abs_pltn_entry,
994 elf_arcV2_abs_plt0_entry, elf_arcV2_abs_pltn_entry,
995 elf_arc_pic_plt0_entry, elf_arc_pic_pltn_entry,
996 elf_arcV2_pic_plt0_entry, elf_arcV2_pic_pltn_entry): Remove.
997 (name_for_global_symbol): Added.
998 (ADD_RELA): Helper to create dynamic relocs.
999 (new_got_entry_to_list): Create a new got entry in linked list.
1000 (symbol_has_entry_of_type): Search for specific type of entry in
1002 (is_reloc_for_GOT): return FALSE for any TLS related relocs.
1003 (is_reloc_for_TLS, arc_elf_set_private_flags)
1004 (arc_elf_print_private_bfd_data, arc_elf_copy_private_bfd_data)
1005 (arc_elf_merge_private_bfd_data): New functions.
1006 (debug_arc_reloc): Cleaned debug info printing.
1007 (PDATA reloc): Changed not to perform address alignment.
1008 (reverse_me): Added. Fix for ARC_32 relocs.
1009 (arc_do_relocation): Return bfd_reloc_of when no relocation should
1011 (arc_get_local_got_ents): Renamed from arc_get_local_got_offsets.
1012 Changed function to access an array of list of GOT entries instead
1013 of just an array of offsets.
1014 (elf_arc_relocate_section): Added support for PIC and TLS related relocations.
1015 (elf_arc_check_relocs): Likewise.
1016 (elf_arc_adjust_dynamic_symbol, elf_arc_finish_dynamic_symbol,
1017 (elf_arc_finish_dynamic_sections): Likewise
1018 (arc_create_dynamic_sections): Modified conditions to create
1020 (ADD_SYMBOL_REF_SEC_AND_RELOC): New macro.
1021 (plt_do_relocs_for_symbol, relocate_plt_for_symbol)
1022 (relocate_plt_for_entry): Changed to support new way to define PLT
1024 (add_symbol_to_plt): Likewise.
1025 (arc_elf_link_hash_table_create): New function.
1027 2016-01-18 Nick Clifton <nickc@redhat.com>
1030 * coff-rs6000.c (_bfd_xcoff_swap_sym_in): Sign extend external
1031 section number into internal section number.
1032 * coff64-rs6000.c (_bfd_xcoff64_swap_sym_in): Likewise.
1033 * coffswap.h (coff_swap_sym_in): Likewise.
1034 * peXXigen.c (_bfd_XXi_swap_sym_in): Likewise.
1035 * coffcode.h (_coff_bigobj_swap_sym_in): Make sure that internal
1036 section number field is big enough to hold the external value.
1038 2016-01-17 Alan Modra <amodra@gmail.com>
1040 * configure: Regenerate.
1042 2016-01-12 Yury Usishchev <y.usishchev@samsung.com>
1044 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Insert cantunwind
1045 when address in first unwind entry does not match start of
1048 2016-01-08 Richard Sandiford <richard.sandiford@arm.com>
1049 Jiong Wang <jiong.wang@arm.com>
1052 * elf32-arm.c (elf32_arm_reloc_type_class): Map R_ARM_IRELATIVE to
1055 2016-01-06 Andrew Burgess <andrew.burgess@embecosm.com>
1057 * elf32-arc.c (reloc_type_to_name): Change ARC_RELOC_HOWTO to
1058 place 'R_' before the reloc name returned.
1059 (elf_arc_howto_table): Change ARC_RELOC_HOWTO to place 'R_' before
1060 the relocation string.
1062 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1064 * elfxx-mips.c (mips_elf_merge_obj_abiflags): New function,
1065 factored out from...
1066 (_bfd_mips_elf_merge_private_bfd_data): ... here.
1068 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1070 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Move
1071 attribute check after ELF file header flag check.
1073 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1075 * elfxx-mips.c (mips_elf_merge_obj_attributes): Propagate the
1076 return status from `_bfd_elf_merge_object_attributes'.
1078 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1080 * elfxx-mips.c (mips_elf_merge_obj_e_flags): New function,
1081 factored out from...
1082 (_bfd_mips_elf_merge_private_bfd_data): ... here.
1084 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1086 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Fold the
1087 handling of input MIPS ABI flags together.
1089 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1091 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Suppress
1092 attribute checks for null input.
1094 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1096 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Use local
1097 pointers to target data.
1099 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1101 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
1104 2016-01-01 Alan Modra <amodra@gmail.com>
1106 Update year range in copyright notice of all files.
1108 For older changes see ChangeLog-2015 and doc/ChangeLog-0415
1110 Copyright (C) 2016 Free Software Foundation, Inc.
1112 Copying and distribution of this file, with or without modification,
1113 are permitted in any medium without royalty provided the copyright
1114 notice and this notice are preserved.
1120 version-control: never