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