Don't convert GOTPCREL relocation against large section
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2016-05-13 H.J. Lu <hongjiu.lu@intel.com>
2
3 PR ld/20093
4 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Don't convert
5 GOTPCREL relocation against large section.
6
7 2016-05-13 Alan Modra <amodra@gmail.com>
8
9 * elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_sections): Use
10 linker dynamic sections in calculating size and address of
11 dynamic tags rather than using output sections. Remove asserts.
12 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Likewise.
13 * elf32-cr16.c (_bfd_cr16_elf_finish_dynamic_sections): Likewise.
14 * elf32-cris.c (elf_cris_finish_dynamic_sections): Likewise.
15 * elf32-i370.c (i370_elf_finish_dynamic_sections): Likewise.
16 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
17 * elf32-m32r.c (m32r_elf_finish_dynamic_sections): Likewise.
18 * elf32-m68k.c (elf_m68k_finish_dynamic_sections): Likewise.
19 * elf32-metag.c (elf_metag_finish_dynamic_sections): Likewise.
20 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Likewise.
21 * elf32-nds32.c (nds32_elf_finish_dynamic_sections): Likewise.
22 * elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Likewise.
23 * elf32-or1k.c (or1k_elf_finish_dynamic_sections): Likewise.
24 * elf32-s390.c (elf_s390_finish_dynamic_sections): Likewise.
25 * elf32-score.c (s3_bfd_score_elf_finish_dynamic_sections): Likewise.
26 * elf32-score7.c (s7_bfd_score_elf_finish_dynamic_sections): Likewise.
27 * elf32-vax.c (elf_vax_finish_dynamic_sections): Likewise.
28 * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Likewise.
29 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Likewise.
30 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
31 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
32 * elflink.c (bfd_elf_final_link): Likewise.
33 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Likewise.
34 * elfxx-sparc.c (sparc_finish_dyn): Likewise. Adjust error message.
35 * elf32-arc.c (GET_SYMBOL_OR_SECTION): Remove ASSERT arg and
36 don't set doit. Look up dynobj section.
37 (elf_arc_finish_dynamic_sections): Adjust GET_SYMBOL_OR_SECTION
38 invocation and dynamic tag vma calculation. Don't test
39 boolean var == TRUE.
40 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_sections): Fix
41 DT_JMPREL calc.
42
43 2016-05-13 Alan Modra <amodra@gmail.com>
44
45 * elflink.c (elf_link_sort_relocs): Wrap overlong lines. Fix
46 octets_per_byte. Put dynamic .rela.plt last in link orders.
47 Assign output_offset for reloc sections rather than writing
48 sorted relocs from block corresponding to output_offset.
49
50 2016-05-12 Alan Modra <amodra@gmail.com>
51
52 * elf-bfd.h (elf_reloc_type_class): Put reloc_class_plt last.
53
54 2016-05-11 Andrew Bennett <andrew.bennett@imgtec.com>
55
56 * elfxx-mips.c (print_mips_ases): Add DSPR3.
57
58 2016-05-11 Alan Modra <amodra@gmail.com>
59
60 * elf32-hppa.c (elf32_hppa_init_stub_bfd): New function.
61 (elf32_hppa_check_relocs): Don't set dynobj.
62 (elf32_hppa_size_stubs): Test !SEC_LINKER_CREATED for stub sections.
63 (elf32_hppa_build_stubs): Likewise.
64 * elf32-hppa.h (elf32_hppa_init_stub_bfd): Declare.
65
66 2016-05-11 Alan Modra <amodra@gmail.com>
67
68 PR 20060
69 * elf64-ppc.c (ppc64_elf_tls_setup): Clear forced_local.
70 * elf32-ppc.c (ppc_elf_tls_setup): Likewise.
71
72 2016-05-10 Jiong Wang <jiong.wang@arm.com>
73
74 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Remove redundant
75 aarch64_tls_transition check.
76
77 2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
78
79 * elf32-arm.c (enum elf32_arm_stub_type): New max_stub_type
80 enumerator.
81 (arm_stub_sym_claimed): New function.
82 (elf32_arm_create_stub): Use veneered symbol name and section if
83 veneer needs to claim its symbol, and keep logic unchanged otherwise.
84 (arm_stub_claim_sym): New function.
85 (arm_map_one_stub): Call arm_stub_claim_sym if veneer needs to claim
86 veneered symbol, otherwise create local symbol as before.
87
88 2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
89
90 * elf32-arm.c (elf32_arm_size_stubs): Use new macros
91 ARM_GET_SYM_BRANCH_TYPE and ARM_SET_SYM_BRANCH_TYPE to respectively get
92 and set branch type of a symbol.
93 (bfd_elf32_arm_process_before_allocation): Likewise.
94 (elf32_arm_relocate_section): Likewise and fix identation along the
95 way.
96 (allocate_dynrelocs_for_symbol): Likewise.
97 (elf32_arm_finish_dynamic_symbol): Likewise.
98 (elf32_arm_swap_symbol_in): Likewise.
99 (elf32_arm_swap_symbol_out): Likewise.
100
101 2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
102
103 * bfd-in.h (elf32_arm_size_stubs): Add an output section parameter.
104 * bfd-in2.h: Regenerated.
105 * elf32-arm.c (struct elf32_arm_link_hash_table): Add an output section
106 parameter to add_stub_section callback.
107 (elf32_arm_create_or_find_stub_sec): Get output section from link_sec
108 and pass it down to add_stub_section.
109 (elf32_arm_add_stub): Set section to stub_sec if NULL before using it
110 for error message.
111 (elf32_arm_size_stubs): Add output section parameter to
112 add_stub_section function pointer parameter.
113
114 2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
115
116 * elf32-arm.c (elf32_arm_create_stub): New function.
117 (elf32_arm_size_stubs): Use elf32_arm_create_stub for stub creation.
118
119 2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
120
121 * elf32-arm.c (enum elf32_arm_stub_type): Delete
122 arm_stub_a8_veneer_lwm enumerator.
123 (arm_stub_a8_veneer_lwm): New unsigned constant to replace
124 aforementioned enumerator.
125 (struct elf32_arm_stub_hash_entry): Delete target_addend
126 field and add source_value.
127 (struct a8_erratum_fix): Delete addend field and add target_offset.
128 (stub_hash_newfunc): Initialize source_value field amd remove
129 initialization for target_addend.
130 (arm_build_one_stub): Stop special casing Thumb relocations: promote
131 the else to being always executed, moving the
132 arm_stub_a8_veneer_b_cond specific code in it. Remove
133 stub_entry->target_addend from points_to computation.
134 (cortex_a8_erratum_scan): Store in a8_erratum_fix structure the offset
135 to target symbol from start of section rather than the offset from the
136 stub address.
137 (elf32_arm_size_stubs): Set stub_entry's source_value and target_value
138 fields from struct a8_erratum_fix's offset and target_offset
139 respectively.
140 (make_branch_to_a8_stub): Rename target variable to loc. Compute
141 veneered_insn_loc and loc using stub_entry's source_value.
142
143 2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
144
145 (elf32_arm_merge_eabi_attributes): Add merging logic for
146 Tag_DSP_extension.
147
148 2016-05-10 Pip Cet <pipcet@gmail.com>
149
150 PR ld/20059
151 * elfxx-target.h (bfd_elfNN_bfd_copy_link_hash_symbol_type):
152 Define as _bfd_generic_copy_link_hash_symbol_type when using
153 generic hash table.
154
155 2016-05-09 Nick Clifton <nickc@redhat.com>
156
157 PR binutils/20063
158 * elf.c (bfd_elf_get_elf_syms): Check for out of range sh_link
159 field before accessing sections array.
160
161 2016-05-09 Christophe Monat <christophe.monat@st.com>
162
163 PR ld/20030
164 * elf32-arm.c (is_thumb2_vldm): Account for T1 (DP) encoding.
165 (stm32l4xx_need_create_replacing_stub): Rename ambiguous nb_regs
166 to nb_words.
167 (create_instruction_vldmia): Add is_dp to disambiguate SP/DP
168 encoding.
169 (create_instruction_vldmdb): Likewise.
170 (stm32l4xx_create_replacing_stub_vldm): is_dp detects DP encoding,
171 uses it to re-encode.
172
173 2016-05-09 Nick Clifton <nickc@redhat.com>
174
175 PR 19938
176 * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Revert accidental
177 commit.
178
179 2016-05-09 Alan Modra <amodra@gmail.com>
180
181 * elf64-ppc.c (ppc64_elf_init_stub_bfd): Remove redundant NULL check.
182
183 2016-05-06 H.J. Lu <hongjiu.lu@intel.com>
184
185 PR ld/17550
186 * elf-bfd.h (elf_link_hash_entry): Update comments for indx,
187 documenting that indx == -3 if symbol is defined in a discarded
188 section.
189 * elflink.c (elf_link_add_object_symbols): Set indx to -3 if
190 symbol is defined in a discarded section.
191 (elf_link_output_extsym): Strip a global symbol defined in a
192 discarded section.
193
194 2016-05-06 H.J. Lu <hongjiu.lu@intel.com>
195
196 * elf32-i386.c (elf_backend_add_symbol_hook): Defined for Intel
197 MCU.
198
199 2016-05-05 H.J. Lu <hongjiu.lu@intel.com>
200
201 * elf32-i386.c (elf_i386_convert_load): Extract the GOT load
202 conversion to ...
203 (elf_i386_convert_load_reloc): This. New function.
204 * elf64-x86-64.c (elf_x86_64_convert_load): Extract the GOT load
205 conversion to ...
206 (elf_x86_64_convert_load_reloc): This. New function.
207
208 2016-05-05 H.J. Lu <hongjiu.lu@intel.com>
209
210 * elf32-i386.c (elf_i386_check_tls_transition): Remove abfd.
211 Don't check if contents == NULL.
212 (elf_i386_tls_transition): Add from_relocate_section. Check
213 from_relocate_section instead of contents != NULL. Update
214 elf_i386_check_tls_transition call.
215 (elf_i386_check_relocs): Cache the section contents if
216 keep_memory is FALSE. Pass FALSE as from_relocate_section to
217 elf_i386_tls_transition.
218 (elf_i386_relocate_section): Pass TRUE as from_relocate_section
219 to elf_i386_tls_transition.
220 (elf_backend_caches_rawsize): New.
221 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Don't check
222 if contents == NULL.
223 (elf_x86_64_tls_transition): Add from_relocate_section. Check
224 from_relocate_section instead of contents != NULL.
225 (elf_x86_64_check_relocs): Cache the section contents if
226 keep_memory is FALSE. Pass FALSE as from_relocate_section to
227 elf_x86_64_tls_transition.
228 (elf_x86_64_relocate_section): Pass TRUE as from_relocate_section
229 to elf_x86_64_tls_transition.
230 (elf_backend_caches_rawsize): New.
231
232 2016-05-03 Maciej W. Rozycki <macro@imgtec.com>
233
234 PR 10549
235 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Handle
236 STB_GNU_UNIQUE.
237
238 2016-05-03 Jiong Wang <jiong.wang@arm.com>
239
240 * bfd-in.h (bfd_elf64_aarch64_set_options): Update prototype.
241 * bfd-in2.h (bfd_elf64_aarch64_set_options): Likewise.
242 * elfnn-aarch64.c (bfd_elfNN_aarch64_set_options): Initialize
243 no_apply_dynamic_relocs.
244 (elfNN_aarch64_final_link_relocate): Apply absolute relocations even though
245 dynamic relocations generated.
246
247 2016-04-29 H.J. Lu <hongjiu.lu@intel.com>
248
249 * elf32-i386.c (elf_i386_size_dynamic_sections): Move interp
250 setting to ...
251 (elf_i386_create_dynamic_sections): Here.
252 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Move
253 interp setting to ...
254 (elf_x86_64_create_dynamic_sections): Here.
255
256 2016-04-29 H.J. Lu <hongjiu.lu@intel.com>
257
258 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take GOT_RELOC
259 and replace (EH)->has_got_reloc with GOT_RELOC.
260 (elf_i386_fixup_symbol): Pass has_got_reloc to
261 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
262 (elf_i386_allocate_dynrelocs): Likewise.
263 (elf_i386_relocate_section): Likewise.
264 (elf_i386_finish_dynamic_symbol): Likewise.
265 (elf_i386_convert_load): Pass TRUE to
266 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
267 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take
268 GOT_RELOC and replace (EH)->has_got_reloc with GOT_RELOC.
269 (elf_x86_64_fixup_symbol): Pass has_got_reloc to
270 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
271 (elf_x86_64_allocate_dynrelocs): Likewise.
272 (elf_x86_64_relocate_section): Likewise.
273 (elf_x86_64_finish_dynamic_symbol): Likewise.
274 (elf_x86_64_convert_load): Pass TRUE to
275 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
276
277 2016-04-29 H.J. Lu <hongjiu.lu@intel.com>
278
279 * elf32-i386.c (check_relocs_failed): New.
280 (elf_i386_check_relocs): Set check_relocs_failed on error.
281 (elf_i386_relocate_section): Skip if check_relocs failed.
282
283 2016-04-29 H.J. Lu <hongjiu.lu@intel.com>
284
285 * elf64-x86-64.c (elf_x86_64_check_relocs): Set
286 check_relocs_failed on error.
287
288 2016-04-29 Nick Clifton <nickc@redhat.com>
289
290 PR 19938
291 * elf-bfd.h (struct elf_backend_data): Rename
292 elf_backend_set_special_section_info_and_link to
293 elf_backend_copy_special_section_fields.
294 * elfxx-target.h: Likewise.
295 * elf.c (section_match): Ignore the SHF_INFO_LINK flag when
296 comparing section flags.
297 (copy_special_section_fields): New function.
298 (_bfd_elf_copy_private_bfd_data): Copy the EI_ABIVERSION field.
299 Perform two scans over special sections. The first one looks for
300 a direct mapping between the output section and an input section.
301 The second scan looks for a possible match based upon section
302 characteristics.
303 * elf32-arm.c (elf32_arm_copy_special_section_fields): New
304 function. Handle setting the sh_link field of SHT_ARM_EXIDX
305 sections.
306 * elf32-i386.c (elf32_i386_set_special_info_link): Rename to
307 elf32_i386_copy_solaris_special_section_fields.
308 * elf32-sparc.c (elf32_sparc_set_special_section_info_link):
309 Rename to elf32_sparc_copy_solaris_special_section_fields.
310 * elf64-x86-64.c (elf64_x86_64_set_special_info_link): Rename to
311 elf64_x86_64_copy_solaris_special_section_fields.
312
313 2016-04-28 Nick Clifton <nickc@redhat.com>
314
315 * po/zh_CN.po: Updated Chinese (simplified) translation.
316
317 2016-04-27 H.J. Lu <hongjiu.lu@intel.com>
318
319 PR ld/20006
320 * elf64-x86-64.c (elf_x86_64_convert_load): Skip debug sections
321 when estimating distances between output sections.
322
323 2016-04-27 Alan Modra <amodra@gmail.com>
324
325 * elflink.c (_bfd_elf_is_start_stop): New function.
326 (_bfd_elf_gc_mark_rsec): Use it.
327 * elf-bfd.h (_bfd_elf_is_start_stop): Declare.
328
329 2016-04-26 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
330
331 * elf32-rx.c (rx_set_section_contents): Avoid arithmetic on void *.
332 * mmo.c (mmo_get_section_contents): Likewise.
333 (mmo_set_section_contents): Likewise.
334
335 2016-04-26 H.J. Lu <hongjiu.lu@intel.com>
336
337 * elf-bfd.h (elf_link_hash_table): Update comments for
338 dynsymcount.
339 * elflink.c (_bfd_elf_link_renumber_dynsyms): Always count for
340 the unused NULL entry at the head of dynamic symbol table.
341 (bfd_elf_size_dynsym_hash_dynstr): Remove dynsymcount != 0
342 checks.
343
344 2016-04-21 H.J. Lu <hongjiu.lu@intel.com>
345
346 * elflink.c (_bfd_elf_link_create_dynstrtab): Exclude linker
347 created file from dynobj.
348
349 2016-04-21 H.J. Lu <hongjiu.lu@intel.com>
350
351 * elflink.c (_bfd_elf_link_create_dynstrtab): Set dynobj to a
352 normal input file if possible.
353
354 2016-04-21 Nick Clifton <nickc@redhat.com>
355
356 * aout-adobe.c: Use _bfd_generic_link_check_relocs.
357 * aout-target.h: Likewise.
358 * aout-tic30.c: Likewise.
359 * binary.c: Likewise.
360 * bout.c: Likewise.
361 * coff-alpha.c: Likewise.
362 * coff-rs6000.c: Likewise.
363 * coff64-rs6000.c: Likewise.
364 * coffcode.h: Likewise.
365 * i386msdos.c: Likewise.
366 * i386os9k.c: Likewise.
367 * ieee.c: Likewise.
368 * ihex.c: Likewise.
369 * libbfd-in.h: Likewise.
370 * libecoff.h: Likewise.
371 * mach-o-target.c: Likewise.
372 * mmo.c: Likewise.
373 * nlm-target.h: Likewise.
374 * oasys.c: Likewise.
375 * pef.c: Likewise.
376 * plugin.c: Likewise.
377 * ppcboot.c: Likewise.
378 * som.c: Likewise.
379 * srec.c: Likewise.
380 * tekhex.c: Likewise.
381 * versados.c: Likewise.
382 * vms-alpha.c: Likewise.
383 * xsym.c: Likewise.
384 * elfxx-target.h: Use _bfd_elf_link_check_relocs.
385 * linker.c (bfd_link_check_relocs): New function.
386 (_bfd_generic_link_check_relocs): New function.
387 * targets.c (BFD_JUMP_TABLE_LINK): Add initialization of
388 _bfd_link_check_relocs field.
389 (struct bfd_target)L Add _bfd_link_check_relocs field.
390 * bfd-in2.h: Regenerate.
391 * libbfd.h: Regenerate.
392
393 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
394
395 * elf32-i386.c (elf_i386_gc_sweep_hook): Removed.
396 (elf_backend_gc_sweep_hook): Likewise.
397 * elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise.
398 (elf_backend_gc_sweep_hook): Likewise.
399
400 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
401
402 * elflink.c (_bfd_elf_link_check_relocs): Don't check relocations
403 in excluded sections
404
405 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
406
407 PR ld/19969
408 * elf64-x86-64.c (check_relocs_failed): New.
409 (elf_x86_64_need_pic): Moved before elf_x86_64_check_relocs.
410 Support relocation agaist local symbol. Set check_relocs_failed.
411 (elf_x86_64_check_relocs): Use elf_x86_64_need_pic. Check
412 R_X86_64_32 relocation overflow.
413 (elf_x86_64_relocate_section): Skip if check_relocs failed.
414 Update one elf_x86_64_need_pic and remove one elf_x86_64_need_pic.
415
416 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
417
418 * elf32-i386.c (elf_i386_check_relocs): Call
419 _bfd_elf_create_ifunc_sections only for STT_GNU_IFUNC symbol.
420 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
421
422 2016-04-20 H.J. Lu <hongjiu.lu@intel.com>
423
424 * elf-bfd.h (_bfd_elf_link_check_relocs): New.
425 * elflink.c (_bfd_elf_link_check_relocs): New function.
426 (elf_link_add_object_symbols): Call _bfd_elf_link_check_relocs
427 if check_relocs_after_open_input is FALSE.
428
429 2016-04-20 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
430
431 * cache.c: Update old style function definitions.
432 * elf32-m68k.c: Likewise.
433 * elf64-mmix.c: Likewise.
434 * stab-syms.c: Likewise.
435
436 2016-04-20 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
437
438 * elf32-arm.c (put_thumb2_insn): Change argument type to bfd_byte *.
439
440 2016-04-15 H.J. Lu <hongjiu.lu@intel.com>
441
442 * Makefile.in: Regenerated with automake 1.11.6.
443 * aclocal.m4: Likewise.
444 * doc/Makefile.in: Likewise.
445
446 2016-04-14 Andrew Burgess <andrew.burgess@embecosm.com>
447
448 * reloc.c: Add BFD_RELOC_ARC_NPS_CMEM16 entry.
449 * bfd-in2.h: Regenerate.
450 * libbfd.h: Regenerate.
451 * elf32-arc.c: Add 'opcode/arc.h' include.
452 (struct arc_relocation_data): Add symbol_name.
453 (arc_special_overflow_checks): New function.
454 (arc_do_relocation): Use arc_special_overflow_checks, reindent as
455 required, add an extra comment.
456 (elf_arc_relocate_section): Setup symbol_name in reloc_data.
457
458 2016-04-14 Andrew Burgess <andrew.burgess@embecosm.com>
459
460 * elf32-arc.c (tls_got_entries): Add 'TLS_GOT_' prefix to all
461 entries.
462 (elf_arc_relocate_section): Update enum uses.
463 (elf_arc_check_relocs): Likewise.
464 (elf_arc_finish_dynamic_symbol): Likewise.
465
466 2016-04-14 H.J. Lu <hongjiu.lu@intel.com>
467
468 * elf.c (_bfd_elf_copy_private_bfd_data): Replace "link" with
469 "sh_link".
470
471 2016-04-14 Nick Clifton <nickc@redhat.com>
472
473 PR target/19938
474 * elf-bbfd.h (struct elf_backend_data): New field:
475 elf_strtab_flags.
476 New field: elf_backend_set_special_section_info_and_link
477 * elfxx-target.h (elf_backend_strtab_flags): Define if not already
478 defined.
479 (elf_backend_set_special_section_info_and_link): Define if not
480 already defined.
481 (elfNN_bed): Use elf_backend_set_special_section_info_and_link and
482 elf_backend_strtab_flags macros to initialise fields in structure.
483 * elf.c (_bfd_elf_make_section_from_shdr): Check for SHF_STRINGS
484 being set even if SHF_MERGE is not set.
485 (elf_fake_sections): Likewise.
486 (section_match): New function. Matches two ELF sections based
487 upon fixed characteristics.
488 (find_link): New function. Locates a section in a BFD that
489 matches a section in a different BFD.
490 (_bfd_elf_copy_private_bfd_data): Copy the sh_info and sh_link
491 fields of reserved sections.
492 (bfd_elf_compute_section_file_positions): Set the flags for the
493 .shstrtab section based upon the elf_strtab_flags field in the
494 elf_backend_data structure.
495 (swap_out_syms): Likewise for the .strtab section.
496 * elflink.c (bfd_elf_final_link): Set the flags for the
497 .strtab section based upon the elf_strtab_flags field in the
498 elf_backend_data structure.
499 * elf32-i386.c (elf32_i386_set_special_info_link): New function.
500 (elf_backend_strtab_flags): Set to SHF_STRINGS for Solaris
501 targets.
502 (elf_backend_set_special_section_info_and_link): Define for
503 Solaris targets.
504 * elf32-sparc.c: Likewise.
505 * elf64-x86-64.c: Likewise.
506
507 2016-04-11 H.J. Lu <hongjiu.lu@intel.com>
508
509 PR ld/19939
510 * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): Add a pointer
511 to bfd_boolean.
512 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Updated.
513 Set *readonly_dynrelocs_against_ifunc_p to TRUE if dynamic reloc
514 applies to read-only section.
515 * elf32-i386.c (elf_i386_link_hash_table): Add
516 readonly_dynrelocs_against_ifunc.
517 (elf_i386_allocate_dynrelocs): Updated.
518 (elf_i386_size_dynamic_sections): Issue an error for read-only
519 segment with dynamic IFUNC relocations only if
520 readonly_dynrelocs_against_ifunc is TRUE.
521 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
522 readonly_dynrelocs_against_ifunc.
523 (elf_x86_64_allocate_dynrelocs): Updated.
524 (elf_x86_64_size_dynamic_sections): Issue an error for read-only
525 segment with dynamic IFUNC relocations only if
526 readonly_dynrelocs_against_ifunc is TRUE.
527 * elfnn-aarch64.c (elfNN_aarch64_allocate_ifunc_dynrelocs):
528 Updated.
529
530 2016-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
531
532 * elf32-arm.c (elf32_arm_size_stubs): Move error_ret_free_local to be
533 a fall through from error_ret_free_internal. Free local_syms in
534 error_ret_free_local if allocated from bfd_elf_get_elf_syms ().
535
536 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
537
538 * elf32-arc.c (plt_do_relocs_for_symbol): Changed.
539 (relocate_plt_for_entry): Likewise.
540
541 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
542
543 * elf32-arc.c (elf_arc_check_relocs): Changed
544
545 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
546
547 * elf32-arc.c (name_for_global_symbol): Changed assert.
548 (get_replace_function): Created.:
549 (struct arc_relocation_data): Changed to signed types.
550 (defines S, L, P, PDATA): Casted to signed type.
551 (defines SECTSTART, _SDA_BASE_, TLS_REL): Likewise.
552 (PRINT_DEBUG_RELOC_INFO_BEFORE): Changed.
553 (arc_do_relocation): Changed.
554
555 2016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
556
557 * elf32-arc.c (name_for_global_symbol): Added assert to check for
558 symbol index.
559 (elf_arc_relocate_section): Added and changed asserts, validating
560 the synamic symbol index.
561 (elf_arc_finish_dynamic_symbol): Do not fill the dynamic
562 relocation if symbol has dynindx set to -1.
563
564 2016-04-05 Maciej W. Rozycki <macro@imgtec.com>
565
566 * elflink.c (elf_link_add_object_symbols): Always turn hidden
567 and internal symbols which have a dynamic index into local
568 ones.
569
570 2016-04-04 Nick Clifton <nickc@redhat.com>
571
572 PR 19872
573 * dwarf2.c (parse_comp_unit): Skip warning about unrecognised
574 version number if the version is zero.
575
576 2016-04-01 Alan Modra <amodra@gmail.com>
577
578 PR 19886
579 * elflink.c (on_needed_list): Recursively check needed status.
580 (elf_link_add_object_symbols): Adjust.
581
582 2016-03-30 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
583
584 * elf32-avr.c (avr_elf32_load_records_from_section): Free
585 internal_relocs only if they aren't cached.
586
587 2016-03-29 Nick Clifton <nickc@redhat.com>
588
589 PR 17334
590 * elf32-bfin.c (elf32_bfinfdpic_finish_dynamic_sections): Relax
591 assertion on the size of the got section to allow it to be bigger
592 than the number of relocs.
593
594 2016-03-29 Toni Spets <toni.spets@iki.fi>
595
596 PR 19878
597 * coffcode.h (coff_write_object_contents): Revert accidental
598 2014-11-10 change.
599
600 2016-03-22 Alan Modra <amodra@gmail.com>
601
602 PR 19850
603 * dwarf2.c (read_attribute_value): Skip info_ptr check for
604 DW_FORM_flag_present.
605
606 2016-03-22 Nick Clifton <nickc@redhat.com>
607
608 * cpu-v850_rh850.c (arch_info_struct): Restore v850-rh850 as an
609 architecture name for backwards compatibility.
610
611 * peXXigen.c (_bfd_XXi_write_codeview_record): Fix possible
612 unbounded stack use.
613
614 * warning.m4 (GCC_WARN_CFLAGS): Only add -Wstack-usage if using a
615 sufficiently recent version of GCC.
616 * configure: Regenerate.
617
618 2016-03-22 Alan Modra <amodra@gmail.com>
619
620 PR 19851
621 * plugin.c (try_load_plugin): Avoid -Wstack-usage warning.
622
623 2016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
624
625 * archures.c (bfd_mach_arc_nps400): Define.
626 * bfd-in2.h: Regenerate.
627 * cpu-arc.c (arch_info_struct): New entry for nps400, renumber
628 some existing entries to make space.
629 * elf32-arc.c (arc_elf_object_p): Add nps400 case.
630 (arc_elf_final_write_processing): Likewise.
631
632 2016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
633
634 * elf32-arc.c (arc_elf_print_private_bfd_data): Remove use of
635 EF_ARC_CPU_GENERIC.
636 (arc_elf_final_write_processing): Don't bother setting cpu field
637 in e_flags, this will have been set elsewhere.
638
639 2016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
640
641 * elf32-arc.c (arc_elf_final_write_processing): Switch to using
642 EF_ARC_MACH_MSK.
643
644 2016-03-21 Nick Clifton <nickc@redhat.com>
645
646 * warning.m4 (GCC_WARN_CFLAGS): Add -Wstack-usage=262144
647 * configure: Regenerate.
648 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Replace use of
649 alloca with call to xmalloc.
650 * elf32-nds32.c: Likewise.
651 * elf64-hppa.c: Likewise.
652 * elfxx-mips.c: Likewise.
653 * pef.c: Likewise.
654 * pei-x86_64.c: Likewise.
655 * som.c: Likewise.
656 * xsym.c: Likewise.
657
658 2016-03-15 H.J. Lu <hongjiu.lu@intel.com>
659
660 PR ld/19827
661 * elf32-i386.c (elf_i386_check_relocs): Bind defined symbol
662 locally in PIE.
663 (elf_i386_relocate_section): Likewise.
664 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
665 (elf_x86_64_relocate_section): Likewise.
666
667 2016-03-15 H.J. Lu <hongjiu.lu@intel.com>
668
669 PR ld/19807
670 * elf64-x86-64.c (elf_x86_64_relocate_section): Check
671 no_reloc_overflow_check to diable R_X86_64_32/R_X86_64_32S
672 relocation overflow check.
673
674 2016-03-14 H.J. Lu <hongjiu.lu@intel.com>
675
676 * bfd-in2.h: Regenerated.
677
678 2016-03-11 Dan Gissel <dgisselq@ieee.org>
679
680 PR 19713
681 * elf.c (_bfd_elf_section_offset): Ensure that the returned offset
682 uses bytes not octets.
683 * elflink.c (resolve_section): Likewise.
684 Add a bfd parameter.
685 (eval_section): Pass the input_bfd to resolve_section.
686 (bfd_elf_perform_complex_relocation): Convert byte offset to
687 octets before read and writing values.
688 (elf_link_input_bfd): Add byte to octet conversions.
689 (elf_reloc_link_order): Likewise.
690 (elf_fixup_link_order): Likewise.
691 (bfd_elf_final_link): Likewise.
692 * reloc.c (_bfd_final_link_relocate): Likewise.
693 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
694
695 2016-03-10 Nick Clifton <nickc@redhat.com>
696
697 * config.bfd: Mark the i370 target as obsolete.
698
699 2016-03-09 Pedro Alves <palves@redhat.com>
700
701 * cpu-v850.c (N): Append ":old-gcc-abi" instead of " (using old
702 gcc ABI)" to printable name.
703 * cpu-v850_rh850.c (bfd_v850_rh850_arch): Use "v850:rh850" instead
704 of "v850-rh850" as printable name.
705
706 2016-03-09 Leon Winter <winter-gcc@bfw-online.de>
707
708 PR ld/19623
709 * cofflink.c (_bfd_coff_generic_relocate_section): Do not apply
710 relocations against absolute symbols.
711
712 2016-03-09 Alan Modra <amodra@gmail.com>
713
714 PR binutils/19775
715 * coff-alpha.c (alpha_ecoff_openr_next_archived_file): Allow zero
716 length elements in the archive.
717
718 2016-03-08 H.J. Lu <hongjiu.lu@intel.com>
719
720 PR ld/19789
721 * elflink.c (elf_link_add_object_symbols): Create dynamic sections
722 for -E/--dynamic-list only when not relocatable.
723
724 2016-03-08 H.J. Lu <hongjiu.lu@intel.com>
725
726 PR ld/19784
727 * elf32-i386.c (elf_i386_check_relocs): Increment PLT reference
728 count for locally defined local IFUNC symbols in shared object.
729 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
730
731 2016-03-08 H.J. Lu <hongjiu.lu@intel.com>
732
733 PR ld/19579
734 * elflink.c (_bfd_elf_merge_symbol): Group common symbol checking
735 together.
736
737 2016-03-08 Cupertino Miranda <Cupertino.Miranda@synopsys.com>
738 Andrew Burgess <andrew.burgess@embecosm.com>
739
740 * elf32-arc.c (arc_bfd_get_32): Becomes an alias for bfd_get_32.
741 (arc_bfd_put_32): Becomes an alias for bfd_put_32.
742 (arc_elf_howto_init): Added assert to validate relocations.
743 (get_middle_endian_relocation): Delete.
744 (middle_endian_convert): New function.
745 (ME): Redefine, now does nothing.
746 (IS_ME): New define.
747 (arc_do_relocation): Extend the attached 'ARC_RELOC_HOWTO'
748 definition to call middle_endian_convert. Add a new local
749 variable and make use of this throughout. Added call to
750 arc_bfd_get_8 and arc_bfd_put_8 for 8 bit relocations.
751
752 2016-03-07 Nick Clifton <nickc@redhat.com>
753
754 PR binutils/19775
755 * archive.c (bfd_generic_openr_next_archived_file): Allow zero
756 length elements in the archive.
757
758 2016-03-07 Jiong Wang <jiong.wang@arm.com>
759
760 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Always create .got
761 section if the symbol "_GLOBAL_OFFSET_TABLE_" is referenced.
762
763 2016-03-04 H.J. Lu <hongjiu.lu@intel.com>
764
765 PR ld/19579
766 * elflink.c (_bfd_elf_merge_symbol): Treat common symbol in
767 executable as definition if the new definition comes from a
768 shared library.
769
770 2016-03-02 Alan Modra <amodra@gmail.com>
771
772 * Makefile.in: Regenerate.
773 * po/SRC-POTFILES.in: Regenerate.
774
775 2016-02-29 Cupertino Miranda <cmiranda@synopsys.com>
776
777 * elf32-arc.c (elf_arc_relocate_section): Added rules to fix the
778 relocation addend when sections get merged.
779
780 2016-02-29 Cupertino Miranda <Cupertino.Miranda@synopsys.com>
781
782 * elf32-arc.c (arc_elf_final_write_processing): Add condition to
783 the flag change.
784 (elf_arc_relocate_section): Fixes and conditions to support PIE.
785 Assert for code sections dynamic relocs.
786
787 2016-02-26 Renlin Li <renlin.li@arm.com>
788
789 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix signed overflow
790 check for MOVW_SABS_G0, MOVW_SABS_G1, MOVW_SABS_G2.
791
792 2016-02-26 H.J. Lu <hongjiu.lu@intel.com>
793
794 PR ld/19609
795 * elf32-i386.c (elf_i386_convert_load): Convert to R_386_32 for
796 load with locally bound symbols if PIC is false or there is no
797 base register. Optimize branch to 0 if PIC is false.
798 (elf_i386_relocate_section): Don't generate dynamic relocations
799 against undefined weak symbols if PIC is false.
800 * elf64-x86-64.c (elf_x86_64_convert_load): Disable optimization
801 if we can't estimate relocation overflow with --no-relax.
802 Convert to R_X86_64_32S/R_X86_64_32 for load with locally bound
803 symbols if PIC is false. Optimize branch to 0 if PIC is false.
804 (elf_x86_64_relocate_section): Don't generate dynamic relocations
805 against undefined weak symbols if PIC is false.
806
807 2016-02-26 H.J. Lu <hongjiu.lu@intel.com>
808
809 PR ld/19645
810 * bfd.c (bfd): Change flags to 20 bits.
811 (BFD_CONVERT_ELF_COMMON): New.
812 (BFD_USE_ELF_STT_COMMON): Likewise.
813 (BFD_FLAGS_SAVED): Add BFD_CONVERT_ELF_COMMON and
814 BFD_USE_ELF_STT_COMMON.
815 (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
816 * configure.ac: Remove --enable-elf-stt-common.
817 * elf.c (swap_out_syms): Choose STT_COMMON or STT_OBJECT for
818 common symbol depending on BFD_CONVERT_ELF_COMMON and
819 BFD_USE_ELF_STT_COMMON.
820 * elfcode.h (elf_slurp_symbol_table): Set BSF_ELF_COMMON for
821 STT_COMMON.
822 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Also check
823 STT_COMMON.
824 (elf_link_convert_common_type): New function.
825 (elf_link_output_extsym): Choose STT_COMMON or STT_OBJECT for
826 common symbol depending on BFD_CONVERT_ELF_COMMON and
827 BFD_USE_ELF_STT_COMMON. Set sym.st_info after sym.st_shndx.
828 * elfxx-target.h (TARGET_BIG_SYM): Add BFD_CONVERT_ELF_COMMON
829 and BFD_USE_ELF_STT_COMMON to object_flags.
830 (TARGET_LITTLE_SYM): Likewise.
831 * syms.c (BSF_KEEP_G): Renamed to ...
832 (BSF_ELF_COMMON): This.
833 * bfd-in2.h: Regenerated.
834 * config.in: Likewise.
835 * configure: Likewise.
836
837 2016-02-26 H.J. Lu <hongjiu.lu@intel.com>
838
839 PR ld/19636
840 PR ld/19704
841 PR ld/19719
842 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
843 (elf_i386_link_hash_entry): Add has_got_reloc and
844 has_non_got_reloc.
845 (elf_i386_link_hash_table): Add interp.
846 (elf_i386_link_hash_newfunc): Initialize has_got_reloc and
847 has_non_got_reloc.
848 (elf_i386_copy_indirect_symbol): Copy has_got_reloc and
849 has_non_got_reloc.
850 (elf_i386_check_relocs): Set has_got_reloc and has_non_got_reloc.
851 (elf_i386_fixup_symbol): New function.
852 (elf_i386_pie_finish_undefweak_symbol): Likewise.
853 (elf_i386_allocate_dynrelocs): Don't allocate space for dynamic
854 relocations and discard relocations against resolved undefined
855 weak symbols in executable. Don't make resolved undefined weak
856 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
857 relocation against undefined weak symbols in PIE.
858 (elf_i386_size_dynamic_sections): Set interp to .interp section.
859 (elf_i386_relocate_section): Don't generate dynamic relocations
860 against resolved undefined weak symbols in PIE, except for
861 R_386_PC32.
862 (elf_i386_finish_dynamic_symbol): Keep PLT/GOT entries without
863 dynamic PLT/GOT relocations for resolved undefined weak symbols.
864 Don't generate dynamic relocation against resolved undefined weak
865 symbol in executable.
866 (elf_i386_finish_dynamic_sections): Call
867 elf_i386_pie_finish_undefweak_symbol on all symbols in PIE.
868 (elf_backend_fixup_symbol): New.
869 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
870 (elf_x86_64_link_hash_entry): Add has_got_reloc and
871 has_non_got_reloc.
872 (elf_x86_64_link_hash_table): Add interp.
873 (elf_x86_64_link_hash_newfunc): Initialize has_got_reloc and
874 has_non_got_reloc.
875 (elf_x86_64_copy_indirect_symbol): Copy has_got_reloc and
876 has_non_got_reloc.
877 (elf_x86_64_check_relocs): Set has_got_reloc and
878 has_non_got_reloc.
879 (elf_x86_64_fixup_symbol): New function.
880 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
881 (elf_x86_64_allocate_dynrelocs): Don't allocate space for dynamic
882 relocations and discard relocations against resolved undefined
883 weak symbols in executable. Don't make resolved undefined weak
884 symbols in executable dynamic.
885 (elf_x86_64_size_dynamic_sections): Set interp to .interp section.
886 (elf_x86_64_relocate_section): Check relocation overflow for
887 dynamic relocations against unresolved weak undefined symbols.
888 Don't generate dynamic relocations against resolved weak
889 undefined symbols in PIE.
890 (elf_x86_64_finish_dynamic_symbol): Keep PLT/GOT entries without
891 dynamic PLT/GOT relocations for resolved undefined weak symbols.
892 Don't generate dynamic relocation against resolved undefined weak
893 symbol in executable.
894 (elf_x86_64_finish_dynamic_sections): Call
895 elf_x86_64_pie_finish_undefweak_symbol on all symbols in PIE.
896 (elf_backend_fixup_symbol): New.
897
898 2016-02-26 Alan Modra <amodra@gmail.com>
899
900 * elf64-ppc.c (create_linkage_sections): Create sfpr when
901 save_restore_funcs, rest of sections when not relocatable.
902 (ppc64_elf_init_stub_bfd): Always call create_linkage_sections.
903 (sfpr_define): Define all symbols on emitted code.
904 (ppc64_elf_func_desc_adjust): Adjust for sfpr now being created
905 when relocatable. Move sfpr_define loop earlier.
906
907 2016-02-24 H.J. Lu <hongjiu.lu@intel.com>
908
909 * elf64-x86-64.c (elf_x86_64_need_pic): New function.
910 (elf_x86_64_relocate_section): Use it. Replace
911 x86_64_elf_howto_table[r_type] with howto.
912
913 2016-02-24 H.J. Lu <hongjiu.lu@intel.com>
914
915 PR ld/19698
916 * elflink.c (bfd_elf_record_link_assignment): Set versioned if
917 symbol version is unknown.
918
919 2016-02-24 H.J. Lu <hongjiu.lu@intel.com>
920
921 * elf32-i386.c (elf_i386_allocate_dynrelocs): Set plt_got.offset
922 to (bfd_vma) -1 when setting needs_plt to 0.
923 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
924
925 2016-02-23 H.J. Lu <hongjiu.lu@intel.com>
926
927 * elflink.c (bfd_elf_record_link_assignment): Check for shared
928 library, instead of PIC, and don't check PDE when making linker
929 assigned symbol dynamic.
930
931 2016-02-23 Faraz Shahbazker <faraz.shahbazker@imgtec.com>
932
933 * bfd/elfxx-mips.c (_bfd_mips_post_process_headers): Increment
934 ABIVERSION for non-executable stack.
935
936 2016-02-23 Rich Felker <bugdal@aerifal.cx>
937
938 PR target/19516
939 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol):
940 Always produce a RELATIVE reloc for a local symbol.
941
942 2016-02-23 Hans-Peter Nilsson <hp@axis.com>
943
944 Fix test-case ld-elf/pr19617b
945 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
946 discard unused non-function symbols when --dynamic-list-data.
947
948 2016-02-22 H.J. Lu <hongjiu.lu@intel.com>
949
950 * elflink.c (_bfd_elf_link_renumber_dynsyms): Always create the
951 dynsym section, even if it is empty, with dynamic sections.
952
953 2016-02-22 H.J. Lu <hongjiu.lu@intel.com>
954
955 * syms.c: Remove BSF_COMMON from comments.
956 * bfd-in2.h: Regenerated.
957
958 2016-02-22 Jiong Wang <jiong.wang@arm.com>
959
960 * elfnn-aarch64. (aarch64_type_of_stub): Remove redundation calcuation
961 for destination. Remove useless function parameters.
962 (elfNN_aarch64_size_stubs): Update parameters for aarch64_type_of_stub.
963
964 2016-02-19 Nick Clifton <nickc@redhat.com>
965
966 PR ld/19629
967 * aoutx.h (aout_link_add_symbols): Check for out of range string
968 table offsets.
969
970 PR ld/19628
971 * reloc.c (bfd_generic_get_relocated_section_contents): Stop
972 processing if we encounter a reloc without an associated symbol.
973
974 2016-02-18 H.J. Lu <hongjiu.lu@intel.com>
975
976 PR ld/19617
977 * elflink.c (elf_link_add_object_symbols): Always create dynamic
978 sections for -E/--dynamic-list.
979
980 2016-02-17 H.J. Lu <hongjiu.lu@intel.com>
981
982 * elf64-x86-64.c (elf_backend_omit_section_dynsym): New. Defined
983 to bfd_true.
984
985 2016-02-16 Joseph Myers <joseph@codesourcery.com>
986
987 * plugin.c (plugin_vec): Set match priority to 255.
988 * format.c (bfd_check_format_matches) [BFD_SUPPORTS_PLUGINS]: When
989 matching against the plugin vector, take priority from there not
990 from TEMP.
991
992 2016-02-15 Nick Clifton <nickc@redhat.com>
993
994 * elf-bfd.h (struct bfd_elf_special_section): Use unsigned values
995 for length and type fields. Use a signed value for the
996 suffix_length field.
997
998 2016-02-10 H.J. Lu <hongjiu.lu@intel.com>
999
1000 PR ld/19601
1001 * elf32-i386.c (elf_i386_relocate_section): Mask off the least
1002 significant bit in GOT offset for R_386_GOT32X.
1003
1004 2016-02-10 Nick Clifton <nickc@redhat.com>
1005
1006 PR 19405
1007 * elf32-nios2.c (nios2_elf32_install_imm16): Allow for signed
1008 immediate values.
1009 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Limit the
1010 number of messages about FDE encoding preventing .eh_frame_hdr
1011 generation.
1012
1013 2016-02-09 Nick Clifton <nickc@redhat.com>
1014
1015 * oasys.c (oasys_archive_p): Fix indentation.
1016 * elf32-nds32.c (nds32_elf_relax_section): Use an unsigned
1017 constant for left shifting.
1018
1019 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Add a more
1020 helpful warning message to explain why certain AArch64 relocs
1021 might overflow.
1022
1023 2016-02-05 Simon Marchi <simon.marchi@ericsson.com>
1024
1025 * pe-mips.c (coff_mips_reloc): Fix formatting.
1026
1027 2016-02-05 Cupertino Miranda <Cupertino.Miranda@synopsys.com>
1028
1029 * cpu-arc.c: Change default archure from bfd_mach_arc_arcv2
1030 to bfd_mach_arc_arc600.
1031
1032 2016-02-04 Alan Modra <amodra@gmail.com>
1033
1034 * elf64-ppc.c (ppc64_elf_relocate_section): Adjust last patch
1035 for big-endian.
1036
1037 2016-02-02 H.J. Lu <hongjiu.lu@intel.com>
1038
1039 PR ld/19542
1040 * elf64-x86-64.c (elf_x86_64_convert_load): Store the estimated
1041 distances in the compressed_size field of the output section.
1042
1043 2016-02-02 Alan Modra <amodra@gmail.com>
1044
1045 * elf64-ppc.c (ppc64_elf_relocate_section): Further restrict
1046 ELFv2 entry optimization.
1047
1048 2016-02-02 H.J. Lu <hongjiu.lu@intel.com>
1049
1050 PR binutils/19547
1051 * elf.c (assign_section_numbers): Clear HAS_RELOC if there are
1052 no relocations in relocatable files.
1053
1054 2016-02-01 H.J. Lu <hongjiu.lu@intel.com>
1055
1056 PR ld/19553
1057 * elflink.c (elf_link_add_object_symbols): Don't add DT_NEEDED
1058 if a symbol from a library loaded via DT_NEEDED doesn't match
1059 the symbol referenced by regular object.
1060
1061 2016-02-01 Nathaniel Smith <njs@pobox.com>
1062
1063 * peicode.h (pe_ILF_build_a_bfd): Create an import symbol for both
1064 CODE and DATA.
1065
1066 2016-02-01 Alan Modra <amodra@gmail.com>
1067
1068 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Don't abort on
1069 an out of range reloc_index.
1070 * elf32-i386.c (elf_i386_get_plt_sym_val): Likewise.
1071
1072 2016-02-01 Kamil Rytarowski <n54@gmx.com>
1073
1074 * Makefile.am (OPTIONAL_BACKENDS): Add netbsd-core.lo.
1075 (OPTIONAL_BACKENDS_CFILES): Add netbsd-core.c.
1076 * Makefile.in: Regenerated.
1077
1078 2016-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
1079
1080 * elf64-s390.c (elf_s390_reloc_name_lookup): Fix indentation.
1081
1082 2016-01-31 John David Anglin <danglin@gcc.gnu.org>
1083
1084 PR ld/19526
1085 * elf32-hppa.c (elf32_hppa_final_link): Don't sort non-regular output
1086 files.
1087 * elf64-hppa.c (elf32_hppa_final_link): Likewise. Remove retval.
1088
1089 2016-01-30 H.J. Lu <hongjiu.lu@intel.com>
1090
1091 PR ld/19539
1092 * elf32-i386.c (elf_i386_reloc_type_class): Check relocation
1093 against STT_GNU_IFUNC symbol only with dynamic symbols.
1094 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise.
1095
1096 2016-01-28 H.J. Lu <hongjiu.lu@intel.com>
1097
1098 PR binutils/19523
1099 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Set BFD_DECOMPRESS to
1100 decompress debug sections.
1101
1102 2016-01-25 Maciej W. Rozycki <macro@imgtec.com>
1103
1104 * elf32-arc.c (elf_arc_finish_dynamic_symbol): Rename `index' to
1105 `dynindx'.
1106
1107 2016-01-25 Nick Clifton <nickc@redhat.com>
1108
1109 PR target/19435
1110 * mach-o.c (bfd_mach_o_close_and_cleanup): Suppress code to free
1111 dsym filename buffer.
1112
1113 2016-01-24 Maciej W. Rozycki <macro@imgtec.com>
1114
1115 * elfxx-mips.c (BZ16_REG_FIELD): Simplify calculation.
1116
1117 2016-01-24 Maciej W. Rozycki <macro@imgtec.com>
1118
1119 * elfxx-mips.c (BZ16_REG): Correct calculation.
1120
1121 2016-01-21 Nick Clifton <nickc@redhat.com>
1122
1123 * elf32-arc.c (ADD_RELA): Fix compile time warning errors by
1124 changing the type of _loc to be bfd_byte *.
1125 (elf_arc_finish_dynamic_symbol): Likewise.
1126
1127 2016-01-21 Nick Clifton <nickc@redhat.com>
1128
1129 PR ld/19455
1130 * elf32-arm.c (elf32_arm_create_dynamic_sections): Set the ELF
1131 class of the linker stub bfd.
1132 (elf32_arm_check_relocs): Skip check for pic format after
1133 processing a vxWorks R_ARM_ABS12 reloc.
1134 * elflink.c (bfd_elf_final_link): Check for ELFCLASSNONE when
1135 reporting a class mismatch.
1136
1137 2016-01-21 Jiong Wang <jiong.wang@arm.com>
1138
1139 * elfnn-aarch64.c (aarch64_type_of_stub): Allow insert long branch
1140 veneer for sym_sec != input_sec.
1141 (elfNN_aarch64_size_stub): Support STT_SECTION symbol.
1142 (elfNN_aarch64_final_link_relocate): Take rela addend into account when
1143 calculation destination.
1144
1145 2016-01-21 Alan Modra <amodra@gmail.com>
1146
1147 * elf-linux-core.h (swap_linux_prpsinfo32_out): New function.
1148 (swap_linux_prpsinfo64_out): New function.
1149 (LINUX_PRPSINFO32_SWAP_FIELDS): Delete.
1150 (LINUX_PRPSINFO64_SWAP_FIELDS): Delete.
1151 * elf.c (elfcore_write_linux_prpsinfo32): Adjust. Don't memset.
1152 (elfcore_write_linux_prpsinfo64): Likewise.
1153 * elf32-ppc.c (swap_ppc_linux_prpsinfo32_out): New function.
1154 (PPC_LINUX_PRPSINFO32_SWAP_FIELDS): Delete.
1155 (elfcore_write_ppc_linux_prpsinfo32): Adjust. Don't memset.
1156
1157 2016-01-21 Alan Modra <amodra@gmail.com>
1158
1159 * elf-linux-core.h: Rename from elf-linux-psinfo.h.
1160 * elf.c: Adjust #include.
1161 * elf32-ppc.c: Don't #include elf-linux-psinfo.h
1162 * Makefile.am (SOURCE_HFILES): Update.
1163 * Makefile.in: Regenerate.
1164 * po/SRC-PORFILES.in: Regenerate.
1165
1166 2016-01-21 Alan Modra <amodra@gmail.com>
1167
1168 * configure.ac: Move corefile selection later in file. Move
1169 tdefaults code immediately after other target vector code.
1170 * configure: Regenerate.
1171
1172 2016-01-20 Mickael Guene <mickael.guene@st.com>
1173
1174 * elf32-arm.c (elf32_arm_special_sections): Remove catch of noread
1175 section using '.text.noread' pattern.
1176
1177 2016-01-19 John Baldwin <jhb@FreeBSD.org>
1178
1179 * elf.c (elfcore_grok_note): Recognize NT_FREEBSD_THRMISC notes.
1180
1181 2016-01-18 Miranda Cupertino <Cupertino.Miranda@synopsys.com>
1182 Zissulescu Claudiu <Claudiu.Zissulescu@synopsys.com>
1183
1184 * arc-plt.def: New file.
1185 * arc-plt.h: Likewise.
1186 * elf32-arc.c (elf_arc_abs_plt0_entry, elf_arc_abs_pltn_entry,
1187 elf_arcV2_abs_plt0_entry, elf_arcV2_abs_pltn_entry,
1188 elf_arc_pic_plt0_entry, elf_arc_pic_pltn_entry,
1189 elf_arcV2_pic_plt0_entry, elf_arcV2_pic_pltn_entry): Remove.
1190 (name_for_global_symbol): Added.
1191 (ADD_RELA): Helper to create dynamic relocs.
1192 (new_got_entry_to_list): Create a new got entry in linked list.
1193 (symbol_has_entry_of_type): Search for specific type of entry in
1194 list.
1195 (is_reloc_for_GOT): return FALSE for any TLS related relocs.
1196 (is_reloc_for_TLS, arc_elf_set_private_flags)
1197 (arc_elf_print_private_bfd_data, arc_elf_copy_private_bfd_data)
1198 (arc_elf_merge_private_bfd_data): New functions.
1199 (debug_arc_reloc): Cleaned debug info printing.
1200 (PDATA reloc): Changed not to perform address alignment.
1201 (reverse_me): Added. Fix for ARC_32 relocs.
1202 (arc_do_relocation): Return bfd_reloc_of when no relocation should
1203 occur.
1204 (arc_get_local_got_ents): Renamed from arc_get_local_got_offsets.
1205 Changed function to access an array of list of GOT entries instead
1206 of just an array of offsets.
1207 (elf_arc_relocate_section): Added support for PIC and TLS related relocations.
1208 (elf_arc_check_relocs): Likewise.
1209 (elf_arc_adjust_dynamic_symbol, elf_arc_finish_dynamic_symbol,
1210 (elf_arc_finish_dynamic_sections): Likewise
1211 (arc_create_dynamic_sections): Modified conditions to create
1212 dynamic sections.
1213 (ADD_SYMBOL_REF_SEC_AND_RELOC): New macro.
1214 (plt_do_relocs_for_symbol, relocate_plt_for_symbol)
1215 (relocate_plt_for_entry): Changed to support new way to define PLT
1216 related code.
1217 (add_symbol_to_plt): Likewise.
1218 (arc_elf_link_hash_table_create): New function.
1219
1220 2016-01-18 Nick Clifton <nickc@redhat.com>
1221
1222 PR ld/19440
1223 * coff-rs6000.c (_bfd_xcoff_swap_sym_in): Sign extend external
1224 section number into internal section number.
1225 * coff64-rs6000.c (_bfd_xcoff64_swap_sym_in): Likewise.
1226 * coffswap.h (coff_swap_sym_in): Likewise.
1227 * peXXigen.c (_bfd_XXi_swap_sym_in): Likewise.
1228 * coffcode.h (_coff_bigobj_swap_sym_in): Make sure that internal
1229 section number field is big enough to hold the external value.
1230
1231 2016-01-17 Alan Modra <amodra@gmail.com>
1232
1233 * configure: Regenerate.
1234
1235 2016-01-12 Yury Usishchev <y.usishchev@samsung.com>
1236
1237 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Insert cantunwind
1238 when address in first unwind entry does not match start of
1239 section.
1240
1241 2016-01-08 Richard Sandiford <richard.sandiford@arm.com>
1242 Jiong Wang <jiong.wang@arm.com>
1243
1244 PR ld/19368
1245 * elf32-arm.c (elf32_arm_reloc_type_class): Map R_ARM_IRELATIVE to
1246 reloc_class_ifunc.
1247
1248 2016-01-06 Andrew Burgess <andrew.burgess@embecosm.com>
1249
1250 * elf32-arc.c (reloc_type_to_name): Change ARC_RELOC_HOWTO to
1251 place 'R_' before the reloc name returned.
1252 (elf_arc_howto_table): Change ARC_RELOC_HOWTO to place 'R_' before
1253 the relocation string.
1254
1255 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1256
1257 * elfxx-mips.c (mips_elf_merge_obj_abiflags): New function,
1258 factored out from...
1259 (_bfd_mips_elf_merge_private_bfd_data): ... here.
1260
1261 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1262
1263 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Move
1264 attribute check after ELF file header flag check.
1265
1266 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1267
1268 * elfxx-mips.c (mips_elf_merge_obj_attributes): Propagate the
1269 return status from `_bfd_elf_merge_object_attributes'.
1270
1271 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1272
1273 * elfxx-mips.c (mips_elf_merge_obj_e_flags): New function,
1274 factored out from...
1275 (_bfd_mips_elf_merge_private_bfd_data): ... here.
1276
1277 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1278
1279 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Fold the
1280 handling of input MIPS ABI flags together.
1281
1282 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1283
1284 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Suppress
1285 attribute checks for null input.
1286
1287 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1288
1289 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Use local
1290 pointers to target data.
1291
1292 2016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1293
1294 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
1295 an FP ABI warning.
1296
1297 2016-01-01 Alan Modra <amodra@gmail.com>
1298
1299 Update year range in copyright notice of all files.
1300
1301 For older changes see ChangeLog-2015 and doc/ChangeLog-0415
1302 \f
1303 Copyright (C) 2016 Free Software Foundation, Inc.
1304
1305 Copying and distribution of this file, with or without modification,
1306 are permitted in any medium without royalty provided the copyright
1307 notice and this notice are preserved.
1308
1309 Local Variables:
1310 mode: change-log
1311 left-margin: 8
1312 fill-column: 74
1313 version-control: never
1314 End:
This page took 0.055831 seconds and 5 git commands to generate.