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