1 2003-07-30 Randolph Chung <tausq@debian.org>
3 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
4 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
6 2003-07-30 Alan Modra <amodra@bigpond.net.au>
8 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
9 Replace PTR with void *. Formatting.
10 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
11 (make_mapping): Likewise.
13 2003-07-29 Alan Modra <amodra@bigpond.net.au>
15 * elf64-ppc.c (func_desc_adjust): Give linker created function
16 descriptor symbols a size and type.
17 (ppc64_elf_relocate_section): Correct lq insn test.
19 2003-07-28 Eric Christopher <echristo@redhat.com>
21 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
22 (ppc_elf_install_value): New function.
23 (ppc_elf_sort_rela): Remove.
24 (ppc_elf_relax_section): Rewrite. Remove old relaxation
25 and replace with out of range branch stubs.
26 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
28 2003-07-29 Alexandre Oliva <aoliva@redhat.com>
30 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
33 2003-07-28 Alan Modra <amodra@bigpond.net.au>
35 * elf.c (special_sections): Set attributes for .got and .plt.
37 2003-07-27 Alan Modra <amodra@bigpond.net.au>
39 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
40 on function descriptors.
41 (ELIMINATE_COPY_RELOCS): Expand comment.
42 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
45 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
47 * elf.c (_bfd_elf_new_section_hook): Set the default section
49 (elf_fake_sections): Set the section type based on asect->flags
50 if it is SHT_NULL. Don't abort on processor specific section
53 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
55 * bfd-in2.h: Regenerated.
57 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
59 * elf-bfd.h (bfd_elf_special_section): New.
60 (elf_backend_data): Add special_sections, a pointer to
61 bfd_elf_special_section.
62 (elf_section_type). New.
63 (elf_section_flags): New.
64 (_bfd_elf_get_sec_type_attr): New.
66 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
67 real section type/flags.
68 (special_sections): New.
69 (get_special_section): New.
70 (_bfd_elf_get_sec_type_attr): New.
71 (_bfd_elf_new_section_hook): Check special_section to set
72 elf_section_type and elf_section_flags.
73 (elf_fake_sections): Don't use section name to set ELF section
76 * elf32-m32r.c (m32r_elf_special_sections): New.
77 (elf_backend_special_sections): Defined.
79 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
80 (elf_backend_special_sections): Defined.
82 * elf32-mcore.c (mcore_elf_special_sections): New.
83 (elf_backend_special_sections): Defined.
85 * elf32-ppc.c (ppc_elf_special_sections): New.
86 (elf_backend_special_sections): Defined.
88 * elf32-sh64.c (sh64_elf_special_sections): New.
89 (elf_backend_special_sections): Defined.
91 * elf32-v850.c (v850_elf_special_sections): New.
92 (elf_backend_special_sections): Defined.
94 * elf32-xtensa.c (elf_xtensa_special_sections): New.
95 (elf_backend_special_sections): Defined.
97 * elf64-alpha.c (elf64_alpha_special_sections): New.
98 (elf_backend_special_sections): Defined.
100 * elf64-hppa.c (elf64_hppa_special_sections): New.
101 (elf_backend_special_sections): Defined.
103 * elf64-ppc.c (ppc64_elf_special_sections): New.
104 (elf_backend_special_sections): Defined.
106 * elf64-sh64.c (sh64_elf64_special_sections): New.
107 (elf_backend_special_sections): Defined.
109 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
110 (elf_backend_special_sections): Defined.
112 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
114 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
115 (elf_backend_special_sections): Defined.
117 * elfxx-target.h (elf_backend_special_sections): New. Default
119 (elfNN_bed): Initialize special_sections.
121 * section.c (bfd_abs_section): Remove const.
122 (bfd_und_section): Likewise.
123 (bfd_com_section): Likewise.
124 (bfd_ind_section): Likewise.
126 2003-07-24 Nick Clifton <nickc@redhat.com>
128 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
129 sections are assigned the LOAD attribute.
131 2003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
133 * elf32-sh.c: Convert to C90. Replace PTR with void *.
134 * elf32-sh64-com.c: Likewise.
135 * elf32-sh64.c: Likewise.
136 * elf32-sh64.h: Likewise.
137 * elf64-sh64.c: Likewise.
139 2003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
141 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
142 (allocate_dynrelocs): Likewise.
143 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
144 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
146 2003-07-24 Nick Clifton <nickc@redhat.com>
148 * po/fr.po: Updated French translation.
150 2003-07-23 Bob Wilson <bob.wilson@acm.org>
152 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
153 near the beginning of the file. Swap order of arguments. Call
154 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
155 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
156 (elf_xtensa_relocate_section): Likewise.
157 (shrink_dynamic_reloc_sections): Likewise.
159 2003-07-23 Bob Wilson <bob.wilson@acm.org>
161 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
162 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
163 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
164 first printing an error message.
165 (elf_xtensa_finish_dynamic_sections): Likewise.
166 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
167 discarding literal table entries.
168 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
169 (elf_xtensa_do_asm_simplify): Likewise.
171 2003-07-23 Stephane Carrez <stcarrez@nerim.fr>
173 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
174 we have a local symbol in common section.
176 2003-07-22 H.J. Lu <hongjiu.lu@intel.com>
178 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
181 2003-07-22 Nick Clifton <nickc@redhat.com>
183 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
184 expected RS6000 storage classes.
186 2003-07-21 H.J. Lu <hongjiu.lu@intel.com>
188 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
189 output_bfd unused to silence gcc.
191 2003-07-21 Nick Clifton <nickc@redhat.com>
193 * po/sv.po: Updated Swedish translation.
195 2003-07-21 Alan Modra <amodra@bigpond.net.au>
197 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
198 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
199 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
200 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
201 now done in _bfd_elf_symbol_refs_local_p.
202 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
203 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
204 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
206 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
208 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
210 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
212 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
213 (SYMBOL_CALLS_LOCAL): Likewise.
215 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
216 immediately if symbol isn't defined locally.
218 2003-07-18 Richard Henderson <rth@redhat.com>
220 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
221 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
222 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
223 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
224 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
225 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
226 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
227 Update all callers to provide the relocation being resolved.
229 2003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
231 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
234 2003-07-17 Nick Clifton <nickc@redhat.com>
236 * po/es.po: New Spanish translation.
237 * po/sv.po: New Swedish translation.
238 * po/opcodes.pot: Regenerate.
240 2003-07-16 Richard Henderson <rth@redhat.com>
242 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
243 * elfxx-ia64.c, targets.c: Likewise.
245 2003-07-16 Richard Henderson <rth@redhat.com>
247 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
248 for symbols defined locally plus -Bsymbolic. Tidy logic.
250 2003-07-15 Richard Sandiford <rsandifo@redhat.com>
252 * archures.c (bfd_mach_mips7000): New.
253 * bfd-in2.h: Regenerated.
254 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
255 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
256 (mips_mach_extensions): Add an entry for it.
258 2003-07-14 Nick Clifton <nickc@redhat.com>
260 * po/tr.po: Update with latest version.
261 * po/SRC-POTFILES.in: Regenerate.
262 * po/bfd.pot: Regenerate.
263 * Makfile.in: Regenerate.
264 * configure: Regenerate.
266 2003-07-12 Jeff Baker <jbaker@qnx.com>
268 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
269 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
270 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
271 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
273 2003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
275 * coffcode.h (coff_set_section_contents): Set the
276 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
278 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
280 * bfd-in.h (bfd_h8300_pad_address): Declare.
281 * bfd-in2.h: Regenerate.
282 * cpu-h8300.c (bfd_h8300_pad_address): New function.
283 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
284 addresses before checking whether they can be relaxed.
285 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
286 Don't complain about overflows in general 8-bit relocations.
287 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
288 Fix handling of R_H8_DIR24A8.
290 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
292 * elf32-h8300.c: Convert function prototypes and definitions
294 * coff-h8300.c: Likewise.
295 * cpu-h8300.c: Likewise.
297 2003-07-11 Alan Modra <amodra@bigpond.net.au>
299 * po/SRC-POTFILES.in: Regenerate.
300 * po/bfd.pot: Likewise.
302 2003-07-10 Bob Wilson <bob.wilson@acm.org>
304 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
305 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
307 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
308 and allocate memory for it.
309 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
310 section to the .got.loc section.
311 (elf_xtensa_finish_dynamic_sections): Fix up call to
312 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
313 the address of .got.loc.
314 (relax_property_section): Shrink .got.loc to match changes in any
315 literal table section.
316 (xtensa_is_property_section): Change to match
317 xtensa_get_property_section_name.
318 (xtensa_is_littable_section): New.
320 2003-07-10 H.J. Lu <hongjiu.lu@intel.com>
322 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
325 2003-07-10 Alan Modra <amodra@bigpond.net.au>
327 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
328 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
330 * Makefile.in: Regenerate.
332 2003-07-10 Alexandre Oliva <aoliva@redhat.com>
334 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
335 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
336 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
337 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
338 * elf32-am33lin.c: Rename global functions.
339 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
340 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
341 * configure.in (bfd_elf32_am33lin_vec): Added.
342 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
343 (elf32-am33lin.lo): List dependencies.
344 * aclocal.m4, configure, Makefile.in: Rebuilt.
345 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
346 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
347 ELF_ARCH was not defined before.
348 (elf_symbol_leading_char): Define if not defined.
349 * elf32-am33lin.c: Override the definitions above.
350 * targets.c (bfd_elf32_am33lin_vec): New.
352 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
354 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
355 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
357 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
358 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
359 ld-linux.so.2 to ld.so.1.
360 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
361 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
362 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
363 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
364 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
365 .rela.* section contents with bfd_zalloc.
366 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
367 * elf-m10300.c: Added declarations for functions missing them.
368 Merge some shared-library changes from the i386 back-end. Use
369 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
370 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
371 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
372 members of elf_link_hash_entry. Adjusted references.
373 (mn10300_elf_final_link_relocate): dynobj was already loaded
374 into a local variable, use it.
375 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
376 * elf-m10300.c: Add missing function prototypes.
377 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
378 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
379 relocation for dynamic relocations.
380 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
381 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
382 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
383 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
384 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
385 (_bfd_mn10300_elf_create_got_section): ... here, so that its
386 adress is already known at the time we compute relaxations.
387 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
388 and PLT32 to narrower relocations.
389 * libbfd.h, bfd-in2.h: Rebuilt.
390 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
391 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
392 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
393 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
394 BFD_RELOC_MN10300_RELATIVE): New relocs.
395 * libbfd.h, bfd-in2.h: Rebuilt.
396 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
397 (struct elf32_mn10300_link_hash_entry): Added DSO-related
399 (elf_mn10300_howto): Defined new relocation types.
400 (mn10300_reloc_map): Map them.
401 (_bfd_mn10300_elf_create_got_section): New fn.
402 (mn10300_elf_check_relocs): Handle PIC relocs.
403 (mn10300_elf_final_link_relocate): Likewise.
404 (mn10300_elf_relocate_section): Handle DSOs.
405 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
406 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
407 elf_mn10300_pic_plt_entry): New.
408 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
409 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
410 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
411 elf_mn10300_plt_reloc_offset: New macros.
412 (ELF_DYNAMIC_INTERPRETER): Likewise.
413 (_bfd_mn10300_elf_create_dynamic_sections): New function.
414 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
415 (_bfd_mn10300_elf_discard_copies): Likewise.
416 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
417 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
418 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
419 (elf_backend_can_gc_sections,
420 elf_backend_create_dynamic_sections,
421 elf_backend_adjust_dynamic_sections,
422 elf_backend_size_dynamic_sections,
423 elf_backend_finish_dynamic_symbol,
424 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
425 elf_backend_plt_readonly, elf_backend_want_plt_sym,
426 elf_backend_got_header_size, elf_backend_plt_header_size): New
429 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
431 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
432 * elf-m10300.c (compute_function_info): Account for AM33
433 registers in `movm' when computing stack space for `call' when
434 linking for AM33/2.0 link.
435 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
436 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
437 * bfd-in2.h: Rebuilt.
438 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
439 * elf-m10300.c: Updated.
440 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
441 * archures.c (bfd_mach_am332): Defined.
442 * bfd-in2.h: Rebuilt.
443 * cpu-m10300.c (bfd_am332_arch): Defined.
444 (bfd_am33_arch): Chained with am33-2.
445 * elf-m10300.c (elf_mn10300_mach): Handle am332.
446 (_bfd_mn10300_elf_final_write_processing): Likewise.
448 2003-07-09 H.J. Lu <hongjiu.lu@intel.com>
450 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
452 2003-07-10 Alan Modra <amodra@bigpond.net.au>
454 * elf64-ppc.c (bfd_elf64_mkobject): Define.
455 (struct ppc64_elf_obj_tdata): New.
456 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
457 (ppc64_elf_mkobject): New function.
458 (struct got_entry): Add "owner". Move "tls_type".
459 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
460 (ppc64_elf_init_stub_bfd): New function.
461 (create_got_section): Create header .got in dynobj. Create .got
462 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
463 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
464 Look for dynobj .got, and test it.
465 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
466 (update_local_sym_info): Likewise.
467 (ppc64_elf_check_relocs): Likewise.
468 (ppc64_elf_gc_sweep_hook): Likewise.
469 (ppc64_elf_tls_optimize): Likewise.
470 (allocate_dynrelocs): Likewise.
471 (ppc64_elf_size_dynamic_sections): Likewise.
472 (ppc64_elf_relocate_section): Likewise.
473 (ppc64_elf_next_toc_section): Update comment.
474 (toc_adjusting_stub_needed): Remove unneeded cast.
475 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
476 testing section flags.
477 (ppc64_elf_build_stubs): Likewise.
478 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
479 (ppc64_elf_finish_dynamic_sections): Write out got sections.
480 (func_desc_adjust): Copy over dynamic info for undef weaks.
481 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
482 (ppc64_elf_size_stubs): Update prototype.
483 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
484 input sections rather than scanning dynobj.
486 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
488 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
489 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
490 (mips_elf_create_msym_section): Delete.
491 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
492 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
493 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
494 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
495 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
496 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
497 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
499 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
501 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
504 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
506 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
507 of relocations whose offset is -2.
509 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
511 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
512 forced-local symbols like other locals. Don't create relocations
513 against STN_UNDEF in irix objects.
515 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
517 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
518 compatible objects, add the values of defined external symbols
521 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
523 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
524 initialize a GOT entry to the symbol's st_value.
526 2003-07-08 Alan Modra <amodra@bigpond.net.au>
528 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
529 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
530 (ppc_elf_tdata): Define.
531 (elf_local_ptr_offsets): Adjust.
532 (ppc_elf_mkobject): New function.
533 (bfd_elf32_mkobject): Define.
535 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
536 * elfcore.h (elf_core_file_p): Likewise.
537 * section.c (bfd_section_init): Remove prototype.
539 2003-07-08 Alan Modra <amodra@bigpond.net.au>
541 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
543 (enum elf_linker_section_enum): Delete.
544 (struct elf_linker_section): Delete.
545 (struct elf_linker_section_pointers): Delete.
546 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
547 Make linker_section_pointers a void**.
548 (elf_local_ptr_offsets, elf_linker_section): Don't define.
549 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
550 of old item in elf-bfd.h.
551 (struct elf_linker_section): Likewise.
552 (struct elf_linker_section_pointers): Likewise.
553 (elf_local_ptr_offsets): Define.
554 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
555 (ppc_elf_link_hash_newfunc): Init it.
556 (struct ppc_elf_link_hash_table): Add sbss.
557 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
559 (elf_create_linker_section): Fold into..
560 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
561 Make rela section here if shared.
562 (elf_find_pointer_linker_section): Pass lsect rather than enum.
563 (elf_create_pointer_linker_section): Adjust. zalloc rather than
565 (elf_finish_pointer_linker_section): Adjust. Don't make rela
567 (ppc_elf_check_relocs): Adjust.
568 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
569 creating .sbss by hand.
570 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
572 2003-07-04 Jakub Jelinek <jakub@redhat.com>
574 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
575 complain_overflow_bitfield.
576 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
577 complain_overflow_bitfield.
579 2003-07-04 Jakub Jelinek <jakub@redhat.com>
581 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
584 2003-07-04 Jakub Jelinek <jakub@redhat.com>
586 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
587 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
589 (get_fptr): For -pie create .opd as writable section and create
591 (elfNN_ia64_check_relocs): Change info->shared into
593 (allocate_fptr): Likewise.
594 (allocate_dynrel_entries): Account for a relative reloc for -pie
595 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
596 for undefweak symbol. Account for an IPLT reloc in .rela.opd
598 (set_got_entry): Don't create a relative reloc if -pie
599 want_ltoff_fptr for undefweak symbol.
600 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
601 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
604 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
606 * elf32-i386.c (elf_i386_relocate_section): Likewise.
607 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
608 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
609 * elf64-s390.c (elf_s390_relocate_section): Likewise.
610 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
611 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
612 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
613 * elf32-s390.c (elf_s390_relocate_section): Likewise.
614 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
616 2003-07-04 Paul Clarke <paulc@senet.com.au>
618 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
619 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
620 <R_H8_DIR32A16>: Fix type of relocation.
622 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
624 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
625 sections were created already. Remove unnecessary tests of
628 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
630 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
631 bfd_make_section for existing sections.
633 2003-07-04 Alan Modra <amodra@bigpond.net.au>
635 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
636 create_got_section if we already have done so.
637 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
638 (sh_elf_check_relocs): Likewise.
639 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
640 htab->root.dynobj instead.
641 (sh_elf_check_relocs): Likewise.
642 (sh_elf_finish_dynamic_sections): Likewise.
644 * section.c (bfd_make_section): Return NULL for existing section.
646 2003-07-04 Alan Modra <amodra@bigpond.net.au>
648 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
649 ppc_elf_create_got if we've already done so.
651 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
652 (_bfd_elf_find_pointer_linker_section): Likewise.
653 (bfd_elf32_create_pointer_linker_section): Likewise.
654 (bfd_elf32_finish_pointer_linker_section): Likewise.
655 (bfd_elf64_create_pointer_linker_section): Likewise.
656 (bfd_elf64_finish_pointer_linker_section): Likewise.
657 (_bfd_elf_make_linker_section_rela): Likewise.
658 * elfcode.h (elf_create_pointer_linker_section): Don't define.
659 (elf_finish_pointer_linker_section): Likewise.
660 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
661 (_bfd_elf_create_linker_section): Move this function..
662 (_bfd_elf_find_pointer_linker_section): ..and this..
663 * elflink.h (elf_create_pointer_linker_section): ..and this..
664 (elf_finish_pointer_linker_section): ..and this..
665 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
667 (elf_create_linker_section): Convert to C90, tidy.
668 (elf_find_pointer_linker_section): Likewise.
669 (elf_create_pointer_linker_section): Likewise.
670 (elf_finish_pointer_linker_section): Likewise.
671 * elf32-i370.c: Delete #if 0 code.
673 2003-07-02 Alan Modra <amodra@bigpond.net.au>
675 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
676 _restf* to be satisfied by shared libs, and always force them local.
677 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
678 Correct test for "bl".
679 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
682 2003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
684 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
685 (s390_tls_reloc): New function.
686 (elf_howto_table): Add long displacement relocations R_390_20,
687 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
688 (elf_s390_reloc_type_lookup): Likewise.
689 (elf_s390_check_relocs): Likewise.
690 (elf_s390_gc_sweep_hook): Likewise.
691 (elf_s390_relocate_section): Likewise.
692 * elf64-s390.c: Same changes as for elf32-s390.c.
693 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
694 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
695 BFD_RELOC_390_TLS_GOTIE20.
696 * bfd-in2.h: Regenerate.
697 * libbfd.h: Likewise.
699 2003-06-30 Alan Modra <amodra@bigpond.net.au>
701 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
702 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
704 2003-06-29 Alan Modra <amodra@bigpond.net.au>
706 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
707 Replace PTR with void *. Formatting.
708 * archive64.c: Likewise.
709 * archures.c: Likewise.
710 * bfd-in.h: Likewise.
713 * bfdwin.c: Likewise.
715 * corefile.c: Likewise.
716 * format.c: Likewise.
718 * libbfd-in.h: Likewise.
719 * libbfd.c: Likewise.
720 * linker.c: Likewise.
721 * opncls.c: Likewise.
723 * section.c: Likewise.
724 * simple.c: Likewise.
726 * targets.c: Likewise.
727 * bfd-in2.h: Regenerate.
728 * libbfd.h: Regenerate.
730 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
731 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
732 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
733 (bfd_getb64): Rewrite without parens.
734 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
735 * cache.c (insert, snip): Remove INLINE.
736 * linker.c (bfd_link_add_undef): Likewise.
738 2003-06-29 Andreas Jaeger <aj@suse.de>
740 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
741 unnecessary prototypes. Replace PTR with void *.
742 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
743 trim plt entries. Move undefweak non-default visibility test ...
744 (allocate_dynrelocs): ... from here.
745 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
747 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
748 SYMBOL_REFERENCES_LOCAL for dynreloc check.
749 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
750 dynreloc and .got relocs.
751 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
754 2003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
756 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
758 2003-06-27 Nick Clifton <nickc@redhat.com>
760 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
761 bfd_add_gnu_debuglink_section and only create the section, do not
762 fill in its contents.
763 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
764 contents of a .gnu-debuglink section.
765 * bfd-in2.h: Regenerate.
767 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
769 * elfxx-mips.c: Revert .got alignment to 2**4.
771 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
773 * elf32-mips.c: Fix addend for _gp_disp special symbol.
775 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
777 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
778 relocation header setup.
780 2003-06-25 Alan Modra <amodra@bigpond.net.au>
782 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
783 (ppc_elf_reloc_type_lookup): Modify comment.
784 (ppc_elf_info_to_howto): Ditto.
785 (ppc_elf_relocate_section): Ditto.
786 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
788 2003-06-25 Alan Modra <amodra@bigpond.net.au>
790 * aout-ns32k.c: Correct spelling of "relocatable".
792 * bfd-in.h: Likewise.
795 * coff-a29k.c: Likewise.
796 * coff-alpha.c: Likewise.
797 * coff-arm.c: Likewise.
798 * coff-i386.c: Likewise.
799 * coff-i860.c: Likewise.
800 * coff-i960.c: Likewise.
801 * coff-m68k.c: Likewise.
802 * coff-m88k.c: Likewise.
803 * coff-mcore.c: Likewise.
804 * coff-mips.c: Likewise.
805 * coff-or32.c: Likewise.
806 * coff-ppc.c: Likewise.
807 * coff-rs6000.c: Likewise.
808 * coff-sh.c: Likewise.
809 * coff-tic80.c: Likewise.
810 * coff64-rs6000.c: Likewise.
811 * cofflink.c: Likewise.
812 * cpu-ns32k.c: Likewise.
814 * ecofflink.c: Likewise.
815 * elf-bfd.h: Likewise.
816 * elf-eh-frame.c: Likewise.
817 * elf-hppa.h: Likewise.
818 * elf-m10200.c: Likewise.
819 * elf-m10300.c: Likewise.
821 * elf32-arm.h: Likewise.
822 * elf32-avr.c: Likewise.
823 * elf32-cris.c: Likewise.
824 * elf32-d10v.c: Likewise.
825 * elf32-dlx.c: Likewise.
826 * elf32-fr30.c: Likewise.
827 * elf32-frv.c: Likewise.
828 * elf32-h8300.c: Likewise.
829 * elf32-hppa.c: Likewise.
830 * elf32-i370.c: Likewise.
831 * elf32-i386.c: Likewise.
832 * elf32-i860.c: Likewise.
833 * elf32-i960.c: Likewise.
834 * elf32-ip2k.c: Likewise.
835 * elf32-iq2000.c: Likewise.
836 * elf32-m32r.c: Likewise.
837 * elf32-m68hc11.c: Likewise.
838 * elf32-m68hc1x.c: Likewise.
839 * elf32-m68k.c: Likewise.
840 * elf32-mcore.c: Likewise.
841 * elf32-mips.c: Likewise.
842 * elf32-msp430.c: Likewise.
843 * elf32-openrisc.c: Likewise.
844 * elf32-ppc.c: Likewise.
845 * elf32-s390.c: Likewise.
846 * elf32-sh.c: Likewise.
847 * elf32-sh64.c: Likewise.
848 * elf32-sparc.c: Likewise.
849 * elf32-v850.c: Likewise.
850 * elf32-vax.c: Likewise.
851 * elf32-xstormy16.c: Likewise.
852 * elf32-xtensa.c: Likewise.
853 * elf64-alpha.c: Likewise.
854 * elf64-hppa.c: Likewise.
855 * elf64-mips.c: Likewise.
856 * elf64-mmix.c: Likewise.
857 * elf64-ppc.c: Likewise.
858 * elf64-s390.c: Likewise.
859 * elf64-sh64.c: Likewise.
860 * elf64-sparc.c: Likewise.
861 * elf64-x86-64.c: Likewise.
862 * elfcode.h: Likewise.
863 * elflink.h: Likewise.
864 * elfn32-mips.c: Likewise.
865 * elfxx-ia64.c: Likewise.
866 * elfxx-mips.c: Likewise.
867 * i386linux.c: Likewise.
869 * libcoff-in.h: Likewise.
870 * linker.c: Likewise.
871 * m68klinux.c: Likewise.
873 * pe-mips.c: Likewise.
874 * peXXigen.c: Likewise.
876 * reloc16.c: Likewise.
877 * sparclinux.c: Likewise.
880 * versados.c: Likewise.
882 * xcofflink.c: Likewise.
883 * bfd-in2.h: Regenerate.
884 * libcoff.h: Regenerate.
885 * libbfd.h: Regenerate.
887 2003-06-24 Alan Modra <amodra@bigpond.net.au>
889 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
892 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
893 prototypes and casts. Replace PTR with void *. Formatting.
894 * elf32-ppc.c: Likewise. Break long strings too.
895 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
896 (ppc_elf_unhandled_reloc): Internationalize error message.
897 * elf32-ppc.h: Remove PARAMS.
899 2003-06-23 Mark Mitchell <mark@codesourcery.com>
901 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
903 (ppc_elf_final_write_processing): Likewise.
905 2003-06-23 H.J. Lu <hongjiu.lu@intel.com>
907 * elflink.h (elf_link_input_bfd): Check raw size when using
908 kept_section to preserve debug information discarded by
911 2003-06-20 Alan Modra <amodra@bigpond.net.au>
913 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
914 (ppc64_elf_setup_section_lists): Set it.
915 (ppc64_elf_relocate_section): Check sym section id against top_id.
916 (ppc_build_one_stub): Comment on top_id.
918 2003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
920 * config.bfd: Add tic4x-*-rtems*.
922 2003-06-20 Alan Modra <amodra@bigpond.net.au>
924 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
925 prototypes and casts. Replace PTR with void *. Format copyright.
927 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
928 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
929 (ppc_type_of_stub): Make r_type an enum.
930 (ppc64_elf_size_stubs): Likewise.
931 * elf64-ppc.h: Remove PARAMS macro.
933 2003-06-19 Alan Modra <amodra@bigpond.net.au>
935 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
938 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
939 (ppc64_elf_info_to_howto): Likewise.
940 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
941 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
943 2003-06-19 Alan Modra <amodra@bigpond.net.au>
945 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
946 reloc overflow on discarded eh_frame entries.
948 2003-06-19 Alan Modra <amodra@bigpond.net.au>
950 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
951 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
952 Return error condition.
953 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
954 that have has_gp_reloc set.
955 (struct ppc_link_hash_table): Add stub_count.
956 (ppc_build_one_stub): Increment it.
957 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
959 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
961 2003-06-18 Alan Modra <amodra@bigpond.net.au>
963 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
964 size calculation from addend. Round size up.
966 2003-06-18 Hans-Peter Nilsson <hp@axis.com>
968 * elf32-cris.c (cris_elf_relocate_section) <case
969 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
970 symbol from a normal object or an undefined weak symbol.
972 2003-06-18 Alan Modra <amodra@bigpond.net.au>
974 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
977 2003-06-17 H.J. Lu <hongjiu.lu@intel.com>
979 * section.c (struct sec): Put back kept_section.
980 (STD_SECTION): Put back kept_section initialization.
981 * bfd-in2.h: Regenerate.
983 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
984 sections for relocateable output. Use kept_section to preserve
985 debug information discarded by linkonce.
987 2003-06-17 Roland McGrath <roland@redhat.com>
989 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
990 segment-relative relocation between different segments.
992 2003-06-17 Alan Modra <amodra@bigpond.net.au>
994 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
995 optimizations earlier.
997 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
998 Restore previous input_list type.
999 (ppc64_elf_link_hash_table_create): Undo last change.
1000 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
1001 per output section, but don't bother with bfd_abs_section marker.
1002 (ppc64_elf_next_input_section): Adjust for multiple input section
1004 (group_sections): Likewise.
1006 2003-06-17 Jakub Jelinek <jakub@redhat.com>
1008 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
1009 *r_offset == r_addend for RELATIVE relocs against .got.
1011 2003-06-17 Alan Modra <amodra@bigpond.net.au>
1013 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
1015 2003-06-17 Nick Clifton <nickc@redhat.com>
1017 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
1018 in the vtable_entries_used array to allow for the accessing
1019 the largest element.
1021 2003-06-17 Alan Modra <amodra@bigpond.net.au>
1023 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
1025 (ppc64_elf_link_hash_table_create): Init input_list here.
1026 (ppc64_elf_setup_section_lists): Remove code setting up input lists
1027 per output section. Set toc_off for abs and other standard sections.
1028 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
1029 (ppc64_elf_next_input_section): Adjust for single input section list.
1030 Don't set toc_curr from input bfds that haven't set elf_gp.
1031 (group_sections): Adjust for single input section list.
1033 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
1035 2003-06-16 Alan Modra <amodra@bigpond.net.au>
1037 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
1038 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
1039 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
1040 got section for RELATIVE relocs. Fix wrong comment. Change condition
1041 under which dynamic relocs update the section contents.
1043 2003-06-13 Robert Millan <zeratul2@wanadoo.es>
1045 * config.bfd: Add i386-netbsd-gnu target.
1047 2003-06-12 Nick Clifton <nickc@redhat.com>
1049 * opncls.c (calc_crc32): Rename to
1050 bfd_calc_gnu_debuglink_crc32 and export.
1051 (GNU_DEBUGLINK): Define and use to replace occurrences of
1052 hard-coded ".gnu_debuglink" in the code.
1053 (get_debug_link_info): Prevent aborts by replacing call to
1054 xmalloc with a call to malloc.
1055 (find_separate_debug_file): Prevent aborts by replacing calls
1056 to xmalloc and xstrdup with calls to malloc and strdup.
1057 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
1059 * bfd-in2.h: Regenerate.
1061 2003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
1063 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
1064 New target (was i[3-7]86-*-openbsd* before).
1065 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
1066 (vax-*-openbsd*): New target.
1068 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1070 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
1072 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
1073 (mips_elf_rel_dyn_section): Use appropriate section alignment.
1074 (mips_elf_create_got_section): Likewise.
1075 (_bfd_mips_elf_create_dynamic_sections): Likewise.
1077 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1079 * elf32-mips.c (mips_elf_generic_reloc): New Function.
1080 (elf_mips_howto_table_rel): Use it.
1081 (gprel32_with_gp): Move prototype.
1082 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
1083 Use mips_elf_generic_reloc.
1084 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
1086 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
1088 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
1089 as in the other *_gprel*_reloc functions.
1090 (gprel32_with_gp): Handle partial_inplace properly.
1091 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
1092 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
1093 Do addend handling directly instead of calling
1094 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
1095 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
1096 of zero addend. Handle partial_inplace properly.
1097 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
1099 (mips_elf64_gprel16_reloc): Likewise.
1100 (mips_elf64_literal_reloc): Likewise.
1101 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
1102 logic as in the other *_gprel*_reloc functions. Handle
1103 partial_inplace properly.
1104 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
1105 addend. Handle partial_inplace properly.
1106 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
1107 of calling _bfd_mips_elf_gprel16_with_gp.
1108 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
1109 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
1111 (mips_elf_shift6_reloc): Handle partial_inplace properly.
1112 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
1113 of calling _bfd_mips_elf_gprel16_with_gp.
1114 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
1115 partial_inplace properly. Fix wrong addend handling. Fix overflow
1117 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
1119 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
1120 (_bfd_mips_elf_relocate_section): Likewise.
1121 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
1122 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
1123 (_bfd_mips_elf_sign_extend): New prototype.
1125 2003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
1127 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
1128 New target (was sparc-*-openbsd* before).
1129 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
1131 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
1132 * configure: Regenerate.
1134 2003-06-11 H.J. Lu <hongjiu.lu@intel.com>
1136 * po/Make-in (DESTDIR): New.
1137 (install-data-yes): Support $(DESTDIR).
1138 (uninstall): Likewise.
1140 2003-06-11 Alan Modra <amodra@bigpond.net.au>
1142 * Makefile.am (config.status): Depend on version.h.
1144 * Makefile.in: Regenerate.
1145 * po/SRC-POTFILES.in: Regenerate.
1147 2003-06-10 Alan Modra <amodra@bigpond.net.au>
1148 Gary Hade <garyhade@us.ibm.com>
1150 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
1152 2003-06-10 Richard Sandiford <rsandifo@redhat.com>
1154 * archures.c (bfd_mach_h8300sxn): New architecture.
1155 * bfd-in2.h: Regenerate.
1156 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
1157 (h8300sxn_info_struct): New.
1158 (h8300sx_info_struct): Link to it.
1159 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
1160 (elf32_h8_final_write_processing): Likewise.
1162 2003-06-08 Alan Modra <amodra@bigpond.net.au>
1164 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
1165 elfxx-target.h so that we can use elf_backend_got_header_size.
1166 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
1167 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
1169 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
1171 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
1172 ppc_stub_plt_branch_r2off.
1173 (struct ppc_stub_hash_entry): Reorganize.
1174 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
1175 toc_curr, toc_off and emit_stub_syms.
1176 (ppc64_elf_link_hash_table_create): Init them.
1177 (ppc_stub_name): Correct string size.
1178 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
1179 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
1181 (ppc_type_of_stub): Tweak root.type test.
1182 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
1183 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
1184 ppc_stub_plt_branch_r2off.
1185 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
1186 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
1187 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
1188 Initialize elf_gp and toc_curr.
1189 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
1190 (ppc64_elf_next_input_section): Set toc_off.
1191 (group_sections): Ensure groups have the same TOC.
1192 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
1193 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
1194 Build new glink stub.
1195 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
1196 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
1197 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
1198 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
1199 * section.c (struct sec): Rename flag12 to has_gp_reloc.
1200 (STD_SECTION): Update.
1201 * ecoff.c (bfd_debug_section): Update comment.
1202 * bfd-in2.h: Regenerate.
1204 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
1206 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
1207 NULL function pointers.
1209 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
1211 * simple.c (bfd_simple_get_relocated_section_contents): Call
1212 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
1214 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
1216 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
1217 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
1219 * coff-tic4x.c: Ditto
1220 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
1221 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
1222 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
1223 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
1225 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
1226 * coff-a29k.c: Append COFF_SWAP_TABLE argument
1227 * coff-apollo.c: Ditto
1229 * coff-h8300.c: Ditto
1230 * coff-h8500.c: Ditto
1231 * coff-i960.c: Ditto
1232 * coff-m68k.c: Ditto
1233 * coff-m88k.c: Ditto
1234 * coff-mcore.c: Ditto
1236 * coff-sparc.c: Ditto
1237 * coff-tic80.c: Ditto
1238 * coff-we32k.c: Ditto
1242 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
1244 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
1247 2003-06-03 Jakub Jelinek <jakub@redhat.com>
1249 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
1250 (bfd_section_from_phdr): Likewise.
1251 (map_sections_to_segments): Create PT_GNU_STACK segment header.
1252 (get_program_header_size): Count with PT_GNU_STACK.
1253 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
1254 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
1256 2003-06-03 H.J. Lu <hongjiu.lu@intel.com>
1258 * elflink.h (elf_link_input_bfd): Call linker error_handler
1259 for discarded definitions.
1261 2003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
1263 * syms.c (decode_section_type): Return 'n' if section flags are
1264 SEC_HAS_CONTENTS && SEC_READONLY.
1266 2003-06-03 Nick Clifton <nickc@redhat.com>
1268 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
1269 R_V850_ABS32. Add entry for R_V850_REL32.
1270 (v850_elf_reloc_map): Likewise.
1271 (v850_elf_check_relocs): Likewise.
1272 (v850_elf_perform_relocation): Likewise.
1273 (v850_elf_final_link_relocate): Likewise. Include computation
1274 to make R_V850_REl32 pc-relative.
1276 2003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1278 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
1279 and DT_DEBUG dynamic tag even for position independent executables.
1280 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
1282 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
1284 * config.bfd: Move obsolete entries out of the range of the
1285 targmatch sed script.
1287 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
1289 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
1291 2003-05-31 Jakub Jelinek <jakub@redhat.com>
1293 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
1294 plt entries, not just 8191.
1296 2003-05-30 Daniel Jacobowitz <drow@mvista.com>
1298 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
1299 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
1301 2003-05-30 Ulrich Drepper <drepper@redhat.com>
1302 Jakub Jelinek <jakub@redhat.com>
1304 * elflink.h (elf_link_add_object_symbols): Use !info->executable
1305 instead of info->shared where appropriate.
1306 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
1307 * elflink.c (_bfd_elf_create_got_section): Likewise.
1308 (_bfd_elf_link_create_dynamic_sections): Likewise.
1309 (_bfd_elf_link_assign_sym_version): Likewise.
1310 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
1311 and DT_DEBUG dynamic tag even for position independent executables.
1312 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
1313 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
1314 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
1315 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
1316 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
1317 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
1318 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
1319 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
1320 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
1322 2003-05-30 Kris Warkentin <kewarken@qnx.com>
1324 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
1326 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
1328 2003-05-29 Nick Clifton <nickc@redhat.com>
1330 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
1332 * Makefile.am: Add dependency on safe-ctype.h.
1333 * Makefile.in: Regenerate.
1335 2003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1337 * elfxx-mips.c: Don't force symbols local unconditionally.
1339 2003-05-28 Alan Modra <amodra@bigpond.net.au>
1341 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
1342 undefined_symbol call.
1344 2003-05-27 Richard Sandiford <rsandifo@redhat.com>
1346 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
1347 (mips_elf_link_hash_table): Likewise.
1349 2003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1351 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
1352 R_MIPS_GNU_REL16_S2 support.
1353 (bfd_elf64_bfd_reloc_type_lookup): Use it.
1354 (mips_elf64_rtype_to_howto): Use it.
1355 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
1356 R_MIPS_GNU_REL16_S2 support.
1357 (bfd_elf32_bfd_reloc_type_lookup): Use it.
1358 (mips_elf_n32_rtype_to_howto): Use it.
1360 2003-05-21 Stuart F. Downing <sdowning@fame.com>
1362 * som.h: Define PA_2_0 before including a.out.h
1364 2003-05-07 Eric Christopher <echristo@redhat.com>
1365 Alexandre Oliva <aoliva@redhat.com>
1367 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
1368 pic tests, change to warning.
1369 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
1371 2003-05-21 Marcus Comstedt <marcus@mc.pp.se>
1373 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
1374 well as shle-...-netbsdelf. Remove duplicate entry.
1376 2003-05-21 Nick Clifton <nickc@redhat.com>
1378 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
1379 for X_STORMY16_REL_12 reloc.
1381 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
1382 the type of the hash table in the bfd_link_info structure.
1383 (bfd_elf_get_runpath_list): Likewise.
1385 2003-05-19 Roland McGrath <roland@redhat.com>
1387 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
1388 * bfd-in.h: Declare it.
1389 * bfd-in2.h: Regenerated.
1390 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
1391 * elf-bfd.h (struct elf_backend_data): New function pointer member
1392 elf_backend_bfd_from_remote_memory.
1393 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
1395 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
1396 (elfNN_bed): Add that to the initializer.
1398 2003-05-15 Roland McGrath <roland@redhat.com>
1400 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
1402 2003-05-20 Jakub Jelinek <jakub@redhat.com>
1404 * elflink.h (elf_link_output_extsym): Only issue error about !=
1405 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
1407 2003-05-20 H.J. Lu <hongjiu.lu@intel.com>
1409 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
1410 when removing the old definition for symbols with non-default
1413 2003-05-18 Jason Eckhardt <jle@rice.edu>
1415 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
1417 2003-05-17 Andreas Schwab <schwab@suse.de>
1419 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
1420 elf_section_data during processing of pc-relative and absolute
1422 (elf_m68k_relocate_section): Use the cached reloc section instead
1423 of computing it again. Fix handling of visibility. Don't modify
1424 addend when copying over a relocation into the output.
1426 2003-05-17 Alan Modra <amodra@bigpond.net.au>
1428 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
1429 to trim plt entries. Move undefweak non-default visibility test..
1430 (allocate_dynrelocs): ..from here.
1431 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
1432 dynamic_sections_created here. Update comment. Move undefweak
1433 non-default visibility test..
1434 (allocate_dynrelocs): ..from here. Fix comment.
1435 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
1436 to trim plt entries. Move undefweak non-default visibility test..
1437 (allocate_dynrelocs): ..from here. Fix comment.
1438 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
1439 STV_DEFAULT rather than comparing with zero.
1440 * elflink.c (_bfd_elf_merge_symbol): Likewise.
1441 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
1443 2003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1445 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
1447 (_bfd_set_gp_value): Likewise.
1449 2003-05-16 Michael Snyder <msnyder@redhat.com>
1450 From Bernd Schmidt <bernds@redhat.com>
1451 * archures.c (bfd_mach_h8300sx): New.
1452 * bfd-in2.h: Regenerate.
1453 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
1454 (h8300sx_info_struct): New.
1455 (h8300s_info_struct): Link to it.
1456 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
1457 (elf32_h8_final_write_processing): Likewise.
1458 (elf32_h8_relax_section): Likewise.
1460 2003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
1462 * config.bfd: Accept i[3-7]86 variants.
1463 * configure.host: Likewise.
1464 * configure.in: Likewise.
1465 * configure: Regenerate.
1467 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
1469 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
1472 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
1474 * elflink.h (elf_link_check_versioned_symbol): Also allow
1477 2003-05-15 Alan Modra <amodra@bigpond.net.au>
1478 H.J. Lu <hongjiu.lu@intel.com>
1480 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
1481 (elf_i386_relocate_section): Likewise.
1482 * elf32-ppc.c (allocate_dynrelocs): Likewise.
1483 (ppc_elf_relocate_section): Likewise.
1484 * elf64-ppc.c (allocate_dynrelocs): Likewise.
1485 (ppc64_elf_relocate_section): Likewise.
1487 2003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1489 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
1491 2003-05-13 Stephane Carrez <stcarrez@nerim.fr>
1493 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
1494 processor capability, allow merge of HC12 and HCS12 in some cases.
1495 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
1496 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
1497 (bfd_m68hc12_arch): Link it.
1498 (scan_mach): New function.
1500 2003-05-13 Andrew Haley <aph@redhat.com>
1502 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
1504 2003-05-13 Alan Modra <amodra@bigpond.net.au>
1505 H.J. Lu <hongjiu.lu@intel.com>
1507 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
1508 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
1509 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
1510 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
1511 (ppc_elf_relocate_section): Likewise.
1512 * elf64-ppc.c (allocate_dynrelocs): Likewise.
1513 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
1514 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
1515 relocs need no other types.
1516 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
1518 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
1519 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
1522 2003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1524 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
1525 copy ELF_LINK_NON_GOT_REF from weakdef.
1526 (allocate_dynrelocs): For undef weak syms with non-default
1527 visibility, a) don't allocate plt entries, b) don't allocate
1528 .got relocs, c) discard dyn rel space
1529 (sh_elf_relocate_section): d) don't generate .got relocs, e)
1530 don't generate dynamic relocs.
1531 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
1532 for weakdefs when symbol already adjusted.
1534 2003-05-12 Nick Clifton <nickc@redhat.com>
1536 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
1537 overflow detection for R_XSTORMY16_16 reloc.
1539 2003-05-12 Paul Clarke <paulc@senet.com.au>
1541 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
1543 2003-05-11 Jason Eckhardt <jle@rice.edu>
1545 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
1547 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
1549 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
1552 2003-05-11 Andreas Schwab <schwab@suse.de>
1554 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
1555 complicated tests for unresolvable relocs with a simple direct
1556 scheme using "unresolved_reloc" var. Report some detail on
1557 bfd_reloc_outofrange and similar errors.
1559 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1561 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
1562 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
1563 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
1564 * elf64-s390.c: Likewise.
1566 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1568 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
1569 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
1570 ELF_LINK_NON_GOT_REF from weakdef.
1571 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
1572 already been adjusted before treating it specially.
1573 * el64-s390.c: Likwise.
1575 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1577 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
1578 non-default visibility, a) don't make them dynamic, b) discard
1579 space for dynamic relocs.
1580 (elf_s390_relocate_section): Initialize the GOT entries and skip
1581 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
1582 symbols with non-default visibility.
1583 * elf64-s390.c: Likewise.
1585 2003-05-09 Alan Modra <amodra@bigpond.net.au>
1587 * cpu-arm.c (arm_check_note): Warning fix.
1588 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
1589 to keep relocs if edited.
1590 (iq2000_elf_print_private_bfd_data): Return TRUE.
1591 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
1593 (elfNN_ia64_relax_ldxmov): Warning fix.
1594 * xtensa-isa.c (xtensa_add_isa): Warning fix.
1595 * xtensa-modules.c (get_num_opcodes): Warning fix.
1597 2003-05-09 Andrey Petrov <petrov@netbsd.org>
1599 * elf.c (elf_fake_sections): Use correct cast for sh_name.
1601 2003-05-09 Alan Modra <amodra@bigpond.net.au>
1603 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
1604 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
1605 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
1606 (bfd_elf_record_link_assignment): Move from elflink.h.
1607 (_bfd_elf_merge_symbol): Likewise.
1608 (_bfd_elf_add_default_symbol): Likewise.
1609 (_bfd_elf_export_symbol): Likewise.
1610 (_bfd_elf_link_find_version_dependencies): Likewise.
1611 (_bfd_elf_link_assign_sym_version): Likewise.
1612 (_bfd_elf_link_read_relocs): Likewise.
1613 (_bfd_elf_link_size_reloc_section): Likewise.
1614 (_bfd_elf_fix_symbol_flags): Likewise.
1615 (_bfd_elf_adjust_dynamic_symbol): Likewise.
1616 (_bfd_elf_link_sec_merge_syms): Likewise.
1617 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
1618 and bed->s->sizeof_rela.
1619 (_bfd_elf_link_output_relocs): Likewise.
1620 * elf-bfd.h (struct elf_size_info): Rename file_align to
1622 (struct elf_info_failed): Move from elflink.h.
1623 (struct elf_assign_sym_version_info): Likewise.
1624 (struct elf_find_verdep_info): Likewise.
1625 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
1626 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
1627 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
1628 _bfd_elf_link_assign_sym_version,
1629 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
1630 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
1631 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
1632 _bfd_elf_link_sec_merge_syms): Declare.
1633 (bfd_elf32_link_create_dynamic_sections): Don't declare.
1634 (_bfd_elf32_link_read_relocs): Likewise.
1635 (bfd_elf64_link_create_dynamic_sections): Likewise.
1636 (_bfd_elf64_link_read_relocs): Likewise.
1637 * elflink.h: Move lots o' stuff elsewhere.
1638 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
1639 (bfd_elf64_record_link_assignment): Likewise.
1640 (bfd_elf_record_link_assignment): Declare.
1641 * bfd-in2.h: Regenerate.
1642 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
1643 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
1644 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
1645 (assign_file_positions_for_segments): Likewise.
1646 (assign_file_positions_except_relocs): Likewise.
1647 (swap_out_syms, elfcore_write_note): Likewise.
1648 * elf-m10200.c: Adjust for changed function names.
1649 * elf-m10300.c: Likewise.
1650 * elf32-arm.h: Likewise.
1651 * elf32-h8300.c: Likewise.
1652 * elf32-hppa.c: Likewise.
1653 * elf32-ip2k.c: Likewise.
1654 * elf32-m32r.c: Likewise.
1655 * elf32-m68hc11.c: Likewise.
1656 * elf32-m68hc1x.c: Likewise.
1657 * elf32-m68k.c: Likewise.
1658 * elf32-mips.c: Likewise.
1659 * elf32-ppc.c: Likewise.
1660 * elf32-sh.c: Likewise.
1661 * elf32-v850.c: Likewise.
1662 * elf32-xtensa.c: Likewise.
1663 * elf64-alpha.c: Likewise.
1664 * elf64-hppa.c: Likewise.
1665 * elf64-mmix.c: Likewise.
1666 * elf64-ppc.c: Likewise.
1667 * elf64-sh64.c: Likewise.
1668 * elfxx-ia64.c: Likewise.
1669 * elfxx-mips.c: Likewise.
1670 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
1671 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
1672 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
1673 * elf64-mips.c (mips_elf64_size_info): Likewise.
1674 * elf64-s390.c (s390_elf64_size_info): Likewise.
1675 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
1677 2003-05-08 H.J. Lu <hongjiu.lu@intel.com>
1679 * elflink.h (elf_add_default_symbol): After skipping the
1680 unversioned symbol, go to non-default one.
1682 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
1684 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
1686 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
1687 for symbols with non-default visibility.
1689 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
1691 * elflink.h (elf_link_check_versioned_symbol): Also handle the
1692 case that a DSO references a hidden symbol which may be
1693 satisfied by a versioned symbol in another DSO.
1694 (elf_link_output_extsym): Check versioned definition for hidden
1695 symbol referenced by a DSO.
1697 2003-05-07 Nick Clifton <nickc@redhat.com>
1699 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
1700 R_XSTORMY16_16 reloc to ignore overflows.
1702 2003-05-06 Alexandre Oliva <aoliva@redhat.com>
1704 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
1705 error message for mixing different-endian files. Check for ABI
1706 compatibility of input files with the selected emulation.
1708 2003-05-05 Alan Modra <amodra@bigpond.net.au>
1710 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
1711 non-default visibility, a) don't make them dynamic, b) discard
1712 space for dynamic relocs.
1713 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
1715 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
1716 non-default visibility, a) don't allocate plt entries, b) don't
1717 allocate .got relocs, c) discard dyn rel space,
1718 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
1719 don't generate dynamic relocs.
1720 * elf64-ppc.c (allocate_dynrelocs): As above.
1721 (ppc64_elf_relocate_section): As above.
1723 2003-05-05 Andreas Jaeger <aj@suse.de>
1725 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
1726 relocation entries for weak undefined symbols with non-default
1728 (elf64_x86_64_relocate_section): Initialize the GOT entries and
1729 skip R_386_32/R_386_PC32 for weak undefined symbols with
1730 non-default visibility.
1732 2003-05-04 H.J. Lu <hjl@gnu.org>
1734 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
1735 relocation entries for weak undefined symbols with non-default
1737 (elf_i386_relocate_section): Initialize the GOT entries and
1738 skip R_386_32/R_386_PC32 for weak undefined symbols with
1739 non-default visibility.
1741 * elfxx-ia64.c (allocate_fptr): Don't allocate function
1742 descriptors for weak undefined symbols with non-default
1744 (allocate_dynrel_entries): Don't allocate relocation entries
1745 for symbols resolved to 0.
1746 (set_got_entry): Don't install dynamic relocation for weak
1747 undefined symbols with non-default visibility.
1748 (set_pltoff_entry): Likewise.
1750 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
1751 with non-default visibility.
1752 (elf_link_output_extsym): Don't make weak undefined symbols
1753 with non-default visibility dynamic.
1755 2003-05-04 H.J. Lu <hjl@gnu.org>
1757 * elflink.h (elf_merge_symbol): Correctly handle weak definiton.
1759 2003-05-04 H.J. Lu <hjl@gnu.org>
1761 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
1762 symbol dynamic. Check indirection when removing the old
1763 definition for symbols with non-default visibility.
1764 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
1766 2003-05-02 Nick Clifton <nickc@redhat.com>
1768 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
1769 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
1772 2003-05-02 Andreas Jaeger <aj@suse.de>
1774 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
1775 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
1776 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
1777 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
1778 ELF_LINK_NON_GOT_REF from weakdef.
1780 2003-05-02 Charles Lepple <clepple@ghz.cc>
1781 Nick Clifton <nickc@redhat.com>
1783 * acinclude.m4: Fix name of --enable-install-libbfd switch.
1784 * aclocal.m4: Regenerate.
1785 * configure: Regenerate.
1786 * Makefile.in: Regenerate.
1788 2003-05-01 Alan Modra <amodra@bigpond.net.au>
1790 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
1791 weakdef sym has already been adjusted before treating it specially.
1792 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
1793 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
1794 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
1795 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
1797 2003-04-28 H.J. Lu <hjl@gnu.org>
1799 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
1800 the relax finalize pass.
1802 * section.c (struct sec): Add need_finalize_relax and remove
1804 (STD_SECTION): Update struct sec initializer.
1805 * bfd-in2.h: Regenerated.
1807 2003-04-28 H.J. Lu <hjl@gnu.org>
1809 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
1810 to copy any information related to dynamic linking when we flip
1813 2003-04-27 H.J. Lu <hjl@gnu.org>
1815 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
1816 (ELF_LINK_DYNAMIC_WEAK): New.
1818 * elflink.h (elf_merge_symbol): Add one argument to indicate if
1819 a symbol should be skipped. Ignore definitions in dynamic
1820 objects for symbols with non-default visibility.
1821 (elf_add_default_symbol): Adjusted.
1822 (elf_link_add_object_symbols): Check if a symbol should be
1823 skipped. Don't merge the visibility field with the one from
1825 (elf_link_check_versioned_symbol): Use undef_bfd.
1826 (elf_link_output_extsym): Warn if a forced local symbol is
1827 referenced from dynamic objects. Make non-weak undefined symbol
1828 with non-default visibility a fatal error.
1830 2003-04-27 Daniel Jacobowitz <drow@mvista.com>
1832 * configure.in: Bump version on HEAD to 2.14.90.
1833 * configure: Regenerated.
1835 2003-04-26 Stephane Carrez <stcarrez@nerim.fr>
1838 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
1839 when we couldn't relax something.
1841 2003-04-25 Alan Modra <amodra@bigpond.net.au>
1843 * elflink.h (elf_merge_symbol): When we find a regular definition
1844 for an indirect symbol, flip the indirection so that the old
1845 direct symbol now points to the new definition.
1847 2003-04-24 Roland McGrath <roland@redhat.com>
1849 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
1851 2003-04-24 Alan Modra <amodra@bigpond.net.au>
1853 * elf32-ppc.c: Formatting and comment fixes.
1854 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
1855 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
1857 2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
1859 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
1860 * bfd-in2.h: Rebuilt.
1861 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
1862 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
1864 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
1865 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
1866 (h8300sn_info_struct, h8300hn_info_struct): New.
1867 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
1868 (elf32_h8_final_write_processing): Likewise.
1870 2003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1872 * elf32-sh.c (tpoff): New.
1873 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
1874 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
1875 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
1876 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
1877 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
1878 (dtpoff_base): Fix wrong indentation.
1879 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
1880 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
1881 R_SH_TLS_TPOFF32 relocations.
1883 2003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
1885 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
1886 * cpu-sh.c: Likewise.
1887 * elf32-sh.c: Likewise.
1888 * reloc.c (bfd_reloc_code_real): Likewise.
1889 * elf32-sh64-com.c: Change comment to refer to SuperH.
1890 * elf32-sh64.c: Likewise.
1891 * elf64-sh64.c: Likewise.
1892 * bfd-in2.h (enum bfd_architecture): Regenerate.
1894 2003-04-23 Alan Modra <amodra@bigpond.net.au>
1896 From Julien LEMOINE <speedblue@debian.org>
1897 * elf32-i386.c (elf_i386_info_to_howto): Delete.
1898 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
1900 2003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1902 * archures.c: Replace references to Mitsubishi M32R with references
1904 * relocs.c: Likewise.
1905 * bfd-in2.h: Regenerate.
1907 2003-04-21 Richard Henderson <rth@redhat.com>
1909 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
1910 executable when a symbol is defined both regular and dynamic.
1912 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
1914 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
1915 (elf32-m68hc1x.lo): Update dependencies
1916 * configure.in: Add elf32-m68hc1x.lo.
1917 * configure: Rebuild.
1918 * Makefile.in: Rebuild.
1920 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
1922 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
1923 (m68hc11_elf_hash_table_create): New function.
1924 (elf32_m68hc11_link_hash_table_free): New function.
1925 (stub_hash_newfunc): New function.
1926 (m68hc11_add_stub): New function.
1927 (elf32_m68hc11_add_symbol_hook): New function.
1928 (elf32_m68hc11_setup_section_lists): New function.
1929 (elf32_m68hc11_next_input_section): New function.
1930 (elf32_m68hc11_size_stubs): New function.
1931 (elf32_m68hc11_build_stubs): New function.
1932 (m68hc11_get_relocation_value): New function.
1933 (elf32_m68hc11_relocate_section): Call the above to redirect
1934 some relocations to the trampoline code.
1935 (m68hc11_elf_export_one_stub): New function.
1936 (m68hc11_elf_set_symbol): New function.
1937 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
1938 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
1939 is not yet initialized.
1941 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
1942 (elf32_m68hc11_stub_hash_entry): New struct.
1943 (m68hc11_page_info): Add trampoline handler address.
1944 (m68hc11_elf_link_hash_table): Add stubs generation members.
1945 (elf32_m68hc11_add_symbol_hook): Declare.
1946 (elf32_m68hc11_setup_section_lists): Declare.
1947 (elf32_m68hc11_size_stubs): Declare.
1948 (elf32_m68hc11_build_stubs): Declare.
1950 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
1951 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
1952 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
1953 (_bfd_m68hc11_elf_set_private_flags): Ditto.
1954 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
1955 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
1956 (bfd_elf32_bfd_link_hash_table_create): Define.
1957 (elf_backend_add_symbol_hook): Define.
1958 (m68hc11_elf_bfd_link_hash_table_create): New function.
1959 (m68hc11_elf_build_one_stub): New function.
1960 (m68hc11_elf_size_one_stub): New function.
1961 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
1962 (bfd_elf32_bfd_link_hash_table_create): Define.
1964 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
1965 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
1966 (m68hc12_phys_addr): Ditto.
1967 (m68hc12_phys_page): Ditto.
1968 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
1969 (elf32_m68hc11_gc_mark_hook): Likewise.
1970 (elf32_m68hc11_gc_sweep_hook): Likewise.
1971 (elf32_m68hc11_check_relocs): Likewise.
1972 (elf32_m68hc11_relocate_section): Likewise.
1973 (_bfd_m68hc12_elf_set_private_flags): Likewise.
1974 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
1975 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
1976 (m68hc12_elf_build_one_stub): New function.
1977 (m68hc12_elf_size_one_stub): New function.
1978 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
1979 (elf_backend_add_symbol_hook): Define.
1980 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
1982 2003-04-18 Nick Clifton <nickc@redhat.com>
1984 * format.c (bfd_check_format_matches): Only check associated
1985 vector if the matching_vector has been created.
1987 2003-04-15 Alexandre Oliva <aoliva@redhat.com>
1989 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
1990 2003-04-09's change.
1992 2003-04-15 Brian Ford <ford@vss.fsi.com>
1994 * peicode.h (coff_swap_scnhdr_in): If a section holds
1995 uninitialized data and is from an object file or from an
1996 executable image that has not initialized the s_size field, or if
1997 the physical size is padded, use the virtual size (stored in
2000 2003-04-15 H.J. Lu <hjl@gnu.org>
2002 * elflink.h (elf_link_add_object_symbols): Properly report
2003 filename for alignment reduction.
2005 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
2007 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
2008 * reloc.c: Likewise.
2009 * coff-h8300.c: Likewise.
2010 * coff-h8500.c: Likewise.
2011 * coff-sh.c: Likewise.
2012 * cpu-h8300.c: Likewise.
2013 * cpu-sh.c: Likewise.
2014 * elf32-h8300.c: Likewise.
2015 * elf32-sh.c: Likewise.
2016 * elf32-sh64-com.c: Likewise.
2017 * elf32-sh64.c: Likewise.
2018 * elf64-sh64.c: Likewise.
2019 * bfd-in2.h: Regenerate.
2021 2003-04-14 H.J. Lu <hjl@gnu.org>
2023 * elflink.h (elf_link_add_object_symbols): Maintain maximum
2024 alignment for common symbols. Warn reducing alignment for
2025 common symbols. Report old filename when symbol size changes.
2027 2003-04-12 Alexandre Oliva <aoliva@redhat.com>
2029 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
2030 occurrences of the same test changed in the previous patch.
2033 2003-04-11 Alexandre Oliva <aoliva@redhat.com>
2035 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
2036 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
2037 GOT_DISP/addend only if the symbol got a global GOT entry.
2039 2003-04-10 Alexandre Oliva <aoliva@redhat.com>
2041 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
2042 GOT_PAGE/GOT_OFST referencing overridable symbol to
2044 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
2045 global symbol as GOT_DISP.
2047 2003-04-10 Bob Wilson <bob.wilson@acm.org>
2049 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
2050 next relocation on an undefined symbol.
2052 2003-04-09 Richard Henderson <rth@redhat.com>
2054 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
2055 Ignore relocations against r_symndx == 0.
2057 2003-04-09 H.J. Lu <hjl@gnu.org>
2059 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
2060 FALSE for undefined symbols.
2061 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2063 2003-04-09 Alexandre Oliva <aoliva@redhat.com>
2065 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
2066 and IRIX-specific shift-to-64-bit 4-byte lengths before following
2069 2003-04-08 Alexandre Oliva <aoliva@redhat.com>
2071 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
2072 pointer size from ABI, not arch_bits_per_address.
2074 2003-04-07 Kevin Buettner <kevinb@redhat.com>
2076 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
2077 constants for n32 ABI.
2079 2003-04-06 Andrew Cagney <cagney@redhat.com>
2081 * simple.c (bfd_simple_get_relocated_section_contents): Disable
2082 free that leads to GDB vs BFD memory corruption.
2084 2003-04-04 Stephane Carrez <stcarrez@nerim.fr>
2086 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
2087 symbols that mark the end of the section.
2088 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
2089 converting to a relative branch so that the offset is computed after
2090 the relaxation; also relocate a jsr into a bsr if possible but don't
2091 relax them if they are to a far symbol as we need to call the
2093 (elf_m68hc11_howto_table): Set pcrel_offset to true.
2095 2003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2097 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
2098 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
2099 * bfd-in2.h: Regenerate
2100 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
2101 * cpu-tic4x.c: Ditto
2103 2003-04-03 Nick Clifton <nickc@redhat.com>
2105 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
2106 differently for object files and executables.
2107 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
2108 for object files or for executables who have not already
2109 initialised the field.
2110 * libpei.h (bfd_pe_executable_p): New macro. Return true if
2111 the PE format bfd is an executable.
2113 2003-04-03 Alan Modra <amodra@bigpond.net.au>
2115 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
2116 here as it's too early to reliably determine locality.
2117 (ppc_elf_gc_sweep_hook): Likewise.
2118 (SYMBOL_REFERENCES_LOCAL): Expand comment.
2120 2003-04-02 Bob Wilson <bob.wilson@acm.org>
2122 * xtensa-modules.c: Remove comment indicating that this is a
2125 2003-04-02 Alan Modra <amodra@bigpond.net.au>
2127 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
2129 2003-04-01 Bob Wilson <bob.wilson@acm.org>
2131 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
2132 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
2133 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
2135 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
2137 (cpu-xtensa.lo): New target.
2138 (elf32-xtensa.lo): Likewise.
2139 (xtensa-isa.lo): Likewise.
2140 (xtensa-modules.lo): Likewise.
2141 * Makefile.in: Regenerate.
2142 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
2143 (bfd_archures_list): Add bfd_xtensa_arch.
2144 * config.bfd: Handle xtensa-*-*.
2145 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
2146 * configure: Regenerate.
2147 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
2148 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
2149 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
2150 (bfd_elf32_xtensa_le_vec): Likewise.
2151 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
2152 * cpu-xtensa.c: New file.
2153 * elf32-xtensa.c: Likewise.
2154 * xtensa-isa.c: Likewise.
2155 * xtensa-modules.c: Likewise.
2156 * libbfd.h: Regenerate.
2157 * bfd-in2.h: Likewise.
2159 2003-04-01 Nick Clifton <nickc@redhat.com>
2161 * archures.c (bfd_mach_arm_unknown): Define.
2162 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
2163 bfd_arm_get_mach_from_notes): Prototype.
2164 * bfd-in2.h: Regenerate.
2165 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
2166 bfd_arm_merge_machines.
2167 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
2168 * coffcode.h (coff_set_arch_mach_hook): Call
2169 bfd_arm_get_mach_from_notes.
2170 * coffgen.c (coff_real_object_p): Revert previous delta.
2171 * cpu_arm.c (arm_check_note): New function. Examine a note in a
2173 (bfd_arm_merge_machines): New function: Handle the merging of ARM
2174 binaries compiled for different architectures..
2175 (bfd_arm_update_notes): New function: Update an ARM note section.
2176 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
2177 number from an ARM note section.
2178 * elf32-arm.h (elf32_arm_object_p): Use
2179 bfd_arm_get_mach_from_notes.
2180 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
2181 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
2183 2003-04-01 Ben Elliston <bje@wasabisystems.com>
2185 * dwarf2.c (read_attribute_value): Correct typo in comment.
2187 2003-04-01 Nick Clifton <nickc@redhat.com>
2189 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
2190 instead of concat().
2191 (decode_line_info): Only free filename if it is not NULL.
2192 (add_line_info): Make a copy of the filename when storing it into
2195 2003-03-31 Andreas Schwab <schwab@suse.de>
2196 Daniel Jacobowitz <drow@mvista.com>
2198 * simple.c (bfd_simple_get_relocated_section_contents): Add
2199 parameter symbol_table. Optionally use it instead of the symbol
2200 table from the bfd. Save and restore output offsets and output
2201 sections around bfd_get_relocated_section_contents. Fix a memory
2203 (simple_save_output_info, simple_restore_output_info): New
2205 * bfd-in2.h: Regenerate.
2206 * dwarf2.c (read_abbrevs): Use
2207 bfd_simple_get_relocated_section_contents instead of
2208 bfd_get_section_contents.
2209 (decode_line_info): Likewise.
2210 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
2212 (find_rela_addend): Remove.
2213 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
2215 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
2218 2003-03-31 David Heine <dlheine@suif.stanford.edu>
2220 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
2222 * dwarf2.c (concat_filename): Always allocate space for the
2224 (decode_line_info): Free the allocated filename returned by
2226 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
2227 * elf.c (copy_private_bfd_data): Likewise.
2228 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
2229 * elflink.h (elf_link_sort_relocs): Fix memory leak.
2230 * format.c (bfd_check_format_matches): Likewise.
2231 * linker.c (bfd_generic_final_link): Likewise.
2232 * opncls.c (find_separate_debug_info): Likewise.
2233 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
2235 2003-03-28 H.J. Lu <hjl@gnu.org>
2237 * elflink.h (elf_link_add_object_symbols): Correctly combine
2240 2003-03-27 Jakub Jelinek <jakub@redhat.com>
2242 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
2243 to -1 before recomputing got offsets.
2245 2003-03-26 Andreas Schwab <schwab@suse.de>
2247 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
2248 (elf_m68k_relocate_section): Use it to correctly handle symbols
2250 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
2251 entries for symbols that are forced to be local.
2253 2003-03-25 Alexandre Oliva <aoliva@redhat.com>
2255 * elfxx-mips.c (_bfd_mips_relax_section): New function.
2256 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
2257 * elfn32-mips.c, elf64-mips.c: Use it.
2259 2003-03-25 Stan Cox <scox@redhat.com>
2260 Nick Clifton <nickc@redhat.com>
2262 Contribute support for Intel's iWMMXt chip - an ARM variant:
2264 * archures.c: Add bfd_mach_arm_iWMMXt.
2265 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
2266 * bfd-in2.h: Regenerate.
2267 * libbfd.h: Regenerate.
2268 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
2269 object files to be linked with XScale ones.
2270 (coff_arm_final_link_postscript): Update note section.
2271 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
2272 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
2273 after identifying a coff binary.
2274 * cpu-arm.c (processors): Add iWMMXt.
2275 (arch_inf): Likewise.
2276 * elf32-arm.h (arm_object_p): Handle note section.
2277 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
2278 be linked with XScale ones.
2279 (elf32_arm_section_flags): New function: Set flags on note section.
2280 (elf32_arm_final_write_processing): Handle note section.
2282 2003-03-21 DJ Delorie <dj@redhat.com>
2284 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
2285 _bfd_elf_rela_local_sym.
2287 2003-03-20 H.J. Lu <hjl@gnu.org>
2289 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
2292 2003-03-20 Nick Clifton <nickc@redhat.com>
2294 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
2295 $idata5 in case bfd_coff_final_link is not called.
2297 2003-03-19 Jakub Jelinek <jakub@redhat.com>
2299 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
2301 (canon_reloc_count): Define.
2302 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
2303 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
2305 (sparc64_elf_canonicalize_reloc): New routine.
2306 (bfd_elf64_canonicalize_reloc): Define.
2308 2003-03-18 Jakub Jelinek <jakub@redhat.com>
2310 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
2311 againt mergeable sections. Take r_addend into account when caching
2314 2003-03-18 Richard Henderson <rth@redhat.com>
2316 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
2317 local symbols that have no dyninfo.
2319 2003-03-14 Gene Smith <gene.smith@siemens.com>
2321 * ieee.c (ieee_write_expression): Handle the case where symbol is
2323 General formatting improvements.
2325 2003-03-13 Nick Clifton <nickc@redhat.com>
2327 * configure.in (LINGUAS): Add zh_CN.
2328 * configure: Regenerate.
2329 * po/zh_CN.po: New file.
2331 2003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
2333 * aout-cris.c (BYTES_IN_WORD): Don't define.
2334 aout-encap.c: Likewise.
2335 aout-ns32k.c: Likewise.
2336 aout-tic30.c: Likewise.
2337 hp300bsd.c: Likewise.
2338 i386aout.c: Likewise.
2339 i386dynix.c: Likewise.
2340 i386linux.c: Likewise.
2341 i386lynx.c: Likewise.
2342 i386mach3.c: Likewise.
2343 m68k4knetbsd.c: Likewise.
2344 m68klinux.c: Likewise.
2345 m68klynx.c: Likewise.
2346 m68knetbsd.c: Likewise.
2347 m88kmach3.c: Likewise.
2348 mipsbsd.c: Likewise.
2349 newsos3.c: Likewise.
2350 sparclinux.c: Likewise.
2351 sparclynx.c: Likewise.
2352 sparcnetbsd.c: Likewise.
2353 vaxbsd.c: Likewise. Fix comment formatting.
2355 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
2357 * Reverted 2003-03-02's patch.
2359 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
2361 * elf64-mips.c (mips_elf64_canonicalize_reloc,
2362 mips_elf64_get_dynamic_reloc_upper_bound,
2363 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
2364 (bfd_elf64_get_canonicalize_reloc,
2365 bfd_elf64_get_dynamic_reloc_upper_bound,
2366 bfd_elf64_canonicalize_dynamic_reloc): Define.
2367 (mips_elf64_slurp_reloc_table): Support dynamic.
2368 (mips_elf64_slurp_one_reloc_table): Adjust.
2370 2003-03-12 Nick Clifton <nickc@redhat.com>
2372 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
2373 'index' to 'offset' in test for zero value.
2375 2003-03-11 Alexandre Oliva <aoliva@redhat.com>
2377 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
2378 dynamic relocations pointing to local or section symbols, use the
2379 NULL symbol instead. Document the choice to not emit an
2380 additional R_MIPS_64 relocation.
2382 2003-03-11 Alan Modra <amodra@bigpond.net.au>
2384 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
2385 zero index dynamic tls relocs generated for the GOT. Tidy code.
2386 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
2387 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2389 2003-03-07 Alan Modra <amodra@bigpond.net.au>
2391 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
2392 a tls_get_addr call.
2394 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
2395 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
2396 ELF_LINK_NON_GOT_REF from weakdef.
2397 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
2398 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
2399 ELF_LINK_NON_GOT_REF from weakdef.
2400 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
2401 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
2402 ELF_LINK_NON_GOT_REF from weakdef.
2404 2003-03-06 Jakub Jelinek <jakub@redhat.com>
2405 Andrew Haley <aph@redhat.com>
2407 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
2408 output is relocateable.
2410 2003-03-06 Steven Konopa <skonopa@kgo.csc.com>
2412 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
2415 2003-03-06 Alan Modra <amodra@bigpond.net.au>
2417 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
2419 (ELIMINATE_COPY_RELOCS): Define to zero.
2420 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
2421 TLSLD relocs. Report reloc types on a number of errors. Optimize
2422 LOCAL24PC check for non-local syms. Don't capitalize error messages.
2423 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
2424 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
2425 calculating TLSLD relocs. Report reloc types on a number of errors.
2426 Don't capitalize error messages.
2428 2003-03-03 H.J. Lu <hjl@gnu.org>
2430 * elfxx-ia64.c (USE_BRL): Removed.
2433 2003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
2435 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
2436 relocation (no special function), and make it non-partial_inplace.
2437 (sh_elf_relax_section): When creating a bsr, use a consistent value
2438 no matter if the symbol is extern or not; set addend to -4.
2439 Don't swap load / non-load instructions for SH4.
2440 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
2441 rather than if the symbol is external to determine if adjusting the
2442 offset makes sense. Adjust the addend too if appropriate.
2443 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
2446 2003-03-03 Nick Clifton <nickc@redhat.com>
2448 * po/da.po: Installed latest translation.
2450 2003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2452 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
2453 R_MIPS_PC16 to rightshift 2.
2454 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
2455 (bfd_elf32_bfd_reloc_type_lookup): Support
2456 BFD_RELOC_MIPSEMB_16_PCREL_S2.
2457 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
2458 R_MIPS_PC16 to rightshift 2.
2459 (mips_elf64_howto_table_rela): Likewise.
2460 (mips_reloc_map): Map to rightshifted BFD reloc.
2461 * elfn32-mips.c: The same as in elf64-mips.c.
2462 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
2463 (mips_elf_calculate_relocation): Handle rightshifted addends for
2465 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
2466 MIPS Embedded PIC. Remove superfluous empty COMMENT.
2467 * libbfd.h: Regenerate.
2468 * bfd-in2.h: Regenerate.
2470 2003-02-28 Richard Henderson <rth@redhat.com>
2472 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
2473 for ltoff22x relaxation.
2475 2003-03-01 Alan Modra <amodra@bigpond.net.au>
2477 * bfd-in.h (_bfd): Don't define.
2478 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
2480 * bfd-in2.h: Regenerate.
2482 2003-02-27 Richard Henderson <rth@redhat.com>
2484 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
2485 (elfNN_ia64_check_relocs): Set it.
2486 (allocate_global_data_got): Check it.
2487 (allocate_local_got): Likewise.
2488 (allocate_dynrel_entries): Likewise.
2489 (elfNN_ia64_relax_ldxmov): New.
2490 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
2491 (elfNN_ia64_choose_gp): Split out from ...
2492 (elfNN_ia64_final_link): ... here.
2494 2003-02-27 Andrew Cagney <cagney@redhat.com>
2496 * bfd.c (struct bfd): Rename "struct _bfd".
2497 * bfd-in.h: Update copyright.
2498 (struct bfd): Rename "struct _bfd".
2499 (_bfd): Define for backward compatibility.
2500 * bfd-in2.h: Regenerate.
2502 2003-02-25 Alan Modra <amodra@bigpond.net.au>
2504 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
2505 and rel_hdr2 when initially counting input relocs rather than after
2506 creating output reloc sections.
2507 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
2510 * Makefile.am: Run "make dep-am".
2511 * Makefile.in: Regenerate.
2513 2003-02-24 Kris Warkentin <kewarken@qnx.com>
2515 * elf.c (elfcore_read_notes): Add check for QNX style core file.
2516 (elfcore_grog_nto_note): New function.
2517 (elfcore_grog_nto_gregs): New function.
2518 (elfcore_grog_nto_status): New function.
2520 2003-02-24 Alan Modra <amodra@bigpond.net.au>
2522 * elflink.c (_bfd_elf_create_got_section): Check existing .got
2523 section flags before concluding that we've already been called.
2524 Don't use register keyword.
2525 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
2526 (_bfd_elf_create_linker_section): Formatting.
2528 2003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
2530 * coff-h8300.c: Fix typo: intial -> initial.
2531 * coff-ppc.c: Likewise.
2533 2003-02-20 Alan Modra <amodra@bigpond.net.au>
2535 * elf32-ppc.c: Formatting.
2536 (allocate_dynrelocs): LD and GD relocs against the same sym need
2537 separate GOT entries.
2538 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
2541 2003-02-19 Alan Modra <amodra@bigpond.net.au>
2543 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
2544 removal. Localize vars. Remove unnecessary dynobj test.
2545 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
2547 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
2549 (elf_i386_relocate_section): Likewise.
2550 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
2551 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
2552 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
2553 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
2554 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
2555 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
2556 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
2557 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
2560 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
2561 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
2563 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
2564 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2565 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
2566 and optimize. Use ELIMINATE_COPY_RELOCS.
2567 (ppc64_elf_relocate_section): Likewise.
2569 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
2570 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
2571 (ELIMINATE_COPY_RELOCS): Define.
2572 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
2573 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2574 (MUST_BE_DYN_RELOC): Define.
2575 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
2576 and optimize. Trim dyn_relocs.
2577 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
2578 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
2579 track of pc_rel dyn relocs.
2580 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
2581 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
2582 allocate_dynrelocs. Don't recalculate "sec".
2584 2003-02-18 Alan Modra <amodra@bigpond.net.au>
2586 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
2587 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
2588 on invalid LD relocs.
2589 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
2590 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
2591 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
2593 * elf32-ppc.h: New file.
2594 * elf32-ppc.c: Include elf32-ppc.h.
2595 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
2596 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
2597 Add "tls_mask" field.
2598 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
2599 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
2600 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
2601 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
2602 Make use of htab shortcuts throughout file.
2603 (ppc_elf_link_hash_newfunc): Init tls_mask field.
2604 (ppc_elf_link_hash_table_create): Init new fields.
2605 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
2606 (ppc_elf_howto_raw): Add tls relocs.
2607 (ppc_elf_reloc_type_lookup): Handle them.
2608 (ppc_elf_unhandled_reloc): New function.
2609 (ppc_elf_create_got): Stash got section pointer in hash table,
2610 return status. Make .rela.got too.
2611 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
2612 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
2613 NON_GOT_REF set. Don't allocate space in .plt here..
2614 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
2615 not allocating plt entries unnecessarily. Allocate got entries here.
2616 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
2617 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
2618 "info" during allocate_dynrelocs hash traversal. Use htab section
2619 shortcuts rather than searching for named sections. Get rid of
2620 "plt" and "strip" booleans.
2621 (update_local_sym_info, bad_shared_reloc): New functions.
2622 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
2623 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
2624 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
2625 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
2626 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
2627 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
2628 relocs that might use a plt entry. Set NON_GOT_REF too.
2629 Enumerate all do-nothing relocs.
2630 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
2631 tls relocs and all plt relocs.
2632 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
2633 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
2634 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
2636 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
2637 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
2638 entries and got relocs here. Warn on non-zero got reloc addend.
2639 Split out branch taken/not taken reloc code into a separate switch
2640 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
2641 Split out HA reloc adjustments to separate switch statement. Don't
2642 warn on reloc overflow if we've already warned about undefined.
2643 Don't rebuild sym name when reporting errors. Report all possible
2644 errors from _bfd_final_link_relocate.
2645 (bfd_elf32_bfd_final_link): Don't define.
2647 2003-02-18 Alan Modra <amodra@bigpond.net.au>
2649 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
2650 rebuild sym name when reporting errors.
2652 2003-02-17 Nick Clifton <nickc@redhat.com>
2654 * elflink.h (elf_link_output_extsym): Only check
2655 allow_shlib_undefined for shared libraries.
2656 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
2657 of allow_shlib_undefined.
2658 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2659 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
2660 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2661 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2662 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2663 * elf32-sh.c (sh_elf_relocate_section): Likewise.
2664 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2665 * elf32-vax.c (elf_vax_relocate_section): Likewise.
2666 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2667 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
2668 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2669 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2670 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2671 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2672 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2673 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
2675 2003-02-17 Nick Clifton <nickc@redhat.com>
2677 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
2678 address field to use in the comparison.
2679 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
2681 2003-02-14 Bob Wilson <bob.wilson@acm.org>
2683 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
2684 backends when checking if the generic ELF target should be used.
2686 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
2687 outside of functions, treat values as absolute addresses.
2689 * bfd.c: Change embedded documentation to use consistent indentation
2690 and to split up long lines. Change informal style of description
2691 for functions lacking real documentation.
2692 * coffcode.h: Break up long lines in embedded documentation.
2693 * format.c: Likewise.
2694 * targets.c: Likewise.
2695 * libcoff.h: Regenerate.
2696 * bfd-in2.h: Regenerate.
2698 2003-02-14 Alan Modra <amodra@bigpond.net.au>
2700 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
2701 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
2702 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
2703 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
2704 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
2705 (group_sections): Don't share a stub section if stubs are for a large
2706 section. Adjust comment.
2707 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
2708 !stubs_always_before_branch.
2709 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
2710 treat undefined and undefweak specially when processing dyn relocs.
2712 2003-02-13 Jakub Jelinek <jakub@redhat.com>
2714 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
2716 2003-02-13 Nick Clifton <nickc@redhat.com>
2718 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
2719 in computation of offset to insert into BL instruction.
2721 2003-02-11 Uwe Stieber <uwe@wwws.de>
2723 * config.bfd: Add support for kaOS as cross build target system.
2725 2003-02-11 Alan Modra <amodra@bigpond.net.au>
2727 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
2728 .__tls_get_addr too.
2729 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
2731 2003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
2733 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
2734 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
2735 (sh_elf_link_hash_newfunc): Remove the initialization of
2737 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
2738 for which tls_tpoff32 flag is set.
2739 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
2740 of the symbol includes the entry matched with the input_section
2741 and having tls_tpoff32 flag on. When linking statically, set
2742 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
2743 is defined in this executable.
2744 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
2746 2003-02-10 Jakub Jelinek <jakub@redhat.com>
2748 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
2749 even if there is just non-empty .rela.plt.
2751 2003-02-10 Nick Clifton <nickc@redhat.com>
2753 * archures.c (bfd_mach_arm_ep9312): Define.
2754 * bfd-in2.h: Regenerate.
2755 * cpu-arm.c (processors[]): Add ep9312.
2756 (bfd_arm_arch): Add ep9312.
2757 * elf32-arm.h (elf32_arm_merge_private_data): Update error
2758 messages and add test for Maverick floating point support.
2759 (elf32_arm_print_private_bfd_data): Handle
2760 EF_ARM_MAVERICK_FLOAT flag.
2761 (elf32_arm_object_p): New function.
2762 (elf_backend_object_p): Define.
2764 2003-02-10 Alan Modra <amodra@bigpond.net.au>
2766 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
2767 variables, structure fields or function params to tls_mask or
2768 similar to better reflect usage.
2769 (struct got_entry): Comment.
2770 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
2771 (get_tls_mask): Rename from get_tls_type.
2773 2003-02-09 Alan Modra <amodra@bigpond.net.au>
2775 * elf64-ppc.c (TLS_GD_LD): Don't define..
2776 (TLS_GD): ..define this instead and update all uses.
2777 (TLS_TPRELGD): Define.
2778 (ppc64_elf_link_hash_table_create): Tweak initialization of
2779 init_refcount and init_offset.
2780 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
2781 Mark second slot of GD or LD toc entries.
2782 (get_tls_type): Return an int. Distinguish toc GD and LD entries
2783 from other tls types.
2784 (ppc64_elf_tls_setup): New function, split out from..
2785 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
2786 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
2787 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
2788 return value to properly decide whether toc GD and LD entries can
2789 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
2790 to determine GD or LD rather than looking at TLS_LD flag. Don't
2791 attempt to adjust got entry tls_type here..
2792 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
2793 look for possible merges.
2794 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
2796 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
2797 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
2798 Make use of return value from get_tls_type to properly detect GD and
2799 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
2800 handle tls_get_addr removal when looking at REL24 relocs, do it when
2801 looking at the previous reloc. Check reloc after DTPMOD64 to determine
2803 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
2805 2003-02-08 Alan Modra <amodra@bigpond.net.au>
2807 * elf32-hppa.c (group_sections): Don't share a stub section if
2808 stubs are for a large section.
2810 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
2811 stubs if !stubs_always_before_branch.
2813 2003-02-07 Nick Clifton <nickc@redhat.com>
2815 * elf.c (swap_out_syms): Generate an error message if an
2816 equivalent output section cannot be found for a symbol.
2818 2003-02-07 Jakub Jelinek <jakub@redhat.com>
2820 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
2821 local_got_entries is NULL.
2823 2003-02-06 Andreas Schwab <schwab@suse.de>
2825 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
2826 (read_value): Add parameter is_signed, use signed extraction if
2827 the value is signed.
2828 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
2829 encoding to read_value.
2831 2003-02-06 Alan Modra <amodra@bigpond.net.au>
2833 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
2834 plt info when called to transfer weak sym info.
2836 2003-02-05 Alan Modra <amodra@bigpond.net.au>
2838 * reloc.c: Add PPC and PPC64 TLS relocs.
2839 * libbfd.h: Regenerate.
2840 * bfd-in2.h: Regenerate.
2841 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
2842 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
2843 against a 32 bit field.
2844 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
2845 (_ppc64_elf_section_data): Add t_symndx and comments.
2846 (ppc64_elf_section_data): Use elf_section_data macro.
2847 (ppc64_elf_new_section_hook): American spelling.
2848 (struct got_entry, struct plt_entry): New.
2849 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
2850 (struct ppc_stub_hash_entry): Add "addend" field.
2851 (struct ppc_link_hash_entry): Add "tls_type".
2852 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
2853 TLS_EXPLICIT): Define.
2854 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
2855 (link_hash_newfunc): Init new fields.
2856 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
2857 init_offset to NULL.
2858 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
2859 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
2861 (update_local_sym_info, update_plt_info): New functions.
2862 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
2863 handling to use got.glist rather than got.refcount. Likewise for PLT.
2864 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
2865 (func_desc_adjust): Adjust for new PLT list.
2866 (ppc64_elf_adjust_dynamic_symbol): Likewise.
2867 (get_sym_h, get_tls_type): New functions.
2868 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
2869 (ppc64_elf_tls_optimize): New function.
2870 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
2872 (ppc64_elf_size_dynamic_sections): Likewise.
2873 (ppc_type_of_stub): Adjust for new PLT list.
2874 (ppc_build_one_stub): Likewise.
2875 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
2877 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
2878 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
2879 init GOT entries that have a reloc. Generate GOT relocs here..
2880 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
2881 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
2883 2003-02-04 Andreas Schwab <schwab@suse.de>
2885 * elf32-m68k.c (elf_m68k_hash_entry): Define.
2886 (elf_m68k_link_hash_traverse): Remove.
2887 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
2888 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
2890 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
2892 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
2893 instead of elf_m68k_link_hash_traverse.
2894 (elf_m68k_discard_copies): Change first parameter to pointer to
2895 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
2896 elf_m68k_link_hash_entry is needed.
2898 2003-02-04 Alan Modra <amodra@bigpond.net.au>
2900 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
2901 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
2902 "got" union, and declare as gotplt_union. Use gotplt_uinion for
2904 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
2905 Add "init_offset" field.
2906 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
2907 (elf_local_got_ents): Declare.
2908 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
2910 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
2911 (_bfd_elf_link_hash_table_init): Set "init_offset".
2912 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
2914 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
2916 * elf.c (bfd_elf_local_sym_name): Split out from..
2917 (group_signature): ..here.
2918 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
2920 2003-02-04 Alan Modra <amodra@bigpond.net.au>
2922 * elf-bfd.h (enum elf_link_info_type): Remove.
2923 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
2924 to struct sec. Remove linkonce_p field.
2925 (elf_linkonce_p): Delete.
2926 (elf_discarded_section): Update for sec_info_type change.
2927 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
2928 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
2929 (ELF_INFO_TYPE_NONE): Define.
2930 (ELF_INFO_TYPE_STABS): Define.
2931 (ELF_INFO_TYPE_MERGE): Define.
2932 (ELF_INFO_TYPE_EH_FRAME): Define.
2933 (ELF_INFO_TYPE_JUST_SYMS): Define.
2934 (STD_SECTION): Update struct sec initializer.
2935 * ecoff.c (bfd_debug_section): Likewise.
2936 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
2937 * elflink.h: Likewise.
2938 * elf-eh-frame.c: Likewise.
2939 * elf64-alpha.c: Likewise.
2940 * elfxx-ia64.c: Likewise.
2941 * elfxx-mips.c: Likewise.
2942 * bfd-in2.h: Regenerate.
2944 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
2945 referring to used_by_bfd.
2946 * elf64-sparc.c (sec_do_relax): Likewise.
2947 * elf64-mmix.c (mmix_elf_section_data): Likewise.
2948 * elfxx-mips.c (mips_elf_section_data): Likewise.
2949 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
2950 (ieee_get_section_contents): Likewise.
2951 (ieee_new_section_hook): Formatting.
2952 (ieee_canonicalize_reloc): Remove commented out code.
2953 * mmo.c (mmo_section_data): Define. Use throughout file.
2954 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
2956 2003-01-31 Graydon Hoare <graydon@redhat.com>
2958 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
2959 * Makefile.in: Regenerate.
2960 * opncls.c (calc_crc32, get_debug_link_info,
2961 seperate_debug_file_exists, find_seperate_debug_file): New
2963 (bfd_follow_gnu_debuglink): New function. Follow the pointer
2964 contained inside a .gnu_debuglink section.
2965 * bfd-in2.h: Regenerate.
2967 2003-01-29 Alexandre Oliva <aoliva@redhat.com>
2969 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
2970 entry->abfd when it's NULL.
2972 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
2974 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
2975 _bfd_elf_section_offset returning -2 the same way as -1.
2977 * elfxx-mips.c (mips_elf_multi_got): New function.
2978 (struct mips_got_entry): Make symndx and gotidx signed. Moved
2979 addend into union along with address and link hash entry.
2980 (struct mips_got_info): Added bfd2got and next.
2981 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
2982 (mips_elf_got_section, mips_elf_create_got_section): Use
2983 SEC_EXCLUDE bit to tell whether we really need the got
2984 section. Take boolean arguments to disregard an excluded
2985 section, or to create it as excluded. Adjust all callers.
2986 Use mips_elf_got_section all over.
2987 (mips_elf_local_got_index, mips_elf_got_page,
2988 mips_elf_got16_entry): Take input bfd as argument, and pass it
2989 on to mips_elf_create_local_got_entry.
2990 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
2991 Take input bfd as argument, and manage entries in the
2993 (mips_elf_got_offset_from_index): Take input bfd as argument,
2994 and use it to adjust the GP offset of the bfd.
2995 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
2996 unreferenced GOT entries of global symbols to the end.
2997 (mips_elf_record_global_got_symbol): Take input bfd as
2998 argument. Add entries to the master GOT hash table.
2999 (struct mips_elf_bfd2got_hash): New.
3000 (struct mips_elf_got_per_bfd_arg): New.
3001 (struct mips_elf_set_global_got_offset_arg): New.
3002 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
3003 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
3004 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
3005 mips_elf_merge_gots, mips_elf_set_global_got_offset,
3006 mips_elf_resolve_final_got_entry,
3007 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
3008 mips_elf_got_for_ibfd): New functions.
3009 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
3010 (MIPS_ELF_GOT_MAX_SIZE): New macro.
3011 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
3012 (mips_elf_got_entry_hash): Take new fields into account. Use
3013 mips_elf_hash_bfd_vma.
3014 (mips_elf_got_entry_eq): Take new fields into account.
3015 (mips_elf_create_got_section): Initialize new fields.
3016 (mips_elf_calculate_relocation): Pass input_bfd to functions
3017 that now take it. Adjust gp for the input_bfd.
3018 (mips_elf_allocate_dynamic_relocation,
3019 mips_elf_create_dynamic_relocation,
3020 _bfd_mips_elf_create_dynamic_sections): Use...
3021 (mips_elf_rel_dyn_section): New function. Borrow code from...
3022 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
3023 now take it. Create the got section if needed, even if
3024 excluded, before recording a global got symbol. Move some
3026 (mips_elf_record_local_got_symbol): New fn.
3027 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
3028 Compute multi-got global entries offsets. Move GOT code to...
3029 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
3030 if the GOT is too big.
3031 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
3032 undefweak symbol to zero. Generate dynamic relocations for
3033 non-primary GOT entries for global symbols.
3034 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
3035 case. Generate dynamic relocations for local got entries.
3036 Sort dynamic relocations on N64 too, using...
3037 (sort_dynamic_relocs_64): New fns.
3038 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
3039 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
3041 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
3043 * bfd.c (struct _bfd): Added id field.
3044 * opncls.c (_bfd_id_counter): New static variable.
3045 (_bfd_new_bfd): Use it.
3046 * bfd-in2.h: Rebuilt.
3048 2003-01-25 Alan Modra <amodra@bigpond.net.au>
3050 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
3052 2003-01-25 Jakub Jelinek <jakub@redhat.com>
3054 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
3055 (elf32_sparc_rev32_howto): New variable.
3056 (sparc_reloc_map): Add TLS relocs.
3057 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
3059 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
3061 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
3062 struct elf32_sparc_link_hash_table):
3064 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
3065 elf32_sparc_hash_table): Define.
3066 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
3067 create_got_section, elf32_sparc_create_dynamic_sections,
3068 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
3070 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
3072 (elf32_sparc_gc_sweep_hook): Likewise.
3073 (elf32_sparc_adjust_dynamic_symbol): Likewise.
3074 (elf32_sparc_size_dynamic_sections): Likewise.
3075 (elf32_sparc_relocate_section): Likewise.
3076 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
3078 (elf32_sparc_object_p): Allocate backend private object data.
3079 (bfd_elf32_bfd_link_hash_table_create,
3080 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
3081 elf_backend_can_refcount): Define.
3082 (elf_backend_create_dynamic_sections): Define to
3083 elf32_sparc_create_dynamic_sections.
3084 * reloc.c: Add SPARC TLS relocs.
3085 * bfd-in2.h, libbfd.h: Rebuilt.
3086 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
3087 (sparc_reloc_map): Likewise.
3089 2003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
3091 * bfd-in2.h: Regenerate.
3092 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
3093 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
3094 (elf_howto_table): Add TLS relocs.
3095 (elf_s390_reloc_type_lookup): Likewise.
3096 (elf_s390_link_hash_entry): Add tls_type.
3097 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
3099 (elf_s390_link_hash_table): Add tls_ldm_got.
3100 (link_hash_newfunc): Initialize tls_type.
3101 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
3102 (elf_s390_copy_indirect_symbol): Copy tls_type information.
3103 (elf_s390_check_relocs): Support TLS relocs.
3104 (elf_s390_gc_sweep_hook): Likewise.
3105 (allocate_dynrelocs): Likewise.
3106 (elf_s390_size_dynamic_sections): Likewise.
3107 (elf_s390_relocate_section): Likewise.
3108 (elf_s390_finish_dynamic_symbol): Likewise.
3109 (bfd_elf32_mkobject): Define for TLS.
3110 * elf64-s390.c: Same changes as for elf32-s390.c.
3111 * libbfd.h: Regenerate.
3112 * reloc.c: Add s390 TLS relocations.
3114 2003-01-24 Charles Lepple <clepple@ghz.cc>
3116 * aclocal.m4: Fix name of --enable-install-libbfd switch.
3118 2003-01-23 Nick Clifton <nickc@redhat.com>
3121 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
3122 * archures.c (bfd_mach_sh2e): Added.
3123 * bfd-in2.h: Rebuilt.
3124 * cpu-sh.c (arch_info_struct): Added SH2e.
3125 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
3127 2003-01-23 Alan Modra <amodra@bigpond.net.au>
3129 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
3130 dynindx to an int. Rearrange for better packing.
3131 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
3132 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
3133 * elf32-sh64.h: New. Split out from include/elf/sh.h.
3134 (struct _sh64_elf_section_data): New struct.
3135 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
3136 * elf32-sh64-com.c: Include elf32-sh64.h.
3137 * elf32-sh64.c: Likewise.
3138 (sh64_elf_new_section_hook): New function.
3139 (bfd_elf32_new_section_hook): Define.
3140 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
3141 (sh64_bfd_elf_copy_private_section_data): Likewise.
3142 (sh64_elf_final_write_processing): Likewise.
3143 * elf32-sparc.c (struct elf32_sparc_section_data): New.
3144 (elf32_sparc_new_section_hook): New function.
3145 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
3146 (sec_do_relax): Define.
3147 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
3148 (elf32_sparc_relocate_section): Likewise.
3149 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
3150 * elf64-mmix.c (struct _mmix_elf_section_data): New.
3151 (mmix_elf_section_data): Define. Use throughout file.
3152 (mmix_elf_new_section_hook): New function.
3153 (bfd_elf64_new_section_hook): Define.
3154 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
3155 (ppc64_elf_section_data): Define. Use throughout.
3156 (ppc64_elf_new_section_hook): New function.
3157 (bfd_elf64_new_section_hook): Define.
3158 * elf64-sparc.c (struct sparc64_elf_section_data): New.
3159 (sparc64_elf_new_section_hook): New function.
3160 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
3161 (sec_do_relax): Define.
3162 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
3163 (sparc64_elf_relocate_section): Likewise.
3164 (bfd_elf64_new_section_hook): Define.
3165 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
3166 * elfxx-mips.c (struct _mips_elf_section_data): New.
3167 (mips_elf_section_data): Define. Use throughout.
3168 (_bfd_mips_elf_new_section_hook): New function.
3169 (mips_elf_create_got_section): Don't alloc used_by_bfd.
3170 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
3171 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
3172 * Makefile.am: Run "make dep-am".
3173 * Makefile.in: Regenerate.
3175 2003-01-21 Richard Henderson <rth@redhat.com>
3177 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
3178 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
3179 (elf64_alpha_adjust_dynamic_symbol): Set them.
3180 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
3181 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
3182 symbol index when relaxing LDM to TPREL.
3183 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
3184 relocs, even if the target isn't locally defined.
3185 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
3186 (elf64_alpha_relocate_section): Likewise. Force TP-relative
3187 relocs vs symndx 0 to the tp base.
3189 2003-01-21 Fabio Alemagna <falemagn@aros.org>
3191 * config.bfd: Handle i[3456]86-*-aros*.
3193 2003-01-21 Andreas Schwab <schwab@suse.de>
3195 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
3196 (struct ppc_elf_link_hash_entry): Define.
3197 (ppc_elf_hash_entry): New function.
3198 (struct ppc_elf_link_hash_table): Define.
3199 (ppc_elf_hash_table): New function.
3200 (ppc_elf_link_hash_newfunc): New function.
3201 (ppc_elf_link_hash_table_create): New function.
3202 (ppc_elf_copy_indirect_symbol): New function.
3203 (allocate_dynrelocs): New function.
3204 (readonly_dynrelocs): New function.
3205 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
3206 relocs and determine DT_TEXTREL.
3207 (ppc_elf_check_relocs): Don't do that here, just count the
3209 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
3211 (bfd_elf32_bfd_link_hash_table_create): Define.
3212 (elf_backend_copy_indirect_symbol): Define.
3214 2003-01-21 Richard Henderson <rth@redhat.com>
3216 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
3217 TPREL also get a reloc if shared. Remove SREL support.
3218 (elf64_alpha_emit_dynrel): New.
3219 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
3220 and GOTTPREL relocs to local symbols against the tp base.
3221 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
3223 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
3224 use count before clobbering r_type.
3225 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
3226 ordering would mean dataflow inspection is necessary.
3228 2003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
3230 * coffcode.h (coff_set_flags): Added get/set arch hooks.
3232 2003-01-20 Fabio Alemagna <falemagn@aros.org>
3234 * elf32-sh.c: Treat elfNN_bed like other macros defined in
3235 elfxx-target.h and #undef it before #define'ing it.
3236 * elf32-i386.c: Likewise.
3237 * elf32-sh64.c: Likewise.
3238 * elf64-alpha.c: Likewise.
3239 * elf64-sh64.c: Likewise.
3241 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
3243 * bfd-in2.h: Regenerate.
3244 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
3245 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
3246 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
3247 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
3248 R_390_PLTOFF32 and R_390_PLTOFF64.
3249 (elf_s390_reloc_type_lookup): Likewise.
3250 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
3251 of GOTPLT references to a function.
3252 (link_hash_newfunc): Initialize gotplt_refcount.
3253 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
3254 and creation of the got section out of the main switch. Add support
3255 for the gotoff, gotplt and pltoff relocations.
3256 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
3258 (elf_s390_adjust_gotplt): New function.
3259 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
3261 (allocate_dynrelocs): Add comment.
3262 (elf_s390_relocate_section): Change r_type to unsigned. Add support
3263 for gotoff, gotplt and pltoff relocations.
3264 * elf64-s390.c: Same changes as for elf32-s390.c.
3265 * libbfd.h: Regenerate.
3266 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
3267 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
3268 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
3269 and BFD_RELOC_390_PLTOFF64.
3271 2003-01-18 Jakub Jelinek <jakub@redhat.com>
3273 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
3274 R_IA64_TPREL64[LM]SB against non-global symbol properly.
3276 2003-01-16 Jakub Jelinek <jakub@redhat.com>
3278 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
3279 self_dtpmod_done and self_dtpmod_offset.
3280 (allocate_global_data_got): Only use one got entry for all
3281 dtpmod relocs against local symbols.
3282 (allocate_dynrel_entries): Only need .rela.got entry for
3283 dtpmod against global symbol.
3284 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
3285 Reserve space in .rela.got for the local dtpmod entry.
3286 (set_got_entry): Initialize the common local dtpmod .got entry.
3287 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
3288 and R_IA_64_DTPREL64MSB.
3290 2003-01-16 Alan Modra <amodra@bigpond.net.au>
3292 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
3293 (R_PPC_*): Rename all occurrences to R_PPC64_*.
3294 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
3295 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
3296 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
3297 relative relocs, not with absolute ones.
3298 * Makefile.am: Run "make dep-am".
3299 * Makefile.in: Regenerate.
3300 * po/SRC-POTFILES.in: Regenerate.
3302 2003-01-15 Andreas Schwab <schwab@suse.de>
3304 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
3305 relocation against a non-allocated readonly section.
3307 2003-01-10 Alan Modra <amodra@bigpond.net.au>
3309 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
3310 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
3312 2002-01-08 Klee Dienes <kdienes@apple.com>
3314 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
3315 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
3316 * Makefile.in: Regenerate.
3318 2003-01-08 Alexandre Oliva <aoliva@redhat.com>
3320 * elfn32-mips.c (prev_reloc_section): New.
3321 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
3322 (SET_RELOC_ADDEND): Parenthesize macro argument.
3324 2003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
3326 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
3327 adjust addil instructions if the symbol has no section.
3329 2003-01-07 DJ Delorie <dj@redhat.com>
3331 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
3334 2003-01-07 Andreas Schwab <schwab@suse.de>
3336 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
3337 PC relative relocations.
3338 (elf_m68k_discard_copies): Set it here instead.
3340 2002-01-02 Ben Elliston <bje@redhat.com>
3341 Jeff Johnston <jjohnstn@redhat.com>
3343 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
3344 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
3345 (BFD32_BACKENDS): Add elf32-iq2000.lo.
3346 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
3347 (cpu-iq2000.lo): New target.
3348 * Makefile.in: Regenerate.
3349 * config.bfd: Handle iq2000-*-elf.
3350 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
3351 (bfd_archures_list): Add bfd_iq2000_arch.
3352 * configure.in: Handle bfd_elf32_iq2000_vec.
3353 * configure: Regenerate.
3354 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
3355 and BFD_RELOC_IQ2000_UHI16.
3356 * targets.c (bfd_elf32_iq2000_vec): Declare.
3357 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
3358 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
3359 * cpu-iq2000.c: New file.
3360 * elf32-iq2000.c: Likewise.
3361 * libbfd.h: Regenerate.
3362 * bfd-in2.h: Likewise.
3364 2003-01-02 Richard Sandiford <rsandifo@redhat.com>
3366 * elfxx-mips.c: Include libiberty.h.
3367 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
3368 (mips_set_isa_flags): New function, split out from...
3369 (_bfd_mips_elf_final_write_processing): ...here. Only call
3370 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
3371 (mips_mach_extensions): New array.
3372 (mips_32bit_flags_p): New function.
3373 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
3374 Use mips_32bit_flags_p to check if one binary is 32-bit and the
3375 other is 64-bit. When adopting IBFD's architecture, adopt the
3376 bfd_mach as well as the flags.
3378 2003-01-02 Nick Kelsey <nickk@ubicom.com>
3380 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
3381 fix internal errors, fix bad code generation, fix incorrect stabs
3382 information, and improve ability to eliminate redundant page
3383 instructions. Added code to ip2k_final_link_relocate to self-verify
3384 the linker relaxation. Fix formatting problems.
3386 2002-12-30 Chris Demetriou <cgd@broadcom.com>
3388 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
3389 * archures.c (bfd_mach_mipsisa32r2): New define.
3390 * bfd-in2.h: Regenerate.
3391 * cpu-mips.c (I_mipsisa32r2): New enum value.
3392 (arch_info_struct): Add entry for I_mipsisa32r2.
3393 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
3394 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
3395 (_bfd_mips_elf_final_write_processing): Add
3396 bfd_mach_mipsisa32r2 case.
3397 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
3398 binaries marked as using MIPS32 Release 2.
3400 2002-12-30 Dmitry Diky <diwil@mail.ru>
3402 * Makefile.am: Add msp430 target.
3403 * configure.in: Likewise.
3404 * Makefile.in: Regenerate.
3405 * configure: Regenerate.
3406 * archures.c: Add msp430 architecture vector.
3407 * config.bfd: Likewise.
3408 * reloc.c: Add msp430 relocs.
3409 * targets.c: Add msp320 target.
3410 * cpu-msp430.c: New file: msp430 cpu detection.
3411 * elf32-msp430.c: New file: msp430 reloc processing.
3412 * bfd-in2.h: Regenerate.
3413 * libbfd.h: Regenerate.
3415 2002-12-28 Jakub Jelinek <jakub@redhat.com>
3417 * elf.c (elf_sort_sections): Don't reorder .tbss.
3418 (assign_file_positions_for_segments): Only adjust off/voff
3419 for increased alignment in PT_LOAD or PT_NOTE segment,
3420 but adjust p_filesz for .tbss too. in PT_LOAD consider
3421 .tbss to have zero memory size.
3422 (copy_private_bfd_data) [SECTION_SIZE]: Define.
3423 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
3424 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
3425 into PT_TLS segment. Never put SHF_TLS sections in
3426 segments other than PT_TLS or PT_LOAD.
3428 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
3431 2002-12-23 DJ Delorie <dj@redhat.com>
3433 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
3435 2002-12-23 Alan Modra <amodra@bigpond.net.au>
3437 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
3439 2002-12-23 Nick Clifton <nickc@redhat.com>
3441 * archures.c (bfd_arch_get_compatible): Add third parameter
3442 'accept_unknowns'. Only accept unknown format BFDs if
3443 accept_unknowns is true, or if the format is "binary".
3444 * bfd-in2.h: Regenerate.
3446 2002-12-21 Nick Clifton <nickc@redhat.com>
3448 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
3449 that subtracted 8 from pc relative relocations.
3451 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
3453 * coff-h8300.c: Fix comment typos.
3454 * coffcode.h: Likewise.
3455 * cpu-cris.c: Likewise.
3456 * elf32-vax.c: Likewise.
3457 * genlink.h: Likewise.
3458 * linker.c: Likewise.
3460 * tekhex.c: Likewise.
3461 * vms-misc.c: Likewise.
3463 2002-12-20 DJ Delorie <dj@redhat.com>
3465 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
3466 * libbfd.h: Regenerate.
3467 * bfd-in2.h: Regenerate.
3468 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
3469 (xstormy16_reloc_map): Add R_XSTORMY16_12.
3471 2002-12-19 Kazu Hirata <kazu@cs.umass.edu>
3473 * doc/bfdint.texi: Fix typos.
3475 2002-12-20 Paul Eggert <eggert@twinsun.com>
3477 Port to POSIX 1003.1-2001.
3478 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
3479 * configure.in (build-warnings): Likewise.
3480 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
3481 * aclocal.m4: Regenerate.
3482 * config.in: Regenerate.
3483 * configure: Regenerate.
3485 2002-12-19 Alan Modra <amodra@bigpond.net.au>
3487 * coff-h8300.c: Include libiberty.h.
3488 (h8300_reloc16_extra_cases): Check the hash table creator before
3489 referencing h8300 specific fields. Stash the hash table pointer
3490 in a local var. Comment typo fixes.
3491 (h8300_bfd_link_add_symbols): Likewise.
3493 * reloc.c (struct reloc_howto_struct): Revise src_mask and
3495 * bfd-in2.h: Regenerate.
3497 2002-12-18 Alan Modra <amodra@bigpond.net.au>
3499 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
3500 code a little. Comment on dynamic relocs against section symbols.
3502 2002-12-17 Roger Sayle <roger@eyesopen.com>
3504 * configure.host (ia64-*-hpux*): Support 64 bit targets using
3505 the HP compiler's "long long".
3507 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
3509 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
3510 and R_XSTORMY16_HI16) howto entries.
3511 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
3512 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
3513 determine the start of the second reloc table.
3515 2002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
3517 * ecofflink.c: Fix the reading of the debugging information
3518 of Tru64/Alpha binaries that are produced by recent Compaq
3520 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
3522 (lookup_line): Because of the strange information sometimes
3523 generated by Compaq's recent compilers, change how the FDR
3524 table is searched so that PDRs (procedure descriptors) are
3525 correctly found. Note that this change is really more of a hack;
3526 however, I have included extensive documentation as to why
3527 this is the best solution short of an extensive rewrite or
3529 (fdrtab_lookup): Add comments to explain the algorithm.
3531 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
3533 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
3534 initializers to match struct declaration.
3536 2002-12-12 Alan Modra <amodra@bigpond.net.au>
3538 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
3539 * elf.c (get_program_header_size): Likewise.
3540 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
3541 (m32r_elf_generic_reloc): Likewise.
3542 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
3543 * elflink.h (elf_bfd_discard_info): Likewise.
3545 2002-12-12 Alan Modra <amodra@bigpond.net.au>
3547 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
3548 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
3549 DT_RELSZ adjustment, not output section. Avoid writing tags when
3550 unchanged. Don't assume linker script is sane, adjust DT_REL too.
3551 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
3552 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
3553 DT_RELASZ adjustment, not output section. Avoid writing tags when
3554 unchanged. Adjust DT_RELA.
3555 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
3556 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
3558 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
3560 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
3563 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
3565 * elfxx-mips.c (struct mips_got_entry): New.
3566 (struct mips_got_info): Added got_entries field.
3567 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
3568 (mips_elf_local_got_index, mips_elf_got_page,
3569 mips_elf_got16_entry): Re-implement in terms of new...
3570 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
3572 (mips_elf_highest): Warning clean-up.
3573 (mips_elf_create_got_section): Initialize got_entries.
3574 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
3576 (_bfd_mips_elf_size_dynamic_sections): Do not account for
3577 GOT_PAGE entries, since we now reuse GOT16 entries.
3579 2002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
3581 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
3582 read-only section that lies after .text and before .data to be
3583 written into the output file and included in a_text.
3584 (translate_to_native_sym_flags): If an otherwise unrepresentable
3585 section was merged with .text, convert its symbols to N_TEXT
3587 * libaout.h (aout_section_merge_with_text_p): New macro.
3589 2002-12-08 Alan Modra <amodra@bigpond.net.au>
3591 * bfd-in.h: Comment typo fix. Formatting.
3592 * bfd-in2.h: Regenerate.
3593 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
3594 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
3595 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
3597 2002-12-05 Richard Henderson <rth@redhat.com>
3599 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
3600 Only send PCREL21B though the plt. Fix installed reloc type.
3601 (elfNN_ia64_relocate_section): Give error for dynamic reloc
3602 against PCREL22 or PCREL64I; clean up error messages for
3605 2002-12-04 Kevin Buettner <kevinb@redhat.com>
3607 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
3609 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
3611 2002-12-04 David Mosberger <davidm@hpl.hp.com>
3613 * cpu-ia64-opc.c: Add operand constant "ar.csd".
3615 2002-12-04 H.J. Lu <hjl@gnu.org>
3617 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
3618 BFD address when constructing local name.
3620 2002-12-04 Andreas Schwab <schwab@suse.de>
3622 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
3624 (elf_m68k_link_hash_table_create): Initialize it.
3625 (elf_m68k_check_relocs): Handle symbols that are forced to be
3626 local due to visibility changes.
3627 (elf_m68k_adjust_dynamic_symbol): Likewise.
3628 (elf_m68k_size_dynamic_sections): Likewise.
3629 (elf_m68k_discard_copies): Likewise.
3630 (elf_m68k_relocate_section): Likewise.
3632 2002-12-04 Alan Modra <amodra@bigpond.net.au>
3634 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
3636 2002-12-04 Alan Modra <amodra@bigpond.net.au>
3638 * srec.c (srec_write_symbols): Restore '$' prefix to address
3639 accidentally removed in 2002-04-04 change.
3640 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
3642 2002-12-03 Nick Clifton <nickc@redhat.com>
3644 * elf32-ppc.c (apuinfo_list_init): New function.
3645 (apuinfo_list_add): New function: Add a value to the list.
3646 (apuinfo_list_length): New function: Return the number of
3648 (apuinfo_list_element): New function: Return a value on the
3650 (apuinfo_list_finish): New function: Free the resources used
3652 (ppc_elf_begin_write_processing): New function. Scan the
3653 input bfds for apuinfo sections.
3654 (ppc_elf_write_section): New function: Delay the creation of
3655 the contents of an apuinfo section in an output bfd.
3656 (ppc_elf_final_write_processing): New function. Create the
3657 contents of an apuinfo section in an output bfd.
3658 (elf_backend_begin_write_processing): Define.
3659 (elf_backend_final_write_processing): Define.
3660 (elf_backend_write_section): Define.
3662 2002-12-03 Richard Henderson <rth@redhat.com>
3664 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
3666 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
3668 Fix PR savannah/1417:
3669 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
3670 branch if it goes to the start of the deleted region.
3672 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
3674 * bfd-in2.h (bfd_mach_m6812): Rebuild.
3675 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
3676 bfd_mach_m6812s): Declare.
3678 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
3679 (_bfd_m68hc12_elf_set_private_flags): Call it.
3680 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
3681 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
3682 report microcontroller incompatibilities (HC12 vs HCS12).
3683 (elf_backend_object_p): Update.
3685 2002-11-30 Alan Modra <amodra@bigpond.net.au>
3687 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
3688 (enum bfd_boolean, boolean): Delete.
3689 (bfd_boolean): Typedef to an int.
3690 (FALSE, TRUE): Define.
3691 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
3692 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
3693 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
3694 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
3695 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
3696 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
3697 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
3698 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
3699 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
3700 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
3701 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
3702 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
3703 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
3704 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
3705 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
3706 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
3707 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
3708 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
3709 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
3710 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
3711 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
3712 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
3713 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
3714 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
3715 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
3716 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
3717 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
3718 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
3719 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
3720 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
3721 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
3722 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
3723 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
3724 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
3725 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
3726 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
3727 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
3728 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
3729 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
3730 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
3731 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
3732 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
3733 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
3734 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
3735 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
3736 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
3737 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
3738 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
3739 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
3740 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
3741 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
3742 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
3743 of bfd_boolean vars with TRUE/FALSE. Formatting.
3744 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
3746 2002-11-28 Alan Modra <amodra@bigpond.net.au>
3748 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
3749 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
3750 with Elf_Internal_Rela.
3751 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
3752 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
3753 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
3754 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
3755 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
3756 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
3757 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
3758 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
3759 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
3760 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
3761 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
3762 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
3764 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
3765 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
3766 Remove INLINE keyword.
3767 (elf_swap_reloc_in): Likewise. Also clear r_addend.
3768 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
3770 (elf_write_relocs): Consolidate REL and RELA code.
3771 (elf_slurp_reloc_table_from_section): Simplify REL code.
3772 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
3773 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
3774 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
3776 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
3777 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
3778 (elf_link_output_relocs): Likewise.
3779 (elf_reloc_link_order): Likewise.
3780 (elf_finish_pointer_linker_section): Likewise.
3781 (struct elf_link_sort_rela): Remove union.
3782 (elf_link_sort_cmp1): Update to suit.
3783 (elf_link_sort_cmp2): Here too.
3784 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
3785 over-allocation for int_rels_per_ext_rel != 1 case.
3786 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
3787 * elf32-i386.c: Likewise.
3788 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
3789 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
3790 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
3791 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
3792 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
3793 elf64-sparc.c, elf64-x86-64.c: Likewise.
3794 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
3795 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
3796 bfd_elf32_swap_reloc_in.
3798 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
3799 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
3800 (mips_elf64_swap_reloc_in): Zero r_addend.
3801 (mips_elf64_be_swap_reloc_in): Likewise.
3802 (mips_elf64_slurp_one_reloc_table): Simplify.
3804 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
3805 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
3806 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
3808 2002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3810 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
3811 unresolved debugging relocs in dynamic applications.
3812 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
3814 2002-11-26 Alan Modra <amodra@bigpond.net.au>
3816 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
3817 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
3818 on a relocatable link. Comment typos.
3819 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
3820 in the order they are declared. Clear elf_hash_value too.
3821 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
3822 eh_info and tls_segment.
3823 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
3824 sorted when discarding relocs by turning them into R_*_NONE.
3826 * libbfd.c (warn_deprecated): Comment spelling.
3827 * po/SRC-POTFILES.in: Regenerate.
3829 2002-11-21 Richard Henderson <rth@redhat.com>
3831 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
3832 arch's st_other bits when merging visibilities.
3833 (elf_link_output_extsym): Tidy clearing of visibility field.
3835 2002-11-21 Alan Modra <amodra@bigpond.net.au>
3837 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
3838 (SWAP_OUT_RELOC_OFFSET): Define.
3840 2002-11-20 Alexandre Oliva <aoliva@redhat.com>
3842 * elf.c (_bfd_elf_link_hash_table_init): Make sure
3843 can_refcount is properly extended to the type of
3846 2002-11-19 Alexandre Oliva <aoliva@redhat.com>
3848 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
3849 (_bfd_mips_elf_relocate_section): Use it.
3851 * elfxx-mips.c (MNAME): New macro.
3852 (_bfd_mips_elf_check_relocs): Use it.
3853 (_bfd_mips_elf_discard_info): Likewise.
3854 (_bfd_mips_elf_final_link): Likewise.
3856 2002-11-19 Alan Modra <amodra@bigpond.net.au>
3858 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
3859 rel_hdr.sh_size too.
3861 2002-11-18 Klee Dienes <kdienes@apple.com>
3863 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
3864 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
3865 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
3866 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
3867 Add dependencies for bfdwin.c, bfdio.c.
3868 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
3869 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
3870 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
3871 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
3872 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
3873 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
3874 bfd_get_size (moved from libbfd.c and bfd.c).
3875 * bfdwin.c New file. Contains _bfd_window_internal,
3876 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
3877 libbfd.c and bfd.c).
3878 * po/SRC-POTFILES.in: Regenerate.
3879 * po/bfd.pot: Regenerate.
3880 * libbfd.h: Regenerate.
3881 * bfd-in2.h: Regenerate.
3882 * aclocal.m4: Regenerate.
3883 * Makefile.in: Regenerate.
3884 * configure: Regenerate.
3886 2002-11-18 Klee Dienes <kdienes@apple.com>
3888 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
3890 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
3892 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
3893 jsr after a short jump.
3894 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
3896 2002-11-15 Klee Dienes <kdienes@apple.com>
3898 * pef.c (bfd_pef_convert_architecture): Move declaration of
3899 ARCH_POWERPC and ARCH_M68K to the start of the function.
3901 2002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
3903 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
3905 2002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
3907 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
3908 For bpo_gregs_section->contents, allocate _raw_size, not
3911 2002-11-13 Klee Dienes <kdienes@apple.com>
3913 * config.bfd: Add entries for powerpc-*-darwin and cousins.
3915 2002-11-13 H.J. Lu <hjl@gnu.org>
3917 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
3919 2002-11-13 Klee Dienes <kdienes@apple.com>
3920 Alan Modra <amodra@bigpond.net.au>
3922 * bfd.c (struct bfd_preserve): New.
3923 (bfd_preserve_save): New function.
3924 (bfd_preserve_restore): Ditto.
3925 (bfd_preserve_finish): Ditto.
3926 * bfd-in2.h: Regenerate.
3927 * mach-o.c: Formatting.
3928 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
3929 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
3930 (bfd_mach_o_core_p): Ditto.
3931 (bfd_mach_o_scan): Pass in mdata.
3932 * mach-o.h (bfd_mach_o_scan): Update prototype.
3933 * pef.c: Formatting.
3934 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
3935 (bfd_pef_xlib_object_p): Ditto.
3936 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
3937 * pef.h (bfd_pef_scan): Update prototype.
3938 * xsym.c: Formatting, K&R fixes.
3939 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
3940 (bfd_sym_scan): New function split out from bfd_sym_object_p.
3941 * xsym.h (bfd_sym_scan): Declare.
3942 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
3943 * elfcore.h (elf_core_file_p): Likewise.
3944 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
3946 2002-11-12 Nick Clifton <nickc@redhat.com>
3948 * po/da.po: Updated Danish translation.
3950 2002-11-12 Alan Modra <amodra@bigpond.net.au>
3952 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
3953 relocatable link too.
3954 (elf_link_input_bfd): When emitting relocs, adjust offsets for
3955 eh_frame and stab sections. Zap deleted relocs.
3956 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
3957 (elf_bfd_discard_info): Run for relocatable link too.
3958 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
3960 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
3961 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
3963 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
3964 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
3965 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
3966 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
3967 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
3968 (struct elf_link_hash_table): Add eh_info.
3969 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
3970 (_bfd_elf_discard_section_eh_frame): Update prototype.
3971 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
3972 (_bfd_elf_write_section_eh_frame): Likewise.
3973 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
3974 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
3975 param. Get "hdr_info" from link hash table.
3976 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
3977 header section from link hash table. Save header section to elf_tdata.
3978 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
3979 header section from link hash table. Don't alloc hdr_info. Clear
3980 hdr_sec instead of setting "strip".
3981 (_bfd_elf_eh_frame_section_offset): Formatting.
3982 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
3983 Get header section from link hash table.
3984 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
3985 Get header section from link hash table.
3986 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
3987 (get_program_header_size): Likewise.
3988 (_bfd_elf_section_offset): Formatting.
3989 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
3990 section pointer in link hash table.
3991 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
3992 and _bfd_elf_write_section_eh_frame calls. Update comment about
3994 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
3995 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
3997 * po/SRC-POTFILES.in: Regenerate.
3999 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
4000 relocs for discarded FDEs. Remove dead code.
4001 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
4002 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
4003 Tidy conditions under which stabs are edited. Formatting.
4004 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
4005 from discarded relocs.
4006 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
4007 section adjustments after testing magic values.
4009 2002-11-12 Thomas Moestl <tmm@FreeBSD.org>
4011 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
4012 references to large plt symbols.
4014 2002-11-12 Klee Dienes <kdienes@apple.com>
4016 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
4017 looking for an unused section name.
4019 2002-11-11 Kazu Hirata <kazu@cs.umass.edu>
4021 * coff-h8300.c: Fix formatting.
4022 * elf32-h8300.c: Likewise.
4023 * reloc16.c: Likewise.
4025 2002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
4027 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
4028 section when dynamic section unused; _bfd_strip_section_from_output
4031 2002-11-08 Alan Modra <amodra@bigpond.net.au>
4033 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
4036 * dwarf2.c: Revert last change.
4038 2002-11-07 Michal Ludvig <mludvig@suse.cz>
4040 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
4041 _bfd_dwarf2_find_nearest_line): Use
4042 bfd_simple_get_relocated_section_contents() instead of
4043 bfd_get_section_contents().
4044 * reloc.c (bfd_perform_relocation): Add sanity check.
4045 * simple.c (simple_get_relocated_section_contents): If the section
4046 does not have any relocs associated with it, just return the
4047 unadjusted contents.
4049 2002-11-07 Hans-Peter Nilsson <hp@axis.com>
4051 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
4052 case R_CRIS_32_GOT>: Correct test for filling in constant .got
4053 contents, enabling for a non-DSO, for symbols defined in the
4054 program with --export-dynamic.
4056 2002-11-07 Alan Modra <amodra@bigpond.net.au>
4058 * elf64-ppc.c: Comment typo fixes.
4059 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
4061 2002-11-07 Nick Clifton <nickc@redhat.com>
4063 * po/da.po: Updated Danish translation.
4065 2002-11-06 Alexandre Oliva <aoliva@redhat.com>
4067 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
4068 exactly three internal relocs per external reloc. Set reloc_count
4069 to the external reloc count.
4071 2002-11-06 Klee Dienes <kdienes@apple.com>
4073 * coff-stgo32.c (stub_bytes): Mark as const.
4074 Fix comment formatting.
4076 2002-11-06 Klee Dienes <kdienes@apple.com>
4078 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
4080 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
4081 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
4082 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
4083 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
4084 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
4086 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
4087 * Makefile.in: Regenerate.
4088 * doc/Makefile.in: Regenerate.
4089 * bfd-in2.h: Regenerate.
4090 * xsym.c: New file. Contains support for the Apple/Metrowerks
4091 xSYM debugging format.
4093 * pef.c: New file. Contains support for the Apple Code Fragment
4094 Manager Preferred Executable Format
4096 * pef-traceback.h: New file. Contains support for parsing PowerPC
4097 traceback tables as used by PEF executables (and perhaps other
4099 * mach-o.c: New file. Contains support for the Mach-O object file
4101 * mach-o.h: New file.
4102 * mach-o-target.c: New file. Declares the mach-o targets
4103 themselves. Included three times by mach-o.c; each time with a
4104 different set of macros set.
4106 2002-11-06 Graeme Peterson <gp@qnx.com>
4108 * Makefile.am: Remove entries for elf32-qnx.[ch].
4109 * Makefile.in: Regenerate.
4110 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
4111 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
4112 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
4113 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
4114 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
4115 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
4116 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
4117 * configure: Regenerate.
4118 * elf32-qnx.c: Remove.
4119 * elf32-qnx.h: Remove.
4120 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
4121 is_contained_by_filepos, and copy_private_bfd_data_p.
4122 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
4123 is_contained_by_filepos, and copy_private_bfd_data_p.
4124 * elf32-i386.c: Remove QNX extended bfd support.
4125 * elf32-ppc.c: Remove QNX extended bfd support.
4126 * elf32-sh.c: Remove QNX extended bfd support.
4127 * elfarm-nabi.c: Remove QNX extended bfd support.
4128 * targets.c: Remove qnx vectors.
4129 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
4130 (elf_backend_is_contained_by_filepos): Remove.
4131 (elf_backend_copy_private_bfd_data_p): Remove.
4132 * po/SRC-POTFILES.in: Regenerate.
4134 2002-11-06 David O'Brien <obrien@FreeBSD.org>
4135 Alan Modra <amodra@bigpond.net.au>
4137 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
4138 dynamic relocs against section symbols for the output section vma.
4140 2002-11-05 Alan Modra <amodra@bigpond.net.au>
4142 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
4143 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
4145 2002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4146 Alan Modra <amodra@bigpond.net.au>
4148 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
4149 vectors in target_selvecs.
4150 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
4152 (sh-*-netbsdelf*): Likewise.
4153 * configure.in (assocvecs): New variable. Handle assocvecs like
4155 * configure: Regenerate.
4156 * format.c (bfd_check_format_matches): Store bfd_target pointers
4157 in matching_vector instead of target names. Select first target
4158 from bfd_associated_vector that matches a list of ambiguous targets.
4159 * targets.c (_bfd_associated_vector): New array.
4160 (bfd_associated_vector): New variable.
4161 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
4162 * libbfd-in.h (bfd_associated_vector): Declare.
4163 * libbfd.h: Regenerate.
4165 2002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
4167 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
4168 non-NULL before dereferencing.
4170 2002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4172 * vms.c (vms_object_p): Restore the start address when returning
4175 2002-11-04 Alan Modra <amodra@bigpond.net.au>
4176 Hans-Peter Nilsson <hp@axis.com>
4178 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
4179 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
4180 Set up a larger symshndxbuf, and write it out. Free it on
4181 exit rather than freeing symbuf twice. Correct section index
4182 on output section symbol loop.
4183 (elf_link_output_sym): Accumulate symbol extension section
4184 indices, reallocating symshndxbuf rather than writing it out.
4185 (elf_link_flush_output_syms): Don't flush symshndxbuf.
4186 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
4187 Use bfd_zalloc to clear i_shdrp[0] too.
4189 2002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
4191 * elf32-sh64-com.c (sh64_address_in_cranges): Use
4192 _raw_size of cranges section if _cooked_size not yet set.
4194 2002-11-03 Hans-Peter Nilsson <hp@axis.com>
4196 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
4197 for bfd_elf32_swap_symbol_out.
4199 2002-10-31 David O'Brien <obrien@FreeBSD.org>
4201 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
4202 signed and unsigned in comparison.
4204 2002-10-30 Daniel Jacobowitz <drow@mvista.com>
4206 * coffcode.h: Remove extraneous '\'.
4208 2002-10-28 H.J. Lu <hjl@gnu.org>
4210 * Makefile.am (targets.lo): Depend on Makefile instead of
4212 (archures.lo): Likewise.
4213 * Makefile.in: Regenerated.
4215 2002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
4217 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
4218 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
4221 2002-10-25 Jim Wilson <wilson@redhat.com>
4223 * elf64-sh64.c (sh_elf64_relocate_section): Call
4224 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
4225 of SHF_MERGE section.
4227 2002-10-25 Hans-Peter Nilsson <hp@axis.com>
4229 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
4231 2002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
4233 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
4234 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
4236 (NAME(aout,final_link)): Cast enum used in assignment.
4237 (aout_link_write_symbols): Cast enums in comparisons, int values to
4238 boolean, enums in assignments to int.
4239 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
4240 (aout_link_input_section_ext): Likewise. Cast enums used in
4241 comparisons with unsigned ints.
4242 (aout_link_reloc_link_order): Cast enum to int in assignment.
4243 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
4245 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
4247 * bfd-in2.h (bfd_set_section_vma): Likewise.
4248 * bfd.c (bfd_record_phdr): Cast enums in assignments.
4249 * binary.c (bfd_alloc): Cast enum to long.
4250 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
4251 * dwarf2.c (read_abbrevs): Add casts to enum types.
4252 (read_attribute_value): Likewise.
4253 (arange_add): Cast result of bfd_zalloc call.
4254 (comp_unit_contains_address): Return true and false.
4255 (comp_unit_find_nearest_line): Cast return to boolean.
4256 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
4257 * gen-aout.c: define macro '_' if not defined.
4258 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
4259 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
4260 (bfd_write_bigendian_4byte_int): Cast return to boolean.
4261 (bfd_seek): Cast bfd_realloc to bfd_byte *.
4262 (bfd_generic_is_local_label_name): Cast return to boolean.
4263 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
4264 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
4265 struct bfd_hash_entry *.
4266 (_bfd_generic_link_hash_newfunc): likewise.
4267 (_bfd_generic_final_link): Cast enum to unsigned int.
4268 * merge.c (sec_merge_emit): Cast return to boolean.
4269 (merge_strings): Add casts to const unsigned char *.
4270 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
4271 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
4272 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
4273 to struct bfd_hash_entry *.
4274 (bfd_set_section_content): Add cast to PTR in comparison.
4275 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
4276 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
4277 simple_dummy_unattached_reloc,
4278 bfd_simple_get_relocated_section_contents): Add K&R declarations and
4279 function definitions.
4280 * srec.c (S3Forced): Initialize to false.
4281 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
4282 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
4283 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
4284 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
4285 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
4288 2002-10-23 Jakub Jelinek <jakub@redhat.com>
4290 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
4291 relocs into shared lib non-allocated reloc sections.
4293 2002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
4295 * dwarf2.c (add_line_info): Ensure that the line_info_table is
4296 sorted even when given an out-of-order line sequence.
4297 (lookup_address_in_line_info_table): When an exact VMA match is
4298 not found, return line information with the closest VMA.
4300 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
4302 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
4303 HPUX 11.00 patch PHSS_26559.
4305 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
4307 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
4308 the options section into a separate section unless IRIX 6
4309 compatibility is enabled.
4311 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
4313 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
4315 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
4316 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
4318 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
4319 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
4321 2002-10-21 Graeme Peterson <gp@qnx.com>
4323 * targets.c (_bfd_target_vector): Add missing qnx vectors.
4325 2002-10-21 Alan Modra <amodra@bigpond.net.au>
4327 * targets.c (bfd_target_list): Don't return the default target twice.
4329 2002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
4331 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
4332 perror with bfd_perror.
4334 2002-10-19 H.J. Lu <hjl@gnu.org>
4336 * elflink.h (elf_link_add_object_symbols): Correctly handle
4337 DT_RPATH and DT_RUNPATH.
4339 2002-10-19 Mark Kettenis <kettenis@gnu.org>
4341 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
4343 2002-10-17 Denis Chertykov <denisc@overta.ru>
4345 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
4348 2002-10-17 Alan Modra <amodra@bigpond.net.au>
4350 * elfxx-target.h (USE_REL): Don't define as 1.
4351 * elf32-arm.h (USE_REL): Provide a default define of 0.
4352 Use #if rather than #ifdef when testing USE_REL.
4353 * elf32-m32r.c: Likewise.
4355 * elf32-arc.c (USE_REL): Define as 1.
4356 * elf32-d10v.c (USE_REL): Likewise.
4357 * elf32-m32r.c (USE_REL): Likewise.
4358 * elf32-m68hc11.c (USE_REL): Likewise.
4359 * elf32-m68hc12.c (USE_REL): Likewise.
4360 * elf32-or32.c (USE_REL): Likewise.
4361 * elfarm-nabi.c (USE_REL): Likewise.
4363 2002-10-16 Jakub Jelinek <jakub@redhat.com>
4365 * config.bfd (s390-*-linux*): Add targ64_selvecs.
4366 (s390x-*-linux*): Add targ_selvecs.
4368 2002-10-16 Alan Modra <amodra@bigpond.net.au>
4370 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
4371 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
4372 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
4373 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
4374 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
4375 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
4376 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
4377 (SOURCE_HFILES): Add elf32-qnx.h.
4378 (BUILD_HFILES): Add bfdver.h.
4380 * Makefile.in: Regenerate.
4381 * configure.in Update bfd vector dependencies.
4382 * configure: Regenerate.
4383 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
4384 * elf32-i386qnx.c: Likewise.
4385 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
4386 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
4387 * elf32-sh-lin.c: Likewise.
4388 * elf32-shqnx.c: Likewise.
4389 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
4390 * elf32-sh64-nbsd.c: Likewise.
4391 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
4392 * elf64-sh64-nbsd.c: Likewise.
4393 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
4394 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
4395 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
4396 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
4397 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
4398 (elf_backend_is_contained_by_filepos): Likewise.
4399 (elf_backend_copy_private_bfd_data_p): Likewise.
4400 Globalize and move functions to..
4401 * elf32-qnx.c: ..here. New file.
4402 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
4403 emit target vectors when INCLUDE_SHMEDIA.
4404 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
4406 * elf64-sh64.c: Remove ELF_ARCH test.
4407 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
4408 * po/BLD-POTFILES.in: Regenerate.
4409 * po/SRC-POTFILES.in: Regenerate.
4411 2002-10-16 Alan Modra <amodra@bigpond.net.au>
4413 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
4414 loaded with --just-symbols.
4416 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
4417 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
4418 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
4419 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
4421 2002-10-15 Richard Henderson <rth@redhat.com>
4423 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
4424 (BFD64_BACKENDS_CFILES): Likewise.
4425 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
4426 * elf64-alpha-fbsd.c: Remove file, move code ...
4427 * elf64-alpha.c: ... here.
4428 * Makefile.in, configure: Rebuild.
4430 2002-10-14 Richard Henderson <rth@redhat.com>
4432 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
4435 2002-10-14 Stephen Clarke <stephen.clarke@superh.com>
4437 * elf32-sh.c (elf_sh_link_hash_entry): Replace
4438 datalabel_got_offset with union of datalabel_got
4439 offset and refcount.
4440 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
4441 (allocate_dynrelocs): Delete unnecessary code for
4442 STT_DATALABEL type. Create entry in got for
4443 datalabel version of symbol if datalabel_got.refcount > 0.
4444 (sh_elf_relocate_section): Use datalabel_got union.
4445 (sh_elf_gc_sweep_hook): Pull common code to initialize
4446 h and eh out of switch statement. Declare seen_stt_datalabel.
4447 Initialize it. Decrement datalabel_got.refcount for
4448 got relocs when seen_stt_datalabel is true.
4449 Decrement local_got_refcounts entry for datalabel got relocs
4451 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
4452 (sh_elf_check_relocs): Declare seen_stt_datalabel.
4453 Initialize it. When seen_stt_datalabel is true, increment
4454 datalabel_got refcount rather than got.refcount.
4455 (sh_elf_finish_dynamic_symbol): Create relocs to
4456 initialize got entry for datalabel version of symbol.
4458 2002-10-14 Alan Modra <amodra@bigpond.net.au>
4460 * Makefile.am: Run "make dep-am".
4461 (BFD_H_FILES): Remove version.h.
4462 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
4463 * version.h: ..to here.
4464 * configure.in (bfd_version_date): Remove.
4465 (AC_OUTPUT): Make bfdver.h from version.h.
4466 * bfd.c: #include "bfdver.h".
4467 * vms-hdr.c: Likewise.
4468 * Makefile.in: Regenerate.
4469 * bfd-in2.h: Regenerate.
4470 * configure: Regenerate.
4471 * po/SRC-POTFILES.in: Regenerate.
4473 2002-10-14 Alan Modra <amodra@bigpond.net.au>
4475 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
4476 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
4477 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
4478 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
4479 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
4480 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
4481 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
4482 bfd_mach_ip2022, bfd_mach_ip2022ext,
4483 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
4484 * bfd-in2.h: Regenerate.
4486 2002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4488 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
4489 endian vector to targ_selvecs.
4491 2002-10-13 Alexandre Oliva <aoliva@redhat.com>
4493 * elfxx-mips.c (mips_elf_calculate_relocation): Take
4494 save_addend argument. Don't apply the 32-bit mask to a
4495 GPREL32 value if it's to be used in another relocation. Don't
4496 use forced-check computation of local_p to decide whether to
4497 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
4498 of the addend of a non-in-place GPREL16 relocation.
4499 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
4500 mips_elf_calculate_relocation().
4502 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
4504 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
4505 with symbols in other sections if we relaxed something; the sections
4506 output offsets must be re-computed before.
4508 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
4510 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
4511 handling to use Elf_Internal_Sym.
4512 (m68hc11_elf_relax_delete_bytes): Likewise.
4514 2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4516 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
4517 sh_elf_object_p, dtpoff_base): New functions.
4518 (sh_elf_howto_table): Add TLS relocs.
4519 (sh_reloc_map): Likewise.
4520 (sh_elf_info_to_howto): Support TLS relocs.
4521 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
4522 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
4524 (sh_elf_obj_tdata): New.
4525 (elf_sh_link_hash_table): Add tls_ldm_got.
4526 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
4527 (allocate_dynrelocs): Support TLS relocs.
4528 (sh_elf_size_dynamic_sections): Likewise.
4529 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
4530 .rela.got section when found already. Return false after printing
4531 error about unresolvable relocation.
4532 (sh_elf_gc_sweep_hook): Support TLS relocs.
4533 (sh_elf_check_relocs): Likewise.
4534 (sh_elf_finish_dynamic_symbol): Likewise.
4535 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
4536 * reloc.c: Add SH TLS relocs.
4537 * bfd-in2.h, libbfd.h: Regenerate.
4539 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
4541 * Makefile.in: Regenerated.
4543 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
4545 * Makefile.am: Run dep-am.
4546 (BFD_H_DEP): Add simple.c and linker.c.
4547 (BFD32_LIBS): Add simple.lo.
4548 (BFD32_LIBS_CFILES): Add simple.c.
4549 * Makefile.in: Regenerated.
4550 * bfd-in2.h: Regenerated.
4551 * simple.c: New file.
4553 2002-10-11 Alan Modra <amodra@bigpond.net.au>
4555 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
4556 (record_thumb_to_arm_glue): Likewise.
4557 * ecoff.c (ecoff_link_add_externals): Likewise.
4558 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
4559 (record_thumb_to_arm_glue): Likewise.
4560 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
4561 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
4562 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
4563 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
4564 * elf64-ppc.c (func_desc_adjust): Likewise.
4565 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
4566 (sh64_elf64_create_dynamic_sections): Likewise.
4567 * elflink.c (_bfd_elf_create_got_section): Likewise.
4568 (_bfd_elf_create_dynamic_sections): Likewise.
4569 (_bfd_elf_create_linker_section): Likewise.
4570 * elflink.h (elf_add_default_symbol): Likewise.
4571 (elf_link_create_dynamic_sections): Likewise.
4572 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
4573 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
4574 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
4575 (_bfd_mips_elf_add_symbol_hook): Likewise.
4576 (_bfd_mips_elf_create_dynamic_sections): Likewise.
4577 * linker.c (generic_link_add_symbol_list): Likewise.
4578 * xcofflink.c (xcoff_link_add_symbols): Likewise.
4580 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
4582 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
4583 completely removed. Correct local sym adjustment.
4585 2002-10-10 Stephen Clarke <stephen.clarke@superh.com>
4587 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
4588 Correct mistake in calculation of address of .got.
4589 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
4590 elf_sh64_pic_plt_entry_le): Likewise.
4592 2002-10-09 Richard Shann <richard.shann@superh.com>
4593 Stephen Clarke <stephen.clarke@superh.com>
4595 * Makefile.am: Add entries for elf32-sh64-lin.c and
4596 elf64-sh64-lin.c. Regenerate.
4597 * Makefile.in: Regenerate.
4598 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
4599 to use sh64 vectors rather than sh vectors.
4600 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
4601 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
4602 * configure: Regenerate.
4603 * elf32-sh64-lin.c: New file.
4604 * elf64-sh64-lin.c: New file.
4605 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
4606 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
4608 2002-10-08 H.J. Lu <hjl@gnu.org>
4610 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
4611 IE->LE transition for R_386_TLS_IE.
4613 2002-10-08 Alan Modra <amodra@bigpond.net.au>
4615 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
4617 2002-10-07 Mark Elbrecht <snowball3@softhome.net>
4619 * cofflink.c (mark_relocs): Don't mark relocations in excluded
4622 2002-10-07 Alan Modra <amodra@bigpond.net.au>
4624 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
4627 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
4629 2002-10-06 Alan Modra <amodra@bigpond.net.au>
4631 * opncls.c: Formatting.
4632 (_bfd_new_bfd): Use a smaller section hash table.
4634 2002-10-05 Alexandre Oliva <aoliva@redhat.com>
4636 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
4637 of the other two relocations packed with a REL32 to NONE.
4639 2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
4641 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
4642 (sh_elf_link_hash_newfunc): Initialize it.
4643 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
4644 to got.refcount for symbols that are forced local or when
4645 we have direct got refs.
4646 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
4647 to correctly adjust got.refcount and plt.refcount.
4648 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
4649 (sh_elf_check_relocs): Increment gotplt_refcount.
4651 2002-10-01 Jakub Jelinek <jakub@redhat.com>
4653 * elf32-i386.c (elf_i386_relocate_section): Fix
4654 movl foo@indntpoff, %eax IE->LE transition.
4656 2002-10-01 Jakub Jelinek <jakub@redhat.com>
4658 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
4659 sequence and its transitions.
4661 2002-10-01 Jakub Jelinek <jakub@redhat.com>
4663 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
4664 to st_value + addend in non-code sections.
4665 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
4666 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
4668 2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
4669 Ken Raeburn <raeburn@cygnus.com>
4670 Aldy Hernandez <aldyh@redhat.com>
4671 Eric Christopher <echristo@redhat.com>
4672 Richard Sandiford <rsandifo@redhat.com>
4674 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
4675 (bfd_mach_mips5500): New.
4676 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
4677 (arch_info_struct): Add corresponding entries here.
4678 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
4679 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
4680 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
4681 bfd_mach_mips5400 and bfd_mach_mips5500.
4682 (_bfd_mips_elf_mach_extends_p): New function.
4683 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
4684 the EF_MIPS_MACH flags.
4685 * bfd-in2.h: Regenerate.
4687 2002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
4689 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
4692 2002-09-28 Alan Modra <amodra@bigpond.net.au>
4694 * elf.c (map_sections_to_segments): Correct test for start of
4695 writable section in the same page as end of read-only section.
4697 2002-09-27 Matt Thomas <matt@3am-software.com>
4699 * elf32-vax.c (elf_vax_check_relocs): Remove unused
4700 local_got_refcounts usage. Remove allocation of got slot.
4701 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
4702 Remove de-allocation of got slot.
4703 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
4704 traversal for elf_vax_instantiate_got_entries. Allow empty .got
4705 sections to be GC'ed.
4706 (elf_vax_instantiate_got_entries): New function.
4707 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
4708 tests that are now handled by elf_vax_instantiate_got_entries.
4709 Assert GOT entry falls within .got section size. Remove redundant
4710 comparisions. Fix comments.
4712 2002-09-27 Jakub Jelinek <jakub@redhat.com>
4714 * reloc.c: Add x86-64 TLS relocs.
4715 * bfd-in2.h, libbfd.h: Rebuilt.
4716 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
4717 relocs. Add TLS relocs.
4718 (x86_64_reloc_map): Add TLS relocs.
4719 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
4720 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
4721 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
4722 (elf64_x86_64_hash_entry): Define.
4723 (struct elf64_x86_64_obj_tdata): New.
4724 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
4725 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
4726 (link_hash_newfunc): Initialize tls_type.
4727 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
4728 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
4729 (elf64_x86_64_mkobject): New.
4730 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
4731 (elf64_x86_64_tls_transition): New.
4732 (elf64_x86_64_check_relocs): Add r_type variable and use it.
4734 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
4735 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
4736 (elf64_x86_64_size_dynamic_sections): Likewise.
4737 (dtpoff_base, tpoff): New.
4738 (elf64_x86_64_relocate_section): Handle TLS relocs.
4739 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
4741 (bfd_elf64_mkobject): Define.
4743 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
4744 DF_STATIC_TLS if shared.
4746 2002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4748 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
4749 empty relocation sections.
4751 2002-09-26 Alan Modra <amodra@bigpond.net.au>
4753 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
4754 (ppc64_elf_build_stubs): Build them here instead.
4756 2002-09-24 Jakub Jelinek <jakub@redhat.com>
4758 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
4759 addend into r_addend, not *r_offset.
4760 (elf32_sparc_finish_dynamic_symbol): Likewise.
4761 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
4762 R_SPARC_RELATIVE's r_offset.
4764 2002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
4766 * dwarf2.c (decode_line_info): Update to correctly decode
4767 the (non-standard DWARF2) out-of-order address sequences
4768 generated by the Intel C++ 6.0 compiler for ia64-Linux.
4770 2002-09-23 Mark Elbrecht <snowball3@softhome.net>
4772 * config.bfd: For DJGPP targets, match with any cpu and any machine.
4774 2002-09-23 Alan Modra <amodra@bigpond.net.au>
4776 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
4777 for discarded FDEs. Remove redundant assignment.
4778 * elflink.h (elf_bfd_discard_info): Save edited relocs.
4780 2002-09-22 H.J. Lu <hjl@gnu.org>
4782 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
4783 the relocation count between different .reloc sections.
4785 2002-09-21 Alan Modra <amodra@bigpond.net.au>
4787 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
4788 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
4789 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
4792 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
4793 unsigned. Move "symcount" assignment out of loop.
4794 * Makefile.am: Run "make dep-am".
4795 * Makefile.in: Regenerate.
4796 * configure: Regenerate.
4797 * po/SRC-POTFILES.in: Regnerate.
4799 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
4801 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
4802 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
4805 2002-09-19 Jakub Jelinek <jakub@redhat.com>
4807 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
4808 even if generating R_PPC_RELATIVE reloc.
4809 (ppc_elf_relocate_section): Make sure relocation is performed
4810 if skip == -2. Clear memory at r_offset when creating dynamic
4813 2002-09-19 Jakub Jelinek <jakub@redhat.com>
4815 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
4816 BFD_RELOC_386_TLS_GOTIE): Add.
4817 * bfd-in2.h, libbfd.h: Rebuilt.
4818 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
4819 and R_386_TLS_GOTIE.
4820 (elf_i386_reloc_type_lookup): Handle it.
4821 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
4822 char instead of enum, change GOT_* into defines.
4823 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
4824 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
4825 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
4826 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
4827 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
4828 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
4829 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
4830 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
4831 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
4832 tls_type is GOT_TLS_IE_BOTH.
4833 (elf_i386_size_dynamic_sections): Likewise.
4834 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
4835 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
4836 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
4837 all 4 GOT_TLS_* TLS types.
4839 2002-09-19 Nick Clifton <nickc@redhat.com>
4841 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
4842 follow indirect links.
4844 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
4846 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
4847 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
4849 (ecoff_swap_sym_in) <iss>: Likewise.
4850 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
4851 ECOFF information: 'ioptMax' refers to the actual *size*
4852 of the optimization symtab, not the number of entries.
4854 2002-09-19 Daniel Jacobowitz <drow@mvista.com>
4856 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
4857 ELF_LINK_HASH_NEEDS_PLT logic.
4859 2002-09-18 Daniel Jacobowitz <drow@mvista.com>
4861 * elfcode.h (elf_slurp_reloc_table_from_section): Check
4862 correct relocation count.
4864 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
4866 * bfd-in.h (bfd_get_dynamic_symcount): Define.
4867 * bfd.c (struct _bfd): Add dynsymcount.
4868 * bfd-in2.h: Regenerated.
4869 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
4871 * elfcode.h (elf_slurp_reloc_table_from_section): Check
4874 2002-09-17 Stan Cox <scox@redhat.com>
4876 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
4877 (mips_elf64_final_gp): Don't make up gp value.
4878 * elfn32-mips.c (mips_elf_final_gp): Likewise.
4879 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
4880 .MIPS.options/.options section.
4882 2002-09-17 David O'Brien <obrien@FreeBSD.org>
4884 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
4885 It is benign for FreeBSD < 4.1. Minor reformatting.
4886 * elf64-alpha-fbsd.c: Likewise.
4888 2002-09-17 Jakub Jelinek <jakub@redhat.com>
4890 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
4893 2002-09-17 Alan Modra <amodra@bigpond.net.au>
4895 * elf64-alpha.c (alpha_elf_size_info): Make static.
4897 2002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
4899 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
4900 * cpu-tic4x.c: Ditto.
4902 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4904 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
4907 2002-09-16 Bruno Haible <bruno@clisp.org>
4909 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
4910 by a target variant implementation.
4911 * elf64-alpha.c: Likewise.
4912 * elf32-i386-fbsd.c: New file.
4913 * elf64-alpha-fbsd.c: New file.
4914 * targets.c: Support bfd_elf32_i386_freebsd_vec and
4915 bfd_elf64_alpha_freebsd_vec.
4916 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
4917 bfd_elf64_alpha_freebsd_vec.
4918 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
4919 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
4920 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
4921 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
4922 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
4923 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
4924 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
4926 2002-09-12 Jakub Jelinek <jakub@redhat.com>
4928 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
4930 (elf_i386_relocate_section): Return false after printing error about
4931 unresolvable relocation.
4933 2002-09-12 Nick Clifton <nickc@redhat.com>
4935 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
4938 2002-09-11 Jeffrey Law <law@redhat.com>
4940 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
4942 2002-09-11 Andrew Haley <aph@cambridge.redhat.com>
4944 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
4945 line_ptr before deciding we've found a symbol.
4947 2002-09-11 Nick Clifton <nickc@redhat.com>
4949 * po/da.po: New Danish translation file.
4950 * configure.in (LINGUAS): Add 'da'.
4951 * configure: Regenerate.
4953 2002-09-10 Michael Snyder <msnyder@redhat.com>
4955 * irix-core.c (do_sections, do_sections64): New functions.
4956 (irix_core_core_file_p): Call new functions do_sections,
4957 do_sections64, depending on corefile (32-bit or 64-bit).
4959 2002-09-09 Richard Henderson <rth@redhat.com>
4961 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
4962 and PCREL21F like PCREL21B.
4964 2002-09-04 Kevin Buettner <kevinb@redhat.com>
4966 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
4969 2002-09-02 Nick Clifton <nickc@redhat.com>
4971 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
4972 names instead of cryptically overloaded bfd_reloc error
4974 (v850_elf_relocate_section): Likewise.
4975 (v850_elf_relax_section): Replace caching of external symbols
4976 with caching of internal symbols obtained from calling
4977 bfd_elf_get_elf_syms().
4978 Fixup problems with freeing cached allocated memory blocks.
4980 2002-09-02 Alan Modra <amodra@bigpond.net.au>
4982 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
4983 (bfd_pj_arch): Use bfd_default_scan.
4984 * cpu-v850.c (scan): Remove.
4985 (N): Use bfd_default_scan.
4986 * cpu-z8k.c (scan_mach): Remove.
4987 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
4988 first. Use bfd_default_scan.
4990 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
4992 (ecoff_get_magic): Likewise.
4993 * elf32-v850.c (v850_elf_object_p): Likewise.
4994 (v850_elf_final_write_processing): Likewise.
4995 * mipsbsd.c (MY(set_arch_mach)): Likewise.
4996 (MY(write_object_contents)): Likewise.
4997 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
4998 * coffcode.h (coff_write_object_contents): Likewise.
4999 (coff_set_arch_mach_hook): Add comment describing machine == 0.
5000 Remove unnecessary "machine" assignments.
5001 (coff_write_relocs): Test for the absolute section sym by testing
5004 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
5005 and bfd_mach_i386_i386_intel_syntax.
5006 * pdp11.c (NAME(aout,machine_type)): Likewise.
5008 2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
5010 * bfd-in.h (align_power): Cast constants to bfd_vma type.
5011 * bfd-in2.h (align_power): Likewise.
5013 2002-08-30 Alan Modra <amodra@bigpond.net.au>
5015 * Makefile.am: Run "make dep-am".
5016 * Makefile.in: Regenerate.
5018 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
5019 * cpu-powerpc.c (powerpc_compatible): Likewise.
5020 * cpu-rs6000.c (rs6000_compatible): Likewise.
5022 2002-08-28 Catherine Moore <clm@redhat.com>
5024 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
5025 (v850-elf-reloc): Don't resolve pc relative relocs.
5026 (v850_elf_ignore_reloc): New routine.
5027 (v850_elf_final_link_relocate): Handle new relocs.
5028 (v850_elf_relax_delete_bytes ): New routine.
5029 (v850_elf_relax_section): New routine.
5030 (bfd_elf32_bfd_relax_section): Define.
5031 (HOWTO): New entries for new relocs.
5032 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
5033 (BFD_RELOC_V850_LONGJUMP): New reloc.
5034 (BFD_RELOC_V850_ALIGN): New reloc.
5035 * archures.c: Remove redundant v850ea architecture.
5036 * cpu-v850.c: Remove redundant v850ea support.
5037 * libbfd.h: Regenerate.
5038 * bfd-in2.h: Regenerated.
5040 2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
5042 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
5043 * configure.in: Add tic4x_coff vector files.
5044 * configure: Regenerate.
5045 * Makefile.am: Add tic4x target.
5046 * Makefile.in: Regenerate.
5048 2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
5050 * archures.c: Add the BFD arch type tic4x.
5051 * bfd-in.h: Add BFD_IN_MEMORY flag.
5052 * coff-tic4x.c: New file.
5053 * coffswap.h (coff_swap_sym_out): Add preadjuster.
5054 * cpu-tic4x.c: New file.
5055 * targets.c: Added tic4x- in list of xvecs.
5056 * ticoff.h: New file.
5057 * bfd-in2.h: Regenerate.
5059 2002-08-27 Adam Nemet <anemet@lnxw.com>
5061 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
5062 bit of DT_INIT and DT_FINI for Thumb functions.
5064 2002-08-26 Alan Modra <amodra@bigpond.net.au>
5066 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
5068 2002-08-26 Alan Modra <amodra@bigpond.net.au>
5070 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
5072 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5074 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
5075 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
5077 (struct elf_sh_pcrel_relocs_copied): Removed.
5078 (struct elf_sh_dyn_relocs): New.
5079 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
5080 field with dyn_relocs.
5081 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
5082 sections and sym_sec.
5083 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
5084 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
5085 (sh_elf_create_dynamic_sections): Use create_got_section instead
5086 of _bfd_elf_create_got_section.
5087 (sh_elf_check_relocs): Likewise.
5088 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
5090 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
5091 sh_elf_relocate_section, sh_elf_check_relocs,
5092 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
5094 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
5095 dynamic relocations and avoiding the copy relocation when we
5096 didn't find any dynamic relocations in the section which has
5097 contents or is read-only.
5098 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
5099 (sh_elf_size_dynamic_sections): Don't reset the size of
5100 .rela.got section even if dynamic_sections_created flag is off.
5101 Don't use sh_elf_discard_copies. Scan all input bfd and use
5102 allocate_dynrelocs. Call readonly_dynrelocs to determine
5103 whether we need DT_TEXTREL.
5104 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
5105 whether the symbol was never referred to.
5106 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
5107 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
5108 (sh_elf_check_relocs): Call create_got_section if the short-cut
5109 to .got is null. Increment reference counters only instead of
5110 allocating space on dynamic sections here. Don't conditionalize
5111 uninitialized got.offset value when marking the symbol as a
5112 global offset table entry. Keep relocations for symbols satisfied
5113 by a dynamic library to avoid copy relocations for the symbol.
5114 Set dynobj field of an elf hash table if needed.
5115 (sh_elf_finish_dynamic_sections): Handle null section pointer
5117 (elf_backend_copy_indirect_symbol): Defined.
5118 (elf_backend_can_refcount): Defined.
5120 2002-08-23 Nick Clifton <nickc@redhat.com>
5122 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
5123 previous change. Add comment explaining why.
5125 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
5127 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
5128 contents of .got.plt[2] to tr0, not address of .got.plt.
5129 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
5130 patching absolute plt entry. For shmedia plt entry, set bottom bit
5131 of branch to plt0 as this is a branch to an shmedia instruction.
5132 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
5133 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
5134 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
5136 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
5137 patching absolute plt entry. For shmedia plt entry, branch to
5138 plt0 is now ptrel, so use relative offset. Set bottom bit of
5139 branch target as it is a branch to an shmedia instruction.
5141 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
5142 Richard Shann <richard.shann@superh.com>
5144 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
5145 value if .init is an SHmedia function. Similarly for DT_FINI.
5146 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
5148 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
5150 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
5152 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
5154 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5156 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
5157 byte read when reading the return address register column.
5159 2002-08-22 Nick Clifton <nickc@redhat.com>
5161 * config.bfd: Add powepc64-*-*bsd* target.
5163 2002-08-22 Graeme Peterson <gp@qnx.com>
5165 * Makefile.am: Add entries for elf32-shqnx.c
5166 * Makefile.in: Regenerate.
5167 * config.bfd: Add support sh-*-nto* target.
5168 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
5169 * configure: Regenerate.
5170 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
5171 * elf32-sh.c: Do not include elf32-target.h if
5172 ELF32_SH_C_INCLUDED is defined.
5173 * elf32-shqnx.c: New file: Support for QNX.
5174 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
5176 2002-08-22 Nick Clifton <nickc@redhat.com>
5178 * po/tr.po: Updated Turkish translation.
5180 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
5181 symbols are not read.
5183 2002-08-22 Alan Modra <amodra@bigpond.net.au>
5185 * elf32-m68hc11.c: Formatting fixes.
5186 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
5187 * elf32-m68hc12.c: Formatting fixes.
5188 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
5190 2002-08-22 Alan Modra <amodra@bigpond.net.au>
5192 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
5194 (pmac_xcoff_vec): Likewise.
5195 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
5196 (aix5coff64_vec): Likewise.
5198 2002-08-22 Alan Modra <amodra@bigpond.net.au>
5200 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
5201 param to elf_backend_copy_indirect_symbol.
5202 (_bfd_elf_link_hash_copy_indirect): Likewise.
5203 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
5204 calls to copy_indirect_symbol.
5205 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
5206 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
5207 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
5208 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
5209 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
5210 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
5211 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
5212 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
5213 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
5214 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
5215 test refcounts for "used" values.
5217 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
5219 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
5220 argument declaration.
5222 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
5224 * archures.c (bfd_mach_ppc_e500): Added.
5225 * bfd-in2.h: Rebuilt.
5226 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
5228 2002-08-19 Alan Modra <amodra@bigpond.net.au>
5230 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
5232 2002-08-17 Andrew Cagney <ac131313@redhat.com>
5234 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
5237 2002-08-17 Stan Cox <scox@redhat.com>
5239 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
5240 IRIX 6 segment layout for NEWABI.
5242 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
5244 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
5245 symbols when looking for section referred to by a relocation.
5246 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
5248 2002-08-15 Alan Modra <amodra@bigpond.net.au>
5250 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
5252 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
5254 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
5255 missing check for whether the symbol is referenced by DSO before
5256 unexporting it as an unneeded dynamic symbol.
5258 2002-08-14 H.J. Lu <hjl@gnu.org>
5260 * libbfd.h: Regenerate.
5262 2002-08-14 H.J. Lu <hjl@gnu.org>
5264 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
5266 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
5268 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
5270 (m68hc11_direct_relax): New to define table of relaxable instructions.
5271 (find_relaxable_insn): New, find a relaxable insn.
5272 (compare_reloc): New to compare two relocs.
5273 (m68hc11_elf_relax_section): New, relax text sections.
5274 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
5275 (elf32_m68hc11_check_relocs): New function for GC support.
5276 (elf32_m68hc11_relocate_section): New function for GC support.
5277 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
5278 (elf_backend_check_relocs): Likewise.
5279 (elf_backend_relocate_section): Likewise.
5281 2002-08-13 H.J. Lu <hjl@gnu.org>
5283 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
5284 definitions in shared objects when checking symbol with
5287 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5289 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
5290 (elf32_m68hc11_gc_sweep_hook): Likewise.
5291 (elf_backend_gc_mark_hook): Define for GC section support.
5292 (elf_backend_gc_sweep_hook): Likewise.
5293 (elf_backend_can_gc_sections): Likewise.
5295 * elf32-m68hc12.c: Likewise.
5297 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5299 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
5300 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
5301 (_bfd_m68hc11_elf_set_private_flags): New function.
5302 Use them to set/check/print ELF flags specific to 68HC11.
5304 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
5305 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
5306 (_bfd_m68hc12_elf_set_private_flags): New function.
5307 Use them to set/check/print ELF flags specific to 68HC12.
5309 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5311 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
5312 fix masks for PC-rel relocs.
5313 (m68hc11_elf_ignore_reloc): New function.
5315 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
5316 68HC12 banked addressing relocs.
5317 (m68hc12_phys_addr): New to compute physical address of banked memory.
5318 (m68hc12_phys_page): Likewise for page.
5319 (m68hc12_addr_is_banked): New to see if address is in banked area.
5320 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
5322 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5324 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
5325 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
5326 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
5327 * bfd-in2.h: Regenerate.
5329 2002-08-12 H.J. Lu <hjl@gnu.org>
5331 * elflink.h (elf_add_default_symbol): Preserve section across
5334 2002-08-09 Graeme Peterson <gp@qnx.com>
5336 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
5337 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
5338 * Makefile.in: Regenerate.
5339 * config.bfd: Add support for powerpc{le}-*-nto targets.
5340 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
5341 * configure: Regenerate.
5342 * elf32-i386qnx.c: Moved backend functions into a QNX specific
5343 common file "elf32-qnx.h", and now include that file.
5344 * elf32-qnx.h: New file: QNX specific common elf backend.
5345 * elf32-ppc.c: Do not include elf32-target.h if
5346 ELF32_PPC_C_INCLUDED is defined.
5347 * elf32-ppcqnx.c: New file: Support for QNX.
5348 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
5349 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
5351 2002-08-09 Nick Clifton <nickc@redhat.com>
5353 * po/sv.po: Updated Swedish translation.
5355 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5357 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
5358 g->global_gotsym is NULL.
5360 2002-08-08 H.J. Lu <hjl@gnu.org>
5362 * elflink.h (elf_add_default_symbol): Don't warn if a definition
5363 overrides an indirect versioned symbol.
5365 2002-08-08 Jakub Jelinek <jakub@redhat.com>
5367 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
5368 for R_386_TLS_TPOFF32 relocs against symndx 0.
5370 2002-08-07 H.J. Lu <hjl@gnu.org>
5372 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
5373 with undefined version if needed.
5374 (elf_link_assign_sym_version): Match a default symbol with a
5375 version without definition. No need to hide the default
5376 definition separately.
5378 2002-08-08 Alan Modra <amodra@bigpond.net.au>
5380 * elflink.h (elf_link_output_extsym): Don't output symbols from
5381 SEC_EXCLUDE sections.
5383 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
5385 2002-08-07 Alan Modra <amodra@bigpond.net.au>
5387 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
5390 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5392 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
5395 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5397 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
5399 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5401 * elf32-mips.c (mips_reloc_map): Fix typo.
5403 2002-08-06 Alan Modra <amodra@bigpond.net.au>
5405 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
5407 2002-08-06 Alan Modra <amodra@bigpond.net.au>
5409 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
5411 2002-08-06 Alan Modra <amodra@bigpond.net.au>
5413 * libxcoff.h: Use PARAMS on function declarations.
5414 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
5415 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
5417 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
5419 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
5421 2002-08-06 Alan Modra <amodra@bigpond.net.au>
5423 * coff-rs6000.c: Formatting fixes.
5424 (xcoff_calculate_relocation): Use PARAMS in declaration.
5425 (xcoff_complain_overflow): Likewise.
5426 (xcoff_ppc_relocate_section): Use old-style function pointer call.
5427 (bfd_xcoff_backend_data): Remove useless comments.
5428 (rs6000coff_vec): Likewise.
5429 (bfd_pmac_xcoff_backend_data): Likewise.
5430 (pmac_xcoff_vec): Likewise.
5432 * coff64-rs6000.c: Formatting fixes.
5433 (xcoff64_calculate_relocation): Use PARAMS in declaration.
5434 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
5435 (bfd_xcoff_backend_data): Remove useless comments.
5436 (rs6000coff64_vec): Likewise.
5437 (bfd_xcoff_aix5_backend_data): Likewise.
5438 (aix5coff64_vec): Likewise.
5440 2002-08-06 Alan Modra <amodra@bigpond.net.au>
5442 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
5443 mask entries. Use complain_overflow_dont for R_REF.
5444 (xcoff_reloc_type_ba): Revert last change.
5445 (xcoff_reloc_type_br): Likewise.
5446 (xcoff_reloc_type_crel): Likewise.
5447 (xcoff_ppc_relocate_section): Likewise.
5448 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
5449 (xcoff64_ppc_relocate_section): Likewise.
5450 (xcoff64_howto_table): Revert some of last change to mask entries.
5451 Use complain_overflow_dont for R_REF.
5453 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
5454 relocs with bitsize == 16 have size = 1.
5455 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
5456 (xcoff_reloc_type_br): Likewise.
5457 (xcoff_reloc_type_crel): Likewise.
5458 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
5459 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
5460 dst_mask adjustment.
5461 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
5462 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
5463 bitsize == 16 have size = 1.
5465 2002-08-01 Denis Chertykov <denisc@overta.ru>
5467 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
5468 (struct misc): New field isymbuf. All free_* fields removed.
5469 (symbol_value): Pass in internal syms. No need to swap syms in.
5470 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
5471 possibly cached info.
5472 (tidyup_after_error): Removed.
5473 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
5474 misc. Use new field.
5475 (adjust_all_relocations): Use internal syms. No need to swap syms
5477 (add_page_insn): Don't use removed fields of struct misc.
5479 2002-08-01 Nick Clifton <nickc@redhat.com>
5481 * elf32-arm.h: Revert previous delta.
5483 2002-08-01 Nick Clifton <nickc@redhat.com>
5485 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
5486 * configure: Regenerate.
5488 2002-07-31 H.J. Lu <hjl@gnu.org>
5490 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
5493 2002-07-31 H.J. Lu <hjl@gnu.org>
5495 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
5498 2002-07-31 Jakub Jelinek <jakub@redhat.com>
5500 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
5501 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
5503 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
5505 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
5506 There is no 8 byte relocation type for this architecture.
5507 (do_ns32k_reloc): Use bfd_vma instead of native types.
5508 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
5510 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
5511 rely on generic code to do that.
5512 * aout-ns32k.c (howto_table): Add appropriate overflow detection
5513 to all table entries.
5514 (_bfd_ns32k_relocate_contents): put_data returns void.
5515 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
5516 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
5519 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
5521 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
5522 archive object is target dependant.
5524 2002-07-31 Adam Nemet <anemet@lnxw.com>
5526 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
5527 (THUMB_PLT_ENTRY_SIZE): New macro.
5528 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
5529 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
5531 (elf32_arm_plt_entry): Likewise.
5532 (elf_backend_plt_header_size): Likewise.
5533 (elf32_thumb_plt0_entry): New global.
5534 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
5536 (elf32_thumb_plt_entry): New global.
5537 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
5538 Thumb entries. Set the bottom bit of the corresponding GOT entry
5539 for a Thumb PLT entry.
5540 (struct elf32_arm_plt_entry_info): New structure.
5541 (struct elf32_arm_link_hash_entry, plt_info): New member of this
5543 (elf32_arm_link_hash_newfunc): Initialize new member.
5544 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
5545 relocations against the PLT.
5546 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
5547 first_rel_type if this is the first time we encounter the symbol.
5548 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
5549 Determine if relocation needs a PLT entry. Set first_rel_type if
5550 this is the first time we encounter the symbol
5551 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
5553 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
5554 (elf32_arm_create_dynamic_sections): New function. Create the
5556 (elf_backend_create_dynamic_sections): Call it.
5558 2002-07-31 Nick Clifton <nickc@redhat.com>
5560 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
5561 'alternative' in order to avoid shadowing global symbol of the
5563 * bfd-in2.h: Regenerate.
5564 * libbfd.h: Regenerate.
5565 * libcoff.h: Regenerate.
5567 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5569 * Makefile.am: Add n32 ABI support.
5570 * Makefile.in: Regenerate.
5571 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
5572 bit vectors for mips*-*-linux targets as optional.
5573 * configure.in: Add n32 ABI vectors.
5574 * configure: Regenerate.
5575 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
5576 * elfn32-mips.c: New file, n32 ABI support.
5577 * targets.c: Add n32 ABI vectors.
5579 2002-07-30 Graeme Peterson <gp@qnx.com>
5581 * elfarmqnx-nabi.c: New file: Support for QNX.
5582 * config.bfd: Add support for arm-*-nto target.
5583 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
5584 * configure: Regenerate.
5585 * Makefile.am: Add entries for elfarmqnx-nabi.c.
5586 * Makefile.in: Regenerate.
5587 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
5588 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
5589 * elfarm-nabi.c: Do not include elf32-arm.h if
5590 ELFARM_NABI_C_INCLUDED is defined.
5591 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
5593 2002-07-30 Nick Clifton <nickc@redhat.com>
5595 * po/sv.po: Updated Swedish translation.
5597 2002-07-30 Jakub Jelinek <jakub@redhat.com>
5599 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
5601 2002-07-30 Alan Modra <amodra@bigpond.net.au>
5603 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
5604 * archive.c (bfd_generic_archive_p): Likewise.
5605 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
5606 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
5607 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
5608 (xcoff64_archive_p): Likewise.
5609 (xcoff64_openr_next_archived_file): Likewise.
5610 (xcoff64_archive_p): Clean up tdata properly on error.
5611 * coffgen.c (coff_real_object_p): Likewise.
5612 (coff_object_p): Release filehdr and opthdr.
5613 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
5614 * ieee.c (ieee_archive_p): Likewise.
5615 * ihex.c (ihex_object_p): Likewise.
5616 (ihex_mkobject): Always allocate tdata.
5617 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
5618 * srec.c (srec_mkobject): Always allocate tdata.
5619 (srec_object_p): Clean up tdata properly on error.
5620 (symbolsrec_object_p): Likewise.
5621 * versados.c (versados_object_p): Likewise.
5622 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
5623 and bfd_realloc instead of realloc.
5624 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
5625 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
5626 place of bfd_malloc, simplifying error freeing. Free hash table too.
5627 (vms_object_p): Clean up tdata on error.
5628 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
5629 (vms_close_and_cleanup): Adjust for bfd_alloc use.
5631 2002-07-30 Alan Modra <amodra@bigpond.net.au>
5633 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
5635 2002-07-26 Chris Demetriou <cgd@broadcom.com>
5637 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
5638 flags into resulting BFD.
5640 2002-07-26 Alan Modra <amodra@bigpond.net.au>
5642 From John Reiser <jreiser@BitWagon.com>
5643 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
5644 tls_ldm_got.refcount.
5646 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5648 * elf64-mips.c: Update TODO comment.
5649 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
5650 mips_elf64_gprel16_reloca): Remove prototypes.
5651 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
5652 (UNUSED_RELOC): Replace by EMPTY_RELOC.
5653 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
5654 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
5656 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
5657 R_MIPS_GOT16. Remove wrong comments.
5658 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
5659 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
5661 (mips_elf64_hi16_reloc): Fix formatting.
5662 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
5663 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
5664 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
5665 (mips_elf64_gprel16_reloc): Make static. Add check for
5667 (mips_elf64_gprel16_reloca): Remove.
5668 (mips_elf64_literal_reloc): New function.
5669 (mips_elf64_gprel32_reloc): Fix formatting.
5670 (mips_elf64_shift6_reloc): Fix comment. Make static.
5671 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
5673 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
5675 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
5676 specific relocations.
5677 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
5678 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
5679 (ELF_MAXPAGESIZE): Add comment.
5681 2002-07-25 Nick Clifton <nickc@redhat.com>
5683 * po/sv.po: Updated Swedish translation.
5684 * po/es.po: Updated Spanish translation.
5685 * po/fr.po: Updated French translation.
5687 2002-07-25 Alan Modra <amodra@bigpond.net.au>
5689 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
5690 as elf_link_record_local_dynamic_symbol.
5691 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
5692 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
5693 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
5694 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
5695 attempt is made to record a symbol in a discarded section, and
5696 return `2' in that case.
5698 2002-07-24 Nick Clifton <nickc@redhat.com>
5700 * po/sv.po: Updated Swedish translation.
5701 * po/es.po: Updated Spanish translation.
5703 2002-07-23 Alan Modra <amodra@bigpond.net.au>
5705 * po/SRC-POTFILES.in: Regenerate.
5707 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
5708 immediately. Remove code handling relocatable linking.
5709 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
5710 * elf32-cris.c (cris_elf_relocate_section): Likewise.
5711 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
5712 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
5713 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
5714 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
5715 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
5716 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5717 * elf32-v850.c (v850_elf_relocate_section): Likewise.
5718 * elf32-vax.c (elf_vax_relocate_section): Likewise.
5719 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5720 * elf32-avr.c (elf_backend_rela_normal): Define.
5721 * elf32-cris.c: Likewise.
5722 * elf32-fr30.c: Likewise.
5723 * elf32-frv.c: Likewise.
5724 * elf32-h8300.c: Likewise.
5725 * elf32-hppa.c: Likewise.
5726 * elf32-ip2k.c: Likewise.
5727 * elf32-sparc.c: Likewise.
5728 * elf32-v850.c: Likewise.
5729 * elf32-vax.c: Likewise.
5730 * elf64-hppa.c: Likewise.
5731 * elf64-sparc.c: Likewise.
5732 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
5733 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
5734 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
5735 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
5736 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
5737 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
5738 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
5739 * elf-m10200.c (USE_RELA): Don't define.
5740 * elf-m10300.c: Likewise.
5741 * elfarm-oabi.c: Likewise.
5742 * elf32-i370.c: Likewise.
5743 * elf32-ip2k.c: Likewise.
5744 * elf32-m68k.c: Likewise.
5745 * elf32-mcore.c: Likewise.
5746 * elf32-ppc.c: Likewise.
5747 * elf32-s390.c: Likewise.
5748 * elf32-vax.c: Likewise.
5749 * elf64-ppc.c: Likewise.
5750 * elf64-s390.c: Likewise.
5751 * elf64-x86-64.c: Likewise.
5752 * elfxx-ia64.c: Likewise.
5753 * elf32-avr.c (USE_REL): Don't undef.
5754 * elf32-ip2k.c: Likewise.
5756 2002-07-23 Nick Clifton <nickc@redhat.com>
5758 * elf-bfd.h (struct elf_backend_data): Add new bitfield
5759 'want_p_paddr_set_to_zero'.
5760 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
5762 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
5763 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
5765 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
5767 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
5768 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
5769 show the Copyright string.
5770 Minor formatting tidy ups.
5772 2002-07-23 Nick Clifton <nickc@redhat.com>
5774 * po/fr.po: Updated French translation.
5775 * po/sv.po: Updated Swedish translation.
5777 2002-07-23 Alan Modra <amodra@bigpond.net.au>
5779 * elflink.h (elf_link_input_bfd): Don't change internal symbols
5780 when outputting relocs.
5782 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
5784 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
5785 DT_PLTGOT into the dynamic section if there is a PLT.
5787 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5789 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
5791 (_bfd_mips_elf_write_section): Likewise.
5792 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
5793 (_bfd_mips_elf_write_section): Likewise.
5794 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
5795 (elf32_mips_write_section): Likewise.
5796 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
5797 (_bfd_mips_elf_write_section): Likewise.
5799 2002-07-19 Alan Modra <amodra@bigpond.net.au>
5801 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
5802 PT_IA_64_UNWIND segments for a given section.
5804 2002-07-17 H.J. Lu <hjl@gnu.org>
5806 * Makefile.am: Fix a typo.
5807 * Makefile.in: Regenerate.
5809 2002-07-15 Denis Chertykov <denisc@overta.ru>
5810 Frank Ch. Eigler <fche@redhat.com>
5811 Ben Elliston <bje@redhat.com>
5812 Alan Lehotsky <alehotsky@cygnus.com>
5813 John Healy <jhealy@redhat.com>
5814 Graham Stott <grahams@redhat.com>
5815 Jeff Johnston <jjohnstn@redhat.com>
5817 * Makefile.am: Add support for ip2k.
5818 * Makefile.in: Regenerate.
5819 * doc/Makefile.in: Regenerate.
5820 * archures.c: Add support for ip2k.
5821 * config.bfd: Add support for ip2k.
5822 * configure.in: Add support for ip2k.
5823 * configure: Regenerate.
5824 * reloc.c: Add support for ip2k.
5825 * targets.c: Add support for ip2k.
5826 * bfd-in2.h: Regenerate.
5827 * libbfd.h: Regenerate.
5828 * cpu-ip2k.c: New file.
5829 * elf32-ip2k.c: New file.
5831 2002-07-17 Ian Rickards <irickard@arm.com>
5833 * dwarf2.c (concat_filename): If we can't establish the directory
5834 just return the filename.
5836 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
5838 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
5840 2002-07-16 Alan Modra <amodra@bigpond.net.au>
5842 * elflink.h: Formatting fixes, tidy prototypes.
5843 (elf_link_assign_sym_version): Move common code out of loop.
5845 2002-07-16 Alan Modra <amodra@bigpond.net.au>
5847 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
5848 reloc section size is zero. Correct reloc output location.
5850 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
5852 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
5853 the final type for the e_fsel selector when generating PA2.0W code.
5854 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
5857 2002-07-14 H.J. Lu <hjl@gnu.org>
5859 * elflink.h (elf_link_assign_sym_version): Hide the default
5860 definition if there is a hidden versioned definition.
5862 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
5864 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
5865 dynamic reference test in assertion when initializing GOT with
5866 static contents. Just assert that there are either no dynamic
5867 sections, the symbol is defined in the regular objects or that the
5868 symbol is undef weak. Tweak comment.
5869 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
5870 only if the symbol isn't defined in the program and isn't undef
5872 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
5873 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
5874 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
5875 (elf_cris_discard_excess_program_dynamics): Don't consider
5876 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
5878 2002-07-11 Alan Modra <amodra@bigpond.net.au>
5880 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
5881 unresolved debugging relocs in dynamic applications.
5882 * elf32-s390.c (elf_s390_relocate_section): Likewise.
5883 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5884 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
5885 * elf64-s390.c (elf_s390_relocate_section): Likewise.
5886 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5887 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
5889 2002-07-10 Alan Modra <amodra@bigpond.net.au>
5891 * elf64-ppc.c (ONES): Define.
5892 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
5893 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
5894 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
5896 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
5897 (ppc64_elf_set_private_flags): Delete.
5898 (ppc64_elf_section_from_shdr): Delete.
5899 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
5900 (ppc64_elf_fake_sections): Delete.
5901 (bfd_elf64_bfd_set_private_flags): Don't define.
5902 (bfd_elf64_get_symbol_info): Likewise.
5903 (elf_backend_section_from_shdr): Likewise.
5904 (elf_backend_fake_sections): Likewise.
5906 2002-07-10 Marco Walther <Marco.Walther@sun.com>
5908 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
5909 when not already set.
5910 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
5911 (elf_backend_fake_sections): Define.
5913 2002-07-10 Alan Modra <amodra@bigpond.net.au>
5915 * merge.c (_bfd_merge_section): Remove redundant output_section check.
5917 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
5919 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
5921 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
5922 NULL sym_hashes to just before use.
5923 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
5924 symbol with non-default visibility.
5925 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
5926 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
5928 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
5929 symbol with non-default visibility.
5930 (cris_elf_check_relocs): At tests for local symbol before
5931 increasing h->plt.refcount, also check for non-default
5932 visibility. Ditto when checking for local symbol to eliminate
5933 pc-relative runtime relocs.
5935 2002-07-08 Alan Modra <amodra@bigpond.net.au>
5937 * elf.c: Formatting.
5938 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
5939 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
5940 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
5943 2002-07-07 Mark Mitchell <mark@codesourcery.com>
5944 Alan Modra <amodra@bigpond.net.au>
5946 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
5947 account the impact of relocation count overflow when computing
5949 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
5950 or not to apply the PE COFF reloc overflow handling. Fix a
5951 fencepost error in deciding whether or not to use that technique.
5953 2002-07-07 Alan Modra <amodra@bigpond.net.au>
5955 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
5956 change type of locsyms.
5957 (bfd_elf_get_elf_syms): Declare.
5958 * elf.c (bfd_elf_get_elf_syms): New function.
5959 (group_signature): Use bfd_elf_get_elf_syms.
5960 (bfd_section_from_r_symndx): Likewise.
5961 * elfcode.h (elf_slurp_symbol_table): Likewise.
5962 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
5963 (elf_link_add_object_symbols): Likewise. Reorganise to increase
5964 locality of various data structures. Properly free internal relocs.
5965 (elf_bfd_final_link): Properly free internal relocs.
5966 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
5967 (elf_link_input_bfd): Likewise.
5968 (elf_gc_mark): Likewise. Properly free internal relocs.
5969 (elf_gc_sweep): Properly free internal relocs.
5970 (elf_reloc_symbol_deleted_p): No need to swap syms in.
5971 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
5973 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
5974 Properly free possibly cached info.
5975 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
5976 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
5977 symbol swapping code.
5978 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
5979 Properly free possibly cached info.
5980 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
5981 (mn10300_elf_relax_delete_bytes): Likewise.
5982 (mn10300_elf_symbol_address_p): Likewise.
5983 (mn10300_elf_get_relocated_section_contents): Likewise.
5984 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
5985 (elf32_h8_relax_delete_bytes): Likewise.
5986 (elf32_h8_symbol_address_p): Likewise.
5987 (elf32_h8_get_relocated_section_contents): Likewise.
5988 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
5989 (m32r_elf_relax_delete_bytes): Likewise.
5990 (m32r_elf_get_relocated_section_contents): Likewise.
5991 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
5992 elf_section_data to determine whether cached.
5993 (sh_elf_relax_section): As above for elf-m10200.c.
5994 (sh_elf_relax_delete_bytes): Likewise.
5995 (sh_elf_get_relocated_section_contents): Likewise.
5996 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
5997 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
5998 reading of local syms.
5999 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
6000 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
6001 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
6002 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
6004 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
6005 free internal relocs and section contents. Don't read symbols.
6006 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
6007 (elf32_hppa_size_stubs): Don't free local syms.
6008 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
6009 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
6010 possibly cached info.
6011 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
6012 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
6013 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
6015 (get_local_syms): Delete function.
6016 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
6018 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
6020 2002-07-05 Jim Wilson <wilson@redhat.com>
6022 * syms.c (decode_section_type): New.
6023 (bfd_decode_symclass): Call decode_section_type.
6025 2002-07-04 Jakub Jelinek <jakub@redhat.com>
6027 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
6028 section content start.
6029 Reported by Michael Schumacher <mike@hightec-rt.com>.
6031 2002-07-04 Alan Modra <amodra@bigpond.net.au>
6033 * section.c (_bfd_strip_section_from_output): Remove unnecessary
6034 link order code. Don't actually remove the output section here;
6035 Just set a flag for the linker to do so.
6036 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
6037 sections when setting up output section dynsyms.
6039 2002-07-04 Alan Modra <amodra@bigpond.net.au>
6041 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
6043 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
6046 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
6048 * elf64-s390.c (create_got_section): Set .got section alignment to
6050 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
6052 2002-07-02 Alan Modra <amodra@bigpond.net.au>
6054 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
6056 2002-07-01 Matt Thomas <matt@3am-software.com>
6058 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
6061 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6063 * elfxx-mips.c (ABI_64_P): Fix comment.
6064 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
6065 new section names for N64 ABI.
6066 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
6067 (mips_elf_calculate_relocation): Code formatting.
6068 (mips_elf_create_dynamic_relocation): Likewise.
6069 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
6070 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
6071 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
6073 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
6075 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
6076 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
6079 2002-07-01 Andreas Schwab <schwab@suse.de>
6081 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
6082 R_X86_64_64 to R_X86_64_RELATIVE.
6084 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
6086 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
6087 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
6089 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
6091 * configure.in (vaxbsd_vec): Add.
6092 * targets.c (vaxbsd_vec): Add.
6093 * Makefile.in: Rebuild.
6094 * configure: Rebuild.
6095 * po/SRC-POTFILES.in: Rebuild.
6097 2002-07-01 Alan Modra <amodra@bigpond.net.au>
6099 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
6100 examining to gc_mark_hook, rather than the bfd.
6101 (elf_gc_sections): Adjust.
6102 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
6103 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
6104 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
6105 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
6106 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
6107 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
6108 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
6109 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
6110 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
6111 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
6112 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
6113 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
6114 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
6115 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
6116 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
6117 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
6118 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
6119 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
6120 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
6121 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
6122 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
6123 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
6124 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
6125 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
6126 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
6127 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
6128 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
6129 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
6130 redundant local sym tests.
6131 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
6132 (link_hash_newfunc): Init is_entry.
6133 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
6134 (ppc64_elf_link_hash_table_create): Init all_local_syms.
6135 (create_linkage_sections): Use bfd_make_section_anyway rather than
6137 (ppc64_elf_mark_entry_syms): New function.
6138 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
6139 up opd entry to function section map.
6140 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
6141 relocs that reference the opd section.
6142 (edit_opd): New function.
6143 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
6144 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
6145 (get_local_syms): Do so here. Exit if we already have local syms.
6146 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
6147 read local syms on non-ELF input.
6148 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
6149 than duplicating it's function here. Adjust free of internal
6151 (ppc64_elf_relocate_section): Adjust local syms in opd section.
6152 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
6153 * elf32-hppa.c (elf32_hppa_size_stubs): Call
6154 _bfd_elf32_link_read_relocs rather than duplicating it's function
6155 here. Adjust free of internal relocs to suit.
6157 2002-07-01 Andreas Jaeger <aj@suse.de>
6159 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
6160 are not allowed in shared libs code, enforce -fPIC.
6162 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
6164 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
6165 trailing zero-sequences when there's previous left-over data.
6167 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
6169 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
6170 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
6171 and opd_rel_sec in order for starting rela section. Check _raw_size.
6172 (elf_backend_reloc_type_class): Define.
6174 2002-06-27 Kevin Buettner <kevinb@redhat.com>
6176 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
6179 2002-06-27 Alan Modra <amodra@bigpond.net.au>
6181 * cpu-powerpc.c: Comment on ordering of arch_info.
6182 * elf32-ppc.c (ppc_elf_object_p): New function.
6183 (elf_backend_object_p): Define.
6184 * elf64-ppc.c (ppc64_elf_object_p): New function.
6185 (elf_backend_object_p): Define.
6187 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
6189 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
6190 * configure: Regenerate.
6192 2002-06-25 Jason Eckhardt <jle@rice.edu>
6194 * dwarf2.c (decode_line_info): Check unit->addr_size
6195 to read in the proper number of prologue bytes.
6197 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
6199 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
6200 aix5coff64_vec if 64-bit bfd support has been enabled.
6201 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
6204 * targets.c (_bfd_target_vector[]): Only include
6205 aix5coff64_vec if 64-bit bfd support has been enabled.
6207 2002-06-25 Alan Modra <amodra@bigpond.net.au>
6209 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
6210 * elf32-hppa.c (hppa_add_stub): Likewise.
6211 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
6212 * elflink.h (elf_add_default_symbol): Fix comment typo.
6213 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
6214 (elf_link_add_object_symbols): Likewise.
6215 (elf_link_assign_sym_version): Likewise.
6216 * hash.c (bfd_hash_lookup): Likewise.
6217 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
6218 * section.c (bfd_get_unique_section_name): Likewise.
6219 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
6220 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
6221 (assign_section_numbers): Likewise.
6222 (_bfd_elfcore_make_pseudosection): Likewise.
6223 (elfcore_grok_lwpstatus): Likewise.
6224 (elfcore_grok_win32pstatus): Likewise.
6225 (elfcore_write_note): Constify input params. Use PTR instead of
6226 void *. Include terminating NUL in namesz. Correct padding.
6227 Support NULL "name" param. Use memcpy instead of strcpy.
6228 (elfcore_write_prpsinfo): Constify input params.
6229 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
6230 (elfcore_write_lwpstatus): Likewise.
6231 (elfcore_write_pstatus): Likewise.
6232 (elfcore_write_prfpreg): Likewise.
6233 (elfcore_write_prxfpreg): Likewise.
6234 * elf-bfd.h (elfcore_write_note): Update declaration.
6235 (elfcore_write_prpsinfo): Likewise.
6236 (elfcore_write_prstatus): Likewise.
6237 (elfcore_write_pstatus): Likewise.
6238 (elfcore_write_prfpreg): Likewise.
6239 (elfcore_write_prxfpreg): Likewise.
6240 (elfcore_write_lwpstatus): Likewise.
6242 2002-06-25 Jason Eckhardt <jle@rice.edu>
6244 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
6245 symbols of type stProc and stStaticProc.
6247 2002-06-25 Nick Clifton <nickc@redhat.com>
6249 * ecoff.c: VArious formatting fixes.
6251 2002-06-25 Alan Modra <amodra@bigpond.net.au>
6253 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
6255 2002-06-25 Alan Modra <amodra@bigpond.net.au>
6257 * aout-adobe.c: Don't compare against "true" or "false.
6258 * aout-target.h: Likewise.
6259 * aoutx.h: Likewise.
6260 * archive.c: Likewise.
6262 * cache.c: Likewise.
6263 * coff-a29k.c: Likewise.
6264 * coff-alpha.c: Likewise.
6265 * coff-i386.c: Likewise.
6266 * coff-mips.c: Likewise.
6267 * coff-or32.c: Likewise.
6268 * coff64-rs6000.c: Likewise.
6269 * coffcode.h: Likewise.
6270 * coffgen.c: Likewise.
6271 * cpu-ns32k.c: Likewise.
6272 * ecoff.c: Likewise.
6273 * ecofflink.c: Likewise.
6275 * elf32-arm.h: Likewise.
6276 * elf32-cris.c: Likewise.
6277 * elf32-d30v.c: Likewise.
6278 * elf32-i386.c: Likewise.
6279 * elf32-mcore.c: Likewise.
6280 * elf32-ppc.c: Likewise.
6281 * elf32-sh.c: Likewise.
6282 * elf32-sh64.c: Likewise.
6283 * elf32-v850.c: Likewise.
6284 * elf64-alpha.c: Likewise.
6285 * elf64-sh64.c: Likewise.
6286 * elfcode.h: Likewise.
6287 * elfcore.h: Likewise.
6288 * elflink.h: Likewise.
6289 * elfxx-mips.c: Likewise.
6290 * i386os9k.c: Likewise.
6292 * libbfd.c: Likewise.
6293 * linker.c: Likewise.
6295 * nlm32-alpha.c: Likewise.
6296 * nlm32-i386.c: Likewise.
6297 * nlm32-ppc.c: Likewise.
6298 * nlm32-sparc.c: Likewise.
6299 * nlmcode.h: Likewise.
6300 * oasys.c: Likewise.
6301 * pdp11.c: Likewise.
6302 * peicode.h: Likewise.
6303 * reloc.c: Likewise.
6306 * tekhex.c: Likewise.
6308 * xcofflink.c: Likewise.
6309 * elf64-sparc.c: Edit comment to not use "== false".
6311 * aoutf1.h: Don't use "? true : false".
6312 * ecoff.c: Likewise.
6313 * format.c: Likewise.
6315 * linker.c: Likewise.
6317 * oasys.c: Likewise.
6319 2002-06-23 H.J. Lu <hjl@gnu.org>
6321 * elflink.h (elf_link_add_archive_symbols): For the default
6322 version, check references with only one `@' first.
6324 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
6326 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
6328 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
6330 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
6331 (elf64_hppa_size_dynamic_sections): Revise to use
6332 elf64_hppa_mark_milli_and_exported_functions.
6333 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
6334 symbols out of dynamic symbol table.
6336 2002-06-23 Alan Modra <amodra@bigpond.net.au>
6338 * Makefile.in: Regenerate.
6339 * libbfd.h: Regenerate.
6340 * bfd-in2.h: Regenerate.
6341 * configure: Regenerate.
6342 * po/SRC-POTFILES.in: Regenerate.
6344 * elflink.h: Comment typo fixes.
6346 2002-06-23 H.J. Lu <hjl@gnu.org>
6348 * elf-bfd.h (elf_link_loaded_list): New structure.
6349 (elf_link_hash_table): Add "loaded".
6350 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
6351 * elflink.h (elf_link_check_versioned_symbol): New function.
6352 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
6354 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
6356 * elflink.h (size_dynamic_sections): If the target does not
6357 support an ELF style hash table, return true, indicating that
6358 nothing needed to be done, rather than false, indicating that the
6359 section's size could not be computed.
6361 2002-06-18 Dave Brolley <brolley@redhat.com>
6363 From Catherine Moore, Michael Meissner, Dave Brolley:
6364 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
6365 * targets.c: Support bfd_elf32_frv_vec.
6366 * reloc.c: Add FRV relocs.
6367 * configure.in: Add support for bfd-elf32-frv-vec.
6368 * config.bfd (targ_cpu): Add support for frv-*-elf.
6369 * archures.c: Add frv arch and machines.
6370 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
6371 (ALL_MACHINES_CFILES): Add cpu-frv.c.
6372 (BFD32_BACKENDS): Add elf32-frv.lo.
6373 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
6374 (cpu-frv.lo): New target.
6375 (elf32-frv.lo): New target.
6376 * cpu-frv.c: New file.
6377 * elf32-frv.c: New file.
6379 2002-06-18 Jakub Jelinek <jakub@redhat.com>
6381 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
6383 Only read the first section header if e_shoff is non-zero.
6384 Don't consider e_shstrndx if there are no sections.
6386 2002-06-17 Tom Rix <trix@redhat.com>
6388 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
6389 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
6390 complain_overflow_bitfield.
6392 2002-06-17 Alan Modra <amodra@bigpond.net.au>
6394 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
6395 (bfd_fdopenr): Likewise.
6396 (bfd_openstreamr): Likewise.
6397 (bfd_openw): Likewise.
6399 * targets.c: Sort target vecs.
6400 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
6401 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
6402 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
6403 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
6404 * configure.in: Sort target vecs. Add m88kmach3_vec.
6405 * configure: Regenerate.
6407 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
6409 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
6410 bpo_reloc_no to break sort order ties, not address of items.
6412 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
6414 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
6415 Skip excluded sections in determing __gp value.
6416 (elf_hppa_final_link_relocate): Use the symbol's address in
6417 R_PARISC_FPTR64 relocations that don't need an opd entry.
6418 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
6419 (elf64_hppa_finalize_dynreloc): Likewise.
6420 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
6421 (elf64_hppa_finish_dynamic_symbol): Break up assert.
6423 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
6425 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
6426 alignment for .bss, .data and .text sections so that sse and sse2
6428 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
6430 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
6432 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
6435 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
6437 * elflink.h (elf_bfd_final_link): Improve error handling for missing
6440 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
6441 for a symbol that has no output section.
6442 (allocate_dynrel_entries): Correct comment.
6443 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
6445 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
6446 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
6447 with no section. Remove unnecessary parentheses.
6449 2002-06-11 Tom Rix <trix@redhat.com>
6451 * coffcode.h (coff_compute_section_file_positions): Add data
6452 section to AIX loader alignment check.
6454 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
6455 alignment to 4 bytes.
6456 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
6457 power accessor macro.
6458 (do_shared_object_padding): Remove invalid assertion.
6460 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
6462 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
6463 for removed output sections.
6465 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
6467 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
6469 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
6471 2002-06-08 H.J. Lu <hjl@gnu.org>
6473 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
6474 work around a long long bug in gcc 2.96 on mips.
6476 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
6478 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
6479 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
6480 Regenerate dependency lists.
6481 * Makefile.in: Regenerate.
6482 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
6483 vax1knetbsd_vec to targ_selvecs.
6484 * configure.in: Add vax1knetbsd_vec.
6485 * configure: Regenerate.
6486 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
6487 * vax1knetbsd.c: New file.
6488 * vaxnetbsd.c: Update copyright years.
6489 (TARGET_PAGE_SIZE): Set to 0x1000.
6490 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
6492 2002-06-08 Matt Thomas <matt@3am-software.com>
6494 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
6496 2002-06-08 Alan Modra <amodra@bigpond.net.au>
6498 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
6500 2002-06-08 Alan Modra <amodra@bigpond.net.au>
6502 * Makefile.am: Run "make dep-am".
6503 * Makefile.in: Regenerate.
6505 * armnetbsd.c: Replace CONST with const.
6506 * corefile.c: Likewise.
6507 * elf32-dlx.c: Likewise.
6508 * elf64-mips.c: Likewise.
6510 * ns32knetbsd.c: Likewise.
6512 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
6513 table is elf64-sparc.
6515 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6517 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
6518 Fix RELA addends to get not shifted in the result. Don't do special
6519 handling of R_MIPS_64 for NewABI.
6521 2002-06-07 Alan Modra <amodra@bigpond.net.au>
6523 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
6524 (NAME(aout,slurp_reloc_table)): Likewise.
6525 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
6526 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
6527 (xcoff_write_archive_contents_big): Likewise.
6528 (xcoff_generate_rtinit): Likewise.
6529 (xcoff_generate_rtinit): Likewise, and check error return.
6530 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6531 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
6532 (coff_get_normalized_symtab): Likewise.
6533 (coff_make_empty_symbol): Likewise.
6534 (bfd_coff_set_symbol_class): Likewise.
6535 * cofflink.c (coff_link_add_symbols): Likewise.
6536 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
6537 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
6538 (bfd_ecoff_write_accumulated_debug): Likewise.
6539 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
6540 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
6541 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
6542 * ieee.c (do_with_relocs): Use bfd_zalloc.
6543 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
6544 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
6545 (NAME(aout,slurp_reloc_table)): Likewise.
6546 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
6547 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
6548 * som.c (som_build_and_write_symbol_table): Likewise.
6549 (som_slurp_string_table): Likewise.
6550 (som_slurp_symbol_table): Likewise.
6551 (som_bfd_ar_write_symbol_stuff): Likewise.
6552 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
6553 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
6554 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
6555 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
6556 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
6558 2002-06-07 Alan Modra <amodra@bigpond.net.au>
6560 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
6562 (elf_group_name): Update.
6563 (elf_group_id): Define.
6564 (bfd_elf_set_group_contents): Declare.
6565 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
6566 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
6567 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
6568 that sym for the signature.
6569 (_bfd_elf_compute_section_file_positions): Don't call
6570 set_group_contents for "ld -r" case.
6571 (swap_out_syms): Use bfd_zalloc.
6572 * elflink.h (elf_link_add_archive_symbols): Likewise.
6573 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
6574 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
6576 2002-06-07 Alan Modra <amodra@bigpond.net.au>
6578 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
6579 relocs in opd for non-shared too.
6581 2002-06-06 Jeffrey Law <law@redhat.com>
6583 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
6586 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
6588 * merge.c: Include libiberty.h.
6589 * elf-strtab.c: Include libiberty.h.
6591 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
6593 * peXXigen.c (pe_print_idata): Remove unused variable.
6595 2002-06-06 David Heine <dlheine@tensilica.com>
6597 * elf.c (assign_file_positions_for_segments): Remove unallocated
6598 sections from the section to segment mapping for PT_LOAD segments.
6599 Update comment about empty loadable segments.
6601 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
6603 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
6604 is within the .stabstr section.
6606 2002-06-06 Alan Modra <amodra@bigpond.net.au>
6608 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
6609 are "const PTR", not "const PTR *".
6610 (bfd_elf32_swap_symbol_in): Likewise.
6611 (bfd_elf64_swap_symbol_in): Likewise.
6612 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
6613 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
6614 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
6615 (elf_link_add_object_symbols): Likewise.
6616 (elf_link_record_local_dynamic_symbol): Likewise.
6617 (elf_link_input_bfd): Likewise.
6618 (elf_gc_mark): Likewise.
6619 (elf_reloc_symbol_deleted_p): Likewise.
6620 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
6621 (mn10200_elf_relax_delete_bytes): Likewise.
6622 (mn10200_elf_symbol_address_p): Likewise.
6623 (mn10200_elf_get_relocated_section_contents): Likewise.
6624 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
6625 (mn10300_elf_relax_section): Likewise.
6626 (mn10300_elf_relax_delete_bytes): Likewise.
6627 (mn10300_elf_symbol_address_p): Likewise.
6628 (mn10300_elf_get_relocated_section_contents): Likewise.
6629 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
6630 (elf32_h8_relax_delete_bytes): Likewise.
6631 (elf32_h8_symbol_address_p): Likewise.
6632 (elf32_h8_get_relocated_section_contents): Likewise.
6633 * elf32-hppa.c (get_local_syms): Likewise.
6634 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
6635 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
6636 * elf32-sh.c (sh_elf_relax_section): Likewise.
6637 (sh_elf_relax_delete_bytes): Likewise.
6638 (sh_elf_get_relocated_section_contents): Likewise.
6639 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
6640 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
6641 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
6642 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
6643 * elf64-ppc.c (get_local_syms): Likewise.
6644 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
6645 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
6647 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
6649 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
6651 2002-06-05 Alan Modra <amodra@bigpond.net.au>
6653 * elf.c (group_signature): Swap in the whole symbol, and handle
6654 extracting section symbol names.
6655 (setup_group): Add comment.
6656 (set_group_contents): When called from objcopy or ld, arrange for
6657 section contents to be written. Write group member output section
6658 indices to allow objcopy to reorganize sections.
6659 (_bfd_elf_copy_private_section_data): Copy group info.
6661 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
6662 (bfd_elf32_swap_symbol_in): Update prototype.
6663 (bfd_elf64_swap_symbol_in): Likewise.
6664 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
6665 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
6666 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
6667 (elf_link_add_object_symbols): Likewise.
6668 (elf_link_record_local_dynamic_symbol): Likewise.
6669 (elf_link_input_bfd): Likewise.
6670 (elf_gc_mark): Likewise.
6671 (elf_reloc_symbol_deleted_p): Likewise.
6672 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
6673 (mn10200_elf_relax_delete_bytes): Likewise.
6674 (mn10200_elf_symbol_address_p): Likewise.
6675 (mn10200_elf_get_relocated_section_contents): Likewise.
6676 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
6677 (mn10300_elf_relax_section): Likewise.
6678 (mn10300_elf_relax_delete_bytes): Likewise.
6679 (mn10300_elf_symbol_address_p): Likewise.
6680 (mn10300_elf_get_relocated_section_contents): Likewise.
6681 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
6682 (elf32_h8_relax_delete_bytes): Likewise.
6683 (elf32_h8_symbol_address_p): Likewise.
6684 (elf32_h8_get_relocated_section_contents): Likewise.
6685 * elf32-hppa.c (get_local_syms): Likewise.
6686 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
6687 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
6688 * elf32-sh.c (sh_elf_relax_section): Likewise.
6689 (sh_elf_relax_delete_bytes): Likewise.
6690 (sh_elf_get_relocated_section_contents): Likewise.
6691 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
6692 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
6693 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
6694 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
6695 * elf64-ppc.c (get_local_syms): Likewise.
6696 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
6697 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
6698 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
6699 * elf64-alpha.c (alpha_elf_size_info): Likewise.
6700 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
6701 * elf64-mips.c (mips_elf64_size_info): Likewise.
6702 * elf64-s390.c (s390_elf64_size_info): Likewise.
6703 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
6705 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6707 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
6708 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
6709 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
6710 _bfd_mips_elf_ignore_discarded_relocs.
6711 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
6713 2002-06-05 H.J. Lu <hjl@gnu.org>
6715 * elfxx-mips.c (mips_elf_calculate_relocation): Call
6716 _bfd_elf_rel_local_sym for STT_SECTION relocations against
6717 the SEC_MERGE section.
6719 2002-06-05 Alan Modra <amodra@bigpond.net.au>
6721 * coff-alpha.c: Update copyright date.
6722 * coff-mips.c: Likewise.
6723 * xcoff-target.h: Likewise.
6725 * bfd-in.h: Remove "taken from the source" comment.
6726 * libbfd-in.h: Likewise.
6727 * libcoff-in.h: Likewise.
6728 * bfd-in2.h: Regenerate.
6729 * libbfd.h: Regenerate.
6730 * libcoff.h: Regenerate.
6732 * elf.c (bfd_elf_discard_group): Return true.
6733 * elf-bfd.h (bfd_elf_discard_group): Declare.
6734 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
6735 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
6736 * bfd.c (bfd_discard_group): Define.
6737 * targets.c (struct bfd_target): Add _bfd_discard_group.
6738 (BFD_JUMP_TABLE_LINK): Here too.
6739 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
6740 * aout-adobe.c (aout_32_bfd_discard_group): Define.
6741 * aout-target.h (MY_bfd_discard_group): Define.
6742 * aout-tic30.c (MY_bfd_discard_group): Define.
6743 * binary.c (binary_bfd_discard_group): Define.
6744 * bout.c (b_out_bfd_discard_group): Define.
6745 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
6746 * coffcode.h (coff_bfd_discard_group): Define.
6747 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
6748 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
6749 * i386msdos.c (msdos_bfd_discard_group): Define.
6750 * i386os9k.c (os9k_bfd_discard_group): Define.
6751 * ieee.c (ieee_bfd_discard_group): Define.
6752 * ihex.c (ihex_bfd_discard_group): Define.
6753 * mmo.c (mmo_bfd_discard_group): Define.
6754 * nlm-target.h (nlm_bfd_discard_group): Define.
6755 * oasys.c (oasys_bfd_discard_group): Define.
6756 * ppcboot.c (ppcboot_bfd_discard_group): Define.
6757 * som.c (som_bfd_discard_group): Define.
6758 * srec.c (srec_bfd_discard_group): Define.
6759 * tekhex.c (tekhex_bfd_discard_group): Define.
6760 * versados.c (versados_bfd_discard_group): Define.
6761 * vms.c (vms_bfd_discard_group): Define.
6762 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
6763 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
6764 (aix5coff64_vec): Likewise.
6765 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
6767 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
6769 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
6770 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
6771 (elf32-sh64-com.lo): New dependency list.
6772 * Makefile.in: Regenerate.
6773 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
6774 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
6776 * configure: Regenerate.
6777 * elf32-sh64.c (sh64_address_in_cranges)
6778 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
6779 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
6780 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
6781 * elf32-sh64-com.c: ...here. New file.
6783 2002-06-04 Alan Modra <amodra@bigpond.net.au>
6785 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
6786 ATTRIBUTE_UNUSED on used params.
6787 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
6788 before calling bfd_section_from_elf_index on local syms.
6789 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
6791 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
6793 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
6794 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
6795 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
6796 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
6797 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
6798 * Makefile.in: Regenerate.
6799 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
6800 (sh64-*-netbsd*): New targets.
6801 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
6802 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
6803 * configure: Regenerate.
6804 * elf32-sh64-nbsd.c: New file.
6805 * elf64-sh64-nbsd.c: New file.
6806 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
6807 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
6808 bfd_elf64_sh64lnbsd_vec.
6810 2002-06-04 Alan Modra <amodra@bigpond.net.au>
6812 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
6813 (bfd_section_from_shdr): Likewise. Set section name of group
6814 sections from signature.
6815 (group_signature): Split out from setup_group. Ensure symbol table
6817 (bfd_elf_discard_group): New function.
6818 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
6819 .gnu.linkonce* sections if they are members of a group.
6820 (set_group_contents): Set GRP_COMDAT flag.
6821 * section.c (bfd_discard_group): New function.
6822 * bfd-in.h (bfd_elf_discard_group): Declare.
6823 * bfd-in2.h: Regenerate.
6824 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
6825 (elf_linkonce_p): Define.
6827 2002-06-04 Alan Modra <amodra@bigpond.net.au>
6829 * elf.c (bfd_section_from_shdr): Make "name" const.
6830 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
6831 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
6832 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
6833 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
6834 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
6835 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
6836 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
6837 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
6838 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
6839 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
6840 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
6842 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6844 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
6847 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
6849 * elf32-arc.c: Fix formatting.
6850 * elf32-arm.h: Likewise.
6851 * elf32-cris.c: Likewise.
6852 * elf32-dlx.c: Likewise.
6853 * elf32-hppa.c: Likewise.
6854 * elf32-i386.c: Likewise.
6855 * elf32-i386qnx.c: Likewise.
6856 * elf32-or32.c: Likewise.
6857 * elf32-s390.c: Likewise.
6858 * elf32-sh64.c: Likewise.
6859 * elf32-vax.c: Likewise.
6860 * elf32-xstormy16.c: Likewise.
6861 * elf64-alpha.c: Likewise.
6862 * elf64-mmix.c: Likewise.
6863 * elf64-ppc.c: Likewise.
6864 * elf64-s390.c: Likewise.
6865 * elf64-sh64.c: Likewise.
6866 * elf64-x86-64.c: Likewise.
6868 2002-06-02 Richard Henderson <rth@redhat.com>
6870 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
6871 null when there are no got entries for a symbol.
6872 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
6873 uninitialized variable warning.
6875 2002-06-01 Richard Henderson <rth@redhat.com>
6877 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
6878 undefined symbols here.
6879 (elf64_alpha_relax_section): Do it here. Also test for not
6880 defined in the current module.
6881 (elf64_alpha_relocate_section_r): Split out of ...
6882 (elf64_alpha_relocate_section): ... here. Don't dereference
6883 NULL when looking up local got entries.
6885 2002-06-01 Richard Henderson <rth@redhat.com>
6887 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
6888 symbols from JSR relaxation.
6889 (elf64_alpha_size_plt_section_1): New.
6890 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
6891 (elf64_alpha_size_rela_got_1): ... here.
6892 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
6893 (elf64_alpha_size_rela_got_section): ... here.
6894 (elf64_alpha_size_plt_section): New.
6895 (elf64_alpha_relax_section): Call them.
6896 (elf64_alpha_size_got_sections): Remove output_bfd arg.
6897 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
6899 2002-06-01 Richard Henderson <rth@redhat.com>
6901 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
6902 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
6903 in shared libraries. Fix DTPRELHI and TPRELHI value.
6904 (INSN_ADDQ, INSN_RDUNIQ): New.
6905 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
6906 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
6907 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
6908 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
6909 Handle GOTDTPREL and GOTTPREL relocations.
6910 (elf64_alpha_relax_gprelhilo): New.
6911 (elf64_alpha_relax_tls_get_addr): New.
6912 (elf64_alpha_relax_find_tls_segment): New.
6913 (elf64_alpha_relax_section): Handle TLS relocations.
6914 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
6915 (elf64_alpha_check_relocs): Set it.
6917 2002-06-01 Richard Henderson <rth@redhat.com>
6919 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
6921 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
6922 check; don't suppress dynamic relocs for non-allocated sections.
6924 * elf64-alpha.c: Remove dead code.
6926 2002-05-31 Alan Modra <amodra@bigpond.net.au>
6928 * bfd-in2.h: Regenerate.
6929 * libbfd.h: Regenerate.
6930 * po/SRC-POTFILES.in: Regenerate.
6932 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
6935 2002-05-31 Graeme Peterson <gp@qnx.com>
6937 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
6938 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
6940 * Makefile.in: Regenerate.
6941 * config.bfd: Add i[3456]86-*-nto-qnx* support.
6942 * configure.in: Add bfd_elf32_i386qnx_vec support.
6943 * configure: Regenerate.
6944 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
6945 is_contained_by_filepos, and copy_private_bfd_data_p.
6946 * elf.c (assign_file_positions_for_segments): Call backend
6947 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
6948 (IS_CONTAINED_BY_FILEPOS): Define.
6949 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
6950 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
6951 Fix non-K&R call to _bfd_error_handler.
6952 (_bfd_elf_copy_private_section_data): Use backend
6953 copy_private_bfd_data_p.
6954 * elf32-i386.c: Don't include elfxx-target.h when
6955 ELF32_I386_C_INCLUDED is defined.
6956 * elf32-i386qnx.c: New QNX elf backend file.
6957 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
6958 elf_backend_is_contained_by_filepos, and
6959 elf_backend_do_copy_private_bfd_data.
6960 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
6962 2002-05-31 Alan Modra <amodra@bigpond.net.au>
6964 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
6965 Move other similar defines to start of file.
6967 2002-05-30 Tom Rix <trix@redhat.com>
6969 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
6970 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
6972 2002-05-30 Richard Henderson <rth@redhat.com>
6974 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
6975 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
6976 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
6977 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
6978 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
6979 (struct alpha_elf_obj_tdata): Rename total_got_entries and
6980 n_local_got_entries to total_got_size and local_got_size.
6981 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
6982 (alpha_got_entry_size): New.
6983 (elf64_alpha_relax_with_lituse): Use it.
6984 (elf64_alpha_relax_without_lituse): Likewise.
6985 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
6986 (get_got_entry): New.
6987 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
6988 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
6989 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
6990 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
6991 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
6992 (elf64_alpha_calc_got_offsets): Likewise.
6993 (alpha_dynamic_entries_for_reloc): New.
6994 (elf64_alpha_calc_dynrel_sizes): Use it.
6995 (elf64_alpha_size_dynamic_sections): Likewise.
6996 (elf64_alpha_relocate_section): Handle TLS relocations.
6997 * reloc.c: Add Alpha TLS relocations.
6998 * bfd-in2.h, libbfd.h: Rebuild.
7000 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
7002 * peXXigen.c (pe_print_idata): Remove double printed
7003 import table lines; add Bound-To comment.
7005 2002-05-29 Matt Thomas <matt@3am-software.com>
7007 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
7008 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
7009 (elf32-vax.lo): New rule.
7010 * Makefile.in: Regenerate.
7011 * configure.in (bfd_elf32_vax_vec)
7012 (vaxnetbsd_vec): New vectors.
7013 * configure: Regenerate.
7014 * config.bfd (vax-*-netbsdelf*)
7016 (vax-*-netbsd*): New targets.
7017 * elf32-vax.c: New file.
7018 * reloc.c: Add VAX relocations.
7019 * bfd-in2.h: Regenerate.
7020 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
7022 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
7024 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
7025 and bfd_elf32_bigarm_vec to targ_selvecs.
7027 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
7029 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
7030 with auto-imported symbols.
7032 2002-05-29 Adam Nemet <anemet@lnxw.com>
7034 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
7035 sections only record bfd.
7036 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
7037 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
7038 * bfd-in2.h: Regenerate.
7040 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
7042 * syms.c (_bfd_stab_section_find_nearest_line): Move
7043 declaration and initialisation of saw_line and saw_func out of
7046 2002-05-29 Alan Modra <amodra@bigpond.net.au>
7048 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
7049 (bfd_elf64_get_symbol_info): Define.
7050 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
7052 2002-05-29 Andrey Volkov <avolkov@transas.com>
7054 * cpu-h8300.c: Make default h8300 machine first in machine list.
7056 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
7058 * config.bfd: Added DLX configuraton.
7059 * Makefile.am: Added DLX configuraton.
7060 * configure.in: Added DLX configuraton.
7061 * archures.c: Add DLX architecure.
7062 * reloc.c: Add DLX relocs.
7063 * targets.c: Added DLX target vector.
7064 * configure: Regenerate.
7065 * Makefile.in: Regenreate.
7066 * bfd-in2.h: Regenreate.
7067 * elf32-dlx.c: New file: Support DLX target.
7068 * cpu-dlx.c: New file: Support DLX target.
7070 2002-05-25 Alan Modra <amodra@bigpond.net.au>
7072 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
7074 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
7075 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
7076 strings to point inside function code sym string.
7077 (func_desc_adjust): Likewise.
7078 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
7080 2002-05-24 Michal Ludvig <mludvig@suse.cz>
7082 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
7083 (elf64_x86_64_grok_psinfo): Added.
7085 2002-05-24 TAMURA Kent <kent@netbsd.org>
7087 * config.bfd: Add a target for i386-netbsdpe.
7089 2002-05-24 Alan Modra <amodra@bigpond.net.au>
7091 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
7092 and is_func_descriptor.
7093 (func_desc_adjust): Hide function code sym in shared libs unless
7094 there is a matching exported function descriptor sym.
7096 2002-05-23 Jakub Jelinek <jakub@redhat.com>
7098 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
7099 for symbols from SHF_TLS section.
7100 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
7101 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
7102 (map_sections_to_segments): Build PT_TLS segment if necessary.
7103 (assign_file_positions_for_segments): Likewise.
7104 (get_program_header_size): Account for PT_TLS segment.
7105 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
7106 SEC_THREAD_LOCAL sections to STT_TLS.
7107 * reloc.c: Add 386 and IA-64 TLS relocs.
7108 * section.c (SEC_THREAD_LOCAL): Define.
7109 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
7111 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
7112 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
7114 (struct elf_final_link_info): Add first_tls_sec.
7115 (elf_bfd_final_link): Set first_tls_sec.
7116 Compute elf_hash_table (info)->tls_segment.
7117 (elf_link_output_extsym): Handle STT_TLS symbols.
7118 (elf_link_input_bfd): Likewise.
7119 * syms.c (BSF_THREAD_LOCAL): Define.
7120 * bfd-in2.h: Rebuilt.
7121 * libbfd.h: Rebuilt.
7122 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
7123 elf_i386_mkobject, elf_i386_object_p): New functions.
7124 (elf_howto_table): Add TLS relocs.
7125 (elf_i386_reloc_type_lookup): Support TLS relocs.
7126 (elf_i386_info_to_howto_rel): Likewise.
7127 (struct elf_i386_link_hash_entry): Add tls_type.
7128 (struct elf_i386_obj_tdata): New.
7129 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
7131 (struct elf_i386_link_hash_table): Add tls_ldm_got.
7132 (link_hash_newfunc): Clear tls_type.
7133 (elf_i386_check_relocs): Support TLS relocs.
7134 (elf_i386_gc_sweep_hook): Likewise.
7135 (allocate_dynrelocs): Likewise.
7136 (elf_i386_size_dynamic_sections): Likewise.
7137 (elf_i386_relocate_section): Likewise.
7138 (elf_i386_finish_dynamic_symbol): Likewise.
7139 (bfd_elf32_mkobject, elf_backend_object_p): Define.
7140 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
7141 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
7142 want_tprel, want_dtpmod, want_dtprel.
7143 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
7144 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
7145 R_IA64_LTOFF_TPREL22.
7146 (elf_code_to_howto_index): Add TLS relocs.
7147 (elfNN_ia64_check_relocs): Support TLS relocs.
7148 (allocate_global_data_got): Account for TLS .got data.
7149 (allocate_dynrel_entries): Account for TLS dynamic relocations.
7150 (elfNN_ia64_install_value): Supprt TLS relocs.
7151 (set_got_entry): Support TLS relocs.
7152 (elfNN_ia64_relocate_section): Likewise.
7154 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
7156 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
7157 BLX reloc round the relocation up rather than down.
7158 * coff-arm.c (coff_arm_relocate_section): Likewise.
7160 2002-05-21 H.J. Lu (hjl@gnu.org)
7162 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
7165 2002-05-22 Alan Modra <amodra@bigpond.net.au>
7167 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
7168 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
7170 2002-05-22 Alan Modra <amodra@bigpond.net.au>
7172 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
7174 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
7176 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7178 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
7181 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7183 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
7185 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
7186 return with false on error.
7187 (elf_link_input_bfd): Check reloc_emitter return value.
7189 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
7191 * config.bfd (armeb-*-netbsdelf*): New target.
7193 2002-05-20 Alan Modra <amodra@bigpond.net.au>
7195 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
7196 at the plt call stub.
7198 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7200 * cpu-mips.c (mips_compatible): Don't try to check machine
7203 2002-05-18 Tom Rix <trix@redhat.com>
7205 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
7207 2002-05-17 Alan Modra <amodra@bigpond.net.au>
7209 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
7210 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
7211 we've already warned about an undefined symbol. Report more
7212 detail on reloc errors.
7214 2002-05-17 Alan Modra <amodra@bigpond.net.au>
7216 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
7217 * configure.in: Invoke AM_INSTALL_LIBBFD.
7218 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
7219 (install_libbfd): .. New target.
7220 (uninstall_libbfd): Likewise.
7221 (install-bfdlibLTLIBRARIES): Likewise.
7222 (uninstall-bfdlibLTLIBRARIES): Likewise.
7224 (bfdincludedir): New.
7225 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
7226 * aclocal.m4: Regenerate.
7227 * configure: Regenerate.
7228 * Makefile.in: Regenerate.
7230 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
7232 * hash.c (bfd_hash_lookup): Remove computation of len from inside
7235 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
7237 * config.bfd: Add targets for sh64-linux (little endian and
7240 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
7242 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
7243 is located in the same section as the import table. Instead
7244 check, and if necessary load the section containing the thunk.
7246 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
7248 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
7250 (xcoff64_core_file_matches_executable_p): Replace bfd_read
7253 2002-05-15 Alan Modra <amodra@bigpond.net.au>
7255 * aix5ppc-core.c: Warning fixes.
7256 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
7257 * aout-target.h (MY_bfd_link_just_syms): Define.
7258 * aout-tic30.c (MY_bfd_link_just_syms): Define.
7259 * bfd.c (bfd_link_just_syms): Define.
7260 * binary.c (binary_bfd_link_just_syms): Define.
7261 * bout.c (b_out_bfd_link_just_syms): Define.
7262 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
7263 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
7264 * coffcode.h (coff_bfd_link_just_syms): Define.
7265 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
7266 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
7267 (_bfd_elf_link_just_syms): Declare.
7268 * elf.c (_bfd_elf_link_just_syms): New function.
7269 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
7270 sections haven't already been discarded by the linker.
7271 * elflink.h (elf_link_add_object_symbols): Likewise for stab
7272 sections and SEC_MERGE sections.
7273 (elf_bfd_discard_info): Similarly here.
7274 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
7275 * i386msdos.c (msdos_bfd_link_just_syms): Define.
7276 * i386os9k.c (os9k_bfd_link_just_syms): Define.
7277 * ieee.c (ieee_bfd_link_just_syms): Define.
7278 * ihex.c (ihex_bfd_link_just_syms): Define.
7279 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
7280 (_bfd_generic_link_just_syms): Declare.
7281 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
7282 * linker.c (_bfd_generic_link_just_syms): New function.
7283 * mmo.c (mmo_bfd_link_just_syms): Define.
7284 * nlm-target.h (nlm_bfd_link_just_syms): Define.
7285 * oasys.c (oasys_bfd_link_just_syms): Define.
7286 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
7287 * som.c (som_bfd_link_just_syms): Define.
7288 * srec.c (srec_bfd_link_just_syms): Define.
7289 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
7290 (BFD_JUMP_TABLE_LINK): And here.
7291 * tekhex.c (tekhex_bfd_link_just_syms): Define.
7292 * versados.c (versados_bfd_link_just_syms): Define.
7293 * vms.c (vms_bfd_link_just_syms): Define.
7294 * libbfd.h: Regenerate.
7295 * bfd-in2.h: Regenerate.
7297 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7299 * elf32-mips.c: Remove superfluous definitions copied from
7301 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
7302 SGIish vectors to check the special case.
7303 (mips_elf_hi16_reloc): Fix comment.
7304 (mips_elf_got16_reloc): Likewise.
7305 (_bfd_mips_elf32_gprel16_reloc): Likewise.
7306 (elf_reloc_map): Code cleanup.
7307 (mips_reloc_map): Add comment.
7308 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
7309 (mips_elf32_rtype_to_howto): Likewise.
7310 (mips_elf32_discard_info): Likewise.
7311 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
7312 lead to IRIX compatibility now.
7314 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7316 * elfxx-mips.c: Call it IRIX, not Irix in comments.
7318 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
7320 * config.bfd (shle-*-netbsdelf*): Add target which includes
7323 2002-05-13 David Edelsohn <edelsohn@gnu.org>
7325 * configure.in: Revert 2002-04-07. Instead, auto-configure
7327 * configure: Regenerate.
7328 * config.in: Regenerate.
7329 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
7332 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
7334 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
7336 * configure: Regenerate.
7338 2002-05-13 Alan Modra <amodra@bigpond.net.au>
7340 * Makefile.am (install-data-local): Install headers to
7341 $(exec_prefix)/include.
7342 * Makefile.in: Regenerate.
7344 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
7345 Daniel Jacobowitz <drow@mvista.com>
7347 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
7350 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
7352 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
7353 hppa*-*-openbsd*): New targets.
7354 * configure.in (alpha*-*-openbsd*): Set COREFILE.
7355 * configure: Regenerate.
7357 2002-05-10 Tom Rix <trix@redhat.com>
7359 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
7360 xcoff64_ppc_relocate_section.
7361 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
7362 * libxcoff.h: Common xcoff_reloc_type function declaration.
7364 2002-05-10 Alan Modra <amodra@bigpond.net.au>
7366 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
7367 added in 2002-05-09 commit.
7369 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
7370 don't look for stubs on all undefined syms.
7372 2002-05-09 Alan Modra <amodra@bigpond.net.au>
7374 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
7375 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
7378 * elf32-i386.c (elf_howto_table): Comments.
7379 (elf_i386_relocate_section): Handle more relocs for relocatable
7380 linking and against SEC_MERGE sections.
7382 2002-05-08 Alan Modra <amodra@bigpond.net.au>
7384 * elf32-ppc.c (ppc_elf_create_got): New function.
7385 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
7386 _bfd_elf_create_dynamic_sections. Correct .plt flags.
7387 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
7388 _bfd_elf_create_got_section.
7390 2002-05-07 Alan Modra <amodra@bigpond.net.au>
7392 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
7393 * elfxx-target.h (elf_backend_rela_normal): Define.
7394 (elfNN_bed): Init rela_normal.
7395 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
7396 for section symbols here if rela_normal. Simplify abs section test.
7397 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
7398 return immediately. Remove code handling relocatable linking.
7399 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
7400 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
7401 * elf32-i370.c (i370_elf_relocate_section): Likewise.
7402 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7403 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
7404 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
7405 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7406 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
7407 * elf32-s390.c (elf_s390_relocate_section): Likewise.
7408 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7409 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
7410 * elf64-s390.c (elf_s390_relocate_section): Likewise.
7411 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7412 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
7413 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
7414 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7415 * elf-m10200.c (elf_backend_rela_normal): Define.
7416 * elf-m10300.c (elf_backend_rela_normal): Define.
7417 * elf32-fr30.c (elf_backend_rela_normal): Define.
7418 * elf32-i370.c (elf_backend_rela_normal): Define.
7419 * elf32-i860.c (elf_backend_rela_normal): Define.
7420 * elf32-m68k.c (elf_backend_rela_normal): Define.
7421 * elf32-mcore.c (elf_backend_rela_normal): Define.
7422 * elf32-openrisc.c (elf_backend_rela_normal): Define.
7423 * elf32-ppc.c (elf_backend_rela_normal): Define.
7424 * elf32-s390.c (elf_backend_rela_normal): Define.
7425 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
7426 * elf64-ppc.c (elf_backend_rela_normal): Define.
7427 * elf64-s390.c (elf_backend_rela_normal): Define.
7428 * elf64-x86-64.c (elf_backend_rela_normal): Define.
7429 * elfxx-ia64.c (elf_backend_rela_normal): Define.
7430 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
7431 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
7433 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
7435 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
7436 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
7438 2002-05-06 Alan Modra <amodra@bigpond.net.au>
7440 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
7441 when not relocatable. Fix reloc_emitter call for K&R.
7443 2002-05-04 Alan Modra <amodra@bigpond.net.au>
7445 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
7446 reloading local sym addend mistakenly removed in 2002-05-01 change.
7448 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
7449 (read_abbrevs): Change "offset" param to bfd_vma.
7450 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
7451 Change "abbrev_offset" to bfd_vma.
7452 (read_indirect_string): Use correct conversion chars in error
7453 message format string, cast bfd_vma's to unsigned long.
7454 (read_abbrevs): Likewise.
7455 (read_attribute_value): Likewise.
7456 (decode_line_info): Likewise.
7457 (scan_unit_for_functions): Likewise.
7458 (parse_comp_unit): Likewise.
7460 2002-05-04 Tom Rix <trix@redhat.com>
7462 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
7463 (coff_swap_reloc_out): Same.
7464 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
7465 (xcoff_swap_reloc_out): Same.
7466 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
7467 case some 16 bit relocs. Add reloc value to output.
7468 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
7469 R_RBR. Improve names.
7470 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
7471 (bfd_xcoff_backend_data): Update with new reloc swap names.
7472 (bfd_pmac_xcoff_backend_data) : Same.
7473 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
7474 (xcoff64_swap_reloc_out): Same.
7475 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
7476 R_POS. Add reloc value to output.
7477 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
7478 bit R_RBR. Improve names, masks.
7479 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
7480 (bfd_xcoff_backend_data): Update with new reloc swap names.
7481 (bfd_xcoff_aix5_backend_data) : Same.
7483 2002-05-04 Alan Modra <amodra@bigpond.net.au>
7485 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
7486 bfd_count top_index, input_list, all_local_syms.
7487 (elf32_hppa_setup_section_lists): New function, split from
7488 elf32_hppa_size_stubs.
7489 (elf32_hppa_next_input_section): Likewise.
7490 (group_sections): Likewise.
7491 (get_local_syms): Likewise.
7492 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
7493 stubs on undefined syms too.
7494 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
7495 Only access htab elf fields when we have an elf hash table.
7496 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
7497 (elf32_hppa_next_input_section): Declare.
7499 2002-05-04 Bob Byrnes <byrnes@curl.com>
7501 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
7504 2002-05-03 H.J. Lu (hjl@gnu.org)
7506 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
7507 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
7508 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
7509 to hide a global symbol.
7510 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
7511 forced_local to true.
7513 2002-05-02 Richard Henderson <rth@redhat.com>
7515 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
7516 vs SHN_UNDEF to zero.
7518 2002-05-02 Alan Modra <amodra@bigpond.net.au>
7520 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
7522 <R_PPC64_SECTOFF_DS>: Likewise.
7523 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
7525 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
7526 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
7529 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
7530 (ppc64_elf_ha_reloc): New function.
7531 (ppc64_elf_brtaken_reloc): New function.
7532 (ppc64_elf_sectoff_reloc): New function.
7533 (ppc64_elf_sectoff_ha_reloc): New function.
7534 (ppc64_elf_toc_reloc): New function.
7535 (ppc64_elf_toc_ha_reloc): New function.
7536 (ppc64_elf_toc64_reloc): New function.
7537 (ppc64_elf_unhandled_reloc): New function.
7538 (ppc64_elf_howto_raw): Use the above.
7539 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
7540 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
7541 <R_PPC64_SECTOFF_DS>: Likewise.
7542 (IS_ABSOLUTE_RELOC): Update.
7543 (struct ppc_link_hash_table): Add have_undefweak.
7544 (ppc64_elf_link_hash_table_create): Init.
7545 (func_desc_adjust): Set have_undefweak.
7546 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
7547 add the .sfpr blr when have_undefweak.
7548 (ppc64_elf_setup_section_lists): Check hash table flavour.
7549 (ppc64_elf_next_input_section): Move output_section->owner test to
7551 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
7552 and relocatable test. Return TOCstart and don't set elf_gp.
7553 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
7554 offset calculation. Add assert on weak sym branch tweaks.
7555 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
7556 (ppc64_elf_toc): Declare.
7557 (ppc64_elf_next_input_section): Update.
7559 2002-05-01 Alan Modra <amodra@bigpond.net.au>
7561 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
7564 2002-05-01 Alan Modra <amodra@bigpond.net.au>
7566 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
7567 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
7568 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
7569 call branches. Correct undefined weak destination.
7570 (ppc64_elf_func_desc_adjust): Always create at least one blr in
7571 .sfpr, and correct case where either only savef* or restf* is
7574 Long branch stubs, multiple stub sections.
7575 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
7576 (ppc64_elf_next_input_section): Declare.
7577 * elf64-ppc.c: Move linker-only prototypes.
7578 (STUB_SUFFIX): Define.
7579 (enum ppc_stub_type): New.
7580 (struct ppc_stub_hash_entry): New.
7581 (struct ppc_branch_hash_entry): New.
7582 (struct ppc_link_hash_entry): Add stub_cache, oh.
7583 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
7584 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
7585 Rename plt_overflow to stub_error.
7586 (ppc_stub_hash_lookup): Define.
7587 (ppc_branch_hash_lookup): Define.
7588 (stub_hash_newfunc): New function.
7589 (branch_hash_newfunc): New function.
7590 (link_hash_newfunc): Init new fields.
7591 (ppc64_elf_link_hash_table_create): Likewise.
7592 (ppc64_elf_link_hash_table_free): New function.
7593 (ppc_stub_name): New function.
7594 (ppc_get_stub_entry): New function.
7595 (ppc_add_stub): New function.
7596 (create_linkage_sections): Use bfd_make_section_anyway. Create
7597 .branch_lt and .rela.branch_lt sections. Don't create .stub.
7598 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
7599 and set up for plt call stubs. Link func and func desc syms.
7600 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
7601 (func_desc_adjust): Avoid hash lookup when func desc sym available
7602 via shortcut, and set links when processing.
7603 (ppc64_elf_hide_symbol): Likewise.
7604 (allocate_dynrelocs): Don't allocate stub section here.
7605 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
7607 (ppc_type_of_stub): New function.
7608 (build_one_stub): Delete.
7609 (ppc_build_one_stub): New function.
7610 (ppc_size_one_stub): New function.
7611 (ppc64_elf_setup_section_lists): New function.
7612 (ppc64_elf_next_input_section): New function.
7613 (group_sections): New function.
7614 (get_local_syms): New function.
7615 (ppc64_elf_size_stubs): Rewrite.
7616 (ppc64_elf_build_stubs): Rewrite.
7617 (ppc64_elf_relocate_section): Look up stub entry for REL24
7618 relocs. Don't propagate REL14* to dynamic objects. Look for long
7619 branch stubs if REL14* or REL24 relocs won't reach.
7620 (bfd_elf64_bfd_link_hash_table_free): Define.
7622 2002-04-30 Mark Mitchell <mark@codesourcery.com>
7624 * config.bfd: Add support for powerpc-*-windiss.
7626 2002-04-30 Tom Rix <trix@redhat.com>
7628 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
7629 symbol names into the hash table.
7631 2002-04-28 Tom Rix <trix@redhat.com>
7633 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
7634 calulating relocations.
7635 (xcoff_complain_overflow) : Function table for relocation errors.
7636 (xcoff_ppc_relocate_section): Use relocation and complain function
7638 (xcoff_complain_overflow_unsigned_func): New complain function.
7639 (xcoff_complain_overflow_signed_func): Same.
7640 (xcoff_complain_overflow_bitfield_func): Same.
7641 (xcoff_complain_overflow_dont_func): Same.
7642 (xcoff_reloc_type_crel): New recot function.
7643 (xcoff_reloc_type_br): Same.
7644 (xcoff_reloc_type_ba): Same.
7645 (xcoff_reloc_type_toc): Same.
7646 (xcoff_reloc_type_rel): Same.
7647 (xcoff_reloc_type_neg): Same.
7648 (xcoff_reloc_type_pos): Same.
7649 (xcoff_reloc_type_fail): Same.
7650 (xcoff_reloc_type_noop): Same.
7651 * libxcoff.h : Declare common parts for xcoff64.
7652 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
7653 and complain function tables.
7655 2002-04-28 Alan Modra <amodra@bigpond.net.au>
7657 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
7658 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
7660 2002-04-26 Alan Modra <amodra@bigpond.net.au>
7662 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
7663 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
7665 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
7666 same as the output before calling elf_link_input_bfd.
7668 * coffcode.h (coff_compute_section_file_positions): Set
7669 section_tail after shuffling section list.
7671 2002-04-24 Christian Groessler <chris@groessler.org>
7673 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
7674 addresses are 23bit with a special layout, not plain 32bit
7675 values. Prevent relocation of immediate values.
7677 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
7679 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
7680 MIPS-16 ASE flags are set, print something to indicate that.
7682 2002-04-23 Alan Modra <amodra@bigpond.net.au>
7684 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
7685 under which a plt call stub is used.
7686 (final_link_relocate): Similarly.
7687 (allocate_plt_static): Clear h-plabel except when plt entry is
7688 exclusively used for a plabel.
7689 (allocate_dynrelocs): Use the above to simplify plt sizing.
7690 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
7691 (elf32_hppa_link_hash_table_create): Init.
7693 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
7694 (elf32_hppa_check_relocs): Set has_22bit_branch.
7696 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
7697 (final_link_relocate): Likewise.
7699 2002-04-22 Jakub Jelinek <jakub@redhat.com>
7701 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
7702 search table if some FDE is DW_EH_PE_aligned encoded either.
7703 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
7705 2002-04-22 Richard Smith <richard@ex-parrot.com>
7706 Jakub Jelinek <jakub@redhat.com>
7708 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
7709 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
7710 encoded personality.
7711 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
7712 for CIE/FDE removal.
7714 2002-04-20 Tom Rix <trix@redhat.com>
7716 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
7718 2002-04-20 Alan Modra <amodra@bigpond.net.au>
7720 * archures.c (bfd_lookup_arch): Move the list order comment..
7721 (struct bfd_arch_info): ..to where it belongs.
7722 * bfd-in2.h: Regenerate.
7724 * archures.c (bfd_lookup_arch): Add comment on list order.
7725 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
7726 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
7727 is always at head of list.
7729 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
7731 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
7732 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
7733 definition of these functions for ARM_WINCE builds as they are
7735 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
7736 for ARM_WINCE builds.
7738 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
7740 * coff-arm.c (bfd_arm_process_before_allocation):
7742 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
7744 * cpu-sh.c (scan_mach): Delete.
7745 (arch_info_struct): Replace scan_mach with bfd_default_scan.
7746 (bfd_sh_arch): Likewise.
7748 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
7750 * ihex.c (ihex_write_object_contents): Fix check for records
7751 crossing 64K boundaries.
7753 2002-04-16 Alan Modra <amodra@bigpond.net.au>
7755 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
7756 type rather than just assuming entries are ELF.
7757 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
7758 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
7759 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
7760 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
7761 rather than elf_link_hash_entry.
7763 2002-04-15 Richard Henderson <rth@redhat.com>
7765 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
7768 2002-04-15 Michael Snyder <msnyder@redhat.com>
7770 * opncls.c (bfd_close): Write contents if writeable.
7771 Minor formatting tidy-ups.
7773 2002-04-15 Alan Modra <amodra@bigpond.net.au>
7775 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
7777 2002-04-12 Michael Snyder <msnyder@redhat.com>
7779 * bfd-in.h (bfd_get_section_lma): New access macro.
7780 Minor white-space fix-up.
7782 2002-04-12 Alan Modra <amodra@bigpond.net.au>
7784 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
7787 2002-04-09 DJ Delorie <dj@redhat.com>
7789 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
7791 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
7793 * coffcode.h (coff_read_word): New.
7794 (coff_compute_checksum): New.
7795 (coff_apply_checksum): New.
7796 (coff_write_object_contents): Call coff_apply_checksum () to
7797 apply checksum to PE image.
7799 2002-04-08 Randolph Chung <tausq@debian.org>
7801 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
7802 (elf32_hppa_final_link): Split out sorting logic to..
7803 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
7804 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
7806 2002-04-07 Andrew Cagney <ac131313@redhat.com>
7808 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
7810 * configure: Re-generate.
7812 2002-04-07 Andrew Cagney <ac131313@redhat.com>
7814 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
7815 is greater or equal to 4.3.3.
7816 * configure: Regenerate.
7819 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
7821 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
7822 R_CRIS_32_PCREL>: Fix typo in name.
7823 (cris_elf_check_relocs): Always create .rela.got here when
7824 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
7825 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
7826 assume it's created.
7828 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
7830 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
7831 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
7833 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
7834 * bfd.c (bfd_link_hash_table_free): Define.
7835 * binary.c (binary_bfd_link_hash_table_free): Define.
7836 * bout.c (b_out_bfd_link_hash_table_free): Define.
7837 * coff-rs6000.c (rs6000coff_vec): Include
7838 _bfd_generic_link_hash_table_free.
7839 (pmac_xcoff_vec): Likewise.
7840 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
7841 (aix5coff64_vec): Likewise.
7842 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
7843 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
7844 (bfd_elf32_bfd_link_hash_table_free): Define.
7845 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
7846 (bfd_elf32_bfd_link_hash_table_free): Define.
7847 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
7849 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
7850 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
7851 * ieee.c (ieee_bfd_link_hash_table_free): Define.
7852 * ihex.c (ihex_bfd_link_hash_table_free): Define.
7853 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
7854 (_bfd_generic_link_hash_table_free): Add prototype.
7855 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
7856 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
7857 * linker.c (_bfd_generic_link_hash_table_free): New function.
7858 * mmo.c (mmo_bfd_link_hash_table_free): Define.
7859 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
7860 * oasys.c (oasys_bfd_link_hash_table_free): Define.
7861 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
7862 * som.c (som_bfd_link_hash_table_free): Define.
7863 * srec.c (srec_bfd_link_hash_table_free): Define.
7864 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
7865 * versados.c (versados_bfd_link_hash_table_free): Define.
7866 * vms.c (vms_bfd_link_hash_table_free): New function.
7867 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
7869 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
7870 instead of bfd_alloc.
7871 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
7872 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
7873 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
7874 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
7875 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
7876 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
7877 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
7878 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
7879 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
7880 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
7881 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
7882 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
7883 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
7884 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
7885 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
7886 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
7887 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
7888 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
7889 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
7890 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
7891 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
7892 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
7893 * m68klinux.c (linux_link_hash_table_create): Likewise.
7894 * sparclinux.c (linux_link_hash_table_create): Likewise.
7895 * sunos.c (sunos_link_hash_table_create): Likewise.
7896 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
7898 * targets.c: Add _bfd_link_hash_table_free to xvec.
7900 * bfd-in2.h: Regenerate.
7901 * libbfd.h: Regenerate.
7902 * libcoff.h: Regenerate.
7904 2002-04-04 Alan Modra <amodra@bigpond.net.au>
7906 * dep-in.sed: Cope with absolute paths.
7907 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
7909 * Makefile.in: Regenerate.
7910 * coff-arm.c: Fix copyright date.
7911 * cpu-h8300.c: Likewise.
7912 * cpu-i370.c: Likewise.
7913 * cpu-s390.c: Likewise.
7914 * cpu-mips.c: Likewise.
7915 * po/SRC-POTFILES.in: Regenerate.
7917 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7919 * Makefile.am: Add elfxx-mips.c to the known backends.
7920 (elf32-mips.lo): remove dependency to coff/external.h.
7921 * Makefile.in: Regenerate.
7922 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
7923 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
7925 * configure: Regenerate.
7926 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
7927 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
7928 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
7929 MIPS specific backend functions.
7930 * elf32-mips.c: Moved most code to elfxx-mips.c.
7931 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
7933 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
7934 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
7935 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
7936 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
7937 interface to allow selection of the right REL or RELA howto table.
7938 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
7939 static. Let it refuse n32 objects.
7940 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
7941 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
7942 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
7943 (elf32_mips_ignore_discarded_relocs): Rename from
7944 _bfd_elf32_mips_ignore_discarded_relocs.
7945 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
7946 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
7947 (elf_mips_howto_table_rela): Remove.
7948 * elf64-mips.c: Moved most code to elfxx-mips.c.
7949 (bfd_elf64_bfd_reloc_type_lookup): Make static.
7950 (mips_elf64_rtype_to_howto): New function.
7951 (mips_elf64_object_p): Likewise.
7952 (elf64_mips_irix_compat): Likewise.
7953 * elfxx-mips.c: New file containing common code merged together from
7954 elf32-mips.c and elf64-mips.c.
7955 * elfxx-mips.h: New file containing MIPS specific prototypes from
7957 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
7958 elf_backend_mips_rtype_to_howto.
7960 2002-04-04 Alan Modra <amodra@bigpond.net.au>
7962 * srec.c (MAXCHUNK, Chunk): Revise comments.
7963 (srec_write_record): Correct buffer size.
7964 (srec_write_header): Do without intermediate buffer.
7965 (srec_write_section): Validate Chunk.
7966 (srec_write_terminator): Pass NULL instead of dummy buffer.
7967 (srec_write_symbols): Pass file and symbol names directly to
7968 bfd_bwrite so sprintf won't overflow buffer.
7970 2002-04-03 Jakub Jelinek <jakub@redhat.com>
7972 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
7973 PC relative relocs against hidden symbols.
7974 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7976 2002-04-03 Alan Modra <amodra@bigpond.net.au>
7978 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
7979 LMAs, loop over segments until p_vaddr and p_memsz specify an
7980 extent enclosing the section.
7982 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
7984 * ihex.c (ihex_write_object_contents): Do not allow records to
7985 cross a 64K boundary - wrap if necessary.
7987 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
7989 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
7990 which caused the returned LWP ID to always be 0.
7992 2002-04-01 Richard Henderson <rth@redhat.com>
7994 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
7995 (elf32_sparc_relocate_section): Use it to figure out when to
7996 initialize .got entries.
7997 * elf64-sparc.c: Similarly.
7999 2002-03-28 Alan Modra <amodra@bigpond.net.au>
8001 * linker.c (link_action): Ignore duplicate warning syms.
8002 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
8003 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
8004 (elf_adjust_dynamic_symbol): Likewise.
8005 (elf_export_symbol): Likewise.
8006 (elf_link_find_version_dependencies): Likewise.
8007 (elf_link_assign_sym_version): Likewise.
8008 (elf_link_sec_merge_syms): Likewise.
8009 (elf_link_output_extsym): Likewise.
8010 (elf_gc_sweep_symbol): Likewise.
8011 (elf_gc_propagate_vtable_entries_used): Likewise.
8012 (elf_gc_smash_unused_vtentry_relocs): Likewise.
8013 (elf_gc_allocate_got_offsets): Likewise.
8014 (elf_collect_hash_codes): Likewise.
8015 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
8016 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
8017 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
8018 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
8019 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
8020 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
8021 (elf_cris_discard_excess_dso_dynamics): Likewise.
8022 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
8023 (mark_PIC_calls): Likewise.
8024 (allocate_plt_static): Likewise.
8025 (allocate_dynrelocs): Likewise.
8026 (readonly_dynrelocs): Likewise.
8027 * elf32-i386.c (allocate_dynrelocs): Likewise.
8028 (readonly_dynrelocs): Likewise.
8029 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
8030 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
8031 * elf32-mips.c (mips_elf_output_extsym): Likewise.
8032 (mips_elf_sort_hash_table_f): Likewise.
8033 (mips_elf_check_mips16_stubs): Likewise.
8034 * elf32-s390.c (allocate_dynrelocs): Likewise.
8035 (readonly_dynrelocs): Likewise.
8036 * elf32-sh.c (sh_elf_discard_copies): Likewise.
8037 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
8038 (xstormy16_relax_plt_realloc): Likewise.
8039 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
8040 (elf64_alpha_output_extsym): Likewise.
8041 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
8042 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
8043 (mips_elf64_check_mips16_stubs): Likewise.
8044 (mips_elf64_output_extsym): Likewise.
8045 * elf64-ppc.c (func_desc_adjust): Likewise.
8046 (allocate_dynrelocs): Likewise.
8047 (readonly_dynrelocs): Likewise.
8048 * elf64-s390.c (allocate_dynrelocs): Likewise.
8049 (readonly_dynrelocs): Likewise.
8050 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
8051 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
8052 (readonly_dynrelocs): Likewise.
8053 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
8054 * aoutx.h (aout_link_write_other_symbol): Likewise.
8055 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
8056 (_bfd_coff_write_global_sym): Likewise.
8057 * i386linux.c (linux_tally_symbols): Likewise.
8058 * m68klinux.c (linux_tally_symbols): Likewise.
8059 * sparclinux.c (linux_tally_symbols): Likewise.
8060 * pdp11.c (aout_link_write_other_symbol): Likewise.
8061 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
8062 * xcofflink.c (xcoff_build_ldsyms): Likewise.
8063 (xcoff_write_global_symbol): Likewise.
8065 * cofflink.c (_bfd_coff_final_link): Formatting.
8066 * cpu-mips.c (mips_compatible): Make static, prototype.
8067 * elf32-i386.c (elf_i386_check_relocs): Formatting.
8068 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
8069 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
8070 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
8071 (mips_elf64_final_link): Likewise.
8072 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
8075 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
8077 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
8078 (SWAP_OUT_RELOC_OFFSET): Define.
8080 2002-03-27 Gregory Steuck <greg@nest.cx>
8082 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
8083 terminating NULL if empty symbol table.
8084 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
8086 2002-03-26 H.J. Lu (hjl@gnu.org)
8088 * elflink.h (elf_link_input_bfd): Revert the last change since
8089 the gcc exception handling isn't fixed yet.
8091 2002-03-26 H.J. Lu (hjl@gnu.org)
8093 * elflink.h (elf_link_input_bfd): Complain about relocations
8094 against local symbols in discarded sections.
8096 2002-03-26 Alan Modra <amodra@bigpond.net.au>
8098 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
8100 2002-03-23 Alan Modra <amodra@bigpond.net.au>
8102 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
8103 section file offset for !SEC_LOAD sections.
8105 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
8107 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
8108 <case R_ARM_GOT>): Handle relocations to Thumb functions.
8110 2002-03-21 Alan Modra <amodra@bigpond.net.au>
8112 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
8114 * archive.c: Update copyright date.
8115 * bfd-in2.h: Regenerate.
8116 * libbfd.h: Regenerate.
8117 * Makefile.am: Run "make dep-am"
8118 * Makefile.in: Regenerate.
8119 * po/SRC-POTFILES.in: Regenerate.
8121 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
8123 * dwarf2.c (struct funcinfo): Move up.
8124 (lookup_address_in_function_table): New argument function_ptr.
8126 (lookup_address_in_line_table): New argument function. If function
8127 is non-NULL, use it to handle ``addr'' before the first line note of
8129 (comp_unit_find_nearest_line): Update and swap calls to
8130 lookup_address_in_function_table and lookup_address_in_line_table.
8131 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
8132 N_SLINE encountered if we see an N_FUN before any N_SLINE.
8134 2002-03-20 Tom Rix <trix@redhat.com>
8136 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
8137 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
8138 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
8140 2002-03-19 Tom Rix <trix@redhat.com>
8142 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
8143 dynamic objects in archives.
8145 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
8147 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
8148 STT_NOTYPE symbols to STT_OBJECT.
8150 2002-03-18 Jan Hubicka <jh@suse.cz>
8152 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
8154 2002-03-18 Tom Rix <trix@redhat.com>
8156 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
8157 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
8158 * coff-rs6000 (do_pad) : New function for archive padding.
8159 (do_copy) : New function for object file copying in archives.
8160 (do_shared_object_padding) : New function for padding shared
8161 objects to their text section alignment in archives.
8162 (bfd_xcoff_ar_achive_set_magic) : Stub.
8163 (xcoff_write_armap_big) : Use do_copy and do_pad.
8164 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
8166 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
8167 bfd_xcoff_magic_number.
8168 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
8170 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
8171 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
8172 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
8173 * rs6000-core.c : Update copyright date.
8174 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
8176 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
8177 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
8178 (coff_set_flags) : Use bfd_xcoff_magic_number.
8179 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
8180 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
8181 * Makefile.am : Same.
8182 * config.bfd : Same.
8184 * configure : Regnerate.
8185 * Makefile.in : Same.
8188 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
8190 * po/fr.po: Updated version.
8192 2002-03-18 Alan Modra <amodra@bigpond.net.au>
8194 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
8195 * libbfd.h: Regenerate.
8196 * archive.c (coff_write_armap): Pass on failures from
8197 bfd_write_bigendian_4byte_int.
8199 2002-03-14 H.J. Lu <hjl@gnu.org>
8201 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
8202 error to bfd_error_nonrepresentable_section for reinit_array
8205 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
8207 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
8208 OR it in rather than replacing previously selected flags.
8210 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
8211 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
8213 2002-03-14 Alan Modra <amodra@bigpond.net.au>
8215 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
8217 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
8218 ensure reloc size matches before calling elf_link_input_bfd.
8219 Add an assert to check reloc size when counting output relocs.
8221 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
8223 * mmo.c (mmo_get_loc): Return NULL rather than false.
8225 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
8227 * po/fr.po: Updated version.
8229 2002-03-13 Alan Modra <amodra@bigpond.net.au>
8231 * archures.c (bfd_default_compatible): Test bits_per_word.
8232 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
8233 bfd_default_compatible.
8234 * cpu-i370.c (i370_compatible): Likewise.
8235 * cpu-sparc.c (sparc_compatible): Likewise.
8236 * cpu-h8300.c (compatible): Test in->arch == out->arch.
8238 * elflink.h: Formatting fixes.
8239 (elf_link_output_extsym): Merge undefined and undef weak cases.
8241 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
8242 when word size of input matches output word size.
8244 2002-03-12 Andreas Jaeger <aj@suse.de>
8246 * cpu-i386.c (i386_compatible): New. Use it instead of
8247 bfd_default_compatible.
8249 2002-03-07 H.J. Lu (hjl@gnu.org)
8251 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
8252 as the type for bfd_reloc_val.
8254 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
8256 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
8257 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
8258 (elf_hppa_final_link_relocate): Correct relocations for indirect
8259 references to local data through the DLT. Fix .opd creation for
8260 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
8261 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
8262 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
8263 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
8264 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
8265 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
8266 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
8268 2002-03-05 Jakub Jelinek <jakub@redhat.com>
8270 * merge.c (_bfd_merge_sections): Don't segfault if there
8271 is nothing to merge due to GC.
8273 2002-03-05 Alan Modra <amodra@bigpond.net.au>
8275 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
8276 symbols that have been forced local.
8278 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
8279 to output forced local syms for non-shared link.
8280 (elf_link_output_extsym): Tweak condition for calling backend
8281 adjust_dynamic_symbol so that previous behaviour is kept.
8282 Whitespace changes throughout file.
8284 2002-03-04 H.J. Lu <hjl@gnu.org>
8286 * elf.c (bfd_section_from_shdr): Handle special sections,
8287 .init_array, .fini_array and .preinit_array.
8288 (elf_fake_sections): Likewise.
8290 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
8291 DT entry only if the section is in output for .init_array,
8292 .fini_array and .preinit_array. Complain about .preinit_array
8294 (elf_bfd_final_link): Warn zero size for .init_array,
8295 .fini_array and .preinit_array sections.
8297 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
8298 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
8299 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
8302 2002-03-04 Alan Modra <amodra@bigpond.net.au>
8304 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
8305 * configure: Regenerate.
8307 2002-03-02 Tom Rix <trix@redhat.com>
8309 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
8311 * coff-rs6000.c (xcoff_howto_table): Same.
8313 2002-03-01 David Mosberger <davidm@hpl.hp.com>
8315 * elflink.h (size_dynamic_sections): If section named
8316 ".preinit_array" exists, create DT_PREINIT_ARRAY and
8317 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
8318 ".init_array" and ".fini_array".
8319 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
8320 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
8323 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
8325 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
8328 2002-02-25 Alan Modra <amodra@bigpond.net.au>
8330 * elf64-hppa.h: Update copyright date.
8332 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
8333 (ppc64_elf_relocate_section): Don't generate power4 style branch
8334 hints for *_BRTAKEN and *_BRNTAKEN relocs.
8336 2002-02-22 Jakub Jelinek <jakub@redhat.com>
8338 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
8340 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8342 2002-02-21 Andreas Jaeger <aj@suse.de>
8344 * elf64-x86-64.c: Major rework that introduces all recent changes
8345 to the x86-64 backend. Get a closer match to elf32-i386.
8346 (struct elf64_x86_64_dyn_relocs): Rename from
8347 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
8349 (struct elf64_x86_64_link_hash_table): Add short cuts to some
8351 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
8352 remove casts, initialize new hash members.
8353 (create_got_section): New.
8354 (elf64_x86_64_create_dynamic_sections): New.
8355 (elf64_x86_64_copy_indirect_symbol): New.
8356 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
8357 relocs, .got or .relgot here but do it in allocate_dynrelocs.
8358 Reference count possible .plt and .got entries. Don't test input
8359 section SEC_READONLY here to try to avoid copy relocs, and keep
8360 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
8361 DF_TEXTREL here. Delay setting of variables until needed. Cache
8362 pointer to "sreloc" section in elf_section_data. Tweak condition
8363 under which .got created. Report files with bad relocation
8365 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
8366 Reference count possible .plt entries. Don't deallocate .got and
8368 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
8369 do copy reloc processing for weakdefs. Remove redundant casts and
8370 aborts. Delay setting of vars until needed. Move creation of
8371 dynamic symbols and allocation of .plt and .rela.plt to
8372 allocate_dynrelocs. Replace BFD_ASSERT with abort.
8373 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
8374 (allocate_dynrelocs): New.
8375 (readonly_dynrelocs): New.
8376 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
8377 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
8378 Zero out the dynamic allocated content space.
8379 (elf64_x86_64_discard_copies): Removed.
8380 (elf64_x86_64_relocate_section): Make use of dynamic section
8381 short-cuts. Localise vars, and delay setting. Better error
8382 reporting, replace BFD_ASSERT with abort. Check
8383 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
8384 regular object file and tread the weak definition as the normal
8385 one. Don't discard relocs for undefweak or undefined symbols and
8386 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
8388 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
8389 symbols that have been forced local. Use same test to decide if
8390 we can use a relative reloc for got as relocate_section. Expand
8391 SHN_UNDEF comment. Move expressions out of function calls.
8392 Replace BFD_ASSERT with abort.
8393 (bfd_elf64_bfd_final_link): Removed.
8394 (elf_backend_copy_indirect_symbol): Define.
8396 2002-02-20 Tom Rix <trix@redhat.com>
8398 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
8399 (_bfd_xcoff_reloc_type_lookup): Use it.
8400 * coff64-rs6000.c (xcoff64_howto_table): Same.
8401 (xcoff64_reloc_type_lookup): Same.
8403 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
8405 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
8408 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
8410 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
8411 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
8412 * bfd-in2.h: Regenerate.
8413 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
8414 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
8416 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
8417 (elf_s390_reloc_type_lookup): Likewise.
8418 (elf_s390_check_relocs): Likewise.
8419 (elf_s390_gc_sweep_hook): Likewise.
8420 (elf_s390_relocate_section): Likewise.
8421 (elf_s390_object_p): Use renamed architecture define.
8422 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
8424 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
8426 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
8428 2002-02-19 Jakub Jelinek <jakub@redhat.com>
8430 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
8431 absptr -> pcrel optimization for shared libs.
8432 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
8433 library cannot be converted to pcrel.
8434 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
8436 * elf32-i386.c (elf_i386_relocate_section): If
8437 _bfd_elf_section_offset returned -2, skip, but make sure the
8438 relocation is installed.
8439 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
8440 * elf32-cris.c (cris_elf_relocate_section): Likewise.
8441 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
8442 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8443 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8444 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8445 * elf32-s390.c (elf_s390_relocate_section): Likewise.
8446 * elf32-sh.c (sh_elf_relocate_section): Likewise.
8447 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
8448 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8449 * elf64-s390.c (elf_s390_relocate_section): Likewise.
8450 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
8451 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8452 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8453 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
8454 _bfd_elf_section_offset returning -2 the same way as -1.
8455 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
8456 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
8458 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
8460 2002-02-18 Tom Rix <trix@redhat.com>
8462 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
8463 (bfd_xcoff_size_dynamic_sections): Same.
8464 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
8465 (bfd_xcoff_size_dynamic_sections): Same.
8466 * coff-rs6000.c (xcoff_generate_rtinit): Same.
8467 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
8468 * libxcoff.h (struct xcoff_backend_data_rec): Same.
8469 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
8470 * bfd-in2.h: Regenerate.
8472 2002-02-18 Alan Modra <amodra@bigpond.net.au>
8474 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
8475 (struct ppc_link_hash_table): Add sfpr.
8476 (ppc64_elf_link_hash_table_create): Init it.
8477 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
8479 (create_linkage_sections): ..here. Make .sfpr too.
8480 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
8482 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
8483 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
8484 ._restf* functions, and create as needed.
8485 (func_desc_adjust): Only force_local for shared libs.
8487 2002-02-18 David O'Brien <obrien@FreeBSD.org>
8489 * configure.in: Bump version number post 2.12 branching.
8490 * configure: Regenerate.
8492 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
8494 * mmo.c: Correct and improve comments.
8495 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
8496 zero-pad. Use input to fill up non-empty bfd buffer.
8497 (mmo_flush_chunk): New function.
8498 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
8499 changed. Don't emit location specifier if VMA is same as
8500 *LAST_VMAP after omitting leading zero contents. Call
8501 mmo_flush_chunk before emitting location specifier.
8502 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
8503 with mmo_write_loc_chunk calls.
8504 (mmo_internal_write_section): Call mmo_flush_chunk after
8506 (mmo_write_symbols_and_terminator): Move :Main to first position
8507 in symbol array. Add faked one if it does not exist if there are
8508 other symbols. Don't add it if there are no symbols at all. Move
8509 out test for value of :Main from symbol loop. Rename table
8510 fakemain to maintable and variable mainsym to fakemain.
8512 2002-02-15 Richard Henderson <rth@redhat.com>
8514 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
8515 section with no got matches any got. Simplify error generaion.
8517 2002-02-15 Alan Modra <amodra@bigpond.net.au>
8519 Support arbitrary length fill patterns.
8520 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
8521 (_bfd_default_link_order): Remove bfd_fill_link_order code.
8522 Call default_data_link_order.
8523 (default_fill_link_order): Delete.
8524 (default_data_link_order): New function.
8525 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
8526 of bfd_fill_link_order with bfd_data_link_order.
8527 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
8528 * elf64-mips.c (mips_elf64_final_link): Likewise.
8530 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
8531 Correct value returned in "end" for "0x<non-hex>".
8533 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
8535 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
8536 (scan): Test against 'mach' field in info structure.
8538 2002-02-14 Alan Modra <amodra@bigpond.net.au>
8540 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
8542 2002-02-14 Matt Fredette <fredette@netbsd.org>
8544 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
8547 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
8549 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
8550 non-zero physical addresses when adjusting the LMAs of new
8553 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
8555 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
8556 from _bfd_elf_hppa_gen_reloc_type.
8557 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
8558 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
8559 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
8560 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
8562 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
8564 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
8565 loading its contents if there's nothing to do in it.
8567 2002-02-12 Alan Modra <amodra@bigpond.net.au>
8569 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
8572 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
8573 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
8574 (ppc64_elf_finish_dynamic_sections): Set values for them.
8576 2002-02-11 Michael Snyder <msnyder@redhat.com>
8578 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
8579 * elf.c (elfcore_grok_pstatus): Add prototype.
8580 (elfcore_grok_lwpstatus): Add prototype.
8581 (elfcore_write_lwpstatus): New function.
8582 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
8584 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
8586 * elf32-sh.c: Added missing prototypes.
8587 * elf32-sh64.c: Likewise.
8588 (sh_elf_align_loads): Mark unused args as such.
8589 * elf64-sh64.c: Added missing prototypes.
8590 (struct elf_sh64_link_hash_entry): Fix typo.
8591 (sh_elf64_relocate_section): Fix info argument passed to
8592 _bfd_elf_section_offset.
8594 2002-02-11 Alan Modra <amodra@bigpond.net.au>
8596 * Makefile.am: "make dep-am".
8597 * Makefile.in: Regenerate.
8598 * aclocal.m4: Regenerate.
8599 * config.in: Regenerate.
8600 * configure: Regenerate.
8602 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
8604 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
8606 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
8608 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
8609 cast warnings for the common case.
8611 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
8613 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
8615 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
8618 2002-02-09 Richard Henderson <rth@redhat.com>
8620 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
8621 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
8622 (elf64_alpha_relocate_section): Likewise.
8623 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
8624 * bfd-in2.h, libbfd.h: Rebuild.
8626 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
8628 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
8629 that base-plus-offset reloc accounting is consistent.
8630 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
8631 up to date for undefined symbols.
8633 2002-02-08 Eric Christopher <echristo@redhat.com>
8635 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
8637 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
8638 sections for the O32 ABI.
8640 2002-02-08 Chris Demetriou <cgd@broadcom.com>
8642 * elf32-arm.h: Fix formatting of _("...").
8643 * elf32-d10v.c: Likewise.
8644 * elf32-m68k.c: Likewise.
8645 * elf32-mips.c: Likewise.
8647 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
8649 * coff-or32.c: Fix compile time warning messages.
8651 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
8653 Contribute sh64-elf.
8654 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
8655 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
8656 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
8657 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
8658 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
8659 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
8660 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
8661 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
8662 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
8663 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
8665 * libbfd.h, bfd-in2.h: Rebuilt.
8666 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
8667 (sh_reloc_map): Map them.
8668 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
8669 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
8670 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
8671 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
8672 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
8673 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
8674 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
8675 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
8676 datalabel_got_offset.
8677 (sh_elf_link_hash_newfunc): Initialize it.
8678 (sh_elf_relocate_section): Augment the scope of
8679 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
8680 GOT and GOTOFF handling to new SHmedia relocation types. Support
8682 (sh_elf_check_relocs): Likewise.
8683 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
8684 PLT entries using movi_shori_putval. Support GOT_BIAS.
8685 (sh_elf_finish_dynamic_sections): Likewise.
8686 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
8687 relocation, it's now done by the caller.
8689 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
8690 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
8691 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
8692 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
8693 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
8694 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
8695 sh64_elf64_hash_table): New.
8696 (sh_elf64_howto_table): Introduce new relocs.
8697 (sh_elf64_info_to_howto): Accept new PIC relocs.
8698 (sh_elf64_relocate_section): Augment the scope of
8699 seen_stt_datalabel. Support new PIC relocs.
8700 (sh_elf64_check_relocs): Support new PIC relocs.
8701 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
8702 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
8703 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
8704 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
8705 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
8706 movi_shori_putval, movi_3shori_putval,
8707 sh64_elf64_create_dynamic_sections,
8708 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
8709 sh64_elf64_size_dynamic_sections,
8710 sh64_elf64_finish_dynamic_symbol,
8711 sh64_elf64_finish_dynamic_sections): New.
8712 (elf_backend_create_dynamic-sections,
8713 bfd_elf64_bfd_link_hash_table_create,
8714 elf_backend_adjust_dynamic_symbol,
8715 elf_backend_size_dynamic_sections,
8716 elf_backend_finish_dynamic_symbol,
8717 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
8718 elf_backend_plt_readonly, elf_backend_want_plt_sym,
8719 elf_backend_got_header_size, elf_backend_plt_header_size):
8721 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
8722 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
8723 match official numbers and names; moved unmaching ones to the
8725 * elf32-sh64.c, elf64-sh64.c: Likewise.
8726 2001-03-12 DJ Delorie <dj@redhat.com>
8727 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
8729 2001-03-12 DJ Delorie <dj@redhat.com>
8730 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
8732 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
8733 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
8734 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
8735 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
8736 .cranges section with SEC_SORT_ENTRIES set.
8737 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
8738 incoming sorted .cranges section.
8739 (sh64_bfd_elf_copy_private_section_data): New.
8740 (sh64_elf_final_write_processing): Only sort .cranges and modify
8741 start address if called by linker.
8742 2001-01-08 Ben Elliston <bje@redhat.com>
8743 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
8744 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
8745 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
8746 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
8747 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
8748 line. Add comments before all entries.
8749 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
8751 (sh_elf64_reloc): Correct head comment.
8752 (sh_elf64_relocate_section): Correct spacing.
8753 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
8754 instead call reloc_dangerous callback.
8755 <case R_SH_SHMEDIA_CODE>: New case.
8756 (sh_elf64_gc_mark_hook): Correct spacing.
8757 (sh_elf64_check_relocs): Ditto.
8758 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
8760 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
8762 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
8763 clarify describing comment. Add comments before all entries.
8764 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
8765 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
8766 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
8767 Sort .cranges section in final link. Prepare to set bit 0 on
8769 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
8770 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
8771 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
8773 (sh64_backend_section_from_shdr): New, to recognize
8774 SHT_SH5_CR_SORTED on incoming .cranges section.
8775 (elf_backend_section_from_shdr): Define.
8776 (sh64_elf_final_write_processing): Sort outgoing .cranges
8777 section. (New, temporarily disabled:) Set bit 0 on entry address
8778 according to ISA type.
8779 (sh64_find_section_for_address): New.
8780 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
8781 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
8782 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
8783 bfd_malloc, not xmalloc.
8784 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
8786 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
8787 temporarily disabled) setting bit 0 on entry address.
8788 (elf_backend_final_write_processing): Define.
8789 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
8790 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
8791 be a proper relocation for PTA and PTB rather than a marker.
8792 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
8793 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
8794 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
8795 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
8796 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
8798 * elf64-sh64.c: Ditto.
8799 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
8800 * elf32-sh64.c: Include opcodes/sh64-opc.h
8801 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
8802 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
8803 parameters. No unused parameters. Caller changed.
8804 <case R_SH_PT_16>: New case.
8805 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
8806 * Makefile.in: Regenerate.
8807 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
8808 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
8810 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
8811 (sh64_elf_merge_private_data): Ditto.
8812 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
8813 to access stored section flags.
8814 (sh64_elf_final_write_processing): Return immediately unless
8815 called by linker. Use sh64_elf_section_data (cranges) to get size
8816 of linker-generated cranges entries.
8817 (sh64_elf_copy_private_data): Add missing "return true".
8818 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
8819 (sh_elf64_merge_private_data): Ditto.
8820 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
8821 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
8822 elf64-sh64.c:sh64_elf_fake_sections.
8823 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
8824 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
8825 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
8826 (sh64_elf_final_write_processing): New.
8827 (elf_backend_final_write_processing): Define.
8828 (sh64_elf_fake_sections): Get header flags from tdata field.
8829 (sh64_elf_copy_private_data): Do not call
8830 sh64_elf_copy_private_data_internal, just copy e_flags field.
8831 (sh64_elf_merge_private_data): Do not call
8832 sh64_elf_copy_private_data_internal.
8833 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
8834 Remove EF_SH64_ABI64, let ELF size make difference.
8835 Remove SH64-specific BFD section flag.
8836 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
8837 containing SHmedia through elf_section_data (asect)->tdata
8838 non-zero, not using a BFD section flag.
8839 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
8840 (sh64_elf_merge_private_data): Similar.
8841 (elf_backend_section_flags): Don't define.
8842 (sh64_elf_backend_section_flags): Delete.
8843 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
8845 (sh_elf64_merge_private_data): Similar.
8846 * section.c (Section flags definitions): Don't define
8848 (bfd-in2.h): Regenerate.
8849 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
8850 Make DataLabel references work with partial linking.
8851 * elf32-sh64.c: Fix formatting.
8852 (sh64_elf_link_output_symbol_hook): New.
8853 (elf_backend_link_output_symbol_hook): Define to
8854 sh64_elf_link_output_symbol_hook.
8855 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
8856 undefined if partial linking. Adjust sanity check.
8857 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
8858 (elf_backend_link_output_symbol_hook): Define to
8859 sh64_elf64_link_output_symbol_hook.
8860 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
8861 undefined if partial linking. Adjust sanity check.
8862 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
8863 Implement semantics for inter-file DataLabel references.
8864 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
8865 (sh64_elf64_add_symbol_hook): New.
8866 (sh_elf64_relocate_section): If passing an indirect symbol with
8867 st_type STT_DATALABEL on the way to a symbol with st_other
8868 STO_SH5_ISA32, do not bitor 1 to the relocation.
8869 (elf_backend_add_symbol_hook): Define to
8870 sh64_elf64_add_symbol_hook.
8871 * elf64-sh32.c: Tweak comments.
8872 (DATALABEL_SUFFIX): Define.
8873 (sh64_elf_add_symbol_hook): New.
8874 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
8875 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
8876 symbol with st_type STT_DATALABEL on the way to a symbol with
8877 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
8878 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
8879 Pass through STT_DATALABEL.
8880 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
8881 (elf_backend_get_symbol_type): Define.
8882 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
8883 (elf_backend_get_symbol_type): Define.
8884 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
8885 * elf32-sh64.c: Tweak comments.
8886 (sh64_elf_copy_private_data_internal): Add prototype.
8887 (bfd_elf32_bfd_set_private_flags): Define.
8888 (sh64_elf_copy_private_data_internal): Compare machine name, not
8889 textual BFD target name, to check whether to copy section flag
8891 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
8892 Tweak section-contents-type-mismatch message.
8893 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
8894 Validize reloc-types.
8895 * elf64-sh64.c: New file.
8896 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
8897 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
8898 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
8899 Regenerate dependencies.
8900 * Makefile.in: Regenerate.
8901 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
8902 bfd_elf64_sh64l_vec.
8903 * configure.in: Handle bfd_elf64_sh64_vec and
8904 bfd_elf64_sh64l_vec.
8905 * configure: Regenerate.
8906 * po/POTFILES.in: Regenerate.
8907 * po/bfd.pot: Regenerate.
8908 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
8909 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
8910 anything else but EF_SH64 and EF_SH64_ABI64.
8911 (sh64_elf_merge_private_data): Emit error for anything else but
8912 EF_SH64 and EF_SH64_ABI64.
8913 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
8915 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
8916 bfd_elf32_sh64l_vec as a temporary measure.
8917 * configure: Regenerate.
8918 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
8919 * cpu-sh.c (arch_info_struct): Include sh5 item
8921 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
8922 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
8923 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
8924 * elf32-sh64.c: Tweak comments.
8925 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
8926 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
8927 (sh64_elf_copy_private_data_internal): Wrap long line.
8928 (sh64_elf_merge_private_data): Rewrite to allow objects from
8929 SH64 subsets to be linked together.
8930 (INCLUDE_SHMEDIA): Define.
8931 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
8932 Parenthesize plus-expression inside or-expression.
8933 <global symbol>: Ditto.
8934 (sh_elf_set_mach_from_flags): Remove code refusing
8935 deleted EF_SH64_32BIT_ABI flag.
8936 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
8937 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
8938 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
8939 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
8940 (sh_elf_relocate_section) <local symbol>: Or 1 in
8941 calculation of relocation if sym->st_other & STO_SH5_ISA32.
8942 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
8943 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
8945 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
8946 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
8947 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
8948 Regenerate dependencies.
8949 * Makefile.in: Regenerate.
8950 * archures.c: Add bfd_mach_sh5.
8951 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
8952 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
8953 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
8954 * configure: Regenerate.
8955 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
8956 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
8957 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
8958 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
8959 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
8960 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
8961 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
8962 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
8963 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
8964 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
8966 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
8968 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
8969 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
8970 shmedia_prepare_reloc, goto final_link_relocate if it returns
8971 non-zero, else fail as before.
8972 (sh_elf_set_mach_from_flags): Provide function only if not defined
8973 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
8974 (sh_elf_set_private_flags): Provide function only if not defined
8976 (sh_elf_copy_private_data): Similar.
8977 (sh_elf_merge_private_data): Similar.
8978 * section.c (SEC_SH_ISA_SHMEDIA): New.
8979 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
8980 * elf32-sh64.c: New file.
8981 * libbfd.h: Regenerate.
8982 * bfd-in2.h: Regenerate.
8983 * po/POTFILES.in: Regenerate.
8984 * po/bfd.pot: Regenerate.
8985 * bfd-in2.h: Regenerate.
8986 * libbfd.h: Regenerate.
8988 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
8990 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
8991 been included, not drag it in.
8992 * bfd-in2.h: Regenerate.
8994 2002-02-06 H.J. Lu (hjl@gnu.org)
8996 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
8997 the mach and ISA fields if necessary.
8999 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
9001 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
9002 ARM architecture when an F_ARM_5 flag is detected, since we cannot
9003 be sure exactly which architecture this represents.
9005 2002-02-05 Nick Clifton <nickc@redhat.com>
9007 * po/tr.po: Updated translation.
9009 2002-02-05 Alan Modra <amodra@bigpond.net.au>
9011 From Jimi X <jimix@watson.ibm.com>
9012 * archures (bfd_mach_ppc64): Define.
9013 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
9014 (bfd_powerpc_arch): Define.
9015 * bfd-in2.h: Regenerate.
9016 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
9017 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
9018 (bfd_powerpc_archs): Add default powerpc64 arch.
9020 2002-02-05 Alan Modra <amodra@bigpond.net.au>
9022 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
9023 against section syms in readonly sections. Don't do the global
9024 sym check if we find one.
9025 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
9026 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
9027 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
9028 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
9029 (elf_s390_grok_prstatus): Add missing prototype.
9031 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
9033 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
9034 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
9035 Call bfd_get_section_by_name only once. Initialize
9036 bpodata->n_bpo_relocs_this_section.
9037 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
9039 (bpo_reloc_request_sort_fn): Don't use difference of values as
9042 2002-02-02 David O'Brien <obrien@FreeBSD>
9044 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
9045 version 4.5 and later the same as 5-CURRENT.
9046 * configure: Re-generate.
9048 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
9050 * config.bfd (hppa*-*-netbsd*): New target.
9052 2002-01-31 Philipp Thomas <pthomas@suse.de>
9054 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
9055 to front of message. Unify messages with elf32-arm.h. Use
9056 commas where neccessary.
9057 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
9058 ERROR in messages. Unify messages with coff-arm.c. Correct
9059 VFP/FPA error message.
9060 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
9061 APCS-32 for translation.
9063 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
9065 Perform on-demand global register allocation from
9066 R_MMIX_BASE_PLUS_OFFSET relocs.
9067 * elf64-mmix.c (struct bpo_reloc_section_info, struct
9068 bpo_reloc_request, struct bpo_greg_section_info): New.
9069 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
9070 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
9071 _bfd_mmix_check_all_relocs,
9072 _bfd_mmix_prepare_linker_allocated_gregs,
9073 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
9074 (elf_mmix_howto_table): Correct src_mask for most relocs.
9075 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
9077 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
9078 case. Fix typo in comment. New label do_mmix_reloc.
9079 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
9080 store first object file with a base-plus-offset reloc. Call
9081 mmix_elf_check_common_relocs for the part common with mmo.
9082 (mmix_elf_final_link): Write out linker-allocated register
9084 (elf_backend_gc_sweep_hook): Define.
9085 (bfd_elf64_bfd_relax_section): Define.
9087 * mmo.c: Don't include <ctype.h>
9088 (mmo_init): Correct init-once logic.
9090 2002-02-01 Tom Rix <trix@redhat.com>
9092 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
9094 2002-02-01 Alan Modra <amodra@bigpond.net.au>
9096 * Makefile.am: Run "make dep-am"
9097 * Makefile.in: Regenerate.
9099 2002-01-31 David O'Brien <obrien@FreeBSD>
9101 * configure.in: Recognize the differences in core files from FreeBSD
9102 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
9104 * configure: Regenerate.
9106 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
9108 * coff-or32.c: New file.
9109 * cpu-or32.c: New file.
9110 * elf32-or32.c: New file.
9111 * archures.c: Add support for or32.
9112 * targets.c: Add support for or32.
9113 * bfd-in2.h: Regenerate.
9114 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
9115 coff_write_object_contents): Add support for or32.
9116 * config.bfd: Add target.
9117 * configure.in: Add support for or32.
9118 * configure: Regenerate.
9119 * Makefile.am: Add support for or32.
9120 * Makefile.in: Regenerate.
9121 * po/SRC-POTFILES.in: Add or32 files.
9122 * po/bfd.pot: Regenerate.
9124 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
9125 Don Lindsay <lindsayd@cisco.com>
9127 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
9128 false' with a return of a bfd_reloc_ error code.
9130 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
9132 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
9133 unexport unreferenced symbols when --export-dynamic. Call
9134 _bfd_elf_strtab_delref when unexporting.
9136 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
9138 * bfd-in.h: Include <stdbool.h> if it is available.
9139 * bfd-in2.h: Regenerated.
9141 2002-01-31 Alan Modra <amodra@bigpond.net.au>
9143 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
9146 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
9148 * archures.c: Tidy up formatting of embedded comments.
9149 * bfd.c: Tidy up formatting of embedded comments.
9150 * bfd-in.h: Fix formatting of comments.
9151 * reloc.c: Tidy up formatting of ordinary & embedded comments.
9152 * section.c: Tidy up formatting of embedded comments.
9153 * syms.c: Tidy up formatting of embedded comments.
9154 * targets.c: Tidy up formatting of embedded comments.
9156 * bfd-in2.h: Regenerate.
9158 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
9160 * vms-tir.c (cmd_name): New function.
9161 (tir_cmd_name): New function.
9162 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
9163 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
9166 * peXXigen.c (pe_print_idata): Rearrange message to aid in
9168 (pe_print_pdata): Rearrange message to aid in translation.
9170 * libbfd.c (warn_deprecated): Rearrange error message to aid in
9173 * ihex.c (ihex_write_object_contents): Fix spelling typo.
9175 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
9177 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
9178 message to aid in translation.
9180 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
9181 to aid in translation.
9183 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
9185 2002-01-30 Philipp Thomas <pthomas@suse.de>
9187 * coff-arm.c, elf32-elf.h: Unify messages.
9189 2002-01-30 Nick Clifton <nickc@redhat.com>
9191 * po/sv.po: Updated translation.
9193 2002-01-30 Philipp Thomas <pthomas@suse.de>
9195 * dwarf2.c (read_abbrev): Use full section name in error message.
9196 (decode_line_info): Likewise.
9198 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
9201 2002-01-30 Alan Modra <amodra@bigpond.net.au>
9203 * elf64-ppc.c (func_desc_adjust): Only provide missing function
9204 descriptor symbols for undefined function code syms. Clear
9205 ELF_LINK_NON_ELF so that they can stay weak.
9207 2002-01-29 Chris Demetriou <cgd@broadcom.com>
9208 Mitch Lichtenberg <mpl@broadcom.com>
9210 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
9211 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
9212 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
9214 * bfd-in2.h: Regenerate.
9216 2002-01-29 Chris Demetriou <cgd@broadcom.com>
9218 * elf32-mips.c: Add additional comments about HI16 relocation
9220 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
9221 pc-relative relocations. (Reverts change made on 2001-10-31.)
9222 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
9223 for pc-relative relocations.
9224 (mips_elf_calculate_relocation): Add a comment about a kludge
9225 in the R_MIPS_GNU_REL_HI16 handling.
9226 (_bfd_mips_elf_relocate_section): Implement that kludge;
9227 adjust pc-relative HI16 relocation for difference in HI16 and
9228 LO16 addresses, since it can't easily be done in
9229 mips_elf_calculate_relocation.
9231 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
9233 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
9234 relocations with PC32 relocations for undefined or weak symbols.
9235 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
9236 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
9238 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
9240 * elfcore.h (elf_core_file_p): Improve comment for last change.
9242 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
9244 * configure: Regenerated.
9246 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
9248 * elfcore.h (elf_core_file_p): Set the machine architecture
9249 before processing the program headers.
9251 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
9253 * configure.in <64-bit configuration>: If using gcc, check and
9254 emit error for egcs-1.1.2.
9255 * configure: Regenerate.
9257 2002-01-26 Egor Duda <deo@logos-m.ru>
9259 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
9260 as possible to avoid stack corruption.
9262 2002-01-26 Richard Henderson <rth@redhat.com>
9264 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
9265 for non-allocated sections.
9267 2002-01-25 Mark Kettenis <kettenis@gnu.org>
9269 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
9270 prstat.pr_reg even if it is a struct.
9272 2002-01-25 Steve Ellcey <sje@cup.hp.com>
9274 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
9276 2002-01-25 Philipp Thomas <pthomas@suse.de>
9278 * coffgen.c (coff_print_symbol): Don't mark info message
9281 2002-01-25 Nick Clifton <nickc@redhat.com>
9283 * po/fr.po: Updated translation.
9284 * po/es.po: Updated translation.
9286 2002-01-25 Philipp Thomas <pthomas@suse.de>
9288 * coff-alpha.c (alpha_relocate_section): Unify warning message
9289 for GP relative relocations without GP defined.
9290 * coff-mips.c (mips_relocate_section): Likewise.
9292 2002-01-25 Alan Modra <amodra@bigpond.net.au>
9294 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
9295 unsigned overflow when new_offset < old_offset.
9297 2002-01-24 Philipp Thomas <pthomas@suse.de>
9299 * bfd.c (_bfd_abort): Fix typo.
9301 2002-01-23 Richard Henderson <rth@redhat.com>
9303 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
9304 plt entries for undefweak symbols.
9306 2002-01-23 Steve Ellcey <sje@cup.hp.com>
9308 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
9309 (bfd_elf64_ia64_hpux_big_vec): Ditto.
9310 (bfd_elf32_h8300_vec): Ditto.
9312 2002-01-23 Alan Modra <amodra@bigpond.net.au>
9314 * elf64-ppc.c: Remove stale part of ABI comment.
9315 (NO_OPD_RELOCS): Define.
9316 (ppc64_elf_check_relocs): Use it.
9317 (ppc64_elf_relocate_section): Here too.
9318 (build_one_stub): Don't point function syms at the stub. Instead,
9320 (ppc64_elf_relocate_section): Check whether REL24 relocs should
9321 really go to the stub. Make all dynamic relocs in opd against
9323 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
9326 2002-01-22 Richard Henderson <rth@redhat.com>
9328 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
9330 2002-01-22 Alan Modra <amodra@bigpond.net.au>
9332 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
9333 TOC_BASE_OFF adjustment.
9335 * Makefile.am: Run "make dep-am".
9336 * Makefile.in: Regenerate.
9337 * po/SRC-POTFILES.in: Regenerate.
9339 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
9341 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
9344 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
9346 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
9347 Check for and emit error if sgot is NULL at this point.
9349 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
9351 * config.bfd (ia64*-*-netbsd*): New target.
9353 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
9355 * som.c (som_write_space_strings): Comment typo fix.
9357 2002-01-21 Alan Modra <amodra@bigpond.net.au>
9359 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
9360 is_func_descriptor fields.
9361 (link_hash_newfunc): Init them.
9362 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
9363 dot are candidates for plt entries. When processing .opd relocs,
9364 set function descriptor strings to point inside function code
9365 string, and set new ppc_link_hash_entry fields.
9366 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
9367 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
9368 function descriptors. It's now done in..
9369 (func_desc_adjust): New.
9370 (ppc64_elf_func_desc_adjust): New.
9371 (define elf_backend_always_size_sections): Define.
9372 (ppc64_elf_hide_symbol): New.
9373 (define elf_backend_hide_symbol): Define.
9374 (allocate_dynrelocs): Remove code looking up function descriptors
9375 as that has been done earlier.
9376 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
9378 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
9379 up function descriptor.
9380 (build_one_stub): Look up the function code sym. Check for
9381 invalid plt offsets.
9382 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
9383 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
9385 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
9387 (_bfd_elf_link_hash_hide_symbol): Likewise.
9388 * elflink.h (elf_link_add_object_symbols): Adjust call to
9389 elf_backend_hide_symbol.
9390 (elf_fix_symbol_flags): Likewise.
9391 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
9393 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
9394 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
9395 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
9396 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
9397 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
9399 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
9400 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
9401 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
9403 2002-01-18 Alan Modra <amodra@bigpond.net.au>
9405 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
9406 dynamic function descriptor symbol, not the associated function
9409 2002-01-17 Eric Christopher <echristo@redhat.com>
9411 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
9413 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
9415 * po/bfd.pot: Regenerate.
9416 * po/fr.po: Regenerate.
9418 2002-01-17 Alan Modra <amodra@bigpond.net.au>
9420 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
9421 Remove "Elf_Internal_Shdr *" param.
9422 (_bfd_mips_elf_section_from_bfd_section): Ditto.
9423 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
9424 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
9425 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
9426 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
9427 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
9428 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
9429 function to override special sections. Remove hdr arg from
9430 backend call, and don't loop.
9432 2002-01-16 Eric Christopher <echristo@redhat.com>
9434 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
9435 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
9436 relocations requiring gp0 and gp.
9438 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
9440 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
9442 (elf32_arm_print_private_bfd_data): Likewise.
9444 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
9446 * po/tr.po: Import new version.
9448 2002-01-16 Alan Modra <amodra@bigpond.net.au>
9450 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
9451 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
9452 (ORI_R0_R0_0): Correct.
9454 2002-01-16 Alan Modra <amodra@bigpond.net.au>
9456 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
9457 when plt_not_loaded.
9458 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
9459 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
9460 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
9461 (ppc64_elf_glink_code): Delete.
9462 (PPC64_ELF_GLINK_SIZE): Delete.
9463 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
9464 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
9465 ORI_R0_R0_0): Define.
9466 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
9467 (struct ppc_link_hash_table): Add sstub and plt_overflow.
9468 (ppc64_elf_link_hash_table_create): Init them.
9469 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
9470 Don't copy to shared lib.
9471 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
9472 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
9473 (allocate_dynrelocs <plt>): Don't change function sym here. Make
9474 room for .stub and .glink code.
9475 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
9477 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
9478 bfd_elf64_bfd_final_link.
9479 (bfd_elf64_bfd_final_link): Don't define.
9480 (ppc64_elf_size_stubs): New.
9481 (build_plt_stub): New.
9482 (build_one_stub): New.
9483 (ppc64_elf_build_stubs): New.
9484 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
9485 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
9486 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
9487 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
9488 case output sections not separate. Adjust DT_RELASZ to not
9489 include plt relocs. Set reserved got entry. Set got and plt
9491 (elf_backend_got_header_size): Set to 8.
9492 * elf64-ppc.h: New file.
9494 2002-01-16 Alan Modra <amodra@bigpond.net.au>
9496 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
9497 sections, use bfd_section_list_remove.
9498 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
9499 * elflink.h (elf_link_add_object_symbols): When removing all
9500 sections, use bfd_section_list_clear.
9502 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
9504 * po/sv.po: New file: Swedish translation.
9505 * configure.in (ALL_LINGUAS): Add sv.
9506 * configure: Regenerate.
9508 2002-01-15 Jakub Jelinek <jakub@redhat.com>
9510 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
9511 * elf.c (merge_sections_remove_hook): New function.
9512 (_bfd_elf_merge_sections): Pass it as 3rd argument to
9513 _bfd_merge_sections.
9514 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
9515 * libbfd.h: Rebuilt.
9516 * merge.c (_bfd_merge_sections): Add remove_hook argument.
9517 Call remove_hook if a SEC_EXCLUDE section is encountered.
9519 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
9521 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
9522 (xstormy16_reloc_map): Initialise new field with correct howto
9524 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
9527 2002-01-10 Michael Snyder <msnyder@redhat.com>
9529 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
9530 (elfcore_write_pstatus): Use long instead of pid_t;
9531 * elf-bfd.h: Change prototypes to use long instead of pid_t;
9533 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
9535 * elf.c: Update copyright years.
9536 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
9537 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
9539 2002-01-08 Michael Snyder <msnyder@redhat.com>
9541 Add capability to write corefile note sections, for gdb.
9542 * elf.c (elfcore_write_note): New function.
9543 (elfcore_write_prpsinfo): New function.
9544 (elfcore_write_prstatus): New function.
9545 (elfcore_write_pstatus): New function.
9546 (elfcore_write_prfpreg): New function.
9547 (elfcore_write_prxfpreg): New function.
9548 * elf-bfd.h: Add prototypes for above functions.
9550 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
9552 * elf.c (elf_fake_sections): Propagate errors from
9553 elf_backend_fake_section.
9555 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
9557 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
9558 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
9559 (elf32-sh-nbsd.lo): New rule.
9560 * Makefile.in: Regenerate.
9561 * config.bfd (sh*le-*-netbsdelf*): New target.
9562 (sh*-*-netbsdelf*): New target.
9563 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
9564 (bfd_elf32_shnbsd_vec): New vector.
9565 (bfd_elf32_shlnbsd_vec): New vector.
9566 * configure: Regenerate.
9567 * elf32-sh-nbsd.c: New file.
9568 * targets.c: Update copyright years.
9569 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
9570 bfd_elf32_shnbsd_vec.
9572 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
9574 * coff-rs6000.c (READ20): Use bfd_scan_vma.
9576 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
9578 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
9579 of a symbol in a section that will be deleted.
9581 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
9583 * po/es.po: New file: Spanish translation.
9584 * configure.in (ALL_LINGUAS): Add es.
9585 * configure: Regenerate.
9587 2002-01-06 Steve Ellcey <sje@cup.hp.com>
9589 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
9590 argument so we can handle HP-UX specially.
9591 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
9592 (elfNN_hpux_backend_section_from_bfd_section): New for support
9593 of SHN_IA_64_ANSI_COMMON.
9594 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
9595 (is_unwind_section_name): Add special HP-UX support.
9596 (elfNN_ia64_section_from_shdr): Add support for more sections.
9597 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
9598 add support for more sections.
9599 (elfNN_ia64_additional_program_headers): Modify
9600 is_unwind_section_name call.
9601 (elfNN_ia64_modify_segment_map): Remove assumption that there is
9602 only one unwind section in segment.
9604 2002-01-06 Alan Modra <amodra@bigpond.net.au>
9606 * syms.c (_bfd_generic_make_empty_symbol): New function.
9607 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
9608 _bfd_generic_make_empty_symbol.
9609 * libbfd.h: Regenerate.
9610 * bfd-in2.h: Regenerate.
9611 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
9612 (hppabsd_core_get_symtab_upper_bound): Don't define.
9613 (hppabsd_core_get_symtab): Likewise.
9614 (hppabsd_core_print_symbol): Likewise.
9615 (hppabsd_core_get_symbol_info): Likewise.
9616 (hppabsd_core_bfd_is_local_label_name): Likewise.
9617 (hppabsd_core_get_lineno): Likewise.
9618 (hppabsd_core_find_nearest_line): Likewise.
9619 (hppabsd_core_bfd_make_debug_symbol): Likewise.
9620 (hppabsd_core_read_minisymbols): Likewise.
9621 (hppabsd_core_minisymbol_to_symbol): Likewise.
9622 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
9624 * hpux-core.c: Similarly.
9625 * irix-core.c: Similarly.
9626 * osf-core.c: Similarly.
9627 * sco5-core.c: Similarly.
9628 * binary.c (binary_make_empty_symbol): Remove function, define as
9629 _bfd_generic_make_empty_symbol.
9630 * ihex.c (ihex_make_empty_symbol): Likewise.
9631 * mmo.c (mmo_make_empty_symbol): Likewise.
9632 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
9633 * srec.c (srec_make_empty_symbol): Likewise.
9634 * versados.c (versados_make_empty_symbol): Likewise.
9635 * vms.c (_bfd_vms_make_empty_symbol): Remove.
9636 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
9637 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
9638 rather than _bfd_vms_make_empty_symbol.
9639 * vms-misc.c (new_symbol): Likewise.
9641 2002-01-05 Alan Modra <amodra@bigpond.net.au>
9643 * section.c (bfd_section_init): Remove unnecessary initialisations.
9644 (bfd_section_list_clear): New function.
9645 (bfd_section_list_remove, bfd_section_list_insert): New macros.
9646 (_bfd_strip_section_from_output): Use them.
9647 * coffcode.h (coff_set_alignment_hook): Likewise.
9648 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
9649 * elf64-mips.c (mips_elf64_final_link): Likewise.
9650 * elf64-mmix.c (mmix_elf_final_link): Likewise.
9651 * sunos.c (sunos_add_dynamic_symbols): Likewise.
9652 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
9653 * bfd-in2.h: Regenerate.
9655 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
9656 rather than doing our own section handling. Clean up after errors
9657 with bfd_release and bfd_section_list_clear. Handle unexpected
9659 * aoutf1.h (sunos4_core_file_p): Likewise.
9660 * aix386-core.c (aix386_core_file_p): Likewise.
9661 * cisco-core.c (cisco_core_file_validate): Likewise.
9662 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
9663 * trad-core.c (trad_unix_core_file_p): Likewise.
9665 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
9666 with bfd_release and bfd_section_list_clear.
9667 * hpux-core.c (hpux_core_core_file_p): Likewise.
9668 * irix-core.c (irix_core_core_file_p): Likewise.
9669 * lynx-core.c (lynx_core_file_p): Likewise.
9670 * osf-core.c (osf_core_core_file_p): Likewise.
9671 * rs6000-core.c (rs6000coff_core_p): Likewise.
9672 * sco5-core.c (sco5_core_file_p): Likewise.
9674 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
9675 sign extension adjustments without conditionals.
9677 2002-01-04 Jakub Jelinek <jakub@redhat.com>
9679 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
9680 CIE at .eh_frame start is removed due to no FDEs referencing it.
9682 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
9684 * config.bfd (x86_64-*-netbsd*): New target.
9685 * configure.in (x86_64-*-netbsd*): Set COREFILE
9687 * configure: Regenerated.
9689 2002-01-03 Tom Rix <trix@redhat.com>
9691 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
9692 for recent bfd_make_section_anyway change.
9694 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
9696 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
9697 R_ARM_THM_PC11 reloc.
9699 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
9701 * configure.in (LINGUAS): Add ja.
9702 * configure: Regenerate.
9703 * po/ja.po: Import from translation project's web site.
9705 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
9707 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
9708 messages to ease translation into other languages.
9710 For older changes see ChangeLog-0001
9716 version-control: never