]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - bfd/ChangeLog
PR ld/13991
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
1 2012-04-24 Alan Modra <amodra@gmail.com>
2
3 PR ld/13991
4 * bfd/elf-bfd.h (_bfd_elf_link_just_syms): Define as
5 _bfd_generic_link_just_syms.
6 * bfd/elflink.c (_bfd_elf_link_just_syms): Delete.
7 * bfd/linker.c (_bfd_generic_link_just_syms): Set sec_info_type.
8
9 * bfd/bfd-in.h (discarded_section): Renamed from elf_discarded_section.
10 * bfd/section.c (SEC_INFO_TYPE_NONE, SEC_INFO_TYPE_STABS,
11 SEC_INFO_TYPE_MERGE, SEC_INFO_TYPE_EH_FRAME,
12 SEC_INFO_TYPE_JUST_SYMS): Renamed from corresponding ELF_INFO_TYPE.
13 * bfd/elf-eh-frame.c, * bfd/elf-m10200.c, * bfd/elf-m10300.c,
14 * bfd/elf.c, * bfd/elf32-arm.c, * bfd/elf32-avr.c, * bfd/elf32-bfin.c,
15 * bfd/elf32-cr16.c, * bfd/elf32-cr16c.c, * bfd/elf32-cris.c,
16 * bfd/elf32-crx.c, * bfd/elf32-d10v.c, * bfd/elf32-epiphany.c,
17 * bfd/elf32-fr30.c, * bfd/elf32-frv.c, * bfd/elf32-h8300.c,
18 * bfd/elf32-hppa.c, * bfd/elf32-i370.c, * bfd/elf32-i386.c,
19 * bfd/elf32-i860.c, * bfd/elf32-ip2k.c, * bfd/elf32-iq2000.c,
20 * bfd/elf32-lm32.c, * bfd/elf32-m32c.c, * bfd/elf32-m32r.c,
21 * bfd/elf32-m68hc1x.c, * bfd/elf32-m68k.c, * bfd/elf32-mcore.c,
22 * bfd/elf32-mep.c, * bfd/elf32-moxie.c, * bfd/elf32-msp430.c,
23 * bfd/elf32-mt.c, * bfd/elf32-openrisc.c, * bfd/elf32-ppc.c,
24 * bfd/elf32-rl78.c, * bfd/elf32-rx.c, * bfd/elf32-s390.c,
25 * bfd/elf32-score.c, * bfd/elf32-score7.c, * bfd/elf32-sh.c,
26 * bfd/elf32-spu.c, * bfd/elf32-tic6x.c, * bfd/elf32-tilepro.c,
27 * bfd/elf32-v850.c, * bfd/elf32-vax.c, * bfd/elf32-xc16x.c,
28 * bfd/elf32-xstormy16.c, * bfd/elf32-xtensa.c, * bfd/elf64-alpha.c,
29 * bfd/elf64-hppa.c, * bfd/elf64-ia64-vms.c, * bfd/elf64-mmix.c,
30 * bfd/elf64-ppc.c, * bfd/elf64-s390.c, * bfd/elf64-sh64.c,
31 * bfd/elf64-x86-64.c, * bfd/elflink.c, * bfd/elfnn-ia64.c,
32 * bfd/elfxx-mips.c, * bfd/elfxx-sparc.c, * bfd/elfxx-tilegx.c,
33 * bfd/reloc.c: Update all references.
34 * bfd/bfd-in2.h: Regenerate.
35
36 2012-04-20 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
37
38 * elf32-s390.c (ELF_DYNAMIC_INTERPRETER): Set to the GCC default.
39 * elf64-s390.c (ELF_DYNAMIC_INTERPRETER): Set to the GCC default.
40
41 2012-04-19 Thomas Schwinge <thomas@codesourcery.com>
42
43 * elf32-sh.c (elf_sh_link_hash_entry): Specify an enum identifier for
44 got_type.
45 (allocate_dynrelocs, sh_elf_relocate_section, sh_elf_check_relocs): Use
46 it.
47
48 2012-04-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
49
50 * elf32-sh.c (allocate_dynrelocs): Don't allocate dynamic
51 relocations when LE conversion happens on the IE tls symbol.
52
53 2012-04-17 Roland McGrath <mcgrathr@google.com>
54
55 * elf64-x86-64.c (elf_x86_64_nacl_plt0_entry): Fix nop padding
56 so that 32-byte boundary is a proper instruction boundary.
57
58 2012-04-17 Tristan Gingold <gingold@adacore.com>
59
60 * vms-lib.c (_bfd_vms_lib_get_module): Append .obj extension to
61 member of an object archive.<
62
63 2012-04-17 Tristan Gingold <gingold@adacore.com>
64
65 * vms-lib.c (MAX_EKEYLEN): Define.
66 (MAX_KEYLEN): Fix value.
67 (vms_write_index): Add comments and fix indentation.
68 Adjust comparaison. Add assertions. Free kbn_blk.
69 (_bfd_vms_lib_write_archive_contents): Use MAX_EKEYLEN.
70 Compense MAX_KEYLEN adjustment.
71
72 2012-04-16 Maciej W. Rozycki <macro@linux-mips.org>
73
74 * elfxx-mips.c (mips16_stub_symndx): Handle n64 compound relocs.
75 (_bfd_mips_elf_check_relocs): Update accordingly.
76
77 2012-04-13 Alan Modra <amodra@gmail.com>
78
79 PR ld/13947
80 * elflink.c (bfd_elf_final_link): Set reloc_count to 0 for
81 reloc sections.
82
83 2012-04-12 David S. Miller <davem@davemloft.net>
84
85 * reloc.c (BFD_RELOC_SPARC_H34, BFD_RELOC_SPARC_SIZE32,
86 BFD_RELOC_SPARC_SIZE64, BFD_RELOC_SPARC_WDISP10): New relocs.
87 * libbfd.h: Regenerate.
88 * bfd-in2.h: Likewise.
89 * elfxx-sparc.c (sparc_elf_wdisp10_reloc): New function.
90 (_bfd_sparc_elf_howto_table): Add entries for R_SPARC_H34,
91 R_SPARC_SIZE32, R_SPARC_64, and R_SPARC_WDISP10.
92 (_bfd_sparc_elf_reloc_type_lookup): Handle new relocs.
93 (_bfd_sparc_elf_check_relocs): Likewise.
94 (_bfd_sparc_elf_gc_sweep_hook): Likewise.
95 (_bfd_sparc_elf_relocate_section): Likewise.
96
97 2012-04-12 Roland McGrath <mcgrathr@google.com>
98
99 * elf32-arm.c (elf32_arm_nacl_plt0_entry, elf32_arm_nacl_plt_entry):
100 New variables.
101 (struct elf32_arm_link_hash_table): New member `nacl_p'.
102 (elf32_arm_link_hash_table_create): Initialize it.
103 (elf32_arm_nacl_link_hash_table_create): New function.
104 (arm_movw_immediate, arm_movt_immediate): New functions.
105 (elf32_arm_populate_plt_entry): Test HTAB->nacl_p.
106 (elf32_arm_finish_dynamic_sections): Likewise.
107 (elf32_arm_output_plt_map_1): Likewise.
108 (bfd_elf32_littlearm_nacl_vec, bfd_elf32_bigarm_nacl_vec):
109 New backend vector stanza.
110 (elf32_arm_nacl_modify_segment_map): New function.
111 * config.bfd: Handle arm-*-nacl*, armeb-*-nacl*.
112 * targets.c: Support bfd_elf32_{big,little}_nacl_vec.
113 * configure.in: Likewise.
114 (bfd_elf32_bigarm_nacl_vec): Add elf-nacl.lo here.
115 (bfd_elf32_littlearm_nacl_vec): Likewise.
116 (bfd_elf32_bigarm_vec, bfd_elf32_littlearm_vec): Likewise.
117 (bfd_elf32_bigarm_symbian_vec): Likewise.
118 (bfd_elf32_littlearm_symbian_vec): Likewise.
119 (bfd_elf32_bigarm_vxworks_vec): Likewise.
120 (bfd_elf32_littlearm_vxworks_vec): Likewise.
121 * configure: Regenerated.
122
123 2012-04-12 Tristan Gingold <gingold@adacore.com>
124
125 * elflink.c (elf_link_output_extsym): Add a guard.
126 (bfd_elf_final_link): Remove assertion.
127 (bfd_elf_final_link): Add a guard.
128 * elfnn-ia64.c (INCLUDE_IA64_VMS): Removed.
129 (elfNN_vms_section_from_shdr, elfNN_vms_object_p)
130 (elfNN_vms_post_process_headers, elfNN_vms_section_processing)
131 (elfNN_vms_final_write_processing, elfNN_vms_close_and_cleanup):
132 Remove.
133 (elfNN-ia64-vms target): Move to ...
134 * elf64-ia64-vms.c: New file.
135 * configure.in (bfd_elf64_ia64_vms_vec): Add elf64-ia64-vms.lo
136 * Makefile.am (BFD64_BACKENDS): Add elf64-ia64-vms.lo.
137 (BFD64_BACKENDS_CFILES): Ad elf64-ia64-vms.c.
138 * configure: Regenerate.
139 * Makefile.in: Regenerate.
140
141 2012-04-11 Nick Clifton <nickc@redhat.com>
142
143 PR binutils/13897
144 * elf64-ppc.c (opd_entry_value): When dealing with sections
145 without relocs, keep the last section loaded in order to avoid
146 unnecessary reloads.
147
148 2012-04-09 Roland McGrath <mcgrathr@google.com>
149
150 * elf.c (_bfd_elf_map_sections_to_segments): Set INFO->user_phdrs.
151 * elf-nacl.c (nacl_modify_segment_map): Do nothing if INFO->user_phdrs.
152 (nacl_modify_program_headers): Likewise.
153
154 2012-04-03 Roland McGrath <mcgrathr@google.com>
155
156 * elf-nacl.c: New file.
157 * elf-nacl.h: New file.
158 * elf32-i386.c (elf_backend_modify_segment_map): Define for
159 bfd_elf32_i386_nacl_vec.
160 (elf_backend_modify_program_headers): Likewise.
161 * elf64-x86-64.c (elf_backend_modify_segment_map): Define for
162 bfd_elf64_x86_64_nacl_vec and bfd_elf32_x86_64_nacl_vec.
163 (elf_backend_modify_program_headers): Likewise.
164 * Makefile.am (BFD32_BACKENDS, BFD64_BACKENDS): Add elf-nacl.lo here.
165 (BFD32_BACKENDS_CFILES, BFD64_BACKENDS_CFILES): Add elf-nacl.c here.
166 * Makefile.in: Regenerated.
167 * configure.in (bfd_elf64_x86_64_nacl_vec): Add elf-nacl.o to tb here.
168 (bfd_elf32_x86_64_nacl_vec): Likewise.
169 (bfd_elf64_x86_64_vec, bfd_elf32_x86_64_vec): Likewise.
170 (bfd_elf64_x86_64_freebsd_vec, bfd_elf64_x86_64_sol2_vec): Likewise.
171 (bfd_elf64_l1om_vec, bfd_elf64_l1om_freebsd_vec): Likewise.
172 (bfd_elf64_k1om_vec, bfd_elf64_k1om_freebsd_vec): Likewise.
173 (bfd_elf32_i386_nacl_vec): Likewise.
174 (bfd_elf32_i386_sol2_vec, bfd_elf32_i386_freebsd_vec): Likewise.
175 (bfd_elf32_i386_vxworks_vec, bfd_elf32_i386_vec): Likewise.
176 * configure: Regenerated.
177
178 2012-03-31 Andreas Schwab <schwab@linux-m68k.org>
179
180 * elf32-m68k.c (elf_m68k_relocate_section): Allow
181 R_68K_TLS_LE{8,16,32} for PIE.
182
183 2012-03-30 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
184
185 * elf64-s390.c: Fix several comments regarding PLT entry
186 description.
187 * elf32-s390.c: Likewise.
188
189 2012-03-30 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
190
191 * elf64-s390.c: Use the section pointer shortcuts in
192 elf_link_hash_table and remove them from the target specific
193 variant.
194 * elf32-s390.c: Likewise.
195
196 2012-03-30 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
197
198 * elf64-s390.c (elf_s390x_plt_entry, elf_s390x_first_plt_entry):
199 New definitions.
200 (PLT_PIC_ENTRY_WORD*, PLT_PIC12_ENTRY_WORD*): Remove.
201 (elf_s390_finish_dynamic_symbol): Use memcpy instead of bfd_put_32.
202 (elf_s390_finish_dynamic_sections): Likewise.
203 * elf32-s390.c (elf_s390_plt_entry, elf_s390_plt_pic_entry)
204 (elf_s390_plt_pic12_entry, elf_s390_plt_pic16_entry)
205 (elf_s390_plt_first_entry, elf_s390_plt_pic_first_entry): New definitions.
206 (PLT_PIC16_ENTRY_WORD*, PLT_ENTRY_WORD*)
207 (PLT_PIC_FIRST_ENTRY_WORD*, PLT_FIRST_ENTRY_WORD*): Remove.
208
209 2012-03-30 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
210
211 * elf32-s390.c (struct elf_s390_dyn_relocs): Remove.
212 Rename all occurrences in the file to elf_dyn_relocs.
213 * elf64-s390.c: Likewise.
214
215 2012-03-30 Alan Modra <amodra@gmail.com>
216
217 * elflink.c (_bfd_elf_gc_mark_reloc): Don't delve into dynamic
218 libraries.
219
220 2012-03-29 Alan Modra <amodra@gmail.com>
221
222 * bfd-in.h (bfd_get_arch_size, bfd_get_sign_extend_vma): Delete.
223 * bfd-in2.h: Regenerate.
224
225 2012-03-23 Alan Modra <amodra@gmail.com>
226
227 * elf.c (assign_file_positions_for_non_load_sections): Don't warn
228 on empty alloc sections.
229
230 2012-03-23 Alan Modra <amodra@gmail.com>
231
232 * linker.c (_bfd_nearby_section): New function, split out from..
233 (fix_syms): ..here.
234 * bfd-in.h (_bfd_nearby_section): Declare.
235 * bfd-in2.h: Regenerate.
236 * elflink.c (elf_link_input_bfd): Don't use text_index_section or
237 data_index_section with ld -q or ld -r output relocs against
238 stripped output sections. Instead use _bfd_nearby_section.
239
240 2012-03-23 Alan Modra <amodra@gmail.com>
241
242 PR binutils/13894
243 * elf64-ppc.c (opd_entry_value): Read full symbol table when
244 sym hashes unavailable.
245
246 2012-03-21 Eliot Dresselhaus <eliot@sonic.net>
247
248 * elf32-tic6x.c (elf32_tic6x_merge_private_bfd_data): Return TRUE
249 for non-C6X objects.
250
251 2012-03-20 Kai Tietz <ktietz@redhat.com>
252
253 PR ld/12742
254 * configure.in (AC_CHECK_HEADERS): Test for windows.h and dlfcn.h.
255 * plugin.c: Guard include of dlfcn.h if HAVE_DLFCN_H is defined.
256 Add windows.h header include if HAVE_WINDOWS_H is defined.
257 (dlerror): New static function if windows variant is used instead
258 of dlfcn.h.
259 (dlclose): Likewise.
260 (dlopen): Likewise.
261 (dlsym): Likewise.
262 * configure: Regenerated.
263 * config.in: Regenerated.
264
265 2012-03-20 H.J. Lu <hongjiu.lu@intel.com>
266
267 PR ld/13880
268 * elf32-i386.c (elf_i386_relocate_section): Don't issue an error
269 for R_386_GOTOFF relocation against protected function if
270 SYMBOLIC_BIND is true.
271
272 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't issue an
273 error for R_X86_64_GOTOFF64 relocation against protected function
274 when building executable or SYMBOLIC_BIND is true.
275
276 2012-03-16 Roland McGrath <mcgrathr@google.com>
277
278 * config.bfd: Handle x86_64-*-nacl*.
279 * elf64-x86-64.c (bfd_elf64_x86_64_nacl_vec): New backend vector stanza.
280 (bfd_elf32_x86_64_nacl_vec): Likewise.
281 * targets.c: Support them.
282 * configure.in: Likewise.
283 * configure: Regenerated.
284
285 2012-03-16 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
286
287 * elf32-arm.c (elf32_arm_attributes_accept_div): New function.
288 (elf32_arm_attributes_forbid_div): Likewise.
289 (elf32_arm_merge_eabi_attributes): Correct handling of
290 Tag_DIV_use.
291
292 2012-03-15 Roland McGrath <mcgrathr@google.com>
293
294 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Use
295 elf_x86_64_backend_data parameters for plt_eh_frame.
296
297 * elf64-x86-64.c (struct elf_x86_64_backend_data): New type.
298 (get_elf_x86_64_backend_data, GET_PLT_ENTRY_SIZE): New macros.
299 (elf_x86_64_arch_bed): New variable.
300 (elf_backend_arch_data): New macro.
301 (elf_x86_64_adjust_dynamic_symbol): Use GET_PLT_ENTRY_SIZE.
302 (elf_x86_64_allocate_dynrelocs): Likewise.
303 (elf_x86_64_relocate_section): Likewise.
304 (elf_x86_64_plt_sym_val): Likewise.
305 (elf_x86_64_finish_dynamic_symbol): Use elf_x86_64_backend_data
306 parameters for PLT details.
307 (elf_x86_64_finish_dynamic_sections): Likewise.
308
309 2012-03-14 Roland McGrath <mcgrathr@google.com>
310
311 * elf32-i386.c (elf_i386_nacl_pic_plt0_entry): Initialize up
312 to the full size, padding out with nop instructions.
313
314 2012-03-12 Alan Modra <amodra@gmail.com>
315
316 * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Don't warn
317 on zero size dynbss symbol.
318 * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
319 * elf32-cr16.c (_bfd_cr16_elf_adjust_dynamic_symbol): Likewise.
320 * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
321 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
322 * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
323 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise.
324 * elf32-lm32.c (lm32_elf_adjust_dynamic_symbol): Likewise.
325 * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
326 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
327 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
328 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
329 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
330 * elf32-tic6x.c (elf32_tic6x_adjust_dynamic_symbol): Likewise.
331 * elf32-tilepro.c (tilepro_elf_adjust_dynamic_symbol): Likewise.
332 * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
333 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
334 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
335 * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
336 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
337 * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
338 * elfxx-tilegx.c (tilegx_elf_adjust_dynamic_symbol): Likewise.
339
340 2012-03-10 Edmar Wienskoski <edmar@freescale.com>
341
342 * archures.c: Add bfd_mach_ppc_e5500 and bfd_mach_ppc_e6500.
343 * bfd-in2.h: Regenerate.
344 * cpu-powerpc.c (bfd_powerpc_archs): Add entries for
345 bfd_mach_ppc_e5500 and bfd_mach_ppc_e6500.
346
347 2012-03-09 H.J. Lu <hongjiu.lu@intel.com>
348
349 PR ld/13817
350 * bfd/elf32-i386.c (elf_i386_relocate_section): Restore
351 R_386_IRELATIVE.
352
353 * * elf64-x86-64.c (elf_x86_64_relocate_section): Restore
354 R_X86_64_IRELATIVE.
355
356 2012-03-08 Tristan Gingold <gingold@adacore.com>
357
358 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Set maximum
359 keylen according to archive kind. Set nextvbn and nextrfa lhd
360 fields. Add comments.
361
362 2012-03-07 Nick Clifton <nickc@redhat.com>
363
364 * elf-m10300.c (elf32_mn10300_link_hash_entry): Add tls_type
365 field.
366 (elf32_mn10300_link_hash_table): Add tls_ldm_got entry;
367 (elf_mn10300_tdata): Define.
368 (elf_mn10300_local_got_tls_type): Define.
369 (elf_mn10300_howto_table): Add entries for R_MN10300_TLS_GD,
370 R_MN10300_TLS_LD, R_MN10300_TLS_LDO, R_MN10300_TLS_GOTIE,
371 R_MN10300_TLS_IE, R_MN10300_TLS_LE, R_MN10300_TLS_DPTMOD,
372 R_MN10300_TLS_DTPOFF, R_MN10300_TLS_TPOFF relocs.
373 (mn10300_reloc_map): Likewise.
374 (elf_mn10300_tls_transition): New function.
375 (dtpoff, tpoff, mn10300_do_tls_transition): New functions.
376 (mn10300_elf_check_relocs): Add TLS support.
377 (mn10300_elf_final_link_relocate): Likewise.
378 (mn10300_elf_relocate_section): Likewise.
379 (mn10300_elf_relax_section): Likewise.
380 (elf32_mn10300_link_hash_newfunc): Initialise new field.
381 (_bfd_mn10300_copy_indirect_symbol): New function.
382 (elf32_mn10300_link_hash_table_create): Initialise new fields.
383 (_bfd_mn10300_elf_size_dynamic_sections): Add TLS support.
384 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
385 (_bfd_mn10300_elf_reloc_type_class): Allocate an
386 elf_mn10300_obj_tdata structure.
387 (elf_backend_copy_indirect_symbol): Define.
388 * reloc.c (BFD_MN10300_TLS_GD, BFD_MN10300_TLS_LD,
389 BFD_MN10300_TLS_LDO, BFD_MN10300_TLS_GOTIE, BFD_MN10300_TLS_IE,
390 BFD_MN10300_TLS_LE, BFD_MN10300_TLS_DPTMOD,
391 BFD_MN10300_TLS_DTPOFF, BFD_MN10300_TLS_TPOFF): New relocations.
392 (BFD_RELOC_MN10300_32_PCREL, BFD_RELOC_MN10300_16_PCREL): Move to
393 alongside other MN10300 relocations.
394 * bfd-in2.h: Regenerate.
395 * libbfd.h: Regenerate.
396
397 2012-03-06 Jakub Jelinek <jakub@redhat.com>
398
399 * elf64-x86-64.c (elf_x86_64_relocate_section): For R_X86_64_RELATIVE
400 set relocate to TRUE.
401
402 2012-03-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
403
404 PR ld/12152
405 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Also ignore
406 overflows for R_SPARC_UA32 in .stab sections.
407
408 2012-03-01 Alan Modra <amodra@gmail.com>
409
410 * elfxx-tilegx.c (tilegx_elf_relocate_section): Silence bogus warning.
411
412 2012-02-27 Alan Modra <amodra@gmail.com>
413
414 * elf32-sh.c (sh_elf_osec_to_segment): Check for elf flavour bfd
415 before calling elf specific function.
416 (sh_elf_osec_readonly_p): Test for error return from above.
417
418 2012-02-27 Alan Modra <amodra@gmail.com>
419
420 * elf32-spu.c (build_stub): Fix malloc under-allocation.
421
422 2012-02-25 Walter Lee <walt@tilera.com>
423 * reloc.c: Add BFD_RELOC_TILEPRO_TLS_GD_CALL,
424 BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD,
425 BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD,
426 BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD,
427 BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD,
428 BFD_RELOC_TILEPRO_TLS_IE_LOAD, BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE,
429 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE,
430 BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO,
431 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO,
432 BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI,
433 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI,
434 BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA,
435 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA,
436 BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_LE,
437 BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE,
438 BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE,
439 BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE,
440 BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE,
441 BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE,
442 BFD_RELOC_TILEGX_TLS_GD_CALL, BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD,
443 BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD,
444 BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD,
445 BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD, BFD_RELOC_TILEGX_TLS_IE_LOAD,
446 BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD,
447 BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD,
448 BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD.
449 Delete BFD_RELOC_TILEGX_IMM16_X0_HW1_GOT,
450 BFD_RELOC_TILEGX_IMM16_X1_HW1_GOT,
451 BFD_RELOC_TILEGX_IMM16_X0_HW2_GOT,
452 BFD_RELOC_TILEGX_IMM16_X1_HW2_GOT,
453 BFD_RELOC_TILEGX_IMM16_X0_HW3_GOT,
454 BFD_RELOC_TILEGX_IMM16_X1_HW3_GOT,
455 BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_GOT,
456 BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_GOT,
457 BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_GD,
458 BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_GD,
459 BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_GD,
460 BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_GD,
461 BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_GD,
462 BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_GD,
463 BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_GD,
464 BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_GD,
465 BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_IE,
466 BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_IE,
467 BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_IE,
468 BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_IE,
469 BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_IE,
470 BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_IE,
471 BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_IE,
472 BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_IE.
473 * elf32-tilepro.c (tilepro_elf_howto_table): Update tilepro
474 relocations.
475 (tilepro_reloc_map): Ditto.
476 (tilepro_info_to_howto_rela): Ditto.
477 (reloc_to_create_func): Ditto.
478 (tilepro_tls_translate_to_le): New.
479 (tilepro_tls_translate_to_ie): New.
480 (tilepro_elf_tls_transition): New.
481 (tilepro_elf_check_relocs): Handle new tls relocations.
482 (tilepro_elf_gc_sweep_hook): Ditto.
483 (allocate_dynrelocs): Ditto.
484 (tilepro_elf_relocate_section): Ditto.
485 (tilepro_replace_insn): New.
486 (insn_mask_X1): New.
487 (insn_mask_X0_no_dest_no_srca): New
488 (insn_mask_X1_no_dest_no_srca): New
489 (insn_mask_Y0_no_dest_no_srca): New
490 (insn_mask_Y1_no_dest_no_srca): New
491 (srca_mask_X0): New
492 (srca_mask_X1): New
493 (insn_tls_le_move_X1): New
494 (insn_tls_le_move_zero_X0X1): New
495 (insn_tls_ie_lw_X1): New
496 (insn_tls_ie_add_X0X1): New
497 (insn_tls_ie_add_Y0Y1): New
498 (insn_tls_gd_add_X0X1): New
499 (insn_tls_gd_add_Y0Y1): New
500 * elfxx-tilegx.c (tilegx_elf_howto_table): Update tilegx
501 relocations.
502 (tilegx_reloc_map): Ditto.
503 (tilegx_info_to_howto_rela): Ditto.
504 (reloc_to_create_func): Ditto.
505 (tilegx_elf_link_hash_table): New field disable_le_transition.
506 (tilegx_tls_translate_to_le): New.
507 (tilegx_tls_translate_to_ie): New.
508 (tilegx_elf_tls_transition): New.
509 (tilegx_elf_check_relocs): Handle new tls relocations.
510 (tilegx_elf_gc_sweep_hook): Ditto.
511 (allocate_dynrelocs): Ditto.
512 (tilegx_elf_relocate_section): Ditto.
513 (tilegx_copy_bits): New.
514 (tilegx_replace_insn): New.
515 (insn_mask_X1): New.
516 (insn_mask_X0_no_dest_no_srca): New.
517 (insn_mask_X1_no_dest_no_srca): New.
518 (insn_mask_Y0_no_dest_no_srca): New.
519 (insn_mask_Y1_no_dest_no_srca): New.
520 (insn_mask_X0_no_operand): New.
521 (insn_mask_X1_no_operand): New.
522 (insn_mask_Y0_no_operand): New.
523 (insn_mask_Y1_no_operand): New.
524 (insn_tls_ie_ld_X1): New.
525 (insn_tls_ie_ld4s_X1): New.
526 (insn_tls_ie_add_X0X1): New.
527 (insn_tls_ie_add_Y0Y1): New.
528 (insn_tls_ie_addx_X0X1): New.
529 (insn_tls_ie_addx_Y0Y1): New.
530 (insn_tls_gd_add_X0X1): New.
531 (insn_tls_gd_add_Y0Y1): New.
532 (insn_move_X0X1): New.
533 (insn_move_Y0Y1): New.
534 (insn_add_X0X1): New.
535 (insn_add_Y0Y1): New.
536 (insn_addx_X0X1): New.
537 (insn_addx_Y0Y1): New.
538 * libbfd.h: Regenerate.
539 * bfd-in2.h: Regenerate.
540
541 2012-02-25 Walter Lee <walt@tilera.com>
542
543 * config.bfd (tilegx-*-*): rename little endian vector; add big
544 endian vector.
545 (tilegxbe-*-*): New case.
546 * configure.in (bfd_elf32_tilegx_vec): Rename...
547 (bfd_elf32_tilegx_le_vec): ... to this.
548 (bfd_elf32_tilegx_be_vec): New vector.
549 (bfd_elf64_tilegx_vec): Rename...
550 (bfd_elf64_tilegx_le_vec): ... to this.
551 (bfd_elf64_tilegx_be_vec): New vector.
552 * configure: Regenerate.
553 * elf32-tilegx.c (TARGET_LITTLE_SYM): Rename.
554 (TARGET_LITTLE_NAME): Ditto.
555 (TARGET_BIG_SYM): Define.
556 (TARGET_BIG_NAME): Define.
557 * elf64-tilegx.c (TARGET_LITTLE_SYM): Rename.
558 (TARGET_LITTLE_NAME): Ditto.
559 (TARGET_BIG_SYM): Define.
560 (TARGET_BIG_NAME): Define.
561 * targets.c (bfd_elf32_tilegx_vec): Rename...
562 (bfd_elf32_tilegx_le_vec): ... to this.
563 (bfd_elf32_tilegx_be_vec): Declare.
564 (bfd_elf64_tilegx_vec): Rename...
565 (bfd_elf64_tilegx_le_vec): ... to this.
566 (bfd_elf64_tilegx_be_vec): Declare.
567 (_bfd_target_vector): Add / rename above vectors.
568 * arctures.c (bfd_architecture): Define bfd_mach_tilegx32.
569 * bfd-in2.h: Regenerate.
570 * cpu-tilegx.c (bfd_tilegx32_arch): define.
571 (bfd_tilegx_arch): link to bfd_tilegx32_arch.
572
573 2012-02-24 Nick Clifton <nickc@redhat.com>
574
575 PR ld/13730
576 * reloc.c (bfd_generic_get_relocated_section_contents): Issue an
577 error message instead of aborting, when an outofrange reloc is
578 encountered.
579
580 2012-02-23 Iain Sandoe <idsandoe@googlemail.com>
581
582 * mach-o.c (bfd_mach_o_swap_in_non_scattered_reloc): New.
583 (bfd_mach_o_canonicalize_one_reloc): Swap non-scattered reloc
584 bit-fields when target and host differ in endian-ness. When
585 PAIRs are non-scattered find the 'symbol' from the preceding
586 reloc. Add FIXME re. reloc symbols on section boundaries.
587 (bfd_mach_o_swap_out_non_scattered_reloc): New.
588 (bfd_mach_o_write_relocs): Use bfd_mach_o_encode_non_scattered_reloc.
589
590 2012-02-17 Iain Sandoe <idsandoe@googlemail.com>
591
592 * mach-o-i386.c (i386_howto_table): Add support for 16 bit
593 sect-diffs.
594 (bfd_mach_o_i386_swap_reloc_in): Handle 16bit sect-diffs.
595 (bfd_mach_o_i386_swap_reloc_out): Likewise.
596
597 2012-02-17 Tristan Gingold <gingold@adacore.com>
598
599 * reloc.c (BFD_RELOC_MACH_O_LOCAL_SECTDIFF):
600 * libbfd.h: Regenerated.
601 * bfd-in2.h: Likewise.
602 * mach-o-i386.c (i386_howto_table): Include local sectdiff.
603 (bfd_mach_o_i386_swap_reloc_in): Update for local sectdiff.
604 (bfd_mach_o_i386_swap_reloc_out): Likewise.
605
606 2012-02-17 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
607
608 * elf32-s390.c (elf_s390_relocate_section): Support basr in the
609 GD->LE and LD->LE optimizations.
610
611 2012-02-16 Alan Modra <amodra@gmail.com>
612
613 PR binutils/13355
614 * elf32-rx.c (elf32_rx_relax_section): Correct width check.
615
616 2012-02-13 Richard Henderson <rth@redhat.com>
617
618 PR ld/13621
619 * linker.c (fix_syms): Force symbols outside any section into
620 bfd_abs_section_ptr.
621
622 2012-02-13 Alan Modra <amodra@gmail.com>
623
624 * elf32-m68hc1x.c (elf32_m68hc11_merge_symbol_attribute): New function.
625 * elf32-m68hc1x.h (elf32_m68hc11_merge_symbol_attribute): Declare.
626 * elf32-m68hc11.c (elf_backend_merge_symbol_attribute): Define.
627 * elf32-m68hc12.c (elf_backend_merge_symbol_attribute): Define.
628
629 2012-02-11 Jan Kratochvil <jan.kratochvil@redhat.com>
630 Nick Clifton <nickc@redhat.com>
631
632 * oasys.c (oasys_write_header): Fix compilation warning on zero-sized
633 memset.
634
635 2012-02-10 Iain Sandoe <idsandoe@googlemail.com>
636
637 * mach-o.c (bfd_mach_o_build_seg_command): Count zerofill section
638 vma additions in their logical, rather than physical order.
639
640 2012-02-10 Iain Sandoe <idsandoe@googlemail.com>
641
642 * mach-o.c (mach_o_section_name_xlat): Correct eh-frame section
643 parameters.
644 * mach-o-x86-64.c (text_section_names_xlat): New.
645 (mach_o_x86_64_segsec_names_xlat): New.
646 (bfd_mach_o_tgt_seg_table): Define to mach_o_x86_64_segsec_names_xlat.
647 * mach-o-i386.c (text_section_names_xlat): Correct section parameters.
648
649 2012-02-10 Tristan Gingold <gingold@adacore.com>
650
651 * elfnn-ia64.c (elfNN_vms_object_p): Change comparison operator
652 to avoid infinite loop. Add comments.
653
654 2012-02-09 H.J. Lu <hongjiu.lu@intel.com>
655
656 PR ld/13675
657 * cpu-i386.c (bfd_arch_i386_fill): Updated to support multi byte
658 nop instructions.
659 (bfd_arch_i386_short_nop_fill): New.
660 (bfd_arch_i386_long_nop_fill): Likewise.
661 Use bfd_arch_i386_short_nop_fill in 32bit bfd_arch_info
662 initializers. Use bfd_arch_i386_long_nop_fill on 64bit
663 bfd_arch_info initializers.
664
665 * cpu-k1om.c (bfd_arch_i386_fill): Renamed to ...
666 (bfd_arch_i386_short_nop_fill): This.
667 Update bfd_arch_info initializers.
668 * cpu-l1om.c: Likewise.
669
670 2012-02-08 Alan Modra <amodra@gmail.com>
671
672 * elflink.c (_bfd_elf_gc_mark_rsec): Mark weakdef syms too.
673 (_bfd_elf_fix_symbol_flags): When a weakdef is def_regular, clear
674 the correct h->u.weakdef.
675
676 2012-02-07 Alan Modra <amodra@gmail.com>
677
678 * elf.c (elf_find_function): Don't use internal_elf_sym.
679 (_bfd_elf_maybe_function_sym): Likewise. Replace elf_symbol_type
680 parameter with asymbol.
681 * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise.
682 * elf-bfd.h (_bfd_elf_maybe_function_sym): Update prototype.
683 (struct elf_backend_data <maybe_function_sym>): Likewise.
684
685 2012-02-02 Vidya Praveen (vidya.praveen@atmel.com)
686
687 PR bfd/13410
688 * bfd/elf32-avr.c (elf32_avr_relax_section): Correct the
689 condition that qualifies the candidates for relaxation.
690
691 2012-02-02 Tristan Gingold <gingold@adacore.com>
692
693 * bfdio.c (real_fopen): Remove unused vms_modes variable.
694
695 2012-02-02 Tristan Gingold <gingold@adacore.com>
696
697 * mach-o.c (bfd_mach_o_read_header): Silent uninitialized
698 variable warning.
699
700 2012-02-02 Tristan Gingold <gingold@adacore.com>
701
702 * archive.c (bfd_slurp_armap): Fix thinko in cast.
703
704 2012-01-31 H.J. Lu <hongjiu.lu@intel.com>
705
706 PR ld/13616
707 * archures.c (bfd_arch_info): Add fill.
708 (bfd_default_arch_struct): Add bfd_arch_default_fill.
709 (bfd_arch_default_fill): New.
710
711 * configure.in: Set bfd version to 2.22.52.
712 * configure: Regenerated.
713
714 * cpu-alpha.c: Add bfd_arch_default_fill to bfd_arch_info
715 initializer.
716 * cpu-arc.c: Likewise.
717 * cpu-arm.c: Likewise.
718 * cpu-avr.c: Likewise.
719 * cpu-bfin.c: Likewise.
720 * cpu-cr16.c: Likewise.
721 * cpu-cr16c.c: Likewise.
722 * cpu-cris.c: Likewise.
723 * cpu-crx.c: Likewise.
724 * cpu-d10v.c: Likewise.
725 * cpu-d30v.c: Likewise.
726 * cpu-dlx.c: Likewise.
727 * cpu-epiphany.c: Likewise.
728 * cpu-fr30.c: Likewise.
729 * cpu-frv.c: Likewise.
730 * cpu-h8300.c: Likewise.
731 * cpu-h8500.c: Likewise.
732 * cpu-hppa.c: Likewise.
733 * cpu-i370.c: Likewise.
734 * cpu-i860.c: Likewise.
735 * cpu-i960.c: Likewise.
736 * cpu-ia64.c: Likewise.
737 * cpu-ip2k.c: Likewise.
738 * cpu-iq2000.c: Likewise.
739 * cpu-lm32.c: Likewise.
740 * cpu-m10200.c: Likewise.
741 * cpu-m10300.c: Likewise.
742 * cpu-m32c.c: Likewise.
743 * cpu-m32r.c: Likewise.
744 * cpu-m68hc11.c: Likewise.
745 * cpu-m68hc12.c: Likewise.
746 * cpu-m68k.c: Likewise.
747 * cpu-m88k.c: Likewise.
748 * cpu-mcore.c: Likewise.
749 * cpu-mep.c: Likewise.
750 * cpu-microblaze.c: Likewise.
751 * cpu-mips.c: Likewise.
752 * cpu-mmix.c: Likewise.
753 * cpu-moxie.c: Likewise.
754 * cpu-msp430.c: Likewise.
755 * cpu-mt.c: Likewise.
756 * cpu-ns32k.c: Likewise.
757 * cpu-openrisc.c: Likewise.
758 * cpu-or32.c: Likewise.
759 * cpu-pdp11.c: Likewise.
760 * cpu-pj.c: Likewise.
761 * cpu-plugin.c: Likewise.
762 * cpu-powerpc.c: Likewise.
763 * cpu-rl78.c: Likewise.
764 * cpu-rs6000.c: Likewise.
765 * cpu-rx.c: Likewise.
766 * cpu-s390.c: Likewise.
767 * cpu-score.c: Likewise.
768 * cpu-sh.c: Likewise.
769 * cpu-sparc.c: Likewise.
770 * cpu-spu.c: Likewise.
771 * cpu-tic30.c: Likewise.
772 * cpu-tic4x.c: Likewise.
773 * cpu-tic54x.c: Likewise.
774 * cpu-tic6x.c: Likewise.
775 * cpu-tic80.c: Likewise.
776 * cpu-tilegx.c: Likewise.
777 * cpu-tilepro.c: Likewise.
778 * cpu-v850.c: Likewise.
779 * cpu-vax.c: Likewise.
780 * cpu-w65.c: Likewise.
781 * cpu-we32k.c: Likewise.
782 * cpu-xc16x.c: Likewise.
783 * cpu-xstormy16.c: Likewise.
784 * cpu-xtensa.c: Likewise.
785 * cpu-z80.c: Likewise.
786 * cpu-z8k.c: Likewise.
787
788 * cpu-i386.c: Include "libiberty.h".
789 (bfd_arch_i386_fill): New.
790 Add bfd_arch_i386_fill to bfd_arch_info initializer.
791
792 * cpu-k1om.c: Add bfd_arch_i386_fill to bfd_arch_info initializer.
793 * cpu-l1om.c: Likewise.
794
795 * linker.c (default_data_link_order): Call abfd->arch_info->fill
796 if fill size is 0.
797
798 * bfd-in2.h: Regenerated.
799
800 2012-01-27 Michael Eager <eager@eagercon.com>
801
802 * bfd/elf32-microblaze.c (create_got_section):
803 Reuse existing .rela.got section.
804
805 2012-01-23 Alan Modra <amodra@gmail.com>
806
807 * elf-bfd.h: Formatting.
808 (struct elf_backend_data): Add "maybe_function_sym".
809 (_bfd_elf_maybe_function_sym): Declare.
810 * elfxx-target.h (elf_backend_maybe_function_sym): Define.
811 (elfNN_bed): Init new field.
812 * elf.c (elf_find_function): Use maybe_function_sym.
813 (_bfd_elf_maybe_function_sym): New function.
814 * elf64-ppc.c (elf_backend_maybe_function_sym): Define.
815 (ppc64_elf_maybe_function_sym): New function.
816
817 2012-01-20 Francois Gouget <fgouget@codeweavers.com>
818
819 PR binutils/13534
820 * archive.c (_bfd_ar_sizepad): New function. Correctly install and
821 pad the size field in an archive header.
822 (_bfd_generic_read_ar_hdr_mag): Use the correct type and scan
823 function for the archive size field.
824 (bfd_generic_openr_next_archived_file): Likewise.
825 (do_slurp_coff_armap): Likewise.
826 (_bfd_write_archive_contents): Likewise.
827 (_bfd_bsd44_write_ar_hdr): Use the new function.
828 (bfd_ar_hdr_from_filesystem): Likewise.
829 (_bfd_write_archive_contents): Likewise.
830 (bsd_write_armap): Likewise.
831 (coff_write_armap): Likewise.
832 * archive64.c (bfd_elf64_archive_write_armap): Likewise.
833 * bfdio.c (bfd_bread): Use correct type for archive element
834 sizes.
835 * ar.c (open_inarch): Likewise.
836 (extract_file): Likewise.
837 * libbfd-in.h (struct areltdata): Use correct types for
838 parsed_size and extra_size fields.
839 Prototype _bfd_ar_sizepad function.
840 * libbfd.h: Regenerate.
841
842 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
843
844 * elf.c (elfcore_write_prpsinfo): Provide unconditionally.
845 Return NULL if core file generation is unsupported.
846 (elfcore_write_prstatus): Likewise.
847 * elf32-arm.c (elf32_arm_nabi_write_core_note): New function.
848 (elf_backend_write_core_note): Define.
849
850 2012-01-19 Tristan Gingold <gingold@adacore.com>
851
852 * pef.c: Add a comment.
853 * xsym.c: Likewise.
854
855 2012-01-17 Alan Modra <amodra@gmail.com>
856
857 * elf32-ppc.c (ppc_elf_write_core_note <NT_PRPSINFO>): Don't leave
858 trailing garbage in the note.
859 * elf64-ppc.c (ppc64_elf_write_core_note <NT_PRPSINFO>): Likewise.
860
861 2012-01-16 Daniel Green <venix1@gmail.com>
862
863 PR ld/13491
864 * coff-i386.c (coff_i386_rtype_to_howto <R_SECREL32>): Test
865 h->root.type not h->type.
866 * coff-x86_64.c (coff_amd64_rtype_to_howto <R_AMD64_SECREL>): Likewise.
867
868 2012-01-13 Iain Sandoe <idsandoe@googlemail.com>
869
870 * mach-o.c (bfd_mach_o_build_dysymtab_command): Handle absolute
871 indirect symbols.
872
873 2012-01-13 Iain Sandoe <idsandoe@googlemail.com>
874
875 * mach-o.c (bfd_mach_o_write_relocs): Move computation of relocs file
876 position from here... to (bfd_mach_o_build_seg_command): Here.
877
878 2012-01-12 Iain Sandoe <idsandoe@googlemail.com>
879
880 * mach-o.c (bfd_mach_o_count_indirect_symbols): New.
881 (bfd_mach_o_build_dysymtab_command): Populate indirect symbol table.
882 * mach-o.h (bfd_mach_o_asymbol): Move declaration to start of the
883 file. (bfd_mach_o_section): Add indirect_syms field.
884
885 2012-01-11 Iain Sandoe <idsandoe@googlemail.com>
886
887 * mach-o.c (bfd_mach_o_build_seg_command): Separate computation of
888 vmsize from filesize. Don't compute offsets or file sizes for
889 zerofill sections.
890
891 2012-01-11 Iain Sandoe <idsandoe@googlemail.com>
892
893 * mach-o.c (bfd_mach_o_build_commands): Make the building of each
894 command type independent.
895
896 2012-01-11 Alan Modra <amodra@gmail.com>
897
898 * elf64-ppc.c: Define more insns used in plt call stubs.
899 (ppc64_elf_brtaken_reloc): Assume isa version 2 or above.
900 (ppc64_elf_relocate_section): Likewise.
901 (enum ppc_stub_type): Add ppc_stub_plt_call_r2save.
902 (struct ppc_link_hash_table): Increase size of stub_count array.
903 Add plt_stub_align and plt_thread_safe.
904 (ALWAYS_USE_FAKE_DEP, ALWAYS_EMIT_R2SAVE): Define.
905 (plt_stub_size, plt_stub_pad): New functions.
906 (build_plt_stub): Emit barriers for power7 thread safety. Don't
907 emit needless save of r2.
908 (build_tls_get_addr_stub): Adjust params.
909 (ppc_build_one_stub): Handle ppc_stub_plt_call_r2save and aligning
910 plt stubs. Adjust build_*plt_stub calls.
911 (ppc_size_one_stub): Similarly.
912 (ppc64_elf_size_stubs): Accept plt_thread_safe and plt_stub_align
913 params. Choose default for plt_thread_safe based on existence of
914 calls to thread creation functions. Modify plt_call to
915 plt_call_r2save when no tocsave reloc found. Align tail of stub
916 sections.
917 (ppc64_elf_build_stubs): Align tail of stub sections. Adjust
918 output of stub statistics.
919 (ppc64_elf_relocate_section): Handle ppc_stub_plt_call_r2save.
920 * elf64-ppc.h (ppc64_elf_size_stubs): Update prototype.
921
922 2012-01-10 H.J. Lu <hongjiu.lu@intel.com>
923
924 PR ld/13581
925 * elf64-x86-64.c (elf_x86_64_relocate_section): Remove ABI_64_P
926 check on R_X86_64_PCXX.
927
928 2012-01-10 Tristan Gingold <gingold@adacore.com>
929
930 * mach-o.c (bfd_mach_o_build_commands): Avoid uninitialized false
931 warning.
932
933 2012-01-10 Tristan Gingold <gingold@adacore.com>
934
935 * bfdio.c (bfd_tell): Handle nested archives.
936 (bfd_seek): Ditto.
937 * cache.c (bfd_cache_lookup_worker): Ditto.
938 * archive.c (_bfd_get_elt_at_filepos): Remove code dealing with
939 nested archives.
940 (bfd_generic_openr_next_archived_file): Likewise.
941
942 2012-01-09 Iain Sandoe <idsandoe@googlemail.com>
943
944 * mach-o.c (bfd_mach_o_bfd_copy_private_symbol_data): Implement.
945 (bfd_mach_o_write_symtab): Remove handling for indirect syms.
946 (bfd_mach_o_primary_symbol_sort_key): Likewise.
947 (bfd_mach_o_cf_symbols): Likewise.
948 (bfd_mach_o_sort_symbol_table): Remove.
949 (bfd_mach_o_mangle_symbols): Adjust arguments, remove handling
950 for indirect and dysymtab counts. Do the symbol sorting here.
951 (bfd_mach_o_build_dysymtab_command): Count the symbol types here.
952 Make the indirect symbols a TODO.
953 (bfd_mach_o_build_commands): Adjust call to bfd_mach_o_mangle_symbols.
954 (bfd_mach_o_make_empty_symbol): Specifically flag unset symbols with
955 a non-zero value.
956 (bfd_mach_o_read_symtab_symbol): Record the symbol index.
957 (bfd_mach_o_read_symtab_symbol): Adjust recording of global status.
958 * mach-o.h (mach_o_data_struct): Remove indirect and dysymtab entries.
959 (IS_MACHO_INDIRECT): Remove.
960 (SYM_MACHO_FIELDS_UNSET, SYM_MACHO_FIELDS_NOT_VALIDATED): New.
961
962 2012-01-06 Nick Clifton <nickc@redhat.com>
963
964 PR binutils/13121
965 * reloc.c (bfd_generic_lookup_section_flags): Rename 'finfo' to
966 'flaginfo' to avoid conflicts with AIX system headers.
967
968 2012-01-06 Tristan Gingold <gingold@adacore.com>
969
970 * bfdio.c (bfd_bread): Use arelt_size macro.
971
972 2012-01-06 Tristan Gingold <gingold@adacore.com>
973
974 * config.bfd (i[3-7]86-*-darwin*): Define targ64_selvecs.
975
976 2012-01-05 Nick Clifton <nickc@redhat.com>
977
978 PR ld/12161
979 * elf32-avr.c (elf32_avr_relax_delete_bytes): Read in relocs if
980 necessary.
981
982 2012-01-05 Jan Kratochvil <jan.kratochvil@redhat.com>
983
984 Fix zero registers core files when built by gcc-4.7.
985 * elf64-x86-64.c (elf_x86_64_write_core_note): Remove variables p and
986 size. Call elfcore_write_note for the local variables. Remove the
987 final elfcore_write_note call. Add NOTREACHED comments.
988
989 2012-01-04 Tristan Gingold <gingold@adacore.com>
990
991 * mach-o.c (bfd_mach_o_fat_stat_arch_elt): New function.
992 (bfd_mach_o_generic_stat_arch_elt): Adjust.
993
994 2012-01-04 Tristan Gingold <gingold@adacore.com>
995
996 * mach-o.c (bfd_mach_o_fat_member_init): New function.
997 (bfd_mach_o_openr_next_archived_file): Reindent.
998 Adjust to call bfd_mach_o_fat_member_init.
999 (bfd_mach_o_fat_extract): Adjust to call bfd_mach_o_fat_member_init.
1000
1001 2012-01-04 Tristan Gingold <gingold@adacore.com>
1002
1003 * mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Handle
1004 BFD_RELOC_32, BFD_RELOC_MACH_O_X86_64_PCREL32_1,
1005 BFD_RELOC_MACH_O_X86_64_PCREL32_2,
1006 BFD_RELOC_MACH_O_X86_64_PCREL32_4,
1007 BFD_RELOC_MACH_O_X86_64_BRANCH32,
1008 BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32,
1009 BFD_RELOC_MACH_O_X86_64_GOT.
1010
1011 2012-01-04 Tristan Gingold <gingold@adacore.com>
1012
1013 * mach-o.h (bfd_mach_o_fvmlib_command): New structure.
1014 (bfd_mach_o_load_command): Add fvmlib field.
1015
1016 * mach-o.c (bfd_mach_o_read_fvmlib): New function.
1017 (bfd_mach_o_read_command): Handle fvmlib.
1018
1019 2012-01-04 Tristan Gingold <gingold@adacore.com>
1020
1021 * mach-o.c (bfd_mach_o_convert_architecture): Reindent.
1022 Decode msubtype for ARM.
1023
1024 2012-01-04 Tristan Gingold <gingold@adacore.com>
1025
1026 * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add comments.
1027
1028 2012-01-04 Tristan Gingold <gingold@adacore.com>
1029
1030 * mach-o.h: Reindent header.
1031 (bfd_mach_o_encryption_info_command): New structure.
1032 (bfd_mach_o_load_command): Add encryption_info field.
1033
1034 * mach-o.c (bfd_mach_o_read_encryption_info): New function.
1035 (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_ENCRYPTION_INFO.
1036 (bfd_mach_o_read_command): Adjust error message.
1037
1038 2012-01-04 Shinichiro Hamaji <shinichiro.hamaji@gmail.com>
1039
1040 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Factor out the part
1041 which reads DWARF2 and stores in stash from find_line.
1042 (find_line) Call _bfd_dwarf2_slurp_debug_info.
1043 * libbfd-in.h (_bfd_dwarf2_slurp_debug_info): Add declaration.
1044 * libbfd.h (_bfd_dwarf2_slurp_debug_info): Regenerate.
1045 * mach-o.c (dsym_subdir): The name of subdir where debug
1046 information may be stored.
1047 (bfd_mach_o_lookup_uuid_command): New. Lookup a load command whose
1048 type is UUID.
1049 (bfd_mach_o_dsym_for_uuid_p): New. Check if the specified BFD is
1050 corresponding to the executable.
1051 (bfd_mach_o_find_dsym): New. Find a debug information BFD in the
1052 specified binary file.
1053 (bfd_mach_o_follow_dsym): New. Find a debug information BFD for
1054 the original BFD.
1055 (bfd_mach_o_find_nearest_line): Check dSYM files for Mach-O
1056 executables, dylibs, and bundles.
1057 (bfd_mach_o_close_and_cleanup): Clean up BFDs for the dSYM file.
1058 * mach-o.h (dsym_bfd): The BFD of the dSYM file.
1059
1060 2012-01-03 Iain Sandoe <idsandoe@googlemail.com>
1061
1062 * mach-o.c (bfd_mach_o_mangle_symbols): Put in the section index
1063 for stabd symbols.
1064 (bfd_mach_o_primary_symbol_sort_key): Adjust for stabs.
1065 (bfd_mach_o_cf_symbols): Likewise.
1066
1067 2012-01-03 Iain Sandoe <idsandoe@googlemail.com>
1068
1069 * mach-o.c (bfd_mach_o_mangle_symbols): Correct typo.
1070
1071 2012-01-03 Iain Sandoe <idsandoe@googlemail.com>
1072
1073 * mach-o.c (bfd_mach_o_write_symtab): Fill in the string table index
1074 as the value of an indirect symbol. Keep the string table index in
1075 non-indirect syms for reference.
1076 (bfd_mach_o_write_dysymtab): New.
1077 (bfd_mach_o_primary_symbol_sort_key): New.
1078 (bfd_mach_o_cf_symbols): New.
1079 (bfd_mach_o_sort_symbol_table): New.
1080 (bfd_mach_o_mangle_symbols): Return early if no symbols. Sort symbols.
1081 If we are emitting a dysymtab, process indirect symbols and count the
1082 number of each other kind.
1083 (bfd_mach_o_mangle_sections): New.
1084 (bfd_mach_o_write_contents): Split out some pre-requisite code into
1085 the command builder. Write dysymtab if the command is present.
1086 (bfd_mach_o_count_sections_for_seg): New.
1087 (bfd_mach_o_build_seg_command): New.
1088 (bfd_mach_o_build_dysymtab_command): New.
1089 (bfd_mach_o_build_commands): Reorganize to support the fact that some
1090 commands are optional and should not be emitted if there are no
1091 sections or symbols.
1092 (bfd_mach_o_set_section_contents): Amend comment.
1093 * mach-o.h: Amend and add to comments.
1094 (mach_o_data_struct): Add fields for dysymtab symbols counts and a
1095 pointer to the indirects, when present.
1096 (bfd_mach_o_should_emit_dysymtab): New macro.
1097 (IS_MACHO_INDIRECT): Likewise.
1098
1099 For older changes see ChangeLog-2011
1100 \f
1101 Local Variables:
1102 mode: change-log
1103 left-margin: 8
1104 fill-column: 74
1105 version-control: never
1106 End: