1 2005-09-06 H.J. Lu <hongjiu.lu@intel.com>
4 * elflink.c (_bfd_elf_merge_symbol): Don't check undefined
5 symbol introduced by "ld -u" for TLS.
7 2005-09-02 Paul Brook <paul@codesourcery.com>
9 * libbdf.h: Regenerate.
10 * bfd-in2.h: Regenerate.
11 * reloc.c: Add BFD_RELOC_ARM_T32_CP_OFF_IMM and
12 BFD_RELOC_ARM_T32_CP_OFF_IMM_S2.
14 2005-09-01 Dmitry Diky <diwil@spec.ru>
16 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Do not adjust
17 local symbols and move it to
18 (msp430_elf_relax_adjust_locals): New function - walk over the
19 sections in the bfd and adjust relocations as necessary.
21 2005-08-31 DJ Delorie <dj@redhat.com>
23 * elf32-i386.c (elf_i386_check_relocs): Don't cast a unary &
24 address operator, as that breaks GCC's strict aliasing rules.
25 (elf_i386_size_dynamic_sections): Avoid the need for type
27 * elf64-x86-64.c (elf_x86_64_check_relocs): Don't cast a unary
28 & address operator, as that breaks GCC's strict aliasing
30 (elf_x86_64_size_dynamic_sections): Avoid the need for type
33 2005-08-30 Phil Edwards <phil@codesourcery.com>
35 * config.bfd (i[3-7]86-*-vxworks): Match vxworks* instead.
37 2005-08-29 H.J. Lu <hongjiu.lu@intel.com>
40 * elfxx-ia64.c (allocate_fptr): Check undefined symbol.
42 2005-08-29 Steven J. Hill <sjhill@realitydiluted.com>
44 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Initialise
45 'value' to avoid compile time warning message.
47 2005-08-26 Christian Groessler <chris@groessler.org>
49 * coff-z8k.c: (r_jr, r_disp7, r_callr): Fix src_mask and dst_mask
51 (coff_z8k_select_reloc): Remove.
52 (SELECT_RELOC): Remove.
53 (coff_z8k_reloc_type_lookup): New function.
54 (coff_bfd_reloc_type_lookup): Define.
55 * configure.in: Add cofflink.lo to z8kcoff_vec.
56 * configure: Regenerate.
57 * reloc.c: (bfd_reloc_code_type): Add z8k relocations.
58 (bfd_install_relocation): Don't clear reloc_entry->addend for
60 * bfd-in2.h: Regenerate.
61 * libbfd.h: Regenerate.
63 2005-08-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
65 * elf32-sh.c (sh_elf_get_flags_from_mach): Fix off-by-one error.
67 2005-08-24 H.J. Lu <hongjiu.lu@intel.com>
70 * elf-hppa.h (elf_hppa_relocate_section): Print out the name
71 of unresolvable relocation.
72 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
73 * elf32-arm.c (elf32_arm_relocate_section): Likewise.
74 * elf32-i386.c (elf_i386_relocate_section): Likewise.
75 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
76 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
77 * elf32-s390.c (elf_s390_relocate_section): Likewise.
78 * elf32-sh.c (sh_elf_relocate_section): Likewise.
79 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
80 * elf64-s390.c (elf_s390_relocate_section): Likewise.
81 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
82 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
83 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
85 2005-08-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
87 * config.bfd: Add bfd_elf32_shnbsd_vec and bfd_elf32_shlnbsd_vec
88 to targ_selvecs for sh5*-*-netbsd* and sh64*-*-netbsd*.
90 2005-08-18 Alan Modra <amodra@bigpond.net.au>
92 * coff-a29k.c: Delete.
94 * Makefile.am: Remove mention of a29k files.
95 * aoutf1.h: Remove a29k support.
97 * archures.c: Likewise.
98 * coffcode.h: Likewise.
99 * config.bfd: Likewise.
100 * configure.in: Likewise.
102 * mipsbsd.c: Likewise.
104 * sparclynx.c: Likewise.
105 * targets.c: Likewise.
106 * Makefile.in: Regenerate.
107 * configure: Regenerate.
108 * bfd-in2.h: Regenerate.
109 * po/SRC-POTFILES.in: Regenerate.
111 2005-08-18 Alan Modra <amodra@bigpond.net.au>
113 * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Warn on
114 zero size dynamic variables.
115 * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
116 * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
117 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
118 * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
119 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise.
120 * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
121 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
122 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
123 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
124 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
125 * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
126 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
127 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
128 * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
129 * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
130 * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
132 2005-08-17 H.J. Lu <hongjiu.lu@intel.com>
135 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Use section lma
137 (_bfd_dwarf2_find_line): Likewise.
139 2005-08-17 Alan Modra <amodra@bigpond.net.au>
141 * elf64-mmix.c (mmix_elf_add_symbol_hook): Mark reg section
143 (mmix_elf_final_link): Check that section hasn't already been
144 removed before removing.
145 * mmo.c (mmo_scan): Mark reg contents section SEC_LINKER_CREATED.
146 (mmo_canonicalize_symtab): Likewise for reg section.
148 2005-08-17 Alan Modra <amodra@bigpond.net.au>
150 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Move assert later.
151 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Cope with being called
152 without any got section.
154 2005-08-17 Danny Smith <dannysmith@users.sourceforge.net>
156 * cofflink.c (_bfd_coff_generic_relocate_section): Correct
159 2005-08-17 Alan Modra <amodra@bigpond.net.au>
161 * elflink.c (_bfd_elf_define_linkage_sym): Don't call
162 bfd_elf_link_record_dynamic_symbol. Call elf_backend_hide_symbol.
163 (_bfd_elf_link_renumber_dynsyms): Formatting.
164 (struct elf_gc_sweep_symbol_info): New.
165 (elf_gc_sweep_symbol): Rewrite.
166 (elf_gc_sweep): Adjust params and elf_gc_sweep_symbol call.
167 Call _bfd_elf_link_renumber_dynsyms.
168 (bfd_elf_gc_sections): Adjust elf_gc_sweep call.
170 2005-08-16 Alan Modra <amodra@bigpond.net.au>
172 * elf64-ppc.c (ppc64_elf_edit_opd): Don't call dec_dynrel_count
175 2005-08-15 Bob Wilson <bob.wilson@acm.org>
177 * elf32-xtensa.c (ELF_MACHINE_CODE, ELF_MACHINE_ALT1): Swap values
178 of EM_XTENSA and EM_XTENSA_OLD.
180 2005-08-16 Alan Modra <amodra@bigpond.net.au>
182 * elf-bfd.h (_bfd_elf_define_linkage_sym): Declare.
183 * elflink.c (_bfd_elf_define_linkage_sym): New function, extracted
185 (_bfd_elf_create_got_section): ..here.
186 (_bfd_elf_link_create_dynamic_sections): Call it for _DYNAMIC.
187 (_bfd_elf_create_dynamic_sections): ..and _PROCEDURE_LINKAGE_TABLE_.
188 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Use
189 _bfd_elf_define_linkage_sym.
190 * elf32-frv.c (_frv_create_got_section): Likewise.
191 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
193 2005-08-15 Paul Brook <paul@codesourcery.com>
195 * elf32-arm.c (elf32_arm_howto_table_1): Make R_ARM_PLT32 the same as
198 2005-08-13 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
201 * elf64-hppa.c (elf64_hppa_special_sections): Add flag definitions for
202 .plt, .dlt, .sdata, .sbss and .tbss.
204 2005-08-12 Dmitry Diky <diwil@spec.ru>
206 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Adjust relocations
207 referenced by .section + DISPLACEMENT.
209 2005-08-10 James E. Wilson <wilson@specifix.com>
211 * dwarf2.c (scan_unit_for_symbols, case DT_AT_location): Verify that
212 DW_OP_addr is only opcode in location before using it.
214 2005-08-09 H.J. Lu <hongjiu.lu@intel.com>
216 * elfxx-ia64.c (elfNN_ia64_final_link): Reset gp.
218 2005-08-09 Rodney Brown <rbrown@bravurasolutions.com.au>
219 Nick Clifton <nickc@redhat.com>
221 * aix5ppc-core.c (xcoff64_core_p): Constify return_value
222 variable. Also, do not use core_hdr macro as it evaluates to a
223 cast of an lvalue which is no longer supported by GCC 4.0.
225 2005-08-08 Eric Dönges <Eric.Doenges@betty-tv.com>
227 * archures.c (bfd_mach_msp21): New MSP430 machine number.
228 * bfd-in2.h: Regenerate.
229 * cpu-msp430.c (arch_info_struct): Add support for msp430x21xx
232 2005-08-07 Nick Clifton <nickc@redhat.com>
233 Paul Brook <paul@codesourcery.com>
236 * elf32-arm.c (bfd_elf32_close_and_cleanup): Define.
237 (elf32_arm_close_and_cleanup): New function - walk over the
238 sections in the bfd that is being closed removing them from the
239 list of recorded sections.
240 (unrecord_section_via_map_over_sections): New helper function.
241 (record_section_with_arm_elf_section_data): Call bfd_malloc
242 instead of bfd_alloc. Remove unneeded abfd parameter.
243 (elf32_arm_new_section_hook): Do not pass bfd to
244 record_section_with_arm_elf_section_data.
246 * elfxx-target.h (bfd_elfNN_close_and_cleanup): Only define if not
247 already defined by the target.
249 2005-08-05 Fred Fish <fnf@specifix.com>
251 * dwarf2.c (read_rangelist): Use addr_size instead of offset_size
252 to determine how many bytes to read from each rangelist entry.
254 2005-08-05 H.J. Lu <hongjiu.lu@intel.com>
256 * bfd.c (bfd_hide_symbol): New.
257 * bfd-in2.h: Regenerated.
259 2005-08-04 H.J. Lu <hongjiu.lu@intel.com>
261 * elf64-x86-64.c (elf64_x86_64_merge_symbol): When mixing a
262 large common symbol and a normal common symbol, always turn
263 the large common symbol into a normal one.
265 2005-08-04 Alan Modra <amodra@bigpond.net.au>
267 * elf32-ppc.c (struct elf_linker_section): Replace sym_val field
269 (ppc_elf_relocate_section): Adjust for above.
270 (create_sdata_sym): New function.
271 (ppc_elf_create_linker_section): Call it.
272 (ppc_elf_check_relocs): Correct has_sda_refs and non_got_refs.
273 Create sdata syms for all SDA relocs.
274 (ppc_elf_adjust_dynamic_symbol): Don't special case _SDA_BASE_
276 (ppc_elf_set_sdata_syms): Delete.
277 * elflink.c (bfd_elf_size_dynamic_sections): Don't create DT_INIT
278 and DT_FINI tags unless associated section has input.
279 (bfd_elf_set_symbol, _bfd_elf_provide_symbol): Delete.
280 (_bfd_elf_provide_section_bound_symbols): Delete.
281 * bfd-in.h (_bfd_elf_provide_symbol): Delete.
282 (_bfd_elf_provide_section_bound_symbols): Delete.
283 * bfd-in2.h: Regenerate.
285 2005-08-04 Alan Modra <amodra@bigpond.net.au>
287 * elflink.c (fix_syms, _bfd_elf_fix_excluded_sec_syms): Move to..
288 * linker.c (fix_syms, _bfd_fix_excluded_sec_syms): ..here.
289 * bfd-in.h (_bfd_fix_excluded_sec_syms): Rename.
290 * bfd-in2.h: Regenerate.
292 2005-08-03 H.J. Lu <hongjiu.lu@intel.com>
294 * elfxx-ia64.c (elfNN_ia64_relax_section): Resize .rela.got
295 only if it isn't NULL.
297 2005-08-03 H.J. Lu <hongjiu.lu@intel.com>
299 * elf32-i386.c (elf_howto_table): Undo the overflow change for
300 R_386_PC16 made on 2005-07-18.
302 * elf64-x86-64.c (x86_64_elf_howto_table): Undo the overflow
303 change for R_X86_64_PC16 made on 2005-07-18.
305 2005-08-03 Alan Modra <amodra@bigpond.net.au>
307 * elf32-ppc.c (struct ppc_elf_link_hash_table): Remove hgot. Use
308 elf.hgot throughout file.
310 2005-08-03 Alan Modra <amodra@bigpond.net.au>
312 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Correct value of
313 _GLOBAL_OFFSET_TABLE_ for > 32k GOT.
315 2005-08-02 Andreas Schwab <schwab@suse.de>
317 * elfxx-ia64.c (struct elfNN_ia64_allocate_data): Add only_got.
318 (elfNN_ia64_relax_section): Reallocate .rela.got when .got has
320 (allocate_dynrel_entries): Look only at GOT relocations when
322 (elfNN_ia64_size_dynamic_sections): Set only_got to false before
323 calling allocate_dynrel_entries.
325 2005-08-02 Nick Clifton <nickc@redhat.com>
328 * elf32-arm.c (struct _arm_elf_section_data): Turn into a typedef
329 and make the mapcount field unsigned.
330 (struct section_list): New: Used to keep track of which sections
331 have an _arm_elf_section_data structure.
332 (record_section_with_arm_elf_section_data): New function.
333 (get_arm_elf_section_data): New function.
334 (unrecord_section_with_arm_elf_section_data): New function.
335 (elf32_arm_output_symbol_hook): Use get_arm_elf_section_data.
336 (elf32_arm_new_section_hook): Call
337 record_section_with_arm_elf_section_data.
338 (elf32_arm_write_section): Use get_arm_elf_section_data and
339 unrecord_section_with_arm_elf_section_data.
341 2005-08-01 Richard Sandiford <richard@codesourcery.com>
343 * elfxx-mips.c (mips_mach_extends_p): Treat MIPS64 as an extension
344 of MIPS32 and MIPS64r2 as an extension of MIPS32r2.
346 2005-07-30 David Daney <ddaney@avtrex.com>
348 * elflink.c (elf_gc_sweep): Set dynsymcount to correct value.
350 2005-07-29 David Daney <ddaney@avtrex.com>
352 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Ignore _gp_disp
353 if it is in the *ABS* section.
355 2005-07-29 Paul Brook <paul@codesourcery.com>
357 * reloc.c: Add BFD_RELOC_ARM_T32_ADD_PC12.
358 * bfd-in2.h: Regenerate.
359 * libbfd.h: Regenerate.
361 2005-07-29 Paul Brook <paul@codesourcery.com>
363 * reloc.c (BFD_RELOC_ARM_T32_IMM12): Add.
364 * bfd-in2.h: Regeenrate.
365 * libbfd.h: Regenerate.
367 2005-07-29 Pavel Kankovsky <peak@argo.troja.mff.cuni.cz>
369 * peXXigen.c (pe_print_edata): Compute the size of the export
370 table from the size field in the DataDictionary and not the size
371 of the section. Some linkers embed the export table inside a
374 2005-07-29 Alan Modra <amodra@bigpond.net.au>
376 * elf-bfd.h (struct elf_backend_data): Add action_discarded.
377 (enum action_discarded): Move from..
378 * elflink.c (enum action_discarded): ..here.
379 (_bfd_elf_default_action_discarded): Rename from elf_action_discarded.
380 Remove target specific section checks.
381 (elf_link_input_bfd): Adjust.
382 * elfxx-target.h (elf_backend_action_discarded): Define.
383 (elfNN_bed): Init new field.
384 * bfd-in.h (_bfd_elf_default_action_discarded): Declare.
385 * bfd-in2.h: Regenerate.
386 * elf-hppa.h (elf_hppa_action_discarded): New function.
387 * elf32-hppa.c (elf_backend_action_discarded): Define.
388 * elf64-hppa.c (elf_backend_action_discarded): Define.
389 * elf32-ppc.c (ppc_elf_action_discarded): New function.
390 (elf_backend_action_discarded): Define.
392 2005-07-27 Alan Modra <amodra@bigpond.net.au>
394 * elflink.c (fix_syms): Handle symbols defined in input sections.
396 2005-07-27 Jan Beulich <jbeulich@novell.com>
398 * elf64-x86-64.c (R_X86_64_standard, R_X86_64_vt_offset): New.
399 (elf64_x86_64_info_to_howto): Use them.
401 2005-07-27 Alan Modra <amodra@bigpond.net.au>
403 * elflink.c (_bfd_elf_merge_symbol): Skip weak redefinition
404 regardless of strength of previous definition.
406 2005-07-26 Alan Modra <amodra@bigpond.net.au>
408 * elflink.c (elf_gc_mark_dynamic_ref_symbol): Handle -shared.
409 (bfd_elf_gc_sections): Allow -gc-sections when -shared.
410 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Correct for -shared.
412 2005-07-26 Alan Modra <amodra@bigpond.net.au>
414 * elflink.c (elf_gc_sweep): Move gcc_except_table code..
415 (bfd_elf_gc_sections): ..to here.
417 2005-07-25 DJ Delorie <dj@redhat.com>
419 * reloc.c: Remove unused M32C relocs, add BFD_RELOC_M32C_HI8.
420 * libbfd.h: Regenerate.
421 * bfd-in2.h: Regenerate.
423 * elf32-m32c.c (m32c_elf_howto_table): Add R_M32C_8, R_M32C_LO16,
424 R_M32C_HI8, R_M32C_HI16.
425 (m32c_reloc_map): Likewise.
426 (m32c_elf_relocate_section): Add R_M32C_HI8 and R_M32C_HI16.
428 2005-07-25 Jan Hubicka <jh@suse.cz>
429 H.J. Lu <hongjiu.lu@intel.com>
431 * elf-bfd.h (_bfd_elf_large_com_section): New.
432 * elf.c (_bfd_elf_large_com_section): New. Defined.
434 * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): New.
435 (elf64_x86_64_elf_section_from_bfd_section): New.
436 (elf64_x86_64_symbol_processing): New.
437 (elf64_x86_64_common_definition): New.
438 (elf64_x86_64_common_section_index): New.
439 (elf64_x86_64_common_section): New.
440 (elf64_x86_64_merge_symbol): New.
441 (elf64_x86_64_additional_program_headers): New.
442 (elf64_x86_64_special_sections): New.
443 (elf_backend_section_from_bfd_section): New. Defined.
444 (elf_backend_add_symbol_hook): Likewise.
445 (elf_backend_common_section_index): Likewise.
446 (elf_backend_common_section): Likewise.
447 (elf_backend_common_definition): Likewise.
448 (elf_backend_merge_symbol): Likewise.
449 (elf_backend_special_sections): Likewise.
450 (elf_backend_additional_program_headers): Likewise.
452 2005-07-25 H.J. Lu <hongjiu.lu@intel.com>
454 * elf-bfd.h (elf_backend_data): Add common_definition,
455 common_section_index, common_section, and merge_symbol.
456 (_bfd_elf_common_definition): New.
457 (_bfd_elf_common_section_index): New.
458 (_bfd_elf_common_section): New.
460 * elf.c (elf_fake_sections): Don't clear sh_flags.
462 * elflink.c (_bfd_elf_merge_symbol): Call backend merge_symbol
464 (is_global_data_symbol_definition): Call backend
465 common_definition instead of checking SHN_COMMON.
466 (elf_link_add_object_symbols): Likewise.
467 (elf_link_output_extsym): Call backend common_section_index
468 for common section index.
469 (_bfd_elf_common_definition): New.
470 (_bfd_elf_common_section_index): New.
471 (_bfd_elf_common_section): New.
473 * elfxx-target.h (elf_backend_common_definition): New.
474 (elf_backend_common_section_index): New.
475 (elf_backend_common_section): New.
476 (elf_backend_merge_symbol): New.
477 (elfNN_bed): Initialize common_definition, common_section_index,
478 common_section, and merge_symbol.
480 * section.c (BFD_FAKE_SECTION): New.
481 (STD_SECTION): Use it.
482 * bfd-in2.h: Regenerated.
484 2005-07-23 Olaf Hering <olh@suse.de>
486 * elflink.c (elf_link_input_bfd): Add '\n' for linker einfo
489 2005-07-21 Ralf Corsepius <ralf.corsepius@rtems.org>
491 * config.bfd: Remove i[3-7]86-*-rtemself*.
492 Remove sparc-*-rtemself*.
494 2005-07-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
496 * elf32-m32r.c (m32r_elf_check_relocs): Fix pc count for
499 2005-07-21 Ben Elliston <bje@gnu.org>
501 * Makefile.am (BFD32_BACKENDS): Remove cf-m68klynx.lo.
502 (BFD32_BACKENDS): Likewise, remove m68klynx.lo.
503 (BFD32_BACKENDS_CFILES): Remove cf-m68klynx.c, m68klynx.c.
504 (cf-m68klynx.lo, m68klynx.lo): Remove targets.
505 * Makefile.in: Regenerate.
506 * cf-m68klynx.c: Remove.
507 * m68klynx.c: Likewise.
508 * configure.in (m68klynx_aout_vec): Remove vector.
509 (m68klynx_coff_vec): Likewise.
510 * configure: Regenerate.
511 * targets.c (m68klynx_aout_vec): Remove extern.
512 (m68klynx_coff_vec): Likewise.
513 (_bfd_target_vector): Remove m68klynx_{aout,coff}_vec.
514 * po/SRC-POTFILES.in: Remove cf-m68klynx.c, m68klynx.c.
516 2005-07-20 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
518 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_REL32.
519 (m32r_reloc_map): Likewise.
520 (m32r_elf_relocate_section): Likewise.
521 (m32r_elf_gc_sweep_hook): Likewise.
522 (m32r_elf_check_relocs): Likewise.
524 2005-07-18 Nick Clifton <nickc@redhat.com>
526 * reloc.c: Add M32C and MS1 relocs.
527 * bfd-in2.h: Regenerate.
528 * libbfd.h: Regenerate.
530 2005-07-18 Nick Clifton <nickc@redhat.com>
532 * config.bfd: Move m32c entry to correct location.
533 * archures.c: Likewise.
534 * configure.in: Likewise.
535 * configure: Regenerate.
536 * targets.c: Move ms1 vector to correct location.
538 2005-07-18 Jan Beulich <jbeulich@novell.com>
540 * elf32-i386.c (elf_howto_table): Adjust overflow complaint handler
542 * elf64-x86-64.c (x86_64_elf_howto_table): Adjust overflow complaint
543 handler for R_X86_64_PC16, R_X86_64_8, and R_X86_64_DTPOFF.
545 2005-07-16 Eric Botcazou <ebotcazou@libertysurf.fr>
549 * elflink.c (elf_link_add_object_symbols): Also append the version
550 name to non-hidden absolute symbols that are functions.
552 2005-07-16 Alan Modra <amodra@bigpond.net.au>
554 * elf32-ppc.c (ppc_elf_set_sdata_syms): Return void. Remove hack
555 for zero size sections. Don't set .sbss syms here.
556 * elf32-ppc.h (ppc_elf_set_sdata_syms): Adjust prototype.
558 2005-07-16 Alan Modra <amodra@bigpond.net.au>
560 * Makefile.am: Run "make dep-am".
561 * Makefile.in: Regenerate.
563 2005-07-15 Bob Wilson <bob.wilson@acm.org>
565 * elf32-xtensa.c (vsprint_msg): Add prototype.
566 (build_encoding_error_message): Delete. Code moved into....
567 (elf_xtensa_do_reloc): ....here, and changed to give better
568 error messages for out of range literals.
570 2005-07-15 Alan Modra <amodra@bigpond.net.au>
572 * elflink.c (bfd_elf_record_link_assignment): Remove output_bfd param.
573 (_bfd_elf_provide_symbol): Allow redefinition of weak syms and those
574 defined in output sections. Call bfd_elf_record_link_assignment.
575 * bfd-in.h (bfd_elf_record_link_assignment): Update prototype.
576 * bfd-in2.h: Regenerate.
578 2005-07-14 Jim Blandy <jimb@redhat.com>
580 Add support for m32c-*-elf (Renesas m32c and m16c).
581 * Makefile.am (ALL_MACHINES): Add cpu-m32c.lo.
582 (ALL_MACHINES_CFILES): Add cpu-m32c.c.
583 (BFD32_BACKENDS): Add elf32-m32c.lo.
584 (BFD32_BACKENDS_CFILES): Add elf32-m32c.c.
585 (cpu-m32c.lo, elf32-m32c.lo): New rules, generated by 'make dep-am'.
586 * Makefile.in: Regenerated.
587 * archures.c (bfd_arch_m32c, bfd_mach_m16c, bfd_mach_m32c): New
589 (bfd_m32c_arch): New arch info object.
590 (bfd_archures_list): List bfd_m32c_arch.
591 * bfd-in2.h: Regenerated.
592 * config.bfd: Add case for the m32c.
593 * configure.in: Add case for the m32c.
594 * configure: Regenerated.
595 * cpu-m32c.c, elf32-m32c.c: New files.
596 * libbfd.h: Regenerated.
597 * targets.c (bfd_elf32_m32c_vec): Declare.
598 (_bfd_target_vector): List bfd_elf32_m32c_vec.
600 2005-07-14 Alan Modra <amodra@bigpond.net.au>
602 * bfd-in.h (_bfd_elf_fix_excluded_sec_syms): Declare.
603 (_bfd_elf_provide_section_bound_symbols): Remove param name.
605 * bfd-in2.h: Regenerate.
606 * elflink.c (bfd_elf_gc_sections): Don't call generic function.
607 (_bfd_elf_provide_symbol): Formatting.
608 (_bfd_elf_provide_section_bound_symbols): Remove all hacks, just
609 create section relative syms.
610 (fix_syms, _bfd_elf_fix_excluded_sec_syms): New functions.
611 * elf32-ppc.c (ppc_elf_set_sdata_syms): Use
612 _bfd_elf_provide_section_bound_symbols.
613 * reloc.c (bfd_mark_used_section): Delete.
614 (bfd_generic_gc_sections): Don't call the above.
616 2005-07-14 Paul Woegerer <paul.woegerer@nsc.com>
619 * cache.c (bfd_last_cache): Initialise to NULL.
621 2005-07-14 Daniel Marques <marques@cs.cornell.edu>
622 Nick Clifton <nickc@redhat.com>
624 * coff-alpha.c (alpha_ecoff_bad_format_hook): Detect compressed
625 Alpha binaries and issue a helpful error message.
626 (alpha_ecoff_swap_reloc_out): Increase maximum allowed internal
627 symbol index to 15 to allow for binaries produced by DEC
630 2005-07-13 Steve Ellcey <sje@cup.hp.com>
632 * bfd.m4 (BFD_NEED_DECLARATION): Remove.
634 2005-07-12 Alan Modra <amodra@bigpond.net.au>
636 * elf64-ppc.c (ppc64_elf_relocate_section): Don't use a plt stub
639 2005-07-12 Alan Modra <amodra@bigpond.net.au>
641 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Warning fix.
643 2005-07-12 Alan Modra <amodra@bigpond.net.au>
645 * elf32-ppc.c (ppc_elf_set_sdata_syms): Correct __sbss_start value.
647 2005-07-11 H.J. Lu <hongjiu.lu@intel.com>
649 * elflink.c (_bfd_elf_symbol_refs_local_p): Revert the last
652 2005-07-08 Paul Koning <pkoning@equallogic.com>
654 * dwarf2.c (read_address): Check sign_extend_vma to handle targets
655 where addresses are sign extended.
657 2005-07-08 Ralf Corsepius <ralf.corsepius@rtems.org>
659 * config.bfd: Mark i960-*-rtems*, or32-*-rtems* as obsolete.
660 Mark a29k-*rtems*, hppa*-*-rtems*, *-go32-rtems*,
661 i[3-7]86*-*-rtemscoff*, mips*el-*-rtems*, powerpcle-*-rtems*,
662 sparc*-*-rtemsaout* as removed
664 2005-07-08 Alan Modra <amodra@bigpond.net.au>
666 * elf-hppa.h (elf_hppa_final_link): Use gp val of zero when none
667 of the usual sections are found.
668 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Tidy.
669 Strip .dynbss if it is zero size.
670 * elf32-arm.c (elf32_arm_size_dynamic_sections): Likewise.
671 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
672 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
673 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise, and
675 (i370_elf_finish_dynamic_sections): Don't attempt to write .got
676 when it is zero size.
677 * elf32-i386.c (elf_i386_size_dynamic_sections): Correct handling
678 of .dynbss and zero size sections.
679 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Strip .dynbss if
681 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Tidy. Strip
682 .dynbss if zero size.
683 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise, .dynsbss
685 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
686 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
687 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
688 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Tidy. Strip
689 .plt.* and .got.plt.* if zero size.
690 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Tidy. Strip
691 .got* and .dynbss if zero size.
692 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Tidy. Strip
693 * elf64-ppc.c (create_linkage_sections): Create branch lookup table
694 in .data.rel.ro.brlt or .rodata.brlt, and similarly for associated
696 (create_got_section): Always create new .got and .rela.got sections.
697 (ppc64_elf_size_dynamic_sections): Tidy. Strip .dynbss if zero size.
698 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
699 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
700 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Handle
701 dynamic bss sections correctly.
702 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Tidy.
703 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Tidy. Strip
704 .dynbss if zero size.
706 2005-07-08 Ben Elliston <bje@au.ibm.com>
708 * elf32-xtensa.c: Include <stdarg.h> unconditionally, not only
709 when ANSI_PROTOTYPES is defined. Remove #ifdef logic.
711 2005-07-07 H.J. Lu <hongjiu.lu@intel.com>
713 * elf-bfd.h (elf_backend_data): Add special_sections.
715 * elf.c (_bfd_elf_get_sec_type_attr): Check special_sections
718 * elf32-arm.c (elf_backend_get_sec_type_attr): Removed.
719 (elf_backend_special_sections): New. Defined.
720 * elf32-m32r.c: Likewise.
721 * elf32-m68hc11.c: Likewise.
722 * elf32-m68hc12.c: Likewise.
723 * elf32-mcore.c: Likewise.
724 * elf32-sh64.c: Likewise.
725 * elf32-v850.c: Likewise.
726 * elf32-xtensa.c: Likewise.
727 * elf64-alpha.c: Likewise.
728 * elf64-hppa.c: Likewise.
729 * elf64-ppc.c: Likewise.
730 * elf64-sh64.c: Likewise.
731 * elfxx-ia64.c: Likewise.
732 * elfxx-mips.c: Likewise.
733 * elfxx-mips.h: Likewise.
735 * elfxx-target.h (elf_backend_special_sections): New.
736 (elfNN_bed): Initialize special_sections.
738 2005-07-07 Bob Wilson <bob.wilson@acm.org>
740 * xtensa-modules.c: Update tables with Xtensa MMU features.
742 2005-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
744 * elf32-xtensa.c (vsprint_msg): Add format attribute. Fix
746 * vms.h (_bfd_vms_debug): Add format attribute.
747 (_bfd_vms_debug, _bfd_hexdump): Fix typos.
749 2005-07-07 H.J. Lu <hongjiu.lu@intel.com>
752 * elflink.c (_bfd_elf_symbol_refs_local_p): Only undefined
753 symbol with default visibility is local.
755 2005-07-07 Ben Elliston <bje@gnu.org>
757 * config.bfd: Mark m68*-*-rtemscoff as obsolete.
759 2005-07-06 H.J. Lu <hongjiu.lu@intel.com>
761 * dwarf2.c (varinfo): Add addr.
762 (lookup_symbol_in_variable_table): Also check addr.
763 (scan_unit_for_symbols): Set addr for variable.
764 (comp_unit_find_line): Updated.
766 2005-07-06 Nick Clifton <nickc@redhat.com>
768 * coff-alpha.c (alpha_adjust_reloc_in): Issue an informative error
769 message if an unknown reloc is encountered.
770 (alpha_relocate_section): Likewise.
772 * ecoff.c (_bfd_ecoff_write_object_contents): Cope with a reloc
773 with a missing howto field.
775 2005-07-06 Alan Modra <amodra@bigpond.net.au>
777 * po/SRC-POTFILES.in: Add cpu-ms1.c, elf32-ms1.c, elf-vxworks.c,
780 2005-07-05 Paul Brook <paul@codesourcery.com>
782 * elf32-ppc.c (ppc_elf_vxworks_special_sections): Remove.
783 (ppc_elf_vxworks_get_sec_type_attr): New function.
784 (elf_backend_special_sections): Remove vxwords definition.
785 (elf_backend_get_sec_type_attr): Define for vxworks.
787 2005-07-05 Nick Clifton <nickc@redhat.com>
789 * elf64-ppc.c (ppc64_elf_info_to_howto): Fix typo.
791 2005-07-05 Paul Brook <paul@codesourcery.com>
793 * config.bfd: Add separate case for ppc-vxworks.
794 * configure: Regenerate.
795 * configure.in: Include elf-vxworks.lo on ppc targets.
796 * elf-vxworks.c (elf_vxworks_final_write_processing): Handle
798 * elf32-ppc.c: Add VxWorks target vec. Include elf-vxworks.h.
799 (PLT_ENTRY_SIZE, PLT_INITIAL_ENTRY_SIZE, PLT_SLOT_SIZE): Remove.
800 (VXWORKS_PLT_ENTRY_SIZE, ppc_elf_vxworks_plt_entry,
801 ppc_elf_vxworks_pic_plt_entry, VXWORKS_PLT_INITIAL_ENTRY_SIZE,
802 ppc_elf_vxworks_plt0_entry, ppc_elf_vxworks_pic_plt0_entry,
803 VXWORKS_PLT_NON_JMP_SLOT_RELOCS, VXWORKS_PLTRESOLVE_RELOCS,
804 VXWORKS_PLTRESOLVE_RELOCS_SHLIB): New.
805 (ppc_elf_link_hash_table): Add srelplt2, sgotplt, hgot, hplt,
806 is_vxworks, plt_entry_size, plt_slot_size, plt_initial_entry_size.
807 (ppc_elf_link_hash_table_create): Initialize hadtab plt fields.
808 (ppc_elf_create_got): Create .got.plt for VxWorks.
809 (ppc_elf_create_dynamic_sections): Create unloaded plt relocation
811 (ppc_elf_select_plt_layout): Handle VxWorks plt format.
812 (allocate_got): VxWorks does not need a got header.
813 (allocate_dynrelocs): Handle VxWorks plt format.
814 (ppc_elf_size_dynamic_sections): Save _G_O_T_ and _P_L_T_ symbols for
815 VxWorks. Handle VxWorks plt/got.
816 (ppc_elf_finish_dynamic_sections): Fill in VxWorks plt.
817 (ppc_elf_vxworks_special_sections): New.
818 (ppc_elf_vxworks_link_hash_table_create,
819 ppc_elf_vxworks_add_symbol_hook,
820 elf_i386_vxworks_link_output_symbol_hook,
821 ppc_elf_vxworks_final_write_processing): New functions.
822 * targets.c (bfd_elf32_powerpc_vxworks_vec): Declare.
823 (_bfd_target_vector): Use it.
825 2005-07-05 Jakub Jelinek <jakub@redhat.com>
827 * libbfd-in.h (struct artdata): Add extended_names_size field.
829 * coff-rs600.c (_bfd_xcoff_archive_p): Don't clear fields in freshly
830 allocated object by bfd_zalloc.
831 * coff64-rs6000.c (xcoff64_archive_p): Likewise.
832 * ecoff.c (_bfd_ecoff_archive_p): Likewise.
833 * archive.c (_bfd_generic_mkarchive, bfd_generic_archive_p): Likewise.
834 (get_extended_arelt_filename): Fail if index is bigger or equal to
836 (_bfd_generic_read_ar_hdr_mag): Don't set bfd_error_malformed_archive,
837 get_extended_arelt_filename already did that.
838 (_bfd_slurp_extended_name_table): Initialize extended_names_size field.
839 Allocate one extra byte and clear it, in case extended names table
842 * libbfd-in.h (bfd_malloc2, bfd_realloc2, bfd_zmalloc2, bfd_alloc2,
843 bfd_zalloc2): New prototypes.
844 * bfd-in.h (HALF_BFD_SIZE_TYPE): Define.
845 * libbfd.c (bfd_malloc2, bfd_realloc2, bfd_zmalloc2): New functions.
846 * opncls.c (bfd_alloc2, bfd_zalloc2): New functions.
847 * elf.c (bfd_elf_get_elf_syms, setup_group, assign_section_numbers,
848 elf_map_symbols, map_sections_to_segments,
849 assign_file_positions_for_segments, copy_private_bfd_data,
850 swap_out_syms, _bfd_elf_slurp_version_tables): Use bfd_*alloc2
852 * bfd-in2.h: Rebuilt.
855 * elf.c (_bfd_elf_print_private_bfd_data): Don't crash on bogus
856 verdef or verneed section.
857 (_bfd_elf_slurp_version_tables): Handle corrupt verdef and/or
858 verneed sections gracefully.
859 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto_ptr): Don't crash on
860 bogus relocation values.
861 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
862 * elf64-s390.c (elf_s390_info_to_howto): Likewise.
863 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
864 * elf64-x86-64.c (elf64_x86_64_info_to_howto): Likewise.
865 * elfxx-ia64.c (lookup_howto): Likewise.
867 * elf.c (bfd_elf_get_str_section): Allocate an extra byte after
868 the end of strtab and clear it.
871 2005-07-05 Nick Clifton <nickc@redhat.com>
873 * po/vi.po: New Vietnamese translation.
874 * configure.in (ALL_LINGUAS): Add vi.
875 * configure: Regenerate.
877 2005-07-05 Peter S. Mazinger <ps.m@gmx.net>
879 * elf32-arm.c (elf32_arm_size_dynamic_sections): Fix a typo and
880 touchup logic like i386/ppc.
882 2005-07-05 Alan Modra <amodra@bigpond.net.au>
884 * elf.c (special_sections): Move const qualifier.
885 (special_sections_b..special_sections_t): Likewise.
886 * elf32-arm.c (elf32_arm_symbian_get_sec_type_attr): Remove duplicate
888 (elf32_arm_symbian_special_sections): Move const qualifier.
889 * elf32-m32r.c: Similarly.
890 * elf32-m68hc11.c: Similarly.
891 * elf32-m68hc12.c: Similarly.
892 * elf32-mcore.c: Similarly.
893 * elf32-ppc.c: Similarly.
894 * elf32-sh64.c: Similarly.
895 * elf32-v850.c: Similarly.
896 * elf32-xtensa.c: Similarly.
897 * elf64-alpha.c: Similarly.
898 * elf64-hppa.c: Similarly.
899 * elf64-ppc.c: Similarly.
900 * elf64-sh64.c: Similarly.
901 * elfxx-ia64.c: Similarly.
902 * elfxx-mips.c: Similarly.
904 2005-07-04 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
906 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Use
907 info->executable instead of !info->shared where appropriate.
909 2005-07-04 Alan Modra <amodra@bigpond.net.au>
912 * elf.c (assign_file_positions_for_segments): Remove excluded
913 sections from the segment map.
915 2005-07-04 Alan Modra <amodra@bigpond.net.au>
918 * elf-bfd.h (struct elf_backend_data): Add get_sec_type_attr. Delete
920 (_bfd_elf_get_special_section): Declare.
921 (bfd_elf_special_section): Update prototype.
922 * elf.c (special_sections): Remove unused outer entries.
923 (get_special_section): Delete.
924 (_bfd_elf_get_special_section): New function.
925 (_bfd_elf_get_sec_type_attr): Replace "name" arg with "sec". Update
926 special_sections indexing.
927 (_bfd_elf_new_section_hook): Call backend get_sec_type_attr.
928 * elf32-arm.c (symbian_special_sections_d): Delete.
929 (symbian_special_sections_g, symbian_special_sections_h): Delete.
930 (symbian_special_sections_i, symbian_special_sections_f): Delete.
931 (symbian_special_sections_p): Delete.
932 (elf32_arm_symbian_special_sections): Merge above to here.
933 (elf32_arm_symbian_get_sec_type_attr): New function.
934 (elf_backend_special_sections): Don't define.
935 (elf_backend_get_sec_type_attr): Define.
936 * elf32-m32r.c: Similarly to elf32-arm.c.
937 * elf32-m68hc11.c: Likewise.
938 * elf32-m68hc12.c: Likewise.
939 * elf32-mcore.c: Likewise.
940 * elf32-sh64.c: Likewise.
941 * elf32-v850.c: Likewise.
942 * elf32-xtensa.c: Likewise.
943 * elf64-alpha.c: Likewise.
944 * elf64-hppa.c: Likewise.
945 * elf64-ppc.c: Likewise.
946 * elf64-sh64.c: Likewise.
947 * elfxx-ia64.c: Likewise.
948 * elfxx-mips.c: Likewise.
949 * elf32-ppc.c: Likewise.
950 (bfd_elf_special_section ppc_alt_plt): New. Use it if .plt loadable.
951 * elfxx-mips.h (_bfd_mips_elf_get_sec_type_attr): Declare.
952 (_bfd_mips_elf_special_sections, elf_backend_special_sections): Delete.
953 (elf_backend_get_sec_type_attr): Define.
954 * elfxx-target.h (elf_backend_get_sec_type_attr): Define.
955 (elf_backend_special_sections): Don't define.
958 2005-07-01 Nick Clifton <nickc@redhat.com>
960 * cpu-d10v.c: Update to ISO C90 style function declarations and
962 * cpu-d30v.c: Likewsie.
963 * cpu-i370.c: Likewsie.
964 * cpu-xstormy16.c: Likewsie.
965 * elf32-arc.c: Likewsie.
966 * elf32-d10v.c: Likewsie.
967 * elf32-d30v.c: Likewsie.
968 * elf32-dlx.c: Likewsie.
969 * elf32-i370.c: Likewsie.
970 * elf32-i960.c: Likewsie.
971 * elf32-ip2k.c: Likewsie.
972 * elf32-m32r.c: Likewsie.
973 * elf32-mcore.c: Likewsie.
974 * elf32-openrisc.c: Likewsie.
975 * elf32-or32.c: Likewsie.
976 * elf32-pj.c: Likewsie.
977 * elf32-v850.c: Likewsie.
978 * elf32-xstormy16.c: Likewsie.
980 2005-07-01 Alan Modra <amodra@bigpond.net.au>
982 * elf64-alpha.c (elf64_alpha_create_got_section): Always create
984 (elf64_alpha_create_dynamic_sections): Always make new sections
985 by using bfd_make_section_anyway_with_flags. Check that .got not
987 (elf64_alpha_check_relocs): Delete "got_created". Use tdata->gotobj
990 2005-06-30 Alan Modra <amodra@bigpond.net.au>
992 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Ignore dynamic
993 _SDA_BASE_ and _SDA2_BASE_ symbols.
994 * elflink.c (_bfd_elf_provide_symbol): Correct comment. Define
995 sym if not def_regular.
996 (_bfd_elf_provide_section_bound_symbols): Similarly.
998 2005-06-30 Ben Elliston <bje@gnu.org>
1000 * config.bfd: Mark as obsolete:
1005 2005-06-29 Alan Modra <amodra@bigpond.net.au>
1007 * elflink.c (_bfd_elf_gc_mark): Mark sections referenced by
1008 .eh_frame specially..
1009 (bfd_elf_gc_sections): ..rather than totally ignoring .eh_frame.
1010 Don't recheck sections we have already marked.
1011 (elf_gc_sweep): Keep non-code sections referenced from .eh_frame.
1012 * section.c (struct bfd_section): Add gc_mark_from_eh.
1013 (STD_SECTION): Adjust.
1014 * ecoff.c (bfd_debug_section): Adjust.
1015 * bfd-in2.h: Regenerate.
1017 2005-06-29 Alan Modra <amodra@bigpond.net.au>
1019 * elflink.c (elf_gc_sweep): Do not refcount on sections that have
1020 not been processed by check_relocs.
1022 2005-06-29 Paul Brook <paul@codesourcery.com>
1024 * bfd-in.h (_bfd_elf_provide_symbol): Update prototype.
1025 * bfd-in2.h: Regenerate.
1026 * elf32-ppc.c (ppc_elf_set_sdata_syms): Make sdata symbols section
1028 * elflink.c (bfd_elf_set_symbol): Add section argument.
1029 (_bfd_elf_provide_symbol): Ditto.
1030 (_bfd_elf_provide_section_bound_symbols): Pass NULL section argument.
1032 2005-06-27 Carlos O'Donell <carlos@systemhalted.org>
1034 * bfd/elf32-hppa.c (struct elf32_hppa_stub_hash_entry):
1035 Use bh_root, and hh.
1036 (struct elf32_hppa_link_hash_entry): Use eh, and hsh_cache.
1037 (struct elf32_hppa_dyn_reloc_entry): Use hdh_next.
1038 (struct elf32_hppa_link_hash_table): Use etab and bstab.
1039 (stub_hash_newfunc): Use hh.
1040 (hppa_link_hash_newfunc): Use hsh_cache.
1041 (elf32_hppa_link_hash_table_create): Use etab, and bstab.
1042 (elf32_hppa_link_hash_table_free): Use bstab.
1043 (hppa_stub_name): Use eh.
1044 (hppa_get_stub_entry): Use hh, hsh_entry, and hsh_cache.
1045 (hppa_add_stub): Use bstab.
1046 (hppa_type_of_stub): Use eh.
1047 (hppa_build_one_stub): Use hh and bh_root.
1048 (elf32_hppa_copy_indirect_symbol): Use hdh_next.
1049 (elf32_hppa_check_relocs): Use eh, etab, and hdh_next.
1050 (elf32_hppa_gc_sweep_hook): Use hdh_next.
1051 (elf32_hppa_adjust_dynamic_symbol): Use hdh_next, and etab.
1052 (allocate_plt_static): Use etab.
1053 (allocate_dynrelocs): Use etab, and hdh_next.
1054 (readonly_dynrelocs): Use hdh_next.
1055 (elf32_hppa_size_dynamic_sections): Use etab, and hdh_next.
1056 (get_local_syms): Use eh, bstab, and hh.
1057 (elf32_hppa_size_stubs): Use eh, bstab, and hh.
1058 (elf32_hppa_set_gp): Use etab.
1059 (elf32_hppa_build_stubs): Use bstab.
1060 (final_link_relocate): Use eh, bh_root.
1061 (elf32_hppa_relocate_section): Use elf, etab.
1062 (elf32_hppa_finish_dynamic_sections): Use etab.
1064 2005-06-27 H.J. Lu <hongjiu.lu@intel.com>
1066 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): Remove
1069 2005-06-21 Carlos O'Donell <carlos@systemhalted.org>
1071 * bfd/elf32-hppa.c (hppa_elf_hash_entry): Define.
1072 (hppa_stub_hash_entry): Define.
1073 (stub_hash_newfunc): Rename variables.
1074 (hppa_link_hash_newfunc): Likewise.
1075 (elf32_hppa_link_hash_table_free): Likewise.
1076 (hppa_stub_name): Likewise.
1077 (hppa_get_stub_entry): Likewise.
1078 (hppa_add_stub): Likewise.
1079 (hppa_type_of_stub): Likewise.
1080 (hppa_build_one_stub): Likewise.
1081 (hppa_size_one_stub): Likewise.
1082 (elf32_hppa_create_dynamic_sections): Likewise.
1083 (elf32_hppa_copy_indirect_symbol): Likewise.
1084 (elf32_hppa_check_relocs): Likewise.
1085 (elf32_hppa_gc_mark_hook): Likewise.
1086 (elf32_hppa_gc_sweep_hook): Likewise.
1087 (elf32_hppa_grok_psinfo): Likewise.
1088 (elf32_hppa_hide_symbol): Likewise.
1089 (elf32_hppa_adjust_dynamic_symbol): Likewise.
1090 (allocate_dynrelocs): Likewise.
1091 (clobber_millicode_symbols): Likewise.
1092 (readonly_dynrelocs): Likewise.
1093 (elf32_hppa_size_dynamic_sections): Likewise.
1094 (get_local_syms): Likewise.
1095 (elf32_hppa_size_stubs): Likewise.
1096 (hppa_record_segment_addr): Likewise.
1097 (final_link_relocate): Likewise.
1098 (elf32_hppa_relocate_section): Likewise.
1099 (elf32_hppa_finish_dynamic_symbol): Likewise.
1101 2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
1104 * elf-m10300.c (mn10300_elf_check_relocs): Handle indirect
1106 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
1107 * elf32-avr.c (elf32_avr_check_relocs): Likewise.
1108 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1109 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
1110 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
1111 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
1112 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
1113 * elf32-i370.c (i370_elf_check_relocs): Likewise.
1114 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
1115 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
1116 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
1117 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1118 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
1119 * elf32-ms1.c (ms1_elf_check_relocs): Likewise.
1120 * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
1121 * elf32-openrisc.c (openrisc_elf_check_relocs): Likewise.
1122 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
1123 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1124 * elf32-sh.c (sh_elf_check_relocs): Likewise.
1125 * elf32-v850.c (v850_elf_check_relocs): Likewise.
1126 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1127 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
1128 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1129 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1130 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
1131 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1132 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1134 2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
1137 * elf32-hppa.c (elf32_hppa_check_relocs): Handle indirect
1140 2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
1143 * elf32-i386.c (elf_i386_check_relocs): Handle indirect symbol.
1144 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1146 2005-06-18 H.J. Lu <hongjiu.lu@intel.com>
1148 * reloc.c: Add BFD_RELOC_X86_64_GOTOFF64 and
1149 BFD_RELOC_X86_64_GOTPC32.
1150 * bfd-in2.h: Regenerated.
1152 2005-06-17 Jakub Jelinek <jakub@redhat.com>
1154 * elf.c (bfd_section_from_shdr): Kill bogus warning.
1156 * elf.c (bfd_section_from_shdr): Fail if sh_entsize is bogus for
1157 symbol, relocation, group or versym sections.
1159 * coffcode.h (coff_slurp_reloc_table): Don't crash if native_relocs
1161 * peXXigen.c (pe_print_idata): Don't crash if dll_name or start_address
1162 doesn't point into the section.
1164 2005-06-17 Jan Beulich <jbeulich@novell.com>
1166 * bfd-in2.h (elf_x86_64_reloc_type): Add BFD_RELOC_X86_64_GOTOFF64
1167 and BFD_RELOC_X86_64_GOTPC32.
1168 * libbfd.h (bfd_reloc_code_real_names): Likewise.
1169 * elf64-x86-64.c (x86_64_elf_howto_table): Add entries for
1170 R_X86_64_PC64, R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
1171 (x86_64_reloc_map): Add entries for R_X86_64_PC64, R_X86_64_GOTOFF64,
1172 and R_X86_64_GOTPC32.
1173 (elf64_x86_64_info_to_howto): Adjust bounding relocation type.
1174 (elf64_x86_64_check_relocs): Also handle R_X86_64_PC64,
1175 R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
1176 (elf64_x86_64_relocate_section): Likewise.
1177 (elf64_x86_64_gc_sweep_hook): Also handle R_X86_64_PC64.
1179 2005-06-15 Mark Kettenis <kettenis@gnu.org>
1181 * archive.c: Include "libiberty.h".
1183 2005-06-15 Nick Clifton <nickc@redhat.com>
1185 * elf32-v850.c (ELF_MACHINE_ALT2): Define so that binaries
1186 produced by the GreenHills toolchain can be assimilated.
1188 2005-06-14 Steve Ellcey <sje@cup.hp.com>
1190 * som.c (som_find_inliner_info): New.
1192 2005-06-14 H.J. Lu <hongjiu.lu@intel.com>
1194 * elflink.c (_bfd_elf_merge_symbol): Fix a typo in comment.
1196 2005-06-14 Jakub Jelinek <jakub@redhat.com>
1198 * elf.c (bfd_section_from_shdr): Fail if name is NULL.
1199 Prevent endless recursion on broken objects.
1201 * archive.c (do_slurp_coff_armap): Check for overflows.
1203 2005-06-10 Daniel Jacobowitz <dan@codesourcery.com>
1205 * elfcode.h (elf_write_relocs): Do nothing if there are no
1208 2005-06-10 Alan Modra <amodra@bigpond.net.au>
1210 * dwarf2.c (decode_line_info): Revert last change. Instead set
1211 initial low_pc to -1 to avoid need to test whether loc_pc has
1214 2005-06-09 Christopher Faylor <cgf@timesys.com>
1216 * coffcode.h (sec_to_styp_flags): Set appropriate section flags when
1217 either SEC_ALLOC OR SEC_LOAD.
1219 2005-06-09 Christopher Faylor <cgf@timesys.com>
1221 * coffcode.h (sec_to_styp_flags): Remove read/write flags from noload
1222 section header. Do not add STYP_NOLOAD since it does not appear to be
1225 2005-06-09 H.J. Lu <hongjiu.lu@intel.com>
1228 * dwarf2.c (lookup_address_in_line_info_table): Restore code
1229 handling NULL function info, removed with 2005-04-03 change.
1231 2005-06-08 Mark Mitchell <mark@codesourcery.com>
1233 * opncls.c (bfd_fopen): Mark returned BFD as cacheable if FD == -1.
1235 2005-06-09 Alan Modra <amodra@bigpond.net.au>
1237 * elflink.c (elf_mark_used_section): Delete.
1238 (bfd_elf_gc_sections): Call bfd_generic_gc_sections.
1239 * reloc.c (bfd_mark_used_section): New function.
1240 (bfd_generic_gc_sections): Call bfd_mark_used_section.
1242 2005-06-08 Alan Modra <amodra@bigpond.net.au>
1244 * opncls.c (bfd_fopen): Don't set bfd_error unconditionally.
1245 (bfd_fdopenr): Same.
1247 2005-06-07 Mark Mitchell <mark@codesourcery.com>
1249 * opncls.c (bfd_fdopenr): Add missing break statements.
1251 2005-06-07 Mark Mitchell <mark@codesourcery.com>
1253 * opncls.c (bfd_fopen): New API.
1254 (bfd_openr): Use it.
1255 (bfd_fdopenr): Likewise.
1256 * bfd-in2.h: Regenerated.
1258 2005-06-07 Aldy Hernandez <aldyh@redhat.com>
1259 Michael Snyder <msnyder@redhat.com>
1260 Stan Cox <scox@redhat.com>
1262 * Makefile.am (ALL_MACHINES): Add ms1 support.
1263 (ALL_MACHINES_CFILES): Same.
1264 (BFD32_BACKENDS): Same.
1265 (BFD32_BACKENDS_CFILES): Same.
1267 * Makefile.in: Regenerate.
1269 * archures.c (bfd_architecture): Add ms1 entries.
1270 Externalize bfd_ms1_arch.
1271 (bfd_archures_list): Add bfd_ms1_arch.
1273 * bfd-in2.h: Regenerate.
1275 * cpu-ms1.c: New file.
1277 * elf32-ms1.c: New file.
1279 * targets.c: Define extern of bfd_elf32_ms1_vec.
1280 Add bfd_elf32_ms1_vec to _bfd_target_vector.
1282 * configure.in: Add bfd_elf32_ms1_vec case.
1284 * configure: Regenerate.
1286 * config.bfd: Add ms1-*-elf to table.
1288 2005-06-07 Zack Weinberg <zack@codesourcery.com>
1290 * coff-i386.c: Change md_apply_fix3 to md_apply_fix in comment.
1292 2005-06-07 Alan Modra <amodra@bigpond.net.au>
1294 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Init _bfd_find_line.
1295 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
1297 2005-06-06 H.J. Lu <hongjiu.lu@intel.com>
1300 * bfd.c (bfd_find_line): New.
1302 * dwarf2.c (comp_unit): Add variable_table.
1303 (funcinfo): Add file, line, and sec.
1305 (lookup_symbol_in_function_table): New.
1306 (lookup_symbol_in_variable_table): New.
1307 (scan_unit_for_functions): Renamed to ...
1308 (scan_unit_for_symbols): This. Handle DW_TAG_entry_point and
1310 (comp_unit_find_nearest_line): Updated.
1311 (comp_unit_find_line): New.
1312 (_bfd_dwarf2_find_line): New.
1314 * elf-bfd.h (_bfd_elf_find_line): New.
1315 (_bfd_generic_find_line): New. Defined.
1317 * elf.c (_bfd_elf_find_line): New.
1319 * libbfd-in.h (_bfd_dwarf2_find_line): New.
1320 (_bfd_generic_find_line): New.
1322 * bfd-in2.h: Regenerated.
1323 * libbfd.h: Likewise.
1325 * libbfd.c (_bfd_generic_find_line): New.
1327 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize _bfd_find_line
1328 with _bfd_generic_find_line.
1329 (bfd_target): Add _bfd_find_line.
1331 2005-06-06 H.J. Lu <hongjiu.lu@intel.com>
1333 * dwarf2.c (decode_line_info): Properly set low_pc.
1335 2005-06-06 Alan Modra <amodra@bigpond.net.au>
1337 * elf64-pcc.c (ppc64_elf_gc_mark_hook): For the local sym in .opd
1338 case, include addend when indexing .opd section map.
1339 (ppc64_elf_edit_opd): Add no_opd_opt param. Do nothing besides
1340 clear opd_adjust array if no_opd_opt set. Tidy code.
1341 Ignore zero size .opd. Check bfd_alloc return value.
1342 (ppc_stub_name): Return immediately on bfd_malloc fail.
1343 * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
1345 2005-06-04 H.J. Lu <hongjiu.lu@intel.com>
1347 * dwarf2.c (comp_unit): Fix a typo in comment.
1349 2005-06-03 Jan-Benedict Glaw <jbglaw@lug-owl.de>
1351 * elf32-vax.c (rtype_to_howto): Remove PARAMS.
1352 (reloc_type_lookup): Dito.
1353 (elf_vax_discard_copies): Dito.
1354 (elf_vax_instantiate_got_entries): Dito.
1355 (elf_vax_link_hash_traverse): Dito.
1356 (elf_vax_link_hash_newfunc): Dito.
1357 (elf_vax_link_hash_table_create): Dito.
1358 (elf32_vax_set_private_flags): Dito.
1359 (elf32_vax_merge_private_bfd_data): Dito.
1360 (elf32_vax_print_private_bfd_data): Dito.
1361 (elf_vax_check_relocs): Dito.
1362 (elf_vax_gc_mark_hook): Dito.
1363 (elf_vax_gc_sweep_hook): Dito.
1364 (elf_vax_size_dynamic_sections): Dito.
1365 (elf_vax_discard_copies): Dito.
1366 (elf_vax_instantiate_got_entries): Dito.
1367 (elf_vax_relocate_section): Dito.
1368 (elf_vax_finish_dynamic_symbol): Dito.
1369 (elf_vax_finish_dynamic_sections): Dito.
1370 (elf_vax_hash_table): Break-up of line isn't needed.
1371 (elf_vax_check_relocs): Remove leading whitespace
1372 (elf_vax_relocate_section): Remove redundant whitespace
1373 (elf_vax_link_hash_newfunc): Don't cast NULL.
1374 (elf_vax_link_hash_table_create): Dito.
1375 * cpu-vax.c (bfd_vax_arch) Remove a trailing space.
1377 2005-06-03 Alan Modra <amodra@bigpond.net.au>
1380 * configure.in: Bump version
1381 * configure: Regenerate.
1382 * elflink.c (elf_link_input_bfd): Use einfo linker callback to print
1383 discarded section sym refs and kill linker output.
1384 * simple.c (simple_dummy_einfo): New function.
1385 (bfd_simple_get_relocated_section_contents): Init callbacks.einfo.
1387 * elf32-i386.c (elf_i386_relocate_section): Handle zero symndx
1388 for all reloc types.
1390 2005-06-02 Alan Modra <amodra@bigpond.net.au>
1392 * elf64-ppc.c (add_symbol_adjust): Set sym visibility to most
1393 restrictive of func code and func descr for undefined syms as well
1396 2005-05-31 Jim Blandy <jimb@redhat.com>
1398 * Makefile.am: Regenerate dependencies with 'make dep-am'.
1399 * Makefile.in: Regenerate.
1401 2005-05-31 Richard Henderson <rth@redhat.com>
1403 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_JSRDIRECT): New.
1404 (ALPHA_ELF_LINK_HASH_TLS_IE): Renumber to 0x80.
1405 (ALPHA_ELF_LINK_HASH_LU_PLT): Rename from ALPHA_ELF_LINK_HASH_LU_FUNC.
1406 (elf64_alpha_want_plt): Update to match.
1407 (elf64_alpha_check_relocs): Collect JSRDIRECT in gotent_flags.
1408 (elf64_alpha_relax_with_lituse): Likewise. Handle JSRDIRECT.
1410 2005-05-31 Zack Weinberg <zack@codesourcery.com>
1412 * elf32-arm.c (elf32_arm_reloc_type_lookup)
1413 (elf32_arm_nabi_grok_prstatus, elf32_arm_nabi_grok_psinfo):
1414 Use ISO C90 function declaration style.
1416 2005-05-31 James E Wilson <wilson@specifixinc.com>
1418 * elfcode.h (NAME(bfd_elf,bfd_from_remote_memory)): Check for program
1419 header PF_R flag on PT_LOAD segments.
1421 2005-05-30 Richard Henderson <rth@redhat.com>
1423 * elf64-alpha.c (elf64_alpha_relocate_section): Use dtp_base for
1424 the zero index relocs produced by elf64_alpha_relax_tls_get_addr.
1426 2005-05-29 Richard Henderson <rth@redhat.com>
1428 * configure.in (--enable-secureplt): New.
1429 * elf64-alpha.c (INSN_LDA, INSN_LDAH, INSN_LDQ, INSN_BR): New.
1430 (INSN_SUBQ, INSN_S4SUBQ, INSN_JMP): New.
1431 (INSN_A, INSN_AB, INSN_ABC, INSN_ABO, INSN_AD): New.
1432 (elf64_alpha_use_secureplt): New.
1433 (OLD_PLT_HEADER_SIZE, OLD_PLT_ENTRY_SIZE): New.
1434 (NEW_PLT_HEADER_SIZE, NEW_PLT_ENTRY_SIZE): New.
1435 (PLT_HEADER_SIZE, PLT_ENTRY_SIZE): Conditionalize on secureplt.
1436 (ALPHA_ELF_LINK_HASH_PLT_LOC): Remove.
1437 (struct alpha_elf_link_hash_entry): Add plt_offset.
1438 (PLT_HEADER_WORD1, PLT_HEADER_WORD2, PLT_HEADER_WORD3): Remove.
1439 (PLT_HEADER_WORD4, PLT_ENTRY_WORD1, PLT_ENTRY_WORD2): Remove.
1440 (PLT_ENTRY_WORD3): Remove.
1441 (elf64_alpha_create_dynamic_sections): If secureplt, set SEC_READONLY
1442 on .plt and create .got.plt.
1443 (elf64_alpha_output_extsym): Remove .plt frobbing for symbol values.
1444 (get_got_entry): Initialize plt_offset.
1445 (elf64_alpha_want_plt): New.
1446 (elf64_alpha_check_relocs): Use it.
1447 (elf64_alpha_adjust_dynamic_symbol): Likewise. Don't allocate
1449 (elf64_alpha_calc_got_offsets_for_symbol): Don't report internal
1450 error as user error.
1451 (elf64_alpha_size_plt_section_1): Allocate one plt entry per
1453 (elf64_alpha_size_plt_section): Size .got.plt section.
1454 (elf64_alpha_size_rela_got_1): Don't allocate relocations if
1456 (elf64_alpha_size_dynamic_sections): Call elf64_alpha_size_plt_section.
1457 Add PLTRO DYNAMIC entry.
1458 (elf64_alpha_finish_dynamic_symbol): Generate secureplt format.
1459 (elf64_alpha_finish_dynamic_sections): Likewise.
1461 2005-05-28 David Daney <ddaney@avtrex.com>
1463 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Move
1464 calculation of DT_RELSZ to occur after all dynamic relocations
1467 2005-05-28 Eli Zaretskii <eliz@gnu.org>
1469 * configure.in: Add snprintf and vsnprintf to AC_CHECK_DECLS.
1470 * config.in, configure: Regenerate.
1472 2005-05-26 Mark Kettenis <kettenis@gnu.org>
1473 Maciej W. Rozycki <macro@linux-mips.org>
1475 * elfxx-mips.c (_bfd_mips_elf_section_processing): Warn and
1476 stop processing of options if one of invalid size is
1478 (_bfd_mips_elf_section_from_shdr): Likewise.
1479 (_bfd_mips_elf_fake_sections): Reset the type of empty special
1482 2005-05-26 Richard Henderson <rth@redhat.com>
1484 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Remove
1485 plt_old_section, plt_old_value.
1486 (elf64_alpha_adjust_dynamic_symbol): Don't set it.
1487 (elf64_alpha_size_plt_section_1): Don't use it.
1489 2005-05-26 Jakub Jelinek <jakub@redhat.com>
1491 * elfcode.h (elf_object_p): Fail if e_shoff != 0, e_shnum == 0 and
1492 first shdr has sh_size == 0. Fail if e_shnum is large to cause
1493 arithmetic overflow when allocating the i_shdr array.
1494 Sanity check sh_link and sh_info fields. Fix e_shstrndx sanity check.
1496 2005-05-25 Richard Henderson <rth@redhat.com>
1498 * elf64-alpha.c: Update all function definitions to ISO C. Remove
1499 all function prototypes; rearrange functions into def-use order.
1501 2005-05-25 Richard Henderson <rth@redhat.com>
1503 * elf64-alpha.c (elf64_alpha_merge_gots): Fix gotent iteration
1504 in the presence of deleting elements.
1505 (elf64_alpha_size_got_sections): Zero dead got section size.
1507 2005-05-23 Fred Fish <fnf@specifixinc.com>
1509 * dwarf2.c (struct dwarf2_debug): Add inliner_chain member.
1510 (struct funcinfo): Add caller_func, caller_file, caller_line.
1511 tag, and nesting_level members.
1512 (lookup_address_in_function_table): Change first passed parameter
1513 from "struct funcinfo *" to "struct comp_unit *".
1514 (lookup_address_in_function_table): Dereference unit to find function
1516 (lookup_address_in_function_table): Traverse the function list to
1517 create a chain of inlined functions back to the first non inlined
1519 (scan_unit_for_functions): Remember tag and nesting level. Handle
1520 DW_AT_call_file and DW_AT_call_line.
1521 (comp_unit_find_nearest_line): Adjust lookup_address_in_function_table
1522 call to pass unit pointer instead of function table pointer. For
1523 inlined functions, save pointer to the inliner chain.
1524 (_bfd_dwarf2_find_nearest_line): Initialize inliner_chain to NULL.
1525 (_bfd_dwarf2_find_inliner_info): New function that returns information
1526 from the inliner chain after a call to bfd_find_nearest_line.
1528 * bfd.c (bfd_find_inliner_info): Define using BFD_SEND.
1529 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Add entry for
1530 NAME##_find_inliner_info.
1531 (bfd_target): Add _bfd_find_inliner_info.
1532 * bfd-in2.h: Regenerate.
1534 * libbfd-in.h (_bfd_nosymbols_find_inliner_info): Define as
1535 macro that always returns bfd_false.
1536 (_bfd_dwarf2_find_inliner_info): Declare.
1537 * libbfd.h: Regenerate.
1539 * elf32-arm.c (elf32_arm_find_inliner_info): New function
1540 that calls _bfd_dwarf2_find_inliner_info.
1541 (bfd_elf32_find_inliner_info): Define to elf32_arm_find_inliner_info.
1543 * elfxx-mips.c (_bfd_mips_elf_find_inliner_info): New function
1544 that calls _bfd_dwarf2_find_inliner_info.
1545 * elfxx-mips.h (_bfd_mips_elf_find_inliner_info): Declare.
1546 * elfn32-mips.c (bfd_elf32_find_inliner_info): Define to
1547 _bfd_mips_elf_find_inliner_info.
1548 * elf64-mips.c (bfd_elf64_find_inliner_info): Ditto.
1549 * elf32-mips.c (bfd_elf32_find_inliner_info): Ditto.
1551 * elf.c (_bfd_elf_find_inliner_info): New function that calls
1552 _bfd_dwarf2_find_inliner_info.
1553 * elf-bfd.h (_bfd_elf_find_inliner_info): Declare.
1554 * elfxx-target.h (bfd_elfNN_find_inliner_info): Define to
1555 _bfd_elf_find_inliner_info.
1557 * coffgen.c (coff_find_inliner_info): New function that
1558 calls _bfd_dwarf2_find_inliner_info.
1559 * libcoff-in.h (coff_find_inliner_info): Declare.
1560 * libcoff.h: Regenerate.
1561 * coff-rs6000.c (rs6000coff_vec): Add coff_find_inliner_info.
1562 (pmac_xcoff_vec) Ditto.
1563 * coff64-rs6000.c (rs6000coff64_vec): Ditto.
1564 (aix5coff64_vec): Ditto.
1566 * aout-target.h (MY_find_inliner_info): Define as
1567 _bfd_nosymbols_find_inliner_info.
1568 * aout-tic30.c (MY_find_inliner_info): Ditto.
1569 * binary.c (binary_find_inliner_info): Ditto.
1570 * i386msdos.c (msdos_find_inliner_info): Ditto.
1571 * ihex.c (ihex_find_inliner_info): Ditto.
1572 * libaout.h (aout_32_find_inliner_info): Ditto.
1573 * libecoff.h (_bfd_ecoff_find_inliner_info): Ditto.
1574 * mach-o.c (bfd_mach_o_find_inliner_info): Ditto.
1575 * mmo.c (mmo_find_inliner_info): Ditto.
1576 * nlm-target.h (nlm_find_inliner_info): Ditto.
1577 * pef.c (bfd_pef_find_inliner_info): Ditto.
1578 * ppcboot.c (ppcboot_find_inliner_info): Ditto.
1579 * srec.c (srec_find_inliner_info): Ditto.
1580 * tekhex.c (tekhex_find_inliner_info): Ditto.
1581 * versados.c (versados_find_inliner_info): Ditto.
1582 * xsym.c (bfd_sym_find_inliner_info): Ditto.
1584 * ieee.c (ieee_find_inliner_info): New function that always
1586 * oasys.c (oasys_find_inliner_info): Ditto.
1587 * vms.c (vms_find_inliner_info): Ditto.
1589 2005-05-24 Alan Modra <amodra@bigpond.net.au>
1591 * elf32-ppc.c (ppc_elf_check_relocs): For old gcc -fPIC code
1592 force old plt layout.
1594 2005-05-22 Richard Henderson <rth@redhat.com>
1596 * elf64-alpha.c (elf64_alpha_relax_section): Ignore non-allocated
1598 (elf64_alpha_check_relocs): Likewise.
1599 (elf64_alpha_relocate_section): Don't emit dynamic relocations to
1600 non-allocated sections.
1602 2005-05-22 Richard Henderson <rth@redhat.com>
1604 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Relax jsr to
1605 undefweak to use zero register. Call elf64_alpha_relax_got_load
1606 if not all uses removed.
1607 (elf64_alpha_relax_got_load): Relax undefweak to lda zero.
1608 (elf64_alpha_relax_section): Handle undefweak symbols.
1609 (elf64_alpha_calc_dynrel_sizes): Don't add relocs for undefweak.
1610 (elf64_alpha_size_rela_got_1): Likewise.
1611 (elf64_alpha_relocate_section): Likewise.
1613 2005-05-22 Richard Henderson <rth@redhat.com>
1615 * elf64-alpha.c (elf64_alpha_relax_section): Only operate
1616 on SEC_CODE sections.
1618 2005-05-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1620 * som.c (try_prev_fixup): Changed type of subspace_reloc_sizep to
1622 (som_write_space_strings): Change type of tmp_space and p to char *.
1623 (som_write_symbol_strings): Likewise. Also change type of comp to
1625 (som_begin_writing): Change type of strings_size to unsigned int.
1626 (som_finish_writing): Likewise.
1627 (som_slurp_reloc_table): Change type of external_relocs to unsigned
1629 * som.h (struct som_section_data_struct): Change type of reloc_stream
1630 field to unsigned char *.
1632 2005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
1634 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't eliminate
1635 copy relocations for VxWorks.
1637 2005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
1639 * bfd/elf32-ppc.c (struct ppc_elf_link_hash_entry): Add new field
1641 (ppc_elf_copy_indirect_symbol): Copy has_sda_refs.
1642 (ppc_elf_check_relocs): Set has_sda_refs.
1643 (ppc_elf_adjust_dynamic_symbol): Check has_sda_refs before eliminating
1644 copy relocations. Use has_sda_refs to place variables in .sbss.
1645 (ppc_elf_finish_dynamic_symbol): Use has_sda_refs to place variables in
1648 2005-05-20 Bob Wilson <bob.wilson@acm.org>
1650 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Make sure that
1651 xtensa_default_isa is initialized.
1653 2005-05-20 Alan Modra <amodra@bigpond.net.au>
1655 * elf32-ppc.c (allocate_dynrelocs): Correct plt offset assigned
1656 for second and subsequent list entries. Only allocate multiple
1657 glink stubs when shared or pie.
1658 (ppc_elf_finish_dynamic_symbol): Break out early when only one
1659 glink stub is needed.
1661 2005-05-19 Zack Weinberg <zack@codesourcery.com>
1663 * Makefile.am: Have 'all' depend on 'info'.
1664 * Makefile.in: Regenerate.
1666 2005-05-19 Alan Modra <amodra@bigpond.net.au>
1668 * elf-bfd.h (struct elf_link_hash_table): Delete init_refcount and
1669 init_offset. Add init_got_refcount, init_plt_refcount,
1670 init_got_offset and init_plt_offset.
1671 * elf.c (_bfd_elf_link_hash_newfunc): Adjust for above change.
1672 (_bfd_elf_link_hash_hide_symbol): Likewise.
1673 (_bfd_elf_link_hash_table_init): Likewise.
1674 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
1675 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
1676 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Likewise.
1677 (bfd_elf_size_dynamic_sections): Likewise.
1678 * elf32-ppc.c (GLINK_PLTRESOLVE): Now 16 insns.
1679 (LWZU_0_X_12, LWZ_0_4_30, LWZ_0_X_12, LWZ_11_X_11, LWZ_11_X_30,
1680 LWZ_12_4_12, LWZ_12_8_30, LWZ_12_X_12, SUB_11_11_30): Delete.
1681 (ADDIS_12_12, BCL_20_31, LWZU_0_12, LWZ_0_12, LWZ_11_11, LWZ_11_30,
1682 LWZ_12_12, MFLR_0, MFLR_12, MTLR_0, SUB_11_11_12): Define.
1683 (struct plt_entry): New.
1684 (ppc_elf_link_hash_table_create): Set new init_plt fields.
1685 (ppc_elf_copy_indirect_symbol): Handle merge of plt plist. Don't
1686 use _bfd_elf_link_hash_copy_indirect.
1687 (update_plt_info, find_plt_ent): New functions.
1688 (ppc_elf_check_relocs): Handle R_PPC_PLTREL24 with non-zero addend
1689 and adjust for use of plt list rather than refcount.
1690 (ppc_elf_gc_sweep_hook): Likewise.
1691 (ppc_elf_tls_optimize): Likewise.
1692 (ppc_elf_adjust_dynamic_symbol): Likewise.
1693 (allocate_dynrelocs): Likewise.
1694 (ppc_elf_relax_section): Likewise.
1695 (ppc_elf_relocate_section): Likewise. Adjust R_PPC_PLTREL24 addends
1696 when performing a relocatable link.
1697 (ppc_elf_finish_dynamic_symbol): Likewise. Write .glink stubs here..
1698 (ppc_elf_finish_dynamic_sections): ..rather than here. Use new
1701 2005-05-19 Alan Modra <amodra@bigpond.net.au>
1703 * elf.c (assign_file_positions_for_segments): Use maximum of
1704 maxpagesize and section alignment when adjusting initial
1705 segment offset and section offsets.
1707 2005-05-18 Zack Weinberg <zack@codesourcery.com>
1709 * elf32-arm.c: Make all #ifndef OLD_ARM_ABI blocks
1712 2005-05-18 H.J. Lu <hongjiu.lu@intel.com>
1714 * elf.c (group_signature): Undo the last change. Check if the
1715 symbol table section is correct.
1717 2005-05-17 Zack Weinberg <zack@codesourcery.com>
1719 * elf32-arm.c: Wherever possible, use official reloc names
1721 (elf32_arm_howto_table, elf32_arm_tls_gd32_howto)
1722 (elf32_arm_tls_ldo32_howto, elf32_arm_tls_ldm32_howto)
1723 (elf32_arm_tls_le32_howto, elf32_arm_tls_ie32_howto)
1724 (elf32_arm_vtinherit_howto, elf32_arm_vtentry_howto)
1725 (elf32_arm_pc11_howto, elf32_arm_thm_pc9_howto, elf32_arm_got_prel)
1726 (elf32_arm_r_howto): Replace with elf32_arm_howto_table_1,
1727 elf32_arm_howto_table_2, and elf32_arm_howto_table_3.
1728 Add many new relocations from AAELF.
1729 (elf32_arm_howto_from_type): Update to match.
1730 (elf32_arm_reloc_map): Add entries for R_ARM_THM_JUMP24,
1731 R_ARM_THM_JUMP11, R_ARM_THM_JUMP19, R_ARM_THM_JUMP8,
1732 R_ARM_THM_JUMP6, R_ARM_GNU_VTINHERIT, and R_ARM_GNU_VTENTRY.
1733 (elf32_arm_reloc_type_lookup): Use elf32_arm_howto_from_type.
1734 (elf32_arm_final_link_relocate): Add support for
1735 R_ARM_THM_JUMP24, R_ARM_THM_JUMP19, R_ARM_THM_JUMP6. Remove
1736 case entries redundant with default.
1738 * reloc.c: Reorganize ARM relocations. Add Thumb
1739 assembler-internal relocations BFD_RELOC_ARM_T32_OFFSET_U8,
1740 BFD_RELOC_ARM_T32_OFFSET_IMM, BFD_RELOC_ARM_T32_IMMEDIATE.
1741 Add visible relocations BFD_RELOC_THUMB_PCREL_BRANCH7,
1742 BFD_RELOC_THUMB_BRANCH20, BFD_RELOC_THUMB_BRANCH25.
1743 Delete unused relocations BFD_RELOC_ARM_GOT12, BFD_RELOC_ARM_COPY.
1744 * bfd-in2.h, libbfd.h: Regenerate.
1746 2005-05-17 Daniel Jacobowitz <dan@codesourcery.com>
1748 * elf.c (_bfd_elf_write_object_contents): Check for non-NULL
1750 * format.c (bfd_check_format_matches): Set output_has_begun
1752 * section.c (bfd_set_section_contents): Use bfd_write_p. Remove
1753 special case for both_direction.
1755 2005-05-17 Nick Clifton <nickc@redhat.com>
1757 * elf.c (group_signature): Check for a group section which is
1758 actually a (corrupt) symbol table section in disguise and prevent
1759 an infinite loop from occurring.
1761 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
1763 * elfxx-ia64.c (elfNN_ia64_relax_brl): Undo the change made on
1766 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
1768 * elfxx-ia64.c (elfNN_ia64_relax_br): Keep the original
1769 predicate on slot 0 only if slot 0 isn't br.
1771 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
1774 * elf32-i386.c (elf_i386_size_dynamic_sections): Also remove
1775 empty sdynbss section.
1776 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.
1778 2005-05-17 Tavis Ormandy <taviso@gentoo.org>
1780 * elf.c (bfd_section_from_shdr): Add sanity check when parsing
1783 2005-05-17 Alan Modra <amodra@bigpond.net.au>
1785 * elf32-ppc.c (LIS_11. LIS_12): Define.
1786 (LWZU_0_X_12, LWZ_0_X_12, LWZ_12_4_12, LWZ_12_X_12): Define.
1787 (ppc_elf_finish_dynamic_sections): Provide non-pic plt call stub
1788 for --data-plt when building non-pie executables.
1790 2005-05-17 Nick Clifton <nickc@redhat.com>
1792 * elf32-arm.c (elf32_arm_final_link_relocate): Gracefully handle
1793 the situation where a symbols's section is not known but a section
1794 relative R_ARM_RELATIVE reloc has to be generated for the Symbian
1797 * elf32-v850.c (v850_elf_relocate_section): Move code to test for
1798 the presence of a symbol table to just before the symbol table is
1801 2005-05-16 H.J. Lu <hongjiu.lu@intel.com>
1804 * elfxx-ia64.c (elfNN_ia64_relax_br): New.
1805 (elfNN_ia64_relax_section): Use it.
1807 2005-05-14 Mark Kettenis <kettenis@gnu.org>
1809 * elflink.c (bfd_elf_size_dynamic_sections): Use lbasename instead
1812 2005-05-14 Alan Modra <amodra@bigpond.net.au>
1814 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set DT_PPC_GOT,
1816 (ppc_elf_finish_dynamic_sections): Likewise.
1818 2005-05-13 Fred Fish <fnf@specifixinc.com>
1820 * libbfd-in.h: Fix a comment typo, 'neaderst' -> 'nearest'
1821 * libbfd.h: Rebuilt.
1823 2005-05-13 Bob Wilson <bob.wilson@acm.org>
1825 * elf32-xtensa.c (xtensa_get_property_section_name): Add missing
1826 periods in linkonce_kind values.
1828 2005-05-12 H.J. Lu <hongjiu.lu@intel.com>
1830 * elf32-i386.c (elf_i386_relocate_section): Allow R_386_GOTOFF
1831 against protected function when building executable.
1833 2005-05-12 Alan Modra <amodra@bigpond.net.au>
1835 * elf32-ppc.c (LWZU_0_X_11): Delete.
1836 (B, LWZ_11_X_11, LWZ_11_X_30, MTCTR_11): Define.
1837 (ppc_elf_select_plt_layout): Set .got flags too. Formatting.
1838 (ppc_elf_size_dynamic_sections): Allocate space for .glink branch
1840 (ppc_elf_finish_dynamic_symbol): Point .plt entries into the branch
1842 (ppc_elf_finish_dynamic_sections): Adjust DT_PPC_GLINK value.
1843 Generate .glink branch table and updated stubs.
1845 2005-05-11 Alan Modra <amodra@bigpond.net.au>
1847 * reloc.c (BFD_RELOC_HI16_PCREL): Define.
1848 (BFD_RELOC_HI16_S_PCREL, BFD_RELOC_LO16_PCREL): Define.
1849 * elf32-ppc.c (GLINK_PLTRESOLVE, GLINK_ENTRY_SIZE): Define.
1850 (CROR_151515, CROR_313131): Delete.
1851 (ADDIS_11_11, ADDI_11_11, SUB_11_11_30, ADD_0_11_11, ADD_11_0_11,
1852 LWZ_0_4_30, MTCTR_0, LWZ_12_8_30, BCTR, ADDIS_11_30,
1853 LWZU_0_X_11): Define.
1854 (ppc_elf_howto_raw): Add R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI
1855 and R_PPC_REL16_HA entries.
1856 (ppc_elf_reloc_type_lookup): Convert new bfd reloc types.
1857 (ppc_elf_addr16_ha_reloc): Also handle R_PPC_REL16_HA.
1858 (struct ppc_elf_link_hash_table): Add glink, glink_pltresolve,
1859 new_plt, and old_plt.
1860 (ppc_elf_create_dynamic_sections): Create .glink section.
1861 (ppc_elf_check_relocs): Set new_plt and old_plt.
1862 (ppc_elf_select_plt_layout): New function.
1863 (ppc_elf_tls_setup): Set plt output section elf type and flags.
1864 (allocate_got): Handle differences between old and new got layout.
1865 (allocate_dynrelocs): Likewise for plt.
1866 (ppc_elf_size_dynamic_sections): Likewise. Allocate memory for
1867 .glink. Don't allocate memory for old bss .plt. Emit DT_PPC_GLINK.
1868 (ppc_elf_relax_section): Rename ppc_info to htab. Handle .glink
1869 destination of R_PPC_PLTREL24 relocs.
1870 (ppc_elf_relocate_section): Handle new relocs and changed destination
1872 (ppc_elf_finish_dynamic_symbol): Init new style plt and handle
1873 differences in layout.
1874 (ppc_elf_finish_dynamic_sections): Set DT_PPC_GLINK value. Don't
1875 put a blrl in new got. Write glink contents.
1876 * elf32-ppc.h (ppc_elf_select_plt_layout): Declare.
1877 * libbfd.h: Regenerate.
1878 * bfd-in2.h: Regenerate.
1880 2005-05-11 Andreas Schwab <schwab@suse.de>
1882 * elf32-i386.c (elf_i386_finish_dynamic_sections): Fix signedness
1885 2005-05-10 H.J. Lu <hongjiu.lu@intel.com>
1887 * elf.c (_bfd_elf_make_section_from_shdr): Only check debug
1888 section if SEC_ALLOC isn't set.
1890 2005-05-09 Kelley Cook <kcook@gcc.gnu.org>
1892 * configure.in: Replace AC_COMPILE_CHECK_SIZEOF with AC_CHECK_SIZEOF.
1893 * acinclude.m4: Don't sinclude accross.m4.
1894 * config.in, configure, Makefile.in, doc/Makefile.in: Regenerate.
1896 2005-05-09 Alan Modra <amodra@bigpond.net.au>
1898 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_dotsym.
1899 (ppc64_elf_add_symbol_hook): Set has_dotsym.
1900 (ppc64_elf_check_directives): Only process syms when has_dotsym.
1901 (func_desc_adjust): Hide fake function descriptors when function
1902 code entry is defined.
1903 (adjust_opd_syms): Adjust for deleted_section becoming union field.
1905 2005-05-09 Alan Modra <amodra@bigpond.net.au>
1907 * elfcode.h (elf_object_p): Add more sanity checks on elf header.
1909 2005-05-08 Dave Korn <dave.korn@artimi.com>
1911 * coff-tic80.c: Undefine _CONST after system headers to prevent
1912 clash with tic80-specific definition in include/coff/tic80.h
1914 2005-05-08 H.J. Lu <hongjiu.lu@intel.com>
1917 * elflink.c (elf_link_output_extsym): Use output_bfd if
1918 h->root.u.def.section is bfd_abs_section_ptr when reporting
1921 2005-05-07 H.J. Lu <hongjiu.lu@intel.com>
1923 * elf-bfd.h (elf_backend_data): Update special_sections to
1924 array of pointer to bfd_elf_special_section.
1925 * elf.c (special_sections): Likewise.
1926 * elf32-arm.c (elf32_arm_symbian_special_sections): Likewise.
1927 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
1928 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
1929 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
1930 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
1931 * elf32-ppc.c (ppc_elf_special_sections): Likewise.
1932 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
1933 * elf32-v850.c (v850_elf_special_sections): Likewise.
1934 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
1935 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
1936 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
1937 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
1938 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
1939 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
1940 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
1941 * elfxx-mips.h (_bfd_mips_elf_special_sections): Likewise.
1943 * elf.c (get_special_section): Updated.
1945 2005-05-07 Alan Modra <amodra@bigpond.net.au>
1947 * elf-bfd.h (struct elf_backend_data): Remove got_symbol_offset.
1948 * elfxx-target.h (elf_backend_got_symbol_offset): Delete.
1949 * elflink.c (_bfd_elf_create_got_section): Use zero in place of
1951 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
1952 * elf32-frv.c (_frv_create_got_section): Likewise.
1953 * elf32-i370.c (i370_elf_finish_dynamic_sections): Delete ppc code.
1954 (elf_backend_got_symbol_offset): Don't define.
1955 * elf64-ppc.c (elf_backend_got_symbol_offset): Don't define.
1956 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add got_header_size
1958 (ppc_elf_create_got): Tidy.
1959 (ppc_elf_create_dynamic_sections): Don't set SEC_IN_MEMORY for .plt.
1960 (ppc_elf_check_relocs): Reduce string comparisons by using elf.hgot.
1961 (ppc_elf_gc_sweep_hook): Likewise.
1962 (ppc_elf_relocate_section): Likewise.
1963 (ppc_elf_finish_dynamic_symbol): Likewise.
1964 (allocate_got): New function.
1965 (allocate_dynrelocs): Use allocate_got.
1966 (ppc_elf_size_dynamic_sections): Likewise. Delay tlsld_got allocation
1967 so that local got can refcount it. Set got_header_size.
1968 (ppc_elf_relocate_section): Use value of elf.hgot rather than hard-
1970 (ppc_elf_finish_dynamic_sections): Likewise.
1971 (elf_backend_got_symbol_offset): Don't define.
1972 (elf_backend_got_header_size): Ditto.
1974 2005-05-05 Steve Ellcey <sje@cup.hp.com>
1976 * configure.in (ACX_HEADER_STRING): New.
1977 * configure: Regenerate.
1978 * config.in: Regenerate.
1979 * sysdep.h (STRING_WITH_STRINGS): Use.
1981 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1983 * elf.c (_bfd_elf_close_and_cleanup): Only call
1984 _bfd_dwarf2_cleanup_debug_info on bfd_object.
1986 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1988 * elflink.c (_bfd_elf_provide_section_bound_symbols): Use
1989 "__bss_start" instead of "_edata" as fallback.
1991 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1993 * bfd-in2.h: Regenerated.
1995 2005-05-05 Paul Brook <paul@codesourcery.com>
1997 * config.bfd: Use bfd_elf32_i386_vxworks_vec for i?86-*-vxworks.
1998 * configure.in: Add bfd_elf32_i386_vxworks_vec. i386 targets need
2000 * configure: Regenerate.
2001 * Makefile.am (BFD32_BACKENDS): Add elf-vxworks.lo.
2002 (BFD32_BACKENDS_CFILES): Add elf-vxworks.c.
2003 (elf32-i386.lo): Depend on elf-vxworks.h.
2004 (elf-vxworks.lo): New rule.
2005 * Makefile.in: Regenerate.
2006 * elf-bfd.h (elf_backend_data): Update type of
2007 elf_backend_emit_relocs.
2008 (_bfd_elf_link_output_relocs): Update prototype.
2009 * elflink.c (_bfd_elf_link_output_relocs): Always use
2010 bed->elf_backend_emit_relocs when outputting relocations.
2011 * elfxx-target.h (elf_backend_emit_relocs): Default to
2012 _bfd_elf_link_output_relocs.
2013 * targets.c (bfd_elf32_i386_vxworks_vec): Declare.
2014 (_bfd_target_vector): Add bfd_elf32_i386_vxworks_vec.
2015 * elf32-i386.c: Add elf32-i386-vxworks target BFD.
2016 (elf_i386_plt0_entry): Remove padding.
2017 (elf_i386_pic_plt0_entry): Ditto.
2018 (PLTRESOLVE_RELOCS_SHLIB, PLTRESOLVE_RELOCS): Define.
2019 (PLT_NON_JUMP_SLOT_RELOCS): Define.
2020 (elf_i386_link_hash_table): Add srelplt2, hgot, hplt, is_vxworks and
2021 plt0_pad_byte fields.
2022 (elf_i386_link_hash_table_create): Zero them.
2023 (elf_i386_create_dynamic_sections): Create static relocation section.
2024 (allocate_dynrelocs): Allocate space for static PLT relocations.
2025 (elf_i386_size_dynamic_sections): Save shortcuts to PLT and GOT
2026 symbols. Give PLT symbols function type. Don't strip PLT sections
2027 if we have exported symbols from them.
2028 (elf_i386_finish_dynamic_symbol): Fill in VxWorks PLT static
2029 relocation section. Don't mark _GLOBAL_OFFSET_TABLE_ as absolute on
2031 (elf_i386_finish_dynamic_sections): Allow different pad bytes.
2032 Add relocation for GOT location. Fill in PLT static relocations.
2033 (elf_i386_vxworks_link_hash_table_create): New function.
2034 (elf_i386_vxworks_link_output_symbol_hook): New function.
2035 * elf-vxworks.h: New file.
2037 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
2039 * section.c (bfd_make_section_anyway_with_flags): New.
2040 (bfd_make_section_anyway): Call bfd_make_section_anyway_with_flags,
2041 (bfd_make_section_with_flags): New.
2042 (bfd_make_section): Call bfd_make_section_with_flags.
2044 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Call
2045 bfd_make_section_with_flags/bfd_make_section_anyway_with_flags
2046 instead of bfd_make_section/bfd_make_section and don't call
2047 bfd_set_section_flags.
2048 (mn10300_elf_check_relocs): Likewise.
2049 (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
2050 * elf32-arm.c (create_got_section): Likewise.
2051 (bfd_elf32_arm_add_glue_sections_to_bfd): Likewise.
2052 (elf32_arm_check_relocs): Likewise.
2053 * elf32-cris.c (cris_elf_check_relocs): Likewise.
2054 * elf32-frv.c (elf32_frv_add_symbol_hook): Likewise.
2055 (_frv_create_got_section): Likewise.
2056 (elf32_frvfdpic_create_dynamic_sections): Likewise.
2057 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
2058 (elf32_hppa_check_relocs): Likewise.
2059 * elf32-i370.c (i370_elf_create_dynamic_sections): Likewise.
2060 (i370_elf_check_relocs): Likewise.
2061 * elf32-i386.c (create_got_section): Likewise.
2062 (elf_i386_check_relocs): Likewise.
2063 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
2064 (create_got_section): Likewise.
2065 (m32r_elf_create_dynamic_sections): Likewise.
2066 (m32r_elf_check_relocs): Likewise.
2067 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
2068 * elf32-ppc.c (ppc_elf_create_got): Likewise.
2069 (ppc_elf_create_dynamic_sections): Likewise.
2070 (ppc_elf_add_symbol_hook): Likewise.
2071 (ppc_elf_check_relocs): Likewise.
2072 * elf32-s390.c (create_got_section): Likewise.
2073 (elf_s390_check_relocs): Likewise.
2074 * elf32-sh.c (create_got_section): Likewise.
2075 (sh_elf_create_dynamic_sections): Likewise.
2076 (sh_elf_check_relocs): Likewise.
2077 * elf32-vax.c (elf_vax_check_relocs): Likewise.
2078 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
2079 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
2080 (add_extra_plt_sections): Likewise.
2081 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
2082 (elf64_alpha_create_got_section): Likewise.
2083 (elf64_alpha_create_dynamic_sections): Likewise.
2084 (elf64_alpha_check_relocs): Likewise.
2085 * elf64-hppa.c (get_reloc_section): Likewise.
2086 (get_opd): Likewise.
2087 (get_plt): Likewise.
2088 (get_dlt): Likewise.
2089 (get_stub): Likewise.
2090 (elf64_hppa_create_dynamic_sectionso): Likewise.
2091 * elf64-mmix.c (mmix_elf_check_common_relocs): Likewise.
2092 * elf64-ppc.c (create_linkage_sections): Likewise.
2093 (ppc64_elf_check_relocs): Likewise.
2094 * elf64-s390.c (create_got_section): Likewise.
2095 (elf_s390_check_relocs): Likewise.
2096 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
2097 (sh64_elf64_create_dynamic_sections): Likewise.
2098 * elf64-x86-64.c (create_got_section): Likewise.
2099 (elf64_x86_64_check_relocs): Likewise.
2100 * elflink.c (_bfd_elf_create_got_section): Likewise.
2101 (_bfd_elf_link_create_dynamic_sections): Likewise.
2102 (elf_link_add_object_symbols): Likewise.
2103 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
2104 (elfNN_ia64_create_dynamic_sections): Likewise.
2105 (get_fptr): Likewise.
2106 (get_pltoff): Likewise.
2107 (get_reloc_section): Likewise.
2108 (elfNN_ia64_object_p): Likewise.
2109 * elfxx-mips.c (mips_elf_rel_dyn_section): Likewise.
2110 (mips_elf_create_compact_rel_section): Likewise.
2111 (mips_elf_create_got_section): Likewise.
2112 (_bfd_mips_elf_create_dynamic_sections): Likewise.
2113 * elfxx-sparc.c (create_got_section): Likewise.
2114 (_bfd_sparc_elf_check_relocs): Likewise.
2116 * elf.c (_bfd_elf_new_section_hook): Call _bfd_elf_get_sec_type_attr
2117 on linker created sections.
2119 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
2122 * elflink.c (_bfd_elf_link_assign_sym_version): Allow version
2123 script on executable.
2125 2005-05-05 John Levon <levon@movementarian.org>
2127 * dwarf2.c (read_abbrevs): If bfd_realloc fails, free currently
2128 allocated memory before returning.
2129 (decode_line_info): Likewise.
2130 (_bfd_dwarf2_cleanup_debug_info): New function: Frees memory
2131 allocated by functions in this file.
2132 * elf-bfd.h (_bfd_dwarf2_cleanup_debug_info): Prototype.
2133 * elf.c (_bfd_elf_close_and_cleanup): Call
2134 _bfd_dwarf2_cleanup_debug_info.
2136 2005-05-05 Hans-Peter Nilsson <hp@axis.com>
2138 * Makefile.am (INCLUDES): Don't -D_GNU_SOURCE here.
2139 * configure.in: Call AC_GNU_SOURCE here, after AC_PROG_CC.
2140 * configure, config.in, Makefile.in: Regenerate.
2141 * sysdep.h (stpcpy): Revert last change.
2143 2005-05-05 Hans-Peter Nilsson <hp@axis.com>
2145 * sysdep.h (stpcpy): Wrap declaration in parentheses.
2147 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
2149 * elfxx-ia64.c (ARCH_SIZE): New.
2150 (LOG_SECTION_ALIGN): Likewise.
2151 (elfNN_ia64_create_dynamic_sections): Use LOG_SECTION_ALIGN to
2152 align relocation sections.
2153 (get_fptr): Likewise.
2154 (get_reloc_section): Likewise.
2155 (elfNN_ia64_tprel_base): Likewise.
2156 (elfNN_ia64_check_relocs): Support 32bit relocations.
2157 (allocate_global_fptr_got): Likewise.
2158 (allocate_dynrel_entries): Likewise.
2159 (set_got_entry): Likewise.
2160 (set_pltoff_entry): Likewise.
2161 (elfNN_ia64_relocate_section): Likewise.
2163 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
2165 * configure.in: Add AC_CHECK_DECLS(stpcpy).
2166 * configure: Regenerate.
2167 * config.in: Likewise.
2169 * sysdep.h (stpcpy): New.
2171 2005-05-04 Nick Clifton <nickc@redhat.com>
2173 * Update the address and phone number of the FSF organization in
2174 the GPL notices in the following files:
2175 aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c,
2176 aout-cris.c, aout-ns32k.c, aout-sparcle.c, aout-target.h,
2177 aout-tic30.c, aout0.c, aout32.c, aout64.c, aoutf1.h, aoutx.h,
2178 archive.c, archive64.c, archures.c, armnetbsd.c, bfd-in.h,
2179 bfd-in2.h, bfd.c, bfdio.c, bfdwin.c, binary.c, bout.c, cache.c,
2180 cf-i386lynx.c, cf-m68klynx.c, cf-sparclynx.c, cisco-core.c,
2181 coff-a29k.c, coff-alpha.c, coff-apollo.c, coff-arm.c, coff-aux.c,
2182 coff-go32.c, coff-h8300.c, coff-h8500.c, coff-i386.c, coff-i860.c,
2183 coff-i960.c, coff-ia64.c, coff-m68k.c, coff-m88k.c, coff-maxq.c,
2184 coff-mcore.c, coff-mips.c, coff-or32.c, coff-pmac.c, coff-ppc.c,
2185 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c,
2186 coff-svm68k.c, coff-tic30.c, coff-tic4x.c, coff-tic54x.c,
2187 coff-tic80.c, coff-u68k.c, coff-w65.c, coff-we32k.c, coff-z8k.c,
2188 coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c, coffswap.h,
2189 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c,
2190 cpu-avr.c, cpu-cr16c.c, cpu-cris.c, cpu-crx.c, cpu-d10v.c,
2191 cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c, cpu-h8300.c,
2192 cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c, cpu-i860.c,
2193 cpu-i960.c, cpu-ia64-opc.c, cpu-ia64.c, cpu-ip2k.c, cpu-iq2000.c,
2194 cpu-m10200.c, cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c,
2195 cpu-m68hc12.c, cpu-m68k.c, cpu-m88k.c, cpu-maxq.c, cpu-mcore.c,
2196 cpu-mips.c, cpu-mmix.c, cpu-msp430.c, cpu-ns32k.c, cpu-openrisc.c,
2197 cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c, cpu-rs6000.c,
2198 cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c, cpu-tic4x.c,
2199 cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c, cpu-w65.c,
2200 cpu-we32k.c, cpu-xstormy16.c, cpu-xtensa.c, cpu-z8k.c, demo64.c,
2201 dwarf1.c, dwarf2.c, ecoff.c, ecofflink.c, ecoffswap.h,
2202 efi-app-ia32.c, efi-app-ia64.c, elf-bfd.h, elf-eh-frame.c,
2203 elf-hppa.h, elf-m10200.c, elf-m10300.c, elf-strtab.c, elf.c,
2204 elf32-am33lin.c, elf32-arc.c, elf32-arm.c, elf32-avr.c,
2205 elf32-cr16c.c, elf32-cris.c, elf32-crx.c, elf32-d10v.c,
2206 elf32-d30v.c, elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-gen.c,
2207 elf32-h8300.c, elf32-hppa.c, elf32-hppa.h, elf32-i370.c,
2208 elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
2209 elf32-iq2000.c, elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c,
2210 elf32-m68hc1x.c, elf32-m68hc1x.h, elf32-m68k.c, elf32-m88k.c,
2211 elf32-mcore.c, elf32-mips.c, elf32-msp430.c, elf32-openrisc.c,
2212 elf32-or32.c, elf32-pj.c, elf32-ppc.c, elf32-ppc.h, elf32-s390.c,
2213 elf32-sh-symbian.c, elf32-sh.c, elf32-sh64-com.c, elf32-sh64.c,
2214 elf32-sh64.h, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
2215 elf32-xstormy16.c, elf32-xtensa.c, elf32.c, elf64-alpha.c,
2216 elf64-gen.c, elf64-hppa.c, elf64-hppa.h, elf64-mips.c,
2217 elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
2218 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elf64.c, elfcode.h,
2219 elfcore.h, elflink.c, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c,
2220 elfxx-mips.h, elfxx-sparc.c, elfxx-sparc.h, elfxx-target.h,
2221 epoc-pe-arm.c, epoc-pei-arm.c, format.c, freebsd.h, gen-aout.c,
2222 genlink.h, hash.c, host-aout.c, hp300bsd.c, hp300hpux.c,
2223 hppabsd-core.c, hpux-core.c, i386aout.c, i386bsd.c, i386dynix.c,
2224 i386freebsd.c, i386linux.c, i386lynx.c, i386mach3.c, i386msdos.c,
2225 i386netbsd.c, i386os9k.c, ieee.c, ihex.c, init.c, irix-core.c,
2226 libaout.h, libbfd-in.h, libbfd.c, libbfd.h, libcoff-in.h,
2227 libcoff.h, libecoff.h, libhppa.h, libieee.h, libnlm.h, liboasys.h,
2228 libpei.h, libxcoff.h, linker.c, lynx-core.c, m68k4knetbsd.c,
2229 m68klinux.c, m68klynx.c, m68knetbsd.c, m88kmach3.c, m88kopenbsd.c,
2230 mach-o-target.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c, mmo.c,
2231 netbsd-core.c, netbsd.h, newsos3.c, nlm-target.h, nlm.c,
2232 nlm32-alpha.c, nlm32-i386.c, nlm32-ppc.c, nlm32-sparc.c, nlm32.c,
2233 nlm64.c, nlmcode.h, nlmswap.h, ns32k.h, ns32knetbsd.c, oasys.c,
2234 opncls.c, osf-core.c, pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c,
2235 pe-mcore.c, pe-mips.c, pe-ppc.c, pe-sh.c, peXXigen.c,
2236 pef-traceback.h, pef.c, pef.h, pei-arm.c, pei-i386.c, pei-mcore.c,
2237 pei-mips.c, pei-ppc.c, pei-sh.c, peicode.h, ppcboot.c,
2238 ptrace-core.c, reloc.c, reloc16.c, riscix.c, rs6000-core.c,
2239 sco5-core.c, section.c, simple.c, som.c, som.h, sparclinux.c,
2240 sparclynx.c, sparcnetbsd.c, srec.c, stab-syms.c, stabs.c, sunos.c,
2241 syms.c, sysdep.h, targets.c, tekhex.c, ticoff.h, trad-core.c,
2242 vax1knetbsd.c, vaxbsd.c, vaxnetbsd.c, versados.c, vms-gsd.c,
2243 vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h, xcoff-target.h,
2244 xcofflink.c, xsym.c, xsym.h, xtensa-isa.c, xtensa-modules.c,
2247 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
2249 * bfd-in.h (_bfd_elf_provide_section_bound_symbols): New.
2250 * bfd-in2.h: Regenerated.
2252 * elflink.c (bfd_elf_set_symbol): New.
2253 (_bfd_elf_provide_symbol): Call it.
2254 (_bfd_elf_provide_section_bound_symbols): New.
2256 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
2258 * elflink.c (_bfd_elf_merge_symbol): Only skip weak definitions
2259 at the end, if a strong definition has already been seen.
2261 2005-05-04 Alan Modra <amodra@bigpond.net.au>
2263 * section.c (struct bfd_section): Replace link_order_head and
2264 link_order_tail with map_head and map_tail union.
2265 (STD_SECTION): Update.
2266 (_bfd_strip_section_from_output): Delete.
2267 * aoutx.h: Update throughout for above changes.
2268 * coff-ppc.c: Likewise.
2269 * cofflink.c: Likewise.
2270 * ecoff.c: Likewise.
2271 * elf-eh-frame.c: Likewise.
2272 * elf-m10300.c: Likewise.
2274 * elf32-arm.c: Likewise.
2275 * elf32-cris.c: Likewise.
2276 * elf32-hppa.c: Likewise.
2277 * elf32-i386.c: Likewise.
2278 * elf32-m32r.c: Likewise.
2279 * elf32-m68hc1x.c: Likewise.
2280 * elf32-m68k.c: Likewise.
2281 * elf32-ppc.c: Likewise.
2282 * elf32-s390.c: Likewise.
2283 * elf32-sh.c: Likewise.
2284 * elf32-vax.c: Likewise.
2285 * elf32-xtensa.c: Likewise.
2286 * elf64-alpha.c: Likewise.
2287 * elf64-hppa.c: Likewise.
2288 * elf64-ppc.c: Likewise.
2289 * elf64-s390.c: Likewise.
2290 * elf64-sh64.c: Likewise.
2291 * elf64-x86-64.c: Likewise.
2292 * elflink.c: Likewise.
2293 * elfxx-ia64.c: Likewise.
2294 * elfxx-mips.c: Likewise.
2295 * elfxx-sparc.c: Likewise.
2296 * linker.c: Likewise.
2297 * merge.c: Likewise.
2298 * pdp11.c: Likewise.
2299 * xcofflink.c: Likewise.
2300 * elflink.c (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Split
2301 out from bfd_elf_size_dynamic_sections.
2302 * bfd-in.h (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Declare.
2303 * bfd-in2.h: Regenerate.
2305 2005-05-04 Alan Modra <amodra@bigpond.net.au>
2307 * section.c (bfd_section_list_remove): Don't clear s->next.
2308 (bfd_section_list_append): Always init s->prev.
2309 (bfd_section_list_prepend): Define.
2310 (bfd_section_list_insert_after): Minor optimization.
2311 (bfd_section_removed_from_list): Rewrite.
2312 * elf.c (assign_section_numbers): Simplify list traversal now that
2313 bfd_section_list_remove doesn't destroy removed section next ptr.
2314 * sunos.c (sunos_add_dynamic_symbols): Likewise.
2315 * elfxx-ia64.c (elfNN_ia64_object_p): Use bfd_section_list_prepend.
2316 * xcofflink.c (_bfd_xcoff_bfd_final_link): Simplify list traversal.
2317 * bfd-in2.h: Regenerate.
2319 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
2321 * bfd.c (bfd): Remove section_tail and add section_last.
2322 (bfd_preserve): Likewise.
2323 (bfd_preserve_save): Likewise.
2324 (bfd_preserve_restore): Likewise.
2325 * opncls.c (_bfd_new_bfd): Likewise.
2327 * coffcode.h (coff_compute_section_file_positions): Updated.
2328 (coff_compute_section_file_positions): Likewise.
2329 * elf.c (assign_section_numbers): Likewise.
2330 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
2331 * elf64-mmix.c (mmix_elf_final_link): Likewise.
2332 * elfxx-ia64.c (elfNN_ia64_object_p): Likewise.
2333 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
2334 * sunos.c (sunos_add_dynamic_symbols): Likewise.
2335 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
2337 * ecoff.c (bfd_debug_section): Initialize prev.
2339 * section.c (bfd_section): Add prev.
2340 (bfd_section_list_remove): Updated.
2341 (bfd_section_list_append): New.
2342 (bfd_section_list_insert_after): New.
2343 (bfd_section_list_insert_before): New.
2344 (bfd_section_list_insert): Removed.
2345 (bfd_section_removed_from_list): Updated.
2346 (STD_SECTION): Initialize prev.
2347 (bfd_section_init): Updated.
2348 (bfd_section_list_clear): Updated.
2350 * bfd-in2.h: Regenerated.
2352 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
2354 * elf.c (_bfd_elf_new_section_hook): Don't call
2355 _bfd_elf_get_sec_type_attr on sections from input files.
2357 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
2359 * merge.c (sec_merge_init): Call bfd_hash_table_init_n with
2360 hash table size 16699 instead of bfd_hash_table_init.
2362 2005-05-01 Paul Brook <paul@codesourcery.com>
2364 * elflink.c (_bfd_elf_merge_symbol): Skip weak definitions if a strong
2365 definition has already been seen.
2367 2005-05-01 Paul Brook <paul@codesourcery.com>
2369 * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Treat
2370 R_ARM_PLT32 the same as R_ARM_PC24.
2371 (arm_add_to_rel): Ditto.
2373 2005-04-29 Ralf Corsepius <ralf.corsepius@rtems.org>
2375 * config.bfd: Add h8300*-*-rtemscoff.
2376 Switch h8300*-*-rtems* to elf.
2378 2005-04-29 Daniel Jacobowitz <dan@codesourcery.com>
2380 * aclocal.m4, Makefile.in: Regnerated.
2382 2005-04-28 Paul Brook <paul@codesourcery.com>
2384 Merge changes only applied to Makefile.in.
2385 * Makefile.am (BFD32_BACKENDS): Add elfxx-sparc.lo
2386 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
2387 (elfxx-sparc.lo): New rule.
2388 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
2389 (elf64-sparc.lo): Likewise.
2391 2005-04-28 Julian Brown <julian@codesourcery.com>
2393 * elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak
2396 2005-04-27 H.J. Lu <hongjiu.lu@intel.com>
2398 * elf-bfd.h (bfd_elf_sym_name): Also take "asection *".
2400 * elf.c (bfd_elf_sym_name): Updated.
2401 (group_signature): Likewise.
2402 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2403 * elf64-ppc.c (ppc64_elf_edit_opd): Likewise.
2404 (ppc64_elf_edit_toc): Likewise.
2405 (ppc64_elf_relocate_section): Likewise.
2406 * elfcode.h (elf_slurp_symbol_table): Likewise.
2407 * elflink.c (elf_link_input_bfd): Likewise.
2409 * elfxx-ia64.c (elfNN_ia64_relocate_section): Call
2410 bfd_elf_sym_name to get local symbol name when reporting errors.
2412 2005-04-27 Nick Clifton <nickc@redhat.com>
2414 * elflink.c (elf_link_input_bfd): Handle the case where a badly
2415 formatted input file results in a reloc which has no associated
2418 2005-04-26 Jerome Guitton <guitton@gnat.com>
2420 * bfd.m4 (BFD_NEED_DECLARATION): Restore.
2422 2005-04-25 David S. Miller <davem@davemloft.net>
2424 * elfxx-sparc.c (sparc_elf_append_rela_64): Add BFD64 protection.
2425 (sparc_elf_r_info_64, _bfd_sparc_elf_finish_dynamic_symbol,
2426 sparc64_finish_dyn, _bfd_sparc_elf_finish_dynamic_sections):
2429 2005-04-25 H.J. Lu <hongjiu.lu@intel.com>
2432 * elflink.c (elf_link_input_bfd): Make non-debugging reference
2433 to discarded section an error.
2435 2005-04-21 Jerome Guitton <guitton@gnat.com>
2437 * configure.in: Replace BFD_NEED_DECLARATION checks by the
2438 corresponding AC_CHECK_DECLS.
2439 * sysdep.h: Replace NEED_DECLARATION_* checks by the corresponding
2441 * bfd.m4 (BFD_NEED_DECLARATION): Remove, obsolete.
2442 * configure: Regenerate.
2445 2005-04-21 Andreas Schwab <schwab@suse.de>
2447 * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove
2448 unsigned from type of dynamic_interpreter.
2449 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create): Remove
2452 * elf.c (assign_section_numbers): Fix comment.
2454 2005-04-21 Jerome Guitton <guitton@gnat.com>
2456 * som.c (som_bfd_print_private_bfd_data): Add explicit cast to long
2457 for struct som_exec_auxhdr fields.
2459 2005-04-21 Nick Clifton <nickc@redhat.com>
2461 * aout-adobe.c: Convert to ISO C and fix formatting.
2462 * aout-arm.c: Convert to ISO C and fix formatting.
2463 * aout-cris.c: Convert to ISO C and fix formatting.
2464 * aout-ns32k.c: Convert to ISO C and fix formatting.
2465 * aout-tic30.c: Convert to ISO C and fix formatting.
2466 * coffcode.h: Convert to ISO C and fix formatting.
2467 * coffswap.h: Convert to ISO C and fix formatting.
2468 * i386aout.c: Convert to ISO C and fix formatting.
2469 * libaout.h: Convert to ISO C and fix formatting.
2470 * libcoff-in.h: Convert to ISO C and fix formatting.
2471 * libcoff.h: Convert to ISO C and fix formatting.
2472 * libecoff.h: Convert to ISO C and fix formatting.
2473 * libnlm.h: Convert to ISO C and fix formatting.
2474 * libpei.h: Convert to ISO C and fix formatting.
2475 * libxcoff.h: Convert to ISO C and fix formatting.
2476 * nlm-target.h: Convert to ISO C and fix formatting.
2477 * nlm.c: Convert to ISO C and fix formatting.
2478 * nlm32-alpha.c: Convert to ISO C and fix formatting.
2479 * nlm32-i386.c: Convert to ISO C and fix formatting.
2480 * nlm32-ppc.c: Convert to ISO C and fix formatting.
2481 * nlm32-sparc.c: Convert to ISO C and fix formatting.
2482 * nlmcode.h: Convert to ISO C and fix formatting.
2483 * nlmswap.h: Convert to ISO C and fix formatting.
2484 * pe-mips.c: Convert to ISO C and fix formatting.
2485 * peXXigen.c: Convert to ISO C and fix formatting.
2486 * peicode.h: Convert to ISO C and fix formatting.
2487 * vms-gsd.c: Convert to ISO C and fix formatting.
2488 * vms-hdr.c: Convert to ISO C and fix formatting.
2489 * vms-misc.c: Convert to ISO C and fix formatting.
2490 * vms-tir.c: Convert to ISO C and fix formatting.
2491 * vms.c: Convert to ISO C and fix formatting.
2492 * vms.h: Convert to ISO C and fix formatting.
2494 * coffgen.c (coff_print_symbol): Restore correct formatting of
2497 2005-04-20 David S. Miller <davem@davemloft.net>
2499 * elfxx-sparc.c (sparc_elf_r_symndx_64): Fix compiler warning.
2500 (_bfd_sparc_elf_link_hash_table_create): Likewise.
2501 (allocate_dynrelocs): Likewise.
2503 2005-04-20 Jerome Guitton <guitton@gnat.com>
2505 * configure.in: Fix the check for basename declaration. Add check
2506 for declarations of ftello, ftello64, fseeko, fseeko64.
2507 * configure: Regenerate.
2509 * sysdep.h: If needed, declare ftello, ftello64, fseeko, fseeko64.
2511 2005-04-19 David S. Miller <davem@davemloft.net>
2513 * elfxx-sparc.c: New file.
2514 * elfxx-sparc.h: New file.
2515 * Makefile.in (BFD32_BACKENDS): Add elfxx-sparc.lo
2516 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
2517 (elfxx-sparc.lo): New rule.
2518 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
2519 (elf64-sparc.lo): Likewise.
2520 * configure.in (bfd_elf32_sparc_vec): Add elfxx-sparc.lo
2521 (bfd_elf64_sparc_vec): Likewise.
2522 * configure: Regenerate.
2523 * elf32-sparc.c: Remove common code now in elfxx-sparc.c
2524 * elf64-sparc.c: Likewise, also use elf64_sparc_*() naming
2525 which is more consistent with elf32-sparc.c
2527 2005-04-19 Daniel Jacobowitz <dan@codesourcery.com>
2529 * elfxx-mips.c (struct mips_elf_link_hash_entry): Update comment.
2530 (mips_elf_create_local_got_entry): Check h->root.forced_local.
2532 2005-04-19 Alan Modra <amodra@bigpond.net.au>
2534 * elf32-ppc.c (ppc_elf_check_relocs): Don't bother with
2535 dynamic relocs in non-SEC_ALLOC sections.
2536 (ppc_elf_gc_sweep_hook): Likewise.
2537 (ppc_elf_relax_section): Likewise.
2538 (ppc_elf_relocate_section): Likewise.
2540 2005-04-18 Nick Clifton <nickc@redhat.com>
2542 * aix5ppc-core.c (xcoff64_core_p): Fix compile time warning
2543 assigning a value to return_value.
2545 2005-04-17 H.J. Lu <hongjiu.lu@intel.com>
2548 * elf.c (_bfd_elf_copy_private_section_data): Don't copy linker
2551 2005-04-17 H.J. Lu <hongjiu.lu@intel.com>
2554 * elf.c (setup_group): Properly handle zero group count.
2556 2005-04-17 Mark Kettenis <kettenis@gnu.org>
2558 * som.c (hppa_som_reloc, som_mkobject, som_is_space)
2559 (som_is_subspace, compare_subspaces, som_compute_checksum)
2560 (som_build_and_write_symbol_table, som_slurp_symbol_table): New
2562 (hppa_som_reloc, compare_syms, compare_subspaces)
2563 (som_print_symbol, som_get_section_contents)
2564 (som_set_section_contents): Remove space after 'void *'.
2565 (som_bfd_print_private_bfd_data): Use %lx to print longs.
2566 (som_bfd_merge_private_bfd_data)
2567 (som_bfd_copy_private_header_data, som_bfd_set_private_flags): New
2570 2004-04-15 Julian Brown <julian@codesourcery.com>
2572 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
2573 * bfd-in2.h: Regenerate.
2574 * elf32-arm.c (elf32_arm_link_hash_table): New field, 'use_blx'.
2575 (elf32_arm_link_hash_table_create): Initialise fix_v4bx, use_blx.
2576 (bfd_elf32_arm_set_target_relocs): Handle use_blx.
2577 (elf32_arm_final_link_relocate): Use Thumb BLX for R_ARM_THM_PC22
2578 relocations if requested to.
2579 (allocate_dynrelocs): Don't count size of omitted Thumb stubs based on
2580 use_blx rather than symbian_p.
2581 (elf32_arm_finish_dynamic_symbol): Don't output Thumb PLT stubs if
2582 use_blx is in effect.
2583 (elf32_arm_symbian_link_hash_table_create): Enable use_blx by default
2586 2005-04-15 Nick Clifton <nickc@redhat.com>
2588 * coffgen.c (coff_print_symbol): Use fprintf_vma to print vma
2591 2005-04-15 Alan Modra <amodra@bigpond.net.au>
2594 * elflink.c (elf_smash_syms): Clear undef.next if it's not being
2595 used as a list pointer.
2597 2005-04-14 Alan Modra <amodra@bigpond.net.au>
2599 * Makefile.am (NO_WERROR): Define.
2600 * warning.m4: New file
2601 * acinclude.m4: Include warning.m4.
2602 * configure.in: Invoke AM_BINUTILS_WARNINGS.
2603 * Makefile.in: Regenerate.
2604 * configure: Regenerate.
2606 2005-04-14 Alan Modra <amodra@bigpond.net.au>
2608 * merge.c (sec_merge_emit): Tidy. Check for bfd_zmalloc errors.
2609 Write trailing padding.
2611 * merge.c (merge_strings): Round up section size for alignment.
2613 2005-04-14 David S. Miller <davem@davemloft.net>
2615 Add TLS support for 64-bit Sparc ELF.
2616 * elf64-sparc.c (sparc64_elf_dyn_relocs,
2617 sparc64_elf_link_hash_entry, sparc64_elf_obj_tdata): New structs.
2618 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLD_GD, GOT_TLD_IE,
2619 sparc64_elf_hash_entry, sparc64_elf_tdata,
2620 sparc64_elf_local_got_tls_type): New defines.
2621 (sparc64_elf_mkobject): New function.
2622 (sparc64_elf_link_hash_table): Add members for dynamic linker
2623 sections PLT, RELPLT, DYNBSS, and RELBSS. Add tls_ldm_got
2624 uion to track TLS GOT references. Add sym_sec to cache
2625 mappings from local sym to section.
2626 (link_hash_newfunc): New function.
2627 (sparc64_elf_bfd_link_hash_table_create): Rename to
2628 sparc64_elf_link_hash_table_create for consistency.
2629 Pass link_hash_newfunc to _bfd_elf_link_hash_table_init.
2630 (sparc64_elf_create_dynamic_sections): Initialize new section
2631 members of sparc64_elf_link_hash_table. Only init srelbss
2633 (sparc64_elf_copy_indirect_symbol, sparc64_elf_tls_transition):
2635 (SPARC_NOP): Define.
2636 (sparc64_elf_build_plt, sparc64_elf_plt_entry_offset,
2637 sparc64_elf_plt_ptr_offset): Delete.
2638 (sparc64_plt_entry_build): New function to build PLT entries
2639 gradually instread of all at once at the end of linking.
2640 (sparc64_elf_check_relocs): Delete dynobj, sgot, and srelgot
2641 local vars. Get them from sparc64_elf_hash_table instead.
2642 Check early on if r_symndx is in bounds. Handle TLS transitions.
2643 Account for TLS GOT references and DF_STATIC_TLS, as needed.
2644 For TLS relocs, record the tls_type in either
2645 sparc64_elf_local_got_tls_type or sparc64_elf_hash_entry as
2646 appropriate. For R_SPARC_TLS_{GD,LDM}_CALL, emit a reference
2647 to the __tls_get_addr symbol. For PLT relocs, track references
2648 via h->plt.refcount. When R_SPARC_{PC10,PC22,PC_HH22,PC_HM10,
2649 PC_LM22} and h not-NULL, set h->non_got_ref. For global data
2650 symbol references, count the number of relocations needed for
2651 that symbol. For default switch case, don't error, this lets
2652 the TLS relocs not explicitly handled by this function get
2654 (sparc64_elf_gc_mark_hook, sparc64_gc_sweep_hook): New functions.
2655 (sparc64_elf_adjust_dynamic_symbol): Remove dynobj local var, get
2656 it from sparc64_elf_hash_table. Store the real PLT offset
2657 in h->plt.offset, and build PLT entries one at a time. Also
2658 get .dynbss section pointer from htab.
2659 (allocate_dynrelocs, readonly_dynrelocs,
2660 sparc64_omit_section_dynsym): New functions.
2661 (sparc64_elf_omit_section_dynsym): Use these new functions as
2663 (dtpoff_base, tpoff): New functions.
2664 (sparc64_elf_relocate_section): Kill dynobj, sgot, and splt
2665 locals, get them from sparc64_elf_hash_table. Handle TLS
2666 relocations and refcounting in main relocation loop.
2667 (sparc64_elf_finish_dynamic_symbol): Use
2668 sparc64_elf_link_hash_table. Build PLT entries as we see
2669 them. Handle TLS GOT relocations.
2670 (sparc64_elf_finish_dynamic_sections): Get sgot and dynobj
2671 from sparc64_elf_hash_table. Initialize only PLT header
2672 not all entries since we not build PLT entries one by one.
2673 (elf_backend_copy_indirect_symbol, bfd_elf64_mkobject,
2674 elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook,
2675 elf_backend_can_gc_sections, elf_backend_can_refcount): Define.
2677 2005-04-13 Daniel Jacobowitz <dan@codesourcery.com>
2679 * elflink.c (elf_link_input_bfd): Update check for removed
2682 2005-04-12 Alan Modra <amodra@bigpond.net.au>
2684 * Makefile.am: Run "make dep-am".
2685 * Makefile.in: Regenerate.
2686 * aclocal.m4: Regenerate.
2687 * libcoff.h: Regenerate.
2689 2005-04-11 H.J. Lu <hongjiu.lu@intel.com>
2691 * linker.c (_bfd_generic_link_output_symbols): Also check if
2692 the output section of an input section has been removed from
2695 * section.c (bfd_section_list_remove): Clear the next field
2696 of the removed section.
2697 (bfd_section_removed_from_list): New.
2698 * bfd-in2.h: Regenerated.
2700 2005-04-11 David S. Miller <davem@davemloft.net>
2702 * elf32-sparc.c (elf32_sparc_relocate_section,
2703 R_SPARC_TLS_LDO_{HIX22,LOX10}): When not shared, transition to
2704 R_SPARC_TLS_LE_{HIX22,LOX10}.
2705 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_HIX22): Only
2706 xor relocation with 0xffffffff if R_SPARC_TLS_LE_HIX22.
2707 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_LOX10): Only
2708 or 0x1c00 into relocation if R_SPARC_TLS_LE_HIX22.
2710 2005-04-11 H.J. Lu <hongjiu.lu@intel.com>
2712 * coffcode.h (STRING_SIZE_SIZE): Updated to match libcoff-in.h.
2714 2005-04-11 Nick Clifton <nickc@redhat.com>
2716 * aout-target.h: Convert to ISO C.
2717 * aoutf1.h: Convert to ISO C.
2718 * aoutx.h: Convert to ISO C.
2719 * bout.c: Convert to ISO C.
2720 * dwarf1.c: Convert to ISO C.
2721 * ecoffswap.h: Convert to ISO C.
2722 * freebsd.h: Convert to ISO C.
2723 * genlink.h: Convert to ISO C.
2724 * ieee.c: Convert to ISO C.
2725 * ihex.c: Convert to ISO C.
2726 * libcoff-in.h: Convert to ISO C.
2727 * mach-o.c: Convert to ISO C.
2728 * mach-o.h: Convert to ISO C.
2729 * netbsd.h: Convert to ISO C.
2730 * ns32k.h: Convert to ISO C.
2731 * ns32knetbsd.c: Convert to ISO C.
2732 * oasys.c: Convert to ISO C.
2733 * pdp11.c: Convert to ISO C.
2734 * pef-traceback.h: Convert to ISO C.
2735 * pef.c: Convert to ISO C.
2736 * pef.h: Convert to ISO C.
2737 * riscix.c: Convert to ISO C.
2738 * som.c: Convert to ISO C.
2739 * som.h: Convert to ISO C.
2740 * srec.c: Convert to ISO C.
2741 * stabs.c: Convert to ISO C.
2742 * sunos.c: Convert to ISO C.
2743 * tekhex.c: Convert to ISO C.
2744 * versados.c: Convert to ISO C.
2745 * version.h: Convert to ISO C.
2746 * xcoff-target.h: Convert to ISO C.
2747 * xcofflink.c: Convert to ISO C.
2748 * xsym.c: Convert to ISO C.
2749 * xsym.h: Convert to ISO C.
2751 2005-04-08 Paul Brook <paul@codesourcery.com>
2753 * elf32-arm.c (ARM2THUMB_GLUE_SIZE): Rename...
2754 (ARM2THUMB_STATIC_GLUE_SIZE): ... to this.
2755 (ARM2THUMB_PIC_GLUE_SIZE): Define.
2756 (a2t1p_ldr_insn, a2t2p_add_pc_insn, a2t3p_bx_r12_insn): Add.
2757 (elf32_arm_to_thumb_stub): Create PIC stubs.
2758 (record_arm_to_thumb_glue): Use different stub size for relocatable
2761 2005-04-05 Alan Modra <amodra@bigpond.net.au>
2763 * elf64-ppc.c (dec_dynrel_count): New function split out from
2764 ppc64_elf_edit_toc, with additional code from ppc64_elf_edit_opd.
2765 (ppc64_elf_edit_toc, ppc64_elf_edit_opd): Use it.
2766 (ppc64_elf_tls_optimize): Likewise.
2768 2005-04-05 Mark Kettenis <kettenis@gnu.org>
2770 * netbsd-core.c (SPARC_WCOOKIE_OFFSET): Renamed from
2771 CORE_WCOOKIE_OFFSET.
2772 (SPARC64_WCOOKIE_OFFSET): New.
2773 (netbsd_core_file_p): Provide .wcookie section for OpenBSD/sparc64.
2775 2005-04-05 Nick Clifton <nickc@redhat.com>
2777 * po/rw.po: New translation: Kinyarwanda
2778 * configure.in (ALL_LINGUAS): Add rw
2779 * configure: Regenerate.
2781 2005-04-05 Richard Sandiford <rsandifo@redhat.com>
2783 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME_P): New macro.
2784 (_bfd_mips_elf_section_from_shdr): Use it to check for recognized
2785 SHT_MIPS_OPTIONS names. Allow all sections with unrecognised
2787 (_bfd_mips_elf_fake_sections): Use MIPS_ELF_OPTIONS_SECTION_NAME_P
2788 to check for SHT_MIPS_OPTIONS sections.
2789 (_bfd_mips_elf_set_section_contents): Likewise.
2791 2005-04-04 Eric Christopher <echristo@redhat.com>
2793 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents):
2794 Clean up gp handling code.
2796 2005-04-04 H.J. Lu <hongjiu.lu@intel.com>
2798 * elf.c (bfd_elf_set_group_contents): Ignore linker created
2800 (assign_section_numbers): Accept link_info. Check SHT_GROUP
2801 sections for relocatable files only. Remove the linker created
2803 (_bfd_elf_compute_section_file_positions): Pass link_info to
2804 assign_section_numbers.
2806 * elfxx-ia64.c (elfNN_ia64_object_p): New.
2807 (elf_backend_object_p): Defined.
2809 2005-04-04 H.J. Lu <hongjiu.lu@intel.com>
2811 * elf-bfd.h (elf_section_data): Use (sec) instead of sec.
2813 2005-04-03 Fred Fish <fnf@specifixinc.com>
2815 * dwarf2.c (struct dwarf2_debug): Add dwarf_ranges_buffer and
2816 dwarf_ranges_size members.
2817 (struct comp_unit): Add base_address member.
2818 (struct funcinfo): Replace low/high members with an arange.
2819 (arange_add): Replace incoming "unit" parameter with "abfd" and
2820 "first_arange" pointers. Reorganize/rewrite function body.
2821 (decode_line_info): Change arange_add call to pass bfd and arange
2823 (lookup_address_in_line_info_table): Use arange list instead of
2824 individual low/high members. Walk function's arange list to find
2825 lowest PC in list, to test for overlapping functions.
2826 (read_debug_ranges): New function, reads the debug_ranges section.
2827 (lookup_address_in_function_table): Use arange list instead of
2828 individual low/high members. Rewrite to find smallest range that
2830 (read_rangelist): Read a given rangelist from debug_ranges.
2831 (scan_unit_for_functions): Use arange list instead of individual
2832 low/high members. Handle a DW_AT_ranges attribute.
2833 (parse_comp_unit): Use arange list instead of individual low/high
2834 members. Save comp unit base address. Handle a DW_AT_ranges
2837 2005-04-01 H.J. Lu <hongjiu.lu@intel.com>
2839 * elf.c (assign_section_numbers): Really use the kept section.
2841 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
2843 * elf-bfd.h (_bfd_elf_check_kept_section): New.
2845 * elf.c (assign_section_numbers): When sh_link points to a
2846 discarded section, call _bfd_elf_check_kept_section to see if
2847 the kept section can be used. Otherwise reject sh_link
2848 pointing to discarded section.
2850 * elflink.c (_bfd_elf_check_kept_section): New.
2851 (elf_link_input_bfd): Use it.
2853 2005-04-01 Alan Modra <amodra@bigpond.net.au>
2855 * elf64-ppc.c (ppc64_elf_edit_toc): Account for dynamic relocs
2856 that we no longer need.
2858 2005-04-01 Alan Modra <amodra@bigpond.net.au>
2860 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return -1 on errors
2862 (ppc64_elf_check_relocs): Remove unnecessary SEC_ALLOC check.
2864 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
2866 * elf.c (assign_section_numbers): Fix a typo.
2868 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
2870 * elflink.c (elf_link_input_bfd): Remove the extra `\n' in
2872 (_bfd_elf_section_already_linked): Likewise.
2874 2005-03-31 Jerome Guitton <guitton@gnat.com>
2876 * config.in: Regenerate.
2878 2005-03-31 Jerome Guitton <guitton@gnat.com>
2880 * config.in (HAVE_DECL_BASENAME): New configure macro.
2881 * configure.in: Check for basename.
2882 * configure: Regenerate.
2884 2005-03-30 Julian Brown <julian@codesourcery.com>
2886 * bfd-in.h (bfd_is_arm_mapping_symbol_name): Rename from
2887 bfd_elf32_is_arm_mapping_symbol_name.
2888 * bfd-in2.h: Regenerate.
2889 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename from
2890 bfd_elf32_is_arm_mapping_symbol_name.
2891 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename
2892 bfd_elf32_is_arm_mapping_symbol_name to bfd_is_arm_mapping_symbol_name.
2893 (arm_elf_find_function): Likewise.
2894 (elf32_arm_output_symbol_hook): Likewise.
2896 2005-03-30 Julian Brown <julian@codesourcery.com>
2898 * bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
2899 * bfd-in2.h: Regenerate.
2900 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to
2901 bfd_elf32_is_arm_mapping_symbol_name.
2902 (elf32_arm_output_symbol_hook): Likewise.
2903 (arm_elf_find_function): Likewise, and include STT_NOTYPE in test for
2905 (is_arm_mapping_symbol_name): Function moved from here...
2906 * cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed
2909 2005-03-29 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
2911 * configure.in: Check for ffs decl and alphabetize.
2912 * config.in: Regenerate.
2913 * configure: Regenerate.
2914 * sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and alphabetize.
2916 2005-03-29 Fred Fish <fnf@specifixinc.com>
2918 * dwarf2.c (struct comp_unit): Fix typo.
2919 (scan_unit_for_functions): Remove unused local variable "name"
2920 and dead code that set it.
2922 2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
2923 Phil Blundell <philb@gnu.org>
2925 * bfd-in2.h, libbfd.h: Regenerated.
2926 * reloc.c: Add ARM TLS relocations.
2927 * elf32-arm.c (elf32_arm_howto_table): Add dynamic TLS
2929 (elf32_arm_tls_gd32_howto, elf32_arm_tls_ldo32_howto)
2930 (elf32_arm_tls_ldm32_howto, elf32_arm_tls_le32_howto)
2931 (elf32_arm_tls_ie32_howto): New.
2932 (elf32_arm_howto_from_type): Support TLS relocations.
2933 (elf32_arm_reloc_map): Likewise.
2934 (elf32_arm_reloc_type_lookup): Likewise.
2936 (struct elf32_arm_obj_tdata): New.
2937 (elf32_arm_tdata, elf32_arm_local_got_tls_type): Define.
2938 (elf32_arm_mkobject): New function.
2939 (struct elf32_arm_relocs_copied): Add pc_count.
2940 (elf32_arm_hash_entry, GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD)
2941 (GOT_TLS_IE): Define.
2942 (struct elf32_arm_link_hash_table): Add tls_ldm_got.
2943 (elf32_arm_link_hash_newfunc): Initialize tls_type.
2944 (elf32_arm_copy_indirect_symbol): Copy pc_count and tls_type.
2945 (elf32_arm_link_hash_table_create): Initialize tls_ldm_got.
2946 (dtpoff_base, tpoff): New functions.
2947 (elf32_arm_final_link_relocate): Handle TLS relocations.
2948 (IS_ARM_TLS_RELOC): Define.
2949 (elf32_arm_relocate_section): Warn about TLS mismatches.
2950 (elf32_arm_gc_sweep_hook): Handle TLS relocations and pc_count.
2951 (elf32_arm_check_relocs): Detect invalid symbol indexes. Handle
2952 TLS relocations and pc_count.
2953 (elf32_arm_adjust_dynamic_symbol): Check non_got_ref.
2954 (allocate_dynrelocs): Handle TLS. Bind REL32 relocs to local
2956 (elf32_arm_size_dynamic_sections): Handle TLS.
2957 (elf32_arm_finish_dynamic_symbol): Likewise.
2958 (bfd_elf32_mkobject): Define.
2960 2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
2962 * elf32-arm.c (elf32_arm_check_relocs): Increment count for all
2963 relocation types. Don't count relocations which will use a PLT.
2965 2005-03-29 Joel Brobecker <brobecker@gnat.com>
2967 * elf.c (elfcore_grok_nto_status): Print tid as long.
2968 (elfcore_grok_nto_regs): Likewise.
2970 2005-03-29 Joel Brobecker <brobecker@gnat.com>
2972 * irix-core.c: Remove some unnecessary prototypes.
2974 2005-03-28 Joel Brobecker <brobecker@adacore.com>
2976 * irix-core.c: Convert to ISO C.
2978 2005-03-28 Joel Brobecker <brobecker@adacore.com>
2980 * irix-core.c (do_sections): Replace + by | in expression.
2981 (irix_core_core_file_matches_executable_p): Add ATTRIBUTE_UNUSED
2982 to unused parameters to avoid a compiler warning.
2984 2005-03-28 Mark Kettenis <kettenis@gnu.org>
2986 * netbsd-core.c: Convert to ISO C. Fix formatting.
2988 2005-03-24 Eric Christopher <echristo@redhat.com>
2990 * elfxx-mips.c: Revert previous patch.
2992 2005-03-24 Nick Clifton <nickc@redhat.com>
2994 * targets.c (_bfd_target_vector): Only include the
2995 bfd_elf32_ia64_hpux_big_vec vector when building a 64-bit BFD with
2996 all targets enabled.
2998 2005-03-24 James E Wilson <wilson@specifixinc.com>
3000 * Makefile.am (BFD32_BACKENDS): Delete elf32-ia64.lo.
3001 (BFD64_BACKENDS): Add elf32-ia64.lo.
3002 * Makefile.in: Regenerate.
3004 2005-03-23 Eric Christopher <echristo@redhat.com>
3006 * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
3007 (mips_elf_calculate_relocation): Use. Define DF_TEXTREL
3008 after emitting relocation.
3009 (_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
3010 (_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
3013 2005-03-23 Mike Frysinger <vapier@gentoo.org>
3014 Nick Clifton <nickc@redhat.com>
3016 * config.bfd: Accept any C library to accompany a GNU Linux
3017 implementation, not just the GNU C library.
3018 * configure.in: Likewise.
3019 * configure: Regenerate.
3021 2005-03-22 H.J. Lu <hongjiu.lu@intel.com>
3023 * bfd-in.h (_bfd_elf_provide_symbol): New.
3024 * bfd-in2.h: Regenerated.
3026 * elf32-ppc.c (set_linker_sym): Moved to elflink.c.
3027 (ppc_elf_set_sdata_syms): Call _bfd_elf_provide_symbol instead
3030 * elflink.c (_bfd_elf_provide_symbol): New. Moved and renamed
3033 2005-03-22 Hans-Peter Nilsson <hp@axis.com>
3035 * hash.c (strtab_hash_newfunc): Fix typo in allocated size.
3037 2005-03-22 Bob Wilson <bob.wilson@acm.org>
3039 * xtensa-isa.c (xtensa_opcode_lookup, xtensa_state_lookup,
3040 xtensa_sysreg_lookup_name, xtensa_interface_lookup,
3041 xtensa_funcUnit_lookup): Skip bsearch call if count is zero.
3042 (xtensa_opcode_decode): Rearrange code.
3044 2005-03-22 Nick Clifton <nickc@redhat.com>
3046 * binary.c: Convert to ISO C90 formatting.
3047 * coff-arm.c: Convert to ISO C90 formatting.
3048 * coffgen.c: Convert to ISO C90 formatting.
3049 * elf32-gen.c: Convert to ISO C90 formatting.
3050 * elf64-gen.c: Convert to ISO C90 formatting.
3051 * hash.c: Convert to ISO C90 formatting.
3052 * ieee.c: Convert to ISO C90 formatting.
3054 2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
3056 * elf32-arm.c (elf32_arm_final_link_relocate): Don't fail for
3057 unresolved symbols in R_ARM_NONE relocations.
3059 2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
3061 * elf32-arm.c (elf32_arm_final_link_relocate): Add
3062 UNRESOLVED_RELOC_P argument. Set it appropriately.
3063 (elf32_arm_relocate_section): Update call to
3064 elf32_arm_final_link_relocate. Don't clobber RELOCATION; use
3065 unresolved_reloc instead.
3067 2005-03-23 Alan Modra <amodra@bigpond.net.au>
3069 * elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on
3070 .gnu.warning.* sections.
3072 2005-03-22 Alan Modra <amodra@bigpond.net.au>
3074 * elf32-ppc.c (elf_linker_section_pointers_t): Remove
3076 (ppc_elf_create_linker_section): Don't try to reuse existing section.
3077 (elf_create_pointer_linker_section): Delete info parm. Don't make
3078 h dynamic. Don't set written_address_p.
3079 (ppc_elf_check_relocs): Adjust ppc_elf_create_linker_section calls.
3080 (bfd_put_ptr): Delete.
3081 (elf_finish_pointer_linker_section): Remove output_bfd and info parms.
3082 Always write section contents. Assert global sym is def_regular.
3083 Use offset bottom bit as a written flag.
3084 (ppc_elf_relocate_section): Adjust elf_finish_pointer_linker_section
3087 2005-03-22 Alan Modra <amodra@bigpond.net.au>
3089 * elf32-ppc.c (ppc_elf_set_sdata_syms): New function, extracted from..
3090 (ppc_elf_set_sdata_syms): ..here. Expand comment. Set .sbss start
3093 2005-03-21 Nick Clifton <nickc@redhat.com>
3095 * coff-arm.c (coff_link_hash_entry): Only define for non WINCE
3097 (t2a1_bx_pc_insn): Likewise.
3098 (t2a2_noop_insn): Likewise.
3099 (t2a3_b_insn): Likewise.
3100 (t2a1_push_insn): Likewise.
3101 (t2a2_ldr_insn): Likewise.
3102 (t2a3_mov_insn): Likewise.
3103 (t2a4_bx_insn): Likewise.
3104 (t2a5_pop_insn): Likewise.
3105 (t2a6_bx_insn): Likewise.
3106 (coff_arm_relocate_section): Only declare the high_address
3107 variable for non WINCE targets.
3109 2005-03-22 Alan Modra <amodra@bigpond.net.au>
3111 * elf32-ppc.c (ppc_elf_add_symbol_hook): Make htab->sbss
3112 SEC_LINKER_CREATED. Attach to dynobj.
3113 (ppc_elf_size_dynamic_sections): Strip htab->sbss if zero size.
3115 2005-03-21 Alan Modra <amodra@bigpond.net.au>
3117 * elf32-ppc.c (struct elf_linker_section): Remove sym_hash and
3118 sym_offset. Add name, bss_name, sym_name, sym_val.
3119 (struct ppc_elf_link_hash_table): Remove sdata and sdata2 pointers.
3120 Add sdata array of elf_linker_section_t.
3121 (ppc_elf_link_hash_table_create): Set name, sym_name, and bss_name.
3122 (enum elf_linker_section_enum): Delete.
3123 (ppc_elf_create_linker_section): Rewrite. Don't create syms here.
3124 (ppc_elf_check_relocs): Delay ppc_elf_create_linker_section until
3125 the special sections are needed. Adjust htab->sdata refs.
3126 Ensure dynobj is set in sreloc code.
3127 (ppc_elf_size_dynamic_sections): Strip sdata sections.
3128 (ppc_elf_set_sdata_syms): New function.
3129 (elf_finish_pointer_linker_section): Use 0x8000 for sym_offset.
3130 (ppc_elf_relocate_section): Adjust references to htab->sdata. Use
3131 sym_val instead of sym_hash.
3132 * elf32-ppc.h (ppc_elf_set_sdata_syms): Declare.
3134 2005-03-21 Alan Modra <amodra@bigpond.net.au>
3136 * elf32-ppc.c (is_ppc_elf_target): Move to linker part of file.
3137 (ppc_elf_merge_private_bfd_data): Likewise.
3139 2005-03-21 Alan Modra <amodra@bigpond.net.au>
3141 * elf32-ppc.c (struct elf_linker_section): Remove rel_section.
3142 (ppc_elf_create_linker_section): Don't create rel_section.
3143 (elf_create_pointer_linker_section): Don't size relocs.
3144 (elf_finish_pointer_linker_section): Remove relative_reloc parm.
3145 Don't generate relocs.
3146 (ppc_elf_relocate_section): Adjust calls to
3147 elf_finish_pointer_linker_section.
3149 2005-03-21 Alan Modra <amodra@bigpond.net.au>
3151 * elf32-ppc.c (is_ppc_elf_target): New function.
3152 (ppc_elf_merge_private_bfd_data): Use it rather than just testing
3153 for bfd_target_elf_flavour. Do this test before endian check.
3154 (ppc_elf_add_symbol_hook): Use is_pcc_elf_target.
3155 (ppc_elf_size_dynamic_sections): Likewise.
3157 2005-03-20 H.J. Lu <hongjiu.lu@intel.com>
3159 * elf-bfd.h (elf_backend_data): Add int to
3160 elf_backend_section_from_shdr.
3161 (bfd_elf_section_data): Update comment for this_idx.
3162 (_bfd_elf_make_section_from_shdr): Add int.
3163 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
3165 * elf.c (_bfd_elf_make_section_from_shdr): Take section index
3166 and use it to set this_idx in bfd_elf_section_data.
3167 (bfd_section_from_shdr): Pass shindex to
3168 _bfd_elf_make_section_from_shdr.
3169 (_bfd_elf_section_from_bfd_section): Use this_idx in
3170 bfd_elf_section_data to find section index.
3172 * elf32-arm.c (elf32_arm_section_from_shdr): Take section
3173 index and pass it to _bfd_elf_make_section_from_shdr.
3174 * elf32-i370.c(i370_elf_section_from_shdr): Likewise.
3175 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
3176 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
3177 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
3178 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
3179 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
3180 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): Likewise.
3181 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
3182 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
3184 2005-03-19 Danny Smith <dannysmith@users.sourceforge.net>
3185 Ross Ridge <rridge@csclub.uwaterloo.ca>
3187 * peicode.h (pe_ILF_build_a_bfd): Strip only one prefix
3188 character in IMPORT_NAME_UNDECORATE and IMPORT_NAME_NOPREFIX
3191 2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
3193 * elflink.c (elf_mark_used_section): Remove check for special
3196 2005-03-18 Andreas Schwab <schwab@suse.de>
3198 * elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
3199 from bfd_vma to ia64_insn, remove broken cast.
3201 2005-03-18 C Jaiprakash <cjaiprakash@noida.hcltech.com>
3203 * elf32-m68k.c (elf_cfv4e_plt0_entry): plt entry for coldfire v4e.
3204 (elf_m68k_adjust_dynamic_symbol,elf_m68k_finish_dynamic_symbol,
3205 elf_m68k_finish_dynamic_sections): Use it.
3207 2005-03-17 Paul Brook <paul@codesourcery.com>
3208 Dan Jacobowitz <dan@codesourcery.com>
3209 Mark Mitchell <mark@codesourcery.com>
3211 * elf32-arm.c (elf32_arm_modify_segment_map): New function.
3212 (elf32_arm_additional_program_headers): Likewise.
3213 (elf_backend_modify_segment_map): Define.
3214 (elf_backend_additional_program_headers): Likewise.
3215 (elf32_arm_symbian_modify_segment_map): Use
3216 elf32_arm_modify_segment_map.
3218 2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
3220 * elflink.c (elf_mark_used_section): Check bfd_is_const_section
3221 for special sections.
3223 2005-03-18 Alan Modra <amodra@bigpond.net.au>
3225 * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
3226 * elflink.c (_bfd_elf_link_renumber_dynsyms): Make static, add
3227 section_sym_count param, and return number of section symbols.
3228 (bfd_elf_size_dynamic_sections): Clear section symbol area of
3229 .dynsym contents. Don't bother calling swap_symbol_out on the
3230 first all-zero dynsym.
3231 (elf_mark_used_section): Formatting. Avoid twiddling flags in
3232 special sections like bfd_abs_section.
3233 (bfd_elf_gc_sections): Spelling fix.
3235 2005-03-16 Fred Fish <fnf@specifixinc.com>
3238 * dwarf2.c (read_indirect_string): Fix apparent typo, check
3239 dwarf_str_buffer allocation, not dwarf_abbrev_buffer.
3241 2005-03-16 H.J. Lu <hongjiu.lu@intel.com>
3243 * elflink.c (elf_mark_used_section): New.
3244 (bfd_elf_gc_sections): Call elf_gc_mark_section for
3245 non-relocatable link if we don't do GC.
3247 2005-03-16 Nick Clifton <nickc@redhat.com>
3248 Ben Elliston <bje@au.ibm.com>
3250 * configure.in (werror): New switch: Add -Werror to the
3251 compiler command line. Enabled by default. Disable via
3253 * configure: Regenerate.
3255 2005-03-16 Nick Clifton <nickc@redhat.com>
3257 * ecoff.c: Convert to ISO C90 formatting.
3259 2005-03-16 Alan Modra <amodra@bigpond.net.au>
3261 * elf32-ppc.c: Divide file into general and linker specific
3262 functions. Sort linker functions into roughly the order in which
3263 they are called by the ELF linker code.
3265 2005-03-16 Alan Modra <amodra@bigpond.net.au>
3267 * elf32-ppc.c (ppc_elf_create_linker_section): Set SEC_LINKER_CREATED
3268 on section. Correct comment, and add FIXME.
3269 (ppc_elf_additional_program_headers): Don't bump header count for
3270 interp. Test SEC_ALLOC, not SEC_LOAD, and don't test size.
3271 (ppc_elf_size_dynamic_sections): Don't strip sdata and sdata2, but
3272 do allocate memory if they need it.
3274 2005-03-15 Mikkel Krautz <krautz@gmail.com>
3276 * config.bfd (x86_64-elf): Add target.
3278 2005-03-15 Alan Modra <amodra@bigpond.net.au>
3280 * po/es.po: Commit new Spanish translation.
3282 2005-03-14 H.J. Lu <hongjiu.lu@intel.com>
3284 * elfxx-ia64.c (elfNN_ia64_relocate_section): Set symbo name
3285 for global symbol when reporting overflow.
3287 2005-03-11 Jakub Jelinek <jakub@redhat.com>
3289 * libbfd-in.h (_bfd_ar_spacepad): New prototype.
3290 * libbfd.h: Rebuilt.
3291 * archive.c (_bfd_ar_spacepad): New function.
3292 (_bfd_construct_extended_name_table, _bfd_write_archive_contents,
3293 bsd_write_armap, _bfd_archive_bsd_update_armap_timestamp,
3294 coff_write_armap): Use it.
3295 (bfd_ar_hdr_from_filesystem): Likewise. Fix HP-UX large
3297 * archive64.c (bfd_elf64_archive_write_armap): Use _bfd_ar_spacepad.
3299 2005-03-10 Mark Kettenis <kettenis@gnu.org>
3301 * archive.c (_bfd_look_for_bfd_in_cache): Move declaration of
3302 has_table to the start of the function.
3304 2005-03-10 Ben Elliston <bje@au.ibm.com>
3306 * archive.c: Include hashtab.h.
3307 (struct ar_cache): Rename `arelt' to `arbfd' and remove `next'.
3308 (_bfd_look_for_bfd_in_cache): Reimplement using htab_find.
3309 (hash_file_ptr): New function.
3310 (eq_file_ptr): Likewise.
3311 (_bfd_add_bfd_to_archive_cache): Reimplement using a hash table.
3312 * libbfd-in.h: Include hashtab.h.
3313 (struct artdata): Change `cache' member type to htab_t.
3314 * libbfd.h: Rebuild.
3316 2005-03-08 Daniel Jacobowitz <dan@codesourcery.com>
3318 * configure.in: Bump version to 2.16.90.
3319 * configure: Regenerated.
3321 2005-03-07 Jakub Jelinek <jakub@redhat.com>
3323 * opncls.c (opncls_bread, opncls_bclose): Fix if pread resp.
3324 close is a function like macro in system headers.
3326 2005-03-07 Alan Modra <amodra@bigpond.net.au>
3329 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Reinstate
3330 _GLOBAL_OFFSET_TABLE_ as a normal dynamic symbol.
3332 2005-03-06 Alan Modra <amodra@bigpond.net.au>
3334 * elf.c (elfcore_grok_win32pstatus): Warning fixes.
3336 2005-03-05 Alan Modra <amodra@bigpond.net.au>
3338 * po/bfd.pot: Regenerate.
3340 2005-03-05 Alan Modra <amodra@bigpond.net.au>
3342 * elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
3344 (func_desc_adjust): Force dot-syms local in executables as well
3347 2005-03-04 David Daney <ddaney@avtrex.com>
3349 * elfxx-mips.c (mips_elf_calculate_relocation): Handle special
3350 '__gnu_local_gp' symbol used by gas -mno-shared.
3352 2005-03-03 H.J. Lu <hongjiu.lu@intel.com>
3354 * elf-bfd.h (elf_backend_data): Add "const char *" to
3355 elf_backend_section_from_phdr.
3357 * elf.c (bfd_section_from_phdr): Pass "proc" to the
3358 elf_backend_section_from_phdr hook.
3360 2005-03-02 Daniel Jacobowitz <dan@codesourcery.com>
3361 Joseph Myers <joseph@codesourcery.com>
3363 * elfxx-mips.c (struct mips_got_entry): Add tls_type.
3364 (struct mips_got_info): Add tls_gotno, tls_assigned_gotno,
3366 (struct mips_elf_got_per_bfd_arg): Add global_count.
3367 (struct mips_elf_count_tls_arg): New.
3368 (struct mips_elf_hash_sort_data): Update comment for min_got_dynindx.
3369 (struct mips_elf_link_hash_entry): Add tls_type and tls_got_offset.
3370 (GOT_NORMAL, GOT_TLS_GD, GOT_TLS_LDM, GOT_TLS_IE)
3371 (GOT_TLS_OFFSET_DONE, GOT_TLS_DONE): Define.
3372 (TLS_RELOC_P): Define.
3373 (TP_OFFSET, DTP_OFFSET): Define.
3374 (dtprel_base, tprel_base): New functions.
3375 (mips_elf_link_hash_newfunc): Initialize tls_type.
3376 (mips_elf_got_entry_hash, mips_elf_got_entry_eq)
3377 (mips_elf_multi_got_entry_hash, mips_elf_multi_got_entry_eq): Handle
3379 (mips_tls_got_relocs, mips_elf_count_local_tls_relocs)
3380 (mips_elf_count_global_tls_entries, mips_elf_count_global_tls_relocs)
3381 (mips_elf_output_dynamic_relocation, mips_elf_initialize_tls_slots)
3382 (mips_tls_got_index): New functions.
3383 (mips_elf_local_got_index): Add new R_SYMNDX, H, and R_TYPE
3384 arguments. Pass them to mips_elf_create_local_got_entry. Use
3386 (mips_elf_global_got_index): Add new R_TYPE and INFO arguments.
3388 (mips_elf_got_page, mips_elf_got16_entry): Update calls to
3389 mips_elf_create_local_got_entry.
3390 (mips_elf_create_local_got_entry): Add new R_SYMNDX, H, and R_TYPE
3391 arguments. Handle TLS entries.
3392 (mips_elf_sort_hash_table_f): Add non-TLS assertions.
3393 (mips_elf_record_local_got_symbol): Add new TLS_FLAG argument. Handle
3395 (mips_elf_record_global_got_symbol): Likewise.
3396 (mips_elf_make_got_per_bfd): Initialize new mips_got_info members.
3398 (mips_elf_merge_gots): Handle TLS entries when merging.
3399 (mips_elf_initialize_tls_index): New function.
3400 (mips_elf_set_global_got_offset): Handle TLS entries.
3401 (mips_elf_adjust_gp): Handle TLS.
3402 (mips_elf_multi_got): Remove redundant call to
3403 mips_elf_resolve_final_got_entries. Initialize global_count.
3404 Correct a comment. Initialize new TLS members of mips_got_info.
3405 Assign TLS GOT indexes for new GOTs.
3406 (mips_elf_create_got_section): Initialize new TLS members of
3408 (mips_elf_calculate_relocation): Handle TLS relocs.
3409 (_bfd_mips_elf_check_relocs): Likewise. Update calls to changed
3411 (_bfd_mips_elf_always_size_sections): Handle TLS.
3412 (_bfd_mips_elf_size_dynamic_sections): Likewise.
3413 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Update calls to
3415 (_bfd_mips_elf_copy_indirect_symbol): Copy tls_type.
3416 (_bfd_mips_elf_hide_symbol): Handle TLS.
3417 * elfn32-mips.c (elf_mips_howto_table_rel, elf_mips_howto_table_rela)
3418 (mips_reloc_map): Add TLS relocs.
3419 * elf32-mips.c (elf_mips_howto_table_rel, mips_reloc_map): Likewise.
3420 * elf64-mips.c (mips_elf64_howto_table_rel)
3421 (mips_elf64_howto_table_rela, mips_reloc_map): Likewise.
3422 * reloc.c: Define new MIPS TLS relocations.
3423 * libbfd.h, bfd-in2.h: Regenerated.
3425 2005-03-02 Jan Beulich <jbeulich@novell.com>
3427 * Makefile.am: Add dependency of cache.o on libiberty.h.
3428 * cache.c: Include libiberty.h.
3429 (bfd_open_file): Use unlink_if_ordinary instead of unlink.
3431 2005-03-01 Zack Weinberg <zack@codesourcery.com>
3433 * elf.c (bfd_section_from_shdr <default case>): Call
3434 elf_backend_section_from_shdr hook unconditionally, and return
3436 (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr.
3437 * elfxx-target.h (elf_backend_section_from_shdr)
3438 (elf_backend_section_from_phdr): Default to
3439 _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr
3442 2005-03-01 Alan Modra <amodra@bigpond.net.au>
3444 * targets.h: Typo fix.
3445 * bfd-in2.h: Regenerate.
3447 * bout.c (b_out_write_object_contents): Don't use sizeof on host
3448 structs to size on-disk structures.
3449 (b_out_set_section_contents): Size the external struct, not the
3450 internal one for on-disk size.
3451 (b_out_sizeof_headers): Likewise.
3453 2005-03-01 Alan Modra <amodra@bigpond.net.au>
3455 * elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
3456 entry points with the func descriptor as well as undefweak.
3458 2005-02-28 Ross Ridge <rridge@csclub.uwaterloo.ca>
3460 * peicode.h (pe_ILF_build_a_bfd): Do not assume that an @ will be
3461 present when IMPORT_NAME_UNDOECRATE is used.
3463 2005-02-28 H.J. Lu <hongjiu.lu@intel.com>
3466 * elf-bfd.h (_bfd_elf_merge_symbol): Add a pointer to unsigned
3469 * elf32-sh-symbian.c (sh_symbian_relocate_section): Pass NULL
3470 to _bfd_elf_merge_symbol.
3472 * elflink.c (_bfd_elf_merge_symbol): Use the pointer to
3473 unsigned int to return the alignment of the old common symbol
3474 in the dynamic object.
3475 (_bfd_elf_add_default_symbol): Pass NULL to
3476 _bfd_elf_merge_symbol.
3477 (elf_link_add_object_symbols): Pass &old_alignment to
3478 _bfd_elf_merge_symbol. Get the alignment of the new common
3479 symbol in the dynamic object.
3481 2005-02-24 Ben Elliston <bje@au.ibm.com>
3483 * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
3484 * format.c (bfd_check_format_matches): Likewise.
3485 * archive.c (BFD_GNU960_ARMAG): Likewise.
3486 (bfd_generic_archive_p): Likewise.
3487 (_bfd_write_archive_contents): Likewise.
3489 2005-02-24 H.J. Lu <hongjiu.lu@intel.com>
3491 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.95.
3492 * configure: Regenerate.
3494 2005-02-24 Julian Brown <julian@sirius.codesourcery.com>
3496 * elflink.c (elf_link_add_object_symbols): Force symbols in discarded
3497 COMDAT group sections to have default visibility.
3499 2005-02-24 Alan Modra <amodra@bigpond.net.au>
3501 * coffcode.h (coff_print_aux): Warning fix.
3502 * elf-m10300.c (mn10300_elf_relax_section): Use section->id
3503 instead of section pointer to identify.
3504 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise. Allocate
3505 the correct size buffer for local sym mangling too.
3506 (h8300_bfd_link_add_symbols): Likewise.
3507 * elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix
3509 * elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message
3510 * elf32-xtensa.c (literal_value_hash): Warning fix.
3511 * versados.c (process_otr): Warning fix.
3512 (versados_canonicalize_reloc): Likewise.
3513 * vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix.
3514 * vms.c (fill_section_ptr): Warning fix.
3516 2005-02-23 H.J. Lu <hongjiu.lu@intel.com>
3518 * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
3519 * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Likewise.
3521 2005-02-23 Nick Clifton <nickc@redhat.com>
3523 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Initialise
3524 the relvaddr field of the Elf32_crinfo structure.
3526 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise
3527 variables that are passed by reference to
3528 m68hc11_get_relocation_value in case that function does not
3531 * elf32-cr16c.c (cr16c_elf_final_link_relocate): Remove duplicated
3532 return statements and replace with a single return at the end of
3533 the function. This helps pacify the flow analysis code in gcc 4.0.
3535 * elf.c (_bfd_elf_compute_section_file_positions): Initialise
3536 strtab to avoid compile time warning.
3538 2005-02-23 Ben Elliston <bje@au.ibm.com>
3540 * opncls.c (bfd_zalloc): Document this function.
3542 2005-02-21 H.J. Lu <hongjiu.lu@intel.com>
3544 * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
3545 SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
3546 Replace SEC_SHARED with SEC_COFF_SHARED.
3547 (styp_to_sec_flags): Likewise.
3549 * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
3550 (TARGET_LITTLE_SYM): Likewise.
3552 * section.c (SEC_ARCH_BIT_0): Removed.
3553 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
3554 SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
3555 (SEC_SHARED): Renamed to ...
3556 (SEC_COFF_SHARED): This.
3557 (SEC_BLOCK): Renamed to ...
3558 (SEC_TIC54X_BLOCK): This.
3559 (SEC_CLINK): Renamed to ...
3560 (SEC_TIC54X_CLINK): This.
3561 (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
3562 SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
3564 * bfd-in2.h: Regenerated.
3566 2005-02-21 Fred Fish <fnf@specifixinc.com>
3568 * dwarf2.c (find_abstract_instance_name): Call recursively
3569 to handle a DW_AT_specification.
3571 2005-02-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3573 * elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
3574 mips_elf_create_dynamic_relocation,
3575 _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
3576 Remove #if 0'd code.
3578 2005-02-21 Alan Modra <amodra@bigpond.net.au>
3580 * Makefile.am: Run "make dep-am"
3581 * Makefile.in: Regenerate.
3583 2005-02-21 Alan Modra <amodra@bigpond.net.au>
3585 * coffgen.c (bfd_coff_get_comdat_section): Check that
3586 coff_section_data isn't NULL.
3588 2005-02-21 Alan Modra <amodra@bigpond.net.au>
3590 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
3591 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
3592 * coff-rs6000.c (xcoff_write_armap_big): Warning fixes. Remove
3593 useless assignments.
3594 (xcoff_write_archive_contents_big): Likewise.
3595 (_bfd_xcoff_put_ldsymbol_name): Likewise.
3596 * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
3597 * coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
3598 * cofflink.c (process_embedded_commands): Warning fixes.
3599 * cpu-arm.c: Delete unnecessary prototypes. Convert to C90.
3601 * dwarf2.c: Warning fixes.
3602 * elf-bfd.h: Likewise.
3603 * elf-eh-frame.c: Likewise.
3604 * elf-strtab.c: Likewise.
3606 * elf32-m68k.c: Likewise.
3607 * elf32-ppc.c: Likewise.
3608 * elf32-sh-symbian.c: Likewise.
3609 * elf32-sh.c: Delete unnecessary prototypes. Warning fixes.
3610 * elf64-sh64.c: Likewise.
3611 * peicode.h: Likewise.
3612 * elf64-mmix.c: Warning fixes.
3613 * elfcode.h: Likewise.
3614 * elfxx-mips.c: Likewise.
3615 * libbfd-in.h: Likewise.
3616 * libbfd.c: Likewise.
3617 * mach-o.c: Likewise.
3618 * merge.c: Likewise.
3620 * opncls.c: Likewise.
3623 * vms-hdr.c: Likewise.
3624 * vms-tir.c: Likewise.
3625 * xtensa-isa.c: Likewise.
3626 * xtensa-modules.c: Likewise.
3628 (pstrcmp): Use correct choice of string lengths. Fix return value.
3629 (bfd_sym_module_name): Correct string length.
3630 * bfd-in2.h: Regenerate.
3631 * libbfd.h: Regenerate.
3633 2005-02-17 Alexandre Oliva <aoliva@redhat.com>
3635 * elf32-frv.c (elf32_frv_relocate_section): Remove warning from
3636 uninitialized check_segment[1] in TLSMOFF case.
3637 Reported by Alan Modra.
3638 (elf32_frv_relocate_section): Improve errors and warnings.
3640 2005-02-17 Alan Modra <amodra@bigpond.net.au>
3642 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Fix warning.
3644 2005-02-16 Alan Modra <amodra@bigpond.net.au>
3646 * coff-arm.c (coff_arm_is_local_label_name): Warning fix.
3647 * elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
3648 * pef.c (bfd_pef_scan): Don't ignore return value of
3649 bfd_pef_scan_start_address.
3650 * mach-o.c (bfd_mach_o_scan): Don't ignore return value of
3651 bfd_mach_o_scan_start_address.
3652 * elfxx-ia64.c (elfNN_ia64_relax_brl): Rewrite for 32-bit bfd_vma.
3653 * elfxx-mips.c: Remove unnecessary prototypes.
3654 (sort_dynamic_relocs_64): Abort if not BFD64.
3656 2005-02-16 Alan Modra <amodra@bigpond.net.au>
3658 * elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
3659 Skip toc reloc adjust if reloc_count is zero.
3661 2005-02-15 Nigel Stephens <nigel@mips.com>
3662 Maciej W. Rozycki <macro@mips.com>
3664 * elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
3665 reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
3666 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
3667 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
3668 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
3670 (mips16_gprel_reloc): Remove bit shuffling; call
3671 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
3672 and _bfd_mips16_elf_reloc_shuffle() instead.
3673 (mips16_reloc_map): New reloc map for MIPS16 relocs.
3674 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
3676 (mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
3677 elf_mips16_howto_table_rel.
3678 * elf64-mips.c (mips16_elf64_howto_table_rel): New array for
3679 MIPS16 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16
3680 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
3681 (elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
3682 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
3684 (mips16_elf64_howto_table_rela): New array for MIPS16 RELA
3685 reloc howtos. Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
3686 R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
3688 (mips16_gprel_reloc): Remove bit shuffling; call
3689 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
3690 and _bfd_mips16_elf_reloc_shuffle() instead.
3691 (mips16_reloc_map): New reloc map for MIPS16 relocs.
3692 (bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
3694 (mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
3695 mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
3696 * elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
3697 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
3698 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
3699 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
3700 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
3702 (mips16_gprel_reloc): Remove bit shuffling; call
3703 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
3704 and _bfd_mips16_elf_reloc_shuffle() instead.
3705 (mips16_reloc_map): New reloc map for MIPS16 relocs.
3706 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
3708 (mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
3709 elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
3710 * elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
3711 handle bit shuffling for MIPS16 relocs.
3712 (_bfd_mips16_elf_reloc_shuffle): Likewise.
3713 (_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
3714 and _bfd_mips16_elf_reloc_shuffle().
3715 (_bfd_mips_elf_generic_reloc): Likewise.
3716 (mips_elf_calculate_relocation): Likewise. Handle R_MIPS16_HI16
3718 (mips_elf_obtain_contents): Remove bit shuffling.
3719 (mips_elf_perform_relocation): Likewise; call
3720 _bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
3722 (_bfd_mips_elf_relocate_section): Likewise. Handle R_MIPS16_HI16
3724 * elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
3725 (_bfd_mips16_elf_reloc_shuffle): Likewise.
3726 * reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
3727 (BFD_RELOC_MIPS16_HI16_S): Likewise.
3728 (BFD_RELOC_MIPS16_LO16): Likewise.
3729 * bfd-in2.h: Regenerate.
3730 * libbfd.h: Regenerate.
3732 2005-02-15 Jan Beulich <jbeulich@novell.com>
3734 * elfxx-ia64.c (ia64_howto_table): Correct strings for
3735 R_IA64_DTPMOD64[LM]SB.
3737 2005-02-14 H.J. Lu <hongjiu.lu@intel.com>
3739 * elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
3740 backward branch in the same section.
3741 (elfNN_ia64_relocate_section): Inform users that the input
3742 section is too big to relax br instruction when overflow
3743 happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
3744 and R_IA64_PCREL21F.
3746 2005-02-14 Orjan Friberg <orjanf@axis.com>
3748 * elfcore.h (elf_core_file_p): Move the call to
3749 elf_backend_object_p to allow the correct machine to be set before
3750 processing the program headers.
3752 2005-02-14 Nick Clifton <nickc@redhat.com>
3755 * peicode.h (pe_bfd_copy_private_bfd_data): Copy the large address
3756 aware flag from the input bfd to the output bfd.
3758 2005-02-11 Maciej W. Rozycki <macro@mips.com>
3760 * elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
3761 R_MIPS_LITERAL relocations for external symbols.
3762 * elf64-mips.c (mips_elf64_literal_reloc): Likewise.
3763 * elfn32-mips.c (mips_elf_literal_reloc): Likewise.
3765 2005-02-11 H.J. Lu <hongjiu.lu@intel.com>
3767 * bfd-in2.h: Rebuilt.
3769 2005-02-11 Paul Brook <paul@codesourcery.com>
3771 * elf-bfd.h (struct elf_link_hash_table): Add
3772 is_relocatable_executable.
3773 * elf.c (_bfd_elf_link_hash_table_init): Initialize it.
3774 * elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
3775 symbols in relocatable executables.
3776 (bfd_elf_record_link_assignment): Create dynamic section symbols in
3777 relocatable executables.
3778 (_bfd_elf_link_renumber_dynsyms): Ditto.
3779 (bfd_elf_final_link): Ditto.
3780 * elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
3781 relocations into relocatable executables.
3782 (elf32_arm_check_relocs): Crate dynamic sections for relocatable
3783 executables. Also copy absolute relocations.
3784 (elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
3785 in relocatable executables.
3786 (allocate_dynrelocs): Copy relocations for relocatable executables.
3787 Output dynamic symbols for symbols defined in linker scripts.
3789 2005-02-11 Nick Clifton <nickc@redhat.com>
3791 * libbfd.c (read_signed_leb128): Use an unsigned type for 'shift'
3792 to avoid a compile time warning.
3794 * coff-alpha.c (alpha_adjust_reloc_in): Remove redundant test from
3797 * coff-tic4x.c (coff_rtype_to_howto): Move definition before
3798 inclusion of coffcode.h so that it is actually picked up.
3800 * coffcode.h (coff_std_swap_table): Add an unused attribute in
3801 case it is not used.
3803 * elf32-ip2k.c (ip2k_call_opcode, IS_CALL_OPCODE): Remove unused
3804 structure and macro.
3806 * elf32-iq2000.c (iq2000_reloc_map): Remove unused structure and
3809 * elf32-m32r.c (m32r_reloc_map_old): Use #ifdef USE_M32R_OLD_RELOC
3810 to protect the declaration of this array.
3812 * xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
3813 Avoid call to memcpy with a size of 0.
3815 2005-02-12 Alan Modra <amodra@bigpond.net.au>
3817 * elf64-ppc.c (toc_adjusting_stub_needed): Return true for
3818 old-style branches to undefined dot-symbols which will be
3819 satisfied by a plt call.
3821 2005-02-11 Alan Modra <amodra@bigpond.net.au>
3823 * elf64-ppc.c (move_plt_plist): New function, extracted from..
3824 (ppc64_elf_copy_indirect_symbol): ..here.
3825 (func_desc_adjust): Use move_plt_plist.
3827 2005-02-10 Paul Brook <paul@codesourcery.com>
3829 * elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
3831 2005-02-10 Paul Brook <paul@codesourcery.com>
3833 * elflink.c (bfd_elf_record_link_assignment): Make hidden and internal
3835 (elf_link_renumber_hash_table_dynsyms): Ignore local symbols.
3836 (elf_link_renumber_local_hash_table_dynsyms): New function.
3837 (_bfd_elf_link_renumber_dynsyms): Number local dynamic symbols.
3839 2005-02-10 Jakub Jelinek <jakub@redhat.com>
3841 * bfd-in.h (BFD_LINKER_CREATED): Define.
3842 * bfd-in2.h: Rebuilt.
3843 * elflink.c (bfd_elf_size_dynamic_sections): Disregard
3844 BFD_LINKER_CREATED bfds when determining input bfds without
3845 .note.GNU-stack section.
3847 2005-02-10 Maciej W. Rozycki <macro@mips.com>
3849 * elf64-mips.c (mips16_gprel_reloc): Update a comment.
3850 * elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
3851 relocations against external symbols unchanged.
3853 2005-02-08 Paul Brook <paul@codesourcery.com>
3855 * elflink.c (elf_link_input_bfd): Ignore symbols from null input
3858 2005-02-08 Hans-Peter Nilsson <hp@axis.com>
3860 * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
3863 2005-02-07 Maciej W. Rozycki <macro@mips.com>
3865 * elf64-mips.c: Fix formatting throughout.
3867 2005-02-07 Maciej W. Rozycki <macro@mips.com>
3869 * elfn32-mips.c (elf_mips_howto_table_rela): Fix a comment typo.
3871 2005-02-07 Alexandre Oliva <aoliva@redhat.com>
3873 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove special handling for
3874 *ABS*/*UND* sections.
3875 (elf32_frv_relocate_section): Move zero-addend-required error...
3876 (_frv_emit_got_relocs_plt_entries): ... here. Report error for
3877 missing needed TLS section.
3879 2005-02-07 Hans-Peter Nilsson <hp@axis.com>
3881 * aoutx.h (NAME(aout,find_nearest_line)): Correct case for N_SO
3882 being the last symbol.
3883 (aout_link_add_symbols): Just return TRUE if a warning
3886 2005-02-07 Maciej W. Rozycki <macro@mips.com>
3888 * elf32-mips.c (mips_elf_gprel32_reloc): Reject
3889 R_MIPS_GPREL32 relocations against external symbols.
3890 * elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
3893 2005-02-07 Alan Modra <amodra@bigpond.net.au>
3895 * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
3896 * elf.c (bfd_elf_string_from_elf_section): Expand occurrence of
3897 elf_string_from_elf_strtab.
3898 (_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise.
3899 (bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too
3900 if it exists. Don't do the reverse for SHT_SYMTAB_SHNDX. For
3901 SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by
3902 looking at cached symtab info first, before iterating over headers.
3903 For SHT_REL and SHT_RELA, load dynsymtab if needed.
3904 * elfcode.h (elf_object_p): Don't load section header stringtab
3907 2005-02-06 H.J. Lu <hongjiu.lu@intel.com>
3909 * elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
3910 against protected function when building shared library.
3913 * elf64-x86-64.c (is_32bit_relative_branch): New.
3914 (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
3915 protected function symbol when building shared library for
3916 32bit relative branch instruction.
3918 2005-02-06 Alan Modra <amodra@bigpond.net.au>
3920 * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptor
3921 syms when doing a relocatable link.
3922 (ppc64_elf_gc_mark_hook): Check that syms are defined before looking
3924 (ppc64_elf_tls_setup): Likewise.
3925 (ppc64_elf_edit_opd): Don't use an undefined func desc sym.
3927 2005-02-04 Alan Modra <amodra@bigpond.net.au>
3929 * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".
3930 (link_hash_newfunc): Clear all locals using memset.
3931 (make_fdh): Remove flags param. Always create fake func desc
3932 weak. Link the descriptor with the code entry sym.
3933 (ppc64_elf_archive_symbol_lookup): Don't return fake syms.
3934 (add_symbol_adjust): Adjust make_fdh call.
3935 (func_desc_adjust): Likewise. Twiddle any pre-existing fake
3936 descriptor to strong undefined if code entry is strong.
3938 2005-02-04 Alan Modra <amodra@bigpond.net.au>
3940 * elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
3941 lookup here. Set to new before calling bfd_link_repair_undef_list.
3942 (elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
3944 2005-02-03 Alan Modra <amodra@bigpond.net.au>
3946 * linker.c (_bfd_link_hash_newfunc): Set all local fields.
3948 2005-02-03 Alan Modra <amodra@bigpond.net.au>
3950 * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
3951 * elflink.c (elf_smash_syms): Restore symbols that were undefweak
3952 before the as-needed lib was loaded. Abort on unexpected refs.
3954 2005-02-02 Alan Modra <amodra@bigpond.net.au>
3956 * elflink.c (elf_smash_syms): Expand comments.
3957 (elf_link_add_object_symbols): Only call elf_smash_syms for
3958 as-needed dynamic objects.
3960 * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear
3961 everything, just the field specific to ia64.
3962 * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise.
3964 2005-02-01 Alan Modra <amodra@bigpond.net.au>
3966 * elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to..
3967 (make_fdh): ..here. New function. Don't set BSF_OBJECT for
3969 (struct add_symbol_adjust_data): New.
3970 (add_symbol_adjust): Make an undefweak func desc for old ABI
3971 objects to link with --as-needed shared libs. Return fail status.
3972 Don't adjust old ABI func entry sym to weak if func desc syms
3974 (ppc64_elf_check_directives): Adjust call to add_symbol_adjust,
3977 2005-02-01 Hans-Peter Nilsson <hp@axis.com>
3979 * cpu-cris.c (get_compatible): Rearrange disabled code and comment
3982 2005-02-01 Alan Modra <amodra@bigpond.net.au>
3984 * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup..
3985 * linker.c (bfd_link_repair_undef_list): ..to new function, but don't
3986 remove anything but new and undefweak.
3987 * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any
3989 (_bfd_elf_create_dynamic_sections): Formatting.
3990 (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list.
3991 (_bfd_elf_merge_symbol): Don't handle as-needed syms here.
3992 (struct elf_smash_data): New.
3993 (elf_smash_syms): New function.
3994 (elf_link_add_object_symbols): Call elf_smash_syms. Don't add
3995 unneeded dynamic objects to loaded list.
3996 (elf_link_output_extsym): Don't handle as-needed here. Strip
3997 bfd_link_hash_new symbols.
3998 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
3999 delref when dynindx is already -1.
4000 * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new
4002 * elfxx-mips.c (mips_elf_output_extsym): Likewise.
4004 2005-02-01 Ben Elliston <bje@au.ibm.com>
4006 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.
4008 2005-02-01 Ben Elliston <bje@au.ibm.com>
4010 * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
4011 bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
4012 coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
4013 coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
4014 cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
4015 elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
4016 elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
4017 elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
4018 i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
4019 nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
4020 pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
4021 sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c,
4022 hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
4023 throughout. Similarly, collapse #if 1'd code.
4025 2005-02-01 Ben Elliston <bje@au.ibm.com>
4027 * elf-bfd.h (bfd_elf_discard_group): Remove.
4028 * elf.c (bfd_elf_discard_group): Likewise.
4029 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
4031 2005-01-31 Richard Sandiford <rsandifo@redhat.com>
4033 * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
4034 (_bfd_elf_eh_frame_address_size): Declare.
4035 * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
4036 (elfNN_bed): Initialize elf_backend_eh_frame_address_size.
4037 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
4038 (elf_backend_eh_frame_address_size): Define.
4039 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
4040 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
4041 size from the new backend hook.
4042 (_bfd_elf_write_section_eh_frame): Likewise.
4043 (_bfd_elf_eh_frame_address_size): New function.
4045 2005-01-31 Andrew Cagney <cagney@gnu.org>
4047 * configure: Regenerate to track ../gettext.m4.
4049 2005-01-31 Mark Mitchell <mark@codesourcery.com>
4051 * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
4052 SHF_WRITE for .init_array, .fini_array, and .preinit_array.
4054 2005-01-31 Nick Clifton <nickc@redhat.com>
4056 * confg.bfd: Make targets scheduled for obsoletion (m68k-lynxos,
4057 sparc-lynxos, vax-vms) be obsolete.
4059 2005-01-28 Daniel Jacobowitz <dan@codesourcery.com>
4061 * elf-bfd.h (struct elf_backend_data): Add minpagesize.
4062 * elf32-arm.c (ELF_MINPAGESIZE): Define.
4063 * elf32-ppc.c (ELF_MINPAGESIZE): Define.
4064 * elfcode.h (elf_object_p): Use minpagesize instead of
4066 * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
4067 (elfNN_bed): Include ELF_MINPAGESIZE.
4069 2005-01-28 Julian Brown <julian@codesourcery.com>
4071 * bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
4072 * bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
4073 * elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
4074 (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
4075 passing flag value from ld. Set flag value in global hash table entry.
4076 (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
4079 2005-01-27 Andrew Cagney <cagney@gnu.org>
4081 * configure: Regenerate to track ../gettext.m4 change.
4083 2005-01-25 Mark Mitchell <mark@codesourcery.com>
4085 * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
4088 2005-01-25 Alexandre Oliva <aoliva@redhat.com>
4090 2004-12-10 Alexandre Oliva <aoliva@redhat.com>
4091 * elf32-frv.c (elf32_frv_relocate_section): Force local binding
4093 * reloc.c: Add R_FRV_TLSMOFF.
4094 * elf32-frv.c (elf32_frv_howto_table): Likewise.
4095 (frv_reloc_map, frv_reloc_type_lookup): Map it.
4096 (elf32_frv_relocate_section): Handle it.
4097 (elf32_frv_check_relocs): Likewise.
4098 * libbfd.h, bfd-in2.h: Rebuilt.
4099 2004-11-26 Alexandre Oliva <aoliva@redhat.com>
4100 * elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
4101 when given an undefweak TLS symbol. Fix constant TLS PLT entries
4102 such that they return the constant in gr9.
4103 (_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
4105 (_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
4106 too, such that they shrink on relaxation.
4107 (elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
4108 marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
4109 (_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
4110 if we can guarantee the use of 16-bit constants.
4111 2004-11-10 Alexandre Oliva <aoliva@redhat.com>
4112 Introduce TLS support for FR-V FDPIC.
4113 * reloc.c: Add TLS relocations.
4114 * elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
4115 (elf32_frv_rel_tlsdesc_value_howto): New.
4116 (elf32_frv_rel_tlsoff_howto): New.
4117 (frv_reloc_map): Add new mappings.
4118 (struct frvfdpic_elf_link_hash_table): Add pointer to summary
4120 (frvfdpic_dynamic_got_plt_info): New.
4121 (frvfdpic_plt_tls_ret_offset): New.
4122 (ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
4123 (struct _frvfdpic_dynamic_got_info): Likewise. Add TLS members.
4124 (struct _frvfdpic_dynamic_got_plt_info): Likewise.
4125 (FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
4127 (struct frvfdpic_relocs_info): Add TLS fields.
4128 (frvfdpic_relocs_info_hash): Warning clean up.
4129 (frvfdpic_relocs_info_find): Initialize tlsplt_entry.
4130 (frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
4131 (FRVFDPIC_TLS_BIAS): Define.
4132 (tls_biased_base): New.
4133 (_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
4135 (frv_reloc_type_lookup): Likewise.
4136 (frvfdpic_info_to_howto_rel): Likewise.
4137 (elf32_frv_relocate_section): Likewise.
4138 (_frv_create_got_section): Create the PLT section here.
4139 (elf32_frvfdpic_create_dynamic_sections): Not here.
4140 (_frvfdpic_count_nontls_entries): Move out of...
4141 (_frvfdpic_count_got_plt_entries): ... here.
4142 (_frvfdpic_count_tls_entries): Likewise. Add TLS support.
4143 (_frvfdpic_count_relocs_fixups): Likewise. Add relaxation
4145 (_frvfdpic_relax_tls_entries): New.
4146 (_frvfdpic_compute_got_alloc_data): Add TLS support.
4147 (_frvfdpic_get_tlsdesc_entry): New.
4148 (_frvfdpic_assign_got_entries): Add TLS support.
4149 (_frvfdpic_assign_plt_entries): Likewise.
4150 (_frvfdpic_reset_got_plt_entries): New.
4151 (_frvfdpic_size_got_plt): Move out of...
4152 (elf32_frvfdpic_size_dynamic_sections): ... here.
4153 (_frvfdpic_relax_got_plt_entries): New.
4154 (elf32_frvfdpic_relax_section): New.
4155 (elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
4156 (elf32_frv_check_relocs): Add TLS support.
4157 (bfd_elf32_bfd_relax_section): Define for FDPIC.
4158 * libbfd.h, bfd-in2.h: Rebuilt.
4160 2005-01-25 Alan Modra <amodra@bigpond.net.au>
4162 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
4163 loadable reloc sections.
4164 (_bfd_elf_canonicalize_dynamic_reloc): Likewise.
4165 (_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
4167 2005-01-25 Alan Modra <amodra@bigpond.net.au>
4169 * elflink.c (elf_link_add_object_symbols): Don't create link dynamic
4170 sections immediately when linking shared libs. Instead, wait until
4171 we know a lib is needed.
4172 (_bfd_elf_link_create_dynstrtab): Extract from..
4173 (_bfd_elf_link_create_dynamic_sections_): ..here.
4174 (elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
4175 _bfd_elf_link_create_dynamic_sections. Add abfd param. Allow
4176 for non-existent .dynamic.
4177 (elf_link_output_extsym): Don't complain about undefined symbols
4178 in as-needed dynamic libs that aren't actually linked.
4180 2005-01-24 Andrew Cagney <cagney@gnu.org>
4182 * configure: Regenerate, ../gettext.m4 was updated.
4184 2005-01-21 Ben Elliston <bje@au.ibm.com>
4186 * aout-encap.c: Remove unused file.
4188 2005-01-19 H.J. Lu <hongjiu.lu@intel.com>
4191 * elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
4192 non-function symbols are local.
4193 (_bfd_elf_symbol_refs_local_p): Likewise.
4195 2005-01-18 Alan Modra <amodra@bigpond.net.au>
4197 * bfd.c (bfd_link_just_syms): Add abfd param.
4198 * bfd-in2.h: Regenerate.
4200 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
4202 * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
4203 (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
4204 instructions. If the amount of padding is known, reduce the size
4205 of the CIE or FDE by that amount.
4207 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
4209 * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
4210 augmentation_size. Use bfd_signed_vmas for data_align.
4211 * elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
4212 (read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
4213 functions. Don't read past the end of the enclosing CIE or FDE.
4214 (skip_bytes): New utility function.
4215 (_bfd_elf_discard_section_eh_frame): Use new functions, adding more
4217 (_bfd_elf_write_section_eh_frame): Use new functions.
4219 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
4221 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
4222 assert-style REQUIRE() macro to handle sanity checks.
4224 2005-01-17 H.J. Lu <hongjiu.lu@intel.com>
4226 * dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
4228 (read_unsigned_leb128): Removed.
4229 (read_signed_leb128): Removed.
4230 (find_abstract_instance_name): Updated.
4231 (parse_comp_unit): Accept info_ptr_unit.
4232 (_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
4233 comp unit and pass it to parse_comp_unit.
4235 * elf-eh-frame.c (read_unsigned_leb128): Moved to ...
4236 (read_signed_leb128): Moved to ...
4239 * libbfd-in.h (read_unsigned_leb128): New prototype.
4240 (read_signed_leb128): Likewise.
4241 * libbfd.h: Regenerated.
4243 2005-01-17 Andrew Stubbs <andrew.stubbs@st.com>
4244 Nick Clifton <nickc@redhat.com>
4246 * cpu-sh.c (bfd_to_arch_table): Change arch_sh1_up to arch_sh_up,
4247 arch__sh4_nofp_up to arch_sh4_nofpu_up and arch_sh4a_nofp_up to
4248 arch_sh4a_nofpu_up in order to match the external names and make the
4249 testsuite's job easier.
4250 * archuires.c: Rename bfd_mach_sh2a_fake? to more meaningful
4252 * bfd-in2.h: Regenerate.
4254 2005-01-15 Andrew Cagney <cagney@gnu.org>
4257 * acinclude.m4: Move BFD_NEED_DECLARATION,
4258 BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
4259 the new file bfd.m4. Include ../bfd/bfd.m4.
4260 * configure: Re-generate.
4262 2005-01-12 Alan Modra <amodra@bigpond.net.au>
4264 * elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
4265 (ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
4267 (ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
4268 R_PPC_RELAX32PC_PLT.
4270 2005-01-11 Alan Modra <amodra@bigpond.net.au>
4272 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
4274 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
4275 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
4276 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
4277 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
4278 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
4279 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
4280 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
4281 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
4282 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
4283 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
4284 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
4285 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
4286 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
4287 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
4289 2005-01-11 Alan Modra <amodra@bigpond.net.au>
4291 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
4294 2005-01-10 Inderpreet Singh <inderpreetb@noida.hcltech.com>
4296 * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20.
4297 * bfd-in2.h: Regenerate.
4298 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code
4299 to support these new machine values.
4300 * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for
4302 (bfd_maxq_arch): Update values for the maxq20.
4304 2005-01-10 Eric Botcazou <ebotcazou@libertysurf.fr>
4306 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
4307 non-shared object, do not reserve space in .plt and .rela.plt for
4308 regular symbols neither defined nor referenced in shared objects.
4310 2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
4312 * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
4313 to zero the structure.
4314 (create_got_section): Use BFD_ASSERT instead of abort.
4315 * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
4317 (create_got_section): New function.
4318 (sparc64_elf_create_dynamic_sections): Likewise.
4319 (sparc64_elf_check_relocs): Invoke create_got_section instead of
4320 _bfd_elf_create_got_section. Use the sgot and srelgot shortcuts.
4321 (sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
4322 (sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
4323 (sparc64_elf_finish_dynamic_symbol): Likewise.
4324 (sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
4325 (elf_backend_create_dynamic_sections): Define to
4326 sparc64_elf_create_dynamic_sections.
4328 2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
4330 * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
4331 (elf_backend_omit_section_dynsym): Define to it.
4332 * elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
4333 (elf_backend_omit_section_dynsym): Define to it.
4335 2005-01-07 Jakub Jelinek <jakub@redhat.com>
4337 * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
4338 PT_DYNAMIC segment, unless .dynamic.
4340 2005-01-06 Paul Brook <paul@codesourcery.com>
4342 * config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
4343 * configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
4344 * configure: Regenerate.
4345 * elf32-arm.c: Add VxWorks target bfd.
4347 (elf32_arm_link_hash_table): Add use_rel.
4348 (elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
4349 elf32_arm_relocate_section): Replace USE_REL with runtime check.
4350 Correct offset calculation for RELA case.
4351 (elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
4352 elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
4353 (elf32_arm_vxworks_link_hash_table_create): New function.
4354 * targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
4355 (bfd_elf32_littlearm_vxworks_vec): Ditto.
4356 (_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
4358 2005-01-06 Alan Modra <amodra@bigpond.net.au>
4360 * elf64-ppc.c (struct ppc_link_hash_table): Add no_multi_toc and
4362 (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Define.
4363 (ppc64_elf_check_relocs): Update references to has_gp_reloc.
4364 (ppc64_elf_setup_section_lists): Add no_multi_toc parm, set htab bit.
4365 (ppc64_elf_next_toc_section): Heed no_multi_toc.
4366 (ppc64_elf_reinit_toc): Set multi_toc_needed.
4367 (toc_adjusting_stub_needed): Rewrite.
4368 (ppc64_elf_next_input_section): Use multi_toc_needed to shortcut
4369 toc tests. Adjust for toc_adjusting_stub_needed changes.
4370 (ppc64_elf_size_stubs): Update references to has_gp_reloc.
4371 * elf64-ppc.h (ppc64_elf_setup_section_lists): Update prototype.
4372 * section.c: Expand comment on backend bits.
4373 * bfd-in2.h: Regenerate.
4374 * libbfd.h: Regenerate.
4376 2005-01-06 Alan Modra <amodra@bigpond.net.au>
4378 * elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
4379 toc adjusting stub, do not test source section flags.
4381 2005-01-05 Eric Botcazou <ebotcazou@libertysurf.fr>
4383 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
4384 from STABS debugging sections again.
4386 2005-01-05 Fred Fish <fnf@specifixinc.com>
4388 * dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
4389 (find_abstract_instance_name): New function.
4390 (scan_unit_for_functions): Handle DW_TAG_inlined_subroutine.
4391 (scan_unit_for_functions): Handle DW_AT_abstract_origin.
4392 (_bfd_dwarf2_find_nearest_line): Initialize info_ptr_unit.
4394 2004-12-31 Paul Brook <paul@copdesourcery.com>
4396 * elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo.
4398 2004-12-31 Alan Modra <amodra@bigpond.net.au>
4400 * reloc.c (BFD_RELOC_AVR_LDI, BFD_RELOC_AVR_6, BFD_RELOC_AVR_6_ADIW):
4401 Commit missing changes from 2004-12-22.
4402 * bfd-in2.h: Regenerate.
4404 2004-12-23 Tomer Levi <Tomer.Levi@nsc.com>
4406 * elf32-crx.c (elf32_crx_relax_section): Support 'bcop' relaxation.
4408 2004-12-21 Kris Warkentin <kewarken@qnx.com>
4410 * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
4411 Add 'base' argument for constructing register sections. Reformat.
4412 (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
4413 gp and fp regs. Reformat.
4415 2004-12-22 Klaus Rudolph <lts-rudolph@gmx.de>
4417 * reloc.c: Add new relocs R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW.
4418 * bfd-in2.h: Regenerate.
4419 * elf32-avr.c (elf_avr_nowto_table): Add the new relocs.
4420 (avr_reloc_map): Likewise.
4421 (avr_final_link_relocate): Likewise.
4423 2004-12-22 Alan Modra <amodra@bigpond.net.au>
4425 * elflink.c (_bfd_elf_merge_symbol): Treat old definitions from
4426 as-needed dynamic libs as undefined.
4427 (elf_link_add_object_symbols): Remove DYN_AS_NEEDED from as-needed
4428 libs when finding they are needed.
4430 2004-12-20 Alan Modra <amodra@bigpond.net.au>
4432 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add opd_relocs.
4433 (opd_entry_value): Use opd_relocs if available.
4434 (ppc64_elf_relocate_section): Don't set reloc_done. Instead
4435 copy .opd relocations to opd_relocs.
4436 (ppc64_elf_edit_toc): Set rel_hdr.sh_size after editing relocs.
4438 2004-12-16 Richard Sandiford <rsandifo@redhat.com>
4440 * reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
4441 * elf32-v850.c (v850_elf_howto_table): Add entry for
4442 R_V850_LO16_SPLIT_OFFSET.
4443 (v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
4444 (v850_elf_perform_lo16_relocation): New function, extracted from...
4445 (v850_elf_perform_relocation): ...here. Use it to handle
4446 R_V850_LO16_SPLIT_OFFSET.
4447 (v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
4448 R_V850_LO16_SPLIT_OFFSET.
4449 * libbfd.h, bfd-in2.h: Regenerate.
4451 2004-12-14 P.J. Darcy <darcypj@us.ibm.com>
4453 * config.bfd: Add s390x-ibm-tpf support.
4455 2004-12-14 Tomer Levi <Tomer.Levi@nsc.com>
4457 * elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *'
4458 to prototype, to make hash info available.
4459 Prevent wrapped symbols from being adjusted twice.
4461 2004-12-14 Richard Sandiford <rsandifo@redhat.com>
4463 * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
4464 overflow for calls to undefined weak symbols.
4466 2004-12-11 Alan Modra <amodra@bigpond.net.au>
4468 * elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
4469 canonical sections syms have a name.
4471 2004-12-11 Alan Modra <amodra@bigpond.net.au>
4473 * elf64-ppc.c (opd_entry_value): Don't use cached relocs if they
4474 have been adjusted for output.
4475 (ppc64_elf_relocate_section): Mark sections with reloc_done.
4477 2004-12-10 Alan Modra <amodra@bigpond.net.au>
4479 * elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name and
4480 add symtab_hdr param.
4481 (group_signature): Update calls.
4482 * elf-bfd.h (bfd_elf_sym_name): Update.
4483 * elf32-ppc.c (ppc_elf_relocate_section): Update.
4484 * elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Update.
4485 (ppc64_elf_relocate_section): Update.
4486 * elflink.c (elf_link_input_bfd): Update.
4488 2004-12-10 Jakub Jelinek <jakub@redhat.com>
4490 * elf.c (bfd_elf_local_sym_name): Avoid crashes with invalid
4491 st_shndx on STT_SECTION sections.
4493 2004-12-09 Daniel Jacobowitz <dan@codesourcery.com>
4495 * elfcode.h (elf_slurp_reloc_table_from_section): Don't canonicalize
4496 ELF section symbols.
4498 2004-12-09 Ian Lance Taylor <ian@wasabisystems.com>
4500 * elfxx-mips.c (mips_elf_calculate_relocation): For R_MIPS_JALR,
4501 return a real value, unless it is a PLT symbol.
4502 (mips_elf_perform_relocation): On the RM9000, turn a jal into a
4505 * elfn32-mips.c (elf_mips_howto_table_rela): Change dst_mask of
4506 R_MIPS_JALR entry to 0.
4508 * archures.c: Define bfd_mach_mips9000.
4509 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_9000.
4510 (mips_set_isa_flags): Handle bfd_mach_mips9000.
4511 * cpu-mips.c (I_mips9000): Define.
4512 (arch_info_struct): Add case for bfd_mach_mips9000.
4513 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mips9000.
4514 * bfd-in2.h: Regenerate.
4516 2004-12-08 Ian Lance Taylor <ian@wasabisystems.com>
4518 * elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
4521 2004-12-07 Ben Elliston <bje@gnu.org>
4523 * netbsd-core.c (netbsd_core_file_p): Make `i' unsigned.
4525 2004-12-06 Daniel Jacobowitz <dan@debian.org>
4527 Suggested by Fergal Daly <fergal@esatclear.ie>:
4528 * simple.c (simple_dummy_multiple_definition): New function.
4529 (bfd_simple_get_relocated_section_contents): Use it.
4531 2004-12-03 Jan Beulich <jbeulich@novell.com>
4533 * elf.c (elf_find_function): Don't use the last file symbol ever,
4534 seen, but the last one seen prior to the symbol being reported.
4535 Don't report a filename at all for global symbols when that might
4538 2004-12-01 Paul Brook <paul@codesourcery.com>
4540 * elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
4541 (elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
4544 2004-12-01 Paul Brook <paul@codesourcery.com>
4546 * elflink.c (elf_link_add_object_symbols): Make symbols from discarded
4549 2004-11-30 Paul Brook <paul@codesourcery.com>
4551 * elf32-arm.c (struct elf32_arm_link_hash_table): Remove
4552 no_pipeline_knowledge
4553 (elf32_arm_link_hash_table_create): Ditto.
4554 (bfd_elf32_arm_process_before_allocation): Ditto.
4555 (elf32_arm_final_link_relocate): Ditto. Remove oabi relocation
4557 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
4559 * bfd-in2.h: Regenerate.
4561 2004-11-30 Randolph Chung <tausq@debian.org>
4563 * elf32-hppa.c (elf32_hppa_grok_prstatus): New function.
4564 (elf32_hppa_grok_psinfo): New function.
4565 (elf_backend_grok_prstatus): Define.
4566 (elf_backend_grok_psinfo): Define.
4568 2004-11-24 H.J. Lu <hongjiu.lu@intel.com>
4571 * elfcode.h (elf_slurp_symbol_table): Handle STT_TLS.
4573 2004-11-24 Paul Brook <paul@codesourcery.com>
4575 * elf.c (assign_section_numbers): Number SHT_GROUP sections first.
4577 2004-11-24 Paul Brook <paul@codesourcery.com>
4579 * elf32-arm.c (elf32_arm_swap_symbol_in): New function.
4580 (elf32_arm_swap_symbol_out): New function.
4581 (elf32_arm_size_info): Add.
4582 (elf_backend_size_info): Define.
4584 2004-11-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4586 * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
4589 2004-11-19 Alan Modra <amodra@bigpond.net.au>
4591 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
4592 * elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
4593 * nlmcode.h (nlm_write_object_contents): Warning fix.
4595 2004-11-18 Bob Wilson <bob.wilson@acm.org>
4597 * elf32-xtensa.c (ebb_propose_action): Fix argument order.
4599 2004-11-17 Daniel Jacobowitz <dan@codesourcery.com>
4601 * elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
4602 (elf32_arm_plt_thumb_stub): New.
4603 (struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
4605 (elf32_arm_link_hash_traverse): Fix typo.
4606 (elf32_arm_link_hash_table): Add obfd.
4607 (elf32_arm_link_hash_newfunc): Initialize new fields.
4608 (elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
4609 (elf32_arm_link_hash_table_create): Initialize obfd.
4610 (record_arm_to_thumb_glue): Mark the glue as a local ARM function.
4611 (record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
4612 (bfd_elf32_arm_get_bfd_for_interworking): Verify that the
4613 interworking BFD is not dynamic.
4614 (bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32. Do
4615 not emit glue for PLT references.
4616 (elf32_arm_final_link_relocate): Handle Thumb functions. Do not
4617 emit glue for PLT references. Support the Thumb PLT prefix.
4618 (elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
4620 (elf32_arm_check_relocs): Likewise.
4621 (elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
4623 (allocate_dynrelocs): Handle Thumb PLT references.
4624 (elf32_arm_finish_dynamic_symbol): Likewise.
4625 (elf32_arm_symbol_processing): New function.
4626 (elf_backend_symbol_processing): Define.
4628 2004-11-16 Richard Sandiford <rsandifo@redhat.com>
4630 * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
4631 add_fde_encoding. Remove need_relative.
4632 * elf-eh-frame.c (extra_augmentation_string_bytes)
4633 (extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
4634 (_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
4635 in cases where the CIE has no existing 'R' augmentation. Use
4636 size_of_output_cie_fde when assigning offsets. Use the final offset
4637 as the new section size.
4638 (_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
4639 Account for any extra augmentation bytes in the returned offset.
4640 (_bfd_elf_write_section_eh_frame): Rework so that the entries are
4641 moved before being modified. Pad growing entries with DW_CFA_nops.
4642 Add 'z' and 'R' augmentations as directed by add_augmentation_size
4643 and add_fde_encoding.
4645 2004-11-15 Mark Mitchell <mark@codesourcery.com>
4647 * elf32-arm.c (elf32_arm_relocate_section): Use
4648 arm_real_reloc_type.
4650 2004-11-16 Richard Sandiford <rsandifo@redhat.com>
4652 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Return early
4653 for discard relocations; don't add an R_MIPS_NONE to the main body
4656 2004-11-04 Paul Brook <paul@codesourcery.com>
4658 * elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
4659 * elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
4660 (_bfd_elf_slurp_version_tables): Add extra argument. Create extra
4661 default version definition for unversioned symbols.
4662 * elfcode.h (elf_slurp_symbol_table): Pass extra argument.
4663 * elflink.c (elf_link_add_object_symbols): Pass extra argument to
4664 _bfd_elf_slurp_version_tables. Set default version for unversioned
4667 2004-11-15 Paul Brook <paul@codesourcery.com>
4669 * elflink.c (elf_link_add_object_symbols): Don't assume version
4670 indices are consecutive.
4672 2004-11-14 Richard Sandiford <rsandifo@redhat.com>
4674 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
4675 composite relocations against the personality data.
4677 2004-11-13 Paul Brook <paul@codesourcery.com>
4679 * bfd/elf32-arm.c (elf32_arm_final_link_relocate): Resolve
4680 R_ARM_PREL31 relocations to PLT entries.
4681 (elf32_arm_relocate_section, elf32_arm_gc_sweep_hook): Ditto.
4682 (elf32_arm_check_relocs): Ditto.
4684 2004-11-12 Bob Wilson <bob.wilson@acm.org>
4686 * xtensa-isa.c (xtensa_interface_class_id): New.
4688 2004-11-11 Bob Wilson <bob.wilson@acm.org>
4690 * elf32-xtensa.c (property_table_compare): Remove assertion about
4691 entries with the same address and non-zero size.
4692 (xtensa_read_table_entries): Report such entries as errors.
4694 2004-11-11 Mark Mitchell <mark@codesourcery.com>
4696 * elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
4697 R_ARM_RELATIVE on Symbian OS.
4699 2004-11-09 Mark Mitchell <mark@codesourcery.com>
4701 * som.c (som_bfd_print_private_bfd_data): New function.
4702 (som_object_setup): Save the auxiliary header. Don't assume that
4703 zero is an invalid entry point for a shared library.
4704 (som_object_p): Allocate the auxiliary header on the heap.
4706 * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
4708 (elf32_arm_symbian_modify_segment_map): Likewise.
4710 2004-11-09 Daniel Jacobowitz <dan@debian.org>
4712 From David Poole <daveml@mbuf.com>:
4713 * elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
4714 (elf32_arm_size_dynamic_sections): Call it.
4716 2004-11-09 Alan Modra <amodra@bigpond.net.au>
4718 * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
4719 (ALL_MACHINES_CFILES): Fix typo.
4720 * Makefile.in: Regenerate.
4721 * po/SRC-POTFILES.in: Regenerate.
4723 2004-11-08 Mark Mitchell <mark@codesourcery.com>
4725 * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
4726 R_ARM_RELATIVE relocation for Symbian OS, mention the section
4727 symbol in the relocation.
4729 2004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
4730 Vineet Sharma <vineets@noida.hcltech.com>
4732 * coff-maxq.c: New File.
4733 * cpu-maxq.c: New File.
4734 * coffcode.h: Likewise.
4735 * config.bfd: Likewise.
4736 * configure.in (maxqcoff_vec): New target vector.
4737 * Makefile.am: Add support for maxq target.
4738 * configure.in: Likewise.
4739 * archures.c:. Likewise.
4740 * targets.c: Likewise.
4741 * bfd_in2.h : Regenerated.
4742 * Makefile.in: Regenerated.
4743 * configure: Regenerated.
4744 * doc/Makefile.in: Regenerated.
4746 2004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
4748 * coff-i386.c (coff_i386_reloc): Fix weak symbols.
4749 * cofflink.c (_bfd_coff_link_input_bfd): Don't process
4750 C_NT_WEAK aux entries.
4751 (_bfd_coff_generic_relocate_section): Handle undefined
4754 2004-11-07 Andreas Schwab <schwab@suse.de>
4756 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
4757 SYMBOL_CALLS_LOCAL and check for undefweak symbols with
4758 non-default visibility.
4760 2004-11-01 Mark Mitchell <mark@codesourcery.com>
4762 * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
4764 (elf32_arm_symbian_modify_segment_map): Don't
4765 reset includes_filehdr and includes_phdrs here.
4767 2004-11-04 Daniel Jacobowitz <dan@debian.org>
4769 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
4770 elfarm-nabi with elf32-arm. Remove elfarm-oabi.
4771 (elf32-arm.lo): Replace elfarm-nabi.lo rule. Remove elf32-arm.h
4773 * config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
4774 to a new removed list. Remove normal configuration stanzas.
4775 * configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
4776 (bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
4777 elfarm-nabi.lo with elf32-arm.lo.
4778 (bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
4779 * elf32-arm.c: Renamed from elfarm-nabi.c. Inline elf32-arm.h.
4780 * elf32-arm.h: Remove.
4781 * elfarm-oabi.c: Remove.
4782 * targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
4783 and bfd_elf32_littlearm_oabi_vec.
4784 * aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
4786 2004-11-04 Hans-Peter Nilsson <hp@axis.com>
4788 * config.bfd: Support crisv32-*-* like cris-*-*.
4789 * archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
4790 (bfd_mach_cris_v10_v32): New macros.
4791 * cpu-cris.c: Tweak formatting.
4792 (get_compatible): New function.
4794 (bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
4795 bfd_arch_info_type:s.
4796 (bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
4797 get_compatible for member compatible and link bfd_cris_arch_v32 as
4799 * elf32-cris.c (cris_elf_pcrel_reloc)
4800 (cris_elf_set_mach_from_flags): New functions.
4801 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
4802 <R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
4803 (cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
4804 numbers for bfd_mach_cris_v32.
4805 (PLT_ENTRY_SIZE_V32): New macro.
4806 (elf_cris_plt0_entry): Drop last comma in initializer.
4807 (elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
4808 (elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
4810 (cris_elf_relocate_section): Change all "%B(%A)" messages to
4812 (elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
4813 (elf_cris_finish_dynamic_sections): Similar.
4814 (elf_cris_adjust_dynamic_symbol): Similar.
4815 (cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
4817 <switch with PIC relocs>: Emit error and return FALSE for
4818 bfd_mach_cris_v10_v32.
4819 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
4820 Emit warning when generating textrel reloc.
4821 (cris_elf_object_p): Call cris_elf_set_mach_from_flags.
4822 (cris_elf_final_write_processing): Set flags according to mach.
4823 (cris_elf_print_private_bfd_data): Display
4824 EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
4825 (cris_elf_merge_private_bfd_data): Drop variables old_flags,
4826 new_flags. Don't call cris_elf_final_write_processing. Don't
4827 look at the actual elf header flags at all; use
4828 bfd_get_symbol_leading_char to check ibfd, obfd. Trap difference
4829 in bfd_get_mach for ibfd and obfd and handle merging of compatible
4831 (bfd_elf32_bfd_copy_private_bfd_data): Define.
4832 * reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
4833 (BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
4834 (BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
4835 * bfd-in2.h, libbfd.h: Regenerate.
4837 2004-11-04 Alan Modra <amodra@bigpond.net.au>
4839 * elf64-ppc.h (ppc64_elf_edit_toc): Declare.
4840 * elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
4842 (struct adjust_toc_info): New.
4843 (adjust_toc_syms, ppc64_elf_edit_toc): New functions.
4845 2004-11-03 Bob Wilson <bob.wilson@acm.org>
4847 * elf.c (assign_file_positions_for_segments): Set next_file_pos even
4848 if there are no segments.
4850 2004-11-02 Daniel Jacobowitz <dan@debian.org>
4852 * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete.
4854 2004-11-02 Nick Clifton <nickc@redhat.com>
4856 * elf32-iq2000.c: Convert to ISO C90 formatting.
4858 2004-11-02 Hans-Peter Nilsson <hp@axis.com>
4860 * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_.
4862 2004-10-28 H.J. Lu <hongjiu.lu@intel.com>
4864 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
4865 undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
4866 R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
4868 2004-10-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4870 * elf32-sh.c (tpoff): Take alignment into account.
4872 2004-10-28 Nick Clifton <nickc@redhat.com>
4874 * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
4875 performing a relocatable link.
4876 (iq2000_elf_object_p): Do not set elf_bad_symtab. This is only
4877 for MIPS ports under Irix.
4879 2004-10-27 Richard Earnshaw <rearnsha@arm.com>
4881 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
4882 R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
4883 (elf32_arm_final_link_relocate): Ditto.
4884 (arm_add_to_rel, elf32_arm_relocate_section): Ditto.
4885 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
4886 (elf32_arm_adjust_dynamic_symbol): Ditto.
4887 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
4888 R_ARM_JUMP32. Move R_ARM_R{REL32,ABS32,PC24,BASE}...
4889 (elf32_arm_r_howto): ... To here.
4890 (elf32_arm_howto_from_type): Use elf32_arm_r_howto.
4892 2004-10-26 H.J. Lu <hongjiu.lu@intel.com>
4895 * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
4896 R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
4897 and R_IA64_SECREL64LSB.
4899 2004-10-26 Paul Brook <paul@codesourcery.com>
4901 * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
4902 (bfd_elf_size_dynamic_sections): Create default version definition.
4903 (elf_link_output_extsym): Adjust for default symbol version.
4905 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
4907 * mmo.c: Adjust to ISO C.
4909 * mmo.c (mmo_write_section_description): New function broken out
4910 of mmo_internal_write_section.
4911 (mmo_internal_write_section): For each of .text and .data, call
4912 mmo_write_section_description before outputting contents if it has
4913 nontrivially deducible vma or contents.
4914 (mmo_has_leading_or_trailing_zero_tetra_p): New function.
4915 (mmo_canonicalize_symtab): Adjust absolute symbols to .data
4916 symbols if found within the .data address range.
4918 2004-10-24 Daniel Jacobowitz <dan@debian.org>
4920 * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
4922 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
4924 * mmo.c (File Layout): Correct place of misplaced blurb about
4927 2004-10-22 Mark Kettenis <kettenis@gnu.org>
4929 * config.bfd: Add mips64*-*-openbsd.
4931 2004-10-21 Bob Wilson <bob.wilson@acm.org>
4933 * elf32-xtensa.c (ebb_propose_action): Put declarations before
4936 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
4938 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
4939 * configure: Regenerate.
4941 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
4944 * aoutx.h (aout_link_input_section_std): Pass proper hash entry
4945 to linker reloc_overflow callback.
4946 (aout_link_input_section_ext): Likewise.
4947 (aout_link_reloc_link_order): Likewise.
4948 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
4949 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
4951 (alpha_relocate_section): Likewise.
4952 * coff-arm.c (coff_arm_relocate_section): Likewise.
4953 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
4954 * coff-h8500.c (extra_case): Likewise.
4955 * coff-i960.c (coff_i960_relocate_section): Likewise.
4956 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
4957 * coff-mips.c (mips_relocate_section): Likewise.
4958 * coff-or32.c (coff_or32_relocate_section): Likewise.
4959 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
4960 * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
4961 * coff-sh.c (sh_relocate_section): Likewise.
4962 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
4963 * coff-w65.c (w65_reloc16_extra_cases): Likewise.
4964 * coff-z8k.c (extra_case): Likewise.
4965 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
4966 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
4967 (_bfd_coff_generic_relocate_section): Likewise.
4968 * ecoff.c (ecoff_reloc_link_order): Likewise.
4969 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
4970 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
4971 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
4972 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
4973 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
4974 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
4975 * elf32-cris.c (cris_elf_relocate_section): Likewise.
4976 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
4977 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
4978 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
4979 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
4980 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
4981 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4982 * elf32-i370.c (i370_elf_relocate_section): Likewise.
4983 * elf32-i386.c (elf_i386_relocate_section): Likewise.
4984 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
4985 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
4986 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
4987 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
4988 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
4989 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4990 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
4991 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
4992 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
4993 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4994 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4995 * elf32-sh.c (sh_elf_relocate_section): Likewise.
4996 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4997 * elf32-v850.c (v850_elf_relocate_section): Likewise.
4998 * elf32-vax.c (elf_vax_relocate_section): Likewise.
4999 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
5000 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
5001 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
5002 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
5003 * elf64-s390.c (elf_s390_relocate_section): Likewise.
5004 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
5005 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5006 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
5007 * elflink.c (elf_reloc_link_order): Likewise.
5008 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
5009 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
5010 (_bfd_elf_mips_get_relocated_section_contents): Likewise.
5011 * linker.c (_bfd_generic_reloc_link_order): Likewise.
5012 * pdp11.c (pdp11_aout_link_input_section): Likewise.
5013 (aout_link_reloc_link_order): Likewise.
5014 * reloc.c (bfd_generic_get_relocated_section_contents):
5016 * xcofflink.c (xcoff_reloc_link_order): Likewise.
5017 * simple.c (simple_dummy_reloc_overflow): Updated.
5019 2004-10-20 Andreas Schwab <schwab@suse.de>
5021 * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
5022 (elf_backend_plt_sym_val): Define.
5024 2004-10-19 Danny Smith <dannysmith@users.sourceforege.net>
5026 * config.bfd: Set targ_underscore=yes for PE COFF targets
5028 2004-10-19 Alan Modra <amodra@bigpond.net.au>
5030 * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
5031 (ppc64_elf_edit_opd): Likewise.
5033 2004-10-18 Mark Mitchell <mark@codesourcery.com>
5035 * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
5036 * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
5037 set SEC_ALLOC and SEC_LOAD.
5039 2004-10-18 Nick Clifton <nickc@redhat.com>
5041 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
5042 'name' for relocs against both local and global symbols.
5044 2004-10-16 Daniel Jacobowitz <dan@debian.org>
5046 * bfd-in2.h: Regenerate.
5047 * bfd.c (struct bfd): Add no_export.
5048 * elflink.c (elf_link_add_object_symbols): Handle no_export.
5050 2004-10-15 Alan Modra <amodra@bigpond.net.au>
5052 * config.bfd: Whitespace cleanup.
5053 * Makefile.am: Run "make dep-am"
5054 * Makefile.in: Regenerate.
5056 2004-10-15 Jakub Jelinek <jakub@redhat.com>
5058 * elflink.c (struct already_linked_section): Removed.
5059 (try_match_symbols_in_sections, already_linked): Removed.
5060 (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
5061 prefix of section names when finding already_linked_table
5062 chain. Compare section names. Instead of calling already_linked,
5063 do it inline and only for sections in the same already_linked_list.
5065 2004-10-15 Alan Modra <amodra@bigpond.net.au>
5067 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
5068 parameter. If called after _bfd_elf_write_section_eh_frame,
5069 don't allow a -2 return unless need_* bit is already set, and
5070 handle offsets adjusted for output_offset.
5071 * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
5072 * elf.c (_bfd_elf_section_offset): Update call.
5074 2004-10-13 H.J. Lu <hongjiu.lu@intel.com>
5077 * coffcode.h (coff_compute_section_file_positions): Cast to
5078 bfd_vma when computing page alignment.
5080 2004-10-13 Mark Mitchell <mark@codesourcery.com>
5082 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
5083 offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
5085 2004-10-12 Mark Mitchell <mark@codesourcery.com>
5087 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
5088 relocations use a virtual address, not a section offset.
5090 2004-10-12 Bob Wilson <bob.wilson@acm.org>
5092 * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
5093 (narrow_instruction, widen_instruction): Remove unnecessary calls to
5094 xtensa_format_encode.
5095 (ebb_propose_action): Inline call to ebb_add_proposed_action.
5096 (ebb_add_proposed_action): Delete.
5098 2004-10-12 Bob Wilson <bob.wilson@acm.org>
5100 * elf32-xtensa.c: Use ISO C90 formatting.
5102 2004-10-12 Paul Brook <paul@codesourcery.com>
5104 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
5107 2004-10-12 Paul Brook <paul@codesourcery.com>
5109 * elf32-arm.h: Support EABI version 4 objects.
5111 2004-10-12 Alan Modra <amodra@bigpond.net.au>
5114 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
5115 Don't mark as default.
5116 (bfd_x86_64_arch): Don't mark as default.
5118 2004-10-12 Alan Modra <amodra@bigpond.net.au>
5120 * elflink.c (enum action_discarded): New.
5121 (elf_section_complain_discarded): Delete.
5122 (elf_action_discarded): New function subsuming the above and also
5123 controlling reloc behaviour.
5124 (elf_link_input_bfd): Use it.
5126 2004-10-11 Jakub Jelinek <jakub@redhat.com>
5128 * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
5129 (special_sections): Add .gnu.liblist and .gnu.conflict.
5130 (assign_section_numbers): Handle SHT_GNU_LIBLIST.
5132 2004-10-11 Alan Modra <amodra@bigpond.net.au>
5135 * elflink.c (elf_link_input_bfd): Try harder to support
5136 relocations against symbols in removed linkonce sections.
5138 2004-10-11 Alan Modra <amodra@bigpond.net.au>
5140 * elflink.c (elf_link_input_bfd): Revert PR 354 change.
5143 * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
5144 sections do not reference symbols in non-SEC_ALLOC sections.
5146 2004-10-11 Alan Modra <amodra@bigpond.net.au>
5149 * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
5150 (_bfd_elf_link_omit_section_dynsym): Formatting.
5152 2004-10-10 Alan Modra <amodra@bigpond.net.au>
5154 * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
5155 * libbfd.h: Regnerate.
5156 * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
5157 * elf32-frv.c: Likewise.
5158 * elf32-m32r.c: Likewise.
5159 * elf32-ppc.c: Likewise.
5160 * elf64-hppa.c: Likewise.
5161 * elfxx-ia64.c: Likewise.
5162 * opncls.c: Likewise.
5164 2004-10-10 Alan Modra <amodra@bigpond.net.au>
5166 * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
5167 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
5168 offsets stored in struct eh_cie_fde entries before doing other
5171 * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
5172 (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
5173 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
5174 setting offsets for removed CIEs. Don't set "sec", instead set
5175 cie_inf for FDEs. Keep a pointer to last struct eh_cie_fde for a
5176 CIE in hdr_info. Only set make_relative and make_lsda_relative
5177 for CIEs. Use pointers rather than array indices.
5178 (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
5179 make_lsda_relative, need_* on cie_inf for FDEs.
5180 (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
5181 section output_offset. Delete cie_offset, instead use cie_inf
5182 pointer to CIE entry. Use need_relative and need_lsda_relative on
5183 CIE entry for FDEs. Use pointers rather than array indices.
5185 2004-10-09 Alan Modra <amodra@bigpond.net.au>
5187 * coff-rs6000.c (rs6000coff_vec): Add initializer for
5188 bfd_is_target_special_symbol.
5189 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
5190 * som.c (som_bfd_is_target_special_symbol): Define.
5192 2004-10-08 Nick Clifton <nickc@redhat.com>
5194 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
5195 * configure: Regenerate.
5196 * bfd-in2.h: Regenerate.
5197 * syms.c (bfd_is_target_special_symbol): New interface function.
5198 Returns true when a symbol should be considered to be special.
5199 * targets.c (bfd_target): Include bfd_is_target_special_symbol in
5200 the symbol jump table.
5201 * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
5202 Return true iff the symbol is a mapping symbol.
5203 (bfd_elf32_bfd_is_target_special_symbol): Define.
5204 * elfxx-target.h: Provide a default definition for
5205 bfd_is_target_special_symbol.
5206 * aout-target.h: Likewise.
5207 * aout-tic30.c: Likewise.
5208 * binary.c: Likewise.
5209 * coffcode.h: Likewise.
5210 * i386msdos.c: Likewise.
5213 * libaout.h: Likewise.
5214 * libbfd-in.h: Likewise
5215 * libecoff.h: Likewise.
5216 * mach-o.c: Likewise.
5218 * nlm-target.h: Likewise.
5219 * oasys.c: Likewise.
5221 * ppcboot.c: Likewise.
5223 * tekhex.c: Likewise.
5224 * versados.c: Likewise.
5226 * xcoff-target.h: Likewise.
5228 * libbfd.h: Regenerate.
5230 2004-10-08 Daniel Jacobowitz <dan@debian.org>
5232 * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
5233 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
5234 (elf_backend_section_from_shdr): Define.
5236 2004-10-08 Alan Modra <amodra@bigpond.net.au>
5238 * syms.c (bfd_is_local_label): Return false for file symbols.
5240 2004-10-07 Bob Wilson <bob.wilson@acm.org>
5241 David Heine <dlheine@tensilica.com>
5243 * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
5244 (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
5245 (elf32xtensa_no_literal_movement): New global variable.
5246 (elf_howto_table): Add entries for new relocations.
5247 (elf_xtensa_reloc_type_lookup): Handle new relocations.
5248 (property_table_compare): When addresses are equal, compare sizes and
5249 various property flags.
5250 (property_table_matches): New.
5251 (xtensa_read_table_entries): Extend to read new property tables. Add
5252 output_addr parameter to indicate that output addresses should be used.
5253 Use bfd_get_section_limit.
5254 (elf_xtensa_find_property_entry): New.
5255 (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
5256 (elf_xtensa_check_relocs): Handle new relocations.
5257 (elf_xtensa_do_reloc): Use bfd_get_section_limit. Handle new
5258 relocations. Use new xtensa-isa.h functions.
5259 (build_encoding_error_message): Remove encode_result parameter. Add
5260 new target_address parameter used to detect alignment errors.
5261 (elf_xtensa_relocate_section): Use bfd_get_section_limit. Clean up
5262 error handling. Use new is_operand_relocation function.
5263 (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
5264 Use underbar macro for error messages. Formatting.
5265 (get_const16_opcode): New.
5266 (get_l32r_opcode): Add a separate flag for initialization.
5267 (get_relocation_opnd): Operand number is no longer explicit in the
5268 relocation. Change to decode the opcode and analyze its operands.
5269 (get_relocation_slot): New.
5270 (get_relocation_opcode): Add bfd parameter. Use bfd_get_section_limit.
5271 Use new xtensa-isa.h functions to handle multislot instructions.
5272 (is_l32r_relocation): Add bfd parameter. Use is_operand_relocation.
5273 (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
5274 insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
5275 check_loop_aligned, check_branch_target_aligned_address, narrowable,
5276 widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
5277 get_single_format, init_op_single_format_table): New.
5278 (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
5279 instead of calling _bfd_error_handler. Use new xtensa-isa.h functions.
5280 (contract_asm_expansion): Add error_message parameter and pass it to
5281 elf_xtensa_do_asm_simplify. Replace use of R_XTENSA_OP0 relocation
5282 with R_XTENSA_SLOT0_OP.
5283 (get_expanded_call_opcode): Extend to handle either L32R or CONST16
5284 instructions. Use new xtensa-isa.h functions.
5285 (r_reloc struct): Add new virtual_offset field.
5286 (r_reloc_init): Add contents and content_length parameters. Set
5287 virtual_offset field to zero. Add contents to target_offset field for
5288 partial_inplace relocations.
5289 (r_reloc_is_defined): Check for null.
5290 (print_r_reloc): New debug function.
5291 (source_reloc struct): Replace xtensa_operand field with pair of the
5292 opcode and the operand position. Add is_abs_literal field.
5293 (init_source_reloc): Specify operand by opcode/position pair. Set
5294 is_abs_literal field.
5295 (source_reloc_compare): When target_offsets are equal, compare other
5296 fields to make sorting predictable.
5297 (literal_value struct): Add is_abs_literal field.
5298 (value_map_hash_table struct): Add has_last_loc and last_loc fields.
5299 (init_literal_value): New.
5300 (is_same_value): Replace with ...
5301 (literal_value_equal): ... this function. Add comparisons of
5302 virtual_offset and is_abs_literal fields.
5303 (value_map_hash_table_init): Use bfd_zmalloc. Check for allocation
5304 failure. Initialize has_last_loc field.
5305 (value_map_hash_table_delete): New.
5306 (hash_literal_value): Rename to ...
5307 (literal_value_hash): ... this. Include is_abs_literal flag and
5308 virtual_offset field in the hash value.
5309 (get_cached_value): Rename to ...
5310 (value_map_get_cached_value): ... this. Update calls to
5311 literal_value_hash and literal_value_equal.
5312 (add_value_map): Check for allocation failure. Update calls to
5313 value_map_get_cached_value and literal_value_hash.
5314 (text_action, text_action_list, text_action_t): New types.
5315 (find_fill_action, compute_removed_action_diff, adjust_fill_action,
5316 text_action_add, text_action_add_literal, offset_with_removed_text,
5317 offset_with_removed_text_before_fill, find_insn_action,
5318 print_action_list, print_removed_literals): New.
5319 (offset_with_removed_literals): Delete.
5320 (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
5321 fix_array, fix_array_count, allocated_relocs, relocs_count, and
5322 allocated_relocs_count fields.
5323 (init_xtensa_relax_info): Initialize new fields.
5324 (reloc_bfd_fix struct): Add new translated field.
5325 (reloc_bfd_fix_init): Add translated parameter and use it to set the
5327 (fix_compare, cache_fix_array): New.
5328 (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
5329 section via get_xtensa_relax_info. Use cache_fix_array to set up
5330 sorted fix_array and use bsearch instead of linear search.
5331 (section_cache_t): New struct.
5332 (init_section_cache, section_cache_section, clear_section_cache): New.
5333 (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
5334 (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
5335 extend_ebb_bounds_forward, extend_ebb_bounds_backward,
5336 insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
5338 (retrieve_contents): Use bfd_get_section_limit.
5339 (elf_xtensa_relax_section): Add relocations_analyzed flag. Update call
5340 to compute_removed_literals. Free value_map_hash_table when no longer
5342 (analyze_relocations): Check is_relaxable_asm_section flag. Call
5343 compute_text_actions for all sections.
5344 (find_relaxable_sections): Mark sections as relaxable if they contain
5345 ASM_EXPAND relocations that can be optimized. Adjust r_reloc_init
5346 call. Increment relax_info src_count field only for appropriate
5347 relocation types. Remove is_literal_section check.
5348 (collect_source_relocs): Use bfd_get_section_limit. Adjust calls to
5349 r_reloc_init and find_associated_l32r_irel. Check
5350 is_relaxable_asm_section flag. Handle L32R instructions with absolute
5351 literals. Pass is_abs_literal flag to init_source_reloc.
5352 (is_resolvable_asm_expansion): Use bfd_get_section_limit. Check for
5353 CONST16 instructions. Adjust calls to r_reloc_init and
5354 pcrel_reloc_fits. Handle weak symbols conservatively.
5355 (find_associated_l32r_irel): Add bfd parameter and pass it to
5357 (compute_text_actions, compute_ebb_proposed_actions,
5358 compute_ebb_actions, check_section_ebb_pcrels_fit,
5359 check_section_ebb_reduces, text_action_add_proposed,
5360 compute_fill_extra_space): New.
5361 (remove_literals): Replace with ...
5362 (compute_removed_literals): ... this function. Call
5363 init_section_cache. Use bfd_get_section_limit. Sort internal_relocs.
5364 Call xtensa_read_table_entries to get the property table. Skip
5365 relocations other than R_XTENSA_32 and R_XTENSA_PLT. Use new
5366 is_removable_literal, remove_dead_literal, and
5367 identify_literal_placement functions.
5368 (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
5369 instead of linear search.
5370 (is_removable_literal, remove_dead_literal,
5371 identify_literal_placement): New.
5372 (relocations_reach): Update check for literal not referenced by any
5373 PC-relative relocations. Adjust call to pcrel_reloc_fits.
5374 (coalesce_shared_literal, move_shared_literal): New.
5375 (relax_section): Use bfd_get_section_limit. Call
5376 translate_section_fixes. Update calls to r_reloc_init and
5377 offset_with_removed_text. Check new is_relaxable_asm_section flag.
5378 Add call to pin_internal_relocs. Add special handling for
5379 R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs. Use virtual_offset
5380 info to calculate new addend_displacement variable. Replace code for
5381 deleting literals with more general code to perform the actions
5382 determined by the action_list for the section.
5383 (translate_section_fixes, translate_reloc_bfd_fix): New.
5384 (translate_reloc): Check new is_relaxable_asm_section flag. Call
5385 find_removed_literal only if is_operand_relocation. Update call to
5386 offset_with_removed_text. Use new target_offset and removed_bytes
5388 (move_literal): New.
5389 (relax_property_section): Use bfd_get_section_limit. Set new
5390 is_full_prop_section flag and handle new property tables. Update calls
5391 to r_reloc_init and offset_with_removed_text. Check
5392 is_relaxable_asm_section flag. Handle expansion of zero-sized
5393 unreachable entries, with use of offset_with_removed_text_before_fill.
5394 For relocatable links, combine entries only for literal tables.
5395 (relax_section_symbols): Check is_relaxable_asm_section flag. Update
5396 calls to offset_with_removed_text. Translate st_size field for
5398 (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
5399 failure. Add contents parameter. Update call to get_bfd_fix. Update
5400 call to r_reloc_init. Call _bfd_error_handler and return FALSE for
5401 R_XTENSA_ASM_EXPAND relocs.
5402 (do_fix_for_final_link): Add input_bfd and contents parameters. Update
5403 call to get_bfd_fix. Include offset from contents for partial_inplace
5405 (is_reloc_sym_weak): New.
5406 (pcrel_reloc_fits): Use new xtensa-isa.h functions.
5407 (prop_sec_len): New.
5408 (xtensa_is_property_section): Handle new property sections.
5409 (is_literal_section): Delete.
5410 (internal_reloc_compare): When r_offset matches, compare r_info and
5411 r_addend to make sorting predictable.
5412 (internal_reloc_matches): New.
5413 (xtensa_get_property_section_name): Handle new property sections.
5414 (xtensa_get_property_predef_flags): New.
5415 (xtensa_callback_required_dependence): Use bfd_get_section_limit.
5416 Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
5417 * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
5418 (xtisa_errno, xtisa_error_msg): New variables.
5419 (xtensa_isa_errno, xtensa_isa_error_msg): New.
5420 (xtensa_insnbuf_alloc): Add error handling.
5421 (xtensa_insnbuf_to_chars): Add num_chars parameter. Update to
5422 use xtensa_format_decode. Add error handling.
5423 (xtensa_insnbuf_from_chars): Add num_chars parameter. Decode the
5424 instruction length to find the number of bytes to copy.
5425 (xtensa_isa_init): Add error handling. Replace calls to
5426 xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
5427 tables in the xtensa_modules structure.
5428 (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
5429 xtensa_extend_isa): Delete.
5430 (xtensa_isa_free): Change to only free lookup tables.
5431 (opname_lookup_compare): Replace with ...
5432 (xtensa_isa_name_compare): ... this function. Use strcasecmp.
5433 (xtensa_insn_maxlength): Rename to ...
5434 (xtensa_isa_maxlength): ... this.
5435 (xtensa_insn_length): Delete.
5436 (xtensa_insn_length_from_first_byte): Replace with ...
5437 (xtensa_isa_length_from_chars): ... this function.
5438 (xtensa_num_opcodes): Rename to ...
5439 (xtensa_isa_num_opcodes): ... this.
5440 (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
5441 xtensa_isa_num_regfiles, xtensa_isa_num_stages,
5442 xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
5443 xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
5444 xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
5445 xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
5446 xtensa_format_get_slot, xtensa_format_set_slot): New functions.
5447 (xtensa_opcode_lookup): Add error handling.
5448 (xtensa_decode_insn): Replace with ...
5449 (xtensa_opcode_decode): ... this function, with new format and
5450 slot parameters. Add error handling.
5451 (xtensa_encode_insn): Replace with ...
5452 (xtensa_opcode_encode): ... this function, which does the encoding via
5453 one of the entries in the "encode_fns" array. Add error handling.
5454 (xtensa_opcode_name): Add error handling.
5455 (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
5456 xtensa_opcode_is_call): New.
5457 (xtensa_num_operands): Replace with ...
5458 (xtensa_opcode_num_operands): ... this function. Add error handling.
5459 (xtensa_opcode_num_stateOperands,
5460 xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
5461 xtensa_opcode_funcUnit_use, xtensa_operand_name,
5462 xtensa_operand_is_visible): New.
5463 (xtensa_get_operand, xtensa_operand_kind): Delete.
5464 (xtensa_operand_inout): Add error handling and special-case for
5466 (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
5467 operate on one slot of an instruction. Added error handling.
5468 (xtensa_operand_encode): Handle default operands with no encoding
5469 functions. Check for success by comparing against decoded value.
5471 (xtensa_operand_decode): Handle default operands. Return decoded value
5472 through argument pointer. Add error handling.
5473 (xtensa_operand_is_register, xtensa_operand_regfile,
5474 xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
5475 (xtensa_operand_isPCRelative): Rename to ...
5476 (xtensa_operand_is_PCrelative): ... this. Add error handling.
5477 (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
5478 through argument pointer. Add error handling.
5479 (xtensa_stateOperand_state, xtensa_stateOperand_inout,
5480 xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
5481 xtensa_regfile_lookup_shortname, xtensa_regfile_name,
5482 xtensa_regfile_shortname, xtensa_regfile_view_parent,
5483 xtensa_regfile_num_bits, xtensa_regfile_num_entries,
5484 xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
5485 xtensa_state_is_exported, xtensa_sysreg_lookup,
5486 xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
5487 xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
5488 xtensa_interface_num_bits, xtensa_interface_inout,
5489 xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
5490 xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
5491 * xtensa-modules.c: Rewrite to use new data structures.
5492 * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
5493 BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
5494 BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
5495 BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
5496 BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
5497 BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
5498 BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
5499 BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
5500 BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
5501 BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
5502 BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
5503 BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
5504 BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
5505 BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
5506 BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
5507 BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
5508 BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
5509 * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
5510 * Makefile.in: Regenerate.
5511 * bfd-in2.h: Likewise.
5512 * libbfd.h: Likewise.
5514 2004-10-07 Richard Sandiford <rsandifo@redhat.com>
5516 * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
5517 against the absolute section.
5518 (mips_elf64_write_rela): Likewise.
5520 2004-10-07 Jan Beulich <jbeulich@novell.com>
5522 * elf.c (elf_find_function): Don't generally check for matching
5523 section, just for non-file symbols. Remove redunant comparison
5525 * elf32-arm.h (arm_elf_find_function): Likewise.
5527 2004-10-07 Jeff Baker <jbaker@qnx.com>
5529 * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
5530 adding a DT_TEXTREL to a shared object and --warn-shared-textrel
5533 2004-10-04 Roland McGrath <roland@redhat.com>
5535 * hash.c (bfd_hash_set_default_size): Use const for table.
5536 Use size_t instead of int for variable compared to sizeof results.
5538 2004-10-05 Alan Modra <amodra@bigpond.net.au>
5541 * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
5543 2004-10-01 Paul Brook <paul@codesourcery.com>
5545 * elf32-arm.h (elf32_arm_fake_sections,
5546 is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
5548 (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
5550 2004-10-01 Alan Modra <amodra@bigpond.net.au>
5552 * elf-bfd.h (struct eh_cie_fde): Add need_relative and
5554 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
5555 need_relative or need_lsda_relative if we are processing an
5556 offset for a reloc on a FDE initial loc or LSDA field
5558 (_bfd_elf_write_section_eh_frame): Test need_relative and
5559 need_lsda_relative in place of corresponding make_* field
5560 when deciding to use pc-relative encodings.
5562 2004-09-30 Paul Brook <paul@codesourcery.com>
5564 * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
5565 target2 relocation type.
5567 2004-09-30 H.J. Lu <hongjiu.lu@intel.com>
5570 * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
5572 2004-09-30 Paul Brook <paul@codesourcery.com>
5574 * reloc.c: Add BFD_RELOC_ARM_SMI.
5575 * bfd-in2.h: Regenerate.
5578 2004-09-24 Alan Modra <amodra@bigpond.net.au>
5580 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
5581 vma and output offset to address.
5582 * simple.c (simple_save_output_info): Only set output section
5583 and offset for debug sections, or those not already set up by
5585 (bfd_simple_get_relocated_section_contents): Update comment.
5587 2004-09-24 Alan Modra <amodra@bigpond.net.au>
5589 * elf.c (IS_LOADED): Delete.
5590 (assign_file_positions_for_segments): Just test SEC_LOAD instead.
5591 Restore SEC_HAS_CONTENTS test to the one place it was used prior
5594 2004-09-23 Alan Modra <amodra@bigpond.net.au>
5597 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
5598 bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite. Remove
5599 redundant assignment of EM_SPARC.
5601 2004-09-22 Brian Ford <ford@vss.fsi.com>
5603 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
5604 alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
5606 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
5608 2004-09-22 Alan Modra <amodra@bigpond.net.au>
5610 * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
5611 (elf_backend_modify_segment_map): Don't define.
5613 2004-09-22 Alan Modra <amodra@bigpond.net.au>
5615 * elf.c (IS_LOADED): Define.
5616 (assign_file_positions_for_segments): Don't round up file offset of
5617 PT_LOAD segments containing no SEC_LOAD sections, instead round down.
5618 Delete code handling link script adjustment of lma. Do the adjust
5619 in later code handling similar ajustments. Remove dead code error
5620 check. Warn if section lma would require a negative offset
5621 adjustment. Tweak lma adjustment to use p_filesz rather than p_memsz.
5622 Use p_vaddr + p_memsz inside section loop in place of voff. Don't
5623 update voff in section loop. Change voff in segment loop to be an
5624 adjustment on top of "off". Set sec->filepos and update "off" later.
5625 Test for loadable sections consistently using IS_LOADED. Similarly,
5626 test for alloc-only sections other than .tbss consistently.
5627 Don't bother checking SEC_ALLOC in PT_LOAD segments. Remove FIXME.
5628 Tidy PT_NOTE handling. Use %B and %A in error messages.
5629 (assign_file_positions_except_relocs): Use %B in error message.
5631 2004-09-17 H.J. Lu <hongjiu.lu@intel.com>
5633 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
5634 (CONFIG_STATUS_DEPENDENCIES): New.
5635 (Makefile): Removed.
5636 (config.status): Likewise.
5637 * Makefile.in: Regenerated.
5639 2004-09-17 Paul Brook <paul@codesourcery.com>
5641 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
5642 (bfd_elf32_arm_process_before_allocation): Update prototype.
5643 * bfd-in2.h: Regenerate.
5644 * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
5645 (elf32_arm_link_hash_table_create): Set it.
5646 (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
5647 (bfd_elf32_arm_set_target_relocs): New function.
5648 (arm_real_reloc_type): New function.
5649 (elf32_arm_final_link_relocate): Use it. Handle R_ARM_PREL31 and
5650 R_ARM_GOT_PREL. Remove R_ARM_TARGET1.
5651 (elf32_arm_gc_sweep_hook): Ditto.
5652 (elf32_arm_check_relocs): Ditto.
5653 (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
5654 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
5656 (elf32_arm_got_prel): New variable.
5657 (elf32_arm_howto_from_type): New function.
5658 (elf32_arm_info_to_howto): Use it.
5659 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
5660 BFD_RELOC_ARM_TARGET2.
5661 * libbfd.h: Regenerate.
5662 * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
5664 2004-09-17 Alan Modra <amodra@bigpond.net.au>
5666 * ecoff.c: Update u.undef.next refs.
5667 * elf64-ppc.c: Likewise.
5668 * elflink.c: Likewise.
5669 * linker.c: Likewise.
5670 * xcofflink.c: Likewise.
5672 * elf-bfd.h (struct elf_link_hash_entry): Rearrange. Add FIXME to
5673 dynamic_def. Combine weakdef and elf_hash_value. Move vtable
5674 fields to indirect struct.
5675 * elf-m10300.c: Update u.weakdef refs.
5676 * elf32-arm.h: Likewise.
5677 * elf32-cris.c: Likewise.
5678 * elf32-frv.c: Likewise.
5679 * elf32-hppa.c: Likewise.
5680 * elf32-i370.c: Likewise.
5681 * elf32-i386.c: Likewise.
5682 * elf32-m32r.c: Likewise.
5683 * elf32-m68k.c: Likewise.
5684 * elf32-ppc.c: Likewise.
5685 * elf32-s390.c: Likewise.
5686 * elf32-sh.c: Likewise.
5687 * elf32-sparc.c: Likewise.
5688 * elf32-vax.c: Likewise.
5689 * elf32-xtensa.c: Likewise.
5690 * elf64-alpha.c: Likewise.
5691 * elf64-hppa.c: Likewise.
5692 * elf64-ppc.c: Likewise.
5693 * elf64-s390.c: Likewise.
5694 * elf64-sh64.c: Likewise.
5695 * elf64-sparc.c: Likewise.
5696 * elf64-x86-64.c: Likewise.
5697 * elfxx-ia64.c: Likewise.
5698 * elfxx-mips.c: Likewise.
5699 * elflink.c: Likewise. Also u.elf_hash_value.
5700 (elf_gc_propagate_vtable_entries_used): Update for h->vtable
5702 (elf_gc_smash_unused_vtentry_relocs): Likewise.
5703 (bfd_elf_gc_record_vtinherit): Alloc vtable.
5704 (bfd_elf_gc_record_vtentry): Likewise.
5705 * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
5707 2004-09-17 Alan Modra <amodra@bigpond.net.au>
5709 * Makefile.am: Run "make dep-am".
5710 * Makefile.in: Regenerate.
5711 * bfd-in2.h: Regenerate.
5712 * po/SRC-POTFILES.in: Regenerate.
5713 * po/bfd.pot: Regenerate.
5715 2004-09-16 Alan Modra <amodra@bigpond.net.au>
5717 * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
5718 with bitfields. Make "type" and "other" bitfields too.
5719 (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
5720 ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
5721 ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
5722 ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
5723 ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
5724 ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
5725 ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
5726 (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
5727 * elf-hppa.h: Update all uses of elf_link_hash_flags.
5728 * elf-m10300.c: Likewise.
5730 * elf32-arm.h: Likewise.
5731 * elf32-cris.c: Likewise.
5732 * elf32-frv.c: Likewise.
5733 * elf32-hppa.c: Likewise.
5734 * elf32-i370.c: Likewise.
5735 * elf32-i386.c: Likewise.
5736 * elf32-m32r.c: Likewise.
5737 * elf32-m68k.c: Likewise.
5738 * elf32-ppc.c: Likewise.
5739 * elf32-s390.c: Likewise.
5740 * elf32-sh-symbian.c: Likewise.
5741 * elf32-sh.c: Likewise.
5742 * elf32-sh64.c: Likewise.
5743 * elf32-sparc.c: Likewise.
5744 * elf32-vax.c: Likewise.
5745 * elf32-xtensa.c: Likewise.
5746 * elf64-alpha.c: Likewise.
5747 * elf64-hppa.c: Likewise.
5748 * elf64-ppc.c: Likewise.
5749 * elf64-s390.c: Likewise.
5750 * elf64-sh64.c: Likewise.
5751 * elf64-sparc.c: Likewise.
5752 * elf64-x86-64.c: Likewise.
5753 * elflink.c: Likewise.
5754 * elfxx-ia64.c: Likewise.
5755 * elfxx-mips.c: Likewise.
5756 * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
5757 * configure: Regenerate.
5758 * aclocal.m4: Regenerate.
5760 2004-09-16 Alan Modra <amodra@bigpond.net.au>
5762 * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
5763 around uses of R_ARM_TARGET1.
5764 (elf32_arm_check_relocs): Likewise.
5766 2004-09-13 Paul Brook <paul@codesourcery.com>
5768 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
5770 * bfd-in2.h: Regenerate.
5771 * libbfd.h: Regenerate.
5772 * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
5773 (elf32_arm_link_hash_table_create): Set target1_is_rel.
5774 (bfd_elf32_arm_process_before_allocation): Ditto.
5775 (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
5776 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
5777 * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
5780 2004-09-10 Joel Brobecker <brobecker@gnat.com>
5782 * hpux-core.c (thread_section_p): New function.
5783 (hpux_core_core_file_p): Fix computation of offset in call
5784 to bfd_seek. Create a ".reg" section from an arbitrary
5785 ".reg/<id>" section if none was created after having read
5788 2004-09-11 Andreas Schwab <schwab@suse.de>
5790 * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
5791 * aclocal.m4: Rebuild.
5792 * configure: Rebuild.
5794 2004-09-10 Joel Brobecker <brobecker@gnat.com>
5796 * section.c (bfd_sections_find_if): Fix parameter name in
5797 comment to match code.
5799 2004-09-10 Alan Modra <amodra@bigpond.net.au>
5801 * elf.c (assign_file_positions_except_relocs): Assign relocs
5802 stored in a bfd section.
5804 2004-09-08 Hans-Peter Nilsson <hp@axis.com>
5806 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
5807 h->gotplt_refcount to 0, not -1.
5809 2004-09-07 Hans-Peter Nilsson <hp@axis.com>
5811 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
5812 case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
5814 (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
5815 handle symbol visibility here.
5817 2004-09-07 Alan Modra <amodra@bigpond.net.au>
5819 * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
5820 (is_ppc64_elf_target): Rename from is_ppc64_target. Update all
5822 (ppc_stub_name): Remove trailing "+0" on stub name.
5823 (create_linkage_sections): Create relocations for
5824 branch lookup table when --emit-relocs as well as when --shared.
5825 (ppc_build_one_stub): Emit relocs for long branch stubs. Adjust
5826 relbrlt test. For --emit-stub-syms, always output a sym even when
5827 one already exists on a plt call stub. Put stub type in the stub
5829 (ppc_size_one_stub): Size long branch stub relocs. Adjust relbrlt
5831 (ppc64_elf_size_stubs): Count global sym stubs added. Zero
5832 reloc_count in stub sections. Adjust relbrlt test.
5833 (ppc64_elf_build_stubs): Adjust relbrlt test. Tweak stats output.
5834 * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
5835 (elf_link_input_bfd): Ignore symbol index zero relocs when checking
5836 for relocs against discarded symbols. Fix comments.
5838 2004-09-06 Mark Mitchell <mark@codesourcery.com>
5840 * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
5841 * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
5843 (map_sections_to_segments): ... here. Use it. Assign a file
5844 position to the .dynamic section if it is not loadable, but part
5845 of the PT_DYNAMIC segment.
5846 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
5847 offsets, not VMAs, for the BPABI. Do not fill in the header in
5848 the .got.plt section for the BPABI.
5849 * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
5851 (elf_backend_want_got_plt): Define to zero for Symbian OS.
5853 2004-09-06 Nick Clifton <nickc@redhat.com>
5855 * elflink.c (elf_link_add_object_symbols): Set the error code to
5856 bfd_error_wrong_format when the input format does not match the
5859 2004-09-06 Alan Modra <amodra@bigpond.net.au>
5861 * elf64-ppc.c (is_ppc64_target): New function, extracted from..
5862 (ppc64_elf_check_directives): ..here.
5863 (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
5864 before accessing ppc64_elf_tdata.
5865 (ppc64_elf_finish_dynamic_sections): And here too.
5867 2004-09-04 Alan Modra <amodra@bigpond.net.au>
5869 * bfd.c (_bfd_default_error_handler): Correct loop exit.
5871 2004-09-03 Mark Mitchell <mark@codesourcery.com>
5873 * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
5874 * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
5875 (bfd_elf32_littlearm_symbian_vec): Likewise.
5876 * configure: Regenerated.
5877 * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
5878 * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
5879 (PLT_ENTRY_SIZE): Likewise.
5880 (bfd_vma_elf32_arm_symbian_plt_entry): New
5882 (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
5884 (create_got_section): Don't create sections when generating BPABI
5886 (elf32_arm_create_dynamic_sections): Tidy.
5887 (elf32_arm_link_hash_table_create): Set plt_header_size,
5888 plt_entry_size, and symbian_p.
5889 (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
5890 generating BPABI objects.
5891 (allocate_dynrelocs): Use htab->plt_header_size, not
5892 PLT_HEADER_SIZE. Do not add to .got.plt when
5893 generating BPABI objects.
5894 (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
5895 * elfarm-nabi.c: Add SymbianOS target vectors.
5896 * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
5897 (_bfd_elf_link_create_dynamic_sections): Likewise.
5898 * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
5899 (elfNN_bed): Use it.
5900 * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
5901 (bfd_elf32_littlearm_symbian_vec): Likewise.
5902 (_bfd_target_vector): Add them.
5904 2004-09-03 Nick Clifton <nickc@redhat.com>
5907 * coffcode.h (handle_COMDAT): Replace abort with an warning
5908 message and allow the scan to continue.
5910 2004-09-02 Alan Modra <amodra@bigpond.net.au>
5912 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
5913 in when reading relocs, not our sorted syms. Remove unnecessary
5916 2004-08-31 Eric Botcazou <ebotcazou@libertysurf.fr>
5918 * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
5920 2004-08-30 Nathanael Nerode <neroden@gcc.gnu.org>
5922 * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
5923 Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
5924 replace uses of *_alias with *_noncanonical.
5925 * aclocal.m4: Rebuild with aclocal 1.4p6.
5926 * Makefile.in: Rebuild with automake 1.4p6.
5927 * doc/Makefile.in: Rebuild with automake 1.4p6.
5928 * configure.in: Autoupdate with autoupdate 2.59.
5929 * config.in: Regenerate with autoheader 2.59.
5930 * configure: Regnerate with autoconf 2.59.
5932 2004-08-28 Alan Modra <amodra@bigpond.net.au>
5934 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
5935 symbol pointer arrays before modifying.
5937 2004-08-28 Alan Modra <amodra@bigpond.net.au>
5939 * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
5940 * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
5941 * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
5942 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
5943 * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
5944 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
5945 Use both symbol tables on non-relocatable objects. Use a common
5946 error exit. Fix "mid" warning.
5947 * libbfd.h: Regenerate.
5948 * bfd-in2.h: Regenerate.
5950 2004-08-28 Alan Modra <amodra@bigpond.net.au>
5952 * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
5954 (struct sfpr_def_parms): Save some space.
5955 (sfpr_define): Here too.
5957 * elf64-ppc.c (compare_symbols): Put section syms first.
5958 (sym_exists_at): New function.
5959 (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
5960 points only for relocatable files. Use .opd section contents
5961 otherwise. Generally clean up the code.
5963 2004-08-27 Alan Modra <amodra@bigpond.net.au>
5965 * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
5966 LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
5967 (struct sfpr_def_parms): New.
5968 (sfpr_define): New function.
5969 (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
5970 (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
5971 (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
5972 (savefpr1_tail, restfpr1_tail): New functions.
5973 (savevr, savevr_tail, restvr, restvr_tail): New functions.
5974 (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
5975 (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
5976 code. Define all ABI mandated _save and _rest functions.
5978 2004-08-26 Paul Brook <paul@codesourcery.com>
5980 * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
5982 2004-08-26 Alan Modra <amodra@bigpond.net.au>
5984 * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
5987 2004-08-26 Alan Modra <amodra@bigpond.net.au>
5989 * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
5990 that pcrel correction is applied for R_386_PC32.
5992 2004-08-25 Alan Modra <amodra@bigpond.net.au>
5994 * elf32-i386.c (elf_i386_relocate_section): Zero section contents
5995 for R_386_32 and R_386_PC32 relocs against symbols defined in
5998 2004-08-25 Dmitry Diky <diwil@spec.ru>
6000 * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
6001 Add new relocations.
6002 * bfd-in2.h: Regenerate.
6003 * libbfd.h: Regenerate.
6004 * elf32-msp430.c: Clean-up code.
6005 (elf_msp430_howto_table): Add new relocation entries.
6006 (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
6007 (msp430_elf_relax_section): New function.
6008 (msp430_elf_relax_delete_bytes): New function.
6009 (msp430_elf_symbol_address_p): New function.
6011 2004-08-24 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
6013 * elf32-m32r.c (m32r_elf_relocate_section): Handle
6014 R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
6016 2004-08-20 Daniel Jacobowitz <dan@debian.org>
6018 * elflink.c (_bfd_elf_section_already_linked): Handle
6019 SEC_LINK_DUPLICATES_SAME_CONTENTS.
6021 2004-08-19 Mark Mitchell <mark@codesourcery.com>
6023 * config.bfd (arm*-*-symbianelf*): New target.
6024 (arm*-*-eabi*): Likewise.
6026 2004-08-19 Alan Modra <amodra@bigpond.net.au>
6028 * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
6029 "struct ppc_link_hash_entry *".
6030 (ppc64_elf_relocate_section): Ditto for type of h. Introduce h_elf
6031 to satisfy RELOC_FOR_GLOBAL_SYMBOL.
6033 2004-08-19 Jakub Jelinek <jakub@redhat.com>
6035 * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
6036 entries (where fd_aux overlaps next entry's fd_func).
6037 Add non_overlapping argument, use it.
6038 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
6039 ppc64_elf_size_stubs, ppc64_elf_relocate_section,
6040 ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
6041 as indexes into opd_sym_map/opd_adjust array.
6042 * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
6044 2004-08-18 Alan Modra <amodra@bigpond.net.au>
6046 * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
6047 if we can look up their function descriptor in a regular file.
6049 2004-08-18 Nick Clifton <nickc@redhat.com>
6052 * cofflink.c (coff_link_add_symbols): Check that the comdat
6053 pointer in the coff_section_data structure has been initialised
6056 2004-08-18 Alan Modra <amodra@bigpond.net.au>
6059 * elflink.c (bfd_elf_record_link_assignment): Add comment about
6060 changing bfd_link_hash_undefined to bfd_link_hash_new.
6062 2004-08-17 Jakub Jelinek <jakub@redhat.com>
6064 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
6066 * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
6067 (synthetic_opd, synthetic_relocatable): New variables.
6068 (compare_symbols, compare_relocs): New helper routines.
6069 (ppc64_elf_get_synthetic_symtab): New function.
6070 * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
6072 * bfd-in2.h: Regenerated.
6073 * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
6074 to relsyms. Return 0 if abfd is relocatable.
6076 2004-08-17 Alan Modra <amodra@bigpond.net.au>
6078 * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
6080 2004-08-17 Nick Clifton <nickc@redhat.com>
6082 * (is_arm_mapping_symbol_name): New function - return true
6083 when a symbol name matches the requirements for an ARM mapping
6085 (arm_elf_find_function): New function based on
6086 elf_find_function in elf.c but skipping ARM mapping symbols
6087 and including thumb function symbols.
6088 (elf32_arm_find_nearest_line): Use arm_elf_find_function.
6089 (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
6091 2004-08-17 Alan Modra <amodra@bigpond.net.au>
6093 * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
6094 (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
6095 (ppc64_elf_brtaken_reloc): Here too.
6097 2004-08-17 Alan Modra <amodra@bigpond.net.au>
6099 * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
6101 (ppc64_elf_check_directives): Check that we have the right hash
6102 table before proceeding.
6104 2004-08-17 Alan Modra <amodra@bigpond.net.au>
6106 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
6107 (adjust_opd_syms): Attach opd syms for deleted entries to one of
6108 the sections that will be discarded.
6110 2004-08-16 Alan Modra <amodra@bigpond.net.au>
6112 * elflink.c (elf_section_complain_discarded): Ignore .fixup.
6114 2004-08-16 Alan Modra <amodra@bigpond.net.au>
6116 * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
6117 free space available.
6119 2004-08-16 Alan Modra <amodra@bigpond.net.au>
6121 * pdp11.c (struct pdp11_aout_reloc_external): Delete. Replace
6122 occurrences with bfd_byte * thoughout file.
6124 * coff-rs6000.c (do_shared_object_padding): Warning fix.
6125 (xcoff_write_armap_big): Likewise.
6126 (xcoff_write_archive_contents_old): Likewise.
6127 (xcoff_write_archive_contents_big): Likewise.
6129 * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
6131 2004-08-13 Nick Clifton <nickc@redhat.com>
6133 * elf32-arm.h: Convert to ISO C90.
6135 2004-08-13 Alan Modra <amodra@bigpond.net.au>
6138 * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
6141 2004-08-13 Alan Modra <amodra@bigpond.net.au>
6143 * bfd.c (_bfd_default_error_handler): Handle %A and %B.
6144 (bfd_archive_filename, bfd_get_section_ident): Delete.
6145 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
6146 bfd_archive_filename.
6147 * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
6148 to warn about symbols in discarded sections. Use _bfd_error_handler.
6149 * aout-adobe.c (aout_adobe_callback): See below.
6150 * aout-cris.c (swap_ext_reloc_in): ..
6151 * coff-arm.c (find_thumb_glue, find_arm_glue,
6152 coff_arm_relocate_section, bfd_arm_process_before_allocation,
6153 coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
6154 coff_arm_copy_private_bfd_data): ..
6155 * coff-i860.c (i860_reloc_processing): ..
6156 * coff-mcore.c (mcore_coff_unsupported_reloc,
6157 coff_mcore_relocate_section): ..
6158 * coff-ppc.c (coff_ppc_relocate_section): ..
6159 * coff-rs6000.c (xcoff_create_csect_from_smclas
6160 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
6161 sh_swap_insns, sh_relocate_section): ..
6162 * coff-tic54x.c (tic54x_reloc_processing): ..
6163 * coff-tic80.c (coff_tic80_relocate_section): ..
6164 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
6165 * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
6166 coff_slurp_symbol_table, coff_classify_symbol,
6167 coff_slurp_reloc_table): ..
6168 * coffgen.c (_bfd_coff_read_string_table): ..
6169 * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
6170 _bfd_coff_generic_relocate_section): ..
6171 * cpu-arm.c (bfd_arm_merge_machines): ..
6172 * cpu-sh.c (sh_merge_bfd_arch): ..
6173 * elf-hppa.h (elf_hppa_relocate_section): ..
6174 * elf.c (bfd_elf_string_from_elf_section, setup_group,
6175 _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
6176 assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
6177 copy_private_bfd_data, _bfd_elf_validate_reloc): ..
6178 * elf32-arm.h (find_thumb_glue, find_arm_glue,
6179 bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
6180 elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
6181 elf32_arm_relocate_section, elf32_arm_set_private_flags,
6182 elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
6183 * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
6184 cris_elf_merge_private_bfd_data
6185 * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
6186 * elf32-gen.c (elf32_generic_link_add_symbols): ..
6187 * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
6188 elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
6189 elf32_hppa_relocate_section): ..
6190 * elf32-i370.c (i370_elf_merge_private_bfd_data,
6191 i370_elf_check_relocs, i370_elf_relocate_section): ..
6192 * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
6193 elf_i386_relocate_section): ..
6194 * elf32-m32r.c (m32r_elf_relocate_section,
6195 m32r_elf_merge_private_bfd_data): ..
6196 * elf32-m68hc1x.c (m68hc12_add_stub,
6197 _bfd_m68hc11_elf_merge_private_bfd_data): ..
6198 * elf32-m68k.c (elf_m68k_relocate_section): ..
6199 * elf32-mcore.c (mcore_elf_unsupported_reloc,
6200 mcore_elf_relocate_section): ..
6201 * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
6202 ppc_elf_check_relocs, ppc_elf_relocate_section,
6203 ppc_elf_begin_write_processing): ..
6204 * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
6205 elf_s390_relocate_section): ..
6206 * elf32-sh-symbian.c (sh_symbian_import_as,
6207 sh_symbian_process_embedded_commands,
6208 sh_symbian_relocate_section): ..
6209 * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
6210 sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
6211 sh_elf_merge_private_data): ..
6212 * elf32-sparc.c (elf32_sparc_check_relocs,
6213 elf32_sparc_relocate_section,
6214 elf32_sparc_merge_private_bfd_data): ..
6215 * elf32-v850.c (v850_elf_check_relocs,
6216 v850_elf_merge_private_bfd_data): ..
6217 * elf32-xtensa.c (elf_xtensa_check_relocs,
6218 elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
6219 * elf64-alpha.c (elf64_alpha_relax_with_lituse,
6220 elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
6221 elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
6222 * elf64-gen.c (elf64_generic_link_add_symbols): ..
6223 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
6224 ppc64_elf_check_relocs, ppc64_elf_edit_opd,
6225 ppc64_elf_relocate_section): ..
6226 * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
6227 elf_s390_relocate_section): ..
6228 * elf64-sh64.c (sh_elf64_relocate_section): ..
6229 * elf64-sparc.c (sparc64_elf_check_relocs,
6230 sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
6231 sparc64_elf_merge_private_bfd_data): ..
6232 * elf64-x86-64.c (elf64_x86_64_check_relocs,
6233 elf64_x86_64_relocate_section): ..
6234 * elflink.c (_bfd_elf_add_default_symbol,
6235 _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
6236 _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
6237 bfd_elf_size_dynamic_sections, elf_link_output_extsym,
6238 elf_get_linked_section_vma, elf_fixup_link_order,
6239 bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
6240 bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
6241 * elfxx-ia64.c (elfNN_ia64_relax_section,
6242 elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
6243 * elfxx-mips.c (mips_elf_perform_relocation,
6244 _bfd_mips_elf_check_relocs,
6245 _bfd_mips_elf_merge_private_bfd_data): ..
6246 * ieee.c (ieee_slurp_external_symbols): ..
6247 * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
6248 * libbfd.c (_bfd_generic_verify_endian_match): ..
6249 * linker.c (_bfd_generic_link_add_one_symbol,
6250 _bfd_generic_section_already_linked): ..
6251 * pdp11.c (translate_to_native_sym_flags): ..
6252 * pe-mips.c (coff_pe_mips_relocate_section): ..
6253 * peicode.h (pe_ILF_build_a_bfd): ..
6254 * srec.c (srec_bad_byte): ..
6255 * stabs.c (_bfd_link_section_stabs): ..
6256 * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
6257 Replace all uses of bfd_archive_filename and bfd_get_section_ident
6258 with corresponding %B and %A in _bfd_error_handler format string.
6259 Replace occurrences of "fprintf (stderr," with _bfd_error_handler
6260 calls to use %A and %B. Fix "against symbol .. from section" and
6261 similar error messages. Combine multiple _bfd_error_handler calls
6262 where they were separated due to bfd_archive_filename deficiencies.
6263 * bfd-in2.h: Regenerate.
6265 2004-08-12 H.J. Lu <hongjiu.lu@intel.com>
6267 * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
6270 2004-08-10 Alan Modra <amodra@bigpond.net.au>
6272 * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
6273 (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
6274 Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
6276 (link_hash_newfunc): Init was_undefined.
6277 (add_symbol_adjust): Don't set undefined dot symbols to defweak;
6278 Use undefweak instead.
6279 (ppc64_elf_check_directives): Fix undefs chain.
6280 (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
6282 (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
6283 (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
6284 * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
6286 2004-08-09 Jakub Jelinek <jakub@redhat.com>
6288 * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
6289 error, test input_section flags rather than sec.
6291 2004-08-09 Alan Modra <amodra@bigpond.net.au>
6293 * elf-bfd.h (struct elf_backend_data): Add
6294 elf_backend_archive_symbol_lookup.
6295 (_bfd_elf_archive_symbol_lookup): Declare.
6296 * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
6297 (elf_link_add_archive_symbols): ..extracted from here. Call the
6299 * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
6300 (elfNN_bed): Init new field.
6301 * elf64-ppc.c (elf_backend_check_directives): Define.
6302 (elf_backend_archive_symbol_lookup): Define.
6303 (struct ppc_link_hash_table): Add tls_get_add_fd. Make tls_get_add
6304 a ppc_link_hash_entry pointer.
6306 (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
6307 (add_symbol_adjust, ppc64_elf_check_directives): New functions.
6308 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
6309 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
6310 ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
6311 ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
6312 ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
6315 2004-08-09 Alan Modra <amodra@bigpond.net.au>
6317 * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
6318 (ppc64_elf_add_symbol_hook): Test for NULL section.
6319 (get_sym_h): Formatting.
6320 (ppc64_elf_size_stubs): Include reloc addend in value stored as
6323 * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
6324 long branch stubs with code handling plt and r2off branch stubs.
6326 2004-08-09 Alan Modra <amodra@bigpond.net.au>
6328 * elf-bfd.h (_bfd_elf_gc_mark): Declare.
6329 * elflink.c (elf_link_input_bfd): Formatting.
6330 (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global. Adjust
6332 * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
6333 (link_hash_newfunc): Don't set it.
6334 (ppc64_elf_copy_indirect_symbol): Nor copy it.
6335 (ppc64_elf_mark_entry_syms): Delete.
6336 (ppc64_elf_gc_mark_hook): Mark entry syms here. Also mark opd
6337 sections. Use get_opd_info.
6338 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
6340 2004-08-09 Alan Modra <amodra@bigpond.net.au>
6342 * elf64-ppc.c (adjust_opd_syms): Fix merge error.
6344 * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
6345 (func_desc_adjust): Don't set have_undefweak.
6346 (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
6347 (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
6349 * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
6350 "struct ppc_link_hash_entry *". Adjust all references.
6351 (ppc64_elf_hide_symbol): Correct a comment.
6353 * elf64-ppc.c (get_opd_info): New function.
6354 (adjust_opd_syms): Use get_opd_info. Define removed symbols as zero.
6355 (ppc64_elf_edit_opd): Use get_opd_info. Check that sym has a dot
6356 before calling get_fdh. Test fdh rather than h before dereferencing
6357 fdh. Mark removed symbols in opd_adjust.
6358 (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
6359 (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
6361 (ppc64_elf_output_symbol_hook): Likewise.
6363 2004-08-06 Paul Brook <paul@codesourcery.com>
6365 * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
6366 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
6367 BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
6368 * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
6369 and BFD_RELOC_ARM_SBREL32.
6370 * bfd-in2.h, bbfd.h: Regenerate.
6372 2004-08-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6374 * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
6375 the dynamic link symbol actually in use.
6377 2004-08-01 Stephane Carrez <stcarrez@nerim.fr>
6379 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
6381 2004-07-31 Joel Brobecker <brobecker@gnat.com>
6382 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6384 * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
6385 SHN_MIPS_TEXT and SHN_MIPS_DATA.
6387 2004-07-30 H.J. Lu <hongjiu.lu@intel.com>
6388 Nick Clifton <nickc@redhat.com>
6391 * bfd.c (_bfd_default_error_handler): Make it global.
6393 * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
6395 * elf.c (assign_section_numbers): Cope gracefully with sections
6396 which have SHF_LINK_ORDER set but no sh_link set up.
6397 * elflink.c (elf_get_linked_section_vma): Likewise.
6399 * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
6402 * elfxx-target.h (elf_backend_link_order_error_handler): New.
6403 Set it to _bfd_default_error_handler.
6404 (elfNN_bed): Add elf_backend_link_order_error_handler.
6406 * libbfd-in.h (_bfd_default_error_handler): New.
6408 * libbfd.h: Regenerated.
6410 2004-07-30 Jakub Jelinek <jakub@redhat.com>
6412 * archures.c (bfd_mach_sparc_64bit_p): Define.
6413 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
6414 * bfd-in2.h: Rebuilt.
6416 2004-07-29 Alexandre Oliva <aoliva@redhat.com>
6418 Introduce SH2a support.
6419 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
6420 * archures.c (bfd_mach_sh2a_nofpu): New.
6421 * bfd-in2.h: Rebuilt.
6422 * cpu-sh.c (SH2A_NOFPU_NEXT): New.
6423 (arch_info_struct): Add sh2a_nofpu.
6424 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
6425 2003-12-29 DJ Delorie <dj@redhat.com>
6426 * reloc.c: Add relocs for sh2a.
6427 * bfd-in2.h: Regenerate.
6428 * libbfd.hh: Regenerate.
6429 2003-12-01 Michael Snyder <msnyder@redhat.com>
6430 * archures.c (bfd_mach_sh2a): New.
6431 * bfd-in2.h: Rebuilt.
6432 * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
6434 (arch_info_struct): Add sh2a.
6435 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
6437 2004-07-28 Nick Clifton <nickc@redhat.com>
6438 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6441 * som.c (setup_sections): Improve estimation of space sizes in
6442 relocatable objects.
6444 2004-07-27 Jason Thorpe <thorpej@wasabisystems.com>
6445 * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
6446 bfd_elf32_hppa_nbsd_vec. Add bfd_elf32_hppa_linux_vec
6448 * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
6449 * configure: Regenerate.
6450 * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
6451 case that accepts OSABI=NetBSD and OSABI=SysV.
6452 (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
6453 the base of .got or .data (if .got does not exist).
6454 (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
6456 (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
6457 (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
6458 * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
6459 (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
6461 2004-07-27 H.J. Lu <hongjiu.lu@intel.com>
6464 * elf-bfd.h (bfd_elf_section_data): Add sec_group.
6465 (elf_sec_group): Defined.
6466 (bfd_elf_match_symbols_in_sections): New prototype.
6467 (_bfd_elf_setup_group_pointers): Likewise.
6469 * elf.c (bfd_elf_discard_group): Abort.
6470 (bfd_elf_set_group_contents): Also include relocation sections.
6471 Remove zero-fill for ld -r.
6472 (_bfd_elf_setup_group_pointers): New function.
6473 (elf_sort_elf_symbol): Likewise.
6474 (elf_sym_name_compare): Likewise.
6475 (bfd_elf_match_symbols_in_sections): Likewise.
6477 * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
6479 * elflink.c (match_group_member): New.
6480 (elf_link_input_bfd): Check group member for discarded section.
6481 (try_match_symbols_in_sections): New function.
6482 (already_linked): Likewise.
6483 (_bfd_elf_section_already_linked): Support mixing comdat group
6484 and linkonce section.
6486 * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
6487 * linker.c (bfd_section_already_linked_table_traverse): New.
6489 * libbfd.h: Regenerated.
6491 2004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
6493 * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
6494 BFD_RELOC_CRX_SWITCH32.
6495 * bfd-in2.h: Regenerate.
6496 * libbfd.h: Regenerate.
6497 * elf32-crx.c: Support relocation/relaxation of
6498 BFD_RELOC_CRX_SWITCH* types.
6500 2004-07-27 Alan Modra <amodra@bigpond.net.au>
6502 * elf64-ppc.c: Correct "Linker stubs" comment.
6504 2004-07-26 H.J. Lu <hongjiu.lu@intel.com>
6506 * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
6508 (elf_linked_to_section): New.
6510 * elf.c (assign_section_numbers): Set up sh_link for
6513 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
6514 to sh_link for SHT_IA_64_UNWIND sections.
6516 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
6518 * elflink.c (elf_fixup_link_order): Add _() to error message.
6520 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
6522 * elflink.c (elf_fixup_link_order): Issue a warning and flag
6525 2004-07-21 H.J. Lu <hongjiu.lu@intel.com>
6527 * aout-adobe.c (aout_32_section_already_linked): Defined.
6528 * aout-target.h (MY_section_already_linked): Likewise.
6529 * aout-tic30.c (MY_section_already_linked): Likewise.
6530 * binary.c (binary_section_already_linked): Likewise.
6531 * bout.c (b_out_section_already_linked): Likewise.
6532 * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
6533 * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
6534 * coffcode.h (coff_section_already_linked): Likewise.
6535 * i386msdos.c (msdos_section_already_linked): Likewise.
6536 * i386os9k.c (os9k_section_already_linked): Likewise.
6537 * ieee.c (ieee_section_already_linked): Likewise.
6538 * ihex.c (ihex_section_already_linked): Likewise.
6539 * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
6540 * mmo.c (mmo_section_already_linked): Likewise.
6541 * nlm-target.h (nlm_section_already_linked): Likewise.
6542 * oasys.c (oasys_section_already_linked): Likewise.
6543 * pef.c (bfd_pef_section_already_linked): Likewise.
6544 * ppcboot.c (ppcboot_section_already_linked): Likewise.
6545 * som.c (som_bfd_discard_group): Likewise.
6546 * srec.c (srec_section_already_linked): Likewise.
6547 * tekhex.c (tekhex_section_already_linked): Likewise.
6548 * versados.c (versados_section_already_linked): Likewise.
6549 * vms.c (vms_section_already_linked): Likewise.
6550 * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
6551 * xsym.c (bfd_sym_section_already_linked): Likewise.
6553 * bfd-in.h (bfd_section_already_linked_table_init): New.
6554 (bfd_section_already_linked_table_free): Likewise.
6556 * coff-rs6000.c (rs6000coff_vec): Add
6557 _bfd_generic_section_already_linked.
6558 (pmac_xcoff_vec): Likewise.
6559 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6560 (aix5coff64_vec): Likewise.
6562 * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
6563 * elflink.c (_bfd_elf_section_already_linked): New function.
6565 * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
6567 * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
6568 (_bfd_generic_section_already_linked): New.
6569 (bfd_section_already_linked_hash_entry): Likewise.
6570 (bfd_section_already_linked): Likewise.
6571 (bfd_section_already_linked_table_lookup): Likewise.
6572 (bfd_section_already_linked_table_insert): Likewise.
6574 * linker.c (bfd_section_already_linked): New.
6575 (_bfd_section_already_linked_table): Likewise.
6576 (bfd_section_already_linked_table_lookup): Likewise.
6577 (bfd_section_already_linked_table_insert): Likewise.
6578 (already_linked_newfunc): Likewise.
6579 (bfd_section_already_linked_table_init): Likewise.
6580 (bfd_section_already_linked_table_free): Likewise.
6581 (_bfd_generic_section_already_linked): Likewise.
6583 * section.c (bfd_section): Remove comdat.
6584 (bfd_comdat_info): Moved to ...
6585 * bfd-in.h (coff_comdat_info): Here.
6586 (bfd_coff_get_comdat_section): New.
6587 * coffgen.c (bfd_coff_get_comdat_section): Likewise.
6588 * libcoff-in.h (coff_section_tdata): Add comdat.
6589 * coffcode.h (handle_COMDAT): Updated.
6590 * cofflink.c (coff_link_add_symbols): Likewise.
6591 * ecoff.c (bfd_debug_section): Likewise.
6593 * targets.c (bfd_target): Add _section_already_linked.
6594 (BFD_JUMP_TABLE_LINK): Updated.
6596 * bfd-in2.h: Regenerated.
6597 * libbfd.h: Likewise.
6598 * libcoff.h: Likewise.
6600 2003-07-21 Paul Brook <paul@codesourcery.com>
6602 * elflink.c (elf_get_linked_section_vma, compare_link_order,
6603 elf_fixup_link_order): New functions.
6604 (bfd_elf_final_link): Call elf_fixup_link_order.
6606 2004-07-21 Alexandre Oliva <aoliva@redhat.com>
6608 * elf-bfd.h (ELF_COMMON_DEF_P): New.
6609 * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
6611 * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
6612 _bfd_elf_symbol_refs_local_p.
6613 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
6616 2004-07-19 H.J. Lu <hongjiu.lu@intel.com>
6618 * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
6620 (bfd_elf_get_dyn_lib_class): New prototype.
6621 * elf.c (bfd_elf_get_dyn_lib_class): New function.
6623 * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
6624 DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
6625 entry is needed. Issue an error if a DT_NEEDED entry is needed
6626 for a file marked DYN_NO_NEEDED.
6627 (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
6630 * bfd-in2.h: Regenerated.
6632 2004-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6634 * elflink.c (elf_section_complain_discarded): Don't complain in
6637 2004-07-10 James E Wilson <wilson@specifixinc.com>
6639 * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
6640 (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
6641 (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
6642 elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
6644 (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64. Change
6645 bfd_put_64 to bfd_putl64.
6646 (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
6648 2004-07-09 H.J. Lu <hongjiu.lu@intel.com>
6651 * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
6652 .init/.fini sections when trying to relax it.
6654 2004-07-09 Jie Zhang <zhangjie@magima.com.cn>
6656 * elf.c (assign_file_positions_for_segments): Make sure the
6657 .dynamic section is the first section in the PT_DYNAMIC segment.
6659 2004-07-09 Nick Clifton <nickc@redhat.com>
6661 * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
6662 * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
6663 sh_elf_get_flags_from_mach functions so that they do not conflict
6664 when this target is built with other sh-elf targets.
6665 * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
6666 suppression of this function.
6667 (sh_elf_find_flags): Likewise.
6669 2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
6671 * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
6672 (ALL_MACHINES_CFILES): Add cpu-crx.c.
6673 (BFD32_BACKENDS): Add elf32-crx.lo.
6674 (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
6675 (cpu-crx.lo): New target.
6676 (elf32-crx.lo): New target.
6677 * Makefile.in: Regenerate.
6678 * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
6679 (bfd_archures_list): Add bfd_crx_arch.
6680 * bfd-in2.h: Regenerate.
6681 * config.bfd: Handle crx-*-elf*, crx*.
6682 * configure.in: Handle bfd_elf32_crx_vec.
6683 * configure: Regenerate.
6684 * cpu-crx.c: New file.
6685 * elf32-crx.c: Likewise.
6686 * libbfd.h: Regenerate.
6687 * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
6688 BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
6689 BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
6690 BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
6691 BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
6692 BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
6693 * targets.c (bfd_elf32_crx_vec): Declare.
6694 (bfd_target_vector): Add bfd_elf32_crx_vec.
6696 2004-07-06 Nick Clifton <nickc@redhat.com>
6698 * config.bfd: Add sh-symbian-elf target.
6699 * configure.in: Add bfd_elf32_shl_symbian_vec.
6700 * configure: Regenerate.
6701 * elf-bfd.h (struct elf_backend_data): Add new field
6703 * elflink.c (elf_link_add_object_symbols): Invoke the
6704 check_directives function, if defined.
6705 * elfxx-target.h: Provide a default, NULL definition for
6707 * targets.c: Add bfd_elf32_shl_symbian_vec.
6708 * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
6710 (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
6711 * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
6712 (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
6713 not already been defined.
6714 * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
6715 * sh-symbian.c: New file. Provide functions to support the
6716 * sh-symbian-elf target.
6717 * Makefile.am: Add elf32-sh-symbian.c
6718 * Makefile.in: Regenerate.
6720 2004-07-05 Andrew Stubbs <andrew.stubbs@superh.com>
6722 * elf32-sh.c: Include ../opcodes/sh-opc.h.
6723 * Makefile.am: Ran make dep-am.
6724 * Makefile.in: Ran make dep-in.
6726 2004-07-03 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
6728 * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
6731 2004-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
6733 * config.bfd: Add want64 to configuration target s390-*-linux*.
6735 2004-07-01 H.J. Lu <hongjiu.lu@intel.com>
6737 * bfd.c (bfd_get_section_ident): New.
6739 * elflink.c (elf_link_read_relocs_from_section): Call
6740 bfd_get_section_ident to identify the section when reporting
6742 (_bfd_elf_link_output_relocs): Likewise.
6743 (elf_link_output_extsym): Likewise.
6744 (elf_link_input_bfd): Likewise.
6745 (bfd_elf_gc_record_vtinherit): Likewise.
6747 * bfd-in2.h: Regenerated.
6749 2004-07-01 Jie Zhang <zhangjie@magima.com.cn>
6750 Nick Clifton <nickc@redhat.com>
6753 * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
6754 of section symbols to mips_elf_sort_hash_table ().
6756 2004-07-01 Alan Modra <amodra@bigpond.net.au>
6758 * elflink.c (elf_section_ignore_discarded_relocs): Revert last
6760 (elf_section_complain_discarded): New function. Handle
6761 .gcc_except_table too.
6762 (elf_link_input_bfd): Rewrite handling of relocs against symbols
6763 in discarded sections.
6764 * elf-bfd.h (elf_discarded_section): Protect macro arg.
6766 2004-06-30 James E Wilson <wilson@specifixinc.com>
6768 * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff. Initialize
6769 to NULL. Call get_pltoff if NULL and NEED_PLTOFF is true.
6771 2004-06-30 H.J. Lu <hongjiu.lu@intel.com>
6774 * elflink.c (elf_link_input_bfd): Issue an error for non-debug
6775 local references to discarded sections and report their
6778 2004-06-30 Alan Modra <amodra@bigpond.net.au>
6780 * elflink.c (elf_section_ignore_discarded_relocs): Don't test
6781 sec_info_type, test section name instead.
6783 2004-06-29 H.J. Lu <hongjiu.lu@intel.com>
6786 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
6787 in .init/.fini sections.
6789 2004-06-29 Bob Wilson <bob.wilson@acm.org>
6791 * elf32-xtensa.c (elf_xtensa_relocate_section): Use
6792 bfd_get_section_limit.
6794 2004-06-29 Bob Wilson <bob.wilson@acm.org>
6796 * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
6797 output section size.
6799 2004-06-29 Alan Modra <amodra@bigpond.net.au>
6801 * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
6803 (mmix_elf_perform_relocation): Adjust for above change.
6804 (mmix_elf_relocate_section): Likewise.
6805 (mmix_elf_relax_section): Likewise. Use output_section->rawsize.
6806 (mmix_elf_get_section_contents): Delete.
6807 (bfd_elf64_get_section_contents): Delete.
6808 (mmix_elf_relocate_section): Zero stub area.
6809 * linker.c (default_indirect_link_order): Alloc max of section size
6811 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
6812 * section.c (bfd_malloc_and_get_section): Likewise.
6813 (struct bfd_section): Update rawsize comment.
6814 * bfd-in2.h: Regenerate.
6816 * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
6818 2004-06-29 Alan Modra <amodra@bigpond.net.au>
6820 * bfd-in.h (bfd_get_section_limit): Define.
6821 * reloc.c (bfd_perform_relocation, bfd_install_relocation)
6822 (_bfd_final_link_relocate): Use bfd_get_section_limit.
6823 * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
6824 * coff-arm.c (coff_arm_relocate_section): Likewise.
6825 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
6826 * cpu-ns32k.c (do_ns32k_reloc): Likewise.
6827 (bfd_ns32k_final_link_relocate): Likewise.
6828 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
6829 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
6830 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
6831 (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
6832 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
6833 (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
6834 * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
6835 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
6836 * elf32-or32.c (or32_elf_consth_reloc): Likewise.
6837 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
6838 * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
6839 * elf32-sh.c (sh_elf_reloc_loop): Likewise.
6840 * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
6841 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
6842 * elf32-v850.c (v850_elf_reloc): Likewise.
6843 * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
6844 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
6845 * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
6846 * elf64-mips.c (mips_elf64_gprel32_reloc)
6847 (mips16_gprel_reloc): Likewise.
6848 * elf64-mmix.c (mmix_elf_reloc): Likewise.
6849 * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
6850 * elf64-sparc.c (init_insn_reloc): Likewise.
6851 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
6852 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
6853 (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
6854 (_bfd_mips_elf_generic_reloc): Likewise.
6855 * bfd-in2.h: Regenerate.
6857 2004-06-28 Alan Modra <amodra@bigpond.net.au>
6859 * bfd-in.h (struct stab_info): Move from stabs.c.
6860 * stabs.c (struct stab_link_includes_table): Delete.
6861 (stab_link_includes_lookup): Delete.
6862 (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
6863 level of indirection from sinfo parm.
6864 (_bfd_link_section_stabs): Likewise. Set SEC_LINKER_CREATED on
6865 stabstr section. Adjust hash table accesses.
6866 * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
6867 alloc. Adjust stab_info test.
6868 * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
6869 (_bfd_coff_final_link): Adjust stab_info test.
6870 (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
6871 * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
6873 * libcoff-in.h (struct coff_link_hash_table): Likewise.
6874 * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
6875 * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
6876 stabstr section. Adjust stab_info test.
6877 * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
6878 (_bfd_write_stab_strings): Adjust prototypes.
6879 * libbfd.h: Regenerate.
6880 * libcoff.h: Regenerate.
6881 * bfd-in2.h: Regenerate.
6883 2004-06-27 Mark Kettenis <kettenis@gnu.org>
6885 From Miod Vallat <miod@online.fr>:
6886 * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
6888 2004-06-26 Alexandre Oliva <aoliva@redhat.com>
6890 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
6891 (struct elf32_mn10300_link_hash_entry): Remove
6892 pcrel_relocs_copied.
6893 (mn10300_elf_check_relocs): Only reserve dynamic relocations for
6894 R_MN10300_32. Don't adjust pcrel_relocs_copied.
6895 (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
6896 and gotoff relocations if the symbol doesn't bind locally. Use
6897 _bfd_elf_symbol_refs_local_p to test. Don't create dynamic
6898 relocation for PCREL32.
6899 (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
6900 to test whether a symbol binds locally.
6901 (elf32_mn10300_link_hash_newfunc): Don't initialize
6902 pcrel_relocs_copied.
6903 (_bfd_mn10300_elf_discard_copies): Delete.
6904 (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
6906 2004-06-26 Mark Kettenis <kettenis@gnu.org>
6908 * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
6910 2004-06-25 Joel Brobecker <brobecker@gnat.com>
6912 * som.c (som_set_reloc_info): Correct small typo.
6914 2004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
6916 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
6917 (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
6918 (m32r_elf_gcsweep_hook): Likewise.
6919 (m32r_elf_check_relocs): Likewise.
6920 (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
6921 R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
6922 * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
6923 BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
6924 * bfd-in2.h: Regenerated.
6925 * libbfd.h: Regenerated.
6927 2004-06-24 H.J. Lu <hongjiu.lu@intel.com>
6929 * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
6931 (elf64_x86_64_relocate_section): Issue an error for
6932 R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
6933 against global symbols when building shared library.
6935 2004-06-24 Alan Modra <amodra@bigpond.net.au>
6937 * section.c (struct sec): Rename "_cooked_size" to "size".
6938 Rename "_raw_size" to "rawsize".
6939 (STD_SECTION): Adjust comments.
6940 (bfd_set_section_size, bfd_get_section_contents): Use size.
6941 (bfd_malloc_and_get_section): New function.
6942 * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
6943 * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
6944 Correctly free reloc and contents memory.
6945 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
6946 and fake CIE now that we can shink section size to zero.
6947 (_bfd_elf_write_section_eh_frame): Likewise..
6948 * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
6949 * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
6950 _bfd_stab_section_offset. Use _bfd_elf_section_offset.
6951 * stabs.c (_bfd_stab_section_offset_): Remove unused args and
6952 unneeded indirection.
6953 * elf.c (_bfd_elf_section_offset): .. and update call.
6954 * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
6955 * libbfd.h: Regenerate.
6956 * bfd-in2.h: Regenerate.
6958 Replace occurrences of "_raw_size" and "_cooked_size" in most places
6959 with "size". Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
6960 sections. Use "rawsize", if non-zero, for bfd_get_section_contents
6961 calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
6962 Similarly use "rawsize", if non-zero, in reloc functions to validate
6963 reloc addresses. Use new bfd_malloc_and_get_section in most places
6964 where bfd_get_section_contents was called. Expand all occurrences of
6965 bfd_section_size and bfd_get_section_size. Rename "raw_size" var in
6966 grok_prstatus and similar functions to "size".
6967 * aix386-core.c (aix386_core_file_p): ..
6968 * aix5ppc-core.c (xcoff64_core_p): ..
6969 * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
6970 aout_adobe_set_section_contents): ..
6971 * aout-target.h (callback): ..
6972 * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
6973 MY_bfd_final_link): ..
6974 * aoutf1.h (sunos4_core_file_p): ..
6975 * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
6976 adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
6977 final_link, aout_link_input_section): ..
6978 * binary.c (binary_object_p, binary_canonicalize_symtab,
6979 binary_set_section_contents): ..
6980 * bout.c (b_out_callback, b_out_write_object_contents,
6981 b_out_set_section_contents, b_out_bfd_relax_section,
6982 b_out_bfd_get_relocated_section_contents): ..
6983 * cisco-core.c (cisco_core_file_validate): ..
6984 * coff-alpha.c (alpha_ecoff_object_p,
6985 alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
6986 * coff-arm.c (coff_arm_relocate_section,
6987 bfd_arm_allocate_interworking_sections): ..
6988 * coff-h8300.c (h8300_reloc16_extra_cases,
6989 h8300_bfd_link_add_symbols): ..
6990 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
6991 * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
6992 ppc_bfd_coff_final_link): ..
6993 * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
6994 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
6995 sh_align_loads, sh_coff_get_relocated_section_contents): ..
6996 * coff64-rs6000.c (xcoff64_write_object_contents,
6997 xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
6998 * coffcode.h (coff_compute_section_file_positions,
6999 coff_write_object_contents): ..
7000 * coffgen.c (make_a_section_from_file, coff_write_symbols,
7001 coff_section_symbol, build_debug_section): ..
7002 * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
7003 process_embedded_commands, _bfd_coff_link_input_bfd,
7004 _bfd_coff_write_global_sym): ..
7005 * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
7006 * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
7007 * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
7008 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
7009 _bfd_dwarf2_find_nearest_line): ..
7010 * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
7011 ecoff_compute_section_file_positions,
7012 _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
7013 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
7014 _bfd_elf_discard_section_eh_frame_hdr,
7015 _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
7016 _bfd_elf_write_section_eh_frame,
7017 _bfd_elf_write_section_eh_frame_hdr): ..
7018 * elf-hppa.h (elf_hppa_sort_unwind): ..
7019 * elf-m10200.c (mn10200_elf_relax_section,
7020 mn10200_elf_relax_delete_bytes,
7021 mn10200_elf_get_relocated_section_contents): ..
7022 * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
7023 mn10300_elf_check_relocs, mn10300_elf_relax_section,
7024 mn10300_elf_relax_delete_bytes,
7025 mn10300_elf_get_relocated_section_contents,
7026 _bfd_mn10300_elf_adjust_dynamic_symbol,
7027 _bfd_mn10300_elf_discard_copies,
7028 _bfd_mn10300_elf_size_dynamic_sections,
7029 _bfd_mn10300_elf_finish_dynamic_sections): ..
7030 * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
7031 _bfd_elf_make_section_from_phdr, elf_fake_sections,
7032 bfd_elf_set_group_contents, map_sections_to_segments,
7033 elf_sort_sections, assign_file_positions_for_segments,
7034 SECTION_SIZE, copy_private_bfd_data,
7035 _bfd_elf_get_dynamic_reloc_upper_bound,
7036 _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
7037 _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
7038 elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
7039 elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
7040 _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
7041 * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
7042 bfd_elf32_arm_process_before_allocation,
7043 elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
7044 elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
7045 elf32_arm_write_section): ..
7046 * elf32-cris.c (cris_elf_grok_prstatus,
7047 elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
7048 elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
7049 cris_elf_check_relocs, elf_cris_size_dynamic_sections,
7050 elf_cris_discard_excess_dso_dynamics,
7051 elf_cris_discard_excess_program_dynamics): ..
7052 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
7053 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
7054 * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
7055 _frv_create_got_section, _frvfdpic_assign_plt_entries,
7056 elf32_frvfdpic_size_dynamic_sections,
7057 elf32_frvfdpic_modify_segment_map,
7058 elf32_frvfdpic_finish_dynamic_sections): ..
7059 * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
7060 elf32_h8_get_relocated_section_contents): ..
7061 * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
7062 elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
7063 allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
7064 elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
7065 elf32_hppa_finish_dynamic_sections): ..
7066 * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
7067 i370_elf_size_dynamic_sections, i370_elf_check_relocs,
7068 i370_elf_finish_dynamic_sections): ..
7069 * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
7070 allocate_dynrelocs, elf_i386_size_dynamic_sections,
7071 elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
7072 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
7073 i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
7074 * elf32-ip2k.c (ip2k_is_switch_table_128,
7075 ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
7076 ip2k_relax_switch_table_256, ip2k_elf_relax_section,
7077 adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
7078 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
7079 m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
7080 allocate_dynrelocs, m32r_elf_size_dynamic_sections,
7081 m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
7082 m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
7083 m32r_elf_get_relocated_section_contents): ..
7084 * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
7085 m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
7086 m68hc11_elf_relax_delete_bytes): ..
7087 * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
7088 m68hc12_elf_size_one_stub): ..
7089 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
7090 elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
7091 * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
7092 elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
7093 elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
7094 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
7095 elf32_mips_grok_prstatus): ..
7096 * elf32-or32.c (or32_elf_consth_reloc): ..
7097 * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
7098 elf_create_pointer_linker_section, ppc_elf_create_linker_section,
7099 ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
7100 allocate_dynrelocs, ppc_elf_size_dynamic_sections,
7101 ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
7102 ppc_elf_final_write_processing): ..
7103 * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
7104 allocate_dynrelocs, elf_s390_size_dynamic_sections,
7105 elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
7106 * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
7107 sh_elf_relax_delete_bytes, sh_elf_align_loads,
7108 sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
7109 sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
7110 sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
7111 * elf32-sh64-com.c (sh64_address_in_cranges,
7112 sh64_get_contents_type): ..
7113 * elf32-sh64.c (sh64_find_section_for_address,
7114 sh64_elf_final_write_processing): ..
7115 * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
7116 sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
7117 allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
7118 elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
7119 * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
7120 * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
7121 elf_vax_size_dynamic_sections, elf_vax_discard_copies,
7122 elf_vax_instantiate_got_entries, elf_vax_relocate_section,
7123 elf_vax_finish_dynamic_sections): ..
7124 * elf32-xstormy16.c (xstormy16_elf_24_reloc,
7125 xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
7126 xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
7127 xstormy16_elf_finish_dynamic_sections): ..
7128 * elf32-xtensa.c (xtensa_read_table_entries,
7129 elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
7130 elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
7131 bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
7132 elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
7133 elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
7134 get_relocation_opcode, retrieve_contents, find_relaxable_sections,
7135 collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
7136 relax_section, shrink_dynamic_reloc_sections, relax_property_section,
7137 xtensa_callback_required_dependence): ..
7138 * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
7139 elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
7140 elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
7141 elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
7142 elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
7143 elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
7144 elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
7145 elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
7146 * elf64-hppa.c (allocate_dynrel_entries,
7147 elf64_hppa_size_dynamic_sections,
7148 elf64_hppa_finish_dynamic_sections): ..
7149 * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
7150 mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
7151 elf64_mips_grok_prstatus): ..
7152 * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
7153 mmix_elf_relocate_section, mmix_elf_final_link,
7154 mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
7155 mmix_elf_relax_section, mmix_elf_get_section_contents): ..
7156 * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
7157 ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
7158 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
7159 allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
7160 ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
7161 toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
7162 ppc64_elf_build_stubs, ppc64_elf_relocate_section,
7163 ppc64_elf_finish_dynamic_sections): ..
7164 * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
7165 allocate_dynrelocs, elf_s390_size_dynamic_sections,
7166 elf_s390_finish_dynamic_sections): ..
7167 * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
7168 sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
7169 sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
7170 sh64_elf64_finish_dynamic_sections): ..
7171 * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
7172 sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
7173 sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
7174 sparc64_elf_finish_dynamic_symbol,
7175 sparc64_elf_finish_dynamic_sections): ..
7176 * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
7177 elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
7178 elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
7179 elf64_x86_64_finish_dynamic_sections): ..
7180 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
7181 * elfcode.h (elf_slurp_reloc_table): ..
7182 * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
7183 elf_finalize_dynstr, elf_link_add_object_symbols,
7184 bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
7185 elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
7186 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
7187 elf32_mips_grok_prstatus): ..
7188 * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
7189 elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
7190 elfNN_ia64_choose_gp, elfNN_ia64_final_link,
7191 elfNN_ia64_finish_dynamic_sections): ..
7192 * elfxx-mips.c (mips_elf_create_procedure_table,
7193 mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
7194 _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
7195 mips_elf_global_got_index, mips_elf_multi_got,
7196 mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
7197 mips_elf_allocate_dynamic_relocations,
7198 mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
7199 _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
7200 _bfd_mips_elf_always_size_sections,
7201 _bfd_mips_elf_size_dynamic_sections,
7202 _bfd_mips_elf_finish_dynamic_symbol,
7203 _bfd_mips_elf_finish_dynamic_sections,
7204 _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
7205 _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
7206 _bfd_elf_mips_get_relocated_section_contents,
7207 _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
7208 * hp300hpux.c (callback): ..
7209 * hppabsd-core.c (make_bfd_asection): ..
7210 * hpux-core.c (make_bfd_asection): ..
7211 * i386linux.c (linux_link_create_dynamic_sections,
7212 bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
7213 * i386msdos.c (msdos_write_object_contents): ..
7214 * i386os9k.c (os9k_callback, os9k_write_object_contents,
7215 os9k_set_section_contents): ..
7216 * ieee.c (parse_expression, ieee_slurp_external_symbols,
7217 ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
7218 ieee_write_section_part, do_with_relocs, do_as_repeat,
7219 do_without_relocs, ieee_write_debug_part, init_for_output,
7220 ieee_set_section_contents): ..
7221 * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
7222 * irix-core.c (do_sections, make_bfd_asection): ..
7223 * libaout.h (aout_section_merge_with_text_p): ..
7224 * libbfd.c (_bfd_generic_get_section_contents,
7225 _bfd_generic_get_section_contents_in_window): ..
7226 * linker.c (default_indirect_link_order): ..
7227 * lynx-core.c (make_bfd_asection): ..
7228 * m68klinux.c (linux_link_create_dynamic_sections,
7229 bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
7230 * mach-o.c (bfd_mach_o_make_bfd_section,
7231 bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
7232 bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
7233 bfd_mach_o_scan_read_segment): ..
7234 * merge.c (_bfd_add_merge_section, record_section, merge_strings,
7235 _bfd_merge_sections): ..
7236 * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
7237 mmo_map_set_sizes, mmo_canonicalize_symtab,
7238 mmo_internal_write_section, mmo_write_object_contents): ..
7239 * netbsd-core.c (netbsd_core_file_p): ..
7240 * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
7241 nlm_alpha_set_public_section): ..
7242 * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
7243 * nlm32-sparc.c (nlm_sparc_write_import): ..
7244 * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
7245 nlm_compute_section_file_positions): ..
7246 * oasys.c (oasys_object_p, oasys_slurp_section_data,
7247 oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
7248 * opncls.c (get_debug_link_info): ..
7249 * osf-core.c (make_bfd_asection): ..
7250 * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
7251 adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
7252 final_link, aout_link_input_section): ..
7253 * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
7254 pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
7255 * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
7256 bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
7257 * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
7258 * ptrace-core.c (ptrace_unix_core_file_p): ..
7259 * reloc.c (bfd_perform_relocation, bfd_install_relocation,
7260 _bfd_final_link_relocate, bfd_generic_relax_section,
7261 bfd_generic_get_relocated_section_contents): ..
7262 * reloc16.c (bfd_coff_reloc16_relax_section,
7263 bfd_coff_reloc16_get_relocated_section_c): ..
7264 * riscix.c (riscix_some_aout_object_p): ..
7265 * rs6000-core.c (read_hdr, make_bfd_asection): ..
7266 * sco5-core.c (make_bfd_asection): ..
7267 * simple.c (bfd_simple_get_relocated_section_contents): ..
7268 * som.c (som_object_setup, setup_sections, som_prep_headers,
7269 som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
7270 som_set_reloc_info, som_get_section_contents,
7271 som_bfd_link_split_section): ..
7272 * sparclinux.c (linux_link_create_dynamic_sections,
7273 bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
7274 * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
7275 * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
7276 _bfd_write_stab_strings, _bfd_stab_section_offset): ..
7277 * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
7278 bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
7279 sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
7280 sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
7281 sunos_finish_dynamic_link): ..
7282 * syms.c (_bfd_stab_section_find_nearest_line): ..
7283 * tekhex.c (first_phase, tekhex_set_section_contents,
7284 tekhex_write_object_contents): ..
7285 * trad-core.c (trad_unix_core_file_p): ..
7286 * versados.c (process_esd, process_otr, process_otr): ..
7287 * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
7288 * vms-misc.c (add_new_contents): ..
7289 * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
7290 * vms.c (vms_set_section_contents): ..
7291 * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
7292 xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
7293 _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
7294 * xsym.c (bfd_sym_scan): .. See above.
7296 2004-06-21 H.J. Lu <hongjiu.lu@intel.com>
7298 * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
7299 calling _bfd_merged_section_offset only for section symbols.
7301 2004-06-22 Alan Modra <amodra@bigpond.net.au>
7303 * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
7304 for handling SEC_MERGE symbols in relax_section.
7306 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
7308 2003-05-15 Richard Sandiford <rsandifo@redhat.com>
7309 * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
7310 linked together. Mark the result as h8300sx code.
7312 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
7314 * elf-bfd.h (struct elf_backend_data): Added
7315 elf_backend_omit_section_dynsym.
7316 (_bfd_elf_link_omit_section_dynsym): Declare.
7317 * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
7318 (elf_backend_omit_section_dynsym): Use it for frvfdpic.
7319 * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
7320 (_bfd_elf_link_renumber_dynsyms): ... this function.
7321 * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
7322 _bfd_elf_link_omit_section_dynsym).
7323 (elfNN_bed): Added elf_backend_omit_section_dynsym.
7325 2004-06-21 Nick Clifton <nickc@redhat.com>
7327 * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
7330 2004-06-17 Jerome Guitton <guitton@gnat.com>
7332 * bfd-in.h (bfd_cache_close_all): New function declaration.
7333 * bfd-in2.h: Regenerate.
7334 * cache.c (bfd_cache_close_all): New function definition.
7336 2004-06-16 Mark Kettenis <kettenis@gnu.org>
7338 * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
7340 * configure: Regenerate.
7342 2004-06-16 Daniel Jacobowitz <dan@debian.org>
7344 * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
7345 the pre-existing section.
7347 2004-06-15 Alan Modra <amodra@bigpond.net.au>
7349 * section.c (struct sec): Remove usused flags. Reorganize a little.
7350 (bfd_get_section_size_before_reloc): Delete.
7351 (bfd_get_section_size_after_reloc): Delete.
7352 (STD_SECTION): Update.
7353 (bfd_get_section_size_now): Delete.
7354 (bfd_set_section_contents): Don't referece reloc_done.
7355 (bfd_get_section_contents): Remove reloc_done comment.
7356 * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
7358 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
7359 * ecoff.c (bfd_debug_section): Update initializer.
7360 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
7361 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
7362 * bfd-in.h (bfd_section_size): Expand.
7363 (bfd_get_section_size): New macro.
7364 * bfd-in2.h: Regenerate.
7365 * coff64-rs6000.c (xcoff64_write_object_contents): Replace
7366 bfd_get_section_size_before_reloc with bfd_get_section_size.
7367 * coffcode.h (coff_write_object_contents): Likewise.
7368 * coffgen.c (build_debug_section): Likewise.
7369 * dwarf1.c (parse_line_table): Likewise.
7370 (_bfd_dwarf1_find_nearest_line): Likewise.
7371 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
7372 * i386msdos.c (msdos_write_object_contents): Likewise.
7373 * pdp11.c (squirt_out_relocs): Likewise.
7374 * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
7375 * elf64-mmix.c (mmix_elf_final_link): Update comment.
7377 2004-06-14 Chris Demetriou <cgd@broadcom.com>
7379 * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
7380 removal) with updated comment.
7381 (bfd_elf32_bfd_reloc_type_lookup): Add back case for
7383 (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
7384 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
7386 2004-06-12 Alan Modra <amodra@bigpond.net.au>
7388 * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
7389 overflow on branches to undefweaks.
7391 2004-06-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7393 * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
7394 as ecoff_section_data() does not return a valid lvalue.
7396 2004-06-09 Alexandre Oliva <aoliva@redhat.com>
7398 * elflink.c (elf_sort_symbol): Compare section id, not pointers.
7399 (elf_link_add_object_symbols): Likewise.
7401 * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
7402 (elf_backend_reloc_type_class): New.
7404 2004-06-08 Mark Kettenis <kettenis@gnu.org>
7406 * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
7408 * configure: Regenerate.
7410 2004-06-07 Daniel Jacobowitz <dan@debian.org>
7412 From: Albert Chin-A-Young <china@thewrittenword.com>
7413 * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
7416 2004-05-29 H.J. Lu <hongjiu.lu@intel.com>
7418 * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
7421 2004-05-28 DJ Delorie <dj@redhat.com>
7423 * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
7424 for linking, but otherwise adjust reloc for merged sections.
7426 2004-05-28 H.J. Lu <hongjiu.lu@intel.com>
7428 * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
7429 _bfd_merged_section_offset for local symbols.
7431 2004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
7433 * Makefile.am: Regenerate dependencies.
7434 * Makefile.in: Regenerate.
7435 * archures.c: Add bfd_mach_sh3_nommu .
7436 * bfd-in2.h: Regenerate.
7437 * cpu-sh.c: Add sh3-nommu architecture.
7438 (bfd_to_arch_table): Create new table.
7439 (sh_get_arch_from_bfd_mach): Create new function.
7440 (sh_get_arch_up_from_bfd_mach): Create new function.
7441 (sh_merge_bfd_arch): Create new function.
7442 * elf32-sh.c (sh_ef_bfd_table): Add table.
7443 (sh_elf_check_relocs): Replace switch statement with
7444 use of sh_ef_bfd_table .
7445 (sh_elf_get_flags_from_mach): Add new function.
7446 (sh_find_elf_flags): Likewise.
7447 (sh_elf_copy_private_data): Replace most of non-elf contents
7448 with a call to sh_merge_bfd_arch() .
7450 2004-05-27 Michael Chastain <mec.gnu@mindspring.com>
7452 * Makefile.am (bfdver.h): Use explicit filename, not $< .
7453 * Makefile.in: Regenerate.
7455 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
7457 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
7458 custom calling conventions for dynamic symbols.
7459 (mn10300_elf_relax_section): Avoid relaxing a function as a local
7460 symbol if it's an alias to a global one.
7462 2004-05-26 H.J. Lu <hongjiu.lu@intel.com>
7464 * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
7467 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
7469 * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
7472 2004-05-26 Alan Modra <amodra@bigpond.net.au>
7474 * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
7475 for SHT_GROUP sections.
7477 2004-05-25 Alan Modra <amodra@bigpond.net.au>
7479 * elflink.c (elf_link_add_object_symbols): Don't set up merge
7481 * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
7482 * merge.c: Formatting. Remove unnecessary casts. Expand
7483 bfd_get_section_alignment macro.
7484 (struct sec_merge_sec_info): Rename "first" to "first_str". Update
7485 use throughout file.
7486 (_bfd_add_merge_section): Rename from _bfd_merge_section. Update
7487 comment. Abort on dynamic or non-SEC_MERGE input. Don't test
7488 section name to determine sinfo group, instead test output section
7490 (_bfd_merge_sections): Add struct bfd_link_info param. Call
7491 _bfd_strip_section_from_output rather than just twiddling flags.
7492 * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
7493 (_bfd_merge_sections): Update prototype.
7494 * libbfd.h: Regenerate.
7496 2004-05-24 Mark Kettenis <kettenis@gnu.org>
7498 * netbsd-core.c: Correctly indent section that sets architecture
7501 From Miod Vallat <miod@online.fr>:
7502 * m88kopenbsd.c: New file.
7503 * targets.c (m88k_openbsd_vec): New.
7504 * config.bfd: Add m88k-*-openbsd*.
7505 * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
7506 (m88kopenbsd_vec): New.
7507 * configure: Regenerate.
7508 * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
7509 (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
7511 * Makefile.in: Regenerate.
7512 * po/SRC-POTFILES.in: Regenerate.
7514 2004-05-24 Nick Clifton <nickc@redhat.com>
7516 * hash.c: Remove bogus node "Changing the default Hash Table Size"
7517 introduced by hash table size patch.
7519 2004-05-22 Ben Elliston <bje@au.ibm.com>
7521 * configure.in (is_release): Remove.
7522 (bfd_version_date, bfd_version, bfd_version_string): Likewise.
7523 (AC_OUTPUT): Don't output bfdver.h from version.h.
7524 * configure: Regenerate.
7525 * Makefile.am (RELEASE): New variable.
7526 (bfdver.h): New target.
7527 * Makefile.in: Regenerate.
7528 * doc/Makefile.in: Likewise.
7530 2004-05-22 Ben Elliston <bje@au.ibm.com>
7532 * Makefile.am (config.status): Don't depend on version.h.
7533 * Makefile.in: Regenerate.
7535 2004-05-22 Alan Modra <amodra@bigpond.net.au>
7537 * merge.c (_bfd_merged_section_offset): Remove "addend" param.
7538 * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
7539 * libbfd.h: Regenerate.
7540 * elf.c (_bfd_elf_rela_local_sym): Adjust call.
7541 (_bfd_elf_rel_local_sym): Likewise.
7542 * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
7543 (elf_link_input_bfd): Likewise.
7544 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
7545 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
7546 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7547 (elfNN_ia64_relocate_section): Likewise.
7549 2004-05-21 Andy Chittenden <achittenden@bluearc.com>
7551 * hash.c (bfd_default_hash_table_size): New variable.
7552 (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
7553 (bfd_hash_set_default_size): New function. Set the default size
7554 to a selected prime number close to the argument. Document new
7556 * bfd-in.h: Add prototype for bfd_hash_set_default_size.
7557 * bfd-in2.h: Regenerate.
7558 * Makefile.am (hash.lo): Add dependency upon libiberty.h.
7559 * Makefile.in: Regenerate.
7561 2004-05-21 Mark Kettenis <kettenis@gnu.org>
7563 * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
7564 * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
7565 arm, m68k, m88k and hppa core files.
7567 2004-05-21 Nick Clifton <nickc@redhat.com>
7569 * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
7570 (bfd_bwrite): Likewise.
7571 (bfd_tell): Likewise.
7572 (bfd_flush): Likewise.
7573 (bfd_stat): Likewise.
7574 (bfd_seek): Likewise.
7575 (bfd_get_mtime): Likewise.
7576 (bfd_get_size): Likewise.
7578 2004-05-19 Ben Elliston <bje@au.ibm.com>
7580 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
7582 2004-05-19 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
7584 * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
7585 (bfd_generic_openr_next_archived_file): Likewise.
7587 2004-05-17 Bob Wilson <bob.wilson@acm.org>
7589 * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
7590 section names by inserting a new substring after .gnu.linkonce, except
7591 for .gnu.linkonce.t.* where the "t." is replaced.
7593 2004-05-17 Adam Nemet <anemet@lnxw.com>
7595 * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
7596 (m68-*-lynxos* case): Likewise.
7597 (powerpc-*-lyxnos* case): New case.
7598 (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
7600 2004-05-17 David Heine <dlheine@tensilica.com>
7602 * aout-target.h (MY_bfd_copy_private_header_data): Define.
7603 * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
7604 * bfd.c (bfd_copy_private_header_data): Define.
7605 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
7607 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
7608 * coffcode.h (coff_bfd_copy_private_header_data): Define.
7609 * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
7610 * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
7611 segments by calling copy_private_bfd_data.
7612 (_bfd_elf_copy_private_header_data): Define.
7613 * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
7614 * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
7615 * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
7616 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
7617 * mmo.c (mmo_bfd_copy_private_header_data): Define.
7618 * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
7619 * som.c (som_bfd_copy_private_header_data): Define.
7620 * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
7621 * vms.c (vms_bfd_copy_private_header_data): Define.
7622 * bfd-in2.h: Regenerate.
7623 * libbfd.h: Regenerate.
7625 2004-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7627 * elfxx-mips.c (MINUS_TWO): Define.
7628 (mips_elf_higher, mips_elf_highest,
7629 mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
7630 some bfd_vma values.
7631 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
7633 2004-05-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7635 * som.c (log2): Rename to exact_log2. Adjust all callers.
7637 2004-05-13 Paul Brook <paul@codesourcery.com>
7639 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
7640 dwarf3 format CIE entries. Remove comment about the size of the
7641 ra_column field. It is now correctly deduced.
7643 2004-05-13 Joel Sherrill <joel@oarcorp.com>
7645 * config.bfd (or32-*-rtems*): Switch to elf.
7647 2004-05-13 Nick Clifton <nickc@redhat.com>
7649 * po/fr.po: Updated French translation.
7651 2004-05-11 Jakub Jelinek <jakub@redhat.com>
7653 * elflink.c (bfd_elf_final_link): Don't output STT_SECTION symbol
7654 into .dynsym if elf_section_data (sec)->dynindx <= 0.
7655 Adjust counting of last_local.
7656 (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
7657 other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
7658 created by the linker nor !SHF_ALLOC.
7660 * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
7661 DT_PLTGOT to the start of the .got.plt section instead of the
7662 .got output section. Set sh_entsize for .got section in addition
7664 (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
7665 is at sgot->output_section->vma.
7666 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
7667 DT_PLTGOT to the start of the .got.plt section instead of the
7668 .got output section.
7669 (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
7670 is at sgot->output_section->vma. Set sh_entsize for .got section
7671 in addition to .got.plt.
7672 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
7673 (bfd_section_from_phdr): Likewise.
7674 (map_sections_to_segments): Likewise.
7675 (assign_file_positions_for_segments): Likewise.
7676 (get_program_header_size): Likewise.
7677 * elflink.c (bfd_elf_size_dynamic_sections): Set
7678 elf_tdata (output_bfd)->relro from info->relro.
7679 * elf-bfd.h (struct elf_obj_tdata): Add relro field.
7681 2004-05-08 Alexandre Oliva <aoliva@redhat.com>
7683 * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
7684 a zero symndx for which we hadn't accounted a dynamic relocation.
7685 (_frvfdpic_add_rofixup): Likewise.
7687 2004-05-07 Brian Ford <ford@vss.fsi.com>
7688 DJ Delorie <dj@redhat.com>
7690 * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
7691 Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
7692 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
7693 IMAGE_FILE_LARGE_ADDRESS_AWARE. Use PE defines.
7695 2004-05-07 Alexandre Oliva <aoliva@redhat.com>
7697 * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
7698 immediately if there's no link info.
7699 (elf32_frvfdpic_copy_private_bfd_data): New.
7700 (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
7702 2004-05-06 Zack Weinberg <zack@codesourcery.com>
7704 * dwarf2.c (add_line_info): Also set info->filename to NULL if
7705 filename argument is null; do not call strlen on a null pointer.
7707 2004-05-06 Daniel Jacobowitz <drow@mvista.com>
7709 * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
7712 2004-05-05 Alexandre Oliva <aoliva@redhat.com>
7714 * configure.in (bfd_elf32_frvfdpic_vec): New.
7715 * configure: Rebuilt.
7716 * targets.c (bfd_elf32_frvfdpic_vec): New.
7717 * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
7719 * elf32-frv.c: Prefix all identifiers added for FDPIC support with
7720 frvfdpic instead of frv. Rearrange elf-target macros such that
7721 the FDPIC-specific ones are only defined for this new target
7723 (bfd_elf32_frvfdpic_vec): Declare.
7725 (elf32_frv_relocate_section): Use it to enable segment checking
7726 and to control rofixup emission. Add output section vma to
7727 applied relocation in non-LOAD non-ALLOC sections. Use
7728 _bfd_error_handler for errors.
7729 (_frv_create_got_section): Create .rel.got and .rofixup only in
7730 FDPIC. Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
7732 (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
7733 (elf32_frvfdpic_modify_segment_map): Likewise.
7734 (elf32_frv_finish_dynamic_sections): New, do-nothing.
7735 (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC. Improve
7736 error message if we miscompute the rofixup size.
7737 (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
7738 (frvfdpic_elf_encode_eh_address): Likewise.
7739 (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
7740 Record relocs only in FDPIC. Make sure _gp is defined for GPREL
7741 relocs. Reject unknown relocation types.
7742 (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
7743 (frv_elf_merge_private_bfd_data): Likewise.
7744 (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
7745 0x4000 for newly-added elf32-frvfdpic.
7747 2004-05-05 Nick Clifton <nickc@redhat.com>
7750 * cache.c (bfd_cache_lookup_worker): Call abort() rather than
7751 returning NULL as most users of this function do not check its
7753 * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
7754 of bfd_cache_lookup().
7755 * sco5-core.c (sco5_core_file_p): Likewise.
7756 * trad-core.c (trad_unix_core_file_p): Likewise.
7758 2004-05-05 Nick Clifton <nickc@redhat.com>
7760 * cache.c (bfd_cache_lookup): Improve formatting.
7761 * archive.c: Fix formatting.
7763 2004-05-05 Peter Barada <peter@the-baradas.com>
7765 * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
7766 * cpu-m68k.c(bfd_m68k_arch): Likewise.
7767 * bfd-in2.h(bfd_architecture): Regenerate.
7769 2004-05-03 Alan Modra <amodra@bigpond.net.au>
7771 * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
7773 * elflink.c (elf_link_input_bfd): Adjust output reloc index for
7774 those against discarded link-once and SEC_MERGE section symbols.
7776 2004-05-02 H.J. Lu <hongjiu.lu@intel.com>
7778 * section.c (bfd_get_section_by_name_if): New.
7779 * bfd-in2.h: Regenerated.
7781 2004-05-02 Alan Modra <amodra@bigpond.net.au>
7783 * som.c (som_bfd_is_group_section): Define.
7785 2004-05-01 Alan Modra <amodra@bigpond.net.au>
7787 * section.c (bfd_make_section_anyway): Copy the whole
7788 bfd_hash_entry, not just "next" from existing entry.
7790 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
7792 * elf.c (bfd_section_from_shdr): Maintain the section order in
7794 (special_sections): Add ".note.GNU-stack".
7795 (elf_fake_sections): Handle section group for relocatable
7798 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
7800 * section.c (bfd_sections_find_if): New.
7801 * bfd-in2.h: Regenerated.
7803 2004-04-30 Alan Modra <amodra@bigpond.net.au>
7805 * section.c (bfd_make_section_anyway): Add all sections to hash tab.
7807 * elf-bfd.h (bfd_elf_is_group_section): Declare.
7808 * elf.c (bfd_elf_is_group_section): New function.
7809 * elfxx-target.h (bfd_elfNN_bfd_is_group_section
7810 * section.c (bfd_generic_is_group_section): New function.
7811 * targets.c (struct bfd_target): Add _bfd_is_group_section field.
7812 (BFD_JUMP_TABLE_LINK): Adjust.
7813 * aout-adobe.c (aout_32_bfd_is_group_section): Define.
7814 * aout-target.h (MY_bfd_is_group_section): Define.
7815 * aout-tic30.c (MY_bfd_is_group_section): Define.
7816 * bfd.c (bfd_is_group_section): Define.
7817 * binary.c (binary_bfd_is_group_section): Define.
7818 * bout.c (b_out_bfd_is_group_section): Define.
7819 * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
7820 * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
7821 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
7822 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
7823 * coffcode.h (coff_bfd_is_group_section): Define.
7824 * i386msdos.c (msdos_bfd_is_group_section): Define.
7825 * i386os9k.c (os9k_bfd_is_group_section): Define.
7826 * ieee.c (ieee_bfd_is_group_section): Define.
7827 * ihex.c (ihex_bfd_is_group_section): Define.
7828 * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
7829 * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
7830 * mmo.c (mmo_bfd_is_group_section): Define.
7831 * nlm-target.h (nlm_bfd_is_group_section): Define.
7832 * oasys.c (oasys_bfd_is_group_section): Define.
7833 * pef.c (bfd_pef_bfd_is_group_section): Define.
7834 * ppcboot.c (ppcboot_bfd_is_group_section): Define.
7835 * srec.c (srec_bfd_is_group_section): Define.
7836 * tekhex.c (tekhex_bfd_is_group_section): Define.
7837 * versados.c (versados_bfd_is_group_section): Define.
7838 * vms.c (vms_bfd_is_group_section): Define.
7839 * xsym.c (bfd_sym_bfd_is_group_section): Define.
7840 * bfd-in2.h: Regenerate.
7841 * libbfd.h: Regenerate.
7843 2004-04-30 Alan Modra <amodra@bigpond.net.au>
7845 * elflink.c (elf_gc_mark): Follow indirect and warning syms.
7847 2004-04-30 Hans-Peter Nilsson <hp@axis.com>
7849 * configure.in: Update version to 2.15.91.
7850 * configure: Regenerate.
7852 2004-04-29 Brian Ford <ford@vss.fsi.com>
7854 * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
7855 * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
7856 [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
7857 (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
7858 [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
7859 .gnu.linkonce.wi. sections.
7860 * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
7861 (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
7863 * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
7864 (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7866 2004-04-28 Chris Demetriou <cgd@broadcom.com>
7868 * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
7869 * bfd-in2.h: Regenerate.
7870 * libbfd.h: Likewise.
7872 2004-04-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7874 * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
7876 (setup_sections): Use som_subspace_dictionary_record struct instead
7877 subspace_dictionary_record. Set SEC_LINK_ONCE if subspace is
7878 is_comdat, is_common or dup_common.
7879 (som_prep_headers): Use som_subspace_dictionary_record struct. Set
7880 is_comdat, is_common and dup_common in section subspace_dict from
7882 (som_begin_writing): Use som_subspace_dictionary_record struct.
7883 (som_finish_writing): Likewise.
7884 (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
7885 is_common and dup_common flags in info for symbol. Add comment
7886 regarding linker support for these fields. Slightly reorganize
7888 (som_build_and_write_symbol_table): Set is_comdat, is_common and
7889 dup_common fields in symbol table from symbol info.
7890 (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
7891 arguments. Set corresponding fields in copy_data. Change all callers.
7892 (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
7894 (som_vec): Add SEC_LINK_ONCE to applicable section flags.
7895 * som.h (som_subspace_dictionary_record): Define.
7896 (som_copyable_section_data_struct): Add is_comdat, is_common and
7898 (som_section_data_struct): Use som_subspace_dictionary_record struct
7899 instead of subspace_dictionary_record.
7900 (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
7902 2004-04-27 Bob Wilson <bob.wilson@acm.org>
7904 * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
7905 if set. Check reloc_done flag before applying relocations. Use
7906 output addresses, both when applying relocations and when comparing
7907 against the specified section.
7908 (elf_xtensa_relocate_section): Use output address to check if dynamic
7909 reloc is in a literal pool. Set section's reloc_done flag.
7911 2004-04-27 H.J. Lu <hongjiu.lu@intel.com>
7913 * elf32-sh64.c (elf_backend_section_flags): New. Defined.
7914 (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
7916 (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
7919 2004-04-27 Alan Modra <amodra@bigpond.net.au>
7921 * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
7922 structure field removed in 2004-04-24 patch.
7923 * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
7925 * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
7927 * elf32-arm.h (elf32_arm_section_flags): Likewise.
7928 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
7929 * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
7930 * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
7931 field before calling elf_backend_section_flags.
7933 2004-04-24 Chris Demetriou <cgd@broadcom.com>
7935 * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
7936 (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
7937 (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
7938 BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
7939 and BFD_RELOC_32_PCREL.
7940 (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
7941 R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
7942 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
7943 (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
7944 (mips_elf_next_relocation): Move comment about matching HI/LO
7946 (_bfd_mips_elf_relocate_section): Here. Remove handling for
7947 R_MIPS_GNU_REL_HI16.
7949 2004-04-23 Chris Demetriou <cgd@broadcom.com>
7951 * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
7952 (mips_switch_reloc, mips_read_relocs, mips_relax_section)
7953 (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
7954 (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
7955 and update comments to reflect current usage.
7956 (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
7957 and MIPS_R_SWITCH, as well as several empty entries. Update comment
7959 (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
7960 (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
7961 for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
7962 (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
7963 type number to be MIPS_R_PCREL16.
7964 (mips_relocate_section): Remove support for link-time relaxation
7965 of branches used by embedded-PIC. Remove support for MIPS_R_SWITCH,
7966 MIPS_R_RELLO, and MIPS_R_RELHI relocations.
7967 (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
7968 * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
7969 relaxation of branches used by embedded-PIC.
7970 * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
7971 * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
7972 related members, update comment.
7973 * pe-mips.c: Remove disabled (commented-out and #if 0'd)
7974 code related to embedded-PIC.
7975 * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
7976 initialization of now-removed 'adjust' member of
7977 'struct ecoff_debug_info'.
7979 2004-04-23 Chris Demetriou <cgd@broadcom.com>
7981 * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
7983 2004-04-21 Philip Blundell <pb@nexus.co.uk>
7985 * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
7986 relocs for locally defined symbols during -shared final link.
7987 (elf32_arm_final_link_relocate): Likewise.
7989 2004-04-22 Jakub Jelinek <jakub@redhat.com>
7991 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
7992 ELF_LINK_POINTER_EQUALITY_NEEDED.
7993 (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
7994 if r_type is not R_X86_64_PC32.
7995 (elf64_x86_64_finish_dynamic_symbol): If
7996 ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
7999 2004-04-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8001 * elf32-sh.c (sh_elf_plt_sym_val): New function.
8002 (elf_backend_plt_sym_val): Define.
8004 2004-04-22 Andrew Cagney <cagney@redhat.com>
8006 * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
8008 2004-04-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
8010 * hpux-core.c (hpux_core_core_file_p): Add cast in call to
8012 * som.c (som_set_section_contents): Constantify second argument.
8013 (hppa_som_gen_reloc_type): Abort for unsupported selectors.
8014 (som_object_setup): Rework to avoid warning.
8015 (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
8018 2004-04-22 Andrew Cagney <cagney@redhat.com>
8020 * cache.c (bfd_cache_close): Check for a previously closed file.
8022 2004-04-22 Jakub Jelinek <jakub@redhat.com>
8024 * bfd.c (bfd_get_synthetic_symtab): Define.
8025 * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
8026 NAME##_get_synthetic_symtab.
8027 (struct bfd_target): Add _bfd_get_synthetic_symtab.
8028 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
8029 * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
8031 (_bfd_elf_get_synthetic_symtab): New prototype.
8032 * elfcode.h (elf_get_synthetic_symtab): Define.
8033 * elf.c (_bfd_elf_get_synthetic_symtab): New function.
8034 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
8035 (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
8036 (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
8037 * bfd-in2.h: Rebuilt.
8038 * libbfd.h: Rebuilt.
8039 * elf32-i386.c (elf_i386_plt_sym_val): New function.
8040 (elf_backend_plt_sym_val): Define.
8041 * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
8042 (elf_backend_plt_sym_val): Define.
8043 * elf32-s390.c (elf_s390_plt_sym_val): New function.
8044 (elf_backend_plt_sym_val): Define.
8045 * elf64-s390.c (elf_s390_plt_sym_val): New function.
8046 (elf_backend_plt_sym_val): Define.
8047 * elf32-sparc (elf32_sparc_plt_sym_val): New function.
8048 (elf_backend_plt_sym_val): Define.
8049 * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
8050 (elf_backend_plt_sym_val): Define.
8051 * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
8052 (elf_backend_plt_sym_val): Define.
8053 * aout-target.h (MY_get_synthetic_symtab): Define.
8054 * aout-tic30.c (MY_get_synthetic_symtab): Define.
8055 * coff-rs6000.c (rs6000coff_vec): Add
8056 _bfd_nodynamic_get_synthetic_symtab.
8057 (pmac_xcoff_vec): Likewise.
8058 * coff64-rs6000.c (rs6000coff64_vec): Add
8059 _bfd_nodynamic_get_synthetic_symtab.
8060 (aix5coff64_vec): Likewise.
8061 * sunos.c (MY_get_synthetic_symtab): Define.
8062 * vms.c (vms_get_synthetic_symtab): Define.
8064 2004-04-22 Nick Clifton <nickc@redhat.com>
8066 * bfd.c (bfd_archive_filename): Return NULL on NULL input.
8068 2004-04-22 Peter Barada <peter@the-baradas.com>
8070 * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
8071 * bfd2-in.h: Regenerate.
8072 * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
8074 2004-04-21 Chris Demetriou <cgd@broadcom.com>
8076 * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
8077 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
8078 * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
8079 (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
8080 * bfd-in2.h: Regenerate.
8082 2004-04-21 Bob Wilson <bob.wilson@acm.org>
8084 * elf32-xtensa.c (is_same_value): Add final_static_link argument and
8085 require relocations against a weak symbol to reference the same
8086 symbol hash entry if not a final, static link.
8087 (get_cached_value, add_value_map): Add final_static_link argument.
8088 (remove_literals): Pass final_static_link argument as needed.
8090 2004-04-21 Andrew Cagney <cagney@redhat.com>
8092 * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
8093 (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
8094 (opncls_bwrite, opncls_bclose, opncls_bflush)
8095 (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
8096 bfd iovec that uses function callbacks.
8097 (bfd_close): Use the iovec's bclose.
8098 * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
8099 (cache_bclose, cache_bflush, cache_bstat)
8100 (cache_iovec): New functions and global variable, implement a
8101 cache "iovec", where applicable set bfd_error.
8102 (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
8103 * bfdio.c (struct bfd_iovec): Define.
8104 (real_read): Delete function.
8105 (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
8106 (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
8107 assume that bread and bwrite set bfd_error.
8108 * bfd.c (struct bfd): Add "iovec", update comments.
8109 * bfd-in2.h, libbfd.h: Re-generate.
8111 2004-04-21 Andrew Cagney <cagney@redhat.com>
8113 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
8115 2004-04-21 Eric Botcazou <ebotcazou@act-europe.fr>
8117 * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
8118 (bfd_elf_gc_sections): Fail if a shared object is being created.
8119 Do not fail if dynamic sections have been created. Instead call
8120 elf_gc_mark_dynamic_ref_symbol to mark sections that contain
8121 dynamically referenced symbols. Do not mark the whole graph
8122 rooted at .eh_frame, only the section proper.
8124 2004-04-20 DJ Delorie <dj@redhat.com>
8126 * reloc.c: Add BFD_RELOC_32_SECREL.
8127 * bfd-in2.h: Regenerate.
8128 * libbfd.h: Likewise.
8129 * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
8130 (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
8131 (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
8133 2004-04-19 Jakub Jelinek <jakub@redhat.com>
8135 * elf32-sparc.c (elf32_sparc_relocate_section): Handle
8136 relocs against hidden/protected undefweak symbols properly.
8137 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8139 2004-04-18 Mark Kettenis <kettenis@gnu.org>
8141 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
8142 * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
8145 2004-04-17 Brian Ford <ford@vss.fsi.com>
8147 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
8148 filepos for the SizeOfHeaders field.
8149 (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
8151 (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
8153 2004-04-16 Alan Modra <amodra@bigpond.net.au>
8155 * simple.c (bfd_simple_get_relocated_section_contents): Don't
8156 change reloc_done. Set and restore _cooked_size.
8159 2004-04-15 Mark Kettenis <kettenis@gnu.org>
8161 * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
8164 2004-04-15 Nick Clifton <nickc@redhat.com>
8166 * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
8168 2004-04-15 Alan Modra <amodra@bigpond.net.au>
8170 * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
8172 2004-04-15 H.J. Lu <hongjiu.lu@intel.com>
8174 * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
8175 when it is a definition.
8177 2004-04-14 Alan Modra <amodra@bigpond.net.au>
8179 * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
8180 when statically linking PIC code.
8181 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8183 2004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8185 * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
8186 * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
8187 targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
8188 * configure: Regenerate.
8190 2004-04-08 Richard Sandiford <rsandifo@redhat.com>
8192 * elflink.c: Include libiberty.h.
8193 * Makefile.am (elflink.lo): Depend on libiberty.h.
8194 * Makefile.in: Regenerate.
8196 2004-04-06 Daniel Jacobowitz <drow@mvista.com>
8198 * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
8201 2004-04-05 H.J. Lu <hongjiu.lu@intel.com>
8203 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
8204 reserve the memory for dynamic linker
8206 2004-04-05 Mark Kettenis <kettenis@gnu.org>
8208 * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
8209 (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
8211 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
8213 * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
8214 RELOC_FOR_GLOBAL_SYMBOL.
8215 (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
8217 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
8219 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
8220 R_ARM_ALU* only if OLD_ARM_ABI is not defined.
8222 2004-04-01 Paul Brook <paul@codesourcery.com>
8224 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
8225 * elf32-arm.h (struct elf32_elf_section_map): New.
8226 (struct _arm_elf_section_data): New.
8227 (elf32_arm_section_data): Define.
8228 (struct elf32_arm_link_hash_table): Add byteswap_code.
8229 (elf32_arm_link_hash_table_create): Initialize byteswap_code.
8230 (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
8231 (elf32_arm_post_process_headers): Set EF_ARM_BE8.
8232 (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
8233 elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
8234 (bfd_elf32_new_section_hook, elf_backend_write_section,
8235 elf_backend_link_output_symbol_hook): Define.
8237 2004-04-01 Andy Chittenden <achittenden@bluearc.com>
8239 * stabs.c (struct stab_link_includes_totals): Add field 'symb'
8240 that keeps the characters in a B_INCL..B_EINCL range.
8241 (_bfd_link_section_stabs): When computing the sum of the
8242 characters in a B_INCL..B_EINCL range also keep a copy of those
8243 characters. Use this information to distinguish between
8244 include sections that have the same sum and the same length
8245 but which are nevertheless unique.
8247 2004-03-31 Paul Brook <paul@codesourcery.com>
8249 * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
8250 * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
8252 2004-03-31 Andy Chittenden <achittenden@bluearc.com>
8254 * stabs.c (struct stab_link_includes_totals): Rename field 'total'
8255 to 'sum_chars' and add field 'num_chars'.
8256 (_bfd_link_section_stabs): When computing the sum of the
8257 characters in a B_INCL..B_EINCL range also keep a count of the
8258 number of characters. Use this information to help distinguish
8259 between include sections when have the same sum but which
8260 nevertheless are still unique.
8262 2004-03-31 Mattias Engdegård <mattias@virtutech.se>
8264 * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
8266 2004-03-30 Galit Heller <Galit.Heller@nsc.com>
8267 Tomer Levi <Tomer.Levi@nsc.com>
8269 * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
8270 (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
8271 (BFD32_BACKENDS): Add elf32-cr16c.lo.
8272 (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
8273 (cpu-cr16c.lo): New target.
8274 (elf32-cr16c.lo): Likewise.
8275 * Makefile.in: Regenerate.
8276 * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
8277 (bfd_archures_list): Add bfd_cr16c_arch.
8278 * config.bfd: Handle cr16c-*-elf*.
8279 * configure.in: Handle bfd_elf32_cr16c_vec.
8280 * configure: Regenerate.
8281 * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
8282 BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
8283 BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
8284 BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
8285 BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
8286 BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
8287 BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
8288 BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
8289 BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
8290 BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
8291 BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
8292 BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
8293 BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
8294 BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
8295 BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
8296 BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
8297 BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
8298 BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
8299 BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
8300 BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
8301 * targets.c (bfd_elf32_cr16c_vec): Declare.
8302 (bfd_target_vector): Add bfd_elf32_cr16c_vec.
8303 * cpu-cr16c.c: New file.
8304 * elf32-cr16c.c: Likewise.
8305 * libbfd.h: Regenerate.
8306 * bfd-in2.h: Likewise.
8308 2004-03-30 Jakub Jelinek <jakub@redhat.com>
8310 * elf.c (map_sections_to_segments): Fix handling of .tbss.
8312 2004-03-27 Alan Modra <amodra@bigpond.net.au>
8314 * Makefile.am: Remove all mention of elflink.h.
8315 * Makefile.in: Regenerate.
8316 * bfd-in.h (bfd_elf_discard_info): Declare.
8317 (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
8318 * bfd-in2.h: Regenerate.
8319 * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
8320 bfd_elf32_link_record_dynamic_symbol,
8321 bfd_elf64_link_record_dynamic_symbol,
8322 _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
8323 bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
8324 _bfd_elf32_link_record_local_dynamic_symbol,
8325 _bfd_elf64_link_record_local_dynamic_symbol,
8326 _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
8327 _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
8328 _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
8329 _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
8330 _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
8331 _bfd_elf32_reloc_symbol_deleted_p,
8332 _bfd_elf64_reloc_symbol_deleted_p): Delete.
8333 (bfd_elf_link_record_dynamic_symbol,
8334 bfd_elf_link_record_local_dynamic_symbol,
8335 bfd_elf_final_link, bfd_elf_gc_sections,
8336 bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
8337 bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
8338 bfd_elf_reloc_symbol_deleted_p): Declare.
8339 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
8340 * elf32-arm.h: Update for changed function names. Remove local
8341 WILL_CALL_FINISH_DYNAMIC_SECTION define.
8342 * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
8343 * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
8344 * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
8345 * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
8346 * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
8347 * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
8348 * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
8349 * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
8350 * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
8351 (bfd_elfNN_print_symbol): Define.
8352 * elfcode.h: Don't include elflink.h.
8353 (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
8354 elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
8355 elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
8356 elf_gc_record_vtinherit, elf_gc_record_vtentry,
8357 elf_link_record_local_dynamic_symbol): Don't define.
8358 * elflink.c: Update for changed function names. Move elflink.h
8360 * elflink.h: Delete file.
8361 * po/SRC-POTFILES.in: Regenerate.
8362 * po/bfd.pot: Regenerate.
8364 2004-03-27 Alan Modra <amodra@bigpond.net.au>
8366 * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
8367 "name" for global syms accidentally removed in 2004-03-20 change.
8369 2004-03-27 Alan Modra <amodra@bigpond.net.au>
8371 * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
8372 * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
8373 where Elf_External_* is different for 64 and 32 bit, with
8374 corresponding elf_size_info field.
8375 (struct elf_final_link_info): Use "bfd_byte *" instead
8376 of "Elf_External_Sym *" for external_syms and symbuf.
8377 (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
8378 vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
8379 (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
8380 (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
8381 (elf_link_sort_cmp2): Adjust.
8382 (elf_link_sort_relocs): Set up r_sym_mask local var instead of
8383 using ELF_R_SYM macro. Set u.sym_mask.
8384 (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
8385 version, elf_stringtab_init. Ditto for bfd_section_from_elf_index
8386 vs. section_from_elf_index. Adjust Elf_External_Sym pointer
8387 arithmetic. Pass bed to elf_link_flush_output_syms. Adjust
8388 Elf_External_Dyn pointer arithmentic. Use bed swap_dyn_in and
8389 swap_syn_out functions. Rearrange dyn swap in/out switch.
8390 (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
8391 Pass bed to elf_link_flush_output_syms. Use bed swap_symbol_out.
8392 (elf_link_flush_output_syms): Add elf_backend_data arg.
8393 (elf_link_check_versioned_symbol): Likewise.
8394 (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
8395 Adjust Elf_External_Sym pointer arithmetic. Use bed swap_symbol_out.
8396 (elf_link_input_bfd): Use bfd_section_from_elf_index. Set up
8397 r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
8398 ELF_R_TYPE and ELF_R_INFO macros.
8399 (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
8400 based on size rather than using ELF_R_INFO.
8401 (elf_gc_mark): Set up r_sym_shift local var and use instead of
8403 (struct alloc_got_off_arg): New.
8404 (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
8405 ARCH_SIZE. Pass get entry size down to elf_gc_allocate_got_offsets.
8406 (elf_gc_allocate_got_offsets): Adjust.
8407 (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
8408 ELF_R_SYM. Use bfd_section_from_elf_index.
8409 (elf_bfd_discard_info): Set cookie.r_sym_shift.
8410 * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
8411 (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
8413 2004-03-26 Stan Shebs <shebs@apple.com>
8415 Remove MPW support, no longer used.
8416 * config.bfd (powerpc-*-mpw*): Remove configuration.
8417 * mpw-config.in, mpw-make.sed: Remove files.
8418 * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
8420 2004-03-26 Alan Modra <amodra@bigpond.net.au>
8422 * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
8423 (ppc64_elf_add_symbol_hook): New function.
8424 * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
8425 const from Elf_Internal_Sym param.
8426 * elflink.c (elf_link_add_object_symbols): Adjust.
8427 * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
8428 * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
8429 * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
8430 * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
8431 * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
8432 * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
8433 * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
8434 * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
8435 * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
8436 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
8437 * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
8438 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
8439 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
8440 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
8441 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
8442 * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
8444 2004-03-26 Alan Modra <amodra@bigpond.net.au>
8446 * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
8447 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
8448 (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
8449 (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
8450 (bfd_elf64_bfd_link_add_symbols): Delete.
8451 (bfd_elf_link_add_symbols): Declare.
8452 * elfcode.h (elf_bfd_link_add_symbols): Delete.
8453 * elflink.c: Include safe-ctype.h.
8454 (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
8456 (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
8457 (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
8459 (elf_link_add_archive_symbols): Rename from
8460 _bfd_elf_link_add_archive_symbols, make static.
8461 (elf_link_add_object_symbols): New function. Corresponding
8462 elflink.h function converted to use elf_size_info.
8463 (bfd_elf_link_add_symbols): Likewise.
8464 (bfd_elf_size_dynamic_sections): Adjust.
8465 * elflink.h (elf_bfd_link_add_symbols): Delete.
8466 (elf_link_add_object_symbols): Delete.
8467 * elf32-gen.c (elf32_generic_link_add_symbols): Call
8468 bfd_elf_link_add_symbols.
8469 * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
8471 2004-03-25 Alan Modra <amodra@bigpond.net.au>
8473 * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
8474 and chained shared libs only if dynsym. Clear dynsym on forced-local.
8476 * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
8477 (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
8478 (_bfd_elf_add_dt_needed_tag): Declare.
8479 (_bfd_elf_sort_symbol): Declare.
8480 (_bfd_elf_finalize_dynstr): Declare.
8481 (RELOC_FOR_GLOBAL_SYM): Formatting.
8482 * elfcode.h (elf_add_dynamic_entry): Delete.
8483 * elflink.c (_bfd_elf_add_dynamic_entry): New function. Corresponding
8484 elflink.h function converted to use elf_size_info.
8485 (_bfd_elf_add_dt_needed_tag): Likewise.
8486 (_bfd_elf_sort_symbol): Likewise.
8487 (_bfd_elf_finalize_dynstr): Likewise.
8488 (compute_bucket_count): Likewise.
8489 (bfd_elf_size_dynamic_sections): Likewise. Check result of
8490 _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
8491 (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
8492 * elflink.h: ..here.
8493 (sort_symbol, add_dt_needed_tag): Delete.
8494 (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
8495 (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
8497 * elf32-arm.h (add_dynamic_entry): Update. Remove casts.
8498 * elf32-cris.c (add_dynamic_entry): Likewise.
8499 * elf32-hppa.c (add_dynamic_entry): Likewise.
8500 * elf32-i370.c (add_dynamic_entry): Likewise.
8501 * elf32-i386.c (add_dynamic_entry): Likewise.
8502 * elf32-m32r.c (add_dynamic_entry): Likewise.
8503 * elf32-m68k.c (add_dynamic_entry): Likewise.
8504 * elf32-ppc.c (add_dynamic_entry): Likewise.
8505 * elf32-s390.c (add_dynamic_entry): Likewise.
8506 * elf32-sh.c (add_dynamic_entry): Likewise.
8507 * elf32-sparc.c (add_dynamic_entry): Likewise.
8508 * elf32-vax.c (add_dynamic_entry): Likewise.
8509 * elf32-xtensa.c (add_dynamic_entry): Likewise.
8510 * elf64-alpha.c (add_dynamic_entry): Likewise.
8511 * elf64-hppa.c (add_dynamic_entry): Likewise.
8512 * elf64-ppc.c (add_dynamic_entry): Likewise.
8513 * elf64-s390.c (add_dynamic_entry): Likewise.
8514 * elf64-sparc.c (add_dynamic_entry): Likewise.
8515 * elf64-x86-64.c (add_dynamic_entry): Likewise.
8516 * elfxx-ia64.c (add_dynamic_entry): Likewise.
8517 * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
8518 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
8519 * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
8520 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
8522 2004-03-23 Paul Brook <paul@codesourcery.com>
8524 * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
8526 2004-03-22 Bob Wilson <bob.wilson@acm.org>
8528 * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
8529 literal tables and check for relocs outside of literal pools.
8530 (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
8531 (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
8533 (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
8534 (elf_xtensa_relocate_section): Read literal tables and check for
8535 dynamic relocations in read-only sections and not in literal pools.
8537 2004-03-23 Alan Modra <amodra@bigpond.net.au>
8540 * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
8542 2004-03-22 Hans-Peter Nilsson <hp@axis.com>
8544 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
8545 R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
8546 not defined by the executable, or defined in a DSO.
8547 <eliding run-time relocation of .got>: Initialize GOT entry for a
8548 function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
8550 (cris_elf_gc_sweep_hook): Improve fallthrough marking.
8551 (elf_cris_try_fold_plt_to_got): Improve head comment. Do not fold
8552 a PLT reloc to GOT for an executable.
8553 (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
8554 .got for a DSO and explain why.
8555 (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
8556 and unreferenced symbols for which a PLT is defined. Adjust
8557 dynamic-symbol pruning correspondingly, to make sure we don't lose
8558 a dynamic symbol also defined by a DSO.
8560 2004-03-22 Alan Modra <amodra@bigpond.net.au>
8562 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
8563 and rel args. Group input and output args. Wrap to 80 columns.
8564 * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
8565 elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
8566 elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
8567 elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
8568 elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
8569 elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
8570 elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
8571 elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
8572 RELOC_FOR_GLOBAL_SYMBOL invocation.
8574 2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
8576 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
8577 unresolved symbols in objects aren't allowed.
8579 * elf-hppa.h (elf_hppa_relocate_section): Properly handle
8581 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
8582 (elf_hppa_unmark_useless_dynamic_symbols):
8583 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
8584 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
8585 (elf32_hppa_relocate_section): Likewise.
8586 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8587 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8588 * elf32-sh.c (sh_elf_relocate_section): Likewise.
8589 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
8590 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
8592 * elf-m10200.c (mn10200_elf_relocate_section): Use
8593 RELOC_FOR_GLOBAL_SYMBOL.
8594 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
8595 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
8596 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8597 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
8598 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8599 * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
8600 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8601 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
8602 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8603 * elf32-v850.c (v850_elf_relocate_section): Likewise.
8604 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8605 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
8607 2004-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
8609 * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
8610 (final_link_relocate): Likewise.
8611 * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
8612 R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
8614 2004-03-19 Alan Modra <amodra@bigpond.net.au>
8616 * Makefile.am: Run "make dep-am".
8617 * Makefile.in: Regenerate.
8618 * aclocal.m4: Regenerate.
8619 * config.in: Regenerate.
8620 * po/bfd.pot: Regenerate.
8622 2004-03-19 Alan Modra <amodra@bigpond.net.au>
8623 H.J. Lu <hongjiu.lu@intel.com>
8625 * elflink.c (_bfd_elf_merge_symbol): Revert last change. Move
8626 type and size change code to where it was previously. Remove
8627 dt_needed param. Treat old weak syms as strong if new sym is
8628 from a shared lib, even when old sym is from another shared
8629 lib. Remove unnecessary tests of oldweak and newweak. Correct
8631 (_bfd_elf_add_default_symbol): Remove dt_needed param. Update
8632 _bfd_elf_merge_symbol calls.
8633 * elflink.h (elf_link_add_object_symbols): Update calls. Remove
8634 dt_needed local var. Update comments.
8635 * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
8636 (_bfd_elf_add_default_symbol): Likewise.
8638 * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
8639 strong syms in one shared object overriding weak syms in another.
8641 2004-03-18 Alan Modra <amodra@bigpond.net.au>
8643 * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add
8644 dyn_lib_class field. Rearrange for better packing.
8645 (elf_dt_soname): Delete.
8646 (elf_dyn_lib_class): Define.
8647 * elf.c (bfd_elf_set_dt_needed_name): Update comment.
8648 (bfd_elf_set_dt_needed_soname): Delete.
8649 (bfd_elf_set_dyn_lib_class): New function.
8650 * elflink.h (add_dt_needed_tag): New function. Split out from..
8651 (elf_link_add_object_symbols): ..here. Rename "name" to "soname".
8652 Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback
8653 initialization of soname.
8654 (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
8656 * bfd-in.h (enum dynamic_lib_link_class): New.
8657 (bfd_elf_set_dt_needed_soname): Delete.
8658 (bfd_elf_set_dyn_lib_class): Declare.
8659 * bfd-in2.h: Regenerate.
8661 * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
8662 (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
8663 * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
8664 symbol loop. Instead use add_needed to flag tag as written.
8666 2004-03-17 Nathan Sidwell <nathan@codesourcery.com>
8668 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
8669 logic for null_input_bfd detection.
8671 2004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8673 * config.bfd: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
8675 2004-03-16 Mark Kettenis <kettenis@gnu.org>
8677 * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
8680 2004-03-16 Alan Modra <amodra@bigpond.net.au>
8682 * elflink.c (elf_link_read_relocs_from_section): Don't use
8683 NUM_SHDR_ENTRIES in end of reloc calc. Move NULL shdr check..
8684 (_bfd_elf_link_read_relocs): ..to here.
8685 * elf32-ppc.c (ppc_elf_relax_section): Formatting.
8687 2004-03-16 Alan Modra <amodra@bigpond.net.au>
8689 * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
8690 values selected in configure.host. Require both to be defined
8691 before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to
8692 corresponding BFD_HOST vars with quotes.
8693 <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
8694 Always require BFD_HOST_64_BIT_DEFINED.
8695 <file_ptr type>: Find off_t size before emitting message. Combine
8696 off_t and ftello64 conditional.
8697 * configure: Regenerate.
8699 2004-03-16 Alan Modra <amodra@bigpond.net.au>
8701 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
8702 aliasing warning. Remove trailing whitespace throughout file.
8704 2004-03-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
8706 * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
8707 input_section in calls to get_dyn_name.
8708 * elf64-hppa.c (get_dyn_name): Change type of first argument to "bfd *". Use section id of first section in input BFD to build dynamic name for
8710 (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
8712 2004-03-15 Alan Modra <amodra@bigpond.net.au>
8714 * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
8715 (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
8716 (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
8717 (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
8718 (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
8719 * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
8720 (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
8722 * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
8723 (bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
8724 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
8725 (bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
8726 (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
8727 * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
8728 (read_8_bytes, read_indirect_string, read_address): Likewise.
8729 (read_abbrevs, parse_comp_unit): Likewise.
8730 * targets.c (struct bfd_target): Likewise.
8731 * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
8732 * hppabsd-core.c: Likewise. Formatting.
8733 * hpux-core.c: Likewise.
8734 * irix-core.c: Likewise.
8735 * netbsd-core.c: Likewise.
8736 * osf-core.c: Likewise.
8737 * ptrace-core.c: Likewise.
8738 * sco5-core.c: Likewise.
8739 * trad-core.c: Likewise.
8740 * configure: Regenerate.
8741 * bfd-in2.h: Regenerate.
8743 2004-03-15 Alan Modra <amodra@bigpond.net.au>
8745 * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
8746 (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
8747 (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
8748 (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
8749 (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
8750 (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
8751 (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
8752 * libbfd.c: Likewise in function definitions.
8753 (bfd_put_8): Mask with 0xff rather than casting to char.
8754 (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
8755 (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
8756 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
8757 (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
8758 (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
8759 (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
8760 * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
8761 (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
8762 (H_GET_64, H_GET_32, H_GET_16): Likewise.
8763 (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
8764 * archive.c (do_slurp_coff_armap): Update swap prototype.
8765 * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
8766 (tic54x_getl_signed_32): Likewise.
8767 (tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
8768 * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
8769 * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
8770 (bfd_getp_signed_32, bfd_putp32): Likewise.
8771 * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
8772 bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
8773 bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
8774 bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
8775 bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
8776 bfd_h_getx_signed_16, bfd_h_putx16.
8777 * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
8778 * hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
8779 * hpux-core.c: Likewise.
8780 * irix-core.c: Likewise.
8781 * netbsd-core.c: Likewise.
8782 * osf-core.c: Likewise.
8783 * ptrace-core.c: Likewise.
8784 * sco5-core.c: Likewise.
8785 * trad-core.c: Likewise.
8786 * bfd-in2.h: Regenerate.
8788 2004-03-15 Matt Thomas <matt@3am-software.com>
8790 * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
8793 2004-03-13 Mark Kettenis <kettenis@gnu.org>
8795 * config.bfd: Add x86_64-*-openbsd*.
8796 * configure.in (x86_64-*-openbsd*): Set COREFILE to
8798 * configure: Regenerate.
8800 2004-03-12 Nick Clifton <nickc@redhat.com>
8801 Dave Murphy <wintermute2k4@ntlworld.com>
8803 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
8804 if the input bfd does not contain any code.
8806 2004-03-09 Steve Ellcey <sje@cup.hp.com>
8808 * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
8810 2004-03-05 Fred Fish <fnf@redhat.com>
8812 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
8813 mips16 symbols to be even rather than testing first for even/odd.
8814 (_bfd_mips_elf_link_output_symbol_hook): Ditto.
8816 2004-03-05 Nathan Sidwell <nathan@codesourcery.com>
8818 * elf.c (map_sections_to_segments): Ignore .tbss sections for
8821 2004-03-03 Alexandre Oliva <aoliva@redhat.com>
8823 * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
8824 undefined symbols as hash_new.
8826 2003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
8828 * archures.c: Add bfd_mach_sh4_nommu_nofpu.
8830 * elf32-sh.c: Ditto.
8831 * bfd-in2.h: Regenerate.
8833 2004-03-02 Alexandre Oliva <aoliva@redhat.com>
8835 * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
8837 (_frv_count_got_plt_entries): Initialize them.
8838 (frv_pic_relocs_info_find): Add insert argument. Adjust all
8840 (frv_pic_relocs_info_for_global): Likewise.
8841 (frv_pic_relocs_info_for_local): Likewise.
8842 (frv_pic_merge_early_relocs_info): New.
8843 (_frv_resolve_final_relocs_info): Use it in case one entry maps to
8845 (_frv_add_dyn_reloc): Add entry argument. Adjust all callers.
8846 Check that we don't exceed the allocated count for entry.
8847 (_frv_add_rofixup): Likewise.
8848 (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
8849 (elf32_frv_finish_dynamic_sections): Improve error message in case
8850 we emit too few rofixup entries.
8852 2004-03-01 Richard Sandiford <rsandifo@redhat.com>
8854 * archures.c (bfd_mach_fr450): New.
8855 * bfd-in2.h: Regenerate.
8856 * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
8857 (arch_info_500): Link to it.
8858 * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
8859 (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
8860 (frv_elf_arch_extension_p): New function.
8861 (frv_elf_merge_private_bfd_data): Use it.
8863 2004-02-28 H.J. Lu <hongjiu.lu@intel.com>
8865 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
8867 * elflink.h (is_global_data_symbol_definition): Moved to
8869 (elf_link_is_defined_archive_symbol): Likewise.
8870 (elf_link_add_archive_symbols): Likewise. Renamed to
8871 _bfd_elf_link_add_archive_symbols.
8873 * elflink.c (elf_link_is_defined_archive_symbol): Get the size
8874 of ELF symbol table entry from backend.
8875 (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
8876 instead of elf_link_add_object_symbols.
8878 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
8880 * elf-bfd.h (struct elf_backend_data): Added
8881 elf_backend_can_make_relative_eh_frame,
8882 elf_backend_can_make_lsda_relative_eh_frame and
8883 elf_backend_encode_eh_address.
8884 (_bfd_elf_encode_eh_address): Declare.
8885 (_bfd_elf_can_make_relative): Declare.
8886 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
8887 hooks to decide whether to attempt to make_relative and
8889 (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
8890 (_bfd_elf_can_make_relative): New.
8891 (_bfd_elf_encode_eh_address): New.
8892 * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
8893 (frv_elf_encode_eh_address): New.
8894 (elf_backend_can_make_relative_eh_frame): Define.
8895 (elf_backend_can_make_lsda_relative_eh_frame): Define.
8896 (elf_backend_encode_eh_address): Define.
8898 (elf_backend_can_make_relative_eh_frame): Define.
8899 (elf_backend_can_make_lsda_relative_eh_frame): Define.
8900 (elf_backend_encode_eh_address): Define.
8901 (elfNN_bed): Add them.
8903 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
8905 * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
8906 complain_on_overflow to signed.
8908 2004-02-27 H.J. Lu <hongjiu.lu@intel.com>
8910 * elflink.h (sort_symbol): New.
8911 (elf_link_add_object_symbols): Use a sorted symbol array for
8914 2004-02-27 Jakub Jelinek <jakub@redhat.com>
8916 * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
8917 for pc relative relocs.
8918 (elf_s390_relocate_section): Likewise.
8919 * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
8920 for pc relative relocs.
8921 (elf_s390_relocate_section): Likewise.
8923 2004-02-26 H.J. Lu <hongjiu.lu@intel.com>
8925 * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
8928 2004-02-25 H.J. Lu <hongjiu.lu@intel.com>
8930 * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
8931 field to track if a relocation is against readonly section.
8932 (count_dyn_reloc): Take a new argument for rent->reltext.
8933 (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
8934 (get_reloc_section): Don't set ia64_info->reltext here.
8935 (allocate_dynrel_entries): Set ia64_info->reltext here.
8937 2004-02-24 Alexandre Oliva <aoliva@redhat.com>
8939 * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
8940 (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
8941 function's descriptor to symbol+offset, and map local undefweak
8942 symbol to NULL function descriptor.
8943 (elf32_frv_relocate_section): Likewise.
8945 2004-02-23 Mark Kettenis <kettenis@gnu.org>
8947 * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
8949 * netbsd-core.c (M_SPARC64_OPENBSD): Define.
8950 (netbsd_core_file_p): Set architecture from machine ID for
8953 2004-02-23 Jakub Jelinek <jakub@redhat.com>
8955 * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
8956 DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
8958 2004-02-21 H.J. Lu <hongjiu.lu@intel.com>
8960 * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
8961 symbols with non-default visibility.
8963 2004-02-21 Danny Smith <daanysmith@users.sourceforge.net>
8965 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
8966 IMAGE_SCN_MEM_WRITE on known sections only.
8968 2004-02-20 Jakub Jelinek <jakub@redhat.com>
8970 * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
8971 symbols used in PIE relocs.
8973 2004-02-19 Jakub Jelinek <jakub@redhat.com>
8975 * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
8978 2004-02-18 Daniel Jacobowitz <drow@mvista.com>
8980 * configure.in: Update version to 2.15.90.
8981 * configure: Regenerate.
8983 2004-02-17 Daniel Jacobowitz <drow@mvista.com>
8984 Richard Sandiford <rsandifo@redhat.com>
8986 * elfxx-mips.c (mips_elf_calculate_relocation): Use
8987 _bfd_elf_symbol_refs_local_p to decide whether to decay
8988 a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
8989 (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
8990 relocs if the symbol wasn't defined by a regular object file.
8991 Don't check the symbol's dynindx.
8993 2004-02-16 Andrew Cagney <cagney@redhat.com>
8995 * bfd-in.h (file_ptr, ufile_ptr): Configure type using
8997 * bfd-in2.h: Re-generate.
8999 2004-02-14 Andrew Cagney <cagney@redhat.com>
9001 * configure.host (HDEFINES): When hppa*-*-hpux*, define
9002 _LARGEFILE64_SOURCE.
9004 2004-02-13 Andrew Cagney <cagney@redhat.com>
9006 * elf.c (vma_page_aligned_bias): New function.
9007 (assign_file_positions_except_relocs)
9008 (assign_file_positions_for_segments): Replace broken modulo
9009 arithmetic with call to vma_page_aligned_bias.
9011 2004-02-11 Andrew Cagney <cagney@redhat.com>
9013 * bfd-in.h: Update copyright.
9014 (bfd_tell): Change return type to file_ptr.
9015 * bfd-in2.h: Re-generate.
9016 * cache.c: Update copyright.
9017 (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
9019 (close_one): Use real_ftell.
9020 * bfdio.c: Update copyright.
9021 (real_ftell, real_fseek): New functions.
9022 (bfd_tell): Use real_fseek and real_ftell, change return type to
9024 (bfd_seek): Use real_ftell and real_fseek, change type of
9025 file_position to a file_ptr.
9026 * libbfd-in.h: Update copyright.
9027 (real_ftell, real_fseek): Declare.
9028 * libbfd.h: Re-generate.
9030 * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
9031 fseeko and fseeko64. Determine bfd_file_ptr.
9032 * configure: Re-generate.
9033 * config.in: Re-generate.
9035 2004-02-09 Anil Paranjpe <anilp1@KPITCummins.com>
9037 * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
9038 * elf32-h8300.c: Likewise.
9040 2004-02-09 Christian Vogel <vogelchr@vogel.cx>
9041 Nick Clifton <nickc@redhat.com>
9043 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
9044 GOT entries with no associated GOT subsection.
9046 2004-02-09 Richard Sandiford <rsandifo@redhat.com>
9048 * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
9049 * elf.c (swap_out_syms): Use it to decide whether local section
9050 symbols should be named.
9051 * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
9052 * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
9053 (elf_backend_name_local_section_symbols): Define.
9054 * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
9056 2004-01-30 H.J. Lu <hongjiu.lu@intel.com>
9058 * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
9059 (elfNN_ia64_relax_section): Optimize brl to br during the relax
9062 2004-01-30 Alexandre Oliva <aoliva@redhat.com>
9064 * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
9065 to bfd_link_hash_entry passed by reference to
9066 _bfd_generic_link_add_one_symbol.
9068 2004-01-25 H.J. Lu <hongjiu.lu@intel.com>
9070 * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
9071 relocations against dynamic symbols.
9073 2004-01-23 Daniel Jacobowitz <drow@mvista.com>
9075 * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
9078 2004-01-21 Tom Rix <tcrix@worldnet.att.net>
9080 * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
9081 * bfd-in2.h, libbfd.h: Rebuilt.
9083 2004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
9085 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
9086 IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
9087 flag has been cleared.
9089 2004-01-19 Kazu Hirata <kazu@cs.umass.edu>
9091 * coff-h8300.c: Add and adjust comments about relaxation.
9092 * elf32-h8300.c: Likewise.
9094 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
9096 * coff-h8300.c: Fix comment typos.
9097 * elf32-h8300.c: Likewise.
9099 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
9101 * coff-h8300.c: Add comments about relaxation.
9102 * elf32-h8300.c: Likewise.
9104 2004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
9106 * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
9108 * aclocal.m4: Regenerate.
9109 * configure: Regenerate.
9111 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
9113 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
9114 mips_elf64_rtype_to_howto instead of using howto_table.
9116 2004-01-13 Daniel Jacobowitz <drow@mvista.com>
9118 * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
9120 (elf32_arm_check_relocs): Don't increment the PLT refcount for
9121 relocs which would not use the PLT.
9123 2004-01-13 Alan Modra <amodra@bigpond.net.au>
9125 * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
9126 (ppc64_elf_gc_sweep_hook): Likewise.
9127 (ppc64_elf_size_dynamic_sections): Test for .plt directly.
9129 2004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
9131 Adds linker relaxation support for bit manipulation insns like
9132 band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
9134 * elf32-h8300.c: Opcode for bit manipulation insn is checked in
9135 elf32_h8_relax_section function while relxation for aa:16 and aa:32.
9136 * coff-h8300.c: Opcode for bit manipulation insn is checked in
9137 h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
9139 2004-01-12 Alan Modra <amodra@bigpond.net.au>
9141 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
9143 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
9145 * elf32-h8300.c: Fix formatting.
9147 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
9149 * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
9150 dynamic object is present. Declare r_symndx and h in an inner
9152 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
9154 2004-01-09 Daniel Jacobowitz <drow@mvista.com>
9156 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
9157 (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
9158 (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
9159 identically. Do not emit PC24 relocations for shared libraries.
9160 (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
9161 identically. Don't adjust pc_count.
9162 (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
9163 Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
9164 adjust count for branch relocations.
9165 (allocate_dynrelocs): Correct typo in call to
9166 WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
9167 PC24 or PLT32 relocs when linking.
9169 2004-01-09 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
9171 * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
9172 relocation howto with ARM_26 one for consistency.
9173 (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
9174 that will be converted to ARM_26D ones, since we always want 'done'
9175 relocations to be reflected in section's data.
9176 (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
9178 (_bfd_final_link_relocate): Do not modify "inplace" data, if not
9181 2004-01-08 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
9183 * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
9184 are not partial_inplace during a relocatable link.
9186 2004-01-08 Kazu Hirata <kazu@cs.umass.edu>
9188 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
9189 if no dynamic object is present. Declare r_symndx and h in an
9192 2004-01-07 H.J. Lu <hongjiu.lu@intel.com>
9194 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
9195 trampoline if it is known out of range.
9197 2004-01-06 Alexandre Oliva <aoliva@redhat.com>
9199 2003-12-17 Alexandre Oliva <aoliva@redhat.com>
9200 * elf32-frv.c (_frv_osec_readonly_p): New.
9201 (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
9203 (_frv_count_got_plt_entries): Adjust expected count accordingly.
9204 (elf32_frv_relocate_section): Likewise. Error out if attempting
9205 to emit rofixups or dynamic relocs in read-only segments. Use
9206 _bfd_elf_section_offset to adjust r_offsets in rofixups and
9207 dynamic relocations.
9208 2003-12-12 Alexandre Oliva <aoliva@redhat.com>
9209 * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
9210 relocations or fixups involving merged sections correctly. Avoid
9211 crash when undefined symbol is referenced by R_FRV_32 or
9212 R_FRV_FUNCDESC_VALUE.
9213 2003-12-02 Alexandre Oliva <aoliva@redhat.com>
9214 * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
9215 input section holding local symbol to addend of R_FRV_32 or
9216 R_FRV_FUNCDESC_VALUE dynamic relocation.
9217 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
9218 * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
9219 (elf32_frv_always_size_sections): Don't store pointer to
9220 __stacksize symbol in sec_info.
9221 (elf32_frv_modify_segment_map): Look it up here.
9222 2003-11-26 Alexandre Oliva <aoliva@redhat.com>
9223 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
9224 of the lazy PLT entry, not only its offset, as the low word of a
9225 function descriptor.
9226 2003-11-10 Alexandre Oliva <aoliva@redhat.com>
9227 * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
9228 if a hash table entry already exists but is not a definition.
9229 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
9230 * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
9231 (_frv_add_rofixup): Don't inline.
9232 (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
9233 for undefweak symbols.
9234 (elf32_frv_relocate_section): Avoid crash while computing
9235 relocation when linking with shared library. Only emit rofixups
9236 and dynamic relocations for alloc&load sections. Mark binaries
9237 with inter-segment relocations for relocation as a unit.
9238 (_frv_create_got_section): Rename .rofixup.got to .rofixup.
9239 (DEFAULT_STACK_SIZE): New.
9240 (_frv_count_got_plt_entries): Fix thinko in deciding whether to
9241 emit rofixups or dynamic relocs when linking dynamic non-PIE
9243 (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
9244 shared libs too. Reserve the last entry for the GOT pointer.
9245 (elf32_frv_finish_dynamic_sections): Emit it.
9246 (elf32_frv_always_size_sections): New.
9247 (elf32_frv_modify_segment_map): New.
9248 (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
9250 (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
9251 (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
9252 (elf_backend_always_size_sections): New.
9253 (elf_backend_modify_segment_map): New.
9254 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
9255 * config.bfd: Added frv-*-*linux*.
9256 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
9257 ABS section, instead of crashing.
9258 (elf32_frv_relocate_section): Don't crash before warning about
9259 different segments in non-PIC relocation.
9260 2003-10-17 Alexandre Oliva <aoliva@redhat.com>
9261 * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
9262 relocs to undefweak symbols.
9263 (elf32_frv_relocate_section): Ditto for undefined symbols.
9264 2003-10-06 Alexandre Oliva <aoliva@redhat.com>
9265 * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
9266 gotfixup section was created.
9267 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
9268 * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
9269 FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
9270 complain_overflow_signed.
9271 * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
9272 have not been allocated.
9273 (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
9274 privfd only if dynamic sections were created.
9275 (elf32_frv_relocate_section): Compute gprel_segment, and use it
9276 for GPREL relocs. When linking relocatable FDPIC executables,
9277 emit warnings for relocations that would be illegal on PIE or
9278 shared libraries. Emit rofixup for R_FRV_32 only if input object
9280 (_frv_create_got_section): Define _gp symbol in the rofixup
9282 (elf32_frv_finish_dynamic_sections): If rofixups needed but
9283 dynamic sections missing, error out requesting -melf32frvfd.
9284 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
9285 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
9286 computation of addends from section and global or local symbol
9287 value. Change return type to bfd_boolean, and return a failure if
9288 a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
9289 nonzero addend is required.
9290 (elf32_frv_relocate_section): Likewise. Print error for
9291 unsupported nonzero addends.
9292 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
9293 * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
9294 force everything local.
9295 (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
9296 * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
9297 (frv_gotfixup_section): New.
9298 (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
9299 (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
9301 (_frv_add_rofixup): New.
9302 (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
9303 fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
9304 improve some ugly conditions.
9305 (elf32_frv_relocate_section): Likewise. Reject inter-segment
9306 relocations in fdpic.
9307 (_frv_create_got_section): Create .rofixup.got section.
9308 (struct _frv_dynamic_got_info): Added fixups.
9309 (_frv_count_got_plt_entries): Account in-GOT relocations into
9310 relocs32, relocsfd and relocsfdv. Account them into relocs or
9311 fixups, as appropriate.
9312 (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
9314 (elf32_frv_finish_dynamic_sections): Verify that the right number
9315 of relocations and fixups was generated.
9316 (elf32_frv_check_relocs): Compute relocs32, relocsfd and
9318 * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
9319 SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
9320 (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
9321 descriptor of a (formerly-)global symbol is local.
9322 (struct frv_pic_relocs_info): Adjust comments.
9323 (_frv_emit_got_relocs_plt_entries): Adjust.
9324 (elf32_frv_relocate_section): Likewise.
9325 (_frv_count_got_plt_entries): Likewise.
9326 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
9327 symbol's value to addend in the common preamble. Decay dynamic
9328 symbols to section+offset if they bind or call locally, for GOT
9329 and FUNCDESC_VALUE, respectively.
9330 (elf32_frv_relocate_section): Likewise.
9331 (elf32_frv_check_relocs): Don't register as dynamic symbols of
9332 internal or hidden visibility.
9333 2003-09-17 Alexandre Oliva <aoliva@redhat.com>
9334 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
9335 argument, so as to not call _bfd_elf_rel_local_sym to compute it.
9336 (elf32_frv_relocate_section): Pass relocation addend in. Use
9337 original relocation addend to look up the got relocs/plt entries
9338 table. Do not call _bfd_elf_rel_local_sym. Don't error out when
9339 processing relocations that reference .scommon symbols.
9340 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
9341 Introduce support for dynamic linking.
9342 * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
9343 (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
9344 elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
9345 (frv_reloc_type_lookup): Return REL howtos for executables and
9347 (frv_info_to_howto_rel): New.
9348 (struct frv_elf_link_hash_table): New.
9349 (frv_hash_table, frv_got_section, frv_gotrel_section,
9350 frv_plt_section, frv_pltrel_section, frv_relocs_info,
9351 frv_got_initial_offset, frv_plt_initial_offset): New macros.
9352 (frv_elf_link_hash_table_create): New.
9353 (struct frv_pic_relocs_info): New.
9354 (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
9355 (frv_pic_relocs_info_find): New.
9356 (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
9358 (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
9359 (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
9360 (_frv_emit_got_relocs_plt_entries): New.
9361 (elf32_frv_relocate_section): Add support for dynamic linking.
9362 Handle new relocations.
9363 (_frv_create_got_section): New.
9364 (elf32_frv_create_dynamic_sections): New.
9365 (ELF_DYNAMIC_INTERPRETER): New.
9366 (struct _frv_dynamic_got_info): New.
9367 (_frv_count_got_plt_entries): New.
9368 (struct _frv_dynamic_got_plt_info): New.
9369 (_frv_compute_got_alloc_data): New.
9370 (_frv_get_got_entry, _frv_get_fd_entry): New.
9371 (_frv_assign_got_entries, _frv_assign_plt_entries): New.
9372 (_frv_resolve_final_relocs_info): New.
9373 (elf32_frv_size_dynamic_sections): New.
9374 (elf32_frv_finish_dynamic_sections): New.
9375 (elf32_frv_adjust_dynamic_symbol): New.
9376 (elf32_frv_finish_dynamic_symbol): New.
9377 (elf32_frv_check_relocs): Handle new relocs. Explain how the
9379 (elf_info_to_howto_rel): Define.
9380 (bfd_elf32_bfd_link_hash_table_create): Define.
9381 (elf_backend_create_dynamic_sections): Define.
9382 (elf_backend_adjust_dynamic_symbol): Define.
9383 (elf_backend_size_dynamic_sections): Define.
9384 (elf_backend_finish_dynamic_symbol): Define.
9385 (elf_backend_finish_dynamic_sections): Define.
9386 (elf_backend_want_got_sym): Define.
9387 (elf_backend_got_header_size): Define.
9388 (elf_backend_want_got_plt): Define.
9389 (elf_backend_plt_readonly): Define.
9390 (elf_backend_want_plt_sym): Define.
9391 (elf_backend_plt_header_size): Define.
9392 (elf_backend_may_use_rel_p): Define.
9393 (elf_backend_may_use_rela_p): Define.
9394 (elf_backend_default_use_rela_p): Define.
9395 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
9396 * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
9397 R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
9398 R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
9399 (frv_reloc_map): Map the corresponding BFD relocs to them.
9400 (frv_reloc_type_lookup): ... and back to BFD relocs.
9401 * reloc.c: New relocs.
9402 * bfd-in2.h, libbfd.h: Rebuilt.
9403 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
9404 * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
9405 R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
9406 R_FRV_FUNCDESC_GOTLO): New.
9407 (frv_reloc_map): Map the corresponding BFD relocs to them.
9408 (frv_reloc_type_lookup): ... and back to BFD relocs.
9409 * reloc.c: New relocs.
9410 * bfd-in2.h, libbfd.h: Rebuilt.
9412 2004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
9414 * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
9415 targets to support pages of up to 64kB.
9416 (elf32_bed): Redefine to get a separate backend data structure for
9417 traditional targets.
9418 * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
9419 targets to support pages of up to 64kB.
9420 (elf64_bed): Redefine to get a separate backend data structure for
9421 traditional targets.
9422 * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
9423 targets to support pages of up to 64kB.
9424 (elf32_bed): Redefine to get a separate backend data structure for
9425 traditional targets.
9427 2004-01-04 Mark Kettenis <kettenis@gnu.org>
9429 * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
9431 2004-01-02 Mark Kettenis <kettenis@gnu.org>
9433 * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
9434 (elf_i386_grok_psinfo): Likewise.
9436 2004-01-02 Bernardo Innocenti <bernie@develer.com>
9438 * config.bfd: Add m68k-uClinux target.
9440 2004-01-01 Grant Edwards <grante@visi.com>
9442 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
9443 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
9444 (elf32_h8_gc_sweep_hook): New function.
9445 (elf_backend_gc_mark_hook): Define.
9446 (elf_backend_gc_sweep_hook): Define.
9447 (elf_backend_can_gc_sections): Define.
9449 For older changes see ChangeLog-0203
9455 version-control: never