[ARC] General bug fixes
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
2ab2f40d
CM
12016-06-13 Cupertino Miranda <cmiranda@synospsy.com>
2
3 * elf32-arc.c (arc_local_data, arc_local_data): Removed.
4 (SECTSTART): Changed.
5 (elf_arc_relocate_section): Fixed mistake in PIE related
6 condition.
7 (elf_arc_size_dynamic_sections): Changed DT_RELENT to DT_RELAENT.
8
0f7f3789
CM
92016-06-13 Cupertino Miranda <cmiranda@synospsy.com>
10
11 * elf32-arc.c (elf32_arc_reloc_type_class): Defined function to
12 enable support for "-z combreloc" and DT_RELACOUNT.
13 (elf_backend_reloc_type_class): Likewise
14
74d7f0aa
L
152016-06-11 H.J. Lu <hongjiu.lu@intel.com>
16
17 PR ld/20244
18 * elf32-i386.c (elf_i386_relocate_section): When relocating
19 R_386_GOT32, return error without a base register for PIC and
20 subtract the .got.plt section address only with a base register.
21
ef53be89
AM
222016-06-10 Alan Modra <amodra@gmail.com>
23
24 * elf-strtab.c (struct strtab_save): Use size_t for "size".
25 (struct elf_strtab_hash): Likewise for "size" and "alloced".
26 (_bfd_elf_strtab_init): Formatting.
27 (_bfd_elf_strtab_add): Return size_t rather than bfd_size_type.
28 (_bfd_elf_strtab_addref): Take size_t idx param.
29 (_bfd_elf_strtab_delref, _bfd_elf_strtab_refcount): Likewise.
30 (_bfd_elf_strtab_offset): Likewise.
31 (_bfd_elf_strtab_clear_all_refs): Use size_t idx.
32 (_bfd_elf_strtab_save): Use size_t "idx" and "size" vars.
33 (_bfd_elf_strtab_restore, _bfd_elf_strtab_emit): Similarly.
34 (_bfd_elf_strtab_finalize): Similarly.
35 * elf-bfd.h (_bfd_elf_strtab_add): Update prototypes.
36 (_bfd_elf_strtab_addref, _bfd_elf_strtab_delref): Likewise.
37 (_bfd_elf_strtab_refcount, _bfd_elf_strtab_offset): Likewise.
38 * elf.c (bfd_elf_get_elf_syms): Calculate symbol buffer size
39 using bfd_size_type.
40 (bfd_section_from_shdr): Delete amt.
41 (_bfd_elf_init_reloc_shdr): Likewise.
42 (_bfd_elf_link_assign_sym_version): Likewise.
43 (assign_section_numbers): Use size_t reloc_count.
44 * elflink.c (struct elf_symbuf_head): Use size_t "count".
45 (bfd_elf_link_record_dynamic_symbol): Use size_t for some vars.
46 (elf_link_is_defined_archive_symbol): Likewise.
47 (elf_add_dt_needed_tag): Likewise.
48 (elf_finalize_dynstr): Likewise.
49 (elf_link_add_object_symbols): Likewise.
50 (bfd_elf_size_dynamic_sections): Likewise.
51 (elf_create_symbuf): Similarly.
52 (bfd_elf_match_symbols_in_sections): Likewise.
53 (elf_link_swap_symbols_out): Likewise.
54 (elf_link_check_versioned_symbol): Likewise.
55 (bfd_elf_gc_record_vtinherit): Likewise.
56 (bfd_elf_gc_common_finalize_got_offsets): Likewise.
57
5c41dbc3
DC
582016-06-08 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
59
60 PR ld/20221
61 * elf32-avr.c (elf32_avr_relax_delete_bytes): Adjust syms
62 and relocs only if shrinking occurred.
63
6eaa7fb5
L
642016-06-08 H.J. Lu <hongjiu.lu@intel.com>
65
66 * elf64-i386.c (elf_i386_link_hash_entry): Add tls_get_addr.
67 (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 2.
68 (elf_i386_check_tls_transition): Check indirect call and direct
69 call with the addr32 prefix for general and local dynamic models.
70 Set the tls_get_addr feild.
71 (elf_i386_convert_load_reloc): Always use addr32 prefix for
72 indirect ___tls_get_addr call via GOT.
73 (elf_i386_relocate_section): Handle GD->LE, GD->IE and LD->LE
74 transitions with indirect call and direct call with the addr32
75 prefix.
76
3b67f094
MK
772016-06-07 Marcin Koƛcielnicki <koriakin@0x04.net>
78
79 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Fix comment.
80 * elf64-s390.c (elf_s390x_plt_entry): Fix comment.
81 (elf_s390_relocate_section): Fix comment.
82 (elf_s390_finish_dynamic_sections): Fix initialization of fixed
83 .got.plt entries.
84
161db279
AK
852016-06-07 Ulrich Weigand <ulrich.weigand@de.ibm.com>
86
87 * elf64-s390.c (elf_s390_finish_dynamic_sections): Subtract plt
88 section offset when calculation the larl operand in the first PLT
89 entry.
90
14b57c7c
AM
912016-06-07 Alan Modra <amodra@gmail.com>
92
93 * cpu-powerpc.c (powerpc_compatible): Allow bfd_mach_ppc_vle entry
94 to match other 32-bit archs.
95 * elf32-ppc.c (_bfd_elf_ppc_set_arch): New function.
96 (ppc_elf_object_p): Call it.
97 (ppc_elf_special_sections): Use APUINFO_SECTION_NAME. Fix
98 overlong line.
99 (APUINFO_SECTION_NAME, APUINFO_LABEL): Don't define here.
100 * elf64-ppc.c (ppc64_elf_object_p): Call _bfd_elf_ppc_set_arch.
101 * bfd-in.h (_bfd_elf_ppc_at_tls_transform,
102 _bfd_elf_ppc_at_tprel_transform): Move to..
103 * elf-bfd.h: ..here.
104 (_bfd_elf_ppc_set_arch): Declare.
105 * bfd-in2.h: Regenerate.
106
e2cbcd91
L
1072016-06-06 H.J. Lu <hongjiu.lu@intel.com>
108
109 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add tls_get_addr.
110 (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 2.
111 (elf_x86_64_check_tls_transition): Check indirect call and
112 direct call with the addr32 prefix for general and local dynamic
113 models. Set the tls_get_addr feild.
114 (elf_x86_64_convert_load_reloc): Always use addr32 prefix for
115 indirect __tls_get_addr call via GOT.
116 (elf_x86_64_relocate_section): Handle GD->LE, GD->IE and LD->LE
117 transitions with indirect call and direct call with the addr32
118 prefix.
119
2ac27cd3
CG
1202016-06-04 Christian Groessler <chris@groessler.org>
121
122 * coff-z8k.c (extra_case): Fix range check for R_JR relocation.
123
99914dfd
NC
1242016-06-02 Nick Clifton <nickc@redhat.com>
125
126 PR target/20088
127 * cpu-arm.c (processors): Add "arm_any" type to match any ARM
128 architecture.
129 (arch_info_struct): Likewise.
130 (architectures): Likewise.
131
4ad0bb5f
VG
1322016-06-02 Vineet Gupta <Vineet.Gupta1@synopsys.com>
133
134 * config.bfd: Replace -uclibc with *.
135
3ddf1bdd
L
1362016-06-02 H.J. Lu <hongjiu.lu@intel.com>
137
138 * elf64-x86-64.c: Replace data32 with data16 in comments.
139
5b677558
AM
1402016-05-31 Alan Modra <amodra@gmail.com>
141
142 PR ld/20159
143 PR ld/16467
144 * elflink.c (_bfd_elf_merge_symbol): Revert PR16467 change.
145 (_bfd_elf_add_default_symbol): Don't indirect to/from defined
146 symbol given a version by a script different to the version
147 of the symbol being added.
148 (elf_link_add_object_symbols): Use _bfd_elf_strtab_save and
149 _bfd_elf_strtab_restore. Don't fudge dynstr references.
150 * elf-strtab.c (_bfd_elf_strtab_restore_size): Delete.
151 (struct strtab_save): New.
152 (_bfd_elf_strtab_save, _bfd_elf_strtab_restore): New functions.
153 * elf-bfd.h (_bfd_elf_strtab_restore_size): Delete.
154 (_bfd_elf_strtab_save, _bfd_elf_strtab_restore): Declare.
155
1fe0971e
TS
1562016-06-01 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
157
158 * elf32-hppa.h: Add extern "C".
159 * elf32-nds32.h: Likewise.
160 * elf32-tic6x.h: Likewise.
161
885a1087
NC
1622016-06-01 Nick Clifton <nickc@redhat.com>
163
164 * po/sr.po: New Serbian translation.
165 * configure.ac (ALL_LINGUAS): Add sr.
166 * configure: Regenerate.
167
99aefae6
MR
1682016-05-28 Maciej W. Rozycki <macro@imgtec.com>
169
170 * elfxx-mips.c (b_reloc_p): New function.
171 (_bfd_mips_elf_relocate_section) <bfd_reloc_outofrange>: Handle
172 branch relocations.
173
77434823
MR
1742016-05-28 Maciej W. Rozycki <macro@imgtec.com>
175
176 * elfxx-mips.c (mips_elf_calculate_relocation): <R_MIPS16_26>
177 <R_MIPS_26, R_MICROMIPS_26_S1>: Drop the region bits of the
178 reloc location from calculation, treat the addend as signed with
179 local non-section symbols and enable overflow detection.
180
1a72702b
AM
1812016-05-28 Alan Modra <amodra@gmail.com>
182
183 * aoutx.h: Adjust linker callback calls throughout file,
184 removing dead code.
185 * bout.c: Likewise.
186 * coff-alpha.c: Likewise.
187 * coff-arm.c: Likewise.
188 * coff-h8300.c: Likewise.
189 * coff-h8500.c: Likewise.
190 * coff-i960.c: Likewise.
191 * coff-mcore.c: Likewise.
192 * coff-mips.c: Likewise.
193 * coff-ppc.c: Likewise.
194 * coff-rs6000.c: Likewise.
195 * coff-sh.c: Likewise.
196 * coff-tic80.c: Likewise.
197 * coff-w65.c: Likewise.
198 * coff-z80.c: Likewise.
199 * coff-z8k.c: Likewise.
200 * coff64-rs6000.c: Likewise.
201 * cofflink.c: Likewise.
202 * ecoff.c: Likewise.
203 * elf-bfd.h: Likewise.
204 * elf-m10200.c: Likewise.
205 * elf-m10300.c: Likewise.
206 * elf32-arc.c: Likewise.
207 * elf32-arm.c: Likewise.
208 * elf32-avr.c: Likewise.
209 * elf32-bfin.c: Likewise.
210 * elf32-cr16.c: Likewise.
211 * elf32-cr16c.c: Likewise.
212 * elf32-cris.c: Likewise.
213 * elf32-crx.c: Likewise.
214 * elf32-d10v.c: Likewise.
215 * elf32-epiphany.c: Likewise.
216 * elf32-fr30.c: Likewise.
217 * elf32-frv.c: Likewise.
218 * elf32-ft32.c: Likewise.
219 * elf32-h8300.c: Likewise.
220 * elf32-hppa.c: Likewise.
221 * elf32-i370.c: Likewise.
222 * elf32-i386.c: Likewise.
223 * elf32-i860.c: Likewise.
224 * elf32-ip2k.c: Likewise.
225 * elf32-iq2000.c: Likewise.
226 * elf32-lm32.c: Likewise.
227 * elf32-m32c.c: Likewise.
228 * elf32-m32r.c: Likewise.
229 * elf32-m68hc1x.c: Likewise.
230 * elf32-m68k.c: Likewise.
231 * elf32-mep.c: Likewise.
232 * elf32-metag.c: Likewise.
233 * elf32-microblaze.c: Likewise.
234 * elf32-moxie.c: Likewise.
235 * elf32-msp430.c: Likewise.
236 * elf32-mt.c: Likewise.
237 * elf32-nds32.c: Likewise.
238 * elf32-nios2.c: Likewise.
239 * elf32-or1k.c: Likewise.
240 * elf32-ppc.c: Likewise.
241 * elf32-s390.c: Likewise.
242 * elf32-score.c: Likewise.
243 * elf32-score7.c: Likewise.
244 * elf32-sh.c: Likewise.
245 * elf32-sh64.c: Likewise.
246 * elf32-spu.c: Likewise.
247 * elf32-tic6x.c: Likewise.
248 * elf32-tilepro.c: Likewise.
249 * elf32-v850.c: Likewise.
250 * elf32-vax.c: Likewise.
251 * elf32-visium.c: Likewise.
252 * elf32-xstormy16.c: Likewise.
253 * elf32-xtensa.c: Likewise.
254 * elf64-alpha.c: Likewise.
255 * elf64-hppa.c: Likewise.
256 * elf64-ia64-vms.c: Likewise.
257 * elf64-mmix.c: Likewise.
258 * elf64-ppc.c: Likewise.
259 * elf64-s390.c: Likewise.
260 * elf64-sh64.c: Likewise.
261 * elf64-x86-64.c: Likewise.
262 * elflink.c: Likewise.
263 * elfnn-aarch64.c: Likewise.
264 * elfnn-ia64.c: Likewise.
265 * elfxx-mips.c: Likewise.
266 * elfxx-sparc.c: Likewise.
267 * elfxx-tilegx.c: Likewise.
268 * linker.c: Likewise.
269 * pdp11.c: Likewise.
270 * pe-mips.c: Likewise.
271 * reloc.c: Likewise.
272 * reloc16.c: Likewise.
273 * simple.c: Likewise.
274 * vms-alpha.c: Likewise.
275 * xcofflink.c: Likewise.
276 * elf32-rl78.c (get_symbol_value, get_romstart, get_ramstart): Delete
277 status param. Adjust calls to these and linker callbacks throughout.
278 * elf32-rx.c: (get_symbol_value, get_gp, get_romstart,
279 get_ramstart): Delete status param. Adjust calls to these and
280 linker callbacks throughout.
281
bc27bb05
MR
2822016-05-27 Maciej W. Rozycki <macro@imgtec.com>
283
284 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS16_26>
285 <R_MIPS_26, R_MICROMIPS_26_S1>: Include the addend in JALX's
286 target alignment verification.
287
ceab86af
MR
2882016-05-27 Maciej W. Rozycki <macro@imgtec.com>
289
290 * elfxx-mips.c (mips_elf_calculate_relocation): Also use the
291 section name if `bfd_elf_string_from_elf_section' returns an
292 empty string.
293
ed53407e
MR
2942016-05-26 Maciej W. Rozycki <macro@imgtec.com>
295
296 * elfxx-mips.c (_bfd_mips_elf_relocate_section)
297 <bfd_reloc_outofrange>: Use the `%X%H' rather than `%C' format
298 for message. Continue processing rather than returning failure.
299
de341542 3002016-05-25 Maciej W. Rozycki <macro@imgtec.com>
ed53407e 301
de341542
MR
302 * elfxx-mips.c (_bfd_mips_elf_relocate_section)
303 <bfd_reloc_outofrange>: Call `->einfo' rather than `->warning'.
304 Call `bfd_set_error'.
305
e6cc316a
L
3062016-05-25 H.J. Lu <hongjiu.lu@intel.com>
307
308 PR binutils/14625
309 * archive.c (bfd_slurp_armap): Replace
310 bfd_elf64_archive_slurp_armap with
311 _bfd_archive_64_bit_slurp_armap.
312 (bsd_write_armap): Call _bfd_archive_64_bit_write_armap if
313 BFD64 is defined and the archive is too big.
314 (coff_write_armap): Likewise.
315 * archive64.c (bfd_elf64_archive_slurp_armap): Renamed to ...
316 (_bfd_archive_64_bit_slurp_armap): This.
317 (bfd_elf64_archive_write_armap): Renamed to ...
318 (_bfd_archive_64_bit_write_armap): This.
319 * configure.ac: Add --enable-64-bit-archive.
320 (want_64_bit_archive): New. Set to true by default for 64-bit
321 MIPS and s390 ELF targets.
322 (USE_64_BIT_ARCHIVE): New AC_DEFINE.
323 * config.in: Regenerated.
324 * configure: Likewise.
325 * elf64-mips.c (bfd_elf64_archive_functions): Removed.
326 (bfd_elf64_archive_slurp_armap): Likewise.
327 (bfd_elf64_archive_write_armap): Likewise.
328 (bfd_elf64_archive_slurp_extended_name_table): Likewise.
329 (bfd_elf64_archive_construct_extended_name_table): Likewise.
330 (bfd_elf64_archive_truncate_arname): Likewise.
331 (bfd_elf64_archive_read_ar_hdr): Likewise.
332 (bfd_elf64_archive_write_ar_hdr): Likewise.
333 (bfd_elf64_archive_openr_next_archived_file): Likewise.
334 (bfd_elf64_archive_get_elt_at_index): Likewise.
335 (bfd_elf64_archive_generic_stat_arch_elt): Likewise.
336 (bfd_elf64_archive_update_armap_timestamp): Likewise.
337 * elf64-s390.c (bfd_elf64_archive_functions): Removed.
338 (bfd_elf64_archive_slurp_armap): Likewise.
339 (bfd_elf64_archive_write_armap): Likewise.
340 (bfd_elf64_archive_slurp_extended_name_table): Likewise.
341 (bfd_elf64_archive_construct_extended_name_table): Likewise.
342 (bfd_elf64_archive_truncate_arname): Likewise.
343 (bfd_elf64_archive_read_ar_hdr): Likewise.
344 (bfd_elf64_archive_write_ar_hdr): Likewise.
345 (bfd_elf64_archive_openr_next_archived_file): Likewise.
346 (bfd_elf64_archive_get_elt_at_index): Likewise.
347 (bfd_elf64_archive_generic_stat_arch_elt): Likewise.
348 (bfd_elf64_archive_update_armap_timestamp): Likewise.
349 * elfxx-target.h (TARGET_BIG_SYM): Use _bfd_archive_64_bit on
350 BFD_JUMP_TABLE_ARCHIVE if USE_64_BIT_ARCHIVE is defined and
351 bfd_elfNN_archive_functions isn't defined.
352 (TARGET_LITTLE_SYM): Likewise.
353 * libbfd-in.h (_bfd_archive_64_bit_slurp_armap): New prototype.
354 (_bfd_archive_64_bit_write_armap): Likewise.
355 (_bfd_archive_64_bit_slurp_extended_name_table): New macro.
356 (_bfd_archive_64_bit_construct_extended_name_table): Likewise.
357 (_bfd_archive_64_bit_truncate_arname): Likewise.
358 (_bfd_archive_64_bit_read_ar_hdr): Likewise.
359 (_bfd_archive_64_bit_write_ar_hdr): Likewise.
360 (_bfd_archive_64_bit_openr_next_archived_file): Likewise.
361 (_bfd_archive_64_bit_get_elt_at_index): Likewise.
362 (_bfd_archive_64_bit_generic_stat_arch_elt): Likewise.
363 (_bfd_archive_64_bit_update_armap_timestamp): Likewise.
364 * libbfd.h: Regenerated.
365 * plugin.c (plugin_vec): Use _bfd_archive_64_bit on
366 BFD_JUMP_TABLE_ARCHIVE if USE_64_BIT_ARCHIVE is defined.
367
b95a0a31
L
3682016-05-25 H.J. Lu <hongjiu.lu@intel.com>
369
370 PR ld/20103
371 * cofflink.c (coff_link_check_archive_element): Return TRUE if
372 linker add_archive_element callback returns FALSE.
373 * ecoff.c (ecoff_link_check_archive_element): Likewise.
374 * elf64-ia64-vms.c (elf64_vms_link_add_archive_symbols): Skip
375 archive element if linker add_archive_element callback returns
376 FALSE.
377 * elflink.c (elf_link_add_archive_symbols): Likewise.
378 * pdp11.c (aout_link_check_ar_symbols): Likewise.
379 * vms-alpha.c (alpha_vms_link_add_archive_symbols): Likewise.
380 * xcofflink.c (xcoff_link_check_dynamic_ar_symbols): Likewise.
381 (xcoff_link_check_ar_symbols): Likewise.
382
7db9a74e
MR
3832016-05-24 Maciej W. Rozycki <macro@imgtec.com>
384
385 * elfxx-mips.c (_bfd_mips_elf_relocate_section)
386 <bfd_reloc_outofrange>: Unify error reporting code.
387
b7f28d87
JW
3882016-05-23 Jim Wilson <jim.wilson@linaro.org>
389
390 * elfnn-aarch64.c: Unconditionally enable R_AARCH64_NULL and
391 R_AARCH64_NONE. Use HOWTO64 for R_AARCH64_NULL.
392 * relocs.c: Add BFD_RELOC_AARCH64_NULL.
393 * bfd-in2.h: Regenerate.
394 * libbfd.h: Likewise.
395
a2bea324
KS
3962016-05-23 Kuba Sejdak <jakub.sejdak@phoesys.com>
397
398 * config.bfd: Add entry for arm-phoenix.
399
d7c5bd02
TP
4002016-05-23 Thomas Preud'homme <thomas.preudhomme@arm.com>
401
402 * elf32-arm.c (arm_dedicated_stub_section_padding): New function.
403 (elf32_arm_size_stubs): Declare stub_type in a more outer scope and
404 account for padding for stub section requiring one.
405 (elf32_arm_build_stubs): Add comment to stress the importance of
406 zeroing veneer section content.
407
daa4adae
TP
4082016-05-23 Thomas Preud'homme <thomas.preudhomme@arm.com>
409
410 * bfd-in.h (bfd_elf32_arm_keep_private_stub_output_sections): Declare
411 bfd hook.
412 * bfd-in2.h: Regenerate.
413 * elf32-arm.c (arm_dedicated_stub_output_section_required): New
414 function.
415 (arm_dedicated_stub_output_section_required_alignment): Likewise.
416 (arm_dedicated_stub_output_section_name): Likewise.
417 (arm_dedicated_stub_input_section_ptr): Likewise.
418 (elf32_arm_create_or_find_stub_sec): Add stub type parameter and
419 function description comment. Add support for dedicated output stub
420 section to given stub types.
421 (elf32_arm_add_stub): Add a stub type parameter and pass it down to
422 elf32_arm_create_or_find_stub_sec.
423 (elf32_arm_create_stub): Pass stub type down to elf32_arm_add_stub.
424 (elf32_arm_size_stubs): Pass stub type when calling
425 elf32_arm_create_or_find_stub_sec for Cortex-A8 erratum veneers.
426 (bfd_elf32_arm_keep_private_stub_output_sections): New function.
427
52bf37dd
L
4282016-05-20 H.J. Lu <hongjiu.lu@intel.com>
429
430 * elf32-i386.c (elf_i386_check_relocs): Don't check R_386_GOT32
431 when setting need_convert_load.
432
17c6c9d9
MR
4332016-05-20 Maciej W. Rozycki <macro@imgtec.com>
434
435 * elfxx-mips.c (mips_elf_read_rel_addend): Adjust the addend for
436 microMIPS JALX.
437
7d4d9709
L
4382016-05-19 H.J. Lu <hongjiu.lu@intel.com>
439
440 PR ld/20117
441 * elf32-i386.c (elf_i386_convert_load_reloc): Don't check
442 R_386_GOT32X.
443 (elf_i386_convert_load): Don't convert R_386_GOT32.
444
606851fb
AM
4452016-05-20 Alan Modra <amodra@gmail.com>
446
447 PR gas/20118
448 * elf.c (elf_fake_sections): Set sh_entsize for SHT_INIT_ARRAY,
449 SHT_FINI_ARRAY, and SHT_PREINIT_ARRAY.
450
3c8adaca
CZ
4512016-05-19 Cupertino Miranda <cmiranda@synopsys.com>
452
453 * elf32-arc.c (arc_elf_final_write_processing): Changed.
454 (debug_arc_reloc): Likewise.
455 (elf_arc_relocate_section): Likewise.
456 (elf_arc_check_relocs): Likewise.
457 (elf_arc_adjust_dynamic_symbol): Likewise.
458 (elf_arc_add_symbol_hook): Likewise.
459
6b200de0
MR
4602016-05-19 Maciej W. Rozycki <macro@imgtec.com>
461
462 * config.bfd: Remove `am34-*-linux*' support.
463
57e7d118
AM
4642016-05-19 Alan Modra <amodra@gmail.com>
465
466 * elf64-ppc.c (allocate_dynrelocs): Allocate got and other dynamic
467 relocs before plt relocs.
468
9f284bf9
AM
4692016-05-19 Alan Modra <amodra@gmail.com>
470
471 * elf64-ppc.c (ppc64_elf_branch_reloc): Check for NULL owner
472 before dereferencing.
473
50498060
NC
4742016-05-18 Nick Clifton <nickc@redhat.com>
475
476 * po/sv.po: Updated Swedish translation.
477
7f991970
AM
4782016-05-18 Alan Modra <amodra@gmail.com>
479
480 * elf32-arm.c (elf32_arm_size_stubs): Free or cache local syms
481 for each BFD. Don't goto error_ret_free_local from outside loop.
482
a43942db
MR
4832016-05-17 Maciej W. Rozycki <macro@imgtec.com>
484
485 * elf-s390-common.c (elf_s390_add_symbol_hook): Remove
486 STB_GNU_UNIQUE handling.
487 * elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
488 * elf32-arm.c (elf32_arm_add_symbol_hook): Likewise.
489 * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
490 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
491 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
492 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
493 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
494 * elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise.
495 * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
496 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Likewise.
497 * elf32-i386.c (elf_i386_add_symbol_hook): Remove function.
498 (elf_backend_add_symbol_hook): Remove macro.
499 * elflink.c (elf_link_add_object_symbols): Set `has_gnu_symbols'
500 for STB_GNU_UNIQUE symbols.
501
71de3413
MR
5022016-05-16 Maciej W. Rozycki <macro@imgtec.com>
503
504 * elf32-v850.c (v850_elf_copy_notes): New function, factored out
505 from...
506 (v850_elf_copy_private_bfd_data): ... here. Call the new
507 function and `_bfd_elf_copy_private_bfd_data'.
508
2168b268
L
5092016-05-13 H.J. Lu <hongjiu.lu@intel.com>
510
511 PR ld/20093
512 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Don't convert
513 GOTPCREL relocation against large section.
514
4ade44b7
AM
5152016-05-13 Alan Modra <amodra@gmail.com>
516
517 * elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_sections): Use
518 linker dynamic sections in calculating size and address of
2168b268 519 dynamic tags rather than using output sections. Remove asserts.
4ade44b7
AM
520 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Likewise.
521 * elf32-cr16.c (_bfd_cr16_elf_finish_dynamic_sections): Likewise.
522 * elf32-cris.c (elf_cris_finish_dynamic_sections): Likewise.
523 * elf32-i370.c (i370_elf_finish_dynamic_sections): Likewise.
524 * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
525 * elf32-m32r.c (m32r_elf_finish_dynamic_sections): Likewise.
526 * elf32-m68k.c (elf_m68k_finish_dynamic_sections): Likewise.
527 * elf32-metag.c (elf_metag_finish_dynamic_sections): Likewise.
528 * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Likewise.
529 * elf32-nds32.c (nds32_elf_finish_dynamic_sections): Likewise.
530 * elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Likewise.
531 * elf32-or1k.c (or1k_elf_finish_dynamic_sections): Likewise.
532 * elf32-s390.c (elf_s390_finish_dynamic_sections): Likewise.
533 * elf32-score.c (s3_bfd_score_elf_finish_dynamic_sections): Likewise.
534 * elf32-score7.c (s7_bfd_score_elf_finish_dynamic_sections): Likewise.
535 * elf32-vax.c (elf_vax_finish_dynamic_sections): Likewise.
536 * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Likewise.
537 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Likewise.
538 * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
539 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
540 * elflink.c (bfd_elf_final_link): Likewise.
541 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Likewise.
542 * elfxx-sparc.c (sparc_finish_dyn): Likewise. Adjust error message.
543 * elf32-arc.c (GET_SYMBOL_OR_SECTION): Remove ASSERT arg and
544 don't set doit. Look up dynobj section.
545 (elf_arc_finish_dynamic_sections): Adjust GET_SYMBOL_OR_SECTION
546 invocation and dynamic tag vma calculation. Don't test
547 boolean var == TRUE.
548 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_sections): Fix
549 DT_JMPREL calc.
550
c8e44c6d
AM
5512016-05-13 Alan Modra <amodra@gmail.com>
552
553 * elflink.c (elf_link_sort_relocs): Wrap overlong lines. Fix
554 octets_per_byte. Put dynamic .rela.plt last in link orders.
555 Assign output_offset for reloc sections rather than writing
556 sorted relocs from block corresponding to output_offset.
557
1997c994
AM
5582016-05-12 Alan Modra <amodra@gmail.com>
559
560 * elf-bfd.h (elf_reloc_type_class): Put reloc_class_plt last.
561
8f4f9071
MF
5622016-05-11 Andrew Bennett <andrew.bennett@imgtec.com>
563
564 * elfxx-mips.c (print_mips_ases): Add DSPR3.
565
a464198b
AM
5662016-05-11 Alan Modra <amodra@gmail.com>
567
568 * elf32-hppa.c (elf32_hppa_init_stub_bfd): New function.
569 (elf32_hppa_check_relocs): Don't set dynobj.
570 (elf32_hppa_size_stubs): Test !SEC_LINKER_CREATED for stub sections.
571 (elf32_hppa_build_stubs): Likewise.
572 * elf32-hppa.h (elf32_hppa_init_stub_bfd): Declare.
573
3bd43ebc
AM
5742016-05-11 Alan Modra <amodra@gmail.com>
575
576 PR 20060
577 * elf64-ppc.c (ppc64_elf_tls_setup): Clear forced_local.
578 * elf32-ppc.c (ppc_elf_tls_setup): Likewise.
579
4e7fbb34
JW
5802016-05-10 Jiong Wang <jiong.wang@arm.com>
581
582 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Remove redundant
583 aarch64_tls_transition check.
584
4f4faa4d
TP
5852016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
586
587 * elf32-arm.c (enum elf32_arm_stub_type): New max_stub_type
588 enumerator.
589 (arm_stub_sym_claimed): New function.
590 (elf32_arm_create_stub): Use veneered symbol name and section if
591 veneer needs to claim its symbol, and keep logic unchanged otherwise.
592 (arm_stub_claim_sym): New function.
593 (arm_map_one_stub): Call arm_stub_claim_sym if veneer needs to claim
594 veneered symbol, otherwise create local symbol as before.
595
39d911fc
TP
5962016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
597
598 * elf32-arm.c (elf32_arm_size_stubs): Use new macros
599 ARM_GET_SYM_BRANCH_TYPE and ARM_SET_SYM_BRANCH_TYPE to respectively get
600 and set branch type of a symbol.
601 (bfd_elf32_arm_process_before_allocation): Likewise.
602 (elf32_arm_relocate_section): Likewise and fix identation along the
603 way.
604 (allocate_dynrelocs_for_symbol): Likewise.
605 (elf32_arm_finish_dynamic_symbol): Likewise.
606 (elf32_arm_swap_symbol_in): Likewise.
607 (elf32_arm_swap_symbol_out): Likewise.
608
6bde4c52
TP
6092016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
610
611 * bfd-in.h (elf32_arm_size_stubs): Add an output section parameter.
612 * bfd-in2.h: Regenerated.
613 * elf32-arm.c (struct elf32_arm_link_hash_table): Add an output section
614 parameter to add_stub_section callback.
615 (elf32_arm_create_or_find_stub_sec): Get output section from link_sec
616 and pass it down to add_stub_section.
617 (elf32_arm_add_stub): Set section to stub_sec if NULL before using it
618 for error message.
619 (elf32_arm_size_stubs): Add output section parameter to
620 add_stub_section function pointer parameter.
621
b715f643
TP
6222016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
623
624 * elf32-arm.c (elf32_arm_create_stub): New function.
625 (elf32_arm_size_stubs): Use elf32_arm_create_stub for stub creation.
626
8d9d9490
TP
6272016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
628
629 * elf32-arm.c (enum elf32_arm_stub_type): Delete
630 arm_stub_a8_veneer_lwm enumerator.
631 (arm_stub_a8_veneer_lwm): New unsigned constant to replace
632 aforementioned enumerator.
633 (struct elf32_arm_stub_hash_entry): Delete target_addend
634 field and add source_value.
635 (struct a8_erratum_fix): Delete addend field and add target_offset.
636 (stub_hash_newfunc): Initialize source_value field amd remove
637 initialization for target_addend.
638 (arm_build_one_stub): Stop special casing Thumb relocations: promote
639 the else to being always executed, moving the
640 arm_stub_a8_veneer_b_cond specific code in it. Remove
641 stub_entry->target_addend from points_to computation.
642 (cortex_a8_erratum_scan): Store in a8_erratum_fix structure the offset
643 to target symbol from start of section rather than the offset from the
644 stub address.
645 (elf32_arm_size_stubs): Set stub_entry's source_value and target_value
646 fields from struct a8_erratum_fix's offset and target_offset
647 respectively.
648 (make_branch_to_a8_stub): Rename target variable to loc. Compute
649 veneered_insn_loc and loc using stub_entry's source_value.
650
15afaa63
TP
6512016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
652
653 (elf32_arm_merge_eabi_attributes): Add merging logic for
654 Tag_DSP_extension.
655
66a36822
PC
6562016-05-10 Pip Cet <pipcet@gmail.com>
657
658 PR ld/20059
659 * elfxx-target.h (bfd_elfNN_bfd_copy_link_hash_symbol_type):
660 Define as _bfd_generic_copy_link_hash_symbol_type when using
661 generic hash table.
662
315350be
NC
6632016-05-09 Nick Clifton <nickc@redhat.com>
664
665 PR binutils/20063
666 * elf.c (bfd_elf_get_elf_syms): Check for out of range sh_link
667 field before accessing sections array.
668
9239bbd3
CM
6692016-05-09 Christophe Monat <christophe.monat@st.com>
670
671 PR ld/20030
672 * elf32-arm.c (is_thumb2_vldm): Account for T1 (DP) encoding.
673 (stm32l4xx_need_create_replacing_stub): Rename ambiguous nb_regs
674 to nb_words.
675 (create_instruction_vldmia): Add is_dp to disambiguate SP/DP
676 encoding.
677 (create_instruction_vldmdb): Likewise.
678 (stm32l4xx_create_replacing_stub_vldm): is_dp detects DP encoding,
679 uses it to re-encode.
680
73597c18
NC
6812016-05-09 Nick Clifton <nickc@redhat.com>
682
683 PR 19938
684 * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Revert accidental
685 commit.
686
ae1bb197
AM
6872016-05-09 Alan Modra <amodra@gmail.com>
688
689 * elf64-ppc.c (ppc64_elf_init_stub_bfd): Remove redundant NULL check.
690
97196564
L
6912016-05-06 H.J. Lu <hongjiu.lu@intel.com>
692
693 PR ld/17550
694 * elf-bfd.h (elf_link_hash_entry): Update comments for indx,
695 documenting that indx == -3 if symbol is defined in a discarded
696 section.
697 * elflink.c (elf_link_add_object_symbols): Set indx to -3 if
698 symbol is defined in a discarded section.
699 (elf_link_output_extsym): Strip a global symbol defined in a
700 discarded section.
701
030e823c
L
7022016-05-06 H.J. Lu <hongjiu.lu@intel.com>
703
704 * elf32-i386.c (elf_backend_add_symbol_hook): Defined for Intel
705 MCU.
706
c175a657
L
7072016-05-05 H.J. Lu <hongjiu.lu@intel.com>
708
709 * elf32-i386.c (elf_i386_convert_load): Extract the GOT load
710 conversion to ...
711 (elf_i386_convert_load_reloc): This. New function.
712 * elf64-x86-64.c (elf_x86_64_convert_load): Extract the GOT load
713 conversion to ...
714 (elf_x86_64_convert_load_reloc): This. New function.
715
bedfd056
L
7162016-05-05 H.J. Lu <hongjiu.lu@intel.com>
717
718 * elf32-i386.c (elf_i386_check_tls_transition): Remove abfd.
719 Don't check if contents == NULL.
720 (elf_i386_tls_transition): Add from_relocate_section. Check
721 from_relocate_section instead of contents != NULL. Update
722 elf_i386_check_tls_transition call.
723 (elf_i386_check_relocs): Cache the section contents if
724 keep_memory is FALSE. Pass FALSE as from_relocate_section to
725 elf_i386_tls_transition.
726 (elf_i386_relocate_section): Pass TRUE as from_relocate_section
727 to elf_i386_tls_transition.
728 (elf_backend_caches_rawsize): New.
729 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Don't check
730 if contents == NULL.
731 (elf_x86_64_tls_transition): Add from_relocate_section. Check
732 from_relocate_section instead of contents != NULL.
733 (elf_x86_64_check_relocs): Cache the section contents if
734 keep_memory is FALSE. Pass FALSE as from_relocate_section to
735 elf_x86_64_tls_transition.
736 (elf_x86_64_relocate_section): Pass TRUE as from_relocate_section
737 to elf_x86_64_tls_transition.
738 (elf_backend_caches_rawsize): New.
739
6d6a648c
MR
7402016-05-03 Maciej W. Rozycki <macro@imgtec.com>
741
742 PR 10549
743 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Handle
744 STB_GNU_UNIQUE.
745
1f56df9d
JW
7462016-05-03 Jiong Wang <jiong.wang@arm.com>
747
748 * bfd-in.h (bfd_elf64_aarch64_set_options): Update prototype.
749 * bfd-in2.h (bfd_elf64_aarch64_set_options): Likewise.
750 * elfnn-aarch64.c (bfd_elfNN_aarch64_set_options): Initialize
751 no_apply_dynamic_relocs.
752 (elfNN_aarch64_final_link_relocate): Apply absolute relocations even though
753 dynamic relocations generated.
754
493f652c
L
7552016-04-29 H.J. Lu <hongjiu.lu@intel.com>
756
757 * elf32-i386.c (elf_i386_size_dynamic_sections): Move interp
758 setting to ...
759 (elf_i386_create_dynamic_sections): Here.
760 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Move
761 interp setting to ...
762 (elf_x86_64_create_dynamic_sections): Here.
763
e62b9723
L
7642016-04-29 H.J. Lu <hongjiu.lu@intel.com>
765
766 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take GOT_RELOC
767 and replace (EH)->has_got_reloc with GOT_RELOC.
768 (elf_i386_fixup_symbol): Pass has_got_reloc to
769 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
770 (elf_i386_allocate_dynrelocs): Likewise.
771 (elf_i386_relocate_section): Likewise.
772 (elf_i386_finish_dynamic_symbol): Likewise.
773 (elf_i386_convert_load): Pass TRUE to
774 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
775 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take
776 GOT_RELOC and replace (EH)->has_got_reloc with GOT_RELOC.
777 (elf_x86_64_fixup_symbol): Pass has_got_reloc to
778 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
779 (elf_x86_64_allocate_dynrelocs): Likewise.
780 (elf_x86_64_relocate_section): Likewise.
781 (elf_x86_64_finish_dynamic_symbol): Likewise.
782 (elf_x86_64_convert_load): Pass TRUE to
783 UNDEFINED_WEAK_RESOLVED_TO_ZERO.
784
c337a162
L
7852016-04-29 H.J. Lu <hongjiu.lu@intel.com>
786
787 * elf32-i386.c (check_relocs_failed): New.
788 (elf_i386_check_relocs): Set check_relocs_failed on error.
789 (elf_i386_relocate_section): Skip if check_relocs failed.
790
afd9acee
L
7912016-04-29 H.J. Lu <hongjiu.lu@intel.com>
792
793 * elf64-x86-64.c (elf_x86_64_check_relocs): Set
794 check_relocs_failed on error.
795
5522f910
NC
7962016-04-29 Nick Clifton <nickc@redhat.com>
797
798 PR 19938
799 * elf-bfd.h (struct elf_backend_data): Rename
800 elf_backend_set_special_section_info_and_link to
801 elf_backend_copy_special_section_fields.
802 * elfxx-target.h: Likewise.
803 * elf.c (section_match): Ignore the SHF_INFO_LINK flag when
804 comparing section flags.
805 (copy_special_section_fields): New function.
806 (_bfd_elf_copy_private_bfd_data): Copy the EI_ABIVERSION field.
807 Perform two scans over special sections. The first one looks for
808 a direct mapping between the output section and an input section.
809 The second scan looks for a possible match based upon section
810 characteristics.
811 * elf32-arm.c (elf32_arm_copy_special_section_fields): New
812 function. Handle setting the sh_link field of SHT_ARM_EXIDX
813 sections.
814 * elf32-i386.c (elf32_i386_set_special_info_link): Rename to
815 elf32_i386_copy_solaris_special_section_fields.
816 * elf32-sparc.c (elf32_sparc_set_special_section_info_link):
817 Rename to elf32_sparc_copy_solaris_special_section_fields.
818 * elf64-x86-64.c (elf64_x86_64_set_special_info_link): Rename to
819 elf64_x86_64_copy_solaris_special_section_fields.
820
786a118c
NC
8212016-04-28 Nick Clifton <nickc@redhat.com>
822
823 * po/zh_CN.po: Updated Chinese (simplified) translation.
824
91f8bf69
L
8252016-04-27 H.J. Lu <hongjiu.lu@intel.com>
826
827 PR ld/20006
828 * elf64-x86-64.c (elf_x86_64_convert_load): Skip debug sections
829 when estimating distances between output sections.
830
a6a4679f
AM
8312016-04-27 Alan Modra <amodra@gmail.com>
832
833 * elflink.c (_bfd_elf_is_start_stop): New function.
834 (_bfd_elf_gc_mark_rsec): Use it.
835 * elf-bfd.h (_bfd_elf_is_start_stop): Declare.
836
28cc9170
TS
8372016-04-26 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
838
839 * elf32-rx.c (rx_set_section_contents): Avoid arithmetic on void *.
840 * mmo.c (mmo_get_section_contents): Likewise.
841 (mmo_set_section_contents): Likewise.
842
d5486c43
L
8432016-04-26 H.J. Lu <hongjiu.lu@intel.com>
844
845 * elf-bfd.h (elf_link_hash_table): Update comments for
846 dynsymcount.
847 * elflink.c (_bfd_elf_link_renumber_dynsyms): Always count for
848 the unused NULL entry at the head of dynamic symbol table.
849 (bfd_elf_size_dynsym_hash_dynstr): Remove dynsymcount != 0
850 checks.
851
6645479e
L
8522016-04-21 H.J. Lu <hongjiu.lu@intel.com>
853
854 * elflink.c (_bfd_elf_link_create_dynstrtab): Exclude linker
855 created file from dynobj.
856
6cd255ca
L
8572016-04-21 H.J. Lu <hongjiu.lu@intel.com>
858
859 * elflink.c (_bfd_elf_link_create_dynstrtab): Set dynobj to a
860 normal input file if possible.
861
4f3b23b3
NC
8622016-04-21 Nick Clifton <nickc@redhat.com>
863
864 * aout-adobe.c: Use _bfd_generic_link_check_relocs.
865 * aout-target.h: Likewise.
866 * aout-tic30.c: Likewise.
867 * binary.c: Likewise.
868 * bout.c: Likewise.
869 * coff-alpha.c: Likewise.
870 * coff-rs6000.c: Likewise.
871 * coff64-rs6000.c: Likewise.
872 * coffcode.h: Likewise.
873 * i386msdos.c: Likewise.
874 * i386os9k.c: Likewise.
875 * ieee.c: Likewise.
876 * ihex.c: Likewise.
877 * libbfd-in.h: Likewise.
878 * libecoff.h: Likewise.
879 * mach-o-target.c: Likewise.
880 * mmo.c: Likewise.
881 * nlm-target.h: Likewise.
882 * oasys.c: Likewise.
883 * pef.c: Likewise.
884 * plugin.c: Likewise.
885 * ppcboot.c: Likewise.
886 * som.c: Likewise.
887 * srec.c: Likewise.
888 * tekhex.c: Likewise.
889 * versados.c: Likewise.
890 * vms-alpha.c: Likewise.
891 * xsym.c: Likewise.
892 * elfxx-target.h: Use _bfd_elf_link_check_relocs.
893 * linker.c (bfd_link_check_relocs): New function.
894 (_bfd_generic_link_check_relocs): New function.
895 * targets.c (BFD_JUMP_TABLE_LINK): Add initialization of
896 _bfd_link_check_relocs field.
897 (struct bfd_target)L Add _bfd_link_check_relocs field.
898 * bfd-in2.h: Regenerate.
899 * libbfd.h: Regenerate.
900
e66cdd68
L
9012016-04-20 H.J. Lu <hongjiu.lu@intel.com>
902
903 * elf32-i386.c (elf_i386_gc_sweep_hook): Removed.
904 (elf_backend_gc_sweep_hook): Likewise.
905 * elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise.
906 (elf_backend_gc_sweep_hook): Likewise.
907
5ce03cea
L
9082016-04-20 H.J. Lu <hongjiu.lu@intel.com>
909
910 * elflink.c (_bfd_elf_link_check_relocs): Don't check relocations
911 in excluded sections
912
338c190a
L
9132016-04-20 H.J. Lu <hongjiu.lu@intel.com>
914
915 PR ld/19969
916 * elf64-x86-64.c (check_relocs_failed): New.
917 (elf_x86_64_need_pic): Moved before elf_x86_64_check_relocs.
918 Support relocation agaist local symbol. Set check_relocs_failed.
919 (elf_x86_64_check_relocs): Use elf_x86_64_need_pic. Check
920 R_X86_64_32 relocation overflow.
921 (elf_x86_64_relocate_section): Skip if check_relocs failed.
922 Update one elf_x86_64_need_pic and remove one elf_x86_64_need_pic.
923
466ee2af
L
9242016-04-20 H.J. Lu <hongjiu.lu@intel.com>
925
926 * elf32-i386.c (elf_i386_check_relocs): Call
927 _bfd_elf_create_ifunc_sections only for STT_GNU_IFUNC symbol.
928 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
929
d9689752
L
9302016-04-20 H.J. Lu <hongjiu.lu@intel.com>
931
932 * elf-bfd.h (_bfd_elf_link_check_relocs): New.
933 * elflink.c (_bfd_elf_link_check_relocs): New function.
934 (elf_link_add_object_symbols): Call _bfd_elf_link_check_relocs
935 if check_relocs_after_open_input is FALSE.
936
e6c7cdec
TS
9372016-04-20 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
938
939 * cache.c: Update old style function definitions.
940 * elf32-m68k.c: Likewise.
941 * elf64-mmix.c: Likewise.
942 * stab-syms.c: Likewise.
943
b98e6871
TS
9442016-04-20 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
945
946 * elf32-arm.c (put_thumb2_insn): Change argument type to bfd_byte *.
947
6fd8e7c2
L
9482016-04-15 H.J. Lu <hongjiu.lu@intel.com>
949
950 * Makefile.in: Regenerated with automake 1.11.6.
951 * aclocal.m4: Likewise.
952 * doc/Makefile.in: Likewise.
953
4b0c052e
AB
9542016-04-14 Andrew Burgess <andrew.burgess@embecosm.com>
955
956 * reloc.c: Add BFD_RELOC_ARC_NPS_CMEM16 entry.
957 * bfd-in2.h: Regenerate.
958 * libbfd.h: Regenerate.
959 * elf32-arc.c: Add 'opcode/arc.h' include.
960 (struct arc_relocation_data): Add symbol_name.
961 (arc_special_overflow_checks): New function.
962 (arc_do_relocation): Use arc_special_overflow_checks, reindent as
963 required, add an extra comment.
964 (elf_arc_relocate_section): Setup symbol_name in reloc_data.
965
33cbe6c0
AB
9662016-04-14 Andrew Burgess <andrew.burgess@embecosm.com>
967
968 * elf32-arc.c (tls_got_entries): Add 'TLS_GOT_' prefix to all
969 entries.
970 (elf_arc_relocate_section): Update enum uses.
971 (elf_arc_check_relocs): Likewise.
972 (elf_arc_finish_dynamic_symbol): Likewise.
973
7634c4e6
L
9742016-04-14 H.J. Lu <hongjiu.lu@intel.com>
975
976 * elf.c (_bfd_elf_copy_private_bfd_data): Replace "link" with
977 "sh_link".
978
84865015
NC
9792016-04-14 Nick Clifton <nickc@redhat.com>
980
981 PR target/19938
982 * elf-bbfd.h (struct elf_backend_data): New field:
983 elf_strtab_flags.
984 New field: elf_backend_set_special_section_info_and_link
985 * elfxx-target.h (elf_backend_strtab_flags): Define if not already
986 defined.
987 (elf_backend_set_special_section_info_and_link): Define if not
988 already defined.
989 (elfNN_bed): Use elf_backend_set_special_section_info_and_link and
990 elf_backend_strtab_flags macros to initialise fields in structure.
991 * elf.c (_bfd_elf_make_section_from_shdr): Check for SHF_STRINGS
992 being set even if SHF_MERGE is not set.
993 (elf_fake_sections): Likewise.
994 (section_match): New function. Matches two ELF sections based
995 upon fixed characteristics.
996 (find_link): New function. Locates a section in a BFD that
997 matches a section in a different BFD.
998 (_bfd_elf_copy_private_bfd_data): Copy the sh_info and sh_link
999 fields of reserved sections.
1000 (bfd_elf_compute_section_file_positions): Set the flags for the
1001 .shstrtab section based upon the elf_strtab_flags field in the
1002 elf_backend_data structure.
1003 (swap_out_syms): Likewise for the .strtab section.
1004 * elflink.c (bfd_elf_final_link): Set the flags for the
1005 .strtab section based upon the elf_strtab_flags field in the
1006 elf_backend_data structure.
1007 * elf32-i386.c (elf32_i386_set_special_info_link): New function.
1008 (elf_backend_strtab_flags): Set to SHF_STRINGS for Solaris
1009 targets.
1010 (elf_backend_set_special_section_info_and_link): Define for
1011 Solaris targets.
1012 * elf32-sparc.c: Likewise.
1013 * elf64-x86-64.c: Likewise.
1014
2df3368d
L
10152016-04-11 H.J. Lu <hongjiu.lu@intel.com>
1016
1017 PR ld/19939
1018 * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): Add a pointer
1019 to bfd_boolean.
1020 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Updated.
1021 Set *readonly_dynrelocs_against_ifunc_p to TRUE if dynamic reloc
1022 applies to read-only section.
1023 * elf32-i386.c (elf_i386_link_hash_table): Add
1024 readonly_dynrelocs_against_ifunc.
1025 (elf_i386_allocate_dynrelocs): Updated.
1026 (elf_i386_size_dynamic_sections): Issue an error for read-only
1027 segment with dynamic IFUNC relocations only if
1028 readonly_dynrelocs_against_ifunc is TRUE.
1029 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
1030 readonly_dynrelocs_against_ifunc.
1031 (elf_x86_64_allocate_dynrelocs): Updated.
1032 (elf_x86_64_size_dynamic_sections): Issue an error for read-only
1033 segment with dynamic IFUNC relocations only if
1034 readonly_dynrelocs_against_ifunc is TRUE.
1035 * elfnn-aarch64.c (elfNN_aarch64_allocate_ifunc_dynrelocs):
1036 Updated.
1037
15dd01b1
TP
10382016-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
1039
1040 * elf32-arm.c (elf32_arm_size_stubs): Move error_ret_free_local to be
1041 a fall through from error_ret_free_internal. Free local_syms in
1042 error_ret_free_local if allocated from bfd_elf_get_elf_syms ().
1043
1e5885b7
CZ
10442016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
1045
1046 * elf32-arc.c (plt_do_relocs_for_symbol): Changed.
1047 (relocate_plt_for_entry): Likewise.
1048
b3aee839
CZ
10492016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
1050
1051 * elf32-arc.c (elf_arc_check_relocs): Changed
1052
094fb063
CZ
10532016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
1054
1055 * elf32-arc.c (name_for_global_symbol): Changed assert.
1056 (get_replace_function): Created.:
1057 (struct arc_relocation_data): Changed to signed types.
1058 (defines S, L, P, PDATA): Casted to signed type.
1059 (defines SECTSTART, _SDA_BASE_, TLS_REL): Likewise.
1060 (PRINT_DEBUG_RELOC_INFO_BEFORE): Changed.
1061 (arc_do_relocation): Changed.
1062
94e5c971
CZ
10632016-04-05 Cupertino Miranda <cmiranda@synopsys.com>
1064
1065 * elf32-arc.c (name_for_global_symbol): Added assert to check for
1066 symbol index.
1067 (elf_arc_relocate_section): Added and changed asserts, validating
1068 the synamic symbol index.
1069 (elf_arc_finish_dynamic_symbol): Do not fill the dynamic
1070 relocation if symbol has dynindx set to -1.
1071
1f599d0e
MR
10722016-04-05 Maciej W. Rozycki <macro@imgtec.com>
1073
1074 * elflink.c (elf_link_add_object_symbols): Always turn hidden
1075 and internal symbols which have a dynamic index into local
1076 ones.
1077
67f101ee
NC
10782016-04-04 Nick Clifton <nickc@redhat.com>
1079
1080 PR 19872
1081 * dwarf2.c (parse_comp_unit): Skip warning about unrecognised
1082 version number if the version is zero.
1083
7b15fa7a
AM
10842016-04-01 Alan Modra <amodra@gmail.com>
1085
1086 PR 19886
1087 * elflink.c (on_needed_list): Recursively check needed status.
1088 (elf_link_add_object_symbols): Adjust.
1089
024ea11b
SKS
10902016-03-30 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1091
1092 * elf32-avr.c (avr_elf32_load_records_from_section): Free
1093 internal_relocs only if they aren't cached.
1094
ed3056eb
NC
10952016-03-29 Nick Clifton <nickc@redhat.com>
1096
1097 PR 17334
1098 * elf32-bfin.c (elf32_bfinfdpic_finish_dynamic_sections): Relax
1099 assertion on the size of the got section to allow it to be bigger
1100 than the number of relocs.
1101
e2b4fc91
TS
11022016-03-29 Toni Spets <toni.spets@iki.fi>
1103
1104 PR 19878
1105 * coffcode.h (coff_write_object_contents): Revert accidental
1106 2014-11-10 change.
1107
a97fbc7e
AM
11082016-03-22 Alan Modra <amodra@gmail.com>
1109
1110 PR 19850
1111 * dwarf2.c (read_attribute_value): Skip info_ptr check for
1112 DW_FORM_flag_present.
1113
9780e045
NC
11142016-03-22 Nick Clifton <nickc@redhat.com>
1115
96254e5c
NC
1116 * cpu-v850_rh850.c (arch_info_struct): Restore v850-rh850 as an
1117 architecture name for backwards compatibility.
1118
7769fa97
NC
1119 * peXXigen.c (_bfd_XXi_write_codeview_record): Fix possible
1120 unbounded stack use.
1121
9780e045
NC
1122 * warning.m4 (GCC_WARN_CFLAGS): Only add -Wstack-usage if using a
1123 sufficiently recent version of GCC.
1124 * configure: Regenerate.
1125
6f4c0a42
AM
11262016-03-22 Alan Modra <amodra@gmail.com>
1127
1128 PR 19851
1129 * plugin.c (try_load_plugin): Avoid -Wstack-usage warning.
1130
8699fc3e
AB
11312016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
1132
1133 * archures.c (bfd_mach_arc_nps400): Define.
1134 * bfd-in2.h: Regenerate.
1135 * cpu-arc.c (arch_info_struct): New entry for nps400, renumber
1136 some existing entries to make space.
1137 * elf32-arc.c (arc_elf_object_p): Add nps400 case.
1138 (arc_elf_final_write_processing): Likewise.
1139
a9522a21
AB
11402016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
1141
1142 * elf32-arc.c (arc_elf_print_private_bfd_data): Remove use of
1143 EF_ARC_CPU_GENERIC.
1144 (arc_elf_final_write_processing): Don't bother setting cpu field
1145 in e_flags, this will have been set elsewhere.
1146
c0334580
AB
11472016-03-21 Andrew Burgess <andrew.burgess@embecosm.com>
1148
1149 * elf32-arc.c (arc_elf_final_write_processing): Switch to using
1150 EF_ARC_MACH_MSK.
1151
e1fa0163
NC
11522016-03-21 Nick Clifton <nickc@redhat.com>
1153
1154 * warning.m4 (GCC_WARN_CFLAGS): Add -Wstack-usage=262144
1155 * configure: Regenerate.
1156 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Replace use of
1157 alloca with call to xmalloc.
1158 * elf32-nds32.c: Likewise.
1159 * elf64-hppa.c: Likewise.
1160 * elfxx-mips.c: Likewise.
1161 * pef.c: Likewise.
1162 * pei-x86_64.c: Likewise.
1163 * som.c: Likewise.
1164 * xsym.c: Likewise.
1165
4e0c91e4
L
11662016-03-15 H.J. Lu <hongjiu.lu@intel.com>
1167
1168 PR ld/19827
1169 * elf32-i386.c (elf_i386_check_relocs): Bind defined symbol
1170 locally in PIE.
1171 (elf_i386_relocate_section): Likewise.
1172 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1173 (elf_x86_64_relocate_section): Likewise.
1174
4c10bbaa
L
11752016-03-15 H.J. Lu <hongjiu.lu@intel.com>
1176
1177 PR ld/19807
1178 * elf64-x86-64.c (elf_x86_64_relocate_section): Check
1179 no_reloc_overflow_check to diable R_X86_64_32/R_X86_64_32S
1180 relocation overflow check.
1181
fbe48798
L
11822016-03-14 H.J. Lu <hongjiu.lu@intel.com>
1183
1184 * bfd-in2.h: Regenerated.
1185
37b01f6a
DG
11862016-03-11 Dan Gissel <dgisselq@ieee.org>
1187
1188 PR 19713
1189 * elf.c (_bfd_elf_section_offset): Ensure that the returned offset
1190 uses bytes not octets.
1191 * elflink.c (resolve_section): Likewise.
1192 Add a bfd parameter.
1193 (eval_section): Pass the input_bfd to resolve_section.
1194 (bfd_elf_perform_complex_relocation): Convert byte offset to
1195 octets before read and writing values.
1196 (elf_link_input_bfd): Add byte to octet conversions.
1197 (elf_reloc_link_order): Likewise.
1198 (elf_fixup_link_order): Likewise.
1199 (bfd_elf_final_link): Likewise.
1200 * reloc.c (_bfd_final_link_relocate): Likewise.
1201 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
1202
3ed4ff97
NC
12032016-03-10 Nick Clifton <nickc@redhat.com>
1204
1205 * config.bfd: Mark the i370 target as obsolete.
1206
4b05e0a7
PA
12072016-03-09 Pedro Alves <palves@redhat.com>
1208
1209 * cpu-v850.c (N): Append ":old-gcc-abi" instead of " (using old
1210 gcc ABI)" to printable name.
1211 * cpu-v850_rh850.c (bfd_v850_rh850_arch): Use "v850:rh850" instead
1212 of "v850-rh850" as printable name.
1213
26c62da0
LW
12142016-03-09 Leon Winter <winter-gcc@bfw-online.de>
1215
1216 PR ld/19623
1217 * cofflink.c (_bfd_coff_generic_relocate_section): Do not apply
1218 relocations against absolute symbols.
1219
03ee8583
AM
12202016-03-09 Alan Modra <amodra@gmail.com>
1221
1222 PR binutils/19775
1223 * coff-alpha.c (alpha_ecoff_openr_next_archived_file): Allow zero
1224 length elements in the archive.
1225
9c1d7a08
L
12262016-03-08 H.J. Lu <hongjiu.lu@intel.com>
1227
1228 PR ld/19789
1229 * elflink.c (elf_link_add_object_symbols): Create dynamic sections
1230 for -E/--dynamic-list only when not relocatable.
1231
d1ed1c7d
L
12322016-03-08 H.J. Lu <hongjiu.lu@intel.com>
1233
1234 PR ld/19784
1235 * elf32-i386.c (elf_i386_check_relocs): Increment PLT reference
1236 count for locally defined local IFUNC symbols in shared object.
1237 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1238
202ac193
L
12392016-03-08 H.J. Lu <hongjiu.lu@intel.com>
1240
1241 PR ld/19579
1242 * elflink.c (_bfd_elf_merge_symbol): Group common symbol checking
1243 together.
1244
72f3b6aa
CZ
12452016-03-08 Cupertino Miranda <Cupertino.Miranda@synopsys.com>
1246 Andrew Burgess <andrew.burgess@embecosm.com>
1247
1248 * elf32-arc.c (arc_bfd_get_32): Becomes an alias for bfd_get_32.
1249 (arc_bfd_put_32): Becomes an alias for bfd_put_32.
1250 (arc_elf_howto_init): Added assert to validate relocations.
1251 (get_middle_endian_relocation): Delete.
1252 (middle_endian_convert): New function.
1253 (ME): Redefine, now does nothing.
1254 (IS_ME): New define.
1255 (arc_do_relocation): Extend the attached 'ARC_RELOC_HOWTO'
1256 definition to call middle_endian_convert. Add a new local
1257 variable and make use of this throughout. Added call to
1258 arc_bfd_get_8 and arc_bfd_put_8 for 8 bit relocations.
1259
4fc87424
NC
12602016-03-07 Nick Clifton <nickc@redhat.com>
1261
1262 PR binutils/19775
1263 * archive.c (bfd_generic_openr_next_archived_file): Allow zero
1264 length elements in the archive.
1265
18f822a0
JW
12662016-03-07 Jiong Wang <jiong.wang@arm.com>
1267
1268 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Always create .got
1269 section if the symbol "_GLOBAL_OFFSET_TABLE_" is referenced.
1270
07492f66
L
12712016-03-04 H.J. Lu <hongjiu.lu@intel.com>
1272
1273 PR ld/19579
1274 * elflink.c (_bfd_elf_merge_symbol): Treat common symbol in
1275 executable as definition if the new definition comes from a
1276 shared library.
1277
70a5df4f
AM
12782016-03-02 Alan Modra <amodra@gmail.com>
1279
1280 * Makefile.in: Regenerate.
1281 * po/SRC-POTFILES.in: Regenerate.
1282
841fdfcd
CZ
12832016-02-29 Cupertino Miranda <cmiranda@synopsys.com>
1284
1285 * elf32-arc.c (elf_arc_relocate_section): Added rules to fix the
1286 relocation addend when sections get merged.
1287
7e458899
CZ
12882016-02-29 Cupertino Miranda <Cupertino.Miranda@synopsys.com>
1289
1290 * elf32-arc.c (arc_elf_final_write_processing): Add condition to
1291 the flag change.
1292 (elf_arc_relocate_section): Fixes and conditions to support PIE.
1293 Assert for code sections dynamic relocs.
1294
c5e3a364
RL
12952016-02-26 Renlin Li <renlin.li@arm.com>
1296
1297 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix signed overflow
1298 check for MOVW_SABS_G0, MOVW_SABS_G1, MOVW_SABS_G2.
1299
bae420ef
L
13002016-02-26 H.J. Lu <hongjiu.lu@intel.com>
1301
1302 PR ld/19609
1303 * elf32-i386.c (elf_i386_convert_load): Convert to R_386_32 for
1304 load with locally bound symbols if PIC is false or there is no
1305 base register. Optimize branch to 0 if PIC is false.
1306 (elf_i386_relocate_section): Don't generate dynamic relocations
1307 against undefined weak symbols if PIC is false.
1308 * elf64-x86-64.c (elf_x86_64_convert_load): Disable optimization
1309 if we can't estimate relocation overflow with --no-relax.
1310 Convert to R_X86_64_32S/R_X86_64_32 for load with locally bound
1311 symbols if PIC is false. Optimize branch to 0 if PIC is false.
1312 (elf_x86_64_relocate_section): Don't generate dynamic relocations
1313 against undefined weak symbols if PIC is false.
1314
11e5f1ec
L
13152016-02-26 H.J. Lu <hongjiu.lu@intel.com>
1316
1317 PR ld/19645
1318 * bfd.c (bfd): Change flags to 20 bits.
1319 (BFD_CONVERT_ELF_COMMON): New.
1320 (BFD_USE_ELF_STT_COMMON): Likewise.
1321 (BFD_FLAGS_SAVED): Add BFD_CONVERT_ELF_COMMON and
1322 BFD_USE_ELF_STT_COMMON.
1323 (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
1324 * configure.ac: Remove --enable-elf-stt-common.
1325 * elf.c (swap_out_syms): Choose STT_COMMON or STT_OBJECT for
1326 common symbol depending on BFD_CONVERT_ELF_COMMON and
1327 BFD_USE_ELF_STT_COMMON.
1328 * elfcode.h (elf_slurp_symbol_table): Set BSF_ELF_COMMON for
1329 STT_COMMON.
1330 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Also check
1331 STT_COMMON.
1332 (elf_link_convert_common_type): New function.
1333 (elf_link_output_extsym): Choose STT_COMMON or STT_OBJECT for
1334 common symbol depending on BFD_CONVERT_ELF_COMMON and
1335 BFD_USE_ELF_STT_COMMON. Set sym.st_info after sym.st_shndx.
1336 * elfxx-target.h (TARGET_BIG_SYM): Add BFD_CONVERT_ELF_COMMON
1337 and BFD_USE_ELF_STT_COMMON to object_flags.
1338 (TARGET_LITTLE_SYM): Likewise.
1339 * syms.c (BSF_KEEP_G): Renamed to ...
1340 (BSF_ELF_COMMON): This.
1341 * bfd-in2.h: Regenerated.
1342 * config.in: Likewise.
1343 * configure: Likewise.
1344
aec6b87e
L
13452016-02-26 H.J. Lu <hongjiu.lu@intel.com>
1346
1347 PR ld/19636
1348 PR ld/19704
1349 PR ld/19719
1350 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
1351 (elf_i386_link_hash_entry): Add has_got_reloc and
1352 has_non_got_reloc.
1353 (elf_i386_link_hash_table): Add interp.
1354 (elf_i386_link_hash_newfunc): Initialize has_got_reloc and
1355 has_non_got_reloc.
1356 (elf_i386_copy_indirect_symbol): Copy has_got_reloc and
1357 has_non_got_reloc.
1358 (elf_i386_check_relocs): Set has_got_reloc and has_non_got_reloc.
1359 (elf_i386_fixup_symbol): New function.
1360 (elf_i386_pie_finish_undefweak_symbol): Likewise.
1361 (elf_i386_allocate_dynrelocs): Don't allocate space for dynamic
1362 relocations and discard relocations against resolved undefined
1363 weak symbols in executable. Don't make resolved undefined weak
1364 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
1365 relocation against undefined weak symbols in PIE.
1366 (elf_i386_size_dynamic_sections): Set interp to .interp section.
1367 (elf_i386_relocate_section): Don't generate dynamic relocations
1368 against resolved undefined weak symbols in PIE, except for
1369 R_386_PC32.
1370 (elf_i386_finish_dynamic_symbol): Keep PLT/GOT entries without
1371 dynamic PLT/GOT relocations for resolved undefined weak symbols.
1372 Don't generate dynamic relocation against resolved undefined weak
1373 symbol in executable.
1374 (elf_i386_finish_dynamic_sections): Call
1375 elf_i386_pie_finish_undefweak_symbol on all symbols in PIE.
1376 (elf_backend_fixup_symbol): New.
1377 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
1378 (elf_x86_64_link_hash_entry): Add has_got_reloc and
1379 has_non_got_reloc.
1380 (elf_x86_64_link_hash_table): Add interp.
1381 (elf_x86_64_link_hash_newfunc): Initialize has_got_reloc and
1382 has_non_got_reloc.
1383 (elf_x86_64_copy_indirect_symbol): Copy has_got_reloc and
1384 has_non_got_reloc.
1385 (elf_x86_64_check_relocs): Set has_got_reloc and
1386 has_non_got_reloc.
1387 (elf_x86_64_fixup_symbol): New function.
1388 (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
1389 (elf_x86_64_allocate_dynrelocs): Don't allocate space for dynamic
1390 relocations and discard relocations against resolved undefined
1391 weak symbols in executable. Don't make resolved undefined weak
1392 symbols in executable dynamic.
1393 (elf_x86_64_size_dynamic_sections): Set interp to .interp section.
1394 (elf_x86_64_relocate_section): Check relocation overflow for
1395 dynamic relocations against unresolved weak undefined symbols.
1396 Don't generate dynamic relocations against resolved weak
1397 undefined symbols in PIE.
1398 (elf_x86_64_finish_dynamic_symbol): Keep PLT/GOT entries without
1399 dynamic PLT/GOT relocations for resolved undefined weak symbols.
1400 Don't generate dynamic relocation against resolved undefined weak
1401 symbol in executable.
1402 (elf_x86_64_finish_dynamic_sections): Call
1403 elf_x86_64_pie_finish_undefweak_symbol on all symbols in PIE.
1404 (elf_backend_fixup_symbol): New.
1405
b32547cd
AM
14062016-02-26 Alan Modra <amodra@gmail.com>
1407
1408 * elf64-ppc.c (create_linkage_sections): Create sfpr when
1409 save_restore_funcs, rest of sections when not relocatable.
1410 (ppc64_elf_init_stub_bfd): Always call create_linkage_sections.
1411 (sfpr_define): Define all symbols on emitted code.
1412 (ppc64_elf_func_desc_adjust): Adjust for sfpr now being created
1413 when relocatable. Move sfpr_define loop earlier.
1414
ef77d6af
L
14152016-02-24 H.J. Lu <hongjiu.lu@intel.com>
1416
1417 * elf64-x86-64.c (elf_x86_64_need_pic): New function.
1418 (elf_x86_64_relocate_section): Use it. Replace
1419 x86_64_elf_howto_table[r_type] with howto.
1420
0f550b3d
L
14212016-02-24 H.J. Lu <hongjiu.lu@intel.com>
1422
1423 PR ld/19698
1424 * elflink.c (bfd_elf_record_link_assignment): Set versioned if
1425 symbol version is unknown.
1426
13f42277
L
14272016-02-24 H.J. Lu <hongjiu.lu@intel.com>
1428
1429 * elf32-i386.c (elf_i386_allocate_dynrelocs): Set plt_got.offset
1430 to (bfd_vma) -1 when setting needs_plt to 0.
1431 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
1432
6b3b0ab8
L
14332016-02-23 H.J. Lu <hongjiu.lu@intel.com>
1434
1435 * elflink.c (bfd_elf_record_link_assignment): Check for shared
1436 library, instead of PIC, and don't check PDE when making linker
1437 assigned symbol dynamic.
1438
17733f5b
FS
14392016-02-23 Faraz Shahbazker <faraz.shahbazker@imgtec.com>
1440
1441 * bfd/elfxx-mips.c (_bfd_mips_post_process_headers): Increment
1442 ABIVERSION for non-executable stack.
1443
47993b4a
RF
14442016-02-23 Rich Felker <bugdal@aerifal.cx>
1445
1446 PR target/19516
1447 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol):
1448 Always produce a RELATIVE reloc for a local symbol.
1449
2d8dcb81
HPN
14502016-02-23 Hans-Peter Nilsson <hp@axis.com>
1451
1452 Fix test-case ld-elf/pr19617b
1453 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
1454 discard unused non-function symbols when --dynamic-list-data.
1455
1a6e6083
L
14562016-02-22 H.J. Lu <hongjiu.lu@intel.com>
1457
1458 * elflink.c (_bfd_elf_link_renumber_dynsyms): Always create the
1459 dynsym section, even if it is empty, with dynamic sections.
1460
75c1920b
L
14612016-02-22 H.J. Lu <hongjiu.lu@intel.com>
1462
1463 * syms.c: Remove BSF_COMMON from comments.
1464 * bfd-in2.h: Regenerated.
1465
9a228467
JW
14662016-02-22 Jiong Wang <jiong.wang@arm.com>
1467
1468 * elfnn-aarch64. (aarch64_type_of_stub): Remove redundation calcuation
1469 for destination. Remove useless function parameters.
1470 (elfNN_aarch64_size_stubs): Update parameters for aarch64_type_of_stub.
1471
73768414
NC
14722016-02-19 Nick Clifton <nickc@redhat.com>
1473
e517df3d
NC
1474 PR ld/19629
1475 * aoutx.h (aout_link_add_symbols): Check for out of range string
1476 table offsets.
1477
73768414
NC
1478 PR ld/19628
1479 * reloc.c (bfd_generic_get_relocated_section_contents): Stop
1480 processing if we encounter a reloc without an associated symbol.
1481
bf89386a
L
14822016-02-18 H.J. Lu <hongjiu.lu@intel.com>
1483
1484 PR ld/19617
1485 * elflink.c (elf_link_add_object_symbols): Always create dynamic
1486 sections for -E/--dynamic-list.
1487
8f79b794
L
14882016-02-17 H.J. Lu <hongjiu.lu@intel.com>
1489
1490 * elf64-x86-64.c (elf_backend_omit_section_dynsym): New. Defined
1491 to bfd_true.
1492
64bfc258
JM
14932016-02-16 Joseph Myers <joseph@codesourcery.com>
1494
1495 * plugin.c (plugin_vec): Set match priority to 255.
1496 * format.c (bfd_check_format_matches) [BFD_SUPPORTS_PLUGINS]: When
1497 matching against the plugin vector, take priority from there not
1498 from TEMP.
1499
9fb71ee4
NC
15002016-02-15 Nick Clifton <nickc@redhat.com>
1501
1502 * elf-bfd.h (struct bfd_elf_special_section): Use unsigned values
1503 for length and type fields. Use a signed value for the
1504 suffix_length field.
1505
32875eb1
L
15062016-02-10 H.J. Lu <hongjiu.lu@intel.com>
1507
1508 PR ld/19601
1509 * elf32-i386.c (elf_i386_relocate_section): Mask off the least
1510 significant bit in GOT offset for R_386_GOT32X.
1511
83da6e74
NC
15122016-02-10 Nick Clifton <nickc@redhat.com>
1513
1514 PR 19405
1515 * elf32-nios2.c (nios2_elf32_install_imm16): Allow for signed
1516 immediate values.
1517 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Limit the
1518 number of messages about FDE encoding preventing .eh_frame_hdr
1519 generation.
1520
027e9c75
NC
15212016-02-09 Nick Clifton <nickc@redhat.com>
1522
609332f1
NC
1523 * oasys.c (oasys_archive_p): Fix indentation.
1524 * elf32-nds32.c (nds32_elf_relax_section): Use an unsigned
1525 constant for left shifting.
1526
027e9c75
NC
1527 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Add a more
1528 helpful warning message to explain why certain AArch64 relocs
1529 might overflow.
1530
6f57d046
SM
15312016-02-05 Simon Marchi <simon.marchi@ericsson.com>
1532
1533 * pe-mips.c (coff_mips_reloc): Fix formatting.
1534
bdbca4e6
CM
15352016-02-05 Cupertino Miranda <Cupertino.Miranda@synopsys.com>
1536
1537 * cpu-arc.c: Change default archure from bfd_mach_arc_arcv2
1538 to bfd_mach_arc_arc600.
1539
4f038ee5
AM
15402016-02-04 Alan Modra <amodra@gmail.com>
1541
1542 * elf64-ppc.c (ppc64_elf_relocate_section): Adjust last patch
1543 for big-endian.
1544
4a539596
L
15452016-02-02 H.J. Lu <hongjiu.lu@intel.com>
1546
1547 PR ld/19542
1548 * elf64-x86-64.c (elf_x86_64_convert_load): Store the estimated
fb06f1c0 1549 distances in the compressed_size field of the output section.
4a539596 1550
85fabe71
AM
15512016-02-02 Alan Modra <amodra@gmail.com>
1552
1553 * elf64-ppc.c (ppc64_elf_relocate_section): Further restrict
1554 ELFv2 entry optimization.
1555
14f2c699
L
15562016-02-02 H.J. Lu <hongjiu.lu@intel.com>
1557
1558 PR binutils/19547
1559 * elf.c (assign_section_numbers): Clear HAS_RELOC if there are
1560 no relocations in relocatable files.
1561
aef28989
L
15622016-02-01 H.J. Lu <hongjiu.lu@intel.com>
1563
1564 PR ld/19553
1565 * elflink.c (elf_link_add_object_symbols): Don't add DT_NEEDED
1566 if a symbol from a library loaded via DT_NEEDED doesn't match
1567 the symbol referenced by regular object.
1568
655ed9ea
NS
15692016-02-01 Nathaniel Smith <njs@pobox.com>
1570
1571 * peicode.h (pe_ILF_build_a_bfd): Create an import symbol for both
1572 CODE and DATA.
1573
ec1f73bb
AM
15742016-02-01 Alan Modra <amodra@gmail.com>
1575
1576 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Don't abort on
1577 an out of range reloc_index.
1578 * elf32-i386.c (elf_i386_get_plt_sym_val): Likewise.
1579
b6471e6e
KR
15802016-02-01 Kamil Rytarowski <n54@gmx.com>
1581
1582 * Makefile.am (OPTIONAL_BACKENDS): Add netbsd-core.lo.
1583 (OPTIONAL_BACKENDS_CFILES): Add netbsd-core.c.
1584 * Makefile.in: Regenerated.
1585
0bc7245a
JK
15862016-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
1587
1588 * elf64-s390.c (elf_s390_reloc_name_lookup): Fix indentation.
1589
6d4b2867
JDA
15902016-01-31 John David Anglin <danglin@gcc.gnu.org>
1591
1592 PR ld/19526
1593 * elf32-hppa.c (elf32_hppa_final_link): Don't sort non-regular output
1594 files.
1595 * elf64-hppa.c (elf32_hppa_final_link): Likewise. Remove retval.
1596
d9e3b590
L
15972016-01-30 H.J. Lu <hongjiu.lu@intel.com>
1598
1599 PR ld/19539
1600 * elf32-i386.c (elf_i386_reloc_type_class): Check relocation
1601 against STT_GNU_IFUNC symbol only with dynamic symbols.
1602 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise.
1603
bf150a0b
L
16042016-01-28 H.J. Lu <hongjiu.lu@intel.com>
1605
1606 PR binutils/19523
1607 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Set BFD_DECOMPRESS to
1608 decompress debug sections.
1609
840855c5
MR
16102016-01-25 Maciej W. Rozycki <macro@imgtec.com>
1611
1612 * elf32-arc.c (elf_arc_finish_dynamic_symbol): Rename `index' to
1613 `dynindx'.
1614
cf466c2a
NC
16152016-01-25 Nick Clifton <nickc@redhat.com>
1616
1617 PR target/19435
1618 * mach-o.c (bfd_mach_o_close_and_cleanup): Suppress code to free
1619 dsym filename buffer.
1620
eb6b0cf4
MR
16212016-01-24 Maciej W. Rozycki <macro@imgtec.com>
1622
1623 * elfxx-mips.c (BZ16_REG_FIELD): Simplify calculation.
1624
e67f83e5
MR
16252016-01-24 Maciej W. Rozycki <macro@imgtec.com>
1626
1627 * elfxx-mips.c (BZ16_REG): Correct calculation.
1628
23a42089
NC
16292016-01-21 Nick Clifton <nickc@redhat.com>
1630
1631 * elf32-arc.c (ADD_RELA): Fix compile time warning errors by
1632 changing the type of _loc to be bfd_byte *.
1633 (elf_arc_finish_dynamic_symbol): Likewise.
1634
aebf9be7
NC
16352016-01-21 Nick Clifton <nickc@redhat.com>
1636
1637 PR ld/19455
1638 * elf32-arm.c (elf32_arm_create_dynamic_sections): Set the ELF
1639 class of the linker stub bfd.
1640 (elf32_arm_check_relocs): Skip check for pic format after
1641 processing a vxWorks R_ARM_ABS12 reloc.
1642 * elflink.c (bfd_elf_final_link): Check for ELFCLASSNONE when
1643 reporting a class mismatch.
1644
2f340668
JW
16452016-01-21 Jiong Wang <jiong.wang@arm.com>
1646
1647 * elfnn-aarch64.c (aarch64_type_of_stub): Allow insert long branch
1648 veneer for sym_sec != input_sec.
1649 (elfNN_aarch64_size_stub): Support STT_SECTION symbol.
1650 (elfNN_aarch64_final_link_relocate): Take rela addend into account when
1651 calculation destination.
1652
aeb70569
AM
16532016-01-21 Alan Modra <amodra@gmail.com>
1654
1655 * elf-linux-core.h (swap_linux_prpsinfo32_out): New function.
1656 (swap_linux_prpsinfo64_out): New function.
1657 (LINUX_PRPSINFO32_SWAP_FIELDS): Delete.
1658 (LINUX_PRPSINFO64_SWAP_FIELDS): Delete.
1659 * elf.c (elfcore_write_linux_prpsinfo32): Adjust. Don't memset.
1660 (elfcore_write_linux_prpsinfo64): Likewise.
1661 * elf32-ppc.c (swap_ppc_linux_prpsinfo32_out): New function.
1662 (PPC_LINUX_PRPSINFO32_SWAP_FIELDS): Delete.
1663 (elfcore_write_ppc_linux_prpsinfo32): Adjust. Don't memset.
1664
de64ce13
AM
16652016-01-21 Alan Modra <amodra@gmail.com>
1666
1667 * elf-linux-core.h: Rename from elf-linux-psinfo.h.
1668 * elf.c: Adjust #include.
1669 * elf32-ppc.c: Don't #include elf-linux-psinfo.h
1670 * Makefile.am (SOURCE_HFILES): Update.
1671 * Makefile.in: Regenerate.
1672 * po/SRC-PORFILES.in: Regenerate.
1673
c603b11b
AM
16742016-01-21 Alan Modra <amodra@gmail.com>
1675
1676 * configure.ac: Move corefile selection later in file. Move
1677 tdefaults code immediately after other target vector code.
1678 * configure: Regenerate.
1679
91f68a68
MG
16802016-01-20 Mickael Guene <mickael.guene@st.com>
1681
1682 * elf32-arm.c (elf32_arm_special_sections): Remove catch of noread
1683 section using '.text.noread' pattern.
1684
5b2c414d
JB
16852016-01-19 John Baldwin <jhb@FreeBSD.org>
1686
1687 * elf.c (elfcore_grok_note): Recognize NT_FREEBSD_THRMISC notes.
1688
34e967a5
MC
16892016-01-18 Miranda Cupertino <Cupertino.Miranda@synopsys.com>
1690 Zissulescu Claudiu <Claudiu.Zissulescu@synopsys.com>
1691
1692 * arc-plt.def: New file.
1693 * arc-plt.h: Likewise.
1694 * elf32-arc.c (elf_arc_abs_plt0_entry, elf_arc_abs_pltn_entry,
1695 elf_arcV2_abs_plt0_entry, elf_arcV2_abs_pltn_entry,
1696 elf_arc_pic_plt0_entry, elf_arc_pic_pltn_entry,
1697 elf_arcV2_pic_plt0_entry, elf_arcV2_pic_pltn_entry): Remove.
1698 (name_for_global_symbol): Added.
1699 (ADD_RELA): Helper to create dynamic relocs.
1700 (new_got_entry_to_list): Create a new got entry in linked list.
1701 (symbol_has_entry_of_type): Search for specific type of entry in
1702 list.
1703 (is_reloc_for_GOT): return FALSE for any TLS related relocs.
1704 (is_reloc_for_TLS, arc_elf_set_private_flags)
1705 (arc_elf_print_private_bfd_data, arc_elf_copy_private_bfd_data)
1706 (arc_elf_merge_private_bfd_data): New functions.
1707 (debug_arc_reloc): Cleaned debug info printing.
1708 (PDATA reloc): Changed not to perform address alignment.
1709 (reverse_me): Added. Fix for ARC_32 relocs.
1710 (arc_do_relocation): Return bfd_reloc_of when no relocation should
1711 occur.
1712 (arc_get_local_got_ents): Renamed from arc_get_local_got_offsets.
1713 Changed function to access an array of list of GOT entries instead
1714 of just an array of offsets.
1715 (elf_arc_relocate_section): Added support for PIC and TLS related relocations.
1716 (elf_arc_check_relocs): Likewise.
1717 (elf_arc_adjust_dynamic_symbol, elf_arc_finish_dynamic_symbol,
1718 (elf_arc_finish_dynamic_sections): Likewise
1719 (arc_create_dynamic_sections): Modified conditions to create
1720 dynamic sections.
1721 (ADD_SYMBOL_REF_SEC_AND_RELOC): New macro.
1722 (plt_do_relocs_for_symbol, relocate_plt_for_symbol)
1723 (relocate_plt_for_entry): Changed to support new way to define PLT
1724 related code.
1725 (add_symbol_to_plt): Likewise.
1726 (arc_elf_link_hash_table_create): New function.
1727
9ae678af
NC
17282016-01-18 Nick Clifton <nickc@redhat.com>
1729
1730 PR ld/19440
1731 * coff-rs6000.c (_bfd_xcoff_swap_sym_in): Sign extend external
1732 section number into internal section number.
1733 * coff64-rs6000.c (_bfd_xcoff64_swap_sym_in): Likewise.
1734 * coffswap.h (coff_swap_sym_in): Likewise.
1735 * peXXigen.c (_bfd_XXi_swap_sym_in): Likewise.
1736 * coffcode.h (_coff_bigobj_swap_sym_in): Make sure that internal
1737 section number field is big enough to hold the external value.
1738
5c14705f
AM
17392016-01-17 Alan Modra <amodra@gmail.com>
1740
1741 * configure: Regenerate.
1742
ac06903d
YU
17432016-01-12 Yury Usishchev <y.usishchev@samsung.com>
1744
1745 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Insert cantunwind
1746 when address in first unwind entry does not match start of
1747 section.
1748
109575d7
JW
17492016-01-08 Richard Sandiford <richard.sandiford@arm.com>
1750 Jiong Wang <jiong.wang@arm.com>
1751
1752 PR ld/19368
1753 * elf32-arm.c (elf32_arm_reloc_type_class): Map R_ARM_IRELATIVE to
1754 reloc_class_ifunc.
1755
b05a65d0
AB
17562016-01-06 Andrew Burgess <andrew.burgess@embecosm.com>
1757
1758 * elf32-arc.c (reloc_type_to_name): Change ARC_RELOC_HOWTO to
1759 place 'R_' before the reloc name returned.
1760 (elf_arc_howto_table): Change ARC_RELOC_HOWTO to place 'R_' before
1761 the relocation string.
1762
a3dc0a7f
MR
17632016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1764
1765 * elfxx-mips.c (mips_elf_merge_obj_abiflags): New function,
1766 factored out from...
1767 (_bfd_mips_elf_merge_private_bfd_data): ... here.
1768
d537eeb5
MR
17692016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1770
1771 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Move
1772 attribute check after ELF file header flag check.
1773
43d223b5
MR
17742016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1775
1776 * elfxx-mips.c (mips_elf_merge_obj_attributes): Propagate the
1777 return status from `_bfd_elf_merge_object_attributes'.
1778
b2e9744f
MR
17792016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1780
1781 * elfxx-mips.c (mips_elf_merge_obj_e_flags): New function,
1782 factored out from...
1783 (_bfd_mips_elf_merge_private_bfd_data): ... here.
1784
28d45e28
MR
17852016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1786
1787 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Fold the
1788 handling of input MIPS ABI flags together.
1789
23ba6f18
MR
17902016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1791
1792 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Suppress
1793 attribute checks for null input.
1794
cf8502c1
MR
17952016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1796
1797 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Use local
1798 pointers to target data.
1799
dcb1c796
MR
18002016-01-04 Maciej W. Rozycki <macro@imgtec.com>
1801
1802 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
1803 an FP ABI warning.
1804
6f2750fe
AM
18052016-01-01 Alan Modra <amodra@gmail.com>
1806
1807 Update year range in copyright notice of all files.
1808
3499769a
AM
1809For older changes see ChangeLog-2015 and doc/ChangeLog-0415
1810\f
1811Copyright (C) 2016 Free Software Foundation, Inc.
1812
1813Copying and distribution of this file, with or without modification,
1814are permitted in any medium without royalty provided the copyright
1815notice and this notice are preserved.
1816
1817Local Variables:
1818mode: change-log
1819left-margin: 8
1820fill-column: 74
1821version-control: never
1822End:
This page took 0.120688 seconds and 4 git commands to generate.