Handle relocation against protected function for -Bsymbolic
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2012-03-20 H.J. Lu <hongjiu.lu@intel.com>
2
3 PR ld/13880
4 * elf32-i386.c (elf_i386_relocate_section): Don't issue an error
5 for R_386_GOTOFF relocation against protected function if
6 SYMBOLIC_BIND is true.
7
8 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't issue an
9 error for R_X86_64_GOTOFF64 relocation against protected function
10 when building executable or SYMBOLIC_BIND is true.
11
12 2012-03-16 Roland McGrath <mcgrathr@google.com>
13
14 * config.bfd: Handle x86_64-*-nacl*.
15 * elf64-x86-64.c (bfd_elf64_x86_64_nacl_vec): New backend vector stanza.
16 (bfd_elf32_x86_64_nacl_vec): Likewise.
17 * targets.c: Support them.
18 * configure.in: Likewise.
19 * configure: Regenerated.
20
21 2012-03-16 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
22
23 * elf32-arm.c (elf32_arm_attributes_accept_div): New function.
24 (elf32_arm_attributes_forbid_div): Likewise.
25 (elf32_arm_merge_eabi_attributes): Correct handling of
26 Tag_DIV_use.
27
28 2012-03-15 Roland McGrath <mcgrathr@google.com>
29
30 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Use
31 elf_x86_64_backend_data parameters for plt_eh_frame.
32
33 * elf64-x86-64.c (struct elf_x86_64_backend_data): New type.
34 (get_elf_x86_64_backend_data, GET_PLT_ENTRY_SIZE): New macros.
35 (elf_x86_64_arch_bed): New variable.
36 (elf_backend_arch_data): New macro.
37 (elf_x86_64_adjust_dynamic_symbol): Use GET_PLT_ENTRY_SIZE.
38 (elf_x86_64_allocate_dynrelocs): Likewise.
39 (elf_x86_64_relocate_section): Likewise.
40 (elf_x86_64_plt_sym_val): Likewise.
41 (elf_x86_64_finish_dynamic_symbol): Use elf_x86_64_backend_data
42 parameters for PLT details.
43 (elf_x86_64_finish_dynamic_sections): Likewise.
44
45 2012-03-14 Roland McGrath <mcgrathr@google.com>
46
47 * elf32-i386.c (elf_i386_nacl_pic_plt0_entry): Initialize up
48 to the full size, padding out with nop instructions.
49
50 2012-03-12 Alan Modra <amodra@gmail.com>
51
52 * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Don't warn
53 on zero size dynbss symbol.
54 * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
55 * elf32-cr16.c (_bfd_cr16_elf_adjust_dynamic_symbol): Likewise.
56 * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
57 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
58 * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
59 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise.
60 * elf32-lm32.c (lm32_elf_adjust_dynamic_symbol): Likewise.
61 * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
62 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
63 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
64 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
65 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
66 * elf32-tic6x.c (elf32_tic6x_adjust_dynamic_symbol): Likewise.
67 * elf32-tilepro.c (tilepro_elf_adjust_dynamic_symbol): Likewise.
68 * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
69 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
70 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
71 * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
72 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
73 * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
74 * elfxx-tilegx.c (tilegx_elf_adjust_dynamic_symbol): Likewise.
75
76 2012-03-10 Edmar Wienskoski <edmar@freescale.com>
77
78 * archures.c: Add bfd_mach_ppc_e5500 and bfd_mach_ppc_e6500.
79 * bfd-in2.h: Regenerate.
80 * cpu-powerpc.c (bfd_powerpc_archs): Add entries for
81 bfd_mach_ppc_e5500 and bfd_mach_ppc_e6500.
82
83 2012-03-09 H.J. Lu <hongjiu.lu@intel.com>
84
85 PR ld/13817
86 * bfd/elf32-i386.c (elf_i386_relocate_section): Restore
87 R_386_IRELATIVE.
88
89 * * elf64-x86-64.c (elf_x86_64_relocate_section): Restore
90 R_X86_64_IRELATIVE.
91
92 2012-03-08 Tristan Gingold <gingold@adacore.com>
93
94 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Set maximum
95 keylen according to archive kind. Set nextvbn and nextrfa lhd
96 fields. Add comments.
97
98 2012-03-07 Nick Clifton <nickc@redhat.com>
99
100 * elf-m10300.c (elf32_mn10300_link_hash_entry): Add tls_type
101 field.
102 (elf32_mn10300_link_hash_table): Add tls_ldm_got entry;
103 (elf_mn10300_tdata): Define.
104 (elf_mn10300_local_got_tls_type): Define.
105 (elf_mn10300_howto_table): Add entries for R_MN10300_TLS_GD,
106 R_MN10300_TLS_LD, R_MN10300_TLS_LDO, R_MN10300_TLS_GOTIE,
107 R_MN10300_TLS_IE, R_MN10300_TLS_LE, R_MN10300_TLS_DPTMOD,
108 R_MN10300_TLS_DTPOFF, R_MN10300_TLS_TPOFF relocs.
109 (mn10300_reloc_map): Likewise.
110 (elf_mn10300_tls_transition): New function.
111 (dtpoff, tpoff, mn10300_do_tls_transition): New functions.
112 (mn10300_elf_check_relocs): Add TLS support.
113 (mn10300_elf_final_link_relocate): Likewise.
114 (mn10300_elf_relocate_section): Likewise.
115 (mn10300_elf_relax_section): Likewise.
116 (elf32_mn10300_link_hash_newfunc): Initialise new field.
117 (_bfd_mn10300_copy_indirect_symbol): New function.
118 (elf32_mn10300_link_hash_table_create): Initialise new fields.
119 (_bfd_mn10300_elf_size_dynamic_sections): Add TLS support.
120 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
121 (_bfd_mn10300_elf_reloc_type_class): Allocate an
122 elf_mn10300_obj_tdata structure.
123 (elf_backend_copy_indirect_symbol): Define.
124 * reloc.c (BFD_MN10300_TLS_GD, BFD_MN10300_TLS_LD,
125 BFD_MN10300_TLS_LDO, BFD_MN10300_TLS_GOTIE, BFD_MN10300_TLS_IE,
126 BFD_MN10300_TLS_LE, BFD_MN10300_TLS_DPTMOD,
127 BFD_MN10300_TLS_DTPOFF, BFD_MN10300_TLS_TPOFF): New relocations.
128 (BFD_RELOC_MN10300_32_PCREL, BFD_RELOC_MN10300_16_PCREL): Move to
129 alongside other MN10300 relocations.
130 * bfd-in2.h: Regenerate.
131 * libbfd.h: Regenerate.
132
133 2012-03-06 Jakub Jelinek <jakub@redhat.com>
134
135 * elf64-x86-64.c (elf_x86_64_relocate_section): For R_X86_64_RELATIVE
136 set relocate to TRUE.
137
138 2012-03-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
139
140 PR ld/12152
141 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Also ignore
142 overflows for R_SPARC_UA32 in .stab sections.
143
144 2012-03-01 Alan Modra <amodra@gmail.com>
145
146 * elfxx-tilegx.c (tilegx_elf_relocate_section): Silence bogus warning.
147
148 2012-02-27 Alan Modra <amodra@gmail.com>
149
150 * elf32-sh.c (sh_elf_osec_to_segment): Check for elf flavour bfd
151 before calling elf specific function.
152 (sh_elf_osec_readonly_p): Test for error return from above.
153
154 2012-02-27 Alan Modra <amodra@gmail.com>
155
156 * elf32-spu.c (build_stub): Fix malloc under-allocation.
157
158 2012-02-25 Walter Lee <walt@tilera.com>
159 * reloc.c: Add BFD_RELOC_TILEPRO_TLS_GD_CALL,
160 BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD,
161 BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD,
162 BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD,
163 BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD,
164 BFD_RELOC_TILEPRO_TLS_IE_LOAD, BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE,
165 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE,
166 BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO,
167 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO,
168 BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI,
169 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI,
170 BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA,
171 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA,
172 BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_LE,
173 BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE,
174 BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE,
175 BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE,
176 BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE,
177 BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE,
178 BFD_RELOC_TILEGX_TLS_GD_CALL, BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD,
179 BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD,
180 BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD,
181 BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD, BFD_RELOC_TILEGX_TLS_IE_LOAD,
182 BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD,
183 BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD,
184 BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD.
185 Delete BFD_RELOC_TILEGX_IMM16_X0_HW1_GOT,
186 BFD_RELOC_TILEGX_IMM16_X1_HW1_GOT,
187 BFD_RELOC_TILEGX_IMM16_X0_HW2_GOT,
188 BFD_RELOC_TILEGX_IMM16_X1_HW2_GOT,
189 BFD_RELOC_TILEGX_IMM16_X0_HW3_GOT,
190 BFD_RELOC_TILEGX_IMM16_X1_HW3_GOT,
191 BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_GOT,
192 BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_GOT,
193 BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_GD,
194 BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_GD,
195 BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_GD,
196 BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_GD,
197 BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_GD,
198 BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_GD,
199 BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_GD,
200 BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_GD,
201 BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_IE,
202 BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_IE,
203 BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_IE,
204 BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_IE,
205 BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_IE,
206 BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_IE,
207 BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_IE,
208 BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_IE.
209 * elf32-tilepro.c (tilepro_elf_howto_table): Update tilepro
210 relocations.
211 (tilepro_reloc_map): Ditto.
212 (tilepro_info_to_howto_rela): Ditto.
213 (reloc_to_create_func): Ditto.
214 (tilepro_tls_translate_to_le): New.
215 (tilepro_tls_translate_to_ie): New.
216 (tilepro_elf_tls_transition): New.
217 (tilepro_elf_check_relocs): Handle new tls relocations.
218 (tilepro_elf_gc_sweep_hook): Ditto.
219 (allocate_dynrelocs): Ditto.
220 (tilepro_elf_relocate_section): Ditto.
221 (tilepro_replace_insn): New.
222 (insn_mask_X1): New.
223 (insn_mask_X0_no_dest_no_srca): New
224 (insn_mask_X1_no_dest_no_srca): New
225 (insn_mask_Y0_no_dest_no_srca): New
226 (insn_mask_Y1_no_dest_no_srca): New
227 (srca_mask_X0): New
228 (srca_mask_X1): New
229 (insn_tls_le_move_X1): New
230 (insn_tls_le_move_zero_X0X1): New
231 (insn_tls_ie_lw_X1): New
232 (insn_tls_ie_add_X0X1): New
233 (insn_tls_ie_add_Y0Y1): New
234 (insn_tls_gd_add_X0X1): New
235 (insn_tls_gd_add_Y0Y1): New
236 * elfxx-tilegx.c (tilegx_elf_howto_table): Update tilegx
237 relocations.
238 (tilegx_reloc_map): Ditto.
239 (tilegx_info_to_howto_rela): Ditto.
240 (reloc_to_create_func): Ditto.
241 (tilegx_elf_link_hash_table): New field disable_le_transition.
242 (tilegx_tls_translate_to_le): New.
243 (tilegx_tls_translate_to_ie): New.
244 (tilegx_elf_tls_transition): New.
245 (tilegx_elf_check_relocs): Handle new tls relocations.
246 (tilegx_elf_gc_sweep_hook): Ditto.
247 (allocate_dynrelocs): Ditto.
248 (tilegx_elf_relocate_section): Ditto.
249 (tilegx_copy_bits): New.
250 (tilegx_replace_insn): New.
251 (insn_mask_X1): New.
252 (insn_mask_X0_no_dest_no_srca): New.
253 (insn_mask_X1_no_dest_no_srca): New.
254 (insn_mask_Y0_no_dest_no_srca): New.
255 (insn_mask_Y1_no_dest_no_srca): New.
256 (insn_mask_X0_no_operand): New.
257 (insn_mask_X1_no_operand): New.
258 (insn_mask_Y0_no_operand): New.
259 (insn_mask_Y1_no_operand): New.
260 (insn_tls_ie_ld_X1): New.
261 (insn_tls_ie_ld4s_X1): New.
262 (insn_tls_ie_add_X0X1): New.
263 (insn_tls_ie_add_Y0Y1): New.
264 (insn_tls_ie_addx_X0X1): New.
265 (insn_tls_ie_addx_Y0Y1): New.
266 (insn_tls_gd_add_X0X1): New.
267 (insn_tls_gd_add_Y0Y1): New.
268 (insn_move_X0X1): New.
269 (insn_move_Y0Y1): New.
270 (insn_add_X0X1): New.
271 (insn_add_Y0Y1): New.
272 (insn_addx_X0X1): New.
273 (insn_addx_Y0Y1): New.
274 * libbfd.h: Regenerate.
275 * bfd-in2.h: Regenerate.
276
277 2012-02-25 Walter Lee <walt@tilera.com>
278
279 * config.bfd (tilegx-*-*): rename little endian vector; add big
280 endian vector.
281 (tilegxbe-*-*): New case.
282 * configure.in (bfd_elf32_tilegx_vec): Rename...
283 (bfd_elf32_tilegx_le_vec): ... to this.
284 (bfd_elf32_tilegx_be_vec): New vector.
285 (bfd_elf64_tilegx_vec): Rename...
286 (bfd_elf64_tilegx_le_vec): ... to this.
287 (bfd_elf64_tilegx_be_vec): New vector.
288 * configure: Regenerate.
289 * elf32-tilegx.c (TARGET_LITTLE_SYM): Rename.
290 (TARGET_LITTLE_NAME): Ditto.
291 (TARGET_BIG_SYM): Define.
292 (TARGET_BIG_NAME): Define.
293 * elf64-tilegx.c (TARGET_LITTLE_SYM): Rename.
294 (TARGET_LITTLE_NAME): Ditto.
295 (TARGET_BIG_SYM): Define.
296 (TARGET_BIG_NAME): Define.
297 * targets.c (bfd_elf32_tilegx_vec): Rename...
298 (bfd_elf32_tilegx_le_vec): ... to this.
299 (bfd_elf32_tilegx_be_vec): Declare.
300 (bfd_elf64_tilegx_vec): Rename...
301 (bfd_elf64_tilegx_le_vec): ... to this.
302 (bfd_elf64_tilegx_be_vec): Declare.
303 (_bfd_target_vector): Add / rename above vectors.
304 * arctures.c (bfd_architecture): Define bfd_mach_tilegx32.
305 * bfd-in2.h: Regenerate.
306 * cpu-tilegx.c (bfd_tilegx32_arch): define.
307 (bfd_tilegx_arch): link to bfd_tilegx32_arch.
308
309 2012-02-24 Nick Clifton <nickc@redhat.com>
310
311 PR ld/13730
312 * reloc.c (bfd_generic_get_relocated_section_contents): Issue an
313 error message instead of aborting, when an outofrange reloc is
314 encountered.
315
316 2012-02-23 Iain Sandoe <idsandoe@googlemail.com>
317
318 * mach-o.c (bfd_mach_o_swap_in_non_scattered_reloc): New.
319 (bfd_mach_o_canonicalize_one_reloc): Swap non-scattered reloc
320 bit-fields when target and host differ in endian-ness. When
321 PAIRs are non-scattered find the 'symbol' from the preceding
322 reloc. Add FIXME re. reloc symbols on section boundaries.
323 (bfd_mach_o_swap_out_non_scattered_reloc): New.
324 (bfd_mach_o_write_relocs): Use bfd_mach_o_encode_non_scattered_reloc.
325
326 2012-02-17 Iain Sandoe <idsandoe@googlemail.com>
327
328 * mach-o-i386.c (i386_howto_table): Add support for 16 bit
329 sect-diffs.
330 (bfd_mach_o_i386_swap_reloc_in): Handle 16bit sect-diffs.
331 (bfd_mach_o_i386_swap_reloc_out): Likewise.
332
333 2012-02-17 Tristan Gingold <gingold@adacore.com>
334
335 * reloc.c (BFD_RELOC_MACH_O_LOCAL_SECTDIFF):
336 * libbfd.h: Regenerated.
337 * bfd-in2.h: Likewise.
338 * mach-o-i386.c (i386_howto_table): Include local sectdiff.
339 (bfd_mach_o_i386_swap_reloc_in): Update for local sectdiff.
340 (bfd_mach_o_i386_swap_reloc_out): Likewise.
341
342 2012-02-17 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
343
344 * elf32-s390.c (elf_s390_relocate_section): Support basr in the
345 GD->LE and LD->LE optimizations.
346
347 2012-02-16 Alan Modra <amodra@gmail.com>
348
349 PR binutils/13355
350 * elf32-rx.c (elf32_rx_relax_section): Correct width check.
351
352 2012-02-13 Richard Henderson <rth@redhat.com>
353
354 PR ld/13621
355 * linker.c (fix_syms): Force symbols outside any section into
356 bfd_abs_section_ptr.
357
358 2012-02-13 Alan Modra <amodra@gmail.com>
359
360 * elf32-m68hc1x.c (elf32_m68hc11_merge_symbol_attribute): New function.
361 * elf32-m68hc1x.h (elf32_m68hc11_merge_symbol_attribute): Declare.
362 * elf32-m68hc11.c (elf_backend_merge_symbol_attribute): Define.
363 * elf32-m68hc12.c (elf_backend_merge_symbol_attribute): Define.
364
365 2012-02-11 Jan Kratochvil <jan.kratochvil@redhat.com>
366 Nick Clifton <nickc@redhat.com>
367
368 * oasys.c (oasys_write_header): Fix compilation warning on zero-sized
369 memset.
370
371 2012-02-10 Iain Sandoe <idsandoe@googlemail.com>
372
373 * mach-o.c (bfd_mach_o_build_seg_command): Count zerofill section
374 vma additions in their logical, rather than physical order.
375
376 2012-02-10 Iain Sandoe <idsandoe@googlemail.com>
377
378 * mach-o.c (mach_o_section_name_xlat): Correct eh-frame section
379 parameters.
380 * mach-o-x86-64.c (text_section_names_xlat): New.
381 (mach_o_x86_64_segsec_names_xlat): New.
382 (bfd_mach_o_tgt_seg_table): Define to mach_o_x86_64_segsec_names_xlat.
383 * mach-o-i386.c (text_section_names_xlat): Correct section parameters.
384
385 2012-02-10 Tristan Gingold <gingold@adacore.com>
386
387 * elfnn-ia64.c (elfNN_vms_object_p): Change comparison operator
388 to avoid infinite loop. Add comments.
389
390 2012-02-09 H.J. Lu <hongjiu.lu@intel.com>
391
392 PR ld/13675
393 * cpu-i386.c (bfd_arch_i386_fill): Updated to support multi byte
394 nop instructions.
395 (bfd_arch_i386_short_nop_fill): New.
396 (bfd_arch_i386_long_nop_fill): Likewise.
397 Use bfd_arch_i386_short_nop_fill in 32bit bfd_arch_info
398 initializers. Use bfd_arch_i386_long_nop_fill on 64bit
399 bfd_arch_info initializers.
400
401 * cpu-k1om.c (bfd_arch_i386_fill): Renamed to ...
402 (bfd_arch_i386_short_nop_fill): This.
403 Update bfd_arch_info initializers.
404 * cpu-l1om.c: Likewise.
405
406 2012-02-08 Alan Modra <amodra@gmail.com>
407
408 * elflink.c (_bfd_elf_gc_mark_rsec): Mark weakdef syms too.
409 (_bfd_elf_fix_symbol_flags): When a weakdef is def_regular, clear
410 the correct h->u.weakdef.
411
412 2012-02-07 Alan Modra <amodra@gmail.com>
413
414 * elf.c (elf_find_function): Don't use internal_elf_sym.
415 (_bfd_elf_maybe_function_sym): Likewise. Replace elf_symbol_type
416 parameter with asymbol.
417 * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise.
418 * elf-bfd.h (_bfd_elf_maybe_function_sym): Update prototype.
419 (struct elf_backend_data <maybe_function_sym>): Likewise.
420
421 2012-02-02 Vidya Praveen (vidya.praveen@atmel.com)
422
423 PR bfd/13410
424 * bfd/elf32-avr.c (elf32_avr_relax_section): Correct the
425 condition that qualifies the candidates for relaxation.
426
427 2012-02-02 Tristan Gingold <gingold@adacore.com>
428
429 * bfdio.c (real_fopen): Remove unused vms_modes variable.
430
431 2012-02-02 Tristan Gingold <gingold@adacore.com>
432
433 * mach-o.c (bfd_mach_o_read_header): Silent uninitialized
434 variable warning.
435
436 2012-02-02 Tristan Gingold <gingold@adacore.com>
437
438 * archive.c (bfd_slurp_armap): Fix thinko in cast.
439
440 2012-01-31 H.J. Lu <hongjiu.lu@intel.com>
441
442 PR ld/13616
443 * archures.c (bfd_arch_info): Add fill.
444 (bfd_default_arch_struct): Add bfd_arch_default_fill.
445 (bfd_arch_default_fill): New.
446
447 * configure.in: Set bfd version to 2.22.52.
448 * configure: Regenerated.
449
450 * cpu-alpha.c: Add bfd_arch_default_fill to bfd_arch_info
451 initializer.
452 * cpu-arc.c: Likewise.
453 * cpu-arm.c: Likewise.
454 * cpu-avr.c: Likewise.
455 * cpu-bfin.c: Likewise.
456 * cpu-cr16.c: Likewise.
457 * cpu-cr16c.c: Likewise.
458 * cpu-cris.c: Likewise.
459 * cpu-crx.c: Likewise.
460 * cpu-d10v.c: Likewise.
461 * cpu-d30v.c: Likewise.
462 * cpu-dlx.c: Likewise.
463 * cpu-epiphany.c: Likewise.
464 * cpu-fr30.c: Likewise.
465 * cpu-frv.c: Likewise.
466 * cpu-h8300.c: Likewise.
467 * cpu-h8500.c: Likewise.
468 * cpu-hppa.c: Likewise.
469 * cpu-i370.c: Likewise.
470 * cpu-i860.c: Likewise.
471 * cpu-i960.c: Likewise.
472 * cpu-ia64.c: Likewise.
473 * cpu-ip2k.c: Likewise.
474 * cpu-iq2000.c: Likewise.
475 * cpu-lm32.c: Likewise.
476 * cpu-m10200.c: Likewise.
477 * cpu-m10300.c: Likewise.
478 * cpu-m32c.c: Likewise.
479 * cpu-m32r.c: Likewise.
480 * cpu-m68hc11.c: Likewise.
481 * cpu-m68hc12.c: Likewise.
482 * cpu-m68k.c: Likewise.
483 * cpu-m88k.c: Likewise.
484 * cpu-mcore.c: Likewise.
485 * cpu-mep.c: Likewise.
486 * cpu-microblaze.c: Likewise.
487 * cpu-mips.c: Likewise.
488 * cpu-mmix.c: Likewise.
489 * cpu-moxie.c: Likewise.
490 * cpu-msp430.c: Likewise.
491 * cpu-mt.c: Likewise.
492 * cpu-ns32k.c: Likewise.
493 * cpu-openrisc.c: Likewise.
494 * cpu-or32.c: Likewise.
495 * cpu-pdp11.c: Likewise.
496 * cpu-pj.c: Likewise.
497 * cpu-plugin.c: Likewise.
498 * cpu-powerpc.c: Likewise.
499 * cpu-rl78.c: Likewise.
500 * cpu-rs6000.c: Likewise.
501 * cpu-rx.c: Likewise.
502 * cpu-s390.c: Likewise.
503 * cpu-score.c: Likewise.
504 * cpu-sh.c: Likewise.
505 * cpu-sparc.c: Likewise.
506 * cpu-spu.c: Likewise.
507 * cpu-tic30.c: Likewise.
508 * cpu-tic4x.c: Likewise.
509 * cpu-tic54x.c: Likewise.
510 * cpu-tic6x.c: Likewise.
511 * cpu-tic80.c: Likewise.
512 * cpu-tilegx.c: Likewise.
513 * cpu-tilepro.c: Likewise.
514 * cpu-v850.c: Likewise.
515 * cpu-vax.c: Likewise.
516 * cpu-w65.c: Likewise.
517 * cpu-we32k.c: Likewise.
518 * cpu-xc16x.c: Likewise.
519 * cpu-xstormy16.c: Likewise.
520 * cpu-xtensa.c: Likewise.
521 * cpu-z80.c: Likewise.
522 * cpu-z8k.c: Likewise.
523
524 * cpu-i386.c: Include "libiberty.h".
525 (bfd_arch_i386_fill): New.
526 Add bfd_arch_i386_fill to bfd_arch_info initializer.
527
528 * cpu-k1om.c: Add bfd_arch_i386_fill to bfd_arch_info initializer.
529 * cpu-l1om.c: Likewise.
530
531 * linker.c (default_data_link_order): Call abfd->arch_info->fill
532 if fill size is 0.
533
534 * bfd-in2.h: Regenerated.
535
536 2012-01-27 Michael Eager <eager@eagercon.com>
537
538 * bfd/elf32-microblaze.c (create_got_section):
539 Reuse existing .rela.got section.
540
541 2012-01-23 Alan Modra <amodra@gmail.com>
542
543 * elf-bfd.h: Formatting.
544 (struct elf_backend_data): Add "maybe_function_sym".
545 (_bfd_elf_maybe_function_sym): Declare.
546 * elfxx-target.h (elf_backend_maybe_function_sym): Define.
547 (elfNN_bed): Init new field.
548 * elf.c (elf_find_function): Use maybe_function_sym.
549 (_bfd_elf_maybe_function_sym): New function.
550 * elf64-ppc.c (elf_backend_maybe_function_sym): Define.
551 (ppc64_elf_maybe_function_sym): New function.
552
553 2012-01-20 Francois Gouget <fgouget@codeweavers.com>
554
555 PR binutils/13534
556 * archive.c (_bfd_ar_sizepad): New function. Correctly install and
557 pad the size field in an archive header.
558 (_bfd_generic_read_ar_hdr_mag): Use the correct type and scan
559 function for the archive size field.
560 (bfd_generic_openr_next_archived_file): Likewise.
561 (do_slurp_coff_armap): Likewise.
562 (_bfd_write_archive_contents): Likewise.
563 (_bfd_bsd44_write_ar_hdr): Use the new function.
564 (bfd_ar_hdr_from_filesystem): Likewise.
565 (_bfd_write_archive_contents): Likewise.
566 (bsd_write_armap): Likewise.
567 (coff_write_armap): Likewise.
568 * archive64.c (bfd_elf64_archive_write_armap): Likewise.
569 * bfdio.c (bfd_bread): Use correct type for archive element
570 sizes.
571 * ar.c (open_inarch): Likewise.
572 (extract_file): Likewise.
573 * libbfd-in.h (struct areltdata): Use correct types for
574 parsed_size and extra_size fields.
575 Prototype _bfd_ar_sizepad function.
576 * libbfd.h: Regenerate.
577
578 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
579
580 * elf.c (elfcore_write_prpsinfo): Provide unconditionally.
581 Return NULL if core file generation is unsupported.
582 (elfcore_write_prstatus): Likewise.
583 * elf32-arm.c (elf32_arm_nabi_write_core_note): New function.
584 (elf_backend_write_core_note): Define.
585
586 2012-01-19 Tristan Gingold <gingold@adacore.com>
587
588 * pef.c: Add a comment.
589 * xsym.c: Likewise.
590
591 2012-01-17 Alan Modra <amodra@gmail.com>
592
593 * elf32-ppc.c (ppc_elf_write_core_note <NT_PRPSINFO>): Don't leave
594 trailing garbage in the note.
595 * elf64-ppc.c (ppc64_elf_write_core_note <NT_PRPSINFO>): Likewise.
596
597 2012-01-16 Daniel Green <venix1@gmail.com>
598
599 PR ld/13491
600 * coff-i386.c (coff_i386_rtype_to_howto <R_SECREL32>): Test
601 h->root.type not h->type.
602 * coff-x86_64.c (coff_amd64_rtype_to_howto <R_AMD64_SECREL>): Likewise.
603
604 2012-01-13 Iain Sandoe <idsandoe@googlemail.com>
605
606 * mach-o.c (bfd_mach_o_build_dysymtab_command): Handle absolute
607 indirect symbols.
608
609 2012-01-13 Iain Sandoe <idsandoe@googlemail.com>
610
611 * mach-o.c (bfd_mach_o_write_relocs): Move computation of relocs file
612 position from here... to (bfd_mach_o_build_seg_command): Here.
613
614 2012-01-12 Iain Sandoe <idsandoe@googlemail.com>
615
616 * mach-o.c (bfd_mach_o_count_indirect_symbols): New.
617 (bfd_mach_o_build_dysymtab_command): Populate indirect symbol table.
618 * mach-o.h (bfd_mach_o_asymbol): Move declaration to start of the
619 file. (bfd_mach_o_section): Add indirect_syms field.
620
621 2012-01-11 Iain Sandoe <idsandoe@googlemail.com>
622
623 * mach-o.c (bfd_mach_o_build_seg_command): Separate computation of
624 vmsize from filesize. Don't compute offsets or file sizes for
625 zerofill sections.
626
627 2012-01-11 Iain Sandoe <idsandoe@googlemail.com>
628
629 * mach-o.c (bfd_mach_o_build_commands): Make the building of each
630 command type independent.
631
632 2012-01-11 Alan Modra <amodra@gmail.com>
633
634 * elf64-ppc.c: Define more insns used in plt call stubs.
635 (ppc64_elf_brtaken_reloc): Assume isa version 2 or above.
636 (ppc64_elf_relocate_section): Likewise.
637 (enum ppc_stub_type): Add ppc_stub_plt_call_r2save.
638 (struct ppc_link_hash_table): Increase size of stub_count array.
639 Add plt_stub_align and plt_thread_safe.
640 (ALWAYS_USE_FAKE_DEP, ALWAYS_EMIT_R2SAVE): Define.
641 (plt_stub_size, plt_stub_pad): New functions.
642 (build_plt_stub): Emit barriers for power7 thread safety. Don't
643 emit needless save of r2.
644 (build_tls_get_addr_stub): Adjust params.
645 (ppc_build_one_stub): Handle ppc_stub_plt_call_r2save and aligning
646 plt stubs. Adjust build_*plt_stub calls.
647 (ppc_size_one_stub): Similarly.
648 (ppc64_elf_size_stubs): Accept plt_thread_safe and plt_stub_align
649 params. Choose default for plt_thread_safe based on existence of
650 calls to thread creation functions. Modify plt_call to
651 plt_call_r2save when no tocsave reloc found. Align tail of stub
652 sections.
653 (ppc64_elf_build_stubs): Align tail of stub sections. Adjust
654 output of stub statistics.
655 (ppc64_elf_relocate_section): Handle ppc_stub_plt_call_r2save.
656 * elf64-ppc.h (ppc64_elf_size_stubs): Update prototype.
657
658 2012-01-10 H.J. Lu <hongjiu.lu@intel.com>
659
660 PR ld/13581
661 * elf64-x86-64.c (elf_x86_64_relocate_section): Remove ABI_64_P
662 check on R_X86_64_PCXX.
663
664 2012-01-10 Tristan Gingold <gingold@adacore.com>
665
666 * mach-o.c (bfd_mach_o_build_commands): Avoid uninitialized false
667 warning.
668
669 2012-01-10 Tristan Gingold <gingold@adacore.com>
670
671 * bfdio.c (bfd_tell): Handle nested archives.
672 (bfd_seek): Ditto.
673 * cache.c (bfd_cache_lookup_worker): Ditto.
674 * archive.c (_bfd_get_elt_at_filepos): Remove code dealing with
675 nested archives.
676 (bfd_generic_openr_next_archived_file): Likewise.
677
678 2012-01-09 Iain Sandoe <idsandoe@googlemail.com>
679
680 * mach-o.c (bfd_mach_o_bfd_copy_private_symbol_data): Implement.
681 (bfd_mach_o_write_symtab): Remove handling for indirect syms.
682 (bfd_mach_o_primary_symbol_sort_key): Likewise.
683 (bfd_mach_o_cf_symbols): Likewise.
684 (bfd_mach_o_sort_symbol_table): Remove.
685 (bfd_mach_o_mangle_symbols): Adjust arguments, remove handling
686 for indirect and dysymtab counts. Do the symbol sorting here.
687 (bfd_mach_o_build_dysymtab_command): Count the symbol types here.
688 Make the indirect symbols a TODO.
689 (bfd_mach_o_build_commands): Adjust call to bfd_mach_o_mangle_symbols.
690 (bfd_mach_o_make_empty_symbol): Specifically flag unset symbols with
691 a non-zero value.
692 (bfd_mach_o_read_symtab_symbol): Record the symbol index.
693 (bfd_mach_o_read_symtab_symbol): Adjust recording of global status.
694 * mach-o.h (mach_o_data_struct): Remove indirect and dysymtab entries.
695 (IS_MACHO_INDIRECT): Remove.
696 (SYM_MACHO_FIELDS_UNSET, SYM_MACHO_FIELDS_NOT_VALIDATED): New.
697
698 2012-01-06 Nick Clifton <nickc@redhat.com>
699
700 PR binutils/13121
701 * reloc.c (bfd_generic_lookup_section_flags): Rename 'finfo' to
702 'flaginfo' to avoid conflicts with AIX system headers.
703
704 2012-01-06 Tristan Gingold <gingold@adacore.com>
705
706 * bfdio.c (bfd_bread): Use arelt_size macro.
707
708 2012-01-06 Tristan Gingold <gingold@adacore.com>
709
710 * config.bfd (i[3-7]86-*-darwin*): Define targ64_selvecs.
711
712 2012-01-05 Nick Clifton <nickc@redhat.com>
713
714 PR ld/12161
715 * elf32-avr.c (elf32_avr_relax_delete_bytes): Read in relocs if
716 necessary.
717
718 2012-01-05 Jan Kratochvil <jan.kratochvil@redhat.com>
719
720 Fix zero registers core files when built by gcc-4.7.
721 * elf64-x86-64.c (elf_x86_64_write_core_note): Remove variables p and
722 size. Call elfcore_write_note for the local variables. Remove the
723 final elfcore_write_note call. Add NOTREACHED comments.
724
725 2012-01-04 Tristan Gingold <gingold@adacore.com>
726
727 * mach-o.c (bfd_mach_o_fat_stat_arch_elt): New function.
728 (bfd_mach_o_generic_stat_arch_elt): Adjust.
729
730 2012-01-04 Tristan Gingold <gingold@adacore.com>
731
732 * mach-o.c (bfd_mach_o_fat_member_init): New function.
733 (bfd_mach_o_openr_next_archived_file): Reindent.
734 Adjust to call bfd_mach_o_fat_member_init.
735 (bfd_mach_o_fat_extract): Adjust to call bfd_mach_o_fat_member_init.
736
737 2012-01-04 Tristan Gingold <gingold@adacore.com>
738
739 * mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Handle
740 BFD_RELOC_32, BFD_RELOC_MACH_O_X86_64_PCREL32_1,
741 BFD_RELOC_MACH_O_X86_64_PCREL32_2,
742 BFD_RELOC_MACH_O_X86_64_PCREL32_4,
743 BFD_RELOC_MACH_O_X86_64_BRANCH32,
744 BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32,
745 BFD_RELOC_MACH_O_X86_64_GOT.
746
747 2012-01-04 Tristan Gingold <gingold@adacore.com>
748
749 * mach-o.h (bfd_mach_o_fvmlib_command): New structure.
750 (bfd_mach_o_load_command): Add fvmlib field.
751
752 * mach-o.c (bfd_mach_o_read_fvmlib): New function.
753 (bfd_mach_o_read_command): Handle fvmlib.
754
755 2012-01-04 Tristan Gingold <gingold@adacore.com>
756
757 * mach-o.c (bfd_mach_o_convert_architecture): Reindent.
758 Decode msubtype for ARM.
759
760 2012-01-04 Tristan Gingold <gingold@adacore.com>
761
762 * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add comments.
763
764 2012-01-04 Tristan Gingold <gingold@adacore.com>
765
766 * mach-o.h: Reindent header.
767 (bfd_mach_o_encryption_info_command): New structure.
768 (bfd_mach_o_load_command): Add encryption_info field.
769
770 * mach-o.c (bfd_mach_o_read_encryption_info): New function.
771 (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_ENCRYPTION_INFO.
772 (bfd_mach_o_read_command): Adjust error message.
773
774 2012-01-04 Shinichiro Hamaji <shinichiro.hamaji@gmail.com>
775
776 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Factor out the part
777 which reads DWARF2 and stores in stash from find_line.
778 (find_line) Call _bfd_dwarf2_slurp_debug_info.
779 * libbfd-in.h (_bfd_dwarf2_slurp_debug_info): Add declaration.
780 * libbfd.h (_bfd_dwarf2_slurp_debug_info): Regenerate.
781 * mach-o.c (dsym_subdir): The name of subdir where debug
782 information may be stored.
783 (bfd_mach_o_lookup_uuid_command): New. Lookup a load command whose
784 type is UUID.
785 (bfd_mach_o_dsym_for_uuid_p): New. Check if the specified BFD is
786 corresponding to the executable.
787 (bfd_mach_o_find_dsym): New. Find a debug information BFD in the
788 specified binary file.
789 (bfd_mach_o_follow_dsym): New. Find a debug information BFD for
790 the original BFD.
791 (bfd_mach_o_find_nearest_line): Check dSYM files for Mach-O
792 executables, dylibs, and bundles.
793 (bfd_mach_o_close_and_cleanup): Clean up BFDs for the dSYM file.
794 * mach-o.h (dsym_bfd): The BFD of the dSYM file.
795
796 2012-01-03 Iain Sandoe <idsandoe@googlemail.com>
797
798 * mach-o.c (bfd_mach_o_mangle_symbols): Put in the section index
799 for stabd symbols.
800 (bfd_mach_o_primary_symbol_sort_key): Adjust for stabs.
801 (bfd_mach_o_cf_symbols): Likewise.
802
803 2012-01-03 Iain Sandoe <idsandoe@googlemail.com>
804
805 * mach-o.c (bfd_mach_o_mangle_symbols): Correct typo.
806
807 2012-01-03 Iain Sandoe <idsandoe@googlemail.com>
808
809 * mach-o.c (bfd_mach_o_write_symtab): Fill in the string table index
810 as the value of an indirect symbol. Keep the string table index in
811 non-indirect syms for reference.
812 (bfd_mach_o_write_dysymtab): New.
813 (bfd_mach_o_primary_symbol_sort_key): New.
814 (bfd_mach_o_cf_symbols): New.
815 (bfd_mach_o_sort_symbol_table): New.
816 (bfd_mach_o_mangle_symbols): Return early if no symbols. Sort symbols.
817 If we are emitting a dysymtab, process indirect symbols and count the
818 number of each other kind.
819 (bfd_mach_o_mangle_sections): New.
820 (bfd_mach_o_write_contents): Split out some pre-requisite code into
821 the command builder. Write dysymtab if the command is present.
822 (bfd_mach_o_count_sections_for_seg): New.
823 (bfd_mach_o_build_seg_command): New.
824 (bfd_mach_o_build_dysymtab_command): New.
825 (bfd_mach_o_build_commands): Reorganize to support the fact that some
826 commands are optional and should not be emitted if there are no
827 sections or symbols.
828 (bfd_mach_o_set_section_contents): Amend comment.
829 * mach-o.h: Amend and add to comments.
830 (mach_o_data_struct): Add fields for dysymtab symbols counts and a
831 pointer to the indirects, when present.
832 (bfd_mach_o_should_emit_dysymtab): New macro.
833 (IS_MACHO_INDIRECT): Likewise.
834
835 For older changes see ChangeLog-2011
836 \f
837 Local Variables:
838 mode: change-log
839 left-margin: 8
840 fill-column: 74
841 version-control: never
842 End:
This page took 0.049159 seconds and 4 git commands to generate.