* elf32-h8300.c (elf_symbol_leading_char): Define.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2010-06-14 Kevin Buettner <kevinb@redhat.com>
2
3 * elf32-h8300.c (elf_symbol_leading_char): Define.
4
5 2010-06-11 Jan Kratochvil <jan.kratochvil@redhat.com>
6
7 * vms-alpha.c (_bfd_vms_write_egsd): Make sname const.
8
9 2010-06-11 Tristan Gingold <gingold@adacore.com>
10
11 * vms-alpha.c (_bfd_vms_slurp_egsd): Always set vma of absolute
12 sections to 0.
13
14 2010-06-11 Tristan Gingold <gingold@adacore.com>
15
16 * vms-alpha.c (evax_bfd_print_etir): Handle ETIR__C_STO_GBL_LW.
17
18 2010-06-11 Tristan Gingold <gingold@adacore.com>
19
20 * vms-misc.c (_bfd_vms_output_counted): Make VALUE argument const.
21 Adjust cast.
22 (_bfd_vms_output_dump): Make DATA argument const, adjust cast.
23 * vms.h (_bfd_vms_output_counted, _bfd_vms_output_dump): Adjust.
24 * vms-alpha.c (evax_section_flags): Make it const.
25 (vms_secflag_by_name): Remove unused ABFD argument.
26 Make SECTION_FLAGS and NAME arguments const. Clarify comment.
27 (vms_esecflag_by_name): Make SECTION_FLAGS and NAME arguments const.
28 (_bfd_vms_slurp_egsd): Adjust call to vms_secflag_by_name.
29 (_bfd_vms_write_egsd): Remove useless cast.
30
31 2010-06-10 Tristan Gingold <gingold@adacore.com>
32
33 * config.bfd: Remove #if/#endif so that som can be compiled on any
34 host.
35 * targets.c (_bfd_target_vector): Remove #if/#endif so that som
36 can be used on any host.
37
38 2010-06-10 Tristan Gingold <gingold@adacore.com>
39
40 * som.c: Can now be compiled on any host.
41 Include bfd headers instead of system one.
42 (som_compute_checksum): Parameter is now a pointer to a
43 som_external_header structure. Adjust.
44 (struct section_to_type): Field section is now const.
45 (R_DLT_REL, R_AUX_UNWIND, R_SEC_STMT): Removed conditional
46 definition.
47 (R_LONG_PCREL_MODE, R_N0SEL, R_N1SEL, R_LINETAB): Ditto.
48 (R_LINETAB_ESC, R_LTP_OVERRIDE, R_COMMENT): Ditto.
49 (som_swap_clock_in, som_swap_clock_out): New functions.
50 (som_swap_header_in, som_swap_header_out): Likewise.
51 (som_swap_space_dictionary_in): Likewise.
52 (som_swap_space_dictionary_out): Likewise.
53 (som_swap_subspace_dictionary_in): Likewise.
54 (som_swap_subspace_dictionary_record_out): Likewise.
55 (som_swap_aux_id_in, som_swap_aux_id_out): Likewise.
56 (som_swap_string_auxhdr_out): Likewise.
57 (som_swap_compilation_unit_out): Likewise.
58 (som_swap_exec_auxhdr_in): Likewise.
59 (som_swap_exec_auxhdr_out): Likewise.
60 (som_swap_lst_header_in): Likewise.
61 (som_object_setup): Adjust parameter type using bfd types.
62 (setup_sections): Likewise. Ditto for object file types.
63 Use intermediate variables for external representation and use the
64 swap functions to convert.
65 (som_object_p): Ditto. Remove #ifdef/#endif on always defined
66 macros.
67 (som_prep_headers): Likewise.
68 (som_write_symbol_strings): Likewise.
69 (som_begin_writing): Likewise.
70 (som_finish_writing): Likewise.
71 (som_build_and_write_symbol_table): Likewise.
72 (bfd_section_from_som_symbol): Likewise.
73 (som_slurp_symbol_table): Likewise.
74 (som_bfd_print_private_bfd_data): Likewise.
75 (bfd_som_attach_aux_hdr): Likewise. Clear the padding.
76 (bfd_som_attach_compilation_unit): Likewise.
77 (som_bfd_count_ar_symbols): Likewise.
78 (som_bfd_fill_in_ar_symbols): Likewise.
79 (som_slurp_armap): Likewise.
80 (som_bfd_ar_write_symbol_stuff): Likewise.
81 (som_write_armap): Likewise. Use _bfd_ar_spacepad instead of
82 sprintf to write header fields.
83 * som.h: Include bfd headers instead of system one.
84 (FILE_HDR_SIZE, AUX_HDR_SIZE): Removed.
85 (struct somdata): Use bfd structures instead of system ones.
86 (struct som_section_data_struct): Likewise.
87 (struct som_subspace_dictionary_record): Removed (now in
88 include/som/internal.h)
89
90 2010-06-10 Tristan Gingold <gingold@adacore.com>
91
92 * targets.c (bfd_target_list): Remove hp/ux compiler work-around
93 as bfd requires an ANSI-C compiler.
94
95 2010-06-09 Tristan Gingold <gingold@adacore.com>
96
97 * bfdio.c (bfd_bread): Fix the code to prevent reading past the
98 end of archive members.
99
100 2010-06-08 Tristan Gingold <gingold@adacore.com>
101
102 * som.c (som_bfd_free_cached_info): Do not free relocations as
103 they were allocated with bfd_zalloc.
104
105 2010-06-08 Tristan Gingold <gingold@adacore.com>
106
107 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Increment
108 for the first block.
109
110 2010-06-08 Tristan Gingold <gingold@adacore.com>
111
112 * vms-lib.c (_bfd_vms_lib_ia64_mkarchive): New function.
113 * libbfd-in.h (_bfd_vms_lib_ia64_mkarchive): Declare.
114 * libbfd.h: Regenerate.
115 * elfxx-ia64.c (bfd_elfNN_write_archive_contents): Redefine for VMS.
116 (bfd_elfNN_mkarchive): Ditto.
117
118 2010-06-02 Tristan Gingold <gingold@adacore.com>
119
120 * vms-alpha.c (alpha_vms_bfd_final_link): Fix 64bit constant.
121
122 2010-06-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
123
124 * configure: Regenerate.
125
126 2010-06-01 Tristan Gingold <gingold@adacore.com>
127
128 * vms-alpha.c (struct vms_private_data_struct): Add
129 transfer_address field. Remove unused dst_info field.
130 (alpha_vms_write_exec): Use transfer_address.
131 (_bfd_vms_write_egsd): Add a comment about LIB$INITIALIZE.
132 (alpha_vms_bfd_final_link): Set transfer_address.
133
134 2010-05-31 Tristan Gingold <gingold@adacore.com>
135
136 * vms-lib.c (credat_lo, credat_hi): New fields.
137 (vms_read_block): Adjust comments.
138 (vms_write_block): New function.
139 (_bfd_vms_lib_archive_p): Decode majorid once. Replace some
140 hard-coded values with constants. Set credat_lo and credat_hi.
141 (_bfd_vms_lib_mkarchive): Add argument kind.
142 Set ver, mhd_size and type according to kind.
143 (_bfd_vms_lib_alpha_mkarchive): New function.
144 (struct lib_index): Renamed from struct vms_index
145 (lib_index_cmp): Renamed from vms_index_cmp. Adjusted.
146 (get_idxlen): Type of idx argument adjusted. Add is_elfidx
147 argument and handle it.
148 (vms_write_index): Adjust argument idx. Handle elf indexes.
149 (_bfd_vms_lib_build_map): Adjust type of arguments modules and res.
150 (_bfd_vms_lib_write_archive_contents): Add is_elfidx variable and
151 use it. Handle elf indexes. Set credat.
152 * libbfd-in.h (_bfd_vms_lib_mkarchive): Renamed to ...
153 (_bfd_vms_lib_alpha_mkarchive): ... this.
154 * libbfd.h: Regenerated.
155 * vms-alpha.c (vms_alpha_vec): Adjust after previous renaming.
156
157 2010-05-28 Sterling Augustine <sterling@tensilica.com>
158
159 * elf32-xtensa.c (elf_xtensa_relocate_section): Add a large amount
160 of code to change the bits in the instructions to match the changes
161 in the relocations. Declare dest_addr and sym_sec to help.
162
163 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
164
165 Workaround GCC PR middle-end/4210.
166 * vms-misc.c (vms_time_t_to_vms_time): Use ternary operator for val[2]
167 and val[3].
168
169 2010-05-27 Tristan Gingold <gingold@adacore.com>
170
171 * vms-misc.c: Define __NEW_STARLET. Remove trailing spaces.
172 (VMS_TIME_FACTOR, VMS_TIME_OFFSET): New macros.
173 (vms_time_to_time_t): Use them instead of local const.
174 (vms_time_t_to_vms_time): New function.
175 (vms_get_time): Likewise.
176 (vms_raw_get_time): Likewise.
177 * vms.h (vms_time_t_to_vms_time): New declaration.
178 (vms_get_time): Likewise.
179 (vms_raw_get_time): Likewise.
180
181 2010-05-26 Tristan Gingold <gingold@adacore.com>
182
183 * vms-alpha.c: Update comments.
184 (alpha_vms_write_exec): Set lnkflags. Write the GST.
185 (alpha_vms_link_output_symbol): New function.
186 (alpha_vms_bfd_final_link): Generate the VMS symbol table.
187 Set dst_section private field.
188 (alpha_vms_bfd_final_link): Remove code that set dst_section.
189
190 2010-05-26 Tristan Gingold <gingold@adacore.com>
191
192 * bfdio.c: Declare and define _bfd_memory_iovec.
193 (bfd_bread): Move code for BFD_IN_MEMORY...
194 (bfd_bwrite): ... Ditto ...
195 (bfd_tell): ... Ditto ...
196 (bfd_flush): ... Ditto ...
197 (bfd_stat): ... Ditto ...
198 (bfd_seek): ... Ditto ...
199 (bfd_get_size): ... Ditto ...
200 (bfd_mmap): ... Ditto ...
201 (memory_bread): ... to these new functions.
202 (memory_bwrite): Ditto.
203 (memory_btell): Ditto.
204 (memory_bseek): Ditto.
205 (memory_bflush): Ditto.
206 (memory_bstat): Ditto.
207 (memory_bmmap): Ditto.
208 (memory_bclose): New function.
209 * peicode.h (pe_ILF_build_a_bfd): Use BFD_IN_MEMORY.
210 * xcofflink.c (bfd_xcoff_link_generate_rtinit): Ditto.
211 * opncls.c (bfd_close): Do not handle BFD_IN_MEMORY case.
212 (bfd_make_writable): Use _bfd_memory_iovec.
213 * elfcode.h (bfd_from_remote_memory): Use _bfd_memory_iovec.
214 * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Use
215 _bfd_memory_iovec.
216 (alpha_ecoff_openr_next_archived_file): Use proxy_origin
217 instead of origin.
218 * libbfd.h: Regenerate.
219
220 2010-05-25 Daniel Jacobowitz <dan@codesourcery.com>
221 Joseph Myers <joseph@codesourcery.com>
222 Andrew Stubbs <ams@codesourcery.com>
223
224 * config.bfd (sh-*-uclinux* | sh[12]-*-uclinux*): Add
225 bfd_elf32_shl_vec, and FDPIC vectors to targ_selvecs.
226 * configure.in: Handle FDPIC vectors.
227 * elf32-sh-relocs.h: Add FDPIC and movi20 relocations.
228 * elf32-sh.c (DEFAULT_STACK_SIZE): Define.
229 (SYMBOL_FUNCDESC_LOCAL): Define. Use it instead of
230 SYMBOL_REFERENCES_LOCAL for function descriptors.
231 (fdpic_object_p): New.
232 (sh_reloc_map): Add FDPIC and movi20 relocations.
233 (sh_elf_info_to_howto, sh_elf_relocate_section): Handle new invalid
234 range.
235 (struct elf_sh_plt_info): Add got20 and short_plt. Update all
236 definitions.
237 (FDPIC_PLT_ENTRY_SIZE, FDPIC_PLT_LAZY_OFFSET): Define.
238 (fdpic_sh_plt_entry_be, fdpic_sh_plt_entry_le, fdpic_sh_plts): New.
239 (FDPIC_SH2A_PLT_ENTRY_SIZE, FDPIC_SH2A_PLT_LAZY_OFFSET): Define.
240 (fdpic_sh2a_plt_entry_be, fdpic_sh2a_plt_entry_le)
241 (fdpic_sh2a_short_plt_be, fdpic_sh2a_short_plt_le, fdpic_sh2a_plts):
242 New.
243 (get_plt_info): Handle FDPIC.
244 (MAX_SHORT_PLT): Define.
245 (get_plt_index, get_plt_offset): Handle short_plt.
246 (union gotref): New.
247 (struct elf_sh_link_hash_entry): Add funcdesc, rename tls_type to
248 got_type and adjust all uses. Add GOT_FUNCDESC.
249 (struct sh_elf_obj_tdata): Add local_funcdesc. Rename
250 local_got_tls_type to local_got_type.
251 (sh_elf_local_got_type): Renamed from sh_elf_local_got_tls_type. All
252 users changed.
253 (sh_elf_local_funcdesc): Define.
254 (struct elf_sh_link_hash_table): Add sfuncdesc, srelfuncdesc, fdpic_p,
255 and srofixup.
256 (sh_elf_link_hash_newfunc): Initialize new fields.
257 (sh_elf_link_hash_table_create): Set fdpic_p.
258 (sh_elf_omit_section_dynsym): New.
259 (create_got_section): Create .got.funcdesc, .rela.got.funcdesc
260 and .rofixup.
261 (allocate_dynrelocs): Allocate local function descriptors and space
262 for R_SH_FUNCDESC-related relocations, and for rofixups.
263 Handle GOT_FUNCDESC. Create fixups. Handle GOT entries which
264 require function descriptors.
265 (sh_elf_always_size_sections): Handle PT_GNU_STACK and __stacksize.
266 (sh_elf_modify_program_headers): New.
267 (sh_elf_size_dynamic_sections): Allocate function descriptors for
268 local symbols. Allocate .got.funcdesc contents. Allocate rofixups.
269 Handle local GOT entries of type GOT_FUNCDESC. Create fixups for
270 local GOT entries. Ensure that FDPIC libraries always have a PLTGOT
271 entry in the .dynamic section.
272 (sh_elf_add_dyn_reloc, sh_elf_got_offset, sh_elf_initialize_funcdesc)
273 (sh_elf_add_rofixup, sh_elf_osec_to_segment)
274 (sh_elf_osec_readonly_p, install_movi20_field): New functions.
275 (sh_elf_relocate_section): Handle new relocations, R_SH_FUNCDESC,
276 R_SH_GOTFUNCDESC and R_SH_GOTOFFFUNCDESC. Use sh_elf_got_offset
277 and .got.plt throughout to find _GLOBAL_OFFSET_TABLE_. Add rofixup
278 read-only section warnings. Handle undefined weak symbols. Generate
279 fixups for R_SH_DIR32 and GOT entries. Check for cross-segment
280 relocations and clear EF_SH_PIC. Handle 20-bit relocations.
281 Always generate R_SH_DIR32 for FDPIC instead of R_SH_RELATIVE.
282 (sh_elf_gc_sweep_hook): Handle R_SH_FUNCDESC, R_SH_GOTOFF20,
283 R_SH_GOTFUNCDESC, R_SH_GOTFUNCDESC20, and R_SH_GOTOFFFUNCDESC.
284 Handle 20-bit relocations.
285 (sh_elf_copy_indirect_symbol): Copy function descriptor reference
286 counts.
287 (sh_elf_check_relocs): Handle new relocations. Make symbols
288 dynamic for FDPIC relocs. Account for rofixups. Error for FDPIC
289 symbol mismatches. Allocate a GOT for R_SH_DIR32. Allocate fixups
290 for R_SH_DIR32.
291 (sh_elf_copy_private_data): Copy PT_GNU_STACK size.
292 (sh_elf_merge_private_data): Copy initial flags. Do not clobber
293 non-mach flags. Set EF_SH_PIC for FDPIC. Reject FDPIC mismatches.
294 (sh_elf_finish_dynamic_symbol): Do not handle got_funcdesc entries
295 here. Rename sgot to sgotplt and srel to srelplt. Handle short_plt,
296 FDPIC descriptors, and got20. Create R_SH_FUNCDESC_VALUE for FDPIC.
297 Use install_movi20_field. Rename srel to srelgot. Always generate
298 R_SH_DIR32 for FDPIC instead of R_SH_RELATIVE.
299 (sh_elf_finish_dynamic_sections): Fill in the GOT pointer in rofixup.
300 Do not fill in reserved GOT entries for FDPIC. Correct DT_PLTGOT.
301 Rename sgot to sgotplt. Assert that the right number of rofixups
302 and dynamic relocations were allocated.
303 (sh_elf_use_relative_eh_frame, sh_elf_encode_eh_address): New.
304 (elf_backend_omit_section_dynsym): Use sh_elf_omit_section_dynsym.
305 (elf_backend_can_make_relative_eh_frame)
306 (elf_backend_can_make_lsda_relative_eh_frame)
307 (elf_backend_encode_eh_address): Define.
308 (TARGET_BIG_SYM, TARGET_BIG_NAME, TARGET_LITTLE_SYM)
309 (TARGET_LITTLE_NAME, elf_backend_modify_program_headers, elf32_bed):
310 Redefine for FDPIC vector.
311 * reloc.c: Add SH FDPIC and movi20 relocations.
312 * targets.c (_bfd_target_vector): Add FDPIC vectors.
313 * configure, bfd-in2.h, libbfd.h: Regenerated.
314
315 2010-05-25 Jay Krell <jay.krell@cornell.edu>
316
317 PR ld/11624
318 * archive.c (_bfd_calloc_wrapper): New function.
319 (_bfd_add_bfd_to_archive_cache): Use it.
320
321 * configure.in: Add alpha*-*-*vms* to list of natives.
322 * configure: Regenerate.
323
324 * vms-misc.c: Define globalref if necessary.
325 (vms_convert_to_var_unix_filename): Rename to
326 _bfd_vms_convert_to_var_unix_filename and export.
327 * vms.h: Add prototype for _bfd_vms_convert_to_var_unix_filename.
328 * vms-alpha.c (vms_close_and_cleanup): Update invocation of
329 vms_convert_to_var_unix_filename.
330
331 2010-05-24 Tristan Gingold <gingold@adacore.com>
332
333 * vms-alpha.c (add_symbol_entry): New function extrated from ...
334 (add_symbol): ... adjusted.
335
336 2010-05-24 Tristan Gingold <gingold@adacore.com>
337
338 * vms-alpha.c (_bfd_vms_slurp_egsd): Fix indentation.
339 (alpha_vms_write_exec): Add a comment.
340 (_bfd_vms_write_egsd): Ditto.
341 (alpha_vms_convert_symbol): Remove a blank line.
342
343 2010-05-21 Tristan Gingold <gingold@adacore.com>
344
345 * vms-alpha.c (_bfd_vms_slurp_eihs): Do not create a bfd section
346 for the GST.
347
348 2010-05-21 Tristan Gingold <gingold@adacore.com>
349
350 * vms-alpha.c (_bfd_vms_slurp_eisd): Set SEC_HAS_CONTENTS and
351 SEC_LOAD if isect has data.
352 (vms_get_symbol_info): Refine the condition for 'T' type.
353
354 2010-05-18 Tristan Gingold <gingold@adacore.com>
355
356 * vms-alpha.c (_bfd_vms_write_emh): New function.
357 (_bfd_vms_write_lmn): New function.
358 (_bfd_vms_write_eeom): Moved.
359 (hash_string): Likewise.
360 (_bfd_vms_length_hash_symbol): Likewise.
361 (_bfd_vms_write_ehdr): Code moved to _bfd_vms_write_emh
362 and _bfd_vms_write_lmn, and call these functions.
363
364 2010-05-18 Tristan Gingold <gingold@adacore.com>
365
366 * vms-alpha.c (evax_bfd_print_dst): Handle INCR_LINUM_L.
367 Add details in the messages.
368 (evax_bfd_print_image): Change message.
369
370 2010-05-18 H.J. Lu <hongjiu.lu@intel.com>
371
372 PR gas/11600
373 * elf.c (_bfd_elf_make_section_from_shdr): Handle SHF_EXCLUDE
374 (elf_fake_sections): Likewise.
375
376 * elf32-i370.c (i370_elf_section_from_shdr): Don't handle
377 SHF_EXCLUDE here.
378 * elf32-ppc.c (ppc_elf_fake_sections): Likewise.
379
380 2010-05-17 Tristan Gingold <gingold@adacore.com>
381
382 * vms-alpha.c: Include esgps.h and eidc.h.
383 (_bfd_vms_slurp_egsd): Ignore SPSC and IDC sub-records.
384 (evax_bfd_print_egsd_flags): New function, extracted from ...
385 (evax_bfd_print_egsd): ..., calls evax_bfd_print_egsd_flags. Handles
386 EGSD__C_SPSC and EGSD__C_IDC.
387
388 2010-05-14 Tristan Gingold <gingold@adacore.com>
389
390 * vms-alpha.c (alpha_vms_object_p): Accept header size of 0.
391 (_bfd_vms_get_object_record): Handle align byte only in the
392 foreign case.
393
394 2010-05-14 Tristan Gingold <gingold@adacore.com>
395
396 * vms-lib.c (_bfd_vms_lib_ia64_archive_p): New function.
397 * libbfd-in.h (_bfd_vms_lib_ia64_archive_p): Add prototype.
398 * libbfd.h: Regenerate.
399 * configure.in (havevecs): Define HAVE_all_vecs when
400 --enable-targets=all is set. Use AC_SUBST on it.
401 (tdefaults): Do not add havevecs.
402 (bfd_elf64_ia64_vms_vec): Add vms-lib.lo and vms-misc.lo
403 * configure: Regenerate.
404 * Makefile.am (HAVEVECS): New variable.
405 (INCLUDES): Add HAVEVECS.
406 * Makefile.in: Regenerate.
407 * elfxx-ia64.c (INCLUDE_IA64_VMS): New macro, defined if vms
408 target is selected. Add #ifdef/#endif around vms specific code.
409 (bfd_elfNN_archive_p, bfd_elfNN_archive_slurp_armap,
410 bfd_elfNN_archive_slurp_extended_name_table,
411 bfd_elfNN_archive_construct_extended_name_table,
412 bfd_elfNN_archive_truncate_arname,
413 bfd_elfNN_archive_write_armap,
414 bfd_elfNN_archive_read_ar_hdr,
415 bfd_elfNN_archive_write_ar_hdr,
416 bfd_elfNN_archive_openr_next_archived_file,
417 bfd_elfNN_archive_get_elt_at_index,
418 bfd_elfNN_archive_generic_stat_arch_elt,
419 bfd_elfNN_archive_update_armap_timestamp): Define to use vms archives.
420
421 2010-05-11 Jie Zhang <jie@codesourcery.com>
422
423 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Merge
424 Tag_ABI_HardFP_use correctly.
425
426 2010-05-11 Alan Modra <amodra@gmail.com>
427
428 * coffcode.h (coff_write_object_contents): Enclose all occurrences
429 of hasdebug and is_reloc_section in #ifdef COFF_IMAGE_WITH_PE.
430
431 2010-05-07 Daniel Jacobowitz <dan@codesourcery.com>
432
433 * elf32-arm.c (struct a8_erratum_reloc): Add hash member. Move
434 sym_name to improve packing.
435 (cortex_a8_erratum_scan): Check for PLT entries.
436 (elf32_arm_size_stubs): Save the target symbol for a8 relocs.
437
438 2010-05-07 Tristan Gingold <gingold@adacore.com>
439
440 * Makefile.in: Regenerate with automake 1.11.1.
441 * aclocal.m4: Ditto.
442
443 2010-05-05 Nick Clifton <nickc@redhat.com>
444
445 * po/es.po: Updated Spanish translation.
446
447 2010-05-03 Tristan Gingold <gingold@adacore.com>
448
449 * vms-lib.c (vms_lib_bopen): Fix the size threshold to read
450 selective_search flag.
451 Add comments.
452 * vms-alpha.c (alpha_vms_bfd_final_link): Create the DMT section
453 before output_has_begun is set.
454
455 2010-05-03 Tristan Gingold <gingold@adacore.com>
456
457 * vms-alpha.c: Add comments.
458 (struct vms_private_data_struct): Remove image_autoextend field.
459 (dst_check_allocation): Removed.
460 (image_write): Remove call to dst_check_allocation.
461 (vms_slurp_debug): Do not set image_autoextend. Adjust section
462 size.
463 (_bfd_vms_slurp_object_records): Remove useless new_type variable.
464 (alpha_vms_write_exec): Use dst_section to get the dst section.
465 Write the dmt section.
466 (evax_bfd_print_image): Also print the dst size in hexa. Fix typo.
467 (alpha_vms_read_sections_content): Do not set image_autoextend.
468 (alpha_vms_bfd_final_link): Generate the dst.
469
470 2010-05-03 Tristan Gingold <gingold@adacore.com>
471
472 * vms-lib.c (_bfd_vms_lib_archive_p): Adjust for a possible empty
473 next array.
474 (vms_lib_dcx): Adjust for the above change.
475
476 2010-04-30 H.J. Lu <hongjiu.lu@intel.com>
477
478 PR ld/11542
479 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): New.
480
481 * elf32-i386.c (elf_i386_relocate_section): Use it.
482 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
483
484 2010-04-30 Tristan Gingold <gingold@adacore.com>
485
486 * vms-lib.c (vms_read_block): New function.
487 (vms_traverse_index): Use vms_read_block. Handle long key names.
488
489 2010-04-30 Tristan Gingold <gingold@adacore.com>
490
491 * vms-lib.c (struct lib_tdata): Field artdata added, fields nbr_syms
492 and syms removed.
493 (struct carsym_mem): New structure.
494 (vms_add_index): New function.
495 (vms_add_indexes_from_list): New function.
496 (vms_traverse_index): Parameter carsym changed to carsym_mem.
497 Code adjusted to handle elfidx.
498 (vms_lib_read_index): Adjusted for vms_traverse_index changes.
499 Parameter NBREL is now a pointer.
500 (_bfd_vms_lib_archive_p): Adjust for above change. Handle ia64
501 archives.
502 (_bfd_vms_lib_mkarchive): Adjusted for changes in struct lib_tdata.
503 (_bfd_vms_lib_find_symbol): Ditto.
504 (vms_lib_bopen): Fix two typos: return FALSE in case of error,
505 check MHD id.
506 (_bfd_vms_lib_get_module): New function.
507 (_bfd_vms_lib_get_elt_at_index): Rewritten using the above
508 function.
509 (_bfd_vms_lib_openr_next_archived_file): Use _bfd_vms_lib_get_module.
510 (_bfd_vms_lib_generic_stat_arch_elt): Handle ia64 archives.
511 (vms_write_index): Adjust for structure renamed.
512 * vms-alpha.c (alpha_vms_link_add_archive_symbols): Adjust for
513 changes of _bfd_vms_lib_find_symbol.
514
515 2010-04-28 Kai Tietz <kai.tietz@onevision.com>
516
517 * config.bfd: Correct accidential reverted patch
518 about vax*-*-*vms*.
519
520 2010-04-27 Kai Tietz <kai.tietz@onevision.com>
521
522 * pe-x86_64.c (TARGET_UNDERSCORE): Set value dependent
523 to USE_MINGW64_LEADING_UNDERSCORES.
524 * pei-x86_64.c (TARGET_UNDERSCORE): Likewise.
525 * config.bfd: Change underscoring default for x64 mingw
526 to false.
527 * coffcode.h (coff_write_relocs): Add check that dereferenced
528 sym_ptr_ptr isn't NULL.
529 * config.in (USE_MINGW64_LEADING_UNDERSCORES): New.
530 * configure: Regenerated.
531 * configure.in: Add option '--enable-leading-mingw64-underscores'
532 and define config.in variable USE_MINGW64_LEADING_UNDERSCORES.
533
534 2010-04-27 Nick Clifton <nickc@redhat.com>
535
536 PR binutils/11512
537 * coffgen.c (coff_find_nearest_line): Incldue the section address
538 of function name symbols in address comparisons.
539
540 2010-04-27 Nick Clifton <nickc@redhat.com>
541
542 * po/fr.po: Updated French translation.
543
544 2010-04-23 Alan Modra <amodra@gmail.com>
545
546 * elf.c: Replace use of ELF_IS_SECTION_IN_SEGMENT and
547 ELF_IS_SECTION_IN_SEGMENT_FILE with ELF_SECTION_IN_SEGMENT
548 throughout file.
549 (assign_file_positions_for_load_sections): Modify section in
550 segment warning to ignore overlay vmas.
551 * elf32-spu.c (spu_elf_object_p): Replace use of
552 ELF_IS_SECTION_IN_SEGMENT_MEMORY with ELF_SECTION_IN_SEGMENT.
553
554 2010-04-22 Nick Clifton <nickc@redhat.com>
555
556 * po/bfd.pot: Updated by the Translation project.
557 * po/vi.po: Updated Vietnamese translation.
558
559 2010-04-22 Alan Modra <amodra@gmail.com>
560
561 * elf.c (assign_file_positions_for_load_sections): Revert 2008-05-29
562 change. Tidy. Don't error on sections not allocated in segment.
563
564 2010-04-15 Andrew Haley <aph@redhat.com>
565
566 * bfd-in.h (elf32_arm_fix_exidx_coverage): Add new flag:
567 merge_exidx_entries.
568 * bfd-in2.h: Likewise.
569 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Likewise. Use it to
570 control merging of exidx entries.
571
572 2010-04-20 Joseph Myers <joseph@codesourcery.com>
573
574 * elf32-tic6x.h: New.
575 * elf-bfd.h (enum elf_target_id): Define TIC6X_ELF_DATA.
576 * elf32-tic6x.c (struct elf32_tic6x_obj_tdata, elf32_tic6x_tdata,
577 elf32_tic6x_howto_table_rel, elf32_tic6x_info_to_howto_rel,
578 elf32_tic6x_set_use_rela_p, elf32_tic6x_mkobject,
579 elf32_tic6x_new_section_hook, elf32_tic6x_rel_relocation_p,
580 bfd_elf32_mkobject, bfd_elf32_new_section_hook): New.
581 (elf32_tic6x_reloc_type_lookup, elf32_tic6x_reloc_name_lookup,
582 elf32_tic6x_relocate_section): Handle REL relocations.
583 (elf_info_to_howto_rel): Define to elf32_tic6x_info_to_howto_rel.
584
585 2010-04-20 Jakub Jelinek <jakub@redhat.com>
586
587 * dwarf2.c (find_abstract_instance_name, scan_unit_for_symbols): Treat
588 DW_AT_linkage_name the same as DW_AT_MIPS_linkage_name.
589
590 2010-04-19 Nick Clifton <nickc@redhat.com>
591
592 * archive64.c (bfd_elf64_archive_slurp_armap): Remove unused
593 arhdrpos variable.
594 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add unused
595 attribute to warned variable. Remove unused val, type and type2
596 variables.
597
598 2010-04-16 Andreas Schwab <schwab@redhat.com>
599
600 * vms-alpha.c (alpha_vms_link_add_object_symbols): Avoid breaking
601 strict-aliasing rules.
602
603 2010-04-16 Tristan Gingold <gingold@adacore.com>
604
605 * vms-alpha.c (_bfd_vms_slurp_eihd): Fix typo.
606 (_bfd_vms_get_object_record): Always assume there is a pad byte
607 for alignment.
608
609 * vms-lib.c: Add a few comments.
610
611 2010-04-15 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
612
613 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Support additions to
614 attributes in v2.08 of the ABI.
615
616 2010-04-15 Alan Modra <amodra@gmail.com>
617
618 * config.bfd (vax*-*-*vms*): Delete.
619
620 2010-04-14 Tristan Gingold <gingold@adacore.com>
621
622 * Makefile.am (BFD32_BACKENDS): Remove vms-gsd.lo, vms-hdr.lo,
623 vms-tir.lo, vms.lo and add vms-alpha.lo
624 (BFD32_BACKENDS_CFILES): Remove vms-gsd.c, vms-hdr.c,
625 vms-tir.c, vms.c and add vms-alpha.c
626 * Makefile.in: Regenerate.
627 * configure.in (TDEFINES): Adjust file list for vms_alpha_vec.
628 Remove vms_vax_vec.
629 * configure: Regenerate.
630 * targets.c (vms_vax_vec): Remove the declaration.
631 (_bfd_target_vector): Remove vms_vax_vec.
632 * vms-alpha.c: New file.
633 * vms-gsd.c: Removed, rewritten in vms-alpha.c
634 * vms-hdr.c: Ditto.
635 * vms-tir.c: Ditto.
636 * vms.c: Ditto.
637 * vms-misc.c: Fix indentation and comments. Replace most of
638 #if VMS_DEBUG/vms_debug with vms_debug2.
639 (_bfd_vms_hash_newfunc): Moved to vms-alpha.c
640 (hash_string): Ditto.
641 (_bfd_vms_length_hash_symbol): Ditto.
642 (maybe_adjust_record_pointer_for_object): Ditto.
643 (_bfd_vms_get_object_record): Ditto.
644 (vms_get_remaining_object_record): Ditto.
645 (_bfd_vms_push): Ditto.
646 (_bfd_vms_pop): Ditto.
647 (_bfd_vms_get_header_values): Removed.
648 (_bfd_vms_get_first_record): Removed.
649 (vms_get_remaining_image_record): Removed.
650 (new_symbol): Removed.
651 (_bfd_vms_enter_symbol): Removed.
652 (_bfd_vms_save_sized_string): Use memcpy instead of strncpy.
653 (_bfd_vms_output_begin): Remove rechead parameter. Replace bfd
654 parameter with struct vms_rec_wr.
655 (_bfd_vms_output_push): Removed and replaced by ...
656 (_bfd_vms_output_begin_subrec): ... new function.
657 (_bfd_vms_output_alignment): Replace bfd parameter with
658 struct vms_rec_wr, and adjust.
659 (_bfd_vms_output_check): Ditto
660 (_bfd_vms_output_byte): Ditto.
661 (_bfd_vms_output_short): Ditto.
662 (_bfd_vms_output_long): Ditto.
663 (_bfd_vms_output_quad): Ditto.
664 (_bfd_vms_output_counted): Ditto.
665 (_bfd_vms_output_dump): Ditto.
666 (_bfd_vms_output_fill): Ditto.
667 (_bfd_vms_output_pop): Removed and replaced by ...
668 (_bfd_vms_output_end_subrec): ... new function.
669 (_bfd_vms_output_flush): Removed.
670 (_bfd_vms_output_align): New function.
671 (_bfd_vms_output_end): Add recwr parameter. Adjust for this new
672 parameter.
673 (vms_convert_to_var): New function imported from vms.c
674 (vms_convert_to_var_1): Ditto.
675 (vms_convert_to_var_unix_filename): Ditto.
676 (vms_get_module_name): Ditto.
677 (get_vms_time_string): Ditto.
678 (vms_time_to_time_t): Ditto.
679 (vms_rawtime_to_time_t): Ditto.
680 * vms.h: All macros for the VMS file format are now in include/vms.
681 Prototypes for vms.c, vms-gsd.c, vms-misc.c, vms-hdr.c, vms-tir.c
682 have been removed.
683 (struct vms_symbol_struct, struct stack_struct): Moved to vms-alpha.c
684 (struct fileinfo, struct srecinfo, struct lineinfo): Ditto.
685 (struct funcinfo, struct vms_private_data_struct): Ditto.
686 (struct vms_section_data_struct): Ditto.
687 (struct vms_rec_rd, stryct vms_rec_wr): New declarations.
688 (vms_get_module_name, get_vms_time_string): New declarations.
689 (vms_time_to_time_t, vms_rawtime_to_time_t): Ditto.
690 (_bfd_vms_output_begin_subrec, _bfd_vms_output_end_subrec): Ditto.
691 (_bfd_vms_save_sized_string, _bfd_vms_save_counted_string): Adjusted.
692 (_bfd_vms_output_begin, _bfd_vms_output_alignment): Ditto.
693 (_bfd_vms_output_end,_bfd_vms_output_check): Ditto.
694 (_bfd_vms_output_byte, _bfd_vms_output_short): Ditto.
695 (_bfd_vms_output_long, _bfd_vms_output_quad): Ditto.
696 (_bfd_vms_output_counted, _bfd_vms_output_dump): Ditto.
697 (_bfd_vms_output_fill): Ditto.
698 (bfd_vms_set_section_flags): Ditto.
699
700 2010-04-14 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
701
702 * elflink.c (_bfd_elf_merge_symbol): Tighten up the test for early
703 exit due to merging the same weak symbol to test that the symbols are
704 actually weak.
705
706 2010-04-13 Alan Modra <amodra@gmail.com>
707
708 * elf64-ppc.c (ppc64_elf_relocate_section): Correct NOP location
709 when optimizing high got_tlsgd/ld insns.
710
711 2010-04-10 H.J. Lu <hongjiu.lu@intel.com>
712
713 * hosts/x86-64linux.h (HAVE_PRPSINFO32_T): Undefine before
714 define.
715 (HAVE_PRSTATUS32_T): Likewise.
716
717 2010-04-10 H.J. Lu <hongjiu.lu@intel.com>
718
719 PR corefiles/11467
720 * configure.in (CORE_HEADER): New. Set to hosts/x86-64linux.h
721 for x86_64-*-linux*.
722 * config.in: Regenerated.
723 * configure: Likewise.
724
725 * elf.c: Include CORE_HEADER if it is defined.
726
727 2010-04-10 H.J. Lu <hongjiu.lu@intel.com>
728 Jan Kratochvil <jan.kratochvil@redhat.com>
729
730 * hosts/x86-64linux.h: New.
731
732 2010-04-09 Nick Clifton <nickc@redhat.com>
733
734 * aoutx.h (aout_link_input_bfd): Remove unused variable sym_count.
735 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Remove unused
736 variables htab and hdr_info and mark info parameter as unused.
737 * elf.c (prep_headers): Remove unused variable i_phdrp.
738 (_bfd_elf_write_object_contents): Remove unused variable i_ehdrp.
739 * elf32-i386.c (elf_i386_relocate_section): Mark variabled warned
740 as unused.
741 * peXXigen.c (pe_print_reloc): Remove unused variable datasize.
742 * verilog.c (verilog_write_section): Remove unused variable
743 address.
744
745 2010-04-07 Alan Modra <amodra@gmail.com>
746
747 * warning.m4 (GCC_WARN_CFLAGS): Only add -Wshadow for gcc-4 and above.
748 * configure: Regenerate.
749
750 2010-04-06 H.J. Lu <hongjiu.lu@intel.com>
751
752 PR ld/11434
753 * elf-bfd.h (SYMBOLIC_BIND): Don't bind unique symbol locally.
754
755 2010-04-06 Tristan Gingold <gingold@adacore.com>
756
757 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Fix idd flags.
758
759 2010-04-05 Jakub Jelinek <jakub@redhat.com>
760
761 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Handle CIE version 4
762 provided that it has the expected address size and zero segment
763 length.
764
765 * dwarf2.c (struct line_head): Add maximum_ops_per_insn field.
766 (struct line_info): Add op_index field, change end_sequence type to
767 unsigned char.
768 (new_line_sorts_after): For the same address compare op_index.
769 (add_line_info): Add op_index argument, store it into the structure.
770 (decode_line_info): Complain about unknown versions of .debug_line.
771 Initialize maximum_ops_per_insn. Add op_index state register and
772 track it.
773
774 2010-04-01 Nathan Sidwell <nathan@codesourcery.com>
775
776 * elf32-ppc.c (apuinfo_set): New static var.
777 (ppc_elf_begin_write_processing): Set it here, always create an
778 APUinfo section if there were any in the inputs.
779 (ppc_elf_write_section): Check apuinfo_set.
780 (ppc_elf_final_write_processing): Likewise.
781
782 2010-04-01 Tristan Gingold <gingold@adacore.com>
783
784 * vms.h: Include time.h. Add prototypes for vms_get_module_name,
785 vms_time_to_time_t and vms_rawtime_to_time_t.
786 * vms.c (vms_alpha_vec): Add archives support.
787 * vms-misc.c: Include safe-ctype.h
788 (vms_get_module_name): New function.
789 (vms_time_to_time_t, vms_rawtime_to_time_t): Ditto.
790 * vms-hdr.c (_bfd_vms_write_hdr): Put module name creation to the
791 vms_get_module_name function. Use this function.
792 * targets.c: Declare vms_lib_txt_vec. Add it to _bfd_target_vector.
793 * libbfd-in.h: Add prototype for _bfd_append_relative_path.
794 Add prototypes for vms-lib.c
795 * libbfd.h: Regenerate.
796 * configure.in (TDEFINES): Add an entry for vms_lib_txt_vec. Add
797 vms-lib.lo to vms_alpha_vec.
798 * config.bfd (targ_cpu): Add targ_selvecs for alpha*-*-*vms*.
799 * configure: Regenerate.
800 * bfd.c: Add selective_search field.
801 * bfd-in2.h: Regenerate.
802 * archive.c (append_relative_path): Rename to
803 _bfd_append_relative_path and make it public.
804 (_bfd_get_elt_at_filepos): Adjust for above renaming.
805 * Makefile.am (BFD32_BACKENDS): Add vms-lib.lo
806 (BFD32_BACKENDS_CFILES): Add vms-lib.c
807 * Makefile.in: Regenerate.
808
809 2010-04-01 Jakub Jelinek <jakub@redhat.com>
810
811 * dwarf2.c (read_attribute_value): Handle CU version 4
812 for DW_FORM_ref_addr, handle DW_FORM_sec_offset, DW_FORM_exprloc
813 and DW_FORM_flag_present. For unknown form value return NULL.
814 (scan_unit_for_symbols): For DW_AT_location handle DW_FORM_exprloc
815 like DW_FORM_block.
816 (parse_comp_unit): Allow CU version 4.
817
818 2010-04-01 Hans-Peter Nilsson <hp@axis.com>
819
820 * elf32-cris.c (cris_elf_relocate_section): Correct first argument
821 to _bfd_elf_get_dynamic_reloc_section.
822 (elf_cris_discard_excess_dso_dynamics): Ditto.
823
824 2010-03-31 Kai Tietz <kai.tietz@onevision.com>
825
826 * coff-i386.c (in_reloc_p): Check also for R_SECREL32.
827 * coff-x86_64.c (in_reloc_p): Check also for R_AMD64_SECREL.
828
829 2010-03-31 Alan Modra <amodra@gmail.com>
830
831 * elf64-ppc.c (ppc64_elf_relocate_section): Nop out optimized
832 TPREL16_HI and TPREL16_HA insns.
833
834 2010-03-31 Hans-Peter Nilsson <hp@axis.com>
835
836 PR ld/11458
837 * elf32-cris.c (elf_cris_copy_indirect_symbol): Remove invalid
838 assert of empty pcrel_relocs_copied on the direct symbol. Instead
839 of moving the list from the indirect symbol to the direct symbol,
840 merge into any existing list.
841 (cris_elf_check_relocs): Store the original section in the
842 pcrel_relocs_copied list, not the relocation section.
843 (elf_cris_discard_excess_dso_dynamics): Adjust accordingly to find
844 the relocation section, for reducing its size. Change the
845 BFD_ASSERT into a check for the section being read-only, and only
846 emit warnings and TEXTREL marker when there's an entry for a
847 read-only section.
848
849 2010-03-29 Daniel Jacobowitz <dan@codesourcery.com>
850
851 * elf32-arm.c (using_thumb_only): Handle v6-M.
852
853 2010-03-26 Alan Modra <amodra@gmail.com>
854
855 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_EMB_RELSDA>): Not pc-relative.
856 * bfd-in.h (elf_discarded_section): Clarify comment.
857 * reloc.c (struct reloc_howto_struct <pc_relative>): Likewise.
858 * bfd-in2.h: Regenerate.
859
860 2010-03-26 Matt Rice <ratmice@gmail.com>
861
862 * archive.c (_bfd_compute_and_write_armap): Allow symbols flagged
863 as unique in the armap.
864
865 2010-03-26 Alan Modra <amodra@gmail.com>
866
867 PR ld/11375
868 * elf64-ppc.c (ppc64_elf_relocate_section): Always look up a
869 possible stub on branches.
870
871 2010-03-25 Joseph Myers <joseph@codesourcery.com>
872
873 * Makefile.am (ALL_MACHINES): Add cpu-tic6x.lo.
874 (ALL_MACHINES_CFILES): Add cpu-tic6x.c.
875 (BFD32_BACKENDS): Add elf32-tic6x.lo.
876 (BFD32_BACKENDS_CFILES): Add elf32-tic6x.c.
877 * Makefile.in: Regenerate.
878 * archures.c (bfd_arch_tic6x, bfd_tic6x_arch): New.
879 (bfd_archures_list): Update.
880 * config.bfd (tic6x-*-elf): New.
881 * configure.in (bfd_elf32_tic6x_be_vec, bfd_elf32_tic6x_le_vec):
882 New.
883 * configure: Regenerate.
884 * cpu-tic6x.c, elf32-tic6x.c: New.
885 * reloc.c (BFD_RELOC_C6000_PCR_S21, BFD_RELOC_C6000_PCR_S12,
886 BFD_RELOC_C6000_PCR_S10, BFD_RELOC_C6000_PCR_S7,
887 BFD_RELOC_C6000_ABS_S16, BFD_RELOC_C6000_ABS_L16,
888 BFD_RELOC_C6000_ABS_H16, BFD_RELOC_C6000_SBR_U15_B,
889 BFD_RELOC_C6000_SBR_U15_H, BFD_RELOC_C6000_SBR_U15_W,
890 BFD_RELOC_C6000_SBR_S16, BFD_RELOC_C6000_SBR_L16_B,
891 BFD_RELOC_C6000_SBR_L16_H, BFD_RELOC_C6000_SBR_L16_W,
892 BFD_RELOC_C6000_SBR_H16_B, BFD_RELOC_C6000_SBR_H16_H,
893 BFD_RELOC_C6000_SBR_H16_W, BFD_RELOC_C6000_SBR_GOT_U15_W,
894 BFD_RELOC_C6000_SBR_GOT_L16_W, BFD_RELOC_C6000_SBR_GOT_H16_W,
895 BFD_RELOC_C6000_DSBT_INDEX, BFD_RELOC_C6000_PREL31,
896 BFD_RELOC_C6000_COPY, BFD_RELOC_C6000_ALIGN,
897 BFD_RELOC_C6000_FPHEAD, BFD_RELOC_C6000_NOCMP): New.
898 * targets.c (bfd_elf32_tic6x_be_vec, bfd_elf32_tic6x_le_vec): New.
899 (_bfd_target_vector): Update.
900 * bfd-in2.h, libbfd.h: Regenerate.
901
902 2010-03-24 H.J. Lu <hongjiu.lu@intel.com>
903
904 * aout-target.h: Update copyright year.
905 * aout-tic30.c: Likewise.
906 * coff-alpha.c: Likewise.
907 * coff-rs6000.c: Likewise.
908 * coff64-rs6000.c: Likewise.
909 * elf64-mips.c: Likewise.
910 * ieee.c: Likewise.
911 * libecoff.h: Likewise.
912 * mach-o-target.c: Likewise.
913 * mach-o.c: Likewise.
914 * oasys.c: Likewise.
915 * targets.c: Likewise.
916
917 2010-03-24 H.J. Lu <hongjiu.lu@intel.com>
918
919 * libbfd-in.h: Update copyright year.
920
921 2010-03-21 H.J. Lu <hongjiu.lu@intel.com>
922
923 PR ld/11413
924 * elflink.c (_bfd_elf_add_default_symbol): Check !executable
925 instead of shared.
926
927 2010-03-19 Jie Zhang <jie@codesourcery.com>
928
929 * elf32-arm.c (struct section_list): Remove.
930 (section_list): Remove typedef.
931 (record_section_with_arm_elf_section_data): Remove.
932 (find_arm_elf_section_entry): Remove.
933 (get_arm_elf_section_data): Use is_arm_elf.
934 (unrecord_section_with_arm_elf_section_data): Remove.
935 (elf32_arm_new_section_hook): Don't call
936 record_section_with_arm_elf_section_data.
937 (elf32_arm_write_section): Set mapcount to -1 when
938 the map has been used. Don't call
939 unrecord_section_with_arm_elf_section_data.
940 (unrecord_section_via_map_over_sections): Remove.
941 (elf32_arm_close_and_cleanup): Remove.
942 (elf32_arm_bfd_free_cached_info): Remove.
943 (bfd_elf32_close_and_cleanup): Don't define.
944 (bfd_elf32_bfd_free_cached_info): Don't define.
945
946 2010-03-18 H.J. Lu <hongjiu.lu@intel.com>
947
948 PR binutils/11396
949 * libcoff-in.h (pe_tdata): Add dont_strip_reloc.
950 * libcoff.h: Regenerated.
951
952 * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Clear F_RELFLG
953 if dont_strip_reloc is set.
954 (_bfd_XX_bfd_copy_private_bfd_data_common): Set
955 dont_strip_reloc on output if there is no .reloc and
956 IMAGE_FILE_RELOCS_STRIPPED isn't set in input.
957
958 2010-03-18 Wei Guozhi <carrot@google.com>
959
960 PR gas/11323
961 * elf32-arm.c (elf32_arm_reloc_map): Map BFD_RELOC_ARM_GOT_PREL to
962 R_ARM_GOT_PREL.
963 * reloc.c (BFD_RELOC_ARM_GOT_PREL): New ARM relocation.
964 * bfd-in2.h: Regenerate.
965 * libbfd.h: Regenerate.
966
967 2010-03-17 H.J. Lu <hongjiu.lu@intel.com>
968
969 * reloc.c (BFD_RELOC_SPU_PIC18): Removed.
970 (BFD_RELOC_SPU_STUB): Likewise.
971
972 2010-03-17 Jie Zhang <jie@codesourcery.com>
973
974 * elf.c (assign_file_positions_for_load_sections): Avoid
975 overflow.
976
977 2010-03-17 Alan Modra <amodra@gmail.com>
978
979 PR binutils/11382
980 * plugin.c (bfd_plugin_object_p): Pass iostream to fileno using
981 proper type.
982
983 2010-03-17 Alan Modra <amodra@gmail.com>
984
985 * elf32-arm.c (cortex_a8_erratum_scan): Warning fix.
986
987 2010-03-16 Alan Modra <amodra@gmail.com>
988
989 * elf64-ppc.c (struct ppc_link_hash_table): Add do_toc_opt.
990 (ppc64_elf_edit_toc): Set it here.
991 (ha_reloc_match): New function.
992 (ppc64_elf_relocate_section): Optimize bigtoc insn sequences.
993
994 2010-03-15 Alan Modra <amodra@gmail.com>
995
996 * elf64-ppc.c (ppc64_elf_has_small_toc_reloc): New function.
997 * elf64-ppc.h (ppc64_elf_has_small_toc_reloc): Declare.
998
999 2010-03-14 Alan Modra <amodra@gmail.com>
1000
1001 PR ld/11378
1002 * elf64-ppc.h (ppc64_elf_check_init_fini): Declare.
1003 * elf64-ppc.c (call_check_done): Define.
1004 (ppc64_elf_add_symbol_hook): Substitute bfd_get_section_name macro.
1005 (ppc64_elf_check_relocs, ppc64_elf_size_dynamic_sections): Likewise.
1006 (ppc64_elf_finish_multitoc_partition): Remove unnecessary check.
1007 (toc_adjusting_stub_needed): Use call_check_done rather than toc_off.
1008 Simplify return logic. Iterate over all .init and .fini fragments
1009 by recursion. Set makes_toc_func_call here..
1010 (ppc64_elf_next_input_section): ..rather than here.
1011 (check_pasted_section, ppc64_elf_check_init_fini): New functions.
1012
1013 2010-03-13 Alan Modra <amodra@gmail.com>
1014
1015 PR ld/11375
1016 * elf64-ppc.c (ppc_type_of_stub): Always set *hash to the
1017 function descriptor symbol if there is one, not just for plt stubs.
1018 (ppc64_elf_relocate_section): Use fdh on all ppc_get_stub_entry calls.
1019
1020 2010-03-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1021
1022 * elflink.c (bfd_elf_size_dynamic_sections): Don't emit base
1023 version twice.
1024 Skip it when constructing def.vd_next.
1025
1026 * elf32-i386.c (TARGET_LITTLE_SYM): Redefine to
1027 bfd_elf32_i386_sol2_vec.
1028 (TARGET_LITTLE_NAME): Redefine to elf32-i386-sol2.
1029 (elf32_bed): Redefine to elf32_i386_sol2_bed.
1030 (elf_backend_want_plt_sym): Redefine to 1.
1031
1032 * elf64-x86-64.c (TARGET_LITTLE_SYM): Redefine to
1033 bfd_elf64_x86_64_sol2_vec.
1034 (TARGET_LITTLE_NAME): Redefine to elf64-x86-64-sol2.
1035 (elf64_bed): Redefine to elf64_x86_64_sol2_bed.
1036 (elf_backend_want_plt_sym): Redefine to 1.
1037
1038 * config.bfd (i[3-7]86-*-solaris2*): Set targ_defvec to
1039 bfd_elf32_i386_sol2_vec.
1040 Replace bfd_elf64_x86_64_vec by bfd_elf64_x86_64_sol2_vec in
1041 targ64_selvecs.
1042 (x86_64-*-solaris2*): Set targ_defvec to bfd_elf32_i386_sol2_vec.
1043 Replace bfd_elf64_x86_64_vec by bfd_elf64_x86_64_sol2_vec in
1044 targ_selvecs.
1045
1046 * configure.in: Handle bfd_elf32_i386_sol2_vec,
1047 bfd_elf64_x86_64_sol2_vec.
1048 * configure: Regenerate.
1049
1050 * targets.c (bfd_elf32_i386_sol2_vec): Declare.
1051 (bfd_elf64_x86_64_sol2_vec): Declare.
1052 (_bfd_target_vector): Add bfd_elf32_i386_sol2_vec,
1053 bfd_elf64_x86_64_sol2_vec.
1054
1055 2010-03-04 Daniel Jacobowitz <dan@codesourcery.com>
1056
1057 * elf32-arm.c (elf32_arm_output_arch_local_syms): Skip non-program
1058 sections.
1059
1060 2010-03-04 Alan Modra <amodra@gmail.com>
1061
1062 PR 11302
1063 * dwarf2.c (read_abbrevs): Return NULL on alloc failures.
1064 (read_attribute_value, decode_line_info): Likewise.
1065 (add_line_info, read_rangelist): Return FALSE on alloc failures.
1066 (arange_add, sort_line_sequences): Likewise.
1067 (find_abstract_instance_name): Handle failures from called funcs.
1068 (scan_unit_for_symbols, parse_comp_unit, decode_line_info): Likewise.
1069 (find_line): Realloc to a temp, and handle alloc fail.
1070
1071 2010-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1072
1073 * elf32-arm.c (elf32_arm_output_arch_local_syms): Do not add
1074 a mapping symbol to an empty section.
1075
1076 2010-03-02 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
1077
1078 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add a check of the
1079 return value from the call to _bfd_elf_merge_object_attributes.
1080
1081 2010-03-02 Christophe Lyon <christophe.lyon@st.com>
1082 Alan Modra <amodra@gmail.com>
1083
1084 * elf32-arm.c (a8_erratum_fix): Add st_type field to record the
1085 destination mode of the a8 stub.
1086 (elf32_arm_link_hash_table): Add top_id field.
1087 (elf32_arm_link_hash_table_create): Initialize top_id.
1088 (arm_type_of_stub): Update prototype, st_type can now be updated
1089 by this function. Actual destination address in case of PLT is
1090 computed here, to help factorizing code.
1091 (elf32_arm_stub_name): Update prototype, use stub_type additional
1092 parameter to build stub name.
1093 (elf32_arm_get_stub_entry): Update prototype, use stub_type
1094 additional parameter to build stub entry.
1095 (arm_build_one_stub): Use bfd_put_16/bfd_put_32 instead of
1096 put_thumb_insn/put_arm_insn as BE8 encoding is now handled later.
1097 Call elf32_arm_final_link_relocate to process all in-stub
1098 relocations.
1099 (elf32_arm_setup_section_lists): Update top_id.
1100 (cortex_a8_erratum_scan): Record stub destination mode.
1101 (elf32_arm_size_stubs): Update call to arm_type_of_stub according
1102 to new prototype.
1103 (elf32_arm_final_link_relocate): Enable processing of in-stub
1104 REL32 relocations. Rely on arm_type_of_stub to detect if a stub is
1105 needed, enabling code factorization.
1106 (elf32_arm_final_link): Process stub sections.
1107 (elf32_arm_output_map_sym): Add entry to code/data map.
1108
1109 2010-03-01 David S. Miller <davem@davemloft.net>
1110
1111 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): When STT_GNU_IFUNC and
1112 h->def_regular, set h->ref_regular.
1113 (allocate_dynrelocs): Only force output of STT_GNU_IFUNC plt entries
1114 and dynamic relocations if h->ref_regular.
1115
1116 * elfxx-sparc.c (struct elf_reloc_map): Delete.
1117 (sparc_reloc_map): Delete.
1118 (_bfd_sparc_elf_reloc_type_lookup): Explicitly handle each
1119 relocation type in switch statements.
1120
1121 2010-02-25 Alan Modra <amodra@gmail.com>
1122
1123 PR ld/11304
1124 * elf.c (_bfd_elf_init_private_section_data): Rename need_group
1125 to final_link and invert. For final link allow some flags to
1126 differ. Don't specially allow flags to be all zero.
1127
1128 2010-02-24 Alan Modra <amodra@gmail.com>
1129
1130 PR binutils/10858
1131 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Ise
1132 SYMBOL_REFERENCES_LOCAL to exclude entries from the dynamic symbol
1133 table.
1134
1135 2010-02-23 Andrew Zabolotny <anpaza@mail.ru>
1136
1137 PR binutils/11297
1138 * elf32-avr.c (elf_avr_howto_table): Add R_AVR_8.
1139 (avr_reloc_map): Map BFD_RELOC_8 to R_AVR_8.
1140
1141 2010-02-22 Alan Modra <amodra@gmail.com>
1142
1143 * reloc.c (bfd_check_overflow): When forming addrmask, shift
1144 fieldmask left by rightshift.
1145 (_bfd_relocate_contents): Likewise. Use rightshift addrmask in all
1146 overflow checks.
1147
1148 2010-02-20 H.J. Lu <hongjiu.lu@intel.com>
1149
1150 * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): Don't check
1151 STT_GNU_IFUNC on large common symbol.
1152
1153 2010-02-18 H.J. Lu <hongjiu.lu@intel.com>
1154
1155 * elf32-i386.c (elf_i386_add_symbol_hook): Don't set
1156 has_ifunc_symbols if the symbol comes from a shared library.
1157 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
1158 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
1159 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
1160 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
1161 * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): Likewise.
1162
1163 2010-02-19 Alan Modra <amodra@gmail.com>
1164
1165 * elf.c (_bfd_elf_fixup_group_sections): New function, split out from..
1166 (_bfd_elf_copy_private_header_data): ..here.
1167 * elflink.c (_bfd_elf_size_group_sections): New function.
1168 (bfd_elf_size_dynamic_sections): Call it.
1169 * elf-bfd.h (_bfd_elf_size_group_sections): Declare.
1170 (_bfd_elf_fixup_group_sections): Declare.
1171
1172 2010-02-18 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
1173
1174 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add support for
1175 merging Tag_DIV_use, Tag_MPextension_use, and
1176 Tag_MPextension_use_legacy tags.
1177
1178 2010-02-18 Alan Modra <amodra@gmail.com>
1179
1180 * elf.c (bfd_elf_set_group_contents): Revert accidental 2009-01-15
1181 commit. Don't write zeros for removed group members.
1182 (_bfd_elf_copy_private_header_data): Adjust size of group section
1183 when group members are removed by objcopy.
1184
1185 2010-02-15 Dave Korn <dave.korn.cygwin@gmail.com>
1186
1187 PR binutils/11280
1188 * configure.host (*-*-solaris2.11): Add host define to select
1189 valid default code page for windres/windmc on solaris.
1190
1191 2010-02-15 Nick Clifton <nickc@redhat.com>
1192
1193 * po/vi.po: Updated Vietnamese translation.
1194
1195 2010-02-12 Daniel Gutson <dgutson@codesourcery.com>
1196
1197 * elf32-arm.c (elf32_arm_output_arch_local_syms): add
1198 missing mapping symbol to data only sections.
1199
1200 2010-02-11 David S. Miller <davem@davemloft.net>
1201
1202 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): For R_SPARC_GOTDATA_OP_HIX22
1203 and R_SPARC_GOTDATA_OP_LOX10, only bump the GOT refcount for global
1204 symbols.
1205 (_bfd_sparc_elf_gc_sweep_hook): Likewise only decrement the GOT count for
1206 these relocs on global symbols.
1207 (gdopoff): New.
1208 (_bfd_sparc_elf_relocate_section): Perform GOTDATA optimizations on
1209 local symbol references which are not STT_GNU_IFUNC. Handle
1210 relocation of them like R_SPARC_HIX22 and R_SPARC_LOX10 respectively,
1211 and deal with negative vs. non-negative values properly.
1212
1213 2010-02-09 Tristan Gingold <gingold@adacore.com>
1214
1215 * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Adjust addend for
1216 non-external relocation.
1217
1218 2010-02-09 Alan Modra <amodra@gmail.com>
1219
1220 * elf64-ppc.c (merge_got_entries): Move earlier in file.
1221 (allocate_dynrelocs): Merge got entries here if not doing multi-toc.
1222 (ppc64_elf_size_dynamic_sections): Similarly merge tlsld_got.
1223 (ppc64_elf_layout_multitoc): Don't resize if we have already
1224 merged got entries.
1225
1226 2010-02-09 Michael Holzheu <holzheu@de.ibm.com>
1227
1228 * elf-bfd.h (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
1229 elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
1230 elfcore_write_s390_prefix): New.
1231 * elf.c (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
1232 elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
1233 elfcore_write_s390_prefix): New.
1234 (elfcore_grok_note): Handle NT_S390_TIMER, NT_S390_TODCMP,
1235 NT_S390_TODPREG, NT_S390_CTRS and NT_S390_PREFIX.
1236 (elfcore_write_register_note): Handle .reg-s390-timer,
1237 .reg-s390-todcmp, .reg-s390-todpreg, .reg-s390-ctrs,
1238 .reg-s390-prefix section.
1239
1240 2010-02-09 Alan Modra <amodra@gmail.com>
1241
1242 * elf64-ppc.c (struct got_entry): Make tls_type and is_indirect
1243 unsigned char. Update variables and code using them throughout file.
1244 (struct ppc_link_hash_entry): Likewise for tls_mask.
1245
1246 * elf64-ppc.c (ppc64_elf_layout_multitoc): Don't merge local got ents.
1247
1248 * elf64-ppc.c (has_small_toc_reloc): Don't define.
1249 (makes_toc_func_call, call_check_in_progress): Shuffle flags.
1250 (struct ppc64_elf_obj_tdata): Add has_small_toc_reloc. Update
1251 code setting the flag.
1252 (ppc64_elf_next_toc_section): Group big-toc sections in
1253 0x80008000 chunks.
1254
1255 2010-02-08 David S. Miller <davem@davemloft.net>
1256
1257 * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove sgot,
1258 srelgot, splt, srelplt, and sgotplt members in favor of generic copies.
1259
1260 * elfxx-sparc.c (create_got_section): Delete.
1261 (_bfd_sparc_elf_create_dynamic_sections): Don't call, the dynamic
1262 section creator does that work for us. Use ->elf.foo instead of
1263 ->foo where applicable.
1264 (_bfd_sparc_elf_check_relocs): Use ->elf.foo instead of ->foo
1265 where applicable.
1266 (allocate_dynrelocs): Likewise.
1267 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
1268 (_bfd_sparc_elf_relocate_section): Likewise.
1269 (sparc_vxworks_build_plt_entry): Likewise.
1270 (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
1271 (sparc_finish_dyn): Likewise.
1272 (sparc_vxworks_finish_exec_plt): Likewise.
1273 (sparc_vxworks_finish_shared_plt): Likewise.
1274 (_bfd_sparc_elf_finish_dynamic_sections): Likewise.
1275
1276 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Use the SYMBOL_*
1277 macros for visibilty and locality checks.
1278 (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
1279 (allocate_dynrelocs): Likewise.
1280 (_bfd_sparc_elf_relocate_section): Likewise.
1281 (_bfd_sparc_elf_finish_dynamic_symbol):Likewise.
1282
1283 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove set
1284 but never used local var 'dynobj'.
1285
1286 * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Handle
1287 nocopyreloc.
1288
1289 * reloc.c (BFD_RELOC_SPARC_JMP_IREL): New.
1290 (BFD_RELOC_SPARC_IRELATIVE): Likewise.
1291 * bfd-in2.h: Regenerate.
1292 * libbfd.h: Regenerate.
1293
1294 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add loc_hash_table
1295 and loc_hash_memory.
1296 (_bfd_sparc_elf_link_hash_table_free): Declare.
1297 * elf32-sparc.c (elf32_sparc_add_symbol_hook): New.
1298 (elf_backend_add_symbol_hook, elf_backend_post_process_headers,
1299 bfd_elf32_bfd_link_hash_table_free): Define.
1300 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Set
1301 has_ifunc_symbols if STT_GNU_IFUNC.
1302 (bfd_elf64_bfd_link_hash_table_free): Define.
1303 (elf_backend_post_process_headers): Define always.
1304 * elfxx-sparc.c (sparc_jmp_irel_howto, sparc_irelative_howto): New.
1305 (sparc_reloc_map): Add entries for new IFUNC relocs.
1306 (_bfd_sparc_elf_reloc_type_lookup): Handle new IFUNC relocs.
1307 (_bfd_sparc_elf_info_to_howto_ptr): Likewise.
1308 (elf_sparc_local_htab_hash, elf_sparc_local_htab_eq,
1309 elf_sparc_get_local_sym_hash): New.
1310 (_bfd_sparc_elf_create_dynamic_sections): Move PLT ops initialization
1311 from here...
1312 (_bfd_sparc_elf_link_hash_table_create): ... to here. Allocate
1313 local hash table.
1314 (_bfd_sparc_elf_link_hash_table_free): New.
1315 (create_ifunc_sections): New.
1316 (_bfd_sparc_elf_check_relocs): Unconditionally assign htab->elf.dynobj
1317 and call create_ifunc_sections(). For local STT_GNU_IFUNC symbols
1318 cons up a fake local hash table entry for it. Unconditionally add
1319 a PLT refcount for STT_GNU_IFUNC symbols when h->def_regular. Count
1320 dyn relocs for ifunc.
1321 (_bfd_sparc_elf_adjust_dynamic_symbol): Handle ifunc.
1322 (allocate_dynrelocs): Unconditionally emit a PLT entry when
1323 STT_GNU_IFUNC and h->def_regular. Count GOT dyn relocs for ifunc.
1324 (allocate_local_dynrelocs): New function.
1325 (_bfd_sparc_elf_size_dynamic_sections): Invoke it over the local hash
1326 table. Emit dynamic relocs to irelplt when not shared. Treat iplt
1327 like splt.
1328 (_bfd_sparc_elf_relocate_section): Handle ifunc relocations by hand.
1329 (_bfd_sparc_elf_finish_dynamic_symbol): Adjust for non-dynamic ifunc
1330 plt in iplt/irelplt.
1331
1332 2010-02-08 Richard Sandiford <r.sandiford@uk.ibm.com>
1333
1334 * xcofflink.c (_bfd_xcoff_bfd_final_link): When calculating
1335 max_contents_size, only consider sections whose contents must
1336 be swapped in.
1337
1338 2010-02-09 Alan Modra <amodra@gmail.com>
1339
1340 * elf64-ppc.c (allocate_dynrelocs): Remove unused got structs here..
1341 (ppc64_elf_size_dynamic_sections): ..and here..
1342 (merge_got_entries): ..rather than here.
1343
1344 2010-02-09 Alan Modra <amodra@gmail.com>
1345
1346 * elf64-ppc.c (struct ppc_link_hash_table): Add do_multi_toc.
1347 (has_small_toc_reloc): Define.
1348 (ppc64_elf_check_relocs): Set the above flags.
1349 (ppc64_elf_edit_opd): Delete obfd param.
1350 (ppc64_elf_tls_optimize): Likewise.
1351 (ppc64_elf_edit_toc): Likewise.
1352 (ppc64_elf_tls_setup): Likewise. Add no_multi_toc param.
1353 * elf64-ppc.h: Update prototypes.
1354
1355 2010-02-08 Alan Modra <amodra@gmail.com>
1356
1357 * section.c (struct bfd_section): Delete has_tls_reloc,
1358 has_tls_get_addr_call, has_gp_reloc, need_finalize_relax, reloc_done.
1359 Add sec_flg0 thru sec_flg5.
1360 (BFD_FAKE_SECTION): Update for changed flags.
1361 * ecoff.c (bfd_debug_section): Likewise.
1362 * elf32-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define.
1363 * elf64-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define.
1364 (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Update.
1365 * elf32-xtensa.c (reloc_done): Define.
1366 * elfxx-ia64.c (skip_relax_pass_0, skip_relax_pass_1): Update.
1367 * bfd-in2.h: Regenerate.
1368
1369 2010-02-08 Tristan Gingold <gingold@adacore.com>
1370
1371 * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Set reloc.r_extern
1372 for non-scattered relocations.
1373
1374 2010-02-08 Nathan Sidwell <nathan@codesourcery.com>
1375
1376 * elf32-ppc.c (ppc_elf_begin_write_processing): Allow empty
1377 apuinfo sections, only scan input sections once and reuse the
1378 buffer.
1379
1380 2010-02-08 Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
1381
1382 * archures.c (bfd_mach_ppc_titan): Define.
1383 * bfd-in2.h: Regenerate.
1384 * cpu-powerpc.c (bfd_powerpc_archs): Add titan entry.
1385
1386 2010-02-08 Alan Modra <amodra@gmail.com>
1387
1388 * elf32-ppc.c (ppc_elf_check_relocs): Remove dead ifunc code.
1389
1390 2010-02-05 Sterling Augustine <sterling@tensilica.com>
1391
1392 * elf.c (assign_file_positions_for_load_sections) Update lma of
1393 section if necessary. Fixes Bugzilla 11219.
1394
1395 2010-02-05 H.J. Lu <hongjiu.lu@intel.com>
1396
1397 * elf32-i386.c: Remove trailing white spaces.
1398 * elf64-x86-64.c: Likewise.
1399
1400 2010-02-03 Nick Clifton <nickc@redhat.com>
1401
1402 * elf-bfd.h (emum elf_object_id): Rename to elf_target_id. Add
1403 entries for other architectures.
1404 (struct elf_link_hash_table): Add hash_table_id field.
1405 (elf_hash_table_id): New accessor macro.
1406 * elflink.c (_bfd_elf_link_hash_table_init): Add target_id
1407 parameter.
1408 * elf-m10300.c (elf32_mn10300_hash_table): Check table id before
1409 returning cast pointer.
1410 (elf32_mn10300_link_hash_table_create): Identify new table as
1411 containing MN10300 extensions.
1412 (mn10300_elf_relax_section): Check pointer returned by
1413 elf32_mn10300_hash_table.
1414 * elf32-arm.c: Likewise, except using ARM extensions.
1415 * elf32-avr.c: Likewise, except using AVR extensions.
1416 * elf32-bfin.c: Likewise, except using BFIN extensions.
1417 * elf32-cris.c: Likewise, except using CRIS extensions.
1418 * elf32-frv.c: Likewise, except using FRV extensions.
1419 * elf32-hppa.c: Likewise, except using HPPA32 extensions.
1420 * elf32-i386.c: Likewise, except using I386 extensions.
1421 * elf32-lm32.c: Likewise, except using LM32 extensions.
1422 * elf32-m32r.c: Likewise, except using M32RM extensions.
1423 * elf32-m68hc11.c: Likewise, except using M68HC11 extensions.
1424 * elf32-m68hc1x.c: Likewise, except using M68HC11 extensions.
1425 * elf32-m68hc1x.h: Likewise, except using M68HC11 extensions.
1426 * elf32-m68k.c: Likewise, except using M68K extensions.
1427 * elf32-microblaze.c: Likewise, except using MICROBLAZE extensions.
1428 * elf32-ppc.c: Likewise, except using PPC32 extensions.
1429 * elf32-s390.c: Likewise, except using S390 extensions.
1430 * elf32-sh.c: Likewise, except using SH extensions.
1431 * elf32-spu.c: Likewise, except using SPU extensions.
1432 * elf32-xtensa.c: Likewise, except using XTENSA extensions.
1433 * elf64-alpha.c: Likewise, except using ALPHA extensions.
1434 * elf64-hppa.c: Likewise, except using HPPA64 extensions.
1435 * elf64-ppc.c: Likewise, except using PPC64 extensions.
1436 * elf64-s390.c: Likewise, except using S390 extensions.
1437 * elf64-x86-64.c: Likewise, except using X86_64 extensions.
1438 * elfxx-ia64.c: Likewise, except using IA64 extensions.
1439 * elfxx-mips.c: Likewise, except using MIPS extensions.
1440 * elfxx-sparc.c: Likewise, except using SPARC extensions.
1441 * elfxx-sparc.h: Likewise, except using SPARC extensions.
1442 * elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete
1443 redundant structure.
1444 (elf32_cr16_hash_table): Delete unused macro.
1445 (elf32_cr16_link_hash_traverse): Delete unused macro.
1446 * elf32-score.c: Likewise.
1447 * elf32-score7.c: Likewise.
1448 * elf32-vax.c: Likewise.
1449 * elf64-sh64.c: Likewise.
1450
1451 2010-02-03 Alan Modra <amodra@gmail.com>
1452
1453 * elf64-ppc.c (struct plt_entry): Move earlier in file.
1454 (struct got_entry): Likewise. Add is_indirect and got.ent fields.
1455 (struct ppc64_elf_obj_tdata): Change tlsld_got to be a struct got_entry.
1456 Update all uses.
1457 (struct ppc_link_hash_table): Add got_reli_size and second_toc_pass.
1458 Remove no_multi_toc.
1459 (update_local_sym_info, ppc64_elf_check_relocs): Clear is_indirect
1460 when allocating a new struct got_entry.
1461 (allocate_got): New function, extracted from..
1462 (allocate_dynrelocs): ..here. Abort on got entry in non-ppc64 bfd.
1463 (ppc64_elf_size_dynamic_sections): Track got relocs allocated in
1464 .reliplt by got_reli_size. Set owner on ppc64_tlsld_got entries.
1465 (ppc64_elf_setup_section_lists): Remove output_bfd param and
1466 no_multi_toc, add add_stub_section and layout_sections_again. Stash
1467 new params in htab. Extract some code to..
1468 (ppc64_elf_start_multitoc_partition): ..here. New function.
1469 (ppc64_elf_next_toc_section): Check for linker script errors. Handle
1470 second pass toc scan.
1471 (merge_got_entries, merge_global_got, reallocate_got): New functions.
1472 (ppc64_elf_reinit_toc): Rename to..
1473 (ppc64_elf_finish_multitoc_partition): ..this.
1474 (ppc64_elf_layout_multitoc): New function.
1475 (ppc64_elf_size_stubs): Delete output_bfd, add_stub_section and
1476 layout_sections_again params.
1477 (ppc64_elf_relocate_section): Handle indirect got entries.
1478 * elf64-ppc.h: Update prototypes. Declare new functions.
1479
1480 2010-02-02 H.J. Lu <hongjiu.lu@intel.com>
1481
1482 * elf-bfd.h (elfcore_write_xstatereg): New.
1483
1484 * elf.c (elfcore_grok_xstatereg): New.
1485 (elfcore_write_xstatereg): Likewise.
1486 (elfcore_grok_note): Handle NT_X86_XSTATE.
1487 (elfcore_write_register_note): Handle .reg-xstate section.
1488
1489 2010-02-01 Tristan Gingold <gingold@adacore.com>
1490
1491 * som.c (som_write_ar_hdr): Define this macro.
1492
1493 2010-01-30 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1494
1495 * elf32-hppa.c (final_link_relocate): Convert R_PARISC_TLS_GD21L,
1496 R_PARISC_TLS_LDM21L and R_PARISC_TLS_IE21L relocations that use the
1497 linkage table pointer to use the global table pointer if not doing
1498 a shared link.
1499
1500 2010-01-29 Joel Brobecker <brobecker@adacore.com>
1501
1502 * elf.c (elfcore_grok_lwpstatus): Do not overwrite the core signal
1503 if it has already been set.
1504
1505 2010-01-27 Tristan Gingold <gingold@adacore.com>
1506
1507 * vms.h: Remove trailing spaces.
1508 (struct hdr_struct): Remove unused hdr_c_cpr field.
1509 (enum file_format_enum): Add comments.
1510 * vms.c (vms_bfd_print_private_bfd_data): New function that
1511 replaces the macro.
1512 Remove trailing spaces.
1513 * vms-misc.c: Improve comments.
1514 (_bfd_vms_get_object_record): Also handle files without pads.
1515 * vms-hdr.c (_bfd_vms_write_dbg): Fix format string.
1516 * vms-gsd.c (struct flagdescstruct): Make name field const.
1517 (gsyflagdesc): Fix typo.
1518
1519 2010-01-27 Alan Modra <amodra@gmail.com>
1520
1521 PR ld/11217
1522 * elf64-ppc.c (struct ppc_link_hash_table): Add toc_bfd, toc_first_sec.
1523 (ppc64_elf_setup_section_lists): Init them.
1524 (ppc64_elf_next_toc_section): Don't partition multi-toc between .got
1525 and .toc on the same input file.
1526 (ppc64_elf_relocate_section): Correct GOT entry offset.
1527
1528 2010-01-26 Tristan Gingold <gingold@adacore.com>
1529
1530 * targets.c (BFD_JUMP_TABLE_ARCHIVE): Add initializer for write_ar_hdr.
1531 (bfd_target): Add _bfd_write_ar_hdr_fn field.
1532 * archive.c (is_bsd44_extended_name): New macro.
1533 (_bfd_generic_read_ar_hdr_mag): Use it. Add extra_size.
1534 (bfd_slurp_armap): Also check for "__.SYMDEF" as a BSD4.4 extended
1535 name.
1536 (_bfd_archive_bsd44_construct_extended_name_table): New function.
1537 (_bfd_generic_write_ar_hdr): Ditto.
1538 (_bfd_bsd44_write_ar_hdr): Ditto.
1539 (_bfd_write_archive_contents): Call _bfd_write_ar_hdr.
1540 (bsd_write_armap): Adjust firstreal computation.
1541 * libbfd-in.h (struct areltdata): Add extra_size field.
1542 (_bfd_generic_write_ar_hdr): Add prototype.
1543 (_bfd_bsd44_write_ar_hdr): Ditto.
1544 (_bfd_write_ar_hdr): Define.
1545 (_bfd_noarchive_write_ar_hdr): Ditto.
1546 (_bfd_archive_bsd_write_ar_hdr): Ditto.
1547 (_bfd_archive_coff_write_ar_hdr): Ditto.
1548 (_bfd_archive_bsd44_slurp_armap): Ditto.
1549 (_bfd_archive_bsd44_slurp_extended_name_table): Ditto.
1550 (_bfd_archive_bsd44_construct_extended_name_table): New prototype.
1551 (_bfd_archive_bsd44_truncate_arname): Ditto.
1552 (_bfd_archive_bsd44_write_armap): Ditto.
1553 (_bfd_archive_bsd44_read_ar_hdr): Ditto.
1554 (_bfd_archive_bsd44_write_ar_hdr): Ditto.
1555 (_bfd_archive_bsd44_openr_next_archived_file): Ditto.
1556 (_bfd_archive_bsd44_get_elt_at_index): Ditto.
1557 (_bfd_archive_bsd44_generic_stat_arch_elt): Ditto.
1558 (_bfd_archive_bsd44_update_armap_timestamp): Ditto.
1559 * libbfd.h: Regenerate.
1560 * oasys.c (oasys_write_ar_hdr): Define.
1561 * libecoff.h (_bfd_ecoff_write_ar_hdr): Define.
1562 * ieee.c (ieee_write_ar_hdr): Define.
1563 * elf64-mips.c (bfd_elf64_archive_write_ar_hdr): Define.
1564 * coff-rs6000.c (rs6000coff_vec): Adjust for write_ar_hdr field.
1565 (bfd_pmac_xcoff_backend_data): Ditto.
1566 * coff64-rs6000.c (rs6000coff64_vec): Ditto.
1567 (bfd_xcoff_aix5_backend_data): Ditto.
1568 * coff-alpha.c (alpha_ecoff_write_ar_hdr): Define.
1569 * aout-target.h (MY_write_ar_hdr): Define it if not defined.
1570 * aout-tic30.c (MY_write_ar_hdr): Ditto.
1571 * mach-o-target.c (TARGET_NAME): Use _bfd_archive_bsd44 archive.
1572 (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr)
1573 (bfd_mach_o_slurp_armap, bfd_mach_o_slurp_extended_name_table)
1574 (bfd_mach_o_construct_extended_name_table)
1575 (bfd_mach_o_truncate_arname, bfd_mach_o_write_armap)
1576 (bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt)
1577 (bfd_mach_o_update_armap_timestamp): Moved to mach-o.c
1578 * mach-o.c (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr)
1579 (bfd_mach_o_slurp_armap, bfd_mach_o_slurp_extended_name_table)
1580 (bfd_mach_o_construct_extended_name_table)
1581 (bfd_mach_o_truncate_arname, bfd_mach_o_write_armap)
1582 (bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt)
1583 (bfd_mach_o_update_armap_timestamp): Moved from mach-o-target.c
1584 * bfd-in2.h: Regenerate.
1585
1586 2010-01-26 Alan Modra <amodra@gmail.com>
1587 H.J. Lu <hongjiu.lu@intel.com>
1588
1589 PR ld/11218
1590 * elflink.c (elf_link_output_extsym): Do not ignore undefined
1591 symbols with ref_regular set when gc_sections is active.
1592
1593 2010-01-25 Alan Modra <amodra@gmail.com>
1594
1595 PR ld/11217
1596 * elf64-ppc.c (ppc64_elf_tls_optimize): Optimize tls sequences
1597 with relocations against undefined weak symbols.
1598 (ppc64_elf_relocate_section): Don't optimize calls to undefined
1599 weak functions if the symbol is dynamic.
1600 (ppc64_elf_relocate_section): Edit tprel tls sequences.
1601 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1602 (_bfd_elf_ppc_at_tprel_transform): New function.
1603 * bfd-in.h (_bfd_elf_ppc_at_tprel_transform): Declare.
1604 * bfd-in2.h: Regenerate.
1605
1606 2010-01-23 Richard Sandiford <r.sandiford@uk.ibm.com>
1607
1608 * coff-rs6000.c (xcoff_howto_table): Change size to 0 and bitsize to 1.
1609 (_bfd_xcoff_reloc_type_lookup): Handle BFD_RELOC_NONE.
1610 * coff64-rs6000.c (xcoff64_howto_table): Change size to 0 and
1611 bitsize to 1.
1612 (xcoff64_reloc_type_lookup): Handle BFD_RELOC_NONE.
1613
1614 2010-01-21 Nick Clifton <nickc@redhat.com>
1615
1616 * elflink.c (elf_link_add_object_symbols): Look up name of
1617 undefined symbol both before and after versioning has been
1618 applied. Do not bother with symbols that are weakly undefined.
1619
1620 2010-01-21 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1621
1622 * elf32-s390.c (elf32_s390_merge_private_bfd_data): New function.
1623 (bfd_elf32_bfd_merge_private_bfd_data): New macro definition.
1624
1625 2010-01-19 Cary Coutant <ccoutant@google.com>
1626
1627 * dwarf2.c (read_attribute_value): Add DW_FORM_ref_sig8.
1628
1629 2010-01-19 Daisuke Hatayama <d.hatayama@jp.fujitsu.com>
1630 Alan Modra <amodra@gmail.com>
1631
1632 * elfcode.h (elf_swap_ehdr_out): Handle e_phnum > 0xffff.
1633 (elf_object_p): Read e_phnum extension.
1634 (elf_write_shdrs_and_ehdr): Write e_phnum extension.
1635 * elfcore.h (elf_core_file_p): Read e_phnum extension. Sanity check
1636 that we can read last program header.
1637
1638 2010-01-19 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
1639
1640 * elf32-arm.c (elf32_arm_howto_table_1): Correct bitsize of
1641 R_ARM_THM_CALL entry.
1642 (elf32_arm_final_link_relocate): Correct calculation of
1643 reloc_signed_max when doing a R_ARM_THM_CALL, R_ARM_THM_XPC22,
1644 or R_ARM_THM_JUMP24 relocation.
1645
1646 2010-01-18 Alan Modra <amodra@gmail.com>
1647
1648 PR 11168
1649 * coffcode.h (coff_compute_section_file_positions): Move Rs6000COFF_C
1650 block past vars in COFF_IMAGE_WITH_PE block. Report error on more
1651 than 32k sections.
1652
1653 2010-01-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1654
1655 Fix compilation warning on gcc-3.4.
1656 * vms-tir.c (start_etir_record, sto_imm): Rename the prototype
1657 parameter index to sec_index according to the function definition.
1658
1659 2010-01-13 Chao-ying Fu <fu@mips.com>
1660
1661 * elfxx-mips.c (JR_TO_B_P): New define to transform JR to B.
1662 It is true for all CPUs.
1663 (jal_reloc_p): New function.
1664 (mips_elf_calculate_relocation): Rename require_jalxp to
1665 cross_mode_jump_p.
1666 Update comment for CROSS_MODE_JUMP_P.
1667 Set up cross_mode_jump_p based on the mode change.
1668 (mips_elf_perform_relocation): Rename require_jalx to cross_mode_jump_p.
1669 Update comment for CROSS_MODE_JUMP_P.
1670 Test cross_mode_jump_p and jal_reloc_p to turn jal to jalx.
1671 Use !cross_mode_jump_p to guard conversion.
1672 Convert "jr t9" to "b", if possible.
1673 (_bfd_mips_elf_relocate_section): Rename require_jalx to
1674 cross_mode_jump_p.
1675 Pass &cross_mode_jump_p to call mips_elf_calculate_relocation.
1676 Pass cross_mode_jump_p to call mips_elf_perform_relocation.
1677
1678 2010-01-13 Nick Clifton <nickc@redhat.com>
1679
1680 * cpu-m32c.c (m32c_scan): New function. Ensures that a scan for
1681 "m32c" returns the m32c arch_info_struct and not the m16c
1682 arch_info_struct.
1683 (arch_info_struct): Use the new scan function.
1684 (bfd_m32c_arch): Likewise.
1685
1686 2010-01-13 Tristan Gingold <gingold@adacore.com>
1687
1688 * config.bfd: Remove duplicated target vector for i386-*-darwin.
1689 Appends new arch instead of overriding.
1690 Use mach_o_x86_64_vec for x86_64-*-darwin.
1691 * configure.in: Add mach_o_x86_64_vec.
1692 * configure: Regenerate.
1693 * targets.c: Declare mach_o_x86_64_vec, add it to _bfd_target_vector.
1694 * Makefile.am (BFD64_BACKENDS): Add mach-o-x86-64.lo
1695 (BFD64_BACKENDS_CFILES): Add mach-o-x86-64.c
1696 * Makefile.in: Regenerate.
1697 * mach-o-x86-64.c: New file.
1698
1699 2010-01-13 Tristan Gingold <gingold@adacore.com>
1700
1701 * reloc.c: Add MACH_O_X86_64 relocations.
1702 * bfd-in2.h: Regenerate.
1703 * libbfd.h: Regenerate.
1704
1705 2010-01-13 Tristan Gingold <gingold@adacore.com>
1706
1707 * archive.c (normalize): Use lbasename.
1708 (bfd_bsd_truncate_arname): Ditto.
1709 (bfd_gnu_truncate_arname): Ditto.
1710
1711 2010-01-12 Tristan Gingold <gingold@adacore.com>
1712
1713 * makefile.vms (CFLAGS): Turns warnings into informational messages.
1714
1715 2010-01-11 Tristan Gingold <gingold@adacore.com>
1716
1717 * mach-o.h: Add x86-64 relocation types.
1718
1719 2010-01-11 Tristan Gingold <gingold@adacore.com>
1720
1721 * mach-o.h (bfd_mach_o_backend_data): Add arch field.
1722 (bfd_mach_o_set_arch_mach): New prototype.
1723 * mach-o.c (bfd_mach_o_mkobject): Define with bfd_mach_o_gen_mkobject.
1724 (bfd_mach_o_set_arch_mach): New function.
1725 (bfd_mach_o_gen_mkobject): New function.
1726 Set TARGET_ARCHITECTURE for the generic back-ends.
1727 * mach-o-target.c (bfd_mach_o_set_arch_mach): Remove define.
1728 Check that TARGET_ARCHITECTURE is defined.
1729 Add TARGET_ARCHITECTURE in TARGET_NAME_BACKEND structure.
1730 * mach-o-i386.c (TARGET_ARCHITECTURE): Define.
1731
1732 2010-01-11 Tristan Gingold <gingold@adacore.com>
1733
1734 * archive.c (bfd_slurp_armap): Also check for Mach-O sorted armap.
1735
1736 2010-01-11 Nick Clifton <nickc@redhat.com>
1737
1738 * elf32-v850.c (v850_elf_perform_relocation): Fix overflow
1739 handling of R_V850_HI16_S relocation.
1740
1741 2010-01-11 Alan Modra <amodra@gmail.com>
1742
1743 PR 11103
1744 * dwarf1.c (parse_die): Correct FORM_STRING data pointer increment.
1745
1746 2010-01-11 Alan Modra <amodra@gmail.com>
1747
1748 PR 6832
1749 * dwarf2.c (struct comp_unit): Add sec_info_ptr.
1750 (find_abstract_instance_name): Use it.
1751 (parse_comp_unit): Set it.
1752
1753 2010-01-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1754
1755 * Makefile.in: Regenerate.
1756 * configure: Regenerate.
1757
1758 2010-01-08 Tristan Gingold <gingold@adacore.com>
1759
1760 * archive.c: Remove bfd_special_undocumented_glue.
1761
1762 2010-01-08 Alan Modra <amodra@gmail.com>
1763
1764 PR ld/11133
1765 * elf32-cr16.c (elf32_cr16_gc_mark_hook): Call _bfd_elf_gc_mark_hook.
1766 * elf32-microblaze.c (microblaze_elf_gc_mark_hook): Likewise.
1767 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
1768
1769 2010-01-07 H.J. Lu <hongjiu.lu@intel.com>
1770
1771 PR ld/11138
1772 * elflink.c (elf_link_check_versioned_symbol): Don't abort if
1773 a symbol referenced by DSO is is defined in a non-shared object
1774 and forced local.
1775
1776 2010-01-07 H.J. Lu <hongjiu.lu@intel.com>
1777
1778 PR ld/11133
1779 * elflink.c (_bfd_elf_gc_mark_hook): Check section XXX for
1780 undefined __start_XXX/__stop_XXX in all input files and set
1781 SEC_KEEP.
1782
1783 2010-01-07 H.J. Lu <hongjiu.lu@intel.com>
1784
1785 PR ld/11143
1786 * elflink.c (elf_gc_sweep): Keep SHT_NOTE section.
1787
1788 2010-01-04 Daniel Gutson <dgutson@codesourcery.com>
1789
1790 * bfd.m4 (BFD_HAVE_SYS_PROCFS_TYPE): Define _STRUCTURE_PROC
1791 before including procfs.h.
1792 (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Likewise.
1793 * configure.in: Added autoconf probe for the pr_fpreg member.
1794 * configure: Regenerated.
1795 * config.in: Regenerated.
1796 * elf.c: Define _STRUCTURE_PROC before including procfs.h.
1797
1798 2010-01-04 Joel Brobecker <brobecker@adacore.com>
1799
1800 Fix -Wshadow warnings in dwarf2.c (seen on alpha-tru64).
1801 * dwarf2.c (concat_filename): Rename dirname with dir_name
1802 to void shadowing the dirname function.
1803 Rename subdirname with subdir_name to stay consistent with
1804 the new dir_name variable name.
1805
1806 2010-01-04 Edmar Wienskoski <edmar@freescale.com>
1807
1808 * archures.c: Add bfd_mach_ppc_e500mc64.
1809 * bfd-in2.h: Regenerate.
1810 * cpu-powerpc.c (bfd_powerpc_archs): Add entry for
1811 bfd_mach_ppc_e500mc64.
1812
1813 2010-01-01 Joel Brobecker <brobecker@adacore.com>
1814
1815 Fix -Wshadow warnings (seen on ppc-aix)
1816 * xcofflink.c: Replace finfo by flinfo throughout.
1817
1818 For older changes see ChangeLog-2009
1819 \f
1820 Local Variables:
1821 mode: change-log
1822 left-margin: 8
1823 fill-column: 74
1824 version-control: never
1825 End:
This page took 0.067364 seconds and 5 git commands to generate.