1 2015-11-10 H.J. Lu <hongjiu.lu@intel.com>
3 * elf32-i386.c (elf_i386_relocate_section): Properly move
4 kept relocations when deleting relocations.
5 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
7 2015-11-09 H.J. Lu <hongjiu.lu@intel.com>
9 * elf32-i386.c (elf_i386_relocate_section): Use read and write
10 pointers to reloc array, rather than memmove when deleting a
11 reloc. Don't use RELOC_AGAINST_DISCARDED_SECTION. Adjust
12 reloc counts at end of loop.
13 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
15 2015-11-10 Alan Modra <amodra@gmail.com>
17 * elf64-ppc.c (ppc64_elf_relocate_section): Use read and write
18 pointers to reloc array, rather than memmove when deleting a
19 reloc. Don't use RELOC_AGAINST_DISCARDED_SECTION. Adjust
20 reloc counts at end of loop.
21 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
23 2015-11-09 Dominik Vogt <vogt@linux.vnet.ibm.com>
25 * elf64-ppc.c (ppc64_elf_size_stubs, ppc64_elf_build_stubs): Fix left
26 shift of negative value.
27 * libbfd.c (safe_read_leb128): Likewise.
28 * dwarf2.c (place_sections): Likewise.
29 * bfd-in.h (align_power): Likewise.
30 * bfd-in2.h (align_power): Likewise.
32 2015-10-30 Nick Clifton <nickc@redhat.com>
34 * po/zh_CN.po: Updated (simplified) Chinese translation.
36 2015-10-29 Catherine Moore <clm@codesourcery.com>
38 * elfxx-mips.c (mips_elf_check_mips16_stubs): Set a stub's output
39 section to bfd_abs_section_ptr if the stub is discarded.
41 2015-10-29 Ed Schouten <ed@nuxi.nl>
43 * config.bfd (targ_defvec): Add support for CloudABI on aarch64.
44 For this target we have to make sure we use ELFOSABI_CLOUDABI
45 instead of ELFOSABI_NONE.
46 * configure.ac (tb): Likewise.
47 * elfnn-aarch64.c: Likewise.
48 * targets.c (_bfd_target_vector): Likewise.
49 * configure: Regenerate.
51 2015-10-29 Pedro Alves <palves@redhat.com>
53 * libhppa.h (bfd_hppa_insn2fmt): Add cast.
55 2015-10-28 H.J. Lu <hongjiu.lu@intel.com>
57 * elf32-i386.c (elf_i386_relocate_section): Fix a typo in
60 2015-10-28 Nick Clifton <nickc@redhat.com>
62 * elf32-arm.c (create_instruction_branch_absolute): Replace
63 pointer parameters with a simple integer parameter.
64 (stm32l4xx_create_replacing_stub_ldmia): Update calls to
65 create_instruction_branch_absolute.
66 (stm32l4xx_create_replacing_stub_ldmdb): Likewise.
67 (stm32l4xx_create_replacing_stub_vldm): Likewise.
68 (elf32_arm_write_section): Use pointer type for veneer addresses.
70 2015-10-28 Cupertino Miranda <cmiranda@synopsys.com>
72 * reloc.c (BFD_RELOC_ARC_32_PCREL): New entry.
73 * elf32-arc.c (arc_elf_howto_ini): Update formula.
74 (get_middle_endian_relocation): New function.
76 * bfd-in2.h: Regenerate.
79 2015-10-28 Alan Modra <amodra@gmail.com>
82 * elflink.c (_bfd_elf_gc_mark_reloc): Move code iterating over
84 * section.c (bfd_get_next_section_by_name): ..to here. Add ibfd param.
85 (bfd_get_linker_section): Adjust bfd_get_next_section_by_name call.
86 * tekhex.c (first_phase): Likewise.
87 * elflink.c (bfd_elf_gc_sections): Likewise.
88 * bfd-in2.h: Regenerate.
90 2015-10-27 Laurent Alfonsi <laurent.alfonsi@st.com>
91 Christophe Monat <christophe.monat@st.com>
93 * bfd-in2.h: Regenerate.
94 * bfd-in.h (bfd_arm_stm32l4xx_fix): New enum. Specify how
95 STM32L4XX instruction scanning should be done.
96 (bfd_elf32_arm_set_stm32l4xx_fix)
97 (bfd_elf32_arm_stm32l4xx_erratum_scan)
98 (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): Add prototypes.
99 (bfd_elf32_arm_set_target_relocs): Add stm32l4xx fix type argument
101 * elf32-arm.c (STM32L4XX_ERRATUM_VENEER_SECTION_NAME)
102 (STM32L4XX_ERRATUM_VENEER_ENTRY_NAME): Define macros.
103 (elf32_stm32l4xx_erratum_type): New enum.
104 (elf32_stm32l4xx_erratum_list): New struct. List of veneers or
106 (_arm_elf_section_data): Add stm32l4xx_erratumcount,
107 stm32l4xx_erratumlist.
108 (elf32_arm_link_hash_table): Add stm32l4xx_erratum_glue_size,
109 stm32l4xx_fix and num_stm32l4xx_fixes fields.
111 (popcount): New function.
112 (elf32_arm_link_hash_table_create): Initialize stm32l4xx_fix.
113 (put_thumb2_insn): New function.
114 (STM32L4XX_ERRATUM_LDM_VENEER_SIZE): Define. Size of a veneer for
116 (STM32L4XX_ERRATUM_VLDM_VENEER_SIZE): Define. Size of a veneer for
118 (bfd_elf32_arm_allocate_interworking_sections): Initialise erratum
120 (record_stm32l4xx_erratum_veneer) : New function. Create a single
121 veneer, and its associated symbols.
122 (bfd_elf32_arm_add_glue_sections_to_bfd): Add STM32L4XX erratum glue.
123 (bfd_elf32_arm_set_stm32l4xx_fix): New function. Set the type of
124 erratum workaround required.
125 (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): New function. Find
126 out where veneers and branches to veneers have been placed in
127 virtual memory after layout.
128 (is_thumb2_ldmia): New function.
129 (is_thumb2_ldmdb): Likewise.
130 (is_thumb2_vldm ): Likewise.
131 (stm32l4xx_need_create_replacing_stub): New function. Decide if a
132 veneer must be emitted.
133 (bfd_elf32_arm_stm32l4xx_erratum_scan): Scan the sections of an
134 input BFD for potential erratum-triggering insns. Record results.
135 (bfd_elf32_arm_set_target_relocs): Set stm32l4xx_fix field in
137 (elf32_arm_size_dynamic_sections): Collect glue information.
138 (create_instruction_branch_absolute): New function.
139 (create_instruction_ldmia): Likewise.
140 (create_instruction_ldmdb): Likewise.
141 (create_instruction_mov): Likewise.
142 (create_instruction_sub): Likewise.
143 (create_instruction_vldmia): Likewise.
144 (create_instruction_vldmdb): Likewise.
145 (create_instruction_udf_w): Likewise.
146 (create_instruction_udf): Likewise.
147 (push_thumb2_insn32): Likewise.
148 (push_thumb2_insn16): Likewise.
149 (stm32l4xx_fill_stub_udf): Likewise.
150 (stm32l4xx_create_replacing_stub_ldmia): New function. Expands the
151 replacing stub for ldmia instructions.
152 (stm32l4xx_create_replacing_stub_ldmdb): Likewise for ldmdb.
153 (stm32l4xx_create_replacing_stub_vldm): Likewise for vldm.
154 (stm32l4xx_create_replacing_stub): New function. Dispatches the
155 stub emission to the appropriate functions.
156 (elf32_arm_write_section): Output veneers, and branches to veneers.
158 2015-10-27 Sangamesh Mallayya <nickc@redhat.com>sangamesh.swamy@in.ibm.com>
160 * configure.ac (powerpc64-*-aix[5-9].*): Match powerpc64 running
161 aix for core file support.
162 * configure: Regenerate.
163 * rs6000-core.c: Check for __ld_info64 if compiling 64-bit gdb.
164 Added BFD64 check if we are using old core file format for 32-bit gdb.
165 Set sizeof CORE_COMMONSZ appropriately in case of either new or
166 old core file format.
167 (read_hdr): Added BFD64 check for 64-bit support.
168 (rs6000coff_core_p): Likewise.
169 (rs6000coff_core_file_matches_executable_p): Likewise.
170 (rs6000coff_core_file_failing_command): Likewise.
171 (rs6000coff_core_file_failing_signal): Likewise.
172 Add support for debugging core files generated by binaries in
174 (rs6000coff_core_p): If Large Memory Model is used, then the .data
175 segment should start from BDATAORG which has been defined in the
178 2015-10-26 H.J. Lu <hongjiu.lu@intel.com>
181 * elf32-i386.c (elf_i386_convert_load): Check bfd_link_hash_new
182 instead of calling bfd_link_get_defined_symbol.
183 * elf64-x86-64.c (elf_x86_64_convert_load): Likewise. Skip
184 relocation overflow for bfd_link_hash_new.
185 * linker.c (bfd_link_get_defined_symbol): Removed.
186 * bfd-in2.h: Regenerated.
188 2015-10-26 H.J. Lu <hongjiu.lu@intel.com>
191 * elf32-i386.c (elf_i386_convert_load): Call
192 bfd_link_get_defined_symbol to check if a symbol is defined.
193 * elf64-x86-64.c (elf_x86_64_convert_load): Call
194 bfd_link_get_defined_symbol to get defined symbol section and
196 * linker.c (bfd_link_get_defined_symbol): New function.
197 * bfd-in2.h: Regenerated.
199 2015-10-23 Alan Modra <amodra@gmail.com>
204 * elflink.c (_bfd_elf_gc_mark_hook): Delete code handling __start_*
205 and __stop_* symbol refs.
206 (_bfd_elf_gc_mark_rsec): Add start_stop parameter. Handle __start_*
207 and __stop_* symbol refs here..
208 (_bfd_elf_gc_mark_reloc): ..and here.
209 * elf-bfd.h (_bfd_elf_gc_mark_hook): Update prototype.
210 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Update
211 _bfd_elf_gc_mark_rsec call.
213 2015-10-23 Alan Modra <amodra@gmail.com>
217 * elflink.c (elf_gc_sweep): Revert last patch.
218 (_bfd_elf_gc_mark_hook): Don't set SEC_KEEP here.
220 2015-10-22 H.J. Lu <hongjiu.lu@intel.com>
223 * elflink.c (elf_gc_sweep): Always keep sections marked with
226 2015-10-22 Hans-Peter Nilsson <hp@bitrange.com>
228 * mmo.c (struct mmo_data_struct): New members
229 symbol_consistency_override_calculated and ignore_symbol_consistency.
230 (mmo_section_has_contents, mmo_ignore_symbol_consistency): New
232 (mmo_create_symbol): Check with mmo_ignore_symbol_consistency if to
233 report an error for unexpected value of Main.
234 (mmo_write_symbols_and_terminator): Similar.
236 2015-10-22 H.J. Lu <hongjiu.lu@intel.com>
238 * elf32-i386.c (elf_i386_convert_load): Use call_nop_byte and
239 check call_nop_as_suffix for 1-byte NOP padding to pad call.
240 * elf64-x86-64.c (elf_x86_64_convert_load): Likewise.
242 2015-10-22 H.J. Lu <hongjiu.lu@intel.com>
244 * elf64-x86-64.c: Include opcode/i386.h.
245 (x86_64_elf_howto_table): Add R_X86_64_GOTPCRELX and
246 R_X86_64_REX_GOTPCRELX.
247 (R_X86_64_standard): Replace R_X86_64_PLT32_BND with
248 R_X86_64_REX_GOTPCRELX.
249 (x86_64_reloc_map): Add BFD_RELOC_X86_64_GOTPCRELX and
250 BFD_RELOC_X86_64_REX_GOTPCRELX.
251 (need_convert_mov_to_lea): Renamed to ...
252 (need_convert_load): This.
253 (elf_x86_64_check_relocs): Handle R_X86_64_GOTPCRELX and
254 R_X86_64_REX_GOTPCRELX. Replace need_convert_mov_to_lea with
256 (elf_x86_64_gc_sweep_hook): Handle R_X86_64_GOTPCRELX and
257 R_X86_64_REX_GOTPCRELX.
258 (elf_x86_64_size_dynamic_sections): Likewise.
259 (elf_x86_64_relocate_section): Likewise.
260 (elf_x86_64_convert_mov_to_lea): Renamed to ...
261 (elf_x86_64_convert_load): This. Replace need_convert_mov_to_lea
262 with need_convert_load. Support R_X86_64_GOTPCRELX and
263 R_X86_64_REX_GOTPCRELX transformations.
264 * reloc.c (BFD_RELOC_X86_64_GOTPCRELX): New.
265 (BFD_RELOC_X86_64_REX_GOTPCRELX): Likewise.
266 * bfd-in2.h: Regenerated.
267 * libbfd.h: Likewise.
269 2015-10-22 H.J. Lu <hongjiu.lu@intel.com>
271 * elf32-i386.c: Include opcode/i386.h.
272 (elf_howto_table): Add R_386_GOT32X.
273 (R_386_ext2): Replace R_386_IRELATIVE with R_386_GOT32X.
274 (elf_i386_reloc_type_lookup): Handle BFD_RELOC_386_GOT32X.
275 (need_convert_mov_to_lea): Renamed to ...
276 (need_convert_load): This.
277 (elf_i386_check_relocs): Handle R_386_GOT32X. Replace
278 need_convert_mov_to_lea with need_convert_load.
279 (elf_i386_gc_sweep_hook): Handle R_386_GOT32X.
280 (elf_i386_size_dynamic_sections): Likewise.
281 (elf_i386_relocate_section): Likewise.
282 (elf_i386_convert_mov_to_lea): Renamed to ...
283 (elf_i386_convert_load): This. Replace need_convert_mov_to_lea
284 with need_convert_load. Support R_386_GOT32X transformations.
285 * reloc.c (BFD_RELOC_386_GOT32X): New.
286 * bfd-in2.h: Regenerated.
287 * libbfd.h: Likewise.
289 2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
291 * elf32-s390.c (elf_s390_check_relocs): Set the non_got_ref marker
292 only when linking an executable.
293 (elf_s390_relocate_section): Redirect PC-relative relocs to a IPLT
295 * elf64-s390.c (elf_s390_check_relocs): Set the non_got_ref marker
296 only when linking an executable.
297 (elf_s390_relocate_section): Redirect PC-relative relocs to a IPLT
300 2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
302 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Set the PLT
303 reference counters for local IFUNC calls.
304 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
306 2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
308 * elf32-s390.c (elf_s390_check_relocs): Fallthrough to the PLT
309 slot allocating code for GOTOFF relocs on ifunc symbols.
310 (elf_s390_gc_sweep_hook): Decrement plt refcount for GOTOFF relocs
312 (elf_s390_relocate_section): Redirect a GOTOFF reloc to an iplt
315 2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
318 * elf32-s390.c (elf_s390_reloc_type_class): Return
319 reloc_class_ifunc for ifunc symbols.
320 * elf64-s390.c (elf_s390_reloc_type_class): Likewise.
322 2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
324 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Call
325 elf_s390_finish_ifunc_symbol only for actually defined symbols.
326 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
328 2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
330 * elf-s390-common.c (s390_elf_allocate_ifunc_dyn_relocs): Remove
332 * elf32-s390.c (allocate_dynrelocs): Don't use last parameter.
333 * elf64-s390.c (allocate_dynrelocs): Don't use last parameter.
335 2015-10-20 Hans-Peter Nilsson <hp@bitrange.com>
337 * mmo.c (mmo_write_symbols_and_terminator): Correct printed value
338 of Main in error message.
340 2015-10-18 Doug Evans <xdje42@gmail.com>
342 * targets.c (bfd_flavour_name): "MMO" is spelled "mmo".
344 2015-10-17 Alan Modra <amodra@gmail.com>
346 * elf64-ppc.c (ppc64_elf_size_stubs): Correct __glink_PLTresolve
347 eh_frame FDE for ELFv1.
349 2015-10-16 H.J. Lu <hongjiu.lu@intel.com>
351 * elf32-i386.c (elf_i386_convert_mov_to_lea): Check if symbol
353 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
355 2015-10-16 H.J. Lu <hongjiu.lu@intel.com>
357 * elf32-i386.c (elf_i386_convert_mov_to_lea): Don't check
359 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
361 2015-10-15 H.J. Lu <hongjiu.lu@intel.com>
363 * elflink.c (_bfd_elf_merge_symbol): Fix typos in comments
365 2015-10-15 Alan Modra <amodra@gmail.com>
367 * elf32-v850.c (v850_elf_copy_private_bfd_data): Remove assertion
368 that input and output .note.renesas sections are same size.
369 Instead, only copy input to output if they are.
371 2015-10-15 Riku Voipio <riku.voipio@iki.fi>
374 * elfcore.h (elf_core_file_p): Use the file_ptr type to hold the
376 * elfcode.h (elf_object_p): Likewise.
378 2015-10-14 Rich Felker <dalias@libc.org>
381 * elf32-sh.c (sh_elf_size_dynamic_sections): Always emit
382 DT_PLTGOT for FDPIC output.
384 2015-10-13 Alan Modra <amodra@gmail.com>
386 * elf.c (_bfd_elf_map_sections_to_segments): Don't set
387 PT_GNU_RELRO p_flags.
388 (assign_file_positions_for_non_load_sections): Set PT_GNU_RELRO
391 2015-10-12 H.J. Lu <hongjiu.lu@intel.com>
394 * elflink.c (_bfd_elf_add_default_symbol): Skip the unversioned
395 definition after the default version.
397 2015-10-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
400 * elf32-s390.c (elf_s390_gc_sweep_hook): Do not reduce got
401 refcount for relocs not really requiring a got slot.
402 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
404 2015-10-11 John David Anglin <danglin@gcc.gnu.org>
406 * elf-hppa.h (elf_hppa_action_discarded): Ignore relocations in
409 2015-10-07 Cupertino Miranda <cmiranda@synopsys.com>
411 * archures.c: Remove support for older ARC. Added support for new
412 ARC cpus (ARC600, ARC601, ARC700, ARCV2).
413 * bfd-in2.h: Likewise.
414 * config.bfd: Likewise.
415 * cpu-arc.c: Likewise.
416 * elf32-arc.c: Totally changed file with a refactored
417 inplementation of the ARC port.
418 * libbfd.h: Added ARC specific relocation types.
421 2015-10-06 H.J. Lu <hongjiu.lu@intel.com>
423 * bfd.c (bfd_update_compression_header): Clear the ch_reserved
424 field in 64-bit output.
425 (bfd_convert_section_contents): Likewise.
427 2015-10-05 H.J. Lu <hongjiu.lu@intel.com>
430 * elflink.c (elf_link_add_object_symbols): Don't re-export a
431 symbol if it isn't undefined.
433 2015-10-04 H.J. Lu <hongjiu.lu@intel.com>
435 * config.bfd (targ_selvecs, targ64_selvecs): Add iamcu_elf32_vec,
436 i386_pei_vec and x86_64_pei_vec for Solaris2/x86.
438 2015-10-02 Renlin Li <renlin.li@arm.com>
440 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Add
441 TLSIE_MOVW_GOTTPREL_G1.
442 (aarch64_tls_transition_without_check): Add
443 TLSIE_MOVW_GOTTPREL_G1 to TLSLE_MOVW_TPREL_G2
444 transition for local symbol.
445 (elfNN_aarch64_tls_relax): Add a argument to pass tp offset.
446 Add TLSIE_MOVW_GOTTPREL_G1 relaxation.
447 (elfNN_aarch64_relocate_section): Call elfNN_aarch64_tls_relax
450 2015-10-02 Renlin Li <renlin.li@arm.com>
452 * elfnn-aarch64.c (aarch64_tls_transition_without_check): Add
453 relax transitions for TLSDESC_ADD, TLSDESC_LDR, TLSDESC_OFF_G0_NC,
455 (aarch64_tls_transition_without_check): Add relaxation support.
456 (aarch64_reloc_got_type): Add support.
457 (elfNN_aarch64_final_link_relocate): Likewise.
458 (elfNN_aarch64_tls_relax): Likewise.
459 (elfNN_aarch64_relocate_section): Likewise.
460 (elfNN_aarch64_gc_sweep_hook): Likewise.
461 (elfNN_aarch64_check_relocs): Likewise.
462 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
463 (_bfd_aarch64_elf_resolve_relocation): Likewise.
465 2015-10-02 Renlin Li <renlin.li@arm.com>
467 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Check overflow for
468 BFD_RELOC_AARCH64_TLSDESC_OFF_G1.
470 2015-10-02 Renlin Li <renlin.li@arm.com>
472 * elfnn-aarch64.c(IS_AARCH64_TLS_RELAX_RELOC):
473 Add relaxation support for TLSGD_MOVW_G0_NC and TLSGD_MOVW_G1.
474 (aarch64_tls_transition_without_check): Likewise
475 (elfNN_aarch64_tls_relax): Likwise.
477 2015-10-02 Renlin Li <renlin.li@arm.com>
479 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Create GOT section
480 for TLSLE_MOVW_TPREL_G(1, 1_NC, 2) relocation.
482 2015-10-02 Renlin Li <renlin.li@arm.com>
484 * reloc.c: Make AARCH64_TLSIE_MOVW_GOTTPREL_G1 and
485 AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC defined in alphabetical order.
486 * libbfd.h: Regenerate.
487 * bfd-in2.h: Likewise.
488 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Make
489 TLSIE_MOVW_GOTTPREL_G1 check overflow.
490 (aarch64_reloc_got_type): Add support for TLSIE_MOVW_GOTTPREL_G1
491 and TLSIE_MOVW_GOTTPREL_G0_NC.
492 (elfNN_aarch64_final_link_relocate): Likewise.
493 (elfNN_aarch64_relocate_section): Likewise.
494 (elfNN_aarch64_gc_sweep_hook): Likewise.
495 (elfNN_aarch64_check_relocs): Likewise.
496 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
497 (_bfd_aarch64_elf_resolve_relocation): Likewise.
499 2015-10-02 Renlin Li <renlin.li@arm.com>
501 * elfnn-aarch64.c (aarch64_reloc_got_type): Add
502 BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC support.
503 (elfNN_aarch64_final_link_relocate): Likewise.
504 (elfNN_aarch64_relocate_section): Likewise.
505 (elfNN_aarch64_gc_sweep_hook): Likewise.
506 (elfNN_aarch64_check_relocs): Likewise.
507 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
508 (_bfd_aarch64_elf_resolve_relocation): Likewise.
510 2015-10-02 Renlin Li <renlin.li@arm.com>
512 * reloc.c (BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC): New entry.
513 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
514 BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC.
515 * libbfd.h: Regenerate.
516 * bfd-in2.h: Likewise
518 2015-10-02 Renlin Li <renlin.li@arm.com>
520 * elfnn-aarch64.c (aarch64_reloc_got_type): Add
521 BFD_RELOC_AARCH64_TLSGD_MOVW_G1 support.
522 (elfNN_aarch64_final_link_relocate): Likewise.
523 (elfNN_aarch64_relocate_section): Likewise.
524 (elfNN_aarch64_gc_sweep_hook): Likewise.
525 (elfNN_aarch64_check_relocs): Likewise.
526 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
527 (_bfd_aarch64_elf_resolve_relocation): Likewise.
529 2015-10-02 Renlin Li <renlin.li@arm.com>
531 * reloc.c (BFD_RELOC_AARCH64_TLSGD_MOVW_G1): New entry.
532 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
533 BFD_RELOC_AARCH64_TLSGD_MOVW_G1.
534 * bfd-in2.h: Regenerate.
535 * libbfd.h: Likewise.
537 2015-10-02 Renlin Li <renlin.li@arm.com>
539 * elfnn-aarch64.c (aarch64_reloc_got_type): Add
540 BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC support.
541 (elfNN_aarch64_final_link_relocate): Likewise.
542 (elfNN_aarch64_gc_sweep_hook): Likewise.
543 (elfNN_aarch64_check_relocs): Likewise.
544 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
545 (_bfd_aarch64_elf_resolve_relocation): Likewise.
547 2015-10-02 Renlin Li <renlin.li@arm.com>
549 * reloc.c (BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC): New.
550 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry
552 * libbfd.h: Regnerate.
553 * bfd-in2.h: Regenerate.
555 2015-10-02 Renlin Li <renlin.li@arm.com>
557 * elfnn-aarch64.c (aarch64_reloc_got_type): Add support
558 for BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
559 (elfNN_aarch64_gc_sweep_hook): Likewise.
560 (elfNN_aarch64_check_relocs): Likewise
561 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
562 (_bfd_aarch64_elf_resolve_relocation): Likewise
563 (elfNN_aarch64_final_link_relocate): Likewise
565 2015-010-02 Renlin Li <renlin.li@arm.com>
567 * reloc.c (BFD_RELOC_AARCH64_MOVW_GOTOFF_G1): New.
568 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
570 * libbfd.h: Regenerate.
571 * bfd-in2.h: Regenerate.
573 2015-10-02 Renlin Li <renlin.li@arm.com>
575 * elfnn-aarch64.c (aarch64_reloc_got_type): Add
576 BFD_RELOC_AARCH64_LD_64_GOTOFF_LO15 support.
577 (elfNN_aarch64_gc_sweep_hook): Likewise.
578 (elfNN_aarch64_check_relocs): Likewise
579 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
580 (_bfd_aarch64_elf_resolve_relocation): Likewise
581 (elfNN_aarch64_final_link_relocate): Calculate offset within GOT.
583 2015-10-02 Renlin Li <renlin.li@arm.com>
585 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Change if to
588 2015-10-01 H.J. Lu <hongjiu.lu@intel.com>
591 * elf64-x86-64.c (elf_x86_64_check_relocs): Set
592 pointer_equality_needed for R_X86_64_PC32 reloc in non-code
595 2015-10-01 Renlin Li <renlin.li@arm.com>
597 * elfnn-aarch64.c (elfNN_aarch64_output_plt_map): Remove.
598 (elfNN_aarch64_output_arch_local_syms): Emit AARCH64_MAP_INSN once.
600 2015-10-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
602 * config.bfd (targ_selvecs): Remove sh_elf32_vec and
603 sh_elf32_le_vec from sh*-*-linux cases.
605 2015-10-01 Alan Modra <amodra@gmail.com>
608 * elflink.c (_bfd_elf_merge_sections): Revert last change.
610 2015-09-30 H.J. Lu <hongjiu.lu@intel.com>
613 * elf32-i386.c (elf_i386_check_relocs): Set
614 pointer_equality_needed for R_386_PC32 reloc in non-code
617 2015-09-30 H.J. Lu <hongjiu.lu@intel.com>
620 * elflink.c (_bfd_elf_merge_sections): Only merge input bfds
621 that have the compatible ELF machine code with the output bfd.
623 2015-09-30 Alan Modra <amodra@gmail.com>
626 * elflink.c (_bfd_elf_merge_sections): Only merge input bfds that
627 will be handled by elf_link_input_bfd. Rename abfd param to obfd.
629 2015-09-30 Rich Felker <dalias@libc.org>
631 * config.bfd (targ_selvecs): Add fdpic and misc targets
634 2015-09-29 Andrew Stubbs <ams@codesourcery.com>
635 H.J. Lu <hongjiu.lu@intel.com>
638 * bfd.c (bfd_convert_section_contents): Add ptr_size parameter.
639 * bfd-in2.h: Regenerated.
641 2015-08-11 Peter Zotov <whitequark@whitequark.org>
644 * elf32-or1k.c (R_OR1K_32_PCREL): Set pcrel_offset to TRUE.
645 (R_OR1K_16_PCREL): Likewise.
646 (R_OR1K_8_PCREL): Likewise.
648 2015-09-23 Nick Clifton <nickc@redhat.com>
650 * bout.c (b_out_slurp_reloc_table): Cast constant to unsigned in
651 order to avoid problems with left shifting negative values.
652 (abs32code): Likewise.
653 * mach-o.c (FILE_ALIGN): Likewise.
654 * coff-rs6000.c (xcoff_debug_sections): Delete unused static
656 * elf32-visium.c (visium_reloc_map): Likewise.
657 * elf32-arm.c (elf32_arm_final_link_relocate): Remove useless
658 calls to abs function.
659 * elf32-frv.c (_frvfdpic_relax_tls_entries): Likewise.
660 * elf32-score.c (score_elf_final_link_relocate): Likewise.
661 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
662 * elf32-i860.c (i860_howto_pc26_reloc): Use multiplication instead
663 of shifting to create a negative mask.
664 * elf32-msp430.c (elf_backend_special_sections): Define.
665 * elfxx-mips.c (got_ofst_reloc_p): Delete unused function.
666 (got_hi16_reloc_p): Delete unused function.
667 * ppcboot.c (ppcboot_bfd_print_private_bfd_data): Fix test of
670 2015-09-23 Nick Clifton <nickc@redhat.com>
673 * elf-bfd.h (struct elf_section_list): New structure.
674 (struct elf_obj_tdata): Replace symtab_shndx_hdr with
675 symtab_shndx_list. Delete symtab_shndx_section.
676 (elf_symtab_shndx): Replace macro with elf_symtab_shndx_list.
677 * elf.c (bfd_elf_get_syms): If symtab index sections are present,
678 scan them for the section that matches the provided symbol table.
679 (bfd_section_from_shdr): Record all SHT_SYMTAB_SHNDX sections.
680 (assign_section_numbers): Use the first symtab index table in the
682 (_bfd_elf_compute_section_file_positions): Replace use of
683 symtab_shndx_hdr with use of symtab_shndx_list.
684 (find_section_in_list): New function.
685 (assign_file_postions_except_relocs): Use new function.
686 (_bfd_elf_copy_private_symbol_data): Likewise.
687 (swap_out_syms): Handle multiple symbol table index sections.
688 * elf32-m32c.c (m32c_elf_relax_section): Replace use of
689 symtab_shndx_hdr with use of symtab_shndx_list.
690 * elf32-rl78.c (rl78_elf_relax_section): Likewise.
691 * elf32-rx.c (rx_relax_section): Likewise.
692 * elf32-v850.c (v850_elf_relax_delete_bytes): Likewise.
693 * elflink.c (bfd_elf_final_link): Likewise.
695 2015-09-21 H.J. Lu <hongjiu.lu@intel.com>
697 * bfd.c (bfd_update_compression_header): Use bfd_put_32 on
699 (bfd_check_compression_header): Use bfd_get_32 on ch_type.
700 (bfd_convert_section_contents): Use bfd_get_32 and bfd_put_32
703 2015-09-20 Rich Felker <dalias@libc.org>
705 * elflink.c (_bfd_elf_link_create_dynamic_sections): Don't create
706 .interp when info->nointerp.
707 (bfd_elf_size_dynamic_sections): Adjust assert.
708 * elf32-arm.c (elf32_arm_size_dynamic_sections): Don't size .interp
710 * elf32-bfin.c (elf32_bfinfdpic_size_dynamic_sections): Likewise.
711 * elf32-cr16.c (_bfd_cr16_elf_size_dynamic_sections): Likewise.
712 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
713 * elf32-frv.c (elf32_frvfdpic_size_dynamic_sections): Likewise.
714 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
715 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
716 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
717 * elf32-lm32.c (lm32_elf_size_dynamic_sections): Likewise.
718 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Likewise.
719 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
720 * elf32-metag.c (elf_metag_size_dynamic_sections): Likewise.
721 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Likewise.
722 * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Likewise.
723 * elf32-or1k.c (or1k_elf_size_dynamic_sections): Likewise.
724 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
725 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
726 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
727 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
728 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
729 * elf32-tic6x.c (elf32_tic6x_size_dynamic_sections): Likewise.
730 * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Likewise.
731 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
732 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
733 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
734 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
735 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Likewise.
736 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
737 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
738 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
739 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Likewise.
740 * elfnn-ia64.c (elfNN_ia64_size_dynamic_sections): Likewise.
741 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
742 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
743 * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): Likewise.
745 2015-09-18 Doug Evans <xdje42@gmail.com>
747 * targets.c (enum bfd_flavour): Add comment.
748 (bfd_flavour_name): New function.
749 * bfd-in2.h: Regenerate.
751 2015-09-18 Alan Modra <amodra@gmail.com>
753 * elf64-ppc.h (struct ppc64_elf_params <tls_get_addr_opt>): Rename
754 from no_tls_get_addr_opt.
755 * elf64-ppc.c: Update for rename and inversion of tls_get_addr_opt.
756 (ppc64_elf_tls_setup): Set tls_get_addr_opt to 0 only when at
759 2015-09-17 Alan Modra <amodra@gmail.com>
762 * elflink.c (elf_link_adjust_relocs): Correct start of insertion
765 2015-09-16 Alan Modra <amodra@gmail.com>
768 * elflink.c (elf_link_adjust_relocs): Modify insertion sort to
769 insert a run. Return status in case of malloc failure.
772 2015-09-15 Max Filippov <jcmvbkbc@gmail.com>
774 * elf32-xtensa.c (elf_xtensa_be_plt_entry)
775 (elf_xtensa_le_plt_entry): Emit 'entry' instruction only for
777 (elf_xtensa_create_plt_entry): Generate 'l32r' offsets and fix
778 up instructions according to ABI.
780 2015-09-14 Rich Felker <dalias@libc.org>
782 * elf32-sh.c (sh_elf_relocate_section): Set EF_SH_PIC flag
783 instead of clearing it on cross-section relocations.
784 (sh_elf_merge_private_data): Clear EF_SH_PIC flag by default.
786 2015-09-12 Helge Deller <deller@gmx.de>
789 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Set .plt entry
792 2015-09-09 Jiong Wang <jiong.wang@arm.com>
794 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Sort alphabetically.
796 2015-09-09 Jiong Wang <jiong.wang@arm.com>
798 * elfnn-aarch64.c (aarch64_tls_transition_without_check): Support three
799 TLS local dynamic traditional relocations types.
800 (elfNN_aarch64_tls_relax): Support TLS local dynamic traditional to
801 local executable relaxation.
803 2015-09-03 H.J. Lu <hongjiu.lu@intel.com>
805 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Remove
808 2015-09-02 H.J. Lu <hongjiu.lu@intel.com>
810 * elf32-i386.c (R_386_irelative): Renamed to ...
812 (R_386_vt_offset): Updated.
813 (elf_i386_rtype_to_howto): Likewise.
814 (elf_i386_relocate_section): Likewise.
816 2015-09-01 H.J. Lu <hongjiu.lu@intel.com>
819 * elf32-i386.c (elf_i386_link_hash_entry): Add
820 func_pointer_refcount.
821 (elf_i386_link_hash_newfunc): Clear func_pointer_refcount.
822 (elf_i386_get_local_sym_hash): Likewise.
823 (elf_i386_copy_indirect_symbol): Also copy
824 func_pointer_refcount.
825 (elf_i386_check_relocs): Increment func_pointer_refcount.
826 (elf_i386_gc_sweep_hook): Decrement func_pointer_refcount.
827 (elf_i386_allocate_dynrelocs): Don't create the PLT entry if
828 there are only function pointer relocations which can be
829 resolved at run-time. Keep dynanamic relocations for run-time
830 function pointer initialization.
831 (elf_i386_relocate_section): Copy dynamic function pointer
833 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
834 func_pointer_refcount.
835 (elf_x86_64_link_hash_newfunc): Clear func_pointer_refcount.
836 (elf_x86_64_get_local_sym_hash): Likewise.
837 (elf_x86_64_copy_indirect_symbol): Also copy
838 func_pointer_refcount.
839 (elf_x86_64_check_relocs): Increment func_pointer_refcount.
840 (elf_x86_64_gc_sweep_hook): Decrement func_pointer_refcount.
841 (elf_x86_64_allocate_dynrelocs): Don't create the PLT entry if
842 there are only function pointer relocations which can be
843 resolved at run-time. Keep dynanamic relocations for run-time
844 function pointer initialization.
845 (elf_x86_64_relocate_section): Copy dynamic function pointer
848 2015-09-01 Alan Modra <amodra@gmail.com>
850 * elf64-ppc.c (ppc64_elf_maybe_function_sym): Adjust symbol value
851 if .opd section has been edited.
853 2015-09-01 Alan Modra <amodra@gmail.com>
856 * elf64-ppc.c (ARRAY_SIZE): Define. Use throughout.
857 (enum ppc_stub_type): Add ppc_stub_save_res.
858 (struct map_stub): Add "next" and "needs_save_res".
859 (struct ppc_link_hash_entry): Add "save_res" flag.
860 (struct ppc_link_hash_table): Add "group".
861 (sfpr_define): Add stub_sec param. Define symbol in stub_sec if
862 stub_sec is non-null. Set "save_res".
863 (save_res_funcs): Make file scope, rename from funcs. Adjust uses.
864 (ppc64_elf_adjust_dynamic_symbol): Prohibit plt call to save_res syms.
865 (ppc_build_one_stub): Handle ppc_stub_save_res.
866 (ppc_size_one_stub): Set stub type to ppc_size_one_stub on finding
867 stub for linker defined save_res sym.
868 (group_sections): Init new fields of struct map_stub.
869 (ppc64_elf_size_stubs): Reserve space for save/restore func copy.
870 (ppc64_elf_build_stubs): Copy save/restore funcs to groups. Emit
872 (ppc64_elf_relocate_section): Set destination for ppc_stub_save_res.
874 2015-08-31 Alan Modra <amodra@gmail.com>
876 * elf64-ppc.c (get_r2off): Return -1 on error.
877 (ppc_build_one_stub): Adjust for get_r2off change. Don't emit
878 addi r2,r2,0 on r2off stubs when the low 16-bit delta is zero.
879 (ppc_size_one_stub): Corresponding size changes for r2off stubs.
880 Add condition in test for -R objects.
882 2015-08-31 Alan Modra <amodra@gmail.com>
884 * section.c (section_id): Make file scope.
885 (bfd_get_next_section_id): New function.
886 * elf64-ppc.c (struct map_stub): Remove toc_off field. Move decl.
887 (struct ppc_stub_hash_entry): Delete stub_sec and id_sec. Add
888 group. Update all uses.
889 (struct ppc_link_hash_table): Delete top_id, top_index, and
890 input_list. Add sec_info_arr_size. Rename stub_group to
891 sec_info, and make group info indirect. Update stub_group refs
893 (ppc_add_stub): Don't look for stub_sec on link_sec stub_group
895 (ppc_build_one_stub): Delete FIXME.
896 (ppc64_elf_setup_section_lists): Size htab->sec_info for all
897 sections, not just input sections. Don't create htab->input_list.
898 (ppc64_elf_next_input_section): Update to use sec_info union as
901 (group_sections): Pass "info" param rather than "htab". Iterate
902 over output sections rather than input_list. Use sec_info union
903 as list pointers. Alloc atruct map_stub, and return fail status.
904 * bfd-in2.h: Regenerate.
906 2015-08-31 Alan Modra <amodra@gmail.com>
908 * elflink.c (elf_sort_symbol): Use correctly sized type for
909 calculating signed section->id difference.
910 (elf_link_add_object_symbols): Likewise.
911 * pef.c (bfd_pef_scan_start_address): Warning fix.
912 * vms-alpha.c (vms_new_section_hook): Likewise.
914 2015-08-31 Alan Modra <amodra@gmail.com>
916 * elf32-nds32.c (nds32_convert_32_to_16_alu1): Warning fix.
917 (find_relocs_at_address_addr): Make "reloc_type" an enum.
918 (nds32_elf_relax_delete_blanks): Warning fix.
919 (nds32_elf_relax_loadstore): Correct loop bound.
921 2015-08-31 Alan Modra <amodra@gmail.com>
923 * section.c (struct bfd_section): Make "id" and "index" unsigned.
924 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Adjust local var to suit.
925 * elf.c (elf_map_symbols): Likewise.
926 * elf64-ppc.c (sym_exists_at): Make "id" param unsigned.
927 (struct ppc_link_hash_table): Make "top_id" and "top_index" unsigned.
928 (ppc64_elf_setup_section_lists): Ditto for local vars.
929 * elf32-arm.c: Similarly to elf64-ppc.c.
930 * elf32-avr.c: Likewise.
931 * elf32-hppa.c: Likewise.
932 * elf32-m68hc1x.c: Likewise.
933 * elf32-metag.c: Likewise.
934 * elf32-nios2.c: Likewise.
935 * elfnn-aarch64.c: Likewise.
936 * simple.c (struct saved_offsets): Make "section_count" unsigned.
937 * bfd-in2.h: Regenerate.
939 2015-08-27 Alan Modra <amodra@gmail.com>
942 * elf64-alpha.c (elf64_alpha_sort_relocs_p): New function.
943 (elf_backend_sort_relocs_p): Define.
945 2015-08-26 Alan Modra <amodra@gmail.com>
948 * elflink.c (cmp_ext32l_r_offset, cmp_ext32b_r_offset): Delete.
949 (cmp_ext64l_r_offset, cmp_ext64b_r_offset): Delete.
950 (ext32l_r_offset, ext32b_r_offset, ext64l_r_offset, ext64b_r_offset):
952 (elf_link_adjust_relocs): Use an insertion sort to sort relocs.
954 2015-08-26 Matthew Fortune <matthew.fortune@imgtec.com>
957 * elfxx-mips.c (bfd_mips_isa_ext_mach): New function: Converts an
958 ISA value to a bfd machine number.
959 (bfd_mips_isa_ext): Update the ISA level and revision if
960 necessary. Use mips_mach_extends_p to decide if the ISA extension
962 (_bfd_mips_elf_merge_private_bfd_data): Allow the ISA extension to
963 be inferred from the ABI setting. Set the ISA level from the
964 maximum of the incoming and outgoing ISA levels.
966 2015-08-25 Nick Clifton <nickc@redhat.com>
969 * elf.c (bfd_section_from_shdr): Replace assertions with warnings
970 about multiple symbol tables.
972 2015-08-25 Renlin Li <renlin.li@arm.com>
974 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): Use LP64 instead of
976 * bfd-in2.h: Regenerate.
978 2015-08-22 Alan Modra <amodra@gmail.com>
980 * elf.c (_bfd_elf_slurp_version_tables): Always init vd_nodename.
981 Don't copy fields not set by _bfd_elf_swap_verdef_in.
983 2015-08-19 Jiong Wang <jiong.wang@arm.com>
985 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize new relocation
986 types, including BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
987 BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
988 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
989 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
990 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
991 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
992 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
993 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC.
994 (elfNN_aarch64_final_link_relocate): Likewise.
995 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
996 (_bfd_aarch64_elf_resolve_relocation): Likewise.
998 2015-08-19 Jiong Wang <jiong.wang@arm.com>
1000 * reloc.c (BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
1001 BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
1002 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
1003 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
1004 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
1005 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC.
1006 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
1007 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC): New entries.
1008 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
1009 * bfd-in2.h: Regenerate.
1010 * libbfd.h: Regenerate.
1012 2015-08-19 Jiong Wang <jiong.wang@arm.com>
1015 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize new relocation
1016 types, including BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
1017 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
1018 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
1019 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
1020 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
1021 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2.
1022 (elfNN_aarch64_final_link_relocate): Likewise.
1023 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1024 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1026 2015-08-19 Jiong Wang <jiong.wang@arm.com>
1028 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
1029 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
1030 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
1031 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
1032 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
1033 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2): New entries.
1034 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
1035 * bfd-in2.h: Regenerate.
1036 * libbfd.h: Regenerate.
1038 2015-08-19 Jiong Wang <jiong.wang@arm.com>
1040 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
1041 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC.
1042 (aarch64_reloc_got_type): Likewise.
1043 (elfNN_aarch64_final_link_relocate): Likewise.
1044 (elfNN_aarch64_relocate_section): Likewise.
1045 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1046 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1048 2015-08-19 Jiong Wang <jiong.wang@arm.com>
1050 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC): New entry.
1051 * bfd-in2.h: Regenerate.
1052 * libbfd.h: Regenerate.
1053 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1054 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC.
1056 2015-08-19 Alan Modra <amodra@gmail.com>
1058 * elf-s390-common.c: Simplify expressions using
1059 bfd_linke_executable, bfd_link_pie and bfd_link_pic.
1060 * elf32-arm.c: Likewise.
1061 * elf32-bfin.c: Likewise.
1062 * elf32-frv.c: Likewise.
1063 * elf32-m68k.c: Likewise.
1064 * elf32-nios2.c: Likewise.
1065 * elf32-ppc.c: Likewise.
1066 * elf32-s390.c: Likewise.
1067 * elf32-sh.c: Likewise.
1068 * elf64-alpha.c: Likewise.
1069 * elf64-ppc.c: Likewise.
1070 * elf64-s390.c: Likewise.
1071 * elflink.c: Likewise.
1073 2015-08-18 Jiong Wang <jiong.wang@arm.com>
1075 * elfnn-aarch64.c (aarch64_reloc_got_type): Delete useless check.
1076 (elfNN_aarch64_relocate_section): Likewise.
1077 (elfNN_aarch64_gc_sweep_hook): Likewise.
1078 (elfNN_aarch64_check_relocs): Likewise.
1080 2015-08-18 H.J. Lu <hongjiu.lu@intel.com>
1083 * elf-bfd.h (elf_link_hash_table): Add dynsym.
1084 * elf32-i386.c (elf_i386_reloc_type_class): Return
1085 reloc_class_ifunc for relocation against STT_GNU_IFUNC symbol.
1086 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise.
1087 * elflink.c (_bfd_elf_link_create_dynamic_sections): Set dynsym.
1088 (bfd_elf_size_dynsym_hash_dynstr): Use dynsym.
1089 (elf_final_link_info): Remove dynsym_sec.
1090 (elf_link_output_extsym): Replace dynsym_sec with dynsym.
1091 (bfd_elf_final_link): Remove reference to dynsym_sec. Replace
1092 dynsym_sec with dynsym.
1094 2015-08-18 H.J. Lu <hongjiu.lu@intel.com>
1096 * bfd/aoutx.h: Replace shared, executable, relocatable and pie
1097 fields with bfd_link_executable, bfd_link_dll,
1098 bfd_link_relocatable, bfd_link_pic and bfd_link_pie.
1099 * bfd/bout.c: Likewise.
1100 * bfd/coff-alpha.c: Likewise.
1101 * bfd/coff-arm.c: Likewise.
1102 * bfd/coff-i386.c: Likewise.
1103 * bfd/coff-i960.c: Likewise.
1104 * bfd/coff-m68k.c: Likewise.
1105 * bfd/coff-mcore.c: Likewise.
1106 * bfd/coff-mips.c: Likewise.
1107 * bfd/coff-ppc.c: Likewise.
1108 * bfd/coff-rs6000.c: Likewise.
1109 * bfd/coff-sh.c: Likewise.
1110 * bfd/coff-tic80.c: Likewise.
1111 * bfd/coff-x86_64.c: Likewise.
1112 * bfd/coff64-rs6000.c: Likewise.
1113 * bfd/coffgen.c: Likewise.
1114 * bfd/cofflink.c: Likewise.
1115 * bfd/ecoff.c: Likewise.
1116 * bfd/ecofflink.c: Likewise.
1117 * bfd/elf-bfd.h: Likewise.
1118 * bfd/elf-eh-frame.c: Likewise.
1119 * bfd/elf-ifunc.c: Likewise.
1120 * bfd/elf-m10200.c: Likewise.
1121 * bfd/elf-m10300.c: Likewise.
1122 * bfd/elf-s390-common.c: Likewise.
1123 * bfd/elf-vxworks.c: Likewise.
1124 * bfd/elf.c: Likewise.
1125 * bfd/elf32-arm.c: Likewise.
1126 * bfd/elf32-avr.c: Likewise.
1127 * bfd/elf32-bfin.c: Likewise.
1128 * bfd/elf32-cr16.c: Likewise.
1129 * bfd/elf32-cr16c.c: Likewise.
1130 * bfd/elf32-cris.c: Likewise.
1131 * bfd/elf32-crx.c: Likewise.
1132 * bfd/elf32-d10v.c: Likewise.
1133 * bfd/elf32-dlx.c: Likewise.
1134 * bfd/elf32-epiphany.c: Likewise.
1135 * bfd/elf32-fr30.c: Likewise.
1136 * bfd/elf32-frv.c: Likewise.
1137 * bfd/elf32-ft32.c: Likewise.
1138 * bfd/elf32-h8300.c: Likewise.
1139 * bfd/elf32-hppa.c: Likewise.
1140 * bfd/elf32-i370.c: Likewise.
1141 * bfd/elf32-i386.c: Likewise.
1142 * bfd/elf32-i860.c: Likewise.
1143 * bfd/elf32-ip2k.c: Likewise.
1144 * bfd/elf32-iq2000.c: Likewise.
1145 * bfd/elf32-lm32.c: Likewise.
1146 * bfd/elf32-m32c.c: Likewise.
1147 * bfd/elf32-m32r.c: Likewise.
1148 * bfd/elf32-m68hc11.c: Likewise.
1149 * bfd/elf32-m68hc1x.c: Likewise.
1150 * bfd/elf32-m68k.c: Likewise.
1151 * bfd/elf32-mcore.c: Likewise.
1152 * bfd/elf32-mep.c: Likewise.
1153 * bfd/elf32-metag.c: Likewise.
1154 * bfd/elf32-microblaze.c: Likewise.
1155 * bfd/elf32-moxie.c: Likewise.
1156 * bfd/elf32-msp430.c: Likewise.
1157 * bfd/elf32-mt.c: Likewise.
1158 * bfd/elf32-nds32.c: Likewise.
1159 * bfd/elf32-nios2.c: Likewise.
1160 * bfd/elf32-or1k.c: Likewise.
1161 * bfd/elf32-ppc.c: Likewise.
1162 * bfd/elf32-rl78.c: Likewise.
1163 * bfd/elf32-rx.c: Likewise.
1164 * bfd/elf32-s390.c: Likewise.
1165 * bfd/elf32-score.c: Likewise.
1166 * bfd/elf32-score7.c: Likewise.
1167 * bfd/elf32-sh-symbian.c: Likewise.
1168 * bfd/elf32-sh.c: Likewise.
1169 * bfd/elf32-sh64.c: Likewise.
1170 * bfd/elf32-spu.c: Likewise.
1171 * bfd/elf32-tic6x.c: Likewise.
1172 * bfd/elf32-tilepro.c: Likewise.
1173 * bfd/elf32-v850.c: Likewise.
1174 * bfd/elf32-vax.c: Likewise.
1175 * bfd/elf32-visium.c: Likewise.
1176 * bfd/elf32-xc16x.c: Likewise.
1177 * bfd/elf32-xstormy16.c: Likewise.
1178 * bfd/elf32-xtensa.c: Likewise.
1179 * bfd/elf64-alpha.c: Likewise.
1180 * bfd/elf64-hppa.c: Likewise.
1181 * bfd/elf64-ia64-vms.c: Likewise.
1182 * bfd/elf64-mmix.c: Likewise.
1183 * bfd/elf64-ppc.c: Likewise.
1184 * bfd/elf64-s390.c: Likewise.
1185 * bfd/elf64-sh64.c: Likewise.
1186 * bfd/elf64-x86-64.c: Likewise.
1187 * bfd/elflink.c: Likewise.
1188 * bfd/elfnn-aarch64.c: Likewise.
1189 * bfd/elfnn-ia64.c: Likewise.
1190 * bfd/elfxx-mips.c: Likewise.
1191 * bfd/elfxx-sparc.c: Likewise.
1192 * bfd/elfxx-tilegx.c: Likewise.
1193 * bfd/i386linux.c: Likewise.
1194 * bfd/linker.c: Likewise.
1195 * bfd/m68klinux.c: Likewise.
1196 * bfd/pdp11.c: Likewise.
1197 * bfd/pe-mips.c: Likewise.
1198 * bfd/peXXigen.c: Likewise.
1199 * bfd/reloc.c: Likewise.
1200 * bfd/reloc16.c: Likewise.
1201 * bfd/sparclinux.c: Likewise.
1202 * bfd/sunos.c: Likewise.
1203 * bfd/vms-alpha.c: Likewise.
1204 * bfd/xcofflink.c: Likewise.
1206 2015-08-18 Alan Modra <amodra@gmail.com>
1209 * Makefile.am: Use $(SED) in place of sed throughout.
1210 * Makefile.in: Regenerate.
1212 2015-08-18 Alan Modra <amodra@gmail.com>
1214 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't redefine .TOC.
1215 if already defined, and set linker_def.
1216 (ppc64_elf_set_toc): Use .TOC. value if defined other than by
1219 2015-08-14 Alan Modra <amodra@gmail.com>
1222 * elf32-or1k.c: Revert 2015-08-11 change.
1224 2015-08-13 H.J. Lu <hongjiu.lu@intel.com>
1227 * elf32-i386.c (elf_i386_size_dynamic_sections): Issue an error
1228 for read-only segment with dynamic IFUNC relocations.
1229 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
1231 2015-08-12 Simon Dardis <simon.dardis@imgtec.com>
1233 * elfxx-mips.c (STUB_MOVE): Change to use 'or' only.
1234 (mips_o32_exec_plt0_entry, mips_n32_exec_plt0_entry,
1235 mips_n64_exec_plt0_entry, micromips_insn32_o32_exec_plt0_entry):
1236 Update to use 'or' instead of 'addu/daddu'.
1237 (_bfd_mips_elf_finish_dynamic_symbol): Update usage of STUB_MOVE.
1238 (move_insns_32): Reorder table.
1240 2015-08-11 H.J. Lu <hongjiu.lu@intel.com>
1242 * elf32-i386.c (elf_i386_relocate_section): Properly skip IFUNC
1243 relocations in debug sections.
1244 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1246 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1248 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Improve warning
1249 message for R_AARCH64_LD64_GOTPAGE_LO15/R_AARCH64_LD32_GOTPAGE_LO14.
1251 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1253 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): New.
1254 (aarch64_can_relax_tls): Use the new IS_AARCH64_TLS_RELAX_RELOC.
1256 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1258 * bfd/elfnn-aarch64.c (aarch64_type_of_stub): New parameter "sym_sec".
1259 Loose the check for symbol from ABS section.
1260 (elfNN_aarch64_size_stubs): Pass sym_sec.
1262 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1265 * elfnn-aarch64.c (aarch64_type_of_stub): Update destination for
1266 calls go through plt stub.
1267 (elfNN_aarch64_final_link_relocate): Adjust code logic for CALL26,
1268 JUMP26 relocation to support inserting veneer for call to plt stub.
1270 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1272 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
1273 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.
1274 (aarch64_reloc_got_type): Likewise.
1275 (elfNN_aarch64_final_link_relocate): Likewise.
1276 (elfNN_aarch64_relocate_section): Likewise.
1277 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1278 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1280 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1282 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12): New entry.
1283 * bfd-in2.h: Regenerate.
1284 * libbfd.h: Regenerate.
1285 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1286 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.
1288 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1290 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
1291 BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC.
1292 (aarch64_reloc_got_type): Likewise.
1293 (elfNN_aarch64_final_link_relocate): Likewise.
1294 (elfNN_aarch64_relocate_section): Likewise.
1295 (elfNN_aarch64_gc_sweep_hook): Likewise.
1296 (elfNN_aarch64_check_relocs): Likewise.
1297 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1298 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1300 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1302 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC): New entry.
1303 * bfd-in2.h: Regenerate.
1304 * libbfd.h: Regenerate.
1305 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1306 BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC.
1308 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1310 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
1311 BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21.
1312 (aarch64_reloc_got_type): Likewise.
1313 (elfNN_aarch64_final_link_relocate): Likewise.
1314 (elfNN_aarch64_relocate_section): Likewise.
1315 (elfNN_aarch64_gc_sweep_hook): Likewise.
1316 (elfNN_aarch64_check_relocs): Likewise.
1317 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1318 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1320 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1322 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21): New entry.
1323 * bfd-in2.h: Regenerate.
1324 * libbfd.h: Regenerate.
1325 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1326 BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21.
1328 2015-08-11 H.J. Lu <hongjiu.lu@intel.com>
1331 * elf32-i386.c (elf_i386_relocate_section): Skip IFUNC
1332 relocations in debug sections.
1333 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1335 2015-08-11 Peter Zotov <whitequark@whitequark.org>
1338 * elf32-or1k.c (R_OR1K_32_PCREL): Set pcrel_offset to TRUE.
1339 (R_OR1K_16_PCREL): Likewise.
1340 (R_OR1K_8_PCREL): Likewise.
1342 2015-08-11 Nick Clifton <nickc@redhat.com>
1345 * coff-sh.c (_bfd_sh_align_load_span): Fix typo when setting
1349 * elf.c (_bfd_elf_setup_sections): Add checks for corrupt section
1351 * peicode.h (pe_ILF_make_a_section): Ensure alignment of the
1352 used_by_bfd pointer.
1353 (pe_ILF_build_a_bfd): Ensure alignment of vars.data pointer.
1355 2015-08-11 H.J. Lu <hongjiu.lu@intel.com>
1357 * elf.c (_bfd_elf_copy_private_bfd_data): Fix a typo.
1359 2015-08-10 H.J. Lu <hongjiu.lu@intel.com>
1361 * elf-bfd.h (elf_symbol_version): New enum.
1362 (elf_link_hash_entry): Replace hidden with versioned.
1363 * elflink.c (_bfd_elf_merge_symbol): Don't look for symbol
1364 version if the symbol is unversioned. Initialize versioned.
1365 (_bfd_elf_add_default_symbol): Don't look for symbol version
1366 if the symbol is unversioned or hidden. Initialize versioned.
1367 (elf_collect_hash_codes): Don't look for symbol version if the
1368 symbol is unversioned.
1369 (elf_collect_gnu_hash_codes): Likewise.
1370 (bfd_elf_gc_mark_dynamic_ref_symbol): Likewise.
1371 (_bfd_elf_link_hash_copy_indirect): Check versioned instead of
1373 (elf_link_output_extsym): Likewise.
1375 2015-08-07 H.J. Lu <hongjiu.lu@intel.com>
1378 * elf.c (_bfd_elf_copy_private_bfd_data): When copying the
1379 sh_link and sh_info fields in stripped section headers, we also
1380 check if the sh_type, sh_flags, sh_addralign and sh_entsize
1381 fields of the output section match the output. Since
1382 --only-keep-debug turns all non-debug sections into SHT_NOBITS
1383 sections, the output SHT_NOBITS type matches any input type.
1385 2015-08-07 H.J. Lu <hongjiu.lu@intel.com>
1388 * elflink.c (_bfd_elf_merge_symbol): Add a parameter to indicate
1389 if the new symbol matches the existing one. The new hidden
1390 versioned symbol matches the existing symbol if they have the
1391 same symbol version. Update the existing symbol only if they
1393 (_bfd_elf_add_default_symbol): Update call to
1394 _bfd_elf_merge_symbol.
1395 (_bfd_elf_link_assign_sym_version): Don't set the hidden field
1397 (elf_link_add_object_symbols): Override a definition only if the
1398 new symbol matches the existing one.
1399 (_bfd_elf_link_hash_copy_indirect): Don't copy any references to
1400 the hidden versioned symbol.
1401 (elf_link_output_extsym): Bind a symbol locally when linking
1402 executable if it is locally defined, hidden versioned, not
1403 referenced by shared library and not exported. Turn on
1404 VERSYM_HIDDEN only if the hidden versioned symbol is defined
1407 2015-08-05 Nick Clifton <nickc@redhat.com>
1409 * elf.c (_bfd_elf_copy_private_bfd_data): Copy the sh_link and
1410 sh_info fields of sections whose type has been changed to
1413 2015-08-04 Yuriy M. Kaminskiy" <yumkam@gmail.com>
1414 Tyler Hicks <tyhicks@canonical.com>
1417 * ihex.c (ihex_scan): Fixes incorrect escape sequence in error message
1418 and stack overflow when char is signed and \200-\376 was in place of hex
1419 digit; also fixes \377 was handled as EOF instead of "incorrect character".
1420 (ihex_read_section): Changed for consistency.
1421 (ihex_bad_byte): Prevent (now impossible to trigger) stack
1422 overflow and incorrect escape sequence handling.
1423 * srec.c (srec_bad_byte): Likewise.
1425 2015-08-03 Hans-Peter Nilsson <hp@axis.com>
1427 * elf32-cris.c (cris_elf_relocate_section)
1428 (elf_cris_finish_dynamic_symbol, cris_elf_check_relocs)
1429 (elf_cris_discard_excess_dso_dynamics): Use SYMBOLIC_BIND, not
1430 just link_info->symbolic, to check if a symbol should be bound
1433 2015-07-30 H.J. Lu <hongjiu.lu@intel.com>
1436 * elflink.c (_bfd_elf_add_default_symbol): Add the default
1437 symbol if not performing a relocatable link.
1438 (elf_link_add_object_symbols): Adjust the default symbol if
1439 not performing a relocatable link.
1441 2015-07-29 H.J. Lu <hongjiu.lu@intel.com>
1443 * elflink.c (elf_link_add_object_symbols): Remove
1444 !info->relocatable check for info->executable. Add
1445 !info->relocatable check for !info->executable.
1446 (elf_link_output_extsym): Remove
1447 !info->relocatable check for info->executable.
1449 2015-07-29 Hans-Peter Nilsson <hp@bitrange.com>
1451 * mmo.c (mmo_write_symbols_and_terminator): Skip symbol-type
1452 assignment loop for bfd plugin objects.
1454 2015-07-28 Alan Modra <amodra@gmail.com>
1456 * elf.c (_bfd_elf_map_sections_to_segments): Do not make a new
1457 segment for loaded sections after nonloaded sections if the
1458 sections are on the same page.
1460 2015-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
1462 * configure.in: Add asprintf and vasprintf to AC_CHECK_DECLS.
1463 * config.in, configure: Regenerate.
1465 2015-07-27 H.J. Lu <hongjiu.lu@intel.com>
1467 * configure: Regenerated.
1469 2015-07-27 Nick Clifton <nickc@redhat.com>
1471 * elf32-msp430.c (uses_large_model): New function.
1472 (msp430_elf_eh_frame_address_size): New function.
1473 (elf_backend_eh_frame_address_size): Define.
1475 2015-07-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
1478 * elfnn-aarch64.c (elf_backend_extern_protected_data): Define.
1480 2015-07-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
1483 * elf32-arm.c (elf_backend_extern_protected_data): Define.
1485 2015-07-25 H.J. Lu <hongjiu.lu@intel.com>
1488 * elflink.c (elf_link_output_extsym): Check symbol version
1489 section check only if not linking executable, the symbol is
1490 referenced by shared library or not locally defined.
1492 2015-07-25 Thomas Preud'homme <thomas.preudhomme@arm.com>
1494 * elf32-arm.c (elf32_arm_final_link_relocate): Use SYMBOLIC_BIND to
1495 check if a symbol should be bound symbolically.
1496 * elf32-hppa.c (elf32_hppa_check_relocs,
1497 elf32_hppa_adjust_dynamic_symbol, elf32_hppa_relocate_section,
1498 elf32_hppa_finish_dynamic_symbol): Likewise.
1499 * elf32-m68k.c (elf_m68k_check_relocs,
1500 elf_m68k_relocate_section): Likewise.
1501 * elf32-nios2.c (nios2_elf32_relocate_section,
1502 nios2_elf32_check_relocs, allocate_dynrelocs): Likewise.
1503 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol,
1504 elf32_tic6x_relocate_section): Likewise.
1506 2015-07-24 Alan Modra <amodra@gmail.com>
1508 * elf.c (_bfd_elf_assign_file_positions_for_non_load): Use .rela
1509 prefix for reloc section corresponding to rela section associated
1510 with renamed debug section.
1512 2015-07-24 Alan Modra <amodra@gmail.com>
1514 * section.c (bfd_get_section_by_name_if): Iterate over entire hash
1517 2015-07-23 Joseph Myers <joseph@codesourcery.com>
1519 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections)
1520 <DT_MIPS_RLD_MAP_REL>: Add target address to host address
1521 difference, not to host pointer.
1523 2015-07-22 Alan Modra <amodra@gmail.com>
1525 * elf64-ppc.c (opd_entry_value): Remove assertion. Instead,
1526 return -1 if symbol referenced is not defined. Tidy.
1528 2015-07-20 Alan Modra <amodra@gmail.com>
1530 * po/SRC-POTFILES.in: Regenerate.
1532 2015-07-17 Jiong Wang <jiong.wang@arm.com>
1534 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Sort alphabetically.
1535 (IS_AARCH64_TLSDESC_RELOC): Sort alphabetically.
1537 2015-07-16 Jiong Wang <jiong.wang@arm.com>
1539 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
1540 BFD_RELOC_AARCH64_TLSLD_ADR_PREL21.
1541 (aarch64_reloc_got_type): Ditto.
1542 (elfNN_aarch64_final_link_relocate): Ditto.
1543 (elfNN_aarch64_relocate_section): Ditto.
1544 (elfNN_aarch64_gc_sweep_hook): Ditto.
1545 (elfNN_aarch64_check_relocs): Ditto.
1546 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
1547 (_bfd_aarch64_elf_resolve_relocation): Ditto.
1549 2015-07-16 Jiong Wang <jiong.wang@arm.com>
1551 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADR_PREL21): New entry.
1552 * bfd-in2.h: Regenerate.
1553 * libbfd.h: Regenerate.
1554 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1555 BFD_RELOC_AARCH64_TLSLD_ADR_PREL21.
1557 2015-07-10 H.J. Lu <hongjiu.lu@intel.com>
1560 * bfd.c (bfd_convert_section_size): New function.
1561 (bfd_convert_section_contents): Likewise.
1562 * bfd-in2.h: Regenerated.
1564 2015-07-09 Catherine Moore <clm@codesourcery.com>
1566 * elflink.c (bfd_elf_size_dynamic_sections): Call to
1567 _bfd_elf_maybe_strip_eh_frame_hdr should be before
1568 bed->elf_backend_size_dynamic_sections.
1570 2015-07-08 Pitchumani Sivanupandi <pitchumani.s@atmel.com>
1572 * elf32-avr.c: Add 32 bit PC relative relocation for AVR target.
1574 2015-07-05 Richard Sandiford <richard.sandiford@arm.com>
1576 * elf64-ppc.c (toc_adjusting_stub_needed): Use the symbol value
1577 plus addend rather than the original st_value when looking up
1578 entries in opd->adjust.
1580 2015-07-03 Kai Tietz <ktietz@redhat.com>
1581 Nick Clifton <nickc@redhat.com>
1584 * coffcode.h (coff_bfd_gc_sections): Define default
1585 to bfd_coff_gc_sections function.
1586 (coff_gc_mark_hook_fn): New type.
1587 * coffgen.c (init_reloc_cookie): Copy and adjust coff
1588 related code about gc-sections from elflink.c to here.
1589 (fini_reloc_cookie): Likewise.
1590 (init_reloc_cookie_rels): Likewise.
1591 (fini_reloc_cookie_rels): Likewise.
1592 (init_reloc_cookie_for_section): Likewise.
1593 (fini_reloc_cookie_for_section): Likewise.
1594 (_bfd_coff_gc_mark_hook): Likewise.
1595 (_bfd_coff_gc_mark_rsec): Likewise.
1596 (_bfd_coff_gc_mark_reloc): Likewise.
1597 (_bfd_coff_gc_mark): Likewise.
1598 (_bfd_coff_gc_mark_extra_sections): Likewise.
1599 (coff_gc_sweep_symbol_info): Likewise.
1600 (coff_gc_sweep_symbol): Likewise.
1601 (gc_sweep_hook_fn): Likewise.
1602 (coff_gc_sweep): Likewise.
1603 (bfd_coff_gc_sections): Likewise.
1604 (_bfd_coff_gc_keep): Likewise.
1605 * libcoff-in.h (coff_reloc_cookie): New struct.
1606 (bfd_coff_gc_sections): New prototype.
1607 * libcoff.h: Regenerate.
1609 2015-07-01 Sandra Loosemore <sandra@codesourcery.com>
1610 Cesar Philippidis <cesar@codesourcery.com>
1612 * bfd-in2.h: Regenerated.
1613 * elf32-nios2.c (elf_nios2_howto_table_rel): Rename to...
1614 (elf_nios2_r1_howto_table_rel): This.
1615 (elf_nios2_r2_howto_table_rel): New.
1617 (lookup_howto): Add ABFD parameter. Adjust to look up in either
1618 the R1 or R2 relocation table, as determined by ABFD.
1619 (nios2_reloc_map): Add R2 relocations.
1620 (nios2_elf32_bfd_reloc_type_lookup): Do lookup using lookup_howto.
1621 Pass it the ABFD parameter.
1622 (nios2_elf32_bfd_reloc_name_lookup): Use ABFD to decide whether to
1623 return an R1 or R2 relocation.
1624 (nios2_elf32_info_to_howto): Do lookup using lookup_howto.
1625 Pass it the ABFD parameter.
1626 (nios2_elf32_do_call26_relocate): Check for alignment on a 4-byte
1628 (nios2_elf32_relocate_section): Adjust call to lookup_howto.
1629 * libbfd.h: Regenerated.
1630 * reloc.c (BFD_RELOC_NIOS2_R2_S12): New.
1631 (BFD_RELOC_NIOS2_R2_I10_1_PCREL): New.
1632 (BFD_RELOC_NIOS2_R2_T1I7_1_PCREL): New.
1633 (BFD_RELOC_NIOS2_R2_T1I7_2): New.
1634 (BFD_RELOC_NIOS2_R2_T2I4): New.
1635 (BFD_RELOC_NIOS2_R2_T2I4_1): New.
1636 (BFD_RELOC_NIOS2_R2_T2I4_2): New.
1637 (BFD_RELOC_NIOS2_R2_X1I7_2): New.
1638 (BFD_RELOC_NIOS2_R2_X2L5): New.
1639 (BFD_RELOC_NIOS2_R2_F1I5_2): New.
1640 (BFD_RELOC_NIOS2_R2_L5I4X1): New.
1641 (BFD_RELOC_NIOS2_R2_T1X1I6): New.
1642 (BFD_RELOC_NIOS2_R2_T1X1I6_2): New.
1644 2015-07-01 Sandra Loosemore <sandra@codesourcery.com>
1645 Cesar Philippidis <cesar@codesourcery.com>
1647 * archures.c (bfd_mach_nios2r1, bfd_mach_nios2r2): New.
1648 * bfd-in2.h: Regenerated.
1649 * cpu-nios2.c (nios2_compatible): New.
1650 (N): Use nios2_compatible instead of bfd_default_compatible.
1651 (NIOS2R1_NEXT, NIOS2R2_NEXT): Define.
1652 (arch_info_struct): New.
1653 (bfd_nios2_arch): Chain to NIOS2R1_NEXT.
1654 * elf32-nios2.c (is_nios2_elf): New.
1655 (nios2_elf32_merge_private_bfd_data): New.
1656 (nios2_elf32_object_p): New.
1657 (bfd_elf32_bfd_merge_private_bfd_data): Define.
1658 (elf_backend_object_p): Define.
1660 2015-07-01 H.J. Lu <hongjiu.lu@intel.com>
1662 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Refactor.
1664 2015-06-30 Nick Clifton <nickc@redhat.com>
1667 * elf-attrs.c (obj_attr_size): Use an unsigned int type for the tag.
1668 (write_obj_attribute): Likewise.
1669 (elf_new_obj_attr): Likewise.
1670 (bfd_elf_get_obj_attr_int): Likewise.
1671 (bfd_elf_add_obj_attr_int): Likewise.
1672 (bfd_elf_add_obj_attr_string): Likewise.
1673 (bfd_elf_add_obj_attr_int_string): Likewise.
1674 (gnu_obj_attrs_arg_type): Likewise.
1675 (_bfd_elf_obj_attrs_arg_type): Likewise.
1676 (_bfd_elf_parse_attributes): Likewise.
1677 (_bfd_elf_merge_unknown_attribute_list): Likewise.
1678 * elf-bfd.h (struct obj_attribute_list): Likewise.
1681 2015-06-28 H.J. Lu <hongjiu.lu@intel.com>
1683 * bfd-in.h (compressed_debug_section_type): Remove
1684 COMPRESS_DEBUG_ZLIB.
1685 * bfd-in2.h : Regenerated.
1687 2015-06-26 Matthew Fortune <matthew.fortune@imgtec.com>
1689 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Use executable
1690 instead of !shared to indicate an application vs shared library.
1691 (_bfd_mips_elf_size_dynamic_sections): Likewise.
1692 (_bfd_mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP_REL.
1693 (_bfd_mips_elf_get_target_dtag): Likewise.
1695 2015-06-25 DJ Delorie <dj@redhat.com>
1697 * elf32-msp430.c (msp430_final_link_relocate): Fix comments. Fix
1698 REL loads to match RELA stores.
1700 2015-06-25 H.J. Lu <hongjiu.lu@intel.com>
1702 * elf.c (_bfd_elf_compute_section_file_positions): Don't
1703 initialize sh_size for .shstrtab here.
1705 2015-06-25 H.J. Lu <hongjiu.lu@intel.com>
1708 * elf-bfd.h (elf_sym_strtab): New.
1709 (elf_link_hash_table): Add strtabcount, strtabsize and
1711 (_bfd_elf_stringtab_init): Removed.
1712 * elf.c (_bfd_elf_stringtab_init): Removed.
1713 (_bfd_elf_compute_section_file_positions): Replace
1714 bfd_strtab_hash/_bfd_elf_stringtab_init/_bfd_stringtab_free/
1715 _bfd_stringtab_size with
1716 elf_strtab_hash/_bfd_elf_strtab_init/_bfd_elf_strtab_free/
1717 _bfd_elf_strtab_size. Use _bfd_elf_strtab_add,
1718 _bfd_elf_strtab_finalize and _bfd_elf_strtab_offset to get
1720 (swap_out_syms): Likewise.
1721 * elflink.c (elf_final_link_info): Replace bfd_strtab_hash
1722 with elf_strtab_hash. Remove symbuf, symbuf_count,
1723 symbuf_size and shndxbuf_size.
1724 (elf_link_flush_output_syms): Removed.
1725 (elf_link_output_sym): Renamed to ...
1726 (elf_link_output_symstrtab): This. Replace _bfd_stringtab_add
1727 with _bfd_elf_strtab_add. Don't flush symbols to the file nor
1729 (elf_link_swap_symbols_out): New.
1730 (elf_link_output_extsym): Replace elf_link_output_sym with
1731 elf_link_output_symstrtab.
1732 (elf_link_input_bfd): Likewise.
1733 (elf_final_link_free): Replace _bfd_stringtab_free with
1734 _bfd_elf_strtab_free. Remove symbuf.
1735 (bfd_elf_final_link): Replace _bfd_elf_stringtab_init with
1736 _bfd_elf_strtab_init. Don't set symbuf, symbuf_count,
1737 symbuf_size nor shndxbuf_size. Initialize strtabsize and
1738 strtab. Initialize symshndxbuf to -1 when number of sections
1739 >= 64K. Replace elf_link_output_sym/elf_link_output_sym with
1740 elf_link_output_symstrtab/elf_link_output_symstrtab. Don't
1741 call elf_link_flush_output_syms. Call _bfd_elf_strtab_finalize
1742 and elf_link_swap_symbols_out. Replace _bfd_stringtab_size
1743 and _bfd_stringtab_emit with _bfd_elf_strtab_size and
1744 _bfd_elf_strtab_emit.
1746 2015-06-24 H.J. Lu <hongjiu.lu@intel.com>
1748 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Silence older
1751 2015-06-24 H.J. Lu <hongjiu.lu@intel.com>
1753 * elf32-i386.c (elf_i386_allocate_dynrelocs): Always allocate
1754 space for the first .plt entry.
1755 (elf_i386_size_dynamic_sections): Always add DT_PLTGOT for .plt
1756 section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
1757 there are PLT relocations.
1758 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Always
1759 allocate space for the first .plt entry.
1760 (elf_x86_64_size_dynamic_sections): Always add DT_PLTGOT for
1761 .plt section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
1762 there are PLT relocations.
1764 2015-06-24 H.J. Lu <hongjiu.lu@intel.com>
1767 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Don't convert
1768 R_X86_64_GOTPCREL to R_X86_64_PC32 if it will cause relocation
1771 2015-06-23 Jiong Wang <jiong.wang@arm.com>
1773 * elfnn-aarch64.c (aarch64_readonly_dynrelocs): New function.
1774 (elfNN_aarch64_size_dynamic_sections): Traverse hash table to check
1775 relocations against read-only sections.
1777 2015-06-18 Nick Clifton <nickc@redhat.com>
1780 * elf32-arm.c (R_ARM_TLS_LE32): Set the special function to NULL.
1782 2015-06-15 Jon Turney <jon.turney@dronecode.org.uk>
1784 * bfd.c: Change struct bfd_build_id to use bfd_size_type.
1785 * bfd-in2.h : Regenerate.
1787 2015-06-16 Alan Modra <amodra@gmail.com>
1789 * elf32-ppc.c (ppc_elf_relocate_section): Correct binary search of
1792 2015-06-10 Jon Turney <jon.turney@dronecode.org.uk>
1794 * elf-bfd.h : Remove struct elf_build_id.
1795 * bfd.c : Add struct bfd_build_id.
1796 * bfd-in2.h: Regenerate.
1797 * elf.c (elfobj_grok_gnu_build_id): Update to use bfd_build_id.
1798 * libpei.h: Add protoype and macros for
1799 bfd_XXi_slurp_codeview_record.
1800 * peXXigen.c (_bfd_XXi_slurp_codeview_record): Make public
1801 * peicode.h (pe_bfd_read_buildid): Add.
1802 (pe_bfd_object_p): Use pe_bfd_read_buildid().
1804 2015-06-15 Renlin Li <renlin.li@arm.com>
1806 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): New entry.
1807 * bfd-in2.h: Regenerate.
1808 * libbfd.h: Regenerate.
1809 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1810 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15.
1812 2015-06-15 Alan Modra <amodra@gmail.com>
1814 * cofflink.c (_bfd_coff_generic_relocate_section): Revert
1815 2014-03-26 change. Call _bfd_clear_contents for relocs against
1816 local and global symbols defined in discarded input sections.
1818 2015-06-05 Nick Clifton <nickc@redhat.com>
1820 * elf32-msp430.c (rl78_sym_diff_handler): New function.
1821 (msp430_howto_table): Use the new function for the SYM_DIFF reloc.
1822 (msp430x_howto_table): Likewise.
1824 2015-06-05 Alan Modra <amodra@gmail.com>
1826 * elf64-ppc.c (ppc_elf_relocate_section): Move dynamic text
1827 relocs with insns moved by --ppc476-workaround. Correct
1828 output of REL16 relocs.
1830 2015-06-01 Jiong Wang <jiong.wang@arm.com>
1832 * elfnn-aarch64.c (aarch64_reloc_got_type): Support
1833 BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
1834 (elfNN_aarch64_final_link_relocate): Ditto.
1835 (elfNN_aarch64_gc_swap_hook): Ditto.
1836 (elfNN_aarch64_check_relocs): Ditto.
1837 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
1839 2015-06-01 Jiong Wang <jiong.wang@arm.com>
1841 * reloc.c (BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14): New entry.
1842 * bfd-in2.h: Regenerate.
1843 * libbfd.h: Regenerate.
1844 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1845 BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
1847 2015-06-01 Jiong Wang <jiong.wang@arm.com>
1849 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Set overflow type to
1850 complain_overflow_unsigned for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
1851 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Don't use
1852 PGOFF for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
1854 2015-06-01 Jiong Wang <jiong.wang@arm.com>
1856 * elfnn-aarch64.c (aarch64_reloc_got_type): Support
1857 BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
1858 (elfNN_aarch64_final_link_relocate): Ditto.
1859 (elfNN_aarch64_gc_swap_hook): Ditto.
1860 (elfNN_aarch64_check_relocs): Ditto.
1861 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
1863 2015-06-01 Jiong Wang <jiong.wang@arm.com>
1865 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15): New entry.
1866 * bfd-in2.h: Regenerate.
1867 * libbfd.h: Regenerate.
1868 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1869 BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
1871 2015-05-28 Catherine Moore <clm@codesourcery.com>
1872 Bernd Schmidt <bernds@codesourcery.com>
1873 Paul Brook <paul@codesourcery.com>
1876 * bfd-in2.h: Regenerated.
1877 * elf-bfd.h (DWARF2_EH_HDR, COMPACT_EH_HDR): Define.
1878 (COMPACT_EH_CANT_UNWIND_OPCODE): Define.
1879 (dwarf_eh_frame_hdr_info): Move dwarf-specific fields from
1881 (compact_eh_frame_hdr_info): Declare.
1882 (eh_frame_hdr_info): Redeclare with union for dwarf-specific
1883 fields and compact-eh fields.
1884 (elf_backend_data): Add cant_unwind_opcode and compact_eh_encoding.
1885 (bfd_elf_section_data): Add eh_frame_entry_field.
1886 (elf_section_eh_frame_entry): Define.
1887 (bfd_elf_parse_eh_frame_entries): Declare.
1888 (_bfd_elf_parse_eh_frame_entry): Declare.
1889 (_bfd_elf_end_eh_frame_parsing): Declare.
1890 (_bfd_elf_write_section_eh_frame_entry): Declare.
1891 (_bfd_elf_eh_frame_entry_present): Declare.
1892 (_bfd_elf_section_for_symbol): Declare.
1893 * elf-eh-frame.c (bfd_elf_discard_eh_frame_entry): New function.
1894 (bfd_elf_record_eh_frame_entry): New function.
1895 (_bfd_elf_parse_eh_frame_entry): New function.
1896 (_bfd_elf_parse_eh_frame): Update hdr_info field references.
1897 (cmp_eh_frame_hdr): New function.
1898 (add_eh_frame_hdr_terminator): New function.
1899 (_bfd_elf_end_eh_frame_parsing): New function.
1900 (find_merged_cie): Update hdr_info field references.
1901 (_bfd_elf_discard_section_eh_frame): Likewise.
1902 (_bfd_elf_discard_section_eh_frame_hdr): Add Compact EH support.
1903 (_bfd_elf_eh_frame_entry_present): New function.
1904 (_bfd_elf_maybe_strip_eh_frame_hdr): Add Compact EH support.
1905 (_bfd_elf_write_section_eh_frame_entry): New function.
1906 (_bfd_elf_write_section_eh_frame): Update hdr_info field references.
1907 (_bfd_elf_fixup_eh_frame_hdr): New function.
1908 (write_compact_eh_frame_hdr): New function.
1909 (write_dwarf_eh_frame_hdr): New function.
1910 (_bfd_elf_write_section_eh_frame_hdr): Add Compact EH support.
1911 * elflink.c (_bfd_elf_section_for_symbol): New function.
1912 (elf_section_ignore_discarded_relocs): Add Compact EH support.
1913 (elf_link_input_bfd): Likewise.
1914 (bfd_elf_final_link): Likewise.
1915 (_bfd_elf_gc_mark): Likewise.
1916 (bfd_elf_parse_eh_frame_entries): New function.
1917 (bfd_elf_gc_sections): Add Compact EH support.
1918 (bfd_elf_discard_info): Likewise.
1919 * elfxx-mips.c: Include dwarf2.h.
1920 (_bfd_mips_elf_compact_eh_encoding): New function.
1921 (_bfd_mips_elf_cant_unwind_opcode): New function.
1922 * elfxx-mips.h (_bfd_mips_elf_compact_eh_encoding): Declare.
1923 (_bfd_mips_elf_cant_unwind_opcode): Declare.
1924 (elf_backend_compact_eh_encoding): Define.
1925 (elf_backend_cant_unwind_opcode): Define.
1926 * elfxx-target.h (elf_backend_compact_eh_encoding): Provide default.
1927 (elf_backend_cant_unwind_opcode): Provide default.
1928 (elf_backend_data elfNN_bed): Add elf_backend_compact_eh_encoding and
1929 elf_backend_cant_unwind_opcode.
1930 * section.c (SEC_INFO_TYPE_EH_FRAME_ENTRY): Add definition.
1932 2015-05-27 H.J. Lu <hongjiu.lu@intel.com>
1935 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
1936 for now binding only if pointer equality isn't needed.
1937 (elf_i386_allocate_dynrelocs): Use .plt.got section for now
1938 binding only if pointer equality isn't needed.
1939 * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
1940 section for now binding only if pointer equality isn't needed.
1941 (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
1942 binding only if pointer equality isn't needed.
1944 2015-05-26 H.J. Lu <hongjiu.lu@intel.com>
1947 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip extra relocations
1948 in .rel.plt/.rela.plt.
1949 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
1951 2015-05-19 Jiong Wang <jiong.wang@arm.com>
1953 * elfnn-aarch64.c (aarch64_tls_transition_without_check): Sort
1954 relocation case labels alphabetically.
1955 (elfNN_aarch64_final_link_relocate): Ditto.
1956 (elfNN_aarch64_tls_relax): Ditto.
1957 (elfNN_aarch64_relocate_section): Ditto.
1958 (elfNN_aarch64_gc_sweep_hook): Ditto.
1959 (elfNN_aarch64_check_relocs): Ditto.
1960 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
1961 (_bfd_aarch64_elf_resolve_relocation): Ditto.
1963 2015-05-18 Jiong Wang <jiong.wang@arm.com>
1965 * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Rewrite
1968 2015-05-16 H.J. Lu <hongjiu.lu@intel.com>
1970 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
1972 (elf_i386_allocate_dynrelocs): Use .plt.got section for now
1974 * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
1975 section for now binding.
1976 (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
1979 2015-05-14 H.J. Lu <hongjiu.lu@intel.com>
1981 * bfd.c (bfd_update_compression_header): Also write the zlib
1982 header if the SHF_COMPRESSED bit cleared..
1983 (bfd_check_compression_header): Return the uncompressed size.
1984 * compress.c (decompress_contents): Don't skip the zlib header.
1985 (bfd_compress_section_contents): Properly handle ELFCOMPRESS_ZLIB,
1986 which doesn't have the zlib header.
1987 (bfd_init_section_decompress_status): Likewise.
1988 (bfd_get_full_section_contents): Updated.
1989 (bfd_is_section_compressed): Likewise.
1990 (bfd_is_section_compressed_with_header): Return the uncompressed
1992 * elf.c (_bfd_elf_make_section_from_shdr): Updated.
1993 * bfd-in2.h: Regenerated.
1995 2015-05-14 Jiong Wang <jiong.wang@arm.com>
1997 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Remove overflow
2000 2015-05-14 Max Filippov <jcmvbkbc@gmail.com>
2002 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Treat PLT reference
2003 as GOT reference when plt.refcount is not positive.
2005 2015-05-12 H.J. Lu <hongjiu.lu@intel.com>
2007 * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate space
2008 for the first .plt entry only if needed.
2009 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2011 2015-05-11 H.J. Lu <hongjiu.lu@intel.com>
2013 * Makefile.am (ALL_MACHINES): Add cpu-iamcu.lo.
2014 (ALL_MACHINES_CFILES): Likewise.
2015 * archures.c (bfd_mach_iamcu): New.
2016 (bfd_mach_i386_iamcu): Likewise.
2017 (bfd_mach_i386_iamcu_intel_syntax): Likewise.
2018 (bfd_iamcu_arch): Likewise.
2019 (bfd_archures_list): Add &bfd_iamcu_arch.
2020 * config.bfd (targ_selvecs): Add iamcu_elf32_vec to
2022 (targ_archs): Add bfd_iamcu_arch if needed.
2023 * configure.ac: Support iamcu_elf32_vec.
2024 * cpu-iamcu.c: New file.
2025 * elf32-i386.c (elf32_iamcu_elf_object_p): New function.
2026 Add support for iamcu_elf32_vec and elf32_iamcu_bed.
2027 * targets.c (iamcu_elf32_vec): New.
2028 (_bfd_target_vector): Add iamcu_elf32_vec.
2029 * Makefile.in: Regenerated.
2030 * bfd-in2.h: Likewise.
2031 * configure: Likewise.
2033 2015-05-11 H.J. Lu <hongjiu.lu@intel.com>
2035 * elfcode.h (elf_object_p): Replace EM_486 with EM_IAMCU.
2037 2015-05-10 H.J. Lu <hongjiu.lu@intel.com>
2039 * elf32-i386.c (elf_i386_convert_mov_to_lea): Replace input_bfd
2040 and output_bfd with abfd.
2041 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
2043 2015-05-06 Toni Spets <toni.spets@iki.fi>
2046 * peXXigen.c (rsrc_process_section): Skip discarded resource
2049 2015-05-01 H.J. Lu <hongjiu.lu@intel.com>
2051 * config.bfd: Support i[3-7]86-*-elf*.
2053 2015-04-30 H.J. Lu <hongjiu.lu@intel.com>
2055 * elf32-i386.c (elf_backend_post_process_headers): Undef for
2058 2015-04-30 Nick Clifton <nickc@redhat.com>
2061 * elf32-mep.c (MEPREL): Use bfd_elf_generic_reloc instead of
2063 (mep_reloc): Delete unused function.
2065 2015-04-29 Nick Clifton <nickc@redhat.com>
2068 * coff-i386.c (coff_i386_rtype_to_howto): Allow absolute PCRLONG
2071 2015-04-27 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2073 * elf-s390-common.c (elf_s390_merge_obj_attributes): New function.
2074 * elf32-s390.c (elf32_s390_merge_private_bfd_data): Call
2075 elf_s390_merge_obj_attributes.
2076 * elf64-s390.c (elf64_s390_merge_private_bfd_data): New function.
2078 2015-04-24 Jiong Wang <jiong.wang@arm.com>
2081 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic): Count local symbol for
2082 GOT_NORMAL for both sgot/srelgot section.
2083 (elfNN_aarch64_final_link_relocate): Relocate against GOT entry address
2084 and generate necessary runtime relocation for GOT entry.
2086 2015-04-24 H.J. Lu <hongjiu.lu@intel.com>
2089 * archive.c (_bfd_get_elt_at_filepos): Copy is_linker_input.
2091 2015-04-24 Jiong Wang <jiong.wang@arm.com>
2093 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Reject
2094 PC-relative relocation for external symbol.
2096 2015-04-24 Nick Clifton <nickc@redhat.com>
2099 * compress.c (decompress_contents): Zero initialse the z_stream
2102 2015-04-24 Nick Clifton <nickc@redhat.com>
2104 * elf.c (_bfd_elf_is_local_label_name): Extend test for assembler
2105 local labels to include local labels with a numeric suffix and
2108 2015-04-24 H.J. Lu <hongjiu.lu@intel.com>
2111 * section.c (SEC_MEP_VLIW): New.
2112 * bfd-in2.h: Regenerated.
2114 2015-04-23 H.J. Lu <hongjiu.lu@intel.com>
2117 * compress.c (bfd_compress_section_contents): Remove the
2118 write_compress argument.
2119 (bfd_init_section_compress_status): Updated.
2120 (bfd_compress_section): Likewise.
2121 * elf.c (_bfd_elf_set_reloc_sh_name): New.
2122 (_bfd_elf_init_reloc_shdr): Add delay_st_name_p. Set sh_name
2123 to (unsigned int) -1 if delay_st_name_p is TRUE. Use
2124 _bfd_elf_set_reloc_sh_name.
2125 (elf_fake_sections): Don't rename DWARF debug section for
2126 linker output if it will be compressed. Instead, set
2127 delay_st_name_p to TRUE and pass it to _bfd_elf_init_reloc_shdr.
2128 (assign_section_numbers): Call _bfd_elf_strtab_addref only if
2129 sh_name != (unsigned int) -1. Don't finalize nor assign
2130 shstrtab section here. Delay setting output section names to
2131 _bfd_elf_write_object_contents.
2132 (_bfd_elf_compute_section_file_positions): Update comments on
2133 sh_offset for shstrtab section.
2134 (assign_file_positions_for_non_load_sections): Set sh_offset to
2135 -1 for shstrtab section.
2136 (assign_file_positions_except_relocs): Likewise.
2137 (_bfd_elf_assign_file_positions_for_non_load): Set up sh_name
2138 when compressing DWARF debug sections. Place shstrtab section
2139 after DWARF debug sections have been compressed.
2140 (_bfd_elf_write_object_contents): Setting sh_name for output
2143 2015-04-23 H.J. Lu <hongjiu.lu@intel.com>
2146 * bfd.c (bfd): Add is_linker_input.
2147 * elf.c (convert_debug_to_zdebug): New.
2148 (convert_zdebug_to_debug): Likewise.
2149 (_bfd_elf_make_section_from_shdr): Don't convert .debug_* to
2150 .zdebug_* here. Use convert_zdebug_to_debug. Set SEC_ELF_RENAME.
2151 (_bfd_elf_init_reloc_shdr): Pass a pointer to section name
2152 instead of a pointer to section.
2153 (elf_fake_sections): Rename the section name if SEC_ELF_RENAME
2155 * section.c (SEC_ELF_RENAME): New.
2156 * bfd-in2.h: Regenerated.
2158 2015-04-23 Alan Modra <amodra@gmail.com>
2160 * elf64-ppc.c (TOC_BASE_ALIGN): Define.
2161 (ppc64_elf_next_toc_section): Align multi-got toc base.
2162 (ppc64_elf_set_toc): Likewise initial toc base and .TOC. symbol.
2164 2015-04-22 H.J. Lu <hongjiu.lu@intel.com>
2167 * elf32-i386.c (elf_i386_link_hash_entry): Add gotoff_ref.
2168 (elf_i386_link_hash_newfunc): Initialize gotoff_ref to 0.
2169 (elf_i386_create_dynamic_sections): Always allow copy relocs for
2170 building executables.
2171 (elf_i386_copy_indirect_symbol): Also copy gotoff_ref.
2172 (elf_i386_check_relocs): Set gotoff_ref for R_386_GOTOFF.
2173 (elf_i386_adjust_dynamic_symbol): Also allocate copy relocs for
2174 PIE and R_386_GOTOFF.
2175 (elf_i386_relocate_section): Allow R_386_GOTOFF in executable.
2177 2015-04-20 H.J. Lu <hongjiu.lu@intel.com>
2179 * elf.c (assign_section_numbers): Always set up sh_name.
2181 2015-04-20 H.J. Lu <hongjiu.lu@intel.com>
2183 * elf.c (assign_file_positions_for_non_load_sections): Iterate
2184 sections by pointer.
2185 (_bfd_elf_assign_file_positions_for_non_load): Likewise.
2187 2015-04-14 H.J. Lu <hongjiu.lu@intel.com>
2189 * bfd-in.h (compressed_debug_section_type): New.
2190 * compress.c (bfd_compress_section_contents): Add an argument
2191 for linker write compression and always generate .zdebug_*
2192 section when linking.
2193 (bfd_init_section_compress_status): Pass FALSE to
2194 bfd_compress_section_contents.
2195 (bfd_compress_section): New function.
2196 * elf.c (elf_fake_sections): For linking, set SEC_ELF_COMPRESS
2197 on DWARF debug sections if COMPRESS_DEBUG is set and rename
2198 section if COMPRESS_DEBUG_GABI_ZLIB isn't set.
2199 (assign_file_positions_for_non_load_sections): Set sh_offset
2200 to -1 if SEC_ELF_COMPRESS is set.
2201 (assign_file_positions_except_relocs): Likwise.
2202 (_bfd_elf_assign_file_positions_for_relocs): Renamed to ...
2203 (_bfd_elf_assign_file_positions_for_non_load): This. Change
2204 return time to bfd_boolean. Compress the section if
2205 SEC_ELF_COMPRESS is set.
2206 (_bfd_elf_write_object_contents): Updated.
2207 (_bfd_elf_set_section_contents): Write section contents to
2208 the buffer if SEC_ELF_COMPRESS is set.
2209 * merge.c: Include "elf-bfd.h".
2210 (sec_merge_emit): Add arguments for contents and offset. Write
2211 to contents with offset if contents isn't NULL.
2212 (_bfd_write_merged_section): Write section contents to the
2213 buffer if SEC_ELF_COMPRESS is set. Pass contents and
2214 output_offset to sec_merge_emit.
2215 * elflink.c (bfd_elf_final_link): Allocate the buffer for
2216 output section contents if SEC_ELF_COMPRESS is set.
2217 * section.c (SEC_ELF_COMPRESS): New.
2218 * bfd-in2.h: Regenerated.
2220 2015-04-15 Alan Modra <amodra@gmail.com>
2222 * elf32-rl78.c (rl78_elf_relocate_section): Typo fix.
2224 2015-04-14 Nick Clifton <nickc@redhat.com>
2226 * elf32-rl78.c (RL78_OP_REL): New macro.
2227 (rl78_elf_howto_table): Use it for complex relocs.
2228 (get_symbol_value): Handle the cases when the info or status
2230 (get_romstart): Cache the status returned by get_symbol_value.
2231 (get_ramstart): Likewise.
2232 (RL78_STACK_PUSH): Generate an error message if the stack
2234 (RL78_STACK_POP): Likewise for underflows.
2235 (rl78_compute_complex_reloc): New function. Contains the basic
2236 processing code for all RL78 complex relocs.
2237 (rl78_special_reloc): New function. Provides special reloc
2238 handling for complex relocs.
2239 (rl78_elf_relocate_section): Use rl78_compute_complex_reloc.
2240 (rl78_offset_for_reloc): Likewise.
2242 2015-04-14 H.J. Lu <hongjiu.lu@intel.com>
2245 * elflink.c (_bfd_elf_adjust_dynamic_copy): Check
2246 info->extern_protected_data when warning copy relocs against
2248 (_bfd_elf_symbol_refs_local_p): Check info->extern_protected_data
2249 when checking protected non-function symbols.
2251 2015-04-13 John Baldwin <jhb@FreeBSD.org>
2253 * elf.c (elfcore_grok_note): Recognize NT_X86_XSTATE on
2255 (elfcore_write_xstatereg): Use correct note name on FreeBSD.
2257 2015-04-13 H.J. Lu <hongjiu.lu@intel.com>
2260 * elflink.c (elf_link_is_defined_archive_symbol): Return FALSE
2261 if the object has been claimed by plugin.
2263 2015-04-11 H.J. Lu <hongjiu.lu@intel.com>
2265 * elf32-i386.c (elf_i386_relocate_section): Replace SYMBOLIC_BIND
2266 with SYMBOL_REFERENCES_LOCAL when checking R_386_GOTOFF against
2267 protected data symbol when building shared library.
2268 * elf64-x86-64.c (elf_x86_64_relocate_section): Check
2269 R_X86_64_GOTOFF64 against undefined symbol and replace
2270 SYMBOLIC_BIND with SYMBOL_REFERENCES_LOCAL when checking
2271 R_X86_64_GOTOFF64 against protected data symbol when building
2274 2015-04-10 H.J. Lu <hongjiu.lu@intel.com>
2277 * elf32-i386.c (elf_i386_relocate_section): Also check R_386_GOTOFF
2278 against protected data symbol when building shared library.
2279 * elf64-x86-64.c (elf_x86_64_relocate_section): Also check
2280 R_X86_64_GOTOFF64 against protected data symbol when building
2283 2015-04-10 H.J. Lu <hongjiu.lu@intel.com>
2287 * elf-bfd.h (elf_backend_data): Add extern_protected_data.
2288 * elf32-i386.c (elf_backend_extern_protected_data): New.
2290 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
2291 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
2292 copy relocs against protected symbols if extern_protected_data
2294 (_bfd_elf_symbol_refs_local_p): Don't return true on protected
2295 non-function symbols if extern_protected_data is true.
2296 * elfxx-target.h (elf_backend_extern_protected_data): New.
2298 (elfNN_bed): Initialize extern_protected_data with
2299 elf_backend_extern_protected_data.
2301 2015-04-10 H.J. Lu <hongjiu.lu@intel.com>
2303 * compress.c (bfd_compress_section_contents): Replace bfd_malloc
2304 and free with bfd_alloc and bfd_release on compressed buffer.
2305 Release buffer if compressed section isn't smaller.
2307 2015-04-10 Alan Modra <amodra@gmail.com>
2310 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't report an error
2311 on adding a protected visibility variable to .dynbss.
2313 2015-04-10 Alan Modra <amodra@gmail.com>
2315 Revert 2015-03-05 H.J. Lu <hongjiu.lu@intel.com>
2318 * elf-bfd.h (elf_backend_data): Delete extern_protected_data.
2319 * elf32-i386.c (elf_backend_extern_protected_data): Delete.
2320 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
2321 * elflink.c (_bfd_elf_adjust_dynamic_copy): Remove
2322 extern_protected_data test.
2323 (_bfd_elf_symbol_refs_local_p): Likewise.
2324 * elfxx-target.h (elf_backend_extern_protected_data): Delete.
2325 (elfNN_bed): Delete elf_backend_extern_protected_data init.
2327 2015-04-09 H.J. Lu <hongjiu.lu@intel.com>
2329 * compress.c (bfd_compress_section_contents): Update comments.
2330 (bfd_init_section_decompress_status): Likewise.
2331 (bfd_init_section_compress_status): Likewise.
2333 2015-04-09 H.J. Lu <hongjiu.lu@intel.com>
2335 * elfxx-target.h (TARGET_BIG_SYM): Add BFD_COMPRESS_GABI to
2337 (TARGET_LITTLE_SYM): Likewise.
2339 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
2341 * elf32-xtensa.c (splay-tree.h): include header.
2342 (text_action_struct): drop next pointer.
2343 (text_action_list_struct): drop head pointer, add count and
2345 (find_fill_action): instead of linear search in text_action_list
2347 (text_action_compare, action_first, action_next): new functions.
2348 (text_action_add, text_action_add_literal): instead of linear
2349 search and insertion insert new node into the tree.
2350 (removed_by_actions): pass additional parameter: action_list,
2351 use it to traverse the tree.
2352 (offset_with_removed_text): pass additional action_list parameter
2353 to removed_by_actions.
2354 (map_action_fn_context): new typedef.
2355 (map_action_fn_context_struct): new structure.
2356 (map_action_fn): new function.
2357 (map_removal_by_action): use splay_tree_foreach to build map.
2358 (find_insn_action): replace linear search in text_action_list
2359 with series of splay_tree_lookups.
2360 (print_action, print_action_list_fn): new functions.
2361 (print_action_list): use splay_tree_foreach.
2362 (init_xtensa_relax_info): drop action_list.head initialization.
2363 Initialize the tree.
2364 (compute_text_actions): use non-zero action_list_count instead of
2365 non-NULL action list.
2366 (xlate_map_context): new typedef.
2367 (xlate_map_context_struct): new structure.
2368 (xlate_map_fn): new function.
2369 (build_xlate_map): use splay_tree_foreach to build map.
2370 (action_remove_bytes_fn): new function.
2371 (relax_section): use zero action_list_count instead of NULL
2372 action list. Use splay_tree_foreach to count final section size.
2373 Drop unused variable 'removed'.
2375 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
2377 * elf32-xtensa.c (removed_literal_map_entry): new typedef.
2378 (removed_literal_map_entry_struct): new structure.
2379 (removed_literal_list_struct): add new fields: n_map and map.
2380 (map_removed_literal, removed_literal_compare): new functions.
2381 (find_removed_literal): build index array for literals ordered
2382 by VMA, use binary search to find removed literal.
2384 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
2386 * elf32-xtensa.c (removal_by_action_entry_struct,
2387 removal_by_action_map_struct): new structures.
2388 (removal_by_action_entry, removal_by_action_map): new typedefs.
2389 (text_action_list_struct): add new field: map.
2390 (map_removal_by_action, removed_by_actions_map,
2391 offset_with_removed_text_map): new functions.
2392 (relax_section): replace offset_with_removed_text with
2393 offset_with_removed_text_map.
2394 (translate_reloc, relax_property_section, relax_section_symbols):
2395 replace removed_by_actions with removed_by_actions_map.
2397 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
2399 * elf32-xtensa.c (reloc_range_list, reloc_range_list_entry,
2400 reloc_range): new typedef.
2401 (reloc_range_list_struct, reloc_range_list_entry_struct,
2402 reloc_range_struct): new structures.
2403 (reloc_range_compare, build_reloc_ranges,
2404 reloc_range_list_append, reloc_range_list_remove,
2405 reloc_range_list_update_range, free_reloc_range_list): new
2407 (compute_text_actions): precompute relocation opcodes before the
2408 loop. Add relevant_relocs variable, initialize it before the
2409 loop, pass it to the check_section_ebb_pcrels_fit.
2410 (check_section_ebb_pcrels_fit): add new parameter:
2411 relevant_relocs. Update address range in the relevant_relocs if
2412 it's non-NULL and iterate only over relevant relocations.
2414 2015-04-09 Nick Clifton <nickc@redhat.com>
2416 * elf32-rx.c (describe_flags): Report the settings of the string
2418 (rx_elf_merge_private_bfd_data): Handle merging of the string insn
2421 2015-04-08 H.J. Lu <hongjiu.lu@intel.com>
2423 * compress.c (bfd_compress_section_contents): Work around a GCC
2424 uninitialized warning bug fixed in GCC 4.7.
2426 2015-04-08 H.J. Lu <hongjiu.lu@intel.com>
2428 * archive.c (_bfd_get_elt_at_filepos): Also copy BFD_COMPRESS_GABI
2430 * bfd.c (bfd::flags): Increase size to 18 bits.
2431 (BFD_COMPRESS_GABI): New.
2432 (BFD_FLAGS_SAVED): Add BFD_COMPRESS_GABI.
2433 (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
2434 (bfd_update_compression_header): New fuction.
2435 (bfd_check_compression_header): Likewise.
2436 (bfd_get_compression_header_size): Likewise.
2437 (bfd_is_section_compressed_with_header): Likewise.
2438 * compress.c (MAX_COMPRESSION_HEADER_SIZE): New.
2439 (bfd_compress_section_contents): Return the uncompressed size if
2440 the full section contents is compressed successfully. Support
2441 converting from/to .zdebug* sections.
2442 (bfd_get_full_section_contents): Call
2443 bfd_get_compression_header_size to get compression header size.
2444 (bfd_is_section_compressed): Renamed to ...
2445 (bfd_is_section_compressed_with_header): This. Add a pointer
2446 argument to return compression header size.
2447 (bfd_is_section_compressed): Use it.
2448 (bfd_init_section_decompress_status): Call
2449 bfd_get_compression_header_size to get compression header size.
2450 Return FALSE if uncompressed section size is 0.
2451 * elf.c (_bfd_elf_make_section_from_shdr): Support converting
2452 from/to .zdebug* sections.
2453 * bfd-in2.h: Regenerated.
2455 2015-04-07 Alan Modra <amodra@gmail.com>
2457 * elf.c (_bfd_elf_get_reloc_section): Allow for .got.plt being
2458 mapped to output .got section.
2460 2015-04-07 Alan Modra <amodra@gmail.com>
2462 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Add has_addr16_ha
2463 and has_addr16_lo. Make has_sda_refs a bitfield.
2464 (ppc_elf_check_relocs): Set new flags.
2465 (ppc_elf_link_hash_table_create): Update default_params.
2466 (ppc_elf_adjust_dynamic_symbol): Clear protected_def in cases
2467 where we won't be making .dynbss entries or editing code. Set
2468 params->pic_fixup when we'll edit code for protected var access.
2469 (allocate_dynrelocs): Allocate got entry for edited code and
2471 (struct ppc_elf_relax_info): Add picfixup_size.
2472 (ppc_elf_relax_section): Rename struct one_fixup to struct
2473 one_branch_fixup. Rename fixups to branch_fixups. Size space for
2475 (ppc_elf_relocate_section): Edit non-PIC accessing protected
2476 visibility variables to PIC. Don't emit dyn_relocs for code
2478 * elf32-ppc.h (struct ppc_elf_params): Add pic_fixup.
2480 2015-04-07 Nick Clifton <nickc@redhat.com>
2482 * elf.c (_bfd_elf_is_local_label_name): Treat assembler generated
2483 local labels as local.
2485 2015-04-06 H.J. Lu <hongjiu.lu@intel.com>
2487 * compress.c (get_uncompressed_size): Removed.
2488 (bfd_compress_section_contents): Use bfd_putb64 to write
2489 uncompressed section size.
2490 (bfd_init_section_decompress_status): Replace
2491 get_uncompressed_size with bfd_getb64.
2493 2015-04-04 H.J. Lu <hongjiu.lu@intel.com>
2495 * elf.c (_bfd_elf_init_private_section_data): Also preserve the
2496 SHF_COMPRESSED bit if not decompress.
2498 2015-04-04 H.J. Lu <hongjiu.lu@intel.com>
2500 * compress.c (get_uncompressed_size): New. Extracted from ...
2501 (bfd_init_section_decompress_status): This. Use it.
2503 2015-04-02 Andrew Turner <andrew@freebsd.org>
2505 * config.bfd: Add aarch64-*-freebsd* target triple.
2507 2015-04-02 H.J. Lu <hongjiu.lu@intel.com>
2509 * configure: Regenerated.
2511 2015-04-01 Tejas Belagod <tejas.belagod@arm.com>
2512 Marcus Shawcroft <marcus.shawcroft@arm.com>
2513 Jiong Wang <jiong.wang@arm.com>
2515 * bfd-in.h (bfd_elf64_aarch64_set_options)
2516 (bfd_elf32_aarch64_set_options): Add parameter.
2517 * bfd-in2.h: Regenerated.
2518 * elfnn-aarch64.c (aarch64_erratum_843419_stub)
2519 (_bfd_aarch64_adrp_p, _bfd_aarch64_erratum_843419_sequence_p)
2520 (_bfd_aarch64_erratum_843419_stub_name)
2521 (_bfd_aarch64_erratum_843419_fixup)
2522 (_bfd_aarch64_erratum_843419_scan)
2523 (_bfd_aarch64_erratum_843419_branch_to_stub)
2524 (_bfd_aarch64_erratum_843419_p): Define.
2525 (enum elf_aarch64_stub_type): Define
2526 aarch64_stub_erratum_843419_veneer.
2527 (struct elf_aarch64_stub_hash_entry): Define adrp_offset.
2528 (struct elf_aarch64_link_hash_table): Define fix_erratum_843419
2529 and fix_erratum_843419_adr.
2530 (stub_hash_newfunc): Initialize adrp_offset;
2531 (_bfd_aarch64_add_stub_entry_after): Define.
2532 (aarch64_map_one_stub, aarch64_build_one_stub)
2533 (aarch64_size_one_stub): Handle
2534 aarch64_stub_erratum_843419_veneer.
2535 (_bfd_aarch64_resize_stubs): Round stub section size.
2536 (elfNN_aarch64_size_stubs): Add scan for 843419.
2537 (bfd_elfNN_aarch64_set_options): Add parameter. Initialize
2538 fix_erratum_843419 and fix_erratum_843419_adr.
2539 (struct erratum_835769_branch_to_stub_data): Add info.
2540 (elfNN_aarch64_write_section): Initialise info. Handle 843419.
2541 (elfNN_aarch64_size_dynamic_sections): Handle 843419.
2542 * elfxx-aarch64.c (_bfd_aarch64_decode_adrp_imm)
2543 (_bfd_aarch64_sign_extend): Define.
2544 (reencode_adr_imm): Remove static. Rename to:
2545 (_bfd_aarch64_reencode_adr_imm): Define.
2546 (_bfd_aarch64_elf_put_addend): Call _bfd_aarch64_reencode_adr_imm.
2547 * elfxx-aarch64.h (AARCH64_ADR_OP, AARCH64_ADRP_OP)
2548 (AARCH64_ADRP_OP_MASK, _bfd_aarch64_sign_extend)
2549 (_bfd_aarch64_decode_adrp_imm, _bfd_aarch64_reencode_adr_imm):
2552 2015-04-01 H.J. Lu <hongjiu.lu@intel.com>
2554 * configure: Regenerated.
2556 2015-03-31 Ed Schouten <ed@nuxi.nl>
2558 * config.bfd (targ_defvec): Set to x86_64_elf64_cloudabi_vec
2559 for x86_64-*-cloudabi*.
2560 * configure.ac: Handle x86_64_elf64_cloudabi_vec.
2561 * configure: Regenerated.
2562 * elf64-x86-64.c (TARGET_LITTLE_SYM): Support x86_64-*-cloudabi*.
2563 (TARGET_LITTLE_NAME): Likewise.
2564 (ELF_OSABI): Likewise.
2565 (elf64_bed): Likewise.
2566 * targets.c (x86_64_elf64_cloudabi_vec): New.
2567 (_bfd_target_vector): Add x86_64_elf64_cloudabi_vec.
2569 2015-03-31 H.J. Lu <hongjiu.lu@intel.com>
2571 * configure.ac: Revert the AM_ZLIB change.
2572 * Makefile.in: Regenerated.
2573 * aclocal.m4: Likewise.
2574 * configure: Likewise.
2575 * doc/Makefile.in: Likewise.
2577 2015-03-30 H.J. Lu <hongjiu.lu@intel.com>
2580 * elf-bfd.h (elf_backend_data): Add get_reloc_section.
2581 (_bfd_elf_get_reloc_section): New.
2582 * elf.c (_bfd_elf_get_reloc_section): Likewise.
2583 (assign_section_numbers): Call get_reloc_section to look up the
2584 section the relocs apply.
2585 * elfxx-target.h (elf_backend_get_reloc_section): Likewise.
2586 (elfNN_bed): Initialize get_reloc_section with
2587 elf_backend_get_reloc_section.
2589 2015-03-29 H.J. Lu <hongjiu.lu@intel.com>
2591 * Makefile.am (ZLIB): New.
2592 (ZLIBINC): Likewise.
2593 (AM_CFLAGS): Add $(ZLIBINC).
2594 (libbfd_la_LIBADD): Add $(ZLIB).
2595 * compress.c: Don't check HAVE_ZLIB_H to include <zlib.h>.
2596 (decompress_contents): Don't check HAVE_ZLIB_H.
2597 (bfd_compress_section_contents): Likewise.
2598 (bfd_get_full_section_contents): Likewise.
2599 (bfd_init_section_decompress_status): Likewise.
2600 (bfd_init_section_compress_status): Likewise.
2601 * configure.ac (AM_ZLIB): Removed.
2602 (zlibdir): New. AC_SUBST.
2603 (zlibinc): Likewise.
2604 Add --with-system-zlib.
2605 * Makefile.in: Regenerated.
2606 * acinclude.m4: Likewise.
2607 * config.in: Likewise.
2608 * configure: Likewise.
2609 * doc/Makefile.in: Likewise.
2611 2015-03-27 Alan Modra <amodra@gmail.com>
2615 * elflink.c (elf_merge_st_other): Add "sec" parameter. Don't set
2616 protected_def when symbol section is read-only. Adjust all calls.
2617 * elf-bfd.h (struct elf_link_hash_entry): Update protected_def comment.
2619 2015-03-26 Tejas Belagod <tejas.belagod@arm.com>
2621 * elfnn-aarch64.c (aarch64_build_one_stub): Replace the call to generic
2622 _bfd_final_link_relocate with aarch64_relocate.
2624 2015-03-26 H.J. Lu <hongjiu.lu@intel.com>
2627 * elflink.c (elf_gc_sweep): Skip if relocation is incompatible.
2628 (bfd_elf_gc_sections): Likewise.
2630 2015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
2632 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Adjust stub section
2633 size for initial branch.
2634 (elfNN_aarch64_build_stubs): Write initial branch.
2635 _bfd_aarch64_decode_(elfNN_aarch64_output_arch_local_syms): Write
2636 mapping symbol on initial branch.
2638 2015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
2640 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_scan):
2641 Update erratum count.
2643 2015-03-25 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2645 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't break on
2646 first matching debug section.
2648 2015-03-24 H.J. Lu <hongjiu.lu@intel.com>
2651 * compress.c (bfd_compress_section_contents): Don't write the
2652 zlib header and set contents as well as compress_status if
2653 compression didn't make the section smaller.
2654 (bfd_init_section_compress_status): Don't check compression
2657 2015-03-24 Nick Clifton <nickc@redhat.com>
2660 * coffgen.c (coff_get_normalized_symtab): Fix test for out of
2661 range auxillary sections.
2663 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
2665 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor
2667 (_bfd_aarch64_get_stub_for_link_section): Define.
2669 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
2671 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Adjust
2672 update of section_group[].stub_sec.
2674 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
2676 * elfnn-aarch64.c (struct aarch64_erratum_835769_fix) Remove.
2677 (erratum_835769_scan) Drop fix_table_size_p and fixes_p arguments.
2678 Delete fixes, fix_table_size and associated code. Call
2679 _bfd_aarch64_add_stub_entry_in_group. Rename to...
2680 (bfd_aarch64_erratum_835769_scan): Define.
2681 (elfNN_aarch64_size_stubs): Delete erratum_835769_fixes,
2682 erratum_835769_fix_table_size, i and associated code. Relocate
2683 call to _bfd_aarch64_erratum_835769_scan. Delete adhoc stub size
2684 correction. Delete construction of stub entry from
2685 erratum_835769_fixes array.
2687 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
2689 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Use
2690 _bfd_aarch64_add_stub_entry_in_group.
2692 2015-03-24 Alan Modra <amodra@gmail.com>
2694 * elf64-ppc.c (ppc64_elf_relocate_section): Report overflow to
2695 stubs, even those for undefined weak symbols. Otherwise, don't
2696 report relocation overflow on branches to undefined strong
2697 symbols. Fix memory leak.
2698 * elf32-ppc.c (ppc_elf_relocate_section): Don't report relocation
2699 overflow on branches to undefined strong symbols.
2701 2015-03-23 Keith Seitz <keiths@redhat.com>
2703 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Add
2706 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2708 * elfnn-aarch64.c (erratum_835769_scan): Factor stub name
2709 construction into...
2710 (_bfd_aarch64_erratum_835769_stub_name): Define.
2712 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2714 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Factor out
2715 stub resize code into...
2716 (bfd_aarch64_resize_stubs): Define.
2718 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2720 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor stub
2721 creation code into...
2722 (bfd_aarch64_create_stub_section): Define.
2724 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2726 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Rename
2727 from elf_aarch64_create_or_find_stub_sec.
2728 (_bfd_aarch64_add_stub_entry_in_group): Rename from
2729 elfNN_aarch64_add_stub. Call
2730 _bfd_aarch64_create_or_find_stub_sec.
2731 (elfNN_aarch64_size_stubs, elfNN_aarch64_size_stubs): Call
2732 _bfd_aarch64_add_stub_entry_in_group.
2734 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2736 * elfnn-aarch64.c (erratum_835769_scan) Add comment. Reverse
2737 sense of boolean return.
2738 (elfNN_aarch64_size_stubs): Adjust for above.
2740 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2742 * elfnn-aarch64.c (elf_aarch64_create_or_find_stub_sec):
2743 Remove unused parameter.
2744 (elfNN_aarch64_size_stubs): Adjust for above.
2746 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2748 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Remove bfd_indx.
2750 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2752 * elfnn-aarch64.c (aarch64_erratum_835769_fixes)
2753 (num_aarch64_erratum_835769_fixes): Remove.
2754 (elfNN_aarch64_size_stubs): Remove assignments to above.
2756 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2758 * elfnn-aarch64.c (aarch64_mem_op_p): Update comment. Rename rtn
2760 (aarch64_erratum_seqeunce): Rename rtn to rt2.
2762 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2764 * elfnn-aarch64.c (elfNN_aarch64_write_section): Adjust layout.
2766 2015-03-19 Nick Clifton <nickc@redhat.com>
2768 * elf32-rl78.c (rl78_cpu_name): New function. Prints the name of
2769 the RL78 core based upon the flags.
2770 (rl78_elf_merge_private_bfd_data): Handle merging of G13 and G14
2772 (rl78_elf_print_private_bfd_data): Use rl78_cpu_name.
2773 (elf32_rl78_machine): Always return bfd_mach_rl78.
2775 2015-03-19 Nick Clifton <nickc@redhat.com>
2778 * compress.c (bfd_compress_section_contents): Do not define this
2779 function if it is not used.
2781 2015-03-18 H.J. Lu <hongjiu.lu@intel.com>
2783 * compress.c (bfd_compress_section_contents): Make it static.
2784 * bfd/bfd-in2.h: Regenerated.
2786 2015-03-18 Eric Youngdale <eyoungdale@ptc.com>
2789 * peicode.h (pe_ILF_build_a_bfd): Add support for creating relocs
2790 suitable for the AMD64.
2792 2015-03-18 Jon Turney <jon.turney@dronecode.org.uk>
2793 Nick Clifton <nickc@redhat.com>
2796 * coffgen.c (make_a_section_from_file): Only prepend a z to a
2797 debug section's name if the section was actually compressed.
2798 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
2799 * compress.c (bfd_init_section_compress_status): Do not compress
2800 the section if doing so would make it bigger. In such cases leave
2801 the section alone and return COMPRESS_SECTION_NONE.
2803 2015-03-17 Alan Modra <amodra@gmail.com>
2805 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return count of 0
2806 on nothing to do, before malloc of returned symbol array.
2808 2015-03-16 Nick Clifton <nickc@redhat.com>
2810 * elf32-rx.c (elf32_rx_relax_delete_bytes): If the relocs are not
2811 stored in the elf_section_data structure then load them as
2814 2015-03-14 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2816 * elf-s390-common.c (elf_s390_elf_sort_relocs_p): Don't sort
2817 relocs against code sections.
2818 * elf32-s390.c: Define elf_backend_sort_relocs_p.
2819 * elf64-s390.c: Likewise.
2821 2015-03-11 Alan Modra <amodra@gmail.com>
2823 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Examine stubs in
2824 reverse order. Account for larger size of __tls_get_addr_opt stub.
2826 2015-03-10 Yuri Gribov <y.gribov@samsung.arm>
2829 * elf32-arm.c (elf32_arm_final_link_relocate): Remove support for
2831 (elf32_arm_print_private_bfd_data): Likewise.
2833 2015-03-06 Nick Clifton <nickc@redhat.com>
2836 * elflink.c (put_value): Like previous delta, but for the 32-bit
2839 2015-03-05 Nick Clifton <nickc@redhat.com>
2842 * elflink.c (put_value): Avoid using an undefined shift
2845 2015-03-05 H.J. Lu <hongjiu.lu@intel.com>
2849 * elf-bfd.h (elf_backend_data): Add extern_protected_data.
2850 * elf32-i386.c (elf_backend_extern_protected_data): New.
2852 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
2853 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
2854 copy relocs against protected symbols if extern_protected_data
2856 (_bfd_elf_symbol_refs_local_p): Don't return true on protected
2857 non-function symbols if extern_protected_data is true.
2858 * elfxx-target.h (elf_backend_extern_protected_data): New.
2860 (elfNN_bed): Initialize extern_protected_data with
2861 elf_backend_extern_protected_data.
2863 2015-03-05 Nick Clifton <nickc@redhat.com>
2866 * coffgen.c (coff_find_nearest_line_with_names): If the dwarf2
2867 lookup fails, check for an address bias in the dwarf info, and if
2868 one exists, retry the lookup with the biased value.
2869 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): New function.
2870 Determines if a bias exists bewteen the addresses of functions
2871 based on DWARF information vs symbol table information.
2872 * libbfd-in.h (_bfd_dwarf2_find_symbol_bias): Prototype.
2873 * libbfd.h: Regenerate.
2875 2015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
2877 * elfxx-aarch64.c (decode_add_imm, decode_movw_imm)
2878 (decode_tst_branch_ofs_14, decode_ld_lit_ofs_19)
2879 (decode_cond_branch_ofs_19, decode_branch_ofs_26): Remove.
2881 2015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
2883 * elfnn-aarch64.c (aarch64_build_one_stub): Call abort.
2884 (aarch64_size_one_stub): Likewise.
2885 (aarch64_map_one_stub): Likewise.
2887 2015-03-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
2889 * cpu-s390.c (N): New macro.
2890 (bfd_s390_31_arch): New. Define only if default target word size
2891 is 64 bits. Otherwise define...
2892 (bfd_390_64_arch): ...this. Make static.
2893 (bfd_s390_arch): Define according to the default target word size.
2894 Let the 'next' field point to the alternate arch.
2896 2015-03-04 Richard Sandiford <richard.sandiford@arm.com>
2899 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Expect
2900 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC and R_AARCH64_TLSLE_MOVW_TPREL_G1_NC
2901 to be used with MOVK rather than MOVZ.
2903 2015-03-03 DJ Delorie <dj@redhat.com>
2905 * elf32-rl78.c (rl78_elf_relax_section): Only relax ADDR16's if
2908 2015-02-28 Alan Modra <amodra@gmail.com>
2910 * elf32-ppc.c (ppc_elf_tls_setup): Set no_tls_get_addr_opt if
2913 2015-02-27 H.J. Lu <hongjiu.lu@intel.com>
2915 * elf32-i386.c (need_convert_mov_to_lea): New.
2916 (elf_i386_check_relocs): Set need_convert_mov_to_lea if needed.
2917 (elf_i386_convert_mov_to_lea): Return TRUE if
2918 need_convert_mov_to_lea is unset.
2919 * elf64-x86-64.c (need_convert_mov_to_lea): New.
2920 (elf_x86_64_check_relocs): Set need_convert_mov_to_lea if needed.
2921 (elf_x86_64_convert_mov_to_lea): Return TRUE if
2922 need_convert_mov_to_lea is unset.
2924 2015-02-27 Nick Clifton <nickc@redhat.com>
2927 * coffgen.c (_bfd_coff_internal_syment_name): Only check for
2928 string length overflow when the string table length is actually
2931 2015-02-27 Marcus Shawcroft <marcus.shawcroft@arm.com>
2933 * bfd/bfd-in2.h: Regenerate.
2934 * bfd/libbfd.h: Regenerate.
2936 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2938 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix
2939 TLSDESC_LD_PREL19 field width and masks.
2940 (aarch64_tls_transition_without_check)
2941 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
2942 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
2943 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
2944 BFD_RELOC_AARCH64_TLSDESC_LD_PREL19.
2945 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
2946 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2948 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2950 * elfnn-aarch64.c (IS_AARCH64_TLSDESC_RELOC): Reorder R_TYPE
2952 (aarch64_tls_transition_without_check)
2953 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
2954 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
2955 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
2956 BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21.
2957 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
2958 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2959 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
2961 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2963 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC)
2964 (elfNN_aarch64_howto_table, aarch64_tls_transition_without_check)
2965 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
2966 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
2967 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
2968 BFD_RELOC_AARCH64_TLSGD_ADR_PREL21.
2969 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
2970 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2971 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
2973 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2975 * elfnn-aarch64.c: (TLSIE_LD_GOTTREL_PREL19): Fix HOWTO bit field width.
2976 (aarch64_tls_transition_without_check, aarch64_reloc_got_type)
2977 (elfNN_aarch64_final_link_relocate, elfNN_aarch64_tls_relax)
2978 (elfNN_aarch64_relocate_section, elfNN_aarch64_gc_sweep_hook)
2979 (elfNN_aarch64_check_relocs): Handle
2980 BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19.
2982 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
2983 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2985 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2987 * elfnn-aarch64.c: (TLSDESC_CALL): Fix HOWTO bit field width.
2989 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2991 * elfnn-aarch64.c (TLSLE_MOVW_TPREL_G2)
2992 (TLSLE_MOVW_TPREL_G1, TLSLE_MOVW_TPREL_G1_NC)
2993 (TLSLE_MOVW_TPREL_G0, TLSLE_MOVW_TPREL_G0_NC): Fix bit field
2996 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2998 * elfnn-aarch64.c: (TLSIE_MOVW_GOTTPREL_G0_NC): Fix HOWTO bit
3001 2015-02-26 Nick Clifton <nickc@redhat.com>
3004 * coffcode.h (coff_compute_section_file_positions): Report
3005 negative page sizes.
3006 * elf.c (elf_fake_sections): Handle excessive alignmment powers.
3007 (assign_file_positions_for_non_load_sections): Replace assertion
3008 with an error message.
3009 (rewrite_elf_program_header): Handle excessive segment
3011 * mach-o.c (bfd_mach_o_read_section_32): Likewise.
3012 (bfd_mach_o_read_section_64): Likewise.
3013 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Use %B to
3014 print a bfd name, not %A.
3016 2015-02-26 Alan Modra <amodra@gmail.com>
3018 * elf64-ppc.c (plt_stub_size, build_plt_stub): Don't build
3019 thread-safe stubs for iplt.
3020 (build_tls_get_addr_stub): Restore r2 immediately after call.
3022 2015-02-26 Terry Guo <terry.guo@arm.com>
3024 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Update how we
3025 merge Tag_ABI_HardFP_use.
3027 2015-02-26 Alan Modra <amodra@gmail.com>
3029 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Heed -z nocopyreloc.
3030 Use text relocs rather than giving an error on trying to use
3031 .dynbss for protected shared lib vars.
3032 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
3034 2015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
3036 * elf32-avr.c (struct elf_avr_section_data): New structure.
3037 (struct avr_relax_info): New structure.
3038 (elf_avr_new_section_hook): New function.
3039 (struct elf_avr_section_data): Add relax_info.
3040 (get_avr_relax_info): New function.
3041 (init_avr_relax_info): New function.
3042 (elf32_avr_relax_delete_bytes): Find next property record before
3043 deleting bytes. When deleting don't move bytes beyond the next
3045 (avr_elf32_assign_records_to_section): New function.
3046 (avr_property_record_compare): New function.
3047 (avr_load_all_property_sections): New function.
3048 (elf32_avr_relax_section): Load property data. After relaxing the
3049 section, move any .align directives that have enough deleted bytes
3051 (bfd_elf32_new_section_hook): Define.
3053 2015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
3055 * elf32-avr.h (struct avr_property_header): New strucure.
3056 (avr_elf32_load_property_records): Declare.
3057 (avr_elf32_property_record_name): Declare.
3058 * elf32-avr.c: Add bfd_stdint.h include.
3059 (retrieve_local_syms): New function.
3060 (get_elf_r_symndx_section): New function.
3061 (get_elf_r_symndx_offset): New function.
3062 (internal_reloc_compare): New function.
3063 (struct avr_find_section_data): New structure.
3064 (avr_is_section_for_address): New function.
3065 (avr_find_section_for_address): New function.
3066 (avr_elf32_load_records_from_section): New function.
3067 (avr_elf32_load_property_records): New function.
3068 (avr_elf32_property_record_name): New function.
3070 2015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
3072 * elf32-avr.h (AVR_PROPERTY_RECORD_SECTION_NAME): Define.
3073 (AVR_PROPERTY_RECORDS_VERSION): Define.
3074 (AVR_PROPERTY_SECTION_HEADER_SIZE): Define.
3075 (struct avr_property_record): New structure.
3077 2015-02-24 Nick Clifton <nickc@redhat.com>
3079 * elf32-v850.c (v850_set_note): New function. Creates a Renesas
3081 (v850_elf_make_note_section): New function. Creates a note
3083 (v850_elf_create_sections): New function. Create a note section
3084 if one is not already present.
3085 (v850_elf_set_note): New function. Adds a note to a bfd.
3086 (v850_elf_copy_private_bfd_data): New function. Copies V850
3088 (v850_elf_merge_notes): New function. Merges V850 notes.
3089 (print_v850_note): New function. Displays a V850 note.
3090 (v850_elf_print_notes): New function. Displays all notes attached
3092 (v850_elf_merge_private_bfd_data): Call v850_elf_merge_notes.
3093 (v850_elf_print_private_bfd_data): Call v850_elf_print_notes.
3094 (v850_elf_fake_sections): Set the type of the V850 note section.
3095 * bfd-in.h (v850_elf_create_sections): Add prototype.
3096 (v850_elf_set_note): Add prototype.
3097 * bfd-in2.h: Regenerate.
3099 2015-02-24 Nick Clifton <nickc@redhat.com>
3101 * configure.ac (AC_CHECK_HEADERS): Add wctype.h.
3102 * configure: Regenerate.
3103 * config.in: Regenerate.
3104 * peXXigen.c: Include wctype.h if HAVE_WCTYPE_H is defined.
3105 (u16_mbtowc): Use wint_t types if HAVE_WCTYPE_H is defined.
3106 (rsrc_cmp): Use towlower instead of wcsncasecmp if HAVE_WCTYPE_H
3109 2015-02-24 Nick Clifton <nickc@redhat.com>
3111 * pdp11.c (set_section_contents): Pad the .text and .data sections
3112 to their aligned sizes.
3114 2015-02-23 Yoshinori Sato <ysato@users.sourceforge.jp>
3116 * config.bfd: Add h8300-*-linux.
3117 * configure.ac: Add h8300_elf32_linux_vec.
3118 * configure: Regenerate.
3119 * elf32-h8300.c: Likewise.
3120 * targets.c(_bfd_target_vector): Likewise.
3122 2015-02-23 Nick Clifton <nickc@redhat.com>
3125 * cpu-w65.c: Correct typos in license notice.
3128 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Adjust debug
3129 symbols at end of sections. Adjust function sizes.
3131 2015-02-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
3133 * elf-bfd.h (elfcore_write_s390_vxrs_low): Add prototype.
3134 (elfcore_write_s390_vxrs_high): Likewise.
3135 * elf.c (elfcore_grok_s390_vxrs_low): New function.
3136 (elfcore_grok_s390_vxrs_high): New function.
3137 (elfcore_grok_note): Call them.
3138 (elfcore_write_s390_vxrs_low): New function.
3139 (elfcore_write_s390_vxrs_high): New function.
3140 (elfcore_write_register_note): Call them.
3142 2015-02-19 Branko Drevensek <branko.drevensek@gmail.com>
3145 * verilog.c (verilog_write_record): Correct buffer size.
3147 2015-02-19 Alan Modra <amodra@gmail.com>
3149 * elflink.c (_bfd_elf_define_linkage_sym): Set 'bed' earlier.
3151 2015-02-19 Alan Modra <amodra@gmail.com>
3154 * elflink.c (elf_link_input_bfd): Drop undefined local syms.
3155 (elf_link_output_extsym): Drop local and global undefined syms.
3156 Tidy. Expand comment.
3158 2015-02-17 Alan Modra <amodra@gmail.com>
3161 * elflink.c (struct elf_outext_info): Remove need_second_pass
3163 (elf_link_output_extsym): Delete code handling second forced
3164 local pass. Move code emitting NULL STT_FILE symbol later, so
3165 that it can be omitted if forced local is stripped. Don't
3166 emit the NULL STT_FILE if no file symbols have been output.
3167 (bfd_elf_final_link): Remove second forced local pass.
3168 * elf32-ppc.c (add_stub_sym): Set linker_def on linker syms.
3169 (ppc_elf_size_dynamic_sections): Likewise.
3170 * elf64-ppc.c (ppc_build_one_stub): Likewise.
3171 (build_global_entry_stubs): Likewise.
3172 (ppc64_elf_build_stubs): Likewise.
3174 2015-02-16 H.J. Lu <hongjiu.lu@intel.com>
3177 * elflink.c (elf_link_output_extsym): Only check filesym_count
3178 when outputting a NULL FILE symbol. Set second_pass_sym to
3179 h->forced_local && !h->root.linker_def.
3181 2015-02-15 H.J. Lu <hongjiu.lu@intel.com>
3183 * elf32-i386.c (elf_i386_always_size_sections): Set root.linker_def
3184 on _TLS_MODULE_BASE_.
3185 * elf64-x86-64.c (elf_x86_64_always_size_sections): Likewise.
3187 2015-02-15 Alan Modra <amodra@gmail.com>
3189 * dwarf2.c (read_rangelist): Correct buffer overflow check
3190 Whitespace throughout file.
3192 2015-02-14 Alan Modra <amodra@gmail.com>
3195 * bfd.c (struct bfd): Add lto_output.
3196 * linker.c (_bfd_handle_already_linked): Explicitly test for
3197 objects added by the lto plugin.
3198 * opncls.c (_bfd_new_bfd_contained_in): Copy lto_output and
3199 no_export flags from archive.
3200 * archive.c (open_nested_file): New function, setting lto_output
3201 and no_export, extracted from..
3202 (find_nested_archive): ..here. Flip params. Rename from
3203 _bfd_find_nested_archive.
3204 (_bfd_get_elt_at_filepos): Correct var typo. Use open_nested_file.
3205 (_bfd_look_for_bfd_in_cache): Copy no_export.
3206 * elflink.c (elf_link_add_object_symbols): Remove now unnecessary
3207 my_archive->no_export test.
3208 (elf_link_input_bfd): Drop existing lto_output STT_FILE syms.
3209 Don't use the file name when adding lto_output STT_FILE sym.
3210 * bfd-in2.h: Regenerate.
3212 2015-02-13 Alan Modra <amodra@gmail.com>
3215 * elf64-ppc.c (opd_entry_value): Tighten offset check. Remove
3216 now redundant assert.
3218 2015-02-12 Nick Clifton <nickc@redhat.com>
3221 * dwarf.c (read_1_byte, read_1_signed_byte, read_2_bytes)
3222 (read_4_bytes, read_8_bytes, read_n_bytes, read_string)
3223 (read_indirect_string, read_alt_indirect_string)
3224 (read_alt_indirect_ref, read_address, read_abbrevs)
3225 (read_attribute_value, read_attribute, decode_line_info)
3226 (find_abstract_instance_name, read_rangelist)
3227 (scan_unit_for_symbols, parse_comp_unit)
3228 (_bfd_dwarf2_find_nearest_line): Harden DWARF reading code. Pass
3229 end pointers to reading functions and check for offsets taking
3230 pointers out of range. Replace calls to read_*_leb128 with calls
3231 to safe_read_leb128.
3233 (* elf64-ppc.c (opd_entry_value): Add a check for an overlarge
3235 * syms.c (_bfd_stab_section_find_nearest_line): Add checks for
3236 computed file_name address being before the start of the string
3239 2015-02-11 H.J. Lu <hongjiu.lu@intel.com>
3242 * bfd.c (bfd_plugin_format): New.
3243 (bfd): Add plugin_format and plugin_dummy_bfd.
3244 * plugin.c (try_load_plugin): Take a pointer to bfd_boolean
3245 argument to return TRUE if any plugin is found. Set plugin_format.
3247 (bfd_plugin_target_p): New.
3248 (bfd_plugin_specified_p): Likewise.
3249 (bfd_plugin_target_p): Likewise.
3250 (register_ld_plugin_object_p): Likewise.
3251 (bfd_plugin_set_plugin): Set has_plugin.
3252 (load_plugin): Cache try_load_plugin result.
3253 (bfd_plugin_object_p): Try ld_plugin_object_p first. Check
3255 * plugin.h (bfd_plugin_target_p): New.
3256 (bfd_plugin_specified_p): Likewise.
3257 (register_ld_plugin_object_p): Likewise.
3258 * bfd-in2.h: Regenerated.
3260 2015-02-11 Pedro Alves <palves@redhat.com>
3262 * libbfd-in.h [__cplusplus]: Open extern "C" scope.
3263 * libcoff-in.h [__cplusplus]: Open extern "C" scope.
3264 * libbfd.h: Regenerate.
3265 * libcoff.h: Regenerate.
3267 * elf-bfd.h [__cplusplus]: Wrap in extern "C".
3268 * mach-o.h [__cplusplus]: Wrap in extern "C".
3269 * som.h [__cplusplus]: Wrap in extern "C".
3271 2015-02-10 Nick Clifton <nickc@redhat.com>
3274 * coffcode.h (styp_to_sec_flags): Use an unsigned long type to
3276 * peXXigen.c (pe_print_reloc): Use unsigned types to hold the
3277 size and number of relocs.
3278 (pe_print_debugdata): Use a 32-bit aligned buffer to store the
3280 * versados.c (process_otr): Check the esdid value before using it
3281 to access the EDATA.
3283 2015-02-09 Ed Maste <emaste@freebsd.org>
3285 * elf32-i386.c (elf_i386_get_plt_sym_val): Avoid incrementing
3286 uninitialized and unused variable.
3287 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
3289 2015-02-09 Alan Modra <amodra@gmail.com>
3291 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault on NULL
3293 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3294 * elflink.c (elf_link_output_extsym): Don't assert on NULL tls_sec.
3296 2015-02-09 Alan Modra <amodra@gmail.com>
3298 * elflink.c: Whitespace, formatting fixes.
3299 (elf_link_input_bfd): Clarify comment.
3300 (elf_link_output_extsym): Exclude symbols in linker created
3301 sections when testing for plugin symbols.
3303 2015-02-07 H.J. Lu <hongjiu.lu@intel.com>
3306 * elf32-i386.c (elf_i386_readonly_dynrelocs): Also issue a
3307 warning for relocation in readonly section for -z text.
3308 (elf_i386_size_dynamic_sections): Likewise.
3309 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
3310 (elf_x86_64_size_dynamic_sections): Likewise.
3312 2015-02-06 H.J. Lu <hongjiu.lu@intel.com>
3316 * elflink.c (_bfd_elf_fix_symbol_flags): Revert the last change.
3317 (elf_link_input_bfd): Mark the plugin symbol undefined if it is
3318 referenced from a non-IR file.
3320 2015-02-06 Nick Clifton <nickc@redhat.com>
3323 * peXXigen.c (rsrc_print_resource_entries): Add range check for
3324 addresses that wrap around the address space.
3325 (rsrc_parse_entry): Likewise.
3327 2015-02-03 H.J. Lu <hongjiu.lu@intel.com>
3331 * elflink.c (_bfd_elf_fix_symbol_flags): Mark the plugin symbol
3332 undefined if it is referenced from a non-IR file.
3334 2015-02-03 Nick Clifton <nickc@redhat.com>
3337 * ecoff.c: Use bfd_alloc2 to allocate space for structure arrays.
3338 (_bfd_ecoff_slurp_symbol_table): Check for a negative symbol
3339 index or an out of range fdr index.
3340 * elf-m10300.c (mn10300_info_to_howto): Fix typo in error message.
3341 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
3342 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
3343 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
3344 * elf32-cr16c.c (elf_cr16c_info_to_howto_rel): Likewise.
3345 * elf32-cris.c (cris_info_to_howto_rela): Likewise.
3346 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
3347 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
3348 * elf32-d30v.c (d30v_info_to_howto_rel): Likewise.
3349 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
3350 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
3351 * elf32-frv.c (frv_info_to_howto_rela): Likewise.
3352 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
3353 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
3354 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
3355 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
3356 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
3357 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
3358 * elf32-m32r.c (m32r_info_to_howto_rel): Likewise.
3359 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
3360 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
3361 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
3362 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
3363 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
3364 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
3365 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
3366 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
3367 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
3368 * elf32-nds32.c (nds32_info_to_howto_rel): Likewise.
3369 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
3370 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
3371 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
3372 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
3373 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
3374 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
3375 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
3376 * elf32-v850.c (v850_elf_perform_relocation): Likewise.
3377 * elf32-vax.c (rtype_to_howto): Likewise.
3378 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
3379 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
3380 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
3381 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
3382 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
3383 * mach-o.c: Use bfd_alloc2 to allocate space for structure arrays.
3384 (bfd_mach_o_canonicalize_one_reloc): Fix check on out
3385 of range symbol indicies.
3386 (bfd_mach_o_canonicalize_relocs): Check for out of range alloc.
3387 (bfd_mach_o_canonicalize_dynamic_reloc): Likewise.
3388 (bfd_mach_o_build_dysymtab): Likewise.
3389 (bfd_mach_o_write_symtab_content): Set the string table size to
3391 (bfd_mach_o_read_symtab_symbols): Reset the nsyms value if the
3393 * peXXigen.c (pe_print_edata): Check for numeric overflow in edt
3395 * tekhex.c (first_phase): Check for src pointer reaching end of
3398 2015-02-03 Will Newton <will.newton@linaro.org>
3400 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol):
3401 Set st_value to zero for undefined symbols if the reference
3402 is weak or pointer_equality_needed is FALSE.
3404 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Improve
3405 comment discussing why we clear st_value for some symbols.
3407 2015-02-02 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3409 * elf32-nds32.c (nds32_get_section_contents): Add one more argument.
3410 (nds32_elf_relocate_section): Do not relocate R_NDS32_LONGJUMP7.
3412 2015-01-29 Alan Modra <amodra@gmail.com>
3414 * elf64-ppc.c (ppc64_elf_relocate_section): Correct GOT_TLSLD
3415 optimization. Tidy mask for GOT_TLSGD optimization.
3416 * elf32-ppc.c (ppc_elf_relocate_section): Likewise. Correct
3417 location of nop zapping high insn too.
3419 2015-01-28 Alan Modra <amodra@gmail.com>
3421 * elf64-ppc.h (struct ppc64_elf_params): Add "object_in_toc".
3422 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Assume that global symbols
3423 in .toc indicate xlc compiled code that might require a rw .toc.
3425 2015-01-28 James Bowman <james.bowman@ftdichip.com>
3427 * Makefile.am: Add FT32 files.
3428 * archures.c (enum bfd_architecture): Add bfd_arch_ft32.
3429 (bfd_mach_ft32): Define.
3430 (bfd_ft32_arch): Declare.
3431 (bfd_archures_list): Add bfd_ft32_arch.
3432 * config.bfd: Handle FT32.
3433 * configure.ac: Likewise.
3434 * cpu-ft32.c: New file.
3435 * elf32-ft32.c: New file.
3436 * reloc.c (BFD_RELOC_FT32_10, BFD_RELOC_FT32_20, BFD_RELOC_FT32_17,
3437 BFD_RELOC_FT32_18): Define.
3438 * targets.c (_bfd_target_vector): Add ft32_elf32_vec.
3439 * bfd-in2.h: Regenerate.
3440 * libbfd.h: Regenerate.
3441 * Makefile.in: Regenerate.
3442 * configure: Regenerate.
3443 * po/SRC-POTFILES.in: Regenerate.
3445 2015-01-27 Nick Clifton <nickc@redhat.com>
3448 * pdp11.c (aout_get_external_symbols): Return false if there are
3451 * dwarf2.c (concat_filename): Check for an empty directory table.
3452 (scan_unit_for_symbols): Check for reading off the end of the
3454 (parse_comp_unit): Check for a DW_AT_comp_dir attribute with a
3456 * elf64-ppc.c (opd_entry_value): Fail if there are no relocs
3459 2015-01-26 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3461 * elf32-nds32.c (nds32_elf_pick_relax): Fix again setting.
3463 2015-01-22 DJ Delorie <dj@redhat.com>
3465 * elf32-m32c.c (m32c_apply_reloc_24): New.
3466 (m32c_elf_howto_table): Use it for R_M32C_24.
3467 (m32c_elf_relocate_section): Handle R_M32C_24 specially.
3469 2015-01-22 Nick Clifton <nickc@redhat.com>
3472 * coffcode.h (handle_COMDAT): When searching for the section
3473 symbol, make sure that there is space left in the symbol table.
3474 * vms-alpha.c (_bfd_vms_slurp_ehdr): Add range checks.
3476 2015-01-21 Nick Clifton <nickc@redhat.com>
3479 * coffcode.h (coff_set_arch_mach_hook): Check return value from
3481 (coff_slurp_line_table): Return FALSE if the line number
3482 information was corrupt.
3483 (coff_slurp_symbol_table): Return FALSE if the symbol information
3485 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Always
3486 initialise the fields of the dyld_info structure.
3487 (bfd_mach_o_build_exec_seg_command): Replace assertion with an
3488 error message and a return value.
3489 (bfd_mach_o_layout_commands): Change the function to boolean.
3490 Return FALSE if the function fails.
3491 (bfd_mach_o_build_commands): Fail if bfd_mach_o_layout_commands
3493 (bfd_mach_o_read_command): Fail if an unrecognised command is
3495 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Set bfd_error if the
3497 (slurp_symtab): Check the return from bfd_malloc.
3498 (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if the copy
3499 encountered an error.
3500 (_bfd_XXi_final_link_postscript): Fail if a section could not be
3502 * peicode.h (pe_bfd_object_p): Fail if the header could not be
3504 * tekhex.c (first_phase): Fail if the section is too big.
3505 * versados.c (struct esdid): Add content_size field.
3506 (process_otr): Use and check the new field.
3507 (versados_get_section_contents): Check that the section exists and
3508 that the requested data is available.
3510 2015-01-20 Chung-Lin Tang <cltang@codesourcery.com>
3512 * elf32-nios2.c (elf_backend_default_execstack): Define as 0.
3514 2015-01-20 Alan Modra <amodra@gmail.com>
3517 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Don't drop
3518 ELF_COMMON_DEF syms.
3520 2015-01-19 Alan Modra <amodra@gmail.com>
3523 * elf-bfd.h (ELF_COMMON_DEF_P): Note that this might be true for
3524 linker script assignments too.
3525 * elflink.c (elf_gc_sweep_symbol): Don't drop ELF_COMMON_DEF syms.
3526 (bfd_elf_gc_mark_dynamic_ref_symbol): Similarly.
3528 2015-01-19 Alan Modra <amodra@gmail.com>
3530 * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Correct loop iteration
3531 to allow return of first howto.
3532 * elf32-fr30.c (fr30_reloc_type_lookup): Likewise.
3533 * elf32-m32c.c (m32c_reloc_type_lookup): Likewise.
3534 * elf32-moxie.c (moxie_reloc_type_lookup): Likewise.
3535 * elf32-or1k.c (or1k_reloc_type_lookup): Likewise.
3536 * elf32-rl78.c (rl78_reloc_type_lookup): Likewise.
3537 * elf32-rx.c (rx_reloc_type_lookup): Likewise.
3538 * elf32-tilepro.c (tilepro_reloc_type_lookup): Likewise.
3539 * elf32-xstormy16.c (xstormy16_reloc_type_lookup): Likewise.
3540 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
3541 * elf32-nios2.c (nios2_reloc_map): Add mapping for R_NIOS2_NONE.
3542 * elf32-spu.c (spu_elf_bfd_to_reloc_type): Allow return of R_SPU_NONE.
3543 (spu_elf_reloc_type_lookup): Adjust to suit.
3545 2015-01-19 Alan Modra <amodra@gmail.com>
3547 * bfd-in.h (bfd_get_section_limit_octets): New define, extracted from..
3548 (bfd_get_section_limit): ..here.
3549 * reloc.c (bfd_perform_relocation): Correct bfd_reloc_outofrange check.
3550 (bfd_install_relocation, _bfd_final_link_relocate): Add same check here.
3551 * elf32-sh.c (sh_elf_reloc): Correct bfd_reloc_outofrange check.
3552 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Remove duplicated
3553 bfd_reloc_outofrange check.
3554 * bfd-in2.h: Regenerate.
3556 * cpu-ns32k.c (_bfd_do_ns32k_reloc_contents): Return bfd_reloc_ok
3557 on zero size relocs.
3558 * ecoff.c (ecoff_reloc_link_order): Likewise.
3559 * elf32-nds32.c (nds32_relocate_contents): Likewise.
3560 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3562 * reloc.c (_bfd_relocate_contents): Don't bomb on zero size relocs.
3563 (_bfd_clear_contents): Likewise.
3564 * elfxx-mips.c (mips_elf_obtain_contents): Likewise.
3565 (mips_elf_perform_relocation): Likewise.
3567 * aoutx.h (aout_link_reloc_link_order): Allow for NULL return
3568 from malloc on zero size alloc.
3569 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
3570 * elflink.c (elf_reloc_link_order): Likewise.
3571 * linker.c (_bfd_generic_reloc_link_order): Likewise.
3572 * pdp11.c (aout_link_reloc_link_order): Likewise.
3573 * xcofflink.c (xcoff_reloc_link_order): Likewise.
3575 * aoutx.h (howto_table_ext): Ensure NONE relocs have size 3,
3576 bitsize 0, and complain_overflow_dont.
3577 * coff-sparc.c (coff_sparc_howto_table): Likewise.
3578 * elf-hppa.h (elf_hppa_howto_table): Likewise.
3579 * elf-m10200.c (elf_mn10200_howto_table): Likewise.
3580 * elf-m10300.c (elf_mn10300_howto_table): Likewise.
3581 * elf32-arc.c (elf_arc_howto_table): Likewise.
3582 * elf32-arm.c (elf32_arm_howto_table_1): Likewise.
3583 * elf32-avr.c (elf_avr_howto_table): Likewise.
3584 * elf32-bfin.c (bfin_howto_table): Likewise.
3585 * elf32-cr16.c (cr16_elf_howto_table): Likewise.
3586 * elf32-cris.c (cris_elf_howto_table): Likewise.
3587 * elf32-crx.c (crx_elf_howto_table): Likewise.
3588 * elf32-d10v.c (elf_d10v_howto_table): Likewise.
3589 * elf32-d30v.c (elf_d30v_howto_table): Likewise.
3590 * elf32-dlx.c (dlx_elf_howto_table): Likewise.
3591 * elf32-epiphany.c (epiphany_elf_howto_table): Likewise.
3592 * elf32-fr30.c (fr30_elf_howto_table): Likewise.
3593 * elf32-frv.c (elf32_frv_howto_table): Likewise.
3594 * elf32-h8300.c (h8_elf_howto_table): Likewise.
3595 * elf32-i370.c (i370_elf_howto_raw): Likewise.
3596 * elf32-i386.c (elf_howto_table): Likewise.
3597 * elf32-i860.c (elf32_i860_howto_table): Likewise.
3598 * elf32-i960.c (elf32_i960_relocate): Likewise.
3599 * elf32-ip2k.c (ip2k_elf_howto_table): Likewise.
3600 * elf32-iq2000.c (iq2000_elf_howto_table): Likewise.
3601 * elf32-lm32.c (lm32_elf_howto_table): Likewise.
3602 * elf32-m32c.c (m32c_elf_howto_table): Likewise.
3603 * elf32-m32r.c (m32r_elf_howto_table): Likewise.
3604 * elf32-m68hc11.c (elf_m68hc11_howto_table): Likewise.
3605 * elf32-m68hc12.c (elf_m68hc11_howto_table): Likewise.
3606 * elf32-m68k.c (howto_table): Likewise.
3607 * elf32-mcore.c (mcore_elf_howto_raw): Likewise.
3608 * elf32-mep.c (mep_elf_howto_table): Likewise.
3609 * elf32-metag.c (elf_metag_howto_table): Likewise.
3610 * elf32-microblaze.c (microblaze_elf_howto_raw): Likewise.
3611 * elf32-mips.c (elf_mips_howto_table_rel): Likewise.
3612 * elf32-moxie.c (moxie_elf_howto_table): Likewise.
3613 * elf32-msp430.c (elf_msp430_howto_table): Likewise.
3614 * elf32-mt.c (mt_elf_howto_table): Likewise.
3615 * elf32-nds32.c (nds32_elf_howto_table): Likewise.
3616 * elf32-nios2.c (elf_nios2_howto_table_rel): Likewise.
3617 * elf32-or1k.c (or1k_elf_howto_table): Likewise.
3618 * elf32-pj.c (pj_elf_howto_table): Likewise.
3619 * elf32-ppc.c (ppc_elf_howto_raw): Likewise.
3620 * elf32-rl78.c (rl78_elf_howto_table): Likewise.
3621 * elf32-rx.c (rx_elf_howto_table): Likewise.
3622 * elf32-s390.c (elf_howto_table): Likewise.
3623 * elf32-score.c (elf32_score_howto_table): Likewise.
3624 * elf32-score7.c (elf32_score_howto_table): Likewise.
3625 * elf32-sh-relocs.h (R_SH_NONE): Likewise.
3626 * elf32-spu.c (elf_howto_table): Likewise.
3627 * elf32-tic6x.c (elf32_tic6x_howto_table): Likewise.
3628 * elf32-tilepro.c (tilepro_elf_howto_table): Likewise.
3629 * elf32-v850.c (v850_elf_howto_table): Likewise.
3630 * elf32-vax.c (howto_table): Likewise.
3631 * elf32-visium.c (visium_elf_howto_table): Likewise.
3632 * elf32-xc16x.c (xc16x_elf_howto_table): Likewise.
3633 * elf32-xgate.c (elf_xgate_howto_table): Likewise.
3634 * elf32-xstormy16.c (xstormy16_elf_howto_table): Likewise.
3635 * elf32-xtensa.c (elf_howto_table): Likewise.
3636 * elf64-alpha.c (elf64_alpha_howto_table): Likewise.
3637 * elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
3638 * elf64-mmix.c (elf_mmix_howto_table): Likewise.
3639 * elf64-ppc.c (ppc64_elf_howto_raw): Likewise.
3640 * elf64-s390.c (elf_howto_table): Likewise.
3641 * elf64-sh64.c (sh_elf64_howto_table): Likewise.
3642 * elf64-x86-64.c (x86_64_elf_howto_table): Likewise.
3643 * elfn32-mips.c (elf_mips_howto_table_rel): Likewise.
3644 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
3645 (elfNN_aarch64_howto_none): Likewise.
3646 * elfxx-ia64.c (ia64_howto_table): Likewise.
3647 * elfxx-sparc.c (_bfd_sparc_elf_howto_table): Likewise.
3648 * elfxx-tilegx.c (tilegx_elf_howto_table): Likewise.
3649 * nlm32-sparc.c (nlm32_sparc_howto_table): Likewise.
3651 2015-01-15 H.J. Lu <hongjiu.lu@intel.com>
3654 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't complain
3655 about -fPIC if the symbol is undefined when building executable.
3657 2015-01-15 Nick Clifton <nickc@redhat.com>
3660 * elf-m10300.c (mn10300_info_to_howto): Replace assertion with an
3661 error message. Never return an invalid howto pointer.
3662 * elf32-cr16.c (cr16_info_to_howto): Likewise.
3663 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
3664 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
3665 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
3666 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
3667 * elf32-mips.c (mips_elf32_rtype_to_howto): Likewise.
3668 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
3669 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
3670 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
3671 * elf32-v850.c (v850_elf_info_to_howto_rela): Likewise.
3672 * elf32-vax.c (rtype_to_howto): Likewise.
3673 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
3674 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
3675 * elfn32-mips.c (sh_elf_info_to_howto): Likewise.
3676 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
3677 (sh_elf_reloc): Check that the reloc is in range.
3678 * reloc.c (bfd_perform_relocation): Check that the section is big
3679 enough for the entire reloc.
3680 (bfd_generic_get_relocated_section_contents): Report unexpected
3681 return values from perform_reloc.
3683 2015-01-15 Nick Clifton <nickc@redhat.com>
3685 * elf32-msp430.c (msp430_elf_relax_section): Skip unhandled
3686 relocs. Include PC-relative adjustment for R_MSP430X_ABS16
3689 2015-01-15 Alan Modra <amodra@gmail.com>
3691 * elflink.c (_bfd_elf_link_omit_section_dynsym): Return true for
3692 any output section matching a linker created dynobj section.
3694 2015-01-15 Alan Modra <amodra@gmail.com>
3697 * elflink.c (elf_link_output_sym): Assert elf_onesymtab set.
3698 (bfd_elf_final_link): Always create a symbol table when emit_relocs.
3699 Don't assign symtab file position unless symbols will be output.
3700 Merge blocks with condition in common. Don't call
3701 elf_backend_output_arch_local_syms or elf_backend_output_arch_syms
3702 unless other symbols are output. Move assignment of symtab_shndx
3703 file position. Localize variable.
3705 2015-01-14 Jiong Wang <jiong.wang@arm.com>
3707 * elf32-arm.c (elf32_arm_final_link_relocate): Reject R_ARM_32/_NOI when
3708 trying to defer them to runtime.
3710 2015-01-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3712 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use SYMBOLIC_BIND
3713 to check if a symbol should be bound symbolically.
3715 2015-01-13 Jiong Wang <jiong.wang@arm.com>
3717 * elfnn-aarch64.c: (elfNN_aarch64_howto_table): Enable overflow check
3718 for TLSLE_MOVW_TPREL_G2.
3720 2015-01-13 Jiong Wang <jiong.wang@arm.com>
3723 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Mark
3724 R_AARCH64_TLSLE_ADD_TPREL_HI12 as complain_overflow_unsigned.
3725 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Correct the
3728 2015-01-12 Terry Guo <terry.guo@arm.com>
3730 * elflink.c (_bfd_elf_gc_mark_debug_special_section_group): New
3732 (_bfd_elf_gc_mark_extra_sections): Use it.
3734 2015-01-11 H.J. Lu <hongjiu.lu@intel.com>
3737 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): For PIE,
3738 only discard space for pc-relative relocs symbols which turn
3739 out to need copy relocs.
3741 2015-01-09 Nick Clifton <nickc@redhat.com>
3743 * tekhex.c (getvalue): Fix thinko in test for correct extraction
3745 (getsym): Return false if there was not enough data to extract the
3748 2015-01-09 Anthony Green <green@moxielogic.com>
3750 * elf32-moxie.c (ELF_MACHINE_ALT1): Define.
3752 2015-01-08 Nick Clifton <nickc@redhat.com>
3754 * elf32-msp430.c (msp430_elf_relax_section): Add relaxation of
3755 16-bit absolute BR instructions to 10-bit pc-relative JMP
3758 2015-01-08 Nick Clifton <nickc@redhat.com>
3761 * coffcode.h (coff_slurp_symbol_table): Return false if we failed
3762 to load the line table.
3763 * elf.c (_bfd_elf_map_sections_to_segments): Enforce a minimum
3765 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if
3766 the Data Directory Size is too large.
3768 2015-01-06 H.J. Lu <hongjiu.lu@intel.com>
3771 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocation.
3772 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
3774 2015-01-06 Nick Clifton <nickc@redhat.com>
3777 * mach-o.c (bfd_mach_o_read_symtab_strtab): Zero terminate the
3780 * reloc.c (bfd_get_reloc_size): Handle a reloc size of -1.
3781 (bfd_perform_relocation): Include the size of the reloc in the
3782 test for an out of range relocation.
3783 (bfd_generic_get_relocated_section_contents): Remove reloc range
3786 * coff-i860.c (CALC_ADDEND): Always set an addend value.
3787 * tekhex.c (getvalue): Add an end pointer parameter. Use it to
3788 avoid reading off the end of the buffer.
3790 (first_phase): Likewise.
3791 (pass_over): Pass an end pointer to the invoked function.
3793 2015-01-05 H.J. Lu <hongjiu.lu@intel.com>
3796 * elf32-i386.c (elf_i386_get_plt_sym_val): Return NULL on corrupt
3798 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
3800 2015-01-05 Nick Clifton <nickc@redhat.com>
3803 * archive.c (do_slurp_bsd_armap): Make sure that the parsed sized
3804 is at least big enough for the header to be read.
3805 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocs.
3806 * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add range checks.
3807 (bfd_mach_o_read_command): Prevetn duplicate error messages about
3808 unrecognized commands.
3809 * syms.c (_bfd_stab_section_find_nearest_line): Add range checks
3810 when indexing into the string table.
3812 2015-01-01 Alan Modra <amodra@gmail.com>
3814 Update year range in copyright notice of all files.
3816 For older changes see ChangeLog-2014
3818 Copyright (C) 2015 Free Software Foundation, Inc.
3820 Copying and distribution of this file, with or without modification,
3821 are permitted in any medium without royalty provided the copyright
3822 notice and this notice are preserved.
3828 version-control: never