Remove relocation against discarded sections for relocatable link.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2010-04-30 H.J. Lu <hongjiu.lu@intel.com>
2
3 PR ld/11542
4 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): New.
5
6 * elf32-i386.c (elf_i386_relocate_section): Use it.
7 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8
9 2010-04-30 Tristan Gingold <gingold@adacore.com>
10
11 * vms-lib.c (vms_read_block): New function.
12 (vms_traverse_index): Use vms_read_block. Handle long key names.
13
14 2010-04-30 Tristan Gingold <gingold@adacore.com>
15
16 * vms-lib.c (struct lib_tdata): Field artdata added, fields nbr_syms
17 and syms removed.
18 (struct carsym_mem): New structure.
19 (vms_add_index): New function.
20 (vms_add_indexes_from_list): New function.
21 (vms_traverse_index): Parameter carsym changed to carsym_mem.
22 Code adjusted to handle elfidx.
23 (vms_lib_read_index): Adjusted for vms_traverse_index changes.
24 Parameter NBREL is now a pointer.
25 (_bfd_vms_lib_archive_p): Adjust for above change. Handle ia64
26 archives.
27 (_bfd_vms_lib_mkarchive): Adjusted for changes in struct lib_tdata.
28 (_bfd_vms_lib_find_symbol): Ditto.
29 (vms_lib_bopen): Fix two typos: return FALSE in case of error,
30 check MHD id.
31 (_bfd_vms_lib_get_module): New function.
32 (_bfd_vms_lib_get_elt_at_index): Rewritten using the above
33 function.
34 (_bfd_vms_lib_openr_next_archived_file): Use _bfd_vms_lib_get_module.
35 (_bfd_vms_lib_generic_stat_arch_elt): Handle ia64 archives.
36 (vms_write_index): Adjust for structure renamed.
37 * vms-alpha.c (alpha_vms_link_add_archive_symbols): Adjust for
38 changes of _bfd_vms_lib_find_symbol.
39
40 2010-04-28 Kai Tietz <kai.tietz@onevision.com>
41
42 * config.bfd: Correct accidential reverted patch
43 about vax*-*-*vms*.
44
45 2010-04-27 Kai Tietz <kai.tietz@onevision.com>
46
47 * pe-x86_64.c (TARGET_UNDERSCORE): Set value dependent
48 to USE_MINGW64_LEADING_UNDERSCORES.
49 * pei-x86_64.c (TARGET_UNDERSCORE): Likewise.
50 * config.bfd: Change underscoring default for x64 mingw
51 to false.
52 * coffcode.h (coff_write_relocs): Add check that dereferenced
53 sym_ptr_ptr isn't NULL.
54 * config.in (USE_MINGW64_LEADING_UNDERSCORES): New.
55 * configure: Regenerated.
56 * configure.in: Add option '--enable-leading-mingw64-underscores'
57 and define config.in variable USE_MINGW64_LEADING_UNDERSCORES.
58
59 2010-04-27 Nick Clifton <nickc@redhat.com>
60
61 PR binutils/11512
62 * coffgen.c (coff_find_nearest_line): Incldue the section address
63 of function name symbols in address comparisons.
64
65 2010-04-27 Nick Clifton <nickc@redhat.com>
66
67 * po/fr.po: Updated French translation.
68
69 2010-04-23 Alan Modra <amodra@gmail.com>
70
71 * elf.c: Replace use of ELF_IS_SECTION_IN_SEGMENT and
72 ELF_IS_SECTION_IN_SEGMENT_FILE with ELF_SECTION_IN_SEGMENT
73 throughout file.
74 (assign_file_positions_for_load_sections): Modify section in
75 segment warning to ignore overlay vmas.
76 * elf32-spu.c (spu_elf_object_p): Replace use of
77 ELF_IS_SECTION_IN_SEGMENT_MEMORY with ELF_SECTION_IN_SEGMENT.
78
79 2010-04-22 Nick Clifton <nickc@redhat.com>
80
81 * po/bfd.pot: Updated by the Translation project.
82 * po/vi.po: Updated Vietnamese translation.
83
84 2010-04-22 Alan Modra <amodra@gmail.com>
85
86 * elf.c (assign_file_positions_for_load_sections): Revert 2008-05-29
87 change. Tidy. Don't error on sections not allocated in segment.
88
89 2010-04-15 Andrew Haley <aph@redhat.com>
90
91 * bfd-in.h (elf32_arm_fix_exidx_coverage): Add new flag:
92 merge_exidx_entries.
93 * bfd-in2.h: Likewise.
94 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Likewise. Use it to
95 control merging of exidx entries.
96
97 2010-04-20 Joseph Myers <joseph@codesourcery.com>
98
99 * elf32-tic6x.h: New.
100 * elf-bfd.h (enum elf_target_id): Define TIC6X_ELF_DATA.
101 * elf32-tic6x.c (struct elf32_tic6x_obj_tdata, elf32_tic6x_tdata,
102 elf32_tic6x_howto_table_rel, elf32_tic6x_info_to_howto_rel,
103 elf32_tic6x_set_use_rela_p, elf32_tic6x_mkobject,
104 elf32_tic6x_new_section_hook, elf32_tic6x_rel_relocation_p,
105 bfd_elf32_mkobject, bfd_elf32_new_section_hook): New.
106 (elf32_tic6x_reloc_type_lookup, elf32_tic6x_reloc_name_lookup,
107 elf32_tic6x_relocate_section): Handle REL relocations.
108 (elf_info_to_howto_rel): Define to elf32_tic6x_info_to_howto_rel.
109
110 2010-04-20 Jakub Jelinek <jakub@redhat.com>
111
112 * dwarf2.c (find_abstract_instance_name, scan_unit_for_symbols): Treat
113 DW_AT_linkage_name the same as DW_AT_MIPS_linkage_name.
114
115 2010-04-19 Nick Clifton <nickc@redhat.com>
116
117 * archive64.c (bfd_elf64_archive_slurp_armap): Remove unused
118 arhdrpos variable.
119 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add unused
120 attribute to warned variable. Remove unused val, type and type2
121 variables.
122
123 2010-04-16 Andreas Schwab <schwab@redhat.com>
124
125 * vms-alpha.c (alpha_vms_link_add_object_symbols): Avoid breaking
126 strict-aliasing rules.
127
128 2010-04-16 Tristan Gingold <gingold@adacore.com>
129
130 * vms-alpha.c (_bfd_vms_slurp_eihd): Fix typo.
131 (_bfd_vms_get_object_record): Always assume there is a pad byte
132 for alignment.
133
134 * vms-lib.c: Add a few comments.
135
136 2010-04-15 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
137
138 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Support additions to
139 attributes in v2.08 of the ABI.
140
141 2010-04-15 Alan Modra <amodra@gmail.com>
142
143 * config.bfd (vax*-*-*vms*): Delete.
144
145 2010-04-14 Tristan Gingold <gingold@adacore.com>
146
147 * Makefile.am (BFD32_BACKENDS): Remove vms-gsd.lo, vms-hdr.lo,
148 vms-tir.lo, vms.lo and add vms-alpha.lo
149 (BFD32_BACKENDS_CFILES): Remove vms-gsd.c, vms-hdr.c,
150 vms-tir.c, vms.c and add vms-alpha.c
151 * Makefile.in: Regenerate.
152 * configure.in (TDEFINES): Adjust file list for vms_alpha_vec.
153 Remove vms_vax_vec.
154 * configure: Regenerate.
155 * targets.c (vms_vax_vec): Remove the declaration.
156 (_bfd_target_vector): Remove vms_vax_vec.
157 * vms-alpha.c: New file.
158 * vms-gsd.c: Removed, rewritten in vms-alpha.c
159 * vms-hdr.c: Ditto.
160 * vms-tir.c: Ditto.
161 * vms.c: Ditto.
162 * vms-misc.c: Fix indentation and comments. Replace most of
163 #if VMS_DEBUG/vms_debug with vms_debug2.
164 (_bfd_vms_hash_newfunc): Moved to vms-alpha.c
165 (hash_string): Ditto.
166 (_bfd_vms_length_hash_symbol): Ditto.
167 (maybe_adjust_record_pointer_for_object): Ditto.
168 (_bfd_vms_get_object_record): Ditto.
169 (vms_get_remaining_object_record): Ditto.
170 (_bfd_vms_push): Ditto.
171 (_bfd_vms_pop): Ditto.
172 (_bfd_vms_get_header_values): Removed.
173 (_bfd_vms_get_first_record): Removed.
174 (vms_get_remaining_image_record): Removed.
175 (new_symbol): Removed.
176 (_bfd_vms_enter_symbol): Removed.
177 (_bfd_vms_save_sized_string): Use memcpy instead of strncpy.
178 (_bfd_vms_output_begin): Remove rechead parameter. Replace bfd
179 parameter with struct vms_rec_wr.
180 (_bfd_vms_output_push): Removed and replaced by ...
181 (_bfd_vms_output_begin_subrec): ... new function.
182 (_bfd_vms_output_alignment): Replace bfd parameter with
183 struct vms_rec_wr, and adjust.
184 (_bfd_vms_output_check): Ditto
185 (_bfd_vms_output_byte): Ditto.
186 (_bfd_vms_output_short): Ditto.
187 (_bfd_vms_output_long): Ditto.
188 (_bfd_vms_output_quad): Ditto.
189 (_bfd_vms_output_counted): Ditto.
190 (_bfd_vms_output_dump): Ditto.
191 (_bfd_vms_output_fill): Ditto.
192 (_bfd_vms_output_pop): Removed and replaced by ...
193 (_bfd_vms_output_end_subrec): ... new function.
194 (_bfd_vms_output_flush): Removed.
195 (_bfd_vms_output_align): New function.
196 (_bfd_vms_output_end): Add recwr parameter. Adjust for this new
197 parameter.
198 (vms_convert_to_var): New function imported from vms.c
199 (vms_convert_to_var_1): Ditto.
200 (vms_convert_to_var_unix_filename): Ditto.
201 (vms_get_module_name): Ditto.
202 (get_vms_time_string): Ditto.
203 (vms_time_to_time_t): Ditto.
204 (vms_rawtime_to_time_t): Ditto.
205 * vms.h: All macros for the VMS file format are now in include/vms.
206 Prototypes for vms.c, vms-gsd.c, vms-misc.c, vms-hdr.c, vms-tir.c
207 have been removed.
208 (struct vms_symbol_struct, struct stack_struct): Moved to vms-alpha.c
209 (struct fileinfo, struct srecinfo, struct lineinfo): Ditto.
210 (struct funcinfo, struct vms_private_data_struct): Ditto.
211 (struct vms_section_data_struct): Ditto.
212 (struct vms_rec_rd, stryct vms_rec_wr): New declarations.
213 (vms_get_module_name, get_vms_time_string): New declarations.
214 (vms_time_to_time_t, vms_rawtime_to_time_t): Ditto.
215 (_bfd_vms_output_begin_subrec, _bfd_vms_output_end_subrec): Ditto.
216 (_bfd_vms_save_sized_string, _bfd_vms_save_counted_string): Adjusted.
217 (_bfd_vms_output_begin, _bfd_vms_output_alignment): Ditto.
218 (_bfd_vms_output_end,_bfd_vms_output_check): Ditto.
219 (_bfd_vms_output_byte, _bfd_vms_output_short): Ditto.
220 (_bfd_vms_output_long, _bfd_vms_output_quad): Ditto.
221 (_bfd_vms_output_counted, _bfd_vms_output_dump): Ditto.
222 (_bfd_vms_output_fill): Ditto.
223 (bfd_vms_set_section_flags): Ditto.
224
225 2010-04-14 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
226
227 * elflink.c (_bfd_elf_merge_symbol): Tighten up the test for early
228 exit due to merging the same weak symbol to test that the symbols are
229 actually weak.
230
231 2010-04-13 Alan Modra <amodra@gmail.com>
232
233 * elf64-ppc.c (ppc64_elf_relocate_section): Correct NOP location
234 when optimizing high got_tlsgd/ld insns.
235
236 2010-04-10 H.J. Lu <hongjiu.lu@intel.com>
237
238 * hosts/x86-64linux.h (HAVE_PRPSINFO32_T): Undefine before
239 define.
240 (HAVE_PRSTATUS32_T): Likewise.
241
242 2010-04-10 H.J. Lu <hongjiu.lu@intel.com>
243
244 PR corefiles/11467
245 * configure.in (CORE_HEADER): New. Set to hosts/x86-64linux.h
246 for x86_64-*-linux*.
247 * config.in: Regenerated.
248 * configure: Likewise.
249
250 * elf.c: Include CORE_HEADER if it is defined.
251
252 2010-04-10 H.J. Lu <hongjiu.lu@intel.com>
253 Jan Kratochvil <jan.kratochvil@redhat.com>
254
255 * hosts/x86-64linux.h: New.
256
257 2010-04-09 Nick Clifton <nickc@redhat.com>
258
259 * aoutx.h (aout_link_input_bfd): Remove unused variable sym_count.
260 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Remove unused
261 variables htab and hdr_info and mark info parameter as unused.
262 * elf.c (prep_headers): Remove unused variable i_phdrp.
263 (_bfd_elf_write_object_contents): Remove unused variable i_ehdrp.
264 * elf32-i386.c (elf_i386_relocate_section): Mark variabled warned
265 as unused.
266 * peXXigen.c (pe_print_reloc): Remove unused variable datasize.
267 * verilog.c (verilog_write_section): Remove unused variable
268 address.
269
270 2010-04-07 Alan Modra <amodra@gmail.com>
271
272 * warning.m4 (GCC_WARN_CFLAGS): Only add -Wshadow for gcc-4 and above.
273 * configure: Regenerate.
274
275 2010-04-06 H.J. Lu <hongjiu.lu@intel.com>
276
277 PR ld/11434
278 * elf-bfd.h (SYMBOLIC_BIND): Don't bind unique symbol locally.
279
280 2010-04-06 Tristan Gingold <gingold@adacore.com>
281
282 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Fix idd flags.
283
284 2010-04-05 Jakub Jelinek <jakub@redhat.com>
285
286 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Handle CIE version 4
287 provided that it has the expected address size and zero segment
288 length.
289
290 * dwarf2.c (struct line_head): Add maximum_ops_per_insn field.
291 (struct line_info): Add op_index field, change end_sequence type to
292 unsigned char.
293 (new_line_sorts_after): For the same address compare op_index.
294 (add_line_info): Add op_index argument, store it into the structure.
295 (decode_line_info): Complain about unknown versions of .debug_line.
296 Initialize maximum_ops_per_insn. Add op_index state register and
297 track it.
298
299 2010-04-01 Nathan Sidwell <nathan@codesourcery.com>
300
301 * elf32-ppc.c (apuinfo_set): New static var.
302 (ppc_elf_begin_write_processing): Set it here, always create an
303 APUinfo section if there were any in the inputs.
304 (ppc_elf_write_section): Check apuinfo_set.
305 (ppc_elf_final_write_processing): Likewise.
306
307 2010-04-01 Tristan Gingold <gingold@adacore.com>
308
309 * vms.h: Include time.h. Add prototypes for vms_get_module_name,
310 vms_time_to_time_t and vms_rawtime_to_time_t.
311 * vms.c (vms_alpha_vec): Add archives support.
312 * vms-misc.c: Include safe-ctype.h
313 (vms_get_module_name): New function.
314 (vms_time_to_time_t, vms_rawtime_to_time_t): Ditto.
315 * vms-hdr.c (_bfd_vms_write_hdr): Put module name creation to the
316 vms_get_module_name function. Use this function.
317 * targets.c: Declare vms_lib_txt_vec. Add it to _bfd_target_vector.
318 * libbfd-in.h: Add prototype for _bfd_append_relative_path.
319 Add prototypes for vms-lib.c
320 * libbfd.h: Regenerate.
321 * configure.in (TDEFINES): Add an entry for vms_lib_txt_vec. Add
322 vms-lib.lo to vms_alpha_vec.
323 * config.bfd (targ_cpu): Add targ_selvecs for alpha*-*-*vms*.
324 * configure: Regenerate.
325 * bfd.c: Add selective_search field.
326 * bfd-in2.h: Regenerate.
327 * archive.c (append_relative_path): Rename to
328 _bfd_append_relative_path and make it public.
329 (_bfd_get_elt_at_filepos): Adjust for above renaming.
330 * Makefile.am (BFD32_BACKENDS): Add vms-lib.lo
331 (BFD32_BACKENDS_CFILES): Add vms-lib.c
332 * Makefile.in: Regenerate.
333
334 2010-04-01 Jakub Jelinek <jakub@redhat.com>
335
336 * dwarf2.c (read_attribute_value): Handle CU version 4
337 for DW_FORM_ref_addr, handle DW_FORM_sec_offset, DW_FORM_exprloc
338 and DW_FORM_flag_present. For unknown form value return NULL.
339 (scan_unit_for_symbols): For DW_AT_location handle DW_FORM_exprloc
340 like DW_FORM_block.
341 (parse_comp_unit): Allow CU version 4.
342
343 2010-04-01 Hans-Peter Nilsson <hp@axis.com>
344
345 * elf32-cris.c (cris_elf_relocate_section): Correct first argument
346 to _bfd_elf_get_dynamic_reloc_section.
347 (elf_cris_discard_excess_dso_dynamics): Ditto.
348
349 2010-03-31 Kai Tietz <kai.tietz@onevision.com>
350
351 * coff-i386.c (in_reloc_p): Check also for R_SECREL32.
352 * coff-x86_64.c (in_reloc_p): Check also for R_AMD64_SECREL.
353
354 2010-03-31 Alan Modra <amodra@gmail.com>
355
356 * elf64-ppc.c (ppc64_elf_relocate_section): Nop out optimized
357 TPREL16_HI and TPREL16_HA insns.
358
359 2010-03-31 Hans-Peter Nilsson <hp@axis.com>
360
361 PR ld/11458
362 * elf32-cris.c (elf_cris_copy_indirect_symbol): Remove invalid
363 assert of empty pcrel_relocs_copied on the direct symbol. Instead
364 of moving the list from the indirect symbol to the direct symbol,
365 merge into any existing list.
366 (cris_elf_check_relocs): Store the original section in the
367 pcrel_relocs_copied list, not the relocation section.
368 (elf_cris_discard_excess_dso_dynamics): Adjust accordingly to find
369 the relocation section, for reducing its size. Change the
370 BFD_ASSERT into a check for the section being read-only, and only
371 emit warnings and TEXTREL marker when there's an entry for a
372 read-only section.
373
374 2010-03-29 Daniel Jacobowitz <dan@codesourcery.com>
375
376 * elf32-arm.c (using_thumb_only): Handle v6-M.
377
378 2010-03-26 Alan Modra <amodra@gmail.com>
379
380 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_EMB_RELSDA>): Not pc-relative.
381 * bfd-in.h (elf_discarded_section): Clarify comment.
382 * reloc.c (struct reloc_howto_struct <pc_relative>): Likewise.
383 * bfd-in2.h: Regenerate.
384
385 2010-03-26 Matt Rice <ratmice@gmail.com>
386
387 * archive.c (_bfd_compute_and_write_armap): Allow symbols flagged
388 as unique in the armap.
389
390 2010-03-26 Alan Modra <amodra@gmail.com>
391
392 PR ld/11375
393 * elf64-ppc.c (ppc64_elf_relocate_section): Always look up a
394 possible stub on branches.
395
396 2010-03-25 Joseph Myers <joseph@codesourcery.com>
397
398 * Makefile.am (ALL_MACHINES): Add cpu-tic6x.lo.
399 (ALL_MACHINES_CFILES): Add cpu-tic6x.c.
400 (BFD32_BACKENDS): Add elf32-tic6x.lo.
401 (BFD32_BACKENDS_CFILES): Add elf32-tic6x.c.
402 * Makefile.in: Regenerate.
403 * archures.c (bfd_arch_tic6x, bfd_tic6x_arch): New.
404 (bfd_archures_list): Update.
405 * config.bfd (tic6x-*-elf): New.
406 * configure.in (bfd_elf32_tic6x_be_vec, bfd_elf32_tic6x_le_vec):
407 New.
408 * configure: Regenerate.
409 * cpu-tic6x.c, elf32-tic6x.c: New.
410 * reloc.c (BFD_RELOC_C6000_PCR_S21, BFD_RELOC_C6000_PCR_S12,
411 BFD_RELOC_C6000_PCR_S10, BFD_RELOC_C6000_PCR_S7,
412 BFD_RELOC_C6000_ABS_S16, BFD_RELOC_C6000_ABS_L16,
413 BFD_RELOC_C6000_ABS_H16, BFD_RELOC_C6000_SBR_U15_B,
414 BFD_RELOC_C6000_SBR_U15_H, BFD_RELOC_C6000_SBR_U15_W,
415 BFD_RELOC_C6000_SBR_S16, BFD_RELOC_C6000_SBR_L16_B,
416 BFD_RELOC_C6000_SBR_L16_H, BFD_RELOC_C6000_SBR_L16_W,
417 BFD_RELOC_C6000_SBR_H16_B, BFD_RELOC_C6000_SBR_H16_H,
418 BFD_RELOC_C6000_SBR_H16_W, BFD_RELOC_C6000_SBR_GOT_U15_W,
419 BFD_RELOC_C6000_SBR_GOT_L16_W, BFD_RELOC_C6000_SBR_GOT_H16_W,
420 BFD_RELOC_C6000_DSBT_INDEX, BFD_RELOC_C6000_PREL31,
421 BFD_RELOC_C6000_COPY, BFD_RELOC_C6000_ALIGN,
422 BFD_RELOC_C6000_FPHEAD, BFD_RELOC_C6000_NOCMP): New.
423 * targets.c (bfd_elf32_tic6x_be_vec, bfd_elf32_tic6x_le_vec): New.
424 (_bfd_target_vector): Update.
425 * bfd-in2.h, libbfd.h: Regenerate.
426
427 2010-03-24 H.J. Lu <hongjiu.lu@intel.com>
428
429 * aout-target.h: Update copyright year.
430 * aout-tic30.c: Likewise.
431 * coff-alpha.c: Likewise.
432 * coff-rs6000.c: Likewise.
433 * coff64-rs6000.c: Likewise.
434 * elf64-mips.c: Likewise.
435 * ieee.c: Likewise.
436 * libecoff.h: Likewise.
437 * mach-o-target.c: Likewise.
438 * mach-o.c: Likewise.
439 * oasys.c: Likewise.
440 * targets.c: Likewise.
441
442 2010-03-24 H.J. Lu <hongjiu.lu@intel.com>
443
444 * libbfd-in.h: Update copyright year.
445
446 2010-03-21 H.J. Lu <hongjiu.lu@intel.com>
447
448 PR ld/11413
449 * elflink.c (_bfd_elf_add_default_symbol): Check !executable
450 instead of shared.
451
452 2010-03-19 Jie Zhang <jie@codesourcery.com>
453
454 * elf32-arm.c (struct section_list): Remove.
455 (section_list): Remove typedef.
456 (record_section_with_arm_elf_section_data): Remove.
457 (find_arm_elf_section_entry): Remove.
458 (get_arm_elf_section_data): Use is_arm_elf.
459 (unrecord_section_with_arm_elf_section_data): Remove.
460 (elf32_arm_new_section_hook): Don't call
461 record_section_with_arm_elf_section_data.
462 (elf32_arm_write_section): Set mapcount to -1 when
463 the map has been used. Don't call
464 unrecord_section_with_arm_elf_section_data.
465 (unrecord_section_via_map_over_sections): Remove.
466 (elf32_arm_close_and_cleanup): Remove.
467 (elf32_arm_bfd_free_cached_info): Remove.
468 (bfd_elf32_close_and_cleanup): Don't define.
469 (bfd_elf32_bfd_free_cached_info): Don't define.
470
471 2010-03-18 H.J. Lu <hongjiu.lu@intel.com>
472
473 PR binutils/11396
474 * libcoff-in.h (pe_tdata): Add dont_strip_reloc.
475 * libcoff.h: Regenerated.
476
477 * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Clear F_RELFLG
478 if dont_strip_reloc is set.
479 (_bfd_XX_bfd_copy_private_bfd_data_common): Set
480 dont_strip_reloc on output if there is no .reloc and
481 IMAGE_FILE_RELOCS_STRIPPED isn't set in input.
482
483 2010-03-18 Wei Guozhi <carrot@google.com>
484
485 PR gas/11323
486 * elf32-arm.c (elf32_arm_reloc_map): Map BFD_RELOC_ARM_GOT_PREL to
487 R_ARM_GOT_PREL.
488 * reloc.c (BFD_RELOC_ARM_GOT_PREL): New ARM relocation.
489 * bfd-in2.h: Regenerate.
490 * libbfd.h: Regenerate.
491
492 2010-03-17 H.J. Lu <hongjiu.lu@intel.com>
493
494 * reloc.c (BFD_RELOC_SPU_PIC18): Removed.
495 (BFD_RELOC_SPU_STUB): Likewise.
496
497 2010-03-17 Jie Zhang <jie@codesourcery.com>
498
499 * elf.c (assign_file_positions_for_load_sections): Avoid
500 overflow.
501
502 2010-03-17 Alan Modra <amodra@gmail.com>
503
504 PR binutils/11382
505 * plugin.c (bfd_plugin_object_p): Pass iostream to fileno using
506 proper type.
507
508 2010-03-17 Alan Modra <amodra@gmail.com>
509
510 * elf32-arm.c (cortex_a8_erratum_scan): Warning fix.
511
512 2010-03-16 Alan Modra <amodra@gmail.com>
513
514 * elf64-ppc.c (struct ppc_link_hash_table): Add do_toc_opt.
515 (ppc64_elf_edit_toc): Set it here.
516 (ha_reloc_match): New function.
517 (ppc64_elf_relocate_section): Optimize bigtoc insn sequences.
518
519 2010-03-15 Alan Modra <amodra@gmail.com>
520
521 * elf64-ppc.c (ppc64_elf_has_small_toc_reloc): New function.
522 * elf64-ppc.h (ppc64_elf_has_small_toc_reloc): Declare.
523
524 2010-03-14 Alan Modra <amodra@gmail.com>
525
526 PR ld/11378
527 * elf64-ppc.h (ppc64_elf_check_init_fini): Declare.
528 * elf64-ppc.c (call_check_done): Define.
529 (ppc64_elf_add_symbol_hook): Substitute bfd_get_section_name macro.
530 (ppc64_elf_check_relocs, ppc64_elf_size_dynamic_sections): Likewise.
531 (ppc64_elf_finish_multitoc_partition): Remove unnecessary check.
532 (toc_adjusting_stub_needed): Use call_check_done rather than toc_off.
533 Simplify return logic. Iterate over all .init and .fini fragments
534 by recursion. Set makes_toc_func_call here..
535 (ppc64_elf_next_input_section): ..rather than here.
536 (check_pasted_section, ppc64_elf_check_init_fini): New functions.
537
538 2010-03-13 Alan Modra <amodra@gmail.com>
539
540 PR ld/11375
541 * elf64-ppc.c (ppc_type_of_stub): Always set *hash to the
542 function descriptor symbol if there is one, not just for plt stubs.
543 (ppc64_elf_relocate_section): Use fdh on all ppc_get_stub_entry calls.
544
545 2010-03-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
546
547 * elflink.c (bfd_elf_size_dynamic_sections): Don't emit base
548 version twice.
549 Skip it when constructing def.vd_next.
550
551 * elf32-i386.c (TARGET_LITTLE_SYM): Redefine to
552 bfd_elf32_i386_sol2_vec.
553 (TARGET_LITTLE_NAME): Redefine to elf32-i386-sol2.
554 (elf32_bed): Redefine to elf32_i386_sol2_bed.
555 (elf_backend_want_plt_sym): Redefine to 1.
556
557 * elf64-x86-64.c (TARGET_LITTLE_SYM): Redefine to
558 bfd_elf64_x86_64_sol2_vec.
559 (TARGET_LITTLE_NAME): Redefine to elf64-x86-64-sol2.
560 (elf64_bed): Redefine to elf64_x86_64_sol2_bed.
561 (elf_backend_want_plt_sym): Redefine to 1.
562
563 * config.bfd (i[3-7]86-*-solaris2*): Set targ_defvec to
564 bfd_elf32_i386_sol2_vec.
565 Replace bfd_elf64_x86_64_vec by bfd_elf64_x86_64_sol2_vec in
566 targ64_selvecs.
567 (x86_64-*-solaris2*): Set targ_defvec to bfd_elf32_i386_sol2_vec.
568 Replace bfd_elf64_x86_64_vec by bfd_elf64_x86_64_sol2_vec in
569 targ_selvecs.
570
571 * configure.in: Handle bfd_elf32_i386_sol2_vec,
572 bfd_elf64_x86_64_sol2_vec.
573 * configure: Regenerate.
574
575 * targets.c (bfd_elf32_i386_sol2_vec): Declare.
576 (bfd_elf64_x86_64_sol2_vec): Declare.
577 (_bfd_target_vector): Add bfd_elf32_i386_sol2_vec,
578 bfd_elf64_x86_64_sol2_vec.
579
580 2010-03-04 Daniel Jacobowitz <dan@codesourcery.com>
581
582 * elf32-arm.c (elf32_arm_output_arch_local_syms): Skip non-program
583 sections.
584
585 2010-03-04 Alan Modra <amodra@gmail.com>
586
587 PR 11302
588 * dwarf2.c (read_abbrevs): Return NULL on alloc failures.
589 (read_attribute_value, decode_line_info): Likewise.
590 (add_line_info, read_rangelist): Return FALSE on alloc failures.
591 (arange_add, sort_line_sequences): Likewise.
592 (find_abstract_instance_name): Handle failures from called funcs.
593 (scan_unit_for_symbols, parse_comp_unit, decode_line_info): Likewise.
594 (find_line): Realloc to a temp, and handle alloc fail.
595
596 2010-03-03 Daniel Jacobowitz <dan@codesourcery.com>
597
598 * elf32-arm.c (elf32_arm_output_arch_local_syms): Do not add
599 a mapping symbol to an empty section.
600
601 2010-03-02 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
602
603 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add a check of the
604 return value from the call to _bfd_elf_merge_object_attributes.
605
606 2010-03-02 Christophe Lyon <christophe.lyon@st.com>
607 Alan Modra <amodra@gmail.com>
608
609 * elf32-arm.c (a8_erratum_fix): Add st_type field to record the
610 destination mode of the a8 stub.
611 (elf32_arm_link_hash_table): Add top_id field.
612 (elf32_arm_link_hash_table_create): Initialize top_id.
613 (arm_type_of_stub): Update prototype, st_type can now be updated
614 by this function. Actual destination address in case of PLT is
615 computed here, to help factorizing code.
616 (elf32_arm_stub_name): Update prototype, use stub_type additional
617 parameter to build stub name.
618 (elf32_arm_get_stub_entry): Update prototype, use stub_type
619 additional parameter to build stub entry.
620 (arm_build_one_stub): Use bfd_put_16/bfd_put_32 instead of
621 put_thumb_insn/put_arm_insn as BE8 encoding is now handled later.
622 Call elf32_arm_final_link_relocate to process all in-stub
623 relocations.
624 (elf32_arm_setup_section_lists): Update top_id.
625 (cortex_a8_erratum_scan): Record stub destination mode.
626 (elf32_arm_size_stubs): Update call to arm_type_of_stub according
627 to new prototype.
628 (elf32_arm_final_link_relocate): Enable processing of in-stub
629 REL32 relocations. Rely on arm_type_of_stub to detect if a stub is
630 needed, enabling code factorization.
631 (elf32_arm_final_link): Process stub sections.
632 (elf32_arm_output_map_sym): Add entry to code/data map.
633
634 2010-03-01 David S. Miller <davem@davemloft.net>
635
636 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): When STT_GNU_IFUNC and
637 h->def_regular, set h->ref_regular.
638 (allocate_dynrelocs): Only force output of STT_GNU_IFUNC plt entries
639 and dynamic relocations if h->ref_regular.
640
641 * elfxx-sparc.c (struct elf_reloc_map): Delete.
642 (sparc_reloc_map): Delete.
643 (_bfd_sparc_elf_reloc_type_lookup): Explicitly handle each
644 relocation type in switch statements.
645
646 2010-02-25 Alan Modra <amodra@gmail.com>
647
648 PR ld/11304
649 * elf.c (_bfd_elf_init_private_section_data): Rename need_group
650 to final_link and invert. For final link allow some flags to
651 differ. Don't specially allow flags to be all zero.
652
653 2010-02-24 Alan Modra <amodra@gmail.com>
654
655 PR binutils/10858
656 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Ise
657 SYMBOL_REFERENCES_LOCAL to exclude entries from the dynamic symbol
658 table.
659
660 2010-02-23 Andrew Zabolotny <anpaza@mail.ru>
661
662 PR binutils/11297
663 * elf32-avr.c (elf_avr_howto_table): Add R_AVR_8.
664 (avr_reloc_map): Map BFD_RELOC_8 to R_AVR_8.
665
666 2010-02-22 Alan Modra <amodra@gmail.com>
667
668 * reloc.c (bfd_check_overflow): When forming addrmask, shift
669 fieldmask left by rightshift.
670 (_bfd_relocate_contents): Likewise. Use rightshift addrmask in all
671 overflow checks.
672
673 2010-02-20 H.J. Lu <hongjiu.lu@intel.com>
674
675 * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): Don't check
676 STT_GNU_IFUNC on large common symbol.
677
678 2010-02-18 H.J. Lu <hongjiu.lu@intel.com>
679
680 * elf32-i386.c (elf_i386_add_symbol_hook): Don't set
681 has_ifunc_symbols if the symbol comes from a shared library.
682 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
683 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
684 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
685 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
686 * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): Likewise.
687
688 2010-02-19 Alan Modra <amodra@gmail.com>
689
690 * elf.c (_bfd_elf_fixup_group_sections): New function, split out from..
691 (_bfd_elf_copy_private_header_data): ..here.
692 * elflink.c (_bfd_elf_size_group_sections): New function.
693 (bfd_elf_size_dynamic_sections): Call it.
694 * elf-bfd.h (_bfd_elf_size_group_sections): Declare.
695 (_bfd_elf_fixup_group_sections): Declare.
696
697 2010-02-18 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
698
699 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add support for
700 merging Tag_DIV_use, Tag_MPextension_use, and
701 Tag_MPextension_use_legacy tags.
702
703 2010-02-18 Alan Modra <amodra@gmail.com>
704
705 * elf.c (bfd_elf_set_group_contents): Revert accidental 2009-01-15
706 commit. Don't write zeros for removed group members.
707 (_bfd_elf_copy_private_header_data): Adjust size of group section
708 when group members are removed by objcopy.
709
710 2010-02-15 Dave Korn <dave.korn.cygwin@gmail.com>
711
712 PR binutils/11280
713 * configure.host (*-*-solaris2.11): Add host define to select
714 valid default code page for windres/windmc on solaris.
715
716 2010-02-15 Nick Clifton <nickc@redhat.com>
717
718 * po/vi.po: Updated Vietnamese translation.
719
720 2010-02-12 Daniel Gutson <dgutson@codesourcery.com>
721
722 * elf32-arm.c (elf32_arm_output_arch_local_syms): add
723 missing mapping symbol to data only sections.
724
725 2010-02-11 David S. Miller <davem@davemloft.net>
726
727 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): For R_SPARC_GOTDATA_OP_HIX22
728 and R_SPARC_GOTDATA_OP_LOX10, only bump the GOT refcount for global
729 symbols.
730 (_bfd_sparc_elf_gc_sweep_hook): Likewise only decrement the GOT count for
731 these relocs on global symbols.
732 (gdopoff): New.
733 (_bfd_sparc_elf_relocate_section): Perform GOTDATA optimizations on
734 local symbol references which are not STT_GNU_IFUNC. Handle
735 relocation of them like R_SPARC_HIX22 and R_SPARC_LOX10 respectively,
736 and deal with negative vs. non-negative values properly.
737
738 2010-02-09 Tristan Gingold <gingold@adacore.com>
739
740 * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Adjust addend for
741 non-external relocation.
742
743 2010-02-09 Alan Modra <amodra@gmail.com>
744
745 * elf64-ppc.c (merge_got_entries): Move earlier in file.
746 (allocate_dynrelocs): Merge got entries here if not doing multi-toc.
747 (ppc64_elf_size_dynamic_sections): Similarly merge tlsld_got.
748 (ppc64_elf_layout_multitoc): Don't resize if we have already
749 merged got entries.
750
751 2010-02-09 Michael Holzheu <holzheu@de.ibm.com>
752
753 * elf-bfd.h (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
754 elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
755 elfcore_write_s390_prefix): New.
756 * elf.c (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
757 elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
758 elfcore_write_s390_prefix): New.
759 (elfcore_grok_note): Handle NT_S390_TIMER, NT_S390_TODCMP,
760 NT_S390_TODPREG, NT_S390_CTRS and NT_S390_PREFIX.
761 (elfcore_write_register_note): Handle .reg-s390-timer,
762 .reg-s390-todcmp, .reg-s390-todpreg, .reg-s390-ctrs,
763 .reg-s390-prefix section.
764
765 2010-02-09 Alan Modra <amodra@gmail.com>
766
767 * elf64-ppc.c (struct got_entry): Make tls_type and is_indirect
768 unsigned char. Update variables and code using them throughout file.
769 (struct ppc_link_hash_entry): Likewise for tls_mask.
770
771 * elf64-ppc.c (ppc64_elf_layout_multitoc): Don't merge local got ents.
772
773 * elf64-ppc.c (has_small_toc_reloc): Don't define.
774 (makes_toc_func_call, call_check_in_progress): Shuffle flags.
775 (struct ppc64_elf_obj_tdata): Add has_small_toc_reloc. Update
776 code setting the flag.
777 (ppc64_elf_next_toc_section): Group big-toc sections in
778 0x80008000 chunks.
779
780 2010-02-08 David S. Miller <davem@davemloft.net>
781
782 * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove sgot,
783 srelgot, splt, srelplt, and sgotplt members in favor of generic copies.
784
785 * elfxx-sparc.c (create_got_section): Delete.
786 (_bfd_sparc_elf_create_dynamic_sections): Don't call, the dynamic
787 section creator does that work for us. Use ->elf.foo instead of
788 ->foo where applicable.
789 (_bfd_sparc_elf_check_relocs): Use ->elf.foo instead of ->foo
790 where applicable.
791 (allocate_dynrelocs): Likewise.
792 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
793 (_bfd_sparc_elf_relocate_section): Likewise.
794 (sparc_vxworks_build_plt_entry): Likewise.
795 (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
796 (sparc_finish_dyn): Likewise.
797 (sparc_vxworks_finish_exec_plt): Likewise.
798 (sparc_vxworks_finish_shared_plt): Likewise.
799 (_bfd_sparc_elf_finish_dynamic_sections): Likewise.
800
801 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Use the SYMBOL_*
802 macros for visibilty and locality checks.
803 (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
804 (allocate_dynrelocs): Likewise.
805 (_bfd_sparc_elf_relocate_section): Likewise.
806 (_bfd_sparc_elf_finish_dynamic_symbol):Likewise.
807
808 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove set
809 but never used local var 'dynobj'.
810
811 * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Handle
812 nocopyreloc.
813
814 * reloc.c (BFD_RELOC_SPARC_JMP_IREL): New.
815 (BFD_RELOC_SPARC_IRELATIVE): Likewise.
816 * bfd-in2.h: Regenerate.
817 * libbfd.h: Regenerate.
818
819 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add loc_hash_table
820 and loc_hash_memory.
821 (_bfd_sparc_elf_link_hash_table_free): Declare.
822 * elf32-sparc.c (elf32_sparc_add_symbol_hook): New.
823 (elf_backend_add_symbol_hook, elf_backend_post_process_headers,
824 bfd_elf32_bfd_link_hash_table_free): Define.
825 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Set
826 has_ifunc_symbols if STT_GNU_IFUNC.
827 (bfd_elf64_bfd_link_hash_table_free): Define.
828 (elf_backend_post_process_headers): Define always.
829 * elfxx-sparc.c (sparc_jmp_irel_howto, sparc_irelative_howto): New.
830 (sparc_reloc_map): Add entries for new IFUNC relocs.
831 (_bfd_sparc_elf_reloc_type_lookup): Handle new IFUNC relocs.
832 (_bfd_sparc_elf_info_to_howto_ptr): Likewise.
833 (elf_sparc_local_htab_hash, elf_sparc_local_htab_eq,
834 elf_sparc_get_local_sym_hash): New.
835 (_bfd_sparc_elf_create_dynamic_sections): Move PLT ops initialization
836 from here...
837 (_bfd_sparc_elf_link_hash_table_create): ... to here. Allocate
838 local hash table.
839 (_bfd_sparc_elf_link_hash_table_free): New.
840 (create_ifunc_sections): New.
841 (_bfd_sparc_elf_check_relocs): Unconditionally assign htab->elf.dynobj
842 and call create_ifunc_sections(). For local STT_GNU_IFUNC symbols
843 cons up a fake local hash table entry for it. Unconditionally add
844 a PLT refcount for STT_GNU_IFUNC symbols when h->def_regular. Count
845 dyn relocs for ifunc.
846 (_bfd_sparc_elf_adjust_dynamic_symbol): Handle ifunc.
847 (allocate_dynrelocs): Unconditionally emit a PLT entry when
848 STT_GNU_IFUNC and h->def_regular. Count GOT dyn relocs for ifunc.
849 (allocate_local_dynrelocs): New function.
850 (_bfd_sparc_elf_size_dynamic_sections): Invoke it over the local hash
851 table. Emit dynamic relocs to irelplt when not shared. Treat iplt
852 like splt.
853 (_bfd_sparc_elf_relocate_section): Handle ifunc relocations by hand.
854 (_bfd_sparc_elf_finish_dynamic_symbol): Adjust for non-dynamic ifunc
855 plt in iplt/irelplt.
856
857 2010-02-08 Richard Sandiford <r.sandiford@uk.ibm.com>
858
859 * xcofflink.c (_bfd_xcoff_bfd_final_link): When calculating
860 max_contents_size, only consider sections whose contents must
861 be swapped in.
862
863 2010-02-09 Alan Modra <amodra@gmail.com>
864
865 * elf64-ppc.c (allocate_dynrelocs): Remove unused got structs here..
866 (ppc64_elf_size_dynamic_sections): ..and here..
867 (merge_got_entries): ..rather than here.
868
869 2010-02-09 Alan Modra <amodra@gmail.com>
870
871 * elf64-ppc.c (struct ppc_link_hash_table): Add do_multi_toc.
872 (has_small_toc_reloc): Define.
873 (ppc64_elf_check_relocs): Set the above flags.
874 (ppc64_elf_edit_opd): Delete obfd param.
875 (ppc64_elf_tls_optimize): Likewise.
876 (ppc64_elf_edit_toc): Likewise.
877 (ppc64_elf_tls_setup): Likewise. Add no_multi_toc param.
878 * elf64-ppc.h: Update prototypes.
879
880 2010-02-08 Alan Modra <amodra@gmail.com>
881
882 * section.c (struct bfd_section): Delete has_tls_reloc,
883 has_tls_get_addr_call, has_gp_reloc, need_finalize_relax, reloc_done.
884 Add sec_flg0 thru sec_flg5.
885 (BFD_FAKE_SECTION): Update for changed flags.
886 * ecoff.c (bfd_debug_section): Likewise.
887 * elf32-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define.
888 * elf64-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define.
889 (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Update.
890 * elf32-xtensa.c (reloc_done): Define.
891 * elfxx-ia64.c (skip_relax_pass_0, skip_relax_pass_1): Update.
892 * bfd-in2.h: Regenerate.
893
894 2010-02-08 Tristan Gingold <gingold@adacore.com>
895
896 * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Set reloc.r_extern
897 for non-scattered relocations.
898
899 2010-02-08 Nathan Sidwell <nathan@codesourcery.com>
900
901 * elf32-ppc.c (ppc_elf_begin_write_processing): Allow empty
902 apuinfo sections, only scan input sections once and reuse the
903 buffer.
904
905 2010-02-08 Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
906
907 * archures.c (bfd_mach_ppc_titan): Define.
908 * bfd-in2.h: Regenerate.
909 * cpu-powerpc.c (bfd_powerpc_archs): Add titan entry.
910
911 2010-02-08 Alan Modra <amodra@gmail.com>
912
913 * elf32-ppc.c (ppc_elf_check_relocs): Remove dead ifunc code.
914
915 2010-02-05 Sterling Augustine <sterling@tensilica.com>
916
917 * elf.c (assign_file_positions_for_load_sections) Update lma of
918 section if necessary. Fixes Bugzilla 11219.
919
920 2010-02-05 H.J. Lu <hongjiu.lu@intel.com>
921
922 * elf32-i386.c: Remove trailing white spaces.
923 * elf64-x86-64.c: Likewise.
924
925 2010-02-03 Nick Clifton <nickc@redhat.com>
926
927 * elf-bfd.h (emum elf_object_id): Rename to elf_target_id. Add
928 entries for other architectures.
929 (struct elf_link_hash_table): Add hash_table_id field.
930 (elf_hash_table_id): New accessor macro.
931 * elflink.c (_bfd_elf_link_hash_table_init): Add target_id
932 parameter.
933 * elf-m10300.c (elf32_mn10300_hash_table): Check table id before
934 returning cast pointer.
935 (elf32_mn10300_link_hash_table_create): Identify new table as
936 containing MN10300 extensions.
937 (mn10300_elf_relax_section): Check pointer returned by
938 elf32_mn10300_hash_table.
939 * elf32-arm.c: Likewise, except using ARM extensions.
940 * elf32-avr.c: Likewise, except using AVR extensions.
941 * elf32-bfin.c: Likewise, except using BFIN extensions.
942 * elf32-cris.c: Likewise, except using CRIS extensions.
943 * elf32-frv.c: Likewise, except using FRV extensions.
944 * elf32-hppa.c: Likewise, except using HPPA32 extensions.
945 * elf32-i386.c: Likewise, except using I386 extensions.
946 * elf32-lm32.c: Likewise, except using LM32 extensions.
947 * elf32-m32r.c: Likewise, except using M32RM extensions.
948 * elf32-m68hc11.c: Likewise, except using M68HC11 extensions.
949 * elf32-m68hc1x.c: Likewise, except using M68HC11 extensions.
950 * elf32-m68hc1x.h: Likewise, except using M68HC11 extensions.
951 * elf32-m68k.c: Likewise, except using M68K extensions.
952 * elf32-microblaze.c: Likewise, except using MICROBLAZE extensions.
953 * elf32-ppc.c: Likewise, except using PPC32 extensions.
954 * elf32-s390.c: Likewise, except using S390 extensions.
955 * elf32-sh.c: Likewise, except using SH extensions.
956 * elf32-spu.c: Likewise, except using SPU extensions.
957 * elf32-xtensa.c: Likewise, except using XTENSA extensions.
958 * elf64-alpha.c: Likewise, except using ALPHA extensions.
959 * elf64-hppa.c: Likewise, except using HPPA64 extensions.
960 * elf64-ppc.c: Likewise, except using PPC64 extensions.
961 * elf64-s390.c: Likewise, except using S390 extensions.
962 * elf64-x86-64.c: Likewise, except using X86_64 extensions.
963 * elfxx-ia64.c: Likewise, except using IA64 extensions.
964 * elfxx-mips.c: Likewise, except using MIPS extensions.
965 * elfxx-sparc.c: Likewise, except using SPARC extensions.
966 * elfxx-sparc.h: Likewise, except using SPARC extensions.
967 * elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete
968 redundant structure.
969 (elf32_cr16_hash_table): Delete unused macro.
970 (elf32_cr16_link_hash_traverse): Delete unused macro.
971 * elf32-score.c: Likewise.
972 * elf32-score7.c: Likewise.
973 * elf32-vax.c: Likewise.
974 * elf64-sh64.c: Likewise.
975
976 2010-02-03 Alan Modra <amodra@gmail.com>
977
978 * elf64-ppc.c (struct plt_entry): Move earlier in file.
979 (struct got_entry): Likewise. Add is_indirect and got.ent fields.
980 (struct ppc64_elf_obj_tdata): Change tlsld_got to be a struct got_entry.
981 Update all uses.
982 (struct ppc_link_hash_table): Add got_reli_size and second_toc_pass.
983 Remove no_multi_toc.
984 (update_local_sym_info, ppc64_elf_check_relocs): Clear is_indirect
985 when allocating a new struct got_entry.
986 (allocate_got): New function, extracted from..
987 (allocate_dynrelocs): ..here. Abort on got entry in non-ppc64 bfd.
988 (ppc64_elf_size_dynamic_sections): Track got relocs allocated in
989 .reliplt by got_reli_size. Set owner on ppc64_tlsld_got entries.
990 (ppc64_elf_setup_section_lists): Remove output_bfd param and
991 no_multi_toc, add add_stub_section and layout_sections_again. Stash
992 new params in htab. Extract some code to..
993 (ppc64_elf_start_multitoc_partition): ..here. New function.
994 (ppc64_elf_next_toc_section): Check for linker script errors. Handle
995 second pass toc scan.
996 (merge_got_entries, merge_global_got, reallocate_got): New functions.
997 (ppc64_elf_reinit_toc): Rename to..
998 (ppc64_elf_finish_multitoc_partition): ..this.
999 (ppc64_elf_layout_multitoc): New function.
1000 (ppc64_elf_size_stubs): Delete output_bfd, add_stub_section and
1001 layout_sections_again params.
1002 (ppc64_elf_relocate_section): Handle indirect got entries.
1003 * elf64-ppc.h: Update prototypes. Declare new functions.
1004
1005 2010-02-02 H.J. Lu <hongjiu.lu@intel.com>
1006
1007 * elf-bfd.h (elfcore_write_xstatereg): New.
1008
1009 * elf.c (elfcore_grok_xstatereg): New.
1010 (elfcore_write_xstatereg): Likewise.
1011 (elfcore_grok_note): Handle NT_X86_XSTATE.
1012 (elfcore_write_register_note): Handle .reg-xstate section.
1013
1014 2010-02-01 Tristan Gingold <gingold@adacore.com>
1015
1016 * som.c (som_write_ar_hdr): Define this macro.
1017
1018 2010-01-30 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1019
1020 * elf32-hppa.c (final_link_relocate): Convert R_PARISC_TLS_GD21L,
1021 R_PARISC_TLS_LDM21L and R_PARISC_TLS_IE21L relocations that use the
1022 linkage table pointer to use the global table pointer if not doing
1023 a shared link.
1024
1025 2010-01-29 Joel Brobecker <brobecker@adacore.com>
1026
1027 * elf.c (elfcore_grok_lwpstatus): Do not overwrite the core signal
1028 if it has already been set.
1029
1030 2010-01-27 Tristan Gingold <gingold@adacore.com>
1031
1032 * vms.h: Remove trailing spaces.
1033 (struct hdr_struct): Remove unused hdr_c_cpr field.
1034 (enum file_format_enum): Add comments.
1035 * vms.c (vms_bfd_print_private_bfd_data): New function that
1036 replaces the macro.
1037 Remove trailing spaces.
1038 * vms-misc.c: Improve comments.
1039 (_bfd_vms_get_object_record): Also handle files without pads.
1040 * vms-hdr.c (_bfd_vms_write_dbg): Fix format string.
1041 * vms-gsd.c (struct flagdescstruct): Make name field const.
1042 (gsyflagdesc): Fix typo.
1043
1044 2010-01-27 Alan Modra <amodra@gmail.com>
1045
1046 PR ld/11217
1047 * elf64-ppc.c (struct ppc_link_hash_table): Add toc_bfd, toc_first_sec.
1048 (ppc64_elf_setup_section_lists): Init them.
1049 (ppc64_elf_next_toc_section): Don't partition multi-toc between .got
1050 and .toc on the same input file.
1051 (ppc64_elf_relocate_section): Correct GOT entry offset.
1052
1053 2010-01-26 Tristan Gingold <gingold@adacore.com>
1054
1055 * targets.c (BFD_JUMP_TABLE_ARCHIVE): Add initializer for write_ar_hdr.
1056 (bfd_target): Add _bfd_write_ar_hdr_fn field.
1057 * archive.c (is_bsd44_extended_name): New macro.
1058 (_bfd_generic_read_ar_hdr_mag): Use it. Add extra_size.
1059 (bfd_slurp_armap): Also check for "__.SYMDEF" as a BSD4.4 extended
1060 name.
1061 (_bfd_archive_bsd44_construct_extended_name_table): New function.
1062 (_bfd_generic_write_ar_hdr): Ditto.
1063 (_bfd_bsd44_write_ar_hdr): Ditto.
1064 (_bfd_write_archive_contents): Call _bfd_write_ar_hdr.
1065 (bsd_write_armap): Adjust firstreal computation.
1066 * libbfd-in.h (struct areltdata): Add extra_size field.
1067 (_bfd_generic_write_ar_hdr): Add prototype.
1068 (_bfd_bsd44_write_ar_hdr): Ditto.
1069 (_bfd_write_ar_hdr): Define.
1070 (_bfd_noarchive_write_ar_hdr): Ditto.
1071 (_bfd_archive_bsd_write_ar_hdr): Ditto.
1072 (_bfd_archive_coff_write_ar_hdr): Ditto.
1073 (_bfd_archive_bsd44_slurp_armap): Ditto.
1074 (_bfd_archive_bsd44_slurp_extended_name_table): Ditto.
1075 (_bfd_archive_bsd44_construct_extended_name_table): New prototype.
1076 (_bfd_archive_bsd44_truncate_arname): Ditto.
1077 (_bfd_archive_bsd44_write_armap): Ditto.
1078 (_bfd_archive_bsd44_read_ar_hdr): Ditto.
1079 (_bfd_archive_bsd44_write_ar_hdr): Ditto.
1080 (_bfd_archive_bsd44_openr_next_archived_file): Ditto.
1081 (_bfd_archive_bsd44_get_elt_at_index): Ditto.
1082 (_bfd_archive_bsd44_generic_stat_arch_elt): Ditto.
1083 (_bfd_archive_bsd44_update_armap_timestamp): Ditto.
1084 * libbfd.h: Regenerate.
1085 * oasys.c (oasys_write_ar_hdr): Define.
1086 * libecoff.h (_bfd_ecoff_write_ar_hdr): Define.
1087 * ieee.c (ieee_write_ar_hdr): Define.
1088 * elf64-mips.c (bfd_elf64_archive_write_ar_hdr): Define.
1089 * coff-rs6000.c (rs6000coff_vec): Adjust for write_ar_hdr field.
1090 (bfd_pmac_xcoff_backend_data): Ditto.
1091 * coff64-rs6000.c (rs6000coff64_vec): Ditto.
1092 (bfd_xcoff_aix5_backend_data): Ditto.
1093 * coff-alpha.c (alpha_ecoff_write_ar_hdr): Define.
1094 * aout-target.h (MY_write_ar_hdr): Define it if not defined.
1095 * aout-tic30.c (MY_write_ar_hdr): Ditto.
1096 * mach-o-target.c (TARGET_NAME): Use _bfd_archive_bsd44 archive.
1097 (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr)
1098 (bfd_mach_o_slurp_armap, bfd_mach_o_slurp_extended_name_table)
1099 (bfd_mach_o_construct_extended_name_table)
1100 (bfd_mach_o_truncate_arname, bfd_mach_o_write_armap)
1101 (bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt)
1102 (bfd_mach_o_update_armap_timestamp): Moved to mach-o.c
1103 * mach-o.c (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr)
1104 (bfd_mach_o_slurp_armap, bfd_mach_o_slurp_extended_name_table)
1105 (bfd_mach_o_construct_extended_name_table)
1106 (bfd_mach_o_truncate_arname, bfd_mach_o_write_armap)
1107 (bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt)
1108 (bfd_mach_o_update_armap_timestamp): Moved from mach-o-target.c
1109 * bfd-in2.h: Regenerate.
1110
1111 2010-01-26 Alan Modra <amodra@gmail.com>
1112 H.J. Lu <hongjiu.lu@intel.com>
1113
1114 PR ld/11218
1115 * elflink.c (elf_link_output_extsym): Do not ignore undefined
1116 symbols with ref_regular set when gc_sections is active.
1117
1118 2010-01-25 Alan Modra <amodra@gmail.com>
1119
1120 PR ld/11217
1121 * elf64-ppc.c (ppc64_elf_tls_optimize): Optimize tls sequences
1122 with relocations against undefined weak symbols.
1123 (ppc64_elf_relocate_section): Don't optimize calls to undefined
1124 weak functions if the symbol is dynamic.
1125 (ppc64_elf_relocate_section): Edit tprel tls sequences.
1126 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1127 (_bfd_elf_ppc_at_tprel_transform): New function.
1128 * bfd-in.h (_bfd_elf_ppc_at_tprel_transform): Declare.
1129 * bfd-in2.h: Regenerate.
1130
1131 2010-01-23 Richard Sandiford <r.sandiford@uk.ibm.com>
1132
1133 * coff-rs6000.c (xcoff_howto_table): Change size to 0 and bitsize to 1.
1134 (_bfd_xcoff_reloc_type_lookup): Handle BFD_RELOC_NONE.
1135 * coff64-rs6000.c (xcoff64_howto_table): Change size to 0 and
1136 bitsize to 1.
1137 (xcoff64_reloc_type_lookup): Handle BFD_RELOC_NONE.
1138
1139 2010-01-21 Nick Clifton <nickc@redhat.com>
1140
1141 * elflink.c (elf_link_add_object_symbols): Look up name of
1142 undefined symbol both before and after versioning has been
1143 applied. Do not bother with symbols that are weakly undefined.
1144
1145 2010-01-21 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1146
1147 * elf32-s390.c (elf32_s390_merge_private_bfd_data): New function.
1148 (bfd_elf32_bfd_merge_private_bfd_data): New macro definition.
1149
1150 2010-01-19 Cary Coutant <ccoutant@google.com>
1151
1152 * dwarf2.c (read_attribute_value): Add DW_FORM_ref_sig8.
1153
1154 2010-01-19 Daisuke Hatayama <d.hatayama@jp.fujitsu.com>
1155 Alan Modra <amodra@gmail.com>
1156
1157 * elfcode.h (elf_swap_ehdr_out): Handle e_phnum > 0xffff.
1158 (elf_object_p): Read e_phnum extension.
1159 (elf_write_shdrs_and_ehdr): Write e_phnum extension.
1160 * elfcore.h (elf_core_file_p): Read e_phnum extension. Sanity check
1161 that we can read last program header.
1162
1163 2010-01-19 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
1164
1165 * elf32-arm.c (elf32_arm_howto_table_1): Correct bitsize of
1166 R_ARM_THM_CALL entry.
1167 (elf32_arm_final_link_relocate): Correct calculation of
1168 reloc_signed_max when doing a R_ARM_THM_CALL, R_ARM_THM_XPC22,
1169 or R_ARM_THM_JUMP24 relocation.
1170
1171 2010-01-18 Alan Modra <amodra@gmail.com>
1172
1173 PR 11168
1174 * coffcode.h (coff_compute_section_file_positions): Move Rs6000COFF_C
1175 block past vars in COFF_IMAGE_WITH_PE block. Report error on more
1176 than 32k sections.
1177
1178 2010-01-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1179
1180 Fix compilation warning on gcc-3.4.
1181 * vms-tir.c (start_etir_record, sto_imm): Rename the prototype
1182 parameter index to sec_index according to the function definition.
1183
1184 2010-01-13 Chao-ying Fu <fu@mips.com>
1185
1186 * elfxx-mips.c (JR_TO_B_P): New define to transform JR to B.
1187 It is true for all CPUs.
1188 (jal_reloc_p): New function.
1189 (mips_elf_calculate_relocation): Rename require_jalxp to
1190 cross_mode_jump_p.
1191 Update comment for CROSS_MODE_JUMP_P.
1192 Set up cross_mode_jump_p based on the mode change.
1193 (mips_elf_perform_relocation): Rename require_jalx to cross_mode_jump_p.
1194 Update comment for CROSS_MODE_JUMP_P.
1195 Test cross_mode_jump_p and jal_reloc_p to turn jal to jalx.
1196 Use !cross_mode_jump_p to guard conversion.
1197 Convert "jr t9" to "b", if possible.
1198 (_bfd_mips_elf_relocate_section): Rename require_jalx to
1199 cross_mode_jump_p.
1200 Pass &cross_mode_jump_p to call mips_elf_calculate_relocation.
1201 Pass cross_mode_jump_p to call mips_elf_perform_relocation.
1202
1203 2010-01-13 Nick Clifton <nickc@redhat.com>
1204
1205 * cpu-m32c.c (m32c_scan): New function. Ensures that a scan for
1206 "m32c" returns the m32c arch_info_struct and not the m16c
1207 arch_info_struct.
1208 (arch_info_struct): Use the new scan function.
1209 (bfd_m32c_arch): Likewise.
1210
1211 2010-01-13 Tristan Gingold <gingold@adacore.com>
1212
1213 * config.bfd: Remove duplicated target vector for i386-*-darwin.
1214 Appends new arch instead of overriding.
1215 Use mach_o_x86_64_vec for x86_64-*-darwin.
1216 * configure.in: Add mach_o_x86_64_vec.
1217 * configure: Regenerate.
1218 * targets.c: Declare mach_o_x86_64_vec, add it to _bfd_target_vector.
1219 * Makefile.am (BFD64_BACKENDS): Add mach-o-x86-64.lo
1220 (BFD64_BACKENDS_CFILES): Add mach-o-x86-64.c
1221 * Makefile.in: Regenerate.
1222 * mach-o-x86-64.c: New file.
1223
1224 2010-01-13 Tristan Gingold <gingold@adacore.com>
1225
1226 * reloc.c: Add MACH_O_X86_64 relocations.
1227 * bfd-in2.h: Regenerate.
1228 * libbfd.h: Regenerate.
1229
1230 2010-01-13 Tristan Gingold <gingold@adacore.com>
1231
1232 * archive.c (normalize): Use lbasename.
1233 (bfd_bsd_truncate_arname): Ditto.
1234 (bfd_gnu_truncate_arname): Ditto.
1235
1236 2010-01-12 Tristan Gingold <gingold@adacore.com>
1237
1238 * makefile.vms (CFLAGS): Turns warnings into informational messages.
1239
1240 2010-01-11 Tristan Gingold <gingold@adacore.com>
1241
1242 * mach-o.h: Add x86-64 relocation types.
1243
1244 2010-01-11 Tristan Gingold <gingold@adacore.com>
1245
1246 * mach-o.h (bfd_mach_o_backend_data): Add arch field.
1247 (bfd_mach_o_set_arch_mach): New prototype.
1248 * mach-o.c (bfd_mach_o_mkobject): Define with bfd_mach_o_gen_mkobject.
1249 (bfd_mach_o_set_arch_mach): New function.
1250 (bfd_mach_o_gen_mkobject): New function.
1251 Set TARGET_ARCHITECTURE for the generic back-ends.
1252 * mach-o-target.c (bfd_mach_o_set_arch_mach): Remove define.
1253 Check that TARGET_ARCHITECTURE is defined.
1254 Add TARGET_ARCHITECTURE in TARGET_NAME_BACKEND structure.
1255 * mach-o-i386.c (TARGET_ARCHITECTURE): Define.
1256
1257 2010-01-11 Tristan Gingold <gingold@adacore.com>
1258
1259 * archive.c (bfd_slurp_armap): Also check for Mach-O sorted armap.
1260
1261 2010-01-11 Nick Clifton <nickc@redhat.com>
1262
1263 * elf32-v850.c (v850_elf_perform_relocation): Fix overflow
1264 handling of R_V850_HI16_S relocation.
1265
1266 2010-01-11 Alan Modra <amodra@gmail.com>
1267
1268 PR 11103
1269 * dwarf1.c (parse_die): Correct FORM_STRING data pointer increment.
1270
1271 2010-01-11 Alan Modra <amodra@gmail.com>
1272
1273 PR 6832
1274 * dwarf2.c (struct comp_unit): Add sec_info_ptr.
1275 (find_abstract_instance_name): Use it.
1276 (parse_comp_unit): Set it.
1277
1278 2010-01-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1279
1280 * Makefile.in: Regenerate.
1281 * configure: Regenerate.
1282
1283 2010-01-08 Tristan Gingold <gingold@adacore.com>
1284
1285 * archive.c: Remove bfd_special_undocumented_glue.
1286
1287 2010-01-08 Alan Modra <amodra@gmail.com>
1288
1289 PR ld/11133
1290 * elf32-cr16.c (elf32_cr16_gc_mark_hook): Call _bfd_elf_gc_mark_hook.
1291 * elf32-microblaze.c (microblaze_elf_gc_mark_hook): Likewise.
1292 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
1293
1294 2010-01-07 H.J. Lu <hongjiu.lu@intel.com>
1295
1296 PR ld/11138
1297 * elflink.c (elf_link_check_versioned_symbol): Don't abort if
1298 a symbol referenced by DSO is is defined in a non-shared object
1299 and forced local.
1300
1301 2010-01-07 H.J. Lu <hongjiu.lu@intel.com>
1302
1303 PR ld/11133
1304 * elflink.c (_bfd_elf_gc_mark_hook): Check section XXX for
1305 undefined __start_XXX/__stop_XXX in all input files and set
1306 SEC_KEEP.
1307
1308 2010-01-07 H.J. Lu <hongjiu.lu@intel.com>
1309
1310 PR ld/11143
1311 * elflink.c (elf_gc_sweep): Keep SHT_NOTE section.
1312
1313 2010-01-04 Daniel Gutson <dgutson@codesourcery.com>
1314
1315 * bfd.m4 (BFD_HAVE_SYS_PROCFS_TYPE): Define _STRUCTURE_PROC
1316 before including procfs.h.
1317 (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Likewise.
1318 * configure.in: Added autoconf probe for the pr_fpreg member.
1319 * configure: Regenerated.
1320 * config.in: Regenerated.
1321 * elf.c: Define _STRUCTURE_PROC before including procfs.h.
1322
1323 2010-01-04 Joel Brobecker <brobecker@adacore.com>
1324
1325 Fix -Wshadow warnings in dwarf2.c (seen on alpha-tru64).
1326 * dwarf2.c (concat_filename): Rename dirname with dir_name
1327 to void shadowing the dirname function.
1328 Rename subdirname with subdir_name to stay consistent with
1329 the new dir_name variable name.
1330
1331 2010-01-04 Edmar Wienskoski <edmar@freescale.com>
1332
1333 * archures.c: Add bfd_mach_ppc_e500mc64.
1334 * bfd-in2.h: Regenerate.
1335 * cpu-powerpc.c (bfd_powerpc_archs): Add entry for
1336 bfd_mach_ppc_e500mc64.
1337
1338 2010-01-01 Joel Brobecker <brobecker@adacore.com>
1339
1340 Fix -Wshadow warnings (seen on ppc-aix)
1341 * xcofflink.c: Replace finfo by flinfo throughout.
1342
1343 For older changes see ChangeLog-2009
1344 \f
1345 Local Variables:
1346 mode: change-log
1347 left-margin: 8
1348 fill-column: 74
1349 version-control: never
1350 End:
This page took 0.139703 seconds and 5 git commands to generate.