]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - bfd/ChangeLog
Avoid "operation may be undefined" warning in remote.c
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
3a8c4a5b
AM
12015-12-01 Alan Modra <amodra@gmail.com>
2
3 * aoutx.h (adjust_sizes_and_vmas): Remove unused text_size and
4 text_end parameters. Update callers.
5 * aout-tic30.c: Update adjust_sizes_and_vmas callers.
6 * hp300hpux.c: Likewise.
7 * i386lynx.c: Likewise.
8 * libaout.h: Likewise.
9 * netbsd.h: Likewise.
10 * pdp11.c: Likewise.
11 * riscix.c: Likewise.
12
bbb1afc8
AM
132015-12-01 Alan Modra <amodra@gmail.com>
14
15 * aout-adobe.c: Invoke aout N_* macros with pointer to
16 struct internal_exec.
17 * aout-arm.c: Likewise.
18 * aout-cris.c: Likewise.
19 * aout-target.h: Likewise.
20 * aout-tic30.c: Likewise.
21 * aoutf1.h: Likewise.
22 * aoutx.h: Likewise.
23 * bout.c: Likewise.
24 * freebsd.h: Likewise.
25 * gen-aout.c: Likewise.
26 * hp300hpux.c: Likewise.
27 * i386aout.c: Likewise.
28 * i386linux.c: Likewise.
29 * i386lynx.c: Likewise.
30 * i386mach3.c: Likewise.
31 * i386os9k.c: Likewise.
32 * libaout.h: Likewise.
33 * m68klinux.c: Likewise.
34 * m88kmach3.c: Likewise.
35 * mipsbsd.c: Likewise.
36 * netbsd.h: Likewise.
37 * pc532-mach.c: Likewise.
38 * pdp11.c: Likewise.
39 * riscix.c: Likewise.
40 * sparclinux.c: Likewise.
41 * sparclynx.c: Likewise.
42
b560e2ac
AM
432015-12-01 Alan Modra <amodra@gmail.com>
44
45 * coff-rs6000.c (_bfd_xcoff_put_symbol_name): Replace abfd param
46 with info param. Test info->traditional_format rather than
47 BFD_TRADITIONAL_FORMAT flag.
48 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Likewise.
49 * libxcoff.h (struct xcoff_backend_data_rec): Update
50 _xcoff_put_symbol_name prototype.
51 (bfd_xcoff_put_symbol_name): Add info param.
52 * xcofflink.c (xcoff_find_tc0): Update bfd_xcoff_put_symbol_name call.
53 (xcoff_write_global_symbol): Likewise.
54 (xcoff_link_input_bfd): Test info->traditional_format rather than
55 BFD_TRADITIONAL_FORMAT flag.
56 * cofflink.c (_bfd_coff_final_link): Likewise.
57 (_bfd_coff_link_input_bfd, _bfd_coff_write_global_sym): Likewise.
58
44c2e680
AM
592015-12-01 Alan Modra <amodra@gmail.com>
60
61 * po/SRC-POTFILES.in: Regenerate.
62
f26dd308
AM
632015-12-01 Alan Modra <amodra@gmail.com>
64
65 * elf32-arc.c (ARC_ELF_HOWTO): Delete.
66 (arc_elf_howto): New function.
67 (bfd_elf32_bfd_reloc_type_lookup): Use it in place of existing
68 init code.
69 (bfd_elf32_bfd_reloc_name_lookup): Use arc_elf_howto.
70 (arc_info_to_howto_rel, elf_arc_relocate_section): Likwise.
71 (elf_arc_check_relocs): Likewise.
72
0a5ff21b
AM
732015-12-01 Cupertino Miranda <cupertino.miranda@synopsys.com>
74
75 * elf32-arc.c (arc_elf_howto_init): Init dst_mask.
76
0b1fa288
ST
772015-11-20 Stefan Teleman <stefan.teleman@oracle.com>
78
79 PR ld/19260
80 * cache.c (bfd_cache_max_open): Avoid using getrlimit on 32-bit
81 Solaris as the result is unreliable.
82
9b334a2c
TG
832015-11-20 Tristan Gingold <gingold@adacore.com>
84
85 * mach-o-x86-64.c (x86_64_howto_table): Change name here too.
86
f075eb5e
TG
872015-11-20 Tristan Gingold <gingold@adacore.com>
88
89 * targets.c (aarch64_mach_o_vec, arm_mach_o_vec): Declare.
90 (_bfd_target_vector): Add new vectors.
91 * reloc.c (BFD_RELOC_MACH_O_SUBTRACTOR32)
92 (BFD_RELOC_MACH_O_SUBTRACTOR64, BFD_RELOC_MACH_O_ARM64_ADDEND)
93 (BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGE21)
94 (BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12)
95 (BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT): New relocations.
96 (BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32)
97 (BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64): Remove.
98 * mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Change
99 name of subtractor relocations.
100 * config.bfd: Handle aarch64-*-darwin*, arm-*-darwin*.
101 * Makefile.am (BFD32_BACKENDS): Add mach-o-arm.lo.
102 (BFD32_BACKENDS_CFILES): Add mach-o-arm.c.
103 (BFD64_BACKENDS): Add mach-o-aarch64.lo.
104 (BFD64_BACKENDS_CFILES): Add mach-o-aarch64.c.
105 * configure.ac: Handle aarch64_mach_o_vec and arm_mach_o_vec.
106 * mach-o-aarch64.c: New file.
107 * mach-o-arm.c: New file.
108 * Makefile.in: Regenerate.
109 * bfd-in2.h: Regenerate.
110 * configure: Regenerate.
111 * libbfd.h: Regenerate.
112
11b8aeb8
DB
1132015-11-20 David Bridgham <dab@froghouse.org>
114
115 * pdp11.c (TARGET_PAGE_SIZE): Set to 256 to match definition in
116 ld/emulparams/pdp11.sh.
117
d47b13e0
AK
1182015-11-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
119
120 PR ld/19263
121 * elf32-s390.c (elf_s390_gc_sweep_hook): Add null ptr check.
122 * elf64-s390.c (elf_s390_check_relocs): Port the GOTOFF handling
123 over from the 32 bit code.
124 (elf_s390_relocate_section): Likewise.
125
4978e369
AM
1262015-11-18 Alan Modra <amodra@gmail.com>
127
128 PR 19256
129 * archive.c (bfd_generic_openr_next_archived_file): Don't allow
130 backward file movement via "negative" sizes.
131 * coff-alpha.c (alpha_ecoff_openr_next_archived_file): Likewise.
132
bcb51645
TG
1332015-11-18 Tristan Gingold <gingold@adacore.com>
134
135 * mach-o.h (bfd_mach_o_swap_in_non_scattered_reloc)
136 (bfd_mach_o_canonicalize_non_scattered_reloc)
137 (bfd_mach_o_pre_canonicalize_one_reloc): Declare.
138 (bfd_mach_o_backend_data): Rename field
139 _bfd_mach_o_swap_reloc_in to _bfd_mach_o_canonicalize_one_reloc.
140 * mach-o.c (bfd_mach_o_swap_in_non_scattered_reloc): Now public.
141 (bfd_mach_o_canonicalize_non_scattered_reloc): Renames from
142 bfd_mach_o_canonicalize_one_reloc.
143 (bfd_mach_o_pre_canonicalize_one_reloc): New function.
144 (bfd_mach_o_canonicalize_relocs): Adjust.
145 (bfd_mach_o_canonicalize_relocs): Rename define from
146 bfd_mach_o_swap_reloc_in.
147 * mach-o-target.c (TARGET_NAME_BACKEND): Use
148 bfd_mach_o_canonicalize_one_reloc instead of
149 bfd_mach_o_swap_reloc_in.
150 * mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc): Renames
151 from bfd_mach_o_i386_swap_reloc_in and adjust.
152 (bfd_mach_o_canonicalize_one_reloc): Renames from
153 bfd_mach_o_i386_canonicalize_one_reloc.
154 * mach-o-x86_64.c (bfd_mach_o_x86_64_canonicalize_one_reloc): Renames
155 from bfd_mach_o_x86_64_swap_reloc_in and adjust.
156 (bfd_mach_o_canonicalize_one_reloc): Renames from
157 bfd_mach_o_x86_64_canonicalize_one_reloc.
158
47daa70f
TG
1592015-11-18 Tristan Gingold <gingold@adacore.com>
160
161 * mach-o.h (struct mach_o_data_struct): Add hdr_offset field.
162 (bfd_mach_o_fat_archive_p): Renames prototype.
163 (bfd_mach_o_fat_openr_next_archived_file): Renames.
164 (bfd_mach_o_header_p): Add argument.
165 * mach-o.c (bfd_mach_o_read_header): Add hdr_off argument and
166 use it.
167 (bfd_mach_o_read_section_32, bfd_mach_o_read_section_64)
168 (bfd_mach_o_read_section): Remove offset argument.
169 (bfd_mach_o_read_dylinker): Remove bfd_seek call.
170 (bfd_mach_o_read_dylib, bfd_mach_o_read_prebound_dylib)
171 (bfd_mach_o_read_prebind_cksum, bfd_mach_o_read_twolevel_hints)
172 (bfd_mach_o_read_fvmlib, bfd_mach_o_read_dysymtab)
173 (bfd_mach_o_read_symtab, bfd_mach_o_read_uuid)
174 (bfd_mach_o_read_linkedit, bfd_mach_o_read_str)
175 (bfd_mach_o_read_dyld_info, bfd_mach_o_read_version_min)
176 (bfd_mach_o_read_encryption_info): Likewise.
177 (bfd_mach_o_read_encryption_info_64): New function.
178 (bfd_mach_o_read_main, bfd_mach_o_read_source_version)
179 (bfd_mach_o_read_segment): Remove call to bfd_seek.
180 (bfd_mach_o_read_command): Use hdr_offset in bfd_seek.
181 Handle BFD_MACH_O_LC_LINKER_OPTIMIZATION_HINT,
182 BFD_MACH_O_LC_ENCRYPTION_INFO_64, BFD_MACH_O_LC_VERSION_MIN_WATCHOS.
183 (bfd_mach_o_header_p): Add hdr_off argument.
184 (bfd_mach_o_gen_object_p, bfd_mach_o_gen_core_p): Adjust calls.
185 (bfd_mach_o_fat_archive_p): Renames.
186 (bfd_mach_o_fat_openr_next_archived_file): Renames.
187 (bfd_mach_o_close_and_cleanup): Remove useless code.
188 (bfd_mach_o_close_and_cleanup): Define.
189 * mach-o-x86-64.c (bfd_mach_o_x86_64_object_p)
190 (bfd_mach_o_x86_64_core_p): Adjust calls.
191 * mach-o-target.c: Move defines for archive from mach-o.c.
192 Remove check on TARGET_ARCHIVE.
193 * mach-o-i386.c (bfd_mach_o_i386_object_p)
194 (bfd_mach_o_i386_core_p): Adjust calls.
195
eee926f2
CL
1962015-11-17 Christophe Lyon <christophe.lyon@linaro.org>
197
198 * elf32-arm.c (elf32_arm_write_section): Force offset output as
199 long (%ld).
200
d8bd95ef
TG
2012015-11-13 Tristan Gingold <gingold@adacore.com>
202
203 * version.m4: Bump version to 2.26.51
204 * configure: Regenerate.
205
a680de9a
PB
2062015-11-11 Alan Modra <amodra@gmail.com>
207 Peter Bergner <bergner@vnet.ibm.com>
208
209 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_REL16DX_HA.
210 (ppc_elf_reloc_type_lookup): Handle R_PPC_REL16DX_HA.
211 (ppc_elf_addr16_ha_reloc): Likewise.
212 (ppc_elf_check_relocs): Likewise.
213 (ppc_elf_relocate_section): Likewise.
214 (is_insn_dq_form): Handle lxv and stxv instructions.
215 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_REL16DX_HA.
216 (ppc64_elf_reloc_type_lookup): Handle R_PPC64_REL16DX_HA.
217 (ppc64_elf_ha_reloc): Likewise.
218 (ppc64_elf_check_relocs): Likewise.
219 (ppc64_elf_relocate_section): Likewise.
220 * bfd-in2.h: Regenerate.
221 * libbfd.h: Likewise.
222 * reloc.c (BFD_RELOC_PPC_REL16DX_HA): New.
223
18954b29
L
2242015-11-10 H.J. Lu <hongjiu.lu@intel.com>
225
226 * elf32-i386.c (elf_i386_relocate_section): Handle VTINHERIT
227 and VTENTRY relocations when deleting relocations.
228 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
229
2d5da473
L
2302015-11-10 H.J. Lu <hongjiu.lu@intel.com>
231
232 * elf32-i386.c (elf_i386_relocate_section): Properly move
233 kept relocations when deleting relocations.
234 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
235
60f2e42e
L
2362015-11-09 H.J. Lu <hongjiu.lu@intel.com>
237
238 * elf32-i386.c (elf_i386_relocate_section): Use read and write
239 pointers to reloc array, rather than memmove when deleting a
240 reloc. Don't use RELOC_AGAINST_DISCARDED_SECTION. Adjust
241 reloc counts at end of loop.
242 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
243
c316a17c
AM
2442015-11-10 Alan Modra <amodra@gmail.com>
245
246 * elf64-ppc.c (ppc64_elf_relocate_section): Use read and write
247 pointers to reloc array, rather than memmove when deleting a
248 reloc. Don't use RELOC_AGAINST_DISCARDED_SECTION. Adjust
249 reloc counts at end of loop.
250 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
251
29f628db
DV
2522015-11-09 Dominik Vogt <vogt@linux.vnet.ibm.com>
253
254 * elf64-ppc.c (ppc64_elf_size_stubs, ppc64_elf_build_stubs): Fix left
255 shift of negative value.
256 * libbfd.c (safe_read_leb128): Likewise.
257 * dwarf2.c (place_sections): Likewise.
258 * bfd-in.h (align_power): Likewise.
259 * bfd-in2.h (align_power): Likewise.
260
26f187cd
NC
2612015-10-30 Nick Clifton <nickc@redhat.com>
262
263 * po/zh_CN.po: Updated (simplified) Chinese translation.
264
ca9584fb 2652015-10-29 Catherine Moore <clm@codesourcery.com>
26f187cd 266
ca9584fb
CM
267 * elfxx-mips.c (mips_elf_check_mips16_stubs): Set a stub's output
268 section to bfd_abs_section_ptr if the stub is discarded.
269
a75cf613
ES
2702015-10-29 Ed Schouten <ed@nuxi.nl>
271
272 * config.bfd (targ_defvec): Add support for CloudABI on aarch64.
273 For this target we have to make sure we use ELFOSABI_CLOUDABI
274 instead of ELFOSABI_NONE.
275 * configure.ac (tb): Likewise.
276 * elfnn-aarch64.c: Likewise.
277 * targets.c (_bfd_target_vector): Likewise.
278 * configure: Regenerate.
279
968bc5cc
PA
2802015-10-29 Pedro Alves <palves@redhat.com>
281
282 * libhppa.h (bfd_hppa_insn2fmt): Add cast.
283
a3718e9e
L
2842015-10-28 H.J. Lu <hongjiu.lu@intel.com>
285
286 * elf32-i386.c (elf_i386_relocate_section): Fix a typo in
287 comment.
288
82188b29
NC
2892015-10-28 Nick Clifton <nickc@redhat.com>
290
291 * elf32-arm.c (create_instruction_branch_absolute): Replace
292 pointer parameters with a simple integer parameter.
293 (stm32l4xx_create_replacing_stub_ldmia): Update calls to
294 create_instruction_branch_absolute.
295 (stm32l4xx_create_replacing_stub_ldmdb): Likewise.
296 (stm32l4xx_create_replacing_stub_vldm): Likewise.
297 (elf32_arm_write_section): Use pointer type for veneer addresses.
298
6f4b1afc
CM
2992015-10-28 Cupertino Miranda <cmiranda@synopsys.com>
300
301 * reloc.c (BFD_RELOC_ARC_32_PCREL): New entry.
302 * elf32-arc.c (arc_elf_howto_ini): Update formula.
303 (get_middle_endian_relocation): New function.
304 (PDATA): Define.
305 * bfd-in2.h: Regenerate.
306 * libbfd.h: Likewise.
307
199af150
AM
3082015-10-28 Alan Modra <amodra@gmail.com>
309
310 PR ld/19162
311 * elflink.c (_bfd_elf_gc_mark_reloc): Move code iterating over
312 linker input bfds..
313 * section.c (bfd_get_next_section_by_name): ..to here. Add ibfd param.
314 (bfd_get_linker_section): Adjust bfd_get_next_section_by_name call.
315 * tekhex.c (first_phase): Likewise.
316 * elflink.c (bfd_elf_gc_sections): Likewise.
317 * bfd-in2.h: Regenerate.
318
a504d23a
LA
3192015-10-27 Laurent Alfonsi <laurent.alfonsi@st.com>
320 Christophe Monat <christophe.monat@st.com>
321
322 * bfd-in2.h: Regenerate.
323 * bfd-in.h (bfd_arm_stm32l4xx_fix): New enum. Specify how
324 STM32L4XX instruction scanning should be done.
325 (bfd_elf32_arm_set_stm32l4xx_fix)
326 (bfd_elf32_arm_stm32l4xx_erratum_scan)
327 (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): Add prototypes.
328 (bfd_elf32_arm_set_target_relocs): Add stm32l4xx fix type argument
329 to prototype.
330 * elf32-arm.c (STM32L4XX_ERRATUM_VENEER_SECTION_NAME)
331 (STM32L4XX_ERRATUM_VENEER_ENTRY_NAME): Define macros.
332 (elf32_stm32l4xx_erratum_type): New enum.
333 (elf32_stm32l4xx_erratum_list): New struct. List of veneers or
334 jumps to veneers.
335 (_arm_elf_section_data): Add stm32l4xx_erratumcount,
336 stm32l4xx_erratumlist.
337 (elf32_arm_link_hash_table): Add stm32l4xx_erratum_glue_size,
338 stm32l4xx_fix and num_stm32l4xx_fixes fields.
339 (ctz): New function.
340 (popcount): New function.
341 (elf32_arm_link_hash_table_create): Initialize stm32l4xx_fix.
342 (put_thumb2_insn): New function.
343 (STM32L4XX_ERRATUM_LDM_VENEER_SIZE): Define. Size of a veneer for
344 LDM instructions.
345 (STM32L4XX_ERRATUM_VLDM_VENEER_SIZE): Define. Size of a veneer for
346 VLDM instructions.
347 (bfd_elf32_arm_allocate_interworking_sections): Initialise erratum
348 glue section.
349 (record_stm32l4xx_erratum_veneer) : New function. Create a single
350 veneer, and its associated symbols.
351 (bfd_elf32_arm_add_glue_sections_to_bfd): Add STM32L4XX erratum glue.
352 (bfd_elf32_arm_set_stm32l4xx_fix): New function. Set the type of
353 erratum workaround required.
354 (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): New function. Find
355 out where veneers and branches to veneers have been placed in
356 virtual memory after layout.
357 (is_thumb2_ldmia): New function.
358 (is_thumb2_ldmdb): Likewise.
359 (is_thumb2_vldm ): Likewise.
360 (stm32l4xx_need_create_replacing_stub): New function. Decide if a
361 veneer must be emitted.
362 (bfd_elf32_arm_stm32l4xx_erratum_scan): Scan the sections of an
363 input BFD for potential erratum-triggering insns. Record results.
364 (bfd_elf32_arm_set_target_relocs): Set stm32l4xx_fix field in
365 global hash table.
366 (elf32_arm_size_dynamic_sections): Collect glue information.
367 (create_instruction_branch_absolute): New function.
368 (create_instruction_ldmia): Likewise.
369 (create_instruction_ldmdb): Likewise.
370 (create_instruction_mov): Likewise.
371 (create_instruction_sub): Likewise.
372 (create_instruction_vldmia): Likewise.
373 (create_instruction_vldmdb): Likewise.
374 (create_instruction_udf_w): Likewise.
375 (create_instruction_udf): Likewise.
376 (push_thumb2_insn32): Likewise.
377 (push_thumb2_insn16): Likewise.
378 (stm32l4xx_fill_stub_udf): Likewise.
379 (stm32l4xx_create_replacing_stub_ldmia): New function. Expands the
380 replacing stub for ldmia instructions.
381 (stm32l4xx_create_replacing_stub_ldmdb): Likewise for ldmdb.
382 (stm32l4xx_create_replacing_stub_vldm): Likewise for vldm.
383 (stm32l4xx_create_replacing_stub): New function. Dispatches the
384 stub emission to the appropriate functions.
385 (elf32_arm_write_section): Output veneers, and branches to veneers.
386
d6867a75
SM
3872015-10-27 Sangamesh Mallayya <nickc@redhat.com>sangamesh.swamy@in.ibm.com>
388
389 * configure.ac (powerpc64-*-aix[5-9].*): Match powerpc64 running
390 aix for core file support.
391 * configure: Regenerate.
392 * rs6000-core.c: Check for __ld_info64 if compiling 64-bit gdb.
393 Added BFD64 check if we are using old core file format for 32-bit gdb.
394 Set sizeof CORE_COMMONSZ appropriately in case of either new or
395 old core file format.
396 (read_hdr): Added BFD64 check for 64-bit support.
397 (rs6000coff_core_p): Likewise.
398 (rs6000coff_core_file_matches_executable_p): Likewise.
399 (rs6000coff_core_file_failing_command): Likewise.
400 (rs6000coff_core_file_failing_signal): Likewise.
401 Add support for debugging core files generated by binaries in
402 Large Memory model.
403 (rs6000coff_core_p): If Large Memory Model is used, then the .data
404 segment should start from BDATAORG which has been defined in the
405 system header files.
406
7b7e7f1d
L
4072015-10-26 H.J. Lu <hongjiu.lu@intel.com>
408
409 PR ld/19175
410 * elf32-i386.c (elf_i386_convert_load): Check bfd_link_hash_new
411 instead of calling bfd_link_get_defined_symbol.
412 * elf64-x86-64.c (elf_x86_64_convert_load): Likewise. Skip
413 relocation overflow for bfd_link_hash_new.
414 * linker.c (bfd_link_get_defined_symbol): Removed.
415 * bfd-in2.h: Regenerated.
416
a6af384b
L
4172015-10-26 H.J. Lu <hongjiu.lu@intel.com>
418
419 PR ld/19171
420 * elf32-i386.c (elf_i386_convert_load): Call
421 bfd_link_get_defined_symbol to check if a symbol is defined.
422 * elf64-x86-64.c (elf_x86_64_convert_load): Call
423 bfd_link_get_defined_symbol to get defined symbol section and
424 value.
425 * linker.c (bfd_link_get_defined_symbol): New function.
426 * bfd-in2.h: Regenerated.
427
1cce69b9
AM
4282015-10-23 Alan Modra <amodra@gmail.com>
429
430 PR ld/11133
431 PR ld/19161
432 PR ld/19167
433 * elflink.c (_bfd_elf_gc_mark_hook): Delete code handling __start_*
434 and __stop_* symbol refs.
435 (_bfd_elf_gc_mark_rsec): Add start_stop parameter. Handle __start_*
436 and __stop_* symbol refs here..
437 (_bfd_elf_gc_mark_reloc): ..and here.
438 * elf-bfd.h (_bfd_elf_gc_mark_hook): Update prototype.
439 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Update
440 _bfd_elf_gc_mark_rsec call.
441
1e7eae0d
AM
4422015-10-23 Alan Modra <amodra@gmail.com>
443
444 PR ld/11133
445 PR ld/19161
446 * elflink.c (elf_gc_sweep): Revert last patch.
447 (_bfd_elf_gc_mark_hook): Don't set SEC_KEEP here.
448
bba037e0
L
4492015-10-22 H.J. Lu <hongjiu.lu@intel.com>
450
451 PR ld/19161
452 * elflink.c (elf_gc_sweep): Always keep sections marked with
453 SEC_KEEP.
454
c287bfe4
HPN
4552015-10-22 Hans-Peter Nilsson <hp@bitrange.com>
456
457 * mmo.c (struct mmo_data_struct): New members
458 symbol_consistency_override_calculated and ignore_symbol_consistency.
459 (mmo_section_has_contents, mmo_ignore_symbol_consistency): New
460 functions.
461 (mmo_create_symbol): Check with mmo_ignore_symbol_consistency if to
462 report an error for unexpected value of Main.
463 (mmo_write_symbols_and_terminator): Similar.
464
caa65211
L
4652015-10-22 H.J. Lu <hongjiu.lu@intel.com>
466
467 * elf32-i386.c (elf_i386_convert_load): Use call_nop_byte and
468 check call_nop_as_suffix for 1-byte NOP padding to pad call.
469 * elf64-x86-64.c (elf_x86_64_convert_load): Likewise.
470
56ceb5b5
L
4712015-10-22 H.J. Lu <hongjiu.lu@intel.com>
472
473 * elf64-x86-64.c: Include opcode/i386.h.
474 (x86_64_elf_howto_table): Add R_X86_64_GOTPCRELX and
475 R_X86_64_REX_GOTPCRELX.
476 (R_X86_64_standard): Replace R_X86_64_PLT32_BND with
477 R_X86_64_REX_GOTPCRELX.
478 (x86_64_reloc_map): Add BFD_RELOC_X86_64_GOTPCRELX and
479 BFD_RELOC_X86_64_REX_GOTPCRELX.
480 (need_convert_mov_to_lea): Renamed to ...
481 (need_convert_load): This.
482 (elf_x86_64_check_relocs): Handle R_X86_64_GOTPCRELX and
483 R_X86_64_REX_GOTPCRELX. Replace need_convert_mov_to_lea with
484 need_convert_load.
485 (elf_x86_64_gc_sweep_hook): Handle R_X86_64_GOTPCRELX and
486 R_X86_64_REX_GOTPCRELX.
487 (elf_x86_64_size_dynamic_sections): Likewise.
488 (elf_x86_64_relocate_section): Likewise.
489 (elf_x86_64_convert_mov_to_lea): Renamed to ...
490 (elf_x86_64_convert_load): This. Replace need_convert_mov_to_lea
491 with need_convert_load. Support R_X86_64_GOTPCRELX and
492 R_X86_64_REX_GOTPCRELX transformations.
493 * reloc.c (BFD_RELOC_X86_64_GOTPCRELX): New.
494 (BFD_RELOC_X86_64_REX_GOTPCRELX): Likewise.
495 * bfd-in2.h: Regenerated.
496 * libbfd.h: Likewise.
497
02a86693
L
4982015-10-22 H.J. Lu <hongjiu.lu@intel.com>
499
500 * elf32-i386.c: Include opcode/i386.h.
501 (elf_howto_table): Add R_386_GOT32X.
502 (R_386_ext2): Replace R_386_IRELATIVE with R_386_GOT32X.
503 (elf_i386_reloc_type_lookup): Handle BFD_RELOC_386_GOT32X.
504 (need_convert_mov_to_lea): Renamed to ...
505 (need_convert_load): This.
506 (elf_i386_check_relocs): Handle R_386_GOT32X. Replace
507 need_convert_mov_to_lea with need_convert_load.
508 (elf_i386_gc_sweep_hook): Handle R_386_GOT32X.
509 (elf_i386_size_dynamic_sections): Likewise.
510 (elf_i386_relocate_section): Likewise.
511 (elf_i386_convert_mov_to_lea): Renamed to ...
512 (elf_i386_convert_load): This. Replace need_convert_mov_to_lea
513 with need_convert_load. Support R_386_GOT32X transformations.
514 * reloc.c (BFD_RELOC_386_GOT32X): New.
515 * bfd-in2.h: Regenerated.
516 * libbfd.h: Likewise.
517
99ba5125
AK
5182015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
519
520 * elf32-s390.c (elf_s390_check_relocs): Set the non_got_ref marker
521 only when linking an executable.
522 (elf_s390_relocate_section): Redirect PC-relative relocs to a IPLT
523 slot.
524 * elf64-s390.c (elf_s390_check_relocs): Set the non_got_ref marker
525 only when linking an executable.
526 (elf_s390_relocate_section): Redirect PC-relative relocs to a IPLT
527 slot.
528
d8ee9e44
AK
5292015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
530
531 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Set the PLT
532 reference counters for local IFUNC calls.
533 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
534
01a53584
AK
5352015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
536
537 * elf32-s390.c (elf_s390_check_relocs): Fallthrough to the PLT
538 slot allocating code for GOTOFF relocs on ifunc symbols.
539 (elf_s390_gc_sweep_hook): Decrement plt refcount for GOTOFF relocs
540 on ifunc symbols.
541 (elf_s390_relocate_section): Redirect a GOTOFF reloc to an iplt
542 slot.
543
0f042c67
AK
5442015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
545
546 PR ld/18841
547 * elf32-s390.c (elf_s390_reloc_type_class): Return
548 reloc_class_ifunc for ifunc symbols.
549 * elf64-s390.c (elf_s390_reloc_type_class): Likewise.
550
0a511368
AK
5512015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
552
553 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Call
554 elf_s390_finish_ifunc_symbol only for actually defined symbols.
555 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
556
61643fba
AK
5572015-10-22 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
558
559 * elf-s390-common.c (s390_elf_allocate_ifunc_dyn_relocs): Remove
560 `head' parameter.
561 * elf32-s390.c (allocate_dynrelocs): Don't use last parameter.
562 * elf64-s390.c (allocate_dynrelocs): Don't use last parameter.
563
f9c62303
HPN
5642015-10-20 Hans-Peter Nilsson <hp@bitrange.com>
565
566 * mmo.c (mmo_write_symbols_and_terminator): Correct printed value
567 of Main in error message.
568
434d28e0
DE
5692015-10-18 Doug Evans <xdje42@gmail.com>
570
571 * targets.c (bfd_flavour_name): "MMO" is spelled "mmo".
572
9f08fa5c
AM
5732015-10-17 Alan Modra <amodra@gmail.com>
574
575 * elf64-ppc.c (ppc64_elf_size_stubs): Correct __glink_PLTresolve
576 eh_frame FDE for ELFv1.
577
75a06c79
L
5782015-10-16 H.J. Lu <hongjiu.lu@intel.com>
579
580 * elf32-i386.c (elf_i386_convert_mov_to_lea): Check if symbol
581 is defined.
582 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
583
b31bcacc
L
5842015-10-16 H.J. Lu <hongjiu.lu@intel.com>
585
586 * elf32-i386.c (elf_i386_convert_mov_to_lea): Don't check
587 def_regular.
588 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
589
ae7683d2
L
5902015-10-15 H.J. Lu <hongjiu.lu@intel.com>
591
592 * elflink.c (_bfd_elf_merge_symbol): Fix typos in comments
593
e43fb831
AM
5942015-10-15 Alan Modra <amodra@gmail.com>
595
596 * elf32-v850.c (v850_elf_copy_private_bfd_data): Remove assertion
597 that input and output .note.renesas sections are same size.
598 Instead, only copy input to output if they are.
599
b32a5c16
RV
6002015-10-15 Riku Voipio <riku.voipio@iki.fi>
601
602 PR ld/19123
603 * elfcore.h (elf_core_file_p): Use the file_ptr type to hold the
604 offset for bfd_seek.
605 * elfcode.h (elf_object_p): Likewise.
606
b4b0e149
RF
6072015-10-14 Rich Felker <dalias@libc.org>
608
609 PR ld/19091
610 * elf32-sh.c (sh_elf_size_dynamic_sections): Always emit
611 DT_PLTGOT for FDPIC output.
612
341b8ee7
AM
6132015-10-13 Alan Modra <amodra@gmail.com>
614
615 * elf.c (_bfd_elf_map_sections_to_segments): Don't set
616 PT_GNU_RELRO p_flags.
617 (assign_file_positions_for_non_load_sections): Set PT_GNU_RELRO
618 flags to PF_R here.
619
4373f8af
L
6202015-10-12 H.J. Lu <hongjiu.lu@intel.com>
621
622 PR ld/19073
623 * elflink.c (_bfd_elf_add_default_symbol): Skip the unversioned
624 definition after the default version.
625
ef05be83
AK
6262015-10-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
627
628 PR ld/19083
629 * elf32-s390.c (elf_s390_gc_sweep_hook): Do not reduce got
630 refcount for relocs not really requiring a got slot.
631 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
632
da6e19a9
JDA
6332015-10-11 John David Anglin <danglin@gcc.gnu.org>
634
635 * elf-hppa.h (elf_hppa_action_discarded): Ignore relocations in
636 .data.rel.ro.local.
637
886a2506
NC
6382015-10-07 Cupertino Miranda <cmiranda@synopsys.com>
639
640 * archures.c: Remove support for older ARC. Added support for new
641 ARC cpus (ARC600, ARC601, ARC700, ARCV2).
642 * bfd-in2.h: Likewise.
643 * config.bfd: Likewise.
644 * cpu-arc.c: Likewise.
645 * elf32-arc.c: Totally changed file with a refactored
646 inplementation of the ARC port.
647 * libbfd.h: Added ARC specific relocation types.
648 * reloc.c: Likewise.
649
8c6da3df
L
6502015-10-06 H.J. Lu <hongjiu.lu@intel.com>
651
652 * bfd.c (bfd_update_compression_header): Clear the ch_reserved
653 field in 64-bit output.
654 (bfd_convert_section_contents): Likewise.
655
a0d49154
L
6562015-10-05 H.J. Lu <hongjiu.lu@intel.com>
657
658 PR ld/18914
659 * elflink.c (elf_link_add_object_symbols): Don't re-export a
660 symbol if it isn't undefined.
661
d00c2bc9
L
6622015-10-04 H.J. Lu <hongjiu.lu@intel.com>
663
664 * config.bfd (targ_selvecs, targ64_selvecs): Add iamcu_elf32_vec,
665 i386_pei_vec and x86_64_pei_vec for Solaris2/x86.
666
0484b454
RL
6672015-10-02 Renlin Li <renlin.li@arm.com>
668
669 * elfnn-aarch64.c (aarch64_tls_transition_without_check): Add
670 relax transitions for TLSDESC_ADD, TLSDESC_LDR, TLSDESC_OFF_G0_NC,
671 TLSDESC_OFF_G1.
672 (aarch64_tls_transition_without_check): Add relaxation support.
673 (aarch64_reloc_got_type): Add support.
674 (elfNN_aarch64_final_link_relocate): Likewise.
675 (elfNN_aarch64_tls_relax): Likewise.
676 (elfNN_aarch64_relocate_section): Likewise.
677 (elfNN_aarch64_gc_sweep_hook): Likewise.
678 (elfNN_aarch64_check_relocs): Likewise.
679 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
680 (_bfd_aarch64_elf_resolve_relocation): Likewise.
681
43a357f9
RL
6822015-10-02 Renlin Li <renlin.li@arm.com>
683
684 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Check overflow for
685 BFD_RELOC_AARCH64_TLSDESC_OFF_G1.
686
ac734732
RL
6872015-10-02 Renlin Li <renlin.li@arm.com>
688
689 * elfnn-aarch64.c(IS_AARCH64_TLS_RELAX_RELOC):
690 Add relaxation support for TLSGD_MOVW_G0_NC and TLSGD_MOVW_G1.
691 (aarch64_tls_transition_without_check): Likewise
692 (elfNN_aarch64_tls_relax): Likwise.
693
b7a944fe
RL
6942015-10-02 Renlin Li <renlin.li@arm.com>
695
696 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Create GOT section
697 for TLSLE_MOVW_TPREL_G(1, 1_NC, 2) relocation.
698
3b957e5b
RL
6992015-10-02 Renlin Li <renlin.li@arm.com>
700
701 * reloc.c: Make AARCH64_TLSIE_MOVW_GOTTPREL_G1 and
702 AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC defined in alphabetical order.
703 * libbfd.h: Regenerate.
704 * bfd-in2.h: Likewise.
705 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Make
706 TLSIE_MOVW_GOTTPREL_G1 check overflow.
707 (aarch64_reloc_got_type): Add support for TLSIE_MOVW_GOTTPREL_G1
708 and TLSIE_MOVW_GOTTPREL_G0_NC.
709 (elfNN_aarch64_final_link_relocate): Likewise.
710 (elfNN_aarch64_relocate_section): Likewise.
711 (elfNN_aarch64_gc_sweep_hook): Likewise.
712 (elfNN_aarch64_check_relocs): Likewise.
713 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
714 (_bfd_aarch64_elf_resolve_relocation): Likewise.
715
7ba7cfe4
RL
7162015-10-02 Renlin Li <renlin.li@arm.com>
717
718 * elfnn-aarch64.c (aarch64_reloc_got_type): Add
719 BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC support.
720 (elfNN_aarch64_final_link_relocate): Likewise.
721 (elfNN_aarch64_relocate_section): Likewise.
722 (elfNN_aarch64_gc_sweep_hook): Likewise.
723 (elfNN_aarch64_check_relocs): Likewise.
724 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
725 (_bfd_aarch64_elf_resolve_relocation): Likewise.
726
3e8286c0
RL
7272015-10-02 Renlin Li <renlin.li@arm.com>
728
729 * reloc.c (BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC): New entry.
730 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
731 BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC.
732 * libbfd.h: Regenerate.
733 * bfd-in2.h: Likewise
734
94facae3
RL
7352015-10-02 Renlin Li <renlin.li@arm.com>
736
737 * elfnn-aarch64.c (aarch64_reloc_got_type): Add
738 BFD_RELOC_AARCH64_TLSGD_MOVW_G1 support.
739 (elfNN_aarch64_final_link_relocate): Likewise.
740 (elfNN_aarch64_relocate_section): Likewise.
741 (elfNN_aarch64_gc_sweep_hook): Likewise.
742 (elfNN_aarch64_check_relocs): Likewise.
743 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
744 (_bfd_aarch64_elf_resolve_relocation): Likewise.
745
1aa66fb1
RL
7462015-10-02 Renlin Li <renlin.li@arm.com>
747
748 * reloc.c (BFD_RELOC_AARCH64_TLSGD_MOVW_G1): New entry.
749 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
750 BFD_RELOC_AARCH64_TLSGD_MOVW_G1.
751 * bfd-in2.h: Regenerate.
752 * libbfd.h: Likewise.
753
dc8008f5
RL
7542015-10-02 Renlin Li <renlin.li@arm.com>
755
756 * elfnn-aarch64.c (aarch64_reloc_got_type): Add
757 BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC support.
758 (elfNN_aarch64_final_link_relocate): Likewise.
759 (elfNN_aarch64_gc_sweep_hook): Likewise.
760 (elfNN_aarch64_check_relocs): Likewise.
761 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
762 (_bfd_aarch64_elf_resolve_relocation): Likewise.
763
ca632371
RL
7642015-10-02 Renlin Li <renlin.li@arm.com>
765
766 * reloc.c (BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC): New.
767 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry
768 MOVW_GOTOFF_G0_NC.
769 * libbfd.h: Regnerate.
770 * bfd-in2.h: Regenerate.
771
74a1bfe1
RL
7722015-10-02 Renlin Li <renlin.li@arm.com>
773
774 * elfnn-aarch64.c (aarch64_reloc_got_type): Add support
775 for BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
776 (elfNN_aarch64_gc_sweep_hook): Likewise.
777 (elfNN_aarch64_check_relocs): Likewise
778 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
779 (_bfd_aarch64_elf_resolve_relocation): Likewise
780 (elfNN_aarch64_final_link_relocate): Likewise
781
654248e7
RL
7822015-010-02 Renlin Li <renlin.li@arm.com>
783
784 * reloc.c (BFD_RELOC_AARCH64_MOVW_GOTOFF_G1): New.
785 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
786 MOVW_GOTOFF_G1.
787 * libbfd.h: Regenerate.
788 * bfd-in2.h: Regenerate.
789
a2e1db00
RL
7902015-10-02 Renlin Li <renlin.li@arm.com>
791
792 * elfnn-aarch64.c (aarch64_reloc_got_type): Add
793 BFD_RELOC_AARCH64_LD_64_GOTOFF_LO15 support.
794 (elfNN_aarch64_gc_sweep_hook): Likewise.
795 (elfNN_aarch64_check_relocs): Likewise
796 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
797 (_bfd_aarch64_elf_resolve_relocation): Likewise
798 (elfNN_aarch64_final_link_relocate): Calculate offset within GOT.
799
a0becb89
RL
8002015-10-02 Renlin Li <renlin.li@arm.com>
801
802 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Change if to
803 switch statement.
804
5db4f0d3
L
8052015-10-01 H.J. Lu <hongjiu.lu@intel.com>
806
807 PR ld/19031
808 * elf64-x86-64.c (elf_x86_64_check_relocs): Set
809 pointer_equality_needed for R_X86_64_PC32 reloc in non-code
810 sections.
811
73524045
RL
8122015-10-01 Renlin Li <renlin.li@arm.com>
813
814 * elfnn-aarch64.c (elfNN_aarch64_output_plt_map): Remove.
815 (elfNN_aarch64_output_arch_local_syms): Emit AARCH64_MAP_INSN once.
816
de48f481
KK
8172015-10-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
818
819 * config.bfd (targ_selvecs): Remove sh_elf32_vec and
820 sh_elf32_le_vec from sh*-*-linux cases.
821
017e6bce
AM
8222015-10-01 Alan Modra <amodra@gmail.com>
823
824 PR ld/19013
825 * elflink.c (_bfd_elf_merge_sections): Revert last change.
826
4b627c18
L
8272015-09-30 H.J. Lu <hongjiu.lu@intel.com>
828
829 PR ld/19031
830 * elf32-i386.c (elf_i386_check_relocs): Set
831 pointer_equality_needed for R_386_PC32 reloc in non-code
832 sections.
833
9865bd0d
L
8342015-09-30 H.J. Lu <hongjiu.lu@intel.com>
835
836 PR ld/19013
837 * elflink.c (_bfd_elf_merge_sections): Only merge input bfds
838 that have the compatible ELF machine code with the output bfd.
839
630993ec
AM
8402015-09-30 Alan Modra <amodra@gmail.com>
841
842 PR ld/19013
843 * elflink.c (_bfd_elf_merge_sections): Only merge input bfds that
844 will be handled by elf_link_input_bfd. Rename abfd param to obfd.
845
6c4f2328
RF
8462015-09-30 Rich Felker <dalias@libc.org>
847
848 * config.bfd (targ_selvecs): Add fdpic and misc targets
849 for sh*-*-linux*.
850
cbd44e24
L
8512015-09-29 Andrew Stubbs <ams@codesourcery.com>
852 H.J. Lu <hongjiu.lu@intel.com>
853
854 PR binutils/19020
855 * bfd.c (bfd_convert_section_contents): Add ptr_size parameter.
856 * bfd-in2.h: Regenerated.
857
8a9e7a91
PZ
8582015-08-11 Peter Zotov <whitequark@whitequark.org>
859
860 PR ld/18759
861 * elf32-or1k.c (R_OR1K_32_PCREL): Set pcrel_offset to TRUE.
862 (R_OR1K_16_PCREL): Likewise.
863 (R_OR1K_8_PCREL): Likewise.
864
b6518b38
NC
8652015-09-23 Nick Clifton <nickc@redhat.com>
866
867 * bout.c (b_out_slurp_reloc_table): Cast constant to unsigned in
868 order to avoid problems with left shifting negative values.
869 (abs32code): Likewise.
870 * mach-o.c (FILE_ALIGN): Likewise.
871 * coff-rs6000.c (xcoff_debug_sections): Delete unused static
872 array.
873 * elf32-visium.c (visium_reloc_map): Likewise.
874 * elf32-arm.c (elf32_arm_final_link_relocate): Remove useless
875 calls to abs function.
876 * elf32-frv.c (_frvfdpic_relax_tls_entries): Likewise.
877 * elf32-score.c (score_elf_final_link_relocate): Likewise.
878 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
879 * elf32-i860.c (i860_howto_pc26_reloc): Use multiplication instead
880 of shifting to create a negative mask.
881 * elf32-msp430.c (elf_backend_special_sections): Define.
882 * elfxx-mips.c (got_ofst_reloc_p): Delete unused function.
883 (got_hi16_reloc_p): Delete unused function.
884 * ppcboot.c (ppcboot_bfd_print_private_bfd_data): Fix test of
885 partition name.
886
6a40cf0c
NC
8872015-09-23 Nick Clifton <nickc@redhat.com>
888
889 PR binutils/15835
890 * elf-bfd.h (struct elf_section_list): New structure.
891 (struct elf_obj_tdata): Replace symtab_shndx_hdr with
892 symtab_shndx_list. Delete symtab_shndx_section.
893 (elf_symtab_shndx): Replace macro with elf_symtab_shndx_list.
894 * elf.c (bfd_elf_get_syms): If symtab index sections are present,
895 scan them for the section that matches the provided symbol table.
896 (bfd_section_from_shdr): Record all SHT_SYMTAB_SHNDX sections.
897 (assign_section_numbers): Use the first symtab index table in the
898 list.
899 (_bfd_elf_compute_section_file_positions): Replace use of
900 symtab_shndx_hdr with use of symtab_shndx_list.
901 (find_section_in_list): New function.
902 (assign_file_postions_except_relocs): Use new function.
903 (_bfd_elf_copy_private_symbol_data): Likewise.
904 (swap_out_syms): Handle multiple symbol table index sections.
905 * elf32-m32c.c (m32c_elf_relax_section): Replace use of
906 symtab_shndx_hdr with use of symtab_shndx_list.
907 * elf32-rl78.c (rl78_elf_relax_section): Likewise.
908 * elf32-rx.c (rx_relax_section): Likewise.
909 * elf32-v850.c (v850_elf_relax_delete_bytes): Likewise.
910 * elflink.c (bfd_elf_final_link): Likewise.
911
c8b187ea
L
9122015-09-21 H.J. Lu <hongjiu.lu@intel.com>
913
914 * bfd.c (bfd_update_compression_header): Use bfd_put_32 on
915 ch_type.
916 (bfd_check_compression_header): Use bfd_get_32 on ch_type.
917 (bfd_convert_section_contents): Use bfd_get_32 and bfd_put_32
918 on ch_type.
919
9b8b325a
RF
9202015-09-20 Rich Felker <dalias@libc.org>
921
922 * elflink.c (_bfd_elf_link_create_dynamic_sections): Don't create
923 .interp when info->nointerp.
924 (bfd_elf_size_dynamic_sections): Adjust assert.
925 * elf32-arm.c (elf32_arm_size_dynamic_sections): Don't size .interp
926 when info->nointerp.
927 * elf32-bfin.c (elf32_bfinfdpic_size_dynamic_sections): Likewise.
928 * elf32-cr16.c (_bfd_cr16_elf_size_dynamic_sections): Likewise.
929 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
930 * elf32-frv.c (elf32_frvfdpic_size_dynamic_sections): Likewise.
931 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
932 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
933 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
934 * elf32-lm32.c (lm32_elf_size_dynamic_sections): Likewise.
935 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Likewise.
936 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
937 * elf32-metag.c (elf_metag_size_dynamic_sections): Likewise.
938 * elf32-nds32.c (nds32_elf_size_dynamic_sections): Likewise.
939 * elf32-nios2.c (nios2_elf32_size_dynamic_sections): Likewise.
940 * elf32-or1k.c (or1k_elf_size_dynamic_sections): Likewise.
941 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
942 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
943 * elf32-score.c (s3_bfd_score_elf_size_dynamic_sections): Likewise.
944 * elf32-score7.c (s7_bfd_score_elf_size_dynamic_sections): Likewise.
945 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
946 * elf32-tic6x.c (elf32_tic6x_size_dynamic_sections): Likewise.
947 * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Likewise.
948 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
949 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
950 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
951 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
952 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Likewise.
953 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
954 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
955 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
956 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic_sections): Likewise.
957 * elfnn-ia64.c (elfNN_ia64_size_dynamic_sections): Likewise.
958 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
959 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
960 * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): Likewise.
961
015d2e7e
DE
9622015-09-18 Doug Evans <xdje42@gmail.com>
963
964 * targets.c (enum bfd_flavour): Add comment.
965 (bfd_flavour_name): New function.
966 * bfd-in2.h: Regenerate.
967
7c9cf415
AM
9682015-09-18 Alan Modra <amodra@gmail.com>
969
970 * elf64-ppc.h (struct ppc64_elf_params <tls_get_addr_opt>): Rename
971 from no_tls_get_addr_opt.
972 * elf64-ppc.c: Update for rename and inversion of tls_get_addr_opt.
973 (ppc64_elf_tls_setup): Set tls_get_addr_opt to 0 only when at
974 default of -1.
975
b29b8669
AM
9762015-09-17 Alan Modra <amodra@gmail.com>
977
978 PR 18867
979 * elflink.c (elf_link_adjust_relocs): Correct start of insertion
980 sort main loop.
981
bca6d0e3
AM
9822015-09-16 Alan Modra <amodra@gmail.com>
983
984 PR 18867
985 * elflink.c (elf_link_adjust_relocs): Modify insertion sort to
986 insert a run. Return status in case of malloc failure.
987 Adjust callers.
988
92b3f008
MF
9892015-09-15 Max Filippov <jcmvbkbc@gmail.com>
990
991 * elf32-xtensa.c (elf_xtensa_be_plt_entry)
992 (elf_xtensa_le_plt_entry): Emit 'entry' instruction only for
993 windowed ABI.
994 (elf_xtensa_create_plt_entry): Generate 'l32r' offsets and fix
995 up instructions according to ABI.
996
fbedb42d
RF
9972015-09-14 Rich Felker <dalias@libc.org>
998
999 * elf32-sh.c (sh_elf_relocate_section): Set EF_SH_PIC flag
1000 instead of clearing it on cross-section relocations.
1001 (sh_elf_merge_private_data): Clear EF_SH_PIC flag by default.
1002
f3c3938c
JDA
10032015-09-12 Helge Deller <deller@gmx.de>
1004
1005 PR ld/18514
1006 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Set .plt entry
1007 size to 0.
1008
4af68b9c
JW
10092015-09-09 Jiong Wang <jiong.wang@arm.com>
1010
1011 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Sort alphabetically.
1012
259364ad
JW
10132015-09-09 Jiong Wang <jiong.wang@arm.com>
1014
1015 * elfnn-aarch64.c (aarch64_tls_transition_without_check): Support three
1016 TLS local dynamic traditional relocations types.
1017 (elfNN_aarch64_tls_relax): Support TLS local dynamic traditional to
1018 local executable relaxation.
1019
77697d41
L
10202015-09-03 H.J. Lu <hongjiu.lu@intel.com>
1021
1022 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Remove
1023 convert_mov_to_lea.
1024
c74be520
L
10252015-09-02 H.J. Lu <hongjiu.lu@intel.com>
1026
1027 * elf32-i386.c (R_386_irelative): Renamed to ...
1028 (R_386_ext2): This.
1029 (R_386_vt_offset): Updated.
1030 (elf_i386_rtype_to_howto): Likewise.
1031 (elf_i386_relocate_section): Likewise.
1032
04ebc307
L
10332015-09-01 H.J. Lu <hongjiu.lu@intel.com>
1034
1035 PR ld/18900
1036 * elf32-i386.c (elf_i386_link_hash_entry): Add
1037 func_pointer_refcount.
1038 (elf_i386_link_hash_newfunc): Clear func_pointer_refcount.
1039 (elf_i386_get_local_sym_hash): Likewise.
1040 (elf_i386_copy_indirect_symbol): Also copy
1041 func_pointer_refcount.
1042 (elf_i386_check_relocs): Increment func_pointer_refcount.
1043 (elf_i386_gc_sweep_hook): Decrement func_pointer_refcount.
1044 (elf_i386_allocate_dynrelocs): Don't create the PLT entry if
1045 there are only function pointer relocations which can be
1046 resolved at run-time. Keep dynanamic relocations for run-time
1047 function pointer initialization.
1048 (elf_i386_relocate_section): Copy dynamic function pointer
1049 relocations.
1050 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
1051 func_pointer_refcount.
1052 (elf_x86_64_link_hash_newfunc): Clear func_pointer_refcount.
1053 (elf_x86_64_get_local_sym_hash): Likewise.
1054 (elf_x86_64_copy_indirect_symbol): Also copy
1055 func_pointer_refcount.
1056 (elf_x86_64_check_relocs): Increment func_pointer_refcount.
1057 (elf_x86_64_gc_sweep_hook): Decrement func_pointer_refcount.
1058 (elf_x86_64_allocate_dynrelocs): Don't create the PLT entry if
1059 there are only function pointer relocations which can be
1060 resolved at run-time. Keep dynanamic relocations for run-time
1061 function pointer initialization.
1062 (elf_x86_64_relocate_section): Copy dynamic function pointer
1063 relocations.
1064
b07bca4e
AM
10652015-09-01 Alan Modra <amodra@gmail.com>
1066
1067 * elf64-ppc.c (ppc64_elf_maybe_function_sym): Adjust symbol value
1068 if .opd section has been edited.
1069
a4b6fadd
AM
10702015-09-01 Alan Modra <amodra@gmail.com>
1071
1072 PR 18878
1073 * elf64-ppc.c (ARRAY_SIZE): Define. Use throughout.
1074 (enum ppc_stub_type): Add ppc_stub_save_res.
1075 (struct map_stub): Add "next" and "needs_save_res".
1076 (struct ppc_link_hash_entry): Add "save_res" flag.
1077 (struct ppc_link_hash_table): Add "group".
1078 (sfpr_define): Add stub_sec param. Define symbol in stub_sec if
1079 stub_sec is non-null. Set "save_res".
1080 (save_res_funcs): Make file scope, rename from funcs. Adjust uses.
1081 (ppc64_elf_adjust_dynamic_symbol): Prohibit plt call to save_res syms.
1082 (ppc_build_one_stub): Handle ppc_stub_save_res.
1083 (ppc_size_one_stub): Set stub type to ppc_size_one_stub on finding
1084 stub for linker defined save_res sym.
1085 (group_sections): Init new fields of struct map_stub.
1086 (ppc64_elf_size_stubs): Reserve space for save/restore func copy.
1087 (ppc64_elf_build_stubs): Copy save/restore funcs to groups. Emit
1088 alias syms too.
1089 (ppc64_elf_relocate_section): Set destination for ppc_stub_save_res.
1090
a7c49797
AM
10912015-08-31 Alan Modra <amodra@gmail.com>
1092
1093 * elf64-ppc.c (get_r2off): Return -1 on error.
1094 (ppc_build_one_stub): Adjust for get_r2off change. Don't emit
1095 addi r2,r2,0 on r2off stubs when the low 16-bit delta is zero.
1096 (ppc_size_one_stub): Corresponding size changes for r2off stubs.
1097 Add condition in test for -R objects.
1098
6f20ed8a
AM
10992015-08-31 Alan Modra <amodra@gmail.com>
1100
1101 * section.c (section_id): Make file scope.
1102 (bfd_get_next_section_id): New function.
1103 * elf64-ppc.c (struct map_stub): Remove toc_off field. Move decl.
1104 (struct ppc_stub_hash_entry): Delete stub_sec and id_sec. Add
1105 group. Update all uses.
1106 (struct ppc_link_hash_table): Delete top_id, top_index, and
1107 input_list. Add sec_info_arr_size. Rename stub_group to
1108 sec_info, and make group info indirect. Update stub_group refs
1109 throughout file.
1110 (ppc_add_stub): Don't look for stub_sec on link_sec stub_group
1111 entry.
1112 (ppc_build_one_stub): Delete FIXME.
1113 (ppc64_elf_setup_section_lists): Size htab->sec_info for all
1114 sections, not just input sections. Don't create htab->input_list.
1115 (ppc64_elf_next_input_section): Update to use sec_info union as
1116 list pointer.
1117 (PREV_SEC): Delete.
1118 (group_sections): Pass "info" param rather than "htab". Iterate
1119 over output sections rather than input_list. Use sec_info union
1120 as list pointers. Alloc atruct map_stub, and return fail status.
1121 * bfd-in2.h: Regenerate.
1122
d3435ae8
AM
11232015-08-31 Alan Modra <amodra@gmail.com>
1124
1125 * elflink.c (elf_sort_symbol): Use correctly sized type for
1126 calculating signed section->id difference.
1127 (elf_link_add_object_symbols): Likewise.
1128 * pef.c (bfd_pef_scan_start_address): Warning fix.
1129 * vms-alpha.c (vms_new_section_hook): Likewise.
1130
6cae483a
AM
11312015-08-31 Alan Modra <amodra@gmail.com>
1132
1133 * elf32-nds32.c (nds32_convert_32_to_16_alu1): Warning fix.
1134 (find_relocs_at_address_addr): Make "reloc_type" an enum.
1135 (nds32_elf_relax_delete_blanks): Warning fix.
1136 (nds32_elf_relax_loadstore): Correct loop bound.
1137
7292b3ac
AM
11382015-08-31 Alan Modra <amodra@gmail.com>
1139
1140 * section.c (struct bfd_section): Make "id" and "index" unsigned.
1141 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Adjust local var to suit.
1142 * elf.c (elf_map_symbols): Likewise.
1143 * elf64-ppc.c (sym_exists_at): Make "id" param unsigned.
1144 (struct ppc_link_hash_table): Make "top_id" and "top_index" unsigned.
1145 (ppc64_elf_setup_section_lists): Ditto for local vars.
1146 * elf32-arm.c: Similarly to elf64-ppc.c.
1147 * elf32-avr.c: Likewise.
1148 * elf32-hppa.c: Likewise.
1149 * elf32-m68hc1x.c: Likewise.
1150 * elf32-metag.c: Likewise.
1151 * elf32-nios2.c: Likewise.
1152 * elfnn-aarch64.c: Likewise.
1153 * simple.c (struct saved_offsets): Make "section_count" unsigned.
1154 * bfd-in2.h: Regenerate.
1155
6fc5bb57
AM
11562015-08-27 Alan Modra <amodra@gmail.com>
1157
a40d44c4 1158 PR 18867
6fc5bb57
AM
1159 * elf64-alpha.c (elf64_alpha_sort_relocs_p): New function.
1160 (elf_backend_sort_relocs_p): Define.
1161
0e287786
AM
11622015-08-26 Alan Modra <amodra@gmail.com>
1163
1164 PR 18867
1165 * elflink.c (cmp_ext32l_r_offset, cmp_ext32b_r_offset): Delete.
1166 (cmp_ext64l_r_offset, cmp_ext64b_r_offset): Delete.
1167 (ext32l_r_offset, ext32b_r_offset, ext64l_r_offset, ext64b_r_offset):
1168 New functions.
1169 (elf_link_adjust_relocs): Use an insertion sort to sort relocs.
1170
c97c330b
MF
11712015-08-26 Matthew Fortune <matthew.fortune@imgtec.com>
1172
1173 PR ld/18401
1174 * elfxx-mips.c (bfd_mips_isa_ext_mach): New function: Converts an
1175 ISA value to a bfd machine number.
1176 (bfd_mips_isa_ext): Update the ISA level and revision if
1177 necessary. Use mips_mach_extends_p to decide if the ISA extension
1178 needs to be set.
1179 (_bfd_mips_elf_merge_private_bfd_data): Allow the ISA extension to
1180 be inferred from the ABI setting. Set the ISA level from the
1181 maximum of the incoming and outgoing ISA levels.
1182
16ad13ec
NC
11832015-08-25 Nick Clifton <nickc@redhat.com>
1184
1185 PR binutils/18854
1186 * elf.c (bfd_section_from_shdr): Replace assertions with warnings
1187 about multiple symbol tables.
1188
7c2bea1a
RL
11892015-08-25 Renlin Li <renlin.li@arm.com>
1190
1191 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): Use LP64 instead of
1192 ILP64.
1193 * bfd-in2.h: Regenerate.
1194
595bce75
AM
11952015-08-22 Alan Modra <amodra@gmail.com>
1196
1197 * elf.c (_bfd_elf_slurp_version_tables): Always init vd_nodename.
1198 Don't copy fields not set by _bfd_elf_swap_verdef_in.
1199
07c9aa07
JW
12002015-08-19 Jiong Wang <jiong.wang@arm.com>
1201
1202 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize new relocation
1203 types, including BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
1204 BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
1205 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
1206 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
1207 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
1208 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
1209 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
1210 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC.
1211 (elfNN_aarch64_final_link_relocate): Likewise.
1212 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1213 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1214
4c562523
JW
12152015-08-19 Jiong Wang <jiong.wang@arm.com>
1216
1217 * reloc.c (BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
1218 BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
1219 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
1220 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
1221 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
1222 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC.
1223 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
1224 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC): New entries.
1225 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
1226 * bfd-in2.h: Regenerate.
1227 * libbfd.h: Regenerate.
1228
6ffe9a1b
JW
12292015-08-19 Jiong Wang <jiong.wang@arm.com>
1230
1231 PR ld/18276
1232 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize new relocation
1233 types, including BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
1234 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
1235 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
1236 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
1237 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
1238 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2.
1239 (elfNN_aarch64_final_link_relocate): Likewise.
1240 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1241 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1242
49df5539
JW
12432015-08-19 Jiong Wang <jiong.wang@arm.com>
1244
1245 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
1246 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
1247 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
1248 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
1249 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
1250 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2): New entries.
1251 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
1252 * bfd-in2.h: Regenerate.
1253 * libbfd.h: Regenerate.
1254
753999c1
JW
12552015-08-19 Jiong Wang <jiong.wang@arm.com>
1256
1257 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
1258 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC.
1259 (aarch64_reloc_got_type): Likewise.
1260 (elfNN_aarch64_final_link_relocate): Likewise.
1261 (elfNN_aarch64_relocate_section): Likewise.
1262 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1263 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1264
13289c10
JW
12652015-08-19 Jiong Wang <jiong.wang@arm.com>
1266
1267 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC): New entry.
1268 * bfd-in2.h: Regenerate.
1269 * libbfd.h: Regenerate.
1270 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1271 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC.
1272
3cbc1e5e
AM
12732015-08-19 Alan Modra <amodra@gmail.com>
1274
1275 * elf-s390-common.c: Simplify expressions using
1276 bfd_linke_executable, bfd_link_pie and bfd_link_pic.
1277 * elf32-arm.c: Likewise.
1278 * elf32-bfin.c: Likewise.
1279 * elf32-frv.c: Likewise.
1280 * elf32-m68k.c: Likewise.
1281 * elf32-nios2.c: Likewise.
1282 * elf32-ppc.c: Likewise.
1283 * elf32-s390.c: Likewise.
1284 * elf32-sh.c: Likewise.
1285 * elf64-alpha.c: Likewise.
1286 * elf64-ppc.c: Likewise.
1287 * elf64-s390.c: Likewise.
1288 * elflink.c: Likewise.
1289
44b4145b
JW
12902015-08-18 Jiong Wang <jiong.wang@arm.com>
1291
1292 * elfnn-aarch64.c (aarch64_reloc_got_type): Delete useless check.
1293 (elfNN_aarch64_relocate_section): Likewise.
1294 (elfNN_aarch64_gc_sweep_hook): Likewise.
1295 (elfNN_aarch64_check_relocs): Likewise.
1296
cae1fbbb
L
12972015-08-18 H.J. Lu <hongjiu.lu@intel.com>
1298
1299 PR ld/18841
1300 * elf-bfd.h (elf_link_hash_table): Add dynsym.
1301 * elf32-i386.c (elf_i386_reloc_type_class): Return
1302 reloc_class_ifunc for relocation against STT_GNU_IFUNC symbol.
1303 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise.
1304 * elflink.c (_bfd_elf_link_create_dynamic_sections): Set dynsym.
1305 (bfd_elf_size_dynsym_hash_dynstr): Use dynsym.
1306 (elf_final_link_info): Remove dynsym_sec.
1307 (elf_link_output_extsym): Replace dynsym_sec with dynsym.
1308 (bfd_elf_final_link): Remove reference to dynsym_sec. Replace
1309 dynsym_sec with dynsym.
1310
0e1862bb
L
13112015-08-18 H.J. Lu <hongjiu.lu@intel.com>
1312
1313 * bfd/aoutx.h: Replace shared, executable, relocatable and pie
1314 fields with bfd_link_executable, bfd_link_dll,
1315 bfd_link_relocatable, bfd_link_pic and bfd_link_pie.
1316 * bfd/bout.c: Likewise.
1317 * bfd/coff-alpha.c: Likewise.
1318 * bfd/coff-arm.c: Likewise.
1319 * bfd/coff-i386.c: Likewise.
1320 * bfd/coff-i960.c: Likewise.
1321 * bfd/coff-m68k.c: Likewise.
1322 * bfd/coff-mcore.c: Likewise.
1323 * bfd/coff-mips.c: Likewise.
1324 * bfd/coff-ppc.c: Likewise.
1325 * bfd/coff-rs6000.c: Likewise.
1326 * bfd/coff-sh.c: Likewise.
1327 * bfd/coff-tic80.c: Likewise.
1328 * bfd/coff-x86_64.c: Likewise.
1329 * bfd/coff64-rs6000.c: Likewise.
1330 * bfd/coffgen.c: Likewise.
1331 * bfd/cofflink.c: Likewise.
1332 * bfd/ecoff.c: Likewise.
1333 * bfd/ecofflink.c: Likewise.
1334 * bfd/elf-bfd.h: Likewise.
1335 * bfd/elf-eh-frame.c: Likewise.
1336 * bfd/elf-ifunc.c: Likewise.
1337 * bfd/elf-m10200.c: Likewise.
1338 * bfd/elf-m10300.c: Likewise.
1339 * bfd/elf-s390-common.c: Likewise.
1340 * bfd/elf-vxworks.c: Likewise.
1341 * bfd/elf.c: Likewise.
1342 * bfd/elf32-arm.c: Likewise.
1343 * bfd/elf32-avr.c: Likewise.
1344 * bfd/elf32-bfin.c: Likewise.
1345 * bfd/elf32-cr16.c: Likewise.
1346 * bfd/elf32-cr16c.c: Likewise.
1347 * bfd/elf32-cris.c: Likewise.
1348 * bfd/elf32-crx.c: Likewise.
1349 * bfd/elf32-d10v.c: Likewise.
1350 * bfd/elf32-dlx.c: Likewise.
1351 * bfd/elf32-epiphany.c: Likewise.
1352 * bfd/elf32-fr30.c: Likewise.
1353 * bfd/elf32-frv.c: Likewise.
1354 * bfd/elf32-ft32.c: Likewise.
1355 * bfd/elf32-h8300.c: Likewise.
1356 * bfd/elf32-hppa.c: Likewise.
1357 * bfd/elf32-i370.c: Likewise.
1358 * bfd/elf32-i386.c: Likewise.
1359 * bfd/elf32-i860.c: Likewise.
1360 * bfd/elf32-ip2k.c: Likewise.
1361 * bfd/elf32-iq2000.c: Likewise.
1362 * bfd/elf32-lm32.c: Likewise.
1363 * bfd/elf32-m32c.c: Likewise.
1364 * bfd/elf32-m32r.c: Likewise.
1365 * bfd/elf32-m68hc11.c: Likewise.
1366 * bfd/elf32-m68hc1x.c: Likewise.
1367 * bfd/elf32-m68k.c: Likewise.
1368 * bfd/elf32-mcore.c: Likewise.
1369 * bfd/elf32-mep.c: Likewise.
1370 * bfd/elf32-metag.c: Likewise.
1371 * bfd/elf32-microblaze.c: Likewise.
1372 * bfd/elf32-moxie.c: Likewise.
1373 * bfd/elf32-msp430.c: Likewise.
1374 * bfd/elf32-mt.c: Likewise.
1375 * bfd/elf32-nds32.c: Likewise.
1376 * bfd/elf32-nios2.c: Likewise.
1377 * bfd/elf32-or1k.c: Likewise.
1378 * bfd/elf32-ppc.c: Likewise.
1379 * bfd/elf32-rl78.c: Likewise.
1380 * bfd/elf32-rx.c: Likewise.
1381 * bfd/elf32-s390.c: Likewise.
1382 * bfd/elf32-score.c: Likewise.
1383 * bfd/elf32-score7.c: Likewise.
1384 * bfd/elf32-sh-symbian.c: Likewise.
1385 * bfd/elf32-sh.c: Likewise.
1386 * bfd/elf32-sh64.c: Likewise.
1387 * bfd/elf32-spu.c: Likewise.
1388 * bfd/elf32-tic6x.c: Likewise.
1389 * bfd/elf32-tilepro.c: Likewise.
1390 * bfd/elf32-v850.c: Likewise.
1391 * bfd/elf32-vax.c: Likewise.
1392 * bfd/elf32-visium.c: Likewise.
1393 * bfd/elf32-xc16x.c: Likewise.
1394 * bfd/elf32-xstormy16.c: Likewise.
1395 * bfd/elf32-xtensa.c: Likewise.
1396 * bfd/elf64-alpha.c: Likewise.
1397 * bfd/elf64-hppa.c: Likewise.
1398 * bfd/elf64-ia64-vms.c: Likewise.
1399 * bfd/elf64-mmix.c: Likewise.
1400 * bfd/elf64-ppc.c: Likewise.
1401 * bfd/elf64-s390.c: Likewise.
1402 * bfd/elf64-sh64.c: Likewise.
1403 * bfd/elf64-x86-64.c: Likewise.
1404 * bfd/elflink.c: Likewise.
1405 * bfd/elfnn-aarch64.c: Likewise.
1406 * bfd/elfnn-ia64.c: Likewise.
1407 * bfd/elfxx-mips.c: Likewise.
1408 * bfd/elfxx-sparc.c: Likewise.
1409 * bfd/elfxx-tilegx.c: Likewise.
1410 * bfd/i386linux.c: Likewise.
1411 * bfd/linker.c: Likewise.
1412 * bfd/m68klinux.c: Likewise.
1413 * bfd/pdp11.c: Likewise.
1414 * bfd/pe-mips.c: Likewise.
1415 * bfd/peXXigen.c: Likewise.
1416 * bfd/reloc.c: Likewise.
1417 * bfd/reloc16.c: Likewise.
1418 * bfd/sparclinux.c: Likewise.
1419 * bfd/sunos.c: Likewise.
1420 * bfd/vms-alpha.c: Likewise.
1421 * bfd/xcofflink.c: Likewise.
1422
fe875424
AM
14232015-08-18 Alan Modra <amodra@gmail.com>
1424
1425 PR 18667
1426 * Makefile.am: Use $(SED) in place of sed throughout.
1427 * Makefile.in: Regenerate.
1428
43417696
AM
14292015-08-18 Alan Modra <amodra@gmail.com>
1430
1431 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't redefine .TOC.
1432 if already defined, and set linker_def.
1433 (ppc64_elf_set_toc): Use .TOC. value if defined other than by
1434 the backend.
1435
9b57267f
AM
14362015-08-14 Alan Modra <amodra@gmail.com>
1437
1438 PR ld/18759
1439 * elf32-or1k.c: Revert 2015-08-11 change.
1440
8efa2874
L
14412015-08-13 H.J. Lu <hongjiu.lu@intel.com>
1442
1443 PR ld/18801
1444 * elf32-i386.c (elf_i386_size_dynamic_sections): Issue an error
1445 for read-only segment with dynamic IFUNC relocations.
1446 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
1447
40fc1451
SD
14482015-08-12 Simon Dardis <simon.dardis@imgtec.com>
1449
1450 * elfxx-mips.c (STUB_MOVE): Change to use 'or' only.
1451 (mips_o32_exec_plt0_entry, mips_n32_exec_plt0_entry,
1452 mips_n64_exec_plt0_entry, micromips_insn32_o32_exec_plt0_entry):
1453 Update to use 'or' instead of 'addu/daddu'.
1454 (_bfd_mips_elf_finish_dynamic_symbol): Update usage of STUB_MOVE.
1455 (move_insns_32): Reorder table.
1456
0eace210
L
14572015-08-11 H.J. Lu <hongjiu.lu@intel.com>
1458
1459 * elf32-i386.c (elf_i386_relocate_section): Properly skip IFUNC
1460 relocations in debug sections.
1461 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1462
c674f5cd
JW
14632015-08-11 Jiong Wang <jiong.wang@arm.com>
1464
1465 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Improve warning
1466 message for R_AARCH64_LD64_GOTPAGE_LO15/R_AARCH64_LD32_GOTPAGE_LO14.
1467
9331eea1
JW
14682015-08-11 Jiong Wang <jiong.wang@arm.com>
1469
1470 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): New.
1471 (aarch64_can_relax_tls): Use the new IS_AARCH64_TLS_RELAX_RELOC.
1472
f678ded7
JW
14732015-08-11 Jiong Wang <jiong.wang@arm.com>
1474
1475 * bfd/elfnn-aarch64.c (aarch64_type_of_stub): New parameter "sym_sec".
1476 Loose the check for symbol from ABS section.
1477 (elfNN_aarch64_size_stubs): Pass sym_sec.
1478
07f9ddfe
JW
14792015-08-11 Jiong Wang <jiong.wang@arm.com>
1480
1481 PR ld/18668
1482 * elfnn-aarch64.c (aarch64_type_of_stub): Update destination for
1483 calls go through plt stub.
1484 (elfNN_aarch64_final_link_relocate): Adjust code logic for CALL26,
1485 JUMP26 relocation to support inserting veneer for call to plt stub.
1486
40fbed84
JW
14872015-08-11 Jiong Wang <jiong.wang@arm.com>
1488
1489 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
1490 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.
1491 (aarch64_reloc_got_type): Likewise.
1492 (elfNN_aarch64_final_link_relocate): Likewise.
1493 (elfNN_aarch64_relocate_section): Likewise.
1494 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1495 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1496
70151fb5
JW
14972015-08-11 Jiong Wang <jiong.wang@arm.com>
1498
1499 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12): New entry.
1500 * bfd-in2.h: Regenerate.
1501 * libbfd.h: Regenerate.
1502 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1503 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.
1504
73f925cc
JW
15052015-08-11 Jiong Wang <jiong.wang@arm.com>
1506
1507 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
1508 BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC.
1509 (aarch64_reloc_got_type): Likewise.
1510 (elfNN_aarch64_final_link_relocate): Likewise.
1511 (elfNN_aarch64_relocate_section): Likewise.
1512 (elfNN_aarch64_gc_sweep_hook): Likewise.
1513 (elfNN_aarch64_check_relocs): Likewise.
1514 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1515 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1516
a12fad50
JW
15172015-08-11 Jiong Wang <jiong.wang@arm.com>
1518
1519 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC): New entry.
1520 * bfd-in2.h: Regenerate.
1521 * libbfd.h: Regenerate.
1522 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1523 BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC.
1524
f69e4920
JW
15252015-08-11 Jiong Wang <jiong.wang@arm.com>
1526
1527 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
1528 BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21.
1529 (aarch64_reloc_got_type): Likewise.
1530 (elfNN_aarch64_final_link_relocate): Likewise.
1531 (elfNN_aarch64_relocate_section): Likewise.
1532 (elfNN_aarch64_gc_sweep_hook): Likewise.
1533 (elfNN_aarch64_check_relocs): Likewise.
1534 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1535 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1536
1107e076
JW
15372015-08-11 Jiong Wang <jiong.wang@arm.com>
1538
1539 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21): New entry.
1540 * bfd-in2.h: Regenerate.
1541 * libbfd.h: Regenerate.
1542 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1543 BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21.
1544
97dc35c8
L
15452015-08-11 H.J. Lu <hongjiu.lu@intel.com>
1546
1547 PR ld/18808
1548 * elf32-i386.c (elf_i386_relocate_section): Skip IFUNC
1549 relocations in debug sections.
1550 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1551
dbac553d
PZ
15522015-08-11 Peter Zotov <whitequark@whitequark.org>
1553
1554 PR ld/18759
1555 * elf32-or1k.c (R_OR1K_32_PCREL): Set pcrel_offset to TRUE.
1556 (R_OR1K_16_PCREL): Likewise.
1557 (R_OR1K_8_PCREL): Likewise.
1558
4b0e8a5f
NC
15592015-08-11 Nick Clifton <nickc@redhat.com>
1560
4c0160b8
NC
1561 PR binutils/18747
1562 * coff-sh.c (_bfd_sh_align_load_span): Fix typo when setting
1563 opcode count.
1564
4b0e8a5f
NC
1565 PR binutils/18758
1566 * elf.c (_bfd_elf_setup_sections): Add checks for corrupt section
1567 group information.
1568 * peicode.h (pe_ILF_make_a_section): Ensure alignment of the
1569 used_by_bfd pointer.
1570 (pe_ILF_build_a_bfd): Ensure alignment of vars.data pointer.
1571
64140f86
L
15722015-08-11 H.J. Lu <hongjiu.lu@intel.com>
1573
1574 * elf.c (_bfd_elf_copy_private_bfd_data): Fix a typo.
1575
422f1182
L
15762015-08-10 H.J. Lu <hongjiu.lu@intel.com>
1577
1578 * elf-bfd.h (elf_symbol_version): New enum.
1579 (elf_link_hash_entry): Replace hidden with versioned.
1580 * elflink.c (_bfd_elf_merge_symbol): Don't look for symbol
1581 version if the symbol is unversioned. Initialize versioned.
1582 (_bfd_elf_add_default_symbol): Don't look for symbol version
1583 if the symbol is unversioned or hidden. Initialize versioned.
1584 (elf_collect_hash_codes): Don't look for symbol version if the
1585 symbol is unversioned.
1586 (elf_collect_gnu_hash_codes): Likewise.
1587 (bfd_elf_gc_mark_dynamic_ref_symbol): Likewise.
1588 (_bfd_elf_link_hash_copy_indirect): Check versioned instead of
1589 hidden.
1590 (elf_link_output_extsym): Likewise.
1591
d4ac1f87
L
15922015-08-07 H.J. Lu <hongjiu.lu@intel.com>
1593
1594 PR binutils/18785
1595 * elf.c (_bfd_elf_copy_private_bfd_data): When copying the
1596 sh_link and sh_info fields in stripped section headers, we also
64140f86 1597 check if the sh_type, sh_flags, sh_addralign and sh_entsize
d4ac1f87
L
1598 fields of the output section match the output. Since
1599 --only-keep-debug turns all non-debug sections into SHT_NOBITS
1600 sections, the output SHT_NOBITS type matches any input type.
1601
6e33951e
L
16022015-08-07 H.J. Lu <hongjiu.lu@intel.com>
1603
1604 PR ld/18720
1605 * elflink.c (_bfd_elf_merge_symbol): Add a parameter to indicate
1606 if the new symbol matches the existing one. The new hidden
1607 versioned symbol matches the existing symbol if they have the
1608 same symbol version. Update the existing symbol only if they
1609 match.
1610 (_bfd_elf_add_default_symbol): Update call to
1611 _bfd_elf_merge_symbol.
1612 (_bfd_elf_link_assign_sym_version): Don't set the hidden field
1613 here.
1614 (elf_link_add_object_symbols): Override a definition only if the
1615 new symbol matches the existing one.
1616 (_bfd_elf_link_hash_copy_indirect): Don't copy any references to
1617 the hidden versioned symbol.
1618 (elf_link_output_extsym): Bind a symbol locally when linking
1619 executable if it is locally defined, hidden versioned, not
1620 referenced by shared library and not exported. Turn on
422f1182 1621 VERSYM_HIDDEN only if the hidden versioned symbol is defined
6e33951e
L
1622 locally.
1623
63b9bbb7
NC
16242015-08-05 Nick Clifton <nickc@redhat.com>
1625
1626 * elf.c (_bfd_elf_copy_private_bfd_data): Copy the sh_link and
1627 sh_info fields of sections whose type has been changed to
1628 SHT_NOBITS.
1629
7e27a9d5
YK
16302015-08-04 Yuriy M. Kaminskiy" <yumkam@gmail.com>
1631 Tyler Hicks <tyhicks@canonical.com>
1632
1633 PR binutils/18750
1634 * ihex.c (ihex_scan): Fixes incorrect escape sequence in error message
1635 and stack overflow when char is signed and \200-\376 was in place of hex
1636 digit; also fixes \377 was handled as EOF instead of "incorrect character".
1637 (ihex_read_section): Changed for consistency.
1638 (ihex_bad_byte): Prevent (now impossible to trigger) stack
1639 overflow and incorrect escape sequence handling.
1640 * srec.c (srec_bad_byte): Likewise.
1641
cb1c8103
HPN
16422015-08-03 Hans-Peter Nilsson <hp@axis.com>
1643
1644 * elf32-cris.c (cris_elf_relocate_section)
1645 (elf_cris_finish_dynamic_symbol, cris_elf_check_relocs)
1646 (elf_cris_discard_excess_dso_dynamics): Use SYMBOLIC_BIND, not
4122b413 1647 just link_info->symbolic, to check if a symbol should be bound
cb1c8103
HPN
1648 symbolically.
1649
c6e8a9a8
L
16502015-07-30 H.J. Lu <hongjiu.lu@intel.com>
1651
1652 PR ld/18735
1653 * elflink.c (_bfd_elf_add_default_symbol): Add the default
1654 symbol if not performing a relocatable link.
1655 (elf_link_add_object_symbols): Adjust the default symbol if
1656 not performing a relocatable link.
1657
e77e648e
L
16582015-07-29 H.J. Lu <hongjiu.lu@intel.com>
1659
1660 * elflink.c (elf_link_add_object_symbols): Remove
1661 !info->relocatable check for info->executable. Add
1662 !info->relocatable check for !info->executable.
1663 (elf_link_output_extsym): Remove
1664 !info->relocatable check for info->executable.
1665
11509220
HPN
16662015-07-29 Hans-Peter Nilsson <hp@bitrange.com>
1667
1668 * mmo.c (mmo_write_symbols_and_terminator): Skip symbol-type
1669 assignment loop for bfd plugin objects.
1670
e5654c0f
AM
16712015-07-28 Alan Modra <amodra@gmail.com>
1672
1673 * elf.c (_bfd_elf_map_sections_to_segments): Do not make a new
1674 segment for loaded sections after nonloaded sections if the
1675 sections are on the same page.
1676
d6f1bafa
IB
16772015-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
1678
1679 * configure.in: Add asprintf and vasprintf to AC_CHECK_DECLS.
1680 * config.in, configure: Regenerate.
1681
37a42ee9
L
16822015-07-27 H.J. Lu <hongjiu.lu@intel.com>
1683
1684 * configure: Regenerated.
1685
79559014
NC
16862015-07-27 Nick Clifton <nickc@redhat.com>
1687
1688 * elf32-msp430.c (uses_large_model): New function.
1689 (msp430_elf_eh_frame_address_size): New function.
1690 (elf_backend_eh_frame_address_size): Define.
1691
32f573bc
SN
16922015-07-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
1693
1694 PR ld/18705
1695 * elfnn-aarch64.c (elf_backend_extern_protected_data): Define.
1696
b68a20d6
SN
16972015-07-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
1698
1699 PR ld/18705
1700 * elf32-arm.c (elf_backend_extern_protected_data): Define.
1701
18d9555c
L
17022015-07-25 H.J. Lu <hongjiu.lu@intel.com>
1703
1704 PR ld/18718
1705 * elflink.c (elf_link_output_extsym): Check symbol version
1706 section check only if not linking executable, the symbol is
1707 referenced by shared library or not locally defined.
1708
a496fbc8
AM
17092015-07-25 Thomas Preud'homme <thomas.preudhomme@arm.com>
1710
1711 * elf32-arm.c (elf32_arm_final_link_relocate): Use SYMBOLIC_BIND to
1712 check if a symbol should be bound symbolically.
1713 * elf32-hppa.c (elf32_hppa_check_relocs,
1714 elf32_hppa_adjust_dynamic_symbol, elf32_hppa_relocate_section,
1715 elf32_hppa_finish_dynamic_symbol): Likewise.
1716 * elf32-m68k.c (elf_m68k_check_relocs,
1717 elf_m68k_relocate_section): Likewise.
1718 * elf32-nios2.c (nios2_elf32_relocate_section,
1719 nios2_elf32_check_relocs, allocate_dynrelocs): Likewise.
1720 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol,
1721 elf32_tic6x_relocate_section): Likewise.
1722
91cb26da
AM
17232015-07-24 Alan Modra <amodra@gmail.com>
1724
1725 * elf.c (_bfd_elf_assign_file_positions_for_non_load): Use .rela
1726 prefix for reloc section corresponding to rela section associated
1727 with renamed debug section.
1728
2fb9328d
AM
17292015-07-24 Alan Modra <amodra@gmail.com>
1730
1731 * section.c (bfd_get_section_by_name_if): Iterate over entire hash
1732 chain.
1733
d5cff5df
JM
17342015-07-23 Joseph Myers <joseph@codesourcery.com>
1735
1736 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections)
1737 <DT_MIPS_RLD_MAP_REL>: Add target address to host address
1738 difference, not to host pointer.
1739
bb854a36
AM
17402015-07-22 Alan Modra <amodra@gmail.com>
1741
1742 * elf64-ppc.c (opd_entry_value): Remove assertion. Instead,
1743 return -1 if symbol referenced is not defined. Tidy.
1744
f2d7e0f4
AM
17452015-07-20 Alan Modra <amodra@gmail.com>
1746
1747 * po/SRC-POTFILES.in: Regenerate.
1748
4c0a9a6f
JW
17492015-07-17 Jiong Wang <jiong.wang@arm.com>
1750
1751 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Sort alphabetically.
1752 (IS_AARCH64_TLSDESC_RELOC): Sort alphabetically.
1753
77a69ff8
JW
17542015-07-16 Jiong Wang <jiong.wang@arm.com>
1755
1756 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
1757 BFD_RELOC_AARCH64_TLSLD_ADR_PREL21.
1758 (aarch64_reloc_got_type): Ditto.
1759 (elfNN_aarch64_final_link_relocate): Ditto.
1760 (elfNN_aarch64_relocate_section): Ditto.
1761 (elfNN_aarch64_gc_sweep_hook): Ditto.
1762 (elfNN_aarch64_check_relocs): Ditto.
1763 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
1764 (_bfd_aarch64_elf_resolve_relocation): Ditto.
1765
6c37fedc
JW
17662015-07-16 Jiong Wang <jiong.wang@arm.com>
1767
1768 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADR_PREL21): New entry.
1769 * bfd-in2.h: Regenerate.
1770 * libbfd.h: Regenerate.
1771 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
1772 BFD_RELOC_AARCH64_TLSLD_ADR_PREL21.
1773
88988473
L
17742015-07-10 H.J. Lu <hongjiu.lu@intel.com>
1775
1776 PR binutils/18656
1777 * bfd.c (bfd_convert_section_size): New function.
1778 (bfd_convert_section_contents): Likewise.
1779 * bfd-in2.h: Regenerated.
1780
de231f20
CM
17812015-07-09 Catherine Moore <clm@codesourcery.com>
1782
1783 * elflink.c (bfd_elf_size_dynamic_sections): Call to
1784 _bfd_elf_maybe_strip_eh_frame_hdr should be before
1785 bed->elf_backend_size_dynamic_sections.
1786
328e7bfd
DC
17872015-07-08 Pitchumani Sivanupandi <pitchumani.s@atmel.com>
1788
1789 * elf32-avr.c: Add 32 bit PC relative relocation for AVR target.
1790
92a9c616
RS
17912015-07-05 Richard Sandiford <richard.sandiford@arm.com>
1792
1793 * elf64-ppc.c (toc_adjusting_stub_needed): Use the symbol value
1794 plus addend rather than the original st_value when looking up
1795 entries in opd->adjust.
1796
0f088b2a
KT
17972015-07-03 Kai Tietz <ktietz@redhat.com>
1798 Nick Clifton <nickc@redhat.com>
1799
1800 PR ld/11539
1801 * coffcode.h (coff_bfd_gc_sections): Define default
1802 to bfd_coff_gc_sections function.
1803 (coff_gc_mark_hook_fn): New type.
1804 * coffgen.c (init_reloc_cookie): Copy and adjust coff
1805 related code about gc-sections from elflink.c to here.
1806 (fini_reloc_cookie): Likewise.
1807 (init_reloc_cookie_rels): Likewise.
1808 (fini_reloc_cookie_rels): Likewise.
1809 (init_reloc_cookie_for_section): Likewise.
1810 (fini_reloc_cookie_for_section): Likewise.
1811 (_bfd_coff_gc_mark_hook): Likewise.
1812 (_bfd_coff_gc_mark_rsec): Likewise.
1813 (_bfd_coff_gc_mark_reloc): Likewise.
1814 (_bfd_coff_gc_mark): Likewise.
1815 (_bfd_coff_gc_mark_extra_sections): Likewise.
1816 (coff_gc_sweep_symbol_info): Likewise.
1817 (coff_gc_sweep_symbol): Likewise.
1818 (gc_sweep_hook_fn): Likewise.
1819 (coff_gc_sweep): Likewise.
1820 (bfd_coff_gc_sections): Likewise.
1821 (_bfd_coff_gc_keep): Likewise.
1822 * libcoff-in.h (coff_reloc_cookie): New struct.
1823 (bfd_coff_gc_sections): New prototype.
1824 * libcoff.h: Regenerate.
1825
8c163c5a
SL
18262015-07-01 Sandra Loosemore <sandra@codesourcery.com>
1827 Cesar Philippidis <cesar@codesourcery.com>
1828
1829 * bfd-in2.h: Regenerated.
1830 * elf32-nios2.c (elf_nios2_howto_table_rel): Rename to...
1831 (elf_nios2_r1_howto_table_rel): This.
1832 (elf_nios2_r2_howto_table_rel): New.
1833 (BFD_IS_R2): New.
1834 (lookup_howto): Add ABFD parameter. Adjust to look up in either
1835 the R1 or R2 relocation table, as determined by ABFD.
1836 (nios2_reloc_map): Add R2 relocations.
1837 (nios2_elf32_bfd_reloc_type_lookup): Do lookup using lookup_howto.
1838 Pass it the ABFD parameter.
1839 (nios2_elf32_bfd_reloc_name_lookup): Use ABFD to decide whether to
1840 return an R1 or R2 relocation.
1841 (nios2_elf32_info_to_howto): Do lookup using lookup_howto.
1842 Pass it the ABFD parameter.
1843 (nios2_elf32_do_call26_relocate): Check for alignment on a 4-byte
1844 boundary.
1845 (nios2_elf32_relocate_section): Adjust call to lookup_howto.
1846 * libbfd.h: Regenerated.
1847 * reloc.c (BFD_RELOC_NIOS2_R2_S12): New.
1848 (BFD_RELOC_NIOS2_R2_I10_1_PCREL): New.
1849 (BFD_RELOC_NIOS2_R2_T1I7_1_PCREL): New.
1850 (BFD_RELOC_NIOS2_R2_T1I7_2): New.
1851 (BFD_RELOC_NIOS2_R2_T2I4): New.
1852 (BFD_RELOC_NIOS2_R2_T2I4_1): New.
1853 (BFD_RELOC_NIOS2_R2_T2I4_2): New.
1854 (BFD_RELOC_NIOS2_R2_X1I7_2): New.
1855 (BFD_RELOC_NIOS2_R2_X2L5): New.
1856 (BFD_RELOC_NIOS2_R2_F1I5_2): New.
1857 (BFD_RELOC_NIOS2_R2_L5I4X1): New.
1858 (BFD_RELOC_NIOS2_R2_T1X1I6): New.
1859 (BFD_RELOC_NIOS2_R2_T1X1I6_2): New.
1860
965b1d80
SL
18612015-07-01 Sandra Loosemore <sandra@codesourcery.com>
1862 Cesar Philippidis <cesar@codesourcery.com>
1863
1864 * archures.c (bfd_mach_nios2r1, bfd_mach_nios2r2): New.
1865 * bfd-in2.h: Regenerated.
1866 * cpu-nios2.c (nios2_compatible): New.
1867 (N): Use nios2_compatible instead of bfd_default_compatible.
1868 (NIOS2R1_NEXT, NIOS2R2_NEXT): Define.
1869 (arch_info_struct): New.
1870 (bfd_nios2_arch): Chain to NIOS2R1_NEXT.
1871 * elf32-nios2.c (is_nios2_elf): New.
1872 (nios2_elf32_merge_private_bfd_data): New.
1873 (nios2_elf32_object_p): New.
1874 (bfd_elf32_bfd_merge_private_bfd_data): Define.
1875 (elf_backend_object_p): Define.
1876
dfc87947
L
18772015-07-01 H.J. Lu <hongjiu.lu@intel.com>
1878
1879 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Refactor.
1880
5ee4a1ca
NC
18812015-06-30 Nick Clifton <nickc@redhat.com>
1882
1883 PR binutils/18570
1884 * elf-attrs.c (obj_attr_size): Use an unsigned int type for the tag.
1885 (write_obj_attribute): Likewise.
1886 (elf_new_obj_attr): Likewise.
1887 (bfd_elf_get_obj_attr_int): Likewise.
1888 (bfd_elf_add_obj_attr_int): Likewise.
1889 (bfd_elf_add_obj_attr_string): Likewise.
1890 (bfd_elf_add_obj_attr_int_string): Likewise.
1891 (gnu_obj_attrs_arg_type): Likewise.
1892 (_bfd_elf_obj_attrs_arg_type): Likewise.
1893 (_bfd_elf_parse_attributes): Likewise.
1894 (_bfd_elf_merge_unknown_attribute_list): Likewise.
1895 * elf-bfd.h (struct obj_attribute_list): Likewise.
1896 Update prototypes.
1897
ee0c0c50
L
18982015-06-28 H.J. Lu <hongjiu.lu@intel.com>
1899
1900 * bfd-in.h (compressed_debug_section_type): Remove
1901 COMPRESS_DEBUG_ZLIB.
1902 * bfd-in2.h : Regenerated.
1903
a5499fa4
MF
19042015-06-26 Matthew Fortune <matthew.fortune@imgtec.com>
1905
1906 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Use executable
1907 instead of !shared to indicate an application vs shared library.
1908 (_bfd_mips_elf_size_dynamic_sections): Likewise.
1909 (_bfd_mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP_REL.
1910 (_bfd_mips_elf_get_target_dtag): Likewise.
1911
3f307074
DD
19122015-06-25 DJ Delorie <dj@redhat.com>
1913
1914 * elf32-msp430.c (msp430_final_link_relocate): Fix comments. Fix
1915 REL loads to match RELA stores.
1916
946748d5
L
19172015-06-25 H.J. Lu <hongjiu.lu@intel.com>
1918
1919 * elf.c (_bfd_elf_compute_section_file_positions): Don't
1920 initialize sh_size for .shstrtab here.
1921
ef10c3ac
L
19222015-06-25 H.J. Lu <hongjiu.lu@intel.com>
1923
1924 PR gas/18451
1925 * elf-bfd.h (elf_sym_strtab): New.
1926 (elf_link_hash_table): Add strtabcount, strtabsize and
1927 strtab.
1928 (_bfd_elf_stringtab_init): Removed.
1929 * elf.c (_bfd_elf_stringtab_init): Removed.
1930 (_bfd_elf_compute_section_file_positions): Replace
1931 bfd_strtab_hash/_bfd_elf_stringtab_init/_bfd_stringtab_free/
1932 _bfd_stringtab_size with
1933 elf_strtab_hash/_bfd_elf_strtab_init/_bfd_elf_strtab_free/
1934 _bfd_elf_strtab_size. Use _bfd_elf_strtab_add,
1935 _bfd_elf_strtab_finalize and _bfd_elf_strtab_offset to get
1936 st_name.
1937 (swap_out_syms): Likewise.
1938 * elflink.c (elf_final_link_info): Replace bfd_strtab_hash
1939 with elf_strtab_hash. Remove symbuf, symbuf_count,
1940 symbuf_size and shndxbuf_size.
1941 (elf_link_flush_output_syms): Removed.
1942 (elf_link_output_sym): Renamed to ...
1943 (elf_link_output_symstrtab): This. Replace _bfd_stringtab_add
1944 with _bfd_elf_strtab_add. Don't flush symbols to the file nor
1945 swap out symbols.
1946 (elf_link_swap_symbols_out): New.
1947 (elf_link_output_extsym): Replace elf_link_output_sym with
1948 elf_link_output_symstrtab.
1949 (elf_link_input_bfd): Likewise.
1950 (elf_final_link_free): Replace _bfd_stringtab_free with
1951 _bfd_elf_strtab_free. Remove symbuf.
1952 (bfd_elf_final_link): Replace _bfd_elf_stringtab_init with
1953 _bfd_elf_strtab_init. Don't set symbuf, symbuf_count,
1954 symbuf_size nor shndxbuf_size. Initialize strtabsize and
1955 strtab. Initialize symshndxbuf to -1 when number of sections
1956 >= 64K. Replace elf_link_output_sym/elf_link_output_sym with
1957 elf_link_output_symstrtab/elf_link_output_symstrtab. Don't
1958 call elf_link_flush_output_syms. Call _bfd_elf_strtab_finalize
1959 and elf_link_swap_symbols_out. Replace _bfd_stringtab_size
1960 and _bfd_stringtab_emit with _bfd_elf_strtab_size and
1961 _bfd_elf_strtab_emit.
1962
7cc152be
L
19632015-06-24 H.J. Lu <hongjiu.lu@intel.com>
1964
1965 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Silence older
1966 GCC warning.
1967
7c1e8d3e
L
19682015-06-24 H.J. Lu <hongjiu.lu@intel.com>
1969
1970 * elf32-i386.c (elf_i386_allocate_dynrelocs): Always allocate
1971 space for the first .plt entry.
1972 (elf_i386_size_dynamic_sections): Always add DT_PLTGOT for .plt
1973 section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
1974 there are PLT relocations.
1975 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Always
1976 allocate space for the first .plt entry.
1977 (elf_x86_64_size_dynamic_sections): Always add DT_PLTGOT for
1978 .plt section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
1979 there are PLT relocations.
1980
59cab532
L
19812015-06-24 H.J. Lu <hongjiu.lu@intel.com>
1982
1983 PR ld/18591
1984 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Don't convert
1985 R_X86_64_GOTPCREL to R_X86_64_PC32 if it will cause relocation
1986 overflow.
1987
c2170589
JW
19882015-06-23 Jiong Wang <jiong.wang@arm.com>
1989
1990 * elfnn-aarch64.c (aarch64_readonly_dynrelocs): New function.
1991 (elfNN_aarch64_size_dynamic_sections): Traverse hash table to check
1992 relocations against read-only sections.
1993
75c11999
NC
19942015-06-18 Nick Clifton <nickc@redhat.com>
1995
1996 PR 18481
1997 * elf32-arm.c (R_ARM_TLS_LE32): Set the special function to NULL.
1998
56f40832
JT
19992015-06-15 Jon Turney <jon.turney@dronecode.org.uk>
2000
2001 * bfd.c: Change struct bfd_build_id to use bfd_size_type.
2002 * bfd-in2.h : Regenerate.
2003
1d5c94cb
AM
20042015-06-16 Alan Modra <amodra@gmail.com>
2005
2006 * elf32-ppc.c (ppc_elf_relocate_section): Correct binary search of
2007 dynamic relocs.
2008
c74f7d1c
JT
20092015-06-10 Jon Turney <jon.turney@dronecode.org.uk>
2010
2011 * elf-bfd.h : Remove struct elf_build_id.
2012 * bfd.c : Add struct bfd_build_id.
2013 * bfd-in2.h: Regenerate.
2014 * elf.c (elfobj_grok_gnu_build_id): Update to use bfd_build_id.
2015 * libpei.h: Add protoype and macros for
2016 bfd_XXi_slurp_codeview_record.
2017 * peXXigen.c (_bfd_XXi_slurp_codeview_record): Make public
2018 * peicode.h (pe_bfd_read_buildid): Add.
2019 (pe_bfd_object_p): Use pe_bfd_read_buildid().
2020
87f5fbcc
RL
20212015-06-15 Renlin Li <renlin.li@arm.com>
2022
2023 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): New entry.
2024 * bfd-in2.h: Regenerate.
2025 * libbfd.h: Regenerate.
2026 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
2027 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15.
2028
3a062fa1
AM
20292015-06-15 Alan Modra <amodra@gmail.com>
2030
2031 * cofflink.c (_bfd_coff_generic_relocate_section): Revert
2032 2014-03-26 change. Call _bfd_clear_contents for relocs against
2033 local and global symbols defined in discarded input sections.
2034
1ade7175
NC
20352015-06-05 Nick Clifton <nickc@redhat.com>
2036
2037 * elf32-msp430.c (rl78_sym_diff_handler): New function.
2038 (msp430_howto_table): Use the new function for the SYM_DIFF reloc.
2039 (msp430x_howto_table): Likewise.
2040
f8b44781
AM
20412015-06-05 Alan Modra <amodra@gmail.com>
2042
2043 * elf64-ppc.c (ppc_elf_relocate_section): Move dynamic text
2044 relocs with insns moved by --ppc476-workaround. Correct
2045 output of REL16 relocs.
2046
7018c030
JW
20472015-06-01 Jiong Wang <jiong.wang@arm.com>
2048
2049 * elfnn-aarch64.c (aarch64_reloc_got_type): Support
2050 BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
2051 (elfNN_aarch64_final_link_relocate): Ditto.
2052 (elfNN_aarch64_gc_swap_hook): Ditto.
2053 (elfNN_aarch64_check_relocs): Ditto.
2054 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
2055
3d715ce4
JW
20562015-06-01 Jiong Wang <jiong.wang@arm.com>
2057
2058 * reloc.c (BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14): New entry.
2059 * bfd-in2.h: Regenerate.
2060 * libbfd.h: Regenerate.
2061 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
2062 BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
2063
36e6c140
JW
20642015-06-01 Jiong Wang <jiong.wang@arm.com>
2065
2066 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Set overflow type to
2067 complain_overflow_unsigned for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
2068 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Don't use
2069 PGOFF for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
2070
99ad26cb
JW
20712015-06-01 Jiong Wang <jiong.wang@arm.com>
2072
2073 * elfnn-aarch64.c (aarch64_reloc_got_type): Support
2074 BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
2075 (elfNN_aarch64_final_link_relocate): Ditto.
2076 (elfNN_aarch64_gc_swap_hook): Ditto.
2077 (elfNN_aarch64_check_relocs): Ditto.
2078 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
2079
a921b5bd
JW
20802015-06-01 Jiong Wang <jiong.wang@arm.com>
2081
2082 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15): New entry.
2083 * bfd-in2.h: Regenerate.
2084 * libbfd.h: Regenerate.
2085 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
2086 BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
2087
2f0c68f2
CM
20882015-05-28 Catherine Moore <clm@codesourcery.com>
2089 Bernd Schmidt <bernds@codesourcery.com>
2090 Paul Brook <paul@codesourcery.com>
2091
2092 bfd/
2093 * bfd-in2.h: Regenerated.
2094 * elf-bfd.h (DWARF2_EH_HDR, COMPACT_EH_HDR): Define.
2095 (COMPACT_EH_CANT_UNWIND_OPCODE): Define.
2096 (dwarf_eh_frame_hdr_info): Move dwarf-specific fields from
2097 eh_frame_hdr_info.
2098 (compact_eh_frame_hdr_info): Declare.
2099 (eh_frame_hdr_info): Redeclare with union for dwarf-specific
2100 fields and compact-eh fields.
2101 (elf_backend_data): Add cant_unwind_opcode and compact_eh_encoding.
2102 (bfd_elf_section_data): Add eh_frame_entry_field.
2103 (elf_section_eh_frame_entry): Define.
2104 (bfd_elf_parse_eh_frame_entries): Declare.
2105 (_bfd_elf_parse_eh_frame_entry): Declare.
2106 (_bfd_elf_end_eh_frame_parsing): Declare.
2107 (_bfd_elf_write_section_eh_frame_entry): Declare.
2108 (_bfd_elf_eh_frame_entry_present): Declare.
2109 (_bfd_elf_section_for_symbol): Declare.
2110 * elf-eh-frame.c (bfd_elf_discard_eh_frame_entry): New function.
2111 (bfd_elf_record_eh_frame_entry): New function.
2112 (_bfd_elf_parse_eh_frame_entry): New function.
2113 (_bfd_elf_parse_eh_frame): Update hdr_info field references.
2114 (cmp_eh_frame_hdr): New function.
2115 (add_eh_frame_hdr_terminator): New function.
2116 (_bfd_elf_end_eh_frame_parsing): New function.
2117 (find_merged_cie): Update hdr_info field references.
2118 (_bfd_elf_discard_section_eh_frame): Likewise.
2119 (_bfd_elf_discard_section_eh_frame_hdr): Add Compact EH support.
2120 (_bfd_elf_eh_frame_entry_present): New function.
2121 (_bfd_elf_maybe_strip_eh_frame_hdr): Add Compact EH support.
2122 (_bfd_elf_write_section_eh_frame_entry): New function.
2123 (_bfd_elf_write_section_eh_frame): Update hdr_info field references.
2124 (_bfd_elf_fixup_eh_frame_hdr): New function.
2125 (write_compact_eh_frame_hdr): New function.
2126 (write_dwarf_eh_frame_hdr): New function.
2127 (_bfd_elf_write_section_eh_frame_hdr): Add Compact EH support.
2128 * elflink.c (_bfd_elf_section_for_symbol): New function.
2129 (elf_section_ignore_discarded_relocs): Add Compact EH support.
2130 (elf_link_input_bfd): Likewise.
2131 (bfd_elf_final_link): Likewise.
2132 (_bfd_elf_gc_mark): Likewise.
2133 (bfd_elf_parse_eh_frame_entries): New function.
2134 (bfd_elf_gc_sections): Add Compact EH support.
2135 (bfd_elf_discard_info): Likewise.
2136 * elfxx-mips.c: Include dwarf2.h.
2137 (_bfd_mips_elf_compact_eh_encoding): New function.
2138 (_bfd_mips_elf_cant_unwind_opcode): New function.
2139 * elfxx-mips.h (_bfd_mips_elf_compact_eh_encoding): Declare.
2140 (_bfd_mips_elf_cant_unwind_opcode): Declare.
2141 (elf_backend_compact_eh_encoding): Define.
2142 (elf_backend_cant_unwind_opcode): Define.
2143 * elfxx-target.h (elf_backend_compact_eh_encoding): Provide default.
2144 (elf_backend_cant_unwind_opcode): Provide default.
2145 (elf_backend_data elfNN_bed): Add elf_backend_compact_eh_encoding and
2146 elf_backend_cant_unwind_opcode.
2147 * section.c (SEC_INFO_TYPE_EH_FRAME_ENTRY): Add definition.
2148
8ded2ddc
L
21492015-05-27 H.J. Lu <hongjiu.lu@intel.com>
2150
2151 PR binutils/18458
2152 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
2153 for now binding only if pointer equality isn't needed.
2154 (elf_i386_allocate_dynrelocs): Use .plt.got section for now
2155 binding only if pointer equality isn't needed.
2156 * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
2157 section for now binding only if pointer equality isn't needed.
2158 (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
2159 binding only if pointer equality isn't needed.
2160
fca6ae69
L
21612015-05-26 H.J. Lu <hongjiu.lu@intel.com>
2162
2163 PR binutils/18437
2164 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip extra relocations
2165 in .rel.plt/.rela.plt.
2166 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
2167
ce336788
JW
21682015-05-19 Jiong Wang <jiong.wang@arm.com>
2169
2170 * elfnn-aarch64.c (aarch64_tls_transition_without_check): Sort
2171 relocation case labels alphabetically.
2172 (elfNN_aarch64_final_link_relocate): Ditto.
2173 (elfNN_aarch64_tls_relax): Ditto.
2174 (elfNN_aarch64_relocate_section): Ditto.
2175 (elfNN_aarch64_gc_sweep_hook): Ditto.
2176 (elfNN_aarch64_check_relocs): Ditto.
2177 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
2178 (_bfd_aarch64_elf_resolve_relocation): Ditto.
2179
80de0c6d
JW
21802015-05-18 Jiong Wang <jiong.wang@arm.com>
2181
2182 * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Rewrite
2183 comments.
2184
25070364
L
21852015-05-16 H.J. Lu <hongjiu.lu@intel.com>
2186
2187 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
2188 for now binding.
2189 (elf_i386_allocate_dynrelocs): Use .plt.got section for now
2190 binding.
2191 * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
2192 section for now binding.
2193 (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
2194 binding.
2195
dab394de
L
21962015-05-14 H.J. Lu <hongjiu.lu@intel.com>
2197
2198 * bfd.c (bfd_update_compression_header): Also write the zlib
2199 header if the SHF_COMPRESSED bit cleared..
2200 (bfd_check_compression_header): Return the uncompressed size.
2201 * compress.c (decompress_contents): Don't skip the zlib header.
2202 (bfd_compress_section_contents): Properly handle ELFCOMPRESS_ZLIB,
2203 which doesn't have the zlib header.
2204 (bfd_init_section_decompress_status): Likewise.
2205 (bfd_get_full_section_contents): Updated.
2206 (bfd_is_section_compressed): Likewise.
2207 (bfd_is_section_compressed_with_header): Return the uncompressed
2208 size.
2209 * elf.c (_bfd_elf_make_section_from_shdr): Updated.
2210 * bfd-in2.h: Regenerated.
2211
fdc3b1b1
JW
22122015-05-14 Jiong Wang <jiong.wang@arm.com>
2213
2214 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Remove overflow
2215 check restrictions.
2216
e6c9a083
MF
22172015-05-14 Max Filippov <jcmvbkbc@gmail.com>
2218
2219 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Treat PLT reference
2220 as GOT reference when plt.refcount is not positive.
2221
a3747075
L
22222015-05-12 H.J. Lu <hongjiu.lu@intel.com>
2223
2224 * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate space
2225 for the first .plt entry only if needed.
2226 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2227
bf64a951
L
22282015-05-11 H.J. Lu <hongjiu.lu@intel.com>
2229
2230 * Makefile.am (ALL_MACHINES): Add cpu-iamcu.lo.
2231 (ALL_MACHINES_CFILES): Likewise.
2232 * archures.c (bfd_mach_iamcu): New.
2233 (bfd_mach_i386_iamcu): Likewise.
2234 (bfd_mach_i386_iamcu_intel_syntax): Likewise.
2235 (bfd_iamcu_arch): Likewise.
2236 (bfd_archures_list): Add &bfd_iamcu_arch.
2237 * config.bfd (targ_selvecs): Add iamcu_elf32_vec to
2238 i386_elf32_vec.
2239 (targ_archs): Add bfd_iamcu_arch if needed.
2240 * configure.ac: Support iamcu_elf32_vec.
2241 * cpu-iamcu.c: New file.
2242 * elf32-i386.c (elf32_iamcu_elf_object_p): New function.
2243 Add support for iamcu_elf32_vec and elf32_iamcu_bed.
2244 * targets.c (iamcu_elf32_vec): New.
2245 (_bfd_target_vector): Add iamcu_elf32_vec.
2246 * Makefile.in: Regenerated.
2247 * bfd-in2.h: Likewise.
2248 * configure: Likewise.
2249
22abe556
L
22502015-05-11 H.J. Lu <hongjiu.lu@intel.com>
2251
2252 * elfcode.h (elf_object_p): Replace EM_486 with EM_IAMCU.
2253
4b71eec6
L
22542015-05-10 H.J. Lu <hongjiu.lu@intel.com>
2255
2256 * elf32-i386.c (elf_i386_convert_mov_to_lea): Replace input_bfd
2257 and output_bfd with abfd.
2258 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
2259
9ac47a43
TS
22602015-05-06 Toni Spets <toni.spets@iki.fi>
2261
2262 PR ld/18372
2263 * peXXigen.c (rsrc_process_section): Skip discarded resource
2264 sections.
2265
b633b725
L
22662015-05-01 H.J. Lu <hongjiu.lu@intel.com>
2267
2268 * config.bfd: Support i[3-7]86-*-elf*.
2269
914082d1
L
22702015-04-30 H.J. Lu <hongjiu.lu@intel.com>
2271
2272 * elf32-i386.c (elf_backend_post_process_headers): Undef for
2273 Solaris 2.
2274
153a2776
NC
22752015-04-30 Nick Clifton <nickc@redhat.com>
2276
2277 PR 18317
2278 * elf32-mep.c (MEPREL): Use bfd_elf_generic_reloc instead of
2279 mep_reloc.
2280 (mep_reloc): Delete unused function.
2281
a93d5cb1
NC
22822015-04-29 Nick Clifton <nickc@redhat.com>
2283
2284 PR 17099
2285 * coff-i386.c (coff_i386_rtype_to_howto): Allow absolute PCRLONG
2286 relocs.
2287
643f7afb
AK
22882015-04-27 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2289
2290 * elf-s390-common.c (elf_s390_merge_obj_attributes): New function.
2291 * elf32-s390.c (elf32_s390_merge_private_bfd_data): Call
2292 elf_s390_merge_obj_attributes.
2293 * elf64-s390.c (elf64_s390_merge_private_bfd_data): New function.
2294
b53b1bed
JW
22952015-04-24 Jiong Wang <jiong.wang@arm.com>
2296
2297 PR ld/18270
2298 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic): Count local symbol for
2299 GOT_NORMAL for both sgot/srelgot section.
2300 (elfNN_aarch64_final_link_relocate): Relocate against GOT entry address
2301 and generate necessary runtime relocation for GOT entry.
2302
69b52ab8
L
23032015-04-24 H.J. Lu <hongjiu.lu@intel.com>
2304
2305 PR binutils/18209
2306 * archive.c (_bfd_get_elt_at_filepos): Copy is_linker_input.
2307
dcbd20eb
JW
23082015-04-24 Jiong Wang <jiong.wang@arm.com>
2309
2310 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Reject
2311 PC-relative relocation for external symbol.
2312
de13ef81
NC
23132015-04-24 Nick Clifton <nickc@redhat.com>
2314
2315 PR 18313
2316 * compress.c (decompress_contents): Zero initialse the z_stream
2317 structure.
2318
b1fa9dd6
NC
23192015-04-24 Nick Clifton <nickc@redhat.com>
2320
2321 * elf.c (_bfd_elf_is_local_label_name): Extend test for assembler
2322 local labels to include local labels with a numeric suffix and
2323 fake symbols.
2324
9361e630
L
23252015-04-24 H.J. Lu <hongjiu.lu@intel.com>
2326
2327 PR binutils/18316
2328 * section.c (SEC_MEP_VLIW): New.
2329 * bfd-in2.h: Regenerated.
2330
3e19fb8f
L
23312015-04-23 H.J. Lu <hongjiu.lu@intel.com>
2332
2333 PR ld/18277
2334 * compress.c (bfd_compress_section_contents): Remove the
2335 write_compress argument.
2336 (bfd_init_section_compress_status): Updated.
2337 (bfd_compress_section): Likewise.
2338 * elf.c (_bfd_elf_set_reloc_sh_name): New.
2339 (_bfd_elf_init_reloc_shdr): Add delay_st_name_p. Set sh_name
2340 to (unsigned int) -1 if delay_st_name_p is TRUE. Use
2341 _bfd_elf_set_reloc_sh_name.
2342 (elf_fake_sections): Don't rename DWARF debug section for
2343 linker output if it will be compressed. Instead, set
2344 delay_st_name_p to TRUE and pass it to _bfd_elf_init_reloc_shdr.
2345 (assign_section_numbers): Call _bfd_elf_strtab_addref only if
2346 sh_name != (unsigned int) -1. Don't finalize nor assign
2347 shstrtab section here. Delay setting output section names to
2348 _bfd_elf_write_object_contents.
2349 (_bfd_elf_compute_section_file_positions): Update comments on
2350 sh_offset for shstrtab section.
2351 (assign_file_positions_for_non_load_sections): Set sh_offset to
2352 -1 for shstrtab section.
2353 (assign_file_positions_except_relocs): Likewise.
2354 (_bfd_elf_assign_file_positions_for_non_load): Set up sh_name
2355 when compressing DWARF debug sections. Place shstrtab section
2356 after DWARF debug sections have been compressed.
2357 (_bfd_elf_write_object_contents): Setting sh_name for output
2358 sections.
2359
f6fe1ccd
L
23602015-04-23 H.J. Lu <hongjiu.lu@intel.com>
2361
2362 PR binutils/18209
2363 * bfd.c (bfd): Add is_linker_input.
2364 * elf.c (convert_debug_to_zdebug): New.
2365 (convert_zdebug_to_debug): Likewise.
2366 (_bfd_elf_make_section_from_shdr): Don't convert .debug_* to
2367 .zdebug_* here. Use convert_zdebug_to_debug. Set SEC_ELF_RENAME.
2368 (_bfd_elf_init_reloc_shdr): Pass a pointer to section name
2369 instead of a pointer to section.
2370 (elf_fake_sections): Rename the section name if SEC_ELF_RENAME
2371 is set.
2372 * section.c (SEC_ELF_RENAME): New.
2373 * bfd-in2.h: Regenerated.
2374
a27e685f
AM
23752015-04-23 Alan Modra <amodra@gmail.com>
2376
2377 * elf64-ppc.c (TOC_BASE_ALIGN): Define.
2378 (ppc64_elf_next_toc_section): Align multi-got toc base.
2379 (ppc64_elf_set_toc): Likewise initial toc base and .TOC. symbol.
2380
d5597ebc
L
23812015-04-22 H.J. Lu <hongjiu.lu@intel.com>
2382
2383 PR ld/18289
2384 * elf32-i386.c (elf_i386_link_hash_entry): Add gotoff_ref.
2385 (elf_i386_link_hash_newfunc): Initialize gotoff_ref to 0.
2386 (elf_i386_create_dynamic_sections): Always allow copy relocs for
2387 building executables.
2388 (elf_i386_copy_indirect_symbol): Also copy gotoff_ref.
2389 (elf_i386_check_relocs): Set gotoff_ref for R_386_GOTOFF.
2390 (elf_i386_adjust_dynamic_symbol): Also allocate copy relocs for
2391 PIE and R_386_GOTOFF.
2392 (elf_i386_relocate_section): Allow R_386_GOTOFF in executable.
2393
e9702963
L
23942015-04-20 H.J. Lu <hongjiu.lu@intel.com>
2395
2396 * elf.c (assign_section_numbers): Always set up sh_name.
2397
e06efbf1
L
23982015-04-20 H.J. Lu <hongjiu.lu@intel.com>
2399
2400 * elf.c (assign_file_positions_for_non_load_sections): Iterate
2401 sections by pointer.
2402 (_bfd_elf_assign_file_positions_for_non_load): Likewise.
2403
0ce398f1
L
24042015-04-14 H.J. Lu <hongjiu.lu@intel.com>
2405
2406 * bfd-in.h (compressed_debug_section_type): New.
2407 * compress.c (bfd_compress_section_contents): Add an argument
2408 for linker write compression and always generate .zdebug_*
2409 section when linking.
2410 (bfd_init_section_compress_status): Pass FALSE to
2411 bfd_compress_section_contents.
2412 (bfd_compress_section): New function.
2413 * elf.c (elf_fake_sections): For linking, set SEC_ELF_COMPRESS
2414 on DWARF debug sections if COMPRESS_DEBUG is set and rename
2415 section if COMPRESS_DEBUG_GABI_ZLIB isn't set.
2416 (assign_file_positions_for_non_load_sections): Set sh_offset
2417 to -1 if SEC_ELF_COMPRESS is set.
2418 (assign_file_positions_except_relocs): Likwise.
2419 (_bfd_elf_assign_file_positions_for_relocs): Renamed to ...
2420 (_bfd_elf_assign_file_positions_for_non_load): This. Change
2421 return time to bfd_boolean. Compress the section if
2422 SEC_ELF_COMPRESS is set.
2423 (_bfd_elf_write_object_contents): Updated.
2424 (_bfd_elf_set_section_contents): Write section contents to
2425 the buffer if SEC_ELF_COMPRESS is set.
2426 * merge.c: Include "elf-bfd.h".
2427 (sec_merge_emit): Add arguments for contents and offset. Write
2428 to contents with offset if contents isn't NULL.
2429 (_bfd_write_merged_section): Write section contents to the
2430 buffer if SEC_ELF_COMPRESS is set. Pass contents and
2431 output_offset to sec_merge_emit.
2432 * elflink.c (bfd_elf_final_link): Allocate the buffer for
2433 output section contents if SEC_ELF_COMPRESS is set.
2434 * section.c (SEC_ELF_COMPRESS): New.
2435 * bfd-in2.h: Regenerated.
2436
95b57ade
AM
24372015-04-15 Alan Modra <amodra@gmail.com>
2438
2439 * elf32-rl78.c (rl78_elf_relocate_section): Typo fix.
2440
6ff71e76
NC
24412015-04-14 Nick Clifton <nickc@redhat.com>
2442
2443 * elf32-rl78.c (RL78_OP_REL): New macro.
2444 (rl78_elf_howto_table): Use it for complex relocs.
2445 (get_symbol_value): Handle the cases when the info or status
2446 arguments are NULL.
2447 (get_romstart): Cache the status returned by get_symbol_value.
2448 (get_ramstart): Likewise.
2449 (RL78_STACK_PUSH): Generate an error message if the stack
2450 overflows.
2451 (RL78_STACK_POP): Likewise for underflows.
2452 (rl78_compute_complex_reloc): New function. Contains the basic
2453 processing code for all RL78 complex relocs.
2454 (rl78_special_reloc): New function. Provides special reloc
2455 handling for complex relocs.
2456 (rl78_elf_relocate_section): Use rl78_compute_complex_reloc.
2457 (rl78_offset_for_reloc): Likewise.
2458
889c2a67
L
24592015-04-14 H.J. Lu <hongjiu.lu@intel.com>
2460
2461 PR ld/pr17709
2462 * elflink.c (_bfd_elf_adjust_dynamic_copy): Check
2463 info->extern_protected_data when warning copy relocs against
2464 protected symbols.
2465 (_bfd_elf_symbol_refs_local_p): Check info->extern_protected_data
2466 when checking protected non-function symbols.
2467
97de3545
JB
24682015-04-13 John Baldwin <jhb@FreeBSD.org>
2469
2470 * elf.c (elfcore_grok_note): Recognize NT_X86_XSTATE on
2471 FreeBSD.
2472 (elfcore_write_xstatereg): Use correct note name on FreeBSD.
2473
f0bf6bfd
L
24742015-04-13 H.J. Lu <hongjiu.lu@intel.com>
2475
2476 PR ld/18250
2477 * elflink.c (elf_link_is_defined_archive_symbol): Return FALSE
2478 if the object has been claimed by plugin.
2479
e3c0e327
L
24802015-04-11 H.J. Lu <hongjiu.lu@intel.com>
2481
2482 * elf32-i386.c (elf_i386_relocate_section): Replace SYMBOLIC_BIND
2483 with SYMBOL_REFERENCES_LOCAL when checking R_386_GOTOFF against
2484 protected data symbol when building shared library.
2485 * elf64-x86-64.c (elf_x86_64_relocate_section): Check
2486 R_X86_64_GOTOFF64 against undefined symbol and replace
2487 SYMBOLIC_BIND with SYMBOL_REFERENCES_LOCAL when checking
2488 R_X86_64_GOTOFF64 against protected data symbol when building
2489 shared library.
2490
3d949995
L
24912015-04-10 H.J. Lu <hongjiu.lu@intel.com>
2492
2493 PR ld/pr17709
2494 * elf32-i386.c (elf_i386_relocate_section): Also check R_386_GOTOFF
2495 against protected data symbol when building shared library.
2496 * elf64-x86-64.c (elf_x86_64_relocate_section): Also check
2497 R_X86_64_GOTOFF64 against protected data symbol when building
2498 shared library.
2499
f7483970
L
25002015-04-10 H.J. Lu <hongjiu.lu@intel.com>
2501
2502 PR ld/pr15228
2503 PR ld/pr17709
2504 * elf-bfd.h (elf_backend_data): Add extern_protected_data.
2505 * elf32-i386.c (elf_backend_extern_protected_data): New.
2506 Defined to 1.
2507 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
2508 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
2509 copy relocs against protected symbols if extern_protected_data
2510 is true.
2511 (_bfd_elf_symbol_refs_local_p): Don't return true on protected
2512 non-function symbols if extern_protected_data is true.
2513 * elfxx-target.h (elf_backend_extern_protected_data): New.
2514 Default to 0.
2515 (elfNN_bed): Initialize extern_protected_data with
2516 elf_backend_extern_protected_data.
2517
030aeb75
L
25182015-04-10 H.J. Lu <hongjiu.lu@intel.com>
2519
2520 * compress.c (bfd_compress_section_contents): Replace bfd_malloc
2521 and free with bfd_alloc and bfd_release on compressed buffer.
2522 Release buffer if compressed section isn't smaller.
2523
d07a1b05
AM
25242015-04-10 Alan Modra <amodra@gmail.com>
2525
2526 PR ld/18222
2527 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't report an error
2528 on adding a protected visibility variable to .dynbss.
2529
8d2ea2a8
AM
25302015-04-10 Alan Modra <amodra@gmail.com>
2531
2532 Revert 2015-03-05 H.J. Lu <hongjiu.lu@intel.com>
2533 PR ld/pr15228
2534 PR ld/pr17709
2535 * elf-bfd.h (elf_backend_data): Delete extern_protected_data.
2536 * elf32-i386.c (elf_backend_extern_protected_data): Delete.
2537 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
2538 * elflink.c (_bfd_elf_adjust_dynamic_copy): Remove
2539 extern_protected_data test.
2540 (_bfd_elf_symbol_refs_local_p): Likewise.
2541 * elfxx-target.h (elf_backend_extern_protected_data): Delete.
2542 (elfNN_bed): Delete elf_backend_extern_protected_data init.
2543
18ece1de
L
25442015-04-09 H.J. Lu <hongjiu.lu@intel.com>
2545
2546 * compress.c (bfd_compress_section_contents): Update comments.
2547 (bfd_init_section_decompress_status): Likewise.
2548 (bfd_init_section_compress_status): Likewise.
2549
cd6faa73
L
25502015-04-09 H.J. Lu <hongjiu.lu@intel.com>
2551
2552 * elfxx-target.h (TARGET_BIG_SYM): Add BFD_COMPRESS_GABI to
2553 object_flags.
2554 (TARGET_LITTLE_SYM): Likewise.
2555
19424843
MF
25562015-04-09 Max Filippov <jcmvbkbc@gmail.com>
2557
2558 * elf32-xtensa.c (splay-tree.h): include header.
2559 (text_action_struct): drop next pointer.
2560 (text_action_list_struct): drop head pointer, add count and
2561 tree fields.
2562 (find_fill_action): instead of linear search in text_action_list
2563 search in the tree.
2564 (text_action_compare, action_first, action_next): new functions.
2565 (text_action_add, text_action_add_literal): instead of linear
2566 search and insertion insert new node into the tree.
2567 (removed_by_actions): pass additional parameter: action_list,
2568 use it to traverse the tree.
2569 (offset_with_removed_text): pass additional action_list parameter
2570 to removed_by_actions.
2571 (map_action_fn_context): new typedef.
2572 (map_action_fn_context_struct): new structure.
2573 (map_action_fn): new function.
2574 (map_removal_by_action): use splay_tree_foreach to build map.
2575 (find_insn_action): replace linear search in text_action_list
2576 with series of splay_tree_lookups.
2577 (print_action, print_action_list_fn): new functions.
2578 (print_action_list): use splay_tree_foreach.
2579 (init_xtensa_relax_info): drop action_list.head initialization.
2580 Initialize the tree.
2581 (compute_text_actions): use non-zero action_list_count instead of
2582 non-NULL action list.
2583 (xlate_map_context): new typedef.
2584 (xlate_map_context_struct): new structure.
2585 (xlate_map_fn): new function.
2586 (build_xlate_map): use splay_tree_foreach to build map.
2587 (action_remove_bytes_fn): new function.
2588 (relax_section): use zero action_list_count instead of NULL
2589 action list. Use splay_tree_foreach to count final section size.
2590 Drop unused variable 'removed'.
2591
25922015-04-09 Max Filippov <jcmvbkbc@gmail.com>
2593
2594 * elf32-xtensa.c (removed_literal_map_entry): new typedef.
2595 (removed_literal_map_entry_struct): new structure.
2596 (removed_literal_list_struct): add new fields: n_map and map.
2597 (map_removed_literal, removed_literal_compare): new functions.
2598 (find_removed_literal): build index array for literals ordered
2599 by VMA, use binary search to find removed literal.
2600
26012015-04-09 Max Filippov <jcmvbkbc@gmail.com>
2602
2603 * elf32-xtensa.c (removal_by_action_entry_struct,
2604 removal_by_action_map_struct): new structures.
2605 (removal_by_action_entry, removal_by_action_map): new typedefs.
2606 (text_action_list_struct): add new field: map.
2607 (map_removal_by_action, removed_by_actions_map,
2608 offset_with_removed_text_map): new functions.
2609 (relax_section): replace offset_with_removed_text with
2610 offset_with_removed_text_map.
2611 (translate_reloc, relax_property_section, relax_section_symbols):
2612 replace removed_by_actions with removed_by_actions_map.
2613
26142015-04-09 Max Filippov <jcmvbkbc@gmail.com>
2615
2616 * elf32-xtensa.c (reloc_range_list, reloc_range_list_entry,
2617 reloc_range): new typedef.
2618 (reloc_range_list_struct, reloc_range_list_entry_struct,
2619 reloc_range_struct): new structures.
2620 (reloc_range_compare, build_reloc_ranges,
2621 reloc_range_list_append, reloc_range_list_remove,
2622 reloc_range_list_update_range, free_reloc_range_list): new
2623 functions.
2624 (compute_text_actions): precompute relocation opcodes before the
2625 loop. Add relevant_relocs variable, initialize it before the
2626 loop, pass it to the check_section_ebb_pcrels_fit.
2627 (check_section_ebb_pcrels_fit): add new parameter:
2628 relevant_relocs. Update address range in the relevant_relocs if
2629 it's non-NULL and iterate only over relevant relocations.
2630
3525236c
NC
26312015-04-09 Nick Clifton <nickc@redhat.com>
2632
2633 * elf32-rx.c (describe_flags): Report the settings of the string
2634 insn using bits.
2635 (rx_elf_merge_private_bfd_data): Handle merging of the string insn
2636 using bits.
2637
51509926
L
26382015-04-08 H.J. Lu <hongjiu.lu@intel.com>
2639
2640 * compress.c (bfd_compress_section_contents): Work around a GCC
2641 uninitialized warning bug fixed in GCC 4.7.
2642
151411f8
L
26432015-04-08 H.J. Lu <hongjiu.lu@intel.com>
2644
2645 * archive.c (_bfd_get_elt_at_filepos): Also copy BFD_COMPRESS_GABI
2646 bit.
2647 * bfd.c (bfd::flags): Increase size to 18 bits.
2648 (BFD_COMPRESS_GABI): New.
2649 (BFD_FLAGS_SAVED): Add BFD_COMPRESS_GABI.
2650 (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
2651 (bfd_update_compression_header): New fuction.
2652 (bfd_check_compression_header): Likewise.
2653 (bfd_get_compression_header_size): Likewise.
2654 (bfd_is_section_compressed_with_header): Likewise.
2655 * compress.c (MAX_COMPRESSION_HEADER_SIZE): New.
2656 (bfd_compress_section_contents): Return the uncompressed size if
2657 the full section contents is compressed successfully. Support
2658 converting from/to .zdebug* sections.
2659 (bfd_get_full_section_contents): Call
2660 bfd_get_compression_header_size to get compression header size.
2661 (bfd_is_section_compressed): Renamed to ...
2662 (bfd_is_section_compressed_with_header): This. Add a pointer
2663 argument to return compression header size.
2664 (bfd_is_section_compressed): Use it.
2665 (bfd_init_section_decompress_status): Call
2666 bfd_get_compression_header_size to get compression header size.
2667 Return FALSE if uncompressed section size is 0.
2668 * elf.c (_bfd_elf_make_section_from_shdr): Support converting
2669 from/to .zdebug* sections.
2670 * bfd-in2.h: Regenerated.
2671
87070c08
AM
26722015-04-07 Alan Modra <amodra@gmail.com>
2673
2674 * elf.c (_bfd_elf_get_reloc_section): Allow for .got.plt being
2675 mapped to output .got section.
2676
d3e454b9
AM
26772015-04-07 Alan Modra <amodra@gmail.com>
2678
2679 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Add has_addr16_ha
2680 and has_addr16_lo. Make has_sda_refs a bitfield.
2681 (ppc_elf_check_relocs): Set new flags.
2682 (ppc_elf_link_hash_table_create): Update default_params.
2683 (ppc_elf_adjust_dynamic_symbol): Clear protected_def in cases
2684 where we won't be making .dynbss entries or editing code. Set
2685 params->pic_fixup when we'll edit code for protected var access.
2686 (allocate_dynrelocs): Allocate got entry for edited code and
2687 discard dyn_relocs.
2688 (struct ppc_elf_relax_info): Add picfixup_size.
2689 (ppc_elf_relax_section): Rename struct one_fixup to struct
2690 one_branch_fixup. Rename fixups to branch_fixups. Size space for
2691 pic fixups.
2692 (ppc_elf_relocate_section): Edit non-PIC accessing protected
2693 visibility variables to PIC. Don't emit dyn_relocs for code
2694 we've edited.
2695 * elf32-ppc.h (struct ppc_elf_params): Add pic_fixup.
2696
ffa54770
NC
26972015-04-07 Nick Clifton <nickc@redhat.com>
2698
2699 * elf.c (_bfd_elf_is_local_label_name): Treat assembler generated
2700 local labels as local.
2701
4aa90cc0
L
27022015-04-06 H.J. Lu <hongjiu.lu@intel.com>
2703
2704 * compress.c (get_uncompressed_size): Removed.
2705 (bfd_compress_section_contents): Use bfd_putb64 to write
2706 uncompressed section size.
2707 (bfd_init_section_decompress_status): Replace
2708 get_uncompressed_size with bfd_getb64.
2709
68f5ff89
L
27102015-04-04 H.J. Lu <hongjiu.lu@intel.com>
2711
2712 * elf.c (_bfd_elf_init_private_section_data): Also preserve the
2713 SHF_COMPRESSED bit if not decompress.
2714
8bed4e0f
L
27152015-04-04 H.J. Lu <hongjiu.lu@intel.com>
2716
2717 * compress.c (get_uncompressed_size): New. Extracted from ...
2718 (bfd_init_section_decompress_status): This. Use it.
2719
15c7659f
AT
27202015-04-02 Andrew Turner <andrew@freebsd.org>
2721
2722 * config.bfd: Add aarch64-*-freebsd* target triple.
2723
39f3de7c
L
27242015-04-02 H.J. Lu <hongjiu.lu@intel.com>
2725
2726 * configure: Regenerated.
2727
4106101c
MS
27282015-04-01 Tejas Belagod <tejas.belagod@arm.com>
2729 Marcus Shawcroft <marcus.shawcroft@arm.com>
2730 Jiong Wang <jiong.wang@arm.com>
2731
2732 * bfd-in.h (bfd_elf64_aarch64_set_options)
2733 (bfd_elf32_aarch64_set_options): Add parameter.
2734 * bfd-in2.h: Regenerated.
2735 * elfnn-aarch64.c (aarch64_erratum_843419_stub)
2736 (_bfd_aarch64_adrp_p, _bfd_aarch64_erratum_843419_sequence_p)
2737 (_bfd_aarch64_erratum_843419_stub_name)
2738 (_bfd_aarch64_erratum_843419_fixup)
2739 (_bfd_aarch64_erratum_843419_scan)
2740 (_bfd_aarch64_erratum_843419_branch_to_stub)
2741 (_bfd_aarch64_erratum_843419_p): Define.
2742 (enum elf_aarch64_stub_type): Define
2743 aarch64_stub_erratum_843419_veneer.
2744 (struct elf_aarch64_stub_hash_entry): Define adrp_offset.
2745 (struct elf_aarch64_link_hash_table): Define fix_erratum_843419
2746 and fix_erratum_843419_adr.
2747 (stub_hash_newfunc): Initialize adrp_offset;
2748 (_bfd_aarch64_add_stub_entry_after): Define.
2749 (aarch64_map_one_stub, aarch64_build_one_stub)
2750 (aarch64_size_one_stub): Handle
2751 aarch64_stub_erratum_843419_veneer.
2752 (_bfd_aarch64_resize_stubs): Round stub section size.
2753 (elfNN_aarch64_size_stubs): Add scan for 843419.
2754 (bfd_elfNN_aarch64_set_options): Add parameter. Initialize
2755 fix_erratum_843419 and fix_erratum_843419_adr.
2756 (struct erratum_835769_branch_to_stub_data): Add info.
2757 (elfNN_aarch64_write_section): Initialise info. Handle 843419.
2758 (elfNN_aarch64_size_dynamic_sections): Handle 843419.
2759 * elfxx-aarch64.c (_bfd_aarch64_decode_adrp_imm)
2760 (_bfd_aarch64_sign_extend): Define.
2761 (reencode_adr_imm): Remove static. Rename to:
2762 (_bfd_aarch64_reencode_adr_imm): Define.
2763 (_bfd_aarch64_elf_put_addend): Call _bfd_aarch64_reencode_adr_imm.
2764 * elfxx-aarch64.h (AARCH64_ADR_OP, AARCH64_ADRP_OP)
2765 (AARCH64_ADRP_OP_MASK, _bfd_aarch64_sign_extend)
2766 (_bfd_aarch64_decode_adrp_imm, _bfd_aarch64_reencode_adr_imm):
2767 Define.
2768
afa59b79
L
27692015-04-01 H.J. Lu <hongjiu.lu@intel.com>
2770
2771 * configure: Regenerated.
2772
6036f486
ES
27732015-03-31 Ed Schouten <ed@nuxi.nl>
2774
2775 * config.bfd (targ_defvec): Set to x86_64_elf64_cloudabi_vec
2776 for x86_64-*-cloudabi*.
2777 * configure.ac: Handle x86_64_elf64_cloudabi_vec.
2778 * configure: Regenerated.
2779 * elf64-x86-64.c (TARGET_LITTLE_SYM): Support x86_64-*-cloudabi*.
2780 (TARGET_LITTLE_NAME): Likewise.
2781 (ELF_OSABI): Likewise.
2782 (elf64_bed): Likewise.
2783 * targets.c (x86_64_elf64_cloudabi_vec): New.
2784 (_bfd_target_vector): Add x86_64_elf64_cloudabi_vec.
2785
9ae46699
L
27862015-03-31 H.J. Lu <hongjiu.lu@intel.com>
2787
2788 * configure.ac: Revert the AM_ZLIB change.
2789 * Makefile.in: Regenerated.
2790 * aclocal.m4: Likewise.
2791 * configure: Likewise.
2792 * doc/Makefile.in: Likewise.
2793
bd53a53a
L
27942015-03-30 H.J. Lu <hongjiu.lu@intel.com>
2795
2796 PR ld/18169
2797 * elf-bfd.h (elf_backend_data): Add get_reloc_section.
2798 (_bfd_elf_get_reloc_section): New.
2799 * elf.c (_bfd_elf_get_reloc_section): Likewise.
2800 (assign_section_numbers): Call get_reloc_section to look up the
2801 section the relocs apply.
2802 * elfxx-target.h (elf_backend_get_reloc_section): Likewise.
2803 (elfNN_bed): Initialize get_reloc_section with
2804 elf_backend_get_reloc_section.
2805
243340ad
L
28062015-03-29 H.J. Lu <hongjiu.lu@intel.com>
2807
2808 * Makefile.am (ZLIB): New.
2809 (ZLIBINC): Likewise.
2810 (AM_CFLAGS): Add $(ZLIBINC).
2811 (libbfd_la_LIBADD): Add $(ZLIB).
2812 * compress.c: Don't check HAVE_ZLIB_H to include <zlib.h>.
2813 (decompress_contents): Don't check HAVE_ZLIB_H.
243340ad
L
2814 (bfd_compress_section_contents): Likewise.
2815 (bfd_get_full_section_contents): Likewise.
2816 (bfd_init_section_decompress_status): Likewise.
2817 (bfd_init_section_compress_status): Likewise.
b51724e8 2818 * configure.ac (AM_ZLIB): Removed.
243340ad
L
2819 (zlibdir): New. AC_SUBST.
2820 (zlibinc): Likewise.
2821 Add --with-system-zlib.
2822 * Makefile.in: Regenerated.
2823 * acinclude.m4: Likewise.
2824 * config.in: Likewise.
2825 * configure: Likewise.
2826 * doc/Makefile.in: Likewise.
2827
b8417128
AM
28282015-03-27 Alan Modra <amodra@gmail.com>
2829
2830 PR ld/15228
2831 PR ld/18167
2832 * elflink.c (elf_merge_st_other): Add "sec" parameter. Don't set
2833 protected_def when symbol section is read-only. Adjust all calls.
2834 * elf-bfd.h (struct elf_link_hash_entry): Update protected_def comment.
2835
93ca8569
TB
28362015-03-26 Tejas Belagod <tejas.belagod@arm.com>
2837
2838 * elfnn-aarch64.c (aarch64_build_one_stub): Replace the call to generic
2839 _bfd_final_link_relocate with aarch64_relocate.
2840
b19a8f85
L
28412015-03-26 H.J. Lu <hongjiu.lu@intel.com>
2842
2843 PR ld/18160
2844 * elflink.c (elf_gc_sweep): Skip if relocation is incompatible.
2845 (bfd_elf_gc_sections): Likewise.
2846
61865519
MS
28472015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
2848
2849 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Adjust stub section
2850 size for initial branch.
2851 (elfNN_aarch64_build_stubs): Write initial branch.
2852 _bfd_aarch64_decode_(elfNN_aarch64_output_arch_local_syms): Write
2853 mapping symbol on initial branch.
2854
d9ced15d 28552015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
357d1523
MS
2856
2857 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_scan):
2858 Update erratum count.
2859
d422d1c4
SKS
28602015-03-25 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2861
2862 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't break on
2863 first matching debug section.
2864
8d001214
L
28652015-03-24 H.J. Lu <hongjiu.lu@intel.com>
2866
2867 PR gas/18087
2868 * compress.c (bfd_compress_section_contents): Don't write the
2869 zlib header and set contents as well as compress_status if
2870 compression didn't make the section smaller.
2871 (bfd_init_section_compress_status): Don't check compression
2872 size here.
2873
fc42baf3
NC
28742015-03-24 Nick Clifton <nickc@redhat.com>
2875
2876 PR binutils/17512
2877 * coffgen.c (coff_get_normalized_symtab): Fix test for out of
2878 range auxillary sections.
2879
fc6d53be
MS
28802015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
2881
2882 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor
2883 code into:
2884 (_bfd_aarch64_get_stub_for_link_section): Define.
2885
30068a6d
MS
28862015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
2887
2888 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Adjust
2889 update of section_group[].stub_sec.
2890
5421cc6e
MS
28912015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
2892
2893 * elfnn-aarch64.c (struct aarch64_erratum_835769_fix) Remove.
2894 (erratum_835769_scan) Drop fix_table_size_p and fixes_p arguments.
2895 Delete fixes, fix_table_size and associated code. Call
2896 _bfd_aarch64_add_stub_entry_in_group. Rename to...
2897 (bfd_aarch64_erratum_835769_scan): Define.
2898 (elfNN_aarch64_size_stubs): Delete erratum_835769_fixes,
2899 erratum_835769_fix_table_size, i and associated code. Relocate
2900 call to _bfd_aarch64_erratum_835769_scan. Delete adhoc stub size
2901 correction. Delete construction of stub entry from
2902 erratum_835769_fixes array.
2903
e572930b
MS
29042015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
2905
2906 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Use
2907 _bfd_aarch64_add_stub_entry_in_group.
2908
8131c122
AM
29092015-03-24 Alan Modra <amodra@gmail.com>
2910
2911 * elf64-ppc.c (ppc64_elf_relocate_section): Report overflow to
2912 stubs, even those for undefined weak symbols. Otherwise, don't
2913 report relocation overflow on branches to undefined strong
2914 symbols. Fix memory leak.
2915 * elf32-ppc.c (ppc_elf_relocate_section): Don't report relocation
2916 overflow on branches to undefined strong symbols.
2917
c53ed7cf
KS
29182015-03-23 Keith Seitz <keiths@redhat.com>
2919
2920 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Add
2921 missing ';'.
2922
94a75bde
MS
29232015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2924
2925 * elfnn-aarch64.c (erratum_835769_scan): Factor stub name
2926 construction into...
2927 (_bfd_aarch64_erratum_835769_stub_name): Define.
2928
13f622ec
MS
29292015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2930
2931 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Factor out
2932 stub resize code into...
2933 (bfd_aarch64_resize_stubs): Define.
2934
66585675
MS
29352015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2936
2937 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor stub
2938 creation code into...
2939 (bfd_aarch64_create_stub_section): Define.
2940
ef857521
MS
29412015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2942
2943 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Rename
2944 from elf_aarch64_create_or_find_stub_sec.
2945 (_bfd_aarch64_add_stub_entry_in_group): Rename from
2946 elfNN_aarch64_add_stub. Call
2947 _bfd_aarch64_create_or_find_stub_sec.
2948 (elfNN_aarch64_size_stubs, elfNN_aarch64_size_stubs): Call
2949 _bfd_aarch64_add_stub_entry_in_group.
2950
2144188d
MS
29512015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2952
2953 * elfnn-aarch64.c (erratum_835769_scan) Add comment. Reverse
2954 sense of boolean return.
2955 (elfNN_aarch64_size_stubs): Adjust for above.
2956
4c77202d
MS
29572015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2958
2959 * elfnn-aarch64.c (elf_aarch64_create_or_find_stub_sec):
2960 Remove unused parameter.
2961 (elfNN_aarch64_size_stubs): Adjust for above.
2962
9b9971aa
MS
29632015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2964
2965 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Remove bfd_indx.
2966
e2cdef47
MS
29672015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2968
2969 * elfnn-aarch64.c (aarch64_erratum_835769_fixes)
2970 (num_aarch64_erratum_835769_fixes): Remove.
2971 (elfNN_aarch64_size_stubs): Remove assignments to above.
2972
3d14faea
MS
29732015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2974
23956543
MS
2975 * elfnn-aarch64.c (aarch64_mem_op_p): Update comment. Rename rtn
2976 to rt2.
3d14faea
MS
2977 (aarch64_erratum_seqeunce): Rename rtn to rt2.
2978
f872121a
MS
29792015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
2980
2981 * elfnn-aarch64.c (elfNN_aarch64_write_section): Adjust layout.
2982
1740ba0c
NC
29832015-03-19 Nick Clifton <nickc@redhat.com>
2984
2985 * elf32-rl78.c (rl78_cpu_name): New function. Prints the name of
2986 the RL78 core based upon the flags.
2987 (rl78_elf_merge_private_bfd_data): Handle merging of G13 and G14
2988 flags.
2989 (rl78_elf_print_private_bfd_data): Use rl78_cpu_name.
2990 (elf32_rl78_machine): Always return bfd_mach_rl78.
2991
e2575e05
NC
29922015-03-19 Nick Clifton <nickc@redhat.com>
2993
2994 PR 18078
2995 * compress.c (bfd_compress_section_contents): Do not define this
2996 function if it is not used.
2997
0b0732e1
L
29982015-03-18 H.J. Lu <hongjiu.lu@intel.com>
2999
3000 * compress.c (bfd_compress_section_contents): Make it static.
3001 * bfd/bfd-in2.h: Regenerated.
3002
27aaeda0
NC
30032015-03-18 Eric Youngdale <eyoungdale@ptc.com>
3004
3005 PR ld/16598
3006 * peicode.h (pe_ILF_build_a_bfd): Add support for creating relocs
3007 suitable for the AMD64.
3008
273a4985
JT
30092015-03-18 Jon Turney <jon.turney@dronecode.org.uk>
3010 Nick Clifton <nickc@redhat.com>
3011
3012 PR binutils/18087
3013 * coffgen.c (make_a_section_from_file): Only prepend a z to a
3014 debug section's name if the section was actually compressed.
3015 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
3016 * compress.c (bfd_init_section_compress_status): Do not compress
3017 the section if doing so would make it bigger. In such cases leave
3018 the section alone and return COMPRESS_SECTION_NONE.
3019
c4b0b099
AM
30202015-03-17 Alan Modra <amodra@gmail.com>
3021
3022 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return count of 0
3023 on nothing to do, before malloc of returned symbol array.
3024
9c761a55
NC
30252015-03-16 Nick Clifton <nickc@redhat.com>
3026
3027 * elf32-rx.c (elf32_rx_relax_delete_bytes): If the relocs are not
3028 stored in the elf_section_data structure then load them as
3029 necessary.
3030
b9005ba7
AK
30312015-03-14 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
3032
3033 * elf-s390-common.c (elf_s390_elf_sort_relocs_p): Don't sort
3034 relocs against code sections.
3035 * elf32-s390.c: Define elf_backend_sort_relocs_p.
3036 * elf64-s390.c: Likewise.
3037
1079403c
AM
30382015-03-11 Alan Modra <amodra@gmail.com>
3039
3040 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Examine stubs in
3041 reverse order. Account for larger size of __tls_get_addr_opt stub.
3042
a5721edd
JW
30432015-03-10 Yuri Gribov <y.gribov@samsung.arm>
3044
3045 PR ld/16572
3046 * elf32-arm.c (elf32_arm_final_link_relocate): Remove support for
3047 ELF_ARM_HASENTRY.
3048 (elf32_arm_print_private_bfd_data): Likewise.
3049
65164438
NC
30502015-03-06 Nick Clifton <nickc@redhat.com>
3051
3052 PR binutils/17765
3053 * elflink.c (put_value): Like previous delta, but for the 32-bit
3054 case.
3055
41cd1ad1
NC
30562015-03-05 Nick Clifton <nickc@redhat.com>
3057
3058 PR binutils/17765
3059 * elflink.c (put_value): Avoid using an undefined shift
3060 operation.
3061
ca3fe95e
L
30622015-03-05 H.J. Lu <hongjiu.lu@intel.com>
3063
3064 PR ld/pr15228
3065 PR ld/pr17709
3066 * elf-bfd.h (elf_backend_data): Add extern_protected_data.
3067 * elf32-i386.c (elf_backend_extern_protected_data): New.
3068 Defined to 1.
3069 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
3070 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
3071 copy relocs against protected symbols if extern_protected_data
3072 is true.
3073 (_bfd_elf_symbol_refs_local_p): Don't return true on protected
3074 non-function symbols if extern_protected_data is true.
3075 * elfxx-target.h (elf_backend_extern_protected_data): New.
3076 Default to 0.
3077 (elfNN_bed): Initialize extern_protected_data with
3078 elf_backend_extern_protected_data.
3079
425bd9e1
NC
30802015-03-05 Nick Clifton <nickc@redhat.com>
3081
3082 PR binutils/18025
3083 * coffgen.c (coff_find_nearest_line_with_names): If the dwarf2
3084 lookup fails, check for an address bias in the dwarf info, and if
3085 one exists, retry the lookup with the biased value.
3086 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): New function.
3087 Determines if a bias exists bewteen the addresses of functions
3088 based on DWARF information vs symbol table information.
3089 * libbfd-in.h (_bfd_dwarf2_find_symbol_bias): Prototype.
3090 * libbfd.h: Regenerate.
3091
8ef229f3
MS
30922015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3093
3094 * elfxx-aarch64.c (decode_add_imm, decode_movw_imm)
3095 (decode_tst_branch_ofs_14, decode_ld_lit_ofs_19)
3096 (decode_cond_branch_ofs_19, decode_branch_ofs_26): Remove.
3097
8e2fe09f
MS
30982015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
3099
3100 * elfnn-aarch64.c (aarch64_build_one_stub): Call abort.
3101 (aarch64_size_one_stub): Likewise.
3102 (aarch64_map_one_stub): Likewise.
3103
df88b702
AA
31042015-03-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
3105
3106 * cpu-s390.c (N): New macro.
3107 (bfd_s390_31_arch): New. Define only if default target word size
3108 is 64 bits. Otherwise define...
3109 (bfd_390_64_arch): ...this. Make static.
3110 (bfd_s390_arch): Define according to the default target word size.
3111 Let the 'next' field point to the alternate arch.
3112
e09ab7ac
RS
31132015-03-04 Richard Sandiford <richard.sandiford@arm.com>
3114
3115 PR gas/17843
3116 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Expect
3117 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC and R_AARCH64_TLSLE_MOVW_TPREL_G1_NC
3118 to be used with MOVK rather than MOVZ.
3119
71eef2bd
DD
31202015-03-03 DJ Delorie <dj@redhat.com>
3121
3122 * elf32-rl78.c (rl78_elf_relax_section): Only relax ADDR16's if
3123 there's a symbol.
3124
f01f1741
AM
31252015-02-28 Alan Modra <amodra@gmail.com>
3126
3127 * elf32-ppc.c (ppc_elf_tls_setup): Set no_tls_get_addr_opt if
3128 not PLT_NEW.
3129
c1d11331
L
31302015-02-27 H.J. Lu <hongjiu.lu@intel.com>
3131
3132 * elf32-i386.c (need_convert_mov_to_lea): New.
3133 (elf_i386_check_relocs): Set need_convert_mov_to_lea if needed.
3134 (elf_i386_convert_mov_to_lea): Return TRUE if
3135 need_convert_mov_to_lea is unset.
3136 * elf64-x86-64.c (need_convert_mov_to_lea): New.
3137 (elf_x86_64_check_relocs): Set need_convert_mov_to_lea if needed.
3138 (elf_x86_64_convert_mov_to_lea): Return TRUE if
3139 need_convert_mov_to_lea is unset.
3140
cdb602b1
NC
31412015-02-27 Nick Clifton <nickc@redhat.com>
3142
3143 PR binutils/17910
3144 * coffgen.c (_bfd_coff_internal_syment_name): Only check for
3145 string length overflow when the string table length is actually
3146 set.
3147
96c20bc1
MS
31482015-02-27 Marcus Shawcroft <marcus.shawcroft@arm.com>
3149
3150 * bfd/bfd-in2.h: Regenerate.
3151 * bfd/libbfd.h: Regenerate.
3152
1ada945d
MS
31532015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
3154
3155 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix
3156 TLSDESC_LD_PREL19 field width and masks.
3157 (aarch64_tls_transition_without_check)
3158 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
3159 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
3160 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
3161 BFD_RELOC_AARCH64_TLSDESC_LD_PREL19.
3162 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
3163 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3164
389b8029
MS
31652015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
3166
73920eed
MS
3167 * elfnn-aarch64.c (IS_AARCH64_TLSDESC_RELOC): Reorder R_TYPE
3168 tests.
389b8029
MS
3169 (aarch64_tls_transition_without_check)
3170 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
3171 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
3172 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
3173 BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21.
3174 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
3175 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3176 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
3177
3c12b054
MS
31782015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
3179
3180 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC)
3181 (elfNN_aarch64_howto_table, aarch64_tls_transition_without_check)
3182 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
3183 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
3184 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
3185 BFD_RELOC_AARCH64_TLSGD_ADR_PREL21.
3186 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
3187 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3188 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
3189
043bf05a
MS
31902015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
3191
3192 * elfnn-aarch64.c: (TLSIE_LD_GOTTREL_PREL19): Fix HOWTO bit field width.
3193 (aarch64_tls_transition_without_check, aarch64_reloc_got_type)
3194 (elfNN_aarch64_final_link_relocate, elfNN_aarch64_tls_relax)
3195 (elfNN_aarch64_relocate_section, elfNN_aarch64_gc_sweep_hook)
3196 (elfNN_aarch64_check_relocs): Handle
3197 BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19.
3198
3199 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
3200 (_bfd_aarch64_elf_resolve_relocation): Likewise.
3201
7366006f
MS
32022015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
3203
3204 * elfnn-aarch64.c: (TLSDESC_CALL): Fix HOWTO bit field width.
3205
07875fbc
MS
32062015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
3207
3208 * elfnn-aarch64.c (TLSLE_MOVW_TPREL_G2)
3209 (TLSLE_MOVW_TPREL_G1, TLSLE_MOVW_TPREL_G1_NC)
3210 (TLSLE_MOVW_TPREL_G0, TLSLE_MOVW_TPREL_G0_NC): Fix bit field
3211 width.
3212
49d8f92c
MS
32132015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
3214
3215 * elfnn-aarch64.c: (TLSIE_MOVW_GOTTPREL_G0_NC): Fix HOWTO bit
3216 field width.
3217
c86934ce
NC
32182015-02-26 Nick Clifton <nickc@redhat.com>
3219
3220 PR binutils/17512
3221 * coffcode.h (coff_compute_section_file_positions): Report
3222 negative page sizes.
3223 * elf.c (elf_fake_sections): Handle excessive alignmment powers.
3224 (assign_file_positions_for_non_load_sections): Replace assertion
3225 with an error message.
3226 (rewrite_elf_program_header): Handle excessive segment
3227 alignments.
3228 * mach-o.c (bfd_mach_o_read_section_32): Likewise.
3229 (bfd_mach_o_read_section_64): Likewise.
3230 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Use %B to
3231 print a bfd name, not %A.
3232
bd4d2eaa
AM
32332015-02-26 Alan Modra <amodra@gmail.com>
3234
3235 * elf64-ppc.c (plt_stub_size, build_plt_stub): Don't build
3236 thread-safe stubs for iplt.
3237 (build_tls_get_addr_stub): Restore r2 immediately after call.
3238
99654aaf
TG
32392015-02-26 Terry Guo <terry.guo@arm.com>
3240
3241 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Update how we
3242 merge Tag_ABI_HardFP_use.
3243
a127494f
AM
32442015-02-26 Alan Modra <amodra@gmail.com>
3245
3246 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Heed -z nocopyreloc.
3247 Use text relocs rather than giving an error on trying to use
3248 .dynbss for protected shared lib vars.
3249 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
3250
bac13f5a
AB
32512015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
3252
3253 * elf32-avr.c (struct elf_avr_section_data): New structure.
3254 (struct avr_relax_info): New structure.
3255 (elf_avr_new_section_hook): New function.
3256 (struct elf_avr_section_data): Add relax_info.
3257 (get_avr_relax_info): New function.
3258 (init_avr_relax_info): New function.
3259 (elf32_avr_relax_delete_bytes): Find next property record before
3260 deleting bytes. When deleting don't move bytes beyond the next
3261 property record.
3262 (avr_elf32_assign_records_to_section): New function.
3263 (avr_property_record_compare): New function.
3264 (avr_load_all_property_sections): New function.
3265 (elf32_avr_relax_section): Load property data. After relaxing the
3266 section, move any .align directives that have enough deleted bytes
3267 before them.
3268 (bfd_elf32_new_section_hook): Define.
3269
137c83d6
AB
32702015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
3271
3272 * elf32-avr.h (struct avr_property_header): New strucure.
3273 (avr_elf32_load_property_records): Declare.
3274 (avr_elf32_property_record_name): Declare.
3275 * elf32-avr.c: Add bfd_stdint.h include.
3276 (retrieve_local_syms): New function.
3277 (get_elf_r_symndx_section): New function.
3278 (get_elf_r_symndx_offset): New function.
3279 (internal_reloc_compare): New function.
3280 (struct avr_find_section_data): New structure.
3281 (avr_is_section_for_address): New function.
3282 (avr_find_section_for_address): New function.
3283 (avr_elf32_load_records_from_section): New function.
3284 (avr_elf32_load_property_records): New function.
3285 (avr_elf32_property_record_name): New function.
3286
fdd410ac
AB
32872015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
3288
3289 * elf32-avr.h (AVR_PROPERTY_RECORD_SECTION_NAME): Define.
3290 (AVR_PROPERTY_RECORDS_VERSION): Define.
3291 (AVR_PROPERTY_SECTION_HEADER_SIZE): Define.
3292 (struct avr_property_record): New structure.
3293
685080f2
NC
32942015-02-24 Nick Clifton <nickc@redhat.com>
3295
3296 * elf32-v850.c (v850_set_note): New function. Creates a Renesas
3297 style note entry.
3298 (v850_elf_make_note_section): New function. Creates a note
3299 section.
3300 (v850_elf_create_sections): New function. Create a note section
3301 if one is not already present.
3302 (v850_elf_set_note): New function. Adds a note to a bfd.
3303 (v850_elf_copy_private_bfd_data): New function. Copies V850
3304 notes.
3305 (v850_elf_merge_notes): New function. Merges V850 notes.
3306 (print_v850_note): New function. Displays a V850 note.
3307 (v850_elf_print_notes): New function. Displays all notes attached
3308 to a bfd.
3309 (v850_elf_merge_private_bfd_data): Call v850_elf_merge_notes.
3310 (v850_elf_print_private_bfd_data): Call v850_elf_print_notes.
3311 (v850_elf_fake_sections): Set the type of the V850 note section.
3312 * bfd-in.h (v850_elf_create_sections): Add prototype.
3313 (v850_elf_set_note): Add prototype.
3314 * bfd-in2.h: Regenerate.
3315
31593e1b
NC
33162015-02-24 Nick Clifton <nickc@redhat.com>
3317
3318 * configure.ac (AC_CHECK_HEADERS): Add wctype.h.
3319 * configure: Regenerate.
3320 * config.in: Regenerate.
3321 * peXXigen.c: Include wctype.h if HAVE_WCTYPE_H is defined.
3322 (u16_mbtowc): Use wint_t types if HAVE_WCTYPE_H is defined.
3323 (rsrc_cmp): Use towlower instead of wcsncasecmp if HAVE_WCTYPE_H
3324 is defined.
3325
3ad797fd
NC
33262015-02-24 Nick Clifton <nickc@redhat.com>
3327
3328 * pdp11.c (set_section_contents): Pad the .text and .data sections
3329 to their aligned sizes.
3330
5518c738
YS
33312015-02-23 Yoshinori Sato <ysato@users.sourceforge.jp>
3332
3333 * config.bfd: Add h8300-*-linux.
3334 * configure.ac: Add h8300_elf32_linux_vec.
3335 * configure: Regenerate.
3336 * elf32-h8300.c: Likewise.
3337 * targets.c(_bfd_target_vector): Likewise.
3338
cb967f0d
NC
33392015-02-23 Nick Clifton <nickc@redhat.com>
3340
3341 PR 17914
3342 * cpu-w65.c: Correct typos in license notice.
3343
0f8f0c57
NC
3344 PR 17940
3345 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Adjust debug
3346 symbols at end of sections. Adjust function sizes.
3347
4ef9f41a
AA
33482015-02-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
3349
3350 * elf-bfd.h (elfcore_write_s390_vxrs_low): Add prototype.
3351 (elfcore_write_s390_vxrs_high): Likewise.
3352 * elf.c (elfcore_grok_s390_vxrs_low): New function.
3353 (elfcore_grok_s390_vxrs_high): New function.
3354 (elfcore_grok_note): Call them.
3355 (elfcore_write_s390_vxrs_low): New function.
3356 (elfcore_write_s390_vxrs_high): New function.
3357 (elfcore_write_register_note): Call them.
3358
837914ee
BD
33592015-02-19 Branko Drevensek <branko.drevensek@gmail.com>
3360
3361 PR 17995
3362 * verilog.c (verilog_write_record): Correct buffer size.
3363
cf18fda4
AM
33642015-02-19 Alan Modra <amodra@gmail.com>
3365
3366 * elflink.c (_bfd_elf_define_linkage_sym): Set 'bed' earlier.
3367
d983c8c5
AM
33682015-02-19 Alan Modra <amodra@gmail.com>
3369
3370 PR ld/4317
3371 * elflink.c (elf_link_input_bfd): Drop undefined local syms.
3372 (elf_link_output_extsym): Drop local and global undefined syms.
3373 Tidy. Expand comment.
3374
2ec55de3
AM
33752015-02-17 Alan Modra <amodra@gmail.com>
3376
3377 PR ld/17975
3378 * elflink.c (struct elf_outext_info): Remove need_second_pass
3379 and second_pass.
3380 (elf_link_output_extsym): Delete code handling second forced
3381 local pass. Move code emitting NULL STT_FILE symbol later, so
3382 that it can be omitted if forced local is stripped. Don't
3383 emit the NULL STT_FILE if no file symbols have been output.
3384 (bfd_elf_final_link): Remove second forced local pass.
3385 * elf32-ppc.c (add_stub_sym): Set linker_def on linker syms.
3386 (ppc_elf_size_dynamic_sections): Likewise.
3387 * elf64-ppc.c (ppc_build_one_stub): Likewise.
3388 (build_global_entry_stubs): Likewise.
3389 (ppc64_elf_build_stubs): Likewise.
3390
6dfb72b9
L
33912015-02-16 H.J. Lu <hongjiu.lu@intel.com>
3392
3393 PR ld/17975
3394 * elflink.c (elf_link_output_extsym): Only check filesym_count
3395 when outputting a NULL FILE symbol. Set second_pass_sym to
3396 h->forced_local && !h->root.linker_def.
3397
576fa883
L
33982015-02-15 H.J. Lu <hongjiu.lu@intel.com>
3399
3400 * elf32-i386.c (elf_i386_always_size_sections): Set root.linker_def
3401 on _TLS_MODULE_BASE_.
3402 * elf64-x86-64.c (elf_x86_64_always_size_sections): Likewise.
3403
62f8d217
AM
34042015-02-15 Alan Modra <amodra@gmail.com>
3405
3406 * dwarf2.c (read_rangelist): Correct buffer overflow check
3407 Whitespace throughout file.
3408
ce875075
AM
34092015-02-14 Alan Modra <amodra@gmail.com>
3410
3411 PR ld/17973
3412 * bfd.c (struct bfd): Add lto_output.
3413 * linker.c (_bfd_handle_already_linked): Explicitly test for
3414 objects added by the lto plugin.
3415 * opncls.c (_bfd_new_bfd_contained_in): Copy lto_output and
3416 no_export flags from archive.
3417 * archive.c (open_nested_file): New function, setting lto_output
3418 and no_export, extracted from..
3419 (find_nested_archive): ..here. Flip params. Rename from
3420 _bfd_find_nested_archive.
3421 (_bfd_get_elt_at_filepos): Correct var typo. Use open_nested_file.
3422 (_bfd_look_for_bfd_in_cache): Copy no_export.
3423 * elflink.c (elf_link_add_object_symbols): Remove now unnecessary
3424 my_archive->no_export test.
3425 (elf_link_input_bfd): Drop existing lto_output STT_FILE syms.
3426 Don't use the file name when adding lto_output STT_FILE sym.
3427 * bfd-in2.h: Regenerate.
3428
451dfd38
AM
34292015-02-13 Alan Modra <amodra@gmail.com>
3430
3431 PR binutils/17512
3432 * elf64-ppc.c (opd_entry_value): Tighten offset check. Remove
3433 now redundant assert.
3434
dbb3fbbb
NC
34352015-02-12 Nick Clifton <nickc@redhat.com>
3436
3437 PR binutils/17512
3438 * dwarf.c (read_1_byte, read_1_signed_byte, read_2_bytes)
3439 (read_4_bytes, read_8_bytes, read_n_bytes, read_string)
3440 (read_indirect_string, read_alt_indirect_string)
3441 (read_alt_indirect_ref, read_address, read_abbrevs)
3442 (read_attribute_value, read_attribute, decode_line_info)
3443 (find_abstract_instance_name, read_rangelist)
3444 (scan_unit_for_symbols, parse_comp_unit)
3445 (_bfd_dwarf2_find_nearest_line): Harden DWARF reading code. Pass
3446 end pointers to reading functions and check for offsets taking
3447 pointers out of range. Replace calls to read_*_leb128 with calls
3448 to safe_read_leb128.
3449
3450 (* elf64-ppc.c (opd_entry_value): Add a check for an overlarge
3451 offset.
3452 * syms.c (_bfd_stab_section_find_nearest_line): Add checks for
3453 computed file_name address being before the start of the string
3454 table.
3455
b9dc5a87
L
34562015-02-11 H.J. Lu <hongjiu.lu@intel.com>
3457
3458 PR ld/17878
3459 * bfd.c (bfd_plugin_format): New.
3460 (bfd): Add plugin_format and plugin_dummy_bfd.
3461 * plugin.c (try_load_plugin): Take a pointer to bfd_boolean
3462 argument to return TRUE if any plugin is found. Set plugin_format.
3463 (has_plugin): New.
3464 (bfd_plugin_target_p): New.
3465 (bfd_plugin_specified_p): Likewise.
3466 (bfd_plugin_target_p): Likewise.
3467 (register_ld_plugin_object_p): Likewise.
3468 (bfd_plugin_set_plugin): Set has_plugin.
3469 (load_plugin): Cache try_load_plugin result.
3470 (bfd_plugin_object_p): Try ld_plugin_object_p first. Check
3471 plugin_format.
3472 * plugin.h (bfd_plugin_target_p): New.
3473 (bfd_plugin_specified_p): Likewise.
3474 (register_ld_plugin_object_p): Likewise.
3475 * bfd-in2.h: Regenerated.
3476
55172d69
PA
34772015-02-11 Pedro Alves <palves@redhat.com>
3478
3479 * libbfd-in.h [__cplusplus]: Open extern "C" scope.
3480 * libcoff-in.h [__cplusplus]: Open extern "C" scope.
3481 * libbfd.h: Regenerate.
3482 * libcoff.h: Regenerate.
3483
3484 * elf-bfd.h [__cplusplus]: Wrap in extern "C".
3485 * mach-o.h [__cplusplus]: Wrap in extern "C".
3486 * som.h [__cplusplus]: Wrap in extern "C".
3487
77ef8654
NC
34882015-02-10 Nick Clifton <nickc@redhat.com>
3489
3490 PR binutils/17512
3491 * coffcode.h (styp_to_sec_flags): Use an unsigned long type to
3492 hold the flag bits.
3493 * peXXigen.c (pe_print_reloc): Use unsigned types to hold the
3494 size and number of relocs.
3495 (pe_print_debugdata): Use a 32-bit aligned buffer to store the
3496 codeview record.
3497 * versados.c (process_otr): Check the esdid value before using it
3498 to access the EDATA.
3499
35181b3e
EM
35002015-02-09 Ed Maste <emaste@freebsd.org>
3501
3502 * elf32-i386.c (elf_i386_get_plt_sym_val): Avoid incrementing
3503 uninitialized and unused variable.
3504 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
3505
989f9879
AM
35062015-02-09 Alan Modra <amodra@gmail.com>
3507
3508 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault on NULL
3509 tls_sec.
3510 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3511 * elflink.c (elf_link_output_extsym): Don't assert on NULL tls_sec.
3512
ca4be51c
AM
35132015-02-09 Alan Modra <amodra@gmail.com>
3514
3515 * elflink.c: Whitespace, formatting fixes.
3516 (elf_link_input_bfd): Clarify comment.
3517 (elf_link_output_extsym): Exclude symbols in linker created
3518 sections when testing for plugin symbols.
3519
1952c5cd
L
35202015-02-07 H.J. Lu <hongjiu.lu@intel.com>
3521
3522 PR ld/17935
3523 * elf32-i386.c (elf_i386_readonly_dynrelocs): Also issue a
3524 warning for relocation in readonly section for -z text.
3525 (elf_i386_size_dynamic_sections): Likewise.
3526 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
3527 (elf_x86_64_size_dynamic_sections): Likewise.
3528
9e2dec47
L
35292015-02-06 H.J. Lu <hongjiu.lu@intel.com>
3530
3531 PR ld/12365
3532 PR ld/14272
3533 * elflink.c (_bfd_elf_fix_symbol_flags): Revert the last change.
3534 (elf_link_input_bfd): Mark the plugin symbol undefined if it is
3535 referenced from a non-IR file.
3536
5929c344
NC
35372015-02-06 Nick Clifton <nickc@redhat.com>
3538
3539 PR binutils/17512
3540 * peXXigen.c (rsrc_print_resource_entries): Add range check for
3541 addresses that wrap around the address space.
3542 (rsrc_parse_entry): Likewise.
3543
60f79275
L
35442015-02-03 H.J. Lu <hongjiu.lu@intel.com>
3545
3546 PR ld/12365
3547 PR ld/14272
3548 * elflink.c (_bfd_elf_fix_symbol_flags): Mark the plugin symbol
3549 undefined if it is referenced from a non-IR file.
3550
64d29018
NC
35512015-02-03 Nick Clifton <nickc@redhat.com>
3552
3553 PR binutils/17512
3554 * ecoff.c: Use bfd_alloc2 to allocate space for structure arrays.
3555 (_bfd_ecoff_slurp_symbol_table): Check for a negative symbol
3556 index or an out of range fdr index.
3557 * elf-m10300.c (mn10300_info_to_howto): Fix typo in error message.
3558 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
3559 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
3560 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
3561 * elf32-cr16c.c (elf_cr16c_info_to_howto_rel): Likewise.
3562 * elf32-cris.c (cris_info_to_howto_rela): Likewise.
3563 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
3564 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
3565 * elf32-d30v.c (d30v_info_to_howto_rel): Likewise.
3566 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
3567 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
3568 * elf32-frv.c (frv_info_to_howto_rela): Likewise.
3569 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
3570 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
3571 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
3572 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
3573 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
3574 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
3575 * elf32-m32r.c (m32r_info_to_howto_rel): Likewise.
3576 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
3577 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
3578 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
3579 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
3580 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
3581 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
3582 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
3583 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
3584 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
3585 * elf32-nds32.c (nds32_info_to_howto_rel): Likewise.
3586 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
3587 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
3588 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
3589 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
3590 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
3591 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
3592 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
3593 * elf32-v850.c (v850_elf_perform_relocation): Likewise.
3594 * elf32-vax.c (rtype_to_howto): Likewise.
3595 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
3596 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
3597 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
3598 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
3599 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
3600 * mach-o.c: Use bfd_alloc2 to allocate space for structure arrays.
3601 (bfd_mach_o_canonicalize_one_reloc): Fix check on out
3602 of range symbol indicies.
3603 (bfd_mach_o_canonicalize_relocs): Check for out of range alloc.
3604 (bfd_mach_o_canonicalize_dynamic_reloc): Likewise.
3605 (bfd_mach_o_build_dysymtab): Likewise.
3606 (bfd_mach_o_write_symtab_content): Set the string table size to
3607 zero upon error.
3608 (bfd_mach_o_read_symtab_symbols): Reset the nsyms value if the
3609 read fails.
3610 * peXXigen.c (pe_print_edata): Check for numeric overflow in edt
3611 fields.
3612 * tekhex.c (first_phase): Check for src pointer reaching end of
3613 buffer.
3614
3a635617
WN
36152015-02-03 Will Newton <will.newton@linaro.org>
3616
46b87d49
WN
3617 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol):
3618 Set st_value to zero for undefined symbols if the reference
3619 is weak or pointer_equality_needed is FALSE.
3620
3a635617
WN
3621 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Improve
3622 comment discussing why we clear st_value for some symbols.
3623
0c4bd9d9
KLC
36242015-02-02 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3625
3626 * elf32-nds32.c (nds32_get_section_contents): Add one more argument.
3627 (nds32_elf_relocate_section): Do not relocate R_NDS32_LONGJUMP7.
3628
b86ac8e3
AM
36292015-01-29 Alan Modra <amodra@gmail.com>
3630
3631 * elf64-ppc.c (ppc64_elf_relocate_section): Correct GOT_TLSLD
3632 optimization. Tidy mask for GOT_TLSGD optimization.
3633 * elf32-ppc.c (ppc_elf_relocate_section): Likewise. Correct
3634 location of nop zapping high insn too.
3635
dbd1e97e
AM
36362015-01-28 Alan Modra <amodra@gmail.com>
3637
3638 * elf64-ppc.h (struct ppc64_elf_params): Add "object_in_toc".
3639 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Assume that global symbols
3640 in .toc indicate xlc compiled code that might require a rw .toc.
3641
3f8107ab
AM
36422015-01-28 James Bowman <james.bowman@ftdichip.com>
3643
3644 * Makefile.am: Add FT32 files.
3645 * archures.c (enum bfd_architecture): Add bfd_arch_ft32.
3646 (bfd_mach_ft32): Define.
3647 (bfd_ft32_arch): Declare.
3648 (bfd_archures_list): Add bfd_ft32_arch.
3649 * config.bfd: Handle FT32.
3650 * configure.ac: Likewise.
3651 * cpu-ft32.c: New file.
3652 * elf32-ft32.c: New file.
3653 * reloc.c (BFD_RELOC_FT32_10, BFD_RELOC_FT32_20, BFD_RELOC_FT32_17,
3654 BFD_RELOC_FT32_18): Define.
3655 * targets.c (_bfd_target_vector): Add ft32_elf32_vec.
3656 * bfd-in2.h: Regenerate.
3657 * libbfd.h: Regenerate.
3658 * Makefile.in: Regenerate.
3659 * configure: Regenerate.
3660 * po/SRC-POTFILES.in: Regenerate.
3661
37e3922e
NC
36622015-01-27 Nick Clifton <nickc@redhat.com>
3663
3664 PR binutils/17512
3665 * pdp11.c (aout_get_external_symbols): Return false if there are
3666 no symbols.
3667
877a8638
NC
3668 * dwarf2.c (concat_filename): Check for an empty directory table.
3669 (scan_unit_for_symbols): Check for reading off the end of the
3670 unit.
3671 (parse_comp_unit): Check for a DW_AT_comp_dir attribute with a
3672 non-string form.
3673 * elf64-ppc.c (opd_entry_value): Fail if there are no relocs
3674 available.
3675
18393a2e
KLC
36762015-01-26 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3677
3678 * elf32-nds32.c (nds32_elf_pick_relax): Fix again setting.
3679
055173ca
DD
36802015-01-22 DJ Delorie <dj@redhat.com>
3681
3682 * elf32-m32c.c (m32c_apply_reloc_24): New.
3683 (m32c_elf_howto_table): Use it for R_M32C_24.
3684 (m32c_elf_relocate_section): Handle R_M32C_24 specially.
3685
4e5cb37e
NC
36862015-01-22 Nick Clifton <nickc@redhat.com>
3687
3688 PR binutils/17512
3689 * coffcode.h (handle_COMDAT): When searching for the section
3690 symbol, make sure that there is space left in the symbol table.
3691 * vms-alpha.c (_bfd_vms_slurp_ehdr): Add range checks.
3692
86eafac0
NC
36932015-01-21 Nick Clifton <nickc@redhat.com>
3694
3695 PR binutils/17512
3696 * coffcode.h (coff_set_arch_mach_hook): Check return value from
3697 bfd_malloc.
3698 (coff_slurp_line_table): Return FALSE if the line number
3699 information was corrupt.
3700 (coff_slurp_symbol_table): Return FALSE if the symbol information
3701 was corrupt.
3702 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Always
3703 initialise the fields of the dyld_info structure.
3704 (bfd_mach_o_build_exec_seg_command): Replace assertion with an
3705 error message and a return value.
3706 (bfd_mach_o_layout_commands): Change the function to boolean.
3707 Return FALSE if the function fails.
3708 (bfd_mach_o_build_commands): Fail if bfd_mach_o_layout_commands
3709 fails.
3710 (bfd_mach_o_read_command): Fail if an unrecognised command is
3711 encountered.
3712 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Set bfd_error if the
3713 read fails.
3714 (slurp_symtab): Check the return from bfd_malloc.
3715 (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if the copy
3716 encountered an error.
3717 (_bfd_XXi_final_link_postscript): Fail if a section could not be
3718 copied.
3719 * peicode.h (pe_bfd_object_p): Fail if the header could not be
3720 swapped in.
3721 * tekhex.c (first_phase): Fail if the section is too big.
3722 * versados.c (struct esdid): Add content_size field.
3723 (process_otr): Use and check the new field.
3724 (versados_get_section_contents): Check that the section exists and
3725 that the requested data is available.
3726
03d5b773
CLT
37272015-01-20 Chung-Lin Tang <cltang@codesourcery.com>
3728
3729 * elf32-nios2.c (elf_backend_default_execstack): Define as 0.
3730
1c9177d9
AM
37312015-01-20 Alan Modra <amodra@gmail.com>
3732
3733 PR ld/17615
3734 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Don't drop
3735 ELF_COMMON_DEF syms.
3736
c4621b33
AM
37372015-01-19 Alan Modra <amodra@gmail.com>
3738
3e2aa5bb 3739 PR ld/17615
c4621b33
AM
3740 * elf-bfd.h (ELF_COMMON_DEF_P): Note that this might be true for
3741 linker script assignments too.
3742 * elflink.c (elf_gc_sweep_symbol): Don't drop ELF_COMMON_DEF syms.
3743 (bfd_elf_gc_mark_dynamic_ref_symbol): Similarly.
3744
0ba38529
AM
37452015-01-19 Alan Modra <amodra@gmail.com>
3746
3747 * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Correct loop iteration
3748 to allow return of first howto.
3749 * elf32-fr30.c (fr30_reloc_type_lookup): Likewise.
3750 * elf32-m32c.c (m32c_reloc_type_lookup): Likewise.
3751 * elf32-moxie.c (moxie_reloc_type_lookup): Likewise.
3752 * elf32-or1k.c (or1k_reloc_type_lookup): Likewise.
3753 * elf32-rl78.c (rl78_reloc_type_lookup): Likewise.
3754 * elf32-rx.c (rx_reloc_type_lookup): Likewise.
3755 * elf32-tilepro.c (tilepro_reloc_type_lookup): Likewise.
3756 * elf32-xstormy16.c (xstormy16_reloc_type_lookup): Likewise.
3757 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
3758 * elf32-nios2.c (nios2_reloc_map): Add mapping for R_NIOS2_NONE.
3759 * elf32-spu.c (spu_elf_bfd_to_reloc_type): Allow return of R_SPU_NONE.
3760 (spu_elf_reloc_type_lookup): Adjust to suit.
3761
6346d5ca
AM
37622015-01-19 Alan Modra <amodra@gmail.com>
3763
3764 * bfd-in.h (bfd_get_section_limit_octets): New define, extracted from..
3765 (bfd_get_section_limit): ..here.
3766 * reloc.c (bfd_perform_relocation): Correct bfd_reloc_outofrange check.
3767 (bfd_install_relocation, _bfd_final_link_relocate): Add same check here.
3768 * elf32-sh.c (sh_elf_reloc): Correct bfd_reloc_outofrange check.
3769 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Remove duplicated
3770 bfd_reloc_outofrange check.
3771 * bfd-in2.h: Regenerate.
3772
3773 * cpu-ns32k.c (_bfd_do_ns32k_reloc_contents): Return bfd_reloc_ok
3774 on zero size relocs.
3775 * ecoff.c (ecoff_reloc_link_order): Likewise.
3776 * elf32-nds32.c (nds32_relocate_contents): Likewise.
3777 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
3778
3779 * reloc.c (_bfd_relocate_contents): Don't bomb on zero size relocs.
3780 (_bfd_clear_contents): Likewise.
3781 * elfxx-mips.c (mips_elf_obtain_contents): Likewise.
3782 (mips_elf_perform_relocation): Likewise.
3783
3784 * aoutx.h (aout_link_reloc_link_order): Allow for NULL return
3785 from malloc on zero size alloc.
3786 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
3787 * elflink.c (elf_reloc_link_order): Likewise.
3788 * linker.c (_bfd_generic_reloc_link_order): Likewise.
3789 * pdp11.c (aout_link_reloc_link_order): Likewise.
3790 * xcofflink.c (xcoff_reloc_link_order): Likewise.
3791
3792 * aoutx.h (howto_table_ext): Ensure NONE relocs have size 3,
3793 bitsize 0, and complain_overflow_dont.
3794 * coff-sparc.c (coff_sparc_howto_table): Likewise.
3795 * elf-hppa.h (elf_hppa_howto_table): Likewise.
3796 * elf-m10200.c (elf_mn10200_howto_table): Likewise.
3797 * elf-m10300.c (elf_mn10300_howto_table): Likewise.
3798 * elf32-arc.c (elf_arc_howto_table): Likewise.
3799 * elf32-arm.c (elf32_arm_howto_table_1): Likewise.
3800 * elf32-avr.c (elf_avr_howto_table): Likewise.
3801 * elf32-bfin.c (bfin_howto_table): Likewise.
3802 * elf32-cr16.c (cr16_elf_howto_table): Likewise.
3803 * elf32-cris.c (cris_elf_howto_table): Likewise.
3804 * elf32-crx.c (crx_elf_howto_table): Likewise.
3805 * elf32-d10v.c (elf_d10v_howto_table): Likewise.
3806 * elf32-d30v.c (elf_d30v_howto_table): Likewise.
3807 * elf32-dlx.c (dlx_elf_howto_table): Likewise.
3808 * elf32-epiphany.c (epiphany_elf_howto_table): Likewise.
3809 * elf32-fr30.c (fr30_elf_howto_table): Likewise.
3810 * elf32-frv.c (elf32_frv_howto_table): Likewise.
3811 * elf32-h8300.c (h8_elf_howto_table): Likewise.
3812 * elf32-i370.c (i370_elf_howto_raw): Likewise.
3813 * elf32-i386.c (elf_howto_table): Likewise.
3814 * elf32-i860.c (elf32_i860_howto_table): Likewise.
3815 * elf32-i960.c (elf32_i960_relocate): Likewise.
3816 * elf32-ip2k.c (ip2k_elf_howto_table): Likewise.
3817 * elf32-iq2000.c (iq2000_elf_howto_table): Likewise.
3818 * elf32-lm32.c (lm32_elf_howto_table): Likewise.
3819 * elf32-m32c.c (m32c_elf_howto_table): Likewise.
3820 * elf32-m32r.c (m32r_elf_howto_table): Likewise.
3821 * elf32-m68hc11.c (elf_m68hc11_howto_table): Likewise.
3822 * elf32-m68hc12.c (elf_m68hc11_howto_table): Likewise.
3823 * elf32-m68k.c (howto_table): Likewise.
3824 * elf32-mcore.c (mcore_elf_howto_raw): Likewise.
3825 * elf32-mep.c (mep_elf_howto_table): Likewise.
3826 * elf32-metag.c (elf_metag_howto_table): Likewise.
3827 * elf32-microblaze.c (microblaze_elf_howto_raw): Likewise.
3828 * elf32-mips.c (elf_mips_howto_table_rel): Likewise.
3829 * elf32-moxie.c (moxie_elf_howto_table): Likewise.
3830 * elf32-msp430.c (elf_msp430_howto_table): Likewise.
3831 * elf32-mt.c (mt_elf_howto_table): Likewise.
3832 * elf32-nds32.c (nds32_elf_howto_table): Likewise.
3833 * elf32-nios2.c (elf_nios2_howto_table_rel): Likewise.
3834 * elf32-or1k.c (or1k_elf_howto_table): Likewise.
3835 * elf32-pj.c (pj_elf_howto_table): Likewise.
3836 * elf32-ppc.c (ppc_elf_howto_raw): Likewise.
3837 * elf32-rl78.c (rl78_elf_howto_table): Likewise.
3838 * elf32-rx.c (rx_elf_howto_table): Likewise.
3839 * elf32-s390.c (elf_howto_table): Likewise.
3840 * elf32-score.c (elf32_score_howto_table): Likewise.
3841 * elf32-score7.c (elf32_score_howto_table): Likewise.
3842 * elf32-sh-relocs.h (R_SH_NONE): Likewise.
3843 * elf32-spu.c (elf_howto_table): Likewise.
3844 * elf32-tic6x.c (elf32_tic6x_howto_table): Likewise.
3845 * elf32-tilepro.c (tilepro_elf_howto_table): Likewise.
3846 * elf32-v850.c (v850_elf_howto_table): Likewise.
3847 * elf32-vax.c (howto_table): Likewise.
3848 * elf32-visium.c (visium_elf_howto_table): Likewise.
3849 * elf32-xc16x.c (xc16x_elf_howto_table): Likewise.
3850 * elf32-xgate.c (elf_xgate_howto_table): Likewise.
3851 * elf32-xstormy16.c (xstormy16_elf_howto_table): Likewise.
3852 * elf32-xtensa.c (elf_howto_table): Likewise.
3853 * elf64-alpha.c (elf64_alpha_howto_table): Likewise.
3854 * elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
3855 * elf64-mmix.c (elf_mmix_howto_table): Likewise.
3856 * elf64-ppc.c (ppc64_elf_howto_raw): Likewise.
3857 * elf64-s390.c (elf_howto_table): Likewise.
3858 * elf64-sh64.c (sh_elf64_howto_table): Likewise.
3859 * elf64-x86-64.c (x86_64_elf_howto_table): Likewise.
3860 * elfn32-mips.c (elf_mips_howto_table_rel): Likewise.
3861 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
3862 (elfNN_aarch64_howto_none): Likewise.
3863 * elfxx-ia64.c (ia64_howto_table): Likewise.
3864 * elfxx-sparc.c (_bfd_sparc_elf_howto_table): Likewise.
3865 * elfxx-tilegx.c (tilegx_elf_howto_table): Likewise.
3866 * nlm32-sparc.c (nlm32_sparc_howto_table): Likewise.
3867
6333bc0d
L
38682015-01-15 H.J. Lu <hongjiu.lu@intel.com>
3869
3870 PR ld/17847
3871 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't complain
3872 about -fPIC if the symbol is undefined when building executable.
3873
cd21f5da
NC
38742015-01-15 Nick Clifton <nickc@redhat.com>
3875
3876 PR binutils/17512
3877 * elf-m10300.c (mn10300_info_to_howto): Replace assertion with an
3878 error message. Never return an invalid howto pointer.
3879 * elf32-cr16.c (cr16_info_to_howto): Likewise.
3880 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
3881 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
3882 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
3883 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
3884 * elf32-mips.c (mips_elf32_rtype_to_howto): Likewise.
3885 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
3886 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
3887 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
3888 * elf32-v850.c (v850_elf_info_to_howto_rela): Likewise.
3889 * elf32-vax.c (rtype_to_howto): Likewise.
3890 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
3891 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
3892 * elfn32-mips.c (sh_elf_info_to_howto): Likewise.
3893 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
3894 (sh_elf_reloc): Check that the reloc is in range.
3895 * reloc.c (bfd_perform_relocation): Check that the section is big
3896 enough for the entire reloc.
3897 (bfd_generic_get_relocated_section_contents): Report unexpected
3898 return values from perform_reloc.
3899
2d071cfc
NC
39002015-01-15 Nick Clifton <nickc@redhat.com>
3901
3902 * elf32-msp430.c (msp430_elf_relax_section): Skip unhandled
3903 relocs. Include PC-relative adjustment for R_MSP430X_ABS16
3904 relaxation.
3905
ca55926c
AM
39062015-01-15 Alan Modra <amodra@gmail.com>
3907
3908 * elflink.c (_bfd_elf_link_omit_section_dynsym): Return true for
3909 any output section matching a linker created dynobj section.
3910
8539e4e8
AM
39112015-01-15 Alan Modra <amodra@gmail.com>
3912
3913 PR 17842
3914 * elflink.c (elf_link_output_sym): Assert elf_onesymtab set.
3915 (bfd_elf_final_link): Always create a symbol table when emit_relocs.
3916 Don't assign symtab file position unless symbols will be output.
3917 Merge blocks with condition in common. Don't call
3918 elf_backend_output_arch_local_syms or elf_backend_output_arch_syms
3919 unless other symbols are output. Move assignment of symtab_shndx
3920 file position. Localize variable.
3921
52db4ec2
JW
39222015-01-14 Jiong Wang <jiong.wang@arm.com>
3923
3924 * elf32-arm.c (elf32_arm_final_link_relocate): Reject R_ARM_32/_NOI when
3925 trying to defer them to runtime.
3926
0941db69
JW
39272015-01-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3928
3929 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use SYMBOLIC_BIND
3930 to check if a symbol should be bound symbolically.
3931
0172429c
JW
39322015-01-13 Jiong Wang <jiong.wang@arm.com>
3933
3934 * elfnn-aarch64.c: (elfNN_aarch64_howto_table): Enable overflow check
3935 for TLSLE_MOVW_TPREL_G2.
3936
bab91cce
JW
39372015-01-13 Jiong Wang <jiong.wang@arm.com>
3938
3939 PR ld/17415
3940 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Mark
3941 R_AARCH64_TLSLE_ADD_TPREL_HI12 as complain_overflow_unsigned.
3942 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Correct the
3943 bit mask.
3944
3c758495
TG
39452015-01-12 Terry Guo <terry.guo@arm.com>
3946
3947 * elflink.c (_bfd_elf_gc_mark_debug_special_section_group): New
3948 function.
3949 (_bfd_elf_gc_mark_extra_sections): Use it.
3950
9d1d54d5
L
39512015-01-11 H.J. Lu <hongjiu.lu@intel.com>
3952
3953 PR ld/17827
3954 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): For PIE,
3955 only discard space for pc-relative relocs symbols which turn
3956 out to need copy relocs.
3957
c6e8e93a
NC
39582015-01-09 Nick Clifton <nickc@redhat.com>
3959
3960 * tekhex.c (getvalue): Fix thinko in test for correct extraction
3961 of value.
3962 (getsym): Return false if there was not enough data to extract the
3963 symbol.
3964
400cf8cb
AG
39652015-01-09 Anthony Green <green@moxielogic.com>
3966
3967 * elf32-moxie.c (ELF_MACHINE_ALT1): Define.
3968
23d4663e
NC
39692015-01-08 Nick Clifton <nickc@redhat.com>
3970
3971 * elf32-msp430.c (msp430_elf_relax_section): Add relaxation of
3972 16-bit absolute BR instructions to 10-bit pc-relative JMP
3973 instructions.
3974
063bb025
NC
39752015-01-08 Nick Clifton <nickc@redhat.com>
3976
3977 PR binutils/17512
3978 * coffcode.h (coff_slurp_symbol_table): Return false if we failed
3979 to load the line table.
3980 * elf.c (_bfd_elf_map_sections_to_segments): Enforce a minimum
3981 maxpagesize of 1.
3982 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if
3983 the Data Directory Size is too large.
3984
6f25f223
L
39852015-01-06 H.J. Lu <hongjiu.lu@intel.com>
3986
3987 PR binutils/17512
3988 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocation.
3989 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
3990
85880250
NC
39912015-01-06 Nick Clifton <nickc@redhat.com>
3992
3993 PR binutils/17512
e7287c7f
NC
3994 * mach-o.c (bfd_mach_o_read_symtab_strtab): Zero terminate the
3995 string table.
3996
ec93045b
NC
3997 * reloc.c (bfd_get_reloc_size): Handle a reloc size of -1.
3998 (bfd_perform_relocation): Include the size of the reloc in the
3999 test for an out of range relocation.
4000 (bfd_generic_get_relocated_section_contents): Remove reloc range
4001 test.
4002
85880250
NC
4003 * coff-i860.c (CALC_ADDEND): Always set an addend value.
4004 * tekhex.c (getvalue): Add an end pointer parameter. Use it to
4005 avoid reading off the end of the buffer.
4006 (getsym): Likewise.
4007 (first_phase): Likewise.
4008 (pass_over): Pass an end pointer to the invoked function.
4009
533d0af0
L
40102015-01-05 H.J. Lu <hongjiu.lu@intel.com>
4011
4012 PR binutils/17512
4013 * elf32-i386.c (elf_i386_get_plt_sym_val): Return NULL on corrupt
4014 input.
4015 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
4016
896ca098
NC
40172015-01-05 Nick Clifton <nickc@redhat.com>
4018
4019 PR binutils/17512
4020 * archive.c (do_slurp_bsd_armap): Make sure that the parsed sized
4021 is at least big enough for the header to be read.
4022 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocs.
4023 * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add range checks.
4024 (bfd_mach_o_read_command): Prevetn duplicate error messages about
4025 unrecognized commands.
4026 * syms.c (_bfd_stab_section_find_nearest_line): Add range checks
4027 when indexing into the string table.
4028
b90efa5b 40292015-01-01 Alan Modra <amodra@gmail.com>
ee3b52e9 4030
b90efa5b 4031 Update year range in copyright notice of all files.
ee3b52e9 4032
b90efa5b 4033For older changes see ChangeLog-2014
56882138 4034\f
b90efa5b 4035Copyright (C) 2015 Free Software Foundation, Inc.
752937aa
NC
4036
4037Copying and distribution of this file, with or without modification,
4038are permitted in any medium without royalty provided the copyright
4039notice and this notice are preserved.
4040
56882138
AM
4041Local Variables:
4042mode: change-log
4043left-margin: 8
4044fill-column: 74
4045version-control: never
4046End: