]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - bfd/ChangeLog
Fix PR ld/17277: bogus dynamic relocs and TEXTREL for ARM PC-relative relocs
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
1 2014-08-20 Roland McGrath <mcgrathr@google.com>
2
3 PR ld/17277
4 * elf32-arm.c (elf32_arm_check_relocs): Increment P->pc_count for
5 all reloc types with pc_relative set in the howto, not just for
6 R_ARM_REL32 and R_ARM_REL32_NOI.
7 (allocate_dynrelocs_for_symbol): Update comment.
8 (elf32_arm_gc_sweep_hook): For all reloc types with pc_relative
9 set in the howto, set call_reloc_p and may_need_local_target_p but
10 not may_become_dynamic_p; not only for R_ARM_REL32 and R_ARM_REL32_NOI.
11 (elf32_arm_check_relocs): Likewise.
12
13 2014-08-20 Will Newton <will.newton@linaro.org>
14
15 * config.bfd: Default armeb-*-eabi* to big endian.
16
17 2014-08-19 Alan Modra <amodra@gmail.com>
18
19 * configure: Regenerate.
20
21 2014-08-18 Alan Modra <amodra@gmail.com>
22
23 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Don't attempt to
24 use dynrelocs for ifunc.
25 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Similarly.
26
27 2014-08-18 Alan Modra <amodra@gmail.com>
28
29 PR 17287
30 * elflink.c (on_needed_list): Only consider libraries that have
31 been loaded.
32
33 2014-08-18 Alan Modra <amodra@gmail.com>
34
35 * elflink.c (bfd_elf_discard_info): Return int error status.
36 * stabs.c (_bfd_discard_section_stabs): Comment typo fix.
37 * bfd-in.h (bfd_elf_discard_info): Updata prototype.
38 * bfd-in2.h: Regenerate.
39
40 2014-08-14 Alan Modra <amodra@gmail.com>
41
42 * peXXigen.c (pe_print_reloc): Protect against access past end
43 of .reloc section.
44
45 2014-08-14 Alan Modra <amodra@gmail.com>
46
47 PR 16563
48 * elflink.c (bfd_elf_discard_info): Process .eh_frame and .stab
49 in the order they are mapped to output sections.
50
51 2014-08-14 Alan Modra <amodra@gmail.com>
52
53 * configure.ac: Delete redundant plugin related checks.
54 * configure: Regenerate.
55
56 2014-08-13 Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
57
58 * elf32-or1k.c (or1k_elf_relocate_section, or1k_elf_check_relocs,
59 allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL
60 and SYMBOLIC_BIND.
61
62 2014-08-12 Alan Modra <amodra@gmail.com>
63
64 * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Only call "notice"
65 here when not calling the generic add_symbol function. Formatting.
66 Correct handling of indirect symbols. Update notice call.
67 * elflink.c (_bfd_elf_notice_as_needed): Update notice call.
68 * linker.c (_bfd_generic_link_add_one_symbol): Create indirect
69 symbols early. Update notice call. Add comments regarding weak
70 symbols vs. indirect.
71
72 2014-08-12 Alan Modra <amodra@gmail.com>
73
74 PR ld/16746
75 * linker.c (_bfd_generic_link_add_one_symbol <WARN>): Handle
76 !lto_plugin_active.
77
78 2014-08-07 Chen Gang <gang.chen.5i5j@gmail.com>
79
80 * coff-ppc.c (coff_ppc_relocate_section): Ensure local symbols are
81 zero terminated.
82
83 2014-08-07 H.J. Lu <hongjiu.lu@intel.com>
84 Alan Modra <amodra@gmail.com>
85
86 PR ld/16746
87 * linker.c (_bfd_generic_link_add_one_symbol): Don't issue a
88 warning for references in LTO IR to warning symbols.
89
90 2014-08-07 Alan Modra <amodra@gmail.com>
91
92 * linker.c (WARN, CWARN): Collapse these states to WARN.
93 (_bfd_generic_link_add_one_symbol): Use old CWARN case for
94 new WARN.
95
96 2014-08-05 Doug Evans <dje@google.com>
97
98 * bfd-in2.h: Regenerate.
99 * libcoff.h: Regenerate.
100
101 2014-08-05 Maciej W. Rozycki <macro@codesourcery.com>
102
103 * elfxx-mips.c (_bfd_mips_elf_discard_info): Set section's
104 rawsize if changing size.
105
106 2014-08-05 Alan Modra <amodra@gmail.com>
107
108 PR ld/17226
109 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Typo fix.
110
111 2014-08-05 Alan Modra <amodra@gmail.com>
112
113 * linker.c (generic_link_check_archive_element): Move handling
114 of command link -u symbols with a common symbol def to the
115 code handling non-common symbols so that archive element symbols
116 are loaded. Use generic_link_add_object_symbols.
117
118 2014-08-05 Alan Modra <amodra@gmail.com>
119
120 PR 13557
121 * linker.c (struct archive_list, struct archive_hash_entry,
122 struct archive_hash_table, archive_hash_newfunc,
123 archive_hash_table_init, archive_hash_lookup, archive_hash_allocate,
124 archive_hash_table_free): Delete.
125 (_bfd_generic_link_add_archive_symbols): Add h and name params to
126 checkfn. Rewrite using a straight-forward scan over archive map.
127 (generic_link_check_archive_element_no_collect,
128 generic_link_check_archive_element_collect,
129 generic_link_check_archive_element): Add h and name params.
130 * aoutx.h (aout_link_check_archive_element): Likewise.
131 * pdp11.c (aout_link_check_archive_element): Likewise.
132 * xcofflink.c (xcoff_link_check_archive_element): Likewise.
133 * cofflink.c (coff_link_check_archive_element): Likewise. Don't
134 scan symbols, simply add archive element whenever h is undefined.
135 (coff_link_check_ar_symbols): Delete.
136 * ecoff.c (read_ext_syms_and_strs): Delete.
137 (reread_ext_syms_and_strs): Delete.
138 (ecoff_link_check_archive_element): Add h and name param. Don't
139 scan symbols, simply add based on h. Use ecoff_link_add_object_symbols.
140 * elflink.c (elf_link_is_defined_archive_symbol): Don't test
141 archive_pass.
142 (elf_link_add_archive_symbols): Delete "defined" array, merge
143 functionality into "included". Make "included" a char array. Don't
144 set or test archive_pass.
145 * libbfd-in.h (_bfd_generic_link_add_archive_symbols): Update.
146 * libbfd.h: Regenerate.
147
148 2014-08-01 Takashi Yoshii <yoshii.takashi@renesas.com>
149
150 PR 10373
151 * elf32-sh.c (sh_elf_relax_section): Add jmp to bra relaxing.
152
153 2014-07-29 Matthew Fortune <matthew.fortune@imgtec.com>
154
155 * elfxx-mips.c (ABI_O32_P, MIPS_ELF_ABIFLAGS_SECTION_NAME_P): New macro.
156 (mips_elf_obj_tdata): Add abiflags and abiflags_valid fields.
157 (bfd_mips_elf_swap_abiflags_v0_in): New function.
158 (bfd_mips_elf_swap_abiflags_v0_out): Likewise.
159 (_bfd_mips_elf_section_from_shdr): Handle SHT_MIPS_ABIFLAGS.
160 (_bfd_mips_elf_fake_sections): Likewise.
161 (_bfd_mips_elf_always_size_sections): Handle .MIPS.abiflags.
162 (_bfd_mips_elf_additional_program_headers): Account for new
163 PT_MIPS_ABIFLAGS program header.
164 (_bfd_mips_elf_modify_segment_map): Create PT_MIPS_ABIFLAGS segment and
165 associate with .MIPS.abiflags.
166 (_bfd_mips_elf_gc_mark_extra_sections): New function.
167 (bfd_mips_isa_ext, update_mips_abiflags_isa): New static function.
168 (infer_mips_abiflags): Likewise.
169 (_bfd_mips_elf_final_link): Handle .MIPS.abiflags.
170 (mips_32bit_flags_p): Moved higher.
171 (mips_elf_merge_obj_attributes, _bfd_mips_fp_abi_string): Error
172 checking for FP ABIs.
173 (_bfd_mips_elf_merge_private_bfd_data): Restructure and add abiflags
174 checks. Check EF_MIPS_FP64 flag consistency.
175 (print_mips_ases, print_mips_isa_ext): New static function.
176 (print_mips_fp_abi_value, get_mips_reg_size): Likewise.
177 (_bfd_mips_elf_print_private_bfd_data): Display abiflags data.
178 (_bfd_mips_post_process_headers): Set EI_ABIVERSION = 3 for
179 Val_GNU_MIPS_ABI_FP_64 or Val_GNU_MIPS_ABI_FP_64A.
180 * elfxx-mips.h (_bfd_mips_elf_gc_mark_extra_sections): New prototype.
181 * elf32-mips.c (elf_backend_gc_mark_extra_sections): Implement.
182 * elfn32-mips.c (elf_backend_gc_mark_extra_sections): Implement.
183 * elf64-mips.c (elf_backend_gc_mark_extra_sections): Implement.
184
185 2014-07-28 Alan Modra <amodra@gmail.com>
186
187 PR 13227
188 * archive.c (_bfd_compute_and_write_armap): Warn on adding
189 __gnu_lto_slim to armap.
190 * linker.c (_bfd_generic_link_add_one_symbol): Warn on adding
191 __gnu_lto_slim to linker hash table.
192
193 2014-07-27 Anthony Green <green@moxielogic.org>
194
195 * config.bfd: Add moxie-*-moxiebox*.
196
197 2014-07-21 Joel Sherrill <joel.sherrill@oarcorp.com>
198
199 Add or reactivate or1k-*-rtems*
200 * bfd/config.bfd (or1k-*-rtems*): Reactivate.
201
202 2014-07-16 H.J. Lu <hongjiu.lu@intel.com>
203
204 * elf32-i386.c (elf_i386_plt_sym_val): Match PLT entry only for
205 ELFOSABI_GNU input.
206 * elf64-x86-64.c (elf_x86_64_plt_sym_val): Likewise.
207 (elf_x86_64_plt_sym_val_offset_plt_bnd): Likewise.
208
209 2014-07-16 H.J. Lu <hongjiu.lu@intel.com>
210
211 PR binutils/17154
212 * elf32-i386.c (elf_i386_plt_sym_val): Only match R_*_JUMP_SLOT
213 and R_*_IRELATIVE relocation offset with PLT entry.
214 * elf64-x86-64.c (elf_x86_64_plt_sym_val): Likewise.
215 (elf_x86_64_plt_sym_val_offset_plt_bnd): New.
216 (elf_x86_64_get_synthetic_symtab): Use it.
217
218 2014-07-15 H.J. Lu <hongjiu.lu@intel.com>
219
220 PR ld/17057
221 * elf32-i386.c (elf_i386_compute_jump_table_size): Replace
222 next_tls_desc_index with elf.srelplt->reloc_count.
223
224 2014-07-15 Alan Modra <amodra@gmail.com>
225
226 * cache.c (cache_bread_1): Don't return -1 when fread returns
227 a positive value.
228
229 2014-07-15 Alan Modra <amodra@gmail.com>
230
231 * elflink.c (elf_merge_st_other): Update comments. Simplify
232 visibility handling. Make isym const. Move code modifying
233 isym->st_other for --exclude-libs to..
234 (elf_link_add_object_symbols): ..here.
235
236 2014-07-11 Maks Naumov <maksqwe1@ukr.net>
237
238 PR 17141
239 * elf.c (_bfd_elf_strtab_add): Check strtab name for failure.
240
241 2014-07-08 Nick Clifton <nickc@redhat.com>
242
243 PR ld/17110
244 * elf32-sh.c (sh_elf_osec_to_segment): Do not look for output
245 segments in input bfds.
246
247 2014-07-08 Will Newton <will.newton@linaro.org>
248
249 * elf32-arm.c (ELF_MAXPAGESIZE): Increase the default
250 value to 64kB and remove custom setting for NaCl.
251
252 2014-07-08 Alan Modra <amodra@gmail.com>
253
254 * elflink.c (_bfd_elf_copy_link_hash_symbol_type): Copy st_other
255 bits from source to dest.
256 * linker.c (_bfd_generic_copy_link_hash_symbol_type): Update comment.
257 * targets.c (struct bfd_target <_bfd_copy_link_hash_symbol_type>):
258 Likewise.
259 * bfd-in2.h: Regenerate.
260
261 2014-07-08 Jiong Wang <jiong.wang@arm.com>
262
263 * elfnn-aarch64.c (elf_backend_rela_normal): Set to 1.
264 (elfNN_aarch64_relocate_section): Remove duplicated addend adjustment
265 when info->relocatable be true.
266
267 2014-07-07 Barney Stratford <barney_stratford@fastmail.fm>
268
269 * elf32-avr.c: Handle R_AVR_PORT5 and R_AVR_PORT6.
270 * reloc.c: Add BFD_RELOC_AVR_PORT5 and BFD_RELOC_AVR_PORT6.
271 * bfd-in2.h: Regenerate.
272 * libbfd.h: Regenerate.
273
274 2014-07-04 Alan Modra <amodra@gmail.com>
275
276 * Makefile.am: Update "configure.in" comments.
277 * PORTING: Likewise.
278 * aoutx.h: Likewise.
279 * configure.host: Likewise.
280 * doc/bfdint.texi: Likewise.
281 * targets.c: Likewise.
282 * warning.m4: Likewise.
283 * Makefile.in: Regenerate.
284
285 2014-07-04 Alan Modra <amodra@gmail.com>
286
287 * configure.ac: Rename from configure.in.
288 * Makefile.in: Regenerate.
289 * config.in: Regenerate.
290 * doc/Makefile.in: Regenerate.
291
292 2014-07-04 Alan Modra <amodra@gmail.com>
293
294 * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Remove configure.in.
295 * Makefile.in: Regenerate.
296
297 2014-07-04 Alan Modra <amodra@gmail.com>
298
299 * version.m4: New file.
300 * configure.in: Include version.m4.
301 (AC_INIT): Update.
302 * Makefile.am (RELEASE): Delete.
303 (bfdver.h): Depend on development.sh, use instead of RELEASE.
304 * Makefile.in: Regenerate.
305 * doc/Makefile.in: Regenerate.
306
307 2014-07-02 Alan Modra <amodra@gmail.com>
308
309 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Clear
310 pointer_equality_needed when !readonly_dynrelocs.
311 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
312
313 2014-07-02 Alan Modra <amodra@gmail.com>
314
315 * elf32-ppc.c (ppc_elf_check_relocs): Set DF_STATIC_TLS for PIEs too.
316 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
317
318 2014-07-01 Alan Modra <amodra@gmail.com>
319
320 * bfd.c (struct bfd): Reorganise for better packing. Delete
321 "ifd" field. Make "format", "direction" and "flags" bitfields.
322 (HAS_LOAD_PAGE): Delete, renumber following flags.
323 * bfd-in2.h: Regenerate.
324 * coff-tic4x.c: Remove HAS_LOAD_PAGE from extra flags in target vecs.
325
326 2014-07-01 Alan Modra <amodra@gmail.com>
327
328 * elf64-ppc.c (ppc_stub_type): Add ppc_stub_global_entry.
329 (struct ppc_link_hash_table): Increase size of stub_count array.
330 (build_global_entry_stubs): Emit symbol on global entry stub.
331 (ppc64_elf_build_stubs): NULL check htab->brlt. Add global entry
332 stub stats.
333
334 2014-07-01 Alan Modra <amodra@gmail.com>
335
336 * elf64-ppc.c (abiversion, set_abiversion): Move earlier.
337 (ppc64_elf_branch_reloc): Adjust addend for ELFv2 local offset.
338 (ppc64_elf_set_toc): Set ".TOC." symbol value when using
339 generic linker.
340 (ppc64_elf_relocate_section): Disable ELFv2 function entry
341 optimisation when --traditional-format.
342
343 2014-07-01 Barney Stratford <barney_stratford@fastmail.fm>
344 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
345 Pitchumani Sivanupandi <pitchumani.s@atmel.com>
346 Soundararajan <Sounderarajan.D@atmel.com>
347
348 * archures.c: Add avrtiny architecture for avr target.
349 * cpu-avr.c (arch_info_struct): Add avrtiny arch info.
350 * elf32-avr.c (elf_avr_howto_table): New relocation R_AVR_LDS_STS_16
351 added for 16 bit LDS/STS instruction of avrtiny arch.
352 (avr_reloc_map): Reloc R_AVR_LDS_STS_16 is mapped to
353 BFD_RELOC_AVR_LDS_STS_16.
354 (bfd_elf_avr_final_write_processing): Select machine number
355 avrtiny arch.
356 (elf32_avr_object_p): Set machine number for avrtiny arch.
357 * reloc.c: Add documentation for BFD_RELOC_AVR_LDS_STS_16 reloc.
358 * bfd-in2.h: Regenerate.
359 * libbfd.h: Regenerate.
360
361 2014-06-26 Nick Clifton <nickc@redhat.com>
362
363 PR binutils/16949
364 * dwarf2.c (is_str_attr): New function.
365 (find_abstract_instance_name): Use it to determine when an
366 attribute has a string value.
367
368 2014-06-24 Alan Modra <amodra@gmail.com>
369
370 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Arrange to keep
371 .sdata/.sdata2 when _SDA_BASE_/_SDA2_BASE_ should be output
372 for --emit-relocs.
373
374 2014-06-21 Philippe De Muyter <phdm@macqel.be>
375
376 * targets.c (_bfd_target_vector): Add missing #ifdef BFD64 for
377 a number of targets.
378
379 2014-06-20 Kyle McMartin <kyle@redhat.com>
380
381 * elf32-arm.c (elf32_arm_check_relocs): Set DF_STATIC_TLS when
382 emitting initial-exec relocs when not linking an executable.
383
384 2014-06-16 Will Newton <will.newton@linaro.org>
385
386 * elf32-arm.c (elf32_arm_allocate_plt_entry): Increment
387 htab->next_tls_desc_index in the non-IPLT case.
388 Calculate GOT offset correctly for the non-IPLT case.
389 (allocate_dynrelocs_for_symbol): Don't increment
390 htab->next_tls_desc_index here.
391
392 2014-06-16 Alan Modra <amodra@gmail.com>
393
394 * elf32-vax.c (elf_vax_size_dynamic_sections): Clear linker
395 created sections.
396
397 2014-06-13 Omair Javaid <omair.javaid@linaro.org>
398
399 * elfxx-aarch64.c (stdarg.h): Include.
400 (string.h): Include.
401 (_bfd_aarch64_elf_grok_prstatus): Updated.
402 (_bfd_aarch64_elf_grok_psinfo): New function.
403 (_bfd_aarch64_elf_write_core_note): New function.
404 * elfxx-aarch64.h (elf_backend_grok_psinfo): Define.
405 (elf_backend_write_core_note): Define.
406
407 2014-06-13 Alan Modra <amodra@gmail.com>
408
409 * archive.c: Include bfdlink.h.
410 (_bfd_archive_close_and_cleanup): Call linker hash_table_free.
411 * bfd.c (struct bfd): Add is_linker_output field.
412 * elf-bfd.h (_bfd_elf_link_hash_table_free): Update prototype.
413 * linker.c (_bfd_link_hash_table_init): Set up hash_table_free,
414 link.hash and is_linker_output.
415 (_bfd_generic_link_hash_table_free): Replace bfd_link_hash_table*
416 param with bfd*. Assert is_linker_output and link.hash, and
417 clear them before exit.
418 * elf-m10300.c (elf32_mn10300_link_hash_table_free): Replace
419 bfd_link_hash_table* param with bfd*. Hack is_linker_output
420 and link.hash so we can free two linker hash tables.
421 (elf32_mn10300_link_hash_table_create): Create static_hash_table
422 first. Clean up on errors. Set hash_table_free pointer.
423 * elf32-arm.c (elf32_arm_link_hash_table_free): Replace
424 bfd_link_hash_table* param with bfd*.
425 (elf32_arm_link_hash_table_create): Clean up on errors. Set
426 hash_table_free pointer.
427 * elf32-avr.c, * elf32-hppa.c, * elf32-i386.c, * elf32-m68hc1x.c,
428 * elf32-m68k.c, * elf32-metag.c, * elf32-nios2.c, * elf32-xgate.c,
429 * elf64-ia64-vms.c, * elf64-ppc.c, * elf64-x86-64.c, * elflink.c,
430 * elfnn-aarch64.c, * elfnn-ia64.c, * elfxx-sparc.c,
431 * xcofflink.c: Similarly.
432 * simple.c (bfd_simple_get_relocated_section_contents): Save and
433 clear link.next before creating linker hash table. Clean up on
434 errors, and restore link.next on exit.
435 * elf32-m68hc1x.h (m68hc11_elf_bfd_link_hash_table_free): Delete.
436 * elf32-xgate.h (xgate_elf_bfd_link_hash_table_free): Delete.
437 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table_free): Delete.
438 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Delete.
439 * hash.c (bfd_hash_table_init_n): Free table on error.
440 * libbfd-in.h (_bfd_generic_link_hash_table_free): Update proto.
441 * bfd-in2.h: Regenerate.
442 * libbfd.h: Regenerate.
443 * libcoff.h: Regenerate.
444
445 2014-06-13 Alan Modra <amodra@gmail.com>
446
447 PR 17047
448 * targets.c (BFD_JUMP_TABLE): Delete NAME##_bfd_link_hash_table_free.
449 (struct bfd_target <_bfd_link_hash_table_free>): Delete.
450 * bfd.c (bfd_link_hash_table_free): Don't define.
451 * aout-adobe.c, * aout-target.h, * aout-tic30.c, * binary.c, * bout.c,
452 * coff64-rs6000.c, * coffcode.h, * elf-m10300.c, * elf32-arm.c,
453 * elf32-avr.c, * elf32-hppa.c, * elf32-i386.c, * elf32-m68hc11.c,
454 * elf32-m68hc12.c, * elf32-m68k.c, * elf32-metag.c, * elf32-nios2.c,
455 * elf32-sparc.c, * elf32-xgate.c, * elf64-ia64-vms.c, * elf64-ppc.c,
456 * elf64-sparc.c, * elf64-x86-64.c, * elfnn-aarch64.c, * elfnn-ia64.c,
457 * elfxx-target.h, * i386msdos.c, * i386os9k.c, * ieee.c, * ihex.c,
458 * libbfd-in.h, * libecoff.h, * mach-o-target.c, * mmo.c,
459 * nlm-target.h, * oasys.c, * pef.c, * plugin.c, * ppcboot.c, * som.c,
460 * srec.c, * tekhex.c, * verilog.c, * versados.c, * vms-alpha.c,
461 * xsym.c: Don't define various link_hash_table_free defines, and
462 remove from bfd_target vars. Temporarily reference some of the
463 target link_hash_table_free functions to avoid warnings.
464 * bfd-in2.h: Regenerate.
465 * libbfd.h: Regenerate.
466
467 2014-06-13 Alan Modra <amodra@gmail.com>
468
469 * elf-m10300.c, * elf32-arm.c, * elf32-avr.c, * elf32-hppa.c,
470 * elf32-i386.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-metag.c,
471 * elf32-nios2.c, * elf64-ia64-vms.c, * elf64-ppc.c, * elf64-x86-64.c,
472 * elfnn-aarch64.c, * elfnn-ia64.c, * elfxx-sparc.c, * xcofflink.c:
473 Move link_hash_table_free functions before their corresponding
474 link_hash_table_create functions.
475
476 2014-06-13 Alan Modra <amodra@gmail.com>
477
478 * bfd.c (struct bfd): Replace link_next with a union.
479 * aoutx.h, * bfd.c, * coff-ppc.c, * coff-rs6000.c, * cofflink.c,
480 * ecoff.c, * elf-m10300.c, * elf32-arm.c, * elf32-avr.c,
481 * elf32-hppa.c, * elf32-i386.c, * elf32-lm32.c, * elf32-m32c.c,
482 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-metag.c,
483 * elf32-microblaze.c, * elf32-nds32.c, * elf32-nios2.c,
484 * elf32-or1k.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-s390.c,
485 * elf32-score.c, * elf32-score7.c, * elf32-sh.c, * elf32-spu.c,
486 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-xstormy16.c,
487 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
488 * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-x86-64.c,
489 * elflink.c, * elfnn-aarch64.c, * elfxx-mips.c, * elfxx-sparc.c,
490 * elfxx-tilegx.c, * linker.c, * pdp11.c, * peXXigen.c, * simple.c,
491 * sunos.c, * vms-alpha.c, * xcofflink.c: Update for above.
492 * bfd-in2.h: Regenerate.
493
494 2014-06-11 Alan Modra <amodra@gmail.com>
495
496 * linker.c (unwrap_hash_lookup): Add missing parens.
497
498 2014-06-11 Kai Tietz <ktietz@redhat.com>
499
500 * libcoff-in.h (coff_tdata): Make relocbase member unsigned.
501 * libcoff.h: Regenerated.
502
503 2014-06-10 Alan Modra <amodra@gmail.com>
504
505 PR ld/16910
506 * linker.c (unwrap_hash_lookup): New function.
507 * elf-bfd (RELOC_FOR_GLOBAL_SYMBOL): Call unwrap_hash_lookup.
508 * elf32-i370.c (i370_elf_relocate_section): Likewise.
509 * elf32-m32c.c (m32c_elf_relocate_section): Likewise.
510 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
511 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
512 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
513 * elf32-spu.c (spu_elf_relocate_section): Likewise.
514 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
515
516 2014-06-07 Alan Modra <amodra@gmail.com>
517
518 * elf32-ppc.c (ppc_elf_relocate_section): Treat field of cmpli
519 insn as a bitfield; Use complain_overflow_bitfield.
520 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
521
522 2014-06-05 Joel Brobecker <brobecker@adacore.com>
523
524 * development.sh: New file.
525 * warning.m4 (AM_BINUTILS_WARNINGS): Source bfd/development.sh.
526 Make -Werror the default with GCC only if DEVELOPMENT is true.
527 * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add
528 $(srcdir)/development.sh.
529 * Makefile.in, configure: Regenerate.
530
531 2014-06-04 Will Newton <will.newton@linaro.org>
532
533 * elfnn-aarch64.c (tpoff_base): Make test of tls_sec
534 being non-NULL into an assert.
535 (elfNN_aarch64_tls_relax): Remove unused code.
536
537 2014-06-03 DJ Delorie <dj@redhat.com>
538
539 * elf32-rx.c (rx_table_map): Use BFD_VMA_FMT for portability.
540
541 2014-06-03 Nick Clifton <nickc@redhat.com>
542
543 PR ld/16807
544 * peXXigen.c (rsrc_process_section): Page align the new contents
545 befgore writing out.
546
547 2014-06-03 Alan Modra <amodra@gmail.com>
548
549 * elf64-ppc.c (ADDIS_R12_R2): Define.
550 (build_plt_stub): Support fusion on ELFv2 stub.
551 (ppc_build_one_stub): Likewise for plt branch stubs.
552
553 2014-05-28 Alan Modra <amodra@gmail.com>
554
555 * elf32-rx.c (rx_table_map): Delete set but not used variables.
556
557 2014-05-28 Tristan Gingold <gingold@adacore.com>
558
559 * dwarf2.c (lookup_address_in_function_table): Add best_fit_len
560 to keep the length of the best fit range.
561 (lookup_symbol_in_function_table, info_hash_lookup_funcinfo):
562 Likewise.
563
564 2014-05-27 DJ Delorie <dj@redhat.com>
565
566 * bfd/elf32-rx.c (get_symbol_value_maybe): New.
567 (rx_elf_relocate_section): If we find a reloc against
568 $tableentry$default$<name>, redirect it to the appropriate
569 $tableentry$<n>$.
570 (RX_Table_Info): New.
571 (rx_table_find): New. Check all tables and SEC_KEEP all sections
572 with table parts in them.
573 (rx_check_directives): New.
574 (rx_table_map_2): New.
575 (rx_table_map): New.
576 (rx_additional_link_map_text): New. Called to dump tables to the
577 map file.
578 * bfd/elf32-rx.h: New.
579
580 2014-05-20 DJ Delorie <dj@redhat.com>
581
582 * elf32-msp430.c (msp430_elf_relax_adjust_locals): Avoid overflow.
583
584 2014-05-20 Alan Modra <amodra@gmail.com>
585
586 PR 16952
587 * elf32-ppc.c (ppc_elf_create_linker_section): Move earlier.
588 Remove redundant setting of htab->elf.dynobj. Don't align.
589 Define .sdata symbols using _bfd_elf_define_linkage_sym.
590 (ppc_elf_create_glink): Call ppc_elf_create_linker_section.
591 (create_sdata_sym): Delete.
592 (elf_allocate_pointer_linker_section): Rename from
593 elf_create_pointer_linker_section. Align section.
594 (ppc_elf_check_relocs): Don't call ppc_elf_creat_linker_section
595 directly here, or create_sdata_sym. Set ref_regular on _SDA_BASE_
596 and _SDA2_BASE_.
597 (ppc_elf_size_dynamic_sections): Remove ATTRIBUTE_UNUSED on param.
598 Remove unnecessary tests on _SDA_BASE_ sym.
599 (maybe_strip_sdasym, ppc_elf_maybe_strip_sdata_syms): New functions.
600 (ppc_elf_relocate_section): Tighten SDA reloc symbol section checks.
601 * elf32-ppc.h (ppc_elf_set_sdata_syms): Delete.
602 (ppc_elf_maybe_strip_sdata_syms): Declare.
603
604 2014-05-16 Ryan Mansfield <rmansfield@qnx.com>
605
606 * config.bfd: Move QNX target_cflags from arm-*-netbsd* to arm-*-nto*.
607
608 2014-05-16 Jon Turney <jon.turney@dronecode.org.uk>
609
610 * peXXigen.c (pe_print_debugdata): Don't interpret debug directory
611 in a section with no contents.
612 (is_vma_in_section, find_section_by_vma): New functions.
613 (_bfd_XX_bfd_copy_private_bfd_data_common): Recalculate file
614 offsets in the debug directory.
615 (_bfd_XXi_slurp_codeview_record, _bfd_XXi_write_codeview_record):
616 Byte-swap GUID from little-endian to big-endian order for
617 consistent and conventional display.
618
619 2014-05-16 Kaushik Phata <Kaushik.Phatak@kpit.com>
620
621 * elf32-rl78.c (rl78_elf_merge_private_bfd_data): Complain if
622 64-bit doubles objects mix with 32-bit doubles objects.
623 (rl78_elf_print_private_bfd_data): Describe 64-bit doubles flag.
624
625 2014-05-08 Hans-Peter Nilsson <hp@bitrange.com>
626
627 * mmo.c: Update URLs in documentation comments.
628
629 2014-05-02 Volodymyr Arbatov <arbatov@cadence.com>
630 David Weatherford <weath@cadence.com>
631 Max Filippov <jcmvbkbc@gmail.com>
632
633 * elf32-xtensa.c (relax_section): treat R_XTENSA_DIFF* relocations as
634 signed.
635
636 2014-05-07 Andreas Tobler <andreast@fgznet.ch>
637
638 * config.bfd: Add proper arm config for *-*-freebsd*.
639
640 2014-05-07 Andrew Bennett <andrew.bennett@imgtec.com>
641
642 * aoutx.h (NAME (aout, machine_type)): Add mips32r3, mips64r3,
643 mips32r5 and mips64r5.
644 * archures.c (bfd_architecture): Likewise.
645 * bfd-in2.h (bfd_architecture): Likewise.
646 * cpu-mips.c (arch_info_struct): Likewise.
647 * elfxx-mips.c (mips_set_isa_flags): Likewise.
648
649 2014-05-06 Richard Sandiford <rdsandiford@googlemail.com>
650
651 * elfxx-mips.h (elfxx-mips.h): Declare.
652 * elfxx-mips.c (mips_elf_merge_obj_attributes): Use it to report
653 Tag_GNU_MIPS_ABI_FP mismatches.
654 (_bfd_mips_fp_abi_string): New function.
655
656 2014-05-02 Alan Modra <amodra@gmail.com>
657
658 * targets.c: Sort bfd_target vectors somewhat alphabetically.
659 * configure.in: Likewise.
660 * configure: Regenerate.
661
662 2014-05-02 Alan Modra <amodra@gmail.com>
663
664 * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-ns32k.c,
665 * aout-sparcle.c, * aout0.c, * aoutx.h, * armnetbsd.c, * bout.c,
666 * cf-i386lynx.c, * cf-sparclynx.c, * cisco-core.c, * coff-alpha.c,
667 * coff-apollo.c, * coff-arm.c, * coff-aux.c, * coff-go32.c,
668 * coff-h8300.c, * coff-h8500.c, * coff-i386.c, * coff-i860.c,
669 * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mips.c,
670 * coff-rs6000.c, * coff-sh.c, * coff-sparc.c, * coff-stgo32.c,
671 * coff-svm68k.c, * coff-tic80.c, * coff-u68k.c, * coff-w65.c,
672 * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c,
673 * coff64-rs6000.c, * config.bfd, * configure.com, * configure.in,
674 * demo64.c, * elf-m10200.c, * elf-m10300.c, * elf32-am33lin.c,
675 * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c,
676 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
677 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
678 * elf32-fr30.c, * elf32-frv.c, * elf32-gen.c, * elf32-h8300.c,
679 * elf32-hppa.c, * elf32-i370.c, * elf32-i386.c, * elf32-i860.c,
680 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
681 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
682 * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c,
683 * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
684 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nios2.c,
685 * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c,
686 * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-sh-symbian.c,
687 * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c,
688 * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilepro.c, * elf32-v850.c,
689 * elf32-vax.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xstormy16.c,
690 * elf32-xtensa.c, * elf64-alpha.c, * elf64-gen.c, * elf64-hppa.c,
691 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c,
692 * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c,
693 * elf64-x86-64.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
694 * epoc-pe-arm.c, * epoc-pei-arm.c, * hp300bsd.c, * hp300hpux.c,
695 * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386bsd.c,
696 * i386dynix.c, * i386freebsd.c, * i386linux.c, * i386lynx.c,
697 * i386mach3.c, * i386msdos.c, * i386netbsd.c, * i386os9k.c,
698 * irix-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c,
699 * m88kmach3.c, * m88kopenbsd.c, * mach-o-i386.c, * mach-o-x86-64.c,
700 * makefile.vms, * mipsbsd.c, * mmo.c, * netbsd-core.c, * newsos3.c,
701 * nlm32-alpha.c, * nlm32-i386.c, * nlm32-ppc.c, * nlm32-sparc.c,
702 * ns32knetbsd.c, * osf-core.c, * pc532-mach.c, * pe-arm-wince.c,
703 * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-ppc.c,
704 * pe-sh.c, * pe-x86_64.c, * pei-arm-wince.c, * pei-arm.c,
705 * pei-i386.c, * pei-ia64.c, * pei-mcore.c, * pei-mips.c, * pei-ppc.c,
706 * pei-sh.c, * pei-x86_64.c, * ppcboot.c, * ptrace-core.c, * riscix.c,
707 * sco5-core.c, * som.c, * sparclinux.c, * sparclynx.c,
708 * sparcnetbsd.c, * sunos.c, * targets.c, * trad-core.c,
709 * vax1knetbsd.c, * vaxbsd.c, * vaxnetbsd.c, * versados.c,
710 * vms-alpha.c, * vms-lib.c: Rename bfd targets to
711 <cpu>_<format>_<other>_<endian>_vec. Adjust associated MY macros
712 on aout targets.
713 * configure: Regenerate.
714
715 2014-05-01 Hans-Peter Nilsson <hp@bitrange.com>
716
717 * mmo.c (mmo File layout documentation): Add note about low bits
718 of address.
719 (mmo_write_chunk): When handling data remainder, assert that
720 previous remaining data is flushed.
721 (mmo_write_loc_chunk): Only look for trailing and leading zeros
722 when dealing with an aligned VMA and for aligned lengths. Don't skip
723 the last 32-bit-word of zeros.
724 (mmo_write_loc_chunk): Emit an error if the VMA is not aligned.
725 (mmo_scan) <case LOP_QUOTE>: Move re-alignment of vma before
726 emitting data, not after updating it.
727 <case LOP_LOC>: Call mmo_decide_section with aligned vma.
728
729 2014-04-30 Nick Clifton <nickc@redhat.com>
730
731 * compress.c (bfd_is_section_compressed): When checking the
732 .debug_str section, also check the fifth byte in the section is
733 not part of a string.
734
735 2014-04-30 Alan Modra <amodra@gmail.com>
736
737 * elf-eh-frame.c (struct cie.personality): Replace val with sym.
738 (find_merged_cie): Identify personality functions by (bfd_id,index)
739 pair when a local sym is used.
740
741 2014-04-29 Christian Svensson <blue@cmd.nu>
742
743 * elf32-or1k.c: Fix a bug where non-TLS relocations would be forced
744 into .rela.got if it contained TLS relocations as well.
745
746 2014-04-28 Nick Clifton <nickc@redhat.com>
747
748 PR ld/16821
749 * peXXigen.c (_bfd_XXi_swap_sym_out): Rework fix to avoid compile
750 time warning.
751
752 2014-04-26 Alan Modra <amodra@gmail.com>
753
754 * po/SRC-POTFILES.in: Regenerate.
755 * configure: Regenerate.
756
757 2014-04-25 Nick Clifton <nickc@redhat.com>
758
759 PR ld/16821
760 * peXXigen.c (_bfd_XXi_swap_sym_out): Another fix for building on
761 a 342-bit host. This time for older versions of gcc.
762
763 2014-04-24 Nick Clifton <nickc@redhat.com>
764
765 * peXXigen.c (rsrc_print_section): Fix compile time warning for
766 32-bit hosts.
767
768 2014-04-24 Alan Modra <amodra@gmail.com>
769
770 PR 16867
771 * dwarf2.c: Formatting.
772 (struct dwarf2_debug): Make adjusted_section_count signed.
773 (unset_sections): Make i signed.
774 (set_debug_vma): New function.
775 (place_sections): Handle separate debug object file. Set VMA
776 on debug sections, even if they have an output section. Also
777 set VMA on zero size sections, and non-load but alloc sections.
778 Set adjusted_section_count to -1 when no section adjustment.
779 Malloc adjusted_sections. Don't double last_vma. Transfer
780 alloc section VMAs to separate debug file.
781 (_bfd_dwarf2_cleanup_debug_info): Free adjusted_sections.
782 (_bfd_dwarf2_slurp_debug_info): Add do_place parameter. Drop
783 test on symbols being the same before using old stash. Read
784 and use separate debug file symbols. Call place_sections.
785 (find_line): Don't call place_sections here.
786 * libbfd-in.h (_bfd_dwarf2_slurp_debug_info): Update proto.
787 * libbfd.h: Regenerate.
788 * mach-o.c (bfd_mach_o_find_nearest_line): Adjust
789 _bfd_dwarf2_slurp_debug_info call.
790 * simple.c (simple_save_output_info): Clarify comment.
791
792 2014-04-24 Nick Clifton <nickc@redhat.com>
793
794 PR ld/16807
795 * peXXigen.c (struct rsrc_regions): New structure.
796 (rsrc_print_resource_directory): Use new structure. Include
797 offset of directory in listing.
798 (rsrc_print_resource_entry): Likewise.
799 (rsrc_print_section): Likewise.
800 (rsrc_count_entries): Do not increment sizeof_strings or
801 sizeof_leaves.
802 (rsrc_count_directory): Do not increment sizeof_tables.
803 (rsrc_compute_region_sizes): New function.
804 (rsrc_write_leaf): Maintain 8-byte alignment for resource data.
805 (rsrc_process_section): Compute size of regions after merging
806 entries.
807
808 2014-04-23 Alan Modra <amodra@gmail.com>
809
810 PR ld/16787
811 * dwarf2.c (struct dwarf2_debug): Add sec_vma field.
812 (place_sections): Do not modify VMA of sections when called from
813 linker after sections have been placed in output sections. Short
814 circuit single section case.
815 (save_section_vma, section_vma_same): New functions.
816 (_bfd_dwarf2_slurp_debug_info): Throw away stash if section VMAs
817 change.
818 * reloc.c (bfd_perform_relocation): Do not modify reloc addend
819 when non-relocatable.
820
821 2014-04-22 Nick Clifton <nickc@redhat.com>
822
823 PR ld/16821
824 * peXXigen.c (_bfd_XXi_swap_sym_out): Fix for 32-bit hosts.
825
826 2014-04-22 Christian Svensson <blue@cmd.nu>
827
828 * Makefile.am: Remove openrisc and or32 support. Add support for or1k.
829 * archures.c: Likewise.
830 * coffcode.h: Likewise.
831 * config.bfd: Likewise.
832 * configure.in: Likewise.
833 * reloc.c: Likewise.
834 * targets.c: Likewise.
835 * cpu-or1k.c: New file.
836 * elf32-or1k.c: New file.
837 * coff-or32.c: Delete.
838 * cpu-openrisc.c: Delete.
839 * cpu-or32.c: Delete.
840 * elf32-openrisc.c: Delete.
841 * elf32-or32.c: Delete.
842 * Makefile.in: Regenerate.
843 * bfd-in2.h: Regenerate.
844 * configure: Regenerate.
845 * libbfd.h: Regenerate.
846
847 2014-04-22 Yuanhui Zhang <asmwarrior@gmail.com>
848
849 PR ld/16821
850 * peXXigen.c (abs_finder): Fix for 32-bit host builds.
851
852 2014-04-22 Will Newton <will.newton@linaro.org>
853
854 * elfnn-aarch64.c (elfNN_aarch64_section_flags): Remove
855 function. (elf_backend_section_flags): Remove define.
856
857 2014-04-21 Richard Henderson <rth@redhat.com>
858
859 * elf64-alpha.c (elf64_alpha_size_got_sections): New may_merge
860 parameter; honor it and disable got merging when false.
861 (elf64_alpha_relax_got_load): Do not relax to GPREL relocs during
862 the first pass of relaxation.
863 (elf64_alpha_relax_with_lituse): Likewise. Move relaxed relocs to
864 the end of the LITERAL+LITUSE chain.
865 (elf64_alpha_relax_section): Only process LITERAL relocs during the
866 second pass of relaxation.
867
868 * configure.ac (use_secureplt): Enable by default.
869 * configure: Rebuild.
870
871 2014-04-18 Tristan Gingold <gingold@adacore.com>
872
873 * mach-o.h (bfd_mach_o_dyld_info_command): Add rebase_content,
874 bind_content, weak_bind_content, lazy_bind_content,
875 export_content.
876 (bfd_mach_o_load_command): Add comments, add next field.
877 (mach_o_data_struct): Replace commands field by first_command
878 and last_command.
879 * mach-o.c (bfd_mach_o_append_command): New function.
880 (bfd_mach_o_bfd_copy_private_symbol_data): Add blank lines.
881 (bfd_mach_o_bfd_copy_private_section_data): Check flavour,
882 copy fields.
883 (bfd_mach_o_bfd_copy_private_header_data): Copy load commands.
884 (bfd_mach_o_pad4, bfd_mach_o_pad_command): New functions.
885 (bfd_mach_o_write_thread): Use macro instead of literal.
886 (bfd_mach_o_write_dylinker, bfd_mach_o_write_dylib)
887 (bfd_mach_o_write_main, bfd_mach_o_write_dyld_info): New
888 functions.
889 (bfd_mach_o_write_symtab_content): New function (extracted
890 from bfd_mach_o_write_symtab).
891 (bfd_mach_o_write_symtab): Split.
892 (bfd_mach_o_count_indirect_symbols): Move
893 (bfd_mach_o_build_dysymtab): Remove layout code.
894 (bfd_mach_o_write_contents): Rewritten to build commands in order.
895 (bfd_mach_o_count_sections_for_seg): Remove.
896 (bfd_mach_o_build_obj_seg_command): New function (extracted from
897 bfd_mach_o_build_seg_command).
898 (bfd_mach_o_build_exec_seg_command): New function.
899 (bfd_mach_o_build_dysymtab_command): Remove.
900 (bfd_mach_o_layout_commands): New function.
901 (bfd_mach_o_init_segment): New function.
902 (bfd_mach_o_build_commands): Major rework to handle non-object
903 files.
904 (bfd_mach_o_alloc_and_read, bfd_mach_o_read_dyld_content): New
905 function.
906 (bfd_mach_o_read_dyld_info): Clear content fields.
907 (bfd_mach_o_read_segment): Adjust call.
908 (bfd_mach_o_flatten_sections): Adjust as now load commands are
909 chained.
910 (bfd_mach_o_scan_start_address, bfd_mach_o_scan)
911 (bfd_mach_o_mkobject_init, bfd_mach_o_get_base_address)
912 (bfd_mach_o_lookup_command, bfd_mach_o_core_fetch_environment):
913 Likewise.
914
915 2014-04-18 Tristan Gingold <gingold@adacore.com>
916
917 * mach-o-target.c (bfd_mach_o_bfd_copy_private_header_data):
918 Define instead of bfd_mach_o_bfd_copy_private_bfd_data.
919 * mach-o.c (bfd_mach_o_bfd_copy_private_bfd_data): Rename.
920 * mach-o.h (bfd_mach_o_bfd_copy_private_bfd_data): Likewise.
921
922 2014-04-18 Tristan Gingold <gingold@adacore.com>
923
924 * mach-o.h (bfd_mach_o_dylinker_command)
925 (bfd_mach_o_dylib_command, bfd_mach_o_fvmlib_command): Remove
926 name_len field.
927 * mach-o.c (bfd_mach_o_read_dylinker, bfd_mach_o_read_dylib)
928 (bfd_mach_o_read_fvmlib): Adjust after name_len removal.
929
930 2014-04-18 Tristan Gingold <gingold@adacore.com>
931
932 * mach-o.h (bfd_mach_o_backend_data): Add page_size field.
933 * mach-o-target.c: Check TARGET_PAGESIZE is defined.
934 (TARGET_NAME_BACKEND): Add TARGET_PAGESIZE.
935 * mach-o.c (TARGET_PAGESIZE): Define and undefined for
936 each targets declared.
937 * mach-o-x86-64.c (TARGET_PAGESIZE): Define.
938 * mach-o-i386.c (TARGET_PAGESIZE): Define.
939
940 2014-04-18 Tristan Gingold <gingold@adacore.com>
941
942 * mach-o.c (bfd_mach_o_write_thread)
943 (bfd_mach_o_write_section_32, bfd_mach_o_write_section_64)
944 (bfd_mach_o_write_segment_32, bfd_mach_o_write_segment_64)
945 (bfd_mach_o_read_dylinker, bfd_mach_o_read_dylib)
946 (bfd_mach_o_read_prebound_dylib, bfd_mach_o_read_prebind_cksum)
947 (bfd_mach_o_read_twolevel_hints, bfd_mach_o_read_fvmlib)
948 (bfd_mach_o_read_thread, bfd_mach_o_read_dysymtab)
949 (bfd_mach_o_read_symtab, bfd_mach_o_read_uuid)
950 (bfd_mach_o_read_linkedit, bfd_mach_o_read_str)
951 (bfd_mach_o_read_dyld_info, bfd_mach_o_read_segment)
952 (bfd_mach_o_read_segment_32, bfd_mach_o_read_segment_64)
953 (bfd_mach_o_read_command): Now return a boolean status.
954 Adjust return statements.
955 (bfd_mach_o_write_contents, bfd_mach_o_scan): Adjust tests.
956 (bfd_mach_o_core_file_failing_command): Remove useless initialization.
957
958 2014-04-17 Kwok Cheung Yeung <kcy@codesourcery.com>
959
960 * elfxx-mips.c (struct mips_got_info): Delete assigned_gotno
961 field. Add assigned_low_gotno and assigned_high_gotno fields.
962 (mips_elf_create_local_got_entry): Update out-of-space condition.
963 Set index of new GOT entry to assigned_low_gotno if required by
964 the current relocation, else set it to assigned_high_gotno.
965 (mips_elf_set_global_gotidx): Replace uses of assigned_gotno
966 with assigned_low_gotno.
967 (mips_elf_multi_got): Initialize assigned_low_gotno and
968 assigned_high_gotno in secondary GOTs. Use assigned_low_gotno
969 in place of assigned_gotno when handling global GOT entries.
970 (mips_elf_lay_out_got): Initialize assigned_low_gotno and
971 assigned_high_gotno.
972 (_bfd_mips_elf_finish_dynamic_sections): Account for a possible
973 gap in the middle of local GOT space.
974
975 2014-04-17 Alan Modra <amodra@gmail.com>
976
977 PR 16846
978 * elflink.c (_bfd_elf_merge_symbol): Ignore TLS mismatch when
979 current bfd is a plugin. Don't always set type_change_ok
980 when old bfd is a plugin.
981
982 2014-04-16 Tristan Gingold <gingold@adacore.com>
983
984 * mach-o-x86-64.c (bfd_mach_o_x86_64_mkobject): Adjust cpusubtype
985 flag.
986
987 2014-04-16 Alan Modra <amodra@gmail.com>
988
989 * elf32-ppc.c (ppc_elf_relocate_section): Fill 476 fixup area
990 with "ba 0" rather than zeros.
991
992 2014-04-15 Marcus Shawcroft <marcus.shawcroft@arm.com>
993
994 * (elfNN_aarch64_tls_relax): Fix instruction mask.
995
996 2014-04-14 Alan Modra <amodra@gmail.com>
997
998 * elf32-ppc.c (BA): Define
999 (ppc_elf_link_hash_table_create): Correct default_params.
1000 (write_glink_stub): Pad small plt call stub with "ba 0" rather
1001 than "nop" for ppc476_workaround.
1002 (ppc_elf_finish_dynamic_sections): Likewise for branch table
1003 and __glink_PLTresolve. Ensure plt call stub at end of page
1004 doesn't allow fall-thru prefetch.
1005
1006 2014-04-11 Nick Clifton <nickc@redhat.com>
1007
1008 PR ld/16821
1009 * peXXigen.c (abs_finder): New function.
1010 (_bfd_XXi_swap_sym_out): For absolute symbols with values larger
1011 than 1^32 try to convert them into section relative values
1012 instead.
1013
1014 2014-04-11 Nick Clifton <nickc@redhat.com>
1015
1016 * bfd-in2.h: Regenerate.
1017 * libbfd.h: Regenerate.
1018
1019 2014-04-10 Cesar Philippidis <cesar@codesourcery.com>
1020
1021 * elf32-nios2.c (nios2_elf32_build_stubs): Ignore dynobjs
1022 when building function stubs.
1023
1024 2014-04-10 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1025
1026 * elf32-avr.c: Add DIFF relocations for AVR.
1027 (avr_final_link_relocate): Handle the DIFF relocs.
1028 (bfd_elf_avr_diff_reloc): New.
1029 (elf32_avr_is_diff_reloc): New.
1030 (elf32_avr_adjust_diff_reloc_value): Reduce difference value.
1031 (elf32_avr_relax_delete_bytes): Recompute difference after deleting
1032 bytes.
1033
1034 * reloc.c: Add BFD_RELOC_AVR_DIFF8/16/32 relocations
1035
1036 2014-04-09 Alan Modra <amodra@gmail.com>
1037
1038 * libcoff.h: Regenerate.
1039
1040 2014-04-09 Alan Modra <amodra@gmail.com>
1041
1042 * elf32-ppc.c (ppc_elf_relocate_section): Remove bctr from list
1043 of safe ppc476 insns at end of page. Also remove non-branch insns.
1044 Expand comments.
1045
1046 2014-04-08 Jon Turney <jon.turney@dronecode.org.uk>
1047
1048 * peXXigen.c (pe_print_debugdata): New function: Displays the
1049 contents of the debug directory and decodes codeview entries.
1050 (_bfd_XXi_swap_debugdir_in, _bfd_XXi_swap_debugdir_out)
1051 (_bfd_XXi_slurp_codeview_record, _bfd_XXi_write_codeview_record):
1052 Add functions for reading and writing debugdir and codeview
1053 records.
1054 * libpei.h (_bfd_XXi_swap_debugdir_in, _bfd_XXi_swap_debugdir_out)
1055 (_bfd_XXi_write_codeview_record): Add prototypes and macros.
1056 * libcoff-in.h (pe_tdata): Add build-id data.
1057 * libcoff.h: Regenerate.
1058 * coffcode.h (coff_write_object_contents): Run build_id
1059 after_write_object_contents hook.
1060
1061 2014-04-05 Alan Modra <amodra@gmail.com>
1062
1063 * elflink.c (_bfd_elf_add_default_symbol): Pass poldbfd when
1064 merging non-default sym.
1065
1066 2014-04-04 Tristan Gingold <gingold@adacore.com>
1067
1068 * mach-o.c (bfd_mach_o_header_p): Reject 64 bit target when not
1069 configured for.
1070
1071 2014-04-04 Tristan Gingold <gingold@adacore.com>
1072
1073 * mach-o.c (bfd_mach_o_convert_section_name_to_mach_o): Fix
1074 thinko on names length.
1075
1076 2014-04-04 Tristan Gingold <gingold@adacore.com>
1077
1078 * mach-o-i386.c (bfd_mach_o_i386_swap_reloc_out): Use target index
1079 of output_section.
1080 * mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Ditto.
1081
1082 2014-04-04 Tristan Gingold <gingold@adacore.com>
1083
1084 * bfd.c (bfd_get_arch_size): Default is taken from arch.
1085
1086 2014-04-03 Jon Turney <jon.turney@dronecode.org.uk>
1087
1088 * peXXigen.c (pe_print_edata): Verify edt.name lies inside
1089 section before dereferencing.
1090 (pe_print_idata, pe_print_edata, pe_print_reloc)
1091 (rsrc_print_section): Don't bother interpreting the contents
1092 of sections which have no contents.
1093
1094 2014-04-03 Maria Guseva <m.guseva@samsung.com>
1095
1096 PR ld/16803
1097 * elf.c (_bfd_elf_set_section_contents): Use correct type to hold
1098 file position.
1099
1100 2014-04-03 Tristan Gingold <gingold@adacore.com>
1101
1102 * mach-o.c (bfd_mach_o_mangle_symbols): Use index from
1103 output_section.
1104 (bfd_mach_o_build_seg_command): Add comment. Realign segment.
1105 Fix style.
1106 (bfd_mach_o_build_commands, bfd_mach_o_read_thread): Fix style.
1107
1108 2014-04-03 Alan Modra <amodra@gmail.com>
1109
1110 * elf-bfd.h (struct elf_backend_data
1111 <elf_backend_bfd_from_remote_memory>): Replace "size_t size"
1112 with "bfd_size_type size".
1113 (_bfd_elf32_bfd_from_remote_memory): Likewise.
1114 (_bfd_elf64_bfd_from_remote_memory): Likewise.
1115 * elf.c (bfd_elf_bfd_from_remote_memory): Likewise.
1116 * elfcode.h (bfd_from_remote_memory): Likewise.
1117 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Likewise.
1118 * bfd-in2.h: Regenerate.
1119
1120 2014-04-02 Tristan Gingold <gingold@adacore.com>
1121
1122 * mach-o.h (bfd_mach_o_twolevel_hints_command)
1123 (bfd_mach_o_prebind_cksum_command): New types.
1124 (bfd_mach_o_prebound_dylib_command): Rewrite.
1125 (bfd_mach_o_load_command): Add prebind_cksum and twolevel_hints
1126 fields.
1127 * mach-o.c (bfd_mach_o_read_prebound_dylib): Read and decode the
1128 command.
1129 (bfd_mach_o_read_prebind_cksum): New function.
1130 (bfd_mach_o_read_twolevel_hints): Ditto.
1131 (bfd_mach_o_read_command): Handle prebind cksum and twolevel hints
1132 commands.
1133
1134 2014-04-02 Alan Modra <amodra@gmail.com>
1135
1136 * elfcode.h (bfd_from_remote_memory): Add "size" parameter.
1137 Consolidate code handling possible section headers past end of
1138 segment. Don't use p_align for page size guess, instead use
1139 minpagesize. Take note of ld.so clearing section headers when
1140 p_memsz > p_filesz. Handle file header specifying no section
1141 headers. Handle zero p_align throughout. Default loadbase to
1142 zero. Add comments. Rename contents_size to high_offset, and
1143 make it a bfd_vma. Delete unnecessary bfd_set_error calls.
1144 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Update prototpe.
1145 * elf-bfd.h (struct elf_backend_data <elf_backend_from_remote_memory>):
1146 Likewise.
1147 (_bfd_elf32_bfd_from_remote_memory): Likewise.
1148 (_bfd_elf64_bfd_from_remote_memory): Likewise.
1149 * elf.c (bfd_elf_bfd_from_remote_memory): Adjust.
1150 * bfd-in2.h: Regnerate.
1151
1152 2014-04-01 Tristan Gingold <gingold@adacore.com>
1153
1154 * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Avoid to crash
1155 when num == 0.
1156
1157 2014-03-27 Yury Gribov <y.gribov@samsung.com>
1158 Pavel Fedin <p.fedin@samsung.com>
1159
1160 * elf32-arm.c: Add support for limited pretty-printing of PLT
1161 entries on eabi and nacl targets.
1162 (elf32_arm_get_synthetic_symtab): Add new callback.
1163 (elf32_arm_nacl_plt_sym_val): Likewise.
1164 (elf32_arm_plt0_size): Add helper function.
1165 (elf32_arm_plt_size): Likewise.
1166
1167 2014-03-27 Tristan Gingold <gingold@adacore.com>
1168
1169 * mach-o.c (bfd_mach_o_read_dylinker): Remove assert.
1170 (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_DYLD_ENVIRONMENT.
1171
1172 2014-03-27 Tristan Gingold <gingold@adacore.com>
1173
1174 * mach-o.h (bfd_mach_o_get_base_address): New prototype.
1175 * mach-o.c (bfd_mach_o_write_symtab)
1176 (bfd_mach_o_write_contents)
1177 (bfd_mach_o_set_section_flags_from_bfd)
1178 (bfd_mach_o_build_seg_command): Fix indentation.
1179 (bfd_mach_o_get_base_address): New function.
1180
1181 2014-03-26 Nick Clifton <nickc@redhat.com>
1182
1183 * cofflink.c (_bfd_coff_generic_relocate_section): Skip
1184 relocations in discarded sections.
1185
1186 2014-03-26 Tristan Gingold <gingold@adacore.com>
1187
1188 * mach-o.c (bfd_mach_o_convert_architecture): Add
1189 BFD_MACH_O_CPU_TYPE_ARM64.
1190
1191 2014-03-26 Alan Modra <amodra@gmail.com>
1192
1193 * elf64-ppc.c (ppc64_elf_check_relocs): Account for possibly
1194 needed plt entries when taking the address of functions for
1195 abiversion == 0 (ie. unknown) as well as abiversion == 2.
1196 Move opd setup and abiversion checks to..
1197 (ppc64_elf_before_check_relocs): ..here. Renamed from
1198 ppc64_elf_process_dot_syms. Set output abiversion from input and
1199 input abiversion from output, if either is not set.
1200 (ppc64_elf_merge_private_bfd_data): Don't merge flags here.
1201 (elf_backend_check_directives): Update.
1202
1203 2014-03-25 Will Newton <will.newton@linaro.org>
1204
1205 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_sections):
1206 Set value of DT_PLTRELSZ and DT_RELASZ based on the size
1207 of input sections rather than output sections.
1208
1209 2014-03-20 Will Newton <will.newton@linaro.org>
1210
1211 PR ld/16715
1212 * elf32-arm.c (elf32_arm_check_relocs): Set
1213 pointer_equality_needed for absolute references within
1214 executable links.
1215 (elf32_arm_finish_dynamic_symbol): Set st_value to zero
1216 unless pointer_equality_needed is set.
1217
1218 2014-03-19 Nick Clifton <nickc@redhat.com>
1219
1220 * peXXigen.c (rsrc_process_section): Add code to scan input
1221 sections and record their lengths. Use these lengths to find the
1222 start of each merged .rsrc section.
1223
1224 2014-03-17 Tristan Gingold <gingold@adacore.com>
1225
1226 * mach-o.c (bfd_mach_o_read_dylib): Handle lazy load dylib.
1227 (bfd_mach_o_read_command): Ditto.
1228
1229 2014-03-14 Meador Inge <meadori@codesourcery.com>
1230
1231 * configure.in: Add strnlen to AC_CHECK_DECLS.
1232 * config.in: Regenerate.
1233 * configure: Regenerate.
1234 * sysdep.h (strnlen): Add prototype.
1235
1236 2014-03-14 Alan Modra <amodra@gmail.com>
1237
1238 * elf32-ppc.c (ppc_elf_relocate_section): Correct overflow
1239 handling for VLE_SDA21 relocs.
1240
1241 2014-03-13 Tristan Gingold <gingold@adacore.com>
1242
1243 * peicode.h (pe_ILF_object_p): Adjust, as the version number
1244 has been read.
1245 (pe_bfd_object_p): Also read version number to detect ILF.
1246 * pe-x86_64.c (COFF_WITH_PE_BIGOBJ): Define.
1247 (x86_64pe_bigobj_vec): Define
1248 * coffcode.h (bfd_coff_backend_data): Add _bfd_coff_max_nscns field.
1249 (bfd_coff_max_nscns): New macro.
1250 (coff_compute_section_file_positions): Use unsigned int for
1251 target_index. Compare with bfd_coff_max_nscns.
1252 (bfd_coff_std_swap_table, ticoff0_swap_table, ticoff1_swap_table):
1253 Set a value for _bfd_coff_max_nscns.
1254 (header_bigobj_classid): New constant.
1255 (coff_bigobj_swap_filehdr_in, coff_bigobj_swap_filehdr_out)
1256 (coff_bigobj_swap_sym_in, coff_bigobj_swap_sym_out)
1257 (coff_bigobj_swap_aux_in, coff_bigobj_swap_aux_out): New
1258 functions.
1259 (bigobj_swap_table): New table.
1260 * libcoff.h: Regenerate.
1261 * coff-sh.c (bfd_coff_small_swap_table): Likewise.
1262 * coff-alpha.c (alpha_ecoff_backend_data): Add value for
1263 _bfd_coff_max_nscns.
1264 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1265 * coff-rs6000.c (bfd_xcoff_backend_data)
1266 (bfd_pmac_xcoff_backend_data): Likewise.
1267 * coff64-rs6000.c (bfd_xcoff_backend_data)
1268 (bfd_xcoff_aix5_backend_data): Likewise.
1269 * targets.c (x86_64pe_bigobj_vec): Declare.
1270 * configure.in (x86_64pe_bigobj_vec): New vector.
1271 * configure: Regenerate.
1272 * config.bfd: Add bigobj object format for Windows targets.
1273
1274 2014-03-12 Nick Clifton <nickc@redhat.com>
1275
1276 PR ld/16671
1277 * elf32-arm.c (elf32_arm_add_symbol_hook): Check for ARM format
1278 before testing for vxworks.
1279
1280 2014-03-12 Alan Modra <amodra@gmail.com>
1281
1282 * Makefile.in: Regenerate.
1283
1284 2014-03-12 Alan Modra <amodra@gmail.com>
1285
1286 PR 16690
1287 * elf.c (copy_elf_program_header): Ignore first section lma if
1288 non-alloc.
1289
1290 2014-03-11 Alan Modra <amodra@gmail.com>
1291
1292 PR 16686
1293 * coff-rs6000.c: Include stdint.h.
1294 * coff64-rs6000.c: Likewise.
1295
1296 2014-03-10 Tristan Gingold <gingold@adacore.com>
1297
1298 * ticoff.h: Removed.
1299
1300 2014-03-08 Alan Modra <amodra@gmail.com>
1301
1302 * elf32-ppc.c (ppc_elf_howto_raw): Correct overflow check for
1303 many relocations. Correct bitsize and rightshift too for a number
1304 of VLE relocs. Describe R_PPC_VLE_SDA21 and R_PPC_VLE_SDA21_LO.
1305 Correct dst_mask on R_PPC_VLE_SDA21_LO.
1306 (ppc_elf_vle_split16): Tidy, delete unnecessary prototype.
1307 (ppc_elf_relocate_section): Modify overflow test for 16-bit
1308 fields in instructions to signed/unsigned according to whether
1309 the field takes a signed or unsigned value. Tidy vle split16 code.
1310 Correct R_PPC_VLE_SDA21 and R_PPC_VLE_SDA21_LO handling.
1311
1312 2014-03-08 Alan Modra <amodra@gmail.com>
1313
1314 * elf64-ppc.c (ppc64_elf_howto_raw): Use complain_overflow_signed
1315 for R_PPC64_ADDR14, R_PPC64_ADDR14_BRTAKEN, R_PPC64_ADDR14_BRNTAKEN,
1316 R_PPC64_SECTOFF, R_PPC64_ADDR16_DS, R_PPC64_SECTOFF_DS,
1317 R_PPC64_REL16 entries. Use complain_overflow_dont for R_PPC64_TOC.
1318 (ppc64_elf_relocate_section): Modify overflow test for 16-bit
1319 fields in instructions to signed/unsigned according to whether
1320 the field takes a signed or unsigned value.
1321
1322 2014-03-07 Pedro Alves <palves@redhat.com>
1323
1324 PR gdb/16696
1325 * rs6000-core.c (rs6000coff_core_p): Cast pointers to bfd_vma
1326 through ptr_to_uint instead of through long.
1327
1328 2014-03-06 Nick Clifton <nickc@redhat.com>
1329
1330 PR 16664
1331 * elf-attrs.c (_bfd_elf_parse_attributes): Add checks for corrupt
1332 attribute section names.
1333
1334 2014-03-05 Alan Modra <amodra@gmail.com>
1335
1336 Update copyright years.
1337
1338 2014-03-05 Alan Modra <amodra@gmail.com>
1339
1340 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_ADDR64_LOCAL entry.
1341 (ppc64_elf_reloc_type_lookup): Support R_PPC64_ADDR64_LOCAL.
1342 (ppc64_elf_check_relocs): Likewise.
1343 (ppc64_elf_relocate_section): Likewise.
1344 * Add BFD_RELOC_PPC64_ADDR64_LOCAL.
1345 * bfd-in2.h: Regenerate.
1346 * libbfd.h: Regenerate.
1347
1348 2014-03-04 Heiher <r@hev.cc>
1349
1350 * elfxx-mips.c (mips_set_isa_flags): Use E_MIPS_ARCH_64R2 for
1351 Loongson-3A.
1352 (mips_mach_extensions): Make bfd_mach_mips_loongson_3a an
1353 extension of bfd_mach_mipsisa64r2.
1354
1355 2014-03-04 Nick Clifton <nickc@redhat.com>
1356
1357 PR ld/16017
1358 * elf32-arm.c (elf32_thumb2_plt0_entry): New array.
1359 (elf32_thumb2_plt_entry): New array.
1360 (elf32_arm_create_dynamic_sections): Set PLT entry sizes when
1361 using thumb2 based PLT.
1362 (elf32_arm_populate_plt_entry): Handle generating Thumb2 based PLT
1363 entries.
1364 (elf32_arm_final_link_relocate): Do not bias jumps to Thumb based
1365 PLT entries.
1366 (elf32_arm_finish_dynamic_sections): Handle creation of Thumb2
1367 based PLT 0-entry.
1368 (elf32_arm_output_plt_map_1): Handle creation of local symbols for
1369 Thumb2 based PLT 0-entry.
1370 (elf32_arm_output_arch_local_syms): Handle creation of local
1371 symbols for Thumb2 based PLT entries.
1372
1373 2014-02-28 Alan Modra <amodra@gmail.com>
1374
1375 PR ld/16643
1376 * elflink.c (elf_gc_sweep): Call gc_sweep_hook for exactly
1377 the same conditions we called check_relocs.
1378
1379 2014-02-27 Yuri Gribov <y.gribov@samsung.com>
1380
1381 * bfd-in.h: Add export of bfd_elf32_arm_use_long_plt.
1382 * bfd-in2.h: Regenerate.
1383 * elf32-arm.c (elf32_arm_plt_entry_long): New array.
1384 (elf32_arm_link_hash_table_create): Set plt_entry_size to 16 if
1385 using long PLT entries.
1386 (bfd_elf32_arm_use_long_plt): New function.
1387 (elf32_arm_populate_plt_entry): Add support for long PLT entries.
1388
1389 2014-02-27 Alan Modra <amodra@gmail.com>
1390
1391 * elf32-ppc.c (ppc_elf_link_hash_table_create): Provide default
1392 params for targets that don't use ppc32elf.em.
1393
1394 2014-02-20 Chung-Lin Tang <cltang@codesourcery.com>
1395
1396 * elf32-nios2.c (nios2_elf32_relocate_section): Fix calculation
1397 of GOTOFF relocations.
1398
1399 2014-02-19 Igor Zamyatin <igor.zamyatin@intel.com>
1400 H.J. Lu <hongjiu.lu@intel.com>
1401
1402 * elf64-x86-64.c (elf_x86_64_bnd_plt0_entry): New.
1403 (elf_x86_64_legacy_plt_entry): Likewise.
1404 (elf_x86_64_bnd_plt_entry): Likewise.
1405 (elf_x86_64_legacy_plt2_entry): Likewise.
1406 (elf_x86_64_bnd_plt2_entry): Likewise.
1407 (elf_x86_64_bnd_arch_bed): Likewise.
1408 (elf_x86_64_link_hash_entry): Add has_bnd_reloc and plt_bnd.
1409 (elf_x86_64_link_hash_table): Add plt_bnd.
1410 (elf_x86_64_link_hash_newfunc): Initialize has_bnd_reloc and
1411 plt_bnd.
1412 (elf_x86_64_copy_indirect_symbol): Also copy has_bnd_reloc.
1413 (elf_x86_64_check_relocs): Create the second PLT for Intel MPX
1414 in 64-bit mode.
1415 (elf_x86_64_allocate_dynrelocs): Handle the second PLT for IFUNC
1416 symbols. Resolve call to the second PLT if it is created.
1417 (elf_x86_64_size_dynamic_sections): Keep the second PLT section.
1418 (elf_x86_64_relocate_section): Resolve PLT references to the
1419 second PLT if it is created.
1420 (elf_x86_64_finish_dynamic_symbol): Use BND PLT0 and fill the
1421 second PLT entry for BND relocation.
1422 (elf_x86_64_finish_dynamic_sections): Use MPX backend data if
1423 the second PLT is created.
1424 (elf_x86_64_get_synthetic_symtab): New.
1425 (bfd_elf64_get_synthetic_symtab): Likewise. Undefine for NaCl.
1426
1427 2014-02-19 Alan Modra <amodra@gmail.com>
1428
1429 * elf64-ppc.h (struct ppc64_elf_params): Add save_restore_funcs.
1430 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Use it to control
1431 provision of out-of-line register save/restore routines.
1432
1433 2014-02-18 Jack Carter <jack.carter@imgtec.com>
1434
1435 * elfxx-mips.c(_bfd_mips_elf_modify_segment_map): Deleted hard coding of
1436 PT_DYNAMIC segment flags.
1437
1438 2014-02-17 Jan Kratochvil <jan.kratochvil@redhat.com>
1439
1440 PR binutils/16595
1441 * simple.c (struct saved_offsets): New.
1442 (simple_save_output_info): Use it for ptr.
1443 (simple_restore_output_info): Use it for ptr. Check section_count.
1444 (bfd_simple_get_relocated_section_contents): Use it for saved_offsets.
1445
1446 2014-02-17 Alan Modra <amodra@gmail.com>
1447
1448 * elf64-ppc.h (struct ppc64_elf_params): Define.
1449 (ppc64_elf_init_stub_bfd, ppc64_elf_edit_opd, ppc64_elf_tls_setup,
1450 ppc64_elf_setup_section_lists, ppc64_elf_size_stubs,
1451 ppc64_elf_build_stubs): Update prototype.
1452 * elf64-ppp.c (struct ppc_link_hash_table): Add params, delete other
1453 fields now in params. Adjust code throughout file.
1454 (ppc64_elf_init_stub_bfd): Delete "abfd" parameter, add "params".
1455 Save params pointer in htab.
1456 (ppc64_elf_edit_opd, ppc64_elf_tls_setup,
1457 ppc64_elf_setup_section_lists, ppc64_elf_size_stubs,
1458 ppc64_elf_build_stubs): Remove parameters now in "params".
1459
1460 2014-02-17 Alan Modra <amodra@gmail.com>
1461
1462 * elf32-ppc.c (ppc_elf_relocate_section): Move relocs on insns
1463 patched for ppc476 workaround. Reapply branch taken/not taken
1464 relocs.
1465
1466 2014-02-12 Alan Modra <amodra@gmail.com>
1467
1468 * elf32-ppc.c (ppc_elf_relax_section): Don't build long-branch
1469 stubs for calls to __tls_get_addr that we know will later be
1470 optimised away.
1471
1472 2014-02-12 Alan Modra <amodra@gmail.com>
1473
1474 * elf32-ppc.c (ppc_elf_relax_section): Enable ppc476 workaround
1475 for ld -r, when code sections are sufficiently aligned.
1476 * elf32-ppc.h (struct ppc_elf_params): Delete pagesize. Add
1477 pagesize_p2.
1478
1479 2014-02-12 Alan Modra <amodra@gmail.com>
1480
1481 PR gold/15530
1482 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
1483 --export-dynamic and --dynamic-list marking of symbols.
1484 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Reorder
1485 cheap tests first.
1486
1487 2014-02-10 H.J. Lu <hongjiu.lu@intel.com>
1488
1489 PR gold/16530
1490 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Mark symbol in
1491 executables if it matches dynamic_list.
1492
1493 2014-02-10 Alan Modra <amodra@gmail.com>
1494
1495 * po/SRC-POTFILES.in: Regenerate.
1496 * po/bfd.pot: Regenerate.
1497
1498 2014-02-09 Alan Modra <amodra@gmail.com>
1499
1500 * elf-bfd.h (struct elf_backend_data): Add caches_rawsize.
1501 * elfxx-target.h (elf_backend_caches_rawsize): Define.
1502 (elfNN_bed): Init new field.
1503 * elflink.c (elf_link_input_bfd): Handle caches_rawsize.
1504 * elf32-ppc.c (shared_stub_entry): Zero addi offset.
1505 (ppc_elf_relax_section): Don't reallocate section here, write
1506 stubs, or write out relocs for ld -r here..
1507 (ppc_elf_relocate_section): ..instead write stubs here, and use
1508 existing code to write out relocs for ld -r. Fix offset
1509 adjustment on reloc for little-endian.
1510 (elf_backend_caches_rawsize): Define.
1511
1512 2014-02-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1513
1514 PR build/16550
1515 * cache.c (bfd_cache_max_open): Cast RLIM_INFINITY to rlim_t.
1516
1517 2014-02-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1518
1519 * coff-rs6000.c (xcoff_write_archive_contents_big): Free OFFSETS in
1520 return paths. Three times.
1521 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Free HTAB in all
1522 return paths.
1523 (ppc64_elf_tls_optimize): Free TOC_REF in return path.
1524 (ppc64_elf_edit_toc): Free USED in return path.
1525
1526 2014-02-03 Sandra Loosemore <sandra@codesourcery.com>
1527
1528 * reloc.c (BFD_RELOC_NIOS2_GOT_LO, BFD_RELOC_NIOS2_GOT_HA): New.
1529 (BFD_RELOC_NIOS2_CALL_LO, BFD_RELOC_NIOS2_CALL_HA): New.
1530 * libbfd.h: Regenerated.
1531 * bfd-in2.h: Regenerated.
1532 * elf32-nios2.c (elf_nios2_howto_table_rel): Add new relocations.
1533 (nios2_reloc_map): Likewise.
1534 (GOT_USED, CALL_USED): Renamed from GOT16_USED and CALL16_USED.
1535 Fixed all references.
1536 (nios2_elf32_relocate_section): Add new relocations.
1537 (nios2_elf32_check_relocs): Likewise.
1538 (nios2_elf32_gc_sweep_hook): Likewise.
1539
1540 2014-02-03 Alan Modra <amodra@gmail.com>
1541
1542 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add params.
1543 Delete emit_stub_syms, no_tls_get_addr_opt. Update all uses.
1544 (ppc_elf_link_params): New function.
1545 (ppc_elf_create_glink): Align .glink to 64 bytes for ppc476
1546 workaround.
1547 (ppc_elf_select_plt_layout): Remove plt_style and emit_stub_syms
1548 parameters. Use htab->params instead.
1549 (ppc_elf_tls_setup): Remove no_tls_get_addr_opt parameter.
1550 (ppc_elf_size_dynamic_sections): Align __glink_PLTresolve to
1551 64 bytes for ppc476 workaround.
1552 (struct ppc_elf_relax_info): New.
1553 (ppc_elf_relax_section): Exclude linker created sections and
1554 those too small to hold one instruction. Don't add another
1555 branch around trampolines on later relax passes. Don't
1556 generate trampolines for undefined symbols when !relocatable,
1557 nor for plugin symbols. Allocate space for ppc476 workaround
1558 patch area. Free fixups on error return path.
1559 (ppc_elf_relocate_section): Handle ppc476 workaround patching.
1560 * elf32-ppc.h (struct ppc_elf_params): New.
1561 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Update prototype.
1562 (ppc_elf_link_params): Declare.
1563 * section.c (SEC_INFO_TYPE_TARGET): Define.
1564 * bfd-in2.h: Regenerate.
1565
1566 2014-02-02 Sandra Loosemore <sandra@codesourcery.com>
1567
1568 * elf32-nios2.c (struct elf32_nios2_link_hash_table): Add
1569 h_gp_got field.
1570 (nios2_elf32_relocate_section): Use got_base to adjust
1571 GOT-pointer-relative relocations relative to _gp_got.
1572 (create_got_section): Create _gp_got symbol.
1573 (nios2_elf32_finish_dynamic_symbol): Make _gp_got absolute.
1574 (nios2_elf32_size_dynamic_sections): Set _gp_got offset.
1575
1576 2014-01-30 Sandra Loosemore <sandra@codesourcery.com>
1577
1578 * bfd-in2.h: Update from reloc.c.
1579 * elf32-nios2.c: Include elf32-nios2.h.
1580 (elf_nios2_howto_table_rel): Add entry for R_NIOS2_CALL26_NOAT.
1581 (nios2_reloc_map): Likewise.
1582 (enum elf32_nios2_stub_type): Declare.
1583 (struct elf32_nios2_stub_hash_entry): Declare.
1584 (nios2_stub_hash_entry, nios2_stub_hash_lookup): New macros.
1585 (struct elf32_nios2_link_hash_entry): Add hsh_cache field.
1586 (struct elf32_nios2_link_hash_table): Add new fields bstab,
1587 stub_bfd, add_stub_section, layout_sections_again, stub_group,
1588 bfd_count, top_index, input_list, all_local_syms.
1589 (nios2_call26_stub_entry): New.
1590 (nios2_elf32_install_imm16): Move up in file.
1591 (nios2_elf32_install_data): Move up in file.
1592 (hiadj): Move up in file.
1593 (stub_hash_newfunc): New.
1594 (link_hash_newfunc): Initialize hsh_cache field.
1595 (STUB_SUFFIX): New.
1596 (nios2_stub_name): New.
1597 (nios2_get_stub_entry): New.
1598 (nios2_add_stub): New.
1599 (nios2_elf32_setup_section_lists): New.
1600 (nios2_elf32_next_input_section): New.
1601 (CALL26_SEGMENT): New.
1602 (MAX_STUB_SECTION_SIZE): New.
1603 (group_sections): New.
1604 (nios2_type_of_stub): New.
1605 (nios2_build_one_stub): New.
1606 (nios2_size_one_stub): New.
1607 (get_local_syms): New.
1608 (nios2_elf32_size_stubs): New.
1609 (nios2_elf32_build_stubs): New.
1610 (nios2_elf32_do_call26_relocate): Correct CALL26 overflow test.
1611 (nios2_elf32_relocate_section): Handle R_NIOS2_CALL26_NOAT. Add
1612 trampolines for R_NIOS2_CALL26 stubs.
1613 (nios2_elf32_check_relocs): Handle R_NIOS2_CALL26_NOAT.
1614 (nios2_elf32_gc_sweep_hook): Likewise.
1615 (nios2_elf32_link_hash_table_create): Initialize the stub hash table.
1616 (nios2_elf32_link_hash_table_free): New.
1617 (bfd_elf32_bfd_link_hash_table_free): Define.
1618 * elf32-nios2.h: New file.
1619 * libbfd.h: Update from reloc.c.
1620 * reloc.c (BFD_RELOC_NIOS2_CALL26_NOAT): New.
1621
1622 2014-01-29 Nick Clifton <nickc@redhat.com>
1623
1624 PR binutils/16318
1625 * elf32-metag.c (elf_metag_post_process_headers): Call
1626 _bfd_elf_post_process_headers.
1627 * elf32-sh64.c (sh64_elf_copy_private_data): Call
1628 _bfd_elf_copy_private_data.
1629 * elf64-sh64.c (sh_elf64_copy_private_data_internal): Likewise.
1630
1631 2014-01-29 Nick Clifton <nickc@redhat.com>
1632
1633 * bfd-in.h (bfd_set_section_vma): Delete.
1634 (bfd_set_section_alignment): Delete.
1635 (bfd_set_section_userdata): Delete.
1636 (bfd_set_cacheable): Delete.
1637 * bfd.c (bfd_set_cacheable): New static inline function.
1638 * section.c (bfd_set_section_userdata): Likewise.
1639 (bfd_set_section_vma): Likewise.
1640 (bfd_set_section_alignment): Likewise.
1641 * bfd-in2.h: Regenerate.
1642
1643 2014-01-28 Nick Clifton <nickc@redhat.com>
1644
1645 * dwarf2.c (find_abstract_instance_name): For DW_FORM_ref_addr
1646 attributes select the CU containing the abbreviation, which may not
1647 be the current CU.
1648
1649 2014-01-24 Alan Modra <amodra@gmail.com>
1650
1651 * elf64-ppc.c (ppc_build_one_stub): Correct reloc count passed
1652 to get_relocs for ELFv2.
1653
1654 2014-01-23 H.J. Lu <hongjiu.lu@intel.com>
1655
1656 PR ld/16498
1657 * elf.c (_bfd_elf_map_sections_to_segments): Issue a linker error
1658 if TLS sections are not adjacent.
1659
1660 2014-01-22 Alan Modra <amodra@gmail.com>
1661
1662 * elflink.c (elf_link_add_object_symbols): Call minfo for --as-needed.
1663
1664 2014-01-22 Alan Modra <amodra@gmail.com>
1665
1666 * elf64-ppc.c (STK_LINKER): Comment typo fix.
1667
1668 2014-01-21 H.J. Lu <hongjiu.lu@intel.com>
1669
1670 PR ld/16467
1671 * elflink.c (_bfd_elf_merge_symbol): When types of the existing
1672 regular default symbol definition and the versioned dynamic
1673 symbol definition mismatch, skip the default symbol definition
1674 if one of them is IFUNC.
1675
1676 2014-01-21 H.J. Lu <hongjiu.lu@intel.com>
1677
1678 PR ld/2404
1679 * elflink.c (_bfd_elf_merge_symbol): Don't check info->shared,
1680 info->export_dynamic nor h->ref_dynamic for type mismatch when
1681 adding the default version.
1682
1683 2014-01-16 Alan Modra <amodra@gmail.com>
1684
1685 * elfxx-mips.c (mips_elf_record_got_page_entry): Pass in a
1686 mips_elf_traverse_got_arg* rather than mips_got_info*.
1687 Adjust caller. Alloc on output_bfd rather than symbol section
1688 owner.
1689
1690 2014-01-15 H.J. Lu <hongjiu.lu@intel.com>
1691
1692 * elf32-i386.c (elf_i386_allocate_dynrelocs): Revert the last
1693 change.
1694 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
1695
1696 2014-01-14 H.J. Lu <hongjiu.lu@intel.com>
1697
1698 PR ld/16428
1699 * elf32-i386.c (elf_i386_allocate_dynrelocs): Don't discard relocs
1700 against __ehdr_start.
1701 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
1702
1703 2014-01-14 H.J. Lu <hongjiu.lu@intel.com>
1704
1705 * elf32-i386.c (elf_i386_allocate_dynrelocs): Revert the last
1706 change.
1707 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
1708
1709 2014-01-14 H.J. Lu <hongjiu.lu@intel.com>
1710
1711 PR ld/16428
1712 * elf32-i386.c (elf_i386_allocate_dynrelocs): Don't update reloc
1713 count if there are any non pc-relative relocs.
1714 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
1715
1716 2014-01-14 Michael Hudson-Doyle <michael.hudson@linaro.org>
1717 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
1718
1719 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use correct
1720 offset while calculating relocation address.
1721 (elfNN_aarch64_create_small_pltn_entry): Likewise.
1722 (elfNN_aarch64_init_small_plt0_entry): Likewise.
1723
1724 2014-01-13 Ma Jiang <ma.jiang@zte.com.cn>
1725
1726 PR ld/16202
1727 * elf32-arm.c (elf32_arm_final_link_relocate): Refetch addends for
1728 R_ARM_ABS8 and R_ARM_ABS16.
1729
1730 2014-01-13 Alan Modra <amodra@gmail.com>
1731
1732 * elf32-ppc.c (ppc_elf_check_relocs): For @local call to ifunc,
1733 error when shared and force a plt call otherwise.
1734 (ppc_elf_size_dynamic_sections): Don't emit DT_PPC_GOT unless
1735 plt_type == PLT_NEW.
1736 (ppc_elf_relocate_section): Add missing test to resolve ifuncs to
1737 the appropriate call stub.
1738
1739 2014-01-10 Alan Modra <amodra@gmail.com>
1740
1741 PR ld/14207
1742 PR ld/16322
1743 PR binutils/16323
1744 * elf.c (assign_file_positions_for_load_sections): Revert last change.
1745 (assign_file_positions_for_non_load_sections): When setting up
1746 PT_GNU_RELRO header, don't require a corresponding PT_LOAD
1747 header that completely covers the relro region.
1748
1749 2014-01-09 Tristan Gingold <gingold@adacore.com>
1750
1751 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): use jump
1752 table macros and add macros to initializa the structure.
1753
1754 2014-01-08 H.J. Lu <hongjiu.lu@intel.com>
1755
1756 PR ld/14207
1757 PR ld/16322
1758 PR binutils/16323
1759 * elf.c (_bfd_elf_map_sections_to_segments): Don't check section
1760 size for PT_GNU_RELRO segment.
1761 (assign_file_positions_for_load_sections): If PT_LOAD segment
1762 doesn't fit PT_GNU_RELRO segment, adjust its p_filesz and p_memsz.
1763
1764 2014-01-07 Tom Tromey <tromey@redhat.com>
1765
1766 * elf32-xtensa.c (vsprint_msg): Don't use old VA_* compatibility
1767 wrappers.
1768
1769 2014-01-03 Nick Clifton <nickc@redhat.com>
1770
1771 PR binutils/16199
1772 * elf.c (vma_page_aligned_bias): Handle a maxpagesize value of
1773 zero.
1774
1775 2014-01-02 Yuanhui Zhang <asmwarrior@gmail.com>
1776
1777 PR binutils/14289
1778 * pef.c (bfd_pef_xlib_read_header): Increase buffer size to 80.
1779
1780 2014-01-02 Nick Clifton <nickc@redhat.com>
1781
1782 PR binutils/11983
1783 * archive.c (_bfd_get_elt_at_filepos): Store a copy of the
1784 filename in the bfd's filename field.
1785 * elfcode.h (bfd_from_remote_memory): Likewise.
1786 * ieee.c (ieee_object_p): Likewise.
1787 * mach-o.c (bfd_mach_o_fat_member_init): Likewise.
1788 * oasys.c (oasys_openr_next_archived_file): Likewise.
1789 * vms-lib.c (_bfd_vms_lib_get_module): Likewise.
1790 * opncls.c (bfd_fopen): Likewise.
1791 (bfd_openstreamr): Likewise.
1792 (bfd_openr_iovec): Likewise.
1793 (bfd_openw): Likewise.
1794 (bfd_create): Likewise.
1795 (_bfd_delete_bfd): Free filename.
1796
1797 For older changes see ChangeLog-2013
1798 \f
1799 Copyright (C) 2014 Free Software Foundation, Inc.
1800
1801 Copying and distribution of this file, with or without modification,
1802 are permitted in any medium without royalty provided the copyright
1803 notice and this notice are preserved.
1804
1805 Local Variables:
1806 mode: change-log
1807 left-margin: 8
1808 fill-column: 74
1809 version-control: never
1810 End: