]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - bfd/ChangeLog
Add a testcase for PR gas/18087
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
27aaeda0
NC
12015-03-18 Eric Youngdale <eyoungdale@ptc.com>
2
3 PR ld/16598
4 * peicode.h (pe_ILF_build_a_bfd): Add support for creating relocs
5 suitable for the AMD64.
6
273a4985
JT
72015-03-18 Jon Turney <jon.turney@dronecode.org.uk>
8 Nick Clifton <nickc@redhat.com>
9
10 PR binutils/18087
11 * coffgen.c (make_a_section_from_file): Only prepend a z to a
12 debug section's name if the section was actually compressed.
13 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
14 * compress.c (bfd_init_section_compress_status): Do not compress
15 the section if doing so would make it bigger. In such cases leave
16 the section alone and return COMPRESS_SECTION_NONE.
17
c4b0b099
AM
182015-03-17 Alan Modra <amodra@gmail.com>
19
20 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return count of 0
21 on nothing to do, before malloc of returned symbol array.
22
9c761a55
NC
232015-03-16 Nick Clifton <nickc@redhat.com>
24
25 * elf32-rx.c (elf32_rx_relax_delete_bytes): If the relocs are not
26 stored in the elf_section_data structure then load them as
27 necessary.
28
b9005ba7
AK
292015-03-14 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
30
31 * elf-s390-common.c (elf_s390_elf_sort_relocs_p): Don't sort
32 relocs against code sections.
33 * elf32-s390.c: Define elf_backend_sort_relocs_p.
34 * elf64-s390.c: Likewise.
35
1079403c
AM
362015-03-11 Alan Modra <amodra@gmail.com>
37
38 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Examine stubs in
39 reverse order. Account for larger size of __tls_get_addr_opt stub.
40
a5721edd
JW
412015-03-10 Yuri Gribov <y.gribov@samsung.arm>
42
43 PR ld/16572
44 * elf32-arm.c (elf32_arm_final_link_relocate): Remove support for
45 ELF_ARM_HASENTRY.
46 (elf32_arm_print_private_bfd_data): Likewise.
47
65164438
NC
482015-03-06 Nick Clifton <nickc@redhat.com>
49
50 PR binutils/17765
51 * elflink.c (put_value): Like previous delta, but for the 32-bit
52 case.
53
41cd1ad1
NC
542015-03-05 Nick Clifton <nickc@redhat.com>
55
56 PR binutils/17765
57 * elflink.c (put_value): Avoid using an undefined shift
58 operation.
59
ca3fe95e
L
602015-03-05 H.J. Lu <hongjiu.lu@intel.com>
61
62 PR ld/pr15228
63 PR ld/pr17709
64 * elf-bfd.h (elf_backend_data): Add extern_protected_data.
65 * elf32-i386.c (elf_backend_extern_protected_data): New.
66 Defined to 1.
67 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
68 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
69 copy relocs against protected symbols if extern_protected_data
70 is true.
71 (_bfd_elf_symbol_refs_local_p): Don't return true on protected
72 non-function symbols if extern_protected_data is true.
73 * elfxx-target.h (elf_backend_extern_protected_data): New.
74 Default to 0.
75 (elfNN_bed): Initialize extern_protected_data with
76 elf_backend_extern_protected_data.
77
425bd9e1
NC
782015-03-05 Nick Clifton <nickc@redhat.com>
79
80 PR binutils/18025
81 * coffgen.c (coff_find_nearest_line_with_names): If the dwarf2
82 lookup fails, check for an address bias in the dwarf info, and if
83 one exists, retry the lookup with the biased value.
84 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): New function.
85 Determines if a bias exists bewteen the addresses of functions
86 based on DWARF information vs symbol table information.
87 * libbfd-in.h (_bfd_dwarf2_find_symbol_bias): Prototype.
88 * libbfd.h: Regenerate.
89
8ef229f3
MS
902015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
91
92 * elfxx-aarch64.c (decode_add_imm, decode_movw_imm)
93 (decode_tst_branch_ofs_14, decode_ld_lit_ofs_19)
94 (decode_cond_branch_ofs_19, decode_branch_ofs_26): Remove.
95
8e2fe09f
MS
962015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
97
98 * elfnn-aarch64.c (aarch64_build_one_stub): Call abort.
99 (aarch64_size_one_stub): Likewise.
100 (aarch64_map_one_stub): Likewise.
101
df88b702
AA
1022015-03-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
103
104 * cpu-s390.c (N): New macro.
105 (bfd_s390_31_arch): New. Define only if default target word size
106 is 64 bits. Otherwise define...
107 (bfd_390_64_arch): ...this. Make static.
108 (bfd_s390_arch): Define according to the default target word size.
109 Let the 'next' field point to the alternate arch.
110
e09ab7ac
RS
1112015-03-04 Richard Sandiford <richard.sandiford@arm.com>
112
113 PR gas/17843
114 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Expect
115 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC and R_AARCH64_TLSLE_MOVW_TPREL_G1_NC
116 to be used with MOVK rather than MOVZ.
117
71eef2bd
DD
1182015-03-03 DJ Delorie <dj@redhat.com>
119
120 * elf32-rl78.c (rl78_elf_relax_section): Only relax ADDR16's if
121 there's a symbol.
122
f01f1741
AM
1232015-02-28 Alan Modra <amodra@gmail.com>
124
125 * elf32-ppc.c (ppc_elf_tls_setup): Set no_tls_get_addr_opt if
126 not PLT_NEW.
127
c1d11331
L
1282015-02-27 H.J. Lu <hongjiu.lu@intel.com>
129
130 * elf32-i386.c (need_convert_mov_to_lea): New.
131 (elf_i386_check_relocs): Set need_convert_mov_to_lea if needed.
132 (elf_i386_convert_mov_to_lea): Return TRUE if
133 need_convert_mov_to_lea is unset.
134 * elf64-x86-64.c (need_convert_mov_to_lea): New.
135 (elf_x86_64_check_relocs): Set need_convert_mov_to_lea if needed.
136 (elf_x86_64_convert_mov_to_lea): Return TRUE if
137 need_convert_mov_to_lea is unset.
138
cdb602b1
NC
1392015-02-27 Nick Clifton <nickc@redhat.com>
140
141 PR binutils/17910
142 * coffgen.c (_bfd_coff_internal_syment_name): Only check for
143 string length overflow when the string table length is actually
144 set.
145
96c20bc1
MS
1462015-02-27 Marcus Shawcroft <marcus.shawcroft@arm.com>
147
148 * bfd/bfd-in2.h: Regenerate.
149 * bfd/libbfd.h: Regenerate.
150
1ada945d
MS
1512015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
152
153 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix
154 TLSDESC_LD_PREL19 field width and masks.
155 (aarch64_tls_transition_without_check)
156 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
157 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
158 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
159 BFD_RELOC_AARCH64_TLSDESC_LD_PREL19.
160 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
161 (_bfd_aarch64_elf_resolve_relocation): Likewise.
162
389b8029
MS
1632015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
164
73920eed
MS
165 * elfnn-aarch64.c (IS_AARCH64_TLSDESC_RELOC): Reorder R_TYPE
166 tests.
389b8029
MS
167 (aarch64_tls_transition_without_check)
168 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
169 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
170 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
171 BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21.
172 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
173 (_bfd_aarch64_elf_resolve_relocation): Likewise.
174 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
175
3c12b054
MS
1762015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
177
178 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC)
179 (elfNN_aarch64_howto_table, aarch64_tls_transition_without_check)
180 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
181 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
182 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
183 BFD_RELOC_AARCH64_TLSGD_ADR_PREL21.
184 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
185 (_bfd_aarch64_elf_resolve_relocation): Likewise.
186 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
187
043bf05a
MS
1882015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
189
190 * elfnn-aarch64.c: (TLSIE_LD_GOTTREL_PREL19): Fix HOWTO bit field width.
191 (aarch64_tls_transition_without_check, aarch64_reloc_got_type)
192 (elfNN_aarch64_final_link_relocate, elfNN_aarch64_tls_relax)
193 (elfNN_aarch64_relocate_section, elfNN_aarch64_gc_sweep_hook)
194 (elfNN_aarch64_check_relocs): Handle
195 BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19.
196
197 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
198 (_bfd_aarch64_elf_resolve_relocation): Likewise.
199
7366006f
MS
2002015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
201
202 * elfnn-aarch64.c: (TLSDESC_CALL): Fix HOWTO bit field width.
203
07875fbc
MS
2042015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
205
206 * elfnn-aarch64.c (TLSLE_MOVW_TPREL_G2)
207 (TLSLE_MOVW_TPREL_G1, TLSLE_MOVW_TPREL_G1_NC)
208 (TLSLE_MOVW_TPREL_G0, TLSLE_MOVW_TPREL_G0_NC): Fix bit field
209 width.
210
49d8f92c
MS
2112015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
212
213 * elfnn-aarch64.c: (TLSIE_MOVW_GOTTPREL_G0_NC): Fix HOWTO bit
214 field width.
215
c86934ce
NC
2162015-02-26 Nick Clifton <nickc@redhat.com>
217
218 PR binutils/17512
219 * coffcode.h (coff_compute_section_file_positions): Report
220 negative page sizes.
221 * elf.c (elf_fake_sections): Handle excessive alignmment powers.
222 (assign_file_positions_for_non_load_sections): Replace assertion
223 with an error message.
224 (rewrite_elf_program_header): Handle excessive segment
225 alignments.
226 * mach-o.c (bfd_mach_o_read_section_32): Likewise.
227 (bfd_mach_o_read_section_64): Likewise.
228 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Use %B to
229 print a bfd name, not %A.
230
bd4d2eaa
AM
2312015-02-26 Alan Modra <amodra@gmail.com>
232
233 * elf64-ppc.c (plt_stub_size, build_plt_stub): Don't build
234 thread-safe stubs for iplt.
235 (build_tls_get_addr_stub): Restore r2 immediately after call.
236
99654aaf
TG
2372015-02-26 Terry Guo <terry.guo@arm.com>
238
239 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Update how we
240 merge Tag_ABI_HardFP_use.
241
a127494f
AM
2422015-02-26 Alan Modra <amodra@gmail.com>
243
244 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Heed -z nocopyreloc.
245 Use text relocs rather than giving an error on trying to use
246 .dynbss for protected shared lib vars.
247 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
248
bac13f5a
AB
2492015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
250
251 * elf32-avr.c (struct elf_avr_section_data): New structure.
252 (struct avr_relax_info): New structure.
253 (elf_avr_new_section_hook): New function.
254 (struct elf_avr_section_data): Add relax_info.
255 (get_avr_relax_info): New function.
256 (init_avr_relax_info): New function.
257 (elf32_avr_relax_delete_bytes): Find next property record before
258 deleting bytes. When deleting don't move bytes beyond the next
259 property record.
260 (avr_elf32_assign_records_to_section): New function.
261 (avr_property_record_compare): New function.
262 (avr_load_all_property_sections): New function.
263 (elf32_avr_relax_section): Load property data. After relaxing the
264 section, move any .align directives that have enough deleted bytes
265 before them.
266 (bfd_elf32_new_section_hook): Define.
267
137c83d6
AB
2682015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
269
270 * elf32-avr.h (struct avr_property_header): New strucure.
271 (avr_elf32_load_property_records): Declare.
272 (avr_elf32_property_record_name): Declare.
273 * elf32-avr.c: Add bfd_stdint.h include.
274 (retrieve_local_syms): New function.
275 (get_elf_r_symndx_section): New function.
276 (get_elf_r_symndx_offset): New function.
277 (internal_reloc_compare): New function.
278 (struct avr_find_section_data): New structure.
279 (avr_is_section_for_address): New function.
280 (avr_find_section_for_address): New function.
281 (avr_elf32_load_records_from_section): New function.
282 (avr_elf32_load_property_records): New function.
283 (avr_elf32_property_record_name): New function.
284
fdd410ac
AB
2852015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
286
287 * elf32-avr.h (AVR_PROPERTY_RECORD_SECTION_NAME): Define.
288 (AVR_PROPERTY_RECORDS_VERSION): Define.
289 (AVR_PROPERTY_SECTION_HEADER_SIZE): Define.
290 (struct avr_property_record): New structure.
291
685080f2
NC
2922015-02-24 Nick Clifton <nickc@redhat.com>
293
294 * elf32-v850.c (v850_set_note): New function. Creates a Renesas
295 style note entry.
296 (v850_elf_make_note_section): New function. Creates a note
297 section.
298 (v850_elf_create_sections): New function. Create a note section
299 if one is not already present.
300 (v850_elf_set_note): New function. Adds a note to a bfd.
301 (v850_elf_copy_private_bfd_data): New function. Copies V850
302 notes.
303 (v850_elf_merge_notes): New function. Merges V850 notes.
304 (print_v850_note): New function. Displays a V850 note.
305 (v850_elf_print_notes): New function. Displays all notes attached
306 to a bfd.
307 (v850_elf_merge_private_bfd_data): Call v850_elf_merge_notes.
308 (v850_elf_print_private_bfd_data): Call v850_elf_print_notes.
309 (v850_elf_fake_sections): Set the type of the V850 note section.
310 * bfd-in.h (v850_elf_create_sections): Add prototype.
311 (v850_elf_set_note): Add prototype.
312 * bfd-in2.h: Regenerate.
313
31593e1b
NC
3142015-02-24 Nick Clifton <nickc@redhat.com>
315
316 * configure.ac (AC_CHECK_HEADERS): Add wctype.h.
317 * configure: Regenerate.
318 * config.in: Regenerate.
319 * peXXigen.c: Include wctype.h if HAVE_WCTYPE_H is defined.
320 (u16_mbtowc): Use wint_t types if HAVE_WCTYPE_H is defined.
321 (rsrc_cmp): Use towlower instead of wcsncasecmp if HAVE_WCTYPE_H
322 is defined.
323
3ad797fd
NC
3242015-02-24 Nick Clifton <nickc@redhat.com>
325
326 * pdp11.c (set_section_contents): Pad the .text and .data sections
327 to their aligned sizes.
328
5518c738
YS
3292015-02-23 Yoshinori Sato <ysato@users.sourceforge.jp>
330
331 * config.bfd: Add h8300-*-linux.
332 * configure.ac: Add h8300_elf32_linux_vec.
333 * configure: Regenerate.
334 * elf32-h8300.c: Likewise.
335 * targets.c(_bfd_target_vector): Likewise.
336
cb967f0d
NC
3372015-02-23 Nick Clifton <nickc@redhat.com>
338
339 PR 17914
340 * cpu-w65.c: Correct typos in license notice.
341
0f8f0c57
NC
342 PR 17940
343 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Adjust debug
344 symbols at end of sections. Adjust function sizes.
345
4ef9f41a
AA
3462015-02-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
347
348 * elf-bfd.h (elfcore_write_s390_vxrs_low): Add prototype.
349 (elfcore_write_s390_vxrs_high): Likewise.
350 * elf.c (elfcore_grok_s390_vxrs_low): New function.
351 (elfcore_grok_s390_vxrs_high): New function.
352 (elfcore_grok_note): Call them.
353 (elfcore_write_s390_vxrs_low): New function.
354 (elfcore_write_s390_vxrs_high): New function.
355 (elfcore_write_register_note): Call them.
356
837914ee
BD
3572015-02-19 Branko Drevensek <branko.drevensek@gmail.com>
358
359 PR 17995
360 * verilog.c (verilog_write_record): Correct buffer size.
361
cf18fda4
AM
3622015-02-19 Alan Modra <amodra@gmail.com>
363
364 * elflink.c (_bfd_elf_define_linkage_sym): Set 'bed' earlier.
365
d983c8c5
AM
3662015-02-19 Alan Modra <amodra@gmail.com>
367
368 PR ld/4317
369 * elflink.c (elf_link_input_bfd): Drop undefined local syms.
370 (elf_link_output_extsym): Drop local and global undefined syms.
371 Tidy. Expand comment.
372
2ec55de3
AM
3732015-02-17 Alan Modra <amodra@gmail.com>
374
375 PR ld/17975
376 * elflink.c (struct elf_outext_info): Remove need_second_pass
377 and second_pass.
378 (elf_link_output_extsym): Delete code handling second forced
379 local pass. Move code emitting NULL STT_FILE symbol later, so
380 that it can be omitted if forced local is stripped. Don't
381 emit the NULL STT_FILE if no file symbols have been output.
382 (bfd_elf_final_link): Remove second forced local pass.
383 * elf32-ppc.c (add_stub_sym): Set linker_def on linker syms.
384 (ppc_elf_size_dynamic_sections): Likewise.
385 * elf64-ppc.c (ppc_build_one_stub): Likewise.
386 (build_global_entry_stubs): Likewise.
387 (ppc64_elf_build_stubs): Likewise.
388
6dfb72b9
L
3892015-02-16 H.J. Lu <hongjiu.lu@intel.com>
390
391 PR ld/17975
392 * elflink.c (elf_link_output_extsym): Only check filesym_count
393 when outputting a NULL FILE symbol. Set second_pass_sym to
394 h->forced_local && !h->root.linker_def.
395
576fa883
L
3962015-02-15 H.J. Lu <hongjiu.lu@intel.com>
397
398 * elf32-i386.c (elf_i386_always_size_sections): Set root.linker_def
399 on _TLS_MODULE_BASE_.
400 * elf64-x86-64.c (elf_x86_64_always_size_sections): Likewise.
401
62f8d217
AM
4022015-02-15 Alan Modra <amodra@gmail.com>
403
404 * dwarf2.c (read_rangelist): Correct buffer overflow check
405 Whitespace throughout file.
406
ce875075
AM
4072015-02-14 Alan Modra <amodra@gmail.com>
408
409 PR ld/17973
410 * bfd.c (struct bfd): Add lto_output.
411 * linker.c (_bfd_handle_already_linked): Explicitly test for
412 objects added by the lto plugin.
413 * opncls.c (_bfd_new_bfd_contained_in): Copy lto_output and
414 no_export flags from archive.
415 * archive.c (open_nested_file): New function, setting lto_output
416 and no_export, extracted from..
417 (find_nested_archive): ..here. Flip params. Rename from
418 _bfd_find_nested_archive.
419 (_bfd_get_elt_at_filepos): Correct var typo. Use open_nested_file.
420 (_bfd_look_for_bfd_in_cache): Copy no_export.
421 * elflink.c (elf_link_add_object_symbols): Remove now unnecessary
422 my_archive->no_export test.
423 (elf_link_input_bfd): Drop existing lto_output STT_FILE syms.
424 Don't use the file name when adding lto_output STT_FILE sym.
425 * bfd-in2.h: Regenerate.
426
451dfd38
AM
4272015-02-13 Alan Modra <amodra@gmail.com>
428
429 PR binutils/17512
430 * elf64-ppc.c (opd_entry_value): Tighten offset check. Remove
431 now redundant assert.
432
dbb3fbbb
NC
4332015-02-12 Nick Clifton <nickc@redhat.com>
434
435 PR binutils/17512
436 * dwarf.c (read_1_byte, read_1_signed_byte, read_2_bytes)
437 (read_4_bytes, read_8_bytes, read_n_bytes, read_string)
438 (read_indirect_string, read_alt_indirect_string)
439 (read_alt_indirect_ref, read_address, read_abbrevs)
440 (read_attribute_value, read_attribute, decode_line_info)
441 (find_abstract_instance_name, read_rangelist)
442 (scan_unit_for_symbols, parse_comp_unit)
443 (_bfd_dwarf2_find_nearest_line): Harden DWARF reading code. Pass
444 end pointers to reading functions and check for offsets taking
445 pointers out of range. Replace calls to read_*_leb128 with calls
446 to safe_read_leb128.
447
448 (* elf64-ppc.c (opd_entry_value): Add a check for an overlarge
449 offset.
450 * syms.c (_bfd_stab_section_find_nearest_line): Add checks for
451 computed file_name address being before the start of the string
452 table.
453
b9dc5a87
L
4542015-02-11 H.J. Lu <hongjiu.lu@intel.com>
455
456 PR ld/17878
457 * bfd.c (bfd_plugin_format): New.
458 (bfd): Add plugin_format and plugin_dummy_bfd.
459 * plugin.c (try_load_plugin): Take a pointer to bfd_boolean
460 argument to return TRUE if any plugin is found. Set plugin_format.
461 (has_plugin): New.
462 (bfd_plugin_target_p): New.
463 (bfd_plugin_specified_p): Likewise.
464 (bfd_plugin_target_p): Likewise.
465 (register_ld_plugin_object_p): Likewise.
466 (bfd_plugin_set_plugin): Set has_plugin.
467 (load_plugin): Cache try_load_plugin result.
468 (bfd_plugin_object_p): Try ld_plugin_object_p first. Check
469 plugin_format.
470 * plugin.h (bfd_plugin_target_p): New.
471 (bfd_plugin_specified_p): Likewise.
472 (register_ld_plugin_object_p): Likewise.
473 * bfd-in2.h: Regenerated.
474
55172d69
PA
4752015-02-11 Pedro Alves <palves@redhat.com>
476
477 * libbfd-in.h [__cplusplus]: Open extern "C" scope.
478 * libcoff-in.h [__cplusplus]: Open extern "C" scope.
479 * libbfd.h: Regenerate.
480 * libcoff.h: Regenerate.
481
482 * elf-bfd.h [__cplusplus]: Wrap in extern "C".
483 * mach-o.h [__cplusplus]: Wrap in extern "C".
484 * som.h [__cplusplus]: Wrap in extern "C".
485
77ef8654
NC
4862015-02-10 Nick Clifton <nickc@redhat.com>
487
488 PR binutils/17512
489 * coffcode.h (styp_to_sec_flags): Use an unsigned long type to
490 hold the flag bits.
491 * peXXigen.c (pe_print_reloc): Use unsigned types to hold the
492 size and number of relocs.
493 (pe_print_debugdata): Use a 32-bit aligned buffer to store the
494 codeview record.
495 * versados.c (process_otr): Check the esdid value before using it
496 to access the EDATA.
497
35181b3e
EM
4982015-02-09 Ed Maste <emaste@freebsd.org>
499
500 * elf32-i386.c (elf_i386_get_plt_sym_val): Avoid incrementing
501 uninitialized and unused variable.
502 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
503
989f9879
AM
5042015-02-09 Alan Modra <amodra@gmail.com>
505
506 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault on NULL
507 tls_sec.
508 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
509 * elflink.c (elf_link_output_extsym): Don't assert on NULL tls_sec.
510
ca4be51c
AM
5112015-02-09 Alan Modra <amodra@gmail.com>
512
513 * elflink.c: Whitespace, formatting fixes.
514 (elf_link_input_bfd): Clarify comment.
515 (elf_link_output_extsym): Exclude symbols in linker created
516 sections when testing for plugin symbols.
517
1952c5cd
L
5182015-02-07 H.J. Lu <hongjiu.lu@intel.com>
519
520 PR ld/17935
521 * elf32-i386.c (elf_i386_readonly_dynrelocs): Also issue a
522 warning for relocation in readonly section for -z text.
523 (elf_i386_size_dynamic_sections): Likewise.
524 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
525 (elf_x86_64_size_dynamic_sections): Likewise.
526
9e2dec47
L
5272015-02-06 H.J. Lu <hongjiu.lu@intel.com>
528
529 PR ld/12365
530 PR ld/14272
531 * elflink.c (_bfd_elf_fix_symbol_flags): Revert the last change.
532 (elf_link_input_bfd): Mark the plugin symbol undefined if it is
533 referenced from a non-IR file.
534
5929c344
NC
5352015-02-06 Nick Clifton <nickc@redhat.com>
536
537 PR binutils/17512
538 * peXXigen.c (rsrc_print_resource_entries): Add range check for
539 addresses that wrap around the address space.
540 (rsrc_parse_entry): Likewise.
541
60f79275
L
5422015-02-03 H.J. Lu <hongjiu.lu@intel.com>
543
544 PR ld/12365
545 PR ld/14272
546 * elflink.c (_bfd_elf_fix_symbol_flags): Mark the plugin symbol
547 undefined if it is referenced from a non-IR file.
548
64d29018
NC
5492015-02-03 Nick Clifton <nickc@redhat.com>
550
551 PR binutils/17512
552 * ecoff.c: Use bfd_alloc2 to allocate space for structure arrays.
553 (_bfd_ecoff_slurp_symbol_table): Check for a negative symbol
554 index or an out of range fdr index.
555 * elf-m10300.c (mn10300_info_to_howto): Fix typo in error message.
556 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
557 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
558 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
559 * elf32-cr16c.c (elf_cr16c_info_to_howto_rel): Likewise.
560 * elf32-cris.c (cris_info_to_howto_rela): Likewise.
561 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
562 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
563 * elf32-d30v.c (d30v_info_to_howto_rel): Likewise.
564 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
565 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
566 * elf32-frv.c (frv_info_to_howto_rela): Likewise.
567 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
568 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
569 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
570 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
571 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
572 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
573 * elf32-m32r.c (m32r_info_to_howto_rel): Likewise.
574 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
575 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
576 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
577 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
578 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
579 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
580 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
581 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
582 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
583 * elf32-nds32.c (nds32_info_to_howto_rel): Likewise.
584 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
585 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
586 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
587 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
588 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
589 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
590 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
591 * elf32-v850.c (v850_elf_perform_relocation): Likewise.
592 * elf32-vax.c (rtype_to_howto): Likewise.
593 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
594 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
595 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
596 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
597 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
598 * mach-o.c: Use bfd_alloc2 to allocate space for structure arrays.
599 (bfd_mach_o_canonicalize_one_reloc): Fix check on out
600 of range symbol indicies.
601 (bfd_mach_o_canonicalize_relocs): Check for out of range alloc.
602 (bfd_mach_o_canonicalize_dynamic_reloc): Likewise.
603 (bfd_mach_o_build_dysymtab): Likewise.
604 (bfd_mach_o_write_symtab_content): Set the string table size to
605 zero upon error.
606 (bfd_mach_o_read_symtab_symbols): Reset the nsyms value if the
607 read fails.
608 * peXXigen.c (pe_print_edata): Check for numeric overflow in edt
609 fields.
610 * tekhex.c (first_phase): Check for src pointer reaching end of
611 buffer.
612
3a635617
WN
6132015-02-03 Will Newton <will.newton@linaro.org>
614
46b87d49
WN
615 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol):
616 Set st_value to zero for undefined symbols if the reference
617 is weak or pointer_equality_needed is FALSE.
618
3a635617
WN
619 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Improve
620 comment discussing why we clear st_value for some symbols.
621
0c4bd9d9
KLC
6222015-02-02 Kuan-Lin Chen <kuanlinchentw@gmail.com>
623
624 * elf32-nds32.c (nds32_get_section_contents): Add one more argument.
625 (nds32_elf_relocate_section): Do not relocate R_NDS32_LONGJUMP7.
626
b86ac8e3
AM
6272015-01-29 Alan Modra <amodra@gmail.com>
628
629 * elf64-ppc.c (ppc64_elf_relocate_section): Correct GOT_TLSLD
630 optimization. Tidy mask for GOT_TLSGD optimization.
631 * elf32-ppc.c (ppc_elf_relocate_section): Likewise. Correct
632 location of nop zapping high insn too.
633
dbd1e97e
AM
6342015-01-28 Alan Modra <amodra@gmail.com>
635
636 * elf64-ppc.h (struct ppc64_elf_params): Add "object_in_toc".
637 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Assume that global symbols
638 in .toc indicate xlc compiled code that might require a rw .toc.
639
3f8107ab
AM
6402015-01-28 James Bowman <james.bowman@ftdichip.com>
641
642 * Makefile.am: Add FT32 files.
643 * archures.c (enum bfd_architecture): Add bfd_arch_ft32.
644 (bfd_mach_ft32): Define.
645 (bfd_ft32_arch): Declare.
646 (bfd_archures_list): Add bfd_ft32_arch.
647 * config.bfd: Handle FT32.
648 * configure.ac: Likewise.
649 * cpu-ft32.c: New file.
650 * elf32-ft32.c: New file.
651 * reloc.c (BFD_RELOC_FT32_10, BFD_RELOC_FT32_20, BFD_RELOC_FT32_17,
652 BFD_RELOC_FT32_18): Define.
653 * targets.c (_bfd_target_vector): Add ft32_elf32_vec.
654 * bfd-in2.h: Regenerate.
655 * libbfd.h: Regenerate.
656 * Makefile.in: Regenerate.
657 * configure: Regenerate.
658 * po/SRC-POTFILES.in: Regenerate.
659
37e3922e
NC
6602015-01-27 Nick Clifton <nickc@redhat.com>
661
662 PR binutils/17512
663 * pdp11.c (aout_get_external_symbols): Return false if there are
664 no symbols.
665
877a8638
NC
666 * dwarf2.c (concat_filename): Check for an empty directory table.
667 (scan_unit_for_symbols): Check for reading off the end of the
668 unit.
669 (parse_comp_unit): Check for a DW_AT_comp_dir attribute with a
670 non-string form.
671 * elf64-ppc.c (opd_entry_value): Fail if there are no relocs
672 available.
673
18393a2e
KLC
6742015-01-26 Kuan-Lin Chen <kuanlinchentw@gmail.com>
675
676 * elf32-nds32.c (nds32_elf_pick_relax): Fix again setting.
677
055173ca
DD
6782015-01-22 DJ Delorie <dj@redhat.com>
679
680 * elf32-m32c.c (m32c_apply_reloc_24): New.
681 (m32c_elf_howto_table): Use it for R_M32C_24.
682 (m32c_elf_relocate_section): Handle R_M32C_24 specially.
683
4e5cb37e
NC
6842015-01-22 Nick Clifton <nickc@redhat.com>
685
686 PR binutils/17512
687 * coffcode.h (handle_COMDAT): When searching for the section
688 symbol, make sure that there is space left in the symbol table.
689 * vms-alpha.c (_bfd_vms_slurp_ehdr): Add range checks.
690
86eafac0
NC
6912015-01-21 Nick Clifton <nickc@redhat.com>
692
693 PR binutils/17512
694 * coffcode.h (coff_set_arch_mach_hook): Check return value from
695 bfd_malloc.
696 (coff_slurp_line_table): Return FALSE if the line number
697 information was corrupt.
698 (coff_slurp_symbol_table): Return FALSE if the symbol information
699 was corrupt.
700 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Always
701 initialise the fields of the dyld_info structure.
702 (bfd_mach_o_build_exec_seg_command): Replace assertion with an
703 error message and a return value.
704 (bfd_mach_o_layout_commands): Change the function to boolean.
705 Return FALSE if the function fails.
706 (bfd_mach_o_build_commands): Fail if bfd_mach_o_layout_commands
707 fails.
708 (bfd_mach_o_read_command): Fail if an unrecognised command is
709 encountered.
710 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Set bfd_error if the
711 read fails.
712 (slurp_symtab): Check the return from bfd_malloc.
713 (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if the copy
714 encountered an error.
715 (_bfd_XXi_final_link_postscript): Fail if a section could not be
716 copied.
717 * peicode.h (pe_bfd_object_p): Fail if the header could not be
718 swapped in.
719 * tekhex.c (first_phase): Fail if the section is too big.
720 * versados.c (struct esdid): Add content_size field.
721 (process_otr): Use and check the new field.
722 (versados_get_section_contents): Check that the section exists and
723 that the requested data is available.
724
03d5b773
CLT
7252015-01-20 Chung-Lin Tang <cltang@codesourcery.com>
726
727 * elf32-nios2.c (elf_backend_default_execstack): Define as 0.
728
1c9177d9
AM
7292015-01-20 Alan Modra <amodra@gmail.com>
730
731 PR ld/17615
732 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Don't drop
733 ELF_COMMON_DEF syms.
734
c4621b33
AM
7352015-01-19 Alan Modra <amodra@gmail.com>
736
3e2aa5bb 737 PR ld/17615
c4621b33
AM
738 * elf-bfd.h (ELF_COMMON_DEF_P): Note that this might be true for
739 linker script assignments too.
740 * elflink.c (elf_gc_sweep_symbol): Don't drop ELF_COMMON_DEF syms.
741 (bfd_elf_gc_mark_dynamic_ref_symbol): Similarly.
742
0ba38529
AM
7432015-01-19 Alan Modra <amodra@gmail.com>
744
745 * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Correct loop iteration
746 to allow return of first howto.
747 * elf32-fr30.c (fr30_reloc_type_lookup): Likewise.
748 * elf32-m32c.c (m32c_reloc_type_lookup): Likewise.
749 * elf32-moxie.c (moxie_reloc_type_lookup): Likewise.
750 * elf32-or1k.c (or1k_reloc_type_lookup): Likewise.
751 * elf32-rl78.c (rl78_reloc_type_lookup): Likewise.
752 * elf32-rx.c (rx_reloc_type_lookup): Likewise.
753 * elf32-tilepro.c (tilepro_reloc_type_lookup): Likewise.
754 * elf32-xstormy16.c (xstormy16_reloc_type_lookup): Likewise.
755 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
756 * elf32-nios2.c (nios2_reloc_map): Add mapping for R_NIOS2_NONE.
757 * elf32-spu.c (spu_elf_bfd_to_reloc_type): Allow return of R_SPU_NONE.
758 (spu_elf_reloc_type_lookup): Adjust to suit.
759
6346d5ca
AM
7602015-01-19 Alan Modra <amodra@gmail.com>
761
762 * bfd-in.h (bfd_get_section_limit_octets): New define, extracted from..
763 (bfd_get_section_limit): ..here.
764 * reloc.c (bfd_perform_relocation): Correct bfd_reloc_outofrange check.
765 (bfd_install_relocation, _bfd_final_link_relocate): Add same check here.
766 * elf32-sh.c (sh_elf_reloc): Correct bfd_reloc_outofrange check.
767 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Remove duplicated
768 bfd_reloc_outofrange check.
769 * bfd-in2.h: Regenerate.
770
771 * cpu-ns32k.c (_bfd_do_ns32k_reloc_contents): Return bfd_reloc_ok
772 on zero size relocs.
773 * ecoff.c (ecoff_reloc_link_order): Likewise.
774 * elf32-nds32.c (nds32_relocate_contents): Likewise.
775 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
776
777 * reloc.c (_bfd_relocate_contents): Don't bomb on zero size relocs.
778 (_bfd_clear_contents): Likewise.
779 * elfxx-mips.c (mips_elf_obtain_contents): Likewise.
780 (mips_elf_perform_relocation): Likewise.
781
782 * aoutx.h (aout_link_reloc_link_order): Allow for NULL return
783 from malloc on zero size alloc.
784 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
785 * elflink.c (elf_reloc_link_order): Likewise.
786 * linker.c (_bfd_generic_reloc_link_order): Likewise.
787 * pdp11.c (aout_link_reloc_link_order): Likewise.
788 * xcofflink.c (xcoff_reloc_link_order): Likewise.
789
790 * aoutx.h (howto_table_ext): Ensure NONE relocs have size 3,
791 bitsize 0, and complain_overflow_dont.
792 * coff-sparc.c (coff_sparc_howto_table): Likewise.
793 * elf-hppa.h (elf_hppa_howto_table): Likewise.
794 * elf-m10200.c (elf_mn10200_howto_table): Likewise.
795 * elf-m10300.c (elf_mn10300_howto_table): Likewise.
796 * elf32-arc.c (elf_arc_howto_table): Likewise.
797 * elf32-arm.c (elf32_arm_howto_table_1): Likewise.
798 * elf32-avr.c (elf_avr_howto_table): Likewise.
799 * elf32-bfin.c (bfin_howto_table): Likewise.
800 * elf32-cr16.c (cr16_elf_howto_table): Likewise.
801 * elf32-cris.c (cris_elf_howto_table): Likewise.
802 * elf32-crx.c (crx_elf_howto_table): Likewise.
803 * elf32-d10v.c (elf_d10v_howto_table): Likewise.
804 * elf32-d30v.c (elf_d30v_howto_table): Likewise.
805 * elf32-dlx.c (dlx_elf_howto_table): Likewise.
806 * elf32-epiphany.c (epiphany_elf_howto_table): Likewise.
807 * elf32-fr30.c (fr30_elf_howto_table): Likewise.
808 * elf32-frv.c (elf32_frv_howto_table): Likewise.
809 * elf32-h8300.c (h8_elf_howto_table): Likewise.
810 * elf32-i370.c (i370_elf_howto_raw): Likewise.
811 * elf32-i386.c (elf_howto_table): Likewise.
812 * elf32-i860.c (elf32_i860_howto_table): Likewise.
813 * elf32-i960.c (elf32_i960_relocate): Likewise.
814 * elf32-ip2k.c (ip2k_elf_howto_table): Likewise.
815 * elf32-iq2000.c (iq2000_elf_howto_table): Likewise.
816 * elf32-lm32.c (lm32_elf_howto_table): Likewise.
817 * elf32-m32c.c (m32c_elf_howto_table): Likewise.
818 * elf32-m32r.c (m32r_elf_howto_table): Likewise.
819 * elf32-m68hc11.c (elf_m68hc11_howto_table): Likewise.
820 * elf32-m68hc12.c (elf_m68hc11_howto_table): Likewise.
821 * elf32-m68k.c (howto_table): Likewise.
822 * elf32-mcore.c (mcore_elf_howto_raw): Likewise.
823 * elf32-mep.c (mep_elf_howto_table): Likewise.
824 * elf32-metag.c (elf_metag_howto_table): Likewise.
825 * elf32-microblaze.c (microblaze_elf_howto_raw): Likewise.
826 * elf32-mips.c (elf_mips_howto_table_rel): Likewise.
827 * elf32-moxie.c (moxie_elf_howto_table): Likewise.
828 * elf32-msp430.c (elf_msp430_howto_table): Likewise.
829 * elf32-mt.c (mt_elf_howto_table): Likewise.
830 * elf32-nds32.c (nds32_elf_howto_table): Likewise.
831 * elf32-nios2.c (elf_nios2_howto_table_rel): Likewise.
832 * elf32-or1k.c (or1k_elf_howto_table): Likewise.
833 * elf32-pj.c (pj_elf_howto_table): Likewise.
834 * elf32-ppc.c (ppc_elf_howto_raw): Likewise.
835 * elf32-rl78.c (rl78_elf_howto_table): Likewise.
836 * elf32-rx.c (rx_elf_howto_table): Likewise.
837 * elf32-s390.c (elf_howto_table): Likewise.
838 * elf32-score.c (elf32_score_howto_table): Likewise.
839 * elf32-score7.c (elf32_score_howto_table): Likewise.
840 * elf32-sh-relocs.h (R_SH_NONE): Likewise.
841 * elf32-spu.c (elf_howto_table): Likewise.
842 * elf32-tic6x.c (elf32_tic6x_howto_table): Likewise.
843 * elf32-tilepro.c (tilepro_elf_howto_table): Likewise.
844 * elf32-v850.c (v850_elf_howto_table): Likewise.
845 * elf32-vax.c (howto_table): Likewise.
846 * elf32-visium.c (visium_elf_howto_table): Likewise.
847 * elf32-xc16x.c (xc16x_elf_howto_table): Likewise.
848 * elf32-xgate.c (elf_xgate_howto_table): Likewise.
849 * elf32-xstormy16.c (xstormy16_elf_howto_table): Likewise.
850 * elf32-xtensa.c (elf_howto_table): Likewise.
851 * elf64-alpha.c (elf64_alpha_howto_table): Likewise.
852 * elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
853 * elf64-mmix.c (elf_mmix_howto_table): Likewise.
854 * elf64-ppc.c (ppc64_elf_howto_raw): Likewise.
855 * elf64-s390.c (elf_howto_table): Likewise.
856 * elf64-sh64.c (sh_elf64_howto_table): Likewise.
857 * elf64-x86-64.c (x86_64_elf_howto_table): Likewise.
858 * elfn32-mips.c (elf_mips_howto_table_rel): Likewise.
859 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
860 (elfNN_aarch64_howto_none): Likewise.
861 * elfxx-ia64.c (ia64_howto_table): Likewise.
862 * elfxx-sparc.c (_bfd_sparc_elf_howto_table): Likewise.
863 * elfxx-tilegx.c (tilegx_elf_howto_table): Likewise.
864 * nlm32-sparc.c (nlm32_sparc_howto_table): Likewise.
865
6333bc0d
L
8662015-01-15 H.J. Lu <hongjiu.lu@intel.com>
867
868 PR ld/17847
869 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't complain
870 about -fPIC if the symbol is undefined when building executable.
871
cd21f5da
NC
8722015-01-15 Nick Clifton <nickc@redhat.com>
873
874 PR binutils/17512
875 * elf-m10300.c (mn10300_info_to_howto): Replace assertion with an
876 error message. Never return an invalid howto pointer.
877 * elf32-cr16.c (cr16_info_to_howto): Likewise.
878 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
879 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
880 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
881 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
882 * elf32-mips.c (mips_elf32_rtype_to_howto): Likewise.
883 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
884 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
885 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
886 * elf32-v850.c (v850_elf_info_to_howto_rela): Likewise.
887 * elf32-vax.c (rtype_to_howto): Likewise.
888 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
889 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
890 * elfn32-mips.c (sh_elf_info_to_howto): Likewise.
891 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
892 (sh_elf_reloc): Check that the reloc is in range.
893 * reloc.c (bfd_perform_relocation): Check that the section is big
894 enough for the entire reloc.
895 (bfd_generic_get_relocated_section_contents): Report unexpected
896 return values from perform_reloc.
897
2d071cfc
NC
8982015-01-15 Nick Clifton <nickc@redhat.com>
899
900 * elf32-msp430.c (msp430_elf_relax_section): Skip unhandled
901 relocs. Include PC-relative adjustment for R_MSP430X_ABS16
902 relaxation.
903
ca55926c
AM
9042015-01-15 Alan Modra <amodra@gmail.com>
905
906 * elflink.c (_bfd_elf_link_omit_section_dynsym): Return true for
907 any output section matching a linker created dynobj section.
908
8539e4e8
AM
9092015-01-15 Alan Modra <amodra@gmail.com>
910
911 PR 17842
912 * elflink.c (elf_link_output_sym): Assert elf_onesymtab set.
913 (bfd_elf_final_link): Always create a symbol table when emit_relocs.
914 Don't assign symtab file position unless symbols will be output.
915 Merge blocks with condition in common. Don't call
916 elf_backend_output_arch_local_syms or elf_backend_output_arch_syms
917 unless other symbols are output. Move assignment of symtab_shndx
918 file position. Localize variable.
919
52db4ec2
JW
9202015-01-14 Jiong Wang <jiong.wang@arm.com>
921
922 * elf32-arm.c (elf32_arm_final_link_relocate): Reject R_ARM_32/_NOI when
923 trying to defer them to runtime.
924
0941db69
JW
9252015-01-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
926
927 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use SYMBOLIC_BIND
928 to check if a symbol should be bound symbolically.
929
0172429c
JW
9302015-01-13 Jiong Wang <jiong.wang@arm.com>
931
932 * elfnn-aarch64.c: (elfNN_aarch64_howto_table): Enable overflow check
933 for TLSLE_MOVW_TPREL_G2.
934
bab91cce
JW
9352015-01-13 Jiong Wang <jiong.wang@arm.com>
936
937 PR ld/17415
938 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Mark
939 R_AARCH64_TLSLE_ADD_TPREL_HI12 as complain_overflow_unsigned.
940 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Correct the
941 bit mask.
942
3c758495
TG
9432015-01-12 Terry Guo <terry.guo@arm.com>
944
945 * elflink.c (_bfd_elf_gc_mark_debug_special_section_group): New
946 function.
947 (_bfd_elf_gc_mark_extra_sections): Use it.
948
9d1d54d5
L
9492015-01-11 H.J. Lu <hongjiu.lu@intel.com>
950
951 PR ld/17827
952 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): For PIE,
953 only discard space for pc-relative relocs symbols which turn
954 out to need copy relocs.
955
c6e8e93a
NC
9562015-01-09 Nick Clifton <nickc@redhat.com>
957
958 * tekhex.c (getvalue): Fix thinko in test for correct extraction
959 of value.
960 (getsym): Return false if there was not enough data to extract the
961 symbol.
962
400cf8cb
AG
9632015-01-09 Anthony Green <green@moxielogic.com>
964
965 * elf32-moxie.c (ELF_MACHINE_ALT1): Define.
966
23d4663e
NC
9672015-01-08 Nick Clifton <nickc@redhat.com>
968
969 * elf32-msp430.c (msp430_elf_relax_section): Add relaxation of
970 16-bit absolute BR instructions to 10-bit pc-relative JMP
971 instructions.
972
063bb025
NC
9732015-01-08 Nick Clifton <nickc@redhat.com>
974
975 PR binutils/17512
976 * coffcode.h (coff_slurp_symbol_table): Return false if we failed
977 to load the line table.
978 * elf.c (_bfd_elf_map_sections_to_segments): Enforce a minimum
979 maxpagesize of 1.
980 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if
981 the Data Directory Size is too large.
982
6f25f223
L
9832015-01-06 H.J. Lu <hongjiu.lu@intel.com>
984
985 PR binutils/17512
986 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocation.
987 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
988
85880250
NC
9892015-01-06 Nick Clifton <nickc@redhat.com>
990
991 PR binutils/17512
e7287c7f
NC
992 * mach-o.c (bfd_mach_o_read_symtab_strtab): Zero terminate the
993 string table.
994
ec93045b
NC
995 * reloc.c (bfd_get_reloc_size): Handle a reloc size of -1.
996 (bfd_perform_relocation): Include the size of the reloc in the
997 test for an out of range relocation.
998 (bfd_generic_get_relocated_section_contents): Remove reloc range
999 test.
1000
85880250
NC
1001 * coff-i860.c (CALC_ADDEND): Always set an addend value.
1002 * tekhex.c (getvalue): Add an end pointer parameter. Use it to
1003 avoid reading off the end of the buffer.
1004 (getsym): Likewise.
1005 (first_phase): Likewise.
1006 (pass_over): Pass an end pointer to the invoked function.
1007
533d0af0
L
10082015-01-05 H.J. Lu <hongjiu.lu@intel.com>
1009
1010 PR binutils/17512
1011 * elf32-i386.c (elf_i386_get_plt_sym_val): Return NULL on corrupt
1012 input.
1013 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
1014
896ca098
NC
10152015-01-05 Nick Clifton <nickc@redhat.com>
1016
1017 PR binutils/17512
1018 * archive.c (do_slurp_bsd_armap): Make sure that the parsed sized
1019 is at least big enough for the header to be read.
1020 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocs.
1021 * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add range checks.
1022 (bfd_mach_o_read_command): Prevetn duplicate error messages about
1023 unrecognized commands.
1024 * syms.c (_bfd_stab_section_find_nearest_line): Add range checks
1025 when indexing into the string table.
1026
b90efa5b 10272015-01-01 Alan Modra <amodra@gmail.com>
ee3b52e9 1028
b90efa5b 1029 Update year range in copyright notice of all files.
ee3b52e9 1030
b90efa5b 1031For older changes see ChangeLog-2014
56882138 1032\f
b90efa5b 1033Copyright (C) 2015 Free Software Foundation, Inc.
752937aa
NC
1034
1035Copying and distribution of this file, with or without modification,
1036are permitted in any medium without royalty provided the copyright
1037notice and this notice are preserved.
1038
56882138
AM
1039Local Variables:
1040mode: change-log
1041left-margin: 8
1042fill-column: 74
1043version-control: never
1044End: