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