1 2015-11-18 Tristan Gingold <gingold@adacore.com>
3 * mach-o.h (struct mach_o_data_struct): Add hdr_offset field.
4 (bfd_mach_o_fat_archive_p): Renames prototype.
5 (bfd_mach_o_fat_openr_next_archived_file): Renames.
6 (bfd_mach_o_header_p): Add argument.
7 * mach-o.c (bfd_mach_o_read_header): Add hdr_off argument and
9 (bfd_mach_o_read_section_32, bfd_mach_o_read_section_64)
10 (bfd_mach_o_read_section): Remove offset argument.
11 (bfd_mach_o_read_dylinker): Remove bfd_seek call.
12 (bfd_mach_o_read_dylib, bfd_mach_o_read_prebound_dylib)
13 (bfd_mach_o_read_prebind_cksum, bfd_mach_o_read_twolevel_hints)
14 (bfd_mach_o_read_fvmlib, bfd_mach_o_read_dysymtab)
15 (bfd_mach_o_read_symtab, bfd_mach_o_read_uuid)
16 (bfd_mach_o_read_linkedit, bfd_mach_o_read_str)
17 (bfd_mach_o_read_dyld_info, bfd_mach_o_read_version_min)
18 (bfd_mach_o_read_encryption_info): Likewise.
19 (bfd_mach_o_read_encryption_info_64): New function.
20 (bfd_mach_o_read_main, bfd_mach_o_read_source_version)
21 (bfd_mach_o_read_segment): Remove call to bfd_seek.
22 (bfd_mach_o_read_command): Use hdr_offset in bfd_seek.
23 Handle BFD_MACH_O_LC_LINKER_OPTIMIZATION_HINT,
24 BFD_MACH_O_LC_ENCRYPTION_INFO_64, BFD_MACH_O_LC_VERSION_MIN_WATCHOS.
25 (bfd_mach_o_header_p): Add hdr_off argument.
26 (bfd_mach_o_gen_object_p, bfd_mach_o_gen_core_p): Adjust calls.
27 (bfd_mach_o_fat_archive_p): Renames.
28 (bfd_mach_o_fat_openr_next_archived_file): Renames.
29 (bfd_mach_o_close_and_cleanup): Remove useless code.
30 (bfd_mach_o_close_and_cleanup): Define.
31 * mach-o-x86-64.c (bfd_mach_o_x86_64_object_p)
32 (bfd_mach_o_x86_64_core_p): Adjust calls.
33 * mach-o-target.c: Move defines for archive from mach-o.c.
34 Remove check on TARGET_ARCHIVE.
35 * mach-o-i386.c (bfd_mach_o_i386_object_p)
36 (bfd_mach_o_i386_core_p): Adjust calls.
38 2015-11-17 Christophe Lyon <christophe.lyon@linaro.org>
40 * elf32-arm.c (elf32_arm_write_section): Force offset output as
43 2015-11-13 Tristan Gingold <gingold@adacore.com>
45 * version.m4: Bump version to 2.26.51
46 * configure: Regenerate.
48 2015-11-11 Alan Modra <amodra@gmail.com>
49 Peter Bergner <bergner@vnet.ibm.com>
51 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_REL16DX_HA.
52 (ppc_elf_reloc_type_lookup): Handle R_PPC_REL16DX_HA.
53 (ppc_elf_addr16_ha_reloc): Likewise.
54 (ppc_elf_check_relocs): Likewise.
55 (ppc_elf_relocate_section): Likewise.
56 (is_insn_dq_form): Handle lxv and stxv instructions.
57 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_REL16DX_HA.
58 (ppc64_elf_reloc_type_lookup): Handle R_PPC64_REL16DX_HA.
59 (ppc64_elf_ha_reloc): Likewise.
60 (ppc64_elf_check_relocs): Likewise.
61 (ppc64_elf_relocate_section): Likewise.
62 * bfd-in2.h: Regenerate.
64 * reloc.c (BFD_RELOC_PPC_REL16DX_HA): New.
66 2015-11-10 H.J. Lu <hongjiu.lu@intel.com>
68 * elf32-i386.c (elf_i386_relocate_section): Handle VTINHERIT
69 and VTENTRY relocations when deleting relocations.
70 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
72 2015-11-10 H.J. Lu <hongjiu.lu@intel.com>
74 * elf32-i386.c (elf_i386_relocate_section): Properly move
75 kept relocations when deleting relocations.
76 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
78 2015-11-09 H.J. Lu <hongjiu.lu@intel.com>
80 * elf32-i386.c (elf_i386_relocate_section): Use read and write
81 pointers to reloc array, rather than memmove when deleting a
82 reloc. Don't use RELOC_AGAINST_DISCARDED_SECTION. Adjust
83 reloc counts at end of loop.
84 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
86 2015-11-10 Alan Modra <amodra@gmail.com>
88 * elf64-ppc.c (ppc64_elf_relocate_section): Use read and write
89 pointers to reloc array, rather than memmove when deleting a
90 reloc. Don't use RELOC_AGAINST_DISCARDED_SECTION. Adjust
91 reloc counts at end of loop.
92 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
94 2015-11-09 Dominik Vogt <vogt@linux.vnet.ibm.com>
96 * elf64-ppc.c (ppc64_elf_size_stubs, ppc64_elf_build_stubs): Fix left
97 shift of negative value.
98 * libbfd.c (safe_read_leb128): Likewise.
99 * dwarf2.c (place_sections): Likewise.
100 * bfd-in.h (align_power): Likewise.
101 * bfd-in2.h (align_power): Likewise.
103 2015-10-30 Nick Clifton <nickc@redhat.com>
105 * po/zh_CN.po: Updated (simplified) Chinese translation.
107 2015-10-29 Catherine Moore <clm@codesourcery.com>
109 * elfxx-mips.c (mips_elf_check_mips16_stubs): Set a stub's output
110 section to bfd_abs_section_ptr if the stub is discarded.
112 2015-10-29 Ed Schouten <ed@nuxi.nl>
114 * config.bfd (targ_defvec): Add support for CloudABI on aarch64.
115 For this target we have to make sure we use ELFOSABI_CLOUDABI
116 instead of ELFOSABI_NONE.
117 * configure.ac (tb): Likewise.
118 * elfnn-aarch64.c: Likewise.
119 * targets.c (_bfd_target_vector): Likewise.
120 * configure: Regenerate.
122 2015-10-29 Pedro Alves <palves@redhat.com>
124 * libhppa.h (bfd_hppa_insn2fmt): Add cast.
126 2015-10-28 H.J. Lu <hongjiu.lu@intel.com>
128 * elf32-i386.c (elf_i386_relocate_section): Fix a typo in
131 2015-10-28 Nick Clifton <nickc@redhat.com>
133 * elf32-arm.c (create_instruction_branch_absolute): Replace
134 pointer parameters with a simple integer parameter.
135 (stm32l4xx_create_replacing_stub_ldmia): Update calls to
136 create_instruction_branch_absolute.
137 (stm32l4xx_create_replacing_stub_ldmdb): Likewise.
138 (stm32l4xx_create_replacing_stub_vldm): Likewise.
139 (elf32_arm_write_section): Use pointer type for veneer addresses.
141 2015-10-28 Cupertino Miranda <cmiranda@synopsys.com>
143 * reloc.c (BFD_RELOC_ARC_32_PCREL): New entry.
144 * elf32-arc.c (arc_elf_howto_ini): Update formula.
145 (get_middle_endian_relocation): New function.
147 * bfd-in2.h: Regenerate.
148 * libbfd.h: Likewise.
150 2015-10-28 Alan Modra <amodra@gmail.com>
153 * elflink.c (_bfd_elf_gc_mark_reloc): Move code iterating over
155 * section.c (bfd_get_next_section_by_name): ..to here. Add ibfd param.
156 (bfd_get_linker_section): Adjust bfd_get_next_section_by_name call.
157 * tekhex.c (first_phase): Likewise.
158 * elflink.c (bfd_elf_gc_sections): Likewise.
159 * bfd-in2.h: Regenerate.
161 2015-10-27 Laurent Alfonsi <laurent.alfonsi@st.com>
162 Christophe Monat <christophe.monat@st.com>
164 * bfd-in2.h: Regenerate.
165 * bfd-in.h (bfd_arm_stm32l4xx_fix): New enum. Specify how
166 STM32L4XX instruction scanning should be done.
167 (bfd_elf32_arm_set_stm32l4xx_fix)
168 (bfd_elf32_arm_stm32l4xx_erratum_scan)
169 (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): Add prototypes.
170 (bfd_elf32_arm_set_target_relocs): Add stm32l4xx fix type argument
172 * elf32-arm.c (STM32L4XX_ERRATUM_VENEER_SECTION_NAME)
173 (STM32L4XX_ERRATUM_VENEER_ENTRY_NAME): Define macros.
174 (elf32_stm32l4xx_erratum_type): New enum.
175 (elf32_stm32l4xx_erratum_list): New struct. List of veneers or
177 (_arm_elf_section_data): Add stm32l4xx_erratumcount,
178 stm32l4xx_erratumlist.
179 (elf32_arm_link_hash_table): Add stm32l4xx_erratum_glue_size,
180 stm32l4xx_fix and num_stm32l4xx_fixes fields.
182 (popcount): New function.
183 (elf32_arm_link_hash_table_create): Initialize stm32l4xx_fix.
184 (put_thumb2_insn): New function.
185 (STM32L4XX_ERRATUM_LDM_VENEER_SIZE): Define. Size of a veneer for
187 (STM32L4XX_ERRATUM_VLDM_VENEER_SIZE): Define. Size of a veneer for
189 (bfd_elf32_arm_allocate_interworking_sections): Initialise erratum
191 (record_stm32l4xx_erratum_veneer) : New function. Create a single
192 veneer, and its associated symbols.
193 (bfd_elf32_arm_add_glue_sections_to_bfd): Add STM32L4XX erratum glue.
194 (bfd_elf32_arm_set_stm32l4xx_fix): New function. Set the type of
195 erratum workaround required.
196 (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): New function. Find
197 out where veneers and branches to veneers have been placed in
198 virtual memory after layout.
199 (is_thumb2_ldmia): New function.
200 (is_thumb2_ldmdb): Likewise.
201 (is_thumb2_vldm ): Likewise.
202 (stm32l4xx_need_create_replacing_stub): New function. Decide if a
203 veneer must be emitted.
204 (bfd_elf32_arm_stm32l4xx_erratum_scan): Scan the sections of an
205 input BFD for potential erratum-triggering insns. Record results.
206 (bfd_elf32_arm_set_target_relocs): Set stm32l4xx_fix field in
208 (elf32_arm_size_dynamic_sections): Collect glue information.
209 (create_instruction_branch_absolute): New function.
210 (create_instruction_ldmia): Likewise.
211 (create_instruction_ldmdb): Likewise.
212 (create_instruction_mov): Likewise.
213 (create_instruction_sub): Likewise.
214 (create_instruction_vldmia): Likewise.
215 (create_instruction_vldmdb): Likewise.
216 (create_instruction_udf_w): Likewise.
217 (create_instruction_udf): Likewise.
218 (push_thumb2_insn32): Likewise.
219 (push_thumb2_insn16): Likewise.
220 (stm32l4xx_fill_stub_udf): Likewise.
221 (stm32l4xx_create_replacing_stub_ldmia): New function. Expands the
222 replacing stub for ldmia instructions.
223 (stm32l4xx_create_replacing_stub_ldmdb): Likewise for ldmdb.
224 (stm32l4xx_create_replacing_stub_vldm): Likewise for vldm.
225 (stm32l4xx_create_replacing_stub): New function. Dispatches the
226 stub emission to the appropriate functions.
227 (elf32_arm_write_section): Output veneers, and branches to veneers.
229 2015-10-27 Sangamesh Mallayya <nickc@redhat.com>sangamesh.swamy@in.ibm.com>
231 * configure.ac (powerpc64-*-aix[5-9].*): Match powerpc64 running
232 aix for core file support.
233 * configure: Regenerate.
234 * rs6000-core.c: Check for __ld_info64 if compiling 64-bit gdb.
235 Added BFD64 check if we are using old core file format for 32-bit gdb.
236 Set sizeof CORE_COMMONSZ appropriately in case of either new or
237 old core file format.
238 (read_hdr): Added BFD64 check for 64-bit support.
239 (rs6000coff_core_p): Likewise.
240 (rs6000coff_core_file_matches_executable_p): Likewise.
241 (rs6000coff_core_file_failing_command): Likewise.
242 (rs6000coff_core_file_failing_signal): Likewise.
243 Add support for debugging core files generated by binaries in
245 (rs6000coff_core_p): If Large Memory Model is used, then the .data
246 segment should start from BDATAORG which has been defined in the
249 2015-10-26 H.J. Lu <hongjiu.lu@intel.com>
252 * elf32-i386.c (elf_i386_convert_load): Check bfd_link_hash_new
253 instead of calling bfd_link_get_defined_symbol.
254 * elf64-x86-64.c (elf_x86_64_convert_load): Likewise. Skip
255 relocation overflow for bfd_link_hash_new.
256 * linker.c (bfd_link_get_defined_symbol): Removed.
257 * bfd-in2.h: Regenerated.
259 2015-10-26 H.J. Lu <hongjiu.lu@intel.com>
262 * elf32-i386.c (elf_i386_convert_load): Call
263 bfd_link_get_defined_symbol to check if a symbol is defined.
264 * elf64-x86-64.c (elf_x86_64_convert_load): Call
265 bfd_link_get_defined_symbol to get defined symbol section and
267 * linker.c (bfd_link_get_defined_symbol): New function.
268 * bfd-in2.h: Regenerated.
270 2015-10-23 Alan Modra <amodra@gmail.com>
275 * elflink.c (_bfd_elf_gc_mark_hook): Delete code handling __start_*
276 and __stop_* symbol refs.
277 (_bfd_elf_gc_mark_rsec): Add start_stop parameter. Handle __start_*
278 and __stop_* symbol refs here..
279 (_bfd_elf_gc_mark_reloc): ..and here.
280 * elf-bfd.h (_bfd_elf_gc_mark_hook): Update prototype.
281 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Update
282 _bfd_elf_gc_mark_rsec call.
284 2015-10-23 Alan Modra <amodra@gmail.com>
288 * elflink.c (elf_gc_sweep): Revert last patch.
289 (_bfd_elf_gc_mark_hook): Don't set SEC_KEEP here.
291 2015-10-22 H.J. Lu <hongjiu.lu@intel.com>
294 * elflink.c (elf_gc_sweep): Always keep sections marked with
297 2015-10-22 Hans-Peter Nilsson <hp@bitrange.com>
299 * mmo.c (struct mmo_data_struct): New members
300 symbol_consistency_override_calculated and ignore_symbol_consistency.
301 (mmo_section_has_contents, mmo_ignore_symbol_consistency): New
303 (mmo_create_symbol): Check with mmo_ignore_symbol_consistency if to
304 report an error for unexpected value of Main.
305 (mmo_write_symbols_and_terminator): Similar.
307 2015-10-22 H.J. Lu <hongjiu.lu@intel.com>
309 * elf32-i386.c (elf_i386_convert_load): Use call_nop_byte and
310 check call_nop_as_suffix for 1-byte NOP padding to pad call.
311 * elf64-x86-64.c (elf_x86_64_convert_load): Likewise.
313 2015-10-22 H.J. Lu <hongjiu.lu@intel.com>
315 * elf64-x86-64.c: Include opcode/i386.h.
316 (x86_64_elf_howto_table): Add R_X86_64_GOTPCRELX and
317 R_X86_64_REX_GOTPCRELX.
318 (R_X86_64_standard): Replace R_X86_64_PLT32_BND with
319 R_X86_64_REX_GOTPCRELX.
320 (x86_64_reloc_map): Add BFD_RELOC_X86_64_GOTPCRELX and
321 BFD_RELOC_X86_64_REX_GOTPCRELX.
322 (need_convert_mov_to_lea): Renamed to ...
323 (need_convert_load): This.
324 (elf_x86_64_check_relocs): Handle R_X86_64_GOTPCRELX and
325 R_X86_64_REX_GOTPCRELX. Replace need_convert_mov_to_lea with
327 (elf_x86_64_gc_sweep_hook): Handle R_X86_64_GOTPCRELX and
328 R_X86_64_REX_GOTPCRELX.
329 (elf_x86_64_size_dynamic_sections): Likewise.
330 (elf_x86_64_relocate_section): Likewise.
331 (elf_x86_64_convert_mov_to_lea): Renamed to ...
332 (elf_x86_64_convert_load): This. Replace need_convert_mov_to_lea
333 with need_convert_load. Support R_X86_64_GOTPCRELX and
334 R_X86_64_REX_GOTPCRELX transformations.
335 * reloc.c (BFD_RELOC_X86_64_GOTPCRELX): New.
336 (BFD_RELOC_X86_64_REX_GOTPCRELX): Likewise.
337 * bfd-in2.h: Regenerated.
338 * libbfd.h: Likewise.
340 2015-10-22 H.J. Lu <hongjiu.lu@intel.com>
342 * elf32-i386.c: Include opcode/i386.h.
343 (elf_howto_table): Add R_386_GOT32X.
344 (R_386_ext2): Replace R_386_IRELATIVE with R_386_GOT32X.
345 (elf_i386_reloc_type_lookup): Handle BFD_RELOC_386_GOT32X.
346 (need_convert_mov_to_lea): Renamed to ...
347 (need_convert_load): This.
348 (elf_i386_check_relocs): Handle R_386_GOT32X. Replace
349 need_convert_mov_to_lea with need_convert_load.
350 (elf_i386_gc_sweep_hook): Handle R_386_GOT32X.
351 (elf_i386_size_dynamic_sections): Likewise.
352 (elf_i386_relocate_section): Likewise.
353 (elf_i386_convert_mov_to_lea): Renamed to ...
354 (elf_i386_convert_load): This. Replace need_convert_mov_to_lea
355 with need_convert_load. Support R_386_GOT32X transformations.
356 * reloc.c (BFD_RELOC_386_GOT32X): New.
357 * bfd-in2.h: Regenerated.
358 * libbfd.h: Likewise.
360 2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
362 * elf32-s390.c (elf_s390_check_relocs): Set the non_got_ref marker
363 only when linking an executable.
364 (elf_s390_relocate_section): Redirect PC-relative relocs to a IPLT
366 * elf64-s390.c (elf_s390_check_relocs): Set the non_got_ref marker
367 only when linking an executable.
368 (elf_s390_relocate_section): Redirect PC-relative relocs to a IPLT
371 2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
373 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Set the PLT
374 reference counters for local IFUNC calls.
375 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
377 2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
379 * elf32-s390.c (elf_s390_check_relocs): Fallthrough to the PLT
380 slot allocating code for GOTOFF relocs on ifunc symbols.
381 (elf_s390_gc_sweep_hook): Decrement plt refcount for GOTOFF relocs
383 (elf_s390_relocate_section): Redirect a GOTOFF reloc to an iplt
386 2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
389 * elf32-s390.c (elf_s390_reloc_type_class): Return
390 reloc_class_ifunc for ifunc symbols.
391 * elf64-s390.c (elf_s390_reloc_type_class): Likewise.
393 2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
395 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Call
396 elf_s390_finish_ifunc_symbol only for actually defined symbols.
397 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
399 2015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
401 * elf-s390-common.c (s390_elf_allocate_ifunc_dyn_relocs): Remove
403 * elf32-s390.c (allocate_dynrelocs): Don't use last parameter.
404 * elf64-s390.c (allocate_dynrelocs): Don't use last parameter.
406 2015-10-20 Hans-Peter Nilsson <hp@bitrange.com>
408 * mmo.c (mmo_write_symbols_and_terminator): Correct printed value
409 of Main in error message.
411 2015-10-18 Doug Evans <xdje42@gmail.com>
413 * targets.c (bfd_flavour_name): "MMO" is spelled "mmo".
415 2015-10-17 Alan Modra <amodra@gmail.com>
417 * elf64-ppc.c (ppc64_elf_size_stubs): Correct __glink_PLTresolve
418 eh_frame FDE for ELFv1.
420 2015-10-16 H.J. Lu <hongjiu.lu@intel.com>
422 * elf32-i386.c (elf_i386_convert_mov_to_lea): Check if symbol
424 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
426 2015-10-16 H.J. Lu <hongjiu.lu@intel.com>
428 * elf32-i386.c (elf_i386_convert_mov_to_lea): Don't check
430 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
432 2015-10-15 H.J. Lu <hongjiu.lu@intel.com>
434 * elflink.c (_bfd_elf_merge_symbol): Fix typos in comments
436 2015-10-15 Alan Modra <amodra@gmail.com>
438 * elf32-v850.c (v850_elf_copy_private_bfd_data): Remove assertion
439 that input and output .note.renesas sections are same size.
440 Instead, only copy input to output if they are.
442 2015-10-15 Riku Voipio <riku.voipio@iki.fi>
445 * elfcore.h (elf_core_file_p): Use the file_ptr type to hold the
447 * elfcode.h (elf_object_p): Likewise.
449 2015-10-14 Rich Felker <dalias@libc.org>
452 * elf32-sh.c (sh_elf_size_dynamic_sections): Always emit
453 DT_PLTGOT for FDPIC output.
455 2015-10-13 Alan Modra <amodra@gmail.com>
457 * elf.c (_bfd_elf_map_sections_to_segments): Don't set
458 PT_GNU_RELRO p_flags.
459 (assign_file_positions_for_non_load_sections): Set PT_GNU_RELRO
462 2015-10-12 H.J. Lu <hongjiu.lu@intel.com>
465 * elflink.c (_bfd_elf_add_default_symbol): Skip the unversioned
466 definition after the default version.
468 2015-10-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
471 * elf32-s390.c (elf_s390_gc_sweep_hook): Do not reduce got
472 refcount for relocs not really requiring a got slot.
473 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
475 2015-10-11 John David Anglin <danglin@gcc.gnu.org>
477 * elf-hppa.h (elf_hppa_action_discarded): Ignore relocations in
480 2015-10-07 Cupertino Miranda <cmiranda@synopsys.com>
482 * archures.c: Remove support for older ARC. Added support for new
483 ARC cpus (ARC600, ARC601, ARC700, ARCV2).
484 * bfd-in2.h: Likewise.
485 * config.bfd: Likewise.
486 * cpu-arc.c: Likewise.
487 * elf32-arc.c: Totally changed file with a refactored
488 inplementation of the ARC port.
489 * libbfd.h: Added ARC specific relocation types.
492 2015-10-06 H.J. Lu <hongjiu.lu@intel.com>
494 * bfd.c (bfd_update_compression_header): Clear the ch_reserved
495 field in 64-bit output.
496 (bfd_convert_section_contents): Likewise.
498 2015-10-05 H.J. Lu <hongjiu.lu@intel.com>
501 * elflink.c (elf_link_add_object_symbols): Don't re-export a
502 symbol if it isn't undefined.
504 2015-10-04 H.J. Lu <hongjiu.lu@intel.com>
506 * config.bfd (targ_selvecs, targ64_selvecs): Add iamcu_elf32_vec,
507 i386_pei_vec and x86_64_pei_vec for Solaris2/x86.
509 2015-10-02 Renlin Li <renlin.li@arm.com>
511 * elfnn-aarch64.c (aarch64_tls_transition_without_check): Add
512 relax transitions for TLSDESC_ADD, TLSDESC_LDR, TLSDESC_OFF_G0_NC,
514 (aarch64_tls_transition_without_check): Add relaxation support.
515 (aarch64_reloc_got_type): Add support.
516 (elfNN_aarch64_final_link_relocate): Likewise.
517 (elfNN_aarch64_tls_relax): Likewise.
518 (elfNN_aarch64_relocate_section): Likewise.
519 (elfNN_aarch64_gc_sweep_hook): Likewise.
520 (elfNN_aarch64_check_relocs): Likewise.
521 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
522 (_bfd_aarch64_elf_resolve_relocation): Likewise.
524 2015-10-02 Renlin Li <renlin.li@arm.com>
526 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Check overflow for
527 BFD_RELOC_AARCH64_TLSDESC_OFF_G1.
529 2015-10-02 Renlin Li <renlin.li@arm.com>
531 * elfnn-aarch64.c(IS_AARCH64_TLS_RELAX_RELOC):
532 Add relaxation support for TLSGD_MOVW_G0_NC and TLSGD_MOVW_G1.
533 (aarch64_tls_transition_without_check): Likewise
534 (elfNN_aarch64_tls_relax): Likwise.
536 2015-10-02 Renlin Li <renlin.li@arm.com>
538 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Create GOT section
539 for TLSLE_MOVW_TPREL_G(1, 1_NC, 2) relocation.
541 2015-10-02 Renlin Li <renlin.li@arm.com>
543 * reloc.c: Make AARCH64_TLSIE_MOVW_GOTTPREL_G1 and
544 AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC defined in alphabetical order.
545 * libbfd.h: Regenerate.
546 * bfd-in2.h: Likewise.
547 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Make
548 TLSIE_MOVW_GOTTPREL_G1 check overflow.
549 (aarch64_reloc_got_type): Add support for TLSIE_MOVW_GOTTPREL_G1
550 and TLSIE_MOVW_GOTTPREL_G0_NC.
551 (elfNN_aarch64_final_link_relocate): Likewise.
552 (elfNN_aarch64_relocate_section): Likewise.
553 (elfNN_aarch64_gc_sweep_hook): Likewise.
554 (elfNN_aarch64_check_relocs): Likewise.
555 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
556 (_bfd_aarch64_elf_resolve_relocation): Likewise.
558 2015-10-02 Renlin Li <renlin.li@arm.com>
560 * elfnn-aarch64.c (aarch64_reloc_got_type): Add
561 BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC support.
562 (elfNN_aarch64_final_link_relocate): Likewise.
563 (elfNN_aarch64_relocate_section): Likewise.
564 (elfNN_aarch64_gc_sweep_hook): Likewise.
565 (elfNN_aarch64_check_relocs): Likewise.
566 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
567 (_bfd_aarch64_elf_resolve_relocation): Likewise.
569 2015-10-02 Renlin Li <renlin.li@arm.com>
571 * reloc.c (BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC): New entry.
572 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
573 BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC.
574 * libbfd.h: Regenerate.
575 * bfd-in2.h: Likewise
577 2015-10-02 Renlin Li <renlin.li@arm.com>
579 * elfnn-aarch64.c (aarch64_reloc_got_type): Add
580 BFD_RELOC_AARCH64_TLSGD_MOVW_G1 support.
581 (elfNN_aarch64_final_link_relocate): Likewise.
582 (elfNN_aarch64_relocate_section): Likewise.
583 (elfNN_aarch64_gc_sweep_hook): Likewise.
584 (elfNN_aarch64_check_relocs): Likewise.
585 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
586 (_bfd_aarch64_elf_resolve_relocation): Likewise.
588 2015-10-02 Renlin Li <renlin.li@arm.com>
590 * reloc.c (BFD_RELOC_AARCH64_TLSGD_MOVW_G1): New entry.
591 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
592 BFD_RELOC_AARCH64_TLSGD_MOVW_G1.
593 * bfd-in2.h: Regenerate.
594 * libbfd.h: Likewise.
596 2015-10-02 Renlin Li <renlin.li@arm.com>
598 * elfnn-aarch64.c (aarch64_reloc_got_type): Add
599 BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC support.
600 (elfNN_aarch64_final_link_relocate): Likewise.
601 (elfNN_aarch64_gc_sweep_hook): Likewise.
602 (elfNN_aarch64_check_relocs): Likewise.
603 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
604 (_bfd_aarch64_elf_resolve_relocation): Likewise.
606 2015-10-02 Renlin Li <renlin.li@arm.com>
608 * reloc.c (BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC): New.
609 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry
611 * libbfd.h: Regnerate.
612 * bfd-in2.h: Regenerate.
614 2015-10-02 Renlin Li <renlin.li@arm.com>
616 * elfnn-aarch64.c (aarch64_reloc_got_type): Add support
617 for BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
618 (elfNN_aarch64_gc_sweep_hook): Likewise.
619 (elfNN_aarch64_check_relocs): Likewise
620 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
621 (_bfd_aarch64_elf_resolve_relocation): Likewise
622 (elfNN_aarch64_final_link_relocate): Likewise
624 2015-010-02 Renlin Li <renlin.li@arm.com>
626 * reloc.c (BFD_RELOC_AARCH64_MOVW_GOTOFF_G1): New.
627 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
629 * libbfd.h: Regenerate.
630 * bfd-in2.h: Regenerate.
632 2015-10-02 Renlin Li <renlin.li@arm.com>
634 * elfnn-aarch64.c (aarch64_reloc_got_type): Add
635 BFD_RELOC_AARCH64_LD_64_GOTOFF_LO15 support.
636 (elfNN_aarch64_gc_sweep_hook): Likewise.
637 (elfNN_aarch64_check_relocs): Likewise
638 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
639 (_bfd_aarch64_elf_resolve_relocation): Likewise
640 (elfNN_aarch64_final_link_relocate): Calculate offset within GOT.
642 2015-10-02 Renlin Li <renlin.li@arm.com>
644 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Change if to
647 2015-10-01 H.J. Lu <hongjiu.lu@intel.com>
650 * elf64-x86-64.c (elf_x86_64_check_relocs): Set
651 pointer_equality_needed for R_X86_64_PC32 reloc in non-code
654 2015-10-01 Renlin Li <renlin.li@arm.com>
656 * elfnn-aarch64.c (elfNN_aarch64_output_plt_map): Remove.
657 (elfNN_aarch64_output_arch_local_syms): Emit AARCH64_MAP_INSN once.
659 2015-10-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
661 * config.bfd (targ_selvecs): Remove sh_elf32_vec and
662 sh_elf32_le_vec from sh*-*-linux cases.
664 2015-10-01 Alan Modra <amodra@gmail.com>
667 * elflink.c (_bfd_elf_merge_sections): Revert last change.
669 2015-09-30 H.J. Lu <hongjiu.lu@intel.com>
672 * elf32-i386.c (elf_i386_check_relocs): Set
673 pointer_equality_needed for R_386_PC32 reloc in non-code
676 2015-09-30 H.J. Lu <hongjiu.lu@intel.com>
679 * elflink.c (_bfd_elf_merge_sections): Only merge input bfds
680 that have the compatible ELF machine code with the output bfd.
682 2015-09-30 Alan Modra <amodra@gmail.com>
685 * elflink.c (_bfd_elf_merge_sections): Only merge input bfds that
686 will be handled by elf_link_input_bfd. Rename abfd param to obfd.
688 2015-09-30 Rich Felker <dalias@libc.org>
690 * config.bfd (targ_selvecs): Add fdpic and misc targets
693 2015-09-29 Andrew Stubbs <ams@codesourcery.com>
694 H.J. Lu <hongjiu.lu@intel.com>
697 * bfd.c (bfd_convert_section_contents): Add ptr_size parameter.
698 * bfd-in2.h: Regenerated.
700 2015-08-11 Peter Zotov <whitequark@whitequark.org>
703 * elf32-or1k.c (R_OR1K_32_PCREL): Set pcrel_offset to TRUE.
704 (R_OR1K_16_PCREL): Likewise.
705 (R_OR1K_8_PCREL): Likewise.
707 2015-09-23 Nick Clifton <nickc@redhat.com>
709 * bout.c (b_out_slurp_reloc_table): Cast constant to unsigned in
710 order to avoid problems with left shifting negative values.
711 (abs32code): Likewise.
712 * mach-o.c (FILE_ALIGN): Likewise.
713 * coff-rs6000.c (xcoff_debug_sections): Delete unused static
715 * elf32-visium.c (visium_reloc_map): Likewise.
716 * elf32-arm.c (elf32_arm_final_link_relocate): Remove useless
717 calls to abs function.
718 * elf32-frv.c (_frvfdpic_relax_tls_entries): Likewise.
719 * elf32-score.c (score_elf_final_link_relocate): Likewise.
720 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
721 * elf32-i860.c (i860_howto_pc26_reloc): Use multiplication instead
722 of shifting to create a negative mask.
723 * elf32-msp430.c (elf_backend_special_sections): Define.
724 * elfxx-mips.c (got_ofst_reloc_p): Delete unused function.
725 (got_hi16_reloc_p): Delete unused function.
726 * ppcboot.c (ppcboot_bfd_print_private_bfd_data): Fix test of
729 2015-09-23 Nick Clifton <nickc@redhat.com>
732 * elf-bfd.h (struct elf_section_list): New structure.
733 (struct elf_obj_tdata): Replace symtab_shndx_hdr with
734 symtab_shndx_list. Delete symtab_shndx_section.
735 (elf_symtab_shndx): Replace macro with elf_symtab_shndx_list.
736 * elf.c (bfd_elf_get_syms): If symtab index sections are present,
737 scan them for the section that matches the provided symbol table.
738 (bfd_section_from_shdr): Record all SHT_SYMTAB_SHNDX sections.
739 (assign_section_numbers): Use the first symtab index table in the
741 (_bfd_elf_compute_section_file_positions): Replace use of
742 symtab_shndx_hdr with use of symtab_shndx_list.
743 (find_section_in_list): New function.
744 (assign_file_postions_except_relocs): Use new function.
745 (_bfd_elf_copy_private_symbol_data): Likewise.
746 (swap_out_syms): Handle multiple symbol table index sections.
747 * elf32-m32c.c (m32c_elf_relax_section): Replace use of
748 symtab_shndx_hdr with use of symtab_shndx_list.
749 * elf32-rl78.c (rl78_elf_relax_section): Likewise.
750 * elf32-rx.c (rx_relax_section): Likewise.
751 * elf32-v850.c (v850_elf_relax_delete_bytes): Likewise.
752 * elflink.c (bfd_elf_final_link): Likewise.
754 2015-09-21 H.J. Lu <hongjiu.lu@intel.com>
756 * bfd.c (bfd_update_compression_header): Use bfd_put_32 on
758 (bfd_check_compression_header): Use bfd_get_32 on ch_type.
759 (bfd_convert_section_contents): Use bfd_get_32 and bfd_put_32
762 2015-09-20 Rich Felker <dalias@libc.org>
764 * elflink.c (_bfd_elf_link_create_dynamic_sections): Don't create
765 .interp when info->nointerp.
766 (bfd_elf_size_dynamic_sections): Adjust assert.
767 * elf32-arm.c (elf32_arm_size_dynamic_sections): Don't size .interp
769 * elf32-bfin.c (elf32_bfinfdpic_size_dynamic_sections): Likewise.
770 * elf32-cr16.c (_bfd_cr16_elf_size_dynamic_sections): Likewise.
771 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
772 * elf32-frv.c (elf32_frvfdpic_size_dynamic_sections): Likewise.
773 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
774 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
775 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
776 * elf32-lm32.c (lm32_elf_size_dynamic_sections): Likewise.
777 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Likewise.
778 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
779 * elf32-metag.c (elf_metag_size_dynamic_sections): Likewise.
780 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Likewise.
781 * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Likewise.
782 * elf32-or1k.c (or1k_elf_size_dynamic_sections): Likewise.
783 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
784 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
785 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
786 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
787 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
788 * elf32-tic6x.c (elf32_tic6x_size_dynamic_sections): Likewise.
789 * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Likewise.
790 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
791 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
792 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
793 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
794 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Likewise.
795 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
796 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
797 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
798 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Likewise.
799 * elfnn-ia64.c (elfNN_ia64_size_dynamic_sections): Likewise.
800 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
801 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
802 * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): Likewise.
804 2015-09-18 Doug Evans <xdje42@gmail.com>
806 * targets.c (enum bfd_flavour): Add comment.
807 (bfd_flavour_name): New function.
808 * bfd-in2.h: Regenerate.
810 2015-09-18 Alan Modra <amodra@gmail.com>
812 * elf64-ppc.h (struct ppc64_elf_params <tls_get_addr_opt>): Rename
813 from no_tls_get_addr_opt.
814 * elf64-ppc.c: Update for rename and inversion of tls_get_addr_opt.
815 (ppc64_elf_tls_setup): Set tls_get_addr_opt to 0 only when at
818 2015-09-17 Alan Modra <amodra@gmail.com>
821 * elflink.c (elf_link_adjust_relocs): Correct start of insertion
824 2015-09-16 Alan Modra <amodra@gmail.com>
827 * elflink.c (elf_link_adjust_relocs): Modify insertion sort to
828 insert a run. Return status in case of malloc failure.
831 2015-09-15 Max Filippov <jcmvbkbc@gmail.com>
833 * elf32-xtensa.c (elf_xtensa_be_plt_entry)
834 (elf_xtensa_le_plt_entry): Emit 'entry' instruction only for
836 (elf_xtensa_create_plt_entry): Generate 'l32r' offsets and fix
837 up instructions according to ABI.
839 2015-09-14 Rich Felker <dalias@libc.org>
841 * elf32-sh.c (sh_elf_relocate_section): Set EF_SH_PIC flag
842 instead of clearing it on cross-section relocations.
843 (sh_elf_merge_private_data): Clear EF_SH_PIC flag by default.
845 2015-09-12 Helge Deller <deller@gmx.de>
848 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Set .plt entry
851 2015-09-09 Jiong Wang <jiong.wang@arm.com>
853 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Sort alphabetically.
855 2015-09-09 Jiong Wang <jiong.wang@arm.com>
857 * elfnn-aarch64.c (aarch64_tls_transition_without_check): Support three
858 TLS local dynamic traditional relocations types.
859 (elfNN_aarch64_tls_relax): Support TLS local dynamic traditional to
860 local executable relaxation.
862 2015-09-03 H.J. Lu <hongjiu.lu@intel.com>
864 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Remove
867 2015-09-02 H.J. Lu <hongjiu.lu@intel.com>
869 * elf32-i386.c (R_386_irelative): Renamed to ...
871 (R_386_vt_offset): Updated.
872 (elf_i386_rtype_to_howto): Likewise.
873 (elf_i386_relocate_section): Likewise.
875 2015-09-01 H.J. Lu <hongjiu.lu@intel.com>
878 * elf32-i386.c (elf_i386_link_hash_entry): Add
879 func_pointer_refcount.
880 (elf_i386_link_hash_newfunc): Clear func_pointer_refcount.
881 (elf_i386_get_local_sym_hash): Likewise.
882 (elf_i386_copy_indirect_symbol): Also copy
883 func_pointer_refcount.
884 (elf_i386_check_relocs): Increment func_pointer_refcount.
885 (elf_i386_gc_sweep_hook): Decrement func_pointer_refcount.
886 (elf_i386_allocate_dynrelocs): Don't create the PLT entry if
887 there are only function pointer relocations which can be
888 resolved at run-time. Keep dynanamic relocations for run-time
889 function pointer initialization.
890 (elf_i386_relocate_section): Copy dynamic function pointer
892 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
893 func_pointer_refcount.
894 (elf_x86_64_link_hash_newfunc): Clear func_pointer_refcount.
895 (elf_x86_64_get_local_sym_hash): Likewise.
896 (elf_x86_64_copy_indirect_symbol): Also copy
897 func_pointer_refcount.
898 (elf_x86_64_check_relocs): Increment func_pointer_refcount.
899 (elf_x86_64_gc_sweep_hook): Decrement func_pointer_refcount.
900 (elf_x86_64_allocate_dynrelocs): Don't create the PLT entry if
901 there are only function pointer relocations which can be
902 resolved at run-time. Keep dynanamic relocations for run-time
903 function pointer initialization.
904 (elf_x86_64_relocate_section): Copy dynamic function pointer
907 2015-09-01 Alan Modra <amodra@gmail.com>
909 * elf64-ppc.c (ppc64_elf_maybe_function_sym): Adjust symbol value
910 if .opd section has been edited.
912 2015-09-01 Alan Modra <amodra@gmail.com>
915 * elf64-ppc.c (ARRAY_SIZE): Define. Use throughout.
916 (enum ppc_stub_type): Add ppc_stub_save_res.
917 (struct map_stub): Add "next" and "needs_save_res".
918 (struct ppc_link_hash_entry): Add "save_res" flag.
919 (struct ppc_link_hash_table): Add "group".
920 (sfpr_define): Add stub_sec param. Define symbol in stub_sec if
921 stub_sec is non-null. Set "save_res".
922 (save_res_funcs): Make file scope, rename from funcs. Adjust uses.
923 (ppc64_elf_adjust_dynamic_symbol): Prohibit plt call to save_res syms.
924 (ppc_build_one_stub): Handle ppc_stub_save_res.
925 (ppc_size_one_stub): Set stub type to ppc_size_one_stub on finding
926 stub for linker defined save_res sym.
927 (group_sections): Init new fields of struct map_stub.
928 (ppc64_elf_size_stubs): Reserve space for save/restore func copy.
929 (ppc64_elf_build_stubs): Copy save/restore funcs to groups. Emit
931 (ppc64_elf_relocate_section): Set destination for ppc_stub_save_res.
933 2015-08-31 Alan Modra <amodra@gmail.com>
935 * elf64-ppc.c (get_r2off): Return -1 on error.
936 (ppc_build_one_stub): Adjust for get_r2off change. Don't emit
937 addi r2,r2,0 on r2off stubs when the low 16-bit delta is zero.
938 (ppc_size_one_stub): Corresponding size changes for r2off stubs.
939 Add condition in test for -R objects.
941 2015-08-31 Alan Modra <amodra@gmail.com>
943 * section.c (section_id): Make file scope.
944 (bfd_get_next_section_id): New function.
945 * elf64-ppc.c (struct map_stub): Remove toc_off field. Move decl.
946 (struct ppc_stub_hash_entry): Delete stub_sec and id_sec. Add
947 group. Update all uses.
948 (struct ppc_link_hash_table): Delete top_id, top_index, and
949 input_list. Add sec_info_arr_size. Rename stub_group to
950 sec_info, and make group info indirect. Update stub_group refs
952 (ppc_add_stub): Don't look for stub_sec on link_sec stub_group
954 (ppc_build_one_stub): Delete FIXME.
955 (ppc64_elf_setup_section_lists): Size htab->sec_info for all
956 sections, not just input sections. Don't create htab->input_list.
957 (ppc64_elf_next_input_section): Update to use sec_info union as
960 (group_sections): Pass "info" param rather than "htab". Iterate
961 over output sections rather than input_list. Use sec_info union
962 as list pointers. Alloc atruct map_stub, and return fail status.
963 * bfd-in2.h: Regenerate.
965 2015-08-31 Alan Modra <amodra@gmail.com>
967 * elflink.c (elf_sort_symbol): Use correctly sized type for
968 calculating signed section->id difference.
969 (elf_link_add_object_symbols): Likewise.
970 * pef.c (bfd_pef_scan_start_address): Warning fix.
971 * vms-alpha.c (vms_new_section_hook): Likewise.
973 2015-08-31 Alan Modra <amodra@gmail.com>
975 * elf32-nds32.c (nds32_convert_32_to_16_alu1): Warning fix.
976 (find_relocs_at_address_addr): Make "reloc_type" an enum.
977 (nds32_elf_relax_delete_blanks): Warning fix.
978 (nds32_elf_relax_loadstore): Correct loop bound.
980 2015-08-31 Alan Modra <amodra@gmail.com>
982 * section.c (struct bfd_section): Make "id" and "index" unsigned.
983 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Adjust local var to suit.
984 * elf.c (elf_map_symbols): Likewise.
985 * elf64-ppc.c (sym_exists_at): Make "id" param unsigned.
986 (struct ppc_link_hash_table): Make "top_id" and "top_index" unsigned.
987 (ppc64_elf_setup_section_lists): Ditto for local vars.
988 * elf32-arm.c: Similarly to elf64-ppc.c.
989 * elf32-avr.c: Likewise.
990 * elf32-hppa.c: Likewise.
991 * elf32-m68hc1x.c: Likewise.
992 * elf32-metag.c: Likewise.
993 * elf32-nios2.c: Likewise.
994 * elfnn-aarch64.c: Likewise.
995 * simple.c (struct saved_offsets): Make "section_count" unsigned.
996 * bfd-in2.h: Regenerate.
998 2015-08-27 Alan Modra <amodra@gmail.com>
1001 * elf64-alpha.c (elf64_alpha_sort_relocs_p): New function.
1002 (elf_backend_sort_relocs_p): Define.
1004 2015-08-26 Alan Modra <amodra@gmail.com>
1007 * elflink.c (cmp_ext32l_r_offset, cmp_ext32b_r_offset): Delete.
1008 (cmp_ext64l_r_offset, cmp_ext64b_r_offset): Delete.
1009 (ext32l_r_offset, ext32b_r_offset, ext64l_r_offset, ext64b_r_offset):
1011 (elf_link_adjust_relocs): Use an insertion sort to sort relocs.
1013 2015-08-26 Matthew Fortune <matthew.fortune@imgtec.com>
1016 * elfxx-mips.c (bfd_mips_isa_ext_mach): New function: Converts an
1017 ISA value to a bfd machine number.
1018 (bfd_mips_isa_ext): Update the ISA level and revision if
1019 necessary. Use mips_mach_extends_p to decide if the ISA extension
1021 (_bfd_mips_elf_merge_private_bfd_data): Allow the ISA extension to
1022 be inferred from the ABI setting. Set the ISA level from the
1023 maximum of the incoming and outgoing ISA levels.
1025 2015-08-25 Nick Clifton <nickc@redhat.com>
1028 * elf.c (bfd_section_from_shdr): Replace assertions with warnings
1029 about multiple symbol tables.
1031 2015-08-25 Renlin Li <renlin.li@arm.com>
1033 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): Use LP64 instead of
1035 * bfd-in2.h: Regenerate.
1037 2015-08-22 Alan Modra <amodra@gmail.com>
1039 * elf.c (_bfd_elf_slurp_version_tables): Always init vd_nodename.
1040 Don't copy fields not set by _bfd_elf_swap_verdef_in.
1042 2015-08-19 Jiong Wang <jiong.wang@arm.com>
1044 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize new relocation
1045 types, including BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
1046 BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
1047 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
1048 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
1049 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
1050 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
1051 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
1052 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC.
1053 (elfNN_aarch64_final_link_relocate): Likewise.
1054 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1055 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1057 2015-08-19 Jiong Wang <jiong.wang@arm.com>
1059 * reloc.c (BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
1060 BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
1061 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
1062 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
1063 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
1064 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC.
1065 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
1066 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC): New entries.
1067 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
1068 * bfd-in2.h: Regenerate.
1069 * libbfd.h: Regenerate.
1071 2015-08-19 Jiong Wang <jiong.wang@arm.com>
1074 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize new relocation
1075 types, including BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
1076 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
1077 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
1078 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
1079 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
1080 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2.
1081 (elfNN_aarch64_final_link_relocate): Likewise.
1082 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1083 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1085 2015-08-19 Jiong Wang <jiong.wang@arm.com>
1087 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
1088 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
1089 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
1090 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
1091 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
1092 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2): New entries.
1093 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
1094 * bfd-in2.h: Regenerate.
1095 * libbfd.h: Regenerate.
1097 2015-08-19 Jiong Wang <jiong.wang@arm.com>
1099 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
1100 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC.
1101 (aarch64_reloc_got_type): Likewise.
1102 (elfNN_aarch64_final_link_relocate): Likewise.
1103 (elfNN_aarch64_relocate_section): Likewise.
1104 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1105 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1107 2015-08-19 Jiong Wang <jiong.wang@arm.com>
1109 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC): New entry.
1110 * bfd-in2.h: Regenerate.
1111 * libbfd.h: Regenerate.
1112 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1113 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC.
1115 2015-08-19 Alan Modra <amodra@gmail.com>
1117 * elf-s390-common.c: Simplify expressions using
1118 bfd_linke_executable, bfd_link_pie and bfd_link_pic.
1119 * elf32-arm.c: Likewise.
1120 * elf32-bfin.c: Likewise.
1121 * elf32-frv.c: Likewise.
1122 * elf32-m68k.c: Likewise.
1123 * elf32-nios2.c: Likewise.
1124 * elf32-ppc.c: Likewise.
1125 * elf32-s390.c: Likewise.
1126 * elf32-sh.c: Likewise.
1127 * elf64-alpha.c: Likewise.
1128 * elf64-ppc.c: Likewise.
1129 * elf64-s390.c: Likewise.
1130 * elflink.c: Likewise.
1132 2015-08-18 Jiong Wang <jiong.wang@arm.com>
1134 * elfnn-aarch64.c (aarch64_reloc_got_type): Delete useless check.
1135 (elfNN_aarch64_relocate_section): Likewise.
1136 (elfNN_aarch64_gc_sweep_hook): Likewise.
1137 (elfNN_aarch64_check_relocs): Likewise.
1139 2015-08-18 H.J. Lu <hongjiu.lu@intel.com>
1142 * elf-bfd.h (elf_link_hash_table): Add dynsym.
1143 * elf32-i386.c (elf_i386_reloc_type_class): Return
1144 reloc_class_ifunc for relocation against STT_GNU_IFUNC symbol.
1145 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise.
1146 * elflink.c (_bfd_elf_link_create_dynamic_sections): Set dynsym.
1147 (bfd_elf_size_dynsym_hash_dynstr): Use dynsym.
1148 (elf_final_link_info): Remove dynsym_sec.
1149 (elf_link_output_extsym): Replace dynsym_sec with dynsym.
1150 (bfd_elf_final_link): Remove reference to dynsym_sec. Replace
1151 dynsym_sec with dynsym.
1153 2015-08-18 H.J. Lu <hongjiu.lu@intel.com>
1155 * bfd/aoutx.h: Replace shared, executable, relocatable and pie
1156 fields with bfd_link_executable, bfd_link_dll,
1157 bfd_link_relocatable, bfd_link_pic and bfd_link_pie.
1158 * bfd/bout.c: Likewise.
1159 * bfd/coff-alpha.c: Likewise.
1160 * bfd/coff-arm.c: Likewise.
1161 * bfd/coff-i386.c: Likewise.
1162 * bfd/coff-i960.c: Likewise.
1163 * bfd/coff-m68k.c: Likewise.
1164 * bfd/coff-mcore.c: Likewise.
1165 * bfd/coff-mips.c: Likewise.
1166 * bfd/coff-ppc.c: Likewise.
1167 * bfd/coff-rs6000.c: Likewise.
1168 * bfd/coff-sh.c: Likewise.
1169 * bfd/coff-tic80.c: Likewise.
1170 * bfd/coff-x86_64.c: Likewise.
1171 * bfd/coff64-rs6000.c: Likewise.
1172 * bfd/coffgen.c: Likewise.
1173 * bfd/cofflink.c: Likewise.
1174 * bfd/ecoff.c: Likewise.
1175 * bfd/ecofflink.c: Likewise.
1176 * bfd/elf-bfd.h: Likewise.
1177 * bfd/elf-eh-frame.c: Likewise.
1178 * bfd/elf-ifunc.c: Likewise.
1179 * bfd/elf-m10200.c: Likewise.
1180 * bfd/elf-m10300.c: Likewise.
1181 * bfd/elf-s390-common.c: Likewise.
1182 * bfd/elf-vxworks.c: Likewise.
1183 * bfd/elf.c: Likewise.
1184 * bfd/elf32-arm.c: Likewise.
1185 * bfd/elf32-avr.c: Likewise.
1186 * bfd/elf32-bfin.c: Likewise.
1187 * bfd/elf32-cr16.c: Likewise.
1188 * bfd/elf32-cr16c.c: Likewise.
1189 * bfd/elf32-cris.c: Likewise.
1190 * bfd/elf32-crx.c: Likewise.
1191 * bfd/elf32-d10v.c: Likewise.
1192 * bfd/elf32-dlx.c: Likewise.
1193 * bfd/elf32-epiphany.c: Likewise.
1194 * bfd/elf32-fr30.c: Likewise.
1195 * bfd/elf32-frv.c: Likewise.
1196 * bfd/elf32-ft32.c: Likewise.
1197 * bfd/elf32-h8300.c: Likewise.
1198 * bfd/elf32-hppa.c: Likewise.
1199 * bfd/elf32-i370.c: Likewise.
1200 * bfd/elf32-i386.c: Likewise.
1201 * bfd/elf32-i860.c: Likewise.
1202 * bfd/elf32-ip2k.c: Likewise.
1203 * bfd/elf32-iq2000.c: Likewise.
1204 * bfd/elf32-lm32.c: Likewise.
1205 * bfd/elf32-m32c.c: Likewise.
1206 * bfd/elf32-m32r.c: Likewise.
1207 * bfd/elf32-m68hc11.c: Likewise.
1208 * bfd/elf32-m68hc1x.c: Likewise.
1209 * bfd/elf32-m68k.c: Likewise.
1210 * bfd/elf32-mcore.c: Likewise.
1211 * bfd/elf32-mep.c: Likewise.
1212 * bfd/elf32-metag.c: Likewise.
1213 * bfd/elf32-microblaze.c: Likewise.
1214 * bfd/elf32-moxie.c: Likewise.
1215 * bfd/elf32-msp430.c: Likewise.
1216 * bfd/elf32-mt.c: Likewise.
1217 * bfd/elf32-nds32.c: Likewise.
1218 * bfd/elf32-nios2.c: Likewise.
1219 * bfd/elf32-or1k.c: Likewise.
1220 * bfd/elf32-ppc.c: Likewise.
1221 * bfd/elf32-rl78.c: Likewise.
1222 * bfd/elf32-rx.c: Likewise.
1223 * bfd/elf32-s390.c: Likewise.
1224 * bfd/elf32-score.c: Likewise.
1225 * bfd/elf32-score7.c: Likewise.
1226 * bfd/elf32-sh-symbian.c: Likewise.
1227 * bfd/elf32-sh.c: Likewise.
1228 * bfd/elf32-sh64.c: Likewise.
1229 * bfd/elf32-spu.c: Likewise.
1230 * bfd/elf32-tic6x.c: Likewise.
1231 * bfd/elf32-tilepro.c: Likewise.
1232 * bfd/elf32-v850.c: Likewise.
1233 * bfd/elf32-vax.c: Likewise.
1234 * bfd/elf32-visium.c: Likewise.
1235 * bfd/elf32-xc16x.c: Likewise.
1236 * bfd/elf32-xstormy16.c: Likewise.
1237 * bfd/elf32-xtensa.c: Likewise.
1238 * bfd/elf64-alpha.c: Likewise.
1239 * bfd/elf64-hppa.c: Likewise.
1240 * bfd/elf64-ia64-vms.c: Likewise.
1241 * bfd/elf64-mmix.c: Likewise.
1242 * bfd/elf64-ppc.c: Likewise.
1243 * bfd/elf64-s390.c: Likewise.
1244 * bfd/elf64-sh64.c: Likewise.
1245 * bfd/elf64-x86-64.c: Likewise.
1246 * bfd/elflink.c: Likewise.
1247 * bfd/elfnn-aarch64.c: Likewise.
1248 * bfd/elfnn-ia64.c: Likewise.
1249 * bfd/elfxx-mips.c: Likewise.
1250 * bfd/elfxx-sparc.c: Likewise.
1251 * bfd/elfxx-tilegx.c: Likewise.
1252 * bfd/i386linux.c: Likewise.
1253 * bfd/linker.c: Likewise.
1254 * bfd/m68klinux.c: Likewise.
1255 * bfd/pdp11.c: Likewise.
1256 * bfd/pe-mips.c: Likewise.
1257 * bfd/peXXigen.c: Likewise.
1258 * bfd/reloc.c: Likewise.
1259 * bfd/reloc16.c: Likewise.
1260 * bfd/sparclinux.c: Likewise.
1261 * bfd/sunos.c: Likewise.
1262 * bfd/vms-alpha.c: Likewise.
1263 * bfd/xcofflink.c: Likewise.
1265 2015-08-18 Alan Modra <amodra@gmail.com>
1268 * Makefile.am: Use $(SED) in place of sed throughout.
1269 * Makefile.in: Regenerate.
1271 2015-08-18 Alan Modra <amodra@gmail.com>
1273 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't redefine .TOC.
1274 if already defined, and set linker_def.
1275 (ppc64_elf_set_toc): Use .TOC. value if defined other than by
1278 2015-08-14 Alan Modra <amodra@gmail.com>
1281 * elf32-or1k.c: Revert 2015-08-11 change.
1283 2015-08-13 H.J. Lu <hongjiu.lu@intel.com>
1286 * elf32-i386.c (elf_i386_size_dynamic_sections): Issue an error
1287 for read-only segment with dynamic IFUNC relocations.
1288 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
1290 2015-08-12 Simon Dardis <simon.dardis@imgtec.com>
1292 * elfxx-mips.c (STUB_MOVE): Change to use 'or' only.
1293 (mips_o32_exec_plt0_entry, mips_n32_exec_plt0_entry,
1294 mips_n64_exec_plt0_entry, micromips_insn32_o32_exec_plt0_entry):
1295 Update to use 'or' instead of 'addu/daddu'.
1296 (_bfd_mips_elf_finish_dynamic_symbol): Update usage of STUB_MOVE.
1297 (move_insns_32): Reorder table.
1299 2015-08-11 H.J. Lu <hongjiu.lu@intel.com>
1301 * elf32-i386.c (elf_i386_relocate_section): Properly skip IFUNC
1302 relocations in debug sections.
1303 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1305 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1307 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Improve warning
1308 message for R_AARCH64_LD64_GOTPAGE_LO15/R_AARCH64_LD32_GOTPAGE_LO14.
1310 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1312 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): New.
1313 (aarch64_can_relax_tls): Use the new IS_AARCH64_TLS_RELAX_RELOC.
1315 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1317 * bfd/elfnn-aarch64.c (aarch64_type_of_stub): New parameter "sym_sec".
1318 Loose the check for symbol from ABS section.
1319 (elfNN_aarch64_size_stubs): Pass sym_sec.
1321 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1324 * elfnn-aarch64.c (aarch64_type_of_stub): Update destination for
1325 calls go through plt stub.
1326 (elfNN_aarch64_final_link_relocate): Adjust code logic for CALL26,
1327 JUMP26 relocation to support inserting veneer for call to plt stub.
1329 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1331 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
1332 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.
1333 (aarch64_reloc_got_type): Likewise.
1334 (elfNN_aarch64_final_link_relocate): Likewise.
1335 (elfNN_aarch64_relocate_section): Likewise.
1336 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1337 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1339 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1341 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12): New entry.
1342 * bfd-in2.h: Regenerate.
1343 * libbfd.h: Regenerate.
1344 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1345 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.
1347 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1349 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
1350 BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC.
1351 (aarch64_reloc_got_type): Likewise.
1352 (elfNN_aarch64_final_link_relocate): Likewise.
1353 (elfNN_aarch64_relocate_section): Likewise.
1354 (elfNN_aarch64_gc_sweep_hook): Likewise.
1355 (elfNN_aarch64_check_relocs): Likewise.
1356 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1357 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1359 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1361 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC): New entry.
1362 * bfd-in2.h: Regenerate.
1363 * libbfd.h: Regenerate.
1364 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1365 BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC.
1367 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1369 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
1370 BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21.
1371 (aarch64_reloc_got_type): Likewise.
1372 (elfNN_aarch64_final_link_relocate): Likewise.
1373 (elfNN_aarch64_relocate_section): Likewise.
1374 (elfNN_aarch64_gc_sweep_hook): Likewise.
1375 (elfNN_aarch64_check_relocs): Likewise.
1376 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1377 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1379 2015-08-11 Jiong Wang <jiong.wang@arm.com>
1381 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21): New entry.
1382 * bfd-in2.h: Regenerate.
1383 * libbfd.h: Regenerate.
1384 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1385 BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21.
1387 2015-08-11 H.J. Lu <hongjiu.lu@intel.com>
1390 * elf32-i386.c (elf_i386_relocate_section): Skip IFUNC
1391 relocations in debug sections.
1392 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1394 2015-08-11 Peter Zotov <whitequark@whitequark.org>
1397 * elf32-or1k.c (R_OR1K_32_PCREL): Set pcrel_offset to TRUE.
1398 (R_OR1K_16_PCREL): Likewise.
1399 (R_OR1K_8_PCREL): Likewise.
1401 2015-08-11 Nick Clifton <nickc@redhat.com>
1404 * coff-sh.c (_bfd_sh_align_load_span): Fix typo when setting
1408 * elf.c (_bfd_elf_setup_sections): Add checks for corrupt section
1410 * peicode.h (pe_ILF_make_a_section): Ensure alignment of the
1411 used_by_bfd pointer.
1412 (pe_ILF_build_a_bfd): Ensure alignment of vars.data pointer.
1414 2015-08-11 H.J. Lu <hongjiu.lu@intel.com>
1416 * elf.c (_bfd_elf_copy_private_bfd_data): Fix a typo.
1418 2015-08-10 H.J. Lu <hongjiu.lu@intel.com>
1420 * elf-bfd.h (elf_symbol_version): New enum.
1421 (elf_link_hash_entry): Replace hidden with versioned.
1422 * elflink.c (_bfd_elf_merge_symbol): Don't look for symbol
1423 version if the symbol is unversioned. Initialize versioned.
1424 (_bfd_elf_add_default_symbol): Don't look for symbol version
1425 if the symbol is unversioned or hidden. Initialize versioned.
1426 (elf_collect_hash_codes): Don't look for symbol version if the
1427 symbol is unversioned.
1428 (elf_collect_gnu_hash_codes): Likewise.
1429 (bfd_elf_gc_mark_dynamic_ref_symbol): Likewise.
1430 (_bfd_elf_link_hash_copy_indirect): Check versioned instead of
1432 (elf_link_output_extsym): Likewise.
1434 2015-08-07 H.J. Lu <hongjiu.lu@intel.com>
1437 * elf.c (_bfd_elf_copy_private_bfd_data): When copying the
1438 sh_link and sh_info fields in stripped section headers, we also
1439 check if the sh_type, sh_flags, sh_addralign and sh_entsize
1440 fields of the output section match the output. Since
1441 --only-keep-debug turns all non-debug sections into SHT_NOBITS
1442 sections, the output SHT_NOBITS type matches any input type.
1444 2015-08-07 H.J. Lu <hongjiu.lu@intel.com>
1447 * elflink.c (_bfd_elf_merge_symbol): Add a parameter to indicate
1448 if the new symbol matches the existing one. The new hidden
1449 versioned symbol matches the existing symbol if they have the
1450 same symbol version. Update the existing symbol only if they
1452 (_bfd_elf_add_default_symbol): Update call to
1453 _bfd_elf_merge_symbol.
1454 (_bfd_elf_link_assign_sym_version): Don't set the hidden field
1456 (elf_link_add_object_symbols): Override a definition only if the
1457 new symbol matches the existing one.
1458 (_bfd_elf_link_hash_copy_indirect): Don't copy any references to
1459 the hidden versioned symbol.
1460 (elf_link_output_extsym): Bind a symbol locally when linking
1461 executable if it is locally defined, hidden versioned, not
1462 referenced by shared library and not exported. Turn on
1463 VERSYM_HIDDEN only if the hidden versioned symbol is defined
1466 2015-08-05 Nick Clifton <nickc@redhat.com>
1468 * elf.c (_bfd_elf_copy_private_bfd_data): Copy the sh_link and
1469 sh_info fields of sections whose type has been changed to
1472 2015-08-04 Yuriy M. Kaminskiy" <yumkam@gmail.com>
1473 Tyler Hicks <tyhicks@canonical.com>
1476 * ihex.c (ihex_scan): Fixes incorrect escape sequence in error message
1477 and stack overflow when char is signed and \200-\376 was in place of hex
1478 digit; also fixes \377 was handled as EOF instead of "incorrect character".
1479 (ihex_read_section): Changed for consistency.
1480 (ihex_bad_byte): Prevent (now impossible to trigger) stack
1481 overflow and incorrect escape sequence handling.
1482 * srec.c (srec_bad_byte): Likewise.
1484 2015-08-03 Hans-Peter Nilsson <hp@axis.com>
1486 * elf32-cris.c (cris_elf_relocate_section)
1487 (elf_cris_finish_dynamic_symbol, cris_elf_check_relocs)
1488 (elf_cris_discard_excess_dso_dynamics): Use SYMBOLIC_BIND, not
1489 just link_info->symbolic, to check if a symbol should be bound
1492 2015-07-30 H.J. Lu <hongjiu.lu@intel.com>
1495 * elflink.c (_bfd_elf_add_default_symbol): Add the default
1496 symbol if not performing a relocatable link.
1497 (elf_link_add_object_symbols): Adjust the default symbol if
1498 not performing a relocatable link.
1500 2015-07-29 H.J. Lu <hongjiu.lu@intel.com>
1502 * elflink.c (elf_link_add_object_symbols): Remove
1503 !info->relocatable check for info->executable. Add
1504 !info->relocatable check for !info->executable.
1505 (elf_link_output_extsym): Remove
1506 !info->relocatable check for info->executable.
1508 2015-07-29 Hans-Peter Nilsson <hp@bitrange.com>
1510 * mmo.c (mmo_write_symbols_and_terminator): Skip symbol-type
1511 assignment loop for bfd plugin objects.
1513 2015-07-28 Alan Modra <amodra@gmail.com>
1515 * elf.c (_bfd_elf_map_sections_to_segments): Do not make a new
1516 segment for loaded sections after nonloaded sections if the
1517 sections are on the same page.
1519 2015-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
1521 * configure.in: Add asprintf and vasprintf to AC_CHECK_DECLS.
1522 * config.in, configure: Regenerate.
1524 2015-07-27 H.J. Lu <hongjiu.lu@intel.com>
1526 * configure: Regenerated.
1528 2015-07-27 Nick Clifton <nickc@redhat.com>
1530 * elf32-msp430.c (uses_large_model): New function.
1531 (msp430_elf_eh_frame_address_size): New function.
1532 (elf_backend_eh_frame_address_size): Define.
1534 2015-07-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
1537 * elfnn-aarch64.c (elf_backend_extern_protected_data): Define.
1539 2015-07-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
1542 * elf32-arm.c (elf_backend_extern_protected_data): Define.
1544 2015-07-25 H.J. Lu <hongjiu.lu@intel.com>
1547 * elflink.c (elf_link_output_extsym): Check symbol version
1548 section check only if not linking executable, the symbol is
1549 referenced by shared library or not locally defined.
1551 2015-07-25 Thomas Preud'homme <thomas.preudhomme@arm.com>
1553 * elf32-arm.c (elf32_arm_final_link_relocate): Use SYMBOLIC_BIND to
1554 check if a symbol should be bound symbolically.
1555 * elf32-hppa.c (elf32_hppa_check_relocs,
1556 elf32_hppa_adjust_dynamic_symbol, elf32_hppa_relocate_section,
1557 elf32_hppa_finish_dynamic_symbol): Likewise.
1558 * elf32-m68k.c (elf_m68k_check_relocs,
1559 elf_m68k_relocate_section): Likewise.
1560 * elf32-nios2.c (nios2_elf32_relocate_section,
1561 nios2_elf32_check_relocs, allocate_dynrelocs): Likewise.
1562 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol,
1563 elf32_tic6x_relocate_section): Likewise.
1565 2015-07-24 Alan Modra <amodra@gmail.com>
1567 * elf.c (_bfd_elf_assign_file_positions_for_non_load): Use .rela
1568 prefix for reloc section corresponding to rela section associated
1569 with renamed debug section.
1571 2015-07-24 Alan Modra <amodra@gmail.com>
1573 * section.c (bfd_get_section_by_name_if): Iterate over entire hash
1576 2015-07-23 Joseph Myers <joseph@codesourcery.com>
1578 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections)
1579 <DT_MIPS_RLD_MAP_REL>: Add target address to host address
1580 difference, not to host pointer.
1582 2015-07-22 Alan Modra <amodra@gmail.com>
1584 * elf64-ppc.c (opd_entry_value): Remove assertion. Instead,
1585 return -1 if symbol referenced is not defined. Tidy.
1587 2015-07-20 Alan Modra <amodra@gmail.com>
1589 * po/SRC-POTFILES.in: Regenerate.
1591 2015-07-17 Jiong Wang <jiong.wang@arm.com>
1593 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Sort alphabetically.
1594 (IS_AARCH64_TLSDESC_RELOC): Sort alphabetically.
1596 2015-07-16 Jiong Wang <jiong.wang@arm.com>
1598 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
1599 BFD_RELOC_AARCH64_TLSLD_ADR_PREL21.
1600 (aarch64_reloc_got_type): Ditto.
1601 (elfNN_aarch64_final_link_relocate): Ditto.
1602 (elfNN_aarch64_relocate_section): Ditto.
1603 (elfNN_aarch64_gc_sweep_hook): Ditto.
1604 (elfNN_aarch64_check_relocs): Ditto.
1605 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
1606 (_bfd_aarch64_elf_resolve_relocation): Ditto.
1608 2015-07-16 Jiong Wang <jiong.wang@arm.com>
1610 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADR_PREL21): New entry.
1611 * bfd-in2.h: Regenerate.
1612 * libbfd.h: Regenerate.
1613 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1614 BFD_RELOC_AARCH64_TLSLD_ADR_PREL21.
1616 2015-07-10 H.J. Lu <hongjiu.lu@intel.com>
1619 * bfd.c (bfd_convert_section_size): New function.
1620 (bfd_convert_section_contents): Likewise.
1621 * bfd-in2.h: Regenerated.
1623 2015-07-09 Catherine Moore <clm@codesourcery.com>
1625 * elflink.c (bfd_elf_size_dynamic_sections): Call to
1626 _bfd_elf_maybe_strip_eh_frame_hdr should be before
1627 bed->elf_backend_size_dynamic_sections.
1629 2015-07-08 Pitchumani Sivanupandi <pitchumani.s@atmel.com>
1631 * elf32-avr.c: Add 32 bit PC relative relocation for AVR target.
1633 2015-07-05 Richard Sandiford <richard.sandiford@arm.com>
1635 * elf64-ppc.c (toc_adjusting_stub_needed): Use the symbol value
1636 plus addend rather than the original st_value when looking up
1637 entries in opd->adjust.
1639 2015-07-03 Kai Tietz <ktietz@redhat.com>
1640 Nick Clifton <nickc@redhat.com>
1643 * coffcode.h (coff_bfd_gc_sections): Define default
1644 to bfd_coff_gc_sections function.
1645 (coff_gc_mark_hook_fn): New type.
1646 * coffgen.c (init_reloc_cookie): Copy and adjust coff
1647 related code about gc-sections from elflink.c to here.
1648 (fini_reloc_cookie): Likewise.
1649 (init_reloc_cookie_rels): Likewise.
1650 (fini_reloc_cookie_rels): Likewise.
1651 (init_reloc_cookie_for_section): Likewise.
1652 (fini_reloc_cookie_for_section): Likewise.
1653 (_bfd_coff_gc_mark_hook): Likewise.
1654 (_bfd_coff_gc_mark_rsec): Likewise.
1655 (_bfd_coff_gc_mark_reloc): Likewise.
1656 (_bfd_coff_gc_mark): Likewise.
1657 (_bfd_coff_gc_mark_extra_sections): Likewise.
1658 (coff_gc_sweep_symbol_info): Likewise.
1659 (coff_gc_sweep_symbol): Likewise.
1660 (gc_sweep_hook_fn): Likewise.
1661 (coff_gc_sweep): Likewise.
1662 (bfd_coff_gc_sections): Likewise.
1663 (_bfd_coff_gc_keep): Likewise.
1664 * libcoff-in.h (coff_reloc_cookie): New struct.
1665 (bfd_coff_gc_sections): New prototype.
1666 * libcoff.h: Regenerate.
1668 2015-07-01 Sandra Loosemore <sandra@codesourcery.com>
1669 Cesar Philippidis <cesar@codesourcery.com>
1671 * bfd-in2.h: Regenerated.
1672 * elf32-nios2.c (elf_nios2_howto_table_rel): Rename to...
1673 (elf_nios2_r1_howto_table_rel): This.
1674 (elf_nios2_r2_howto_table_rel): New.
1676 (lookup_howto): Add ABFD parameter. Adjust to look up in either
1677 the R1 or R2 relocation table, as determined by ABFD.
1678 (nios2_reloc_map): Add R2 relocations.
1679 (nios2_elf32_bfd_reloc_type_lookup): Do lookup using lookup_howto.
1680 Pass it the ABFD parameter.
1681 (nios2_elf32_bfd_reloc_name_lookup): Use ABFD to decide whether to
1682 return an R1 or R2 relocation.
1683 (nios2_elf32_info_to_howto): Do lookup using lookup_howto.
1684 Pass it the ABFD parameter.
1685 (nios2_elf32_do_call26_relocate): Check for alignment on a 4-byte
1687 (nios2_elf32_relocate_section): Adjust call to lookup_howto.
1688 * libbfd.h: Regenerated.
1689 * reloc.c (BFD_RELOC_NIOS2_R2_S12): New.
1690 (BFD_RELOC_NIOS2_R2_I10_1_PCREL): New.
1691 (BFD_RELOC_NIOS2_R2_T1I7_1_PCREL): New.
1692 (BFD_RELOC_NIOS2_R2_T1I7_2): New.
1693 (BFD_RELOC_NIOS2_R2_T2I4): New.
1694 (BFD_RELOC_NIOS2_R2_T2I4_1): New.
1695 (BFD_RELOC_NIOS2_R2_T2I4_2): New.
1696 (BFD_RELOC_NIOS2_R2_X1I7_2): New.
1697 (BFD_RELOC_NIOS2_R2_X2L5): New.
1698 (BFD_RELOC_NIOS2_R2_F1I5_2): New.
1699 (BFD_RELOC_NIOS2_R2_L5I4X1): New.
1700 (BFD_RELOC_NIOS2_R2_T1X1I6): New.
1701 (BFD_RELOC_NIOS2_R2_T1X1I6_2): New.
1703 2015-07-01 Sandra Loosemore <sandra@codesourcery.com>
1704 Cesar Philippidis <cesar@codesourcery.com>
1706 * archures.c (bfd_mach_nios2r1, bfd_mach_nios2r2): New.
1707 * bfd-in2.h: Regenerated.
1708 * cpu-nios2.c (nios2_compatible): New.
1709 (N): Use nios2_compatible instead of bfd_default_compatible.
1710 (NIOS2R1_NEXT, NIOS2R2_NEXT): Define.
1711 (arch_info_struct): New.
1712 (bfd_nios2_arch): Chain to NIOS2R1_NEXT.
1713 * elf32-nios2.c (is_nios2_elf): New.
1714 (nios2_elf32_merge_private_bfd_data): New.
1715 (nios2_elf32_object_p): New.
1716 (bfd_elf32_bfd_merge_private_bfd_data): Define.
1717 (elf_backend_object_p): Define.
1719 2015-07-01 H.J. Lu <hongjiu.lu@intel.com>
1721 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Refactor.
1723 2015-06-30 Nick Clifton <nickc@redhat.com>
1726 * elf-attrs.c (obj_attr_size): Use an unsigned int type for the tag.
1727 (write_obj_attribute): Likewise.
1728 (elf_new_obj_attr): Likewise.
1729 (bfd_elf_get_obj_attr_int): Likewise.
1730 (bfd_elf_add_obj_attr_int): Likewise.
1731 (bfd_elf_add_obj_attr_string): Likewise.
1732 (bfd_elf_add_obj_attr_int_string): Likewise.
1733 (gnu_obj_attrs_arg_type): Likewise.
1734 (_bfd_elf_obj_attrs_arg_type): Likewise.
1735 (_bfd_elf_parse_attributes): Likewise.
1736 (_bfd_elf_merge_unknown_attribute_list): Likewise.
1737 * elf-bfd.h (struct obj_attribute_list): Likewise.
1740 2015-06-28 H.J. Lu <hongjiu.lu@intel.com>
1742 * bfd-in.h (compressed_debug_section_type): Remove
1743 COMPRESS_DEBUG_ZLIB.
1744 * bfd-in2.h : Regenerated.
1746 2015-06-26 Matthew Fortune <matthew.fortune@imgtec.com>
1748 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Use executable
1749 instead of !shared to indicate an application vs shared library.
1750 (_bfd_mips_elf_size_dynamic_sections): Likewise.
1751 (_bfd_mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP_REL.
1752 (_bfd_mips_elf_get_target_dtag): Likewise.
1754 2015-06-25 DJ Delorie <dj@redhat.com>
1756 * elf32-msp430.c (msp430_final_link_relocate): Fix comments. Fix
1757 REL loads to match RELA stores.
1759 2015-06-25 H.J. Lu <hongjiu.lu@intel.com>
1761 * elf.c (_bfd_elf_compute_section_file_positions): Don't
1762 initialize sh_size for .shstrtab here.
1764 2015-06-25 H.J. Lu <hongjiu.lu@intel.com>
1767 * elf-bfd.h (elf_sym_strtab): New.
1768 (elf_link_hash_table): Add strtabcount, strtabsize and
1770 (_bfd_elf_stringtab_init): Removed.
1771 * elf.c (_bfd_elf_stringtab_init): Removed.
1772 (_bfd_elf_compute_section_file_positions): Replace
1773 bfd_strtab_hash/_bfd_elf_stringtab_init/_bfd_stringtab_free/
1774 _bfd_stringtab_size with
1775 elf_strtab_hash/_bfd_elf_strtab_init/_bfd_elf_strtab_free/
1776 _bfd_elf_strtab_size. Use _bfd_elf_strtab_add,
1777 _bfd_elf_strtab_finalize and _bfd_elf_strtab_offset to get
1779 (swap_out_syms): Likewise.
1780 * elflink.c (elf_final_link_info): Replace bfd_strtab_hash
1781 with elf_strtab_hash. Remove symbuf, symbuf_count,
1782 symbuf_size and shndxbuf_size.
1783 (elf_link_flush_output_syms): Removed.
1784 (elf_link_output_sym): Renamed to ...
1785 (elf_link_output_symstrtab): This. Replace _bfd_stringtab_add
1786 with _bfd_elf_strtab_add. Don't flush symbols to the file nor
1788 (elf_link_swap_symbols_out): New.
1789 (elf_link_output_extsym): Replace elf_link_output_sym with
1790 elf_link_output_symstrtab.
1791 (elf_link_input_bfd): Likewise.
1792 (elf_final_link_free): Replace _bfd_stringtab_free with
1793 _bfd_elf_strtab_free. Remove symbuf.
1794 (bfd_elf_final_link): Replace _bfd_elf_stringtab_init with
1795 _bfd_elf_strtab_init. Don't set symbuf, symbuf_count,
1796 symbuf_size nor shndxbuf_size. Initialize strtabsize and
1797 strtab. Initialize symshndxbuf to -1 when number of sections
1798 >= 64K. Replace elf_link_output_sym/elf_link_output_sym with
1799 elf_link_output_symstrtab/elf_link_output_symstrtab. Don't
1800 call elf_link_flush_output_syms. Call _bfd_elf_strtab_finalize
1801 and elf_link_swap_symbols_out. Replace _bfd_stringtab_size
1802 and _bfd_stringtab_emit with _bfd_elf_strtab_size and
1803 _bfd_elf_strtab_emit.
1805 2015-06-24 H.J. Lu <hongjiu.lu@intel.com>
1807 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Silence older
1810 2015-06-24 H.J. Lu <hongjiu.lu@intel.com>
1812 * elf32-i386.c (elf_i386_allocate_dynrelocs): Always allocate
1813 space for the first .plt entry.
1814 (elf_i386_size_dynamic_sections): Always add DT_PLTGOT for .plt
1815 section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
1816 there are PLT relocations.
1817 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Always
1818 allocate space for the first .plt entry.
1819 (elf_x86_64_size_dynamic_sections): Always add DT_PLTGOT for
1820 .plt section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
1821 there are PLT relocations.
1823 2015-06-24 H.J. Lu <hongjiu.lu@intel.com>
1826 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Don't convert
1827 R_X86_64_GOTPCREL to R_X86_64_PC32 if it will cause relocation
1830 2015-06-23 Jiong Wang <jiong.wang@arm.com>
1832 * elfnn-aarch64.c (aarch64_readonly_dynrelocs): New function.
1833 (elfNN_aarch64_size_dynamic_sections): Traverse hash table to check
1834 relocations against read-only sections.
1836 2015-06-18 Nick Clifton <nickc@redhat.com>
1839 * elf32-arm.c (R_ARM_TLS_LE32): Set the special function to NULL.
1841 2015-06-15 Jon Turney <jon.turney@dronecode.org.uk>
1843 * bfd.c: Change struct bfd_build_id to use bfd_size_type.
1844 * bfd-in2.h : Regenerate.
1846 2015-06-16 Alan Modra <amodra@gmail.com>
1848 * elf32-ppc.c (ppc_elf_relocate_section): Correct binary search of
1851 2015-06-10 Jon Turney <jon.turney@dronecode.org.uk>
1853 * elf-bfd.h : Remove struct elf_build_id.
1854 * bfd.c : Add struct bfd_build_id.
1855 * bfd-in2.h: Regenerate.
1856 * elf.c (elfobj_grok_gnu_build_id): Update to use bfd_build_id.
1857 * libpei.h: Add protoype and macros for
1858 bfd_XXi_slurp_codeview_record.
1859 * peXXigen.c (_bfd_XXi_slurp_codeview_record): Make public
1860 * peicode.h (pe_bfd_read_buildid): Add.
1861 (pe_bfd_object_p): Use pe_bfd_read_buildid().
1863 2015-06-15 Renlin Li <renlin.li@arm.com>
1865 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_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_GOTOFF_LO15.
1871 2015-06-15 Alan Modra <amodra@gmail.com>
1873 * cofflink.c (_bfd_coff_generic_relocate_section): Revert
1874 2014-03-26 change. Call _bfd_clear_contents for relocs against
1875 local and global symbols defined in discarded input sections.
1877 2015-06-05 Nick Clifton <nickc@redhat.com>
1879 * elf32-msp430.c (rl78_sym_diff_handler): New function.
1880 (msp430_howto_table): Use the new function for the SYM_DIFF reloc.
1881 (msp430x_howto_table): Likewise.
1883 2015-06-05 Alan Modra <amodra@gmail.com>
1885 * elf64-ppc.c (ppc_elf_relocate_section): Move dynamic text
1886 relocs with insns moved by --ppc476-workaround. Correct
1887 output of REL16 relocs.
1889 2015-06-01 Jiong Wang <jiong.wang@arm.com>
1891 * elfnn-aarch64.c (aarch64_reloc_got_type): Support
1892 BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
1893 (elfNN_aarch64_final_link_relocate): Ditto.
1894 (elfNN_aarch64_gc_swap_hook): Ditto.
1895 (elfNN_aarch64_check_relocs): Ditto.
1896 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
1898 2015-06-01 Jiong Wang <jiong.wang@arm.com>
1900 * reloc.c (BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14): New entry.
1901 * bfd-in2.h: Regenerate.
1902 * libbfd.h: Regenerate.
1903 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1904 BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
1906 2015-06-01 Jiong Wang <jiong.wang@arm.com>
1908 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Set overflow type to
1909 complain_overflow_unsigned for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
1910 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Don't use
1911 PGOFF for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
1913 2015-06-01 Jiong Wang <jiong.wang@arm.com>
1915 * elfnn-aarch64.c (aarch64_reloc_got_type): Support
1916 BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
1917 (elfNN_aarch64_final_link_relocate): Ditto.
1918 (elfNN_aarch64_gc_swap_hook): Ditto.
1919 (elfNN_aarch64_check_relocs): Ditto.
1920 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
1922 2015-06-01 Jiong Wang <jiong.wang@arm.com>
1924 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15): New entry.
1925 * bfd-in2.h: Regenerate.
1926 * libbfd.h: Regenerate.
1927 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1928 BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
1930 2015-05-28 Catherine Moore <clm@codesourcery.com>
1931 Bernd Schmidt <bernds@codesourcery.com>
1932 Paul Brook <paul@codesourcery.com>
1935 * bfd-in2.h: Regenerated.
1936 * elf-bfd.h (DWARF2_EH_HDR, COMPACT_EH_HDR): Define.
1937 (COMPACT_EH_CANT_UNWIND_OPCODE): Define.
1938 (dwarf_eh_frame_hdr_info): Move dwarf-specific fields from
1940 (compact_eh_frame_hdr_info): Declare.
1941 (eh_frame_hdr_info): Redeclare with union for dwarf-specific
1942 fields and compact-eh fields.
1943 (elf_backend_data): Add cant_unwind_opcode and compact_eh_encoding.
1944 (bfd_elf_section_data): Add eh_frame_entry_field.
1945 (elf_section_eh_frame_entry): Define.
1946 (bfd_elf_parse_eh_frame_entries): Declare.
1947 (_bfd_elf_parse_eh_frame_entry): Declare.
1948 (_bfd_elf_end_eh_frame_parsing): Declare.
1949 (_bfd_elf_write_section_eh_frame_entry): Declare.
1950 (_bfd_elf_eh_frame_entry_present): Declare.
1951 (_bfd_elf_section_for_symbol): Declare.
1952 * elf-eh-frame.c (bfd_elf_discard_eh_frame_entry): New function.
1953 (bfd_elf_record_eh_frame_entry): New function.
1954 (_bfd_elf_parse_eh_frame_entry): New function.
1955 (_bfd_elf_parse_eh_frame): Update hdr_info field references.
1956 (cmp_eh_frame_hdr): New function.
1957 (add_eh_frame_hdr_terminator): New function.
1958 (_bfd_elf_end_eh_frame_parsing): New function.
1959 (find_merged_cie): Update hdr_info field references.
1960 (_bfd_elf_discard_section_eh_frame): Likewise.
1961 (_bfd_elf_discard_section_eh_frame_hdr): Add Compact EH support.
1962 (_bfd_elf_eh_frame_entry_present): New function.
1963 (_bfd_elf_maybe_strip_eh_frame_hdr): Add Compact EH support.
1964 (_bfd_elf_write_section_eh_frame_entry): New function.
1965 (_bfd_elf_write_section_eh_frame): Update hdr_info field references.
1966 (_bfd_elf_fixup_eh_frame_hdr): New function.
1967 (write_compact_eh_frame_hdr): New function.
1968 (write_dwarf_eh_frame_hdr): New function.
1969 (_bfd_elf_write_section_eh_frame_hdr): Add Compact EH support.
1970 * elflink.c (_bfd_elf_section_for_symbol): New function.
1971 (elf_section_ignore_discarded_relocs): Add Compact EH support.
1972 (elf_link_input_bfd): Likewise.
1973 (bfd_elf_final_link): Likewise.
1974 (_bfd_elf_gc_mark): Likewise.
1975 (bfd_elf_parse_eh_frame_entries): New function.
1976 (bfd_elf_gc_sections): Add Compact EH support.
1977 (bfd_elf_discard_info): Likewise.
1978 * elfxx-mips.c: Include dwarf2.h.
1979 (_bfd_mips_elf_compact_eh_encoding): New function.
1980 (_bfd_mips_elf_cant_unwind_opcode): New function.
1981 * elfxx-mips.h (_bfd_mips_elf_compact_eh_encoding): Declare.
1982 (_bfd_mips_elf_cant_unwind_opcode): Declare.
1983 (elf_backend_compact_eh_encoding): Define.
1984 (elf_backend_cant_unwind_opcode): Define.
1985 * elfxx-target.h (elf_backend_compact_eh_encoding): Provide default.
1986 (elf_backend_cant_unwind_opcode): Provide default.
1987 (elf_backend_data elfNN_bed): Add elf_backend_compact_eh_encoding and
1988 elf_backend_cant_unwind_opcode.
1989 * section.c (SEC_INFO_TYPE_EH_FRAME_ENTRY): Add definition.
1991 2015-05-27 H.J. Lu <hongjiu.lu@intel.com>
1994 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
1995 for now binding only if pointer equality isn't needed.
1996 (elf_i386_allocate_dynrelocs): Use .plt.got section for now
1997 binding only if pointer equality isn't needed.
1998 * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
1999 section for now binding only if pointer equality isn't needed.
2000 (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
2001 binding only if pointer equality isn't needed.
2003 2015-05-26 H.J. Lu <hongjiu.lu@intel.com>
2006 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip extra relocations
2007 in .rel.plt/.rela.plt.
2008 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
2010 2015-05-19 Jiong Wang <jiong.wang@arm.com>
2012 * elfnn-aarch64.c (aarch64_tls_transition_without_check): Sort
2013 relocation case labels alphabetically.
2014 (elfNN_aarch64_final_link_relocate): Ditto.
2015 (elfNN_aarch64_tls_relax): Ditto.
2016 (elfNN_aarch64_relocate_section): Ditto.
2017 (elfNN_aarch64_gc_sweep_hook): Ditto.
2018 (elfNN_aarch64_check_relocs): Ditto.
2019 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
2020 (_bfd_aarch64_elf_resolve_relocation): Ditto.
2022 2015-05-18 Jiong Wang <jiong.wang@arm.com>
2024 * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Rewrite
2027 2015-05-16 H.J. Lu <hongjiu.lu@intel.com>
2029 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
2031 (elf_i386_allocate_dynrelocs): Use .plt.got section for now
2033 * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
2034 section for now binding.
2035 (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
2038 2015-05-14 H.J. Lu <hongjiu.lu@intel.com>
2040 * bfd.c (bfd_update_compression_header): Also write the zlib
2041 header if the SHF_COMPRESSED bit cleared..
2042 (bfd_check_compression_header): Return the uncompressed size.
2043 * compress.c (decompress_contents): Don't skip the zlib header.
2044 (bfd_compress_section_contents): Properly handle ELFCOMPRESS_ZLIB,
2045 which doesn't have the zlib header.
2046 (bfd_init_section_decompress_status): Likewise.
2047 (bfd_get_full_section_contents): Updated.
2048 (bfd_is_section_compressed): Likewise.
2049 (bfd_is_section_compressed_with_header): Return the uncompressed
2051 * elf.c (_bfd_elf_make_section_from_shdr): Updated.
2052 * bfd-in2.h: Regenerated.
2054 2015-05-14 Jiong Wang <jiong.wang@arm.com>
2056 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Remove overflow
2059 2015-05-14 Max Filippov <jcmvbkbc@gmail.com>
2061 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Treat PLT reference
2062 as GOT reference when plt.refcount is not positive.
2064 2015-05-12 H.J. Lu <hongjiu.lu@intel.com>
2066 * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate space
2067 for the first .plt entry only if needed.
2068 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2070 2015-05-11 H.J. Lu <hongjiu.lu@intel.com>
2072 * Makefile.am (ALL_MACHINES): Add cpu-iamcu.lo.
2073 (ALL_MACHINES_CFILES): Likewise.
2074 * archures.c (bfd_mach_iamcu): New.
2075 (bfd_mach_i386_iamcu): Likewise.
2076 (bfd_mach_i386_iamcu_intel_syntax): Likewise.
2077 (bfd_iamcu_arch): Likewise.
2078 (bfd_archures_list): Add &bfd_iamcu_arch.
2079 * config.bfd (targ_selvecs): Add iamcu_elf32_vec to
2081 (targ_archs): Add bfd_iamcu_arch if needed.
2082 * configure.ac: Support iamcu_elf32_vec.
2083 * cpu-iamcu.c: New file.
2084 * elf32-i386.c (elf32_iamcu_elf_object_p): New function.
2085 Add support for iamcu_elf32_vec and elf32_iamcu_bed.
2086 * targets.c (iamcu_elf32_vec): New.
2087 (_bfd_target_vector): Add iamcu_elf32_vec.
2088 * Makefile.in: Regenerated.
2089 * bfd-in2.h: Likewise.
2090 * configure: Likewise.
2092 2015-05-11 H.J. Lu <hongjiu.lu@intel.com>
2094 * elfcode.h (elf_object_p): Replace EM_486 with EM_IAMCU.
2096 2015-05-10 H.J. Lu <hongjiu.lu@intel.com>
2098 * elf32-i386.c (elf_i386_convert_mov_to_lea): Replace input_bfd
2099 and output_bfd with abfd.
2100 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
2102 2015-05-06 Toni Spets <toni.spets@iki.fi>
2105 * peXXigen.c (rsrc_process_section): Skip discarded resource
2108 2015-05-01 H.J. Lu <hongjiu.lu@intel.com>
2110 * config.bfd: Support i[3-7]86-*-elf*.
2112 2015-04-30 H.J. Lu <hongjiu.lu@intel.com>
2114 * elf32-i386.c (elf_backend_post_process_headers): Undef for
2117 2015-04-30 Nick Clifton <nickc@redhat.com>
2120 * elf32-mep.c (MEPREL): Use bfd_elf_generic_reloc instead of
2122 (mep_reloc): Delete unused function.
2124 2015-04-29 Nick Clifton <nickc@redhat.com>
2127 * coff-i386.c (coff_i386_rtype_to_howto): Allow absolute PCRLONG
2130 2015-04-27 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2132 * elf-s390-common.c (elf_s390_merge_obj_attributes): New function.
2133 * elf32-s390.c (elf32_s390_merge_private_bfd_data): Call
2134 elf_s390_merge_obj_attributes.
2135 * elf64-s390.c (elf64_s390_merge_private_bfd_data): New function.
2137 2015-04-24 Jiong Wang <jiong.wang@arm.com>
2140 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic): Count local symbol for
2141 GOT_NORMAL for both sgot/srelgot section.
2142 (elfNN_aarch64_final_link_relocate): Relocate against GOT entry address
2143 and generate necessary runtime relocation for GOT entry.
2145 2015-04-24 H.J. Lu <hongjiu.lu@intel.com>
2148 * archive.c (_bfd_get_elt_at_filepos): Copy is_linker_input.
2150 2015-04-24 Jiong Wang <jiong.wang@arm.com>
2152 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Reject
2153 PC-relative relocation for external symbol.
2155 2015-04-24 Nick Clifton <nickc@redhat.com>
2158 * compress.c (decompress_contents): Zero initialse the z_stream
2161 2015-04-24 Nick Clifton <nickc@redhat.com>
2163 * elf.c (_bfd_elf_is_local_label_name): Extend test for assembler
2164 local labels to include local labels with a numeric suffix and
2167 2015-04-24 H.J. Lu <hongjiu.lu@intel.com>
2170 * section.c (SEC_MEP_VLIW): New.
2171 * bfd-in2.h: Regenerated.
2173 2015-04-23 H.J. Lu <hongjiu.lu@intel.com>
2176 * compress.c (bfd_compress_section_contents): Remove the
2177 write_compress argument.
2178 (bfd_init_section_compress_status): Updated.
2179 (bfd_compress_section): Likewise.
2180 * elf.c (_bfd_elf_set_reloc_sh_name): New.
2181 (_bfd_elf_init_reloc_shdr): Add delay_st_name_p. Set sh_name
2182 to (unsigned int) -1 if delay_st_name_p is TRUE. Use
2183 _bfd_elf_set_reloc_sh_name.
2184 (elf_fake_sections): Don't rename DWARF debug section for
2185 linker output if it will be compressed. Instead, set
2186 delay_st_name_p to TRUE and pass it to _bfd_elf_init_reloc_shdr.
2187 (assign_section_numbers): Call _bfd_elf_strtab_addref only if
2188 sh_name != (unsigned int) -1. Don't finalize nor assign
2189 shstrtab section here. Delay setting output section names to
2190 _bfd_elf_write_object_contents.
2191 (_bfd_elf_compute_section_file_positions): Update comments on
2192 sh_offset for shstrtab section.
2193 (assign_file_positions_for_non_load_sections): Set sh_offset to
2194 -1 for shstrtab section.
2195 (assign_file_positions_except_relocs): Likewise.
2196 (_bfd_elf_assign_file_positions_for_non_load): Set up sh_name
2197 when compressing DWARF debug sections. Place shstrtab section
2198 after DWARF debug sections have been compressed.
2199 (_bfd_elf_write_object_contents): Setting sh_name for output
2202 2015-04-23 H.J. Lu <hongjiu.lu@intel.com>
2205 * bfd.c (bfd): Add is_linker_input.
2206 * elf.c (convert_debug_to_zdebug): New.
2207 (convert_zdebug_to_debug): Likewise.
2208 (_bfd_elf_make_section_from_shdr): Don't convert .debug_* to
2209 .zdebug_* here. Use convert_zdebug_to_debug. Set SEC_ELF_RENAME.
2210 (_bfd_elf_init_reloc_shdr): Pass a pointer to section name
2211 instead of a pointer to section.
2212 (elf_fake_sections): Rename the section name if SEC_ELF_RENAME
2214 * section.c (SEC_ELF_RENAME): New.
2215 * bfd-in2.h: Regenerated.
2217 2015-04-23 Alan Modra <amodra@gmail.com>
2219 * elf64-ppc.c (TOC_BASE_ALIGN): Define.
2220 (ppc64_elf_next_toc_section): Align multi-got toc base.
2221 (ppc64_elf_set_toc): Likewise initial toc base and .TOC. symbol.
2223 2015-04-22 H.J. Lu <hongjiu.lu@intel.com>
2226 * elf32-i386.c (elf_i386_link_hash_entry): Add gotoff_ref.
2227 (elf_i386_link_hash_newfunc): Initialize gotoff_ref to 0.
2228 (elf_i386_create_dynamic_sections): Always allow copy relocs for
2229 building executables.
2230 (elf_i386_copy_indirect_symbol): Also copy gotoff_ref.
2231 (elf_i386_check_relocs): Set gotoff_ref for R_386_GOTOFF.
2232 (elf_i386_adjust_dynamic_symbol): Also allocate copy relocs for
2233 PIE and R_386_GOTOFF.
2234 (elf_i386_relocate_section): Allow R_386_GOTOFF in executable.
2236 2015-04-20 H.J. Lu <hongjiu.lu@intel.com>
2238 * elf.c (assign_section_numbers): Always set up sh_name.
2240 2015-04-20 H.J. Lu <hongjiu.lu@intel.com>
2242 * elf.c (assign_file_positions_for_non_load_sections): Iterate
2243 sections by pointer.
2244 (_bfd_elf_assign_file_positions_for_non_load): Likewise.
2246 2015-04-14 H.J. Lu <hongjiu.lu@intel.com>
2248 * bfd-in.h (compressed_debug_section_type): New.
2249 * compress.c (bfd_compress_section_contents): Add an argument
2250 for linker write compression and always generate .zdebug_*
2251 section when linking.
2252 (bfd_init_section_compress_status): Pass FALSE to
2253 bfd_compress_section_contents.
2254 (bfd_compress_section): New function.
2255 * elf.c (elf_fake_sections): For linking, set SEC_ELF_COMPRESS
2256 on DWARF debug sections if COMPRESS_DEBUG is set and rename
2257 section if COMPRESS_DEBUG_GABI_ZLIB isn't set.
2258 (assign_file_positions_for_non_load_sections): Set sh_offset
2259 to -1 if SEC_ELF_COMPRESS is set.
2260 (assign_file_positions_except_relocs): Likwise.
2261 (_bfd_elf_assign_file_positions_for_relocs): Renamed to ...
2262 (_bfd_elf_assign_file_positions_for_non_load): This. Change
2263 return time to bfd_boolean. Compress the section if
2264 SEC_ELF_COMPRESS is set.
2265 (_bfd_elf_write_object_contents): Updated.
2266 (_bfd_elf_set_section_contents): Write section contents to
2267 the buffer if SEC_ELF_COMPRESS is set.
2268 * merge.c: Include "elf-bfd.h".
2269 (sec_merge_emit): Add arguments for contents and offset. Write
2270 to contents with offset if contents isn't NULL.
2271 (_bfd_write_merged_section): Write section contents to the
2272 buffer if SEC_ELF_COMPRESS is set. Pass contents and
2273 output_offset to sec_merge_emit.
2274 * elflink.c (bfd_elf_final_link): Allocate the buffer for
2275 output section contents if SEC_ELF_COMPRESS is set.
2276 * section.c (SEC_ELF_COMPRESS): New.
2277 * bfd-in2.h: Regenerated.
2279 2015-04-15 Alan Modra <amodra@gmail.com>
2281 * elf32-rl78.c (rl78_elf_relocate_section): Typo fix.
2283 2015-04-14 Nick Clifton <nickc@redhat.com>
2285 * elf32-rl78.c (RL78_OP_REL): New macro.
2286 (rl78_elf_howto_table): Use it for complex relocs.
2287 (get_symbol_value): Handle the cases when the info or status
2289 (get_romstart): Cache the status returned by get_symbol_value.
2290 (get_ramstart): Likewise.
2291 (RL78_STACK_PUSH): Generate an error message if the stack
2293 (RL78_STACK_POP): Likewise for underflows.
2294 (rl78_compute_complex_reloc): New function. Contains the basic
2295 processing code for all RL78 complex relocs.
2296 (rl78_special_reloc): New function. Provides special reloc
2297 handling for complex relocs.
2298 (rl78_elf_relocate_section): Use rl78_compute_complex_reloc.
2299 (rl78_offset_for_reloc): Likewise.
2301 2015-04-14 H.J. Lu <hongjiu.lu@intel.com>
2304 * elflink.c (_bfd_elf_adjust_dynamic_copy): Check
2305 info->extern_protected_data when warning copy relocs against
2307 (_bfd_elf_symbol_refs_local_p): Check info->extern_protected_data
2308 when checking protected non-function symbols.
2310 2015-04-13 John Baldwin <jhb@FreeBSD.org>
2312 * elf.c (elfcore_grok_note): Recognize NT_X86_XSTATE on
2314 (elfcore_write_xstatereg): Use correct note name on FreeBSD.
2316 2015-04-13 H.J. Lu <hongjiu.lu@intel.com>
2319 * elflink.c (elf_link_is_defined_archive_symbol): Return FALSE
2320 if the object has been claimed by plugin.
2322 2015-04-11 H.J. Lu <hongjiu.lu@intel.com>
2324 * elf32-i386.c (elf_i386_relocate_section): Replace SYMBOLIC_BIND
2325 with SYMBOL_REFERENCES_LOCAL when checking R_386_GOTOFF against
2326 protected data symbol when building shared library.
2327 * elf64-x86-64.c (elf_x86_64_relocate_section): Check
2328 R_X86_64_GOTOFF64 against undefined symbol and replace
2329 SYMBOLIC_BIND with SYMBOL_REFERENCES_LOCAL when checking
2330 R_X86_64_GOTOFF64 against protected data symbol when building
2333 2015-04-10 H.J. Lu <hongjiu.lu@intel.com>
2336 * elf32-i386.c (elf_i386_relocate_section): Also check R_386_GOTOFF
2337 against protected data symbol when building shared library.
2338 * elf64-x86-64.c (elf_x86_64_relocate_section): Also check
2339 R_X86_64_GOTOFF64 against protected data symbol when building
2342 2015-04-10 H.J. Lu <hongjiu.lu@intel.com>
2346 * elf-bfd.h (elf_backend_data): Add extern_protected_data.
2347 * elf32-i386.c (elf_backend_extern_protected_data): New.
2349 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
2350 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
2351 copy relocs against protected symbols if extern_protected_data
2353 (_bfd_elf_symbol_refs_local_p): Don't return true on protected
2354 non-function symbols if extern_protected_data is true.
2355 * elfxx-target.h (elf_backend_extern_protected_data): New.
2357 (elfNN_bed): Initialize extern_protected_data with
2358 elf_backend_extern_protected_data.
2360 2015-04-10 H.J. Lu <hongjiu.lu@intel.com>
2362 * compress.c (bfd_compress_section_contents): Replace bfd_malloc
2363 and free with bfd_alloc and bfd_release on compressed buffer.
2364 Release buffer if compressed section isn't smaller.
2366 2015-04-10 Alan Modra <amodra@gmail.com>
2369 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't report an error
2370 on adding a protected visibility variable to .dynbss.
2372 2015-04-10 Alan Modra <amodra@gmail.com>
2374 Revert 2015-03-05 H.J. Lu <hongjiu.lu@intel.com>
2377 * elf-bfd.h (elf_backend_data): Delete extern_protected_data.
2378 * elf32-i386.c (elf_backend_extern_protected_data): Delete.
2379 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
2380 * elflink.c (_bfd_elf_adjust_dynamic_copy): Remove
2381 extern_protected_data test.
2382 (_bfd_elf_symbol_refs_local_p): Likewise.
2383 * elfxx-target.h (elf_backend_extern_protected_data): Delete.
2384 (elfNN_bed): Delete elf_backend_extern_protected_data init.
2386 2015-04-09 H.J. Lu <hongjiu.lu@intel.com>
2388 * compress.c (bfd_compress_section_contents): Update comments.
2389 (bfd_init_section_decompress_status): Likewise.
2390 (bfd_init_section_compress_status): Likewise.
2392 2015-04-09 H.J. Lu <hongjiu.lu@intel.com>
2394 * elfxx-target.h (TARGET_BIG_SYM): Add BFD_COMPRESS_GABI to
2396 (TARGET_LITTLE_SYM): Likewise.
2398 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
2400 * elf32-xtensa.c (splay-tree.h): include header.
2401 (text_action_struct): drop next pointer.
2402 (text_action_list_struct): drop head pointer, add count and
2404 (find_fill_action): instead of linear search in text_action_list
2406 (text_action_compare, action_first, action_next): new functions.
2407 (text_action_add, text_action_add_literal): instead of linear
2408 search and insertion insert new node into the tree.
2409 (removed_by_actions): pass additional parameter: action_list,
2410 use it to traverse the tree.
2411 (offset_with_removed_text): pass additional action_list parameter
2412 to removed_by_actions.
2413 (map_action_fn_context): new typedef.
2414 (map_action_fn_context_struct): new structure.
2415 (map_action_fn): new function.
2416 (map_removal_by_action): use splay_tree_foreach to build map.
2417 (find_insn_action): replace linear search in text_action_list
2418 with series of splay_tree_lookups.
2419 (print_action, print_action_list_fn): new functions.
2420 (print_action_list): use splay_tree_foreach.
2421 (init_xtensa_relax_info): drop action_list.head initialization.
2422 Initialize the tree.
2423 (compute_text_actions): use non-zero action_list_count instead of
2424 non-NULL action list.
2425 (xlate_map_context): new typedef.
2426 (xlate_map_context_struct): new structure.
2427 (xlate_map_fn): new function.
2428 (build_xlate_map): use splay_tree_foreach to build map.
2429 (action_remove_bytes_fn): new function.
2430 (relax_section): use zero action_list_count instead of NULL
2431 action list. Use splay_tree_foreach to count final section size.
2432 Drop unused variable 'removed'.
2434 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
2436 * elf32-xtensa.c (removed_literal_map_entry): new typedef.
2437 (removed_literal_map_entry_struct): new structure.
2438 (removed_literal_list_struct): add new fields: n_map and map.
2439 (map_removed_literal, removed_literal_compare): new functions.
2440 (find_removed_literal): build index array for literals ordered
2441 by VMA, use binary search to find removed literal.
2443 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
2445 * elf32-xtensa.c (removal_by_action_entry_struct,
2446 removal_by_action_map_struct): new structures.
2447 (removal_by_action_entry, removal_by_action_map): new typedefs.
2448 (text_action_list_struct): add new field: map.
2449 (map_removal_by_action, removed_by_actions_map,
2450 offset_with_removed_text_map): new functions.
2451 (relax_section): replace offset_with_removed_text with
2452 offset_with_removed_text_map.
2453 (translate_reloc, relax_property_section, relax_section_symbols):
2454 replace removed_by_actions with removed_by_actions_map.
2456 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
2458 * elf32-xtensa.c (reloc_range_list, reloc_range_list_entry,
2459 reloc_range): new typedef.
2460 (reloc_range_list_struct, reloc_range_list_entry_struct,
2461 reloc_range_struct): new structures.
2462 (reloc_range_compare, build_reloc_ranges,
2463 reloc_range_list_append, reloc_range_list_remove,
2464 reloc_range_list_update_range, free_reloc_range_list): new
2466 (compute_text_actions): precompute relocation opcodes before the
2467 loop. Add relevant_relocs variable, initialize it before the
2468 loop, pass it to the check_section_ebb_pcrels_fit.
2469 (check_section_ebb_pcrels_fit): add new parameter:
2470 relevant_relocs. Update address range in the relevant_relocs if
2471 it's non-NULL and iterate only over relevant relocations.
2473 2015-04-09 Nick Clifton <nickc@redhat.com>
2475 * elf32-rx.c (describe_flags): Report the settings of the string
2477 (rx_elf_merge_private_bfd_data): Handle merging of the string insn
2480 2015-04-08 H.J. Lu <hongjiu.lu@intel.com>
2482 * compress.c (bfd_compress_section_contents): Work around a GCC
2483 uninitialized warning bug fixed in GCC 4.7.
2485 2015-04-08 H.J. Lu <hongjiu.lu@intel.com>
2487 * archive.c (_bfd_get_elt_at_filepos): Also copy BFD_COMPRESS_GABI
2489 * bfd.c (bfd::flags): Increase size to 18 bits.
2490 (BFD_COMPRESS_GABI): New.
2491 (BFD_FLAGS_SAVED): Add BFD_COMPRESS_GABI.
2492 (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
2493 (bfd_update_compression_header): New fuction.
2494 (bfd_check_compression_header): Likewise.
2495 (bfd_get_compression_header_size): Likewise.
2496 (bfd_is_section_compressed_with_header): Likewise.
2497 * compress.c (MAX_COMPRESSION_HEADER_SIZE): New.
2498 (bfd_compress_section_contents): Return the uncompressed size if
2499 the full section contents is compressed successfully. Support
2500 converting from/to .zdebug* sections.
2501 (bfd_get_full_section_contents): Call
2502 bfd_get_compression_header_size to get compression header size.
2503 (bfd_is_section_compressed): Renamed to ...
2504 (bfd_is_section_compressed_with_header): This. Add a pointer
2505 argument to return compression header size.
2506 (bfd_is_section_compressed): Use it.
2507 (bfd_init_section_decompress_status): Call
2508 bfd_get_compression_header_size to get compression header size.
2509 Return FALSE if uncompressed section size is 0.
2510 * elf.c (_bfd_elf_make_section_from_shdr): Support converting
2511 from/to .zdebug* sections.
2512 * bfd-in2.h: Regenerated.
2514 2015-04-07 Alan Modra <amodra@gmail.com>
2516 * elf.c (_bfd_elf_get_reloc_section): Allow for .got.plt being
2517 mapped to output .got section.
2519 2015-04-07 Alan Modra <amodra@gmail.com>
2521 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Add has_addr16_ha
2522 and has_addr16_lo. Make has_sda_refs a bitfield.
2523 (ppc_elf_check_relocs): Set new flags.
2524 (ppc_elf_link_hash_table_create): Update default_params.
2525 (ppc_elf_adjust_dynamic_symbol): Clear protected_def in cases
2526 where we won't be making .dynbss entries or editing code. Set
2527 params->pic_fixup when we'll edit code for protected var access.
2528 (allocate_dynrelocs): Allocate got entry for edited code and
2530 (struct ppc_elf_relax_info): Add picfixup_size.
2531 (ppc_elf_relax_section): Rename struct one_fixup to struct
2532 one_branch_fixup. Rename fixups to branch_fixups. Size space for
2534 (ppc_elf_relocate_section): Edit non-PIC accessing protected
2535 visibility variables to PIC. Don't emit dyn_relocs for code
2537 * elf32-ppc.h (struct ppc_elf_params): Add pic_fixup.
2539 2015-04-07 Nick Clifton <nickc@redhat.com>
2541 * elf.c (_bfd_elf_is_local_label_name): Treat assembler generated
2542 local labels as local.
2544 2015-04-06 H.J. Lu <hongjiu.lu@intel.com>
2546 * compress.c (get_uncompressed_size): Removed.
2547 (bfd_compress_section_contents): Use bfd_putb64 to write
2548 uncompressed section size.
2549 (bfd_init_section_decompress_status): Replace
2550 get_uncompressed_size with bfd_getb64.
2552 2015-04-04 H.J. Lu <hongjiu.lu@intel.com>
2554 * elf.c (_bfd_elf_init_private_section_data): Also preserve the
2555 SHF_COMPRESSED bit if not decompress.
2557 2015-04-04 H.J. Lu <hongjiu.lu@intel.com>
2559 * compress.c (get_uncompressed_size): New. Extracted from ...
2560 (bfd_init_section_decompress_status): This. Use it.
2562 2015-04-02 Andrew Turner <andrew@freebsd.org>
2564 * config.bfd: Add aarch64-*-freebsd* target triple.
2566 2015-04-02 H.J. Lu <hongjiu.lu@intel.com>
2568 * configure: Regenerated.
2570 2015-04-01 Tejas Belagod <tejas.belagod@arm.com>
2571 Marcus Shawcroft <marcus.shawcroft@arm.com>
2572 Jiong Wang <jiong.wang@arm.com>
2574 * bfd-in.h (bfd_elf64_aarch64_set_options)
2575 (bfd_elf32_aarch64_set_options): Add parameter.
2576 * bfd-in2.h: Regenerated.
2577 * elfnn-aarch64.c (aarch64_erratum_843419_stub)
2578 (_bfd_aarch64_adrp_p, _bfd_aarch64_erratum_843419_sequence_p)
2579 (_bfd_aarch64_erratum_843419_stub_name)
2580 (_bfd_aarch64_erratum_843419_fixup)
2581 (_bfd_aarch64_erratum_843419_scan)
2582 (_bfd_aarch64_erratum_843419_branch_to_stub)
2583 (_bfd_aarch64_erratum_843419_p): Define.
2584 (enum elf_aarch64_stub_type): Define
2585 aarch64_stub_erratum_843419_veneer.
2586 (struct elf_aarch64_stub_hash_entry): Define adrp_offset.
2587 (struct elf_aarch64_link_hash_table): Define fix_erratum_843419
2588 and fix_erratum_843419_adr.
2589 (stub_hash_newfunc): Initialize adrp_offset;
2590 (_bfd_aarch64_add_stub_entry_after): Define.
2591 (aarch64_map_one_stub, aarch64_build_one_stub)
2592 (aarch64_size_one_stub): Handle
2593 aarch64_stub_erratum_843419_veneer.
2594 (_bfd_aarch64_resize_stubs): Round stub section size.
2595 (elfNN_aarch64_size_stubs): Add scan for 843419.
2596 (bfd_elfNN_aarch64_set_options): Add parameter. Initialize
2597 fix_erratum_843419 and fix_erratum_843419_adr.
2598 (struct erratum_835769_branch_to_stub_data): Add info.
2599 (elfNN_aarch64_write_section): Initialise info. Handle 843419.
2600 (elfNN_aarch64_size_dynamic_sections): Handle 843419.
2601 * elfxx-aarch64.c (_bfd_aarch64_decode_adrp_imm)
2602 (_bfd_aarch64_sign_extend): Define.
2603 (reencode_adr_imm): Remove static. Rename to:
2604 (_bfd_aarch64_reencode_adr_imm): Define.
2605 (_bfd_aarch64_elf_put_addend): Call _bfd_aarch64_reencode_adr_imm.
2606 * elfxx-aarch64.h (AARCH64_ADR_OP, AARCH64_ADRP_OP)
2607 (AARCH64_ADRP_OP_MASK, _bfd_aarch64_sign_extend)
2608 (_bfd_aarch64_decode_adrp_imm, _bfd_aarch64_reencode_adr_imm):
2611 2015-04-01 H.J. Lu <hongjiu.lu@intel.com>
2613 * configure: Regenerated.
2615 2015-03-31 Ed Schouten <ed@nuxi.nl>
2617 * config.bfd (targ_defvec): Set to x86_64_elf64_cloudabi_vec
2618 for x86_64-*-cloudabi*.
2619 * configure.ac: Handle x86_64_elf64_cloudabi_vec.
2620 * configure: Regenerated.
2621 * elf64-x86-64.c (TARGET_LITTLE_SYM): Support x86_64-*-cloudabi*.
2622 (TARGET_LITTLE_NAME): Likewise.
2623 (ELF_OSABI): Likewise.
2624 (elf64_bed): Likewise.
2625 * targets.c (x86_64_elf64_cloudabi_vec): New.
2626 (_bfd_target_vector): Add x86_64_elf64_cloudabi_vec.
2628 2015-03-31 H.J. Lu <hongjiu.lu@intel.com>
2630 * configure.ac: Revert the AM_ZLIB change.
2631 * Makefile.in: Regenerated.
2632 * aclocal.m4: Likewise.
2633 * configure: Likewise.
2634 * doc/Makefile.in: Likewise.
2636 2015-03-30 H.J. Lu <hongjiu.lu@intel.com>
2639 * elf-bfd.h (elf_backend_data): Add get_reloc_section.
2640 (_bfd_elf_get_reloc_section): New.
2641 * elf.c (_bfd_elf_get_reloc_section): Likewise.
2642 (assign_section_numbers): Call get_reloc_section to look up the
2643 section the relocs apply.
2644 * elfxx-target.h (elf_backend_get_reloc_section): Likewise.
2645 (elfNN_bed): Initialize get_reloc_section with
2646 elf_backend_get_reloc_section.
2648 2015-03-29 H.J. Lu <hongjiu.lu@intel.com>
2650 * Makefile.am (ZLIB): New.
2651 (ZLIBINC): Likewise.
2652 (AM_CFLAGS): Add $(ZLIBINC).
2653 (libbfd_la_LIBADD): Add $(ZLIB).
2654 * compress.c: Don't check HAVE_ZLIB_H to include <zlib.h>.
2655 (decompress_contents): Don't check HAVE_ZLIB_H.
2656 (bfd_compress_section_contents): Likewise.
2657 (bfd_get_full_section_contents): Likewise.
2658 (bfd_init_section_decompress_status): Likewise.
2659 (bfd_init_section_compress_status): Likewise.
2660 * configure.ac (AM_ZLIB): Removed.
2661 (zlibdir): New. AC_SUBST.
2662 (zlibinc): Likewise.
2663 Add --with-system-zlib.
2664 * Makefile.in: Regenerated.
2665 * acinclude.m4: Likewise.
2666 * config.in: Likewise.
2667 * configure: Likewise.
2668 * doc/Makefile.in: Likewise.
2670 2015-03-27 Alan Modra <amodra@gmail.com>
2674 * elflink.c (elf_merge_st_other): Add "sec" parameter. Don't set
2675 protected_def when symbol section is read-only. Adjust all calls.
2676 * elf-bfd.h (struct elf_link_hash_entry): Update protected_def comment.
2678 2015-03-26 Tejas Belagod <tejas.belagod@arm.com>
2680 * elfnn-aarch64.c (aarch64_build_one_stub): Replace the call to generic
2681 _bfd_final_link_relocate with aarch64_relocate.
2683 2015-03-26 H.J. Lu <hongjiu.lu@intel.com>
2686 * elflink.c (elf_gc_sweep): Skip if relocation is incompatible.
2687 (bfd_elf_gc_sections): Likewise.
2689 2015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
2691 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Adjust stub section
2692 size for initial branch.
2693 (elfNN_aarch64_build_stubs): Write initial branch.
2694 _bfd_aarch64_decode_(elfNN_aarch64_output_arch_local_syms): Write
2695 mapping symbol on initial branch.
2697 2015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
2699 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_scan):
2700 Update erratum count.
2702 2015-03-25 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2704 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't break on
2705 first matching debug section.
2707 2015-03-24 H.J. Lu <hongjiu.lu@intel.com>
2710 * compress.c (bfd_compress_section_contents): Don't write the
2711 zlib header and set contents as well as compress_status if
2712 compression didn't make the section smaller.
2713 (bfd_init_section_compress_status): Don't check compression
2716 2015-03-24 Nick Clifton <nickc@redhat.com>
2719 * coffgen.c (coff_get_normalized_symtab): Fix test for out of
2720 range auxillary sections.
2722 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
2724 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor
2726 (_bfd_aarch64_get_stub_for_link_section): Define.
2728 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
2730 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Adjust
2731 update of section_group[].stub_sec.
2733 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
2735 * elfnn-aarch64.c (struct aarch64_erratum_835769_fix) Remove.
2736 (erratum_835769_scan) Drop fix_table_size_p and fixes_p arguments.
2737 Delete fixes, fix_table_size and associated code. Call
2738 _bfd_aarch64_add_stub_entry_in_group. Rename to...
2739 (bfd_aarch64_erratum_835769_scan): Define.
2740 (elfNN_aarch64_size_stubs): Delete erratum_835769_fixes,
2741 erratum_835769_fix_table_size, i and associated code. Relocate
2742 call to _bfd_aarch64_erratum_835769_scan. Delete adhoc stub size
2743 correction. Delete construction of stub entry from
2744 erratum_835769_fixes array.
2746 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
2748 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Use
2749 _bfd_aarch64_add_stub_entry_in_group.
2751 2015-03-24 Alan Modra <amodra@gmail.com>
2753 * elf64-ppc.c (ppc64_elf_relocate_section): Report overflow to
2754 stubs, even those for undefined weak symbols. Otherwise, don't
2755 report relocation overflow on branches to undefined strong
2756 symbols. Fix memory leak.
2757 * elf32-ppc.c (ppc_elf_relocate_section): Don't report relocation
2758 overflow on branches to undefined strong symbols.
2760 2015-03-23 Keith Seitz <keiths@redhat.com>
2762 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Add
2765 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2767 * elfnn-aarch64.c (erratum_835769_scan): Factor stub name
2768 construction into...
2769 (_bfd_aarch64_erratum_835769_stub_name): Define.
2771 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2773 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Factor out
2774 stub resize code into...
2775 (bfd_aarch64_resize_stubs): Define.
2777 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2779 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor stub
2780 creation code into...
2781 (bfd_aarch64_create_stub_section): Define.
2783 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2785 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Rename
2786 from elf_aarch64_create_or_find_stub_sec.
2787 (_bfd_aarch64_add_stub_entry_in_group): Rename from
2788 elfNN_aarch64_add_stub. Call
2789 _bfd_aarch64_create_or_find_stub_sec.
2790 (elfNN_aarch64_size_stubs, elfNN_aarch64_size_stubs): Call
2791 _bfd_aarch64_add_stub_entry_in_group.
2793 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2795 * elfnn-aarch64.c (erratum_835769_scan) Add comment. Reverse
2796 sense of boolean return.
2797 (elfNN_aarch64_size_stubs): Adjust for above.
2799 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2801 * elfnn-aarch64.c (elf_aarch64_create_or_find_stub_sec):
2802 Remove unused parameter.
2803 (elfNN_aarch64_size_stubs): Adjust for above.
2805 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2807 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Remove bfd_indx.
2809 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2811 * elfnn-aarch64.c (aarch64_erratum_835769_fixes)
2812 (num_aarch64_erratum_835769_fixes): Remove.
2813 (elfNN_aarch64_size_stubs): Remove assignments to above.
2815 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2817 * elfnn-aarch64.c (aarch64_mem_op_p): Update comment. Rename rtn
2819 (aarch64_erratum_seqeunce): Rename rtn to rt2.
2821 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2823 * elfnn-aarch64.c (elfNN_aarch64_write_section): Adjust layout.
2825 2015-03-19 Nick Clifton <nickc@redhat.com>
2827 * elf32-rl78.c (rl78_cpu_name): New function. Prints the name of
2828 the RL78 core based upon the flags.
2829 (rl78_elf_merge_private_bfd_data): Handle merging of G13 and G14
2831 (rl78_elf_print_private_bfd_data): Use rl78_cpu_name.
2832 (elf32_rl78_machine): Always return bfd_mach_rl78.
2834 2015-03-19 Nick Clifton <nickc@redhat.com>
2837 * compress.c (bfd_compress_section_contents): Do not define this
2838 function if it is not used.
2840 2015-03-18 H.J. Lu <hongjiu.lu@intel.com>
2842 * compress.c (bfd_compress_section_contents): Make it static.
2843 * bfd/bfd-in2.h: Regenerated.
2845 2015-03-18 Eric Youngdale <eyoungdale@ptc.com>
2848 * peicode.h (pe_ILF_build_a_bfd): Add support for creating relocs
2849 suitable for the AMD64.
2851 2015-03-18 Jon Turney <jon.turney@dronecode.org.uk>
2852 Nick Clifton <nickc@redhat.com>
2855 * coffgen.c (make_a_section_from_file): Only prepend a z to a
2856 debug section's name if the section was actually compressed.
2857 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
2858 * compress.c (bfd_init_section_compress_status): Do not compress
2859 the section if doing so would make it bigger. In such cases leave
2860 the section alone and return COMPRESS_SECTION_NONE.
2862 2015-03-17 Alan Modra <amodra@gmail.com>
2864 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return count of 0
2865 on nothing to do, before malloc of returned symbol array.
2867 2015-03-16 Nick Clifton <nickc@redhat.com>
2869 * elf32-rx.c (elf32_rx_relax_delete_bytes): If the relocs are not
2870 stored in the elf_section_data structure then load them as
2873 2015-03-14 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2875 * elf-s390-common.c (elf_s390_elf_sort_relocs_p): Don't sort
2876 relocs against code sections.
2877 * elf32-s390.c: Define elf_backend_sort_relocs_p.
2878 * elf64-s390.c: Likewise.
2880 2015-03-11 Alan Modra <amodra@gmail.com>
2882 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Examine stubs in
2883 reverse order. Account for larger size of __tls_get_addr_opt stub.
2885 2015-03-10 Yuri Gribov <y.gribov@samsung.arm>
2888 * elf32-arm.c (elf32_arm_final_link_relocate): Remove support for
2890 (elf32_arm_print_private_bfd_data): Likewise.
2892 2015-03-06 Nick Clifton <nickc@redhat.com>
2895 * elflink.c (put_value): Like previous delta, but for the 32-bit
2898 2015-03-05 Nick Clifton <nickc@redhat.com>
2901 * elflink.c (put_value): Avoid using an undefined shift
2904 2015-03-05 H.J. Lu <hongjiu.lu@intel.com>
2908 * elf-bfd.h (elf_backend_data): Add extern_protected_data.
2909 * elf32-i386.c (elf_backend_extern_protected_data): New.
2911 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
2912 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
2913 copy relocs against protected symbols if extern_protected_data
2915 (_bfd_elf_symbol_refs_local_p): Don't return true on protected
2916 non-function symbols if extern_protected_data is true.
2917 * elfxx-target.h (elf_backend_extern_protected_data): New.
2919 (elfNN_bed): Initialize extern_protected_data with
2920 elf_backend_extern_protected_data.
2922 2015-03-05 Nick Clifton <nickc@redhat.com>
2925 * coffgen.c (coff_find_nearest_line_with_names): If the dwarf2
2926 lookup fails, check for an address bias in the dwarf info, and if
2927 one exists, retry the lookup with the biased value.
2928 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): New function.
2929 Determines if a bias exists bewteen the addresses of functions
2930 based on DWARF information vs symbol table information.
2931 * libbfd-in.h (_bfd_dwarf2_find_symbol_bias): Prototype.
2932 * libbfd.h: Regenerate.
2934 2015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
2936 * elfxx-aarch64.c (decode_add_imm, decode_movw_imm)
2937 (decode_tst_branch_ofs_14, decode_ld_lit_ofs_19)
2938 (decode_cond_branch_ofs_19, decode_branch_ofs_26): Remove.
2940 2015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
2942 * elfnn-aarch64.c (aarch64_build_one_stub): Call abort.
2943 (aarch64_size_one_stub): Likewise.
2944 (aarch64_map_one_stub): Likewise.
2946 2015-03-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
2948 * cpu-s390.c (N): New macro.
2949 (bfd_s390_31_arch): New. Define only if default target word size
2950 is 64 bits. Otherwise define...
2951 (bfd_390_64_arch): ...this. Make static.
2952 (bfd_s390_arch): Define according to the default target word size.
2953 Let the 'next' field point to the alternate arch.
2955 2015-03-04 Richard Sandiford <richard.sandiford@arm.com>
2958 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Expect
2959 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC and R_AARCH64_TLSLE_MOVW_TPREL_G1_NC
2960 to be used with MOVK rather than MOVZ.
2962 2015-03-03 DJ Delorie <dj@redhat.com>
2964 * elf32-rl78.c (rl78_elf_relax_section): Only relax ADDR16's if
2967 2015-02-28 Alan Modra <amodra@gmail.com>
2969 * elf32-ppc.c (ppc_elf_tls_setup): Set no_tls_get_addr_opt if
2972 2015-02-27 H.J. Lu <hongjiu.lu@intel.com>
2974 * elf32-i386.c (need_convert_mov_to_lea): New.
2975 (elf_i386_check_relocs): Set need_convert_mov_to_lea if needed.
2976 (elf_i386_convert_mov_to_lea): Return TRUE if
2977 need_convert_mov_to_lea is unset.
2978 * elf64-x86-64.c (need_convert_mov_to_lea): New.
2979 (elf_x86_64_check_relocs): Set need_convert_mov_to_lea if needed.
2980 (elf_x86_64_convert_mov_to_lea): Return TRUE if
2981 need_convert_mov_to_lea is unset.
2983 2015-02-27 Nick Clifton <nickc@redhat.com>
2986 * coffgen.c (_bfd_coff_internal_syment_name): Only check for
2987 string length overflow when the string table length is actually
2990 2015-02-27 Marcus Shawcroft <marcus.shawcroft@arm.com>
2992 * bfd/bfd-in2.h: Regenerate.
2993 * bfd/libbfd.h: Regenerate.
2995 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2997 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix
2998 TLSDESC_LD_PREL19 field width and masks.
2999 (aarch64_tls_transition_without_check)
3000 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
3001 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
3002 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
3003 BFD_RELOC_AARCH64_TLSDESC_LD_PREL19.
3004 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
3005 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3007 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
3009 * elfnn-aarch64.c (IS_AARCH64_TLSDESC_RELOC): Reorder R_TYPE
3011 (aarch64_tls_transition_without_check)
3012 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
3013 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
3014 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
3015 BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21.
3016 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
3017 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3018 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
3020 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
3022 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC)
3023 (elfNN_aarch64_howto_table, aarch64_tls_transition_without_check)
3024 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
3025 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
3026 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
3027 BFD_RELOC_AARCH64_TLSGD_ADR_PREL21.
3028 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
3029 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3030 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
3032 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
3034 * elfnn-aarch64.c: (TLSIE_LD_GOTTREL_PREL19): Fix HOWTO bit field width.
3035 (aarch64_tls_transition_without_check, aarch64_reloc_got_type)
3036 (elfNN_aarch64_final_link_relocate, elfNN_aarch64_tls_relax)
3037 (elfNN_aarch64_relocate_section, elfNN_aarch64_gc_sweep_hook)
3038 (elfNN_aarch64_check_relocs): Handle
3039 BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19.
3041 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
3042 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3044 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
3046 * elfnn-aarch64.c: (TLSDESC_CALL): Fix HOWTO bit field width.
3048 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
3050 * elfnn-aarch64.c (TLSLE_MOVW_TPREL_G2)
3051 (TLSLE_MOVW_TPREL_G1, TLSLE_MOVW_TPREL_G1_NC)
3052 (TLSLE_MOVW_TPREL_G0, TLSLE_MOVW_TPREL_G0_NC): Fix bit field
3055 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
3057 * elfnn-aarch64.c: (TLSIE_MOVW_GOTTPREL_G0_NC): Fix HOWTO bit
3060 2015-02-26 Nick Clifton <nickc@redhat.com>
3063 * coffcode.h (coff_compute_section_file_positions): Report
3064 negative page sizes.
3065 * elf.c (elf_fake_sections): Handle excessive alignmment powers.
3066 (assign_file_positions_for_non_load_sections): Replace assertion
3067 with an error message.
3068 (rewrite_elf_program_header): Handle excessive segment
3070 * mach-o.c (bfd_mach_o_read_section_32): Likewise.
3071 (bfd_mach_o_read_section_64): Likewise.
3072 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Use %B to
3073 print a bfd name, not %A.
3075 2015-02-26 Alan Modra <amodra@gmail.com>
3077 * elf64-ppc.c (plt_stub_size, build_plt_stub): Don't build
3078 thread-safe stubs for iplt.
3079 (build_tls_get_addr_stub): Restore r2 immediately after call.
3081 2015-02-26 Terry Guo <terry.guo@arm.com>
3083 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Update how we
3084 merge Tag_ABI_HardFP_use.
3086 2015-02-26 Alan Modra <amodra@gmail.com>
3088 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Heed -z nocopyreloc.
3089 Use text relocs rather than giving an error on trying to use
3090 .dynbss for protected shared lib vars.
3091 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
3093 2015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
3095 * elf32-avr.c (struct elf_avr_section_data): New structure.
3096 (struct avr_relax_info): New structure.
3097 (elf_avr_new_section_hook): New function.
3098 (struct elf_avr_section_data): Add relax_info.
3099 (get_avr_relax_info): New function.
3100 (init_avr_relax_info): New function.
3101 (elf32_avr_relax_delete_bytes): Find next property record before
3102 deleting bytes. When deleting don't move bytes beyond the next
3104 (avr_elf32_assign_records_to_section): New function.
3105 (avr_property_record_compare): New function.
3106 (avr_load_all_property_sections): New function.
3107 (elf32_avr_relax_section): Load property data. After relaxing the
3108 section, move any .align directives that have enough deleted bytes
3110 (bfd_elf32_new_section_hook): Define.
3112 2015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
3114 * elf32-avr.h (struct avr_property_header): New strucure.
3115 (avr_elf32_load_property_records): Declare.
3116 (avr_elf32_property_record_name): Declare.
3117 * elf32-avr.c: Add bfd_stdint.h include.
3118 (retrieve_local_syms): New function.
3119 (get_elf_r_symndx_section): New function.
3120 (get_elf_r_symndx_offset): New function.
3121 (internal_reloc_compare): New function.
3122 (struct avr_find_section_data): New structure.
3123 (avr_is_section_for_address): New function.
3124 (avr_find_section_for_address): New function.
3125 (avr_elf32_load_records_from_section): New function.
3126 (avr_elf32_load_property_records): New function.
3127 (avr_elf32_property_record_name): New function.
3129 2015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
3131 * elf32-avr.h (AVR_PROPERTY_RECORD_SECTION_NAME): Define.
3132 (AVR_PROPERTY_RECORDS_VERSION): Define.
3133 (AVR_PROPERTY_SECTION_HEADER_SIZE): Define.
3134 (struct avr_property_record): New structure.
3136 2015-02-24 Nick Clifton <nickc@redhat.com>
3138 * elf32-v850.c (v850_set_note): New function. Creates a Renesas
3140 (v850_elf_make_note_section): New function. Creates a note
3142 (v850_elf_create_sections): New function. Create a note section
3143 if one is not already present.
3144 (v850_elf_set_note): New function. Adds a note to a bfd.
3145 (v850_elf_copy_private_bfd_data): New function. Copies V850
3147 (v850_elf_merge_notes): New function. Merges V850 notes.
3148 (print_v850_note): New function. Displays a V850 note.
3149 (v850_elf_print_notes): New function. Displays all notes attached
3151 (v850_elf_merge_private_bfd_data): Call v850_elf_merge_notes.
3152 (v850_elf_print_private_bfd_data): Call v850_elf_print_notes.
3153 (v850_elf_fake_sections): Set the type of the V850 note section.
3154 * bfd-in.h (v850_elf_create_sections): Add prototype.
3155 (v850_elf_set_note): Add prototype.
3156 * bfd-in2.h: Regenerate.
3158 2015-02-24 Nick Clifton <nickc@redhat.com>
3160 * configure.ac (AC_CHECK_HEADERS): Add wctype.h.
3161 * configure: Regenerate.
3162 * config.in: Regenerate.
3163 * peXXigen.c: Include wctype.h if HAVE_WCTYPE_H is defined.
3164 (u16_mbtowc): Use wint_t types if HAVE_WCTYPE_H is defined.
3165 (rsrc_cmp): Use towlower instead of wcsncasecmp if HAVE_WCTYPE_H
3168 2015-02-24 Nick Clifton <nickc@redhat.com>
3170 * pdp11.c (set_section_contents): Pad the .text and .data sections
3171 to their aligned sizes.
3173 2015-02-23 Yoshinori Sato <ysato@users.sourceforge.jp>
3175 * config.bfd: Add h8300-*-linux.
3176 * configure.ac: Add h8300_elf32_linux_vec.
3177 * configure: Regenerate.
3178 * elf32-h8300.c: Likewise.
3179 * targets.c(_bfd_target_vector): Likewise.
3181 2015-02-23 Nick Clifton <nickc@redhat.com>
3184 * cpu-w65.c: Correct typos in license notice.
3187 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Adjust debug
3188 symbols at end of sections. Adjust function sizes.
3190 2015-02-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
3192 * elf-bfd.h (elfcore_write_s390_vxrs_low): Add prototype.
3193 (elfcore_write_s390_vxrs_high): Likewise.
3194 * elf.c (elfcore_grok_s390_vxrs_low): New function.
3195 (elfcore_grok_s390_vxrs_high): New function.
3196 (elfcore_grok_note): Call them.
3197 (elfcore_write_s390_vxrs_low): New function.
3198 (elfcore_write_s390_vxrs_high): New function.
3199 (elfcore_write_register_note): Call them.
3201 2015-02-19 Branko Drevensek <branko.drevensek@gmail.com>
3204 * verilog.c (verilog_write_record): Correct buffer size.
3206 2015-02-19 Alan Modra <amodra@gmail.com>
3208 * elflink.c (_bfd_elf_define_linkage_sym): Set 'bed' earlier.
3210 2015-02-19 Alan Modra <amodra@gmail.com>
3213 * elflink.c (elf_link_input_bfd): Drop undefined local syms.
3214 (elf_link_output_extsym): Drop local and global undefined syms.
3215 Tidy. Expand comment.
3217 2015-02-17 Alan Modra <amodra@gmail.com>
3220 * elflink.c (struct elf_outext_info): Remove need_second_pass
3222 (elf_link_output_extsym): Delete code handling second forced
3223 local pass. Move code emitting NULL STT_FILE symbol later, so
3224 that it can be omitted if forced local is stripped. Don't
3225 emit the NULL STT_FILE if no file symbols have been output.
3226 (bfd_elf_final_link): Remove second forced local pass.
3227 * elf32-ppc.c (add_stub_sym): Set linker_def on linker syms.
3228 (ppc_elf_size_dynamic_sections): Likewise.
3229 * elf64-ppc.c (ppc_build_one_stub): Likewise.
3230 (build_global_entry_stubs): Likewise.
3231 (ppc64_elf_build_stubs): Likewise.
3233 2015-02-16 H.J. Lu <hongjiu.lu@intel.com>
3236 * elflink.c (elf_link_output_extsym): Only check filesym_count
3237 when outputting a NULL FILE symbol. Set second_pass_sym to
3238 h->forced_local && !h->root.linker_def.
3240 2015-02-15 H.J. Lu <hongjiu.lu@intel.com>
3242 * elf32-i386.c (elf_i386_always_size_sections): Set root.linker_def
3243 on _TLS_MODULE_BASE_.
3244 * elf64-x86-64.c (elf_x86_64_always_size_sections): Likewise.
3246 2015-02-15 Alan Modra <amodra@gmail.com>
3248 * dwarf2.c (read_rangelist): Correct buffer overflow check
3249 Whitespace throughout file.
3251 2015-02-14 Alan Modra <amodra@gmail.com>
3254 * bfd.c (struct bfd): Add lto_output.
3255 * linker.c (_bfd_handle_already_linked): Explicitly test for
3256 objects added by the lto plugin.
3257 * opncls.c (_bfd_new_bfd_contained_in): Copy lto_output and
3258 no_export flags from archive.
3259 * archive.c (open_nested_file): New function, setting lto_output
3260 and no_export, extracted from..
3261 (find_nested_archive): ..here. Flip params. Rename from
3262 _bfd_find_nested_archive.
3263 (_bfd_get_elt_at_filepos): Correct var typo. Use open_nested_file.
3264 (_bfd_look_for_bfd_in_cache): Copy no_export.
3265 * elflink.c (elf_link_add_object_symbols): Remove now unnecessary
3266 my_archive->no_export test.
3267 (elf_link_input_bfd): Drop existing lto_output STT_FILE syms.
3268 Don't use the file name when adding lto_output STT_FILE sym.
3269 * bfd-in2.h: Regenerate.
3271 2015-02-13 Alan Modra <amodra@gmail.com>
3274 * elf64-ppc.c (opd_entry_value): Tighten offset check. Remove
3275 now redundant assert.
3277 2015-02-12 Nick Clifton <nickc@redhat.com>
3280 * dwarf.c (read_1_byte, read_1_signed_byte, read_2_bytes)
3281 (read_4_bytes, read_8_bytes, read_n_bytes, read_string)
3282 (read_indirect_string, read_alt_indirect_string)
3283 (read_alt_indirect_ref, read_address, read_abbrevs)
3284 (read_attribute_value, read_attribute, decode_line_info)
3285 (find_abstract_instance_name, read_rangelist)
3286 (scan_unit_for_symbols, parse_comp_unit)
3287 (_bfd_dwarf2_find_nearest_line): Harden DWARF reading code. Pass
3288 end pointers to reading functions and check for offsets taking
3289 pointers out of range. Replace calls to read_*_leb128 with calls
3290 to safe_read_leb128.
3292 (* elf64-ppc.c (opd_entry_value): Add a check for an overlarge
3294 * syms.c (_bfd_stab_section_find_nearest_line): Add checks for
3295 computed file_name address being before the start of the string
3298 2015-02-11 H.J. Lu <hongjiu.lu@intel.com>
3301 * bfd.c (bfd_plugin_format): New.
3302 (bfd): Add plugin_format and plugin_dummy_bfd.
3303 * plugin.c (try_load_plugin): Take a pointer to bfd_boolean
3304 argument to return TRUE if any plugin is found. Set plugin_format.
3306 (bfd_plugin_target_p): New.
3307 (bfd_plugin_specified_p): Likewise.
3308 (bfd_plugin_target_p): Likewise.
3309 (register_ld_plugin_object_p): Likewise.
3310 (bfd_plugin_set_plugin): Set has_plugin.
3311 (load_plugin): Cache try_load_plugin result.
3312 (bfd_plugin_object_p): Try ld_plugin_object_p first. Check
3314 * plugin.h (bfd_plugin_target_p): New.
3315 (bfd_plugin_specified_p): Likewise.
3316 (register_ld_plugin_object_p): Likewise.
3317 * bfd-in2.h: Regenerated.
3319 2015-02-11 Pedro Alves <palves@redhat.com>
3321 * libbfd-in.h [__cplusplus]: Open extern "C" scope.
3322 * libcoff-in.h [__cplusplus]: Open extern "C" scope.
3323 * libbfd.h: Regenerate.
3324 * libcoff.h: Regenerate.
3326 * elf-bfd.h [__cplusplus]: Wrap in extern "C".
3327 * mach-o.h [__cplusplus]: Wrap in extern "C".
3328 * som.h [__cplusplus]: Wrap in extern "C".
3330 2015-02-10 Nick Clifton <nickc@redhat.com>
3333 * coffcode.h (styp_to_sec_flags): Use an unsigned long type to
3335 * peXXigen.c (pe_print_reloc): Use unsigned types to hold the
3336 size and number of relocs.
3337 (pe_print_debugdata): Use a 32-bit aligned buffer to store the
3339 * versados.c (process_otr): Check the esdid value before using it
3340 to access the EDATA.
3342 2015-02-09 Ed Maste <emaste@freebsd.org>
3344 * elf32-i386.c (elf_i386_get_plt_sym_val): Avoid incrementing
3345 uninitialized and unused variable.
3346 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
3348 2015-02-09 Alan Modra <amodra@gmail.com>
3350 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault on NULL
3352 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3353 * elflink.c (elf_link_output_extsym): Don't assert on NULL tls_sec.
3355 2015-02-09 Alan Modra <amodra@gmail.com>
3357 * elflink.c: Whitespace, formatting fixes.
3358 (elf_link_input_bfd): Clarify comment.
3359 (elf_link_output_extsym): Exclude symbols in linker created
3360 sections when testing for plugin symbols.
3362 2015-02-07 H.J. Lu <hongjiu.lu@intel.com>
3365 * elf32-i386.c (elf_i386_readonly_dynrelocs): Also issue a
3366 warning for relocation in readonly section for -z text.
3367 (elf_i386_size_dynamic_sections): Likewise.
3368 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
3369 (elf_x86_64_size_dynamic_sections): Likewise.
3371 2015-02-06 H.J. Lu <hongjiu.lu@intel.com>
3375 * elflink.c (_bfd_elf_fix_symbol_flags): Revert the last change.
3376 (elf_link_input_bfd): Mark the plugin symbol undefined if it is
3377 referenced from a non-IR file.
3379 2015-02-06 Nick Clifton <nickc@redhat.com>
3382 * peXXigen.c (rsrc_print_resource_entries): Add range check for
3383 addresses that wrap around the address space.
3384 (rsrc_parse_entry): Likewise.
3386 2015-02-03 H.J. Lu <hongjiu.lu@intel.com>
3390 * elflink.c (_bfd_elf_fix_symbol_flags): Mark the plugin symbol
3391 undefined if it is referenced from a non-IR file.
3393 2015-02-03 Nick Clifton <nickc@redhat.com>
3396 * ecoff.c: Use bfd_alloc2 to allocate space for structure arrays.
3397 (_bfd_ecoff_slurp_symbol_table): Check for a negative symbol
3398 index or an out of range fdr index.
3399 * elf-m10300.c (mn10300_info_to_howto): Fix typo in error message.
3400 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
3401 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
3402 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
3403 * elf32-cr16c.c (elf_cr16c_info_to_howto_rel): Likewise.
3404 * elf32-cris.c (cris_info_to_howto_rela): Likewise.
3405 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
3406 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
3407 * elf32-d30v.c (d30v_info_to_howto_rel): Likewise.
3408 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
3409 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
3410 * elf32-frv.c (frv_info_to_howto_rela): Likewise.
3411 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
3412 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
3413 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
3414 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
3415 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
3416 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
3417 * elf32-m32r.c (m32r_info_to_howto_rel): Likewise.
3418 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
3419 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
3420 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
3421 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
3422 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
3423 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
3424 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
3425 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
3426 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
3427 * elf32-nds32.c (nds32_info_to_howto_rel): Likewise.
3428 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
3429 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
3430 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
3431 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
3432 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
3433 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
3434 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
3435 * elf32-v850.c (v850_elf_perform_relocation): Likewise.
3436 * elf32-vax.c (rtype_to_howto): Likewise.
3437 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
3438 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
3439 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
3440 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
3441 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
3442 * mach-o.c: Use bfd_alloc2 to allocate space for structure arrays.
3443 (bfd_mach_o_canonicalize_one_reloc): Fix check on out
3444 of range symbol indicies.
3445 (bfd_mach_o_canonicalize_relocs): Check for out of range alloc.
3446 (bfd_mach_o_canonicalize_dynamic_reloc): Likewise.
3447 (bfd_mach_o_build_dysymtab): Likewise.
3448 (bfd_mach_o_write_symtab_content): Set the string table size to
3450 (bfd_mach_o_read_symtab_symbols): Reset the nsyms value if the
3452 * peXXigen.c (pe_print_edata): Check for numeric overflow in edt
3454 * tekhex.c (first_phase): Check for src pointer reaching end of
3457 2015-02-03 Will Newton <will.newton@linaro.org>
3459 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol):
3460 Set st_value to zero for undefined symbols if the reference
3461 is weak or pointer_equality_needed is FALSE.
3463 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Improve
3464 comment discussing why we clear st_value for some symbols.
3466 2015-02-02 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3468 * elf32-nds32.c (nds32_get_section_contents): Add one more argument.
3469 (nds32_elf_relocate_section): Do not relocate R_NDS32_LONGJUMP7.
3471 2015-01-29 Alan Modra <amodra@gmail.com>
3473 * elf64-ppc.c (ppc64_elf_relocate_section): Correct GOT_TLSLD
3474 optimization. Tidy mask for GOT_TLSGD optimization.
3475 * elf32-ppc.c (ppc_elf_relocate_section): Likewise. Correct
3476 location of nop zapping high insn too.
3478 2015-01-28 Alan Modra <amodra@gmail.com>
3480 * elf64-ppc.h (struct ppc64_elf_params): Add "object_in_toc".
3481 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Assume that global symbols
3482 in .toc indicate xlc compiled code that might require a rw .toc.
3484 2015-01-28 James Bowman <james.bowman@ftdichip.com>
3486 * Makefile.am: Add FT32 files.
3487 * archures.c (enum bfd_architecture): Add bfd_arch_ft32.
3488 (bfd_mach_ft32): Define.
3489 (bfd_ft32_arch): Declare.
3490 (bfd_archures_list): Add bfd_ft32_arch.
3491 * config.bfd: Handle FT32.
3492 * configure.ac: Likewise.
3493 * cpu-ft32.c: New file.
3494 * elf32-ft32.c: New file.
3495 * reloc.c (BFD_RELOC_FT32_10, BFD_RELOC_FT32_20, BFD_RELOC_FT32_17,
3496 BFD_RELOC_FT32_18): Define.
3497 * targets.c (_bfd_target_vector): Add ft32_elf32_vec.
3498 * bfd-in2.h: Regenerate.
3499 * libbfd.h: Regenerate.
3500 * Makefile.in: Regenerate.
3501 * configure: Regenerate.
3502 * po/SRC-POTFILES.in: Regenerate.
3504 2015-01-27 Nick Clifton <nickc@redhat.com>
3507 * pdp11.c (aout_get_external_symbols): Return false if there are
3510 * dwarf2.c (concat_filename): Check for an empty directory table.
3511 (scan_unit_for_symbols): Check for reading off the end of the
3513 (parse_comp_unit): Check for a DW_AT_comp_dir attribute with a
3515 * elf64-ppc.c (opd_entry_value): Fail if there are no relocs
3518 2015-01-26 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3520 * elf32-nds32.c (nds32_elf_pick_relax): Fix again setting.
3522 2015-01-22 DJ Delorie <dj@redhat.com>
3524 * elf32-m32c.c (m32c_apply_reloc_24): New.
3525 (m32c_elf_howto_table): Use it for R_M32C_24.
3526 (m32c_elf_relocate_section): Handle R_M32C_24 specially.
3528 2015-01-22 Nick Clifton <nickc@redhat.com>
3531 * coffcode.h (handle_COMDAT): When searching for the section
3532 symbol, make sure that there is space left in the symbol table.
3533 * vms-alpha.c (_bfd_vms_slurp_ehdr): Add range checks.
3535 2015-01-21 Nick Clifton <nickc@redhat.com>
3538 * coffcode.h (coff_set_arch_mach_hook): Check return value from
3540 (coff_slurp_line_table): Return FALSE if the line number
3541 information was corrupt.
3542 (coff_slurp_symbol_table): Return FALSE if the symbol information
3544 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Always
3545 initialise the fields of the dyld_info structure.
3546 (bfd_mach_o_build_exec_seg_command): Replace assertion with an
3547 error message and a return value.
3548 (bfd_mach_o_layout_commands): Change the function to boolean.
3549 Return FALSE if the function fails.
3550 (bfd_mach_o_build_commands): Fail if bfd_mach_o_layout_commands
3552 (bfd_mach_o_read_command): Fail if an unrecognised command is
3554 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Set bfd_error if the
3556 (slurp_symtab): Check the return from bfd_malloc.
3557 (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if the copy
3558 encountered an error.
3559 (_bfd_XXi_final_link_postscript): Fail if a section could not be
3561 * peicode.h (pe_bfd_object_p): Fail if the header could not be
3563 * tekhex.c (first_phase): Fail if the section is too big.
3564 * versados.c (struct esdid): Add content_size field.
3565 (process_otr): Use and check the new field.
3566 (versados_get_section_contents): Check that the section exists and
3567 that the requested data is available.
3569 2015-01-20 Chung-Lin Tang <cltang@codesourcery.com>
3571 * elf32-nios2.c (elf_backend_default_execstack): Define as 0.
3573 2015-01-20 Alan Modra <amodra@gmail.com>
3576 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Don't drop
3577 ELF_COMMON_DEF syms.
3579 2015-01-19 Alan Modra <amodra@gmail.com>
3582 * elf-bfd.h (ELF_COMMON_DEF_P): Note that this might be true for
3583 linker script assignments too.
3584 * elflink.c (elf_gc_sweep_symbol): Don't drop ELF_COMMON_DEF syms.
3585 (bfd_elf_gc_mark_dynamic_ref_symbol): Similarly.
3587 2015-01-19 Alan Modra <amodra@gmail.com>
3589 * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Correct loop iteration
3590 to allow return of first howto.
3591 * elf32-fr30.c (fr30_reloc_type_lookup): Likewise.
3592 * elf32-m32c.c (m32c_reloc_type_lookup): Likewise.
3593 * elf32-moxie.c (moxie_reloc_type_lookup): Likewise.
3594 * elf32-or1k.c (or1k_reloc_type_lookup): Likewise.
3595 * elf32-rl78.c (rl78_reloc_type_lookup): Likewise.
3596 * elf32-rx.c (rx_reloc_type_lookup): Likewise.
3597 * elf32-tilepro.c (tilepro_reloc_type_lookup): Likewise.
3598 * elf32-xstormy16.c (xstormy16_reloc_type_lookup): Likewise.
3599 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
3600 * elf32-nios2.c (nios2_reloc_map): Add mapping for R_NIOS2_NONE.
3601 * elf32-spu.c (spu_elf_bfd_to_reloc_type): Allow return of R_SPU_NONE.
3602 (spu_elf_reloc_type_lookup): Adjust to suit.
3604 2015-01-19 Alan Modra <amodra@gmail.com>
3606 * bfd-in.h (bfd_get_section_limit_octets): New define, extracted from..
3607 (bfd_get_section_limit): ..here.
3608 * reloc.c (bfd_perform_relocation): Correct bfd_reloc_outofrange check.
3609 (bfd_install_relocation, _bfd_final_link_relocate): Add same check here.
3610 * elf32-sh.c (sh_elf_reloc): Correct bfd_reloc_outofrange check.
3611 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Remove duplicated
3612 bfd_reloc_outofrange check.
3613 * bfd-in2.h: Regenerate.
3615 * cpu-ns32k.c (_bfd_do_ns32k_reloc_contents): Return bfd_reloc_ok
3616 on zero size relocs.
3617 * ecoff.c (ecoff_reloc_link_order): Likewise.
3618 * elf32-nds32.c (nds32_relocate_contents): Likewise.
3619 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3621 * reloc.c (_bfd_relocate_contents): Don't bomb on zero size relocs.
3622 (_bfd_clear_contents): Likewise.
3623 * elfxx-mips.c (mips_elf_obtain_contents): Likewise.
3624 (mips_elf_perform_relocation): Likewise.
3626 * aoutx.h (aout_link_reloc_link_order): Allow for NULL return
3627 from malloc on zero size alloc.
3628 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
3629 * elflink.c (elf_reloc_link_order): Likewise.
3630 * linker.c (_bfd_generic_reloc_link_order): Likewise.
3631 * pdp11.c (aout_link_reloc_link_order): Likewise.
3632 * xcofflink.c (xcoff_reloc_link_order): Likewise.
3634 * aoutx.h (howto_table_ext): Ensure NONE relocs have size 3,
3635 bitsize 0, and complain_overflow_dont.
3636 * coff-sparc.c (coff_sparc_howto_table): Likewise.
3637 * elf-hppa.h (elf_hppa_howto_table): Likewise.
3638 * elf-m10200.c (elf_mn10200_howto_table): Likewise.
3639 * elf-m10300.c (elf_mn10300_howto_table): Likewise.
3640 * elf32-arc.c (elf_arc_howto_table): Likewise.
3641 * elf32-arm.c (elf32_arm_howto_table_1): Likewise.
3642 * elf32-avr.c (elf_avr_howto_table): Likewise.
3643 * elf32-bfin.c (bfin_howto_table): Likewise.
3644 * elf32-cr16.c (cr16_elf_howto_table): Likewise.
3645 * elf32-cris.c (cris_elf_howto_table): Likewise.
3646 * elf32-crx.c (crx_elf_howto_table): Likewise.
3647 * elf32-d10v.c (elf_d10v_howto_table): Likewise.
3648 * elf32-d30v.c (elf_d30v_howto_table): Likewise.
3649 * elf32-dlx.c (dlx_elf_howto_table): Likewise.
3650 * elf32-epiphany.c (epiphany_elf_howto_table): Likewise.
3651 * elf32-fr30.c (fr30_elf_howto_table): Likewise.
3652 * elf32-frv.c (elf32_frv_howto_table): Likewise.
3653 * elf32-h8300.c (h8_elf_howto_table): Likewise.
3654 * elf32-i370.c (i370_elf_howto_raw): Likewise.
3655 * elf32-i386.c (elf_howto_table): Likewise.
3656 * elf32-i860.c (elf32_i860_howto_table): Likewise.
3657 * elf32-i960.c (elf32_i960_relocate): Likewise.
3658 * elf32-ip2k.c (ip2k_elf_howto_table): Likewise.
3659 * elf32-iq2000.c (iq2000_elf_howto_table): Likewise.
3660 * elf32-lm32.c (lm32_elf_howto_table): Likewise.
3661 * elf32-m32c.c (m32c_elf_howto_table): Likewise.
3662 * elf32-m32r.c (m32r_elf_howto_table): Likewise.
3663 * elf32-m68hc11.c (elf_m68hc11_howto_table): Likewise.
3664 * elf32-m68hc12.c (elf_m68hc11_howto_table): Likewise.
3665 * elf32-m68k.c (howto_table): Likewise.
3666 * elf32-mcore.c (mcore_elf_howto_raw): Likewise.
3667 * elf32-mep.c (mep_elf_howto_table): Likewise.
3668 * elf32-metag.c (elf_metag_howto_table): Likewise.
3669 * elf32-microblaze.c (microblaze_elf_howto_raw): Likewise.
3670 * elf32-mips.c (elf_mips_howto_table_rel): Likewise.
3671 * elf32-moxie.c (moxie_elf_howto_table): Likewise.
3672 * elf32-msp430.c (elf_msp430_howto_table): Likewise.
3673 * elf32-mt.c (mt_elf_howto_table): Likewise.
3674 * elf32-nds32.c (nds32_elf_howto_table): Likewise.
3675 * elf32-nios2.c (elf_nios2_howto_table_rel): Likewise.
3676 * elf32-or1k.c (or1k_elf_howto_table): Likewise.
3677 * elf32-pj.c (pj_elf_howto_table): Likewise.
3678 * elf32-ppc.c (ppc_elf_howto_raw): Likewise.
3679 * elf32-rl78.c (rl78_elf_howto_table): Likewise.
3680 * elf32-rx.c (rx_elf_howto_table): Likewise.
3681 * elf32-s390.c (elf_howto_table): Likewise.
3682 * elf32-score.c (elf32_score_howto_table): Likewise.
3683 * elf32-score7.c (elf32_score_howto_table): Likewise.
3684 * elf32-sh-relocs.h (R_SH_NONE): Likewise.
3685 * elf32-spu.c (elf_howto_table): Likewise.
3686 * elf32-tic6x.c (elf32_tic6x_howto_table): Likewise.
3687 * elf32-tilepro.c (tilepro_elf_howto_table): Likewise.
3688 * elf32-v850.c (v850_elf_howto_table): Likewise.
3689 * elf32-vax.c (howto_table): Likewise.
3690 * elf32-visium.c (visium_elf_howto_table): Likewise.
3691 * elf32-xc16x.c (xc16x_elf_howto_table): Likewise.
3692 * elf32-xgate.c (elf_xgate_howto_table): Likewise.
3693 * elf32-xstormy16.c (xstormy16_elf_howto_table): Likewise.
3694 * elf32-xtensa.c (elf_howto_table): Likewise.
3695 * elf64-alpha.c (elf64_alpha_howto_table): Likewise.
3696 * elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
3697 * elf64-mmix.c (elf_mmix_howto_table): Likewise.
3698 * elf64-ppc.c (ppc64_elf_howto_raw): Likewise.
3699 * elf64-s390.c (elf_howto_table): Likewise.
3700 * elf64-sh64.c (sh_elf64_howto_table): Likewise.
3701 * elf64-x86-64.c (x86_64_elf_howto_table): Likewise.
3702 * elfn32-mips.c (elf_mips_howto_table_rel): Likewise.
3703 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
3704 (elfNN_aarch64_howto_none): Likewise.
3705 * elfxx-ia64.c (ia64_howto_table): Likewise.
3706 * elfxx-sparc.c (_bfd_sparc_elf_howto_table): Likewise.
3707 * elfxx-tilegx.c (tilegx_elf_howto_table): Likewise.
3708 * nlm32-sparc.c (nlm32_sparc_howto_table): Likewise.
3710 2015-01-15 H.J. Lu <hongjiu.lu@intel.com>
3713 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't complain
3714 about -fPIC if the symbol is undefined when building executable.
3716 2015-01-15 Nick Clifton <nickc@redhat.com>
3719 * elf-m10300.c (mn10300_info_to_howto): Replace assertion with an
3720 error message. Never return an invalid howto pointer.
3721 * elf32-cr16.c (cr16_info_to_howto): Likewise.
3722 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
3723 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
3724 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
3725 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
3726 * elf32-mips.c (mips_elf32_rtype_to_howto): Likewise.
3727 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
3728 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
3729 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
3730 * elf32-v850.c (v850_elf_info_to_howto_rela): Likewise.
3731 * elf32-vax.c (rtype_to_howto): Likewise.
3732 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
3733 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
3734 * elfn32-mips.c (sh_elf_info_to_howto): Likewise.
3735 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
3736 (sh_elf_reloc): Check that the reloc is in range.
3737 * reloc.c (bfd_perform_relocation): Check that the section is big
3738 enough for the entire reloc.
3739 (bfd_generic_get_relocated_section_contents): Report unexpected
3740 return values from perform_reloc.
3742 2015-01-15 Nick Clifton <nickc@redhat.com>
3744 * elf32-msp430.c (msp430_elf_relax_section): Skip unhandled
3745 relocs. Include PC-relative adjustment for R_MSP430X_ABS16
3748 2015-01-15 Alan Modra <amodra@gmail.com>
3750 * elflink.c (_bfd_elf_link_omit_section_dynsym): Return true for
3751 any output section matching a linker created dynobj section.
3753 2015-01-15 Alan Modra <amodra@gmail.com>
3756 * elflink.c (elf_link_output_sym): Assert elf_onesymtab set.
3757 (bfd_elf_final_link): Always create a symbol table when emit_relocs.
3758 Don't assign symtab file position unless symbols will be output.
3759 Merge blocks with condition in common. Don't call
3760 elf_backend_output_arch_local_syms or elf_backend_output_arch_syms
3761 unless other symbols are output. Move assignment of symtab_shndx
3762 file position. Localize variable.
3764 2015-01-14 Jiong Wang <jiong.wang@arm.com>
3766 * elf32-arm.c (elf32_arm_final_link_relocate): Reject R_ARM_32/_NOI when
3767 trying to defer them to runtime.
3769 2015-01-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3771 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use SYMBOLIC_BIND
3772 to check if a symbol should be bound symbolically.
3774 2015-01-13 Jiong Wang <jiong.wang@arm.com>
3776 * elfnn-aarch64.c: (elfNN_aarch64_howto_table): Enable overflow check
3777 for TLSLE_MOVW_TPREL_G2.
3779 2015-01-13 Jiong Wang <jiong.wang@arm.com>
3782 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Mark
3783 R_AARCH64_TLSLE_ADD_TPREL_HI12 as complain_overflow_unsigned.
3784 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Correct the
3787 2015-01-12 Terry Guo <terry.guo@arm.com>
3789 * elflink.c (_bfd_elf_gc_mark_debug_special_section_group): New
3791 (_bfd_elf_gc_mark_extra_sections): Use it.
3793 2015-01-11 H.J. Lu <hongjiu.lu@intel.com>
3796 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): For PIE,
3797 only discard space for pc-relative relocs symbols which turn
3798 out to need copy relocs.
3800 2015-01-09 Nick Clifton <nickc@redhat.com>
3802 * tekhex.c (getvalue): Fix thinko in test for correct extraction
3804 (getsym): Return false if there was not enough data to extract the
3807 2015-01-09 Anthony Green <green@moxielogic.com>
3809 * elf32-moxie.c (ELF_MACHINE_ALT1): Define.
3811 2015-01-08 Nick Clifton <nickc@redhat.com>
3813 * elf32-msp430.c (msp430_elf_relax_section): Add relaxation of
3814 16-bit absolute BR instructions to 10-bit pc-relative JMP
3817 2015-01-08 Nick Clifton <nickc@redhat.com>
3820 * coffcode.h (coff_slurp_symbol_table): Return false if we failed
3821 to load the line table.
3822 * elf.c (_bfd_elf_map_sections_to_segments): Enforce a minimum
3824 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if
3825 the Data Directory Size is too large.
3827 2015-01-06 H.J. Lu <hongjiu.lu@intel.com>
3830 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocation.
3831 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
3833 2015-01-06 Nick Clifton <nickc@redhat.com>
3836 * mach-o.c (bfd_mach_o_read_symtab_strtab): Zero terminate the
3839 * reloc.c (bfd_get_reloc_size): Handle a reloc size of -1.
3840 (bfd_perform_relocation): Include the size of the reloc in the
3841 test for an out of range relocation.
3842 (bfd_generic_get_relocated_section_contents): Remove reloc range
3845 * coff-i860.c (CALC_ADDEND): Always set an addend value.
3846 * tekhex.c (getvalue): Add an end pointer parameter. Use it to
3847 avoid reading off the end of the buffer.
3849 (first_phase): Likewise.
3850 (pass_over): Pass an end pointer to the invoked function.
3852 2015-01-05 H.J. Lu <hongjiu.lu@intel.com>
3855 * elf32-i386.c (elf_i386_get_plt_sym_val): Return NULL on corrupt
3857 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
3859 2015-01-05 Nick Clifton <nickc@redhat.com>
3862 * archive.c (do_slurp_bsd_armap): Make sure that the parsed sized
3863 is at least big enough for the header to be read.
3864 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocs.
3865 * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add range checks.
3866 (bfd_mach_o_read_command): Prevetn duplicate error messages about
3867 unrecognized commands.
3868 * syms.c (_bfd_stab_section_find_nearest_line): Add range checks
3869 when indexing into the string table.
3871 2015-01-01 Alan Modra <amodra@gmail.com>
3873 Update year range in copyright notice of all files.
3875 For older changes see ChangeLog-2014
3877 Copyright (C) 2015 Free Software Foundation, Inc.
3879 Copying and distribution of this file, with or without modification,
3880 are permitted in any medium without royalty provided the copyright
3881 notice and this notice are preserved.
3887 version-control: never