bfd/
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
2
3 * elf32-spu.c (struct spu_link_hash_table): Add fromelem_size_log2.
4 (spu_elf_setup): Initialize it.
5 (spu_elf_size_stubs): Move .ovtab into .bss for software i-cache.
6 Update to new-sytle cache manager data structures.
7 (spu_elf_build_stubs): Generate new-style cache manager data
8 structures and symbols.
9 (spu_elf_auto_overlay): Update size computation.
10
11 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
12
13 * elf32-spu.c (spu_elf_modify_segment_map): Move all PF_OVERLAY
14 segments first amongst the program headers.
15
16 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
17
18 * elf32-spu.c (spu_elf_relocate_section): Only encode overlay index
19 into addresses for relocation types that look at high bits. Remove
20 special handling of relocation overflow warnings.
21
22 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
23
24 * elf32-spu.c (mark_functions_via_relocs): Handle cycles in the
25 control flow graph between fragments of a function.
26
27 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
28
29 * elf32-spu.c (spu_elf_size_stubs): Even in software i-cache mode,
30 generate only a 16-byte .toe section.
31 (spu_elf_build_stubs, spu_elf_auto_overlay): Likewise.
32
33 2009-05-14 Alan Modra <amodra@bigpond.net.au>
34
35 * elf32-spu.c (spu_elf_size_stubs): Split out section placement to..
36 (spu_elf_place_overlay_data): ..here. New function.
37 * elf32-spu.h (spu_elf_place_overlay_data): Declare.
38
39 2009-05-13 Andrew Jenner <andrew@codesourcery.com>
40
41 * elf32-arm.c: Move sysdep.h to start of file.
42
43 2009-05-11 Ulrich Weigand <uweigand@de.ibm.com>
44
45 * elf32-spu.c (spu_elf_find_overlays): Don't use .ovl.init lma as
46 start of overlays.
47 (spu_elf_build_stubs): Don't define __icache_tagbase. Define
48 __icache_tag_array and __icache_tag_array_size.
49
50 2009-05-11 Masaki Muranaka <monaka@monami-software.com>
51
52 * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Remove unnecessary
53 ATTRIBUTE_UNUSED.
54 (bfinfdpic_link_omit_section_dynsym): Likewise.
55 (elf32_bfinfdpic_finish_dynamic_sections): Likewise.
56
57 2009-05-05 Paul Brook <paul@codesourcery.com>
58
59 * bfd-in.h (elf32_arm_fix_exidx_coverage): Add prototype.
60 * bfd-in2.h: Regenerate.
61 * elf32-arm.c (arm_unwind_edit_type, arm_unwind_table_edit): Define.
62 (_arm_elf_section_data): Add text and exidx fields.
63 (add_unwind_table_edit, get_arm_elf_section_data, adjust_exidx_size,
64 insert_cantunwind_after, elf32_arm_fix_exidx_coverage, offset_prel31,
65 copy_exidx_entry): New functions.
66 (elf32_arm_write_section): Fixup .ARM.exidx contents.
67
68 2009-05-05 Christophe lyon <christophe.lyon@st.com>
69
70 * elf32-arm.c (DEF_STUBS): New helper define.
71 (DEF_STUB): Likewise.
72 (stub_def): New type.
73 (stub_definitions): New array, containing stub template pointers
74 and sizes.
75 (arm_size_one_stub): Make use of stub_definitions.
76
77 2009-05-04 Dave Korn <dave.korn.cygwin@gmail.com>
78
79 * elflink.c (find_version_for_sym): Remove from here, ...
80 * linker.c (bfd_find_version_for_sym): ... rename, replace
81 here, make public and update all callers.
82 * bfd-in2.h: Regenerate.
83
84 2009-04-30 Nick Clifton <nickc@redhat.com>
85
86 * elf-bfd.h (struct bfd_elf_section_data): Add indirect_relocs
87 section pointer.
88 (struct elf_obj_data): Add has_ifunc_symbols boolean.
89 * elf.c (swap_out_syms): Convert BSF_GNU_INDIRECT_FUNCTION flags
90 into a STT_GNU_IFUNC symbol type.
91 (_bfd_elf_is_function_type): Accept STT_GNU_IFUNC as a function
92 type.
93 (_bfd_elf_set_osabi): Set the osasbi field to ELFOSABI_LINUX if
94 the binary contains ifunc symbols.
95 * elfcode.h (elf_slurp_symbol_table): Translate the STT_GNU_IFUNC
96 symbol type into a BSF_GNU_INDIRECT_FUNCTION flag.
97 * elf32-i386.c (is_indirect_function): New function.
98 (elf_i386_check_relocs): Create an ifunc output section.
99 (allocate_dynrelocs): Create dynamic relocs in the ifunc output
100 section if necessary.
101 (elf_i386_relocate_section): Emit a reloc against an ifunc symbol
102 if necessary.
103 (elf_i386_add_symbol_hook): New function. Set the
104 has_ifunc_symbols field of the elf_obj_data structure if an ifunc
105 symbol is encountered.
106 (elf_backend_post_process_headers): Define.
107 (elf_backend_add_symbol_hook): Define.
108 (elf_i386_post_process_headers): Rename to
109 elf_i388_fbsd_post_process_headers.
110 * elf64-x86_64.c (IS_X86_64_PCREL_TYPE): New macro.
111 (is_indirect_function): New function.
112 (elf64_x86_64_check_relocs): Create an ifunc output section.
113 (allocate_dynrelocs): Create dynamic relocs in the ifunc output
114 section if necessary.
115 (elf64_x86_64_relocate_section): Emit a reloc against an ifunc
116 symbol if necessary.
117 (elf_i386_add_symbol_hook): Set the has_ifunc_symbols field of the
118 elf_obj_data structure if an ifunc symbol is encountered.
119 (elf_backend_post_process_headers): Define.
120 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Always create a PLT
121 if we have ifunc symbols to handle.
122 (get_ifunc_reloc_section_name): New function. Computes the name
123 for an ifunc section.
124 (_bfd_elf_make_ifunc_reloc_section): New function. Creates a
125 section to hold ifunc relocs.
126 * syms.c (BSF_GNU_INDIRECT_FUNCTION): Define.
127 (bfd_print_symbol_vandf): Handle ifunc symbols.
128 (bfd_decode_symclass): Likewise.
129 * bfd-in2.h: Regenerate.
130
131 2009-04-30 Joseph Myers <joseph@codesourcery.com>
132
133 * elf32-arm.c (elf32_arm_check_relocs): Give errors for absolute
134 MOVW and MOVT relocations in a shared library link.
135
136 2009-04-27 Anthony Green <green@moxielogic.com>
137
138 * verilog.c: New file.
139 * Makefile.am (BFD32_LIBS): Add verilog.c.
140 (BFD32_LIBS_CFILES): Add verilog.c.
141 (verilog.lo): New build rule.
142 * Makefile.in: Rebuilt.
143 * targets.c: Add verilog support.
144 * bfd.c (tdata union): Add Verilog private data field.
145 * bfd-in2.h: Regenerate.
146
147 2009-04-27 H.J. Lu <hongjiu.lu@intel.com>
148
149 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Don't
150 copy pe_opthdr.
151
152 2009-04-23 Matthias Klose <doko@ubuntu.com>
153
154 * peXXigen.c (_bfd_XXi_swap_sym_in): Initialize `name'.
155
156 2009-04-22 Christophe Lyon <christophe.lyon@st.com>
157
158 PR9743
159 * elf32-arm.c (arm_type_of_stub): Handle R_ARM_THM_JUMP24,
160 R_ARM_JUMP24 and R_ARM_PLT32 relocations.
161 (elf32_arm_size_stubs): Likewise.
162 (record_thumb_to_arm_glue): Deleted unused function.
163 (bfd_elf32_arm_process_before_allocation): No longer handle
164 R_ARM_THM_JUMP24, R_ARM_JUMP24 and R_ARM_PLT32 relocations here.
165 (elf32_arm_final_link_relocate): Handle R_ARM_THM_JUMP24,
166 R_ARM_JUMP24 and R_ARM_PLT32 relocations.
167
168 2009-04-21 Daniel Jacobowitz <dan@codesourcery.com>
169
170 * elf32-arm.c (INTERWORK_FLAG): Check BFD_LINKER_CREATED.
171 (elf32_arm_write_section): Declare early.
172 (elf32_arm_size_stubs): Skip non-stub sections in the stub BFD.
173 (arm_allocate_glue_section_space): Exclude empty sections.
174 (ARM_GLUE_SECTION_FLAGS): Add SEC_LINKER_CREATED.
175 (bfd_elf32_arm_add_glue_sections_to_bfd): Do not skip the stub
176 BFD.
177 (elf32_arm_output_glue_section, elf32_arm_final_link): New.
178 (elf32_arm_merge_eabi_attributes): Skip the stub BFD.
179 (elf32_arm_size_dynamic_sections): Allocate interworking
180 sections here.
181 (bfd_elf32_bfd_final_link): Define.
182
183 2009-04-21 H.J. Lu <hongjiu.lu@intel.com>
184
185 * coff-ia64.c (COFF_PAGE_SIZE): Changed to 8K.
186
187 * coffcode.h (coff_compute_section_file_positions): Clear
188 D_PAGED if PE section alignment is smaller than COFF_PAGE_SIZE.
189
190 * libcoff-in.h (pe_tdata): Remove force_minimum_alignment and
191 force_minimum_alignment.
192
193 * libcoff.h: Regenerated.
194
195 * pei-ia64.c (PEI_TARGET_SUBSYSTEM): Removed.
196 (PEI_FORCE_MINIMUM_ALIGNMENT): Likewise.
197
198 * peicode.h (pe_mkobject): Don't set force_minimum_alignment
199 nor target_subsystem.
200
201 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't check
202 force_minimum_alignment nor target_subsystem.
203
204 2009-04-21 Kai Tietz <kai.tietz@onevision.com>
205
206 * coff-x86_64.c (PEI_HEADERS): Protect includes.
207 (bfd_pe_print_pdata): Remove #ifdef PE variation.
208 * pei-x86_64.c (PEI_HEADERS): Define to prevent double
209 include in coff-x86_64.c of headers.
210 (PDATA_ROW_SIZE): New define.
211 (pex_regs[]): New static array.
212 (pex64_get_runtime_function): New static function.
213 (pex64_get_unwind_info): Likewise.
214 (pex64_get_scope_entry): Likewise.
215 (pex64_xdata_print_uwd_codes): Likewise.
216 (pex64_get_section_by_rva): Likewise.
217 (pex64_dump_xdata): Likewise.
218 (pex64_bfd_print_pdata): Likewise.
219 (bfd_pe_print_pdata): Define as pex64_bfd_print_pdata.
220 * peXXigen.c (_bfd_pex64_print_pdata): Removed implementation.
221 * libpei.h (_bfd_pex64_print_pdata): Removed declaration.
222
223 2009-04-19 Peter O'Gorman <binutils@mlists.thewrittenword.com>
224 Alan Modra <amodra@bigpond.net.au>
225 Dave Korn <dave.korn.cygwin@gmail.com>
226
227 * peXXigen.c (_bfd_XXi_swap_sym_in): Fix name handling w.r.t
228 long names and non-NUL-terminated strings.
229
230 2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
231
232 * bfd-in2.h: Regenerated.
233
234 2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
235
236 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Replace
237 IMAGE_SUBSYSTEM_EFI_ROM with IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER.
238
239 2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
240
241 PR binutils/10074
242 * coffcode.h (bfd_pei_p): New.
243
244 * config.bfd: Remove bfd_efi_bsdrv_ia32_vec,
245 bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
246 bfd_efi_rtdrv_x86_64_vec, bfd_efi_bsdrv_ia64_vec and
247 bfd_efi_rtdrv_ia64_vec. Replace bfd_efi_app_ia32_vec,
248 bfd_efi_app_x86_64_vec and bfd_efi_app_ia64_vec with
249 i386pei_vec, x86_64pei_vec and bfd_pei_ia64_vec, respectively.
250
251 * configure.in: Remove bfd_efi_bsdrv_ia32_vec,
252 bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
253 bfd_efi_rtdrv_x86_64_vec,
254 bfd_efi_bsdrv_ia64_vec and bfd_efi_rtdrv_ia64_vec. Replace
255 bfd_efi_ia64_vec with bfd_pei_ia64_vec.
256 * targets.c: Likewise.
257
258 * configure: Regenerated.
259 * libcoff.h: Likewise.
260 * Makefile.in: Likewise.
261
262 * efi-app-ia32.c: Removed.
263 * efi-app-x86_64.c: Likewise.
264 * efi-bsdrv-ia32.c: Likewise.
265 * efi-bsdrv-ia64.c: Likewise.
266 * efi-bsdrv-x86_64.c: Likewise.
267 * efi-rtdrv-ia32.c: Likewise.
268 * efi-rtdrv-ia64.c: Likewise.
269 * efi-rtdrv-x86_64.c: Likewise.
270 * efi-rtdrv-ia32.c: Likewise.
271
272 * efi-app-ia64.c: Moved to ...
273 * pei-ia64.c: This.
274 (TARGET_SYM): Set to bfd_pei_ia64_vec.
275 (TARGET_NAME): Set to pei-ia64.
276
277 * libpei.h (bfd_target_pei_p): Removed.
278 (bfd_target_pei_arch): Likewise.
279 (bfd_target_efi_app_p): Likewise.
280 (bfd_target_efi_app_arch): Likewise.
281 (bfd_target_efi_bsdrv_p): Likewise.
282 (bfd_target_efi_bsdrv_arch): Likewise.
283 (bfd_target_efi_rtdrv_p): Likewise.
284 (bfd_target_efi_rtdrv_arch): Likewise.
285 (bfd_pe_executable_p): Likewise.
286
287 * Makefile.am (BFD32_BACKENDS): Remove efi-app-ia32.lo,
288 efi-bsdrv-ia32.lo and efi-rtdrv-ia32.lo.
289 (BFD32_BACKENDS_CFILES): Remove efi-app-ia32.c, efi-bsdrv-ia32.c
290 and efi-rtdrv-ia32.c.
291 (BFD64_BACKENDS): Remove efi-app-ia64.lo, efi-bsdrv-ia64.lo,
292 efi-rtdrv-ia64.lo, efi-app-x86_64.lo, efi-bsdrv-x86_64.lo and
293 efi-rtdrv-x86_64.lo. Add pei-ia64.lo.
294 (BFD64_BACKENDS_CFILES): Remove efi-app-ia64.c, efi-bsdrv-ia64.c,
295 efi-rtdrv-ia64.c, efi-app-x86_64.c, efi-bsdrv-x86_64.c and
296 efi-rtdrv-x86_64.c. Add pei-ia64.c.
297 (efi-app-ia64.lo): Removed.
298 (efi-bsdrv-ia32.lo): Likewise.
299 (efi-rtdrv-ia32.lo): Likewise.
300 (efi-app-ia64.lo): Likewise.
301 (efi-bsdrv-ia64.lo): Likewise.
302 (efi-rtdrv-ia64.lo): Likewise.
303 (efi-app-x86_64.lo): Likewise.
304 (efi-bsdrv-x86_64.lo): Likewise.
305 (efi-rtdrv-x86_64.lo): Likewise.
306 (pei-ia64.lo): New.
307
308 * peicode.h (coff_swap_scnhdr_in): Replace bfd_pe_executable_p
309 with bfd_pei_p.
310 (arch_type): Removed.
311 (pe_arch): Likewise.
312 (pe_bfd_object_p): Just return coff_object_p.
313
314 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Replace
315 bfd_pe_executable_p with bfd_pei_p.
316
317 2009-04-17 Christophe Lyon <christophe.lyon@st.com>
318
319 * elf32-arm.c (elf32_arm_size_stubs): Handle long branches through
320 PLT entries to an undefined symbol when generating a shared
321 library.
322
323 2009-04-17 Nick Clifton <nickc@redhat.com>
324
325 PR 9909
326 * coffcode.h (handle_COMDAT): Allow for external COMDAT symbols.
327
328 2009-04-16 Richard Sandiford <r.sandiford@uk.ibm.com>
329
330 * aout-adobe.c (aout_32_bfd_define_common_symbol): Define.
331 * aout-target.h (MY_bfd_define_common_symbol): Likewise.
332 * aout-tic30.c (MY_bfd_define_common_symbol): Likewise.
333 * binary.c (binary_bfd_define_common_symbol): Likewise.
334 * bout.c (b_out_bfd_define_common_symbol): Likewise.
335 * coff-alpha.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
336 * coff-mips.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
337 * coffcode.h (coff_bfd_define_common_symbol): Likewise.
338 * elfxx-target.h (bfd_elfNN_bfd_define_common_symbol): Likewise.
339 * i386msdos.c (msdos_bfd_define_common_symbol): Likewise.
340 * i386os9k.c (os9k_bfd_define_common_symbol): Likewise.
341 * ieee.c (ieee_bfd_define_common_symbol): Likewise.
342 * ihex.c (ihex_bfd_define_common_symbol): Likewise.
343 * libbfd-in.h (_bfd_nolink_bfd_define_common_symbol): Likewise.
344 * mach-o.c (bfd_mach_o_bfd_define_common_symbol): Likewise.
345 * mmo.c (mmo_bfd_define_common_symbol): Likewise.
346 * nlm-target.h (nlm_bfd_define_common_symbol): Likewise.
347 * oasys.c (oasys_bfd_define_common_symbol): Likewise.
348 * pef.c (bfd_pef_bfd_define_common_symbol): Likewise.
349 * ppcboot.c (ppcboot_bfd_define_common_symbol): Likewise.
350 * som.c (som_bfd_define_common_symbol): Likewise.
351 * srec.c (srec_bfd_define_common_symbol): Likewise.
352 * tekhex.c (tekhex_bfd_define_common_symbol): Likewise.
353 * versados.c (versados_bfd_define_common_symbol): Likewise.
354 * vms.c (vms_bfd_define_common_symbol): Likewise.
355 * xcoff-target.h (_bfd_xcoff_bfd_define_common_symbol): Likewise.
356 * xsym.c (bfd_sym_bfd_define_common_symbol): Likewise.
357 * coff-rs6000.c (rs6000coff_vec): Add _bfd_xcoff_define_common_symbol.
358 (pmac_xcoff_vec): Likewise.
359 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
360 (aix5coff64_vec): Likewise.
361 * linker.c (bfd_generic_define_common_symbol): New function.
362 * targets.c (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_define_common_symbol.
363 (_bfd_define_common_symbol): New field.
364 * libcoff-in.h (_bfd_xcoff_define_common_symbol): Declare.
365 * xcofflink.c (_bfd_xcoff_define_common_symbol): New function.
366 (xcoff_build_ldsyms): Don't set XCOFF_DEF_REGULAR for common
367 symbols here.
368 * bfd-in2.h: Regenerate.
369 * libbfd.h: Likewise.
370 * libcoff.h: Likewise.
371
372 2009-04-15 Anthony Green <green@moxielogic.com>
373
374 * targets.c: Add moxie support.
375 * Makefile.am: Ditto.
376 * Makefile.in: Rebuilt.
377 * cpu-moxie.c, elf32-moxie.c: New files.
378 * archures.c: Add moxie support.
379 * configure.in: Add moxie support.
380 * configure: Rebuilt.
381 * config.bfd, archures.c: Add moxie support.
382 * bfd-in2.h: Rebuilt.
383
384 2009-04-15 Christophe Lyon <christophe.lyon@st.com>
385
386 * elf32-arm.c (elf32_arm_final_link_relocate): Don't convert ARM
387 branch to an undef weak symbol into a jump to next instruction if
388 a PLT entry will be created.
389
390 2009-04-14 Dave Korn <dave.korn.cygwin@gmail.com>
391
392 * coffgen.c (make_a_section_from_file): Set the backend long
393 section names enable if long section names found on input.
394 * coffcode.h: Extend long section names documentation to match.
395
396 2009-04-08 H.J. Lu <hongjiu.lu@intel.com>
397
398 * elflink.c (elf_link_add_object_symbols): Warn alternate ELF
399 machine code.
400
401 2009-04-07 DJ Delorie <dj@redhat.com>
402
403 * archures.c: Add bfd_mach_mep_c5.
404 * bfd-in2.h: Likewise.
405 * cpu-mep.c: Add bfd_c5_arch.
406 * elf32-mep.c: Support it.
407
408 2009-04-07 H.J. Lu <hongjiu.lu@intel.com>
409
410 * elflink.c (_bfd_elf_section_already_linked): Add `\n' for
411 info->callbacks->einfo.
412 * linker.c (_bfd_generic_section_already_linked): Likewise.
413
414 2009-04-06 DJ Delorie <dj@redhat.com>
415
416 * elf32-h8300.c (elf32_h8_relax_section): Relax MOVA opcodes.
417
418 2009-04-06 H.J. Lu <hongjiu.lu@intel.com>
419
420 * coff-x86_64.c (bfd_pe_print_pdata): Defined to
421 _bfd_pex64_print_pdata only if PE is defined.
422
423 * libpei.h (_bfd_pep_print_x64_pdata): Renamed to ...
424 (_bfd_pex64_print_pdata): This.
425
426 * peXXigen.c (_bfd_pep_print_x64_pdata): Renamed to ...
427 (_bfd_pex64_print_pdata): This. Defined only if COFF_WITH_pex64
428 is defined.
429
430 2009-04-05 Kai Tietz <kai.tietz@onevision.com>
431
432 * coff-x86_64.c (bfd_pe_print_pdata): Define as
433 _bfd_pep_print_x64_pdata.
434 * libpei.h (_bfd_pep_print_x64_pdata): Add prototype.
435 * peXXigen.c (_bfd_pep_print_x64_pdata): New.
436
437 2009-04-02 Sterling Augustine <sterling@jaw.hq.tensilica.com>
438
439 * elf32-xtensa.c (relax_property_section): Always set r_offset
440 to zero.
441
442 2009-04-02 Christophe Lyon <christophe.lyon@st.com>
443
444 * elf32-arm.c (elf32_arm_stub_long_branch_v4t_thumb_thumb,
445 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic): Two new long
446 branch stubs.
447 (elf32_arm_stub_type): New enum values for the two new stubs.
448 (arm_type_of_stub): Make use of the two new stubs.
449 (arm_size_one_stub): Handle the two new stubs.
450
451 2009-04-01 Matt Thomas <matt@netbsd.org>
452
453 * elf32-vax.c (elf_vax_check_relocs): Do not put relocations against
454 hidden symbols into the GOT or PLT.GOT.
455 (elf_vax_relocate_section): Do not emit a PCREL reloc
456 into a shared object if it is against a hidden symbol.
457
458 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
459
460 * xcofflink.c (xcoff_archive_info): Add contains_shared_object_p
461 and know_contains_shared_object_p.
462 (xcoff_archive_contains_shared_object_p): Add an "info" parameter.
463 Cache the result in the archive_info table.
464 (xcoff_auto_export_p): Add an "info" parameter and update the
465 call to xcoff_archive_contains_shared_object_p.
466 (xcoff_mark_auto_exports): Update accordingly.
467 (xcoff_post_gc_symbol): Likewise.
468
469 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
470
471 * xcofflink.c (bfd_link_input_bfd): Treat __rtinit as C_HIDEXT
472 rather than C_EXT.
473
474 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
475
476 * coff-rs6000.c (member_layout): New structure.
477 (archive_iterator): Likewise.
478 (member_layout_init): New function.
479 (archive_iterator_begin): Likewise.
480 (archive_iterator_next): Likewise.
481 (xcoff_write_armap_old): Use the new iterator functions.
482 (do_shared_object_padding): Delete.
483 (xcoff_write_armap_big): Use the new iterator functions. Simplify
484 handling of arch_info.
485 (xcoff_write_archive_contents_old): Allocate arelt_data in the
486 first loop rather than the second. Allocate a member header if
487 there isn't one, then work out the stat information and length
488 in the first loop too. Use the new iterators for the second loop.
489 (xcoff_write_archive_contents_big): Likewise.
490
491 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
492
493 * bfd-in.h (bfd_xcoff_split_import_path): Declare.
494 (bfd_xcoff_set_archive_import_path): Likewise.
495 * bfd-in2.h: Regenerate.
496 * xcofflink.c: Include libiberty.h.
497 (xcoff_archive_info): New structure.
498 (xcoff_archive_info_hash): New function.
499 (xcoff_archive_info_eq): Likewise.
500 (xcoff_get_archive_info): Likewise.
501 (_bfd_xcoff_bfd_link_hash_table_create): Initialize archive_info.
502 (bfd_xcoff_split_import_path): New function.
503 (bfd_xcoff_set_archive_import_path): Likewise.
504 (xcoff_set_import_path): Move earlier in file.
505 (xcoff_link_add_dynamic_symbols): Set the import path of a non-archive
506 object to the the directory part of the bfd's filename. Get the
507 import path and filename of an archive object from the archive's
508 xcoff_tdata, initializing it if necessary. Update use of
509 import_file_id.
510 (bfd_link_input_bfd): Update use of import_file_id.
511 (xcoff_write_global_symbol): Likewise.
512
513 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
514
515 * xcofflink.c (xcoff_link_hash_table): Moved from include/coff/xcoff.h.
516
517 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
518
519 * xcofflink.c (xcoff_link_create_extra_sections): Don't create
520 a .loader section for relocatable links.
521 (xcoff_need_ldrel_p): New function.
522 (xcoff_mark): Use it.
523 (bfd_xcoff_link_count_reloc): Only count loader relocs if there's
524 a loader section.
525 (xcoff_build_ldsym): New function, split out from...
526 (xcoff_build_ldsyms): ...here. Rename to...
527 (xcoff_post_gc_symbol): ...this. Only export symbols, and only
528 call xcoff_build_ldsym, if there's a loader section.
529 (xcoff_build_loader_section): New function, extracted verbatim from...
530 (bfd_xcoff_size_dynamic_sections): ...here. Only call it if
531 there's a loader section. Only add an __rtinit loader symbol
532 if there's a loader section. Update after above name change.
533 (xcoff_symbol_section, xcoff_create_ldrel): New functions.
534 (bfd_link_input_bfd): Use xcoff_need_ldrel_p, xcoff_symbol_section
535 and xcoff_create_ldrel.
536 (xcoff_write_global_symbol): Use xcoff_create_ldrel.
537 (xcoff_reloc_link_order): Likewise, but only call it if there's
538 a loader section. Use xcoff_symbol_section.
539 (_bfd_xcoff_bfd_final_link): Only use fdinfo.ldrel and fdinfo.ldsym
540 if there's a loader section.
541
542 2009-04-01 Richard Sandiford <rdsandiford@googlemail.com>
543
544 * xcofflink.c (bfd_link_input_bfd): Fix buffer overrun.
545
546 2009-04-01 Christophe Lyon <christophe.lyon@st.com>
547
548 * elf32-arm.c (group_sections): Rewrite loops for better
549 readability.
550
551 2009-03-30 DJ Delorie <dj@redhat.com>
552
553 * elflink.c (elf_link_input_bfd): Don't try to resolve complex
554 relocs when doing a relocatable link.
555
556 2009-03-28 Mark Mitchell <mark@codesourcery.com>
557
558 * coff-arm.c (coff_arm_merge_private_bfd_data): Use "error:", not
559 "ERROR:", in error messages.
560 * cpu-arm.c (bfd_arm_merge_machines): Likewise.
561 * elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise.
562 * elf32-arm.c (tag_cpu_arch_combine): Likewise.
563 (elf32_arm_merge_eabi_attributes): Likewise.
564 (elf32_arm_merge_private_bfd_data): Likewise.
565
566 2009-03-27 Nick Clifton <nickc@redhat.com>
567
568 * section.c (bfd_get_section_contents): Detect and handle the case
569 where a section has the SEC_IN_MEMORY flag set but no actual
570 contents allocated.
571
572 2009-03-26 Alan Modra <amodra@bigpond.net.au>
573
574 PR 6494
575 * elf.c (copy_elf_program_header): Do not check that PT_GNU_RELRO
576 p_filesz and p_memsz are equal. Use p_memsz as the segment size.
577 (assign_file_positions_for_non_load_sections): Zap PT_GNU_RELRO
578 if we don't find matching PT_LOAD when copying.
579
580 2009-03-25 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
581
582 * elf32-crx.c (crx_elf_howto_table): Zero the src_mask field of
583 the reloc descriptions.
584
585 2009-03-25 Hans-Peter Nilsson <hp@axis.com>
586
587 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
588 <R_CRIS_16_GOT_GD, case R_CRIS_32_GOT_GD>: Handle COMMON symbols.
589 <case R_CRIS_16_TPREL, R_CRIS_32_TPREL>: Ditto.
590
591 2009-03-24 H.J. Lu <hongjiu.lu@intel.com>
592
593 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Make it static.
594 (bfd_i386_arch_intel_syntax): Likewise.
595 (i8086_arch): Likewise.
596 (bfd_x86_64_arch): Likewise.
597
598 2009-03-24 Hans-Peter Nilsson <hp@axis.com>
599
600 * elf32-cris.c (cris_elf_relocate_section): <case
601 R_CRIS_16_DTPREL, R_CRIS_32_DTPREL>: Allow use of non-local
602 symbols for non-allocated sections. Don't check whether to
603 generate R_CRIS_DTPMOD for non-allocated sections.
604 (cris_elf_gc_sweep_hook) <case R_CRIS_32_DTPREL>: Don't
605 handle relocation GC:ing if applied to non-allocated section.
606 (cris_elf_check_relocs): Similar.
607
608 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
609 <R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: Don't include the TLS size
610 when emitting a known TP offset in the GOT.
611
612 2009-03-23 Alan Modra <amodra@bigpond.net.au>
613
614 * elf64-ppc.c (synthetic_opd): Delete.
615 (compare_symbols): Look for .opd name rather than section match.
616 (ppc64_elf_get_synthetic_symtab): Likewise.
617
618 2009-03-21 Alan Modra <amodra@bigpond.net.au>
619
620 * elf32-ppc.c (is_pic_glink_stub): Delete.
621 (is_nonpic_glink_stub): New function.
622 (ppc_elf_get_synthetic_symtab): Check for last non-pic stub rather
623 than first pic one.
624 (struct ppc_elf_link_hash_table <glink_pltresolve>): Comment fix.
625
626 2009-03-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
627 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
628
629 * elf32-s390.c (elf_s390_check_relocs): Use the SYMBOL_*
630 macros for visibilty and locality checks.
631 (elf_s390_adjust_dynamic_symbol): Likewise.
632 (allocate_dynrelocs): Likewise.
633 (elf_s390_relocate_section): Likewise.
634 (elf_s390_finish_dynamic_symbol): Likewise.
635 * elf64-s390.c (elf_s390_check_relocs): Likewise.
636 (elf_s390_adjust_dynamic_symbol): Likewise.
637 (allocate_dynrelocs): Likewise.
638 (elf_s390_relocate_section): Likewise.
639 (elf_s390_finish_dynamic_symbol): Likewise.
640
641 2009-03-19 Kai Tietz <kai.tietz@onevision.com>
642
643 * bfd-in2.h: Regenerated.
644 * coffcode.h (sec_to_styp_flags): For pe-coff add SEC_READONLY
645 for debugging sections and map memory read/write dependent on
646 SEC_COFF_NOREAD.
647 (styp_to_sec_flags): Set SEC_COFF_NOREAD for sections
648 without memory read flags set.
649 * section.c: Add SEC_COFF_NOREAD to section flags.
650
651 2009-03-19 Andreas Schwab <schwab@linux-m68k.org>
652
653 * elf32-hppa.c (final_link_relocate): Cast bfd_vma values to long
654 for format string.
655
656 2009-03-19 Alan Modra <amodra@bigpond.net.au>
657
658 * elf32-spu.c (spu_elf_find_overlays): Separate error return from
659 "no overlays" return. If there are overlays, create overlay
660 manager entry symbols here, so that..
661 (spu_elf_build_stubs): ..we don't need to set them up here.
662 Simplify entry symbol tests.
663 * elf32-spu.h (spu_elf_find_overlays): Update prototype.
664
665 2009-03-18 Mark Kettenis <kettenis@gnu.org>
666
667 * elf.c (elfcore_grok_openbsd_procinfo)
668 (elfcore_grok_openbsd_note): New functions.
669 (elf_parse_notes): Handle notes from OpenBSD ELF core files.
670
671 2009-03-18 Alan Modra <amodra@bigpond.net.au>
672
673 * vms-hdr.c: Don't include alloca.h.
674 * elf32-m68hc1x.c: Include alloca-conf.h.
675 * xsym.c: Likewise.
676 * elf64-hppa.c: Likewise. Remove existing #if's handling alloca.
677 * som.c: Likewise.
678 * Makefile.am: Run "make dep-am".
679 * Makefile.in: Regenerate.
680
681 2009-03-17 Daniel Jacobowitz <dan@codesourcery.com>
682
683 * elf32-arm.c (elf32_arm_check_relocs): Correct symbian_p test.
684
685 2009-03-17 Alan Modra <amodra@bigpond.net.au>
686
687 * elf32-spu.h (struct spu_elf_params): ovly_flavour now only 1 bit.
688 Add compact_stub.
689 (emum _ovly_flavour): Delete ovly_compact, ovly_none.
690 * elf32-spu.c (struct spu_link_hash_table): Replace ovly_load and
691 ovly_return fields with ovly_entry[2]. Adjust all users.
692 (spu_elf_find_overlays): Set ovly_entry[1] from __icache_call_handler
693 when soft-icache.
694 (spu_elf_build_stubs): Likewise.
695 (ovl_stub_size): Change arg to spu_elf_params pointer. Adjust for
696 ovly_flavour changes. Update all callers.
697 (ovl_stub_size_log2): New function.
698 (build_stub): Handle compact icache stubs. Use different manager
699 entry point for stubs in non-icache area.
700 (spu_elf_size_stubs): Don't allocate space for indirect branch
701 descriptors.
702 (spu_elf_build_stubs): And don't built them.
703
704 2009-03-16 Andrew Stubbs <ams@codesourcery.com>
705
706 * dwarf2.c (read_section): Always use rawsize, if available.
707
708 2009-03-16 Alan Modra <amodra@bigpond.net.au>
709
710 * simple.c (bfd_simple_get_relocated_section_contents): Use larger
711 of rawsize and size for buffer.
712
713 2009-03-15 Ulrich Weigand <uweigand@de.ibm.com>
714
715 * elf32-spu.c (spu_elf_check_vma): Do not reset auto_overlay
716 parameter just because fixed sections fit into local store.
717 (spu_elf_auto_overlay): Do not declare as "noreturn". Skip
718 generating overlays if fixed sections plus reserved stack
719 and heap space fit into local store.
720
721 2009-03-15 Alan Modra <amodra@bigpond.net.au>
722
723 * elf32-spu.c (build_stub): Correct icache set_id.
724 (spu_elf_relocate_section): Likewise.
725
726 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
727
728 * xcofflink.c (xcoff_link_check_archive_element): Only free the
729 symbol table if it was created by the current call.
730
731 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
732
733 * xcofflink.c (xcoff_build_ldsyms): Give imported descriptors
734 class XMC_DS rather than XMC_UA.
735
736 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
737
738 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Replace the
739 bfd_boolean export_defineds parameter with an unsigned int
740 auto_export_flags parameter.
741 * bfd-in2.h: Regenerate.
742 * xcofflink.c (xcoff_archive_contains_shared_object_p): New function,
743 split out from xcoff_build_ldsyms.
744 (xcoff_covered_by_expall_p): New function.
745 (xcoff_auto_export_p): New function, split out from xcoff_build_ldsyms
746 but with extra code to handle -bexpfull and -bexpall.
747 (xcoff_mark_auto_exports): New function.
748 (xcoff_build_ldsyms): Use xcoff_auto_export_p to decide whether
749 a function should be automatically exported.
750 (bfd_xcoff_size_dynamic_sections): Replace the export_defineds
751 parameter with an auto_export_flags parameter. Update ldinfo
752 accordingly. Use xcoff_mark_auto_exports to mark all automatically-
753 exported symbols.
754
755 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
756
757 * xcofflink.c (xcoff_mark_symbol_by_name): New function.
758 (bfd_xcoff_size_dynamic_sections): Use it to mark the entry,
759 init and fini functions. Do garbage collection for objects
760 without an entry point too.
761
762 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
763
764 * coffcode.h (coff_pointerize_aux_hook): Update CSECT_SYM_P to
765 check whether a symbol has csect information.
766 (coff_print_aux): Likewise.
767 * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Handle auxillary csect
768 information for C_AIX_WEAKEXT too.
769 (_bfd_xcoff_swap_aux_out): Likewise.
770 (xcoff_reloc_type_br): Handle defweak symbols too.
771 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Handle auxillary csect
772 information for C_AIX_WEAKEXT too.
773 (_bfd_xcoff64_swap_aux_out): Likewise.
774 (xcoff64_reloc_type_br): Handle defweak symbols too.
775 * coffgen.c (coff_print_symbol): Handle auxillary function
776 information for C_AIX_WEAKEXT too.
777 * xcofflink.c (_bfd_xcoff_canonicalize_dynamic_symtab): Set BSF_WEAK
778 instead of BSF_GLOBAL if the L_WEAK flag is set.
779 (xcoff_dynamic_definition_p): New function.
780 (xcoff_link_add_dynamic_symbols): Use it to decide whether ldsym
781 defines h. Don't change h if ldsym isn't the definition. Otherwise,
782 always take the symbol class from the ldsym. Use weak bfd symbol
783 types for weak ldsyms.
784 (xcoff_link_add_symbols): Use CSECT_SYM_P and EXTERN_SYM_P.
785 Fix the check for whether a definition is from a shared object.
786 Allow redefinitions of weak symbols.
787 (xcoff_link_check_ar_symbols): Use EXTERN_SYM_P.
788 (xcoff_keep_symbol_p): Likewise.
789 (bfd_xcoff_size_dynamic_sections): Use CSECT_SYM_P.
790 (xcoff_link_input_bfd): Use CSECT_SYM_P and EXTERN_SYM_P.
791 Add .loader entries for C_AIX_WEAKEXT as well as C_EXT symbols,
792 but mark them as L_WEAK.
793 (xcoff_write_global_symbol): Treat weak symbols as C_AIX_WEAKEXT
794 instead of C_EXT if C_AIX_WEAKEXT == C_WEAKEXT.
795
796 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
797
798 * xcofflink.c (xcoff_mark): When walking the relocations,
799 only mark the target symbol or the target section, not both.
800 (xcoff_final_definition_p): New function.
801 (xcoff_keep_symbol_p): Use it to check whether an external XCOFF
802 symbol is a valid definition of the associated output symbol.
803 Use XCOFF_ALLOCATED to stop the same hash table entry having
804 two output symbols.
805 (bfd_xcoff_size_dynamic_sections): Set XCOFF_ALLOCATED when
806 keeping a symbol.
807 (xcoff_link_input_bfd): Use xcoff_final_definition_p.
808
809 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
810
811 * xcofflink.c (bfd_xcoff_import_symbol): Treat imported absolute
812 symbols as XMC_XO.
813
814 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
815
816 * libcoff-in.h (xcoff_tdata): Add a lineno_counts field.
817 * libcoff.h: Regenerate.
818 * xcofflink.c (xcoff_link_add_symbols): Record per-symbol
819 line-number counts in the bfd's lineno_counts field.
820 Don't keep per-csect line-number counts.
821 (xcoff_sweep): Don't update per-csect line-number counts.
822 (bfd_xcoff_size_dynamic_sections): Count the number of line-number
823 entries in each output section.
824 (xcoff_link_input_bfd): Get the number of line numbers from
825 the bfd's lineno_counts field, rather than recalculating it
826 from scratch. Fix the range check when updating C_BINCL and
827 C_EINCL symbols.
828 (_bfd_xcoff_bfd_final_link): Don't count the output line numbers
829 here. Don't expect csects to have line-number counts.
830
831 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
832
833 * libcoff-in.h (xcoff_tdata): Change debug_indices to a signed long.
834 * libcoff.h: Regenerate.
835 * xcofflink.c (xcoff_keep_symbol_p): New function, using the
836 "skip" logic from xcoff_link_input_bfd.
837 (bfd_xcoff_size_dynamic_sections): Explicitly skip dynamic
838 objects in a dynamic link, rather than checking whether csectpp
839 is null. Always allocate debug_index for other objects,
840 and always go through the loop. Update the type of debug_index
841 after the change above. Read the auxillary csect information
842 and use xcoff_keep_symbol_p to decide whether a symbol should
843 be kept. Set its debug_index to -2 if not.
844 (xcoff_link_input_bfd): Update the type of debug_index after
845 the change above and always expect it to be nonnull. Use it to
846 test whether a symbol should be stripped, rather than making the
847 decision here. Postpone all symbol creation to the second pass.
848
849 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
850
851 * xcofflink.c: (xcoff_mark_symbol): Mark the TOC section when
852 creating a descriptor.
853 (xcoff_sweep): Don't mark toc_section unless it's needed.
854 (bfd_xcoff_size_dynamic_sections): Skip the toc_section
855 when marking every bfd.
856 (xcoff_link_input_bfd): Skip all TOC anchors.
857 (xcoff_toc_section_p, xcoff_find_tc0): New functions.
858 (_bfd_xcoff_bfd_final_link): Don't set the output bfd's TOC anchor
859 to -1; call xcoff_find_tc0 instead.
860
861 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
862
863 * libcoff-in.h (xcoff_section_tdata): Update commentary.
864 * libcoff.h: Regenerate.
865 * xcofflink.c (xcoff_link_add_symbols): Set the csect of XTY_ER
866 symbols to bfd_und_section_ptr or bfd_abs_section_ptr, rather than
867 the previous symbol's csect. Treat last_symndx as an inclusive value
868 and simplify its handling.
869 (xcoff_mark): Treat last_symndx as an inclusive value. Only mark
870 symbols with the right csect. Don't mark rsec when processing
871 relocations against undefined or absolute sections.
872 (bfd_xcoff_size_dynamic_sections): Don't check the SEC_MARK flag
873 of bfd_und_section_ptr.
874 (xcoff_link_input_bfd): Likewise.
875
876 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
877
878 * coff-rs6000.c (xcoff_ppc_relocate_section): Report relocations
879 against undefined symbols if the symbol's XCOFF_WAS_UNDEFINED
880 flag is set. Assert that all undefined symbols are either
881 imported or defined by a dynamic object.
882 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
883 * xcofflink.c (xcoff_link_add_symbols): Extend function-symbol
884 handling to all relocations. Only set XCOFF_CALLED for function
885 symbols.
886 (xcoff_find_function): New function, split out from...
887 (bfd_xcoff_export_symbol) ...here.
888 (xcoff_set_import_path): New function, split out from...
889 (bfd_xcoff_import_symbol): ...here. Remove assertion for old
890 meaning of XCOFF_CALLED.
891 (xcoff_mark_symbol): If we mark an undefined and unimported
892 symbol, find some way of defining it. If the symbol is a function
893 descriptor, fill in its definition automatically. If the symbol
894 is a function, mark its descriptor and allocate room for global
895 linkage code. Otherwise mark the symbol as implicitly imported.
896 Move the code for creating function descriptors from...
897 (xcoff_build_ldsyms): ...here. Use XCOFF_WAS_UNDEFINED to
898 check for symbols that were implicitly defined.
899 (xcoff_mark): Don't count any dynamic relocations against
900 function symbols.
901 (bfd_xcoff_size_dynamic_sections): Save the rtld parameter
902 in the xcoff link info.
903 (xcoff_link_input_bfd): Remove handling of undefined and
904 unexported symbols.
905
906 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
907
908 * coff-rs6000.c (xcoff_reloc_type_br): Make the branch absolute
909 if the target is absolute. Fix comment typo.
910 (xcoff_ppc_relocate_section): Remove FIXME.
911 * coff64-rs6000.c (xcoff64_reloc_type_br): Make the branch absolute
912 if the target is absolute.
913
914 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
915
916 * xcofflink.c (xcoff_mark, xcoff_link_input_bfd): Don't copy
917 R_POS and R_NEG relocations against absolute symbols to the
918 .loader section.
919
920 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
921
922 * coff64-rs6000.c (xcoff64_write_object_contents): Set the cputype
923 to 2 for bfd_mach_ppc_620.
924
925 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
926
927 * config.bfd: Treat AIX 6+ in the same way as AIX 5.
928 * configure.in: Likewise.
929 * configure: Regenerate.
930
931 2009-03-13 H.J. Lu <hongjiu.lu@intel.com>
932
933 PR binutils/9945
934 * elf.c (assign_section_numbers): Generate symbol table if there
935 is any relocation in output.
936 (_bfd_elf_compute_section_file_positions): Likewise.
937
938 2009-03-13 Nick Clifton <nickc@redhat.com>
939
940 PR 9934
941 * elf-bfd.h (NUM_SHDR_ENTRIES): Cope with an empty section.
942 * elflink.c (elf_link_read_relocs_from_section): Use
943 NUM_SHDR_ENTRIES. Gracefully handle the case where there are
944 relocs but no symbol table.
945 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
946
947 2009-03-12 H.J. Lu <hongjiu.lu@intel.com>
948
949 PR ld/9938
950 * elf32-i386.c (elf_i386_check_tls_transition): Use strncmp
951 to check ___tls_get_addr.
952
953 * elf64-x86-64.c (elf64_x86_64_check_tls_transition): Use
954 strncmp to check __tls_get_addr.
955
956 2009-03-12 Andrew Stubbs <ams@codesourcery.com>
957
958 * dwarf2.c (read_section): Always check the offset, even when the
959 section has been read before.
960
961 2009-03-11 H.J. Lu <hongjiu.lu@intel.com>
962
963 * elf32-i386.c (elf_i386_check_tls_transition): Fix a typo in
964 comments.
965
966 2009-03-11 Chris Demetriou <cgd@google.com>
967
968 * bfd.c (BFD_DETERMINISTIC_OUTPUT): New flag.
969 * bfd-in2.h: Regenerate.
970 * archive.c (bfd_ar_hdr_from_filesystem): If BFD_DETERMINISTIC_OUTPUT
971 flag is set, use 0 for uid, gid, and timestamp, and use 0644 for file
972 mode.
973 (bsd_write_armap): Likewise.
974 (_bfd_archive_bsd_update_armap_timestamp): If BFD_DETERMINISTIC_OUTPUT
975 flag is set, do nothing.
976 (coff_write_armap): If BFD_DETERMINISTIC_OUTPUT flag is set, use 0
977 for timestamp.
978
979 2009-03-11 Ulrich Weigand <uweigand@de.ibm.com>
980
981 * elf32-spu.c (find_function_stack_adjust): Handle sf instruction
982 used to update stack pointer.
983
984 2009-03-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
985
986 PR binutils/9921
987 * som.c (som_bfd_derive_misc_symbol_info): Set symbol type ST_ABSOLUTE
988 for unknown symbols in absolute section.
989
990 2009-03-06 Nick Clifton <nickc@redhat.com>
991
992 * po/es.po: Updated Spanish translation.
993
994 2009-03-05 Christophe Lyon <christophe.lyon@st.com>
995
996 * elf32-arm.c (group_sections): Take next section size into
997 account before accepting to group it.
998
999 2009-03-05 Christophe Lyon <christophe.lyon@st.com>
1000
1001 * elf32-arm.c (arm_type_of_stub): Handle long branches targetting
1002 PLT entries.
1003 (elf32_arm_final_link_relocate): Likewise.
1004
1005 2009-03-05 Moritz Kroll <Moritz.Kroll@gmx.de>
1006
1007 PR 9923
1008 * peXXigen.c (_bfd_XXi_final_link_postscript): Check h->root.type.
1009
1010 2009-03-04 Alan Modra <amodra@bigpond.net.au>
1011
1012 * reloc.c (BFD_RELOC_PPC_TLSGD, BFD_RELOC_PPC_TLSLD): New.
1013 * section.c (struct bfd_section): Add has_tls_get_addr_call.
1014 (BFD_FAKE_SECTION): Init new flag.
1015 * ecoff.c (bfd_debug_section): Likewise.
1016 * bfd-in2.h: Regenerate.
1017 * libbfd.h: Regenerate.
1018 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_TLSGD and R_PPC_TLSLD.
1019 (ppc_elf_reloc_type_lookup): Handle new relocs.
1020 (ppc_elf_check_relocs): Set has_tls_get_addr_call on finding such
1021 without marker relocs.
1022 (ppc_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
1023 if section has no old-style calls.
1024 (ppc_elf_relocate_section): Set tls_mask for non-tls relocs too.
1025 Don't try to optimize new-style __tls_get_addr call when handling
1026 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
1027 relocs.
1028 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_TLSGD, R_PPC64_TLSLD.
1029 (ppc64_elf_reloc_type_lookup): Handle new relocs.
1030 (ppc64_elf_check_relocs): Set has_tls_get_addr_call on finding such
1031 without marker relocs.
1032 (ppc64_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
1033 if section has no old-style calls. Set toc_ref for new relocs as
1034 appropriate.
1035 (ppc64_elf_relocate_section): Set tls_mask for non-tls relocs too.
1036 Don't try to optimize new-style __tls_get_addr call when handling
1037 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
1038 relocs.
1039
1040 2009-03-04 Alan Modra <amodra@bigpond.net.au>
1041
1042 PR 6768
1043 * configure.in: Test for ld --as-needed support. Link shared
1044 libbfd against libm.
1045 * configure: Regenerate.
1046
1047 2009-03-03 Alan Modra <amodra@bigpond.net.au>
1048
1049 * Makefile.am: Run "make dep-am".
1050 * Makefile.in: Regenerate.
1051
1052 2009-03-02 Qinwei <qinwei@sunnorth.com.cn>
1053
1054 * elf32-score7.c: New file.
1055 * elf32-score.h: New file.
1056 * elf32-score.c: Add code to support score 7. Set score7 as the
1057 default.
1058 * cpu-score.c: Add score7 architecure.
1059 (compatibile): New function.
1060 * Makefile.am: Add rules for building elf32-score7 object.
1061 * Makefile.in: Regenerate.
1062 * configure.in: Add elf32-score7 object to score vectors.
1063 * configure: Regenerate.
1064 * reloc.c: Add score7 relocs.
1065 * archures.c: Add score3 and score7 machine numbers.
1066 * bfd-in2.h: Regenerate.
1067 * libbfd.h: Regenerate.
1068
1069 2009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1070
1071 * configure: Regenerate.
1072
1073 2009-03-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1074
1075 * elf32-hppa.c (hppa32_elf_local_refcounts): New function.
1076 (elf32_hppa_check_relocs): Use it.
1077
1078 * elf_hppa_add_symbol_hook (elf_hppa_add_symbol_hook): Move to
1079 elf64-hppa.c.
1080 (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
1081 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
1082 (elf_hppa_is_dynamic_loader_symbol): Likewise.
1083 (elf_hppa_record_segment_addrs): Likewise.
1084 (elf_hppa_final_link): Likewise.
1085 (elf_hppa_relocate_insn): Likewise.
1086 (elf_hppa_final_link_relocate): Likewise.
1087 (elf64_hppa_relocate_section): Likewise.
1088 * elf64-hppa.c: Insert above.
1089
1090 2009-02-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1091
1092 * elf-hppa.h (elf_hppa_final_link): Use elf_hppa_final_link.
1093 (elf_hppa_final_link_relocate ): Rewrite eliminating dynamic hash table.
1094 (elf_hppa_relocate_section): Likewise.
1095 * elf64-hppa.c (struct elf64_hppa_link_hash_entry): Change to derive
1096 from struct elf_link_hash_entry. Add count field.
1097 (struct elf64_hppa_dyn_hash_table): Delete.
1098 (struct elf64_hppa_link_hash_table): Delete dyn_hash_table field.
1099 (elf64_hppa_hash_table): Rename to hppa_link_hash_table.
1100 (hppa_elf_hash_entry, eh_name): Define.
1101 (elf64_hppa_new_dyn_hash_entry): Delete.
1102 (elf64_hppa_dyn_hash_lookup): Delete.
1103 (elf64_hppa_dyn_hash_traverse): Delete.
1104 (get_dyn_name): Delete.
1105 (elf64_hppa_finalize_opd): Use struct elf_link_hash_entry * instead
1106 of struct elf64_hppa_dyn_hash_entry *.
1107 (elf64_hppa_finalize_dlt, llocate_global_data_dlt,
1108 allocate_global_data_plt, allocate_global_data_stub,
1109 allocate_global_data_opd, count_dyn_reloc, allocate_dynrel_entries):
1110 Likewise.
1111 (hppa64_link_hash_newfunc): New.
1112 (elf64_hppa_hash_table_create): Rework.
1113 (count_dyn_reloc): Likewise.
1114 (hppa64_elf_local_refcounts): New.
1115 (elf64_hppa_check_relocs): Rework using standard technique for recording
1116 local DLT, PLT and OPD reference counts.
1117 (elf64_hppa_dynamic_symbol_p): Revise using "eh" for struct
1118 elf_link_hash_entry *.
1119 (elf64_hppa_mark_exported_functions, allocate_global_data_dlt,
1120 allocate_global_data_plt, allocate_global_data_stub,
1121 allocate_global_data_opd, allocate_dynrel_entries,
1122 elf64_hppa_adjust_dynamic_symbol,
1123 elf64_hppa_mark_milli_and_exported_functions): Likewise.
1124 (elf64_hppa_create_dynamic_sections, elf64_hppa_size_dynamic_sections):
1125 Use hppa_link_hash_table. Rework.
1126 (elf64_hppa_link_output_symbol_hook): Rework.
1127 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd,
1128 elf64_hppa_finalize_dlt, elf64_hppa_finalize_dynreloc,
1129 elf64_hppa_finish_dynamic_sections): Likewise.
1130
1131 2009-02-26 Christophe Lyon <christophe.lyon@st.com>
1132
1133 * elf32-arm.c (stub_reloc_type): Removed.
1134 (insn_sequence): Renamed reloc_type field to r_type.
1135 (elf32_arm_stub_long_branch_v4t_arm_thumb_pic): New stub.
1136 (elf32_arm_stub_long_branch_v4t_thumb_arm_pic): Likewise.
1137 (elf32_arm_stub_long_branch_thumb_only_pic): Likewise.
1138 (elf32_arm_stub_type): Add new enum entries for the new stubs.
1139 (arm_stub_is_thumb): Catch new stubs.
1140 (arm_type_of_stub): Handle new stubs.
1141 (arm_size_one_stub): Use ARRAY_SIZE. Handle new stubs.
1142 (bfd_elf32_arm_process_before_allocation): Remove useless
1143 condition.
1144
1145 2009-02-25 H.J. Lu <hongjiu.lu@intel.com>
1146
1147 * elf.c (elf_find_function): Use is_function_type to check
1148 function symbol.
1149
1150 2009-02-24 Sterling Augustine <sterling@jaw.hq.tensilica.com>
1151
1152 * xtensa-modules.c: Revert to previous version 1.11 due
1153 to inadvertant commit.
1154
1155 2009-02-24 Sterling Augustine <sterling@tensilica.com>
1156
1157 * elf32-xtensa.c (text_action_add): Separate test for action
1158 type. Break if saved action is ta_widen_insn at same offset.
1159
1160 2009-02-24 Daniel Jacobowitz <dan@codesourcery.com>
1161
1162 * elf32-arm.c (elf32_arm_stub_long_branch_any_any_pic): Rename
1163 to elf32_arm_stub_long_branch_any_arm_pic.
1164 (elf32_arm_stub_long_branch_any_thumb_pic): New.
1165 (enum elf32_arm_stub_type, arm_type_of_stub)
1166 (arm_size_one_stub): Handle any to ARM PIC and any to Thumb PIC
1167 separately.
1168
1169 2009-02-24 Joseph Myers <joseph@codesourcery.com>
1170
1171 * elf32-arm.c (PREV_SEC): Update comment.
1172 (group_sections): Rename argument to stubs_always_after_branch.
1173 Reverse the list and place stubs at the end of input sections.
1174 Undefine NEXT_SEC.
1175 (elf32_arm_size_stubs): Update to use stubs_always_after_branch.
1176
1177 2009-02-23 Daniel Jacobowitz <dan@codesourcery.com>
1178
1179 * elf32-arm.c (arm_build_one_stub): Initialize stub_reloc_offset.
1180 Fix formatting.
1181 (arm_size_one_stub): Remove unnecessary break.
1182 (arm_map_one_stub): Fix formatting. Return after BFD_FAIL.
1183
1184 2009-02-23 Christophe Lyon <christophe.lyon@st.com>
1185
1186 * elf32-arm.c (stub_insn_type): New type.
1187 (stub_reloc_type): Likewise.
1188 (insn_sequence): Likewise.
1189 (elf32_arm_stub_long_branch_any_any): Encode using insn_sequence.
1190 (elf32_arm_stub_long_branch_v4t_arm_thumb): Likewise.
1191 (elf32_arm_stub_long_branch_thumb_only): Likewise.
1192 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
1193 (elf32_arm_stub_short_branch_v4t_thumb_arm): Likewise.
1194 (elf32_arm_stub_long_branch_any_any_pic): Likewise.
1195 (elf32_arm_stub_hash_entry): Add new helper fields.
1196 (stub_hash_newfunc): Initialize these new fields.
1197 (arm_build_one_stub): Encode Arm and Thumb instructions separately
1198 to take endianness into account.
1199 (arm_size_one_stub): Compute size of stubs using insn_sequence.
1200 (arm_map_one_stub): Code is now more generic, thanks to
1201 insn_sequence.
1202
1203 2009-02-23 Christophe Lyon <christophe.lyon@st.com>
1204
1205 * elf32-arm.c (elf32_arm_stub_long_branch_thumb_only): Fix stub
1206 code.
1207 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
1208 (arm_type_of_stub): Use Thumb-only long branch stub (non-PIC) when
1209 BLX is not available. Fix typo in warning message. Add comments
1210 and improve formatting.
1211 (arm_build_one_stub): Adjust to new
1212 elf32_arm_stub_long_branch_v4t_thumb_arm stub.
1213 (arm_map_one_stub): Likewise.
1214
1215 2009-02-23 Tristan Gingold <gingold@adacore.com>
1216 Eric Botcazou <ebotcazou@adacore.com>
1217 Douglas B Rupp <rupp@gnat.com>
1218
1219 * vms.h: Update copyright year, fix comments, reorder declarations.
1220 (_bfd_save_vms_section): Remove the prototype.
1221 (EGPS_S_V_NO_SHIFT): New constant.
1222 (bfd_vms_set_section_flags): New prototype.
1223 (EGPS_S_B_ALIGN, EGPS_S_W_FLAGS, EGPS_S_L_ALLOC, EGPS_S_B_NAMLNG): New
1224 constants.
1225 (EGSY_S_W_FLAGS): Ditto.
1226 (EGSY_S_V_QUAD_VAL): Ditto.
1227 (ESDF_S_L_VALUE, ESDF_S_L_PSINDX, ESDF_S_B_NAMLNG): Ditto.
1228 (EGST_S_W_FLAGS, EGST_S_Q_LP_1, EGST_S_Q_LP_2, EGST_S_L_PSINDX,
1229 EGST_S_B_NAMLNG): Ditto.
1230 (ESRF_S_B_NAMLNG): Ditto.
1231 (ETIR_S_C_HEADER_SIZE): Ditto.
1232 (EGPS_S_V_ALLOC_64BIT): Ditto.
1233 (DST_S_C_EPILOG): Ditto.
1234 (DST_S_C_SRC_SETLNUM_L, DST_S_C_SRC_SETLNUM_W) : Ditto.
1235 (DST_S_C_SRC_INCRLNUM_B): Ditto.
1236 (DST_S_B_PCLINE_UNSBYTE, DST_S_W_PCLINE_UNSWORD): Ditto.
1237 (DST_S_L_PCLINE_UNSLONG): Ditto.
1238 (DST_S_B_MODBEG_NAME, DST_S_L_RTNBEG_ADDRESS) : Ditto
1239 (DST_S_B_RTNBEG_NAME, DST_S_L_RTNEND_SIZE): Ditto
1240 (DST_S_C_SOURCE_HEADER_SIZE): Ditto.
1241 (DST_S_B_SRC_DF_LENGTH, DST_S_W_SRC_DF_FILEID): Ditto.
1242 (DST_S_B_SRC_DF_FILENAME, DST_S_B_SRC_UNSBYTE): Ditto.
1243 (DST_S_B_SRC_UNSBYTE): Ditto.
1244 (DST_S_W_SRC_UNSWORD, DST_S_L_SRC_UNSLONG): Ditto.
1245 Add prototypes.
1246 (vms_section, vms_reloc): Remove types.
1247 (hdr_struc): Replaced by ...
1248 (hdr_struct): ... new type.
1249 (EMH_S_W_HDRTYP, EMH_S_B_STRLVL, EMH_S_L_ARCH1): New constants.
1250 (EMH_S_L_ARCH2, EMH_S_L_RECSIZ, EMH_S_B_NAMLNG): Ditto.
1251 (EMH_DATE_LENGTH): Ditto.
1252 (eom_struc): Replaced by ...
1253 (eom_struct): ... new type.
1254 (EEOM_S_L_TOTAL_LPS, EEOM_S_W_COMCOD, EEOM_S_B_TFRFLG): New constants.
1255 (EEOM_S_L_PSINDX, EEOM_S_L_TFRADR): Ditto.
1256 (EIHD_S_K_MAJORID, EIHD_S_K_MINORID, EIHD_S_K_EXE): Ditto.
1257 (EIHD_S_L_SIZE, EIHD_S_L_ISDOFF, EIHD_S_L_SYMDBGOFF): Ditto.
1258 (EIHD_S_Q_SYMVVA, EIHD_S_L_IMGTYPE): Ditto.
1259 (EISD_S_L_EISDSIZE, EISD_S_L_SECSIZE, EISD_S_Q_VIR_ADDR): Ditto.
1260 (EISD_S_L_FLAGS, EISD_S_L_VBN, EISD_S_R_CONTROL): Ditto.
1261 (EISD_S_L_IDENT, EISD_S_T_GBLNAM): Ditto.
1262 (EISD_S_M_GBL, EISD_S_M_CRF, EISD_S_M_DZRO, EISD_S_M_WRT): Ditto.
1263 (EISD_S_M_INITALCODE, EISD_S_M_BASED, EISD_S_M_FIXUPVEC): Ditto.
1264 (EISD_S_M_RESIDENT, EISD_S_M_VECTOR, EISD_S_M_PROTECT): Ditto.
1265 (EISD_S_M_LASTCLU, EISD_S_M_EXE, EISD_S_M_NONSHRADR): Ditto.
1266 (EISD_S_M_QUAD_LENGTH, EISD_S_M_ALLOC_64BIT): Ditto.
1267 (EIHS_S_L_DSTVBN, EIHS_S_L_DSTSIZE, EIHS_S_L_GSTVBN): Ditto.
1268 (EIHS_S_L_GSTSIZE, EIHS_S_L_DMTVBN, EIHS_S_L_DMTBYTES): Ditto.
1269 (DBG_S_L_DMT_MODBEG, DBG_S_L_DST_SIZE): Ditto.
1270 (DBG_S_W_DMT_PSECT_COUNT, DBG_S_C_DMT_HEADER_SIZE): Ditto.
1271 (DBG_S_L_DMT_PSECT_START, DBG_S_L_DMT_PSECT_LENGTH)
1272 (DBG_S_C_DMT_PSECT_SIZE): Ditto.
1273 (enum file_type_enum): New type.
1274 (struct location_struct): Removed.
1275 (struct fileinfo, struct srecinfo, struct lineinfo): New types.
1276 (struct funcinfo, struct module): Ditto.
1277 (struct vms_private_data_struct): Update fields.
1278 (struct vms_section_data_struct): New type.
1279
1280 * vms.c: Update copyright year, fix comments,
1281 Fix includes for DECC, add prototypes.
1282 (vms_initialize): Use bfd_alloc instead of bfd_zalloc and remove
1283 some initializers.
1284 Use flavour to set is_vax, location_stack is removed.
1285 (struct pair): Declare.
1286 (fill_section_ptr): Initialize variables at declaration.
1287 Add guard to set SECTION_SYM flag, handlde und section.
1288 (vms_fixup_sections): Use struct pair for fill_section_ptr argument.
1289 (_bfd_vms_slurp_object_records): New function, replaces previous
1290 vms_object_p.
1291 (vms_slurp_module): New function.
1292 (vms_slurp_image): Ditto.
1293 (vms_object_p): Complete rewrite.
1294 (vms_mkobject): Use is_vax field to slect architecture.
1295 (free_reloc_stream): New function.
1296 (vms_convert_to_var): Ditto.
1297 (vms_convert_to_var_1): Ditto.
1298 (vms_convert_to_var_unix_filename): Ditto.
1299 (vms_close_and_cleanup): Call free_reloc_stream, convert file to
1300 VAR format on VMS.
1301 (vms_new_section_hook): Set alignment to 0, allocate private data.
1302 (vms_get_section_contents): Load content.
1303 (vms_get_symbol_info): Handle undefined section.
1304 (vms_find_nearest_line): Handle.
1305 (alloc_reloc_stream): New function.
1306 (vms_slurp_reloc_table): Ditto.
1307 (vms_get_reloc_upper_bound): Make it real.
1308 (vms_canonicalize_reloc): Do the real work.
1309 (alpha_howto_table): Add ALPHA_R_NOP, ALPHA_R_BSR, ALPHA_R_LDA,
1310 ALPHA_R_BOH.
1311 (vms_bfd_reloc_type_lookup): Handle NOP, BSR, LDA and BOH.
1312 (vms_set_arch_mach): Check arch.
1313 (vms_set_section_contents): Copy the content after allocation.
1314 (vms_alpha_vec): Update object flags.
1315
1316 * vms-tir.c: Update copyright year, fix comments,
1317 add prototypes for new functions.
1318 (dst_define_location): New function.
1319 (dst_restore_location): New function.
1320 (dst_retrieve_location): New function.
1321 (dst_check_allocation): New function.
1322 (image_dump): Call dst_check_allocation.
1323 (image_write_b): Ditto.
1324 (image_write_w): Ditto.
1325 (image_write_l): Ditto.
1326 (image_write_q): Ditto.
1327 (cmd_name): Handle STA_LW, STA_QW, STO_OFF, STO_IMM, STO_IMMR, STO_LW,
1328 STO_QW, OPR_ADD, CTL_SETRB, STC_LP_PSB, CTL_DFLOC, CTL_STLOC,
1329 CTL_STKDL.
1330 Call error handler instead of abort if name is not known.
1331 (etir_sta): Add quarter_relocs argument and set it.
1332 Fix cast.
1333 (etir_sto): Ditto.
1334 (etir_opr): Ditto, return FALSE in case of error.
1335 (etir_ctl): Add quarter_relocs argument and set it, fix cast.
1336 Fix CTL_DFLOC, CTL_STLOC, CTL_STKDL.
1337 (etir_stc): Add quarter_relocs argument and set it, fix cast.
1338 Fix STC_LP, STC_LP_PSB, STC_GBL and STC_CGA.
1339 Handle STC_LP_PSB, STC_BSR_GBL, STC_LDA_GBL, STC_BOH_GBL.
1340 Move STC_NOP_PS, STC_BSR_PS, STC_LDA_PS, STC_BOH_PS, STC_NBH_PS.
1341 Return FALSE in case of error.
1342 (tir_sta): Change sign of psect.
1343 (tir_ctl): Ditto.
1344 (tir_cmd): Fix cast. Makes tir_table static const.
1345 (etir_cmd): Add quarter_relocs argument, makes etir_table const,
1346 add argument to explain.
1347 (analyze_etir): Initialize maxptr, add quarter_relocs
1348 declaration, move some declarations into inner scopes.
1349 Handle quarter_relocs and STO_IMM.
1350 (_bfd_vms_slurp_tir): Use constant instead of hard-coded values.
1351 (_bfd_vms_slurp_relocs): New function.
1352 (_bfd_vms_decode_relocs): New function.
1353 (sto_imm): Rewritten.
1354 (start_first_etbt_record): New function.
1355 (start_another_etbt_record): Ditto.
1356 (etir_output_check): Ditto.
1357 (defer_reloc_p): Ditto.
1358 (_bfd_vms_write_tir): Remove nextoffset, convert a while-loop to
1359 a for-loop. Correctly deals with contents, deals with .vmsdebug,
1360 rewritte relocations handling.
1361 (_bfd_vms_write_tbt): Removed.
1362 (_bfd_vms_write_dbg): Ditto.
1363
1364 * vms-misc.c: Update copyright year, Fix comments.
1365 (_bfd_vms_get_header_values): Use 'size' instead of 'length'.
1366 (maybe_adjust_record_pointer_for_object): New function.
1367 (_bfd_vms_get_first_record): New function, replaces ...
1368 (_bfd_vms_get_record): .. removed.
1369 (_bfd_vms_get_object_record): New function.
1370 (_bfd_vms_get_object_record): New function.
1371 (vms_get_remaining_object_record): New function, replaces ...
1372 (_bfd_vms_get_next_record): ... removed.
1373 (add_new_contents): Removed.
1374 (_bfd_save_vms_section): Removed.
1375 (_bfd_get_vms_section): Removed.
1376 (_bfd_vms_output_flush): Write in VAR format.
1377 (new_symbol): Don't make UND section.
1378
1379 * vms-hdr.c: Update copyright year, update list of record handled.
1380 (_bfd_vms_slurp_hdr): rec_length renamed to rec_size.
1381 (_bfd_vms_write_hdr): Strip vms and unix patches,
1382 add comments, truncate module name at 31 characters,
1383 use constants instead of hard-coded value,
1384 write BFD version instead of a fixed string.
1385 (_bfd_vms_slurp_ihd): New function.
1386 (_bfd_vms_slurp_isd): Ditto.
1387 (_bfd_vms_slurp_ihs): Ditto.
1388 (new_module): Ditto.
1389 (parse_module): Ditto
1390 (build_module_list): Ditto.
1391 (module_find_nearest_line): Ditto.
1392 (_bfd_vms_find_nearest_dst_line): Ditto.
1393 (vms_slurp_debug): Ditto.
1394 (_bfd_vms_slurp_dbg): Ditto.
1395 (_bfd_vms_slurp_tbt): Ditto.
1396 (_bfd_vms_write_dbg): Ditto.
1397 (_bfd_vms_write_tbt): Ditto.
1398
1399 * vms-gsd.c: Update copyright year, update list of records handled.
1400 (EVAX_LITERALS_NAME): New macro.
1401 (evax_section_flags): Add an entry for EVAX_LITERALS_NAME.
1402 (gpsflagdesc, gsyflagdesc): Moved out of _bfd_vms_slurp_gsd.
1403 (register_universal_symbol): New function and prototype.
1404 (_bfd_vms_slurp_gsd): Fix indentations and casts,
1405 improve debug messages,
1406 use constants instead of hard-coded value,
1407 fix missing endianness conversion,
1408 handle global symbol (SYMG).
1409 (bfd_vms_set_section_flags): New function.
1410 (_bfd_vms_write_gsd): Don't write .vmsdebug section,
1411 handle section literals,
1412 fix indentation,
1413 handle section bfd and vms flags,
1414 don't output LIB$INITIALIZE symbol,
1415 fix handling of weak symbols,
1416 fix evax vs vax procedure descriptor,
1417 handle absolute symbols.
1418
1419 * reloc.c (BFD_RELOC_ALPHA_NOP, BFD_RELOC_ALPHA_BSR,
1420 BFD_RELOC_ALPHA_LDA, BFD_RELOC_ALPHA_BOH): New relocations.
1421
1422 * makefile.vms (DEFS): Fix flags for VMS.
1423
1424 * bfdio.c (real_fopen): Handle multiple VMS fopen attributes.
1425
1426 * bfd-in2.h: Regenerated.
1427 * libbfd.h: Regenerated.
1428
1429 2009-02-20 Cary Coutant <ccoutant@google.com>
1430
1431 * vmsutil.c (vms_file_stats_name): Fix incorrect use of st_mtime
1432 in struct stat.
1433
1434 2009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
1435
1436 PR gas/7059
1437 * coffcode.h (coff_write_object_contents): Don't let the string
1438 table offset overflow the s_name field when using long section names.
1439
1440 2009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
1441
1442 * coff-alpha.c (alpha_ecoff_backend_data): Initialise fields which
1443 control long section name handling with ECOFF_NO_LONG_SECTION_NAMES.
1444 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1445 * coff-rs6000.c (bfd_xcoff_backend_data): Initialise fields which
1446 control long section name handling with XCOFF_NO_LONG_SECTION_NAMES.
1447 (bfd_pmac_xcoff_backend_data): Likewise.
1448 * coff64-rs6000.c (bfd_xcoff_backend_data): Likewise.
1449 (bfd_xcoff_aix5_backend_data): Likewise.
1450 (xcoff64_write_object_contents): Delete unused long_section_names
1451 local variable.
1452 * coff-sh.c (bfd_coff_small_swap_table): Initialise long section
1453 name members using COFF_DEFAULT_LONG_SECTION_NAMES and make entire
1454 struct non-const.
1455 * coffcode.h (documentation): Update to describe long section names.
1456 (COFFLONGSECTIONCATHELPER): New helper macro.
1457 (BLANKOR1TOODD): Likewise.
1458 (COFF_ENABLE_LONG_SECTION_NAMES): Likewise.
1459 (COFF_LONG_SECTION_NAMES_SETTER): Likewise.
1460 (COFF_DEFAULT_LONG_SECTION_NAMES): Likewise.
1461 (bfd_coff_set_long_section_names_allowed): New function.
1462 (bfd_coff_set_long_section_names_disallowed): Likewise.
1463 (struct bfd_coff_backend_data): Add new backend hook function
1464 pointer _bfd_coff_set_long_section_names.
1465 (bfd_coff_set_long_section_names): New backend hook.
1466 (coff_write_object_contents): Only generate long section names if
1467 bfd_coff_long_section_names() indicates they are currently enabled.
1468 (bfd_coff_std_swap_table): Make non-const, and initialise long
1469 section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
1470 (ticoff0_swap_table): Likewise to both.
1471 (ticoff1_swap_table): Again, likewise to both.
1472 * coffgen.c (make_a_section_from_file): Allow long section names
1473 as inputs even if not currently allowed for outputs.
1474 * ecoff.c (_bfd_ecoff_no_long_sections): New function.
1475 * efi-app-ia32.c (COFF_LONG_SECTION_NAMES): Define to 0, not blank.
1476 * efi-app-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
1477 * efi-app-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
1478 * efi-bsdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
1479 * efi-bsdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
1480 * efi-bsdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
1481 * efi-rtdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
1482 * efi-rtdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
1483 * efi-rtdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
1484 * pei-arm.c (COFF_LONG_SECTION_NAMES): Likewise.
1485 * pei-i386.c (COFF_LONG_SECTION_NAMES): Likewise.
1486 * pei-mcore.c (COFF_LONG_SECTION_NAMES): Likewise.
1487 * pei-mips.c (COFF_LONG_SECTION_NAMES): Likewise.
1488 * pei-ppc.c (COFF_LONG_SECTION_NAMES): Likewise.
1489 * pei-sh.c (COFF_LONG_SECTION_NAMES): Likewise.
1490 * pei-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
1491 * libcoff-in.h: Update copyright year to cause updated copyright
1492 year in generated libcoff.h, and fix typo.
1493 * libcoff.h: Regenerated.
1494 * libecoff.h (ECOFF_NO_LONG_SECTION_NAMES): New macro.
1495 (_bfd_ecoff_no_long_sections): Add prototype.
1496 * libxcoff.h (XCOFF_NO_LONG_SECTION_NAMES): New macro.
1497 * pe-mips.c (COFF_LONG_SECTION_NAMES): Define empty if not already
1498 defined by an including .c file.
1499 * ticoff.h (ticoff0_swap_table): Make non-const, and initialise
1500 long section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
1501 (ticoff1_swap_table): Likewise to both.
1502
1503 2009-02-18 Christophe Lyon <christophe.lyon@st.com>
1504
1505 * elf32-arm.c (arm_build_one_stub): Fix relocation target for pic
1506 stub. Catch default case error.
1507 (arm_map_one_stub): Add missing Thumb mapping symbol.
1508
1509 2009-02-18 Bjoern Haase <bjoern.m.haase@web.de>
1510
1511 PR 9841
1512 * elf32-avr.c: Handle case where no local symbos exist correctly.
1513
1514 2009-02-16 Christophe Lyon <christophe.lyon@st.com>
1515
1516 bfd/
1517 * elf32-arm.c (arm_long_branch_stub,
1518 arm_thumb_v4t_long_branch_stub,
1519 arm_thumb_thumb_long_branch_stub,
1520 arm_thumb_arm_v4t_long_branch_stub,
1521 arm_thumb_arm_v4t_short_branch_stub,
1522 arm_pic_long_branch_stub):
1523 Renamed to elf32_arm_stub_long_branch_any_any,
1524 elf32_arm_stub_long_branch_v4t_arm_thumb,
1525 elf32_arm_stub_long_branch_thumb_only,
1526 elf32_arm_stub_long_branch_v4t_thumb_arm,
1527 elf32_arm_stub_short_branch_v4t_thumb_arm,
1528 elf32_arm_stub_long_branch_any_any_pic.
1529 (arm_stub_long_branch, arm_thumb_v4t_stub_long_branch,
1530 arm_thumb_thumb_stub_long_branch,
1531 arm_thumb_arm_v4t_stub_long_branch,
1532 arm_thumb_arm_v4t_stub_short_branch, arm_stub_pic_long_branch):
1533 Renamed to arm_stub_long_branch_any_any,
1534 arm_stub_long_branch_v4t_arm_thumb,
1535 arm_stub_long_branch_thumb_only,
1536 arm_stub_long_branch_v4t_thumb_arm,
1537 arm_stub_short_branch_v4t_thumb_arm,
1538 arm_stub_long_branch_any_any_pic.
1539
1540 2009-02-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1541
1542 * elf-hppa.h (elf_hppa_final_link_relocate): Correct addend value used
1543 in branch offset check.
1544
1545 2009-02-15 Alan Modra <amodra@bigpond.net.au>
1546
1547 * elf64-ppc.c (struct _ppc64_elf_section_data): Delete t_symndx,
1548 add toc.symndx and toc.add.
1549 (ppc64_elf_check_relocs): Don't set htab->tls_get_addr here.
1550 Set up toc.add.
1551 (get_tls_mask): Add toc_addend param, set from toc.add. Adjust all
1552 callers.
1553 (ppc64_elf_tls_setup): Set htab->tls_get_addr and tls_get_addr_fd.
1554 (branch_reloc_hash_match): New function, extracted from..
1555 (ppc64_elf_tls_optimize): ..here.
1556 (ppc64_elf_relocate_section): Properly set addends when optimizing
1557 tls sequences. Avoid unnecessary reading and writing of insns.
1558 Only redo reloc when symbol changed. Bypass symbol checks when
1559 using tlsld_got.
1560 * elf32-ppc.c (ppc_elf_tls_setup): Correct comment.
1561 (branch_reloc_hash_match): New function, extracted from..
1562 (ppc_elf_tls_optimize): ..here.
1563 (ppc_elf_relocate_section): Avoid unnecessary reading of insns.
1564 Don't clear addend on zapped __tls_get_addr reloc.
1565
1566 2009-02-12 Nick Clifton <nickc@redhat.com>
1567
1568 PR 9827
1569 * elflink.c (bfd_elf_final_link): When counting the relocations,
1570 if the header size has not been set yet then assume that it will
1571 match the output section's reloc type.
1572
1573 2009-02-12 Nathan Sidwell <nathan@codesourcery.com>
1574
1575 * elf32-mips.c (mips_elf_final_gp): Don't add 0x4000 offset for
1576 relocatable link.
1577
1578 2009-02-09 Alan Modra <amodra@bigpond.net.au>
1579
1580 * elf32-spu.c (spu_elf_find_overlays): Call bfd_set_error on errors.
1581 (find_function): Likewise.
1582 (pasted_function): Don't error if no prior function found.
1583 (discover_functions): Revert 2008-12-10 change. Extend first
1584 function range to start of section.
1585
1586 2009-02-08 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1587
1588 * elf64-hppa.c: Remove PARAMS macro. Replace PTR with void *. Convert
1589 functions to C90.
1590 * elf64-hppa.h: Likewise.
1591
1592 2009-02-06 Joseph Myers <joseph@codesourcery.com>
1593
1594 * elfxx-mips.c (_bfd_mips_elf_section_processing): Remove special
1595 .sbss handling.
1596
1597 2009-02-04 Alan Modra <amodra@bigpond.net.au>
1598
1599 * elf32-spu.c (spu_elf_build_stubs): Define __icache_neg_log2_linesize.
1600 Define __icache_ptr_handler*, not __icache_ptr___icache_bi_handler*.
1601
1602 2009-02-03 Sandip Matte <sandip@rmicorp.com>
1603
1604 * aoutx.h (NAME (aout, machine_type)): Handle bfd_mach_mips_xlr.
1605 * archures.c (bfd_mach_mips_xlr): Define.
1606 * bfd-in2.h: Regenerate.
1607 * cpu-mips.c (I_xlr): Define.
1608 (arch_info_struct): Add XLR entry.
1609 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_XLR.
1610 (mips_set_isa_flags): Handle bfd_mach_mips_xlr
1611 (mips_mach_extensions): Add XLR entry.
1612
1613 2009-02-03 Eric B. Weddington <eric.weddington@atmel.com>
1614
1615 * elf32-avr.c (avr_final_link_relocate): Allow avr25 to wraparound.
1616
1617 2009-02-03 Carlos O'Donell <carlos@codesourcery.com>
1618
1619 * configure.in: AC_SUBST pdfdir.
1620 * Makefile.am: Add install-pdf, install-pdf-am
1621 and install-pdf-recursive targets. Define pdfdir.
1622 * doc/Makefile.am: Define pdf__strip_dir. Add
1623 install-pdf and install-pdf-am targets.
1624 * po/Make-in: Add install-pdf target.
1625 * configure: Regenerate.
1626 * Makefile.in: Regenerate
1627 * doc/Makefile.in: Regenerate.
1628
1629 2009-02-03 Maxim Kuvyrkov <maxim@codesourcery.com>
1630
1631 * bfd-in2.h: Regenerate.
1632 * elf32-m68k.c: Handle 2-slot GOT entries. Rename variables and
1633 fields from n_entries to n_slots where appropriate, update comments.
1634 (HOWTO): Add TLS relocations.
1635 (reloc_map): Map BFD_RELOC_68K_TLS_* to R_68K_TLS_*.
1636 (enum elf_m68k_got_offset_size): New enum.
1637 (struct elf_m68k_got_entry.type): Move field to ...
1638 (struct elf_m68k_got_entry_key): ... here. Update all uses.
1639 (elf_m68k_reloc_got_type, elf_m68k_reloc_got_offset_size): New static
1640 functions.
1641 (elf_m68k_reloc_got_n_entries, elf_m68k_reloc_tls_p): New static
1642 functions.
1643 (struct elf_m68k_got): merge rel_8o_n_entries and rel_8o_16o_n_entries
1644 fields into n_entries array. Update comments.
1645 (elf_m68k_init_got): Simplify, update all uses.
1646 (elf_m68k_init_got_entry_key): Handle R_68K_TLS_LDM32 reloc, update.
1647 (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT): Adjust to handle 2-slot
1648 GOT entries; update name, update all uses.
1649 (ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): Ditto.
1650 (elf_m68k_get_got_entry): Update.
1651 (elf_m68k_update_got_entry_type): Rewrite to handle TLS GOT entries,
1652 simplify.
1653 (elf_m68k_remove_got_entry_type): Simplify.
1654 (elf_m68k_add_entry_to_got, elf_m68k_can_merge_gots_1): Update.
1655 (elf_m68k_can_merge_gots): Update.
1656 (elf_m68k_merge_gots_1, elf_m68k_merge_gots): Update.
1657 (struct elf_m68k_finalize_got_offsets_arg): Rewrite to handle 2-slot
1658 GOT entries, simplify.
1659 (elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Same.
1660 (struct elf_m68k_partition_multi_got_arg): Add slots_relas_diff
1661 field, remove obsoleted local_n_entries field.
1662 (elf_m68k_partition_multi_got_2): New static function.
1663 (elf_m68k_partition_multi_got_1, elf_m68k_partition_multi_got): Use it;
1664 update.
1665 (elf_m68k_remove_got_entry_type): Update.
1666 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
1667 (elf_m68k_check_relocs): Handle TLS relocations. Remove unnecessary
1668 update of sgot->size and srelgot->size.
1669 (elf_m68k_gc_sweep_hook): Update.
1670 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
1671 (elf_m68k_relocate_section, elf_m68k_finish_dynamic_symbol): Handle
1672 TLS relocations.
1673 * reloc.c (BFD_RELOC_68K_TLS_*): Declare TLS relocations.
1674 * libbfd.h (bfd_reloc_code_real_names): Add BFD_RELOC_68K_TLS_*.
1675
1676 2009-02-02 DJ Delorie <dj@redhat.com>
1677
1678 * elf32-mep.c (config_names): Regenerate configuration.
1679
1680 2009-02-02 Alan Modra <amodra@bigpond.net.au>
1681
1682 * elf-bfd.h (bfd_elf_get_str_section): Don't declare.
1683 (bfd_elf_find_section, _sh_elf_set_mach_from_flags): Likewise.
1684 * elf.c (bfd_elf_get_str_section): Make static.
1685 (bfd_elf_find_section): Delete.
1686 * libbfd.h: Regenerate.
1687
1688 2009-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
1689
1690 * elf-eh-frame.c (REQUIRE_CLEARED_RELOCS) Remove.
1691 (_bfd_elf_parse_eh_frame): Do not check relocations for removed FDEs.
1692
1693 2009-01-31 Alan Modra <amodra@bigpond.net.au>
1694
1695 * elflink.c (on_needed_list): New function.
1696 (elf_link_add_object_symbols): Link in --as-needed libs if they
1697 satisfy undefined symbols in other libs.
1698
1699 2009-01-30 Julian Brown <julian@codesourcery.com>
1700
1701 * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Skip BFDs with
1702 EXEC_P or DYNAMIC flags, and skip sections which are being linked
1703 with --just-symbols (-R).
1704
1705 2009-01-29 Adam Nemet <anemet@caviumnetworks.com>
1706
1707 * dwarf2.c (read_rangelist): Use read_address to read low_pc and
1708 high_pc in order to properly sign-extend VMAs.
1709
1710 2009-01-29 Daniel Jacobowitz <dan@codesourcery.com>
1711 Mark Shinwell <shinwell@codesourcery.com>
1712 Catherine Moore <clm@codesourcery.com>
1713
1714 * elf-attrs.c, elflink.c, elfxx-mips.c: Correct typos in comments.
1715
1716 2009-01-28 Catherine Moore <clm@codesourcery.com>
1717
1718 * elf32-arm.c (elf32_arm_check_relocs): Set SEC_ALLOC and
1719 SEC_LOAD for dynamic relocation sections.
1720
1721 2009-01-27 Hans-Peter Nilsson <hp@axis.com>
1722
1723 * elf32-cris.c (cris_elf_relocate_section): Use elf_hash_table
1724 (info)->tls_size, not elf_hash_table (info)->tls_sec->size for
1725 the size of local TLS data.
1726
1727 2009-01-27 Andreas Schwab <schwab@suse.de>
1728
1729 * mach-o.c (bfd_mach_o_archive_p): Restrict the number of
1730 architectures in the archive.
1731
1732 2009-01-27 Hans-Peter Nilsson <hp@axis.com>
1733
1734 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_DTPREL>
1735 <R_CRIS_32_DTPREL>: Correct relocation value.
1736
1737 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_8>
1738 <R_CRIS_16, R_CRIS_32>: Don't call BFD_ASSERT for weak undefined
1739 symbols with non-default visibility.
1740
1741 2009-01-26 Nathan Sidwell <nathan@codesourcery.com>
1742
1743 * elf32-ppc.c (ppc_elf_relax_section): Add space for relocs
1744 describing the trampolines.
1745 (ppc_elf_relocate_section): Update relocs to describe the
1746 trampolines.
1747
1748 2009-01-25 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1749
1750 * elf-hppa.h (elf_hppa_final_link_relocate): Add check to ensure that
1751 branch targets can be reached for R_PARISC_PCREL22F, R_PARISC_PCREL17F
1752 and R_PARISC_PCREL12F relocations.
1753
1754 2009-01-24 Alan Modra <amodra@bigpond.net.au>
1755
1756 PR 6022
1757 * elflink.c (find_version_for_sym): New function split out from,
1758 but without export_dynamic test, ..
1759 (_bfd_elf_link_assign_sym_version): ..here.
1760 (_bfd_elf_export_symbol): Use it.
1761
1762 2009-01-23 Alan Modra <amodra@bigpond.net.au>
1763
1764 * elf-bfd.h (struct elf_assign_sym_version_info): Delete.
1765 (struct elf_info_failed, struct elf_find_verdep_info): Move to..
1766 * elflink.c: ..here, somewhat modified.
1767 * elf-bfd.h (_bfd_elf_add_default_symbol, _bfd_elf_export_symbol,
1768 _bfd_elf_link_find_version_dependencies,
1769 _bfd_elf_link_assign_sym_version, _bfd_elf_link_size_reloc_section,
1770 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
1771 _bfd_elf_link_sec_merge_syms, bfd_elf_link_mark_dynamic_symbol): Don't
1772 declare..
1773 * elflink.c: ..and make static here.
1774 (_bfd_elf_link_find_version_dependencies): Adjust for removal
1775 of output_bfd from struct elf_find_verdep_info.
1776 (_bfd_elf_link_assign_sym_version): Similarly adjust to use
1777 struct elf_info_failed.
1778 (bfd_elf_size_dynamic_sections): Adjust.
1779
1780 2009-01-22 Alan Modra <amodra@bigpond.net.au>
1781
1782 PR 6832
1783 * dwarf2.c (find_line): Don't update stash->sec_info_ptr until
1784 after comp_unit_find_line call.
1785
1786 2009-01-21 Nick Clifton <nickc@redhat.com>
1787
1788 PR 9769
1789 * vmsutil.c (vms_file_stats_name): Remove use of unsupported
1790 tm_gmtoff field in struct tm.
1791
1792 2009-01-21 Alan Modra <amodra@bigpond.net.au>
1793
1794 * elf32-spu.h (struct spu_elf_params): Add non_ia_text.
1795 * elf32-spu.c (mark_overlay_section): Only include .text.ia.*
1796 sections in soft-icache lines unless non_ia_text. Don't add
1797 rodata if doing so would exceed line size.
1798
1799 2009-01-19 Hans-Peter Nilsson <hp@axis.com>
1800
1801 * elf32-cris.c (elf_cris_copy_indirect_symbol): For other symbol
1802 types than bfd_link_hash_indirect, before early return, call
1803 _bfd_elf_link_hash_copy_indirect.
1804
1805 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
1806
1807 * elf-attrs.c (vendor_set_obj_attr_contents): Support tag ordering.
1808 * elf-bfd.h (elf_backend_data): Add obj_attrs_order.
1809 * elf32-arm.c (elf32_arm_obj_attrs_order): New function.
1810 (elf_backend_obj_attrs_order): New define.
1811 * elfxx-target.h (elf_backend_obj_attrs_order): New define.
1812 (elfNN_bed): Add elf_backend_obj_attrs_order.
1813
1814 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
1815
1816 * elf-attrs.c (is_default_attr): Substitute magic numbers with macros.
1817 (obj_attr_size): Likewise.
1818 (write_obj_attribute): Likewise.
1819 (_bfd_elf_copy_obj_attributes): Likewise.
1820 (_bfd_elf_parse_attributes): Likewise.
1821 * elf-bfd.h (ATTR_TYPE_FLAG_INT_VAL): New define.
1822 (ATTR_TYPE_FLAG_STR_VAL, ATTR_TYPE_FLAG_NO_DEFAULT): New defines.
1823 (ATTR_TYPE_HAS_INT_VAL, ATTR_TYPE_HAS_STR_VAL): New defines.
1824 (ATTR_TYPE_HAS_NO_DEFAULT): New define.
1825 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Replace magic numbers
1826 with macros.
1827
1828 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
1829
1830 * elf-attrs.c (is_default_attr): Support defaultless attributes.
1831 (bfd_elf_add_obj_attr_int): Get type from _bfd_elf_obj_attrs_arg_type.
1832 (bfd_elf_add_obj_attr_string): Likewise.
1833 (bfd_elf_add_obj_attr_int_string): Likewise.
1834 (_bfd_elf_parse_attributes): Allow for unknown flag bits in type.
1835 * elf-bfd.h (struct obj_attribute): Document new flag bit.
1836 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Specify that
1837 Tag_nodefaults has no default value.
1838 (elf32_arm_merge_eabi_attributes): Modify the Tag_nodefaults
1839 comment to reflect the new state.
1840
1841 2009-01-19 Alan Modra <amodra@bigpond.net.au>
1842
1843 PR 9695
1844 * pdp11.c (N_BADMAG): True for anything but OMAGIC, NMAGIC, ZMAGIC.
1845 (some_aout_object_p): Delete dead code handling QMAGIC and BMAGIC.
1846 (adjust_z_magix): Delete dead code handling QMAGIC.
1847
1848 2009-01-16 Kai Tietz <kai.tietz@onevision.com>
1849
1850 * coffcode.h (styp_to_sec_flags): Correct interpretation of
1851 IMAGE_SCN_MEM_DISCARDABLE.
1852
1853 2009-01-16 Alan Modra <amodra@bigpond.net.au>
1854
1855 * Makefile.am (libbfd_la_LIBADD, libbfd_la_LDFLAGS): Substitute
1856 SHARED_LIBADD and SHARED_LDFLAGS rather than WIN32LIBADD, WIN32LDFLAGS.
1857 * configure.in (commonbfdlib): Delete.
1858 (SHARED_LDFLAGS): Rename from WIN32LDFLAGS/
1859 (SHARED_LIBADD): Rename from WIN32LIBADD. Add pic libiberty if such
1860 is available, not just for linux.
1861 * po/SRC-POTFILES.in: Regenerate.
1862 * Makefile.in: Regenerate.
1863 * configure: Regenerate.
1864
1865 2009-01-15 Andrew Stubbs <ams@codesourcery.com>
1866 Julian Brown <julian@codesourcery.com>
1867
1868 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 71 to include all known
1869 ARM attributes in ABI 2.07.
1870 * elf32-arm.c (get_secondary_compatible_arch): New function.
1871 (set_secondary_compatible_arch): New function.
1872 (tag_cpu_arch_combine): New function.
1873 (elf32_arm_copy_one_eabi_other_attribute): Delete function.
1874 (elf32_arm_copy_eabi_other_attribute_list): Delete function.
1875 (elf32_arm_merge_eabi_attributes): Rename order_312 to order_021 to
1876 make it fit with order_01243.
1877 Add support for Tag_also_compatible_with,
1878 Tag_CPU_unaligned_access, Tag_T2EE_use, Tag_Virtualization_use,
1879 Tag_MPextension_use, Tag_nodefaults and Tag_conformance.
1880 Improve/tidy up support for Tag_CPU_raw_name, Tag_CPU_name,
1881 Tag_CPU_arch, Tag_ABI_HardFP_use, Tag_VFP_HP_extension,
1882 Tag_ABI_FP_denormal, Tag_ABI_PCS_GOT_use, Tag_ABI_align8_needed,
1883 Tag_VFP_arch and Tag_ABI_FP_16bit_format.
1884 Rework the way unknown attributes are handled.
1885 Defer errors until all attributes have been processed.
1886
1887 2009-01-15 Andrew Stubbs <ams@codesourcery.com>
1888
1889 * elf-attrs.c (bfd_elf_add_obj_attr_compat): Rename to
1890 bfd_elf_add_obj_attr_int_string.
1891 Read Tag_compatibility from its new location in the attribute array,
1892 rather than the attribute list.
1893 (_bfd_elf_copy_obj_attributes): bfd_elf_add_obj_attr_compat ->
1894 bfd_elf_add_obj_attr_int_string.
1895 (_bfd_elf_parse_attributes): Likewise.
1896 (_bfd_elf_merge_object_attributes): There's now only one
1897 Tag_compatibility, and it's in the array, not the list.
1898 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 33 to include
1899 Tag_compatibility.
1900 (bfd_elf_add_obj_attr_compat): Rename to
1901 bfd_elf_add_obj_attr_int_string.
1902 (bfd_elf_add_proc_attr_compat): Rename to
1903 bfd_elf_add_proc_attr_int_string.
1904 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Explicitly don't handle
1905 Tag_compatibility.
1906
1907 2009-01-15 Douglas B Rupp <rupp@gnat.com>
1908
1909 * Makefile.am (BFD32_BACKENDS): Add new object vmsutil.lo
1910 (BFD32_BACKENDS_CFILES): Add new file vmsutil.c
1911 (vmsutil.lo): Add dependency rule.
1912 * Makefile.in: Regenerate.
1913 * config.bfd (ia64*-*-*vms*): Add case.
1914 * configure.in (bfd_elf64_ia64_vms_vec): Add case.
1915 * configure: Regenerate.
1916 * vmsutil.c: New file.
1917 * vmsutil.h: New file.
1918 * elf-bfd.h (struct bfd_elf_special_section): Change type of
1919 attr to bfd_vma.
1920 * elfxx-ia64.c (elfNN_vms_post_process_headers,
1921 elfNN_vms_section_processing, elfNN_vms_final_write_processing,
1922 elfNN_vms_close_and_cleanup, elfNN_vms_section_from_shdr,
1923 elfNN_vms_object_p): New functions
1924 * targets.c (bfd_elf64_ia64_vms_vec): New target.
1925
1926 2009-01-14 H.J. Lu <hongjiu.lu@intel.com>
1927
1928 PR ld/9727
1929 * elflink.c (elf_gc_sweep): Exclude the group section if the
1930 first member of the section group is excluded.
1931
1932 2009-01-14 Alan Modra <amodra@bigpond.net.au>
1933
1934 PR 9735
1935 * syms.c (_bfd_stab_section_find_nearest_line): Don't free
1936 saved filename, use bfd_alloc rather than bfd_malloc for it.
1937
1938 2009-01-13 Alan Modra <amodra@bigpond.net.au>
1939
1940 * elf32-spu.c (spu_elf_build_stubs): Make __icache_base absolute.
1941
1942 2009-01-13 Alan Modra <amodra@bigpond.net.au>
1943
1944 * elf32-spu.c (remove_cycles): Always set call->max_depth.
1945
1946 2009-01-12 Alan Modra <amodra@bigpond.net.au>
1947
1948 * elf32-spu.c (spu_elf_auto_overlay): Correct vma mask.
1949
1950 2009-01-12 Alan Modra <amodra@bigpond.net.au>
1951
1952 * elf32-spu.c (struct spu_link_hash_table): Add init, line_size_log2,
1953 num_lines_log2.
1954 (struct got_entry): Add br_addr.
1955 (struct call_info): Add priority.
1956 (struct function_info): Add lr_store and sp_adjust.
1957 (spu_elf_setup): Init line_size_log2 and num_lines_log2.
1958 (spu_elf_find_overlays): For soft-icache, mark any section within cache
1959 area as an overlay, and check that no other overlays exist. Look up
1960 icache overlay manager entry sym.
1961 (BRA_STUBS, BRA, BRASL): Define.
1962 (enum _stub_type): Replace ovl_stub with call_ovl_stub and br*_ovl_stub.
1963 (needs_ovl_stub): Adjust for soft-icache. Return priority encoded
1964 in branch insn.
1965 (count_stub, build_stub): Support soft-icache.
1966 (build_spuear_stubs, process_stubs): Adjust build_stub call.
1967 (spu_elf_size_stubs): Size soft-icache stubs.
1968 (overlay_index): New function.
1969 (spu_elf_build_stubs): Make static. Support soft-icache.
1970 (spu_elf_check_vma): Don't turn off auto_overlay if soft-icache.
1971 (find_function_stack_adjust): Save lr store and stack adjust insn
1972 offsets.
1973 (maybe_insert_function): Adjust find_function_stack_adjust call.
1974 (mark_functions_via_relocs): Retrieve priority.
1975 (remove_cycles): Only warn about pruned arcs when stack_analysis.
1976 (sort_calls): Sort by priority first.
1977 (mark_overlay_section): Ignore .ovl.init.
1978 (sum_stack): Only print when stack_analysis.
1979 (print_one_overlay_section): New function, extracted from..
1980 (spu_elf_auto_overlay): ..here. Support soft-icache overlays.
1981 (spu_elf_stack_analysis): Only print when htab->stack_analysis.
1982 (spu_elf_final_link): Call spu_elf_stack_analysis for lrlive
1983 analysis. Call spu_elf_build_stubs.
1984 (spu_elf_relocate_section): For soft-icache encode overlay index
1985 into addresses.
1986 (spu_elf_output_symbol_hook): Support soft-icache.
1987 (spu_elf_modify_program_headers: Likewise.
1988
1989 * elf32-spu.h (struct spu_elf_params): Add lrlive_analysis. Rename
1990 num_regions to num_lines. Add line_size and max_branch.
1991 (enum _ovly_flavour): Add ovly_soft_icache.
1992 (spu_elf_build_stubs): Delete.
1993
1994 2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
1995
1996 * elflink.c (_bfd_elf_section_already_linked): Handle g++-3.4
1997 relocations in `.gnu.linkonce.r.*' referencing its `.gnu.linkonce.t.*'.
1998
1999 2009-01-07 Hans-Peter Nilsson <hp@axis.com>
2000
2001 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
2002 <case R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: For a symbol defined in
2003 the program, the known offset starts at the negative size of the
2004 TLS section.
2005 <case R_CRIS_32_IE, R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL>:
2006 Similar.
2007
2008 2009-01-05 Joel Sherrill <joel.sherrill@oarcorp.com>
2009
2010 * config.bfd: Add lm32-*-rtems*.
2011
2012 2009-01-03 H.J. Lu <hongjiu.lu@intel.com>
2013
2014 * coff-ppc.c: Add 2009 to Copyright.
2015 * elf32-cris.c: Likewise.
2016 * elflink.c: Likewise.
2017
2018 2009-01-03 Hans-Peter Nilsson <hp@axis.com>
2019
2020 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Rename
2021 gotplt_index to rela_plt_index. Adjust for R_CRIS_DTPMOD entry.
2022
2023 2009-01-02 H.J. Lu <hongjiu.lu@intel.com>
2024
2025 PR ld/9679
2026 * elflink.c (elf_merge_st_other): New.
2027 (_bfd_elf_merge_symbol): Use it on skipped weak definitions and
2028 hide them if needed.
2029 (elf_link_add_object_symbols): Updated.
2030
2031 2009-01-02 H.J. Lu <hongjiu.lu@intel.com>
2032
2033 PR ld/9676
2034 * elflink.c (elf_link_add_object_symbols): Update def_dynamic,
2035 ref_dynamic and dynamic_def fields when setting def_regular
2036 to 1.
2037
2038 2009-01-02 Curtis Mackie <curtmackevo@gmail.com>
2039
2040 PR 9682
2041 * coff-ppc.c (dump_toc): Fix up calls to fprintf without a string
2042 literal.
2043
2044 For older changes see ChangeLog-2008
2045 \f
2046 Local Variables:
2047 mode: change-log
2048 left-margin: 8
2049 fill-column: 74
2050 version-control: never
2051 End:
This page took 0.083457 seconds and 5 git commands to generate.