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