1 2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
3 * elf32-vax.c (elf_vax_relocate_section): For symbol references
4 from an executable to a shared library treat R_VAX_PC32
5 relocations as R_VAX_PLT32 ones.
7 2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
9 * elf32-vax.c (elf_vax_instantiate_got_entries): Skip local
10 symbols in GOT space calculation.
11 (elf_vax_relocate_section): Adjust accordingly.
13 2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
15 * elf32-vax.c (elf_vax_plt_entry): Set the entry mask to
18 2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
20 * elf32-vax.c (elf_vax_check_relocs): Handle the visibility
22 (elf_vax_relocate_section): Likewise.
24 2009-06-15 H.J. Lu <hongjiu.lu@intel.com>
26 * elf32-i386.c (elf_i386_allocate_dynrelocs): Update comments.
27 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
29 2009-06-15 H.J. Lu <hongjiu.lu@intel.com>
31 * elf32-i386.c (elf_i386_check_relocs): Reformat.
32 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
34 2009-06-15 H.J. Lu <hongjiu.lu@intel.com>
36 * Makefile.am: Run "make dep-am".
37 * Makefile.in: Regenerated.
39 2009-06-15 H.J. Lu <hongjiu.lu@intel.com>
41 * elf32-i386.c (elf_i386_allocate_dynrelocs): Fix a typo.
42 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
44 2009-06-15 Nick Clifton <nickc@redhat.com>
46 * po/ru.po: New Russian translation.
47 * configure.in (ALL_LINGUAS): Add ru.
48 * configure: Regenerate.
50 2009-06-14 H.J. Lu <hongjiu.lu@intel.com>
52 * elf32-i386.c: Remove duplicated comments.
54 2009-06-14 H.J. Lu <hongjiu.lu@intel.com>
57 * elf32-i386.c (elf_i386_allocate_dynrelocs): Disallow
58 dynamic IFUNC pointer in non-shared object. Use .got.plt
59 for IFUNC definition in PIE.
60 (elf_i386_allocate_dynrelocs): Resolve IFUNC definition in
63 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Disallow
64 dynamic IFUNC pointer in non-shared object. Use .got.plt
65 for IFUNC definition in PIE.
66 (elf64_x86_64_relocate_section): Resolve IFUNC definition in
69 2009-06-13 H.J. Lu <hongjiu.lu@intel.com>
71 * elf32-i386.c (elf_i386_check_relocs): Properly report
72 local symbol for unhandled relocation against STT_GNU_IFUNC
74 (elf_i386_relocate_section): Likewise.
75 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
76 (elf64_x86_64_relocate_section): Likewise.
78 2009-06-13 H.J. Lu <hongjiu.lu@intel.com>
81 * elf32-i386.c: Include "objalloc.h" and "hashtab.h".
82 (elf_i386_link_hash_table): Add loc_hash_table and
84 (elf_i386_local_hash): New.
85 (elf_i386_local_htab_hash): Likewise.
86 (elf_i386_local_htab_eq): Likewise.
87 (elf_i386_get_local_sym_hash): Likewise.
88 (elf_i386_link_hash_table_free): Likewise.
89 (elf_i386_allocate_local_dynrelocs): Likewise.
90 (elf_i386_finish_local_dynamic_symbol): Likewise.
91 (bfd_elf64_bfd_link_hash_table_free): Likewise.
92 (elf_i386_link_hash_table_create): Create loc_hash_table and
94 (elf_i386_check_relocs): Handle local STT_GNU_IFUNC symbols.
95 (elf_i386_size_dynamic_sections): Likewise.
96 (elf_i386_relocate_section): Likewise.
97 (elf_i386_finish_dynamic_sections): Likewise.
98 (elf_i386_finish_dynamic_symbol): Check _DYNAMIC only if sym
101 * elf64-x86-64.c: Include "objalloc.h" and "hashtab.h".
102 (elf64_x86_64_link_hash_table): Add loc_hash_table and
104 (elf64_x86_64_local_hash): New.
105 (elf64_x86_64_local_htab_hash): Likewise.
106 (elf64_x86_64_local_htab_eq): Likewise.
107 (elf64_x86_64_get_local_sym_hash): Likewise.
108 (elf64_x86_64_link_hash_table_free): Likewise.
109 (elf64_x86_64_allocate_local_dynrelocs): Likewise.
110 (elf64_x86_64_finish_local_dynamic_symbol): Likewise.
111 (bfd_elf64_bfd_link_hash_table_free): Likewise.
112 (elf64_x86_64_link_hash_table_create): Create loc_hash_table
114 (elf64_x86_64_check_relocs): Handle local STT_GNU_IFUNC
116 (elf64_x86_64_size_dynamic_sections): Likewise.
117 (elf64_x86_64_relocate_section): Likewise.
118 (elf64_x86_64_finish_dynamic_sections): Likewise.
119 (elf64_x86_64_finish_dynamic_symbol): Check _DYNAMIC only if
122 2009-06-10 Philip Blundell <philb@gnu.org>
124 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Avoid crash if
125 elf_sec->this_hdr == NULL.
127 2009-06-12 Tristan Gingold <gingold@adacore.com>
129 * reloc.c: Add BFD_RELOC_MACH_O_SECTDIFF and BFD_RELOC_MACH_O_PAIR.
130 * bfd-in2.h: Regenerated.
131 * libbfd.h: Regenerated.
133 * mach-o.c (FILE_ALIGN): New macro.
134 (bfd_mach_o_canonicalize_symtab): Adjust for bfd_mach_o_asymbol.
135 (bfd_mach_o_print_symbol): Ditto.
136 (bfd_mach_o_scan_write_thread): Adjust type of variable offset.
137 (bfd_mach_o_get_reloc_upper_bound): New function.
138 (bfd_mach_o_canonicalize_reloc): Ditto.
139 (bfd_mach_o_scan_write_relocs): Ditto.
140 (bfd_mach_o_scan_write_section_32): Remove offset argument.
141 (bfd_mach_o_scan_write_section_64): Ditto.
142 (bfd_mach_o_scan_write_segment_32): Write relocs. Fix size of data
143 written for load command. Do not compute section file offset.
144 (bfd_mach_o_scan_write_segment_64): Ditto.
145 (bfd_mach_o_scan_write_symtab): Compute file offset first.
146 Adjust for bfd_mach_o_asymbol. Move code to convert from BFD to
148 (bfd_mach_o_mangle_symbols): ... this new function.
149 (bfd_mach_o_write_contents): Be sure to habe load commands built.
150 Call bfd_mach_o_mangle_symbols.
151 (bfd_mach_o_build_commands): Adjust for filelen field.
152 Use FILE_ALIGN macro. Clear section file offset if section is empty.
153 Do not set symtab file offset anymore here.
154 (bfd_mach_o_make_empty_symbol): Allocate a bfd_mach_o_asymbol.
155 (bfd_mach_o_make_bfd_section): Set SEC_RELOC if has reloc.
156 Set reloc_count and rel_filepos section fields.
157 (bfd_mach_o_scan_read_section_32): Type of argument offset is now
159 (bfd_mach_o_scan_read_section_64): Ditto.
160 (bfd_mach_o_scan_read_section): Ditto.
161 (bfd_mach_o_scan_read_symtab_symbol): Typr of argument s is now
162 bfd_mach_o_asymbol. Use unsigned int for file offset type.
163 (bfd_mach_o_scan_read_symtab_symbol): Adjust for bfd_mach_o_asymbol.
164 Handle weak-ref symbols.
165 (bfd_mach_o_scan_read_symtab_symbols): Adjust for bfd_mach_o_asymbol.
166 (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
167 (bfd_mach_o_scan): Remove assignment to removed field.
168 (bfd_mach_o_mkobject_init): Ditto.
169 (bfd_mach_o_bfd_print_private_bfd_data): Adjust printf formatter.
170 (bfd_mach_o_bfd_reloc_type_lookup): New macro.
171 (bfd_mach_o_bfd_reloc_name_lookup): Ditto.
172 (bfd_mach_o_swap_reloc_in): Ditto.
173 (bfd_mach_o_swap_reloc_out): Ditto.
175 * mach-o.h (BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_NON_LAZY)
176 (BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_LAZY)
177 (BFD_MACH_O_REFERENCE_FLAG_DEFINED)
178 (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_DEFINED)
179 (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_NON_LAZY)
180 (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_LAZY)
181 (BFD_MACH_O_REFERENCED_DYNAMICALLY, BFD_MACH_O_N_DESC_DISCARDED)
182 (BFD_MACH_O_N_NO_DEAD_STRIP, BFD_MACH_O_N_WEAK_REF)
183 (BFD_MACH_O_N_WEAK_DEF): New macros.
185 (bfd_mach_o_section_type): Add new enumeration values.
186 (BFD_MACH_O_S_SELF_MODIFYING_CODE)
187 (BFD_MACH_O_S_ATTR_LIVE_SUPPORT)
188 (BFD_MACH_O_S_ATTR_NO_DEAD_STRIP)
189 (BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS, BFD_MACH_O_S_ATTR_NO_TOC): New
191 (BFD_MACH_O_GENERIC_RELOC_VANILLA)
192 (BFD_MACH_O_GENERIC_RELOC_PAIR)
193 (BFD_MACH_O_GENERIC_RELOC_SECTDIFF)
194 (BFD_MACH_O_GENERIC_RELOC_PB_LA_PTR)
195 (BFD_MACH_O_GENERIC_RELOC_LOCAL_SECTDIFF): Ditto.
196 (BFD_MACH_O_RELENT_SIZE): Ditto.
197 (BFD_MACH_O_R_PCREL, BFD_MACH_O_GET_R_LENGTH)
198 (BFD_MACH_O_R_EXTERN, BFD_MACH_O_GET_R_TYPE)
199 (BFD_MACH_O_GET_R_SYMBOLNUM, BFD_MACH_O_SET_R_LENGTH)
200 (BFD_MACH_O_SET_R_TYPE, BFD_MACH_O_SET_R_SYMBOLNUM): Ditto.
201 (BFD_MACH_O_SR_SCATTERED, BFD_MACH_O_SR_PCREL)
202 (BFD_MACH_O_GET_SR_LENGTH, BFD_MACH_O_GET_SR_TYPE)
203 (BFD_MACH_O_GET_SR_ADDRESS, BFD_MACH_O_SET_SR_LENGTH)
204 (BFD_MACH_O_SET_SR_TYPE, BFD_MACH_O_SET_SR_ADDRESS): Ditto.
205 (bfd_mach_o_reloc_info): New struct.
206 (bfd_mach_o_asymbol): New struct.
207 (bfd_mach_o_symtab_command): The symbols field is now of type
209 (bfd_mach_o_load_command): The offset and len fields are now of type
211 (mach_o_data_struct): Remove symbols, nsymbols and ibfd fields.
212 Add a filelen field. Add comments.
213 (bfd_mach_o_backend_data): New struct.
214 (bfd_mach_o_get_backend_data): New macro.
215 (bfd_mach_o_scan_read_symtab_symbol): Parameter symbol now of type
217 (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
218 (bfd_mach_o_get_reloc_upper_bound): New prototype.
219 (bfd_mach_o_canonicalize_reloc): Ditto.
221 * mach-o-target.c (bfd_mach_o_bfd_is_local_label_name): Remove
222 duplicated macro. Now defined to _bfd_generic_is_local_label.
223 (TARGET_NAME_BACKEND): New macro...
224 (TARGET_NAME_BACKEND): ... used to name a new variable.
225 (TARGET_NAME): Define relocs table using bfd_mach_o, reference
228 * mach-o-i386.c (i386_howto_table): New variable.
229 (bfd_mach_o_i386_swap_reloc_in): New function.
230 (bfd_mach_o_i386_swap_reloc_out): Ditto.
231 (bfd_mach_o_i386_bfd_reloc_type_lookup): Ditto.
232 (bfd_mach_o_i386_bfd_reloc_name_lookup): Ditto.
233 (bfd_mach_o_swap_reloc_in, bfd_mach_o_swap_reloc_out): New macros.
234 (bfd_mach_o_bfd_reloc_type_lookup)
235 (bfd_mach_o_bfd_reloc_name_lookup): Ditto.
237 2009-06-11 Eric Paris <eparis@redhat.com>
238 Nick Clifton <nickc@redhat.com>
240 * opncls.c (_maybe_make_executable): New function. Gives execute
241 permission to an executable bfd that was opened for writing
242 provided that it is a regular file. Replaces common code found in...
243 (bfd_close): here and ...
244 (bfd_close_all_done): here.
246 2009-06-11 Anthony Green <green@moxielogic.com>
248 * reloc.c: Add BFD_RELOC_MOXIE_10_PCREL.
249 * bfd-in2.h: Rebuilt.
251 * elf32-moxie.c (moxie_elf_howto_table): Add R_MOXIE_PCREL10
253 (moxie_reloc_map): Ditto.
254 Clean up copyright notice.
256 2009-06-10 Paul Pluzhnikov <ppluzhnikov@google.com>
258 * bfd-in2.h: bfd_mmap prototype.
259 * bfdio.c (bfd_mmap): New function.
260 * libbfd.h (bfd_iovec): Add bmmap.
261 * cache.c (cache_bmmap): New function.
262 (cache_iovec): Initialize bmmap member.
263 * opencls.c (opncls_bmmap): New function.
264 (opncls_iovec): Initialize bmmap member.
266 2009-06-09 Tristan Gingold <gingold@adacore.com>
268 * mach-o.h (bfd_mach_o_symtab_command): Remove stabs_segment
269 and stabstr_segment fields.
270 (mach_o_be_vec, mach_o_le_vec): Removed
271 (bfd_mach_o_version): New prototype.
273 * mach-o.c (bfd_mach_o_version): Make this function public.
274 (mach_o_wide_p): New function.
275 (bfd_mach_o_wide_p): Ditto.
276 (bfd_mach_o_convert_section_name_to_bfd): Add prefix only for
278 (bfd_mach_o_convert_section_name_to_mach_o): Fix typo in comment.
279 Search in the list only if the name starts with a dot.
280 (bfd_mach_o_write_header): Use mach_o_wide_p instead of hard-coded
281 test. Check bfd_seek status.
282 (bfd_mach_o_scan_write_thread): Check bfd_seek status.
283 (bfd_mach_o_scan_write_section_32): Ditto.
284 (bfd_mach_o_scan_write_section_64): Ditto.
285 (bfd_mach_o_scan_write_section): Removed.
286 (bfd_mach_o_scan_write_segment): Split into ...
287 (bfd_mach_o_scan_write_segment_32): ... this and ...
288 (bfd_mach_o_scan_write_segment_64): ... this. Check bfd_seek status.
289 (bfd_mach_o_scan_write_symtab_symbols): Moved into ...
290 (bfd_mach_o_scan_write_symtab): ... this. Write symtab from BFD
291 symbol table. Now returns a boolean.
292 (bfd_mach_o_write_contents): Set filetype. Check bfd_seek status.
293 Adjust for status type.
294 (bfd_mach_o_build_commands): Use mach_o_wide_p instead of hard-coded
295 test. Write symbol table. Numbers the sections.
296 (bfd_mach_o_read_header): Check bfd_seek status.
297 Use mach_o_wide_p instead of hard-coded test.
298 (bfd_mach_o_scan_read_section_32): Check bfd_seek status.
299 (bfd_mach_o_scan_read_section_64): Ditto.
300 (bfd_mach_o_scan_read_symtab_symbol): Ditto. Check bfd_seek status.
301 Use BFD_MACH_O_N_TYPE instead of hard-coded value. Correctly
302 handled common symbols.
303 (bfd_mach_o_scan_read_symtab_strtab): Check bfd_seek status.
304 (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
305 (bfd_mach_o_scan_read_dylinker): Ditto.
306 (bfd_mach_o_scan_read_dylib): Ditto.
307 (bfd_mach_o_scan_read_thread): Ditto.
308 (bfd_mach_o_scan_read_symtab): Ditto.
309 Do not create a section for the stabs.
310 (bfd_mach_o_scan_read_uuid): Check bfd_seek status.
311 (bfd_mach_o_scan_read_segment): Ditto.
312 (bfd_mach_o_scan_read_command): Ditto.
313 (bfd_mach_o_scan_start_address): Ditto.
314 (bfd_mach_o_scan): Use mach_o_wide_p instead of hard-coded test.
315 (bfd_mach_o_archive_p): Check bfd_seek status.
316 (bfd_mach_o_core_fetch_environment): Ditto.
318 * mach-o-i386.c (bfd_mach_o_i386_mkobject): Don't set filetype.
320 2009-06-06 H.J. Lu <hongjiu.lu@intel.com>
322 * elf32-i386.c (elf_i386_link_hash_table): Add irelifunc.
323 (elf_i386_link_hash_table_create): Initialize irelifunc.
324 (elf_i386_check_relocs): Updated. Set up irelifunc for
326 (elf_i386_allocate_dynrelocs): Use irelifunc for dynamic
327 relocation for non-GOT reference of STT_GNU_IFUNC symbol in
329 (elf_i386_relocate_section): Likewise.
331 * elf64-x86-64.c (elf64_x86_64_link_hash_table): Add irelifunc.
332 (elf64_x86_64_link_hash_table_create): Initialize irelifunc.
333 (elf64_x86_64_check_relocs): Updated. Set up irelifunc for
335 (elf64_x86_64_allocate_dynrelocs): Use irelifunc for dynamic
336 relocation for non-GOT reference of STT_GNU_IFUNC symbol in
338 (elf64_x86_64_relocate_section): Likewise.
340 * elf-bfd.h (_bfd_elf_create_static_ifunc_sections): Renamed to
342 (_bfd_elf_create_ifunc_sections): This.
344 * elflink.c (_bfd_elf_create_static_ifunc_sections): Renamed to
346 (_bfd_elf_create_ifunc_sections): This. Create .rel[a].ifunc
349 2009-06-06 H.J. Lu <hongjiu.lu@intel.com>
351 * elf32-i386.c (elf_i386_check_relocs): Make room for dynamic
352 relocation for R_386_32 against STT_GNU_IFUNC symbol when
353 building shared object. Check info->executable instead of
354 !info->shared when setting non_got_ref.
355 (elf_i386_allocate_dynrelocs): Allocate dynamic relocation
356 for non-GOT reference of STT_GNU_IFUNC symbol in shared
357 object. Allocate GOT relocation agsinst STT_GNU_IFUNC
359 (elf_i386_relocate_section): Output dynamic relocation for
360 R_386_32 against STT_GNU_IFUNC symbol to get the real
361 function address when building shared object.
362 (elf_i386_finish_dynamic_symbol): Output R_386_GLOB_DAT
363 relocation for STT_GNU_IFUNC symbol in shared object.
365 * elf64-x86-64.c (elf64_x86_64_check_relocs): Make room for
366 dynamic relocation for R_X86_64_64 against STT_GNU_IFUNC
367 symbol when building shared object. Check info->executable
368 instead of !info->shared when setting non_got_ref.
369 (elf64_x86_64_allocate_dynrelocs): Allocate dynamic relocation
370 for non-GOT reference of STT_GNU_IFUNC symbol in shared
371 library. Allocate GOT relocation agsinst STT_GNU_IFUNC symbol
373 (elf64_x86_64_relocate_section): Output dynamic relocation
374 for R_X86_64_64 against STT_GNU_IFUNC symbol to get the real
375 function address when building shared object.
376 (elf64_x86_64_finish_dynamic_symbol): Output R_X86_64_GLOB_DAT
377 relocation for STT_GNU_IFUNC symbol in shared object.
379 2009-06-06 Jan Kratochvil <jan.kratochvil@redhat.com>
381 * Makefile.am: Run "make dep-am".
382 (BFD32_BACKENDS): Add mach-o-i386.lo.
383 (BFD32_BACKENDS_CFILES): Add mach-o-i386.c.
384 * Makefile.in: Regenerate.
386 2009-06-06 Alan Modra <amodra@bigpond.net.au>
388 * elf32-spu.c (spu_elf_relocate_section): Match overlay number
389 when looking for soft-icache stubs.
391 2009-06-05 Tristan Gingold <gingold@adacore.com>
393 * mach-o.h: Update copyright year.
394 (bfd_mach_o_mach_header_magic): New enum.
395 (bfd_mach_o_cpu_subtype): Now an enum.
396 (BFD_MACH_O_HEADER_SIZE, BFD_MACH_O_HEADER_64_SIZE): New macros.
397 (BFD_MACH_O_SECTION_SIZE, BFD_MACH_O_SECTION_64_SIZE): Ditto.
398 (BFD_MACH_O_LC_SEGMENT_SIZE, BFD_MACH_O_LC_SEGMENT_64_SIZE): Ditto.
399 (bfd_mach_o_load_command): Field type_required is now a boolean.
401 (bfd_mach_o_object_p, bfd_mach_o_core_p): Remove.
402 (bfd_mach_o_bfd_copy_private_symbol_data): Add a prototype.
403 (bfd_mach_o_bfd_copy_private_section_data): Ditto.
404 (bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
405 (bfd_mach_o_get_symtab_upper_bound): Ditto.
406 (bfd_mach_o_canonicalize_symtab): Ditto.
407 (bfd_mach_o_get_symbol_info): Ditto.
408 (bfd_mach_o_print_symbol): Ditto.
409 (bfd_mach_o_bfd_print_private_bfd_data): Ditto.
410 (bfd_mach_o_make_empty_symbol): Ditto.
411 (bfd_mach_o_write_contents): Ditto.
413 * mach-o.c (bfd_mach_o_object_p, bfd_mach_o_core_p,
414 bfd_mach_o_mkobject): Defines.
415 (bfd_mach_o_valid): Returns FALSE/TRUE instead of 0/1.
416 Do not check with target vector but with flavour.
417 (struct mach_o_section_name_xlat): New declaration.
418 (dwarf_section_names_xlat): Ditto.
419 (text_section_names_xlat): Ditto.
420 (data_section_names_xlat): Ditto.
421 (struct mach_o_segment_name_xlat): Ditto.
422 (segsec_names_xlat): Ditto.
423 (bfd_mach_o_convert_section_name_to_bfd): New function.
424 (bfd_mach_o_convert_section_name_to_mach_o): Ditto.
425 (bfd_mach_o_bfd_copy_private_symbol_data): Make it public.
426 (bfd_mach_o_bfd_copy_private_section_data): Ditto.
427 (bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
428 Accept any input and output flavour. Do not share private data
430 (bfd_mach_o_count_symbols): Add a comment.
431 (bfd_mach_o_get_symtab_upper_bound): Make it public.
432 (bfd_mach_o_canonicalize_symtab): Ditto.
433 (bfd_mach_o_get_symbol_info): Ditto.
434 (bfd_mach_o_print_symbol): Ditto.
435 (bfd_mach_o_write_header): Now returns a boolean instead of an int.
436 Use constants instead of hard-coded values.
437 (bfd_mach_o_scan_write_section_32): Use constants instead of hard-coded
439 (bfd_mach_o_scan_write_section_64): Ditto.
440 (bfd_mach_o_scan_write_segment): Ditto.
441 Do not copy sections anymore.
442 (bfd_mach_o_write_contents): Make it public.
443 Remove dead code. Rewrite typeflag assignment.
444 (bfd_mach_o_build_commands): New function.
445 (bfd_mach_o_set_section_contents): Ditto.
446 (bfd_mach_o_make_empty_symbol): Make it public.
447 (bfd_mach_o_read_header): Make it static.
448 Convert to bfd_boolean.
449 Use constants instead of hard-coded values.
450 (bfd_mach_o_make_bfd_section): Call
451 bfd_mach_o_convert_section_name_to_bfd to create name.
452 (bfd_mach_o_scan_read_section_32): Use constants instead of hard-coded
454 (bfd_mach_o_scan_read_section_64): Ditto.
455 (bfd_mach_o_scan_read_segment): Do not create a bfd section for
456 a segment anymore. Use constants instead of hard-coded values.
457 (bfd_mach_o_scan_read_command): Fix style.
458 (bfd_mach_o_scan): Use constants instead of hard-coded values.
459 Get rid of BFD_IO_FUNCS.
460 (bfd_mach_o_mkobject_init): Renamed from bfd_mach_o_mkobject.
461 (bfd_mach_o_header_p): Created from bfd_mach_o_object_p.
462 (bfd_mach_o_gen_object_p): New function, replaces bfd_mach_o_object_p.
463 (bfd_mach_o_object_p): Removed.
464 (bfd_mach_o_gen_core_p): New function, replaces ...
465 (bfd_mach_o_core_p): ... deleted.
466 (bfd_mach_o_bfd_print_private_bfd_data): Make it public.
468 * mach-o-i386.c: New file.
469 * config.bfd: Use mach_o_i386_vec as targ_defvec for ix86-darwin.
470 * configure.in (TDEFINES): Add mach_o_i386_vec.
471 * configure: Regenerated.
472 * targets.c: Add mach_o_i386_vec.
474 * mach-o.c: Update copyright years.
475 (BFD_IO_FUNCS): Remove (was not used).
476 (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr, bfd_mach_o_slurp_armap
477 bfd_mach_o_slurp_extended_name_table,
478 bfd_mach_o_construct_extended_name_table,
479 bfd_mach_o_truncate_arname, bfd_mach_o_write_armap,
480 bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt,
481 bfd_mach_o_update_armap_timestamp, bfd_mach_o_close_and_cleanup,
482 bfd_mach_o_bfd_free_cached_info, bfd_mach_o_new_section_hook,
483 bfd_mach_o_get_section_contents_in_window,
484 bfd_mach_o_bfd_is_local_label_name,
485 bfd_mach_o_bfd_is_target_special_symbol,
486 bfd_mach_o_bfd_is_local_label_name, bfd_mach_o_get_lineno,
487 bfd_mach_o_find_nearest_line, bfd_mach_o_find_inliner_info,
488 bfd_mach_o_bfd_make_debug_symbol, bfd_mach_o_read_minisymbols,
489 bfd_mach_o_minisymbol_to_symbol,
490 bfd_mach_o_bfd_get_relocated_section_contents,
491 bfd_mach_o_bfd_relax_section, bfd_mach_o_bfd_link_hash_table_create,
492 bfd_mach_o_bfd_link_hash_table_free, bfd_mach_o_bfd_link_add_symbols,
493 bfd_mach_o_bfd_link_just_syms, bfd_mach_o_bfd_final_link,
494 bfd_mach_o_bfd_link_split_section, bfd_mach_o_set_arch_mach,
495 bfd_mach_o_bfd_merge_private_bfd_data,
496 bfd_mach_o_bfd_set_private_flags, bfd_mach_o_get_section_contents,
497 bfd_mach_o_bfd_gc_sections, bfd_mach_o_bfd_merge_sections,
498 bfd_mach_o_bfd_is_group_section, bfd_mach_o_bfd_discard_group,
499 bfd_mach_o_section_already_linked, bfd_mach_o_bfd_define_common_symbol,
500 bfd_mach_o_bfd_copy_private_header_data,
501 bfd_mach_o_core_file_matches_executable_p): Move these defines ...
502 * mach-o-target.c: ... here.
503 Update copyright years.
505 2009-06-04 Alan Modra <amodra@bigpond.net.au>
507 * dep-in.sed: Don't use \n in replacement part of s command.
508 * Makefile.am (DEP1): LC_ALL for uniq.
510 * Makefile.in: Regenerate.
512 2009-06-03 H.J. Lu <hongjiu.lu@intel.com>
514 * elf32-i386.c (elf_i386_allocate_dynrelocs): Remove check of
515 h->plt.refcount > 0 on STT_GNU_IFUNC symbol.
516 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
518 2009-06-03 H.J. Lu <hongjiu.lu@intel.com>
520 * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate
521 GOT entry for STT_GNU_IFUNC symbol with pointer equality.
522 (elf_i386_relocate_section): Adjust R_386_GOT32 relocation
523 against STT_GNU_IFUNC symbols for static executables.
524 (elf_i386_finish_dynamic_symbol): Load GOT entry with
525 PLT entry for STT_GNU_IFUNC symbol with pointer equality.
527 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Allocate
528 GOT entry for STT_GNU_IFUNC symbol with pointer equality.
529 (elf64_x86_64_finish_dynamic_symbol): Load GOT entry with
530 PLT entry for STT_GNU_IFUNC symbol with pointer equality.
532 2009-06-02 Richard Sandiford <r.sandiford@uk.ibm.com>
534 * coff-rs6000.c (xcoff_ppc_relocate_section): Allow undefined
535 symbols to be left unimported when linking statically.
536 * xcofflink.c (xcoff_link_add_symbols): Ignore global linkage
537 code when linking statically.
539 2009-06-02 H.J. Lu <hongjiu.lu@intel.com>
541 * elf32-i386.c (elf_i386_check_relocs): Increment
542 got.refcount for R_386_GOT32/R_386_GOTOFF relocations
543 against STT_GNU_IFUNC symbol.
544 (elf_i386_allocate_dynrelocs): Set got.refcount to 0 if
545 local STT_GNU_IFUNC definition is used.
546 (elf_i386_relocate_section): Handle got.offset != -1 for
547 R_386_GOT32/R_386_GOTOFF relocations against STT_GNU_IFUNC
550 * elf64-x86-64.c (elf64_x86_64_check_relocs): Increment
551 got.refcount for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64
552 relocations against STT_GNU_IFUNC symbol.
553 (elf64_x86_64_allocate_dynrelocs): Set got.refcount to 0 if
554 local STT_GNU_IFUNC definition is used.
555 (elf64_x86_64_relocate_section): Handle got.offset != -1
556 for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64 relocations against
557 STT_GNU_IFUNC symbol.
559 2009-06-01 H.J. Lu <hongjiu.lu@intel.com>
562 * elf32-i386.c (elf_howto_table): Add R_386_IRELATIVE.
563 (elf_i386_reloc_type_lookup): Likewise.
564 (R_386_tls): Removed.
565 (R_386_irelative): New.
566 (R_386_vt_offset): Updated.
567 (elf_i386_rtype_to_howto): Likewise.
568 (elf_i386_link_hash_table): Add igotplt, iplt and irelplt.
569 (elf_i386_link_hash_table_create): Initialize igotplt,
571 (elf_i386_check_relocs): Handle STT_GNU_IFUNC symbol first.
572 (elf_i386_adjust_dynamic_symbol): Likewise.
573 (elf_i386_allocate_dynrelocs): Likewise.
574 (elf_i386_relocate_section): Likewise.
575 (elf_i386_size_dynamic_sections): Set up .iplt and .igot.plt
577 (elf_i386_finish_dynamic_symbol): When building a static
578 executable, use .iplt, .igot.plt and .rel.iplt sections for
579 STT_GNU_IFUNC symbols. Generate R_386_IRELATIVE relocation for
580 locally defined STT_GNU_IFUNC symbol.
582 * elf64-x86-64.c (x86_64_elf_howto): Add R_X86_64_IRELATIVE.
583 (x86_64_reloc_map): Likewise.
584 (R_X86_64_standard): Updated.
585 (elf64_x86_64_link_hash_table): Add igotplt, iplt and irelplt.
586 (elf64_x86_64_link_hash_table_create): Initialize igotplt,
588 (elf64_x86_64_check_relocs): Handle STT_GNU_IFUNC symbol first.
589 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
590 (elf64_x86_64_allocate_dynrelocs): Likewise.
591 (elf64_x86_64_relocate_section): Likewise.
592 (elf64_x86_64_size_dynamic_sections): Set up .iplt and .igot.plt
594 (elf64_x86_64_finish_dynamic_symbol): When building a static
595 executable, use .iplt, .igot.plt and .rela.iplt sections for
596 STT_GNU_IFUNC symbols. Generate R_X86_64_IRELATIVE relocation
597 for locally defined STT_GNU_IFUNC symbol.
599 * reloc.c (BFD_RELOC_386_IRELATIVE): New.
600 (BFD_RELOC_X86_64_IRELATIVE): Likewise.
602 * bfd-in2.h: Regenerated.
603 * libbfd.h: Likewise.
605 2009-06-01 H.J. Lu <hongjiu.lu@intel.com>
607 * elf-bfd.h (struct bfd_elf_section_data): Remove indirect_relocs.
608 (_bfd_elf_make_ifunc_reloc_section): Removed.
609 (_bfd_elf_is_ifunc_symbol): Likewise.
610 (_bfd_elf_create_static_ifunc_sections): New.
612 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Move STT_GNU_IFUNC
614 (elf_link_add_object_symbols): Here.
615 (_bfd_elf_link_hash_hide_symbol): Don't clean plt on
616 STT_GNU_IFUNC symbol.
617 (elf_link_output_extsym): Call elf_backend_finish_dynamic_symbol
618 if a STT_GNU_IFUNC symbol is referenced in a non-shared object.
619 (IFUNC_INFIX): Removed.
620 (get_ifunc_reloc_section_name): Likewise.
621 (_bfd_elf_make_ifunc_reloc_section): Likewise.
622 (_bfd_elf_is_ifunc_symbol): Likewise.
623 (_bfd_elf_create_static_ifunc_sections): New.
625 2009-05-29 H.J. Lu <hongjiu.lu@intel.com>
627 * elf32-i386.c (link_hash_newfunc): Add elf_i386_ prefix.
628 (create_got_section): Likewise.
629 (allocate_dynrelocs): Likewise.
630 (readonly_dynrelocs): Likewise.
631 (set_tls_module_base): Likewise.
632 (dtpoff_base): Likewise.
634 (elf_i386_link_hash_table_create): Updated.
635 (elf_i386_create_dynamic_sections): Likewise.
636 (elf_i386_check_relocs): Likewise.
637 (elf_i386_size_dynamic_sections): Likewise.
638 (elf_i386_relocate_section): Likewise.
640 * elf64-x86-64.c (link_hash_newfunc): Add elf64_x86_64_ prefix.
641 (create_got_section): Likewise.
642 (allocate_dynrelocs): Likewise.
643 (readonly_dynrelocs): Likewise.
644 (set_tls_module_base): Likewise.
645 (dtpoff_base): Likewise.
647 (elf64_x86_64_link_hash_table_create): Updated.
648 (elf64_x86_64_create_dynamic_sections): Likewise.
649 (elf64_x86_64_check_relocs): Likewise.
650 (elf64_x86_64_size_dynamic_sections): Likewise.
651 (elf64_x86_64_relocate_section): Likewise.
653 2009-05-28 Nick Clifton <nickc@redhat.com>
655 * targets.c (_bfd_target_vector): Only include plugin target in
656 all-targets build if BFD_SUPPORTS_PLUGINS is non-zero.
658 2009-05-28 Ulrich Weigand <uweigand@de.ibm.com>
660 * elf32-spu.c (struct call_info): New member broken_cycle.
661 (remove_cycle): Instead of physically removing call_info structures
662 to break call graph cycles, mark them using the broken_cycle flag.
663 (mark_overlay_section): Respect broken_cycle flag.
664 (unmark_overlay_section): Likewise.
665 (collect_lib_sections): Likewise.
666 (collect_overlays): Likewise.
667 (sum_stack): Likewise.
669 2009-05-28 Ulrich Weigand <uweigand@de.ibm.com>
671 * elf32-spu.c (insert_callee): Accumulate incoming callee->count.
672 (mark_functions_via_relocs): Initialize callee->count to 1.
673 (pasted_function): Likewise.
674 (spu_elf_auto_overlay): Honor call counts when determining number
675 of stubs required in software i-cache mode.
677 2009-05-27 Rafael Avila de Espindola <espindola@google.com>
679 * plugin.c (program_name): Remove.
680 (plugin_program_name): New.
681 (bfd_plugin_set_program_name): New.
682 (try_load_plugin): Use plugin_program_name.
683 * plugin.h (bfd_plugin_set_program_name): New.
685 2009-05-27 Rafael Avila de Espindola <espindola@google.com>
687 * aclocal.m4: Include ../config/plugins.m4.
688 * configure.in: Use AC_PLUGINS.
689 * configure: Regenerate.
690 * Makefile.in: Regenerate.
691 * doc/Makefile.in: Regenerate.
693 2009-05-27 Nathan Sidwell <nathan@codesourcery.com>
695 * elf32-ppc.c (ppc_elf_relax_section): Work with a partial
697 * bout.c (b_out_bfd_relax_section): Reject relocatable links.
698 * elf32-m10300.c (mn10300_elf_relax_section): Likewise.
699 * elf32-avr.c (elf32_avr_relax_section): Likewise.
700 * elf32-frv.c (elf32_avr_relax_section): Likewise.
701 * elf32-xtensa.c (elf_xtensa_relax_section): Likewise.
702 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
703 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
704 * elfxx-sparc.c (_bfd_sparc_elf_relax_section): Likewise.
705 * reloc.c (bfd_generic_relax_section): Likewise.
706 * reloc16.c (bfd_coff_reloc16_relax_section): Likewise.
707 * vms.c (vms_bfd_relax_section): Likewise.
709 2009-05-26 H.J. Lu <hongjiu.lu@intel.com>
711 * elf-bfd.h (_bfd_elf_is_ifunc_symbol): New.
713 * elf32-i386.c (is_indirect_symbol): Renamed to ...
714 * elflink.c (_bfd_elf_is_ifunc_symbol): This.
716 * elf32-i386.c (allocate_dynrelocs): Updated.
717 (elf_i386_relocate_section): Likewise.
718 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
719 (elf64_x86_64_relocate_section): Likewise.
721 * elf64-x86-64.c (is_indirect_symbol): Removed.
723 2009-05-26 Nick Clifton <nickc@redhat.com>
725 * po/id.po: Updated Indonesian translation.
727 2009-05-26 Rafael Avila de Espindola <espindola@google.com>
729 * Makefile.am: Run "make dep-am".
732 (ALL_MACHINES): Add cpu-plugin.lo.
733 (ALL_MACHINES_CFILES): Add cpu-plugin.c.
734 (BFD32_BACKENDS): Add plugin.lo.
735 (BFD32_BACKENDS_CFILES): Add plugin.c.
736 (libbfd_la_LIBADD): Add LIBDL
737 * archures.c (bfd_architecture): Add bfd_arch_plugin.
738 (bfd_plugin_arch): Declare.
739 * bfd-in.h (BFD_SUPPORTS_PLUGINS): New.
740 * bfd.c (bfd): Add plugin_data.
741 * config.bfd: Handle the plugin target.
742 * configure.in: Check for --enable-plugins.
743 (LT_INIT): Use the dlopen option.
747 * targets.c (plugin_vec): Declare.
748 (_bfd_target_vector): Add plugin_vec.
749 * Makefile.in: Regenerate.
750 * bfd-in2.h: Regenerate.
751 * configure: Regenerate.
753 2009-05-26 Alan Modra <amodra@bigpond.net.au>
755 * dep-in.sed: Don't modify .o to .lo here. Output one filename
756 per line with all lines having continuation backslash. Prefix
757 first line with "A", following lines with "B".
758 * Makefile.am (DEP): Don't use dep.sed here.
759 (DEP1): Run $MKDEP on single files, modify .o to .lo here. Use
760 dep.sed here on dependencies, sort and uniq.
761 * Makefile.in: Regenerate.
763 2009-05-25 Tristan Gingold <gingold@adacore.com>
765 * makefile.vms: Add verilog.obj to object list OBJS.
767 2009-05-24 Alan Modra <amodra@bigpond.net.au>
769 * bfdio.c (bfd_seek): Formatting. Ensure newly allocated memory
770 for BFD_IN_MEMORY is cleared.
771 (bfd_bwrite): Zero excess memory allocated.
773 2009-05-22 Julian Brown <julian@codesourcery.com>
775 * elf32-arm.c (THUMB16_BCOND_INSN, THUMB32_INSN, THUMB32_B_INSN): New
777 (elf32_arm_stub_a8_veneer_b_cond, elf32_arm_stub_a8_veneer_b)
778 (elf32_arm_stub_a8_veneer_blx): New stub sequences.
779 (elf32_arm_stub_type): Add arm_stub_a8_veneer_b_cond,
780 arm_stub_a8_veneer_b and arm_stub_a8_veneer_blx.
781 (elf32_arm_stub_hash_entry): Add target_addend, orig_insn fields.
782 (a8_erratum_fix, a8_erratum_reloc): New structs.
783 (elf32_arm_link_hash_table): Add a8_erratum_fixes,
784 num_a8_erratum_fixes, fix_cortex_a8 fields.
785 (elf32_arm_link_hash_table_create): Zero fix_cortex_a8.
786 (elf32_arm_add_stub): Split into two parts, creating...
787 (elf32_arm_create_or_find_stub_sec): New function.
788 (elf32_arm_final_link_relocate): Add forward declaration.
789 (arm_build_one_stub): Add support for THUMB32_TYPE, Thumb-2
790 relocations, multiple relocations per stub.
791 (find_stub_size_and_template): New (using parts of arm_size_one_stub).
792 (arm_size_one_stub): Use find_stub_size_and_template.
793 (a8_reloc_compare): New.
794 (find_thumb_glue): Add forward declaration.
795 (cortex_a8_erratum_scan): New.
796 (elf32_arm_size_stubs): Add Cortex-A8 erratum workaround support.
797 (bfd_elf32_arm_set_cortex_a8_fix): New.
798 (bfd_elf32_arm_set_target_relocs): Add fix_cortex_a8 argument.
799 (arm_map_one_stub): Add THUMB32_TYPE support.
800 (a8_branch_to_stub_data): New.
801 (make_branch_to_a8_stub): New.
802 (elf32_arm_write_section): Add Cortex-A8 erratum workaround support.
803 * bfd-in.h (bfd_elf32_arm_set_cortex_a8_fix): New.
804 (bfd_elf32_arm_set_target_relocs): Add argument for controlling
805 Cortex-A8 erratum workaround.
806 * bfd-in2.h: Regenerate.
808 2009-05-22 Alan Modra <amodra@bigpond.net.au>
810 * Makefile.am: Run "make dep-am".
811 * Makefile.in: Regenerate.
812 * po/SRC-POTFILES.in: Regenerate.
814 2009-05-21 Alan Modra <amodra@bigpond.net.au>
816 * elflink.c (elf_link_input_bfd): Correct *pindex change in last
819 2009-05-21 Alan Modra <amodra@bigpond.net.au>
821 * elf-bfd.h (struct elf_backend_data
822 <elf_backend_link_output_symbol_hook>): Return an int.
823 * elf64-ppc.c (ppc64_elf_output_symbol_hook): Return 2 to drop
824 symbols on deleted .opd entries.
825 * elflink.c (elf_link_output_sym): Return without outputting sym
826 if output_symbol_hook returns 2.
827 (elf_link_output_extsym): Don't assign h->indx when symbol discarded.
828 Abort if we must not discard sym.
829 (elf_link_input_bfd): Similarly, don't set finfo->indices for
831 (bfd_elf_final_link): Adjust elf_link_output_sym calls.
832 * elf-vxworks.c (elf_vxworks_link_output_symbol_hook): Adjust for
833 elf_backend_link_output_symbol_hook return type change.
834 * elf32-arm.c (output_arch_syminfo): Likewise.
835 (elf32_arm_output_map_sym, elf32_arm_output_stub_sym): Likewise.
836 (elf32_arm_output_arch_local_syms): Likewise.
837 * elf32-cr16c.c (elf32_cr16c_link_output_symbol_hook): Likewise.
838 * elf32-score.c (s3_bfd_score_elf_link_output_symbol_hook): Likewise.
839 (bfd_score_elf_link_output_symbol_hook): Likewise.
840 * elf32-score.h (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
841 * elf32-score7.c (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
842 * elf32-sh64.c (sh64_elf_link_output_symbol_hook): Likewise.
843 * elf32-spu.c (spu_elf_output_symbol_hook): Likewise.
844 * elf32-v850.c (v850_elf_link_output_symbol_hook): Likewise.
845 * elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Likewise.
846 * elf64-mmix.c (mmix_elf_link_output_symbol_hook): Likewise.
847 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Likewise.
848 * elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise.
849 * elfxx-mips.c (_bfd_mips_elf_link_output_symbol_hook): Likewise.
850 * elfxx-mips.h (_bfd_mips_elf_link_output_symbol_hook): Likewise.
852 2009-05-21 Alan Modra <amodra@bigpond.net.au>
854 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't segfault on
855 out of range .opd symbols.
857 2009-05-21 Dave Korn <dave.korn.cygwin@gmail.com>
859 * coffgen.c (coff_print_symbol): Use bfd_fprintf_vma, not
860 fprintf_vma directly.
861 * peXXigen.c (pe_print_edata): Likewise.
862 (pe_print_pdata): Likewise.
863 (_bfd_XX_print_ce_compressed_pdata): Likewise.
864 (_bfd_XX_print_private_bfd_data_common): Likewise.
866 2009-05-19 Dave Korn <dave.korn.cygwin@gmail.com>
868 * cofflink.c (process_embedded_commands): Ignore "-aligncomm".
870 2009-05-15 Andrew Stubbs <ams@codesourcery.com>
871 Paul Brook <paul@codesourcery.com>
873 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Don't attempt to
874 fix discarded sections.
876 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
878 * elf32-spu.c (mark_overlay_section): Move .init and .fini
879 sections into the software icache.
881 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
883 * elf32-spu.c (build_stub): Always build "compact" sofware
886 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
888 * elf32-spu.c (struct spu_link_hash_table): Add fromelem_size_log2.
889 (spu_elf_setup): Initialize it.
890 (spu_elf_size_stubs): Move .ovtab into .bss for software i-cache.
891 Update to new-sytle cache manager data structures.
892 (spu_elf_build_stubs): Generate new-style cache manager data
893 structures and symbols.
894 (spu_elf_auto_overlay): Update size computation.
896 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
898 * elf32-spu.c (spu_elf_modify_segment_map): Move all PF_OVERLAY
899 segments first amongst the program headers.
901 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
903 * elf32-spu.c (spu_elf_relocate_section): Only encode overlay index
904 into addresses for relocation types that look at high bits. Remove
905 special handling of relocation overflow warnings.
907 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
909 * elf32-spu.c (mark_functions_via_relocs): Handle cycles in the
910 control flow graph between fragments of a function.
912 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
914 * elf32-spu.c (spu_elf_size_stubs): Even in software i-cache mode,
915 generate only a 16-byte .toe section.
916 (spu_elf_build_stubs, spu_elf_auto_overlay): Likewise.
918 2009-05-14 Alan Modra <amodra@bigpond.net.au>
920 * elf32-spu.c (spu_elf_size_stubs): Split out section placement to..
921 (spu_elf_place_overlay_data): ..here. New function.
922 * elf32-spu.h (spu_elf_place_overlay_data): Declare.
924 2009-05-13 Andrew Jenner <andrew@codesourcery.com>
926 * elf32-arm.c: Move sysdep.h to start of file.
928 2009-05-11 Ulrich Weigand <uweigand@de.ibm.com>
930 * elf32-spu.c (spu_elf_find_overlays): Don't use .ovl.init lma as
932 (spu_elf_build_stubs): Don't define __icache_tagbase. Define
933 __icache_tag_array and __icache_tag_array_size.
935 2009-05-11 Masaki Muranaka <monaka@monami-software.com>
937 * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Remove unnecessary
939 (bfinfdpic_link_omit_section_dynsym): Likewise.
940 (elf32_bfinfdpic_finish_dynamic_sections): Likewise.
942 2009-05-05 Paul Brook <paul@codesourcery.com>
944 * bfd-in.h (elf32_arm_fix_exidx_coverage): Add prototype.
945 * bfd-in2.h: Regenerate.
946 * elf32-arm.c (arm_unwind_edit_type, arm_unwind_table_edit): Define.
947 (_arm_elf_section_data): Add text and exidx fields.
948 (add_unwind_table_edit, get_arm_elf_section_data, adjust_exidx_size,
949 insert_cantunwind_after, elf32_arm_fix_exidx_coverage, offset_prel31,
950 copy_exidx_entry): New functions.
951 (elf32_arm_write_section): Fixup .ARM.exidx contents.
953 2009-05-05 Christophe lyon <christophe.lyon@st.com>
955 * elf32-arm.c (DEF_STUBS): New helper define.
956 (DEF_STUB): Likewise.
957 (stub_def): New type.
958 (stub_definitions): New array, containing stub template pointers
960 (arm_size_one_stub): Make use of stub_definitions.
962 2009-05-04 Dave Korn <dave.korn.cygwin@gmail.com>
964 * elflink.c (find_version_for_sym): Remove from here, ...
965 * linker.c (bfd_find_version_for_sym): ... rename, replace
966 here, make public and update all callers.
967 * bfd-in2.h: Regenerate.
969 2009-04-30 Nick Clifton <nickc@redhat.com>
971 * elf-bfd.h (struct bfd_elf_section_data): Add indirect_relocs
973 (struct elf_obj_data): Add has_ifunc_symbols boolean.
974 * elf.c (swap_out_syms): Convert BSF_GNU_INDIRECT_FUNCTION flags
975 into a STT_GNU_IFUNC symbol type.
976 (_bfd_elf_is_function_type): Accept STT_GNU_IFUNC as a function
978 (_bfd_elf_set_osabi): Set the osasbi field to ELFOSABI_LINUX if
979 the binary contains ifunc symbols.
980 * elfcode.h (elf_slurp_symbol_table): Translate the STT_GNU_IFUNC
981 symbol type into a BSF_GNU_INDIRECT_FUNCTION flag.
982 * elf32-i386.c (is_indirect_function): New function.
983 (elf_i386_check_relocs): Create an ifunc output section.
984 (allocate_dynrelocs): Create dynamic relocs in the ifunc output
985 section if necessary.
986 (elf_i386_relocate_section): Emit a reloc against an ifunc symbol
988 (elf_i386_add_symbol_hook): New function. Set the
989 has_ifunc_symbols field of the elf_obj_data structure if an ifunc
990 symbol is encountered.
991 (elf_backend_post_process_headers): Define.
992 (elf_backend_add_symbol_hook): Define.
993 (elf_i386_post_process_headers): Rename to
994 elf_i388_fbsd_post_process_headers.
995 * elf64-x86_64.c (IS_X86_64_PCREL_TYPE): New macro.
996 (is_indirect_function): New function.
997 (elf64_x86_64_check_relocs): Create an ifunc output section.
998 (allocate_dynrelocs): Create dynamic relocs in the ifunc output
999 section if necessary.
1000 (elf64_x86_64_relocate_section): Emit a reloc against an ifunc
1001 symbol if necessary.
1002 (elf_i386_add_symbol_hook): Set the has_ifunc_symbols field of the
1003 elf_obj_data structure if an ifunc symbol is encountered.
1004 (elf_backend_post_process_headers): Define.
1005 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Always create a PLT
1006 if we have ifunc symbols to handle.
1007 (get_ifunc_reloc_section_name): New function. Computes the name
1008 for an ifunc section.
1009 (_bfd_elf_make_ifunc_reloc_section): New function. Creates a
1010 section to hold ifunc relocs.
1011 * syms.c (BSF_GNU_INDIRECT_FUNCTION): Define.
1012 (bfd_print_symbol_vandf): Handle ifunc symbols.
1013 (bfd_decode_symclass): Likewise.
1014 * bfd-in2.h: Regenerate.
1016 2009-04-30 Joseph Myers <joseph@codesourcery.com>
1018 * elf32-arm.c (elf32_arm_check_relocs): Give errors for absolute
1019 MOVW and MOVT relocations in a shared library link.
1021 2009-04-27 Anthony Green <green@moxielogic.com>
1023 * verilog.c: New file.
1024 * Makefile.am (BFD32_LIBS): Add verilog.c.
1025 (BFD32_LIBS_CFILES): Add verilog.c.
1026 (verilog.lo): New build rule.
1027 * Makefile.in: Rebuilt.
1028 * targets.c: Add verilog support.
1029 * bfd.c (tdata union): Add Verilog private data field.
1030 * bfd-in2.h: Regenerate.
1032 2009-04-27 H.J. Lu <hongjiu.lu@intel.com>
1034 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Don't
1037 2009-04-23 Matthias Klose <doko@ubuntu.com>
1039 * peXXigen.c (_bfd_XXi_swap_sym_in): Initialize `name'.
1041 2009-04-22 Christophe Lyon <christophe.lyon@st.com>
1044 * elf32-arm.c (arm_type_of_stub): Handle R_ARM_THM_JUMP24,
1045 R_ARM_JUMP24 and R_ARM_PLT32 relocations.
1046 (elf32_arm_size_stubs): Likewise.
1047 (record_thumb_to_arm_glue): Deleted unused function.
1048 (bfd_elf32_arm_process_before_allocation): No longer handle
1049 R_ARM_THM_JUMP24, R_ARM_JUMP24 and R_ARM_PLT32 relocations here.
1050 (elf32_arm_final_link_relocate): Handle R_ARM_THM_JUMP24,
1051 R_ARM_JUMP24 and R_ARM_PLT32 relocations.
1053 2009-04-21 Daniel Jacobowitz <dan@codesourcery.com>
1055 * elf32-arm.c (INTERWORK_FLAG): Check BFD_LINKER_CREATED.
1056 (elf32_arm_write_section): Declare early.
1057 (elf32_arm_size_stubs): Skip non-stub sections in the stub BFD.
1058 (arm_allocate_glue_section_space): Exclude empty sections.
1059 (ARM_GLUE_SECTION_FLAGS): Add SEC_LINKER_CREATED.
1060 (bfd_elf32_arm_add_glue_sections_to_bfd): Do not skip the stub
1062 (elf32_arm_output_glue_section, elf32_arm_final_link): New.
1063 (elf32_arm_merge_eabi_attributes): Skip the stub BFD.
1064 (elf32_arm_size_dynamic_sections): Allocate interworking
1066 (bfd_elf32_bfd_final_link): Define.
1068 2009-04-21 H.J. Lu <hongjiu.lu@intel.com>
1070 * coff-ia64.c (COFF_PAGE_SIZE): Changed to 8K.
1072 * coffcode.h (coff_compute_section_file_positions): Clear
1073 D_PAGED if PE section alignment is smaller than COFF_PAGE_SIZE.
1075 * libcoff-in.h (pe_tdata): Remove force_minimum_alignment and
1076 force_minimum_alignment.
1078 * libcoff.h: Regenerated.
1080 * pei-ia64.c (PEI_TARGET_SUBSYSTEM): Removed.
1081 (PEI_FORCE_MINIMUM_ALIGNMENT): Likewise.
1083 * peicode.h (pe_mkobject): Don't set force_minimum_alignment
1084 nor target_subsystem.
1086 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't check
1087 force_minimum_alignment nor target_subsystem.
1089 2009-04-21 Kai Tietz <kai.tietz@onevision.com>
1091 * coff-x86_64.c (PEI_HEADERS): Protect includes.
1092 (bfd_pe_print_pdata): Remove #ifdef PE variation.
1093 * pei-x86_64.c (PEI_HEADERS): Define to prevent double
1094 include in coff-x86_64.c of headers.
1095 (PDATA_ROW_SIZE): New define.
1096 (pex_regs[]): New static array.
1097 (pex64_get_runtime_function): New static function.
1098 (pex64_get_unwind_info): Likewise.
1099 (pex64_get_scope_entry): Likewise.
1100 (pex64_xdata_print_uwd_codes): Likewise.
1101 (pex64_get_section_by_rva): Likewise.
1102 (pex64_dump_xdata): Likewise.
1103 (pex64_bfd_print_pdata): Likewise.
1104 (bfd_pe_print_pdata): Define as pex64_bfd_print_pdata.
1105 * peXXigen.c (_bfd_pex64_print_pdata): Removed implementation.
1106 * libpei.h (_bfd_pex64_print_pdata): Removed declaration.
1108 2009-04-19 Peter O'Gorman <binutils@mlists.thewrittenword.com>
1109 Alan Modra <amodra@bigpond.net.au>
1110 Dave Korn <dave.korn.cygwin@gmail.com>
1112 * peXXigen.c (_bfd_XXi_swap_sym_in): Fix name handling w.r.t
1113 long names and non-NUL-terminated strings.
1115 2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
1117 * bfd-in2.h: Regenerated.
1119 2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
1121 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Replace
1122 IMAGE_SUBSYSTEM_EFI_ROM with IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER.
1124 2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
1127 * coffcode.h (bfd_pei_p): New.
1129 * config.bfd: Remove bfd_efi_bsdrv_ia32_vec,
1130 bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
1131 bfd_efi_rtdrv_x86_64_vec, bfd_efi_bsdrv_ia64_vec and
1132 bfd_efi_rtdrv_ia64_vec. Replace bfd_efi_app_ia32_vec,
1133 bfd_efi_app_x86_64_vec and bfd_efi_app_ia64_vec with
1134 i386pei_vec, x86_64pei_vec and bfd_pei_ia64_vec, respectively.
1136 * configure.in: Remove bfd_efi_bsdrv_ia32_vec,
1137 bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
1138 bfd_efi_rtdrv_x86_64_vec,
1139 bfd_efi_bsdrv_ia64_vec and bfd_efi_rtdrv_ia64_vec. Replace
1140 bfd_efi_ia64_vec with bfd_pei_ia64_vec.
1141 * targets.c: Likewise.
1143 * configure: Regenerated.
1144 * libcoff.h: Likewise.
1145 * Makefile.in: Likewise.
1147 * efi-app-ia32.c: Removed.
1148 * efi-app-x86_64.c: Likewise.
1149 * efi-bsdrv-ia32.c: Likewise.
1150 * efi-bsdrv-ia64.c: Likewise.
1151 * efi-bsdrv-x86_64.c: Likewise.
1152 * efi-rtdrv-ia32.c: Likewise.
1153 * efi-rtdrv-ia64.c: Likewise.
1154 * efi-rtdrv-x86_64.c: Likewise.
1155 * efi-rtdrv-ia32.c: Likewise.
1157 * efi-app-ia64.c: Moved to ...
1159 (TARGET_SYM): Set to bfd_pei_ia64_vec.
1160 (TARGET_NAME): Set to pei-ia64.
1162 * libpei.h (bfd_target_pei_p): Removed.
1163 (bfd_target_pei_arch): Likewise.
1164 (bfd_target_efi_app_p): Likewise.
1165 (bfd_target_efi_app_arch): Likewise.
1166 (bfd_target_efi_bsdrv_p): Likewise.
1167 (bfd_target_efi_bsdrv_arch): Likewise.
1168 (bfd_target_efi_rtdrv_p): Likewise.
1169 (bfd_target_efi_rtdrv_arch): Likewise.
1170 (bfd_pe_executable_p): Likewise.
1172 * Makefile.am (BFD32_BACKENDS): Remove efi-app-ia32.lo,
1173 efi-bsdrv-ia32.lo and efi-rtdrv-ia32.lo.
1174 (BFD32_BACKENDS_CFILES): Remove efi-app-ia32.c, efi-bsdrv-ia32.c
1175 and efi-rtdrv-ia32.c.
1176 (BFD64_BACKENDS): Remove efi-app-ia64.lo, efi-bsdrv-ia64.lo,
1177 efi-rtdrv-ia64.lo, efi-app-x86_64.lo, efi-bsdrv-x86_64.lo and
1178 efi-rtdrv-x86_64.lo. Add pei-ia64.lo.
1179 (BFD64_BACKENDS_CFILES): Remove efi-app-ia64.c, efi-bsdrv-ia64.c,
1180 efi-rtdrv-ia64.c, efi-app-x86_64.c, efi-bsdrv-x86_64.c and
1181 efi-rtdrv-x86_64.c. Add pei-ia64.c.
1182 (efi-app-ia64.lo): Removed.
1183 (efi-bsdrv-ia32.lo): Likewise.
1184 (efi-rtdrv-ia32.lo): Likewise.
1185 (efi-app-ia64.lo): Likewise.
1186 (efi-bsdrv-ia64.lo): Likewise.
1187 (efi-rtdrv-ia64.lo): Likewise.
1188 (efi-app-x86_64.lo): Likewise.
1189 (efi-bsdrv-x86_64.lo): Likewise.
1190 (efi-rtdrv-x86_64.lo): Likewise.
1193 * peicode.h (coff_swap_scnhdr_in): Replace bfd_pe_executable_p
1195 (arch_type): Removed.
1196 (pe_arch): Likewise.
1197 (pe_bfd_object_p): Just return coff_object_p.
1199 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Replace
1200 bfd_pe_executable_p with bfd_pei_p.
1202 2009-04-17 Christophe Lyon <christophe.lyon@st.com>
1204 * elf32-arm.c (elf32_arm_size_stubs): Handle long branches through
1205 PLT entries to an undefined symbol when generating a shared
1208 2009-04-17 Nick Clifton <nickc@redhat.com>
1211 * coffcode.h (handle_COMDAT): Allow for external COMDAT symbols.
1213 2009-04-16 Richard Sandiford <r.sandiford@uk.ibm.com>
1215 * aout-adobe.c (aout_32_bfd_define_common_symbol): Define.
1216 * aout-target.h (MY_bfd_define_common_symbol): Likewise.
1217 * aout-tic30.c (MY_bfd_define_common_symbol): Likewise.
1218 * binary.c (binary_bfd_define_common_symbol): Likewise.
1219 * bout.c (b_out_bfd_define_common_symbol): Likewise.
1220 * coff-alpha.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
1221 * coff-mips.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
1222 * coffcode.h (coff_bfd_define_common_symbol): Likewise.
1223 * elfxx-target.h (bfd_elfNN_bfd_define_common_symbol): Likewise.
1224 * i386msdos.c (msdos_bfd_define_common_symbol): Likewise.
1225 * i386os9k.c (os9k_bfd_define_common_symbol): Likewise.
1226 * ieee.c (ieee_bfd_define_common_symbol): Likewise.
1227 * ihex.c (ihex_bfd_define_common_symbol): Likewise.
1228 * libbfd-in.h (_bfd_nolink_bfd_define_common_symbol): Likewise.
1229 * mach-o.c (bfd_mach_o_bfd_define_common_symbol): Likewise.
1230 * mmo.c (mmo_bfd_define_common_symbol): Likewise.
1231 * nlm-target.h (nlm_bfd_define_common_symbol): Likewise.
1232 * oasys.c (oasys_bfd_define_common_symbol): Likewise.
1233 * pef.c (bfd_pef_bfd_define_common_symbol): Likewise.
1234 * ppcboot.c (ppcboot_bfd_define_common_symbol): Likewise.
1235 * som.c (som_bfd_define_common_symbol): Likewise.
1236 * srec.c (srec_bfd_define_common_symbol): Likewise.
1237 * tekhex.c (tekhex_bfd_define_common_symbol): Likewise.
1238 * versados.c (versados_bfd_define_common_symbol): Likewise.
1239 * vms.c (vms_bfd_define_common_symbol): Likewise.
1240 * xcoff-target.h (_bfd_xcoff_bfd_define_common_symbol): Likewise.
1241 * xsym.c (bfd_sym_bfd_define_common_symbol): Likewise.
1242 * coff-rs6000.c (rs6000coff_vec): Add _bfd_xcoff_define_common_symbol.
1243 (pmac_xcoff_vec): Likewise.
1244 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
1245 (aix5coff64_vec): Likewise.
1246 * linker.c (bfd_generic_define_common_symbol): New function.
1247 * targets.c (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_define_common_symbol.
1248 (_bfd_define_common_symbol): New field.
1249 * libcoff-in.h (_bfd_xcoff_define_common_symbol): Declare.
1250 * xcofflink.c (_bfd_xcoff_define_common_symbol): New function.
1251 (xcoff_build_ldsyms): Don't set XCOFF_DEF_REGULAR for common
1253 * bfd-in2.h: Regenerate.
1254 * libbfd.h: Likewise.
1255 * libcoff.h: Likewise.
1257 2009-04-15 Anthony Green <green@moxielogic.com>
1259 * targets.c: Add moxie support.
1260 * Makefile.am: Ditto.
1261 * Makefile.in: Rebuilt.
1262 * cpu-moxie.c, elf32-moxie.c: New files.
1263 * archures.c: Add moxie support.
1264 * configure.in: Add moxie support.
1265 * configure: Rebuilt.
1266 * config.bfd, archures.c: Add moxie support.
1267 * bfd-in2.h: Rebuilt.
1269 2009-04-15 Christophe Lyon <christophe.lyon@st.com>
1271 * elf32-arm.c (elf32_arm_final_link_relocate): Don't convert ARM
1272 branch to an undef weak symbol into a jump to next instruction if
1273 a PLT entry will be created.
1275 2009-04-14 Dave Korn <dave.korn.cygwin@gmail.com>
1277 * coffgen.c (make_a_section_from_file): Set the backend long
1278 section names enable if long section names found on input.
1279 * coffcode.h: Extend long section names documentation to match.
1281 2009-04-08 H.J. Lu <hongjiu.lu@intel.com>
1283 * elflink.c (elf_link_add_object_symbols): Warn alternate ELF
1286 2009-04-07 DJ Delorie <dj@redhat.com>
1288 * archures.c: Add bfd_mach_mep_c5.
1289 * bfd-in2.h: Likewise.
1290 * cpu-mep.c: Add bfd_c5_arch.
1291 * elf32-mep.c: Support it.
1293 2009-04-07 H.J. Lu <hongjiu.lu@intel.com>
1295 * elflink.c (_bfd_elf_section_already_linked): Add `\n' for
1296 info->callbacks->einfo.
1297 * linker.c (_bfd_generic_section_already_linked): Likewise.
1299 2009-04-06 DJ Delorie <dj@redhat.com>
1301 * elf32-h8300.c (elf32_h8_relax_section): Relax MOVA opcodes.
1303 2009-04-06 H.J. Lu <hongjiu.lu@intel.com>
1305 * coff-x86_64.c (bfd_pe_print_pdata): Defined to
1306 _bfd_pex64_print_pdata only if PE is defined.
1308 * libpei.h (_bfd_pep_print_x64_pdata): Renamed to ...
1309 (_bfd_pex64_print_pdata): This.
1311 * peXXigen.c (_bfd_pep_print_x64_pdata): Renamed to ...
1312 (_bfd_pex64_print_pdata): This. Defined only if COFF_WITH_pex64
1315 2009-04-05 Kai Tietz <kai.tietz@onevision.com>
1317 * coff-x86_64.c (bfd_pe_print_pdata): Define as
1318 _bfd_pep_print_x64_pdata.
1319 * libpei.h (_bfd_pep_print_x64_pdata): Add prototype.
1320 * peXXigen.c (_bfd_pep_print_x64_pdata): New.
1322 2009-04-02 Sterling Augustine <sterling@jaw.hq.tensilica.com>
1324 * elf32-xtensa.c (relax_property_section): Always set r_offset
1327 2009-04-02 Christophe Lyon <christophe.lyon@st.com>
1329 * elf32-arm.c (elf32_arm_stub_long_branch_v4t_thumb_thumb,
1330 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic): Two new long
1332 (elf32_arm_stub_type): New enum values for the two new stubs.
1333 (arm_type_of_stub): Make use of the two new stubs.
1334 (arm_size_one_stub): Handle the two new stubs.
1336 2009-04-01 Matt Thomas <matt@netbsd.org>
1338 * elf32-vax.c (elf_vax_check_relocs): Do not put relocations against
1339 hidden symbols into the GOT or PLT.GOT.
1340 (elf_vax_relocate_section): Do not emit a PCREL reloc
1341 into a shared object if it is against a hidden symbol.
1343 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
1345 * xcofflink.c (xcoff_archive_info): Add contains_shared_object_p
1346 and know_contains_shared_object_p.
1347 (xcoff_archive_contains_shared_object_p): Add an "info" parameter.
1348 Cache the result in the archive_info table.
1349 (xcoff_auto_export_p): Add an "info" parameter and update the
1350 call to xcoff_archive_contains_shared_object_p.
1351 (xcoff_mark_auto_exports): Update accordingly.
1352 (xcoff_post_gc_symbol): Likewise.
1354 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
1356 * xcofflink.c (bfd_link_input_bfd): Treat __rtinit as C_HIDEXT
1359 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
1361 * coff-rs6000.c (member_layout): New structure.
1362 (archive_iterator): Likewise.
1363 (member_layout_init): New function.
1364 (archive_iterator_begin): Likewise.
1365 (archive_iterator_next): Likewise.
1366 (xcoff_write_armap_old): Use the new iterator functions.
1367 (do_shared_object_padding): Delete.
1368 (xcoff_write_armap_big): Use the new iterator functions. Simplify
1369 handling of arch_info.
1370 (xcoff_write_archive_contents_old): Allocate arelt_data in the
1371 first loop rather than the second. Allocate a member header if
1372 there isn't one, then work out the stat information and length
1373 in the first loop too. Use the new iterators for the second loop.
1374 (xcoff_write_archive_contents_big): Likewise.
1376 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
1378 * bfd-in.h (bfd_xcoff_split_import_path): Declare.
1379 (bfd_xcoff_set_archive_import_path): Likewise.
1380 * bfd-in2.h: Regenerate.
1381 * xcofflink.c: Include libiberty.h.
1382 (xcoff_archive_info): New structure.
1383 (xcoff_archive_info_hash): New function.
1384 (xcoff_archive_info_eq): Likewise.
1385 (xcoff_get_archive_info): Likewise.
1386 (_bfd_xcoff_bfd_link_hash_table_create): Initialize archive_info.
1387 (bfd_xcoff_split_import_path): New function.
1388 (bfd_xcoff_set_archive_import_path): Likewise.
1389 (xcoff_set_import_path): Move earlier in file.
1390 (xcoff_link_add_dynamic_symbols): Set the import path of a non-archive
1391 object to the the directory part of the bfd's filename. Get the
1392 import path and filename of an archive object from the archive's
1393 xcoff_tdata, initializing it if necessary. Update use of
1395 (bfd_link_input_bfd): Update use of import_file_id.
1396 (xcoff_write_global_symbol): Likewise.
1398 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
1400 * xcofflink.c (xcoff_link_hash_table): Moved from include/coff/xcoff.h.
1402 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
1404 * xcofflink.c (xcoff_link_create_extra_sections): Don't create
1405 a .loader section for relocatable links.
1406 (xcoff_need_ldrel_p): New function.
1407 (xcoff_mark): Use it.
1408 (bfd_xcoff_link_count_reloc): Only count loader relocs if there's
1410 (xcoff_build_ldsym): New function, split out from...
1411 (xcoff_build_ldsyms): ...here. Rename to...
1412 (xcoff_post_gc_symbol): ...this. Only export symbols, and only
1413 call xcoff_build_ldsym, if there's a loader section.
1414 (xcoff_build_loader_section): New function, extracted verbatim from...
1415 (bfd_xcoff_size_dynamic_sections): ...here. Only call it if
1416 there's a loader section. Only add an __rtinit loader symbol
1417 if there's a loader section. Update after above name change.
1418 (xcoff_symbol_section, xcoff_create_ldrel): New functions.
1419 (bfd_link_input_bfd): Use xcoff_need_ldrel_p, xcoff_symbol_section
1420 and xcoff_create_ldrel.
1421 (xcoff_write_global_symbol): Use xcoff_create_ldrel.
1422 (xcoff_reloc_link_order): Likewise, but only call it if there's
1423 a loader section. Use xcoff_symbol_section.
1424 (_bfd_xcoff_bfd_final_link): Only use fdinfo.ldrel and fdinfo.ldsym
1425 if there's a loader section.
1427 2009-04-01 Richard Sandiford <rdsandiford@googlemail.com>
1429 * xcofflink.c (bfd_link_input_bfd): Fix buffer overrun.
1431 2009-04-01 Christophe Lyon <christophe.lyon@st.com>
1433 * elf32-arm.c (group_sections): Rewrite loops for better
1436 2009-03-30 DJ Delorie <dj@redhat.com>
1438 * elflink.c (elf_link_input_bfd): Don't try to resolve complex
1439 relocs when doing a relocatable link.
1441 2009-03-28 Mark Mitchell <mark@codesourcery.com>
1443 * coff-arm.c (coff_arm_merge_private_bfd_data): Use "error:", not
1444 "ERROR:", in error messages.
1445 * cpu-arm.c (bfd_arm_merge_machines): Likewise.
1446 * elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise.
1447 * elf32-arm.c (tag_cpu_arch_combine): Likewise.
1448 (elf32_arm_merge_eabi_attributes): Likewise.
1449 (elf32_arm_merge_private_bfd_data): Likewise.
1451 2009-03-27 Nick Clifton <nickc@redhat.com>
1453 * section.c (bfd_get_section_contents): Detect and handle the case
1454 where a section has the SEC_IN_MEMORY flag set but no actual
1457 2009-03-26 Alan Modra <amodra@bigpond.net.au>
1460 * elf.c (copy_elf_program_header): Do not check that PT_GNU_RELRO
1461 p_filesz and p_memsz are equal. Use p_memsz as the segment size.
1462 (assign_file_positions_for_non_load_sections): Zap PT_GNU_RELRO
1463 if we don't find matching PT_LOAD when copying.
1465 2009-03-25 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
1467 * elf32-crx.c (crx_elf_howto_table): Zero the src_mask field of
1468 the reloc descriptions.
1470 2009-03-25 Hans-Peter Nilsson <hp@axis.com>
1472 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
1473 <R_CRIS_16_GOT_GD, case R_CRIS_32_GOT_GD>: Handle COMMON symbols.
1474 <case R_CRIS_16_TPREL, R_CRIS_32_TPREL>: Ditto.
1476 2009-03-24 H.J. Lu <hongjiu.lu@intel.com>
1478 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Make it static.
1479 (bfd_i386_arch_intel_syntax): Likewise.
1480 (i8086_arch): Likewise.
1481 (bfd_x86_64_arch): Likewise.
1483 2009-03-24 Hans-Peter Nilsson <hp@axis.com>
1485 * elf32-cris.c (cris_elf_relocate_section): <case
1486 R_CRIS_16_DTPREL, R_CRIS_32_DTPREL>: Allow use of non-local
1487 symbols for non-allocated sections. Don't check whether to
1488 generate R_CRIS_DTPMOD for non-allocated sections.
1489 (cris_elf_gc_sweep_hook) <case R_CRIS_32_DTPREL>: Don't
1490 handle relocation GC:ing if applied to non-allocated section.
1491 (cris_elf_check_relocs): Similar.
1493 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
1494 <R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: Don't include the TLS size
1495 when emitting a known TP offset in the GOT.
1497 2009-03-23 Alan Modra <amodra@bigpond.net.au>
1499 * elf64-ppc.c (synthetic_opd): Delete.
1500 (compare_symbols): Look for .opd name rather than section match.
1501 (ppc64_elf_get_synthetic_symtab): Likewise.
1503 2009-03-21 Alan Modra <amodra@bigpond.net.au>
1505 * elf32-ppc.c (is_pic_glink_stub): Delete.
1506 (is_nonpic_glink_stub): New function.
1507 (ppc_elf_get_synthetic_symtab): Check for last non-pic stub rather
1509 (struct ppc_elf_link_hash_table <glink_pltresolve>): Comment fix.
1511 2009-03-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
1512 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1514 * elf32-s390.c (elf_s390_check_relocs): Use the SYMBOL_*
1515 macros for visibilty and locality checks.
1516 (elf_s390_adjust_dynamic_symbol): Likewise.
1517 (allocate_dynrelocs): Likewise.
1518 (elf_s390_relocate_section): Likewise.
1519 (elf_s390_finish_dynamic_symbol): Likewise.
1520 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1521 (elf_s390_adjust_dynamic_symbol): Likewise.
1522 (allocate_dynrelocs): Likewise.
1523 (elf_s390_relocate_section): Likewise.
1524 (elf_s390_finish_dynamic_symbol): Likewise.
1526 2009-03-19 Kai Tietz <kai.tietz@onevision.com>
1528 * bfd-in2.h: Regenerated.
1529 * coffcode.h (sec_to_styp_flags): For pe-coff add SEC_READONLY
1530 for debugging sections and map memory read/write dependent on
1532 (styp_to_sec_flags): Set SEC_COFF_NOREAD for sections
1533 without memory read flags set.
1534 * section.c: Add SEC_COFF_NOREAD to section flags.
1536 2009-03-19 Andreas Schwab <schwab@linux-m68k.org>
1538 * elf32-hppa.c (final_link_relocate): Cast bfd_vma values to long
1541 2009-03-19 Alan Modra <amodra@bigpond.net.au>
1543 * elf32-spu.c (spu_elf_find_overlays): Separate error return from
1544 "no overlays" return. If there are overlays, create overlay
1545 manager entry symbols here, so that..
1546 (spu_elf_build_stubs): ..we don't need to set them up here.
1547 Simplify entry symbol tests.
1548 * elf32-spu.h (spu_elf_find_overlays): Update prototype.
1550 2009-03-18 Mark Kettenis <kettenis@gnu.org>
1552 * elf.c (elfcore_grok_openbsd_procinfo)
1553 (elfcore_grok_openbsd_note): New functions.
1554 (elf_parse_notes): Handle notes from OpenBSD ELF core files.
1556 2009-03-18 Alan Modra <amodra@bigpond.net.au>
1558 * vms-hdr.c: Don't include alloca.h.
1559 * elf32-m68hc1x.c: Include alloca-conf.h.
1561 * elf64-hppa.c: Likewise. Remove existing #if's handling alloca.
1563 * Makefile.am: Run "make dep-am".
1564 * Makefile.in: Regenerate.
1566 2009-03-17 Daniel Jacobowitz <dan@codesourcery.com>
1568 * elf32-arm.c (elf32_arm_check_relocs): Correct symbian_p test.
1570 2009-03-17 Alan Modra <amodra@bigpond.net.au>
1572 * elf32-spu.h (struct spu_elf_params): ovly_flavour now only 1 bit.
1574 (emum _ovly_flavour): Delete ovly_compact, ovly_none.
1575 * elf32-spu.c (struct spu_link_hash_table): Replace ovly_load and
1576 ovly_return fields with ovly_entry[2]. Adjust all users.
1577 (spu_elf_find_overlays): Set ovly_entry[1] from __icache_call_handler
1579 (spu_elf_build_stubs): Likewise.
1580 (ovl_stub_size): Change arg to spu_elf_params pointer. Adjust for
1581 ovly_flavour changes. Update all callers.
1582 (ovl_stub_size_log2): New function.
1583 (build_stub): Handle compact icache stubs. Use different manager
1584 entry point for stubs in non-icache area.
1585 (spu_elf_size_stubs): Don't allocate space for indirect branch
1587 (spu_elf_build_stubs): And don't built them.
1589 2009-03-16 Andrew Stubbs <ams@codesourcery.com>
1591 * dwarf2.c (read_section): Always use rawsize, if available.
1593 2009-03-16 Alan Modra <amodra@bigpond.net.au>
1595 * simple.c (bfd_simple_get_relocated_section_contents): Use larger
1596 of rawsize and size for buffer.
1598 2009-03-15 Ulrich Weigand <uweigand@de.ibm.com>
1600 * elf32-spu.c (spu_elf_check_vma): Do not reset auto_overlay
1601 parameter just because fixed sections fit into local store.
1602 (spu_elf_auto_overlay): Do not declare as "noreturn". Skip
1603 generating overlays if fixed sections plus reserved stack
1604 and heap space fit into local store.
1606 2009-03-15 Alan Modra <amodra@bigpond.net.au>
1608 * elf32-spu.c (build_stub): Correct icache set_id.
1609 (spu_elf_relocate_section): Likewise.
1611 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1613 * xcofflink.c (xcoff_link_check_archive_element): Only free the
1614 symbol table if it was created by the current call.
1616 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1618 * xcofflink.c (xcoff_build_ldsyms): Give imported descriptors
1619 class XMC_DS rather than XMC_UA.
1621 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1623 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Replace the
1624 bfd_boolean export_defineds parameter with an unsigned int
1625 auto_export_flags parameter.
1626 * bfd-in2.h: Regenerate.
1627 * xcofflink.c (xcoff_archive_contains_shared_object_p): New function,
1628 split out from xcoff_build_ldsyms.
1629 (xcoff_covered_by_expall_p): New function.
1630 (xcoff_auto_export_p): New function, split out from xcoff_build_ldsyms
1631 but with extra code to handle -bexpfull and -bexpall.
1632 (xcoff_mark_auto_exports): New function.
1633 (xcoff_build_ldsyms): Use xcoff_auto_export_p to decide whether
1634 a function should be automatically exported.
1635 (bfd_xcoff_size_dynamic_sections): Replace the export_defineds
1636 parameter with an auto_export_flags parameter. Update ldinfo
1637 accordingly. Use xcoff_mark_auto_exports to mark all automatically-
1640 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1642 * xcofflink.c (xcoff_mark_symbol_by_name): New function.
1643 (bfd_xcoff_size_dynamic_sections): Use it to mark the entry,
1644 init and fini functions. Do garbage collection for objects
1645 without an entry point too.
1647 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1649 * coffcode.h (coff_pointerize_aux_hook): Update CSECT_SYM_P to
1650 check whether a symbol has csect information.
1651 (coff_print_aux): Likewise.
1652 * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Handle auxillary csect
1653 information for C_AIX_WEAKEXT too.
1654 (_bfd_xcoff_swap_aux_out): Likewise.
1655 (xcoff_reloc_type_br): Handle defweak symbols too.
1656 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Handle auxillary csect
1657 information for C_AIX_WEAKEXT too.
1658 (_bfd_xcoff64_swap_aux_out): Likewise.
1659 (xcoff64_reloc_type_br): Handle defweak symbols too.
1660 * coffgen.c (coff_print_symbol): Handle auxillary function
1661 information for C_AIX_WEAKEXT too.
1662 * xcofflink.c (_bfd_xcoff_canonicalize_dynamic_symtab): Set BSF_WEAK
1663 instead of BSF_GLOBAL if the L_WEAK flag is set.
1664 (xcoff_dynamic_definition_p): New function.
1665 (xcoff_link_add_dynamic_symbols): Use it to decide whether ldsym
1666 defines h. Don't change h if ldsym isn't the definition. Otherwise,
1667 always take the symbol class from the ldsym. Use weak bfd symbol
1668 types for weak ldsyms.
1669 (xcoff_link_add_symbols): Use CSECT_SYM_P and EXTERN_SYM_P.
1670 Fix the check for whether a definition is from a shared object.
1671 Allow redefinitions of weak symbols.
1672 (xcoff_link_check_ar_symbols): Use EXTERN_SYM_P.
1673 (xcoff_keep_symbol_p): Likewise.
1674 (bfd_xcoff_size_dynamic_sections): Use CSECT_SYM_P.
1675 (xcoff_link_input_bfd): Use CSECT_SYM_P and EXTERN_SYM_P.
1676 Add .loader entries for C_AIX_WEAKEXT as well as C_EXT symbols,
1677 but mark them as L_WEAK.
1678 (xcoff_write_global_symbol): Treat weak symbols as C_AIX_WEAKEXT
1679 instead of C_EXT if C_AIX_WEAKEXT == C_WEAKEXT.
1681 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1683 * xcofflink.c (xcoff_mark): When walking the relocations,
1684 only mark the target symbol or the target section, not both.
1685 (xcoff_final_definition_p): New function.
1686 (xcoff_keep_symbol_p): Use it to check whether an external XCOFF
1687 symbol is a valid definition of the associated output symbol.
1688 Use XCOFF_ALLOCATED to stop the same hash table entry having
1690 (bfd_xcoff_size_dynamic_sections): Set XCOFF_ALLOCATED when
1692 (xcoff_link_input_bfd): Use xcoff_final_definition_p.
1694 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1696 * xcofflink.c (bfd_xcoff_import_symbol): Treat imported absolute
1699 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1701 * libcoff-in.h (xcoff_tdata): Add a lineno_counts field.
1702 * libcoff.h: Regenerate.
1703 * xcofflink.c (xcoff_link_add_symbols): Record per-symbol
1704 line-number counts in the bfd's lineno_counts field.
1705 Don't keep per-csect line-number counts.
1706 (xcoff_sweep): Don't update per-csect line-number counts.
1707 (bfd_xcoff_size_dynamic_sections): Count the number of line-number
1708 entries in each output section.
1709 (xcoff_link_input_bfd): Get the number of line numbers from
1710 the bfd's lineno_counts field, rather than recalculating it
1711 from scratch. Fix the range check when updating C_BINCL and
1713 (_bfd_xcoff_bfd_final_link): Don't count the output line numbers
1714 here. Don't expect csects to have line-number counts.
1716 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1718 * libcoff-in.h (xcoff_tdata): Change debug_indices to a signed long.
1719 * libcoff.h: Regenerate.
1720 * xcofflink.c (xcoff_keep_symbol_p): New function, using the
1721 "skip" logic from xcoff_link_input_bfd.
1722 (bfd_xcoff_size_dynamic_sections): Explicitly skip dynamic
1723 objects in a dynamic link, rather than checking whether csectpp
1724 is null. Always allocate debug_index for other objects,
1725 and always go through the loop. Update the type of debug_index
1726 after the change above. Read the auxillary csect information
1727 and use xcoff_keep_symbol_p to decide whether a symbol should
1728 be kept. Set its debug_index to -2 if not.
1729 (xcoff_link_input_bfd): Update the type of debug_index after
1730 the change above and always expect it to be nonnull. Use it to
1731 test whether a symbol should be stripped, rather than making the
1732 decision here. Postpone all symbol creation to the second pass.
1734 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1736 * xcofflink.c: (xcoff_mark_symbol): Mark the TOC section when
1737 creating a descriptor.
1738 (xcoff_sweep): Don't mark toc_section unless it's needed.
1739 (bfd_xcoff_size_dynamic_sections): Skip the toc_section
1740 when marking every bfd.
1741 (xcoff_link_input_bfd): Skip all TOC anchors.
1742 (xcoff_toc_section_p, xcoff_find_tc0): New functions.
1743 (_bfd_xcoff_bfd_final_link): Don't set the output bfd's TOC anchor
1744 to -1; call xcoff_find_tc0 instead.
1746 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1748 * libcoff-in.h (xcoff_section_tdata): Update commentary.
1749 * libcoff.h: Regenerate.
1750 * xcofflink.c (xcoff_link_add_symbols): Set the csect of XTY_ER
1751 symbols to bfd_und_section_ptr or bfd_abs_section_ptr, rather than
1752 the previous symbol's csect. Treat last_symndx as an inclusive value
1753 and simplify its handling.
1754 (xcoff_mark): Treat last_symndx as an inclusive value. Only mark
1755 symbols with the right csect. Don't mark rsec when processing
1756 relocations against undefined or absolute sections.
1757 (bfd_xcoff_size_dynamic_sections): Don't check the SEC_MARK flag
1758 of bfd_und_section_ptr.
1759 (xcoff_link_input_bfd): Likewise.
1761 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1763 * coff-rs6000.c (xcoff_ppc_relocate_section): Report relocations
1764 against undefined symbols if the symbol's XCOFF_WAS_UNDEFINED
1765 flag is set. Assert that all undefined symbols are either
1766 imported or defined by a dynamic object.
1767 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
1768 * xcofflink.c (xcoff_link_add_symbols): Extend function-symbol
1769 handling to all relocations. Only set XCOFF_CALLED for function
1771 (xcoff_find_function): New function, split out from...
1772 (bfd_xcoff_export_symbol) ...here.
1773 (xcoff_set_import_path): New function, split out from...
1774 (bfd_xcoff_import_symbol): ...here. Remove assertion for old
1775 meaning of XCOFF_CALLED.
1776 (xcoff_mark_symbol): If we mark an undefined and unimported
1777 symbol, find some way of defining it. If the symbol is a function
1778 descriptor, fill in its definition automatically. If the symbol
1779 is a function, mark its descriptor and allocate room for global
1780 linkage code. Otherwise mark the symbol as implicitly imported.
1781 Move the code for creating function descriptors from...
1782 (xcoff_build_ldsyms): ...here. Use XCOFF_WAS_UNDEFINED to
1783 check for symbols that were implicitly defined.
1784 (xcoff_mark): Don't count any dynamic relocations against
1786 (bfd_xcoff_size_dynamic_sections): Save the rtld parameter
1787 in the xcoff link info.
1788 (xcoff_link_input_bfd): Remove handling of undefined and
1791 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1793 * coff-rs6000.c (xcoff_reloc_type_br): Make the branch absolute
1794 if the target is absolute. Fix comment typo.
1795 (xcoff_ppc_relocate_section): Remove FIXME.
1796 * coff64-rs6000.c (xcoff64_reloc_type_br): Make the branch absolute
1797 if the target is absolute.
1799 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1801 * xcofflink.c (xcoff_mark, xcoff_link_input_bfd): Don't copy
1802 R_POS and R_NEG relocations against absolute symbols to the
1805 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1807 * coff64-rs6000.c (xcoff64_write_object_contents): Set the cputype
1808 to 2 for bfd_mach_ppc_620.
1810 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1812 * config.bfd: Treat AIX 6+ in the same way as AIX 5.
1813 * configure.in: Likewise.
1814 * configure: Regenerate.
1816 2009-03-13 H.J. Lu <hongjiu.lu@intel.com>
1819 * elf.c (assign_section_numbers): Generate symbol table if there
1820 is any relocation in output.
1821 (_bfd_elf_compute_section_file_positions): Likewise.
1823 2009-03-13 Nick Clifton <nickc@redhat.com>
1826 * elf-bfd.h (NUM_SHDR_ENTRIES): Cope with an empty section.
1827 * elflink.c (elf_link_read_relocs_from_section): Use
1828 NUM_SHDR_ENTRIES. Gracefully handle the case where there are
1829 relocs but no symbol table.
1830 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
1832 2009-03-12 H.J. Lu <hongjiu.lu@intel.com>
1835 * elf32-i386.c (elf_i386_check_tls_transition): Use strncmp
1836 to check ___tls_get_addr.
1838 * elf64-x86-64.c (elf64_x86_64_check_tls_transition): Use
1839 strncmp to check __tls_get_addr.
1841 2009-03-12 Andrew Stubbs <ams@codesourcery.com>
1843 * dwarf2.c (read_section): Always check the offset, even when the
1844 section has been read before.
1846 2009-03-11 H.J. Lu <hongjiu.lu@intel.com>
1848 * elf32-i386.c (elf_i386_check_tls_transition): Fix a typo in
1851 2009-03-11 Chris Demetriou <cgd@google.com>
1853 * bfd.c (BFD_DETERMINISTIC_OUTPUT): New flag.
1854 * bfd-in2.h: Regenerate.
1855 * archive.c (bfd_ar_hdr_from_filesystem): If BFD_DETERMINISTIC_OUTPUT
1856 flag is set, use 0 for uid, gid, and timestamp, and use 0644 for file
1858 (bsd_write_armap): Likewise.
1859 (_bfd_archive_bsd_update_armap_timestamp): If BFD_DETERMINISTIC_OUTPUT
1860 flag is set, do nothing.
1861 (coff_write_armap): If BFD_DETERMINISTIC_OUTPUT flag is set, use 0
1864 2009-03-11 Ulrich Weigand <uweigand@de.ibm.com>
1866 * elf32-spu.c (find_function_stack_adjust): Handle sf instruction
1867 used to update stack pointer.
1869 2009-03-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1872 * som.c (som_bfd_derive_misc_symbol_info): Set symbol type ST_ABSOLUTE
1873 for unknown symbols in absolute section.
1875 2009-03-06 Nick Clifton <nickc@redhat.com>
1877 * po/es.po: Updated Spanish translation.
1879 2009-03-05 Christophe Lyon <christophe.lyon@st.com>
1881 * elf32-arm.c (group_sections): Take next section size into
1882 account before accepting to group it.
1884 2009-03-05 Christophe Lyon <christophe.lyon@st.com>
1886 * elf32-arm.c (arm_type_of_stub): Handle long branches targetting
1888 (elf32_arm_final_link_relocate): Likewise.
1890 2009-03-05 Moritz Kroll <Moritz.Kroll@gmx.de>
1893 * peXXigen.c (_bfd_XXi_final_link_postscript): Check h->root.type.
1895 2009-03-04 Alan Modra <amodra@bigpond.net.au>
1897 * reloc.c (BFD_RELOC_PPC_TLSGD, BFD_RELOC_PPC_TLSLD): New.
1898 * section.c (struct bfd_section): Add has_tls_get_addr_call.
1899 (BFD_FAKE_SECTION): Init new flag.
1900 * ecoff.c (bfd_debug_section): Likewise.
1901 * bfd-in2.h: Regenerate.
1902 * libbfd.h: Regenerate.
1903 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_TLSGD and R_PPC_TLSLD.
1904 (ppc_elf_reloc_type_lookup): Handle new relocs.
1905 (ppc_elf_check_relocs): Set has_tls_get_addr_call on finding such
1906 without marker relocs.
1907 (ppc_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
1908 if section has no old-style calls.
1909 (ppc_elf_relocate_section): Set tls_mask for non-tls relocs too.
1910 Don't try to optimize new-style __tls_get_addr call when handling
1911 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
1913 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_TLSGD, R_PPC64_TLSLD.
1914 (ppc64_elf_reloc_type_lookup): Handle new relocs.
1915 (ppc64_elf_check_relocs): Set has_tls_get_addr_call on finding such
1916 without marker relocs.
1917 (ppc64_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
1918 if section has no old-style calls. Set toc_ref for new relocs as
1920 (ppc64_elf_relocate_section): Set tls_mask for non-tls relocs too.
1921 Don't try to optimize new-style __tls_get_addr call when handling
1922 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
1925 2009-03-04 Alan Modra <amodra@bigpond.net.au>
1928 * configure.in: Test for ld --as-needed support. Link shared
1929 libbfd against libm.
1930 * configure: Regenerate.
1932 2009-03-03 Alan Modra <amodra@bigpond.net.au>
1934 * Makefile.am: Run "make dep-am".
1935 * Makefile.in: Regenerate.
1937 2009-03-02 Qinwei <qinwei@sunnorth.com.cn>
1939 * elf32-score7.c: New file.
1940 * elf32-score.h: New file.
1941 * elf32-score.c: Add code to support score 7. Set score7 as the
1943 * cpu-score.c: Add score7 architecure.
1944 (compatibile): New function.
1945 * Makefile.am: Add rules for building elf32-score7 object.
1946 * Makefile.in: Regenerate.
1947 * configure.in: Add elf32-score7 object to score vectors.
1948 * configure: Regenerate.
1949 * reloc.c: Add score7 relocs.
1950 * archures.c: Add score3 and score7 machine numbers.
1951 * bfd-in2.h: Regenerate.
1952 * libbfd.h: Regenerate.
1954 2009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1956 * configure: Regenerate.
1958 2009-03-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1960 * elf32-hppa.c (hppa32_elf_local_refcounts): New function.
1961 (elf32_hppa_check_relocs): Use it.
1963 * elf_hppa_add_symbol_hook (elf_hppa_add_symbol_hook): Move to
1965 (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
1966 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
1967 (elf_hppa_is_dynamic_loader_symbol): Likewise.
1968 (elf_hppa_record_segment_addrs): Likewise.
1969 (elf_hppa_final_link): Likewise.
1970 (elf_hppa_relocate_insn): Likewise.
1971 (elf_hppa_final_link_relocate): Likewise.
1972 (elf64_hppa_relocate_section): Likewise.
1973 * elf64-hppa.c: Insert above.
1975 2009-02-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1977 * elf-hppa.h (elf_hppa_final_link): Use elf_hppa_final_link.
1978 (elf_hppa_final_link_relocate ): Rewrite eliminating dynamic hash table.
1979 (elf_hppa_relocate_section): Likewise.
1980 * elf64-hppa.c (struct elf64_hppa_link_hash_entry): Change to derive
1981 from struct elf_link_hash_entry. Add count field.
1982 (struct elf64_hppa_dyn_hash_table): Delete.
1983 (struct elf64_hppa_link_hash_table): Delete dyn_hash_table field.
1984 (elf64_hppa_hash_table): Rename to hppa_link_hash_table.
1985 (hppa_elf_hash_entry, eh_name): Define.
1986 (elf64_hppa_new_dyn_hash_entry): Delete.
1987 (elf64_hppa_dyn_hash_lookup): Delete.
1988 (elf64_hppa_dyn_hash_traverse): Delete.
1989 (get_dyn_name): Delete.
1990 (elf64_hppa_finalize_opd): Use struct elf_link_hash_entry * instead
1991 of struct elf64_hppa_dyn_hash_entry *.
1992 (elf64_hppa_finalize_dlt, llocate_global_data_dlt,
1993 allocate_global_data_plt, allocate_global_data_stub,
1994 allocate_global_data_opd, count_dyn_reloc, allocate_dynrel_entries):
1996 (hppa64_link_hash_newfunc): New.
1997 (elf64_hppa_hash_table_create): Rework.
1998 (count_dyn_reloc): Likewise.
1999 (hppa64_elf_local_refcounts): New.
2000 (elf64_hppa_check_relocs): Rework using standard technique for recording
2001 local DLT, PLT and OPD reference counts.
2002 (elf64_hppa_dynamic_symbol_p): Revise using "eh" for struct
2003 elf_link_hash_entry *.
2004 (elf64_hppa_mark_exported_functions, allocate_global_data_dlt,
2005 allocate_global_data_plt, allocate_global_data_stub,
2006 allocate_global_data_opd, allocate_dynrel_entries,
2007 elf64_hppa_adjust_dynamic_symbol,
2008 elf64_hppa_mark_milli_and_exported_functions): Likewise.
2009 (elf64_hppa_create_dynamic_sections, elf64_hppa_size_dynamic_sections):
2010 Use hppa_link_hash_table. Rework.
2011 (elf64_hppa_link_output_symbol_hook): Rework.
2012 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd,
2013 elf64_hppa_finalize_dlt, elf64_hppa_finalize_dynreloc,
2014 elf64_hppa_finish_dynamic_sections): Likewise.
2016 2009-02-26 Christophe Lyon <christophe.lyon@st.com>
2018 * elf32-arm.c (stub_reloc_type): Removed.
2019 (insn_sequence): Renamed reloc_type field to r_type.
2020 (elf32_arm_stub_long_branch_v4t_arm_thumb_pic): New stub.
2021 (elf32_arm_stub_long_branch_v4t_thumb_arm_pic): Likewise.
2022 (elf32_arm_stub_long_branch_thumb_only_pic): Likewise.
2023 (elf32_arm_stub_type): Add new enum entries for the new stubs.
2024 (arm_stub_is_thumb): Catch new stubs.
2025 (arm_type_of_stub): Handle new stubs.
2026 (arm_size_one_stub): Use ARRAY_SIZE. Handle new stubs.
2027 (bfd_elf32_arm_process_before_allocation): Remove useless
2030 2009-02-25 H.J. Lu <hongjiu.lu@intel.com>
2032 * elf.c (elf_find_function): Use is_function_type to check
2035 2009-02-24 Sterling Augustine <sterling@jaw.hq.tensilica.com>
2037 * xtensa-modules.c: Revert to previous version 1.11 due
2038 to inadvertant commit.
2040 2009-02-24 Sterling Augustine <sterling@tensilica.com>
2042 * elf32-xtensa.c (text_action_add): Separate test for action
2043 type. Break if saved action is ta_widen_insn at same offset.
2045 2009-02-24 Daniel Jacobowitz <dan@codesourcery.com>
2047 * elf32-arm.c (elf32_arm_stub_long_branch_any_any_pic): Rename
2048 to elf32_arm_stub_long_branch_any_arm_pic.
2049 (elf32_arm_stub_long_branch_any_thumb_pic): New.
2050 (enum elf32_arm_stub_type, arm_type_of_stub)
2051 (arm_size_one_stub): Handle any to ARM PIC and any to Thumb PIC
2054 2009-02-24 Joseph Myers <joseph@codesourcery.com>
2056 * elf32-arm.c (PREV_SEC): Update comment.
2057 (group_sections): Rename argument to stubs_always_after_branch.
2058 Reverse the list and place stubs at the end of input sections.
2060 (elf32_arm_size_stubs): Update to use stubs_always_after_branch.
2062 2009-02-23 Daniel Jacobowitz <dan@codesourcery.com>
2064 * elf32-arm.c (arm_build_one_stub): Initialize stub_reloc_offset.
2066 (arm_size_one_stub): Remove unnecessary break.
2067 (arm_map_one_stub): Fix formatting. Return after BFD_FAIL.
2069 2009-02-23 Christophe Lyon <christophe.lyon@st.com>
2071 * elf32-arm.c (stub_insn_type): New type.
2072 (stub_reloc_type): Likewise.
2073 (insn_sequence): Likewise.
2074 (elf32_arm_stub_long_branch_any_any): Encode using insn_sequence.
2075 (elf32_arm_stub_long_branch_v4t_arm_thumb): Likewise.
2076 (elf32_arm_stub_long_branch_thumb_only): Likewise.
2077 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
2078 (elf32_arm_stub_short_branch_v4t_thumb_arm): Likewise.
2079 (elf32_arm_stub_long_branch_any_any_pic): Likewise.
2080 (elf32_arm_stub_hash_entry): Add new helper fields.
2081 (stub_hash_newfunc): Initialize these new fields.
2082 (arm_build_one_stub): Encode Arm and Thumb instructions separately
2083 to take endianness into account.
2084 (arm_size_one_stub): Compute size of stubs using insn_sequence.
2085 (arm_map_one_stub): Code is now more generic, thanks to
2088 2009-02-23 Christophe Lyon <christophe.lyon@st.com>
2090 * elf32-arm.c (elf32_arm_stub_long_branch_thumb_only): Fix stub
2092 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
2093 (arm_type_of_stub): Use Thumb-only long branch stub (non-PIC) when
2094 BLX is not available. Fix typo in warning message. Add comments
2095 and improve formatting.
2096 (arm_build_one_stub): Adjust to new
2097 elf32_arm_stub_long_branch_v4t_thumb_arm stub.
2098 (arm_map_one_stub): Likewise.
2100 2009-02-23 Tristan Gingold <gingold@adacore.com>
2101 Eric Botcazou <ebotcazou@adacore.com>
2102 Douglas B Rupp <rupp@gnat.com>
2104 * vms.h: Update copyright year, fix comments, reorder declarations.
2105 (_bfd_save_vms_section): Remove the prototype.
2106 (EGPS_S_V_NO_SHIFT): New constant.
2107 (bfd_vms_set_section_flags): New prototype.
2108 (EGPS_S_B_ALIGN, EGPS_S_W_FLAGS, EGPS_S_L_ALLOC, EGPS_S_B_NAMLNG): New
2110 (EGSY_S_W_FLAGS): Ditto.
2111 (EGSY_S_V_QUAD_VAL): Ditto.
2112 (ESDF_S_L_VALUE, ESDF_S_L_PSINDX, ESDF_S_B_NAMLNG): Ditto.
2113 (EGST_S_W_FLAGS, EGST_S_Q_LP_1, EGST_S_Q_LP_2, EGST_S_L_PSINDX,
2114 EGST_S_B_NAMLNG): Ditto.
2115 (ESRF_S_B_NAMLNG): Ditto.
2116 (ETIR_S_C_HEADER_SIZE): Ditto.
2117 (EGPS_S_V_ALLOC_64BIT): Ditto.
2118 (DST_S_C_EPILOG): Ditto.
2119 (DST_S_C_SRC_SETLNUM_L, DST_S_C_SRC_SETLNUM_W) : Ditto.
2120 (DST_S_C_SRC_INCRLNUM_B): Ditto.
2121 (DST_S_B_PCLINE_UNSBYTE, DST_S_W_PCLINE_UNSWORD): Ditto.
2122 (DST_S_L_PCLINE_UNSLONG): Ditto.
2123 (DST_S_B_MODBEG_NAME, DST_S_L_RTNBEG_ADDRESS) : Ditto
2124 (DST_S_B_RTNBEG_NAME, DST_S_L_RTNEND_SIZE): Ditto
2125 (DST_S_C_SOURCE_HEADER_SIZE): Ditto.
2126 (DST_S_B_SRC_DF_LENGTH, DST_S_W_SRC_DF_FILEID): Ditto.
2127 (DST_S_B_SRC_DF_FILENAME, DST_S_B_SRC_UNSBYTE): Ditto.
2128 (DST_S_B_SRC_UNSBYTE): Ditto.
2129 (DST_S_W_SRC_UNSWORD, DST_S_L_SRC_UNSLONG): Ditto.
2131 (vms_section, vms_reloc): Remove types.
2132 (hdr_struc): Replaced by ...
2133 (hdr_struct): ... new type.
2134 (EMH_S_W_HDRTYP, EMH_S_B_STRLVL, EMH_S_L_ARCH1): New constants.
2135 (EMH_S_L_ARCH2, EMH_S_L_RECSIZ, EMH_S_B_NAMLNG): Ditto.
2136 (EMH_DATE_LENGTH): Ditto.
2137 (eom_struc): Replaced by ...
2138 (eom_struct): ... new type.
2139 (EEOM_S_L_TOTAL_LPS, EEOM_S_W_COMCOD, EEOM_S_B_TFRFLG): New constants.
2140 (EEOM_S_L_PSINDX, EEOM_S_L_TFRADR): Ditto.
2141 (EIHD_S_K_MAJORID, EIHD_S_K_MINORID, EIHD_S_K_EXE): Ditto.
2142 (EIHD_S_L_SIZE, EIHD_S_L_ISDOFF, EIHD_S_L_SYMDBGOFF): Ditto.
2143 (EIHD_S_Q_SYMVVA, EIHD_S_L_IMGTYPE): Ditto.
2144 (EISD_S_L_EISDSIZE, EISD_S_L_SECSIZE, EISD_S_Q_VIR_ADDR): Ditto.
2145 (EISD_S_L_FLAGS, EISD_S_L_VBN, EISD_S_R_CONTROL): Ditto.
2146 (EISD_S_L_IDENT, EISD_S_T_GBLNAM): Ditto.
2147 (EISD_S_M_GBL, EISD_S_M_CRF, EISD_S_M_DZRO, EISD_S_M_WRT): Ditto.
2148 (EISD_S_M_INITALCODE, EISD_S_M_BASED, EISD_S_M_FIXUPVEC): Ditto.
2149 (EISD_S_M_RESIDENT, EISD_S_M_VECTOR, EISD_S_M_PROTECT): Ditto.
2150 (EISD_S_M_LASTCLU, EISD_S_M_EXE, EISD_S_M_NONSHRADR): Ditto.
2151 (EISD_S_M_QUAD_LENGTH, EISD_S_M_ALLOC_64BIT): Ditto.
2152 (EIHS_S_L_DSTVBN, EIHS_S_L_DSTSIZE, EIHS_S_L_GSTVBN): Ditto.
2153 (EIHS_S_L_GSTSIZE, EIHS_S_L_DMTVBN, EIHS_S_L_DMTBYTES): Ditto.
2154 (DBG_S_L_DMT_MODBEG, DBG_S_L_DST_SIZE): Ditto.
2155 (DBG_S_W_DMT_PSECT_COUNT, DBG_S_C_DMT_HEADER_SIZE): Ditto.
2156 (DBG_S_L_DMT_PSECT_START, DBG_S_L_DMT_PSECT_LENGTH)
2157 (DBG_S_C_DMT_PSECT_SIZE): Ditto.
2158 (enum file_type_enum): New type.
2159 (struct location_struct): Removed.
2160 (struct fileinfo, struct srecinfo, struct lineinfo): New types.
2161 (struct funcinfo, struct module): Ditto.
2162 (struct vms_private_data_struct): Update fields.
2163 (struct vms_section_data_struct): New type.
2165 * vms.c: Update copyright year, fix comments,
2166 Fix includes for DECC, add prototypes.
2167 (vms_initialize): Use bfd_alloc instead of bfd_zalloc and remove
2169 Use flavour to set is_vax, location_stack is removed.
2170 (struct pair): Declare.
2171 (fill_section_ptr): Initialize variables at declaration.
2172 Add guard to set SECTION_SYM flag, handlde und section.
2173 (vms_fixup_sections): Use struct pair for fill_section_ptr argument.
2174 (_bfd_vms_slurp_object_records): New function, replaces previous
2176 (vms_slurp_module): New function.
2177 (vms_slurp_image): Ditto.
2178 (vms_object_p): Complete rewrite.
2179 (vms_mkobject): Use is_vax field to slect architecture.
2180 (free_reloc_stream): New function.
2181 (vms_convert_to_var): Ditto.
2182 (vms_convert_to_var_1): Ditto.
2183 (vms_convert_to_var_unix_filename): Ditto.
2184 (vms_close_and_cleanup): Call free_reloc_stream, convert file to
2186 (vms_new_section_hook): Set alignment to 0, allocate private data.
2187 (vms_get_section_contents): Load content.
2188 (vms_get_symbol_info): Handle undefined section.
2189 (vms_find_nearest_line): Handle.
2190 (alloc_reloc_stream): New function.
2191 (vms_slurp_reloc_table): Ditto.
2192 (vms_get_reloc_upper_bound): Make it real.
2193 (vms_canonicalize_reloc): Do the real work.
2194 (alpha_howto_table): Add ALPHA_R_NOP, ALPHA_R_BSR, ALPHA_R_LDA,
2196 (vms_bfd_reloc_type_lookup): Handle NOP, BSR, LDA and BOH.
2197 (vms_set_arch_mach): Check arch.
2198 (vms_set_section_contents): Copy the content after allocation.
2199 (vms_alpha_vec): Update object flags.
2201 * vms-tir.c: Update copyright year, fix comments,
2202 add prototypes for new functions.
2203 (dst_define_location): New function.
2204 (dst_restore_location): New function.
2205 (dst_retrieve_location): New function.
2206 (dst_check_allocation): New function.
2207 (image_dump): Call dst_check_allocation.
2208 (image_write_b): Ditto.
2209 (image_write_w): Ditto.
2210 (image_write_l): Ditto.
2211 (image_write_q): Ditto.
2212 (cmd_name): Handle STA_LW, STA_QW, STO_OFF, STO_IMM, STO_IMMR, STO_LW,
2213 STO_QW, OPR_ADD, CTL_SETRB, STC_LP_PSB, CTL_DFLOC, CTL_STLOC,
2215 Call error handler instead of abort if name is not known.
2216 (etir_sta): Add quarter_relocs argument and set it.
2219 (etir_opr): Ditto, return FALSE in case of error.
2220 (etir_ctl): Add quarter_relocs argument and set it, fix cast.
2221 Fix CTL_DFLOC, CTL_STLOC, CTL_STKDL.
2222 (etir_stc): Add quarter_relocs argument and set it, fix cast.
2223 Fix STC_LP, STC_LP_PSB, STC_GBL and STC_CGA.
2224 Handle STC_LP_PSB, STC_BSR_GBL, STC_LDA_GBL, STC_BOH_GBL.
2225 Move STC_NOP_PS, STC_BSR_PS, STC_LDA_PS, STC_BOH_PS, STC_NBH_PS.
2226 Return FALSE in case of error.
2227 (tir_sta): Change sign of psect.
2229 (tir_cmd): Fix cast. Makes tir_table static const.
2230 (etir_cmd): Add quarter_relocs argument, makes etir_table const,
2231 add argument to explain.
2232 (analyze_etir): Initialize maxptr, add quarter_relocs
2233 declaration, move some declarations into inner scopes.
2234 Handle quarter_relocs and STO_IMM.
2235 (_bfd_vms_slurp_tir): Use constant instead of hard-coded values.
2236 (_bfd_vms_slurp_relocs): New function.
2237 (_bfd_vms_decode_relocs): New function.
2238 (sto_imm): Rewritten.
2239 (start_first_etbt_record): New function.
2240 (start_another_etbt_record): Ditto.
2241 (etir_output_check): Ditto.
2242 (defer_reloc_p): Ditto.
2243 (_bfd_vms_write_tir): Remove nextoffset, convert a while-loop to
2244 a for-loop. Correctly deals with contents, deals with .vmsdebug,
2245 rewritte relocations handling.
2246 (_bfd_vms_write_tbt): Removed.
2247 (_bfd_vms_write_dbg): Ditto.
2249 * vms-misc.c: Update copyright year, Fix comments.
2250 (_bfd_vms_get_header_values): Use 'size' instead of 'length'.
2251 (maybe_adjust_record_pointer_for_object): New function.
2252 (_bfd_vms_get_first_record): New function, replaces ...
2253 (_bfd_vms_get_record): .. removed.
2254 (_bfd_vms_get_object_record): New function.
2255 (_bfd_vms_get_object_record): New function.
2256 (vms_get_remaining_object_record): New function, replaces ...
2257 (_bfd_vms_get_next_record): ... removed.
2258 (add_new_contents): Removed.
2259 (_bfd_save_vms_section): Removed.
2260 (_bfd_get_vms_section): Removed.
2261 (_bfd_vms_output_flush): Write in VAR format.
2262 (new_symbol): Don't make UND section.
2264 * vms-hdr.c: Update copyright year, update list of record handled.
2265 (_bfd_vms_slurp_hdr): rec_length renamed to rec_size.
2266 (_bfd_vms_write_hdr): Strip vms and unix patches,
2267 add comments, truncate module name at 31 characters,
2268 use constants instead of hard-coded value,
2269 write BFD version instead of a fixed string.
2270 (_bfd_vms_slurp_ihd): New function.
2271 (_bfd_vms_slurp_isd): Ditto.
2272 (_bfd_vms_slurp_ihs): Ditto.
2273 (new_module): Ditto.
2274 (parse_module): Ditto
2275 (build_module_list): Ditto.
2276 (module_find_nearest_line): Ditto.
2277 (_bfd_vms_find_nearest_dst_line): Ditto.
2278 (vms_slurp_debug): Ditto.
2279 (_bfd_vms_slurp_dbg): Ditto.
2280 (_bfd_vms_slurp_tbt): Ditto.
2281 (_bfd_vms_write_dbg): Ditto.
2282 (_bfd_vms_write_tbt): Ditto.
2284 * vms-gsd.c: Update copyright year, update list of records handled.
2285 (EVAX_LITERALS_NAME): New macro.
2286 (evax_section_flags): Add an entry for EVAX_LITERALS_NAME.
2287 (gpsflagdesc, gsyflagdesc): Moved out of _bfd_vms_slurp_gsd.
2288 (register_universal_symbol): New function and prototype.
2289 (_bfd_vms_slurp_gsd): Fix indentations and casts,
2290 improve debug messages,
2291 use constants instead of hard-coded value,
2292 fix missing endianness conversion,
2293 handle global symbol (SYMG).
2294 (bfd_vms_set_section_flags): New function.
2295 (_bfd_vms_write_gsd): Don't write .vmsdebug section,
2296 handle section literals,
2298 handle section bfd and vms flags,
2299 don't output LIB$INITIALIZE symbol,
2300 fix handling of weak symbols,
2301 fix evax vs vax procedure descriptor,
2302 handle absolute symbols.
2304 * reloc.c (BFD_RELOC_ALPHA_NOP, BFD_RELOC_ALPHA_BSR,
2305 BFD_RELOC_ALPHA_LDA, BFD_RELOC_ALPHA_BOH): New relocations.
2307 * makefile.vms (DEFS): Fix flags for VMS.
2309 * bfdio.c (real_fopen): Handle multiple VMS fopen attributes.
2311 * bfd-in2.h: Regenerated.
2312 * libbfd.h: Regenerated.
2314 2009-02-20 Cary Coutant <ccoutant@google.com>
2316 * vmsutil.c (vms_file_stats_name): Fix incorrect use of st_mtime
2319 2009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
2322 * coffcode.h (coff_write_object_contents): Don't let the string
2323 table offset overflow the s_name field when using long section names.
2325 2009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
2327 * coff-alpha.c (alpha_ecoff_backend_data): Initialise fields which
2328 control long section name handling with ECOFF_NO_LONG_SECTION_NAMES.
2329 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2330 * coff-rs6000.c (bfd_xcoff_backend_data): Initialise fields which
2331 control long section name handling with XCOFF_NO_LONG_SECTION_NAMES.
2332 (bfd_pmac_xcoff_backend_data): Likewise.
2333 * coff64-rs6000.c (bfd_xcoff_backend_data): Likewise.
2334 (bfd_xcoff_aix5_backend_data): Likewise.
2335 (xcoff64_write_object_contents): Delete unused long_section_names
2337 * coff-sh.c (bfd_coff_small_swap_table): Initialise long section
2338 name members using COFF_DEFAULT_LONG_SECTION_NAMES and make entire
2340 * coffcode.h (documentation): Update to describe long section names.
2341 (COFFLONGSECTIONCATHELPER): New helper macro.
2342 (BLANKOR1TOODD): Likewise.
2343 (COFF_ENABLE_LONG_SECTION_NAMES): Likewise.
2344 (COFF_LONG_SECTION_NAMES_SETTER): Likewise.
2345 (COFF_DEFAULT_LONG_SECTION_NAMES): Likewise.
2346 (bfd_coff_set_long_section_names_allowed): New function.
2347 (bfd_coff_set_long_section_names_disallowed): Likewise.
2348 (struct bfd_coff_backend_data): Add new backend hook function
2349 pointer _bfd_coff_set_long_section_names.
2350 (bfd_coff_set_long_section_names): New backend hook.
2351 (coff_write_object_contents): Only generate long section names if
2352 bfd_coff_long_section_names() indicates they are currently enabled.
2353 (bfd_coff_std_swap_table): Make non-const, and initialise long
2354 section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
2355 (ticoff0_swap_table): Likewise to both.
2356 (ticoff1_swap_table): Again, likewise to both.
2357 * coffgen.c (make_a_section_from_file): Allow long section names
2358 as inputs even if not currently allowed for outputs.
2359 * ecoff.c (_bfd_ecoff_no_long_sections): New function.
2360 * efi-app-ia32.c (COFF_LONG_SECTION_NAMES): Define to 0, not blank.
2361 * efi-app-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
2362 * efi-app-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
2363 * efi-bsdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
2364 * efi-bsdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
2365 * efi-bsdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
2366 * efi-rtdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
2367 * efi-rtdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
2368 * efi-rtdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
2369 * pei-arm.c (COFF_LONG_SECTION_NAMES): Likewise.
2370 * pei-i386.c (COFF_LONG_SECTION_NAMES): Likewise.
2371 * pei-mcore.c (COFF_LONG_SECTION_NAMES): Likewise.
2372 * pei-mips.c (COFF_LONG_SECTION_NAMES): Likewise.
2373 * pei-ppc.c (COFF_LONG_SECTION_NAMES): Likewise.
2374 * pei-sh.c (COFF_LONG_SECTION_NAMES): Likewise.
2375 * pei-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
2376 * libcoff-in.h: Update copyright year to cause updated copyright
2377 year in generated libcoff.h, and fix typo.
2378 * libcoff.h: Regenerated.
2379 * libecoff.h (ECOFF_NO_LONG_SECTION_NAMES): New macro.
2380 (_bfd_ecoff_no_long_sections): Add prototype.
2381 * libxcoff.h (XCOFF_NO_LONG_SECTION_NAMES): New macro.
2382 * pe-mips.c (COFF_LONG_SECTION_NAMES): Define empty if not already
2383 defined by an including .c file.
2384 * ticoff.h (ticoff0_swap_table): Make non-const, and initialise
2385 long section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
2386 (ticoff1_swap_table): Likewise to both.
2388 2009-02-18 Christophe Lyon <christophe.lyon@st.com>
2390 * elf32-arm.c (arm_build_one_stub): Fix relocation target for pic
2391 stub. Catch default case error.
2392 (arm_map_one_stub): Add missing Thumb mapping symbol.
2394 2009-02-18 Bjoern Haase <bjoern.m.haase@web.de>
2397 * elf32-avr.c: Handle case where no local symbos exist correctly.
2399 2009-02-16 Christophe Lyon <christophe.lyon@st.com>
2402 * elf32-arm.c (arm_long_branch_stub,
2403 arm_thumb_v4t_long_branch_stub,
2404 arm_thumb_thumb_long_branch_stub,
2405 arm_thumb_arm_v4t_long_branch_stub,
2406 arm_thumb_arm_v4t_short_branch_stub,
2407 arm_pic_long_branch_stub):
2408 Renamed to elf32_arm_stub_long_branch_any_any,
2409 elf32_arm_stub_long_branch_v4t_arm_thumb,
2410 elf32_arm_stub_long_branch_thumb_only,
2411 elf32_arm_stub_long_branch_v4t_thumb_arm,
2412 elf32_arm_stub_short_branch_v4t_thumb_arm,
2413 elf32_arm_stub_long_branch_any_any_pic.
2414 (arm_stub_long_branch, arm_thumb_v4t_stub_long_branch,
2415 arm_thumb_thumb_stub_long_branch,
2416 arm_thumb_arm_v4t_stub_long_branch,
2417 arm_thumb_arm_v4t_stub_short_branch, arm_stub_pic_long_branch):
2418 Renamed to arm_stub_long_branch_any_any,
2419 arm_stub_long_branch_v4t_arm_thumb,
2420 arm_stub_long_branch_thumb_only,
2421 arm_stub_long_branch_v4t_thumb_arm,
2422 arm_stub_short_branch_v4t_thumb_arm,
2423 arm_stub_long_branch_any_any_pic.
2425 2009-02-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2427 * elf-hppa.h (elf_hppa_final_link_relocate): Correct addend value used
2428 in branch offset check.
2430 2009-02-15 Alan Modra <amodra@bigpond.net.au>
2432 * elf64-ppc.c (struct _ppc64_elf_section_data): Delete t_symndx,
2433 add toc.symndx and toc.add.
2434 (ppc64_elf_check_relocs): Don't set htab->tls_get_addr here.
2436 (get_tls_mask): Add toc_addend param, set from toc.add. Adjust all
2438 (ppc64_elf_tls_setup): Set htab->tls_get_addr and tls_get_addr_fd.
2439 (branch_reloc_hash_match): New function, extracted from..
2440 (ppc64_elf_tls_optimize): ..here.
2441 (ppc64_elf_relocate_section): Properly set addends when optimizing
2442 tls sequences. Avoid unnecessary reading and writing of insns.
2443 Only redo reloc when symbol changed. Bypass symbol checks when
2445 * elf32-ppc.c (ppc_elf_tls_setup): Correct comment.
2446 (branch_reloc_hash_match): New function, extracted from..
2447 (ppc_elf_tls_optimize): ..here.
2448 (ppc_elf_relocate_section): Avoid unnecessary reading of insns.
2449 Don't clear addend on zapped __tls_get_addr reloc.
2451 2009-02-12 Nick Clifton <nickc@redhat.com>
2454 * elflink.c (bfd_elf_final_link): When counting the relocations,
2455 if the header size has not been set yet then assume that it will
2456 match the output section's reloc type.
2458 2009-02-12 Nathan Sidwell <nathan@codesourcery.com>
2460 * elf32-mips.c (mips_elf_final_gp): Don't add 0x4000 offset for
2463 2009-02-09 Alan Modra <amodra@bigpond.net.au>
2465 * elf32-spu.c (spu_elf_find_overlays): Call bfd_set_error on errors.
2466 (find_function): Likewise.
2467 (pasted_function): Don't error if no prior function found.
2468 (discover_functions): Revert 2008-12-10 change. Extend first
2469 function range to start of section.
2471 2009-02-08 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2473 * elf64-hppa.c: Remove PARAMS macro. Replace PTR with void *. Convert
2475 * elf64-hppa.h: Likewise.
2477 2009-02-06 Joseph Myers <joseph@codesourcery.com>
2479 * elfxx-mips.c (_bfd_mips_elf_section_processing): Remove special
2482 2009-02-04 Alan Modra <amodra@bigpond.net.au>
2484 * elf32-spu.c (spu_elf_build_stubs): Define __icache_neg_log2_linesize.
2485 Define __icache_ptr_handler*, not __icache_ptr___icache_bi_handler*.
2487 2009-02-03 Sandip Matte <sandip@rmicorp.com>
2489 * aoutx.h (NAME (aout, machine_type)): Handle bfd_mach_mips_xlr.
2490 * archures.c (bfd_mach_mips_xlr): Define.
2491 * bfd-in2.h: Regenerate.
2492 * cpu-mips.c (I_xlr): Define.
2493 (arch_info_struct): Add XLR entry.
2494 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_XLR.
2495 (mips_set_isa_flags): Handle bfd_mach_mips_xlr
2496 (mips_mach_extensions): Add XLR entry.
2498 2009-02-03 Eric B. Weddington <eric.weddington@atmel.com>
2500 * elf32-avr.c (avr_final_link_relocate): Allow avr25 to wraparound.
2502 2009-02-03 Carlos O'Donell <carlos@codesourcery.com>
2504 * configure.in: AC_SUBST pdfdir.
2505 * Makefile.am: Add install-pdf, install-pdf-am
2506 and install-pdf-recursive targets. Define pdfdir.
2507 * doc/Makefile.am: Define pdf__strip_dir. Add
2508 install-pdf and install-pdf-am targets.
2509 * po/Make-in: Add install-pdf target.
2510 * configure: Regenerate.
2511 * Makefile.in: Regenerate
2512 * doc/Makefile.in: Regenerate.
2514 2009-02-03 Maxim Kuvyrkov <maxim@codesourcery.com>
2516 * bfd-in2.h: Regenerate.
2517 * elf32-m68k.c: Handle 2-slot GOT entries. Rename variables and
2518 fields from n_entries to n_slots where appropriate, update comments.
2519 (HOWTO): Add TLS relocations.
2520 (reloc_map): Map BFD_RELOC_68K_TLS_* to R_68K_TLS_*.
2521 (enum elf_m68k_got_offset_size): New enum.
2522 (struct elf_m68k_got_entry.type): Move field to ...
2523 (struct elf_m68k_got_entry_key): ... here. Update all uses.
2524 (elf_m68k_reloc_got_type, elf_m68k_reloc_got_offset_size): New static
2526 (elf_m68k_reloc_got_n_entries, elf_m68k_reloc_tls_p): New static
2528 (struct elf_m68k_got): merge rel_8o_n_entries and rel_8o_16o_n_entries
2529 fields into n_entries array. Update comments.
2530 (elf_m68k_init_got): Simplify, update all uses.
2531 (elf_m68k_init_got_entry_key): Handle R_68K_TLS_LDM32 reloc, update.
2532 (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT): Adjust to handle 2-slot
2533 GOT entries; update name, update all uses.
2534 (ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): Ditto.
2535 (elf_m68k_get_got_entry): Update.
2536 (elf_m68k_update_got_entry_type): Rewrite to handle TLS GOT entries,
2538 (elf_m68k_remove_got_entry_type): Simplify.
2539 (elf_m68k_add_entry_to_got, elf_m68k_can_merge_gots_1): Update.
2540 (elf_m68k_can_merge_gots): Update.
2541 (elf_m68k_merge_gots_1, elf_m68k_merge_gots): Update.
2542 (struct elf_m68k_finalize_got_offsets_arg): Rewrite to handle 2-slot
2543 GOT entries, simplify.
2544 (elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Same.
2545 (struct elf_m68k_partition_multi_got_arg): Add slots_relas_diff
2546 field, remove obsoleted local_n_entries field.
2547 (elf_m68k_partition_multi_got_2): New static function.
2548 (elf_m68k_partition_multi_got_1, elf_m68k_partition_multi_got): Use it;
2550 (elf_m68k_remove_got_entry_type): Update.
2551 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
2552 (elf_m68k_check_relocs): Handle TLS relocations. Remove unnecessary
2553 update of sgot->size and srelgot->size.
2554 (elf_m68k_gc_sweep_hook): Update.
2555 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
2556 (elf_m68k_relocate_section, elf_m68k_finish_dynamic_symbol): Handle
2558 * reloc.c (BFD_RELOC_68K_TLS_*): Declare TLS relocations.
2559 * libbfd.h (bfd_reloc_code_real_names): Add BFD_RELOC_68K_TLS_*.
2561 2009-02-02 DJ Delorie <dj@redhat.com>
2563 * elf32-mep.c (config_names): Regenerate configuration.
2565 2009-02-02 Alan Modra <amodra@bigpond.net.au>
2567 * elf-bfd.h (bfd_elf_get_str_section): Don't declare.
2568 (bfd_elf_find_section, _sh_elf_set_mach_from_flags): Likewise.
2569 * elf.c (bfd_elf_get_str_section): Make static.
2570 (bfd_elf_find_section): Delete.
2571 * libbfd.h: Regenerate.
2573 2009-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2575 * elf-eh-frame.c (REQUIRE_CLEARED_RELOCS) Remove.
2576 (_bfd_elf_parse_eh_frame): Do not check relocations for removed FDEs.
2578 2009-01-31 Alan Modra <amodra@bigpond.net.au>
2580 * elflink.c (on_needed_list): New function.
2581 (elf_link_add_object_symbols): Link in --as-needed libs if they
2582 satisfy undefined symbols in other libs.
2584 2009-01-30 Julian Brown <julian@codesourcery.com>
2586 * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Skip BFDs with
2587 EXEC_P or DYNAMIC flags, and skip sections which are being linked
2588 with --just-symbols (-R).
2590 2009-01-29 Adam Nemet <anemet@caviumnetworks.com>
2592 * dwarf2.c (read_rangelist): Use read_address to read low_pc and
2593 high_pc in order to properly sign-extend VMAs.
2595 2009-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2596 Mark Shinwell <shinwell@codesourcery.com>
2597 Catherine Moore <clm@codesourcery.com>
2599 * elf-attrs.c, elflink.c, elfxx-mips.c: Correct typos in comments.
2601 2009-01-28 Catherine Moore <clm@codesourcery.com>
2603 * elf32-arm.c (elf32_arm_check_relocs): Set SEC_ALLOC and
2604 SEC_LOAD for dynamic relocation sections.
2606 2009-01-27 Hans-Peter Nilsson <hp@axis.com>
2608 * elf32-cris.c (cris_elf_relocate_section): Use elf_hash_table
2609 (info)->tls_size, not elf_hash_table (info)->tls_sec->size for
2610 the size of local TLS data.
2612 2009-01-27 Andreas Schwab <schwab@suse.de>
2614 * mach-o.c (bfd_mach_o_archive_p): Restrict the number of
2615 architectures in the archive.
2617 2009-01-27 Hans-Peter Nilsson <hp@axis.com>
2619 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_DTPREL>
2620 <R_CRIS_32_DTPREL>: Correct relocation value.
2622 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_8>
2623 <R_CRIS_16, R_CRIS_32>: Don't call BFD_ASSERT for weak undefined
2624 symbols with non-default visibility.
2626 2009-01-26 Nathan Sidwell <nathan@codesourcery.com>
2628 * elf32-ppc.c (ppc_elf_relax_section): Add space for relocs
2629 describing the trampolines.
2630 (ppc_elf_relocate_section): Update relocs to describe the
2633 2009-01-25 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2635 * elf-hppa.h (elf_hppa_final_link_relocate): Add check to ensure that
2636 branch targets can be reached for R_PARISC_PCREL22F, R_PARISC_PCREL17F
2637 and R_PARISC_PCREL12F relocations.
2639 2009-01-24 Alan Modra <amodra@bigpond.net.au>
2642 * elflink.c (find_version_for_sym): New function split out from,
2643 but without export_dynamic test, ..
2644 (_bfd_elf_link_assign_sym_version): ..here.
2645 (_bfd_elf_export_symbol): Use it.
2647 2009-01-23 Alan Modra <amodra@bigpond.net.au>
2649 * elf-bfd.h (struct elf_assign_sym_version_info): Delete.
2650 (struct elf_info_failed, struct elf_find_verdep_info): Move to..
2651 * elflink.c: ..here, somewhat modified.
2652 * elf-bfd.h (_bfd_elf_add_default_symbol, _bfd_elf_export_symbol,
2653 _bfd_elf_link_find_version_dependencies,
2654 _bfd_elf_link_assign_sym_version, _bfd_elf_link_size_reloc_section,
2655 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
2656 _bfd_elf_link_sec_merge_syms, bfd_elf_link_mark_dynamic_symbol): Don't
2658 * elflink.c: ..and make static here.
2659 (_bfd_elf_link_find_version_dependencies): Adjust for removal
2660 of output_bfd from struct elf_find_verdep_info.
2661 (_bfd_elf_link_assign_sym_version): Similarly adjust to use
2662 struct elf_info_failed.
2663 (bfd_elf_size_dynamic_sections): Adjust.
2665 2009-01-22 Alan Modra <amodra@bigpond.net.au>
2668 * dwarf2.c (find_line): Don't update stash->sec_info_ptr until
2669 after comp_unit_find_line call.
2671 2009-01-21 Nick Clifton <nickc@redhat.com>
2674 * vmsutil.c (vms_file_stats_name): Remove use of unsupported
2675 tm_gmtoff field in struct tm.
2677 2009-01-21 Alan Modra <amodra@bigpond.net.au>
2679 * elf32-spu.h (struct spu_elf_params): Add non_ia_text.
2680 * elf32-spu.c (mark_overlay_section): Only include .text.ia.*
2681 sections in soft-icache lines unless non_ia_text. Don't add
2682 rodata if doing so would exceed line size.
2684 2009-01-19 Hans-Peter Nilsson <hp@axis.com>
2686 * elf32-cris.c (elf_cris_copy_indirect_symbol): For other symbol
2687 types than bfd_link_hash_indirect, before early return, call
2688 _bfd_elf_link_hash_copy_indirect.
2690 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
2692 * elf-attrs.c (vendor_set_obj_attr_contents): Support tag ordering.
2693 * elf-bfd.h (elf_backend_data): Add obj_attrs_order.
2694 * elf32-arm.c (elf32_arm_obj_attrs_order): New function.
2695 (elf_backend_obj_attrs_order): New define.
2696 * elfxx-target.h (elf_backend_obj_attrs_order): New define.
2697 (elfNN_bed): Add elf_backend_obj_attrs_order.
2699 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
2701 * elf-attrs.c (is_default_attr): Substitute magic numbers with macros.
2702 (obj_attr_size): Likewise.
2703 (write_obj_attribute): Likewise.
2704 (_bfd_elf_copy_obj_attributes): Likewise.
2705 (_bfd_elf_parse_attributes): Likewise.
2706 * elf-bfd.h (ATTR_TYPE_FLAG_INT_VAL): New define.
2707 (ATTR_TYPE_FLAG_STR_VAL, ATTR_TYPE_FLAG_NO_DEFAULT): New defines.
2708 (ATTR_TYPE_HAS_INT_VAL, ATTR_TYPE_HAS_STR_VAL): New defines.
2709 (ATTR_TYPE_HAS_NO_DEFAULT): New define.
2710 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Replace magic numbers
2713 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
2715 * elf-attrs.c (is_default_attr): Support defaultless attributes.
2716 (bfd_elf_add_obj_attr_int): Get type from _bfd_elf_obj_attrs_arg_type.
2717 (bfd_elf_add_obj_attr_string): Likewise.
2718 (bfd_elf_add_obj_attr_int_string): Likewise.
2719 (_bfd_elf_parse_attributes): Allow for unknown flag bits in type.
2720 * elf-bfd.h (struct obj_attribute): Document new flag bit.
2721 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Specify that
2722 Tag_nodefaults has no default value.
2723 (elf32_arm_merge_eabi_attributes): Modify the Tag_nodefaults
2724 comment to reflect the new state.
2726 2009-01-19 Alan Modra <amodra@bigpond.net.au>
2729 * pdp11.c (N_BADMAG): True for anything but OMAGIC, NMAGIC, ZMAGIC.
2730 (some_aout_object_p): Delete dead code handling QMAGIC and BMAGIC.
2731 (adjust_z_magix): Delete dead code handling QMAGIC.
2733 2009-01-16 Kai Tietz <kai.tietz@onevision.com>
2735 * coffcode.h (styp_to_sec_flags): Correct interpretation of
2736 IMAGE_SCN_MEM_DISCARDABLE.
2738 2009-01-16 Alan Modra <amodra@bigpond.net.au>
2740 * Makefile.am (libbfd_la_LIBADD, libbfd_la_LDFLAGS): Substitute
2741 SHARED_LIBADD and SHARED_LDFLAGS rather than WIN32LIBADD, WIN32LDFLAGS.
2742 * configure.in (commonbfdlib): Delete.
2743 (SHARED_LDFLAGS): Rename from WIN32LDFLAGS/
2744 (SHARED_LIBADD): Rename from WIN32LIBADD. Add pic libiberty if such
2745 is available, not just for linux.
2746 * po/SRC-POTFILES.in: Regenerate.
2747 * Makefile.in: Regenerate.
2748 * configure: Regenerate.
2750 2009-01-15 Andrew Stubbs <ams@codesourcery.com>
2751 Julian Brown <julian@codesourcery.com>
2753 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 71 to include all known
2754 ARM attributes in ABI 2.07.
2755 * elf32-arm.c (get_secondary_compatible_arch): New function.
2756 (set_secondary_compatible_arch): New function.
2757 (tag_cpu_arch_combine): New function.
2758 (elf32_arm_copy_one_eabi_other_attribute): Delete function.
2759 (elf32_arm_copy_eabi_other_attribute_list): Delete function.
2760 (elf32_arm_merge_eabi_attributes): Rename order_312 to order_021 to
2761 make it fit with order_01243.
2762 Add support for Tag_also_compatible_with,
2763 Tag_CPU_unaligned_access, Tag_T2EE_use, Tag_Virtualization_use,
2764 Tag_MPextension_use, Tag_nodefaults and Tag_conformance.
2765 Improve/tidy up support for Tag_CPU_raw_name, Tag_CPU_name,
2766 Tag_CPU_arch, Tag_ABI_HardFP_use, Tag_VFP_HP_extension,
2767 Tag_ABI_FP_denormal, Tag_ABI_PCS_GOT_use, Tag_ABI_align8_needed,
2768 Tag_VFP_arch and Tag_ABI_FP_16bit_format.
2769 Rework the way unknown attributes are handled.
2770 Defer errors until all attributes have been processed.
2772 2009-01-15 Andrew Stubbs <ams@codesourcery.com>
2774 * elf-attrs.c (bfd_elf_add_obj_attr_compat): Rename to
2775 bfd_elf_add_obj_attr_int_string.
2776 Read Tag_compatibility from its new location in the attribute array,
2777 rather than the attribute list.
2778 (_bfd_elf_copy_obj_attributes): bfd_elf_add_obj_attr_compat ->
2779 bfd_elf_add_obj_attr_int_string.
2780 (_bfd_elf_parse_attributes): Likewise.
2781 (_bfd_elf_merge_object_attributes): There's now only one
2782 Tag_compatibility, and it's in the array, not the list.
2783 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 33 to include
2785 (bfd_elf_add_obj_attr_compat): Rename to
2786 bfd_elf_add_obj_attr_int_string.
2787 (bfd_elf_add_proc_attr_compat): Rename to
2788 bfd_elf_add_proc_attr_int_string.
2789 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Explicitly don't handle
2792 2009-01-15 Douglas B Rupp <rupp@gnat.com>
2794 * Makefile.am (BFD32_BACKENDS): Add new object vmsutil.lo
2795 (BFD32_BACKENDS_CFILES): Add new file vmsutil.c
2796 (vmsutil.lo): Add dependency rule.
2797 * Makefile.in: Regenerate.
2798 * config.bfd (ia64*-*-*vms*): Add case.
2799 * configure.in (bfd_elf64_ia64_vms_vec): Add case.
2800 * configure: Regenerate.
2801 * vmsutil.c: New file.
2802 * vmsutil.h: New file.
2803 * elf-bfd.h (struct bfd_elf_special_section): Change type of
2805 * elfxx-ia64.c (elfNN_vms_post_process_headers,
2806 elfNN_vms_section_processing, elfNN_vms_final_write_processing,
2807 elfNN_vms_close_and_cleanup, elfNN_vms_section_from_shdr,
2808 elfNN_vms_object_p): New functions
2809 * targets.c (bfd_elf64_ia64_vms_vec): New target.
2811 2009-01-14 H.J. Lu <hongjiu.lu@intel.com>
2814 * elflink.c (elf_gc_sweep): Exclude the group section if the
2815 first member of the section group is excluded.
2817 2009-01-14 Alan Modra <amodra@bigpond.net.au>
2820 * syms.c (_bfd_stab_section_find_nearest_line): Don't free
2821 saved filename, use bfd_alloc rather than bfd_malloc for it.
2823 2009-01-13 Alan Modra <amodra@bigpond.net.au>
2825 * elf32-spu.c (spu_elf_build_stubs): Make __icache_base absolute.
2827 2009-01-13 Alan Modra <amodra@bigpond.net.au>
2829 * elf32-spu.c (remove_cycles): Always set call->max_depth.
2831 2009-01-12 Alan Modra <amodra@bigpond.net.au>
2833 * elf32-spu.c (spu_elf_auto_overlay): Correct vma mask.
2835 2009-01-12 Alan Modra <amodra@bigpond.net.au>
2837 * elf32-spu.c (struct spu_link_hash_table): Add init, line_size_log2,
2839 (struct got_entry): Add br_addr.
2840 (struct call_info): Add priority.
2841 (struct function_info): Add lr_store and sp_adjust.
2842 (spu_elf_setup): Init line_size_log2 and num_lines_log2.
2843 (spu_elf_find_overlays): For soft-icache, mark any section within cache
2844 area as an overlay, and check that no other overlays exist. Look up
2845 icache overlay manager entry sym.
2846 (BRA_STUBS, BRA, BRASL): Define.
2847 (enum _stub_type): Replace ovl_stub with call_ovl_stub and br*_ovl_stub.
2848 (needs_ovl_stub): Adjust for soft-icache. Return priority encoded
2850 (count_stub, build_stub): Support soft-icache.
2851 (build_spuear_stubs, process_stubs): Adjust build_stub call.
2852 (spu_elf_size_stubs): Size soft-icache stubs.
2853 (overlay_index): New function.
2854 (spu_elf_build_stubs): Make static. Support soft-icache.
2855 (spu_elf_check_vma): Don't turn off auto_overlay if soft-icache.
2856 (find_function_stack_adjust): Save lr store and stack adjust insn
2858 (maybe_insert_function): Adjust find_function_stack_adjust call.
2859 (mark_functions_via_relocs): Retrieve priority.
2860 (remove_cycles): Only warn about pruned arcs when stack_analysis.
2861 (sort_calls): Sort by priority first.
2862 (mark_overlay_section): Ignore .ovl.init.
2863 (sum_stack): Only print when stack_analysis.
2864 (print_one_overlay_section): New function, extracted from..
2865 (spu_elf_auto_overlay): ..here. Support soft-icache overlays.
2866 (spu_elf_stack_analysis): Only print when htab->stack_analysis.
2867 (spu_elf_final_link): Call spu_elf_stack_analysis for lrlive
2868 analysis. Call spu_elf_build_stubs.
2869 (spu_elf_relocate_section): For soft-icache encode overlay index
2871 (spu_elf_output_symbol_hook): Support soft-icache.
2872 (spu_elf_modify_program_headers: Likewise.
2874 * elf32-spu.h (struct spu_elf_params): Add lrlive_analysis. Rename
2875 num_regions to num_lines. Add line_size and max_branch.
2876 (enum _ovly_flavour): Add ovly_soft_icache.
2877 (spu_elf_build_stubs): Delete.
2879 2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
2881 * elflink.c (_bfd_elf_section_already_linked): Handle g++-3.4
2882 relocations in `.gnu.linkonce.r.*' referencing its `.gnu.linkonce.t.*'.
2884 2009-01-07 Hans-Peter Nilsson <hp@axis.com>
2886 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
2887 <case R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: For a symbol defined in
2888 the program, the known offset starts at the negative size of the
2890 <case R_CRIS_32_IE, R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL>:
2893 2009-01-05 Joel Sherrill <joel.sherrill@oarcorp.com>
2895 * config.bfd: Add lm32-*-rtems*.
2897 2009-01-03 H.J. Lu <hongjiu.lu@intel.com>
2899 * coff-ppc.c: Add 2009 to Copyright.
2900 * elf32-cris.c: Likewise.
2901 * elflink.c: Likewise.
2903 2009-01-03 Hans-Peter Nilsson <hp@axis.com>
2905 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Rename
2906 gotplt_index to rela_plt_index. Adjust for R_CRIS_DTPMOD entry.
2908 2009-01-02 H.J. Lu <hongjiu.lu@intel.com>
2911 * elflink.c (elf_merge_st_other): New.
2912 (_bfd_elf_merge_symbol): Use it on skipped weak definitions and
2913 hide them if needed.
2914 (elf_link_add_object_symbols): Updated.
2916 2009-01-02 H.J. Lu <hongjiu.lu@intel.com>
2919 * elflink.c (elf_link_add_object_symbols): Update def_dynamic,
2920 ref_dynamic and dynamic_def fields when setting def_regular
2923 2009-01-02 Curtis Mackie <curtmackevo@gmail.com>
2926 * coff-ppc.c (dump_toc): Fix up calls to fprintf without a string
2929 For older changes see ChangeLog-2008
2935 version-control: never