PR symtab/17602
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
9a926d55
L
12014-12-02 H.J. Lu <hongjiu.lu@intel.com>
2
3 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Always
4 allow copy relocs for building executables.
5 (elf_x86_64_check_relocs): Allow copy relocs for non-GOT
6 pc-relative relocation in shared object.
7 (elf_x86_64_adjust_dynamic_symbol): Allocate copy relocs for
8 PIE.
9 (elf_x86_64_relocate_section): Don't copy a pc-relative
10 relocation into the output file if the symbol needs copy reloc.
11
538baf8b
AB
122014-12-02 Andrew Bennett <andrew.bennett@imgtec.com>
13
14 * elfxx-mips.c (mips_elf_calculate_relocation): Only check for
15 overflow on non-weak undefined symbols.
16
51aecdc5
AM
172014-12-02 Alan Modra <amodra@gmail.com>
18
19 * elf64-ppc.c (OPD_NDX): Define. Use throughout for sizing/indexing
20 _opd_sec_data array, halving required memory.
21 (sort_r_offset): New function.
22 (ppc64_elf_edit_opd): Sort incoming relocs. Accept .opd
23 sections with a mix of 16 and 24 byte OPD entries. Don't
24 attempt to honour --non-overlapping-opd for .opd sections with
25 unexpected relocs. Simplify opd entry size calculations by
26 first finding the reloc for the next entry. Make edit loop
27 handle one opd entry per iteration, with an inner loop
28 handling relocs per entry.
29
06614111
NC
302014-12-01 Nick Clifton <nickc@redhat.com>
31
32 PR binutils/17512
33 * archive.c (do_slurp_coff_armap): Add range checks to prevent
34 running off the end of the string table.
35 * compress.c (bfd_get_full_section_contents): Return a NULL
36 pointer for zero sized sections. Do not attempt to copy a buffer
37 onto itself.
38 * elf-attrs.c (_bfd_elf_parse_attributes): Check for an empty
39 header. Add range checks to avoid running off the end of the
40 section.
41 * elf.c (bfd_elf_get_str_section): Seek before allocating so that
42 if the seek fails, no memory is allocated.
43 (bfd_elf_string_from_elf_section): Do not allocate a string from a
44 non string section. It only leads to trouble later on.
45 (_bfd_elf_print_private_bfd_data): Check for there being too
46 little external dynamic data.
47 (bfd_section_from_shdr): Replace assertion with a failure mode.
48 (bfd_section_from_shdr): When walking a loaded group section use
49 the internal structure size, not the external size. Check for the
50 group section being empty.
51 * elf32-i386.c (elf_i386_rtype_to_howto): Replace assertion with a
52 failure mode.
53 * elfcode.h (elf_slurp_reloc_table): Likewise.
54 * reloc.c (bfd_perform_relocation): Avoid seg-fault if the howto
55 parameter is NULL.
56
7b20f099
AM
572014-11-30 Alan Modra <amodra@gmail.com>
58
59 PR 16452, 16457
60 * elflink.c (_bfd_elf_link_find_version_dependencies): Exclude
61 symbols from libraries that won't be listed in DT_NEEDED.
62 (elf_link_output_extsym): Don't output verdefs for such symbols.
63
25ff461f
AM
642014-11-28 Alan Modra <amodra@gmail.com>
65
66 * elf.c (_bfd_elf_slurp_version_tables): Exit loops when vn_next/
67 vna_next/vd_next/vda_next is zero. Correct counts.
68
1036838a
NC
692014-11-27 Nick Clifton <nickc@redhat.com>
70
71 PR binutils/17512
72 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Warn about and correct
73 a discrepancy between the isymMax and ifdMax values in the
74 symbolic header.
75 * elf.c (_bfd_elf_print_private_bfd_data): Fix the range check
76 scanning the external dynamic entries.
77
a1165289
NC
782014-11-26 Nick Clifton <nickc@redhat.com>
79
80 PR binutils/17512
81 * coff-h8300.c (rtype2howto): Replace abort with returning a NULL
82 value.
83 * coff-h8500.c (rtype2howto): Likewise.
84 * coff-tic30.c (rtype2howto): Likewise.
85 * coff-z80.c (rtype2howto): Likewise.
86 * coff-z8k.c (rtype2howto): Likewise.
87 * coff-ia64.c (RTYPE2HOWTO): Always return a valid howto.
88 * coff-m68k.c (m68k_rtype2howto): Return a NULL howto if none
89 could be found.
90 * coff-mcore.c (RTYPE2HOWTO): Add range checking.
91 * coff-w65.c (rtype2howto): Likewise.
92 * coff-we32k.c (RTYPE2HOWTO): Likewise.
93 * pe-mips.c (RTYPE2HOWTO): Likewise.
94 * coff-x86_64.c (coff_amd64_reloc): Likewise. Replace abort with
95 an error return.
96 * coffcode.h (coff_slurp_reloc_table): Allow the rel parameter to
97 be unused.
98 * coffgen.c (make_a_section_from_file): Check the length of a
99 section name before testing to see if it is a debug section name.
100 (coff_object_p): Zero out any uninitialised bytes in the opt
101 header.
102 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Test for the raw
103 source being empty when there are values to be processed.
104 (_bfd_ecoff_slurp_symbol_table): Add range check.
105 * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Likewise.
106 (bfd_mach_o_mangle_sections): Move test for too many sections to
107 before the allocation of the section table.
108 (bfd_mach_o_read_symtab_strtab): If the read fails, free the
109 memory and nullify the symbol pointer.
110 * reloc.c (bfd_generic_get_relocated_section_contents): Add
111 handling of a bfd_reloc_notsupported return value.
112 * versados.c (EDATA): Add range checking.
113 (get_record): Likewise.
114 (process_otr): Check for contents being available before updating
115 them.
116 (versados_canonicalize_reloc): Add range check.
117
601a03ba
AM
1182014-11-26 Alan Modra <amodra@gmail.com>
119
120 * elf.c (_bfd_elf_slurp_version_tables): Delay allocation of
121 internal verref buffer. Error for zero sh_info. Print errors.
122 Check for zero vd_ndx. Use bfd_zalloc for vd_auxptr buffer.
123
60bb06bc
L
1242014-11-25 H.J. Lu <hongjiu.lu@intel.com>
125
126 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Use
127 NAME##_get_symbol_version_string.
128 (bfd_get_symbol_version_string): New.
129 * aout-adobe.c (aout_32_get_symbol_version_string): Define using
130 _bfd_nosymbols define.
131 * aout-target.h (MY_get_symbol_version_string): Likewise.
132 * aout-tic30.c (MY_get_symbol_version_string): Likewise.
133 * binary.c (binary_get_symbol_version_string): Likewise.
134 * bout.c (aout_32_get_symbol_version_string): Likewise.
135 * coff-rs6000.c (_bfd_xcoff_get_symbol_version_string): Likewise.
136 * i386msdos.c (msdos_get_symbol_version_string): Likewise.
137 * i386os9k.c (aout_32_get_symbol_version_string): Likewise.
138 * ieee.c (ieee_get_symbol_version_string): Likewise.
139 * ihex.c (ihex_get_symbol_version_string): Likewise.
140 * libecoff.h (_bfd_ecoff_get_symbol_version_string): Likewise.
141 * mach-o-target.c (bfd_mach_o_get_symbol_version_string): Likewise.
142 * mmo.c (mmo_get_symbol_version_string): Likewise.
143 * nlm-target.h (nlm_get_symbol_version_string): Likewise.
144 * oasys.c (oasys_get_symbol_version_string): Likewise.
145 * pef.c (bfd_pef_get_symbol_version_string): Likewise.
146 * plugin.c (bfd_plugin_get_symbol_version_string): Likewise.
147 * ppcboot.c (ppcboot_get_symbol_version_string): Likewise.
148 * som.c (som_get_symbol_version_string): Likewise.
149 * srec.c (srec_get_symbol_version_string): Likewise.
150 * tekhex.c (tekhex_get_symbol_version_string): Likewise.
151 * versados.c (versados_get_symbol_version_string): Likewise.
152 * vms-alpha.c (alpha_vms_get_symbol_version_string): Likewise.
153 * xsym.c (bfd_sym_get_symbol_version_string): Likewise.
154
155 * coff64-rs6000.c (rs6000_xcoff64_vec): Use
156 coff_get_symbol_version_string.
157 (rs6000_xcoff64_aix_vec): Likewise.
158
159 * elf-bfd.h (bfd_elf_get_symbol_version_string): Renamed to ...
160 (_bfd_elf_get_symbol_version_string): This.
161 * elf.c: Likewise.
162 (bfd_elf_print_symbol): Updated.
163 * elfxx-target.h (bfd_elfNN_get_symbol_version_string): Define.
164
165 * libbfd-in.h (_bfd_nosymbols_get_symbol_version_string): Define.
166 * libcoff-in.h (coff_get_symbol_version_string): Likewise.
167 * bfd-in2.h: Regenerated.
168 * libbfd.h: Likewise.
169 * libcoff.h: Likewise.
170
bb4d2ac2
L
1712014-11-25 H.J. Lu <hongjiu.lu@intel.com>
172
173 PR binutils/16496
174 * elf-bfd.h (bfd_elf_get_symbol_version_string): New.
175 * elf.c (bfd_elf_get_symbol_version_string): New. Extracted
176 from bfd_elf_print_symbol.
177 (bfd_elf_print_symbol): Use it.
178
dd7e64d4
L
1792014-11-25 H.J. Lu <hongjiu.lu@intel.com>
180
181 * elf32-i386.c (elf_i386_got_plt_entry): New.
182 (elf_i386_pic_got_plt_entry): Likewise.
183 (elf_i386_link_hash_entry): Add plt_got.
184 (elf_i386_link_hash_table): Likewise.
185 (elf_i386_link_hash_newfunc): Initialize plt_got.offset to -1.
186 (elf_i386_get_local_sym_hash): Likewise.
187 (elf_i386_check_relocs): Create the GOT PLT if there are both
188 PLT and GOT references when the regular PLT is used.
189 (elf_i386_allocate_dynrelocs): Use the GOT PLT if there are
190 both PLT and GOT references unless pointer equality is needed.
191 (elf_i386_relocate_section): Also check the GOT PLT when
192 resolving R_386_PLT32.
193 (elf_i386_finish_dynamic_symbol): Use the GOT PLT if it is
194 available.
195
196 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add plt_got.
197 (elf_x86_64_link_hash_table): Likewise.
198 (elf_x86_64_link_hash_newfunc): Initialize plt_got.offset to -1.
199 (elf_x86_64_get_local_sym_hash): Likewise.
200 (elf_x86_64_check_relocs): Create the GOT PLT if there are both
201 PLT and GOT references when the regular PLT is used.
202 (elf_x86_64_allocate_dynrelocs): Use the GOT PLT if there are
203 both PLT and GOT references unless pointer equality is needed.
204 (elf_x86_64_relocate_section): Also check the GOT PLT when
205 resolving R_X86_64_PLT32.
206 (elf_x86_64_finish_dynamic_symbol): Use the GOT PLT if it is
207 available.
208
6e733cce
L
2092014-11-24 H.J. Lu <hongjiu.lu@intel.com>
210
211 * configure: Regenerated.
212
520c7b56
JW
2132014-11-24 Tejas Belagod <tejas.belagod@arm.com>
214
215 * elfnn-aarch64.c (elf_aarch64_compare_mapping): New.
216 (erratum_835769_scan): Sort map list.
217
e05fa0ba
AM
2182014-11-24 Alan Modra <amodra@gmail.com>
219
220 * elf64-ppc.c (plt_stub_pad): Correct.
221
6db50b4c
L
2222014-11-23 H.J. Lu <hongjiu.lu@intel.com>
223
224 * elf64-x86-64.c (elf_x86_64_check_relocs): Assert size of
225 elf_x86_64_bnd_plt2_entry and elf_x86_64_legacy_plt2_entry.
226 (elf_x86_64_allocate_dynrelocs): Don't assert size of
227 elf_x86_64_bnd_plt2_entry and elf_x86_64_legacy_plt2_entry.
228
35a14c6b
L
2292014-11-22 H.J. Lu <hongjiu.lu@intel.com>
230
231 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
232 branch displacement overflow in PLT entry.
233
0a9d414a
NC
2342014-11-21 Nick Clifton <nickc@redhat.com>
235
236 PR binutils/17512
237 * coffgen.c (coff_get_normalized_symtab): Check for an excessive
238 number of auxillary entries.
239 * ieee.c (next_byte): Convert to a function. Return FALSE if the
240 next byte is beyond the end of the buffer.
241 (parse_int): Test the return value of next_byte.
242 (parse_expression): Convert to boolean. Return FALSE if the
243 parsing failed. Test the return value of next_byte.
244 (ieee_seek): Convert to a function. Return FALSE if the seek goes
245 beyond the end of the buffer.
246 (ieee_slurp_external_symbols): Test the return value of ieee_seek
247 and next_byte.
248 (ieee_slurp_sections): Convert to boolean. Return FALSE if the
249 operation failed. Test the return value of ieee_seek and
250 next_byte.
251 (ieee_archive_p): Test the return value of ieee_seek and
252 next_byte.
253 (do_one): Likewise.
254 (ieee_slurp_section_data): Likewise.
255 (ieee_object_p): Likewise. Store the size of the buffer in the
256 total_amt field in the header.
257 * libieee.h (common_header_type): Add amt field.
258 * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Check that the
259 reloc's value is within range.
260 (bfd_mach_o_read_symtab_symbols): Nullify the symbols field if the
261 operation fails.
262 * pei-x86_64.c (pex64_xdata_print_uwd_codes): Replace abort with
263 an error message.
264 (pex64_dump_xdata): Check for buffer overflows.
265 * versados.c (process_otr): Check that the section exists before
266 taking its size.
267 (versados_object_p): Make sure that enough data was read for the
268 header to be checked.
269 * vms-alpha.c (vms_get_remaining_object_record): Change
270 read_so_far parameter to an unsigned int. Check that the amount
271 read is in range.
272
5974eba6
L
2732014-11-21 H.J. Lu <hongjiu.lu@intel.com>
274
275 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Optimize
276 PC-relative offset overflow check.
277
cd11f78f
AC
2782014-11-21 Alexander Cherepanov <cherepan@mccme.ru>
279
280 PR binutils/17512
281 * coffgen.c (_bfd_coff_read_string_table): Test allocation of
282 string table before clearing the first few bytes.
283
a715796b
TG
2842014-11-21 Terry Guo <terry.guo@arm.com>
285
286 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Support FPv5.
287
0cfb0717
AM
2882014-11-20 Alan Modra <amodra@gmail.com>
289
290 * elf64-ppc.c (group_sections): Init stub14_group_size from
291 --stub-group-size parameter divided by 1024.
292
1e269e9b
AM
2932014-11-20 Alan Modra <amodra@gmail.com>
294
295 * elf32-ppc.c (ppc_elf_relax_section): Correct ppc476 workaround
296 alignment calculation.
297
9274e9de
TG
2982014-11-20 Terry Guo <terry.guo@arm.com>
299
300 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Skip if input bfd
301 hasn't attribute section.
302
f9dffbf0
AM
3032014-11-20 Alan Modra <amodra@gmail.com>
304
305 * elf64-ppc.c (ppc64_elf_size_stubs): Add __go_go to thread_starters.
306
ab7fede8
L
3072014-11-18 H.J. Lu <hongjiu.lu@intel.com>
308
309 PR ld/17618
310 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
311 PC-relative offset overflow in PLT entry.
312
6937bb54
NC
3132014-11-18 Nick Clifton <nickc@redhat.com>
314
315 PR binutils/17512
316 * peXXIgen.c (pe_print_pdata): Fail if the section's virtual size
317 is larger than its real size.
318 (rsrc_print_section): Fix off-by-one error checking for overflow.
319 * pei-x86_64.c (pex64_bfd_print_pdata): Handle empty unwind
320 sections.
321
d258b828
IZ
3222014-11-18 Igor Zamyatin <igor.zamyatin@intel.com>
323
324 * elf64-x86-64.c (elf_x86_64_check_relocs): Enable MPX PLT only
325 for -z bndplt.
326
470c009b
NC
3272014-11-14 Nick Clifton <nickc@redhat.com>
328
329 PR binutils/17597
330 * opncls.c (bfd_get_debug_link_info): Avoid reading off the end of
331 the section.
332 (bfd_get_alt_debug_link_info): Likewise.
333
041830e0
NC
3342014-11-14 Nick Clifton <nickc@redhat.com>
335
336 PR binutils/17512
337 * ieee.c (ieee_archive_p) Skip processing if no bytes are read at
338 all.
339 (ieee_object_p): Likewise.
340
57494d81
L
3412014-11-13 H.J. Lu <hongjiu.lu@intel.com>
342
343 * coffcode.h (coff_slurp_line_table): Add cast to unsigned int.
344
f8521a03
L
3452014-11-13 H.J. Lu <hongjiu.lu@intel.com>
346
347 * coffcode.h (coff_pointerize_aux_hook): Fix a typo.
348
553d1284
L
3492014-11-13 H.J. Lu <hongjiu.lu@intel.com>
350
351 PR gas/17598
352 * elf64-x86-64.c (elf_x86_64_check_relocs): Treat
353 R_X86_64_GOTPLT64 the same as R_X86_64_GOT64.
354 (elf_x86_64_relocate_section): Likewise.
355
a5c71af8
NC
3562014-11-13 Nick Clifton <nickc@redhat.com>
357
358 PR binutils/17512
359 * coffcode.h (coff_ptr_struct): Add is_sym field.
360 (coff_new_section_hook): Set the is_sym field.
361 (coff_pointerize_aux_hook): Check the is_sym field.
362 (coff_print_aux): Likewise.
363 (coff_compute_section_file_positions): Likewise.
364 (coff_write_object_contents): Likewise.
365 (coff_slurp_line_table): Likewise.
366 (coff_slurp_symbol_table): Likewise.
367 (CALC_ADDEND): Likewise.
368 * coffgen.c (coff_renumber_symbols): Likewise.
369 (coff_mangle_symbols): Likewise.
370 (coff_fix_symbol_name): Likewise.
371 (coff_write_symbol): Likewise.
372 (coff_write_alien_symbol): Likewise.
373 (coff_write_native_symbol): Likewise.
374 (coff_write_symbols): Likewise.
375 (coff_write_linenumbers): Likewise.
376 (coff_pointerize_aux): Likewise.
377 (coff_get_normalized_symtab): Likewise.
378 (coff_get_symbol_info): Likewise.
379 (bfd_coff_get_syment): Likewise.
380 (bfd_coff_get_auxent): Likewise.
381 (coff_print_symbol): Likewise.
382 (coff_find_nearest_line_with_names): Likewise.
383 (bfd_coff_set_symbol_class): Likewise.
384 (coff_make_empty_symbol): Set the is_sym field.
385 (coff_bfd_make_debug_symbol): Likewise.
386 * peicode.h (pe_ILF_make_a_symbol): Likewise.
387 * libcoff.h: Regenerate.
388 * libcoff-in.h: Regenerate.
389
f41e4712
NC
3902014-11-12 Nick Clifton <nickc@redhat.com>
391
392 PR binutils/17512
393 * coffcode.h (coff_slurp_line_table): Set the line number of
394 corrupt entries to -1.
395 (coff_slurp_symbol_table): Alway initialise the value of the
396 symbol.
397 * coffgen.c (coff_print_symbol): Check that the combined pointer
398 is valid.
399 (coff_print_symbol): Do not print negative line numbers.
400 * peXXigen.c (pe_print_idata): Add range checking displaying
401 member names.
402
6bb3e679
AM
4032014-11-12 Alan Modra <amodra@gmail.com>
404
405 PR binutils/17512
406 * coffcode.h (coff_slurp_line_table): Drop line number info
407 not preceded by a valid function entry. Revert last change.
408
201159ec
NC
4092014-11-11 Nick Clifton <nickc@redhat.com>
410
411 PR binutils/17512
412 * coffcode.h (coff_slurp_line_table): Initialise the parts of the
413 line number cache that would not be initialised by the copy from
414 the new line number table.
415 (coff_classify_symbol): Allow for _bfd_coff_internal_syment_name
416 returning NULL.
417 * coffgen.c (coff_get_normalized_symbols): Get the external
418 symbols before allocating space for the internal symbols, in case
419 the get fails.
420 * elf.c (_bfd_elf_slurp_version_tables): Only allocate a verref
421 array if one is needed. Likewise with the verdef array.
422 * peXXigen.c (_bfd_XXi_swap_sym_in): Replace abort()'s with error
423 messages.
424 (_bfd_XXi_swap_aux_in): Make sure that all fields of the aux
425 structure are initialised.
426 (pe_print_edata): Avoid reading off the end of the data buffer.
427
0ac23374
AM
4282014-11-11 Alan Modra <amodra@gmail.com>
429
430 PR binutils/17512
431 * coffcode.h (coff_slurp_line_table): Use updated lineno_count
432 when building func_table.
433
fcfa6240
AM
4342014-11-11 Alan Modra <amodra@gmail.com>
435
436 PR binutils/17512
437 * coffcode.h (coff_slurp_line_table): Don't bfd_zalloc, just
438 memset the particular bits we need. Update src after hitting loop
439 "continue". Don't count lineno omitted due to invalid symbols in
440 nbr_func, and update lineno_count. Init entire terminating
441 lineno. Don't both allocating terminator in n_lineno_cache.
442 Redirect sym->lineno pointer to where n_lineno_cache will be
443 copied, and free n_lineno_cache.
444 * pe-mips.c (NUM_HOWTOS): Typo fix.
445
4de1599b
AM
4462014-11-11 Alan Modra <amodra@gmail.com>
447
448 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust section
449 size check to account for possible zero terminator.
450
fd6f9d17
RS
4512014-11-10 James Cowgill <James.Cowgill@imgtec.com>
452
453 * elfxx-mips.c (_bfd_mips_elf_section_processing): don't force small
454 data sections to be PROGBITS
455
36e9d67b
NC
4562014-11-10 Nick Clifton <nickc@redhat.com>
457
458 PR binutils/17521
459 * coff-i386.c (NUM_HOWTOS): New define.
460 (RTYPE2HOWTO): Use it.
461 (coff_i386_rtype_to_howto): Likewise.
462 (coff_i386_reloc_name_lookup): Likewise.
463 (CALC_ADDEND): Check that reloc r_type field is valid.
464 * coff-x86_64.c (NUM_HOWTOS): New define.
465 (RTYPE2HOWTO): Use it.
466 (coff_amd64_rtype_to_howto): Likewise.
467 (coff_amd64_reloc_name_lookup): Likewise.
468 (CALC_ADDEND): Check that reloc r_type field is valid.
469 * coffcode.h (coff_slurp_line_table): Check for symbol table
470 indexing underflow.
471 (coff_slurp_symbol_table): Use zalloc to ensure that all table
472 entries are initialised.
473 * coffgen.c (_bfd_coff_read_string_table): Initialise unused bits
474 in the string table. Also ensure that the table is 0 terminated.
475 (coff_get_normalized_symtab): Check for symbol table indexing
476 underflow.
477 * opncls.c (bfd_alloc): Catch the case where a small negative size
478 can result in only 1 byte being allocated.
479 (bfd_alloc2): Use bfd_alloc.
480 * pe-mips.c (NUM_HOWTOS): New define.
481 (coff_mips_reloc_name_lookup): Use it.
482 (CALC_ADDEND): Check that reloc r_type field is valid.
483 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Initialise unused entries
484 in the DataDirectory.
485 (pe_print_idata): Avoid reading beyond the end of the data block
486 wen printing strings.
487 (pe_print_edata): Likewise.
488 Check for table indexing underflow.
489 * peicode.h (pe_mkobject): Initialise the pe_opthdr field.
490 (pe_bfd_object_p): Allocate and initialize enough space to hold a
491 PEAOUTHDR, even if the opt_hdr field specified less.
492
d1f5d98a
AM
4932014-11-08 Alan Modra <amodra@gmail.com>
494
495 * peXXigen.c (pe_print_idata): Revert last patch, cast lhs instead.
496
01158262
L
4972014-11-07 H.J. Lu <hongjiu.lu@intel.com>
498
499 * peXXigen.c (pe_print_idata): Cast to unsigned long in range
500 checks.
501
cf61b747
L
5022014-11-07 H.J. Lu <hongjiu.lu@intel.com>
503
504 PR ld/17482
505 * elf64-x86-64.c (elf_x86_64_relocate_section): Update comments
506 for IE->LE transition.
507
56aedec7
AM
5082014-11-07 Alan Modra <amodra@gmail.com>
509
510 * tekhex.c (tekhex_set_arch_mach): Ignore unknown arch errors.
511
e5242d4b
AM
5122014-11-07 Alan Modra <amodra@gmail.com>
513
514 * tekhex.c (CHUNK_SPAN): Define.
515 (struct data_struct <chunk_init>): Use one byte per span, update
516 all code accessing this field.
517 (find_chunk): Add create param, don't create new entry unless set.
518 (insert_byte): Don't save zeros.
519 (first_phase): Set section SEC_CODE or SEC_DATA flag depending
520 on symbol type. Create an alternate section if both types of
521 symbol are given. Attach type '2' and '6' symbols to absolute
522 section.
523 (move_section_contents): Fix caching of chunk. Don't create chunk
524 when reading, or for writing zeros.
525 (tekhex_set_section_contents): Don't create initial chunks.
526 (tekhex_write_object_contents): Use CHUNK_SPAN.
527
7c53fd1c
AM
5282014-11-07 Alan Modra <amodra@gmail.com>
529
530 * aoutx.h (aout_get_external_symbols): Tidy allocation of symbol buffer.
531
40572405
AM
5322014-11-07 Alan Modra <amodra@gmail.com>
533
534 * archive.c (_bfd_slurp_extended_name_table): Revert bfd_get_size check.
535 * coffcode.h (coff_set_alignment_hook): Likewise.
536 (coff_slurp_line_table): Likewise.
537 * coffgen.c (coff_get_normalized_symtab): Likewise.
538 (_bfd_coff_get_external_symbols): Likewise.
539 * elf.c (bfd_elf_get_str_section): Likewise.
540 * tekhex.c (first_phase): Likewise.
541
83410725
NC
5422014-11-06 Nick Clifton <nickc@redhat.com>
543
544 * aoutx.h (slurp_symbol_table): Revert previous delta.
545 (slurp_reloc_table): Likewise.
546 * compress.c (bfd_get_full_section_contents): Remove file size
547 test.
548 * coffgen.c (coff_get_normalized_symtab): Allow zero-sized symtabs
549 and do not complain about linker generated files.
550
1fe9dc45
WN
5512014-11-06 Will Newton <will.newton@linaro.org>
552
553 * elf-attrs.c (_bfd_elf_parse_attributes): Handle zero
554 length sections and sub-sections.
555
a6f921c8
NC
5562014-11-04 Nick Clifton <nickc@redhat.com>
557
558 PR binutils/17512
559 * coffcode.h (handle_COMDAT): Replace abort with BFD_ASSERT.
560 Replace another abort with an error message.
561 (coff_slurp_line_table): Add more range checking.
562 * peXXigen.c (pe_print_debugdata): Add range checking.
563
131e2f8e
MF
5642014-11-05 James Cowgill <james.cowgill@imgtec.com>
565
566 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Fix segfault
567 when creating a dso with discarded dynsym section.
568
09c14161
MF
5692014-11-05 Matthew Fortune <matthew.fortune@imgtec.com>
570
571 * elfxx-mips.c (update_mips_abiflags_isa): Add E_MIPS_ARCH_32R6
572 and E_MIPS_ARCH_64R6 support.
573
20ad5e28
NC
5742014-11-05 Nick Clifton <nickc@redhat.com>
575
576 PR binutils/17512
577 * coffcode.h (coff_set_alignment_hook): Warn if the file lies
578 about the number of relocations it contains.
579 (coff_sort_func_alent): Return 0 if the pointers are NULL.
580 (coff_slurp_line_table): Add more range checks. Do not free new
581 tables created when sorting line numbers.
582 * peXXigen.c (pe_print_idata): Add range checks.
583 (pe_print_edata): Likewise.
584 (rsrc_print_resource_entries): Likewise. Avoid printing control
585 characters. Terminate priniting if corruption is detected.
586 (rsrc_print_resource_directory): Terminate printing if an unknown
587 directory type is encountered.
588 (pe_print_debugdata): Fix off-by-one error.
589 (rsrc_count_entries): Add range checking.
590 (rsrc_parse_entry): Likewise.
591
bb0d8671
NC
5922014-11-04 Nick Clifton <nickc@redhat.com>
593
79f2a78e
NC
594 PR binutils/17512
595 * compress.c (bfd_get_full_section_contents): Improve test for
596 linker created objects.
597
bb0d8671
NC
598 PR binutils/17533
599 * archive.c (_bfd_slurp_extended_name_table): Handle archives with
600 corrupt extended name tables.
601
ef42b83e
AM
6022014-11-04 Alan Modra <amodra@gmail.com>
603
604 * elf32-spu.c (ovl_mgr_stat): New function.
605 (spu_elf_open_builtin_lib): Pass to bfd_openr_iovec.
606
931b79cc
AB
6072014-11-03 Andrew Burgess <andrew.burgess@embecosm.com>
608
609 * elf32-avr.c (elf32_avr_relax_delete_bytes): During linker
610 relaxation, reduce the size of symbols that span the deleted
611 bytes.
612
a12d0ffc
AB
6132014-11-03 Andrew Burgess <andrew.burgess@embecosm.com>
614
615 * elf32-avr.c (elf32_avr_relax_delete_bytes): Modify symbols
616 located at the very end of the section.
617
5a3f568b
NC
6182014-11-03 Nick Clifton <nickc@redhat.com>
619
620 PR binutils/17512
621 * aoutx.h (slurp_symbol_table): Check that computed table size is
622 not bigger than the file from which is it being read.
623 (slurp_reloc_table): Likewise.
624 * coffcode.h (coff_slurp_line_table): Remove unneeded local
625 'warned'. Do not try to print the details of a symbol with an
626 invalid index.
627 * coffgen.c (make_a_sectiobn_from_file): Check computed string
628 index against length of string table.
629 (bfd_coff_internal_syment_name): Check read in string offset
630 against length of string table.
631 (build_debug_section): Return a pointer to the section used.
632 (_bfd_coff_read_string_table): Store the length of the string
633 table in the coff_tdata structure.
634 (bfd_coff_free_symbols): Set the length of the string table to
635 zero when it is freed.
636 (coff_get_normalized_symtab): Check offsets against string table
637 or data table lengths as appropriate.
638 * cofflink.c (_bfd_coff_link_input_bfd): Check offset against
639 length of string table.
640 * compress.c (bfd_get_full_section_contents): Check computed size
641 against the size of the file.
642 * libcoff-in.h (obj_coff_strings_len): Define.
643 (struct coff_tdata): Add strings_len field.
644 * libcoff.h: Regenerate.
645 * peXXigen.c (pe_print_debugdata): Do not attempt to print the
646 data if the debug section is too small.
647 * xcofflink.c (xcoff_link_input_bfd): Check offset against
648 length of string table.
649
ba241f2d
NC
6502014-11-03 Nick Clifton <nickc@redhat.com>
651
652 * po/fi.po: Updated Finnish translation.
653
2c629856
N
6542014-10-31 Andrew Pinski <apinski@cavium.com>
655 Naveen H.S <Naveen.Hurugalawadi@caviumnetworks.com>
656
657 * archures.c: Add octeon3 for mips target.
658 * bfd-in2.h: Regenerate.
659 * bfd/cpu-mips.c: Define I_mipsocteon3.
660 nfo_struct): Add octeon3 support.
661 * bfd/elfxx-mips.c: (_bfd_elf_mips_mach): Add support for
662 octeon3.
663 (mips_set_isa_flags): Add support for octeon3.
ba241f2d 664 (bfd_mips_isa_ext): Add bfd_mach_mips_octeon3.
2c629856
N
665 (mips_mach_extensions): Make bfd_mach_mips_octeon3 an
666 extension of bfd_mach_mips_octeon2.
667 (print_mips_isa_ext): Print the value of Octeon3.
668
f54498b4
NC
6692014-10-31 Nick Clifton <nickc@redhat.com>
670
671 PR binutils/17512
672 * coffgen.c (_bfd_coff_get_external_symbols): Do not try to load a
673 symbol table bigger than the file.
674 * elf.c (bfd_elf_get_str_section): Do not try to load a string
675 table bigger than the file.
690725fa 676 * tekhex.c (first_phase): Check that the section range is sane.
f54498b4 677
7e760b06
NC
6782014-10-30 Nick Clifton <nickc@redhat.com>
679
680 PR binutils/17512
0102ea8c 681 * ihex.c (ihex_scan): Fix typo in invocation of ihex_bad_byte.
7e760b06
NC
682 * coffgen.c (coff_get_normalized_symtab): Prevent buffer overrun.
683
e5b470e2
NC
6842014-10-29 Nick Clifton <nickc@redhat.com>
685
686 * elf.c (bfd_section_from_shdr): Fix heap use after free memory
687 leak.
688
d1e8523e
DB
6892014-10-29 Dennis Brueni <dbrueni@slickedit.com>
690
e5b470e2 691 * elf.c (elfcore_write_lwpstatus): Fix typo in call to memcpy.
d1e8523e 692
5a4b0ccc
NC
6932014-10-28 Nick Clifton <nickc@redhat.com>
694
695 PR binutils/17512
696 * elf.c (bfd_section_from_shdr): Allocate and free the recursion
697 detection table on a per-bfd basis.
698 * peXXigen.c (pe_print_edata): Handle binaries with a truncated
699 export table.
700
708d7d0d
NC
7012014-10-28 Andreas Schwab <schwab@suse.de>
702 Nick Clifton <nickc@redhat.com>
703
704 PR binutils/17510
705 * srec.c (srec_bad_byte): Increase size of buf to allow for
706 negative values.
707 (srec_scan): Use an unsigned char buffer to hold header bytes.
708
493a3386
NC
7092014-10-27 Nick Clifton <nickc@redhat.com>
710
7e1e1988 711 PR binutils/17512
bf67003b
NC
712 * elf.c (bfd_section_from_shdr): Detect and warn about ELF
713 binaries with a group of sections linked by the string table
714 indicies.
7e1e1988
NC
715 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Handle corrupt binaries
716 with an invalid value for NumberOfRvaAndSizes.
bf67003b
NC
717 (pe_print_edata): Detect out of range rvas and entry counts for
718 the Export Address table, Name Pointer table and Ordinal table.
7e1e1988 719
493a3386
NC
720 PR binutils/17510
721 * elf.c (setup_group): Improve handling of corrupt group
722 sections.
723
68fcca92
JW
7242014-10-24 Tejas Belagod <tejas.belagod@arm.com>
725
726 * bfd-in.h (bfd_elf64_aarch64_set_options): Add a parameter.
727 * bfd-in2.h (bfd_elf64_aarch64_set_options): Likewise.
728 * elfnn-aarch64.c (aarch64_erratum_835769_stub): New.
729 (elf_aarch64_stub_type): Add new type
730 aarch64_stub_erratum_835769_veneer.
731 (elf_aarch64_stub_hash_entry): New fields for erratum 835769.
732 (aarch64_erratum_835769_fix): New data struct to record erratum
733 835769.
734 (elf_aarch64_link_hash_table: Global flags for 835769.
735 (aarch64_build_one_stub): Add case for 835769.
736 (aarch64_size_one_stub): Likewise.
737 (aarch64_mem_op_p, aarch64_mlxl_p,
738 aarch64_erratum_sequence,erratum_835769_scan):
739 New. Decode and scan functions for erratum 835769.
740 (elf_aarch64_create_or_find_stub_sec): New.
741 (elfNN_aarch64_size_stubs): Look for erratum 835769 and record
742 them.
743 (bfd_elfNN_aarch64_set_options: Set global flag for 835769.
744 (erratum_835769_branch_to_stub_data,
745 make_branch_to_erratum_835769_stub):New. Connect up all the
746 erratum stubs to occurances by branches.
747 (elfNN_aarch64_write_section): New hook.
748 (aarch64_map_one_stub): Output erratum stub symbol.
749 (elfNN_aarch64_size_dynamic_sections): Init mapping symbol
750 information for erratum 835769.
751 (elf_backend_write_section): Define.
752
685e70ae
VK
7532014-10-23 Victor Kamensky <victor.kamensky@linaro.org>
754
755 * elf32-arm.c (read_code32): New function to read 32 bit
756 arm instruction.
757 (read_code16): New function to read 16 bit thumb instrution.
758 (elf32_arm_plt0_size, elf32_arm_plt_size): Use read_code32
759 and read_code16 to read instructions.
760
00ac7aa0
MF
7612014-10-22 Matthew Fortune <matthew.fortune@imgtec.com>
762
763 * elfxx-mips.c (print_mips_ases): Print unknown ASEs.
764 (print_mips_isa_ext): Print the value of an unknown extension.
765
73242275
AM
7662014-10-21 Alan Modra <amodra@gmail.com>
767
768 * elf64-ppc.c (ppc64_elf_tls_optimize): Ignore relocs against toc
769 entries that aren't a multiple of 8 rather than failing assertion.
770
2300b5a1
AM
7712014-10-21 Alan Modra <amodra@gmail.com>
772
773 * elf64-ppc.c (ppc64_elf_size_stubs): Add gcc-4.9 libgomp functions
774 to thread_starter.
775
b53dfeb2
AM
7762014-10-18 Alan Modra <amodra@gmail.com>
777
778 * elf64-ppc.c (ppc64_elf_add_symbol_hook): If function code
779 section for function symbols defined in .opd is discarded, let
780 the symbol appear to be undefined.
781 (opd_entry_value): Ensure the result section is that for the
782 function code section in the same object as the OPD entry.
783
f1885d1e
AM
7842014-10-16 Alan Modra <amodra@gmail.com>
785
786 PR 17492
787 * elf32-arm.c (elf32_arm_add_symbol_hook): Only set has_gnu_symbols
788 on ELF output bfd.
789 * elf32-i386.c (elf_i386_add_symbol_hook): Likewise.
790 * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
791 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
792 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
793 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
794 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
795 * elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise.
796 * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
797 * elf-s390-common.c (elf_s390_add_symbol_hook): Likewise. Handle
798 STB_GNU_UNIQUE too.
799
459609d6
AM
8002014-10-16 Alan Modra <amodra@gmail.com>
801
802 * elf64-ppc.c (ppc64_elf_before_check_relocs): Do .opd processing
803 even when output is not ppc64 ELF. Remove redundant tests on
804 type of input bfd.
805
fb167eb2
AM
8062014-10-15 Alan Modra <amodra@gmail.com>
807
808 PR 17481
809 * aoutx.h (NAME (aout, find_nearest_line)): Add "discriminator_ptr"
810 param, group "section" and "offset" params. Zero discriminator.
811 * bfd.c (bfd_find_nearest_line): Implement with new
812 _bfd_find_nearest_line.
813 (bfd_find_nearest_line_discriminator): Likewise.
814 * coff-i386.c (_bfd_generic_find_nearest_line_discriminator): Don't
815 define.
816 * coff-rs6000.c (xcoff_find_nearest_line,
817 xcoff_find_nearest_line_discriminator): Delete.
818 (_bfd_xcoff_find_nearest_line): Don't define.
819 (_bfd_xcoff_find_nearest_line): Define as coff_find_nearest_line.
820 * coff-x86_64.c (_bfd_generic_find_nearest_line_discriminator): Don't
821 define.
822 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Adjust.
823 * coffgen.c (coff_find_nearest_line_with_names): Reorder params,
824 adjust _bfd_dwarf2_find_nearest_line call.
825 (coff_find_nearest_line): Add "discriminator_ptr" param, reorder
826 others. Set discriminator. Adjust call.
827 (coff_find_nearest_line_discriminator): Delete.
828 * dwarf1.c (_bfd_dwarf1_find_nearest_line): Reorder params.
829 * dwarf2.c (find_line): Rename to..
830 (_bfd_dwarf2_find_nearest_line): ..this, reordering params.
831 Simplify setting of do_line. Delete old function.
832 (_bfd_dwarf2_find_line): Delete.
833 * ecoff.c (_bfd_ecoff_find_nearest_line): Reorder params, add
834 discriminator_ptr and set it.
835 * elf-bfd.h (_bfd_elf_find_nearest_line): Update prototype.
836 (_bfd_elf_find_nearest_line_discriminator): Delete.
837 (_bfd_elf_find_line_discriminator): Delete.
838 (_bfd_generic_find_nearest_line_discriminator): Don't define.
839 * elf.c (elf_find_function): Reorder params.
840 (_bfd_elf_find_nearest_line): Reorder params, add discriminator_ptr.
841 Adjust calls.
842 (_bfd_elf_find_nearest_line_discriminator): Delete.
843 (_bfd_elf_find_line): Adjust call.
844 * elf32-arm.c (arm_elf_find_function): Reorder params.
845 (elf32_arm_find_nearest_line): Reorder params, add discriminator_ptr.
846 Adjust calls.
847 * elf64-alpha.c (elf64_alpha_find_nearest_line): Similarly.
848 * elfnn-aarch64.c (aarch64_elf_find_function): Reorder params.
849 (elfNN_aarch64_find_nearest_line): Reorder params, add
850 discriminator_ptr. Adjust calls.
851 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Similarly.
852 * elfxx-mips.h (_bfd_mips_elf_find_nearest_line): Update prototype.
853 * libaout.h (NAME (aout, find_nearest_line)): Update prototype.
854 * libbfd-in.h (_bfd_nosymbols_find_nearest_line): Update.
855 (_bfd_dwarf1_find_nearest_line): Likewise.
856 (_bfd_dwarf2_find_nearest_line): Likewise.
857 (_bfd_dwarf2_find_line): Delete.
858 (_bfd_generic_find_nearest_line_discriminator): Delete.
859 * libbfd.c (_bfd_generic_find_nearest_line_discriminator): Delete.
860 * libcoff-in.h (coff_find_nearest_line): Update prototype.
861 (coff_find_nearest_line_discriminator): Delete.
862 (coff_find_nearest_line_with_names): Update prototype.
863 * libecoff.h (_bfd_ecoff_find_nearest_line): Update prototype.
864 * mach-o.c (bfd_mach_o_find_nearest_line): Reorder params, add
865 discriminator_ptr. Adjust calls.
866 * mach-o.h (bfd_mach_o_find_nearest_line): Update prototype.
867 * pdp11.c (NAME (aout, find_nearest_line)): Reorder params, add
868 discriminator_ptr and set.
869 * som.c (som_find_nearest_line): Similarly.
870 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Delete entry for
871 _bfd_find_nearest_line_discriminator.
872 (struct bfd_target <_bfd_find_nearest_line>): Adjust prototype.
873 (struct bfd_target <_bfd_find_nearest_line_discriminator>): Delete.
874 * vms-alpha.c (_bfd_vms_find_nearest_dst_line): Rename to..
875 (_bfd_vms_find_nearest_line): ..this. Reorder params, add
876 "discriminator" and set.
877 (_bfd_vms_find_nearest_line_discriminator): Delete.
878 (_bfd_generic_find_nearest_line_discriminator): Don't define.
879 (alpha_vms_find_nearest_line): Update define.
880 * bfd-in2.h: Regenerate.
881 * libbfd.h: Regenerate.
882 * libcoff.h: Regenerate.
883
9c461f7d
AM
8842014-10-15 Alan Modra <amodra@gmail.com>
885
886 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Use NAME##_find_line.
887 * aout-adobe.c (aout_32_find_line): Define.
888 (aout_32_bfd_make_debug_symbol, aout_32_bfd_reloc_type_lookup,
889 aout_32_bfd_reloc_name_lookup): Define using _bfd_nosymbols define.
890 * aout-target.h (MY_find_line): Define.
891 * aout-tic30.c (MY_find_line): Define.
892 * binary.c (binary_find_line): Define.
893 * bout.c (aout_32_find_line): Define.
894 * coff-rs6000.c (_bfd_xcoff_find_line): Define.
895 * coff64-rs6000.c (rs6000_xcoff64_vec): Use coff_find_line.
896 (rs6000_xcoff64_aix_vec): Likewise.
897 * elf-bfd.h (_bfd_generic_find_line): Don't define.
898 * elfxx-target.h (bfd_elfNN_find_line): Define.
899 * i386msdos.c (msdos_find_line): Define.
900 * i386os9k.c (aout_32_find_line): Define.
901 * ieee.c (ieee_find_nearest_line, ieee_find_inliner_info): Delete func.
902 (ieee_find_nearest_line, ieee_find_line,
903 ieee_find_inliner_info): Define.
904 * ihex.c (ihex_find_line): Define.
905 * libbfd-in.h (_bfd_nosymbols_find_line): Define.
906 (_bfd_generic_find_line): Don't define.
907 * libbfd.c (_bfd_generic_find_line): Delete.
908 * libcoff-in.h (coff_find_line): Define.
909 * libecoff.h (_bfd_ecoff_find_line): Define.
910 * mach-o.h (bfd_mach_o_find_line): Define.
911 * mmo.c (mmo_find_line): Define.
912 * nlm-target.h (nlm_find_line): Define.
913 * oasys.c (oasys_find_nearest_line, oasys_find_inliner_info): Delete.
914 (oasys_find_nearest_line, oasys_find_line,
915 oasys_find_inliner_info): Define.
916 * pef.c (bfd_pef_find_line): Define.
917 * plugin.c (bfd_plugin_find_line): Define.
918 * ppcboot.c (ppcboot_find_line): Define.
919 * som.c (som_find_line): Define.
920 * srec.c (srec_find_line): Define.
921 * tekhex.c (tekhex_find_line): Define.
922 * versados.c (versados_find_line): Define.
923 * vms-alpha.c (alpha_vms_find_line): Define.
924 * xsym.c (bfd_sym_find_line): Define.
925 * bfd-in2.h: Regenerate.
926 * libbfd.h: Regenerate.
927 * libcoff.h: Regenerate.
928
91dc4e0a
TG
9292014-10-15 Tristan Gingold <gingold@adacore.com>
930
931 * version.m4: Bump version to 2.25.51
932 * configure: Regenerate.
933
5697705a
L
9342014-10-14 H.J. Lu <hongjiu.lu@intel.com>
935
936 * elf32-i386.c (elf_i386_convert_mov_to_lea): Skip if relocation
937 offset is less than 2.
938 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
939
65879393
AM
9402014-10-14 Alan Modra <amodra@gmail.com>
941
942 PR 17453
943 * libbfd.c (COERCE16, COERCE32, COERCE64): Use unsigned types.
944 (EIGHT_GAZILLION): Delete.
945
5b69e357
AM
9462014-10-13 Alan Modra <amodra@gmail.com>
947
948 PR 17467
949 * elf-eh-frame.c (ENSURE_NO_RELOCS): Don't stop at first NONE reloc.
950 (_bfd_elf_parse_eh_frame): When relocatable output, don't set
951 flags enabling conversion of CIEs and FDEs to use relative encoding.
952 (find_merged_cie): Similarly.
953 (_bfd_elf_write_section_eh_frame): Don't edit FDEs when
954 relocatable, except for CIE pointer.
955 * elflink.c (bfd_elf_reloc_symbol_deleted_p): Return true for
956 relocs against symbols in dropped comdat group sections.
957 (bfd_elf_discard_info): Do some eh_frame optimisation when
958 relocatable.
959
3d68f91c
JM
9602014-10-09 Jose E. Marchesi <jose.marchesi@oracle.com>
961
962 * elfxx-sparc.c (_bfd_sparc_elf_merge_private_bfd_data): Handle
963 the hwcaps2 object attribute.
964
c2aaac08
AM
9652014-10-04 Alan Modra <amodra@gmail.com>
966
967 PR 17447
968 * elf-bfd.h (struct eh_cie_fde): Comment re NULL u.fde.cie_inf.
969 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Mark zero address
970 range FDEs for discarding.
971 (vma_compare): Sort on range after address.
972 (_bfd_elf_gc_mark_fdes): Test for NULL u.fde.cie_inf.
973 (_bfd_elf_discard_section_eh_frame): Likewise. Write "FDE" in
974 error message rather than "fde".
975 (_bfd_elf_write_section_eh_frame_hdr): Write "PC" and "FDE" in
976 error message.
977
cf7363b4
L
9782014-09-29 H.J. Lu <hongjiu.lu@intel.com>
979
980 PR ld/17440
981 * elf32-i386.c (elf_i386_fbsd_post_process_headers): Fix build
982 for OLD_FREEBSD_ABI_LABEL.
983
e44f5bef
MT
9842014-09-24 Markus Trippelsdorf <markus@trippelsdorf.de>
985
986 PR 17422
987 * plugin.c (try_claim): New function. Moved from
988 bfd_plugin_object_p.
989 (try_load_plugin): Pass through bfd. Add test.
990 (load_plugin): Pass through bfd.
991 (bfd_plugin_object_p): Move logic to try_claim.
992
331ed130
SA
9932014-09-23 Sterling Augustine <augustine.sterling@gmail.com>
994
995 * elf32-xtensa.c (is_resolvable_asm_expansion): for cross-section
996 call relaxation use furthermost addresses where call source and
997 destination can be to check whether it's in the range of a direct
998 call.
999
aa8f4d1e
AM
10002014-09-22 Alan Modra <amodra@gmail.com>
1001
1002 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame_hdr): Don't return
1003 false for overflow or overlapping FDEs. Give more detail in
1004 error messages.
1005
c3eb94b4
MF
10062014-09-22 Andrew Bennett <andrew.bennett@imgtec.com>
1007
1008 * elfxx-mips.c (mips_elf_calculate_relocation): Don't sign extend
1009 the addend if relocations are RELA.
1010
f4cb41f4
KLC
10112014-09-22 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1012
1013 * elf32-nds32.c (nds32_elf_ex9_build_hash_table,
1014 nds32_elf_ex9_relocation_check): Synchronize the argument type.
1015
e00d879a
AK
10162014-09-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1017
1018 * elf32-s390.c: Don't replace R_390_TLS_LE32 with R_390_TLS_TPOFF
1019 for PIE.
1020 * elf64-s390.c: Don't replace R_390_TLS_LE64 with R_390_TLS_TPOFF
1021 for PIE.
1022
92c9bcd4
JK
10232014-09-18 Jan Kratochvil <jan.kratochvil@redhat.com>
1024
1025 PR gdb/17407
1026 * elfcode.h (bfd_from_remote_memory): Use SIZE for HIGH_OFFSET.
1027
70e99720
TG
10282014-09-16 Terry Guo <terry.guo@arm.com>
1029
1030 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Return false if
1031 failed to merge.
1032
1c8f6a4d
KLC
10332014-09-16 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1034
1035 * bfd-in2.h: Regenerate.
1036 * elf32-nds32.c (nds32_elf_mkobject): Hook bfd_elf32_mkobject.
1037 (nds32_elf_relax_section): Code refactoring.
1038 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2,
1039 nds32_elf_relax_longcall3, nds32_elf_relax_longcall4,
1040 nds32_elf_relax_longcall5, nds32_elf_relax_longcall6): Relax call
1041 pattern. The first three is moved from nds32_elf_relax_section,
1042 and the last three is new function.
1043 (nds32_elf_relax_longjump1, nds32_elf_relax_longjump2,
1044 nds32_elf_relax_longjump3, nds32_elf_relax_longjump4,
1045 nds32_elf_relax_longjump5, nds32_elf_relax_longjump6,
1046 nds32_elf_relax_longjump7): Relax condition branch pattern. The first
1047 three is moved from nds32_elf_relax_section, and the last four
1048 is new function.
1049 (nds32_elf_relax_loadstore, nds32_elf_relax_lo12): Relax load-store
1050 pattern and address setting pattern.
1051 (nds32_elf_relax_piclo12, nds32_elf_relax_ptr,
1052 nds32_elf_relax_pltgot_suff, nds32_elf_relax_got_suff,
1053 nds32_elf_relax_gotoff_suff): Relax pic pattern.
1054 (nds32_elf_relax_letlslo12, nds32_elf_relax_letlsadd,
1055 nds32_elf_relax_letlsls): Relax TLS pattern.
1056 (nds32_relax_adjust_label): Adjust alignment and nop.
1057 (nds32_elf_pick_relax): Choose relaxation optimization.
1058 (nds32_elf_get_relocated_section_contents): New hook.
1059 (nds32_elf_order_insn_times, nds32_elf_ex9_build_itable): Release ex9
1060 table 234th entry.
1061 * elf32-nds32.h: Declare.
1062 * libbfd.h: Regenerate.
1063 * reloc.c: Add nds32 new relocations.
1064
6d74e8a1
CG
10652014-09-15 Chen Gang <gang.chen.5i5j@gmail.com>
1066
1067 * dwarf2.c (find_abstract_instance_name): Use 'form' instead of
1068 'name' for the typo issue, which related with commit
1069 60d77146a249ae9b51d7ce98930cdbedb2cfa352.
1070
7361da2c
AB
10712014-09-15 Andrew Bennett <andrew.bennett@imgtec.com>
1072 Matthew Fortune <matthew.fortune@imgtec.com>
1073
1074 * aoutx.h (NAME (aout, machine_type)): Add mips32r6 and mips64r6.
1075 * archures.c (bfd_architecture): Likewise.
1076 * bfd-in2.h (bfd_architecture): Likewise.
1077 (bfd_reloc_code_real): Add relocs BFD_RELOC_MIPS_21_PCREL_S2,
1078 BFD_RELOC_MIPS_26_PCREL_S2, BFD_RELOC_MIPS_18_PCREL_S3 and
1079 BFD_RELOC_MIPS_19_PCREL_S2.
1080 * cpu-mips.c (arch_info_struct): Add mips32r6 and mips64r6.
1081 * elf32-mips.c: Define relocs R_MIPS_PC21_S2, R_MIPS_PC26_S2
1082 R_MIPS_PC18_S3, R_MIPS_PC19_S2, R_MIPS_PCHI16 and R_MIPS_PCLO16.
1083 (mips_reloc_map): Add entries for BFD_RELOC_MIPS_21_PCREL_S2,
1084 BFD_RELOC_MIPS_26_PCREL_S2, BFD_RELOC_MIPS_18_PCREL_S3,
1085 BFD_RELOC_MIPS_19_PCREL_S2, BFD_RELOC_HI16_S_PCREL and
1086 BFD_RELOC_LO16_PCREL.
1087 * elf64-mips.c: Define REL, and RELA relocations R_MIPS_PC21_S2,
1088 R_MIPS_PC26_S2, R_MIPS_PC18_S3, R_MIPS_PC19_S2, R_MIPS_PCHI16
1089 and R_MIPS_PCLO16.
1090 (mips_reloc_map): Add entries for BFD_RELOC_MIPS_21_PCREL_S2,
1091 BFD_RELOC_MIPS_26_PCREL_S2, BFD_RELOC_MIPS_18_PCREL_S3,
1092 BFD_RELOC_MIPS_19_PCREL_S2, BFD_RELOC_HI16_S_PCREL and
1093 BFD_RELOC_LO16_PCREL.
1094 * elfn32-mips.c: Likewise.
1095 * elfxx-mips.c (MIPSR6_P): New define.
1096 (mipsr6_exec_plt_entry): New array.
1097 (hi16_reloc_p): Add support for R_MIPS_PCHI16.
1098 (lo16_reloc_p): Add support for R_MIPS_PCLO16.
1099 (aligned_pcrel_reloc_p): New function.
1100 (mips_elf_relocation_needs_la25_stub): Add support for relocs:
1101 R_MIPS_PC21_S2 and R_MIPS_PC26_S2.
1102 (mips_elf_calculate_relocation): Add support for relocs:
1103 R_MIPS_PC21_S2, R_MIPS_PC26_S2, R_MIPS_PC18_S3, R_MIPS_PC19_S2,
1104 R_MIPS_PCHI16 and R_MIPS_PCLO16.
1105 (_bfd_elf_mips_mach): Add support for mips32r6 and mips64r6.
1106 (mips_elf_add_lo16_rel_addend): Add support for R_MIPS_PCHI16.
1107 (_bfd_mips_elf_check_relocs): Add support for relocs:
1108 R_MIPS_PC21_S2 and R_MIPS_PC26_S2.
1109 (_bfd_mips_elf_relocate_section): Add a check for unaligned
1110 pc relative relocs.
1111 (_bfd_mips_elf_finish_dynamic_symbol): Add support for MIPS r6
1112 plt entry.
1113 (mips_set_isa_flags): Add support for mips32r6 and mips64r6.
1114 (_bfd_mips_elf_print_private_bfd_data): Likewise.
1115 (mips_32bit_flags_p): Add support for mips32r6.
1116 * libbfd.h (bfd_reloc_code_real_names): Add entries for
1117 BFD_RELOC_MIPS_21_PCREL_S2, BFD_RELOC_MIPS_26_PCREL_S2,
1118 BFD_RELOC_MIPS_18_PCREL_S3 and BFD_RELOC_MIPS_19_PCREL_S2.
1119 * reloc.c: Document relocs BFD_RELOC_MIPS_21_PCREL_S2,
1120 BFD_RELOC_MIPS_26_PCREL_S2, BFD_RELOC_MIPS_18_PCREL_S3 and
1121 BFD_RELOC_MIPS_19_PCREL_S2.
1122 * config.bfd: Add mips*-img-elf* target triple.
1123
a9d58c06
AB
11242014-09-12 Andrew Bennett <andrew.bennett@imgtec.com>
1125
1126 * config.bfd: Add mips*-img-elf* target triple.
1127
ae6c7e33
AM
11282014-09-12 Alan Modra <amodra@gmail.com>
1129
1130 * elf-bfd.h (struct eh_frame_array_ent): Add "range".
1131 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Stash address
1132 range of FDEs to hdr_info->array.
1133 (_bfd_elf_write_section_eh_frame_hdr): Report overflow in
1134 .eh_frame_hdr entries, and overlapping FDEs.
1135
a485e98e
AM
11362014-09-10 Alan Modra <amodra@gmail.com>
1137
1138 * elf.c (assign_file_positions_except_relocs): Move section header
1139 placement to..
1140 (_bfd_elf_assign_file_positions_for_relocs): ..here. Make static.
1141 * elf-bfd.h (_bfd_elf_assign_file_positions_for_relocs): Delete.
1142 * elflink.c (bfd_elf_final_link): Don't call above function.
1143
6128f9cf
AM
11442014-08-30 Alan Modra <amodra@gmail.com>
1145
1146 * elf32-ppc.c (ppc_elf_relax_section): Fix off by one error.
1147
4805fc55
AM
11482014-08-29 Alan Modra <amodra@gmail.com>
1149
1150 * elf64-ppc.c (ppc64_elf_relocate_section): Report a different
1151 error for calls via a toc adjusting stub without a nop.
1152
b138affb
AM
11532014-08-29 Alan Modra <amodra@gmail.com>
1154
1155 * vms-alpha.c (alpha_vma_object_p): Don't return file_truncated
1156 error. Remove redundant bfd_set_error.
1157
bd25671c
AM
11582014-08-29 Alan Modra <amodra@gmail.com>
1159
1160 * srec.c (srec_scan): Revert last change. Report an error for
1161 S-records with less than the miniumum byte count.
1162
376c8d5b
L
11632014-08-28 H.J. Lu <hongjiu.lu@intel.com>
1164
1165 * srec.c (srec_scan): Return error for 0 size.
1166
c8831961
L
11672014-08-27 H.J. Lu <hongjiu.lu@intel.com>
1168
1169 PR ld/17306
1170 * elf32-i386.c (elf_i386_convert_mov_to_lea): Use bfd_is_abs_section
1171 to check discarded input section.
1172 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
1173
29a9f53e
L
11742014-08-27 H.J. Lu <hongjiu.lu@intel.com>
1175
1176 PR ld/17313
1177 * elflink.c (elf_link_add_object_symbols): Don't attach dynamic
1178 sections to input from ld --just-symbols.
1179
32e79d39
DD
11802014-08-26 DJ Delorie <dj@redhat.com>
1181
1182 * elf32-rl78.c (rl78_elf_relax_section): Disambiguate test for
1183 relaxation type.
1184
614b09ce
JW
11852014-08-26 Jiong Wang <jiong.wang@arm.com>
1186
1187 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Initialize non_got_ref
1188 properly for MOVW_G0/1/2_NC and MOVW_G3. Reject them when linking
1189 shared library.
1190 (elfNN_aarch64_gc_sweep_hook): Add check on these relocs.
1191
0d6d4c82
NC
11922014-08-26 Nick Clifton <nickc@redhat.com>
1193
1194 * config.bfd: Fix typo in or1knd selection.
1195
a4a027b7
KT
11962014-08-22 Kai Tietz <ktietz@redhat.com>
1197
1198 PR binutils/11822
1199 * coffcode.h (coff_compute_section_file_positions): Keep
1200 FileAlignment valid as set.
1201
4564fb94
AM
12022014-08-22 Alan Modra <amodra@gmail.com>
1203
1204 * elf-eh-frame.c (struct cie): Delete "output_sec" field.
1205 (cie_eq, cie_compute_hash): Use output_section from cie_inf instead.
1206
da44f4e5
AM
12072014-08-22 Alan Modra <amodra@gmail.com>
1208
1209 * elf-bfd.h (struct eh_frame_hdr_info): Delete merge_cies and
1210 parsed_eh_frames.
1211 (_bfd_elf_begin_eh_frame_parsing): Delete.
1212 (_bfd_elf_end_eh_frame_parsing): Delete.
1213 * elf-eh-frame.c (_bfd_elf_begin_eh_frame_parsing): Delete.
1214 (_bfd_elf_end_eh_frame_parsing): Delete.
1215 (_bfd_elf_parse_eh_frame): Don't test parsed_eh_frame. Test
1216 !info->relocatable in place of merge_cies.
1217 * elflink.c (bfd_elf_gc_sections, bfd_elf_discard_info): Adjust.
1218 * elf64-ppc.c (glink_eh_frame_cie): Pad to multiple of 8.
1219 (ppc64_elf_size_stubs): Likewise pad stub FDE.
1220 (ppc64_elf_build_stubs): Move code setting glink .eh_frame to..
1221 (ppc64_elf_size_stubs): ..here and..
1222 (ppc64_elf_finish_dynamic_sections): ..here.
1223
1d7c9635
MR
12242014-08-21 Maciej W. Rozycki <macro@codesourcery.com>
1225
1226 * elf64-ppc.h (ppc64_elf_set_toc): Fix indentation.
1227
c5423981
TG
12282014-08-21 Tony Wang <tony.wang@arm.com>
1229
1230 * elf32-arm.c (elf32_arm_final_link_relocate): Implement
1231 the veneer routine for R_ARM_THM_JUMP19.
1232 (arm_type_of_stub): Add conditional clause for R_ARM_THM_JUMP19
1233 (elf32_arm_size_stub): Ditto.
1234
469a3493
RM
12352014-08-20 Roland McGrath <mcgrathr@google.com>
1236
1237 PR ld/17277
1238 * elf32-arm.c (elf32_arm_check_relocs): Increment P->pc_count for
1239 all reloc types with pc_relative set in the howto, not just for
1240 R_ARM_REL32 and R_ARM_REL32_NOI.
1241 (allocate_dynrelocs_for_symbol): Update comment.
1242 (elf32_arm_gc_sweep_hook): For all reloc types with pc_relative
1243 set in the howto, set call_reloc_p and may_need_local_target_p but
1244 not may_become_dynamic_p; not only for R_ARM_REL32 and R_ARM_REL32_NOI.
1245 (elf32_arm_check_relocs): Likewise.
1246
01e6c1a4
WN
12472014-08-20 Will Newton <will.newton@linaro.org>
1248
1249 * config.bfd: Default armeb-*-eabi* to big endian.
1250
2974be62
AM
12512014-08-19 Alan Modra <amodra@gmail.com>
1252
1253 * configure: Regenerate.
1254
1009ef28
AM
12552014-08-18 Alan Modra <amodra@gmail.com>
1256
1257 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Don't attempt to
1258 use dynrelocs for ifunc.
1259 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Similarly.
1260
1240be6b
AM
12612014-08-18 Alan Modra <amodra@gmail.com>
1262
1263 PR 17287
1264 * elflink.c (on_needed_list): Only consider libraries that have
1265 been loaded.
1266
75938853
AM
12672014-08-18 Alan Modra <amodra@gmail.com>
1268
1269 * elflink.c (bfd_elf_discard_info): Return int error status.
1270 * stabs.c (_bfd_discard_section_stabs): Comment typo fix.
1271 * bfd-in.h (bfd_elf_discard_info): Updata prototype.
1272 * bfd-in2.h: Regenerate.
1273
513ea82e
AM
12742014-08-14 Alan Modra <amodra@gmail.com>
1275
1276 * peXXigen.c (pe_print_reloc): Protect against access past end
1277 of .reloc section.
1278
18cd5bce
AM
12792014-08-14 Alan Modra <amodra@gmail.com>
1280
1281 PR 16563
1282 * elflink.c (bfd_elf_discard_info): Process .eh_frame and .stab
1283 in the order they are mapped to output sections.
1284
b879806f
AM
12852014-08-14 Alan Modra <amodra@gmail.com>
1286
1287 * configure.ac: Delete redundant plugin related checks.
1288 * configure: Regenerate.
1289
ffccb7af
SK
12902014-08-13 Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
1291
1292 * elf32-or1k.c (or1k_elf_relocate_section, or1k_elf_check_relocs,
1293 allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL
1294 and SYMBOLIC_BIND.
1295
46135103
AM
12962014-08-12 Alan Modra <amodra@gmail.com>
1297
1298 * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Only call "notice"
1299 here when not calling the generic add_symbol function. Formatting.
1300 Correct handling of indirect symbols. Update notice call.
1301 * elflink.c (_bfd_elf_notice_as_needed): Update notice call.
1302 * linker.c (_bfd_generic_link_add_one_symbol): Create indirect
1303 symbols early. Update notice call. Add comments regarding weak
1304 symbols vs. indirect.
1305
88d3f087
AM
13062014-08-12 Alan Modra <amodra@gmail.com>
1307
1308 PR ld/16746
1309 * linker.c (_bfd_generic_link_add_one_symbol <WARN>): Handle
1310 !lto_plugin_active.
1311
7f59d2ac
CG
13122014-08-07 Chen Gang <gang.chen.5i5j@gmail.com>
1313
1314 * coff-ppc.c (coff_ppc_relocate_section): Ensure local symbols are
1315 zero terminated.
1316
db712946
L
13172014-08-07 H.J. Lu <hongjiu.lu@intel.com>
1318 Alan Modra <amodra@gmail.com>
1319
1320 PR ld/16746
1321 * linker.c (_bfd_generic_link_add_one_symbol): Don't issue a
1322 warning for references in LTO IR to warning symbols.
1323
59c26567
AM
13242014-08-07 Alan Modra <amodra@gmail.com>
1325
1326 * linker.c (WARN, CWARN): Collapse these states to WARN.
1327 (_bfd_generic_link_add_one_symbol): Use old CWARN case for
1328 new WARN.
1329
aaffae57
DE
13302014-08-05 Doug Evans <dje@google.com>
1331
1332 * bfd-in2.h: Regenerate.
1333 * libcoff.h: Regenerate.
1334
e034b2cc
MR
13352014-08-05 Maciej W. Rozycki <macro@codesourcery.com>
1336
1337 * elfxx-mips.c (_bfd_mips_elf_discard_info): Set section's
1338 rawsize if changing size.
1339
7833fb7b
AM
13402014-08-05 Alan Modra <amodra@gmail.com>
1341
1342 PR ld/17226
1343 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Typo fix.
1344
02eb0a49
AM
13452014-08-05 Alan Modra <amodra@gmail.com>
1346
1347 * linker.c (generic_link_check_archive_element): Move handling
1348 of command link -u symbols with a common symbol def to the
1349 code handling non-common symbols so that archive element symbols
1350 are loaded. Use generic_link_add_object_symbols.
1351
13e570f8
AM
13522014-08-05 Alan Modra <amodra@gmail.com>
1353
1354 PR 13557
1355 * linker.c (struct archive_list, struct archive_hash_entry,
1356 struct archive_hash_table, archive_hash_newfunc,
1357 archive_hash_table_init, archive_hash_lookup, archive_hash_allocate,
1358 archive_hash_table_free): Delete.
1359 (_bfd_generic_link_add_archive_symbols): Add h and name params to
1360 checkfn. Rewrite using a straight-forward scan over archive map.
1361 (generic_link_check_archive_element_no_collect,
1362 generic_link_check_archive_element_collect,
1363 generic_link_check_archive_element): Add h and name params.
1364 * aoutx.h (aout_link_check_archive_element): Likewise.
1365 * pdp11.c (aout_link_check_archive_element): Likewise.
1366 * xcofflink.c (xcoff_link_check_archive_element): Likewise.
1367 * cofflink.c (coff_link_check_archive_element): Likewise. Don't
1368 scan symbols, simply add archive element whenever h is undefined.
1369 (coff_link_check_ar_symbols): Delete.
1370 * ecoff.c (read_ext_syms_and_strs): Delete.
1371 (reread_ext_syms_and_strs): Delete.
1372 (ecoff_link_check_archive_element): Add h and name param. Don't
1373 scan symbols, simply add based on h. Use ecoff_link_add_object_symbols.
1374 * elflink.c (elf_link_is_defined_archive_symbol): Don't test
1375 archive_pass.
1376 (elf_link_add_archive_symbols): Delete "defined" array, merge
1377 functionality into "included". Make "included" a char array. Don't
1378 set or test archive_pass.
1379 * libbfd-in.h (_bfd_generic_link_add_archive_symbols): Update.
1380 * libbfd.h: Regenerate.
1381
8c784016
KK
13822014-08-01 Takashi Yoshii <yoshii.takashi@renesas.com>
1383
1384 PR 10373
1385 * elf32-sh.c (sh_elf_relax_section): Add jmp to bra relaxing.
1386
351cdf24
MF
13872014-07-29 Matthew Fortune <matthew.fortune@imgtec.com>
1388
1389 * elfxx-mips.c (ABI_O32_P, MIPS_ELF_ABIFLAGS_SECTION_NAME_P): New macro.
1390 (mips_elf_obj_tdata): Add abiflags and abiflags_valid fields.
1391 (bfd_mips_elf_swap_abiflags_v0_in): New function.
1392 (bfd_mips_elf_swap_abiflags_v0_out): Likewise.
1393 (_bfd_mips_elf_section_from_shdr): Handle SHT_MIPS_ABIFLAGS.
1394 (_bfd_mips_elf_fake_sections): Likewise.
1395 (_bfd_mips_elf_always_size_sections): Handle .MIPS.abiflags.
1396 (_bfd_mips_elf_additional_program_headers): Account for new
1397 PT_MIPS_ABIFLAGS program header.
1398 (_bfd_mips_elf_modify_segment_map): Create PT_MIPS_ABIFLAGS segment and
1399 associate with .MIPS.abiflags.
1400 (_bfd_mips_elf_gc_mark_extra_sections): New function.
1401 (bfd_mips_isa_ext, update_mips_abiflags_isa): New static function.
1402 (infer_mips_abiflags): Likewise.
1403 (_bfd_mips_elf_final_link): Handle .MIPS.abiflags.
1404 (mips_32bit_flags_p): Moved higher.
1405 (mips_elf_merge_obj_attributes, _bfd_mips_fp_abi_string): Error
1406 checking for FP ABIs.
1407 (_bfd_mips_elf_merge_private_bfd_data): Restructure and add abiflags
1408 checks. Check EF_MIPS_FP64 flag consistency.
1409 (print_mips_ases, print_mips_isa_ext): New static function.
1410 (print_mips_fp_abi_value, get_mips_reg_size): Likewise.
1411 (_bfd_mips_elf_print_private_bfd_data): Display abiflags data.
1412 (_bfd_mips_post_process_headers): Set EI_ABIVERSION = 3 for
1413 Val_GNU_MIPS_ABI_FP_64 or Val_GNU_MIPS_ABI_FP_64A.
1414 * elfxx-mips.h (_bfd_mips_elf_gc_mark_extra_sections): New prototype.
1415 * elf32-mips.c (elf_backend_gc_mark_extra_sections): Implement.
1416 * elfn32-mips.c (elf_backend_gc_mark_extra_sections): Implement.
1417 * elf64-mips.c (elf_backend_gc_mark_extra_sections): Implement.
1418
b794fc1d
AM
14192014-07-28 Alan Modra <amodra@gmail.com>
1420
1421 PR 13227
1422 * archive.c (_bfd_compute_and_write_armap): Warn on adding
1423 __gnu_lto_slim to armap.
1424 * linker.c (_bfd_generic_link_add_one_symbol): Warn on adding
1425 __gnu_lto_slim to linker hash table.
1426
48494700
AG
14272014-07-27 Anthony Green <green@moxielogic.org>
1428
1429 * config.bfd: Add moxie-*-moxiebox*.
1430
3d52a869
JS
14312014-07-21 Joel Sherrill <joel.sherrill@oarcorp.com>
1432
1433 Add or reactivate or1k-*-rtems*
1a8bdf69 1434 * config.bfd (or1k-*-rtems*): Reactivate.
3d52a869 1435
cca5b8b6
L
14362014-07-16 H.J. Lu <hongjiu.lu@intel.com>
1437
1438 * elf32-i386.c (elf_i386_plt_sym_val): Match PLT entry only for
1439 ELFOSABI_GNU input.
1440 * elf64-x86-64.c (elf_x86_64_plt_sym_val): Likewise.
1441 (elf_x86_64_plt_sym_val_offset_plt_bnd): Likewise.
1442
144bed8d
L
14432014-07-16 H.J. Lu <hongjiu.lu@intel.com>
1444
1445 PR binutils/17154
1446 * elf32-i386.c (elf_i386_plt_sym_val): Only match R_*_JUMP_SLOT
1447 and R_*_IRELATIVE relocation offset with PLT entry.
1448 * elf64-x86-64.c (elf_x86_64_plt_sym_val): Likewise.
1449 (elf_x86_64_plt_sym_val_offset_plt_bnd): New.
1450 (elf_x86_64_get_synthetic_symtab): Use it.
1451
998d811a
L
14522014-07-15 H.J. Lu <hongjiu.lu@intel.com>
1453
1454 PR ld/17057
1455 * elf32-i386.c (elf_i386_compute_jump_table_size): Replace
1456 next_tls_desc_index with elf.srelplt->reloc_count.
1457
87f14779
AM
14582014-07-15 Alan Modra <amodra@gmail.com>
1459
1460 * cache.c (cache_bread_1): Don't return -1 when fread returns
1461 a positive value.
1462
cd3416da
AM
14632014-07-15 Alan Modra <amodra@gmail.com>
1464
1465 * elflink.c (elf_merge_st_other): Update comments. Simplify
1466 visibility handling. Make isym const. Move code modifying
1467 isym->st_other for --exclude-libs to..
1468 (elf_link_add_object_symbols): ..here.
1469
17ca87fc
MN
14702014-07-11 Maks Naumov <maksqwe1@ukr.net>
1471
1472 PR 17141
1473 * elf.c (_bfd_elf_strtab_add): Check strtab name for failure.
1474
5bc8cb6f
NC
14752014-07-08 Nick Clifton <nickc@redhat.com>
1476
1477 PR ld/17110
1478 * elf32-sh.c (sh_elf_osec_to_segment): Do not look for output
1479 segments in input bfds.
1480
7572ca89
WN
14812014-07-08 Will Newton <will.newton@linaro.org>
1482
1483 * elf32-arm.c (ELF_MAXPAGESIZE): Increase the default
1484 value to 64kB and remove custom setting for NaCl.
1485
bffebb6b
AM
14862014-07-08 Alan Modra <amodra@gmail.com>
1487
1488 * elflink.c (_bfd_elf_copy_link_hash_symbol_type): Copy st_other
1489 bits from source to dest.
1490 * linker.c (_bfd_generic_copy_link_hash_symbol_type): Update comment.
1491 * targets.c (struct bfd_target <_bfd_copy_link_hash_symbol_type>):
1492 Likewise.
1493 * bfd-in2.h: Regenerate.
1494
2e0488d3
JW
14952014-07-08 Jiong Wang <jiong.wang@arm.com>
1496
1497 * elfnn-aarch64.c (elf_backend_rela_normal): Set to 1.
1498 (elfNN_aarch64_relocate_section): Remove duplicated addend adjustment
1499 when info->relocatable be true.
1500
75f58085
BS
15012014-07-07 Barney Stratford <barney_stratford@fastmail.fm>
1502
1503 * elf32-avr.c: Handle R_AVR_PORT5 and R_AVR_PORT6.
1504 * reloc.c: Add BFD_RELOC_AVR_PORT5 and BFD_RELOC_AVR_PORT6.
1505 * bfd-in2.h: Regenerate.
1506 * libbfd.h: Regenerate.
1507
1110793a
AM
15082014-07-04 Alan Modra <amodra@gmail.com>
1509
1510 * Makefile.am: Update "configure.in" comments.
1511 * PORTING: Likewise.
1512 * aoutx.h: Likewise.
1513 * configure.host: Likewise.
1514 * doc/bfdint.texi: Likewise.
1515 * targets.c: Likewise.
1516 * warning.m4: Likewise.
1517 * Makefile.in: Regenerate.
1518
35eafcc7
AM
15192014-07-04 Alan Modra <amodra@gmail.com>
1520
1521 * configure.ac: Rename from configure.in.
1522 * Makefile.in: Regenerate.
1523 * config.in: Regenerate.
1524 * doc/Makefile.in: Regenerate.
1525
82b57a90
AM
15262014-07-04 Alan Modra <amodra@gmail.com>
1527
1528 * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Remove configure.in.
1529 * Makefile.in: Regenerate.
1530
2e98a7bd
AM
15312014-07-04 Alan Modra <amodra@gmail.com>
1532
1533 * version.m4: New file.
1534 * configure.in: Include version.m4.
1535 (AC_INIT): Update.
1536 * Makefile.am (RELEASE): Delete.
1537 (bfdver.h): Depend on development.sh, use instead of RELEASE.
1538 * Makefile.in: Regenerate.
1539 * doc/Makefile.in: Regenerate.
1540
d1eca1e4
AM
15412014-07-02 Alan Modra <amodra@gmail.com>
1542
1543 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Clear
1544 pointer_equality_needed when !readonly_dynrelocs.
1545 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1546
afb93314
AM
15472014-07-02 Alan Modra <amodra@gmail.com>
1548
1549 * elf32-ppc.c (ppc_elf_check_relocs): Set DF_STATIC_TLS for PIEs too.
1550 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1551
b6a1c03a
AM
15522014-07-01 Alan Modra <amodra@gmail.com>
1553
1554 * bfd.c (struct bfd): Reorganise for better packing. Delete
1555 "ifd" field. Make "format", "direction" and "flags" bitfields.
1556 (HAS_LOAD_PAGE): Delete, renumber following flags.
1557 * bfd-in2.h: Regenerate.
1558 * coff-tic4x.c: Remove HAS_LOAD_PAGE from extra flags in target vecs.
1559
7341d5e2
AM
15602014-07-01 Alan Modra <amodra@gmail.com>
1561
1562 * elf64-ppc.c (ppc_stub_type): Add ppc_stub_global_entry.
1563 (struct ppc_link_hash_table): Increase size of stub_count array.
1564 (build_global_entry_stubs): Emit symbol on global entry stub.
1565 (ppc64_elf_build_stubs): NULL check htab->brlt. Add global entry
1566 stub stats.
1567
810d4e75
AM
15682014-07-01 Alan Modra <amodra@gmail.com>
1569
1570 * elf64-ppc.c (abiversion, set_abiversion): Move earlier.
1571 (ppc64_elf_branch_reloc): Adjust addend for ELFv2 local offset.
1572 (ppc64_elf_set_toc): Set ".TOC." symbol value when using
1573 generic linker.
1574 (ppc64_elf_relocate_section): Disable ELFv2 function entry
1575 optimisation when --traditional-format.
1576
f36e8886
BS
15772014-07-01 Barney Stratford <barney_stratford@fastmail.fm>
1578 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1579 Pitchumani Sivanupandi <pitchumani.s@atmel.com>
1580 Soundararajan <Sounderarajan.D@atmel.com>
1581
1582 * archures.c: Add avrtiny architecture for avr target.
1583 * cpu-avr.c (arch_info_struct): Add avrtiny arch info.
1584 * elf32-avr.c (elf_avr_howto_table): New relocation R_AVR_LDS_STS_16
1585 added for 16 bit LDS/STS instruction of avrtiny arch.
1586 (avr_reloc_map): Reloc R_AVR_LDS_STS_16 is mapped to
1587 BFD_RELOC_AVR_LDS_STS_16.
1588 (bfd_elf_avr_final_write_processing): Select machine number
1589 avrtiny arch.
1590 (elf32_avr_object_p): Set machine number for avrtiny arch.
1591 * reloc.c: Add documentation for BFD_RELOC_AVR_LDS_STS_16 reloc.
1592 * bfd-in2.h: Regenerate.
1593 * libbfd.h: Regenerate.
1594
60d77146
NC
15952014-06-26 Nick Clifton <nickc@redhat.com>
1596
1597 PR binutils/16949
1598 * dwarf2.c (is_str_attr): New function.
1599 (find_abstract_instance_name): Use it to determine when an
1600 attribute has a string value.
1601
15bfcc77
AM
16022014-06-24 Alan Modra <amodra@gmail.com>
1603
1604 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Arrange to keep
1605 .sdata/.sdata2 when _SDA_BASE_/_SDA2_BASE_ should be output
1606 for --emit-relocs.
1607
886aba9e
PDM
16082014-06-21 Philippe De Muyter <phdm@macqel.be>
1609
1610 * targets.c (_bfd_target_vector): Add missing #ifdef BFD64 for
1611 a number of targets.
1612
eea6dad2
KM
16132014-06-20 Kyle McMartin <kyle@redhat.com>
1614
1615 * elf32-arm.c (elf32_arm_check_relocs): Set DF_STATIC_TLS when
1616 emitting initial-exec relocs when not linking an executable.
1617
9f19ab6d
WN
16182014-06-16 Will Newton <will.newton@linaro.org>
1619
1620 * elf32-arm.c (elf32_arm_allocate_plt_entry): Increment
1621 htab->next_tls_desc_index in the non-IPLT case.
1622 Calculate GOT offset correctly for the non-IPLT case.
1623 (allocate_dynrelocs_for_symbol): Don't increment
1624 htab->next_tls_desc_index here.
1625
eb9a5ecf
AM
16262014-06-16 Alan Modra <amodra@gmail.com>
1627
1628 * elf32-vax.c (elf_vax_size_dynamic_sections): Clear linker
1629 created sections.
1630
d0ae9fbd
OJ
16312014-06-13 Omair Javaid <omair.javaid@linaro.org>
1632
1633 * elfxx-aarch64.c (stdarg.h): Include.
1634 (string.h): Include.
1635 (_bfd_aarch64_elf_grok_prstatus): Updated.
1636 (_bfd_aarch64_elf_grok_psinfo): New function.
1637 (_bfd_aarch64_elf_write_core_note): New function.
1638 * elfxx-aarch64.h (elf_backend_grok_psinfo): Define.
1639 (elf_backend_write_core_note): Define.
1640
d495ab0d
AM
16412014-06-13 Alan Modra <amodra@gmail.com>
1642
1643 * archive.c: Include bfdlink.h.
1644 (_bfd_archive_close_and_cleanup): Call linker hash_table_free.
1645 * bfd.c (struct bfd): Add is_linker_output field.
1646 * elf-bfd.h (_bfd_elf_link_hash_table_free): Update prototype.
1647 * linker.c (_bfd_link_hash_table_init): Set up hash_table_free,
1648 link.hash and is_linker_output.
1649 (_bfd_generic_link_hash_table_free): Replace bfd_link_hash_table*
1650 param with bfd*. Assert is_linker_output and link.hash, and
1651 clear them before exit.
1652 * elf-m10300.c (elf32_mn10300_link_hash_table_free): Replace
1653 bfd_link_hash_table* param with bfd*. Hack is_linker_output
1654 and link.hash so we can free two linker hash tables.
1655 (elf32_mn10300_link_hash_table_create): Create static_hash_table
1656 first. Clean up on errors. Set hash_table_free pointer.
1657 * elf32-arm.c (elf32_arm_link_hash_table_free): Replace
1658 bfd_link_hash_table* param with bfd*.
1659 (elf32_arm_link_hash_table_create): Clean up on errors. Set
1660 hash_table_free pointer.
1661 * elf32-avr.c, * elf32-hppa.c, * elf32-i386.c, * elf32-m68hc1x.c,
1662 * elf32-m68k.c, * elf32-metag.c, * elf32-nios2.c, * elf32-xgate.c,
1663 * elf64-ia64-vms.c, * elf64-ppc.c, * elf64-x86-64.c, * elflink.c,
1664 * elfnn-aarch64.c, * elfnn-ia64.c, * elfxx-sparc.c,
1665 * xcofflink.c: Similarly.
1666 * simple.c (bfd_simple_get_relocated_section_contents): Save and
1667 clear link.next before creating linker hash table. Clean up on
1668 errors, and restore link.next on exit.
1669 * elf32-m68hc1x.h (m68hc11_elf_bfd_link_hash_table_free): Delete.
1670 * elf32-xgate.h (xgate_elf_bfd_link_hash_table_free): Delete.
1671 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table_free): Delete.
1672 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Delete.
1673 * hash.c (bfd_hash_table_init_n): Free table on error.
1674 * libbfd-in.h (_bfd_generic_link_hash_table_free): Update proto.
1675 * bfd-in2.h: Regenerate.
1676 * libbfd.h: Regenerate.
1677 * libcoff.h: Regenerate.
1678
caa4096e
AM
16792014-06-13 Alan Modra <amodra@gmail.com>
1680
1681 PR 17047
1682 * targets.c (BFD_JUMP_TABLE): Delete NAME##_bfd_link_hash_table_free.
1683 (struct bfd_target <_bfd_link_hash_table_free>): Delete.
1684 * bfd.c (bfd_link_hash_table_free): Don't define.
1685 * aout-adobe.c, * aout-target.h, * aout-tic30.c, * binary.c, * bout.c,
1686 * coff64-rs6000.c, * coffcode.h, * elf-m10300.c, * elf32-arm.c,
1687 * elf32-avr.c, * elf32-hppa.c, * elf32-i386.c, * elf32-m68hc11.c,
1688 * elf32-m68hc12.c, * elf32-m68k.c, * elf32-metag.c, * elf32-nios2.c,
1689 * elf32-sparc.c, * elf32-xgate.c, * elf64-ia64-vms.c, * elf64-ppc.c,
1690 * elf64-sparc.c, * elf64-x86-64.c, * elfnn-aarch64.c, * elfnn-ia64.c,
1691 * elfxx-target.h, * i386msdos.c, * i386os9k.c, * ieee.c, * ihex.c,
1692 * libbfd-in.h, * libecoff.h, * mach-o-target.c, * mmo.c,
1693 * nlm-target.h, * oasys.c, * pef.c, * plugin.c, * ppcboot.c, * som.c,
1694 * srec.c, * tekhex.c, * verilog.c, * versados.c, * vms-alpha.c,
1695 * xsym.c: Don't define various link_hash_table_free defines, and
1696 remove from bfd_target vars. Temporarily reference some of the
1697 target link_hash_table_free functions to avoid warnings.
1698 * bfd-in2.h: Regenerate.
1699 * libbfd.h: Regenerate.
1700
68faa637
AM
17012014-06-13 Alan Modra <amodra@gmail.com>
1702
1703 * elf-m10300.c, * elf32-arm.c, * elf32-avr.c, * elf32-hppa.c,
1704 * elf32-i386.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-metag.c,
1705 * elf32-nios2.c, * elf64-ia64-vms.c, * elf64-ppc.c, * elf64-x86-64.c,
1706 * elfnn-aarch64.c, * elfnn-ia64.c, * elfxx-sparc.c, * xcofflink.c:
1707 Move link_hash_table_free functions before their corresponding
1708 link_hash_table_create functions.
1709
c72f2fb2
AM
17102014-06-13 Alan Modra <amodra@gmail.com>
1711
1712 * bfd.c (struct bfd): Replace link_next with a union.
1713 * aoutx.h, * bfd.c, * coff-ppc.c, * coff-rs6000.c, * cofflink.c,
1714 * ecoff.c, * elf-m10300.c, * elf32-arm.c, * elf32-avr.c,
1715 * elf32-hppa.c, * elf32-i386.c, * elf32-lm32.c, * elf32-m32c.c,
1716 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-metag.c,
1717 * elf32-microblaze.c, * elf32-nds32.c, * elf32-nios2.c,
1718 * elf32-or1k.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-s390.c,
1719 * elf32-score.c, * elf32-score7.c, * elf32-sh.c, * elf32-spu.c,
1720 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-xstormy16.c,
1721 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
1722 * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-x86-64.c,
1723 * elflink.c, * elfnn-aarch64.c, * elfxx-mips.c, * elfxx-sparc.c,
1724 * elfxx-tilegx.c, * linker.c, * pdp11.c, * peXXigen.c, * simple.c,
1725 * sunos.c, * vms-alpha.c, * xcofflink.c: Update for above.
1726 * bfd-in2.h: Regenerate.
1727
7ed689ad
AM
17282014-06-11 Alan Modra <amodra@gmail.com>
1729
1730 * linker.c (unwrap_hash_lookup): Add missing parens.
1731
07821655
KT
17322014-06-11 Kai Tietz <ktietz@redhat.com>
1733
1734 * libcoff-in.h (coff_tdata): Make relocbase member unsigned.
1735 * libcoff.h: Regenerated.
1736
7b8e2718
AM
17372014-06-10 Alan Modra <amodra@gmail.com>
1738
b71c4043 1739 PR ld/16910
7b8e2718 1740 * linker.c (unwrap_hash_lookup): New function.
1a8bdf69 1741 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Call unwrap_hash_lookup.
7b8e2718
AM
1742 * elf32-i370.c (i370_elf_relocate_section): Likewise.
1743 * elf32-m32c.c (m32c_elf_relocate_section): Likewise.
1744 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1745 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
1746 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1747 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1748 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
1749
a47622ac
AM
17502014-06-07 Alan Modra <amodra@gmail.com>
1751
1752 * elf32-ppc.c (ppc_elf_relocate_section): Treat field of cmpli
1753 insn as a bitfield; Use complain_overflow_bitfield.
1754 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1755
270c9937
JB
17562014-06-05 Joel Brobecker <brobecker@adacore.com>
1757
1758 * development.sh: New file.
1759 * warning.m4 (AM_BINUTILS_WARNINGS): Source bfd/development.sh.
1760 Make -Werror the default with GCC only if DEVELOPMENT is true.
1761 * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add
1762 $(srcdir)/development.sh.
1763 * Makefile.in, configure: Regenerate.
1764
ac21917f
WN
17652014-06-04 Will Newton <will.newton@linaro.org>
1766
810d4e75 1767 * elfnn-aarch64.c (tpoff_base): Make test of tls_sec
ac21917f
WN
1768 being non-NULL into an assert.
1769 (elfNN_aarch64_tls_relax): Remove unused code.
1770
33ac0ca1
DD
17712014-06-03 DJ Delorie <dj@redhat.com>
1772
1773 * elf32-rx.c (rx_table_map): Use BFD_VMA_FMT for portability.
1774
c32abae8
NC
17752014-06-03 Nick Clifton <nickc@redhat.com>
1776
1777 PR ld/16807
1778 * peXXigen.c (rsrc_process_section): Page align the new contents
1779 befgore writing out.
1780
397998fc
AM
17812014-06-03 Alan Modra <amodra@gmail.com>
1782
1783 * elf64-ppc.c (ADDIS_R12_R2): Define.
1784 (build_plt_stub): Support fusion on ELFv2 stub.
1785 (ppc_build_one_stub): Likewise for plt branch stubs.
1786
b4894562
AM
17872014-05-28 Alan Modra <amodra@gmail.com>
1788
1789 * elf32-rx.c (rx_table_map): Delete set but not used variables.
1790
4ba3b326
TG
17912014-05-28 Tristan Gingold <gingold@adacore.com>
1792
1793 * dwarf2.c (lookup_address_in_function_table): Add best_fit_len
1794 to keep the length of the best fit range.
1795 (lookup_symbol_in_function_table, info_hash_lookup_funcinfo):
1796 Likewise.
1797
7a2f2d82
DD
17982014-05-27 DJ Delorie <dj@redhat.com>
1799
1a8bdf69 1800 * elf32-rx.c (get_symbol_value_maybe): New.
7a2f2d82
DD
1801 (rx_elf_relocate_section): If we find a reloc against
1802 $tableentry$default$<name>, redirect it to the appropriate
1803 $tableentry$<n>$.
1804 (RX_Table_Info): New.
1805 (rx_table_find): New. Check all tables and SEC_KEEP all sections
1806 with table parts in them.
1807 (rx_check_directives): New.
1808 (rx_table_map_2): New.
1809 (rx_table_map): New.
1810 (rx_additional_link_map_text): New. Called to dump tables to the
1811 map file.
1a8bdf69 1812 * elf32-rx.h: New.
7a2f2d82 1813
bceec4b9
DD
18142014-05-20 DJ Delorie <dj@redhat.com>
1815
1816 * elf32-msp430.c (msp430_elf_relax_adjust_locals): Avoid overflow.
1817
93d1b056
AM
18182014-05-20 Alan Modra <amodra@gmail.com>
1819
1820 PR 16952
1821 * elf32-ppc.c (ppc_elf_create_linker_section): Move earlier.
1822 Remove redundant setting of htab->elf.dynobj. Don't align.
1823 Define .sdata symbols using _bfd_elf_define_linkage_sym.
1824 (ppc_elf_create_glink): Call ppc_elf_create_linker_section.
1825 (create_sdata_sym): Delete.
1826 (elf_allocate_pointer_linker_section): Rename from
1827 elf_create_pointer_linker_section. Align section.
1828 (ppc_elf_check_relocs): Don't call ppc_elf_creat_linker_section
1829 directly here, or create_sdata_sym. Set ref_regular on _SDA_BASE_
1830 and _SDA2_BASE_.
1831 (ppc_elf_size_dynamic_sections): Remove ATTRIBUTE_UNUSED on param.
1832 Remove unnecessary tests on _SDA_BASE_ sym.
1833 (maybe_strip_sdasym, ppc_elf_maybe_strip_sdata_syms): New functions.
1834 (ppc_elf_relocate_section): Tighten SDA reloc symbol section checks.
1835 * elf32-ppc.h (ppc_elf_set_sdata_syms): Delete.
1836 (ppc_elf_maybe_strip_sdata_syms): Declare.
1837
a7c7b2ba
RM
18382014-05-16 Ryan Mansfield <rmansfield@qnx.com>
1839
b4894562 1840 * config.bfd: Move QNX target_cflags from arm-*-netbsd* to arm-*-nto*.
a7c7b2ba
RM
1841
18422014-05-16 Jon Turney <jon.turney@dronecode.org.uk>
6e6e7cfc
JT
1843
1844 * peXXigen.c (pe_print_debugdata): Don't interpret debug directory
1845 in a section with no contents.
1846 (is_vma_in_section, find_section_by_vma): New functions.
1847 (_bfd_XX_bfd_copy_private_bfd_data_common): Recalculate file
1848 offsets in the debug directory.
1849 (_bfd_XXi_slurp_codeview_record, _bfd_XXi_write_codeview_record):
1850 Byte-swap GUID from little-endian to big-endian order for
1851 consistent and conventional display.
1852
856ea05c
KP
18532014-05-16 Kaushik Phata <Kaushik.Phatak@kpit.com>
1854
1855 * elf32-rl78.c (rl78_elf_merge_private_bfd_data): Complain if
1856 64-bit doubles objects mix with 32-bit doubles objects.
1857 (rl78_elf_print_private_bfd_data): Describe 64-bit doubles flag.
1858
68e0f6b1
HPN
18592014-05-08 Hans-Peter Nilsson <hp@bitrange.com>
1860
1861 * mmo.c: Update URLs in documentation comments.
1862
1058c753
VA
18632014-05-02 Volodymyr Arbatov <arbatov@cadence.com>
1864 David Weatherford <weath@cadence.com>
1865 Max Filippov <jcmvbkbc@gmail.com>
1866
1867 * elf32-xtensa.c (relax_section): treat R_XTENSA_DIFF* relocations as
1868 signed.
1869
e59bc75b
AT
18702014-05-07 Andreas Tobler <andreast@fgznet.ch>
1871
1872 * config.bfd: Add proper arm config for *-*-freebsd*.
1873
ae52f483
AB
18742014-05-07 Andrew Bennett <andrew.bennett@imgtec.com>
1875
1876 * aoutx.h (NAME (aout, machine_type)): Add mips32r3, mips64r3,
1877 mips32r5 and mips64r5.
1878 * archures.c (bfd_architecture): Likewise.
1879 * bfd-in2.h (bfd_architecture): Likewise.
1880 * cpu-mips.c (arch_info_struct): Likewise.
1881 * elfxx-mips.c (mips_set_isa_flags): Likewise.
1882
757a636f
RS
18832014-05-06 Richard Sandiford <rdsandiford@googlemail.com>
1884
1885 * elfxx-mips.h (elfxx-mips.h): Declare.
1886 * elfxx-mips.c (mips_elf_merge_obj_attributes): Use it to report
1887 Tag_GNU_MIPS_ABI_FP mismatches.
1888 (_bfd_mips_fp_abi_string): New function.
1889
2f67d686
AM
18902014-05-02 Alan Modra <amodra@gmail.com>
1891
1892 * targets.c: Sort bfd_target vectors somewhat alphabetically.
1893 * configure.in: Likewise.
1894 * configure: Regenerate.
1895
6d00b590
AM
18962014-05-02 Alan Modra <amodra@gmail.com>
1897
1898 * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-ns32k.c,
1899 * aout-sparcle.c, * aout0.c, * aoutx.h, * armnetbsd.c, * bout.c,
1900 * cf-i386lynx.c, * cf-sparclynx.c, * cisco-core.c, * coff-alpha.c,
1901 * coff-apollo.c, * coff-arm.c, * coff-aux.c, * coff-go32.c,
1902 * coff-h8300.c, * coff-h8500.c, * coff-i386.c, * coff-i860.c,
1903 * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mips.c,
1904 * coff-rs6000.c, * coff-sh.c, * coff-sparc.c, * coff-stgo32.c,
1905 * coff-svm68k.c, * coff-tic80.c, * coff-u68k.c, * coff-w65.c,
1906 * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c,
1907 * coff64-rs6000.c, * config.bfd, * configure.com, * configure.in,
1908 * demo64.c, * elf-m10200.c, * elf-m10300.c, * elf32-am33lin.c,
1909 * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c,
1910 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
1911 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
1912 * elf32-fr30.c, * elf32-frv.c, * elf32-gen.c, * elf32-h8300.c,
1913 * elf32-hppa.c, * elf32-i370.c, * elf32-i386.c, * elf32-i860.c,
1914 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
1915 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
1916 * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c,
1917 * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
1918 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nios2.c,
1919 * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c,
1920 * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-sh-symbian.c,
1921 * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c,
1922 * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilepro.c, * elf32-v850.c,
1923 * elf32-vax.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xstormy16.c,
1924 * elf32-xtensa.c, * elf64-alpha.c, * elf64-gen.c, * elf64-hppa.c,
1925 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c,
1926 * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c,
1927 * elf64-x86-64.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
1928 * epoc-pe-arm.c, * epoc-pei-arm.c, * hp300bsd.c, * hp300hpux.c,
1929 * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386bsd.c,
1930 * i386dynix.c, * i386freebsd.c, * i386linux.c, * i386lynx.c,
1931 * i386mach3.c, * i386msdos.c, * i386netbsd.c, * i386os9k.c,
1932 * irix-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c,
1933 * m88kmach3.c, * m88kopenbsd.c, * mach-o-i386.c, * mach-o-x86-64.c,
1934 * makefile.vms, * mipsbsd.c, * mmo.c, * netbsd-core.c, * newsos3.c,
1935 * nlm32-alpha.c, * nlm32-i386.c, * nlm32-ppc.c, * nlm32-sparc.c,
1936 * ns32knetbsd.c, * osf-core.c, * pc532-mach.c, * pe-arm-wince.c,
1937 * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-ppc.c,
1938 * pe-sh.c, * pe-x86_64.c, * pei-arm-wince.c, * pei-arm.c,
1939 * pei-i386.c, * pei-ia64.c, * pei-mcore.c, * pei-mips.c, * pei-ppc.c,
1940 * pei-sh.c, * pei-x86_64.c, * ppcboot.c, * ptrace-core.c, * riscix.c,
1941 * sco5-core.c, * som.c, * sparclinux.c, * sparclynx.c,
1942 * sparcnetbsd.c, * sunos.c, * targets.c, * trad-core.c,
1943 * vax1knetbsd.c, * vaxbsd.c, * vaxnetbsd.c, * versados.c,
1944 * vms-alpha.c, * vms-lib.c: Rename bfd targets to
1945 <cpu>_<format>_<other>_<endian>_vec. Adjust associated MY macros
1946 on aout targets.
1947 * configure: Regenerate.
1948
1218d67d
HPN
19492014-05-01 Hans-Peter Nilsson <hp@bitrange.com>
1950
1951 * mmo.c (mmo File layout documentation): Add note about low bits
1952 of address.
1953 (mmo_write_chunk): When handling data remainder, assert that
1954 previous remaining data is flushed.
1955 (mmo_write_loc_chunk): Only look for trailing and leading zeros
1956 when dealing with an aligned VMA and for aligned lengths. Don't skip
1957 the last 32-bit-word of zeros.
1958 (mmo_write_loc_chunk): Emit an error if the VMA is not aligned.
1959 (mmo_scan) <case LOP_QUOTE>: Move re-alignment of vma before
1960 emitting data, not after updating it.
1961 <case LOP_LOC>: Call mmo_decide_section with aligned vma.
1962
a953eec9
NC
19632014-04-30 Nick Clifton <nickc@redhat.com>
1964
1965 * compress.c (bfd_is_section_compressed): When checking the
1966 .debug_str section, also check the fifth byte in the section is
1967 not part of a string.
1968
5087d529
AM
19692014-04-30 Alan Modra <amodra@gmail.com>
1970
1971 * elf-eh-frame.c (struct cie.personality): Replace val with sym.
1972 (find_merged_cie): Identify personality functions by (bfd_id,index)
1973 pair when a local sym is used.
1974
230977a4
CS
19752014-04-29 Christian Svensson <blue@cmd.nu>
1976
1977 * elf32-or1k.c: Fix a bug where non-TLS relocations would be forced
1978 into .rela.got if it contained TLS relocations as well.
1979
40af4a36
NC
19802014-04-28 Nick Clifton <nickc@redhat.com>
1981
1982 PR ld/16821
1983 * peXXigen.c (_bfd_XXi_swap_sym_out): Rework fix to avoid compile
1984 time warning.
1985
a9e18c6a
AM
19862014-04-26 Alan Modra <amodra@gmail.com>
1987
1988 * po/SRC-POTFILES.in: Regenerate.
1989 * configure: Regenerate.
1990
88667baf
NC
19912014-04-25 Nick Clifton <nickc@redhat.com>
1992
1993 PR ld/16821
1994 * peXXigen.c (_bfd_XXi_swap_sym_out): Another fix for building on
1995 a 342-bit host. This time for older versions of gcc.
1996
08937d80
NC
19972014-04-24 Nick Clifton <nickc@redhat.com>
1998
1999 * peXXigen.c (rsrc_print_section): Fix compile time warning for
2000 32-bit hosts.
2001
93ee1e36
AM
20022014-04-24 Alan Modra <amodra@gmail.com>
2003
2004 PR 16867
2005 * dwarf2.c: Formatting.
2006 (struct dwarf2_debug): Make adjusted_section_count signed.
2007 (unset_sections): Make i signed.
2008 (set_debug_vma): New function.
2009 (place_sections): Handle separate debug object file. Set VMA
2010 on debug sections, even if they have an output section. Also
2011 set VMA on zero size sections, and non-load but alloc sections.
2012 Set adjusted_section_count to -1 when no section adjustment.
2013 Malloc adjusted_sections. Don't double last_vma. Transfer
2014 alloc section VMAs to separate debug file.
2015 (_bfd_dwarf2_cleanup_debug_info): Free adjusted_sections.
2016 (_bfd_dwarf2_slurp_debug_info): Add do_place parameter. Drop
2017 test on symbols being the same before using old stash. Read
2018 and use separate debug file symbols. Call place_sections.
2019 (find_line): Don't call place_sections here.
2020 * libbfd-in.h (_bfd_dwarf2_slurp_debug_info): Update proto.
2021 * libbfd.h: Regenerate.
2022 * mach-o.c (bfd_mach_o_find_nearest_line): Adjust
2023 _bfd_dwarf2_slurp_debug_info call.
2024 * simple.c (simple_save_output_info): Clarify comment.
2025
3714081c
NC
20262014-04-24 Nick Clifton <nickc@redhat.com>
2027
2028 PR ld/16807
2029 * peXXigen.c (struct rsrc_regions): New structure.
2030 (rsrc_print_resource_directory): Use new structure. Include
2031 offset of directory in listing.
2032 (rsrc_print_resource_entry): Likewise.
2033 (rsrc_print_section): Likewise.
2034 (rsrc_count_entries): Do not increment sizeof_strings or
2035 sizeof_leaves.
2036 (rsrc_count_directory): Do not increment sizeof_tables.
2037 (rsrc_compute_region_sizes): New function.
2038 (rsrc_write_leaf): Maintain 8-byte alignment for resource data.
2039 (rsrc_process_section): Compute size of regions after merging
2040 entries.
2041
cd0449ab
AM
20422014-04-23 Alan Modra <amodra@gmail.com>
2043
2044 PR ld/16787
2045 * dwarf2.c (struct dwarf2_debug): Add sec_vma field.
2046 (place_sections): Do not modify VMA of sections when called from
2047 linker after sections have been placed in output sections. Short
2048 circuit single section case.
2049 (save_section_vma, section_vma_same): New functions.
2050 (_bfd_dwarf2_slurp_debug_info): Throw away stash if section VMAs
2051 change.
2052 * reloc.c (bfd_perform_relocation): Do not modify reloc addend
2053 when non-relocatable.
2054
d5f59c10
NC
20552014-04-22 Nick Clifton <nickc@redhat.com>
2056
2057 PR ld/16821
2058 * peXXigen.c (_bfd_XXi_swap_sym_out): Fix for 32-bit hosts.
2059
73589c9d
CS
20602014-04-22 Christian Svensson <blue@cmd.nu>
2061
2062 * Makefile.am: Remove openrisc and or32 support. Add support for or1k.
2063 * archures.c: Likewise.
2064 * coffcode.h: Likewise.
2065 * config.bfd: Likewise.
2066 * configure.in: Likewise.
2067 * reloc.c: Likewise.
2068 * targets.c: Likewise.
2069 * cpu-or1k.c: New file.
2070 * elf32-or1k.c: New file.
2071 * coff-or32.c: Delete.
2072 * cpu-openrisc.c: Delete.
2073 * cpu-or32.c: Delete.
2074 * elf32-openrisc.c: Delete.
2075 * elf32-or32.c: Delete.
2076 * Makefile.in: Regenerate.
2077 * bfd-in2.h: Regenerate.
2078 * configure: Regenerate.
2079 * libbfd.h: Regenerate.
2080
285fc9d8
YZ
20812014-04-22 Yuanhui Zhang <asmwarrior@gmail.com>
2082
2083 PR ld/16821
2084 * peXXigen.c (abs_finder): Fix for 32-bit host builds.
2085
5d3b02f0
WN
20862014-04-22 Will Newton <will.newton@linaro.org>
2087
2088 * elfnn-aarch64.c (elfNN_aarch64_section_flags): Remove
2089 function. (elf_backend_section_flags): Remove define.
2090
cc75d373
RH
20912014-04-21 Richard Henderson <rth@redhat.com>
2092
d1c109de
RH
2093 * elf64-alpha.c (elf64_alpha_size_got_sections): New may_merge
2094 parameter; honor it and disable got merging when false.
2095 (elf64_alpha_relax_got_load): Do not relax to GPREL relocs during
2096 the first pass of relaxation.
2097 (elf64_alpha_relax_with_lituse): Likewise. Move relaxed relocs to
2098 the end of the LITERAL+LITUSE chain.
2099 (elf64_alpha_relax_section): Only process LITERAL relocs during the
2100 second pass of relaxation.
2101
cc75d373
RH
2102 * configure.ac (use_secureplt): Enable by default.
2103 * configure: Rebuild.
2104
c9ffd2ea
TG
21052014-04-18 Tristan Gingold <gingold@adacore.com>
2106
2107 * mach-o.h (bfd_mach_o_dyld_info_command): Add rebase_content,
2108 bind_content, weak_bind_content, lazy_bind_content,
2109 export_content.
2110 (bfd_mach_o_load_command): Add comments, add next field.
2111 (mach_o_data_struct): Replace commands field by first_command
2112 and last_command.
2113 * mach-o.c (bfd_mach_o_append_command): New function.
2114 (bfd_mach_o_bfd_copy_private_symbol_data): Add blank lines.
2115 (bfd_mach_o_bfd_copy_private_section_data): Check flavour,
2116 copy fields.
2117 (bfd_mach_o_bfd_copy_private_header_data): Copy load commands.
2118 (bfd_mach_o_pad4, bfd_mach_o_pad_command): New functions.
2119 (bfd_mach_o_write_thread): Use macro instead of literal.
2120 (bfd_mach_o_write_dylinker, bfd_mach_o_write_dylib)
2121 (bfd_mach_o_write_main, bfd_mach_o_write_dyld_info): New
2122 functions.
2123 (bfd_mach_o_write_symtab_content): New function (extracted
2124 from bfd_mach_o_write_symtab).
2125 (bfd_mach_o_write_symtab): Split.
2126 (bfd_mach_o_count_indirect_symbols): Move
2127 (bfd_mach_o_build_dysymtab): Remove layout code.
2128 (bfd_mach_o_write_contents): Rewritten to build commands in order.
2129 (bfd_mach_o_count_sections_for_seg): Remove.
2130 (bfd_mach_o_build_obj_seg_command): New function (extracted from
2131 bfd_mach_o_build_seg_command).
2132 (bfd_mach_o_build_exec_seg_command): New function.
2133 (bfd_mach_o_build_dysymtab_command): Remove.
2134 (bfd_mach_o_layout_commands): New function.
2135 (bfd_mach_o_init_segment): New function.
2136 (bfd_mach_o_build_commands): Major rework to handle non-object
2137 files.
2138 (bfd_mach_o_alloc_and_read, bfd_mach_o_read_dyld_content): New
2139 function.
2140 (bfd_mach_o_read_dyld_info): Clear content fields.
2141 (bfd_mach_o_read_segment): Adjust call.
2142 (bfd_mach_o_flatten_sections): Adjust as now load commands are
2143 chained.
2144 (bfd_mach_o_scan_start_address, bfd_mach_o_scan)
2145 (bfd_mach_o_mkobject_init, bfd_mach_o_get_base_address)
2146 (bfd_mach_o_lookup_command, bfd_mach_o_core_fetch_environment):
2147 Likewise.
2148
967b2c53
TG
21492014-04-18 Tristan Gingold <gingold@adacore.com>
2150
2151 * mach-o-target.c (bfd_mach_o_bfd_copy_private_header_data):
2152 Define instead of bfd_mach_o_bfd_copy_private_bfd_data.
2153 * mach-o.c (bfd_mach_o_bfd_copy_private_bfd_data): Rename.
2154 * mach-o.h (bfd_mach_o_bfd_copy_private_bfd_data): Likewise.
2155
4525c51a
TG
21562014-04-18 Tristan Gingold <gingold@adacore.com>
2157
2158 * mach-o.h (bfd_mach_o_dylinker_command)
2159 (bfd_mach_o_dylib_command, bfd_mach_o_fvmlib_command): Remove
2160 name_len field.
2161 * mach-o.c (bfd_mach_o_read_dylinker, bfd_mach_o_read_dylib)
2162 (bfd_mach_o_read_fvmlib): Adjust after name_len removal.
2163
4384b284
TG
21642014-04-18 Tristan Gingold <gingold@adacore.com>
2165
2166 * mach-o.h (bfd_mach_o_backend_data): Add page_size field.
2167 * mach-o-target.c: Check TARGET_PAGESIZE is defined.
2168 (TARGET_NAME_BACKEND): Add TARGET_PAGESIZE.
2169 * mach-o.c (TARGET_PAGESIZE): Define and undefined for
2170 each targets declared.
2171 * mach-o-x86-64.c (TARGET_PAGESIZE): Define.
2172 * mach-o-i386.c (TARGET_PAGESIZE): Define.
2173
452216ab
TG
21742014-04-18 Tristan Gingold <gingold@adacore.com>
2175
2176 * mach-o.c (bfd_mach_o_write_thread)
2177 (bfd_mach_o_write_section_32, bfd_mach_o_write_section_64)
2178 (bfd_mach_o_write_segment_32, bfd_mach_o_write_segment_64)
2179 (bfd_mach_o_read_dylinker, bfd_mach_o_read_dylib)
2180 (bfd_mach_o_read_prebound_dylib, bfd_mach_o_read_prebind_cksum)
2181 (bfd_mach_o_read_twolevel_hints, bfd_mach_o_read_fvmlib)
2182 (bfd_mach_o_read_thread, bfd_mach_o_read_dysymtab)
2183 (bfd_mach_o_read_symtab, bfd_mach_o_read_uuid)
2184 (bfd_mach_o_read_linkedit, bfd_mach_o_read_str)
2185 (bfd_mach_o_read_dyld_info, bfd_mach_o_read_segment)
2186 (bfd_mach_o_read_segment_32, bfd_mach_o_read_segment_64)
2187 (bfd_mach_o_read_command): Now return a boolean status.
2188 Adjust return statements.
2189 (bfd_mach_o_write_contents, bfd_mach_o_scan): Adjust tests.
2190 (bfd_mach_o_core_file_failing_command): Remove useless initialization.
2191
cb22ccf4
KCY
21922014-04-17 Kwok Cheung Yeung <kcy@codesourcery.com>
2193
2194 * elfxx-mips.c (struct mips_got_info): Delete assigned_gotno
2195 field. Add assigned_low_gotno and assigned_high_gotno fields.
2196 (mips_elf_create_local_got_entry): Update out-of-space condition.
2197 Set index of new GOT entry to assigned_low_gotno if required by
2198 the current relocation, else set it to assigned_high_gotno.
2199 (mips_elf_set_global_gotidx): Replace uses of assigned_gotno
2200 with assigned_low_gotno.
2201 (mips_elf_multi_got): Initialize assigned_low_gotno and
2202 assigned_high_gotno in secondary GOTs. Use assigned_low_gotno
2203 in place of assigned_gotno when handling global GOT entries.
2204 (mips_elf_lay_out_got): Initialize assigned_low_gotno and
2205 assigned_high_gotno.
2206 (_bfd_mips_elf_finish_dynamic_sections): Account for a possible
2207 gap in the middle of local GOT space.
2208
4c34aff8
AM
22092014-04-17 Alan Modra <amodra@gmail.com>
2210
2211 PR 16846
2212 * elflink.c (_bfd_elf_merge_symbol): Ignore TLS mismatch when
2213 current bfd is a plugin. Don't always set type_change_ok
2214 when old bfd is a plugin.
2215
12241a34
TG
22162014-04-16 Tristan Gingold <gingold@adacore.com>
2217
2218 * mach-o-x86-64.c (bfd_mach_o_x86_64_mkobject): Adjust cpusubtype
2219 flag.
2220
40fd06d1
AM
22212014-04-16 Alan Modra <amodra@gmail.com>
2222
2223 * elf32-ppc.c (ppc_elf_relocate_section): Fill 476 fixup area
2224 with "ba 0" rather than zeros.
2225
fa85fb9a
MS
22262014-04-15 Marcus Shawcroft <marcus.shawcroft@arm.com>
2227
2228 * (elfNN_aarch64_tls_relax): Fix instruction mask.
2229
da3a2088
AM
22302014-04-14 Alan Modra <amodra@gmail.com>
2231
2232 * elf32-ppc.c (BA): Define
2233 (ppc_elf_link_hash_table_create): Correct default_params.
2234 (write_glink_stub): Pad small plt call stub with "ba 0" rather
2235 than "nop" for ppc476_workaround.
2236 (ppc_elf_finish_dynamic_sections): Likewise for branch table
2237 and __glink_PLTresolve. Ensure plt call stub at end of page
2238 doesn't allow fall-thru prefetch.
2239
32ae0d80
NC
22402014-04-11 Nick Clifton <nickc@redhat.com>
2241
2242 PR ld/16821
2243 * peXXigen.c (abs_finder): New function.
2244 (_bfd_XXi_swap_sym_out): For absolute symbols with values larger
2245 than 1^32 try to convert them into section relative values
2246 instead.
2247
85cf705b
NC
22482014-04-11 Nick Clifton <nickc@redhat.com>
2249
2250 * bfd-in2.h: Regenerate.
2251 * libbfd.h: Regenerate.
2252
1511baec
SL
22532014-04-10 Cesar Philippidis <cesar@codesourcery.com>
2254
2255 * elf32-nios2.c (nios2_elf32_build_stubs): Ignore dynobjs
2256 when building function stubs.
2257
e4ef1b6c
DC
22582014-04-10 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2259
2260 * elf32-avr.c: Add DIFF relocations for AVR.
2261 (avr_final_link_relocate): Handle the DIFF relocs.
2262 (bfd_elf_avr_diff_reloc): New.
2263 (elf32_avr_is_diff_reloc): New.
2264 (elf32_avr_adjust_diff_reloc_value): Reduce difference value.
2265 (elf32_avr_relax_delete_bytes): Recompute difference after deleting
2266 bytes.
2267
2268 * reloc.c: Add BFD_RELOC_AVR_DIFF8/16/32 relocations
2269
e30d16e9
AM
22702014-04-09 Alan Modra <amodra@gmail.com>
2271
2272 * libcoff.h: Regenerate.
2273
b4ab4364
AM
22742014-04-09 Alan Modra <amodra@gmail.com>
2275
2276 * elf32-ppc.c (ppc_elf_relocate_section): Remove bctr from list
2277 of safe ppc476 insns at end of page. Also remove non-branch insns.
2278 Expand comments.
2279
6e6e7cfc 22802014-04-08 Jon Turney <jon.turney@dronecode.org.uk>
61e2488c
JT
2281
2282 * peXXigen.c (pe_print_debugdata): New function: Displays the
2283 contents of the debug directory and decodes codeview entries.
2284 (_bfd_XXi_swap_debugdir_in, _bfd_XXi_swap_debugdir_out)
2285 (_bfd_XXi_slurp_codeview_record, _bfd_XXi_write_codeview_record):
2286 Add functions for reading and writing debugdir and codeview
2287 records.
2288 * libpei.h (_bfd_XXi_swap_debugdir_in, _bfd_XXi_swap_debugdir_out)
2289 (_bfd_XXi_write_codeview_record): Add prototypes and macros.
2290 * libcoff-in.h (pe_tdata): Add build-id data.
2291 * libcoff.h: Regenerate.
2292 * coffcode.h (coff_write_object_contents): Run build_id
2293 after_write_object_contents hook.
2294
115c6d5c
AM
22952014-04-05 Alan Modra <amodra@gmail.com>
2296
2297 * elflink.c (_bfd_elf_add_default_symbol): Pass poldbfd when
2298 merging non-default sym.
2299
26954155
TG
23002014-04-04 Tristan Gingold <gingold@adacore.com>
2301
2302 * mach-o.c (bfd_mach_o_header_p): Reject 64 bit target when not
2303 configured for.
2304
ca148c5a
TG
23052014-04-04 Tristan Gingold <gingold@adacore.com>
2306
2307 * mach-o.c (bfd_mach_o_convert_section_name_to_mach_o): Fix
2308 thinko on names length.
2309
47c50932
TG
23102014-04-04 Tristan Gingold <gingold@adacore.com>
2311
2312 * mach-o-i386.c (bfd_mach_o_i386_swap_reloc_out): Use target index
2313 of output_section.
2314 * mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Ditto.
2315
4ef27e04
TG
23162014-04-04 Tristan Gingold <gingold@adacore.com>
2317
2318 * bfd.c (bfd_get_arch_size): Default is taken from arch.
2319
b69c8728
JT
23202014-04-03 Jon Turney <jon.turney@dronecode.org.uk>
2321
2322 * peXXigen.c (pe_print_edata): Verify edt.name lies inside
2323 section before dereferencing.
2324 (pe_print_idata, pe_print_edata, pe_print_reloc)
2325 (rsrc_print_section): Don't bother interpreting the contents
2326 of sections which have no contents.
2327
1b6aeedb
MG
23282014-04-03 Maria Guseva <m.guseva@samsung.com>
2329
2330 PR ld/16803
2331 * elf.c (_bfd_elf_set_section_contents): Use correct type to hold
2332 file position.
2333
707e555b
TG
23342014-04-03 Tristan Gingold <gingold@adacore.com>
2335
2336 * mach-o.c (bfd_mach_o_mangle_symbols): Use index from
2337 output_section.
2338 (bfd_mach_o_build_seg_command): Add comment. Realign segment.
2339 Fix style.
2340 (bfd_mach_o_build_commands, bfd_mach_o_read_thread): Fix style.
2341
c3fcb775
AM
23422014-04-03 Alan Modra <amodra@gmail.com>
2343
2344 * elf-bfd.h (struct elf_backend_data
2345 <elf_backend_bfd_from_remote_memory>): Replace "size_t size"
2346 with "bfd_size_type size".
2347 (_bfd_elf32_bfd_from_remote_memory): Likewise.
2348 (_bfd_elf64_bfd_from_remote_memory): Likewise.
2349 * elf.c (bfd_elf_bfd_from_remote_memory): Likewise.
2350 * elfcode.h (bfd_from_remote_memory): Likewise.
2493504a
AM
2351 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Likewise.
2352 * bfd-in2.h: Regenerate.
c3fcb775 2353
7a79c514
TG
23542014-04-02 Tristan Gingold <gingold@adacore.com>
2355
2356 * mach-o.h (bfd_mach_o_twolevel_hints_command)
2357 (bfd_mach_o_prebind_cksum_command): New types.
2358 (bfd_mach_o_prebound_dylib_command): Rewrite.
2359 (bfd_mach_o_load_command): Add prebind_cksum and twolevel_hints
2360 fields.
2361 * mach-o.c (bfd_mach_o_read_prebound_dylib): Read and decode the
2362 command.
2363 (bfd_mach_o_read_prebind_cksum): New function.
2364 (bfd_mach_o_read_twolevel_hints): Ditto.
2365 (bfd_mach_o_read_command): Handle prebind cksum and twolevel hints
2366 commands.
2367
5979d6b6
AM
23682014-04-02 Alan Modra <amodra@gmail.com>
2369
2370 * elfcode.h (bfd_from_remote_memory): Add "size" parameter.
2371 Consolidate code handling possible section headers past end of
2372 segment. Don't use p_align for page size guess, instead use
2373 minpagesize. Take note of ld.so clearing section headers when
2374 p_memsz > p_filesz. Handle file header specifying no section
2375 headers. Handle zero p_align throughout. Default loadbase to
2376 zero. Add comments. Rename contents_size to high_offset, and
2377 make it a bfd_vma. Delete unnecessary bfd_set_error calls.
2378 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Update prototpe.
2379 * elf-bfd.h (struct elf_backend_data <elf_backend_from_remote_memory>):
2380 Likewise.
2381 (_bfd_elf32_bfd_from_remote_memory): Likewise.
2382 (_bfd_elf64_bfd_from_remote_memory): Likewise.
2383 * elf.c (bfd_elf_bfd_from_remote_memory): Adjust.
2384 * bfd-in2.h: Regnerate.
2385
23d72939
TG
23862014-04-01 Tristan Gingold <gingold@adacore.com>
2387
2388 * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Avoid to crash
2389 when num == 0.
2390
6a631e86 23912014-03-27 Yury Gribov <y.gribov@samsung.com>
b4894562 2392 Pavel Fedin <p.fedin@samsung.com>
6a631e86 2393
b4894562 2394 * elf32-arm.c: Add support for limited pretty-printing of PLT
6a631e86
YG
2395 entries on eabi and nacl targets.
2396 (elf32_arm_get_synthetic_symtab): Add new callback.
b4894562
AM
2397 (elf32_arm_nacl_plt_sym_val): Likewise.
2398 (elf32_arm_plt0_size): Add helper function.
2399 (elf32_arm_plt_size): Likewise.
6a631e86 2400
10be66a4
TG
24012014-03-27 Tristan Gingold <gingold@adacore.com>
2402
2403 * mach-o.c (bfd_mach_o_read_dylinker): Remove assert.
2404 (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_DYLD_ENVIRONMENT.
2405
3cc27770
TG
24062014-03-27 Tristan Gingold <gingold@adacore.com>
2407
2408 * mach-o.h (bfd_mach_o_get_base_address): New prototype.
2409 * mach-o.c (bfd_mach_o_write_symtab)
2410 (bfd_mach_o_write_contents)
2411 (bfd_mach_o_set_section_flags_from_bfd)
2412 (bfd_mach_o_build_seg_command): Fix indentation.
2413 (bfd_mach_o_get_base_address): New function.
2414
55bfc9ac
NC
24152014-03-26 Nick Clifton <nickc@redhat.com>
2416
2417 * cofflink.c (_bfd_coff_generic_relocate_section): Skip
2418 relocations in discarded sections.
2419
d8028530
TG
24202014-03-26 Tristan Gingold <gingold@adacore.com>
2421
2422 * mach-o.c (bfd_mach_o_convert_architecture): Add
2423 BFD_MACH_O_CPU_TYPE_ARM64.
2424
f6c7c3e8
AM
24252014-03-26 Alan Modra <amodra@gmail.com>
2426
2427 * elf64-ppc.c (ppc64_elf_check_relocs): Account for possibly
2428 needed plt entries when taking the address of functions for
2429 abiversion == 0 (ie. unknown) as well as abiversion == 2.
2430 Move opd setup and abiversion checks to..
2431 (ppc64_elf_before_check_relocs): ..here. Renamed from
2432 ppc64_elf_process_dot_syms. Set output abiversion from input and
2433 input abiversion from output, if either is not set.
2434 (ppc64_elf_merge_private_bfd_data): Don't merge flags here.
2435 (elf_backend_check_directives): Update.
2436
c955de36
WN
24372014-03-25 Will Newton <will.newton@linaro.org>
2438
2439 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_sections):
2440 Set value of DT_PLTRELSZ and DT_RELASZ based on the size
2441 of input sections rather than output sections.
2442
97323ad1
WN
24432014-03-20 Will Newton <will.newton@linaro.org>
2444
2445 PR ld/16715
2446 * elf32-arm.c (elf32_arm_check_relocs): Set
2447 pointer_equality_needed for absolute references within
2448 executable links.
2449 (elf32_arm_finish_dynamic_symbol): Set st_value to zero
2450 unless pointer_equality_needed is set.
2451
1d63324c
NC
24522014-03-19 Nick Clifton <nickc@redhat.com>
2453
6caf7111
NC
2454 * peXXigen.c (rsrc_process_section): Add code to scan input
2455 sections and record their lengths. Use these lengths to find the
2456 start of each merged .rsrc section.
1d63324c 2457
fbe383b9
TG
24582014-03-17 Tristan Gingold <gingold@adacore.com>
2459
2460 * mach-o.c (bfd_mach_o_read_dylib): Handle lazy load dylib.
2461 (bfd_mach_o_read_command): Ditto.
2462
5a026fc9
NC
24632014-03-14 Meador Inge <meadori@codesourcery.com>
2464
b4894562
AM
2465 * configure.in: Add strnlen to AC_CHECK_DECLS.
2466 * config.in: Regenerate.
2467 * configure: Regenerate.
2468 * sysdep.h (strnlen): Add prototype.
5a026fc9 2469
c3301df1
AM
24702014-03-14 Alan Modra <amodra@gmail.com>
2471
2472 * elf32-ppc.c (ppc_elf_relocate_section): Correct overflow
2473 handling for VLE_SDA21 relocs.
2474
167ad85b
TG
24752014-03-13 Tristan Gingold <gingold@adacore.com>
2476
2477 * peicode.h (pe_ILF_object_p): Adjust, as the version number
2478 has been read.
2479 (pe_bfd_object_p): Also read version number to detect ILF.
2480 * pe-x86_64.c (COFF_WITH_PE_BIGOBJ): Define.
2481 (x86_64pe_bigobj_vec): Define
2482 * coffcode.h (bfd_coff_backend_data): Add _bfd_coff_max_nscns field.
2483 (bfd_coff_max_nscns): New macro.
2484 (coff_compute_section_file_positions): Use unsigned int for
2485 target_index. Compare with bfd_coff_max_nscns.
2486 (bfd_coff_std_swap_table, ticoff0_swap_table, ticoff1_swap_table):
2487 Set a value for _bfd_coff_max_nscns.
2488 (header_bigobj_classid): New constant.
2489 (coff_bigobj_swap_filehdr_in, coff_bigobj_swap_filehdr_out)
2490 (coff_bigobj_swap_sym_in, coff_bigobj_swap_sym_out)
2491 (coff_bigobj_swap_aux_in, coff_bigobj_swap_aux_out): New
2492 functions.
2493 (bigobj_swap_table): New table.
2494 * libcoff.h: Regenerate.
2495 * coff-sh.c (bfd_coff_small_swap_table): Likewise.
2496 * coff-alpha.c (alpha_ecoff_backend_data): Add value for
2497 _bfd_coff_max_nscns.
2498 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2499 * coff-rs6000.c (bfd_xcoff_backend_data)
2500 (bfd_pmac_xcoff_backend_data): Likewise.
2501 * coff64-rs6000.c (bfd_xcoff_backend_data)
2502 (bfd_xcoff_aix5_backend_data): Likewise.
2503 * targets.c (x86_64pe_bigobj_vec): Declare.
2504 * configure.in (x86_64pe_bigobj_vec): New vector.
2505 * configure: Regenerate.
2506 * config.bfd: Add bigobj object format for Windows targets.
2507
c792917c
NC
25082014-03-12 Nick Clifton <nickc@redhat.com>
2509
2510 PR ld/16671
2511 * elf32-arm.c (elf32_arm_add_symbol_hook): Check for ARM format
2512 before testing for vxworks.
2513
fa47fa92
AM
25142014-03-12 Alan Modra <amodra@gmail.com>
2515
2516 * Makefile.in: Regenerate.
2517
bbefd0a9
AM
25182014-03-12 Alan Modra <amodra@gmail.com>
2519
2520 PR 16690
2521 * elf.c (copy_elf_program_header): Ignore first section lma if
2522 non-alloc.
2523
3c865fca
AM
25242014-03-11 Alan Modra <amodra@gmail.com>
2525
2526 PR 16686
2527 * coff-rs6000.c: Include stdint.h.
2528 * coff64-rs6000.c: Likewise.
2529
ce15efd8
TG
25302014-03-10 Tristan Gingold <gingold@adacore.com>
2531
2532 * ticoff.h: Removed.
2533
86c95733
AM
25342014-03-08 Alan Modra <amodra@gmail.com>
2535
2536 * elf32-ppc.c (ppc_elf_howto_raw): Correct overflow check for
2537 many relocations. Correct bitsize and rightshift too for a number
2538 of VLE relocs. Describe R_PPC_VLE_SDA21 and R_PPC_VLE_SDA21_LO.
2539 Correct dst_mask on R_PPC_VLE_SDA21_LO.
2540 (ppc_elf_vle_split16): Tidy, delete unnecessary prototype.
2541 (ppc_elf_relocate_section): Modify overflow test for 16-bit
2542 fields in instructions to signed/unsigned according to whether
2543 the field takes a signed or unsigned value. Tidy vle split16 code.
2544 Correct R_PPC_VLE_SDA21 and R_PPC_VLE_SDA21_LO handling.
2545
b80eed39
AM
25462014-03-08 Alan Modra <amodra@gmail.com>
2547
2548 * elf64-ppc.c (ppc64_elf_howto_raw): Use complain_overflow_signed
2549 for R_PPC64_ADDR14, R_PPC64_ADDR14_BRTAKEN, R_PPC64_ADDR14_BRNTAKEN,
2550 R_PPC64_SECTOFF, R_PPC64_ADDR16_DS, R_PPC64_SECTOFF_DS,
2551 R_PPC64_REL16 entries. Use complain_overflow_dont for R_PPC64_TOC.
2552 (ppc64_elf_relocate_section): Modify overflow test for 16-bit
2553 fields in instructions to signed/unsigned according to whether
2554 the field takes a signed or unsigned value.
2555
c38e8559
PA
25562014-03-07 Pedro Alves <palves@redhat.com>
2557
5893c83a 2558 PR gdb/16696
c38e8559
PA
2559 * rs6000-core.c (rs6000coff_core_p): Cast pointers to bfd_vma
2560 through ptr_to_uint instead of through long.
2561
e9847026
NC
25622014-03-06 Nick Clifton <nickc@redhat.com>
2563
2564 PR 16664
2565 * elf-attrs.c (_bfd_elf_parse_attributes): Add checks for corrupt
2566 attribute section names.
2567
4b95cf5c
AM
25682014-03-05 Alan Modra <amodra@gmail.com>
2569
2570 Update copyright years.
2571
45965137
AM
25722014-03-05 Alan Modra <amodra@gmail.com>
2573
2574 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_ADDR64_LOCAL entry.
2575 (ppc64_elf_reloc_type_lookup): Support R_PPC64_ADDR64_LOCAL.
2576 (ppc64_elf_check_relocs): Likewise.
2577 (ppc64_elf_relocate_section): Likewise.
2578 * Add BFD_RELOC_PPC64_ADDR64_LOCAL.
2579 * bfd-in2.h: Regenerate.
2580 * libbfd.h: Regenerate.
2581
cd0c81e9 25822014-03-04 Heiher <r@hev.cc>
4ba154f5
RS
2583
2584 * elfxx-mips.c (mips_set_isa_flags): Use E_MIPS_ARCH_64R2 for
2585 Loongson-3A.
2586 (mips_mach_extensions): Make bfd_mach_mips_loongson_3a an
2587 extension of bfd_mach_mipsisa64r2.
2588
eed94f8f
NC
25892014-03-04 Nick Clifton <nickc@redhat.com>
2590
2591 PR ld/16017
2592 * elf32-arm.c (elf32_thumb2_plt0_entry): New array.
2593 (elf32_thumb2_plt_entry): New array.
2594 (elf32_arm_create_dynamic_sections): Set PLT entry sizes when
2595 using thumb2 based PLT.
2596 (elf32_arm_populate_plt_entry): Handle generating Thumb2 based PLT
2597 entries.
2598 (elf32_arm_final_link_relocate): Do not bias jumps to Thumb based
2599 PLT entries.
2600 (elf32_arm_finish_dynamic_sections): Handle creation of Thumb2
2601 based PLT 0-entry.
2602 (elf32_arm_output_plt_map_1): Handle creation of local symbols for
2603 Thumb2 based PLT 0-entry.
2604 (elf32_arm_output_arch_local_syms): Handle creation of local
2605 symbols for Thumb2 based PLT entries.
2606
9850436d
AM
26072014-02-28 Alan Modra <amodra@gmail.com>
2608
2609 PR ld/16643
2610 * elflink.c (elf_gc_sweep): Call gc_sweep_hook for exactly
2611 the same conditions we called check_relocs.
2612
1db37fe6
YG
26132014-02-27 Yuri Gribov <y.gribov@samsung.com>
2614
2615 * bfd-in.h: Add export of bfd_elf32_arm_use_long_plt.
2616 * bfd-in2.h: Regenerate.
2617 * elf32-arm.c (elf32_arm_plt_entry_long): New array.
2618 (elf32_arm_link_hash_table_create): Set plt_entry_size to 16 if
2619 using long PLT entries.
2620 (bfd_elf32_arm_use_long_plt): New function.
2621 (elf32_arm_populate_plt_entry): Add support for long PLT entries.
2622
db434ba0
AM
26232014-02-27 Alan Modra <amodra@gmail.com>
2624
2625 * elf32-ppc.c (ppc_elf_link_hash_table_create): Provide default
2626 params for targets that don't use ppc32elf.em.
2627
d9972968
CLT
26282014-02-20 Chung-Lin Tang <cltang@codesourcery.com>
2629
2630 * elf32-nios2.c (nios2_elf32_relocate_section): Fix calculation
2631 of GOTOFF relocations.
2632
0ff2b86e
L
26332014-02-19 Igor Zamyatin <igor.zamyatin@intel.com>
2634 H.J. Lu <hongjiu.lu@intel.com>
2635
2636 * elf64-x86-64.c (elf_x86_64_bnd_plt0_entry): New.
2637 (elf_x86_64_legacy_plt_entry): Likewise.
2638 (elf_x86_64_bnd_plt_entry): Likewise.
2639 (elf_x86_64_legacy_plt2_entry): Likewise.
2640 (elf_x86_64_bnd_plt2_entry): Likewise.
2641 (elf_x86_64_bnd_arch_bed): Likewise.
2642 (elf_x86_64_link_hash_entry): Add has_bnd_reloc and plt_bnd.
2643 (elf_x86_64_link_hash_table): Add plt_bnd.
2644 (elf_x86_64_link_hash_newfunc): Initialize has_bnd_reloc and
2645 plt_bnd.
2646 (elf_x86_64_copy_indirect_symbol): Also copy has_bnd_reloc.
2647 (elf_x86_64_check_relocs): Create the second PLT for Intel MPX
2648 in 64-bit mode.
2649 (elf_x86_64_allocate_dynrelocs): Handle the second PLT for IFUNC
2650 symbols. Resolve call to the second PLT if it is created.
2651 (elf_x86_64_size_dynamic_sections): Keep the second PLT section.
2652 (elf_x86_64_relocate_section): Resolve PLT references to the
2653 second PLT if it is created.
2654 (elf_x86_64_finish_dynamic_symbol): Use BND PLT0 and fill the
2655 second PLT entry for BND relocation.
2656 (elf_x86_64_finish_dynamic_sections): Use MPX backend data if
2657 the second PLT is created.
2658 (elf_x86_64_get_synthetic_symtab): New.
2659 (bfd_elf64_get_synthetic_symtab): Likewise. Undefine for NaCl.
2660
7d4c687d
AM
26612014-02-19 Alan Modra <amodra@gmail.com>
2662
2663 * elf64-ppc.h (struct ppc64_elf_params): Add save_restore_funcs.
2664 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Use it to control
2665 provision of out-of-line register save/restore routines.
2666
5db3e65d
JC
26672014-02-18 Jack Carter <jack.carter@imgtec.com>
2668
b4894562
AM
2669 * elfxx-mips.c(_bfd_mips_elf_modify_segment_map): Deleted hard coding of
2670 PT_DYNAMIC segment flags.
5db3e65d 2671
024a2310
JK
26722014-02-17 Jan Kratochvil <jan.kratochvil@redhat.com>
2673
2674 PR binutils/16595
2675 * simple.c (struct saved_offsets): New.
2676 (simple_save_output_info): Use it for ptr.
2677 (simple_restore_output_info): Use it for ptr. Check section_count.
2678 (bfd_simple_get_relocated_section_contents): Use it for saved_offsets.
2679
e7d1c40c
AM
26802014-02-17 Alan Modra <amodra@gmail.com>
2681
2682 * elf64-ppc.h (struct ppc64_elf_params): Define.
2683 (ppc64_elf_init_stub_bfd, ppc64_elf_edit_opd, ppc64_elf_tls_setup,
2684 ppc64_elf_setup_section_lists, ppc64_elf_size_stubs,
2685 ppc64_elf_build_stubs): Update prototype.
2686 * elf64-ppp.c (struct ppc_link_hash_table): Add params, delete other
2687 fields now in params. Adjust code throughout file.
2688 (ppc64_elf_init_stub_bfd): Delete "abfd" parameter, add "params".
2689 Save params pointer in htab.
2690 (ppc64_elf_edit_opd, ppc64_elf_tls_setup,
2691 ppc64_elf_setup_section_lists, ppc64_elf_size_stubs,
2692 ppc64_elf_build_stubs): Remove parameters now in "params".
2693
668e22e5
AM
26942014-02-17 Alan Modra <amodra@gmail.com>
2695
2696 * elf32-ppc.c (ppc_elf_relocate_section): Move relocs on insns
2697 patched for ppc476 workaround. Reapply branch taken/not taken
2698 relocs.
2699
9f7552cf
AM
27002014-02-12 Alan Modra <amodra@gmail.com>
2701
2702 * elf32-ppc.c (ppc_elf_relax_section): Don't build long-branch
2703 stubs for calls to __tls_get_addr that we know will later be
2704 optimised away.
2705
795bc6b3
AM
27062014-02-12 Alan Modra <amodra@gmail.com>
2707
2708 * elf32-ppc.c (ppc_elf_relax_section): Enable ppc476 workaround
2709 for ld -r, when code sections are sufficiently aligned.
2710 * elf32-ppc.h (struct ppc_elf_params): Delete pagesize. Add
2711 pagesize_p2.
2712
b407645f
AM
27132014-02-12 Alan Modra <amodra@gmail.com>
2714
2715 PR gold/15530
2716 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
2717 --export-dynamic and --dynamic-list marking of symbols.
2718 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Reorder
2719 cheap tests first.
2720
d6f6f455
L
27212014-02-10 H.J. Lu <hongjiu.lu@intel.com>
2722
2723 PR gold/16530
2724 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Mark symbol in
2725 executables if it matches dynamic_list.
2726
c1c69e83
AM
27272014-02-10 Alan Modra <amodra@gmail.com>
2728
2729 * po/SRC-POTFILES.in: Regenerate.
2730 * po/bfd.pot: Regenerate.
2731
53291d1f
AM
27322014-02-09 Alan Modra <amodra@gmail.com>
2733
2734 * elf-bfd.h (struct elf_backend_data): Add caches_rawsize.
2735 * elfxx-target.h (elf_backend_caches_rawsize): Define.
2736 (elfNN_bed): Init new field.
2737 * elflink.c (elf_link_input_bfd): Handle caches_rawsize.
2738 * elf32-ppc.c (shared_stub_entry): Zero addi offset.
2739 (ppc_elf_relax_section): Don't reallocate section here, write
2740 stubs, or write out relocs for ld -r here..
2741 (ppc_elf_relocate_section): ..instead write stubs here, and use
2742 existing code to write out relocs for ld -r. Fix offset
2743 adjustment on reloc for little-endian.
2744 (elf_backend_caches_rawsize): Define.
2745
d1eb5696
RO
27462014-02-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2747
85773039 2748 PR build/16550
d1eb5696
RO
2749 * cache.c (bfd_cache_max_open): Cast RLIM_INFINITY to rlim_t.
2750
2915c55b
JK
27512014-02-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2752
2753 * coff-rs6000.c (xcoff_write_archive_contents_big): Free OFFSETS in
2754 return paths. Three times.
2755 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Free HTAB in all
2756 return paths.
2757 (ppc64_elf_tls_optimize): Free TOC_REF in return path.
2758 (ppc64_elf_edit_toc): Free USED in return path.
2759
1c2de463
SL
27602014-02-03 Sandra Loosemore <sandra@codesourcery.com>
2761
2762 * reloc.c (BFD_RELOC_NIOS2_GOT_LO, BFD_RELOC_NIOS2_GOT_HA): New.
2763 (BFD_RELOC_NIOS2_CALL_LO, BFD_RELOC_NIOS2_CALL_HA): New.
2764 * libbfd.h: Regenerated.
2765 * bfd-in2.h: Regenerated.
2766 * elf32-nios2.c (elf_nios2_howto_table_rel): Add new relocations.
2767 (nios2_reloc_map): Likewise.
2768 (GOT_USED, CALL_USED): Renamed from GOT16_USED and CALL16_USED.
2769 Fixed all references.
2770 (nios2_elf32_relocate_section): Add new relocations.
2771 (nios2_elf32_check_relocs): Likewise.
2772 (nios2_elf32_gc_sweep_hook): Likewise.
2773
5446cbdf
AM
27742014-02-03 Alan Modra <amodra@gmail.com>
2775
2776 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add params.
2777 Delete emit_stub_syms, no_tls_get_addr_opt. Update all uses.
2778 (ppc_elf_link_params): New function.
2779 (ppc_elf_create_glink): Align .glink to 64 bytes for ppc476
2780 workaround.
2781 (ppc_elf_select_plt_layout): Remove plt_style and emit_stub_syms
2782 parameters. Use htab->params instead.
2783 (ppc_elf_tls_setup): Remove no_tls_get_addr_opt parameter.
2784 (ppc_elf_size_dynamic_sections): Align __glink_PLTresolve to
2785 64 bytes for ppc476 workaround.
2786 (struct ppc_elf_relax_info): New.
2787 (ppc_elf_relax_section): Exclude linker created sections and
2788 those too small to hold one instruction. Don't add another
cd3416da 2789 branch around trampolines on later relax passes. Don't
5446cbdf
AM
2790 generate trampolines for undefined symbols when !relocatable,
2791 nor for plugin symbols. Allocate space for ppc476 workaround
2792 patch area. Free fixups on error return path.
2793 (ppc_elf_relocate_section): Handle ppc476 workaround patching.
2794 * elf32-ppc.h (struct ppc_elf_params): New.
2795 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Update prototype.
2796 (ppc_elf_link_params): Declare.
2797 * section.c (SEC_INFO_TYPE_TARGET): Define.
2798 * bfd-in2.h: Regenerate.
2799
82e91538
SL
28002014-02-02 Sandra Loosemore <sandra@codesourcery.com>
2801
2802 * elf32-nios2.c (struct elf32_nios2_link_hash_table): Add
2803 h_gp_got field.
2804 (nios2_elf32_relocate_section): Use got_base to adjust
2805 GOT-pointer-relative relocations relative to _gp_got.
2806 (create_got_section): Create _gp_got symbol.
2807 (nios2_elf32_finish_dynamic_symbol): Make _gp_got absolute.
2808 (nios2_elf32_size_dynamic_sections): Set _gp_got offset.
2809
78058a5e
SL
28102014-01-30 Sandra Loosemore <sandra@codesourcery.com>
2811
2812 * bfd-in2.h: Update from reloc.c.
2813 * elf32-nios2.c: Include elf32-nios2.h.
2814 (elf_nios2_howto_table_rel): Add entry for R_NIOS2_CALL26_NOAT.
2815 (nios2_reloc_map): Likewise.
2816 (enum elf32_nios2_stub_type): Declare.
2817 (struct elf32_nios2_stub_hash_entry): Declare.
2818 (nios2_stub_hash_entry, nios2_stub_hash_lookup): New macros.
2819 (struct elf32_nios2_link_hash_entry): Add hsh_cache field.
2820 (struct elf32_nios2_link_hash_table): Add new fields bstab,
2821 stub_bfd, add_stub_section, layout_sections_again, stub_group,
2822 bfd_count, top_index, input_list, all_local_syms.
2823 (nios2_call26_stub_entry): New.
2824 (nios2_elf32_install_imm16): Move up in file.
2825 (nios2_elf32_install_data): Move up in file.
2826 (hiadj): Move up in file.
2827 (stub_hash_newfunc): New.
2828 (link_hash_newfunc): Initialize hsh_cache field.
2829 (STUB_SUFFIX): New.
2830 (nios2_stub_name): New.
2831 (nios2_get_stub_entry): New.
2832 (nios2_add_stub): New.
2833 (nios2_elf32_setup_section_lists): New.
2834 (nios2_elf32_next_input_section): New.
2835 (CALL26_SEGMENT): New.
2836 (MAX_STUB_SECTION_SIZE): New.
2837 (group_sections): New.
2838 (nios2_type_of_stub): New.
2839 (nios2_build_one_stub): New.
2840 (nios2_size_one_stub): New.
2841 (get_local_syms): New.
2842 (nios2_elf32_size_stubs): New.
2843 (nios2_elf32_build_stubs): New.
2844 (nios2_elf32_do_call26_relocate): Correct CALL26 overflow test.
2845 (nios2_elf32_relocate_section): Handle R_NIOS2_CALL26_NOAT. Add
2846 trampolines for R_NIOS2_CALL26 stubs.
2847 (nios2_elf32_check_relocs): Handle R_NIOS2_CALL26_NOAT.
2848 (nios2_elf32_gc_sweep_hook): Likewise.
2849 (nios2_elf32_link_hash_table_create): Initialize the stub hash table.
2850 (nios2_elf32_link_hash_table_free): New.
2851 (bfd_elf32_bfd_link_hash_table_free): Define.
2852 * elf32-nios2.h: New file.
2853 * libbfd.h: Update from reloc.c.
2854 * reloc.c (BFD_RELOC_NIOS2_CALL26_NOAT): New.
2855
df3ce959
NC
28562014-01-29 Nick Clifton <nickc@redhat.com>
2857
2858 PR binutils/16318
2859 * elf32-metag.c (elf_metag_post_process_headers): Call
2860 _bfd_elf_post_process_headers.
2861 * elf32-sh64.c (sh64_elf_copy_private_data): Call
2862 _bfd_elf_copy_private_data.
2863 * elf64-sh64.c (sh_elf64_copy_private_data_internal): Likewise.
2864
27b829ee
NC
28652014-01-29 Nick Clifton <nickc@redhat.com>
2866
2867 * bfd-in.h (bfd_set_section_vma): Delete.
2868 (bfd_set_section_alignment): Delete.
2869 (bfd_set_section_userdata): Delete.
2870 (bfd_set_cacheable): Delete.
2871 * bfd.c (bfd_set_cacheable): New static inline function.
2872 * section.c (bfd_set_section_userdata): Likewise.
2873 (bfd_set_section_vma): Likewise.
2874 (bfd_set_section_alignment): Likewise.
2875 * bfd-in2.h: Regenerate.
2876
0a9c7b2b
NC
28772014-01-28 Nick Clifton <nickc@redhat.com>
2878
2879 * dwarf2.c (find_abstract_instance_name): For DW_FORM_ref_addr
2880 attributes select the CU containing the abbreviation, which may not
2881 be the current CU.
2882
3ba720c7
AM
28832014-01-24 Alan Modra <amodra@gmail.com>
2884
2885 * elf64-ppc.c (ppc_build_one_stub): Correct reloc count passed
2886 to get_relocs for ELFv2.
2887
d923cae0
L
28882014-01-23 H.J. Lu <hongjiu.lu@intel.com>
2889
2890 PR ld/16498
3ba720c7 2891 * elf.c (_bfd_elf_map_sections_to_segments): Issue a linker error
d923cae0
L
2892 if TLS sections are not adjacent.
2893
16e4ecc0
AM
28942014-01-22 Alan Modra <amodra@gmail.com>
2895
2896 * elflink.c (elf_link_add_object_symbols): Call minfo for --as-needed.
2897
eb8d7fda
AM
28982014-01-22 Alan Modra <amodra@gmail.com>
2899
2900 * elf64-ppc.c (STK_LINKER): Comment typo fix.
2901
4584ec12
L
29022014-01-21 H.J. Lu <hongjiu.lu@intel.com>
2903
2904 PR ld/16467
2905 * elflink.c (_bfd_elf_merge_symbol): When types of the existing
2906 regular default symbol definition and the versioned dynamic
2907 symbol definition mismatch, skip the default symbol definition
2908 if one of them is IFUNC.
2909
22ef172a
L
29102014-01-21 H.J. Lu <hongjiu.lu@intel.com>
2911
2912 PR ld/2404
2913 * elflink.c (_bfd_elf_merge_symbol): Don't check info->shared,
2914 info->export_dynamic nor h->ref_dynamic for type mismatch when
2915 adding the default version.
2916
b75d42bc
AM
29172014-01-16 Alan Modra <amodra@gmail.com>
2918
2919 * elfxx-mips.c (mips_elf_record_got_page_entry): Pass in a
2920 mips_elf_traverse_got_arg* rather than mips_got_info*.
2921 Adjust caller. Alloc on output_bfd rather than symbol section
2922 owner.
2923
c353e543
L
29242014-01-15 H.J. Lu <hongjiu.lu@intel.com>
2925
2926 * elf32-i386.c (elf_i386_allocate_dynrelocs): Revert the last
2927 change.
2928 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2929
818d220a
L
29302014-01-14 H.J. Lu <hongjiu.lu@intel.com>
2931
2932 PR ld/16428
2933 * elf32-i386.c (elf_i386_allocate_dynrelocs): Don't discard relocs
2934 against __ehdr_start.
2935 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2936
c3ce498c
L
29372014-01-14 H.J. Lu <hongjiu.lu@intel.com>
2938
2939 * elf32-i386.c (elf_i386_allocate_dynrelocs): Revert the last
2940 change.
2941 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2942
d1ec1e40
L
29432014-01-14 H.J. Lu <hongjiu.lu@intel.com>
2944
2945 PR ld/16428
2946 * elf32-i386.c (elf_i386_allocate_dynrelocs): Don't update reloc
2947 count if there are any non pc-relative relocs.
2948 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2949
f44a1f8e
CL
29502014-01-14 Michael Hudson-Doyle <michael.hudson@linaro.org>
2951 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
2952
2953 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use correct
2954 offset while calculating relocation address.
2955 (elfNN_aarch64_create_small_pltn_entry): Likewise.
2956 (elfNN_aarch64_init_small_plt0_entry): Likewise.
2957
fd0fd00c
MJ
29582014-01-13 Ma Jiang <ma.jiang@zte.com.cn>
2959
2960 PR ld/16202
2961 * elf32-arm.c (elf32_arm_final_link_relocate): Refetch addends for
2962 R_ARM_ABS8 and R_ARM_ABS16.
2963
aa726b9e
AM
29642014-01-13 Alan Modra <amodra@gmail.com>
2965
2966 * elf32-ppc.c (ppc_elf_check_relocs): For @local call to ifunc,
2967 error when shared and force a plt call otherwise.
2968 (ppc_elf_size_dynamic_sections): Don't emit DT_PPC_GOT unless
2969 plt_type == PLT_NEW.
2970 (ppc_elf_relocate_section): Add missing test to resolve ifuncs to
2971 the appropriate call stub.
2972
eec2f3ed
AM
29732014-01-10 Alan Modra <amodra@gmail.com>
2974
2975 PR ld/14207
2976 PR ld/16322
2977 PR binutils/16323
2978 * elf.c (assign_file_positions_for_load_sections): Revert last change.
2979 (assign_file_positions_for_non_load_sections): When setting up
2980 PT_GNU_RELRO header, don't require a corresponding PT_LOAD
2981 header that completely covers the relro region.
2982
09bf66a8
TG
29832014-01-09 Tristan Gingold <gingold@adacore.com>
2984
2985 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): use jump
2986 table macros and add macros to initializa the structure.
2987
43a8475c
L
29882014-01-08 H.J. Lu <hongjiu.lu@intel.com>
2989
2990 PR ld/14207
2991 PR ld/16322
2992 PR binutils/16323
2993 * elf.c (_bfd_elf_map_sections_to_segments): Don't check section
2994 size for PT_GNU_RELRO segment.
2995 (assign_file_positions_for_load_sections): If PT_LOAD segment
2996 doesn't fit PT_GNU_RELRO segment, adjust its p_filesz and p_memsz.
2997
1651e569
TT
29982014-01-07 Tom Tromey <tromey@redhat.com>
2999
3000 * elf32-xtensa.c (vsprint_msg): Don't use old VA_* compatibility
3001 wrappers.
3002
dc9155b2
NC
30032014-01-03 Nick Clifton <nickc@redhat.com>
3004
3005 PR binutils/16199
3006 * elf.c (vma_page_aligned_bias): Handle a maxpagesize value of
3007 zero.
3008
dd8dfa39 30092014-01-02 Yuanhui Zhang <asmwarrior@gmail.com>
044387af
A
3010
3011 PR binutils/14289
3012 * pef.c (bfd_pef_xlib_read_header): Increase buffer size to 80.
3013
1be5090b
NC
30142014-01-02 Nick Clifton <nickc@redhat.com>
3015
3016 PR binutils/11983
3017 * archive.c (_bfd_get_elt_at_filepos): Store a copy of the
3018 filename in the bfd's filename field.
3019 * elfcode.h (bfd_from_remote_memory): Likewise.
3020 * ieee.c (ieee_object_p): Likewise.
3021 * mach-o.c (bfd_mach_o_fat_member_init): Likewise.
3022 * oasys.c (oasys_openr_next_archived_file): Likewise.
3023 * vms-lib.c (_bfd_vms_lib_get_module): Likewise.
3024 * opncls.c (bfd_fopen): Likewise.
3025 (bfd_openstreamr): Likewise.
3026 (bfd_openr_iovec): Likewise.
3027 (bfd_openw): Likewise.
3028 (bfd_create): Likewise.
3029 (_bfd_delete_bfd): Free filename.
3030
5fb776a6 3031For older changes see ChangeLog-2013
56882138 3032\f
5fb776a6 3033Copyright (C) 2014 Free Software Foundation, Inc.
752937aa
NC
3034
3035Copying and distribution of this file, with or without modification,
3036are permitted in any medium without royalty provided the copyright
3037notice and this notice are preserved.
3038
56882138
AM
3039Local Variables:
3040mode: change-log
3041left-margin: 8
3042fill-column: 74
3043version-control: never
3044End:
This page took 0.871171 seconds and 4 git commands to generate.