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