1 2003-08-01 Nick Clifton <nickc@redhat.com>
3 * config.bfd: Add code to catch obsolete configurations and warn
4 about them unless --enable-obsolete is used. Use this to mark
5 vax-vms port as obsolete.
7 2003-07-30 Alan Modra <amodra@bigpond.net.au>
9 * elf32-ppc.c (ppc_elf_install_value): Tidy.
10 (ppc_elf_relax_section): Remove dead code. Remove unnecessary casts.
12 * elfxx-target.h: Remove PARAMS macro. Formatting.
14 2003-07-30 Alan Modra <amodra@bigpond.net.au>
16 * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
17 * elf64-ppc.c (get_fdh): New function, split out from
19 (ppc64_elf_check_relocs): Use get_fdh.
20 (func_desc_adjust): Likewise. Tidy.
21 (ppc64_elf_edit_opd): Tighten reloc checks. Free local_syms on error
22 exit. Use get_fdh. Account for superfluous dynamic relocs.
23 (ppc64_elf_relocate_section): Warning fix.
25 2003-07-30 Jason Eckhardt <jle@rice.edu>
27 * coff-i860.c: Convert to ISO C90. Remove superflous prototypes.
29 2003-07-30 Jason Eckhardt <jle@rice.edu>
31 * elf32-i860.c: Convert to ISO C90. Remove superflous prototypes.
33 2003-07-30 Randolph Chung <tausq@debian.org>
35 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
36 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
38 2003-07-30 Alan Modra <amodra@bigpond.net.au>
40 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
41 Replace PTR with void *. Formatting.
42 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
43 (make_mapping): Likewise.
45 2003-07-29 Alan Modra <amodra@bigpond.net.au>
47 * elf64-ppc.c (func_desc_adjust): Give linker created function
48 descriptor symbols a size and type.
49 (ppc64_elf_relocate_section): Correct lq insn test.
51 2003-07-28 Eric Christopher <echristo@redhat.com>
53 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
54 (ppc_elf_install_value): New function.
55 (ppc_elf_sort_rela): Remove.
56 (ppc_elf_relax_section): Rewrite. Remove old relaxation
57 and replace with out of range branch stubs.
58 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
60 2003-07-29 Alexandre Oliva <aoliva@redhat.com>
62 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
65 2003-07-28 Alan Modra <amodra@bigpond.net.au>
67 * elf.c (special_sections): Set attributes for .got and .plt.
69 2003-07-27 Alan Modra <amodra@bigpond.net.au>
71 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
72 on function descriptors.
73 (ELIMINATE_COPY_RELOCS): Expand comment.
74 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
77 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
79 * elf.c (_bfd_elf_new_section_hook): Set the default section
81 (elf_fake_sections): Set the section type based on asect->flags
82 if it is SHT_NULL. Don't abort on processor specific section
85 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
87 * bfd-in2.h: Regenerated.
89 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
91 * elf-bfd.h (bfd_elf_special_section): New.
92 (elf_backend_data): Add special_sections, a pointer to
93 bfd_elf_special_section.
94 (elf_section_type). New.
95 (elf_section_flags): New.
96 (_bfd_elf_get_sec_type_attr): New.
98 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
99 real section type/flags.
100 (special_sections): New.
101 (get_special_section): New.
102 (_bfd_elf_get_sec_type_attr): New.
103 (_bfd_elf_new_section_hook): Check special_section to set
104 elf_section_type and elf_section_flags.
105 (elf_fake_sections): Don't use section name to set ELF section
108 * elf32-m32r.c (m32r_elf_special_sections): New.
109 (elf_backend_special_sections): Defined.
111 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
112 (elf_backend_special_sections): Defined.
114 * elf32-mcore.c (mcore_elf_special_sections): New.
115 (elf_backend_special_sections): Defined.
117 * elf32-ppc.c (ppc_elf_special_sections): New.
118 (elf_backend_special_sections): Defined.
120 * elf32-sh64.c (sh64_elf_special_sections): New.
121 (elf_backend_special_sections): Defined.
123 * elf32-v850.c (v850_elf_special_sections): New.
124 (elf_backend_special_sections): Defined.
126 * elf32-xtensa.c (elf_xtensa_special_sections): New.
127 (elf_backend_special_sections): Defined.
129 * elf64-alpha.c (elf64_alpha_special_sections): New.
130 (elf_backend_special_sections): Defined.
132 * elf64-hppa.c (elf64_hppa_special_sections): New.
133 (elf_backend_special_sections): Defined.
135 * elf64-ppc.c (ppc64_elf_special_sections): New.
136 (elf_backend_special_sections): Defined.
138 * elf64-sh64.c (sh64_elf64_special_sections): New.
139 (elf_backend_special_sections): Defined.
141 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
142 (elf_backend_special_sections): Defined.
144 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
146 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
147 (elf_backend_special_sections): Defined.
149 * elfxx-target.h (elf_backend_special_sections): New. Default
151 (elfNN_bed): Initialize special_sections.
153 * section.c (bfd_abs_section): Remove const.
154 (bfd_und_section): Likewise.
155 (bfd_com_section): Likewise.
156 (bfd_ind_section): Likewise.
158 2003-07-24 Nick Clifton <nickc@redhat.com>
160 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
161 sections are assigned the LOAD attribute.
163 2003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
165 * elf32-sh.c: Convert to C90. Replace PTR with void *.
166 * elf32-sh64-com.c: Likewise.
167 * elf32-sh64.c: Likewise.
168 * elf32-sh64.h: Likewise.
169 * elf64-sh64.c: Likewise.
171 2003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
173 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
174 (allocate_dynrelocs): Likewise.
175 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
176 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
178 2003-07-24 Nick Clifton <nickc@redhat.com>
180 * po/fr.po: Updated French translation.
182 2003-07-23 Bob Wilson <bob.wilson@acm.org>
184 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
185 near the beginning of the file. Swap order of arguments. Call
186 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
187 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
188 (elf_xtensa_relocate_section): Likewise.
189 (shrink_dynamic_reloc_sections): Likewise.
191 2003-07-23 Bob Wilson <bob.wilson@acm.org>
193 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
194 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
195 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
196 first printing an error message.
197 (elf_xtensa_finish_dynamic_sections): Likewise.
198 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
199 discarding literal table entries.
200 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
201 (elf_xtensa_do_asm_simplify): Likewise.
203 2003-07-23 Stephane Carrez <stcarrez@nerim.fr>
205 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
206 we have a local symbol in common section.
208 2003-07-22 H.J. Lu <hongjiu.lu@intel.com>
210 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
213 2003-07-22 Nick Clifton <nickc@redhat.com>
215 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
216 expected RS6000 storage classes.
218 2003-07-21 H.J. Lu <hongjiu.lu@intel.com>
220 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
221 output_bfd unused to silence gcc.
223 2003-07-21 Nick Clifton <nickc@redhat.com>
225 * po/sv.po: Updated Swedish translation.
227 2003-07-21 Alan Modra <amodra@bigpond.net.au>
229 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
230 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
231 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
232 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
233 now done in _bfd_elf_symbol_refs_local_p.
234 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
235 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
236 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
238 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
240 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
242 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
244 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
245 (SYMBOL_CALLS_LOCAL): Likewise.
247 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
248 immediately if symbol isn't defined locally.
250 2003-07-18 Richard Henderson <rth@redhat.com>
252 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
253 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
254 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
255 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
256 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
257 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
258 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
259 Update all callers to provide the relocation being resolved.
261 2003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
263 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
266 2003-07-17 Nick Clifton <nickc@redhat.com>
268 * po/es.po: New Spanish translation.
269 * po/sv.po: New Swedish translation.
270 * po/opcodes.pot: Regenerate.
272 2003-07-16 Richard Henderson <rth@redhat.com>
274 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
275 * elfxx-ia64.c, targets.c: Likewise.
277 2003-07-16 Richard Henderson <rth@redhat.com>
279 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
280 for symbols defined locally plus -Bsymbolic. Tidy logic.
282 2003-07-15 Richard Sandiford <rsandifo@redhat.com>
284 * archures.c (bfd_mach_mips7000): New.
285 * bfd-in2.h: Regenerated.
286 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
287 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
288 (mips_mach_extensions): Add an entry for it.
290 2003-07-14 Nick Clifton <nickc@redhat.com>
292 * po/tr.po: Update with latest version.
293 * po/SRC-POTFILES.in: Regenerate.
294 * po/bfd.pot: Regenerate.
295 * Makfile.in: Regenerate.
296 * configure: Regenerate.
298 2003-07-12 Jeff Baker <jbaker@qnx.com>
300 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
301 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
302 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
303 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
305 2003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
307 * coffcode.h (coff_set_section_contents): Set the
308 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
310 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
312 * bfd-in.h (bfd_h8300_pad_address): Declare.
313 * bfd-in2.h: Regenerate.
314 * cpu-h8300.c (bfd_h8300_pad_address): New function.
315 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
316 addresses before checking whether they can be relaxed.
317 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
318 Don't complain about overflows in general 8-bit relocations.
319 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
320 Fix handling of R_H8_DIR24A8.
322 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
324 * elf32-h8300.c: Convert function prototypes and definitions
326 * coff-h8300.c: Likewise.
327 * cpu-h8300.c: Likewise.
329 2003-07-11 Alan Modra <amodra@bigpond.net.au>
331 * po/SRC-POTFILES.in: Regenerate.
332 * po/bfd.pot: Likewise.
334 2003-07-10 Bob Wilson <bob.wilson@acm.org>
336 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
337 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
339 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
340 and allocate memory for it.
341 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
342 section to the .got.loc section.
343 (elf_xtensa_finish_dynamic_sections): Fix up call to
344 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
345 the address of .got.loc.
346 (relax_property_section): Shrink .got.loc to match changes in any
347 literal table section.
348 (xtensa_is_property_section): Change to match
349 xtensa_get_property_section_name.
350 (xtensa_is_littable_section): New.
352 2003-07-10 H.J. Lu <hongjiu.lu@intel.com>
354 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
357 2003-07-10 Alan Modra <amodra@bigpond.net.au>
359 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
360 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
362 * Makefile.in: Regenerate.
364 2003-07-10 Alexandre Oliva <aoliva@redhat.com>
366 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
367 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
368 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
369 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
370 * elf32-am33lin.c: Rename global functions.
371 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
372 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
373 * configure.in (bfd_elf32_am33lin_vec): Added.
374 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
375 (elf32-am33lin.lo): List dependencies.
376 * aclocal.m4, configure, Makefile.in: Rebuilt.
377 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
378 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
379 ELF_ARCH was not defined before.
380 (elf_symbol_leading_char): Define if not defined.
381 * elf32-am33lin.c: Override the definitions above.
382 * targets.c (bfd_elf32_am33lin_vec): New.
384 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
386 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
387 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
389 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
390 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
391 ld-linux.so.2 to ld.so.1.
392 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
393 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
394 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
395 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
396 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
397 .rela.* section contents with bfd_zalloc.
398 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
399 * elf-m10300.c: Added declarations for functions missing them.
400 Merge some shared-library changes from the i386 back-end. Use
401 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
402 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
403 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
404 members of elf_link_hash_entry. Adjusted references.
405 (mn10300_elf_final_link_relocate): dynobj was already loaded
406 into a local variable, use it.
407 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
408 * elf-m10300.c: Add missing function prototypes.
409 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
410 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
411 relocation for dynamic relocations.
412 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
413 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
414 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
415 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
416 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
417 (_bfd_mn10300_elf_create_got_section): ... here, so that its
418 adress is already known at the time we compute relaxations.
419 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
420 and PLT32 to narrower relocations.
421 * libbfd.h, bfd-in2.h: Rebuilt.
422 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
423 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
424 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
425 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
426 BFD_RELOC_MN10300_RELATIVE): New relocs.
427 * libbfd.h, bfd-in2.h: Rebuilt.
428 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
429 (struct elf32_mn10300_link_hash_entry): Added DSO-related
431 (elf_mn10300_howto): Defined new relocation types.
432 (mn10300_reloc_map): Map them.
433 (_bfd_mn10300_elf_create_got_section): New fn.
434 (mn10300_elf_check_relocs): Handle PIC relocs.
435 (mn10300_elf_final_link_relocate): Likewise.
436 (mn10300_elf_relocate_section): Handle DSOs.
437 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
438 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
439 elf_mn10300_pic_plt_entry): New.
440 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
441 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
442 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
443 elf_mn10300_plt_reloc_offset: New macros.
444 (ELF_DYNAMIC_INTERPRETER): Likewise.
445 (_bfd_mn10300_elf_create_dynamic_sections): New function.
446 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
447 (_bfd_mn10300_elf_discard_copies): Likewise.
448 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
449 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
450 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
451 (elf_backend_can_gc_sections,
452 elf_backend_create_dynamic_sections,
453 elf_backend_adjust_dynamic_sections,
454 elf_backend_size_dynamic_sections,
455 elf_backend_finish_dynamic_symbol,
456 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
457 elf_backend_plt_readonly, elf_backend_want_plt_sym,
458 elf_backend_got_header_size, elf_backend_plt_header_size): New
461 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
463 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
464 * elf-m10300.c (compute_function_info): Account for AM33
465 registers in `movm' when computing stack space for `call' when
466 linking for AM33/2.0 link.
467 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
468 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
469 * bfd-in2.h: Rebuilt.
470 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
471 * elf-m10300.c: Updated.
472 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
473 * archures.c (bfd_mach_am332): Defined.
474 * bfd-in2.h: Rebuilt.
475 * cpu-m10300.c (bfd_am332_arch): Defined.
476 (bfd_am33_arch): Chained with am33-2.
477 * elf-m10300.c (elf_mn10300_mach): Handle am332.
478 (_bfd_mn10300_elf_final_write_processing): Likewise.
480 2003-07-09 H.J. Lu <hongjiu.lu@intel.com>
482 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
484 2003-07-10 Alan Modra <amodra@bigpond.net.au>
486 * elf64-ppc.c (bfd_elf64_mkobject): Define.
487 (struct ppc64_elf_obj_tdata): New.
488 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
489 (ppc64_elf_mkobject): New function.
490 (struct got_entry): Add "owner". Move "tls_type".
491 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
492 (ppc64_elf_init_stub_bfd): New function.
493 (create_got_section): Create header .got in dynobj. Create .got
494 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
495 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
496 Look for dynobj .got, and test it.
497 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
498 (update_local_sym_info): Likewise.
499 (ppc64_elf_check_relocs): Likewise.
500 (ppc64_elf_gc_sweep_hook): Likewise.
501 (ppc64_elf_tls_optimize): Likewise.
502 (allocate_dynrelocs): Likewise.
503 (ppc64_elf_size_dynamic_sections): Likewise.
504 (ppc64_elf_relocate_section): Likewise.
505 (ppc64_elf_next_toc_section): Update comment.
506 (toc_adjusting_stub_needed): Remove unneeded cast.
507 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
508 testing section flags.
509 (ppc64_elf_build_stubs): Likewise.
510 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
511 (ppc64_elf_finish_dynamic_sections): Write out got sections.
512 (func_desc_adjust): Copy over dynamic info for undef weaks.
513 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
514 (ppc64_elf_size_stubs): Update prototype.
515 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
516 input sections rather than scanning dynobj.
518 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
520 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
521 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
522 (mips_elf_create_msym_section): Delete.
523 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
524 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
525 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
526 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
527 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
528 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
529 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
531 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
533 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
536 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
538 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
539 of relocations whose offset is -2.
541 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
543 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
544 forced-local symbols like other locals. Don't create relocations
545 against STN_UNDEF in irix objects.
547 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
549 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
550 compatible objects, add the values of defined external symbols
553 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
555 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
556 initialize a GOT entry to the symbol's st_value.
558 2003-07-08 Alan Modra <amodra@bigpond.net.au>
560 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
561 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
562 (ppc_elf_tdata): Define.
563 (elf_local_ptr_offsets): Adjust.
564 (ppc_elf_mkobject): New function.
565 (bfd_elf32_mkobject): Define.
567 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
568 * elfcore.h (elf_core_file_p): Likewise.
569 * section.c (bfd_section_init): Remove prototype.
571 2003-07-08 Alan Modra <amodra@bigpond.net.au>
573 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
575 (enum elf_linker_section_enum): Delete.
576 (struct elf_linker_section): Delete.
577 (struct elf_linker_section_pointers): Delete.
578 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
579 Make linker_section_pointers a void**.
580 (elf_local_ptr_offsets, elf_linker_section): Don't define.
581 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
582 of old item in elf-bfd.h.
583 (struct elf_linker_section): Likewise.
584 (struct elf_linker_section_pointers): Likewise.
585 (elf_local_ptr_offsets): Define.
586 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
587 (ppc_elf_link_hash_newfunc): Init it.
588 (struct ppc_elf_link_hash_table): Add sbss.
589 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
591 (elf_create_linker_section): Fold into..
592 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
593 Make rela section here if shared.
594 (elf_find_pointer_linker_section): Pass lsect rather than enum.
595 (elf_create_pointer_linker_section): Adjust. zalloc rather than
597 (elf_finish_pointer_linker_section): Adjust. Don't make rela
599 (ppc_elf_check_relocs): Adjust.
600 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
601 creating .sbss by hand.
602 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
604 2003-07-04 Jakub Jelinek <jakub@redhat.com>
606 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
607 complain_overflow_bitfield.
608 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
609 complain_overflow_bitfield.
611 2003-07-04 Jakub Jelinek <jakub@redhat.com>
613 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
616 2003-07-04 Jakub Jelinek <jakub@redhat.com>
618 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
619 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
621 (get_fptr): For -pie create .opd as writable section and create
623 (elfNN_ia64_check_relocs): Change info->shared into
625 (allocate_fptr): Likewise.
626 (allocate_dynrel_entries): Account for a relative reloc for -pie
627 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
628 for undefweak symbol. Account for an IPLT reloc in .rela.opd
630 (set_got_entry): Don't create a relative reloc if -pie
631 want_ltoff_fptr for undefweak symbol.
632 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
633 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
636 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
638 * elf32-i386.c (elf_i386_relocate_section): Likewise.
639 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
640 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
641 * elf64-s390.c (elf_s390_relocate_section): Likewise.
642 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
643 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
644 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
645 * elf32-s390.c (elf_s390_relocate_section): Likewise.
646 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
648 2003-07-04 Paul Clarke <paulc@senet.com.au>
650 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
651 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
652 <R_H8_DIR32A16>: Fix type of relocation.
654 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
656 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
657 sections were created already. Remove unnecessary tests of
660 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
662 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
663 bfd_make_section for existing sections.
665 2003-07-04 Alan Modra <amodra@bigpond.net.au>
667 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
668 create_got_section if we already have done so.
669 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
670 (sh_elf_check_relocs): Likewise.
671 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
672 htab->root.dynobj instead.
673 (sh_elf_check_relocs): Likewise.
674 (sh_elf_finish_dynamic_sections): Likewise.
676 * section.c (bfd_make_section): Return NULL for existing section.
678 2003-07-04 Alan Modra <amodra@bigpond.net.au>
680 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
681 ppc_elf_create_got if we've already done so.
683 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
684 (_bfd_elf_find_pointer_linker_section): Likewise.
685 (bfd_elf32_create_pointer_linker_section): Likewise.
686 (bfd_elf32_finish_pointer_linker_section): Likewise.
687 (bfd_elf64_create_pointer_linker_section): Likewise.
688 (bfd_elf64_finish_pointer_linker_section): Likewise.
689 (_bfd_elf_make_linker_section_rela): Likewise.
690 * elfcode.h (elf_create_pointer_linker_section): Don't define.
691 (elf_finish_pointer_linker_section): Likewise.
692 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
693 (_bfd_elf_create_linker_section): Move this function..
694 (_bfd_elf_find_pointer_linker_section): ..and this..
695 * elflink.h (elf_create_pointer_linker_section): ..and this..
696 (elf_finish_pointer_linker_section): ..and this..
697 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
699 (elf_create_linker_section): Convert to C90, tidy.
700 (elf_find_pointer_linker_section): Likewise.
701 (elf_create_pointer_linker_section): Likewise.
702 (elf_finish_pointer_linker_section): Likewise.
703 * elf32-i370.c: Delete #if 0 code.
705 2003-07-02 Alan Modra <amodra@bigpond.net.au>
707 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
708 _restf* to be satisfied by shared libs, and always force them local.
709 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
710 Correct test for "bl".
711 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
714 2003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
716 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
717 (s390_tls_reloc): New function.
718 (elf_howto_table): Add long displacement relocations R_390_20,
719 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
720 (elf_s390_reloc_type_lookup): Likewise.
721 (elf_s390_check_relocs): Likewise.
722 (elf_s390_gc_sweep_hook): Likewise.
723 (elf_s390_relocate_section): Likewise.
724 * elf64-s390.c: Same changes as for elf32-s390.c.
725 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
726 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
727 BFD_RELOC_390_TLS_GOTIE20.
728 * bfd-in2.h: Regenerate.
729 * libbfd.h: Likewise.
731 2003-06-30 Alan Modra <amodra@bigpond.net.au>
733 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
734 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
736 2003-06-29 Alan Modra <amodra@bigpond.net.au>
738 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
739 Replace PTR with void *. Formatting.
740 * archive64.c: Likewise.
741 * archures.c: Likewise.
742 * bfd-in.h: Likewise.
745 * bfdwin.c: Likewise.
747 * corefile.c: Likewise.
748 * format.c: Likewise.
750 * libbfd-in.h: Likewise.
751 * libbfd.c: Likewise.
752 * linker.c: Likewise.
753 * opncls.c: Likewise.
755 * section.c: Likewise.
756 * simple.c: Likewise.
758 * targets.c: Likewise.
759 * bfd-in2.h: Regenerate.
760 * libbfd.h: Regenerate.
762 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
763 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
764 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
765 (bfd_getb64): Rewrite without parens.
766 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
767 * cache.c (insert, snip): Remove INLINE.
768 * linker.c (bfd_link_add_undef): Likewise.
770 2003-06-29 Andreas Jaeger <aj@suse.de>
772 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
773 unnecessary prototypes. Replace PTR with void *.
774 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
775 trim plt entries. Move undefweak non-default visibility test ...
776 (allocate_dynrelocs): ... from here.
777 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
779 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
780 SYMBOL_REFERENCES_LOCAL for dynreloc check.
781 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
782 dynreloc and .got relocs.
783 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
786 2003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
788 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
790 2003-06-27 Nick Clifton <nickc@redhat.com>
792 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
793 bfd_add_gnu_debuglink_section and only create the section, do not
794 fill in its contents.
795 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
796 contents of a .gnu-debuglink section.
797 * bfd-in2.h: Regenerate.
799 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
801 * elfxx-mips.c: Revert .got alignment to 2**4.
803 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
805 * elf32-mips.c: Fix addend for _gp_disp special symbol.
807 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
809 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
810 relocation header setup.
812 2003-06-25 Alan Modra <amodra@bigpond.net.au>
814 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
815 (ppc_elf_reloc_type_lookup): Modify comment.
816 (ppc_elf_info_to_howto): Ditto.
817 (ppc_elf_relocate_section): Ditto.
818 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
820 2003-06-25 Alan Modra <amodra@bigpond.net.au>
822 * aout-ns32k.c: Correct spelling of "relocatable".
824 * bfd-in.h: Likewise.
827 * coff-a29k.c: Likewise.
828 * coff-alpha.c: Likewise.
829 * coff-arm.c: Likewise.
830 * coff-i386.c: Likewise.
831 * coff-i860.c: Likewise.
832 * coff-i960.c: Likewise.
833 * coff-m68k.c: Likewise.
834 * coff-m88k.c: Likewise.
835 * coff-mcore.c: Likewise.
836 * coff-mips.c: Likewise.
837 * coff-or32.c: Likewise.
838 * coff-ppc.c: Likewise.
839 * coff-rs6000.c: Likewise.
840 * coff-sh.c: Likewise.
841 * coff-tic80.c: Likewise.
842 * coff64-rs6000.c: Likewise.
843 * cofflink.c: Likewise.
844 * cpu-ns32k.c: Likewise.
846 * ecofflink.c: Likewise.
847 * elf-bfd.h: Likewise.
848 * elf-eh-frame.c: Likewise.
849 * elf-hppa.h: Likewise.
850 * elf-m10200.c: Likewise.
851 * elf-m10300.c: Likewise.
853 * elf32-arm.h: Likewise.
854 * elf32-avr.c: Likewise.
855 * elf32-cris.c: Likewise.
856 * elf32-d10v.c: Likewise.
857 * elf32-dlx.c: Likewise.
858 * elf32-fr30.c: Likewise.
859 * elf32-frv.c: Likewise.
860 * elf32-h8300.c: Likewise.
861 * elf32-hppa.c: Likewise.
862 * elf32-i370.c: Likewise.
863 * elf32-i386.c: Likewise.
864 * elf32-i860.c: Likewise.
865 * elf32-i960.c: Likewise.
866 * elf32-ip2k.c: Likewise.
867 * elf32-iq2000.c: Likewise.
868 * elf32-m32r.c: Likewise.
869 * elf32-m68hc11.c: Likewise.
870 * elf32-m68hc1x.c: Likewise.
871 * elf32-m68k.c: Likewise.
872 * elf32-mcore.c: Likewise.
873 * elf32-mips.c: Likewise.
874 * elf32-msp430.c: Likewise.
875 * elf32-openrisc.c: Likewise.
876 * elf32-ppc.c: Likewise.
877 * elf32-s390.c: Likewise.
878 * elf32-sh.c: Likewise.
879 * elf32-sh64.c: Likewise.
880 * elf32-sparc.c: Likewise.
881 * elf32-v850.c: Likewise.
882 * elf32-vax.c: Likewise.
883 * elf32-xstormy16.c: Likewise.
884 * elf32-xtensa.c: Likewise.
885 * elf64-alpha.c: Likewise.
886 * elf64-hppa.c: Likewise.
887 * elf64-mips.c: Likewise.
888 * elf64-mmix.c: Likewise.
889 * elf64-ppc.c: Likewise.
890 * elf64-s390.c: Likewise.
891 * elf64-sh64.c: Likewise.
892 * elf64-sparc.c: Likewise.
893 * elf64-x86-64.c: Likewise.
894 * elfcode.h: Likewise.
895 * elflink.h: Likewise.
896 * elfn32-mips.c: Likewise.
897 * elfxx-ia64.c: Likewise.
898 * elfxx-mips.c: Likewise.
899 * i386linux.c: Likewise.
901 * libcoff-in.h: Likewise.
902 * linker.c: Likewise.
903 * m68klinux.c: Likewise.
905 * pe-mips.c: Likewise.
906 * peXXigen.c: Likewise.
908 * reloc16.c: Likewise.
909 * sparclinux.c: Likewise.
912 * versados.c: Likewise.
914 * xcofflink.c: Likewise.
915 * bfd-in2.h: Regenerate.
916 * libcoff.h: Regenerate.
917 * libbfd.h: Regenerate.
919 2003-06-24 Alan Modra <amodra@bigpond.net.au>
921 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
924 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
925 prototypes and casts. Replace PTR with void *. Formatting.
926 * elf32-ppc.c: Likewise. Break long strings too.
927 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
928 (ppc_elf_unhandled_reloc): Internationalize error message.
929 * elf32-ppc.h: Remove PARAMS.
931 2003-06-23 Mark Mitchell <mark@codesourcery.com>
933 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
935 (ppc_elf_final_write_processing): Likewise.
937 2003-06-23 H.J. Lu <hongjiu.lu@intel.com>
939 * elflink.h (elf_link_input_bfd): Check raw size when using
940 kept_section to preserve debug information discarded by
943 2003-06-20 Alan Modra <amodra@bigpond.net.au>
945 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
946 (ppc64_elf_setup_section_lists): Set it.
947 (ppc64_elf_relocate_section): Check sym section id against top_id.
948 (ppc_build_one_stub): Comment on top_id.
950 2003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
952 * config.bfd: Add tic4x-*-rtems*.
954 2003-06-20 Alan Modra <amodra@bigpond.net.au>
956 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
957 prototypes and casts. Replace PTR with void *. Format copyright.
959 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
960 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
961 (ppc_type_of_stub): Make r_type an enum.
962 (ppc64_elf_size_stubs): Likewise.
963 * elf64-ppc.h: Remove PARAMS macro.
965 2003-06-19 Alan Modra <amodra@bigpond.net.au>
967 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
970 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
971 (ppc64_elf_info_to_howto): Likewise.
972 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
973 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
975 2003-06-19 Alan Modra <amodra@bigpond.net.au>
977 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
978 reloc overflow on discarded eh_frame entries.
980 2003-06-19 Alan Modra <amodra@bigpond.net.au>
982 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
983 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
984 Return error condition.
985 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
986 that have has_gp_reloc set.
987 (struct ppc_link_hash_table): Add stub_count.
988 (ppc_build_one_stub): Increment it.
989 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
991 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
993 2003-06-18 Alan Modra <amodra@bigpond.net.au>
995 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
996 size calculation from addend. Round size up.
998 2003-06-18 Hans-Peter Nilsson <hp@axis.com>
1000 * elf32-cris.c (cris_elf_relocate_section) <case
1001 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
1002 symbol from a normal object or an undefined weak symbol.
1004 2003-06-18 Alan Modra <amodra@bigpond.net.au>
1006 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
1009 2003-06-17 H.J. Lu <hongjiu.lu@intel.com>
1011 * section.c (struct sec): Put back kept_section.
1012 (STD_SECTION): Put back kept_section initialization.
1013 * bfd-in2.h: Regenerate.
1015 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
1016 sections for relocateable output. Use kept_section to preserve
1017 debug information discarded by linkonce.
1019 2003-06-17 Roland McGrath <roland@redhat.com>
1021 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
1022 segment-relative relocation between different segments.
1024 2003-06-17 Alan Modra <amodra@bigpond.net.au>
1026 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
1027 optimizations earlier.
1029 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
1030 Restore previous input_list type.
1031 (ppc64_elf_link_hash_table_create): Undo last change.
1032 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
1033 per output section, but don't bother with bfd_abs_section marker.
1034 (ppc64_elf_next_input_section): Adjust for multiple input section
1036 (group_sections): Likewise.
1038 2003-06-17 Jakub Jelinek <jakub@redhat.com>
1040 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
1041 *r_offset == r_addend for RELATIVE relocs against .got.
1043 2003-06-17 Alan Modra <amodra@bigpond.net.au>
1045 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
1047 2003-06-17 Nick Clifton <nickc@redhat.com>
1049 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
1050 in the vtable_entries_used array to allow for the accessing
1051 the largest element.
1053 2003-06-17 Alan Modra <amodra@bigpond.net.au>
1055 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
1057 (ppc64_elf_link_hash_table_create): Init input_list here.
1058 (ppc64_elf_setup_section_lists): Remove code setting up input lists
1059 per output section. Set toc_off for abs and other standard sections.
1060 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
1061 (ppc64_elf_next_input_section): Adjust for single input section list.
1062 Don't set toc_curr from input bfds that haven't set elf_gp.
1063 (group_sections): Adjust for single input section list.
1065 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
1067 2003-06-16 Alan Modra <amodra@bigpond.net.au>
1069 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
1070 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
1071 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
1072 got section for RELATIVE relocs. Fix wrong comment. Change condition
1073 under which dynamic relocs update the section contents.
1075 2003-06-13 Robert Millan <zeratul2@wanadoo.es>
1077 * config.bfd: Add i386-netbsd-gnu target.
1079 2003-06-12 Nick Clifton <nickc@redhat.com>
1081 * opncls.c (calc_crc32): Rename to
1082 bfd_calc_gnu_debuglink_crc32 and export.
1083 (GNU_DEBUGLINK): Define and use to replace occurrences of
1084 hard-coded ".gnu_debuglink" in the code.
1085 (get_debug_link_info): Prevent aborts by replacing call to
1086 xmalloc with a call to malloc.
1087 (find_separate_debug_file): Prevent aborts by replacing calls
1088 to xmalloc and xstrdup with calls to malloc and strdup.
1089 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
1091 * bfd-in2.h: Regenerate.
1093 2003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
1095 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
1096 New target (was i[3-7]86-*-openbsd* before).
1097 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
1098 (vax-*-openbsd*): New target.
1100 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1102 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
1104 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
1105 (mips_elf_rel_dyn_section): Use appropriate section alignment.
1106 (mips_elf_create_got_section): Likewise.
1107 (_bfd_mips_elf_create_dynamic_sections): Likewise.
1109 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1111 * elf32-mips.c (mips_elf_generic_reloc): New Function.
1112 (elf_mips_howto_table_rel): Use it.
1113 (gprel32_with_gp): Move prototype.
1114 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
1115 Use mips_elf_generic_reloc.
1116 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
1118 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
1120 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
1121 as in the other *_gprel*_reloc functions.
1122 (gprel32_with_gp): Handle partial_inplace properly.
1123 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
1124 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
1125 Do addend handling directly instead of calling
1126 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
1127 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
1128 of zero addend. Handle partial_inplace properly.
1129 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
1131 (mips_elf64_gprel16_reloc): Likewise.
1132 (mips_elf64_literal_reloc): Likewise.
1133 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
1134 logic as in the other *_gprel*_reloc functions. Handle
1135 partial_inplace properly.
1136 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
1137 addend. Handle partial_inplace properly.
1138 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
1139 of calling _bfd_mips_elf_gprel16_with_gp.
1140 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
1141 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
1143 (mips_elf_shift6_reloc): Handle partial_inplace properly.
1144 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
1145 of calling _bfd_mips_elf_gprel16_with_gp.
1146 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
1147 partial_inplace properly. Fix wrong addend handling. Fix overflow
1149 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
1151 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
1152 (_bfd_mips_elf_relocate_section): Likewise.
1153 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
1154 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
1155 (_bfd_mips_elf_sign_extend): New prototype.
1157 2003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
1159 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
1160 New target (was sparc-*-openbsd* before).
1161 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
1163 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
1164 * configure: Regenerate.
1166 2003-06-11 H.J. Lu <hongjiu.lu@intel.com>
1168 * po/Make-in (DESTDIR): New.
1169 (install-data-yes): Support $(DESTDIR).
1170 (uninstall): Likewise.
1172 2003-06-11 Alan Modra <amodra@bigpond.net.au>
1174 * Makefile.am (config.status): Depend on version.h.
1176 * Makefile.in: Regenerate.
1177 * po/SRC-POTFILES.in: Regenerate.
1179 2003-06-10 Alan Modra <amodra@bigpond.net.au>
1180 Gary Hade <garyhade@us.ibm.com>
1182 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
1184 2003-06-10 Richard Sandiford <rsandifo@redhat.com>
1186 * archures.c (bfd_mach_h8300sxn): New architecture.
1187 * bfd-in2.h: Regenerate.
1188 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
1189 (h8300sxn_info_struct): New.
1190 (h8300sx_info_struct): Link to it.
1191 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
1192 (elf32_h8_final_write_processing): Likewise.
1194 2003-06-08 Alan Modra <amodra@bigpond.net.au>
1196 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
1197 elfxx-target.h so that we can use elf_backend_got_header_size.
1198 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
1199 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
1201 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
1203 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
1204 ppc_stub_plt_branch_r2off.
1205 (struct ppc_stub_hash_entry): Reorganize.
1206 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
1207 toc_curr, toc_off and emit_stub_syms.
1208 (ppc64_elf_link_hash_table_create): Init them.
1209 (ppc_stub_name): Correct string size.
1210 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
1211 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
1213 (ppc_type_of_stub): Tweak root.type test.
1214 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
1215 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
1216 ppc_stub_plt_branch_r2off.
1217 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
1218 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
1219 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
1220 Initialize elf_gp and toc_curr.
1221 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
1222 (ppc64_elf_next_input_section): Set toc_off.
1223 (group_sections): Ensure groups have the same TOC.
1224 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
1225 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
1226 Build new glink stub.
1227 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
1228 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
1229 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
1230 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
1231 * section.c (struct sec): Rename flag12 to has_gp_reloc.
1232 (STD_SECTION): Update.
1233 * ecoff.c (bfd_debug_section): Update comment.
1234 * bfd-in2.h: Regenerate.
1236 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
1238 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
1239 NULL function pointers.
1241 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
1243 * simple.c (bfd_simple_get_relocated_section_contents): Call
1244 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
1246 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
1248 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
1249 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
1251 * coff-tic4x.c: Ditto
1252 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
1253 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
1254 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
1255 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
1257 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
1258 * coff-a29k.c: Append COFF_SWAP_TABLE argument
1259 * coff-apollo.c: Ditto
1261 * coff-h8300.c: Ditto
1262 * coff-h8500.c: Ditto
1263 * coff-i960.c: Ditto
1264 * coff-m68k.c: Ditto
1265 * coff-m88k.c: Ditto
1266 * coff-mcore.c: Ditto
1268 * coff-sparc.c: Ditto
1269 * coff-tic80.c: Ditto
1270 * coff-we32k.c: Ditto
1274 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
1276 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
1279 2003-06-03 Jakub Jelinek <jakub@redhat.com>
1281 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
1282 (bfd_section_from_phdr): Likewise.
1283 (map_sections_to_segments): Create PT_GNU_STACK segment header.
1284 (get_program_header_size): Count with PT_GNU_STACK.
1285 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
1286 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
1288 2003-06-03 H.J. Lu <hongjiu.lu@intel.com>
1290 * elflink.h (elf_link_input_bfd): Call linker error_handler
1291 for discarded definitions.
1293 2003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
1295 * syms.c (decode_section_type): Return 'n' if section flags are
1296 SEC_HAS_CONTENTS && SEC_READONLY.
1298 2003-06-03 Nick Clifton <nickc@redhat.com>
1300 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
1301 R_V850_ABS32. Add entry for R_V850_REL32.
1302 (v850_elf_reloc_map): Likewise.
1303 (v850_elf_check_relocs): Likewise.
1304 (v850_elf_perform_relocation): Likewise.
1305 (v850_elf_final_link_relocate): Likewise. Include computation
1306 to make R_V850_REl32 pc-relative.
1308 2003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1310 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
1311 and DT_DEBUG dynamic tag even for position independent executables.
1312 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
1314 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
1316 * config.bfd: Move obsolete entries out of the range of the
1317 targmatch sed script.
1319 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
1321 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
1323 2003-05-31 Jakub Jelinek <jakub@redhat.com>
1325 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
1326 plt entries, not just 8191.
1328 2003-05-30 Daniel Jacobowitz <drow@mvista.com>
1330 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
1331 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
1333 2003-05-30 Ulrich Drepper <drepper@redhat.com>
1334 Jakub Jelinek <jakub@redhat.com>
1336 * elflink.h (elf_link_add_object_symbols): Use !info->executable
1337 instead of info->shared where appropriate.
1338 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
1339 * elflink.c (_bfd_elf_create_got_section): Likewise.
1340 (_bfd_elf_link_create_dynamic_sections): Likewise.
1341 (_bfd_elf_link_assign_sym_version): Likewise.
1342 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
1343 and DT_DEBUG dynamic tag even for position independent executables.
1344 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
1345 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
1346 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
1347 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
1348 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
1349 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
1350 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
1351 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
1352 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
1354 2003-05-30 Kris Warkentin <kewarken@qnx.com>
1356 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
1358 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
1360 2003-05-29 Nick Clifton <nickc@redhat.com>
1362 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
1364 * Makefile.am: Add dependency on safe-ctype.h.
1365 * Makefile.in: Regenerate.
1367 2003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1369 * elfxx-mips.c: Don't force symbols local unconditionally.
1371 2003-05-28 Alan Modra <amodra@bigpond.net.au>
1373 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
1374 undefined_symbol call.
1376 2003-05-27 Richard Sandiford <rsandifo@redhat.com>
1378 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
1379 (mips_elf_link_hash_table): Likewise.
1381 2003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1383 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
1384 R_MIPS_GNU_REL16_S2 support.
1385 (bfd_elf64_bfd_reloc_type_lookup): Use it.
1386 (mips_elf64_rtype_to_howto): Use it.
1387 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
1388 R_MIPS_GNU_REL16_S2 support.
1389 (bfd_elf32_bfd_reloc_type_lookup): Use it.
1390 (mips_elf_n32_rtype_to_howto): Use it.
1392 2003-05-21 Stuart F. Downing <sdowning@fame.com>
1394 * som.h: Define PA_2_0 before including a.out.h
1396 2003-05-07 Eric Christopher <echristo@redhat.com>
1397 Alexandre Oliva <aoliva@redhat.com>
1399 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
1400 pic tests, change to warning.
1401 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
1403 2003-05-21 Marcus Comstedt <marcus@mc.pp.se>
1405 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
1406 well as shle-...-netbsdelf. Remove duplicate entry.
1408 2003-05-21 Nick Clifton <nickc@redhat.com>
1410 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
1411 for X_STORMY16_REL_12 reloc.
1413 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
1414 the type of the hash table in the bfd_link_info structure.
1415 (bfd_elf_get_runpath_list): Likewise.
1417 2003-05-19 Roland McGrath <roland@redhat.com>
1419 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
1420 * bfd-in.h: Declare it.
1421 * bfd-in2.h: Regenerated.
1422 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
1423 * elf-bfd.h (struct elf_backend_data): New function pointer member
1424 elf_backend_bfd_from_remote_memory.
1425 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
1427 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
1428 (elfNN_bed): Add that to the initializer.
1430 2003-05-15 Roland McGrath <roland@redhat.com>
1432 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
1434 2003-05-20 Jakub Jelinek <jakub@redhat.com>
1436 * elflink.h (elf_link_output_extsym): Only issue error about !=
1437 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
1439 2003-05-20 H.J. Lu <hongjiu.lu@intel.com>
1441 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
1442 when removing the old definition for symbols with non-default
1445 2003-05-18 Jason Eckhardt <jle@rice.edu>
1447 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
1449 2003-05-17 Andreas Schwab <schwab@suse.de>
1451 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
1452 elf_section_data during processing of pc-relative and absolute
1454 (elf_m68k_relocate_section): Use the cached reloc section instead
1455 of computing it again. Fix handling of visibility. Don't modify
1456 addend when copying over a relocation into the output.
1458 2003-05-17 Alan Modra <amodra@bigpond.net.au>
1460 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
1461 to trim plt entries. Move undefweak non-default visibility test..
1462 (allocate_dynrelocs): ..from here.
1463 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
1464 dynamic_sections_created here. Update comment. Move undefweak
1465 non-default visibility test..
1466 (allocate_dynrelocs): ..from here. Fix comment.
1467 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
1468 to trim plt entries. Move undefweak non-default visibility test..
1469 (allocate_dynrelocs): ..from here. Fix comment.
1470 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
1471 STV_DEFAULT rather than comparing with zero.
1472 * elflink.c (_bfd_elf_merge_symbol): Likewise.
1473 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
1475 2003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1477 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
1479 (_bfd_set_gp_value): Likewise.
1481 2003-05-16 Michael Snyder <msnyder@redhat.com>
1482 From Bernd Schmidt <bernds@redhat.com>
1483 * archures.c (bfd_mach_h8300sx): New.
1484 * bfd-in2.h: Regenerate.
1485 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
1486 (h8300sx_info_struct): New.
1487 (h8300s_info_struct): Link to it.
1488 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
1489 (elf32_h8_final_write_processing): Likewise.
1490 (elf32_h8_relax_section): Likewise.
1492 2003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
1494 * config.bfd: Accept i[3-7]86 variants.
1495 * configure.host: Likewise.
1496 * configure.in: Likewise.
1497 * configure: Regenerate.
1499 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
1501 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
1504 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
1506 * elflink.h (elf_link_check_versioned_symbol): Also allow
1509 2003-05-15 Alan Modra <amodra@bigpond.net.au>
1510 H.J. Lu <hongjiu.lu@intel.com>
1512 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
1513 (elf_i386_relocate_section): Likewise.
1514 * elf32-ppc.c (allocate_dynrelocs): Likewise.
1515 (ppc_elf_relocate_section): Likewise.
1516 * elf64-ppc.c (allocate_dynrelocs): Likewise.
1517 (ppc64_elf_relocate_section): Likewise.
1519 2003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1521 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
1523 2003-05-13 Stephane Carrez <stcarrez@nerim.fr>
1525 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
1526 processor capability, allow merge of HC12 and HCS12 in some cases.
1527 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
1528 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
1529 (bfd_m68hc12_arch): Link it.
1530 (scan_mach): New function.
1532 2003-05-13 Andrew Haley <aph@redhat.com>
1534 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
1536 2003-05-13 Alan Modra <amodra@bigpond.net.au>
1537 H.J. Lu <hongjiu.lu@intel.com>
1539 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
1540 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
1541 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
1542 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
1543 (ppc_elf_relocate_section): Likewise.
1544 * elf64-ppc.c (allocate_dynrelocs): Likewise.
1545 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
1546 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
1547 relocs need no other types.
1548 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
1550 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
1551 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
1554 2003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1556 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
1557 copy ELF_LINK_NON_GOT_REF from weakdef.
1558 (allocate_dynrelocs): For undef weak syms with non-default
1559 visibility, a) don't allocate plt entries, b) don't allocate
1560 .got relocs, c) discard dyn rel space
1561 (sh_elf_relocate_section): d) don't generate .got relocs, e)
1562 don't generate dynamic relocs.
1563 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
1564 for weakdefs when symbol already adjusted.
1566 2003-05-12 Nick Clifton <nickc@redhat.com>
1568 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
1569 overflow detection for R_XSTORMY16_16 reloc.
1571 2003-05-12 Paul Clarke <paulc@senet.com.au>
1573 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
1575 2003-05-11 Jason Eckhardt <jle@rice.edu>
1577 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
1579 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
1581 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
1584 2003-05-11 Andreas Schwab <schwab@suse.de>
1586 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
1587 complicated tests for unresolvable relocs with a simple direct
1588 scheme using "unresolved_reloc" var. Report some detail on
1589 bfd_reloc_outofrange and similar errors.
1591 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1593 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
1594 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
1595 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
1596 * elf64-s390.c: Likewise.
1598 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1600 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
1601 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
1602 ELF_LINK_NON_GOT_REF from weakdef.
1603 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
1604 already been adjusted before treating it specially.
1605 * el64-s390.c: Likwise.
1607 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1609 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
1610 non-default visibility, a) don't make them dynamic, b) discard
1611 space for dynamic relocs.
1612 (elf_s390_relocate_section): Initialize the GOT entries and skip
1613 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
1614 symbols with non-default visibility.
1615 * elf64-s390.c: Likewise.
1617 2003-05-09 Alan Modra <amodra@bigpond.net.au>
1619 * cpu-arm.c (arm_check_note): Warning fix.
1620 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
1621 to keep relocs if edited.
1622 (iq2000_elf_print_private_bfd_data): Return TRUE.
1623 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
1625 (elfNN_ia64_relax_ldxmov): Warning fix.
1626 * xtensa-isa.c (xtensa_add_isa): Warning fix.
1627 * xtensa-modules.c (get_num_opcodes): Warning fix.
1629 2003-05-09 Andrey Petrov <petrov@netbsd.org>
1631 * elf.c (elf_fake_sections): Use correct cast for sh_name.
1633 2003-05-09 Alan Modra <amodra@bigpond.net.au>
1635 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
1636 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
1637 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
1638 (bfd_elf_record_link_assignment): Move from elflink.h.
1639 (_bfd_elf_merge_symbol): Likewise.
1640 (_bfd_elf_add_default_symbol): Likewise.
1641 (_bfd_elf_export_symbol): Likewise.
1642 (_bfd_elf_link_find_version_dependencies): Likewise.
1643 (_bfd_elf_link_assign_sym_version): Likewise.
1644 (_bfd_elf_link_read_relocs): Likewise.
1645 (_bfd_elf_link_size_reloc_section): Likewise.
1646 (_bfd_elf_fix_symbol_flags): Likewise.
1647 (_bfd_elf_adjust_dynamic_symbol): Likewise.
1648 (_bfd_elf_link_sec_merge_syms): Likewise.
1649 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
1650 and bed->s->sizeof_rela.
1651 (_bfd_elf_link_output_relocs): Likewise.
1652 * elf-bfd.h (struct elf_size_info): Rename file_align to
1654 (struct elf_info_failed): Move from elflink.h.
1655 (struct elf_assign_sym_version_info): Likewise.
1656 (struct elf_find_verdep_info): Likewise.
1657 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
1658 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
1659 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
1660 _bfd_elf_link_assign_sym_version,
1661 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
1662 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
1663 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
1664 _bfd_elf_link_sec_merge_syms): Declare.
1665 (bfd_elf32_link_create_dynamic_sections): Don't declare.
1666 (_bfd_elf32_link_read_relocs): Likewise.
1667 (bfd_elf64_link_create_dynamic_sections): Likewise.
1668 (_bfd_elf64_link_read_relocs): Likewise.
1669 * elflink.h: Move lots o' stuff elsewhere.
1670 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
1671 (bfd_elf64_record_link_assignment): Likewise.
1672 (bfd_elf_record_link_assignment): Declare.
1673 * bfd-in2.h: Regenerate.
1674 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
1675 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
1676 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
1677 (assign_file_positions_for_segments): Likewise.
1678 (assign_file_positions_except_relocs): Likewise.
1679 (swap_out_syms, elfcore_write_note): Likewise.
1680 * elf-m10200.c: Adjust for changed function names.
1681 * elf-m10300.c: Likewise.
1682 * elf32-arm.h: Likewise.
1683 * elf32-h8300.c: Likewise.
1684 * elf32-hppa.c: Likewise.
1685 * elf32-ip2k.c: Likewise.
1686 * elf32-m32r.c: Likewise.
1687 * elf32-m68hc11.c: Likewise.
1688 * elf32-m68hc1x.c: Likewise.
1689 * elf32-m68k.c: Likewise.
1690 * elf32-mips.c: Likewise.
1691 * elf32-ppc.c: Likewise.
1692 * elf32-sh.c: Likewise.
1693 * elf32-v850.c: Likewise.
1694 * elf32-xtensa.c: Likewise.
1695 * elf64-alpha.c: Likewise.
1696 * elf64-hppa.c: Likewise.
1697 * elf64-mmix.c: Likewise.
1698 * elf64-ppc.c: Likewise.
1699 * elf64-sh64.c: Likewise.
1700 * elfxx-ia64.c: Likewise.
1701 * elfxx-mips.c: Likewise.
1702 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
1703 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
1704 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
1705 * elf64-mips.c (mips_elf64_size_info): Likewise.
1706 * elf64-s390.c (s390_elf64_size_info): Likewise.
1707 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
1709 2003-05-08 H.J. Lu <hongjiu.lu@intel.com>
1711 * elflink.h (elf_add_default_symbol): After skipping the
1712 unversioned symbol, go to non-default one.
1714 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
1716 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
1718 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
1719 for symbols with non-default visibility.
1721 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
1723 * elflink.h (elf_link_check_versioned_symbol): Also handle the
1724 case that a DSO references a hidden symbol which may be
1725 satisfied by a versioned symbol in another DSO.
1726 (elf_link_output_extsym): Check versioned definition for hidden
1727 symbol referenced by a DSO.
1729 2003-05-07 Nick Clifton <nickc@redhat.com>
1731 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
1732 R_XSTORMY16_16 reloc to ignore overflows.
1734 2003-05-06 Alexandre Oliva <aoliva@redhat.com>
1736 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
1737 error message for mixing different-endian files. Check for ABI
1738 compatibility of input files with the selected emulation.
1740 2003-05-05 Alan Modra <amodra@bigpond.net.au>
1742 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
1743 non-default visibility, a) don't make them dynamic, b) discard
1744 space for dynamic relocs.
1745 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
1747 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
1748 non-default visibility, a) don't allocate plt entries, b) don't
1749 allocate .got relocs, c) discard dyn rel space,
1750 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
1751 don't generate dynamic relocs.
1752 * elf64-ppc.c (allocate_dynrelocs): As above.
1753 (ppc64_elf_relocate_section): As above.
1755 2003-05-05 Andreas Jaeger <aj@suse.de>
1757 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
1758 relocation entries for weak undefined symbols with non-default
1760 (elf64_x86_64_relocate_section): Initialize the GOT entries and
1761 skip R_386_32/R_386_PC32 for weak undefined symbols with
1762 non-default visibility.
1764 2003-05-04 H.J. Lu <hjl@gnu.org>
1766 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
1767 relocation entries for weak undefined symbols with non-default
1769 (elf_i386_relocate_section): Initialize the GOT entries and
1770 skip R_386_32/R_386_PC32 for weak undefined symbols with
1771 non-default visibility.
1773 * elfxx-ia64.c (allocate_fptr): Don't allocate function
1774 descriptors for weak undefined symbols with non-default
1776 (allocate_dynrel_entries): Don't allocate relocation entries
1777 for symbols resolved to 0.
1778 (set_got_entry): Don't install dynamic relocation for weak
1779 undefined symbols with non-default visibility.
1780 (set_pltoff_entry): Likewise.
1782 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
1783 with non-default visibility.
1784 (elf_link_output_extsym): Don't make weak undefined symbols
1785 with non-default visibility dynamic.
1787 2003-05-04 H.J. Lu <hjl@gnu.org>
1789 * elflink.h (elf_merge_symbol): Correctly handle weak definiton.
1791 2003-05-04 H.J. Lu <hjl@gnu.org>
1793 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
1794 symbol dynamic. Check indirection when removing the old
1795 definition for symbols with non-default visibility.
1796 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
1798 2003-05-02 Nick Clifton <nickc@redhat.com>
1800 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
1801 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
1804 2003-05-02 Andreas Jaeger <aj@suse.de>
1806 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
1807 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
1808 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
1809 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
1810 ELF_LINK_NON_GOT_REF from weakdef.
1812 2003-05-02 Charles Lepple <clepple@ghz.cc>
1813 Nick Clifton <nickc@redhat.com>
1815 * acinclude.m4: Fix name of --enable-install-libbfd switch.
1816 * aclocal.m4: Regenerate.
1817 * configure: Regenerate.
1818 * Makefile.in: Regenerate.
1820 2003-05-01 Alan Modra <amodra@bigpond.net.au>
1822 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
1823 weakdef sym has already been adjusted before treating it specially.
1824 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
1825 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
1826 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
1827 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
1829 2003-04-28 H.J. Lu <hjl@gnu.org>
1831 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
1832 the relax finalize pass.
1834 * section.c (struct sec): Add need_finalize_relax and remove
1836 (STD_SECTION): Update struct sec initializer.
1837 * bfd-in2.h: Regenerated.
1839 2003-04-28 H.J. Lu <hjl@gnu.org>
1841 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
1842 to copy any information related to dynamic linking when we flip
1845 2003-04-27 H.J. Lu <hjl@gnu.org>
1847 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
1848 (ELF_LINK_DYNAMIC_WEAK): New.
1850 * elflink.h (elf_merge_symbol): Add one argument to indicate if
1851 a symbol should be skipped. Ignore definitions in dynamic
1852 objects for symbols with non-default visibility.
1853 (elf_add_default_symbol): Adjusted.
1854 (elf_link_add_object_symbols): Check if a symbol should be
1855 skipped. Don't merge the visibility field with the one from
1857 (elf_link_check_versioned_symbol): Use undef_bfd.
1858 (elf_link_output_extsym): Warn if a forced local symbol is
1859 referenced from dynamic objects. Make non-weak undefined symbol
1860 with non-default visibility a fatal error.
1862 2003-04-27 Daniel Jacobowitz <drow@mvista.com>
1864 * configure.in: Bump version on HEAD to 2.14.90.
1865 * configure: Regenerated.
1867 2003-04-26 Stephane Carrez <stcarrez@nerim.fr>
1870 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
1871 when we couldn't relax something.
1873 2003-04-25 Alan Modra <amodra@bigpond.net.au>
1875 * elflink.h (elf_merge_symbol): When we find a regular definition
1876 for an indirect symbol, flip the indirection so that the old
1877 direct symbol now points to the new definition.
1879 2003-04-24 Roland McGrath <roland@redhat.com>
1881 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
1883 2003-04-24 Alan Modra <amodra@bigpond.net.au>
1885 * elf32-ppc.c: Formatting and comment fixes.
1886 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
1887 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
1889 2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
1891 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
1892 * bfd-in2.h: Rebuilt.
1893 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
1894 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
1896 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
1897 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
1898 (h8300sn_info_struct, h8300hn_info_struct): New.
1899 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
1900 (elf32_h8_final_write_processing): Likewise.
1902 2003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1904 * elf32-sh.c (tpoff): New.
1905 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
1906 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
1907 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
1908 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
1909 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
1910 (dtpoff_base): Fix wrong indentation.
1911 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
1912 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
1913 R_SH_TLS_TPOFF32 relocations.
1915 2003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
1917 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
1918 * cpu-sh.c: Likewise.
1919 * elf32-sh.c: Likewise.
1920 * reloc.c (bfd_reloc_code_real): Likewise.
1921 * elf32-sh64-com.c: Change comment to refer to SuperH.
1922 * elf32-sh64.c: Likewise.
1923 * elf64-sh64.c: Likewise.
1924 * bfd-in2.h (enum bfd_architecture): Regenerate.
1926 2003-04-23 Alan Modra <amodra@bigpond.net.au>
1928 From Julien LEMOINE <speedblue@debian.org>
1929 * elf32-i386.c (elf_i386_info_to_howto): Delete.
1930 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
1932 2003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1934 * archures.c: Replace references to Mitsubishi M32R with references
1936 * relocs.c: Likewise.
1937 * bfd-in2.h: Regenerate.
1939 2003-04-21 Richard Henderson <rth@redhat.com>
1941 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
1942 executable when a symbol is defined both regular and dynamic.
1944 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
1946 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
1947 (elf32-m68hc1x.lo): Update dependencies
1948 * configure.in: Add elf32-m68hc1x.lo.
1949 * configure: Rebuild.
1950 * Makefile.in: Rebuild.
1952 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
1954 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
1955 (m68hc11_elf_hash_table_create): New function.
1956 (elf32_m68hc11_link_hash_table_free): New function.
1957 (stub_hash_newfunc): New function.
1958 (m68hc11_add_stub): New function.
1959 (elf32_m68hc11_add_symbol_hook): New function.
1960 (elf32_m68hc11_setup_section_lists): New function.
1961 (elf32_m68hc11_next_input_section): New function.
1962 (elf32_m68hc11_size_stubs): New function.
1963 (elf32_m68hc11_build_stubs): New function.
1964 (m68hc11_get_relocation_value): New function.
1965 (elf32_m68hc11_relocate_section): Call the above to redirect
1966 some relocations to the trampoline code.
1967 (m68hc11_elf_export_one_stub): New function.
1968 (m68hc11_elf_set_symbol): New function.
1969 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
1970 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
1971 is not yet initialized.
1973 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
1974 (elf32_m68hc11_stub_hash_entry): New struct.
1975 (m68hc11_page_info): Add trampoline handler address.
1976 (m68hc11_elf_link_hash_table): Add stubs generation members.
1977 (elf32_m68hc11_add_symbol_hook): Declare.
1978 (elf32_m68hc11_setup_section_lists): Declare.
1979 (elf32_m68hc11_size_stubs): Declare.
1980 (elf32_m68hc11_build_stubs): Declare.
1982 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
1983 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
1984 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
1985 (_bfd_m68hc11_elf_set_private_flags): Ditto.
1986 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
1987 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
1988 (bfd_elf32_bfd_link_hash_table_create): Define.
1989 (elf_backend_add_symbol_hook): Define.
1990 (m68hc11_elf_bfd_link_hash_table_create): New function.
1991 (m68hc11_elf_build_one_stub): New function.
1992 (m68hc11_elf_size_one_stub): New function.
1993 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
1994 (bfd_elf32_bfd_link_hash_table_create): Define.
1996 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
1997 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
1998 (m68hc12_phys_addr): Ditto.
1999 (m68hc12_phys_page): Ditto.
2000 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
2001 (elf32_m68hc11_gc_mark_hook): Likewise.
2002 (elf32_m68hc11_gc_sweep_hook): Likewise.
2003 (elf32_m68hc11_check_relocs): Likewise.
2004 (elf32_m68hc11_relocate_section): Likewise.
2005 (_bfd_m68hc12_elf_set_private_flags): Likewise.
2006 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
2007 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
2008 (m68hc12_elf_build_one_stub): New function.
2009 (m68hc12_elf_size_one_stub): New function.
2010 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
2011 (elf_backend_add_symbol_hook): Define.
2012 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2014 2003-04-18 Nick Clifton <nickc@redhat.com>
2016 * format.c (bfd_check_format_matches): Only check associated
2017 vector if the matching_vector has been created.
2019 2003-04-15 Alexandre Oliva <aoliva@redhat.com>
2021 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
2022 2003-04-09's change.
2024 2003-04-15 Brian Ford <ford@vss.fsi.com>
2026 * peicode.h (coff_swap_scnhdr_in): If a section holds
2027 uninitialized data and is from an object file or from an
2028 executable image that has not initialized the s_size field, or if
2029 the physical size is padded, use the virtual size (stored in
2032 2003-04-15 H.J. Lu <hjl@gnu.org>
2034 * elflink.h (elf_link_add_object_symbols): Properly report
2035 filename for alignment reduction.
2037 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
2039 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
2040 * reloc.c: Likewise.
2041 * coff-h8300.c: Likewise.
2042 * coff-h8500.c: Likewise.
2043 * coff-sh.c: Likewise.
2044 * cpu-h8300.c: Likewise.
2045 * cpu-sh.c: Likewise.
2046 * elf32-h8300.c: Likewise.
2047 * elf32-sh.c: Likewise.
2048 * elf32-sh64-com.c: Likewise.
2049 * elf32-sh64.c: Likewise.
2050 * elf64-sh64.c: Likewise.
2051 * bfd-in2.h: Regenerate.
2053 2003-04-14 H.J. Lu <hjl@gnu.org>
2055 * elflink.h (elf_link_add_object_symbols): Maintain maximum
2056 alignment for common symbols. Warn reducing alignment for
2057 common symbols. Report old filename when symbol size changes.
2059 2003-04-12 Alexandre Oliva <aoliva@redhat.com>
2061 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
2062 occurrences of the same test changed in the previous patch.
2065 2003-04-11 Alexandre Oliva <aoliva@redhat.com>
2067 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
2068 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
2069 GOT_DISP/addend only if the symbol got a global GOT entry.
2071 2003-04-10 Alexandre Oliva <aoliva@redhat.com>
2073 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
2074 GOT_PAGE/GOT_OFST referencing overridable symbol to
2076 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
2077 global symbol as GOT_DISP.
2079 2003-04-10 Bob Wilson <bob.wilson@acm.org>
2081 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
2082 next relocation on an undefined symbol.
2084 2003-04-09 Richard Henderson <rth@redhat.com>
2086 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
2087 Ignore relocations against r_symndx == 0.
2089 2003-04-09 H.J. Lu <hjl@gnu.org>
2091 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
2092 FALSE for undefined symbols.
2093 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2095 2003-04-09 Alexandre Oliva <aoliva@redhat.com>
2097 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
2098 and IRIX-specific shift-to-64-bit 4-byte lengths before following
2101 2003-04-08 Alexandre Oliva <aoliva@redhat.com>
2103 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
2104 pointer size from ABI, not arch_bits_per_address.
2106 2003-04-07 Kevin Buettner <kevinb@redhat.com>
2108 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
2109 constants for n32 ABI.
2111 2003-04-06 Andrew Cagney <cagney@redhat.com>
2113 * simple.c (bfd_simple_get_relocated_section_contents): Disable
2114 free that leads to GDB vs BFD memory corruption.
2116 2003-04-04 Stephane Carrez <stcarrez@nerim.fr>
2118 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
2119 symbols that mark the end of the section.
2120 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
2121 converting to a relative branch so that the offset is computed after
2122 the relaxation; also relocate a jsr into a bsr if possible but don't
2123 relax them if they are to a far symbol as we need to call the
2125 (elf_m68hc11_howto_table): Set pcrel_offset to true.
2127 2003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2129 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
2130 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
2131 * bfd-in2.h: Regenerate
2132 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
2133 * cpu-tic4x.c: Ditto
2135 2003-04-03 Nick Clifton <nickc@redhat.com>
2137 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
2138 differently for object files and executables.
2139 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
2140 for object files or for executables who have not already
2141 initialised the field.
2142 * libpei.h (bfd_pe_executable_p): New macro. Return true if
2143 the PE format bfd is an executable.
2145 2003-04-03 Alan Modra <amodra@bigpond.net.au>
2147 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
2148 here as it's too early to reliably determine locality.
2149 (ppc_elf_gc_sweep_hook): Likewise.
2150 (SYMBOL_REFERENCES_LOCAL): Expand comment.
2152 2003-04-02 Bob Wilson <bob.wilson@acm.org>
2154 * xtensa-modules.c: Remove comment indicating that this is a
2157 2003-04-02 Alan Modra <amodra@bigpond.net.au>
2159 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
2161 2003-04-01 Bob Wilson <bob.wilson@acm.org>
2163 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
2164 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
2165 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
2167 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
2169 (cpu-xtensa.lo): New target.
2170 (elf32-xtensa.lo): Likewise.
2171 (xtensa-isa.lo): Likewise.
2172 (xtensa-modules.lo): Likewise.
2173 * Makefile.in: Regenerate.
2174 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
2175 (bfd_archures_list): Add bfd_xtensa_arch.
2176 * config.bfd: Handle xtensa-*-*.
2177 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
2178 * configure: Regenerate.
2179 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
2180 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
2181 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
2182 (bfd_elf32_xtensa_le_vec): Likewise.
2183 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
2184 * cpu-xtensa.c: New file.
2185 * elf32-xtensa.c: Likewise.
2186 * xtensa-isa.c: Likewise.
2187 * xtensa-modules.c: Likewise.
2188 * libbfd.h: Regenerate.
2189 * bfd-in2.h: Likewise.
2191 2003-04-01 Nick Clifton <nickc@redhat.com>
2193 * archures.c (bfd_mach_arm_unknown): Define.
2194 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
2195 bfd_arm_get_mach_from_notes): Prototype.
2196 * bfd-in2.h: Regenerate.
2197 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
2198 bfd_arm_merge_machines.
2199 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
2200 * coffcode.h (coff_set_arch_mach_hook): Call
2201 bfd_arm_get_mach_from_notes.
2202 * coffgen.c (coff_real_object_p): Revert previous delta.
2203 * cpu_arm.c (arm_check_note): New function. Examine a note in a
2205 (bfd_arm_merge_machines): New function: Handle the merging of ARM
2206 binaries compiled for different architectures..
2207 (bfd_arm_update_notes): New function: Update an ARM note section.
2208 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
2209 number from an ARM note section.
2210 * elf32-arm.h (elf32_arm_object_p): Use
2211 bfd_arm_get_mach_from_notes.
2212 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
2213 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
2215 2003-04-01 Ben Elliston <bje@wasabisystems.com>
2217 * dwarf2.c (read_attribute_value): Correct typo in comment.
2219 2003-04-01 Nick Clifton <nickc@redhat.com>
2221 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
2222 instead of concat().
2223 (decode_line_info): Only free filename if it is not NULL.
2224 (add_line_info): Make a copy of the filename when storing it into
2227 2003-03-31 Andreas Schwab <schwab@suse.de>
2228 Daniel Jacobowitz <drow@mvista.com>
2230 * simple.c (bfd_simple_get_relocated_section_contents): Add
2231 parameter symbol_table. Optionally use it instead of the symbol
2232 table from the bfd. Save and restore output offsets and output
2233 sections around bfd_get_relocated_section_contents. Fix a memory
2235 (simple_save_output_info, simple_restore_output_info): New
2237 * bfd-in2.h: Regenerate.
2238 * dwarf2.c (read_abbrevs): Use
2239 bfd_simple_get_relocated_section_contents instead of
2240 bfd_get_section_contents.
2241 (decode_line_info): Likewise.
2242 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
2244 (find_rela_addend): Remove.
2245 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
2247 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
2250 2003-03-31 David Heine <dlheine@suif.stanford.edu>
2252 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
2254 * dwarf2.c (concat_filename): Always allocate space for the
2256 (decode_line_info): Free the allocated filename returned by
2258 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
2259 * elf.c (copy_private_bfd_data): Likewise.
2260 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
2261 * elflink.h (elf_link_sort_relocs): Fix memory leak.
2262 * format.c (bfd_check_format_matches): Likewise.
2263 * linker.c (bfd_generic_final_link): Likewise.
2264 * opncls.c (find_separate_debug_info): Likewise.
2265 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
2267 2003-03-28 H.J. Lu <hjl@gnu.org>
2269 * elflink.h (elf_link_add_object_symbols): Correctly combine
2272 2003-03-27 Jakub Jelinek <jakub@redhat.com>
2274 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
2275 to -1 before recomputing got offsets.
2277 2003-03-26 Andreas Schwab <schwab@suse.de>
2279 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
2280 (elf_m68k_relocate_section): Use it to correctly handle symbols
2282 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
2283 entries for symbols that are forced to be local.
2285 2003-03-25 Alexandre Oliva <aoliva@redhat.com>
2287 * elfxx-mips.c (_bfd_mips_relax_section): New function.
2288 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
2289 * elfn32-mips.c, elf64-mips.c: Use it.
2291 2003-03-25 Stan Cox <scox@redhat.com>
2292 Nick Clifton <nickc@redhat.com>
2294 Contribute support for Intel's iWMMXt chip - an ARM variant:
2296 * archures.c: Add bfd_mach_arm_iWMMXt.
2297 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
2298 * bfd-in2.h: Regenerate.
2299 * libbfd.h: Regenerate.
2300 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
2301 object files to be linked with XScale ones.
2302 (coff_arm_final_link_postscript): Update note section.
2303 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
2304 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
2305 after identifying a coff binary.
2306 * cpu-arm.c (processors): Add iWMMXt.
2307 (arch_inf): Likewise.
2308 * elf32-arm.h (arm_object_p): Handle note section.
2309 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
2310 be linked with XScale ones.
2311 (elf32_arm_section_flags): New function: Set flags on note section.
2312 (elf32_arm_final_write_processing): Handle note section.
2314 2003-03-21 DJ Delorie <dj@redhat.com>
2316 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
2317 _bfd_elf_rela_local_sym.
2319 2003-03-20 H.J. Lu <hjl@gnu.org>
2321 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
2324 2003-03-20 Nick Clifton <nickc@redhat.com>
2326 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
2327 $idata5 in case bfd_coff_final_link is not called.
2329 2003-03-19 Jakub Jelinek <jakub@redhat.com>
2331 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
2333 (canon_reloc_count): Define.
2334 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
2335 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
2337 (sparc64_elf_canonicalize_reloc): New routine.
2338 (bfd_elf64_canonicalize_reloc): Define.
2340 2003-03-18 Jakub Jelinek <jakub@redhat.com>
2342 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
2343 againt mergeable sections. Take r_addend into account when caching
2346 2003-03-18 Richard Henderson <rth@redhat.com>
2348 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
2349 local symbols that have no dyninfo.
2351 2003-03-14 Gene Smith <gene.smith@siemens.com>
2353 * ieee.c (ieee_write_expression): Handle the case where symbol is
2355 General formatting improvements.
2357 2003-03-13 Nick Clifton <nickc@redhat.com>
2359 * configure.in (LINGUAS): Add zh_CN.
2360 * configure: Regenerate.
2361 * po/zh_CN.po: New file.
2363 2003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
2365 * aout-cris.c (BYTES_IN_WORD): Don't define.
2366 aout-encap.c: Likewise.
2367 aout-ns32k.c: Likewise.
2368 aout-tic30.c: Likewise.
2369 hp300bsd.c: Likewise.
2370 i386aout.c: Likewise.
2371 i386dynix.c: Likewise.
2372 i386linux.c: Likewise.
2373 i386lynx.c: Likewise.
2374 i386mach3.c: Likewise.
2375 m68k4knetbsd.c: Likewise.
2376 m68klinux.c: Likewise.
2377 m68klynx.c: Likewise.
2378 m68knetbsd.c: Likewise.
2379 m88kmach3.c: Likewise.
2380 mipsbsd.c: Likewise.
2381 newsos3.c: Likewise.
2382 sparclinux.c: Likewise.
2383 sparclynx.c: Likewise.
2384 sparcnetbsd.c: Likewise.
2385 vaxbsd.c: Likewise. Fix comment formatting.
2387 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
2389 * Reverted 2003-03-02's patch.
2391 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
2393 * elf64-mips.c (mips_elf64_canonicalize_reloc,
2394 mips_elf64_get_dynamic_reloc_upper_bound,
2395 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
2396 (bfd_elf64_get_canonicalize_reloc,
2397 bfd_elf64_get_dynamic_reloc_upper_bound,
2398 bfd_elf64_canonicalize_dynamic_reloc): Define.
2399 (mips_elf64_slurp_reloc_table): Support dynamic.
2400 (mips_elf64_slurp_one_reloc_table): Adjust.
2402 2003-03-12 Nick Clifton <nickc@redhat.com>
2404 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
2405 'index' to 'offset' in test for zero value.
2407 2003-03-11 Alexandre Oliva <aoliva@redhat.com>
2409 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
2410 dynamic relocations pointing to local or section symbols, use the
2411 NULL symbol instead. Document the choice to not emit an
2412 additional R_MIPS_64 relocation.
2414 2003-03-11 Alan Modra <amodra@bigpond.net.au>
2416 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
2417 zero index dynamic tls relocs generated for the GOT. Tidy code.
2418 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
2419 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2421 2003-03-07 Alan Modra <amodra@bigpond.net.au>
2423 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
2424 a tls_get_addr call.
2426 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
2427 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
2428 ELF_LINK_NON_GOT_REF from weakdef.
2429 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
2430 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
2431 ELF_LINK_NON_GOT_REF from weakdef.
2432 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
2433 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
2434 ELF_LINK_NON_GOT_REF from weakdef.
2436 2003-03-06 Jakub Jelinek <jakub@redhat.com>
2437 Andrew Haley <aph@redhat.com>
2439 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
2440 output is relocateable.
2442 2003-03-06 Steven Konopa <skonopa@kgo.csc.com>
2444 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
2447 2003-03-06 Alan Modra <amodra@bigpond.net.au>
2449 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
2451 (ELIMINATE_COPY_RELOCS): Define to zero.
2452 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
2453 TLSLD relocs. Report reloc types on a number of errors. Optimize
2454 LOCAL24PC check for non-local syms. Don't capitalize error messages.
2455 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
2456 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
2457 calculating TLSLD relocs. Report reloc types on a number of errors.
2458 Don't capitalize error messages.
2460 2003-03-03 H.J. Lu <hjl@gnu.org>
2462 * elfxx-ia64.c (USE_BRL): Removed.
2465 2003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
2467 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
2468 relocation (no special function), and make it non-partial_inplace.
2469 (sh_elf_relax_section): When creating a bsr, use a consistent value
2470 no matter if the symbol is extern or not; set addend to -4.
2471 Don't swap load / non-load instructions for SH4.
2472 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
2473 rather than if the symbol is external to determine if adjusting the
2474 offset makes sense. Adjust the addend too if appropriate.
2475 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
2478 2003-03-03 Nick Clifton <nickc@redhat.com>
2480 * po/da.po: Installed latest translation.
2482 2003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2484 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
2485 R_MIPS_PC16 to rightshift 2.
2486 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
2487 (bfd_elf32_bfd_reloc_type_lookup): Support
2488 BFD_RELOC_MIPSEMB_16_PCREL_S2.
2489 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
2490 R_MIPS_PC16 to rightshift 2.
2491 (mips_elf64_howto_table_rela): Likewise.
2492 (mips_reloc_map): Map to rightshifted BFD reloc.
2493 * elfn32-mips.c: The same as in elf64-mips.c.
2494 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
2495 (mips_elf_calculate_relocation): Handle rightshifted addends for
2497 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
2498 MIPS Embedded PIC. Remove superfluous empty COMMENT.
2499 * libbfd.h: Regenerate.
2500 * bfd-in2.h: Regenerate.
2502 2003-02-28 Richard Henderson <rth@redhat.com>
2504 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
2505 for ltoff22x relaxation.
2507 2003-03-01 Alan Modra <amodra@bigpond.net.au>
2509 * bfd-in.h (_bfd): Don't define.
2510 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
2512 * bfd-in2.h: Regenerate.
2514 2003-02-27 Richard Henderson <rth@redhat.com>
2516 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
2517 (elfNN_ia64_check_relocs): Set it.
2518 (allocate_global_data_got): Check it.
2519 (allocate_local_got): Likewise.
2520 (allocate_dynrel_entries): Likewise.
2521 (elfNN_ia64_relax_ldxmov): New.
2522 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
2523 (elfNN_ia64_choose_gp): Split out from ...
2524 (elfNN_ia64_final_link): ... here.
2526 2003-02-27 Andrew Cagney <cagney@redhat.com>
2528 * bfd.c (struct bfd): Rename "struct _bfd".
2529 * bfd-in.h: Update copyright.
2530 (struct bfd): Rename "struct _bfd".
2531 (_bfd): Define for backward compatibility.
2532 * bfd-in2.h: Regenerate.
2534 2003-02-25 Alan Modra <amodra@bigpond.net.au>
2536 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
2537 and rel_hdr2 when initially counting input relocs rather than after
2538 creating output reloc sections.
2539 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
2542 * Makefile.am: Run "make dep-am".
2543 * Makefile.in: Regenerate.
2545 2003-02-24 Kris Warkentin <kewarken@qnx.com>
2547 * elf.c (elfcore_read_notes): Add check for QNX style core file.
2548 (elfcore_grog_nto_note): New function.
2549 (elfcore_grog_nto_gregs): New function.
2550 (elfcore_grog_nto_status): New function.
2552 2003-02-24 Alan Modra <amodra@bigpond.net.au>
2554 * elflink.c (_bfd_elf_create_got_section): Check existing .got
2555 section flags before concluding that we've already been called.
2556 Don't use register keyword.
2557 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
2558 (_bfd_elf_create_linker_section): Formatting.
2560 2003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
2562 * coff-h8300.c: Fix typo: intial -> initial.
2563 * coff-ppc.c: Likewise.
2565 2003-02-20 Alan Modra <amodra@bigpond.net.au>
2567 * elf32-ppc.c: Formatting.
2568 (allocate_dynrelocs): LD and GD relocs against the same sym need
2569 separate GOT entries.
2570 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
2573 2003-02-19 Alan Modra <amodra@bigpond.net.au>
2575 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
2576 removal. Localize vars. Remove unnecessary dynobj test.
2577 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
2579 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
2581 (elf_i386_relocate_section): Likewise.
2582 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
2583 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
2584 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
2585 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
2586 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
2587 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
2588 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
2589 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
2592 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
2593 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
2595 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
2596 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2597 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
2598 and optimize. Use ELIMINATE_COPY_RELOCS.
2599 (ppc64_elf_relocate_section): Likewise.
2601 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
2602 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
2603 (ELIMINATE_COPY_RELOCS): Define.
2604 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
2605 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2606 (MUST_BE_DYN_RELOC): Define.
2607 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
2608 and optimize. Trim dyn_relocs.
2609 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
2610 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
2611 track of pc_rel dyn relocs.
2612 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
2613 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
2614 allocate_dynrelocs. Don't recalculate "sec".
2616 2003-02-18 Alan Modra <amodra@bigpond.net.au>
2618 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
2619 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
2620 on invalid LD relocs.
2621 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
2622 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
2623 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
2625 * elf32-ppc.h: New file.
2626 * elf32-ppc.c: Include elf32-ppc.h.
2627 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
2628 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
2629 Add "tls_mask" field.
2630 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
2631 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
2632 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
2633 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
2634 Make use of htab shortcuts throughout file.
2635 (ppc_elf_link_hash_newfunc): Init tls_mask field.
2636 (ppc_elf_link_hash_table_create): Init new fields.
2637 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
2638 (ppc_elf_howto_raw): Add tls relocs.
2639 (ppc_elf_reloc_type_lookup): Handle them.
2640 (ppc_elf_unhandled_reloc): New function.
2641 (ppc_elf_create_got): Stash got section pointer in hash table,
2642 return status. Make .rela.got too.
2643 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
2644 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
2645 NON_GOT_REF set. Don't allocate space in .plt here..
2646 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
2647 not allocating plt entries unnecessarily. Allocate got entries here.
2648 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
2649 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
2650 "info" during allocate_dynrelocs hash traversal. Use htab section
2651 shortcuts rather than searching for named sections. Get rid of
2652 "plt" and "strip" booleans.
2653 (update_local_sym_info, bad_shared_reloc): New functions.
2654 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
2655 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
2656 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
2657 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
2658 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
2659 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
2660 relocs that might use a plt entry. Set NON_GOT_REF too.
2661 Enumerate all do-nothing relocs.
2662 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
2663 tls relocs and all plt relocs.
2664 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
2665 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
2666 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
2668 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
2669 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
2670 entries and got relocs here. Warn on non-zero got reloc addend.
2671 Split out branch taken/not taken reloc code into a separate switch
2672 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
2673 Split out HA reloc adjustments to separate switch statement. Don't
2674 warn on reloc overflow if we've already warned about undefined.
2675 Don't rebuild sym name when reporting errors. Report all possible
2676 errors from _bfd_final_link_relocate.
2677 (bfd_elf32_bfd_final_link): Don't define.
2679 2003-02-18 Alan Modra <amodra@bigpond.net.au>
2681 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
2682 rebuild sym name when reporting errors.
2684 2003-02-17 Nick Clifton <nickc@redhat.com>
2686 * elflink.h (elf_link_output_extsym): Only check
2687 allow_shlib_undefined for shared libraries.
2688 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
2689 of allow_shlib_undefined.
2690 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2691 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
2692 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2693 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2694 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2695 * elf32-sh.c (sh_elf_relocate_section): Likewise.
2696 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2697 * elf32-vax.c (elf_vax_relocate_section): Likewise.
2698 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2699 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
2700 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2701 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2702 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2703 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2704 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2705 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
2707 2003-02-17 Nick Clifton <nickc@redhat.com>
2709 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
2710 address field to use in the comparison.
2711 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
2713 2003-02-14 Bob Wilson <bob.wilson@acm.org>
2715 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
2716 backends when checking if the generic ELF target should be used.
2718 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
2719 outside of functions, treat values as absolute addresses.
2721 * bfd.c: Change embedded documentation to use consistent indentation
2722 and to split up long lines. Change informal style of description
2723 for functions lacking real documentation.
2724 * coffcode.h: Break up long lines in embedded documentation.
2725 * format.c: Likewise.
2726 * targets.c: Likewise.
2727 * libcoff.h: Regenerate.
2728 * bfd-in2.h: Regenerate.
2730 2003-02-14 Alan Modra <amodra@bigpond.net.au>
2732 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
2733 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
2734 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
2735 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
2736 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
2737 (group_sections): Don't share a stub section if stubs are for a large
2738 section. Adjust comment.
2739 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
2740 !stubs_always_before_branch.
2741 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
2742 treat undefined and undefweak specially when processing dyn relocs.
2744 2003-02-13 Jakub Jelinek <jakub@redhat.com>
2746 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
2748 2003-02-13 Nick Clifton <nickc@redhat.com>
2750 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
2751 in computation of offset to insert into BL instruction.
2753 2003-02-11 Uwe Stieber <uwe@wwws.de>
2755 * config.bfd: Add support for kaOS as cross build target system.
2757 2003-02-11 Alan Modra <amodra@bigpond.net.au>
2759 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
2760 .__tls_get_addr too.
2761 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
2763 2003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
2765 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
2766 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
2767 (sh_elf_link_hash_newfunc): Remove the initialization of
2769 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
2770 for which tls_tpoff32 flag is set.
2771 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
2772 of the symbol includes the entry matched with the input_section
2773 and having tls_tpoff32 flag on. When linking statically, set
2774 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
2775 is defined in this executable.
2776 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
2778 2003-02-10 Jakub Jelinek <jakub@redhat.com>
2780 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
2781 even if there is just non-empty .rela.plt.
2783 2003-02-10 Nick Clifton <nickc@redhat.com>
2785 * archures.c (bfd_mach_arm_ep9312): Define.
2786 * bfd-in2.h: Regenerate.
2787 * cpu-arm.c (processors[]): Add ep9312.
2788 (bfd_arm_arch): Add ep9312.
2789 * elf32-arm.h (elf32_arm_merge_private_data): Update error
2790 messages and add test for Maverick floating point support.
2791 (elf32_arm_print_private_bfd_data): Handle
2792 EF_ARM_MAVERICK_FLOAT flag.
2793 (elf32_arm_object_p): New function.
2794 (elf_backend_object_p): Define.
2796 2003-02-10 Alan Modra <amodra@bigpond.net.au>
2798 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
2799 variables, structure fields or function params to tls_mask or
2800 similar to better reflect usage.
2801 (struct got_entry): Comment.
2802 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
2803 (get_tls_mask): Rename from get_tls_type.
2805 2003-02-09 Alan Modra <amodra@bigpond.net.au>
2807 * elf64-ppc.c (TLS_GD_LD): Don't define..
2808 (TLS_GD): ..define this instead and update all uses.
2809 (TLS_TPRELGD): Define.
2810 (ppc64_elf_link_hash_table_create): Tweak initialization of
2811 init_refcount and init_offset.
2812 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
2813 Mark second slot of GD or LD toc entries.
2814 (get_tls_type): Return an int. Distinguish toc GD and LD entries
2815 from other tls types.
2816 (ppc64_elf_tls_setup): New function, split out from..
2817 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
2818 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
2819 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
2820 return value to properly decide whether toc GD and LD entries can
2821 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
2822 to determine GD or LD rather than looking at TLS_LD flag. Don't
2823 attempt to adjust got entry tls_type here..
2824 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
2825 look for possible merges.
2826 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
2828 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
2829 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
2830 Make use of return value from get_tls_type to properly detect GD and
2831 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
2832 handle tls_get_addr removal when looking at REL24 relocs, do it when
2833 looking at the previous reloc. Check reloc after DTPMOD64 to determine
2835 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
2837 2003-02-08 Alan Modra <amodra@bigpond.net.au>
2839 * elf32-hppa.c (group_sections): Don't share a stub section if
2840 stubs are for a large section.
2842 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
2843 stubs if !stubs_always_before_branch.
2845 2003-02-07 Nick Clifton <nickc@redhat.com>
2847 * elf.c (swap_out_syms): Generate an error message if an
2848 equivalent output section cannot be found for a symbol.
2850 2003-02-07 Jakub Jelinek <jakub@redhat.com>
2852 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
2853 local_got_entries is NULL.
2855 2003-02-06 Andreas Schwab <schwab@suse.de>
2857 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
2858 (read_value): Add parameter is_signed, use signed extraction if
2859 the value is signed.
2860 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
2861 encoding to read_value.
2863 2003-02-06 Alan Modra <amodra@bigpond.net.au>
2865 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
2866 plt info when called to transfer weak sym info.
2868 2003-02-05 Alan Modra <amodra@bigpond.net.au>
2870 * reloc.c: Add PPC and PPC64 TLS relocs.
2871 * libbfd.h: Regenerate.
2872 * bfd-in2.h: Regenerate.
2873 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
2874 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
2875 against a 32 bit field.
2876 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
2877 (_ppc64_elf_section_data): Add t_symndx and comments.
2878 (ppc64_elf_section_data): Use elf_section_data macro.
2879 (ppc64_elf_new_section_hook): American spelling.
2880 (struct got_entry, struct plt_entry): New.
2881 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
2882 (struct ppc_stub_hash_entry): Add "addend" field.
2883 (struct ppc_link_hash_entry): Add "tls_type".
2884 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
2885 TLS_EXPLICIT): Define.
2886 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
2887 (link_hash_newfunc): Init new fields.
2888 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
2889 init_offset to NULL.
2890 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
2891 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
2893 (update_local_sym_info, update_plt_info): New functions.
2894 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
2895 handling to use got.glist rather than got.refcount. Likewise for PLT.
2896 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
2897 (func_desc_adjust): Adjust for new PLT list.
2898 (ppc64_elf_adjust_dynamic_symbol): Likewise.
2899 (get_sym_h, get_tls_type): New functions.
2900 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
2901 (ppc64_elf_tls_optimize): New function.
2902 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
2904 (ppc64_elf_size_dynamic_sections): Likewise.
2905 (ppc_type_of_stub): Adjust for new PLT list.
2906 (ppc_build_one_stub): Likewise.
2907 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
2909 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
2910 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
2911 init GOT entries that have a reloc. Generate GOT relocs here..
2912 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
2913 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
2915 2003-02-04 Andreas Schwab <schwab@suse.de>
2917 * elf32-m68k.c (elf_m68k_hash_entry): Define.
2918 (elf_m68k_link_hash_traverse): Remove.
2919 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
2920 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
2922 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
2924 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
2925 instead of elf_m68k_link_hash_traverse.
2926 (elf_m68k_discard_copies): Change first parameter to pointer to
2927 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
2928 elf_m68k_link_hash_entry is needed.
2930 2003-02-04 Alan Modra <amodra@bigpond.net.au>
2932 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
2933 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
2934 "got" union, and declare as gotplt_union. Use gotplt_uinion for
2936 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
2937 Add "init_offset" field.
2938 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
2939 (elf_local_got_ents): Declare.
2940 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
2942 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
2943 (_bfd_elf_link_hash_table_init): Set "init_offset".
2944 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
2946 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
2948 * elf.c (bfd_elf_local_sym_name): Split out from..
2949 (group_signature): ..here.
2950 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
2952 2003-02-04 Alan Modra <amodra@bigpond.net.au>
2954 * elf-bfd.h (enum elf_link_info_type): Remove.
2955 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
2956 to struct sec. Remove linkonce_p field.
2957 (elf_linkonce_p): Delete.
2958 (elf_discarded_section): Update for sec_info_type change.
2959 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
2960 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
2961 (ELF_INFO_TYPE_NONE): Define.
2962 (ELF_INFO_TYPE_STABS): Define.
2963 (ELF_INFO_TYPE_MERGE): Define.
2964 (ELF_INFO_TYPE_EH_FRAME): Define.
2965 (ELF_INFO_TYPE_JUST_SYMS): Define.
2966 (STD_SECTION): Update struct sec initializer.
2967 * ecoff.c (bfd_debug_section): Likewise.
2968 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
2969 * elflink.h: Likewise.
2970 * elf-eh-frame.c: Likewise.
2971 * elf64-alpha.c: Likewise.
2972 * elfxx-ia64.c: Likewise.
2973 * elfxx-mips.c: Likewise.
2974 * bfd-in2.h: Regenerate.
2976 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
2977 referring to used_by_bfd.
2978 * elf64-sparc.c (sec_do_relax): Likewise.
2979 * elf64-mmix.c (mmix_elf_section_data): Likewise.
2980 * elfxx-mips.c (mips_elf_section_data): Likewise.
2981 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
2982 (ieee_get_section_contents): Likewise.
2983 (ieee_new_section_hook): Formatting.
2984 (ieee_canonicalize_reloc): Remove commented out code.
2985 * mmo.c (mmo_section_data): Define. Use throughout file.
2986 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
2988 2003-01-31 Graydon Hoare <graydon@redhat.com>
2990 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
2991 * Makefile.in: Regenerate.
2992 * opncls.c (calc_crc32, get_debug_link_info,
2993 seperate_debug_file_exists, find_seperate_debug_file): New
2995 (bfd_follow_gnu_debuglink): New function. Follow the pointer
2996 contained inside a .gnu_debuglink section.
2997 * bfd-in2.h: Regenerate.
2999 2003-01-29 Alexandre Oliva <aoliva@redhat.com>
3001 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
3002 entry->abfd when it's NULL.
3004 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
3006 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
3007 _bfd_elf_section_offset returning -2 the same way as -1.
3009 * elfxx-mips.c (mips_elf_multi_got): New function.
3010 (struct mips_got_entry): Make symndx and gotidx signed. Moved
3011 addend into union along with address and link hash entry.
3012 (struct mips_got_info): Added bfd2got and next.
3013 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
3014 (mips_elf_got_section, mips_elf_create_got_section): Use
3015 SEC_EXCLUDE bit to tell whether we really need the got
3016 section. Take boolean arguments to disregard an excluded
3017 section, or to create it as excluded. Adjust all callers.
3018 Use mips_elf_got_section all over.
3019 (mips_elf_local_got_index, mips_elf_got_page,
3020 mips_elf_got16_entry): Take input bfd as argument, and pass it
3021 on to mips_elf_create_local_got_entry.
3022 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
3023 Take input bfd as argument, and manage entries in the
3025 (mips_elf_got_offset_from_index): Take input bfd as argument,
3026 and use it to adjust the GP offset of the bfd.
3027 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
3028 unreferenced GOT entries of global symbols to the end.
3029 (mips_elf_record_global_got_symbol): Take input bfd as
3030 argument. Add entries to the master GOT hash table.
3031 (struct mips_elf_bfd2got_hash): New.
3032 (struct mips_elf_got_per_bfd_arg): New.
3033 (struct mips_elf_set_global_got_offset_arg): New.
3034 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
3035 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
3036 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
3037 mips_elf_merge_gots, mips_elf_set_global_got_offset,
3038 mips_elf_resolve_final_got_entry,
3039 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
3040 mips_elf_got_for_ibfd): New functions.
3041 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
3042 (MIPS_ELF_GOT_MAX_SIZE): New macro.
3043 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
3044 (mips_elf_got_entry_hash): Take new fields into account. Use
3045 mips_elf_hash_bfd_vma.
3046 (mips_elf_got_entry_eq): Take new fields into account.
3047 (mips_elf_create_got_section): Initialize new fields.
3048 (mips_elf_calculate_relocation): Pass input_bfd to functions
3049 that now take it. Adjust gp for the input_bfd.
3050 (mips_elf_allocate_dynamic_relocation,
3051 mips_elf_create_dynamic_relocation,
3052 _bfd_mips_elf_create_dynamic_sections): Use...
3053 (mips_elf_rel_dyn_section): New function. Borrow code from...
3054 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
3055 now take it. Create the got section if needed, even if
3056 excluded, before recording a global got symbol. Move some
3058 (mips_elf_record_local_got_symbol): New fn.
3059 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
3060 Compute multi-got global entries offsets. Move GOT code to...
3061 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
3062 if the GOT is too big.
3063 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
3064 undefweak symbol to zero. Generate dynamic relocations for
3065 non-primary GOT entries for global symbols.
3066 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
3067 case. Generate dynamic relocations for local got entries.
3068 Sort dynamic relocations on N64 too, using...
3069 (sort_dynamic_relocs_64): New fns.
3070 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
3071 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
3073 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
3075 * bfd.c (struct _bfd): Added id field.
3076 * opncls.c (_bfd_id_counter): New static variable.
3077 (_bfd_new_bfd): Use it.
3078 * bfd-in2.h: Rebuilt.
3080 2003-01-25 Alan Modra <amodra@bigpond.net.au>
3082 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
3084 2003-01-25 Jakub Jelinek <jakub@redhat.com>
3086 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
3087 (elf32_sparc_rev32_howto): New variable.
3088 (sparc_reloc_map): Add TLS relocs.
3089 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
3091 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
3093 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
3094 struct elf32_sparc_link_hash_table):
3096 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
3097 elf32_sparc_hash_table): Define.
3098 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
3099 create_got_section, elf32_sparc_create_dynamic_sections,
3100 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
3102 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
3104 (elf32_sparc_gc_sweep_hook): Likewise.
3105 (elf32_sparc_adjust_dynamic_symbol): Likewise.
3106 (elf32_sparc_size_dynamic_sections): Likewise.
3107 (elf32_sparc_relocate_section): Likewise.
3108 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
3110 (elf32_sparc_object_p): Allocate backend private object data.
3111 (bfd_elf32_bfd_link_hash_table_create,
3112 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
3113 elf_backend_can_refcount): Define.
3114 (elf_backend_create_dynamic_sections): Define to
3115 elf32_sparc_create_dynamic_sections.
3116 * reloc.c: Add SPARC TLS relocs.
3117 * bfd-in2.h, libbfd.h: Rebuilt.
3118 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
3119 (sparc_reloc_map): Likewise.
3121 2003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
3123 * bfd-in2.h: Regenerate.
3124 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
3125 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
3126 (elf_howto_table): Add TLS relocs.
3127 (elf_s390_reloc_type_lookup): Likewise.
3128 (elf_s390_link_hash_entry): Add tls_type.
3129 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
3131 (elf_s390_link_hash_table): Add tls_ldm_got.
3132 (link_hash_newfunc): Initialize tls_type.
3133 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
3134 (elf_s390_copy_indirect_symbol): Copy tls_type information.
3135 (elf_s390_check_relocs): Support TLS relocs.
3136 (elf_s390_gc_sweep_hook): Likewise.
3137 (allocate_dynrelocs): Likewise.
3138 (elf_s390_size_dynamic_sections): Likewise.
3139 (elf_s390_relocate_section): Likewise.
3140 (elf_s390_finish_dynamic_symbol): Likewise.
3141 (bfd_elf32_mkobject): Define for TLS.
3142 * elf64-s390.c: Same changes as for elf32-s390.c.
3143 * libbfd.h: Regenerate.
3144 * reloc.c: Add s390 TLS relocations.
3146 2003-01-24 Charles Lepple <clepple@ghz.cc>
3148 * aclocal.m4: Fix name of --enable-install-libbfd switch.
3150 2003-01-23 Nick Clifton <nickc@redhat.com>
3153 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
3154 * archures.c (bfd_mach_sh2e): Added.
3155 * bfd-in2.h: Rebuilt.
3156 * cpu-sh.c (arch_info_struct): Added SH2e.
3157 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
3159 2003-01-23 Alan Modra <amodra@bigpond.net.au>
3161 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
3162 dynindx to an int. Rearrange for better packing.
3163 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
3164 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
3165 * elf32-sh64.h: New. Split out from include/elf/sh.h.
3166 (struct _sh64_elf_section_data): New struct.
3167 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
3168 * elf32-sh64-com.c: Include elf32-sh64.h.
3169 * elf32-sh64.c: Likewise.
3170 (sh64_elf_new_section_hook): New function.
3171 (bfd_elf32_new_section_hook): Define.
3172 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
3173 (sh64_bfd_elf_copy_private_section_data): Likewise.
3174 (sh64_elf_final_write_processing): Likewise.
3175 * elf32-sparc.c (struct elf32_sparc_section_data): New.
3176 (elf32_sparc_new_section_hook): New function.
3177 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
3178 (sec_do_relax): Define.
3179 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
3180 (elf32_sparc_relocate_section): Likewise.
3181 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
3182 * elf64-mmix.c (struct _mmix_elf_section_data): New.
3183 (mmix_elf_section_data): Define. Use throughout file.
3184 (mmix_elf_new_section_hook): New function.
3185 (bfd_elf64_new_section_hook): Define.
3186 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
3187 (ppc64_elf_section_data): Define. Use throughout.
3188 (ppc64_elf_new_section_hook): New function.
3189 (bfd_elf64_new_section_hook): Define.
3190 * elf64-sparc.c (struct sparc64_elf_section_data): New.
3191 (sparc64_elf_new_section_hook): New function.
3192 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
3193 (sec_do_relax): Define.
3194 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
3195 (sparc64_elf_relocate_section): Likewise.
3196 (bfd_elf64_new_section_hook): Define.
3197 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
3198 * elfxx-mips.c (struct _mips_elf_section_data): New.
3199 (mips_elf_section_data): Define. Use throughout.
3200 (_bfd_mips_elf_new_section_hook): New function.
3201 (mips_elf_create_got_section): Don't alloc used_by_bfd.
3202 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
3203 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
3204 * Makefile.am: Run "make dep-am".
3205 * Makefile.in: Regenerate.
3207 2003-01-21 Richard Henderson <rth@redhat.com>
3209 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
3210 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
3211 (elf64_alpha_adjust_dynamic_symbol): Set them.
3212 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
3213 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
3214 symbol index when relaxing LDM to TPREL.
3215 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
3216 relocs, even if the target isn't locally defined.
3217 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
3218 (elf64_alpha_relocate_section): Likewise. Force TP-relative
3219 relocs vs symndx 0 to the tp base.
3221 2003-01-21 Fabio Alemagna <falemagn@aros.org>
3223 * config.bfd: Handle i[3456]86-*-aros*.
3225 2003-01-21 Andreas Schwab <schwab@suse.de>
3227 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
3228 (struct ppc_elf_link_hash_entry): Define.
3229 (ppc_elf_hash_entry): New function.
3230 (struct ppc_elf_link_hash_table): Define.
3231 (ppc_elf_hash_table): New function.
3232 (ppc_elf_link_hash_newfunc): New function.
3233 (ppc_elf_link_hash_table_create): New function.
3234 (ppc_elf_copy_indirect_symbol): New function.
3235 (allocate_dynrelocs): New function.
3236 (readonly_dynrelocs): New function.
3237 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
3238 relocs and determine DT_TEXTREL.
3239 (ppc_elf_check_relocs): Don't do that here, just count the
3241 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
3243 (bfd_elf32_bfd_link_hash_table_create): Define.
3244 (elf_backend_copy_indirect_symbol): Define.
3246 2003-01-21 Richard Henderson <rth@redhat.com>
3248 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
3249 TPREL also get a reloc if shared. Remove SREL support.
3250 (elf64_alpha_emit_dynrel): New.
3251 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
3252 and GOTTPREL relocs to local symbols against the tp base.
3253 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
3255 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
3256 use count before clobbering r_type.
3257 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
3258 ordering would mean dataflow inspection is necessary.
3260 2003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
3262 * coffcode.h (coff_set_flags): Added get/set arch hooks.
3264 2003-01-20 Fabio Alemagna <falemagn@aros.org>
3266 * elf32-sh.c: Treat elfNN_bed like other macros defined in
3267 elfxx-target.h and #undef it before #define'ing it.
3268 * elf32-i386.c: Likewise.
3269 * elf32-sh64.c: Likewise.
3270 * elf64-alpha.c: Likewise.
3271 * elf64-sh64.c: Likewise.
3273 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
3275 * bfd-in2.h: Regenerate.
3276 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
3277 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
3278 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
3279 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
3280 R_390_PLTOFF32 and R_390_PLTOFF64.
3281 (elf_s390_reloc_type_lookup): Likewise.
3282 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
3283 of GOTPLT references to a function.
3284 (link_hash_newfunc): Initialize gotplt_refcount.
3285 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
3286 and creation of the got section out of the main switch. Add support
3287 for the gotoff, gotplt and pltoff relocations.
3288 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
3290 (elf_s390_adjust_gotplt): New function.
3291 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
3293 (allocate_dynrelocs): Add comment.
3294 (elf_s390_relocate_section): Change r_type to unsigned. Add support
3295 for gotoff, gotplt and pltoff relocations.
3296 * elf64-s390.c: Same changes as for elf32-s390.c.
3297 * libbfd.h: Regenerate.
3298 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
3299 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
3300 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
3301 and BFD_RELOC_390_PLTOFF64.
3303 2003-01-18 Jakub Jelinek <jakub@redhat.com>
3305 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
3306 R_IA64_TPREL64[LM]SB against non-global symbol properly.
3308 2003-01-16 Jakub Jelinek <jakub@redhat.com>
3310 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
3311 self_dtpmod_done and self_dtpmod_offset.
3312 (allocate_global_data_got): Only use one got entry for all
3313 dtpmod relocs against local symbols.
3314 (allocate_dynrel_entries): Only need .rela.got entry for
3315 dtpmod against global symbol.
3316 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
3317 Reserve space in .rela.got for the local dtpmod entry.
3318 (set_got_entry): Initialize the common local dtpmod .got entry.
3319 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
3320 and R_IA_64_DTPREL64MSB.
3322 2003-01-16 Alan Modra <amodra@bigpond.net.au>
3324 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
3325 (R_PPC_*): Rename all occurrences to R_PPC64_*.
3326 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
3327 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
3328 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
3329 relative relocs, not with absolute ones.
3330 * Makefile.am: Run "make dep-am".
3331 * Makefile.in: Regenerate.
3332 * po/SRC-POTFILES.in: Regenerate.
3334 2003-01-15 Andreas Schwab <schwab@suse.de>
3336 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
3337 relocation against a non-allocated readonly section.
3339 2003-01-10 Alan Modra <amodra@bigpond.net.au>
3341 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
3342 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
3344 2002-01-08 Klee Dienes <kdienes@apple.com>
3346 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
3347 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
3348 * Makefile.in: Regenerate.
3350 2003-01-08 Alexandre Oliva <aoliva@redhat.com>
3352 * elfn32-mips.c (prev_reloc_section): New.
3353 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
3354 (SET_RELOC_ADDEND): Parenthesize macro argument.
3356 2003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
3358 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
3359 adjust addil instructions if the symbol has no section.
3361 2003-01-07 DJ Delorie <dj@redhat.com>
3363 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
3366 2003-01-07 Andreas Schwab <schwab@suse.de>
3368 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
3369 PC relative relocations.
3370 (elf_m68k_discard_copies): Set it here instead.
3372 2002-01-02 Ben Elliston <bje@redhat.com>
3373 Jeff Johnston <jjohnstn@redhat.com>
3375 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
3376 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
3377 (BFD32_BACKENDS): Add elf32-iq2000.lo.
3378 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
3379 (cpu-iq2000.lo): New target.
3380 * Makefile.in: Regenerate.
3381 * config.bfd: Handle iq2000-*-elf.
3382 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
3383 (bfd_archures_list): Add bfd_iq2000_arch.
3384 * configure.in: Handle bfd_elf32_iq2000_vec.
3385 * configure: Regenerate.
3386 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
3387 and BFD_RELOC_IQ2000_UHI16.
3388 * targets.c (bfd_elf32_iq2000_vec): Declare.
3389 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
3390 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
3391 * cpu-iq2000.c: New file.
3392 * elf32-iq2000.c: Likewise.
3393 * libbfd.h: Regenerate.
3394 * bfd-in2.h: Likewise.
3396 2003-01-02 Richard Sandiford <rsandifo@redhat.com>
3398 * elfxx-mips.c: Include libiberty.h.
3399 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
3400 (mips_set_isa_flags): New function, split out from...
3401 (_bfd_mips_elf_final_write_processing): ...here. Only call
3402 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
3403 (mips_mach_extensions): New array.
3404 (mips_32bit_flags_p): New function.
3405 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
3406 Use mips_32bit_flags_p to check if one binary is 32-bit and the
3407 other is 64-bit. When adopting IBFD's architecture, adopt the
3408 bfd_mach as well as the flags.
3410 2003-01-02 Nick Kelsey <nickk@ubicom.com>
3412 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
3413 fix internal errors, fix bad code generation, fix incorrect stabs
3414 information, and improve ability to eliminate redundant page
3415 instructions. Added code to ip2k_final_link_relocate to self-verify
3416 the linker relaxation. Fix formatting problems.
3418 2002-12-30 Chris Demetriou <cgd@broadcom.com>
3420 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
3421 * archures.c (bfd_mach_mipsisa32r2): New define.
3422 * bfd-in2.h: Regenerate.
3423 * cpu-mips.c (I_mipsisa32r2): New enum value.
3424 (arch_info_struct): Add entry for I_mipsisa32r2.
3425 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
3426 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
3427 (_bfd_mips_elf_final_write_processing): Add
3428 bfd_mach_mipsisa32r2 case.
3429 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
3430 binaries marked as using MIPS32 Release 2.
3432 2002-12-30 Dmitry Diky <diwil@mail.ru>
3434 * Makefile.am: Add msp430 target.
3435 * configure.in: Likewise.
3436 * Makefile.in: Regenerate.
3437 * configure: Regenerate.
3438 * archures.c: Add msp430 architecture vector.
3439 * config.bfd: Likewise.
3440 * reloc.c: Add msp430 relocs.
3441 * targets.c: Add msp320 target.
3442 * cpu-msp430.c: New file: msp430 cpu detection.
3443 * elf32-msp430.c: New file: msp430 reloc processing.
3444 * bfd-in2.h: Regenerate.
3445 * libbfd.h: Regenerate.
3447 2002-12-28 Jakub Jelinek <jakub@redhat.com>
3449 * elf.c (elf_sort_sections): Don't reorder .tbss.
3450 (assign_file_positions_for_segments): Only adjust off/voff
3451 for increased alignment in PT_LOAD or PT_NOTE segment,
3452 but adjust p_filesz for .tbss too. in PT_LOAD consider
3453 .tbss to have zero memory size.
3454 (copy_private_bfd_data) [SECTION_SIZE]: Define.
3455 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
3456 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
3457 into PT_TLS segment. Never put SHF_TLS sections in
3458 segments other than PT_TLS or PT_LOAD.
3460 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
3463 2002-12-23 DJ Delorie <dj@redhat.com>
3465 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
3467 2002-12-23 Alan Modra <amodra@bigpond.net.au>
3469 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
3471 2002-12-23 Nick Clifton <nickc@redhat.com>
3473 * archures.c (bfd_arch_get_compatible): Add third parameter
3474 'accept_unknowns'. Only accept unknown format BFDs if
3475 accept_unknowns is true, or if the format is "binary".
3476 * bfd-in2.h: Regenerate.
3478 2002-12-21 Nick Clifton <nickc@redhat.com>
3480 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
3481 that subtracted 8 from pc relative relocations.
3483 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
3485 * coff-h8300.c: Fix comment typos.
3486 * coffcode.h: Likewise.
3487 * cpu-cris.c: Likewise.
3488 * elf32-vax.c: Likewise.
3489 * genlink.h: Likewise.
3490 * linker.c: Likewise.
3492 * tekhex.c: Likewise.
3493 * vms-misc.c: Likewise.
3495 2002-12-20 DJ Delorie <dj@redhat.com>
3497 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
3498 * libbfd.h: Regenerate.
3499 * bfd-in2.h: Regenerate.
3500 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
3501 (xstormy16_reloc_map): Add R_XSTORMY16_12.
3503 2002-12-19 Kazu Hirata <kazu@cs.umass.edu>
3505 * doc/bfdint.texi: Fix typos.
3507 2002-12-20 Paul Eggert <eggert@twinsun.com>
3509 Port to POSIX 1003.1-2001.
3510 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
3511 * configure.in (build-warnings): Likewise.
3512 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
3513 * aclocal.m4: Regenerate.
3514 * config.in: Regenerate.
3515 * configure: Regenerate.
3517 2002-12-19 Alan Modra <amodra@bigpond.net.au>
3519 * coff-h8300.c: Include libiberty.h.
3520 (h8300_reloc16_extra_cases): Check the hash table creator before
3521 referencing h8300 specific fields. Stash the hash table pointer
3522 in a local var. Comment typo fixes.
3523 (h8300_bfd_link_add_symbols): Likewise.
3525 * reloc.c (struct reloc_howto_struct): Revise src_mask and
3527 * bfd-in2.h: Regenerate.
3529 2002-12-18 Alan Modra <amodra@bigpond.net.au>
3531 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
3532 code a little. Comment on dynamic relocs against section symbols.
3534 2002-12-17 Roger Sayle <roger@eyesopen.com>
3536 * configure.host (ia64-*-hpux*): Support 64 bit targets using
3537 the HP compiler's "long long".
3539 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
3541 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
3542 and R_XSTORMY16_HI16) howto entries.
3543 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
3544 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
3545 determine the start of the second reloc table.
3547 2002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
3549 * ecofflink.c: Fix the reading of the debugging information
3550 of Tru64/Alpha binaries that are produced by recent Compaq
3552 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
3554 (lookup_line): Because of the strange information sometimes
3555 generated by Compaq's recent compilers, change how the FDR
3556 table is searched so that PDRs (procedure descriptors) are
3557 correctly found. Note that this change is really more of a hack;
3558 however, I have included extensive documentation as to why
3559 this is the best solution short of an extensive rewrite or
3561 (fdrtab_lookup): Add comments to explain the algorithm.
3563 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
3565 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
3566 initializers to match struct declaration.
3568 2002-12-12 Alan Modra <amodra@bigpond.net.au>
3570 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
3571 * elf.c (get_program_header_size): Likewise.
3572 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
3573 (m32r_elf_generic_reloc): Likewise.
3574 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
3575 * elflink.h (elf_bfd_discard_info): Likewise.
3577 2002-12-12 Alan Modra <amodra@bigpond.net.au>
3579 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
3580 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
3581 DT_RELSZ adjustment, not output section. Avoid writing tags when
3582 unchanged. Don't assume linker script is sane, adjust DT_REL too.
3583 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
3584 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
3585 DT_RELASZ adjustment, not output section. Avoid writing tags when
3586 unchanged. Adjust DT_RELA.
3587 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
3588 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
3590 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
3592 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
3595 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
3597 * elfxx-mips.c (struct mips_got_entry): New.
3598 (struct mips_got_info): Added got_entries field.
3599 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
3600 (mips_elf_local_got_index, mips_elf_got_page,
3601 mips_elf_got16_entry): Re-implement in terms of new...
3602 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
3604 (mips_elf_highest): Warning clean-up.
3605 (mips_elf_create_got_section): Initialize got_entries.
3606 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
3608 (_bfd_mips_elf_size_dynamic_sections): Do not account for
3609 GOT_PAGE entries, since we now reuse GOT16 entries.
3611 2002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
3613 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
3614 read-only section that lies after .text and before .data to be
3615 written into the output file and included in a_text.
3616 (translate_to_native_sym_flags): If an otherwise unrepresentable
3617 section was merged with .text, convert its symbols to N_TEXT
3619 * libaout.h (aout_section_merge_with_text_p): New macro.
3621 2002-12-08 Alan Modra <amodra@bigpond.net.au>
3623 * bfd-in.h: Comment typo fix. Formatting.
3624 * bfd-in2.h: Regenerate.
3625 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
3626 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
3627 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
3629 2002-12-05 Richard Henderson <rth@redhat.com>
3631 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
3632 Only send PCREL21B though the plt. Fix installed reloc type.
3633 (elfNN_ia64_relocate_section): Give error for dynamic reloc
3634 against PCREL22 or PCREL64I; clean up error messages for
3637 2002-12-04 Kevin Buettner <kevinb@redhat.com>
3639 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
3641 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
3643 2002-12-04 David Mosberger <davidm@hpl.hp.com>
3645 * cpu-ia64-opc.c: Add operand constant "ar.csd".
3647 2002-12-04 H.J. Lu <hjl@gnu.org>
3649 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
3650 BFD address when constructing local name.
3652 2002-12-04 Andreas Schwab <schwab@suse.de>
3654 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
3656 (elf_m68k_link_hash_table_create): Initialize it.
3657 (elf_m68k_check_relocs): Handle symbols that are forced to be
3658 local due to visibility changes.
3659 (elf_m68k_adjust_dynamic_symbol): Likewise.
3660 (elf_m68k_size_dynamic_sections): Likewise.
3661 (elf_m68k_discard_copies): Likewise.
3662 (elf_m68k_relocate_section): Likewise.
3664 2002-12-04 Alan Modra <amodra@bigpond.net.au>
3666 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
3668 2002-12-04 Alan Modra <amodra@bigpond.net.au>
3670 * srec.c (srec_write_symbols): Restore '$' prefix to address
3671 accidentally removed in 2002-04-04 change.
3672 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
3674 2002-12-03 Nick Clifton <nickc@redhat.com>
3676 * elf32-ppc.c (apuinfo_list_init): New function.
3677 (apuinfo_list_add): New function: Add a value to the list.
3678 (apuinfo_list_length): New function: Return the number of
3680 (apuinfo_list_element): New function: Return a value on the
3682 (apuinfo_list_finish): New function: Free the resources used
3684 (ppc_elf_begin_write_processing): New function. Scan the
3685 input bfds for apuinfo sections.
3686 (ppc_elf_write_section): New function: Delay the creation of
3687 the contents of an apuinfo section in an output bfd.
3688 (ppc_elf_final_write_processing): New function. Create the
3689 contents of an apuinfo section in an output bfd.
3690 (elf_backend_begin_write_processing): Define.
3691 (elf_backend_final_write_processing): Define.
3692 (elf_backend_write_section): Define.
3694 2002-12-03 Richard Henderson <rth@redhat.com>
3696 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
3698 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
3700 Fix PR savannah/1417:
3701 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
3702 branch if it goes to the start of the deleted region.
3704 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
3706 * bfd-in2.h (bfd_mach_m6812): Rebuild.
3707 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
3708 bfd_mach_m6812s): Declare.
3710 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
3711 (_bfd_m68hc12_elf_set_private_flags): Call it.
3712 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
3713 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
3714 report microcontroller incompatibilities (HC12 vs HCS12).
3715 (elf_backend_object_p): Update.
3717 2002-11-30 Alan Modra <amodra@bigpond.net.au>
3719 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
3720 (enum bfd_boolean, boolean): Delete.
3721 (bfd_boolean): Typedef to an int.
3722 (FALSE, TRUE): Define.
3723 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
3724 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
3725 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
3726 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
3727 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
3728 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
3729 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
3730 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
3731 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
3732 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
3733 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
3734 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
3735 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
3736 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
3737 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
3738 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
3739 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
3740 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
3741 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
3742 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
3743 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
3744 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
3745 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
3746 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
3747 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
3748 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
3749 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
3750 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
3751 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
3752 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
3753 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
3754 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
3755 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
3756 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
3757 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
3758 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
3759 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
3760 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
3761 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
3762 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
3763 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
3764 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
3765 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
3766 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
3767 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
3768 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
3769 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
3770 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
3771 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
3772 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
3773 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
3774 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
3775 of bfd_boolean vars with TRUE/FALSE. Formatting.
3776 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
3778 2002-11-28 Alan Modra <amodra@bigpond.net.au>
3780 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
3781 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
3782 with Elf_Internal_Rela.
3783 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
3784 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
3785 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
3786 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
3787 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
3788 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
3789 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
3790 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
3791 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
3792 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
3793 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
3794 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
3796 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
3797 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
3798 Remove INLINE keyword.
3799 (elf_swap_reloc_in): Likewise. Also clear r_addend.
3800 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
3802 (elf_write_relocs): Consolidate REL and RELA code.
3803 (elf_slurp_reloc_table_from_section): Simplify REL code.
3804 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
3805 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
3806 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
3808 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
3809 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
3810 (elf_link_output_relocs): Likewise.
3811 (elf_reloc_link_order): Likewise.
3812 (elf_finish_pointer_linker_section): Likewise.
3813 (struct elf_link_sort_rela): Remove union.
3814 (elf_link_sort_cmp1): Update to suit.
3815 (elf_link_sort_cmp2): Here too.
3816 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
3817 over-allocation for int_rels_per_ext_rel != 1 case.
3818 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
3819 * elf32-i386.c: Likewise.
3820 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
3821 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
3822 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
3823 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
3824 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
3825 elf64-sparc.c, elf64-x86-64.c: Likewise.
3826 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
3827 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
3828 bfd_elf32_swap_reloc_in.
3830 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
3831 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
3832 (mips_elf64_swap_reloc_in): Zero r_addend.
3833 (mips_elf64_be_swap_reloc_in): Likewise.
3834 (mips_elf64_slurp_one_reloc_table): Simplify.
3836 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
3837 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
3838 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
3840 2002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3842 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
3843 unresolved debugging relocs in dynamic applications.
3844 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
3846 2002-11-26 Alan Modra <amodra@bigpond.net.au>
3848 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
3849 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
3850 on a relocatable link. Comment typos.
3851 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
3852 in the order they are declared. Clear elf_hash_value too.
3853 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
3854 eh_info and tls_segment.
3855 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
3856 sorted when discarding relocs by turning them into R_*_NONE.
3858 * libbfd.c (warn_deprecated): Comment spelling.
3859 * po/SRC-POTFILES.in: Regenerate.
3861 2002-11-21 Richard Henderson <rth@redhat.com>
3863 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
3864 arch's st_other bits when merging visibilities.
3865 (elf_link_output_extsym): Tidy clearing of visibility field.
3867 2002-11-21 Alan Modra <amodra@bigpond.net.au>
3869 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
3870 (SWAP_OUT_RELOC_OFFSET): Define.
3872 2002-11-20 Alexandre Oliva <aoliva@redhat.com>
3874 * elf.c (_bfd_elf_link_hash_table_init): Make sure
3875 can_refcount is properly extended to the type of
3878 2002-11-19 Alexandre Oliva <aoliva@redhat.com>
3880 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
3881 (_bfd_mips_elf_relocate_section): Use it.
3883 * elfxx-mips.c (MNAME): New macro.
3884 (_bfd_mips_elf_check_relocs): Use it.
3885 (_bfd_mips_elf_discard_info): Likewise.
3886 (_bfd_mips_elf_final_link): Likewise.
3888 2002-11-19 Alan Modra <amodra@bigpond.net.au>
3890 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
3891 rel_hdr.sh_size too.
3893 2002-11-18 Klee Dienes <kdienes@apple.com>
3895 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
3896 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
3897 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
3898 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
3899 Add dependencies for bfdwin.c, bfdio.c.
3900 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
3901 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
3902 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
3903 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
3904 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
3905 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
3906 bfd_get_size (moved from libbfd.c and bfd.c).
3907 * bfdwin.c New file. Contains _bfd_window_internal,
3908 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
3909 libbfd.c and bfd.c).
3910 * po/SRC-POTFILES.in: Regenerate.
3911 * po/bfd.pot: Regenerate.
3912 * libbfd.h: Regenerate.
3913 * bfd-in2.h: Regenerate.
3914 * aclocal.m4: Regenerate.
3915 * Makefile.in: Regenerate.
3916 * configure: Regenerate.
3918 2002-11-18 Klee Dienes <kdienes@apple.com>
3920 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
3922 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
3924 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
3925 jsr after a short jump.
3926 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
3928 2002-11-15 Klee Dienes <kdienes@apple.com>
3930 * pef.c (bfd_pef_convert_architecture): Move declaration of
3931 ARCH_POWERPC and ARCH_M68K to the start of the function.
3933 2002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
3935 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
3937 2002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
3939 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
3940 For bpo_gregs_section->contents, allocate _raw_size, not
3943 2002-11-13 Klee Dienes <kdienes@apple.com>
3945 * config.bfd: Add entries for powerpc-*-darwin and cousins.
3947 2002-11-13 H.J. Lu <hjl@gnu.org>
3949 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
3951 2002-11-13 Klee Dienes <kdienes@apple.com>
3952 Alan Modra <amodra@bigpond.net.au>
3954 * bfd.c (struct bfd_preserve): New.
3955 (bfd_preserve_save): New function.
3956 (bfd_preserve_restore): Ditto.
3957 (bfd_preserve_finish): Ditto.
3958 * bfd-in2.h: Regenerate.
3959 * mach-o.c: Formatting.
3960 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
3961 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
3962 (bfd_mach_o_core_p): Ditto.
3963 (bfd_mach_o_scan): Pass in mdata.
3964 * mach-o.h (bfd_mach_o_scan): Update prototype.
3965 * pef.c: Formatting.
3966 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
3967 (bfd_pef_xlib_object_p): Ditto.
3968 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
3969 * pef.h (bfd_pef_scan): Update prototype.
3970 * xsym.c: Formatting, K&R fixes.
3971 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
3972 (bfd_sym_scan): New function split out from bfd_sym_object_p.
3973 * xsym.h (bfd_sym_scan): Declare.
3974 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
3975 * elfcore.h (elf_core_file_p): Likewise.
3976 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
3978 2002-11-12 Nick Clifton <nickc@redhat.com>
3980 * po/da.po: Updated Danish translation.
3982 2002-11-12 Alan Modra <amodra@bigpond.net.au>
3984 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
3985 relocatable link too.
3986 (elf_link_input_bfd): When emitting relocs, adjust offsets for
3987 eh_frame and stab sections. Zap deleted relocs.
3988 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
3989 (elf_bfd_discard_info): Run for relocatable link too.
3990 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
3992 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
3993 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
3995 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
3996 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
3997 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
3998 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
3999 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
4000 (struct elf_link_hash_table): Add eh_info.
4001 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
4002 (_bfd_elf_discard_section_eh_frame): Update prototype.
4003 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
4004 (_bfd_elf_write_section_eh_frame): Likewise.
4005 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
4006 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
4007 param. Get "hdr_info" from link hash table.
4008 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
4009 header section from link hash table. Save header section to elf_tdata.
4010 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
4011 header section from link hash table. Don't alloc hdr_info. Clear
4012 hdr_sec instead of setting "strip".
4013 (_bfd_elf_eh_frame_section_offset): Formatting.
4014 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
4015 Get header section from link hash table.
4016 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
4017 Get header section from link hash table.
4018 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
4019 (get_program_header_size): Likewise.
4020 (_bfd_elf_section_offset): Formatting.
4021 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
4022 section pointer in link hash table.
4023 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
4024 and _bfd_elf_write_section_eh_frame calls. Update comment about
4026 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
4027 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
4029 * po/SRC-POTFILES.in: Regenerate.
4031 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
4032 relocs for discarded FDEs. Remove dead code.
4033 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
4034 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
4035 Tidy conditions under which stabs are edited. Formatting.
4036 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
4037 from discarded relocs.
4038 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
4039 section adjustments after testing magic values.
4041 2002-11-12 Thomas Moestl <tmm@FreeBSD.org>
4043 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
4044 references to large plt symbols.
4046 2002-11-12 Klee Dienes <kdienes@apple.com>
4048 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
4049 looking for an unused section name.
4051 2002-11-11 Kazu Hirata <kazu@cs.umass.edu>
4053 * coff-h8300.c: Fix formatting.
4054 * elf32-h8300.c: Likewise.
4055 * reloc16.c: Likewise.
4057 2002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
4059 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
4060 section when dynamic section unused; _bfd_strip_section_from_output
4063 2002-11-08 Alan Modra <amodra@bigpond.net.au>
4065 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
4068 * dwarf2.c: Revert last change.
4070 2002-11-07 Michal Ludvig <mludvig@suse.cz>
4072 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
4073 _bfd_dwarf2_find_nearest_line): Use
4074 bfd_simple_get_relocated_section_contents() instead of
4075 bfd_get_section_contents().
4076 * reloc.c (bfd_perform_relocation): Add sanity check.
4077 * simple.c (simple_get_relocated_section_contents): If the section
4078 does not have any relocs associated with it, just return the
4079 unadjusted contents.
4081 2002-11-07 Hans-Peter Nilsson <hp@axis.com>
4083 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
4084 case R_CRIS_32_GOT>: Correct test for filling in constant .got
4085 contents, enabling for a non-DSO, for symbols defined in the
4086 program with --export-dynamic.
4088 2002-11-07 Alan Modra <amodra@bigpond.net.au>
4090 * elf64-ppc.c: Comment typo fixes.
4091 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
4093 2002-11-07 Nick Clifton <nickc@redhat.com>
4095 * po/da.po: Updated Danish translation.
4097 2002-11-06 Alexandre Oliva <aoliva@redhat.com>
4099 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
4100 exactly three internal relocs per external reloc. Set reloc_count
4101 to the external reloc count.
4103 2002-11-06 Klee Dienes <kdienes@apple.com>
4105 * coff-stgo32.c (stub_bytes): Mark as const.
4106 Fix comment formatting.
4108 2002-11-06 Klee Dienes <kdienes@apple.com>
4110 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
4112 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
4113 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
4114 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
4115 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
4116 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
4118 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
4119 * Makefile.in: Regenerate.
4120 * doc/Makefile.in: Regenerate.
4121 * bfd-in2.h: Regenerate.
4122 * xsym.c: New file. Contains support for the Apple/Metrowerks
4123 xSYM debugging format.
4125 * pef.c: New file. Contains support for the Apple Code Fragment
4126 Manager Preferred Executable Format
4128 * pef-traceback.h: New file. Contains support for parsing PowerPC
4129 traceback tables as used by PEF executables (and perhaps other
4131 * mach-o.c: New file. Contains support for the Mach-O object file
4133 * mach-o.h: New file.
4134 * mach-o-target.c: New file. Declares the mach-o targets
4135 themselves. Included three times by mach-o.c; each time with a
4136 different set of macros set.
4138 2002-11-06 Graeme Peterson <gp@qnx.com>
4140 * Makefile.am: Remove entries for elf32-qnx.[ch].
4141 * Makefile.in: Regenerate.
4142 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
4143 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
4144 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
4145 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
4146 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
4147 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
4148 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
4149 * configure: Regenerate.
4150 * elf32-qnx.c: Remove.
4151 * elf32-qnx.h: Remove.
4152 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
4153 is_contained_by_filepos, and copy_private_bfd_data_p.
4154 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
4155 is_contained_by_filepos, and copy_private_bfd_data_p.
4156 * elf32-i386.c: Remove QNX extended bfd support.
4157 * elf32-ppc.c: Remove QNX extended bfd support.
4158 * elf32-sh.c: Remove QNX extended bfd support.
4159 * elfarm-nabi.c: Remove QNX extended bfd support.
4160 * targets.c: Remove qnx vectors.
4161 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
4162 (elf_backend_is_contained_by_filepos): Remove.
4163 (elf_backend_copy_private_bfd_data_p): Remove.
4164 * po/SRC-POTFILES.in: Regenerate.
4166 2002-11-06 David O'Brien <obrien@FreeBSD.org>
4167 Alan Modra <amodra@bigpond.net.au>
4169 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
4170 dynamic relocs against section symbols for the output section vma.
4172 2002-11-05 Alan Modra <amodra@bigpond.net.au>
4174 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
4175 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
4177 2002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4178 Alan Modra <amodra@bigpond.net.au>
4180 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
4181 vectors in target_selvecs.
4182 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
4184 (sh-*-netbsdelf*): Likewise.
4185 * configure.in (assocvecs): New variable. Handle assocvecs like
4187 * configure: Regenerate.
4188 * format.c (bfd_check_format_matches): Store bfd_target pointers
4189 in matching_vector instead of target names. Select first target
4190 from bfd_associated_vector that matches a list of ambiguous targets.
4191 * targets.c (_bfd_associated_vector): New array.
4192 (bfd_associated_vector): New variable.
4193 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
4194 * libbfd-in.h (bfd_associated_vector): Declare.
4195 * libbfd.h: Regenerate.
4197 2002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
4199 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
4200 non-NULL before dereferencing.
4202 2002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4204 * vms.c (vms_object_p): Restore the start address when returning
4207 2002-11-04 Alan Modra <amodra@bigpond.net.au>
4208 Hans-Peter Nilsson <hp@axis.com>
4210 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
4211 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
4212 Set up a larger symshndxbuf, and write it out. Free it on
4213 exit rather than freeing symbuf twice. Correct section index
4214 on output section symbol loop.
4215 (elf_link_output_sym): Accumulate symbol extension section
4216 indices, reallocating symshndxbuf rather than writing it out.
4217 (elf_link_flush_output_syms): Don't flush symshndxbuf.
4218 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
4219 Use bfd_zalloc to clear i_shdrp[0] too.
4221 2002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
4223 * elf32-sh64-com.c (sh64_address_in_cranges): Use
4224 _raw_size of cranges section if _cooked_size not yet set.
4226 2002-11-03 Hans-Peter Nilsson <hp@axis.com>
4228 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
4229 for bfd_elf32_swap_symbol_out.
4231 2002-10-31 David O'Brien <obrien@FreeBSD.org>
4233 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
4234 signed and unsigned in comparison.
4236 2002-10-30 Daniel Jacobowitz <drow@mvista.com>
4238 * coffcode.h: Remove extraneous '\'.
4240 2002-10-28 H.J. Lu <hjl@gnu.org>
4242 * Makefile.am (targets.lo): Depend on Makefile instead of
4244 (archures.lo): Likewise.
4245 * Makefile.in: Regenerated.
4247 2002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
4249 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
4250 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
4253 2002-10-25 Jim Wilson <wilson@redhat.com>
4255 * elf64-sh64.c (sh_elf64_relocate_section): Call
4256 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
4257 of SHF_MERGE section.
4259 2002-10-25 Hans-Peter Nilsson <hp@axis.com>
4261 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
4263 2002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
4265 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
4266 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
4268 (NAME(aout,final_link)): Cast enum used in assignment.
4269 (aout_link_write_symbols): Cast enums in comparisons, int values to
4270 boolean, enums in assignments to int.
4271 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
4272 (aout_link_input_section_ext): Likewise. Cast enums used in
4273 comparisons with unsigned ints.
4274 (aout_link_reloc_link_order): Cast enum to int in assignment.
4275 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
4277 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
4279 * bfd-in2.h (bfd_set_section_vma): Likewise.
4280 * bfd.c (bfd_record_phdr): Cast enums in assignments.
4281 * binary.c (bfd_alloc): Cast enum to long.
4282 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
4283 * dwarf2.c (read_abbrevs): Add casts to enum types.
4284 (read_attribute_value): Likewise.
4285 (arange_add): Cast result of bfd_zalloc call.
4286 (comp_unit_contains_address): Return true and false.
4287 (comp_unit_find_nearest_line): Cast return to boolean.
4288 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
4289 * gen-aout.c: define macro '_' if not defined.
4290 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
4291 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
4292 (bfd_write_bigendian_4byte_int): Cast return to boolean.
4293 (bfd_seek): Cast bfd_realloc to bfd_byte *.
4294 (bfd_generic_is_local_label_name): Cast return to boolean.
4295 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
4296 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
4297 struct bfd_hash_entry *.
4298 (_bfd_generic_link_hash_newfunc): likewise.
4299 (_bfd_generic_final_link): Cast enum to unsigned int.
4300 * merge.c (sec_merge_emit): Cast return to boolean.
4301 (merge_strings): Add casts to const unsigned char *.
4302 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
4303 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
4304 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
4305 to struct bfd_hash_entry *.
4306 (bfd_set_section_content): Add cast to PTR in comparison.
4307 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
4308 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
4309 simple_dummy_unattached_reloc,
4310 bfd_simple_get_relocated_section_contents): Add K&R declarations and
4311 function definitions.
4312 * srec.c (S3Forced): Initialize to false.
4313 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
4314 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
4315 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
4316 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
4317 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
4320 2002-10-23 Jakub Jelinek <jakub@redhat.com>
4322 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
4323 relocs into shared lib non-allocated reloc sections.
4325 2002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
4327 * dwarf2.c (add_line_info): Ensure that the line_info_table is
4328 sorted even when given an out-of-order line sequence.
4329 (lookup_address_in_line_info_table): When an exact VMA match is
4330 not found, return line information with the closest VMA.
4332 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
4334 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
4335 HPUX 11.00 patch PHSS_26559.
4337 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
4339 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
4340 the options section into a separate section unless IRIX 6
4341 compatibility is enabled.
4343 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
4345 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
4347 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
4348 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
4350 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
4351 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
4353 2002-10-21 Graeme Peterson <gp@qnx.com>
4355 * targets.c (_bfd_target_vector): Add missing qnx vectors.
4357 2002-10-21 Alan Modra <amodra@bigpond.net.au>
4359 * targets.c (bfd_target_list): Don't return the default target twice.
4361 2002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
4363 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
4364 perror with bfd_perror.
4366 2002-10-19 H.J. Lu <hjl@gnu.org>
4368 * elflink.h (elf_link_add_object_symbols): Correctly handle
4369 DT_RPATH and DT_RUNPATH.
4371 2002-10-19 Mark Kettenis <kettenis@gnu.org>
4373 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
4375 2002-10-17 Denis Chertykov <denisc@overta.ru>
4377 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
4380 2002-10-17 Alan Modra <amodra@bigpond.net.au>
4382 * elfxx-target.h (USE_REL): Don't define as 1.
4383 * elf32-arm.h (USE_REL): Provide a default define of 0.
4384 Use #if rather than #ifdef when testing USE_REL.
4385 * elf32-m32r.c: Likewise.
4387 * elf32-arc.c (USE_REL): Define as 1.
4388 * elf32-d10v.c (USE_REL): Likewise.
4389 * elf32-m32r.c (USE_REL): Likewise.
4390 * elf32-m68hc11.c (USE_REL): Likewise.
4391 * elf32-m68hc12.c (USE_REL): Likewise.
4392 * elf32-or32.c (USE_REL): Likewise.
4393 * elfarm-nabi.c (USE_REL): Likewise.
4395 2002-10-16 Jakub Jelinek <jakub@redhat.com>
4397 * config.bfd (s390-*-linux*): Add targ64_selvecs.
4398 (s390x-*-linux*): Add targ_selvecs.
4400 2002-10-16 Alan Modra <amodra@bigpond.net.au>
4402 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
4403 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
4404 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
4405 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
4406 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
4407 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
4408 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
4409 (SOURCE_HFILES): Add elf32-qnx.h.
4410 (BUILD_HFILES): Add bfdver.h.
4412 * Makefile.in: Regenerate.
4413 * configure.in Update bfd vector dependencies.
4414 * configure: Regenerate.
4415 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
4416 * elf32-i386qnx.c: Likewise.
4417 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
4418 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
4419 * elf32-sh-lin.c: Likewise.
4420 * elf32-shqnx.c: Likewise.
4421 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
4422 * elf32-sh64-nbsd.c: Likewise.
4423 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
4424 * elf64-sh64-nbsd.c: Likewise.
4425 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
4426 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
4427 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
4428 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
4429 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
4430 (elf_backend_is_contained_by_filepos): Likewise.
4431 (elf_backend_copy_private_bfd_data_p): Likewise.
4432 Globalize and move functions to..
4433 * elf32-qnx.c: ..here. New file.
4434 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
4435 emit target vectors when INCLUDE_SHMEDIA.
4436 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
4438 * elf64-sh64.c: Remove ELF_ARCH test.
4439 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
4440 * po/BLD-POTFILES.in: Regenerate.
4441 * po/SRC-POTFILES.in: Regenerate.
4443 2002-10-16 Alan Modra <amodra@bigpond.net.au>
4445 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
4446 loaded with --just-symbols.
4448 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
4449 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
4450 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
4451 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
4453 2002-10-15 Richard Henderson <rth@redhat.com>
4455 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
4456 (BFD64_BACKENDS_CFILES): Likewise.
4457 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
4458 * elf64-alpha-fbsd.c: Remove file, move code ...
4459 * elf64-alpha.c: ... here.
4460 * Makefile.in, configure: Rebuild.
4462 2002-10-14 Richard Henderson <rth@redhat.com>
4464 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
4467 2002-10-14 Stephen Clarke <stephen.clarke@superh.com>
4469 * elf32-sh.c (elf_sh_link_hash_entry): Replace
4470 datalabel_got_offset with union of datalabel_got
4471 offset and refcount.
4472 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
4473 (allocate_dynrelocs): Delete unnecessary code for
4474 STT_DATALABEL type. Create entry in got for
4475 datalabel version of symbol if datalabel_got.refcount > 0.
4476 (sh_elf_relocate_section): Use datalabel_got union.
4477 (sh_elf_gc_sweep_hook): Pull common code to initialize
4478 h and eh out of switch statement. Declare seen_stt_datalabel.
4479 Initialize it. Decrement datalabel_got.refcount for
4480 got relocs when seen_stt_datalabel is true.
4481 Decrement local_got_refcounts entry for datalabel got relocs
4483 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
4484 (sh_elf_check_relocs): Declare seen_stt_datalabel.
4485 Initialize it. When seen_stt_datalabel is true, increment
4486 datalabel_got refcount rather than got.refcount.
4487 (sh_elf_finish_dynamic_symbol): Create relocs to
4488 initialize got entry for datalabel version of symbol.
4490 2002-10-14 Alan Modra <amodra@bigpond.net.au>
4492 * Makefile.am: Run "make dep-am".
4493 (BFD_H_FILES): Remove version.h.
4494 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
4495 * version.h: ..to here.
4496 * configure.in (bfd_version_date): Remove.
4497 (AC_OUTPUT): Make bfdver.h from version.h.
4498 * bfd.c: #include "bfdver.h".
4499 * vms-hdr.c: Likewise.
4500 * Makefile.in: Regenerate.
4501 * bfd-in2.h: Regenerate.
4502 * configure: Regenerate.
4503 * po/SRC-POTFILES.in: Regenerate.
4505 2002-10-14 Alan Modra <amodra@bigpond.net.au>
4507 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
4508 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
4509 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
4510 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
4511 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
4512 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
4513 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
4514 bfd_mach_ip2022, bfd_mach_ip2022ext,
4515 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
4516 * bfd-in2.h: Regenerate.
4518 2002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4520 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
4521 endian vector to targ_selvecs.
4523 2002-10-13 Alexandre Oliva <aoliva@redhat.com>
4525 * elfxx-mips.c (mips_elf_calculate_relocation): Take
4526 save_addend argument. Don't apply the 32-bit mask to a
4527 GPREL32 value if it's to be used in another relocation. Don't
4528 use forced-check computation of local_p to decide whether to
4529 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
4530 of the addend of a non-in-place GPREL16 relocation.
4531 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
4532 mips_elf_calculate_relocation().
4534 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
4536 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
4537 with symbols in other sections if we relaxed something; the sections
4538 output offsets must be re-computed before.
4540 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
4542 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
4543 handling to use Elf_Internal_Sym.
4544 (m68hc11_elf_relax_delete_bytes): Likewise.
4546 2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4548 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
4549 sh_elf_object_p, dtpoff_base): New functions.
4550 (sh_elf_howto_table): Add TLS relocs.
4551 (sh_reloc_map): Likewise.
4552 (sh_elf_info_to_howto): Support TLS relocs.
4553 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
4554 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
4556 (sh_elf_obj_tdata): New.
4557 (elf_sh_link_hash_table): Add tls_ldm_got.
4558 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
4559 (allocate_dynrelocs): Support TLS relocs.
4560 (sh_elf_size_dynamic_sections): Likewise.
4561 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
4562 .rela.got section when found already. Return false after printing
4563 error about unresolvable relocation.
4564 (sh_elf_gc_sweep_hook): Support TLS relocs.
4565 (sh_elf_check_relocs): Likewise.
4566 (sh_elf_finish_dynamic_symbol): Likewise.
4567 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
4568 * reloc.c: Add SH TLS relocs.
4569 * bfd-in2.h, libbfd.h: Regenerate.
4571 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
4573 * Makefile.in: Regenerated.
4575 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
4577 * Makefile.am: Run dep-am.
4578 (BFD_H_DEP): Add simple.c and linker.c.
4579 (BFD32_LIBS): Add simple.lo.
4580 (BFD32_LIBS_CFILES): Add simple.c.
4581 * Makefile.in: Regenerated.
4582 * bfd-in2.h: Regenerated.
4583 * simple.c: New file.
4585 2002-10-11 Alan Modra <amodra@bigpond.net.au>
4587 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
4588 (record_thumb_to_arm_glue): Likewise.
4589 * ecoff.c (ecoff_link_add_externals): Likewise.
4590 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
4591 (record_thumb_to_arm_glue): Likewise.
4592 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
4593 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
4594 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
4595 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
4596 * elf64-ppc.c (func_desc_adjust): Likewise.
4597 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
4598 (sh64_elf64_create_dynamic_sections): Likewise.
4599 * elflink.c (_bfd_elf_create_got_section): Likewise.
4600 (_bfd_elf_create_dynamic_sections): Likewise.
4601 (_bfd_elf_create_linker_section): Likewise.
4602 * elflink.h (elf_add_default_symbol): Likewise.
4603 (elf_link_create_dynamic_sections): Likewise.
4604 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
4605 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
4606 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
4607 (_bfd_mips_elf_add_symbol_hook): Likewise.
4608 (_bfd_mips_elf_create_dynamic_sections): Likewise.
4609 * linker.c (generic_link_add_symbol_list): Likewise.
4610 * xcofflink.c (xcoff_link_add_symbols): Likewise.
4612 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
4614 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
4615 completely removed. Correct local sym adjustment.
4617 2002-10-10 Stephen Clarke <stephen.clarke@superh.com>
4619 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
4620 Correct mistake in calculation of address of .got.
4621 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
4622 elf_sh64_pic_plt_entry_le): Likewise.
4624 2002-10-09 Richard Shann <richard.shann@superh.com>
4625 Stephen Clarke <stephen.clarke@superh.com>
4627 * Makefile.am: Add entries for elf32-sh64-lin.c and
4628 elf64-sh64-lin.c. Regenerate.
4629 * Makefile.in: Regenerate.
4630 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
4631 to use sh64 vectors rather than sh vectors.
4632 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
4633 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
4634 * configure: Regenerate.
4635 * elf32-sh64-lin.c: New file.
4636 * elf64-sh64-lin.c: New file.
4637 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
4638 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
4640 2002-10-08 H.J. Lu <hjl@gnu.org>
4642 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
4643 IE->LE transition for R_386_TLS_IE.
4645 2002-10-08 Alan Modra <amodra@bigpond.net.au>
4647 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
4649 2002-10-07 Mark Elbrecht <snowball3@softhome.net>
4651 * cofflink.c (mark_relocs): Don't mark relocations in excluded
4654 2002-10-07 Alan Modra <amodra@bigpond.net.au>
4656 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
4659 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
4661 2002-10-06 Alan Modra <amodra@bigpond.net.au>
4663 * opncls.c: Formatting.
4664 (_bfd_new_bfd): Use a smaller section hash table.
4666 2002-10-05 Alexandre Oliva <aoliva@redhat.com>
4668 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
4669 of the other two relocations packed with a REL32 to NONE.
4671 2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
4673 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
4674 (sh_elf_link_hash_newfunc): Initialize it.
4675 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
4676 to got.refcount for symbols that are forced local or when
4677 we have direct got refs.
4678 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
4679 to correctly adjust got.refcount and plt.refcount.
4680 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
4681 (sh_elf_check_relocs): Increment gotplt_refcount.
4683 2002-10-01 Jakub Jelinek <jakub@redhat.com>
4685 * elf32-i386.c (elf_i386_relocate_section): Fix
4686 movl foo@indntpoff, %eax IE->LE transition.
4688 2002-10-01 Jakub Jelinek <jakub@redhat.com>
4690 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
4691 sequence and its transitions.
4693 2002-10-01 Jakub Jelinek <jakub@redhat.com>
4695 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
4696 to st_value + addend in non-code sections.
4697 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
4698 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
4700 2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
4701 Ken Raeburn <raeburn@cygnus.com>
4702 Aldy Hernandez <aldyh@redhat.com>
4703 Eric Christopher <echristo@redhat.com>
4704 Richard Sandiford <rsandifo@redhat.com>
4706 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
4707 (bfd_mach_mips5500): New.
4708 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
4709 (arch_info_struct): Add corresponding entries here.
4710 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
4711 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
4712 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
4713 bfd_mach_mips5400 and bfd_mach_mips5500.
4714 (_bfd_mips_elf_mach_extends_p): New function.
4715 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
4716 the EF_MIPS_MACH flags.
4717 * bfd-in2.h: Regenerate.
4719 2002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
4721 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
4724 2002-09-28 Alan Modra <amodra@bigpond.net.au>
4726 * elf.c (map_sections_to_segments): Correct test for start of
4727 writable section in the same page as end of read-only section.
4729 2002-09-27 Matt Thomas <matt@3am-software.com>
4731 * elf32-vax.c (elf_vax_check_relocs): Remove unused
4732 local_got_refcounts usage. Remove allocation of got slot.
4733 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
4734 Remove de-allocation of got slot.
4735 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
4736 traversal for elf_vax_instantiate_got_entries. Allow empty .got
4737 sections to be GC'ed.
4738 (elf_vax_instantiate_got_entries): New function.
4739 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
4740 tests that are now handled by elf_vax_instantiate_got_entries.
4741 Assert GOT entry falls within .got section size. Remove redundant
4742 comparisions. Fix comments.
4744 2002-09-27 Jakub Jelinek <jakub@redhat.com>
4746 * reloc.c: Add x86-64 TLS relocs.
4747 * bfd-in2.h, libbfd.h: Rebuilt.
4748 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
4749 relocs. Add TLS relocs.
4750 (x86_64_reloc_map): Add TLS relocs.
4751 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
4752 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
4753 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
4754 (elf64_x86_64_hash_entry): Define.
4755 (struct elf64_x86_64_obj_tdata): New.
4756 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
4757 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
4758 (link_hash_newfunc): Initialize tls_type.
4759 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
4760 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
4761 (elf64_x86_64_mkobject): New.
4762 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
4763 (elf64_x86_64_tls_transition): New.
4764 (elf64_x86_64_check_relocs): Add r_type variable and use it.
4766 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
4767 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
4768 (elf64_x86_64_size_dynamic_sections): Likewise.
4769 (dtpoff_base, tpoff): New.
4770 (elf64_x86_64_relocate_section): Handle TLS relocs.
4771 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
4773 (bfd_elf64_mkobject): Define.
4775 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
4776 DF_STATIC_TLS if shared.
4778 2002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4780 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
4781 empty relocation sections.
4783 2002-09-26 Alan Modra <amodra@bigpond.net.au>
4785 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
4786 (ppc64_elf_build_stubs): Build them here instead.
4788 2002-09-24 Jakub Jelinek <jakub@redhat.com>
4790 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
4791 addend into r_addend, not *r_offset.
4792 (elf32_sparc_finish_dynamic_symbol): Likewise.
4793 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
4794 R_SPARC_RELATIVE's r_offset.
4796 2002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
4798 * dwarf2.c (decode_line_info): Update to correctly decode
4799 the (non-standard DWARF2) out-of-order address sequences
4800 generated by the Intel C++ 6.0 compiler for ia64-Linux.
4802 2002-09-23 Mark Elbrecht <snowball3@softhome.net>
4804 * config.bfd: For DJGPP targets, match with any cpu and any machine.
4806 2002-09-23 Alan Modra <amodra@bigpond.net.au>
4808 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
4809 for discarded FDEs. Remove redundant assignment.
4810 * elflink.h (elf_bfd_discard_info): Save edited relocs.
4812 2002-09-22 H.J. Lu <hjl@gnu.org>
4814 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
4815 the relocation count between different .reloc sections.
4817 2002-09-21 Alan Modra <amodra@bigpond.net.au>
4819 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
4820 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
4821 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
4824 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
4825 unsigned. Move "symcount" assignment out of loop.
4826 * Makefile.am: Run "make dep-am".
4827 * Makefile.in: Regenerate.
4828 * configure: Regenerate.
4829 * po/SRC-POTFILES.in: Regnerate.
4831 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
4833 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
4834 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
4837 2002-09-19 Jakub Jelinek <jakub@redhat.com>
4839 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
4840 even if generating R_PPC_RELATIVE reloc.
4841 (ppc_elf_relocate_section): Make sure relocation is performed
4842 if skip == -2. Clear memory at r_offset when creating dynamic
4845 2002-09-19 Jakub Jelinek <jakub@redhat.com>
4847 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
4848 BFD_RELOC_386_TLS_GOTIE): Add.
4849 * bfd-in2.h, libbfd.h: Rebuilt.
4850 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
4851 and R_386_TLS_GOTIE.
4852 (elf_i386_reloc_type_lookup): Handle it.
4853 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
4854 char instead of enum, change GOT_* into defines.
4855 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
4856 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
4857 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
4858 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
4859 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
4860 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
4861 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
4862 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
4863 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
4864 tls_type is GOT_TLS_IE_BOTH.
4865 (elf_i386_size_dynamic_sections): Likewise.
4866 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
4867 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
4868 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
4869 all 4 GOT_TLS_* TLS types.
4871 2002-09-19 Nick Clifton <nickc@redhat.com>
4873 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
4874 follow indirect links.
4876 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
4878 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
4879 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
4881 (ecoff_swap_sym_in) <iss>: Likewise.
4882 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
4883 ECOFF information: 'ioptMax' refers to the actual *size*
4884 of the optimization symtab, not the number of entries.
4886 2002-09-19 Daniel Jacobowitz <drow@mvista.com>
4888 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
4889 ELF_LINK_HASH_NEEDS_PLT logic.
4891 2002-09-18 Daniel Jacobowitz <drow@mvista.com>
4893 * elfcode.h (elf_slurp_reloc_table_from_section): Check
4894 correct relocation count.
4896 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
4898 * bfd-in.h (bfd_get_dynamic_symcount): Define.
4899 * bfd.c (struct _bfd): Add dynsymcount.
4900 * bfd-in2.h: Regenerated.
4901 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
4903 * elfcode.h (elf_slurp_reloc_table_from_section): Check
4906 2002-09-17 Stan Cox <scox@redhat.com>
4908 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
4909 (mips_elf64_final_gp): Don't make up gp value.
4910 * elfn32-mips.c (mips_elf_final_gp): Likewise.
4911 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
4912 .MIPS.options/.options section.
4914 2002-09-17 David O'Brien <obrien@FreeBSD.org>
4916 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
4917 It is benign for FreeBSD < 4.1. Minor reformatting.
4918 * elf64-alpha-fbsd.c: Likewise.
4920 2002-09-17 Jakub Jelinek <jakub@redhat.com>
4922 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
4925 2002-09-17 Alan Modra <amodra@bigpond.net.au>
4927 * elf64-alpha.c (alpha_elf_size_info): Make static.
4929 2002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
4931 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
4932 * cpu-tic4x.c: Ditto.
4934 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4936 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
4939 2002-09-16 Bruno Haible <bruno@clisp.org>
4941 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
4942 by a target variant implementation.
4943 * elf64-alpha.c: Likewise.
4944 * elf32-i386-fbsd.c: New file.
4945 * elf64-alpha-fbsd.c: New file.
4946 * targets.c: Support bfd_elf32_i386_freebsd_vec and
4947 bfd_elf64_alpha_freebsd_vec.
4948 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
4949 bfd_elf64_alpha_freebsd_vec.
4950 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
4951 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
4952 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
4953 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
4954 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
4955 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
4956 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
4958 2002-09-12 Jakub Jelinek <jakub@redhat.com>
4960 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
4962 (elf_i386_relocate_section): Return false after printing error about
4963 unresolvable relocation.
4965 2002-09-12 Nick Clifton <nickc@redhat.com>
4967 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
4970 2002-09-11 Jeffrey Law <law@redhat.com>
4972 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
4974 2002-09-11 Andrew Haley <aph@cambridge.redhat.com>
4976 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
4977 line_ptr before deciding we've found a symbol.
4979 2002-09-11 Nick Clifton <nickc@redhat.com>
4981 * po/da.po: New Danish translation file.
4982 * configure.in (LINGUAS): Add 'da'.
4983 * configure: Regenerate.
4985 2002-09-10 Michael Snyder <msnyder@redhat.com>
4987 * irix-core.c (do_sections, do_sections64): New functions.
4988 (irix_core_core_file_p): Call new functions do_sections,
4989 do_sections64, depending on corefile (32-bit or 64-bit).
4991 2002-09-09 Richard Henderson <rth@redhat.com>
4993 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
4994 and PCREL21F like PCREL21B.
4996 2002-09-04 Kevin Buettner <kevinb@redhat.com>
4998 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
5001 2002-09-02 Nick Clifton <nickc@redhat.com>
5003 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
5004 names instead of cryptically overloaded bfd_reloc error
5006 (v850_elf_relocate_section): Likewise.
5007 (v850_elf_relax_section): Replace caching of external symbols
5008 with caching of internal symbols obtained from calling
5009 bfd_elf_get_elf_syms().
5010 Fixup problems with freeing cached allocated memory blocks.
5012 2002-09-02 Alan Modra <amodra@bigpond.net.au>
5014 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
5015 (bfd_pj_arch): Use bfd_default_scan.
5016 * cpu-v850.c (scan): Remove.
5017 (N): Use bfd_default_scan.
5018 * cpu-z8k.c (scan_mach): Remove.
5019 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
5020 first. Use bfd_default_scan.
5022 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
5024 (ecoff_get_magic): Likewise.
5025 * elf32-v850.c (v850_elf_object_p): Likewise.
5026 (v850_elf_final_write_processing): Likewise.
5027 * mipsbsd.c (MY(set_arch_mach)): Likewise.
5028 (MY(write_object_contents)): Likewise.
5029 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
5030 * coffcode.h (coff_write_object_contents): Likewise.
5031 (coff_set_arch_mach_hook): Add comment describing machine == 0.
5032 Remove unnecessary "machine" assignments.
5033 (coff_write_relocs): Test for the absolute section sym by testing
5036 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
5037 and bfd_mach_i386_i386_intel_syntax.
5038 * pdp11.c (NAME(aout,machine_type)): Likewise.
5040 2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
5042 * bfd-in.h (align_power): Cast constants to bfd_vma type.
5043 * bfd-in2.h (align_power): Likewise.
5045 2002-08-30 Alan Modra <amodra@bigpond.net.au>
5047 * Makefile.am: Run "make dep-am".
5048 * Makefile.in: Regenerate.
5050 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
5051 * cpu-powerpc.c (powerpc_compatible): Likewise.
5052 * cpu-rs6000.c (rs6000_compatible): Likewise.
5054 2002-08-28 Catherine Moore <clm@redhat.com>
5056 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
5057 (v850-elf-reloc): Don't resolve pc relative relocs.
5058 (v850_elf_ignore_reloc): New routine.
5059 (v850_elf_final_link_relocate): Handle new relocs.
5060 (v850_elf_relax_delete_bytes ): New routine.
5061 (v850_elf_relax_section): New routine.
5062 (bfd_elf32_bfd_relax_section): Define.
5063 (HOWTO): New entries for new relocs.
5064 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
5065 (BFD_RELOC_V850_LONGJUMP): New reloc.
5066 (BFD_RELOC_V850_ALIGN): New reloc.
5067 * archures.c: Remove redundant v850ea architecture.
5068 * cpu-v850.c: Remove redundant v850ea support.
5069 * libbfd.h: Regenerate.
5070 * bfd-in2.h: Regenerated.
5072 2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
5074 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
5075 * configure.in: Add tic4x_coff vector files.
5076 * configure: Regenerate.
5077 * Makefile.am: Add tic4x target.
5078 * Makefile.in: Regenerate.
5080 2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
5082 * archures.c: Add the BFD arch type tic4x.
5083 * bfd-in.h: Add BFD_IN_MEMORY flag.
5084 * coff-tic4x.c: New file.
5085 * coffswap.h (coff_swap_sym_out): Add preadjuster.
5086 * cpu-tic4x.c: New file.
5087 * targets.c: Added tic4x- in list of xvecs.
5088 * ticoff.h: New file.
5089 * bfd-in2.h: Regenerate.
5091 2002-08-27 Adam Nemet <anemet@lnxw.com>
5093 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
5094 bit of DT_INIT and DT_FINI for Thumb functions.
5096 2002-08-26 Alan Modra <amodra@bigpond.net.au>
5098 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
5100 2002-08-26 Alan Modra <amodra@bigpond.net.au>
5102 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
5104 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5106 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
5107 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
5109 (struct elf_sh_pcrel_relocs_copied): Removed.
5110 (struct elf_sh_dyn_relocs): New.
5111 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
5112 field with dyn_relocs.
5113 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
5114 sections and sym_sec.
5115 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
5116 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
5117 (sh_elf_create_dynamic_sections): Use create_got_section instead
5118 of _bfd_elf_create_got_section.
5119 (sh_elf_check_relocs): Likewise.
5120 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
5122 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
5123 sh_elf_relocate_section, sh_elf_check_relocs,
5124 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
5126 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
5127 dynamic relocations and avoiding the copy relocation when we
5128 didn't find any dynamic relocations in the section which has
5129 contents or is read-only.
5130 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
5131 (sh_elf_size_dynamic_sections): Don't reset the size of
5132 .rela.got section even if dynamic_sections_created flag is off.
5133 Don't use sh_elf_discard_copies. Scan all input bfd and use
5134 allocate_dynrelocs. Call readonly_dynrelocs to determine
5135 whether we need DT_TEXTREL.
5136 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
5137 whether the symbol was never referred to.
5138 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
5139 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
5140 (sh_elf_check_relocs): Call create_got_section if the short-cut
5141 to .got is null. Increment reference counters only instead of
5142 allocating space on dynamic sections here. Don't conditionalize
5143 uninitialized got.offset value when marking the symbol as a
5144 global offset table entry. Keep relocations for symbols satisfied
5145 by a dynamic library to avoid copy relocations for the symbol.
5146 Set dynobj field of an elf hash table if needed.
5147 (sh_elf_finish_dynamic_sections): Handle null section pointer
5149 (elf_backend_copy_indirect_symbol): Defined.
5150 (elf_backend_can_refcount): Defined.
5152 2002-08-23 Nick Clifton <nickc@redhat.com>
5154 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
5155 previous change. Add comment explaining why.
5157 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
5159 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
5160 contents of .got.plt[2] to tr0, not address of .got.plt.
5161 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
5162 patching absolute plt entry. For shmedia plt entry, set bottom bit
5163 of branch to plt0 as this is a branch to an shmedia instruction.
5164 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
5165 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
5166 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
5168 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
5169 patching absolute plt entry. For shmedia plt entry, branch to
5170 plt0 is now ptrel, so use relative offset. Set bottom bit of
5171 branch target as it is a branch to an shmedia instruction.
5173 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
5174 Richard Shann <richard.shann@superh.com>
5176 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
5177 value if .init is an SHmedia function. Similarly for DT_FINI.
5178 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
5180 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
5182 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
5184 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
5186 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5188 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
5189 byte read when reading the return address register column.
5191 2002-08-22 Nick Clifton <nickc@redhat.com>
5193 * config.bfd: Add powepc64-*-*bsd* target.
5195 2002-08-22 Graeme Peterson <gp@qnx.com>
5197 * Makefile.am: Add entries for elf32-shqnx.c
5198 * Makefile.in: Regenerate.
5199 * config.bfd: Add support sh-*-nto* target.
5200 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
5201 * configure: Regenerate.
5202 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
5203 * elf32-sh.c: Do not include elf32-target.h if
5204 ELF32_SH_C_INCLUDED is defined.
5205 * elf32-shqnx.c: New file: Support for QNX.
5206 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
5208 2002-08-22 Nick Clifton <nickc@redhat.com>
5210 * po/tr.po: Updated Turkish translation.
5212 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
5213 symbols are not read.
5215 2002-08-22 Alan Modra <amodra@bigpond.net.au>
5217 * elf32-m68hc11.c: Formatting fixes.
5218 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
5219 * elf32-m68hc12.c: Formatting fixes.
5220 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
5222 2002-08-22 Alan Modra <amodra@bigpond.net.au>
5224 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
5226 (pmac_xcoff_vec): Likewise.
5227 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
5228 (aix5coff64_vec): Likewise.
5230 2002-08-22 Alan Modra <amodra@bigpond.net.au>
5232 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
5233 param to elf_backend_copy_indirect_symbol.
5234 (_bfd_elf_link_hash_copy_indirect): Likewise.
5235 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
5236 calls to copy_indirect_symbol.
5237 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
5238 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
5239 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
5240 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
5241 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
5242 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
5243 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
5244 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
5245 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
5246 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
5247 test refcounts for "used" values.
5249 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
5251 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
5252 argument declaration.
5254 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
5256 * archures.c (bfd_mach_ppc_e500): Added.
5257 * bfd-in2.h: Rebuilt.
5258 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
5260 2002-08-19 Alan Modra <amodra@bigpond.net.au>
5262 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
5264 2002-08-17 Andrew Cagney <ac131313@redhat.com>
5266 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
5269 2002-08-17 Stan Cox <scox@redhat.com>
5271 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
5272 IRIX 6 segment layout for NEWABI.
5274 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
5276 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
5277 symbols when looking for section referred to by a relocation.
5278 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
5280 2002-08-15 Alan Modra <amodra@bigpond.net.au>
5282 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
5284 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
5286 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
5287 missing check for whether the symbol is referenced by DSO before
5288 unexporting it as an unneeded dynamic symbol.
5290 2002-08-14 H.J. Lu <hjl@gnu.org>
5292 * libbfd.h: Regenerate.
5294 2002-08-14 H.J. Lu <hjl@gnu.org>
5296 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
5298 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
5300 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
5302 (m68hc11_direct_relax): New to define table of relaxable instructions.
5303 (find_relaxable_insn): New, find a relaxable insn.
5304 (compare_reloc): New to compare two relocs.
5305 (m68hc11_elf_relax_section): New, relax text sections.
5306 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
5307 (elf32_m68hc11_check_relocs): New function for GC support.
5308 (elf32_m68hc11_relocate_section): New function for GC support.
5309 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
5310 (elf_backend_check_relocs): Likewise.
5311 (elf_backend_relocate_section): Likewise.
5313 2002-08-13 H.J. Lu <hjl@gnu.org>
5315 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
5316 definitions in shared objects when checking symbol with
5319 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5321 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
5322 (elf32_m68hc11_gc_sweep_hook): Likewise.
5323 (elf_backend_gc_mark_hook): Define for GC section support.
5324 (elf_backend_gc_sweep_hook): Likewise.
5325 (elf_backend_can_gc_sections): Likewise.
5327 * elf32-m68hc12.c: Likewise.
5329 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5331 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
5332 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
5333 (_bfd_m68hc11_elf_set_private_flags): New function.
5334 Use them to set/check/print ELF flags specific to 68HC11.
5336 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
5337 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
5338 (_bfd_m68hc12_elf_set_private_flags): New function.
5339 Use them to set/check/print ELF flags specific to 68HC12.
5341 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5343 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
5344 fix masks for PC-rel relocs.
5345 (m68hc11_elf_ignore_reloc): New function.
5347 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
5348 68HC12 banked addressing relocs.
5349 (m68hc12_phys_addr): New to compute physical address of banked memory.
5350 (m68hc12_phys_page): Likewise for page.
5351 (m68hc12_addr_is_banked): New to see if address is in banked area.
5352 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
5354 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5356 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
5357 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
5358 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
5359 * bfd-in2.h: Regenerate.
5361 2002-08-12 H.J. Lu <hjl@gnu.org>
5363 * elflink.h (elf_add_default_symbol): Preserve section across
5366 2002-08-09 Graeme Peterson <gp@qnx.com>
5368 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
5369 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
5370 * Makefile.in: Regenerate.
5371 * config.bfd: Add support for powerpc{le}-*-nto targets.
5372 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
5373 * configure: Regenerate.
5374 * elf32-i386qnx.c: Moved backend functions into a QNX specific
5375 common file "elf32-qnx.h", and now include that file.
5376 * elf32-qnx.h: New file: QNX specific common elf backend.
5377 * elf32-ppc.c: Do not include elf32-target.h if
5378 ELF32_PPC_C_INCLUDED is defined.
5379 * elf32-ppcqnx.c: New file: Support for QNX.
5380 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
5381 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
5383 2002-08-09 Nick Clifton <nickc@redhat.com>
5385 * po/sv.po: Updated Swedish translation.
5387 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5389 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
5390 g->global_gotsym is NULL.
5392 2002-08-08 H.J. Lu <hjl@gnu.org>
5394 * elflink.h (elf_add_default_symbol): Don't warn if a definition
5395 overrides an indirect versioned symbol.
5397 2002-08-08 Jakub Jelinek <jakub@redhat.com>
5399 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
5400 for R_386_TLS_TPOFF32 relocs against symndx 0.
5402 2002-08-07 H.J. Lu <hjl@gnu.org>
5404 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
5405 with undefined version if needed.
5406 (elf_link_assign_sym_version): Match a default symbol with a
5407 version without definition. No need to hide the default
5408 definition separately.
5410 2002-08-08 Alan Modra <amodra@bigpond.net.au>
5412 * elflink.h (elf_link_output_extsym): Don't output symbols from
5413 SEC_EXCLUDE sections.
5415 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
5417 2002-08-07 Alan Modra <amodra@bigpond.net.au>
5419 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
5422 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5424 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
5427 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5429 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
5431 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5433 * elf32-mips.c (mips_reloc_map): Fix typo.
5435 2002-08-06 Alan Modra <amodra@bigpond.net.au>
5437 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
5439 2002-08-06 Alan Modra <amodra@bigpond.net.au>
5441 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
5443 2002-08-06 Alan Modra <amodra@bigpond.net.au>
5445 * libxcoff.h: Use PARAMS on function declarations.
5446 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
5447 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
5449 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
5451 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
5453 2002-08-06 Alan Modra <amodra@bigpond.net.au>
5455 * coff-rs6000.c: Formatting fixes.
5456 (xcoff_calculate_relocation): Use PARAMS in declaration.
5457 (xcoff_complain_overflow): Likewise.
5458 (xcoff_ppc_relocate_section): Use old-style function pointer call.
5459 (bfd_xcoff_backend_data): Remove useless comments.
5460 (rs6000coff_vec): Likewise.
5461 (bfd_pmac_xcoff_backend_data): Likewise.
5462 (pmac_xcoff_vec): Likewise.
5464 * coff64-rs6000.c: Formatting fixes.
5465 (xcoff64_calculate_relocation): Use PARAMS in declaration.
5466 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
5467 (bfd_xcoff_backend_data): Remove useless comments.
5468 (rs6000coff64_vec): Likewise.
5469 (bfd_xcoff_aix5_backend_data): Likewise.
5470 (aix5coff64_vec): Likewise.
5472 2002-08-06 Alan Modra <amodra@bigpond.net.au>
5474 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
5475 mask entries. Use complain_overflow_dont for R_REF.
5476 (xcoff_reloc_type_ba): Revert last change.
5477 (xcoff_reloc_type_br): Likewise.
5478 (xcoff_reloc_type_crel): Likewise.
5479 (xcoff_ppc_relocate_section): Likewise.
5480 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
5481 (xcoff64_ppc_relocate_section): Likewise.
5482 (xcoff64_howto_table): Revert some of last change to mask entries.
5483 Use complain_overflow_dont for R_REF.
5485 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
5486 relocs with bitsize == 16 have size = 1.
5487 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
5488 (xcoff_reloc_type_br): Likewise.
5489 (xcoff_reloc_type_crel): Likewise.
5490 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
5491 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
5492 dst_mask adjustment.
5493 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
5494 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
5495 bitsize == 16 have size = 1.
5497 2002-08-01 Denis Chertykov <denisc@overta.ru>
5499 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
5500 (struct misc): New field isymbuf. All free_* fields removed.
5501 (symbol_value): Pass in internal syms. No need to swap syms in.
5502 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
5503 possibly cached info.
5504 (tidyup_after_error): Removed.
5505 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
5506 misc. Use new field.
5507 (adjust_all_relocations): Use internal syms. No need to swap syms
5509 (add_page_insn): Don't use removed fields of struct misc.
5511 2002-08-01 Nick Clifton <nickc@redhat.com>
5513 * elf32-arm.h: Revert previous delta.
5515 2002-08-01 Nick Clifton <nickc@redhat.com>
5517 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
5518 * configure: Regenerate.
5520 2002-07-31 H.J. Lu <hjl@gnu.org>
5522 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
5525 2002-07-31 H.J. Lu <hjl@gnu.org>
5527 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
5530 2002-07-31 Jakub Jelinek <jakub@redhat.com>
5532 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
5533 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
5535 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
5537 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
5538 There is no 8 byte relocation type for this architecture.
5539 (do_ns32k_reloc): Use bfd_vma instead of native types.
5540 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
5542 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
5543 rely on generic code to do that.
5544 * aout-ns32k.c (howto_table): Add appropriate overflow detection
5545 to all table entries.
5546 (_bfd_ns32k_relocate_contents): put_data returns void.
5547 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
5548 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
5551 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
5553 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
5554 archive object is target dependant.
5556 2002-07-31 Adam Nemet <anemet@lnxw.com>
5558 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
5559 (THUMB_PLT_ENTRY_SIZE): New macro.
5560 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
5561 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
5563 (elf32_arm_plt_entry): Likewise.
5564 (elf_backend_plt_header_size): Likewise.
5565 (elf32_thumb_plt0_entry): New global.
5566 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
5568 (elf32_thumb_plt_entry): New global.
5569 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
5570 Thumb entries. Set the bottom bit of the corresponding GOT entry
5571 for a Thumb PLT entry.
5572 (struct elf32_arm_plt_entry_info): New structure.
5573 (struct elf32_arm_link_hash_entry, plt_info): New member of this
5575 (elf32_arm_link_hash_newfunc): Initialize new member.
5576 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
5577 relocations against the PLT.
5578 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
5579 first_rel_type if this is the first time we encounter the symbol.
5580 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
5581 Determine if relocation needs a PLT entry. Set first_rel_type if
5582 this is the first time we encounter the symbol
5583 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
5585 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
5586 (elf32_arm_create_dynamic_sections): New function. Create the
5588 (elf_backend_create_dynamic_sections): Call it.
5590 2002-07-31 Nick Clifton <nickc@redhat.com>
5592 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
5593 'alternative' in order to avoid shadowing global symbol of the
5595 * bfd-in2.h: Regenerate.
5596 * libbfd.h: Regenerate.
5597 * libcoff.h: Regenerate.
5599 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5601 * Makefile.am: Add n32 ABI support.
5602 * Makefile.in: Regenerate.
5603 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
5604 bit vectors for mips*-*-linux targets as optional.
5605 * configure.in: Add n32 ABI vectors.
5606 * configure: Regenerate.
5607 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
5608 * elfn32-mips.c: New file, n32 ABI support.
5609 * targets.c: Add n32 ABI vectors.
5611 2002-07-30 Graeme Peterson <gp@qnx.com>
5613 * elfarmqnx-nabi.c: New file: Support for QNX.
5614 * config.bfd: Add support for arm-*-nto target.
5615 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
5616 * configure: Regenerate.
5617 * Makefile.am: Add entries for elfarmqnx-nabi.c.
5618 * Makefile.in: Regenerate.
5619 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
5620 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
5621 * elfarm-nabi.c: Do not include elf32-arm.h if
5622 ELFARM_NABI_C_INCLUDED is defined.
5623 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
5625 2002-07-30 Nick Clifton <nickc@redhat.com>
5627 * po/sv.po: Updated Swedish translation.
5629 2002-07-30 Jakub Jelinek <jakub@redhat.com>
5631 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
5633 2002-07-30 Alan Modra <amodra@bigpond.net.au>
5635 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
5636 * archive.c (bfd_generic_archive_p): Likewise.
5637 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
5638 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
5639 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
5640 (xcoff64_archive_p): Likewise.
5641 (xcoff64_openr_next_archived_file): Likewise.
5642 (xcoff64_archive_p): Clean up tdata properly on error.
5643 * coffgen.c (coff_real_object_p): Likewise.
5644 (coff_object_p): Release filehdr and opthdr.
5645 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
5646 * ieee.c (ieee_archive_p): Likewise.
5647 * ihex.c (ihex_object_p): Likewise.
5648 (ihex_mkobject): Always allocate tdata.
5649 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
5650 * srec.c (srec_mkobject): Always allocate tdata.
5651 (srec_object_p): Clean up tdata properly on error.
5652 (symbolsrec_object_p): Likewise.
5653 * versados.c (versados_object_p): Likewise.
5654 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
5655 and bfd_realloc instead of realloc.
5656 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
5657 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
5658 place of bfd_malloc, simplifying error freeing. Free hash table too.
5659 (vms_object_p): Clean up tdata on error.
5660 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
5661 (vms_close_and_cleanup): Adjust for bfd_alloc use.
5663 2002-07-30 Alan Modra <amodra@bigpond.net.au>
5665 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
5667 2002-07-26 Chris Demetriou <cgd@broadcom.com>
5669 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
5670 flags into resulting BFD.
5672 2002-07-26 Alan Modra <amodra@bigpond.net.au>
5674 From John Reiser <jreiser@BitWagon.com>
5675 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
5676 tls_ldm_got.refcount.
5678 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5680 * elf64-mips.c: Update TODO comment.
5681 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
5682 mips_elf64_gprel16_reloca): Remove prototypes.
5683 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
5684 (UNUSED_RELOC): Replace by EMPTY_RELOC.
5685 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
5686 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
5688 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
5689 R_MIPS_GOT16. Remove wrong comments.
5690 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
5691 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
5693 (mips_elf64_hi16_reloc): Fix formatting.
5694 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
5695 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
5696 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
5697 (mips_elf64_gprel16_reloc): Make static. Add check for
5699 (mips_elf64_gprel16_reloca): Remove.
5700 (mips_elf64_literal_reloc): New function.
5701 (mips_elf64_gprel32_reloc): Fix formatting.
5702 (mips_elf64_shift6_reloc): Fix comment. Make static.
5703 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
5705 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
5707 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
5708 specific relocations.
5709 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
5710 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
5711 (ELF_MAXPAGESIZE): Add comment.
5713 2002-07-25 Nick Clifton <nickc@redhat.com>
5715 * po/sv.po: Updated Swedish translation.
5716 * po/es.po: Updated Spanish translation.
5717 * po/fr.po: Updated French translation.
5719 2002-07-25 Alan Modra <amodra@bigpond.net.au>
5721 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
5722 as elf_link_record_local_dynamic_symbol.
5723 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
5724 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
5725 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
5726 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
5727 attempt is made to record a symbol in a discarded section, and
5728 return `2' in that case.
5730 2002-07-24 Nick Clifton <nickc@redhat.com>
5732 * po/sv.po: Updated Swedish translation.
5733 * po/es.po: Updated Spanish translation.
5735 2002-07-23 Alan Modra <amodra@bigpond.net.au>
5737 * po/SRC-POTFILES.in: Regenerate.
5739 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
5740 immediately. Remove code handling relocatable linking.
5741 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
5742 * elf32-cris.c (cris_elf_relocate_section): Likewise.
5743 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
5744 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
5745 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
5746 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
5747 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
5748 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5749 * elf32-v850.c (v850_elf_relocate_section): Likewise.
5750 * elf32-vax.c (elf_vax_relocate_section): Likewise.
5751 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5752 * elf32-avr.c (elf_backend_rela_normal): Define.
5753 * elf32-cris.c: Likewise.
5754 * elf32-fr30.c: Likewise.
5755 * elf32-frv.c: Likewise.
5756 * elf32-h8300.c: Likewise.
5757 * elf32-hppa.c: Likewise.
5758 * elf32-ip2k.c: Likewise.
5759 * elf32-sparc.c: Likewise.
5760 * elf32-v850.c: Likewise.
5761 * elf32-vax.c: Likewise.
5762 * elf64-hppa.c: Likewise.
5763 * elf64-sparc.c: Likewise.
5764 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
5765 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
5766 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
5767 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
5768 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
5769 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
5770 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
5771 * elf-m10200.c (USE_RELA): Don't define.
5772 * elf-m10300.c: Likewise.
5773 * elfarm-oabi.c: Likewise.
5774 * elf32-i370.c: Likewise.
5775 * elf32-ip2k.c: Likewise.
5776 * elf32-m68k.c: Likewise.
5777 * elf32-mcore.c: Likewise.
5778 * elf32-ppc.c: Likewise.
5779 * elf32-s390.c: Likewise.
5780 * elf32-vax.c: Likewise.
5781 * elf64-ppc.c: Likewise.
5782 * elf64-s390.c: Likewise.
5783 * elf64-x86-64.c: Likewise.
5784 * elfxx-ia64.c: Likewise.
5785 * elf32-avr.c (USE_REL): Don't undef.
5786 * elf32-ip2k.c: Likewise.
5788 2002-07-23 Nick Clifton <nickc@redhat.com>
5790 * elf-bfd.h (struct elf_backend_data): Add new bitfield
5791 'want_p_paddr_set_to_zero'.
5792 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
5794 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
5795 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
5797 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
5799 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
5800 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
5801 show the Copyright string.
5802 Minor formatting tidy ups.
5804 2002-07-23 Nick Clifton <nickc@redhat.com>
5806 * po/fr.po: Updated French translation.
5807 * po/sv.po: Updated Swedish translation.
5809 2002-07-23 Alan Modra <amodra@bigpond.net.au>
5811 * elflink.h (elf_link_input_bfd): Don't change internal symbols
5812 when outputting relocs.
5814 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
5816 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
5817 DT_PLTGOT into the dynamic section if there is a PLT.
5819 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5821 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
5823 (_bfd_mips_elf_write_section): Likewise.
5824 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
5825 (_bfd_mips_elf_write_section): Likewise.
5826 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
5827 (elf32_mips_write_section): Likewise.
5828 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
5829 (_bfd_mips_elf_write_section): Likewise.
5831 2002-07-19 Alan Modra <amodra@bigpond.net.au>
5833 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
5834 PT_IA_64_UNWIND segments for a given section.
5836 2002-07-17 H.J. Lu <hjl@gnu.org>
5838 * Makefile.am: Fix a typo.
5839 * Makefile.in: Regenerate.
5841 2002-07-15 Denis Chertykov <denisc@overta.ru>
5842 Frank Ch. Eigler <fche@redhat.com>
5843 Ben Elliston <bje@redhat.com>
5844 Alan Lehotsky <alehotsky@cygnus.com>
5845 John Healy <jhealy@redhat.com>
5846 Graham Stott <grahams@redhat.com>
5847 Jeff Johnston <jjohnstn@redhat.com>
5849 * Makefile.am: Add support for ip2k.
5850 * Makefile.in: Regenerate.
5851 * doc/Makefile.in: Regenerate.
5852 * archures.c: Add support for ip2k.
5853 * config.bfd: Add support for ip2k.
5854 * configure.in: Add support for ip2k.
5855 * configure: Regenerate.
5856 * reloc.c: Add support for ip2k.
5857 * targets.c: Add support for ip2k.
5858 * bfd-in2.h: Regenerate.
5859 * libbfd.h: Regenerate.
5860 * cpu-ip2k.c: New file.
5861 * elf32-ip2k.c: New file.
5863 2002-07-17 Ian Rickards <irickard@arm.com>
5865 * dwarf2.c (concat_filename): If we can't establish the directory
5866 just return the filename.
5868 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
5870 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
5872 2002-07-16 Alan Modra <amodra@bigpond.net.au>
5874 * elflink.h: Formatting fixes, tidy prototypes.
5875 (elf_link_assign_sym_version): Move common code out of loop.
5877 2002-07-16 Alan Modra <amodra@bigpond.net.au>
5879 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
5880 reloc section size is zero. Correct reloc output location.
5882 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
5884 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
5885 the final type for the e_fsel selector when generating PA2.0W code.
5886 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
5889 2002-07-14 H.J. Lu <hjl@gnu.org>
5891 * elflink.h (elf_link_assign_sym_version): Hide the default
5892 definition if there is a hidden versioned definition.
5894 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
5896 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
5897 dynamic reference test in assertion when initializing GOT with
5898 static contents. Just assert that there are either no dynamic
5899 sections, the symbol is defined in the regular objects or that the
5900 symbol is undef weak. Tweak comment.
5901 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
5902 only if the symbol isn't defined in the program and isn't undef
5904 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
5905 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
5906 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
5907 (elf_cris_discard_excess_program_dynamics): Don't consider
5908 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
5910 2002-07-11 Alan Modra <amodra@bigpond.net.au>
5912 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
5913 unresolved debugging relocs in dynamic applications.
5914 * elf32-s390.c (elf_s390_relocate_section): Likewise.
5915 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5916 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
5917 * elf64-s390.c (elf_s390_relocate_section): Likewise.
5918 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5919 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
5921 2002-07-10 Alan Modra <amodra@bigpond.net.au>
5923 * elf64-ppc.c (ONES): Define.
5924 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
5925 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
5926 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
5928 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
5929 (ppc64_elf_set_private_flags): Delete.
5930 (ppc64_elf_section_from_shdr): Delete.
5931 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
5932 (ppc64_elf_fake_sections): Delete.
5933 (bfd_elf64_bfd_set_private_flags): Don't define.
5934 (bfd_elf64_get_symbol_info): Likewise.
5935 (elf_backend_section_from_shdr): Likewise.
5936 (elf_backend_fake_sections): Likewise.
5938 2002-07-10 Marco Walther <Marco.Walther@sun.com>
5940 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
5941 when not already set.
5942 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
5943 (elf_backend_fake_sections): Define.
5945 2002-07-10 Alan Modra <amodra@bigpond.net.au>
5947 * merge.c (_bfd_merge_section): Remove redundant output_section check.
5949 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
5951 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
5953 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
5954 NULL sym_hashes to just before use.
5955 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
5956 symbol with non-default visibility.
5957 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
5958 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
5960 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
5961 symbol with non-default visibility.
5962 (cris_elf_check_relocs): At tests for local symbol before
5963 increasing h->plt.refcount, also check for non-default
5964 visibility. Ditto when checking for local symbol to eliminate
5965 pc-relative runtime relocs.
5967 2002-07-08 Alan Modra <amodra@bigpond.net.au>
5969 * elf.c: Formatting.
5970 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
5971 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
5972 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
5975 2002-07-07 Mark Mitchell <mark@codesourcery.com>
5976 Alan Modra <amodra@bigpond.net.au>
5978 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
5979 account the impact of relocation count overflow when computing
5981 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
5982 or not to apply the PE COFF reloc overflow handling. Fix a
5983 fencepost error in deciding whether or not to use that technique.
5985 2002-07-07 Alan Modra <amodra@bigpond.net.au>
5987 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
5988 change type of locsyms.
5989 (bfd_elf_get_elf_syms): Declare.
5990 * elf.c (bfd_elf_get_elf_syms): New function.
5991 (group_signature): Use bfd_elf_get_elf_syms.
5992 (bfd_section_from_r_symndx): Likewise.
5993 * elfcode.h (elf_slurp_symbol_table): Likewise.
5994 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
5995 (elf_link_add_object_symbols): Likewise. Reorganise to increase
5996 locality of various data structures. Properly free internal relocs.
5997 (elf_bfd_final_link): Properly free internal relocs.
5998 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
5999 (elf_link_input_bfd): Likewise.
6000 (elf_gc_mark): Likewise. Properly free internal relocs.
6001 (elf_gc_sweep): Properly free internal relocs.
6002 (elf_reloc_symbol_deleted_p): No need to swap syms in.
6003 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
6005 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
6006 Properly free possibly cached info.
6007 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
6008 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
6009 symbol swapping code.
6010 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
6011 Properly free possibly cached info.
6012 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
6013 (mn10300_elf_relax_delete_bytes): Likewise.
6014 (mn10300_elf_symbol_address_p): Likewise.
6015 (mn10300_elf_get_relocated_section_contents): Likewise.
6016 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
6017 (elf32_h8_relax_delete_bytes): Likewise.
6018 (elf32_h8_symbol_address_p): Likewise.
6019 (elf32_h8_get_relocated_section_contents): Likewise.
6020 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
6021 (m32r_elf_relax_delete_bytes): Likewise.
6022 (m32r_elf_get_relocated_section_contents): Likewise.
6023 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
6024 elf_section_data to determine whether cached.
6025 (sh_elf_relax_section): As above for elf-m10200.c.
6026 (sh_elf_relax_delete_bytes): Likewise.
6027 (sh_elf_get_relocated_section_contents): Likewise.
6028 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
6029 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
6030 reading of local syms.
6031 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
6032 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
6033 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
6034 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
6036 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
6037 free internal relocs and section contents. Don't read symbols.
6038 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
6039 (elf32_hppa_size_stubs): Don't free local syms.
6040 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
6041 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
6042 possibly cached info.
6043 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
6044 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
6045 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
6047 (get_local_syms): Delete function.
6048 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
6050 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
6052 2002-07-05 Jim Wilson <wilson@redhat.com>
6054 * syms.c (decode_section_type): New.
6055 (bfd_decode_symclass): Call decode_section_type.
6057 2002-07-04 Jakub Jelinek <jakub@redhat.com>
6059 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
6060 section content start.
6061 Reported by Michael Schumacher <mike@hightec-rt.com>.
6063 2002-07-04 Alan Modra <amodra@bigpond.net.au>
6065 * section.c (_bfd_strip_section_from_output): Remove unnecessary
6066 link order code. Don't actually remove the output section here;
6067 Just set a flag for the linker to do so.
6068 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
6069 sections when setting up output section dynsyms.
6071 2002-07-04 Alan Modra <amodra@bigpond.net.au>
6073 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
6075 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
6078 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
6080 * elf64-s390.c (create_got_section): Set .got section alignment to
6082 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
6084 2002-07-02 Alan Modra <amodra@bigpond.net.au>
6086 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
6088 2002-07-01 Matt Thomas <matt@3am-software.com>
6090 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
6093 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6095 * elfxx-mips.c (ABI_64_P): Fix comment.
6096 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
6097 new section names for N64 ABI.
6098 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
6099 (mips_elf_calculate_relocation): Code formatting.
6100 (mips_elf_create_dynamic_relocation): Likewise.
6101 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
6102 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
6103 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
6105 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
6107 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
6108 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
6111 2002-07-01 Andreas Schwab <schwab@suse.de>
6113 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
6114 R_X86_64_64 to R_X86_64_RELATIVE.
6116 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
6118 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
6119 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
6121 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
6123 * configure.in (vaxbsd_vec): Add.
6124 * targets.c (vaxbsd_vec): Add.
6125 * Makefile.in: Rebuild.
6126 * configure: Rebuild.
6127 * po/SRC-POTFILES.in: Rebuild.
6129 2002-07-01 Alan Modra <amodra@bigpond.net.au>
6131 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
6132 examining to gc_mark_hook, rather than the bfd.
6133 (elf_gc_sections): Adjust.
6134 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
6135 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
6136 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
6137 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
6138 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
6139 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
6140 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
6141 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
6142 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
6143 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
6144 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
6145 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
6146 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
6147 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
6148 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
6149 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
6150 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
6151 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
6152 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
6153 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
6154 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
6155 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
6156 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
6157 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
6158 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
6159 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
6160 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
6161 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
6162 redundant local sym tests.
6163 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
6164 (link_hash_newfunc): Init is_entry.
6165 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
6166 (ppc64_elf_link_hash_table_create): Init all_local_syms.
6167 (create_linkage_sections): Use bfd_make_section_anyway rather than
6169 (ppc64_elf_mark_entry_syms): New function.
6170 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
6171 up opd entry to function section map.
6172 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
6173 relocs that reference the opd section.
6174 (edit_opd): New function.
6175 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
6176 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
6177 (get_local_syms): Do so here. Exit if we already have local syms.
6178 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
6179 read local syms on non-ELF input.
6180 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
6181 than duplicating it's function here. Adjust free of internal
6183 (ppc64_elf_relocate_section): Adjust local syms in opd section.
6184 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
6185 * elf32-hppa.c (elf32_hppa_size_stubs): Call
6186 _bfd_elf32_link_read_relocs rather than duplicating it's function
6187 here. Adjust free of internal relocs to suit.
6189 2002-07-01 Andreas Jaeger <aj@suse.de>
6191 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
6192 are not allowed in shared libs code, enforce -fPIC.
6194 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
6196 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
6197 trailing zero-sequences when there's previous left-over data.
6199 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
6201 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
6202 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
6203 and opd_rel_sec in order for starting rela section. Check _raw_size.
6204 (elf_backend_reloc_type_class): Define.
6206 2002-06-27 Kevin Buettner <kevinb@redhat.com>
6208 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
6211 2002-06-27 Alan Modra <amodra@bigpond.net.au>
6213 * cpu-powerpc.c: Comment on ordering of arch_info.
6214 * elf32-ppc.c (ppc_elf_object_p): New function.
6215 (elf_backend_object_p): Define.
6216 * elf64-ppc.c (ppc64_elf_object_p): New function.
6217 (elf_backend_object_p): Define.
6219 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
6221 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
6222 * configure: Regenerate.
6224 2002-06-25 Jason Eckhardt <jle@rice.edu>
6226 * dwarf2.c (decode_line_info): Check unit->addr_size
6227 to read in the proper number of prologue bytes.
6229 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
6231 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
6232 aix5coff64_vec if 64-bit bfd support has been enabled.
6233 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
6236 * targets.c (_bfd_target_vector[]): Only include
6237 aix5coff64_vec if 64-bit bfd support has been enabled.
6239 2002-06-25 Alan Modra <amodra@bigpond.net.au>
6241 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
6242 * elf32-hppa.c (hppa_add_stub): Likewise.
6243 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
6244 * elflink.h (elf_add_default_symbol): Fix comment typo.
6245 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
6246 (elf_link_add_object_symbols): Likewise.
6247 (elf_link_assign_sym_version): Likewise.
6248 * hash.c (bfd_hash_lookup): Likewise.
6249 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
6250 * section.c (bfd_get_unique_section_name): Likewise.
6251 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
6252 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
6253 (assign_section_numbers): Likewise.
6254 (_bfd_elfcore_make_pseudosection): Likewise.
6255 (elfcore_grok_lwpstatus): Likewise.
6256 (elfcore_grok_win32pstatus): Likewise.
6257 (elfcore_write_note): Constify input params. Use PTR instead of
6258 void *. Include terminating NUL in namesz. Correct padding.
6259 Support NULL "name" param. Use memcpy instead of strcpy.
6260 (elfcore_write_prpsinfo): Constify input params.
6261 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
6262 (elfcore_write_lwpstatus): Likewise.
6263 (elfcore_write_pstatus): Likewise.
6264 (elfcore_write_prfpreg): Likewise.
6265 (elfcore_write_prxfpreg): Likewise.
6266 * elf-bfd.h (elfcore_write_note): Update declaration.
6267 (elfcore_write_prpsinfo): Likewise.
6268 (elfcore_write_prstatus): Likewise.
6269 (elfcore_write_pstatus): Likewise.
6270 (elfcore_write_prfpreg): Likewise.
6271 (elfcore_write_prxfpreg): Likewise.
6272 (elfcore_write_lwpstatus): Likewise.
6274 2002-06-25 Jason Eckhardt <jle@rice.edu>
6276 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
6277 symbols of type stProc and stStaticProc.
6279 2002-06-25 Nick Clifton <nickc@redhat.com>
6281 * ecoff.c: VArious formatting fixes.
6283 2002-06-25 Alan Modra <amodra@bigpond.net.au>
6285 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
6287 2002-06-25 Alan Modra <amodra@bigpond.net.au>
6289 * aout-adobe.c: Don't compare against "true" or "false.
6290 * aout-target.h: Likewise.
6291 * aoutx.h: Likewise.
6292 * archive.c: Likewise.
6294 * cache.c: Likewise.
6295 * coff-a29k.c: Likewise.
6296 * coff-alpha.c: Likewise.
6297 * coff-i386.c: Likewise.
6298 * coff-mips.c: Likewise.
6299 * coff-or32.c: Likewise.
6300 * coff64-rs6000.c: Likewise.
6301 * coffcode.h: Likewise.
6302 * coffgen.c: Likewise.
6303 * cpu-ns32k.c: Likewise.
6304 * ecoff.c: Likewise.
6305 * ecofflink.c: Likewise.
6307 * elf32-arm.h: Likewise.
6308 * elf32-cris.c: Likewise.
6309 * elf32-d30v.c: Likewise.
6310 * elf32-i386.c: Likewise.
6311 * elf32-mcore.c: Likewise.
6312 * elf32-ppc.c: Likewise.
6313 * elf32-sh.c: Likewise.
6314 * elf32-sh64.c: Likewise.
6315 * elf32-v850.c: Likewise.
6316 * elf64-alpha.c: Likewise.
6317 * elf64-sh64.c: Likewise.
6318 * elfcode.h: Likewise.
6319 * elfcore.h: Likewise.
6320 * elflink.h: Likewise.
6321 * elfxx-mips.c: Likewise.
6322 * i386os9k.c: Likewise.
6324 * libbfd.c: Likewise.
6325 * linker.c: Likewise.
6327 * nlm32-alpha.c: Likewise.
6328 * nlm32-i386.c: Likewise.
6329 * nlm32-ppc.c: Likewise.
6330 * nlm32-sparc.c: Likewise.
6331 * nlmcode.h: Likewise.
6332 * oasys.c: Likewise.
6333 * pdp11.c: Likewise.
6334 * peicode.h: Likewise.
6335 * reloc.c: Likewise.
6338 * tekhex.c: Likewise.
6340 * xcofflink.c: Likewise.
6341 * elf64-sparc.c: Edit comment to not use "== false".
6343 * aoutf1.h: Don't use "? true : false".
6344 * ecoff.c: Likewise.
6345 * format.c: Likewise.
6347 * linker.c: Likewise.
6349 * oasys.c: Likewise.
6351 2002-06-23 H.J. Lu <hjl@gnu.org>
6353 * elflink.h (elf_link_add_archive_symbols): For the default
6354 version, check references with only one `@' first.
6356 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
6358 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
6360 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
6362 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
6363 (elf64_hppa_size_dynamic_sections): Revise to use
6364 elf64_hppa_mark_milli_and_exported_functions.
6365 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
6366 symbols out of dynamic symbol table.
6368 2002-06-23 Alan Modra <amodra@bigpond.net.au>
6370 * Makefile.in: Regenerate.
6371 * libbfd.h: Regenerate.
6372 * bfd-in2.h: Regenerate.
6373 * configure: Regenerate.
6374 * po/SRC-POTFILES.in: Regenerate.
6376 * elflink.h: Comment typo fixes.
6378 2002-06-23 H.J. Lu <hjl@gnu.org>
6380 * elf-bfd.h (elf_link_loaded_list): New structure.
6381 (elf_link_hash_table): Add "loaded".
6382 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
6383 * elflink.h (elf_link_check_versioned_symbol): New function.
6384 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
6386 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
6388 * elflink.h (size_dynamic_sections): If the target does not
6389 support an ELF style hash table, return true, indicating that
6390 nothing needed to be done, rather than false, indicating that the
6391 section's size could not be computed.
6393 2002-06-18 Dave Brolley <brolley@redhat.com>
6395 From Catherine Moore, Michael Meissner, Dave Brolley:
6396 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
6397 * targets.c: Support bfd_elf32_frv_vec.
6398 * reloc.c: Add FRV relocs.
6399 * configure.in: Add support for bfd-elf32-frv-vec.
6400 * config.bfd (targ_cpu): Add support for frv-*-elf.
6401 * archures.c: Add frv arch and machines.
6402 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
6403 (ALL_MACHINES_CFILES): Add cpu-frv.c.
6404 (BFD32_BACKENDS): Add elf32-frv.lo.
6405 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
6406 (cpu-frv.lo): New target.
6407 (elf32-frv.lo): New target.
6408 * cpu-frv.c: New file.
6409 * elf32-frv.c: New file.
6411 2002-06-18 Jakub Jelinek <jakub@redhat.com>
6413 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
6415 Only read the first section header if e_shoff is non-zero.
6416 Don't consider e_shstrndx if there are no sections.
6418 2002-06-17 Tom Rix <trix@redhat.com>
6420 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
6421 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
6422 complain_overflow_bitfield.
6424 2002-06-17 Alan Modra <amodra@bigpond.net.au>
6426 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
6427 (bfd_fdopenr): Likewise.
6428 (bfd_openstreamr): Likewise.
6429 (bfd_openw): Likewise.
6431 * targets.c: Sort target vecs.
6432 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
6433 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
6434 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
6435 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
6436 * configure.in: Sort target vecs. Add m88kmach3_vec.
6437 * configure: Regenerate.
6439 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
6441 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
6442 bpo_reloc_no to break sort order ties, not address of items.
6444 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
6446 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
6447 Skip excluded sections in determing __gp value.
6448 (elf_hppa_final_link_relocate): Use the symbol's address in
6449 R_PARISC_FPTR64 relocations that don't need an opd entry.
6450 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
6451 (elf64_hppa_finalize_dynreloc): Likewise.
6452 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
6453 (elf64_hppa_finish_dynamic_symbol): Break up assert.
6455 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
6457 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
6458 alignment for .bss, .data and .text sections so that sse and sse2
6460 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
6462 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
6464 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
6467 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
6469 * elflink.h (elf_bfd_final_link): Improve error handling for missing
6472 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
6473 for a symbol that has no output section.
6474 (allocate_dynrel_entries): Correct comment.
6475 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
6477 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
6478 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
6479 with no section. Remove unnecessary parentheses.
6481 2002-06-11 Tom Rix <trix@redhat.com>
6483 * coffcode.h (coff_compute_section_file_positions): Add data
6484 section to AIX loader alignment check.
6486 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
6487 alignment to 4 bytes.
6488 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
6489 power accessor macro.
6490 (do_shared_object_padding): Remove invalid assertion.
6492 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
6494 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
6495 for removed output sections.
6497 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
6499 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
6501 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
6503 2002-06-08 H.J. Lu <hjl@gnu.org>
6505 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
6506 work around a long long bug in gcc 2.96 on mips.
6508 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
6510 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
6511 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
6512 Regenerate dependency lists.
6513 * Makefile.in: Regenerate.
6514 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
6515 vax1knetbsd_vec to targ_selvecs.
6516 * configure.in: Add vax1knetbsd_vec.
6517 * configure: Regenerate.
6518 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
6519 * vax1knetbsd.c: New file.
6520 * vaxnetbsd.c: Update copyright years.
6521 (TARGET_PAGE_SIZE): Set to 0x1000.
6522 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
6524 2002-06-08 Matt Thomas <matt@3am-software.com>
6526 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
6528 2002-06-08 Alan Modra <amodra@bigpond.net.au>
6530 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
6532 2002-06-08 Alan Modra <amodra@bigpond.net.au>
6534 * Makefile.am: Run "make dep-am".
6535 * Makefile.in: Regenerate.
6537 * armnetbsd.c: Replace CONST with const.
6538 * corefile.c: Likewise.
6539 * elf32-dlx.c: Likewise.
6540 * elf64-mips.c: Likewise.
6542 * ns32knetbsd.c: Likewise.
6544 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
6545 table is elf64-sparc.
6547 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6549 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
6550 Fix RELA addends to get not shifted in the result. Don't do special
6551 handling of R_MIPS_64 for NewABI.
6553 2002-06-07 Alan Modra <amodra@bigpond.net.au>
6555 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
6556 (NAME(aout,slurp_reloc_table)): Likewise.
6557 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
6558 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
6559 (xcoff_write_archive_contents_big): Likewise.
6560 (xcoff_generate_rtinit): Likewise.
6561 (xcoff_generate_rtinit): Likewise, and check error return.
6562 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6563 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
6564 (coff_get_normalized_symtab): Likewise.
6565 (coff_make_empty_symbol): Likewise.
6566 (bfd_coff_set_symbol_class): Likewise.
6567 * cofflink.c (coff_link_add_symbols): Likewise.
6568 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
6569 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
6570 (bfd_ecoff_write_accumulated_debug): Likewise.
6571 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
6572 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
6573 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
6574 * ieee.c (do_with_relocs): Use bfd_zalloc.
6575 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
6576 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
6577 (NAME(aout,slurp_reloc_table)): Likewise.
6578 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
6579 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
6580 * som.c (som_build_and_write_symbol_table): Likewise.
6581 (som_slurp_string_table): Likewise.
6582 (som_slurp_symbol_table): Likewise.
6583 (som_bfd_ar_write_symbol_stuff): Likewise.
6584 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
6585 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
6586 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
6587 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
6588 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
6590 2002-06-07 Alan Modra <amodra@bigpond.net.au>
6592 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
6594 (elf_group_name): Update.
6595 (elf_group_id): Define.
6596 (bfd_elf_set_group_contents): Declare.
6597 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
6598 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
6599 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
6600 that sym for the signature.
6601 (_bfd_elf_compute_section_file_positions): Don't call
6602 set_group_contents for "ld -r" case.
6603 (swap_out_syms): Use bfd_zalloc.
6604 * elflink.h (elf_link_add_archive_symbols): Likewise.
6605 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
6606 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
6608 2002-06-07 Alan Modra <amodra@bigpond.net.au>
6610 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
6611 relocs in opd for non-shared too.
6613 2002-06-06 Jeffrey Law <law@redhat.com>
6615 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
6618 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
6620 * merge.c: Include libiberty.h.
6621 * elf-strtab.c: Include libiberty.h.
6623 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
6625 * peXXigen.c (pe_print_idata): Remove unused variable.
6627 2002-06-06 David Heine <dlheine@tensilica.com>
6629 * elf.c (assign_file_positions_for_segments): Remove unallocated
6630 sections from the section to segment mapping for PT_LOAD segments.
6631 Update comment about empty loadable segments.
6633 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
6635 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
6636 is within the .stabstr section.
6638 2002-06-06 Alan Modra <amodra@bigpond.net.au>
6640 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
6641 are "const PTR", not "const PTR *".
6642 (bfd_elf32_swap_symbol_in): Likewise.
6643 (bfd_elf64_swap_symbol_in): Likewise.
6644 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
6645 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
6646 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
6647 (elf_link_add_object_symbols): Likewise.
6648 (elf_link_record_local_dynamic_symbol): Likewise.
6649 (elf_link_input_bfd): Likewise.
6650 (elf_gc_mark): Likewise.
6651 (elf_reloc_symbol_deleted_p): Likewise.
6652 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
6653 (mn10200_elf_relax_delete_bytes): Likewise.
6654 (mn10200_elf_symbol_address_p): Likewise.
6655 (mn10200_elf_get_relocated_section_contents): Likewise.
6656 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
6657 (mn10300_elf_relax_section): Likewise.
6658 (mn10300_elf_relax_delete_bytes): Likewise.
6659 (mn10300_elf_symbol_address_p): Likewise.
6660 (mn10300_elf_get_relocated_section_contents): Likewise.
6661 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
6662 (elf32_h8_relax_delete_bytes): Likewise.
6663 (elf32_h8_symbol_address_p): Likewise.
6664 (elf32_h8_get_relocated_section_contents): Likewise.
6665 * elf32-hppa.c (get_local_syms): Likewise.
6666 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
6667 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
6668 * elf32-sh.c (sh_elf_relax_section): Likewise.
6669 (sh_elf_relax_delete_bytes): Likewise.
6670 (sh_elf_get_relocated_section_contents): Likewise.
6671 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
6672 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
6673 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
6674 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
6675 * elf64-ppc.c (get_local_syms): Likewise.
6676 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
6677 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
6679 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
6681 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
6683 2002-06-05 Alan Modra <amodra@bigpond.net.au>
6685 * elf.c (group_signature): Swap in the whole symbol, and handle
6686 extracting section symbol names.
6687 (setup_group): Add comment.
6688 (set_group_contents): When called from objcopy or ld, arrange for
6689 section contents to be written. Write group member output section
6690 indices to allow objcopy to reorganize sections.
6691 (_bfd_elf_copy_private_section_data): Copy group info.
6693 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
6694 (bfd_elf32_swap_symbol_in): Update prototype.
6695 (bfd_elf64_swap_symbol_in): Likewise.
6696 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
6697 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
6698 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
6699 (elf_link_add_object_symbols): Likewise.
6700 (elf_link_record_local_dynamic_symbol): Likewise.
6701 (elf_link_input_bfd): Likewise.
6702 (elf_gc_mark): Likewise.
6703 (elf_reloc_symbol_deleted_p): Likewise.
6704 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
6705 (mn10200_elf_relax_delete_bytes): Likewise.
6706 (mn10200_elf_symbol_address_p): Likewise.
6707 (mn10200_elf_get_relocated_section_contents): Likewise.
6708 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
6709 (mn10300_elf_relax_section): Likewise.
6710 (mn10300_elf_relax_delete_bytes): Likewise.
6711 (mn10300_elf_symbol_address_p): Likewise.
6712 (mn10300_elf_get_relocated_section_contents): Likewise.
6713 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
6714 (elf32_h8_relax_delete_bytes): Likewise.
6715 (elf32_h8_symbol_address_p): Likewise.
6716 (elf32_h8_get_relocated_section_contents): Likewise.
6717 * elf32-hppa.c (get_local_syms): Likewise.
6718 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
6719 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
6720 * elf32-sh.c (sh_elf_relax_section): Likewise.
6721 (sh_elf_relax_delete_bytes): Likewise.
6722 (sh_elf_get_relocated_section_contents): Likewise.
6723 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
6724 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
6725 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
6726 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
6727 * elf64-ppc.c (get_local_syms): Likewise.
6728 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
6729 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
6730 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
6731 * elf64-alpha.c (alpha_elf_size_info): Likewise.
6732 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
6733 * elf64-mips.c (mips_elf64_size_info): Likewise.
6734 * elf64-s390.c (s390_elf64_size_info): Likewise.
6735 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
6737 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6739 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
6740 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
6741 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
6742 _bfd_mips_elf_ignore_discarded_relocs.
6743 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
6745 2002-06-05 H.J. Lu <hjl@gnu.org>
6747 * elfxx-mips.c (mips_elf_calculate_relocation): Call
6748 _bfd_elf_rel_local_sym for STT_SECTION relocations against
6749 the SEC_MERGE section.
6751 2002-06-05 Alan Modra <amodra@bigpond.net.au>
6753 * coff-alpha.c: Update copyright date.
6754 * coff-mips.c: Likewise.
6755 * xcoff-target.h: Likewise.
6757 * bfd-in.h: Remove "taken from the source" comment.
6758 * libbfd-in.h: Likewise.
6759 * libcoff-in.h: Likewise.
6760 * bfd-in2.h: Regenerate.
6761 * libbfd.h: Regenerate.
6762 * libcoff.h: Regenerate.
6764 * elf.c (bfd_elf_discard_group): Return true.
6765 * elf-bfd.h (bfd_elf_discard_group): Declare.
6766 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
6767 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
6768 * bfd.c (bfd_discard_group): Define.
6769 * targets.c (struct bfd_target): Add _bfd_discard_group.
6770 (BFD_JUMP_TABLE_LINK): Here too.
6771 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
6772 * aout-adobe.c (aout_32_bfd_discard_group): Define.
6773 * aout-target.h (MY_bfd_discard_group): Define.
6774 * aout-tic30.c (MY_bfd_discard_group): Define.
6775 * binary.c (binary_bfd_discard_group): Define.
6776 * bout.c (b_out_bfd_discard_group): Define.
6777 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
6778 * coffcode.h (coff_bfd_discard_group): Define.
6779 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
6780 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
6781 * i386msdos.c (msdos_bfd_discard_group): Define.
6782 * i386os9k.c (os9k_bfd_discard_group): Define.
6783 * ieee.c (ieee_bfd_discard_group): Define.
6784 * ihex.c (ihex_bfd_discard_group): Define.
6785 * mmo.c (mmo_bfd_discard_group): Define.
6786 * nlm-target.h (nlm_bfd_discard_group): Define.
6787 * oasys.c (oasys_bfd_discard_group): Define.
6788 * ppcboot.c (ppcboot_bfd_discard_group): Define.
6789 * som.c (som_bfd_discard_group): Define.
6790 * srec.c (srec_bfd_discard_group): Define.
6791 * tekhex.c (tekhex_bfd_discard_group): Define.
6792 * versados.c (versados_bfd_discard_group): Define.
6793 * vms.c (vms_bfd_discard_group): Define.
6794 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
6795 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
6796 (aix5coff64_vec): Likewise.
6797 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
6799 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
6801 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
6802 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
6803 (elf32-sh64-com.lo): New dependency list.
6804 * Makefile.in: Regenerate.
6805 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
6806 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
6808 * configure: Regenerate.
6809 * elf32-sh64.c (sh64_address_in_cranges)
6810 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
6811 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
6812 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
6813 * elf32-sh64-com.c: ...here. New file.
6815 2002-06-04 Alan Modra <amodra@bigpond.net.au>
6817 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
6818 ATTRIBUTE_UNUSED on used params.
6819 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
6820 before calling bfd_section_from_elf_index on local syms.
6821 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
6823 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
6825 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
6826 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
6827 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
6828 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
6829 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
6830 * Makefile.in: Regenerate.
6831 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
6832 (sh64-*-netbsd*): New targets.
6833 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
6834 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
6835 * configure: Regenerate.
6836 * elf32-sh64-nbsd.c: New file.
6837 * elf64-sh64-nbsd.c: New file.
6838 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
6839 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
6840 bfd_elf64_sh64lnbsd_vec.
6842 2002-06-04 Alan Modra <amodra@bigpond.net.au>
6844 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
6845 (bfd_section_from_shdr): Likewise. Set section name of group
6846 sections from signature.
6847 (group_signature): Split out from setup_group. Ensure symbol table
6849 (bfd_elf_discard_group): New function.
6850 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
6851 .gnu.linkonce* sections if they are members of a group.
6852 (set_group_contents): Set GRP_COMDAT flag.
6853 * section.c (bfd_discard_group): New function.
6854 * bfd-in.h (bfd_elf_discard_group): Declare.
6855 * bfd-in2.h: Regenerate.
6856 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
6857 (elf_linkonce_p): Define.
6859 2002-06-04 Alan Modra <amodra@bigpond.net.au>
6861 * elf.c (bfd_section_from_shdr): Make "name" const.
6862 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
6863 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
6864 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
6865 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
6866 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
6867 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
6868 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
6869 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
6870 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
6871 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
6872 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
6874 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6876 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
6879 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
6881 * elf32-arc.c: Fix formatting.
6882 * elf32-arm.h: Likewise.
6883 * elf32-cris.c: Likewise.
6884 * elf32-dlx.c: Likewise.
6885 * elf32-hppa.c: Likewise.
6886 * elf32-i386.c: Likewise.
6887 * elf32-i386qnx.c: Likewise.
6888 * elf32-or32.c: Likewise.
6889 * elf32-s390.c: Likewise.
6890 * elf32-sh64.c: Likewise.
6891 * elf32-vax.c: Likewise.
6892 * elf32-xstormy16.c: Likewise.
6893 * elf64-alpha.c: Likewise.
6894 * elf64-mmix.c: Likewise.
6895 * elf64-ppc.c: Likewise.
6896 * elf64-s390.c: Likewise.
6897 * elf64-sh64.c: Likewise.
6898 * elf64-x86-64.c: Likewise.
6900 2002-06-02 Richard Henderson <rth@redhat.com>
6902 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
6903 null when there are no got entries for a symbol.
6904 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
6905 uninitialized variable warning.
6907 2002-06-01 Richard Henderson <rth@redhat.com>
6909 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
6910 undefined symbols here.
6911 (elf64_alpha_relax_section): Do it here. Also test for not
6912 defined in the current module.
6913 (elf64_alpha_relocate_section_r): Split out of ...
6914 (elf64_alpha_relocate_section): ... here. Don't dereference
6915 NULL when looking up local got entries.
6917 2002-06-01 Richard Henderson <rth@redhat.com>
6919 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
6920 symbols from JSR relaxation.
6921 (elf64_alpha_size_plt_section_1): New.
6922 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
6923 (elf64_alpha_size_rela_got_1): ... here.
6924 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
6925 (elf64_alpha_size_rela_got_section): ... here.
6926 (elf64_alpha_size_plt_section): New.
6927 (elf64_alpha_relax_section): Call them.
6928 (elf64_alpha_size_got_sections): Remove output_bfd arg.
6929 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
6931 2002-06-01 Richard Henderson <rth@redhat.com>
6933 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
6934 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
6935 in shared libraries. Fix DTPRELHI and TPRELHI value.
6936 (INSN_ADDQ, INSN_RDUNIQ): New.
6937 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
6938 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
6939 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
6940 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
6941 Handle GOTDTPREL and GOTTPREL relocations.
6942 (elf64_alpha_relax_gprelhilo): New.
6943 (elf64_alpha_relax_tls_get_addr): New.
6944 (elf64_alpha_relax_find_tls_segment): New.
6945 (elf64_alpha_relax_section): Handle TLS relocations.
6946 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
6947 (elf64_alpha_check_relocs): Set it.
6949 2002-06-01 Richard Henderson <rth@redhat.com>
6951 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
6953 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
6954 check; don't suppress dynamic relocs for non-allocated sections.
6956 * elf64-alpha.c: Remove dead code.
6958 2002-05-31 Alan Modra <amodra@bigpond.net.au>
6960 * bfd-in2.h: Regenerate.
6961 * libbfd.h: Regenerate.
6962 * po/SRC-POTFILES.in: Regenerate.
6964 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
6967 2002-05-31 Graeme Peterson <gp@qnx.com>
6969 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
6970 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
6972 * Makefile.in: Regenerate.
6973 * config.bfd: Add i[3456]86-*-nto-qnx* support.
6974 * configure.in: Add bfd_elf32_i386qnx_vec support.
6975 * configure: Regenerate.
6976 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
6977 is_contained_by_filepos, and copy_private_bfd_data_p.
6978 * elf.c (assign_file_positions_for_segments): Call backend
6979 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
6980 (IS_CONTAINED_BY_FILEPOS): Define.
6981 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
6982 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
6983 Fix non-K&R call to _bfd_error_handler.
6984 (_bfd_elf_copy_private_section_data): Use backend
6985 copy_private_bfd_data_p.
6986 * elf32-i386.c: Don't include elfxx-target.h when
6987 ELF32_I386_C_INCLUDED is defined.
6988 * elf32-i386qnx.c: New QNX elf backend file.
6989 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
6990 elf_backend_is_contained_by_filepos, and
6991 elf_backend_do_copy_private_bfd_data.
6992 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
6994 2002-05-31 Alan Modra <amodra@bigpond.net.au>
6996 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
6997 Move other similar defines to start of file.
6999 2002-05-30 Tom Rix <trix@redhat.com>
7001 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
7002 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
7004 2002-05-30 Richard Henderson <rth@redhat.com>
7006 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
7007 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
7008 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
7009 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
7010 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
7011 (struct alpha_elf_obj_tdata): Rename total_got_entries and
7012 n_local_got_entries to total_got_size and local_got_size.
7013 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
7014 (alpha_got_entry_size): New.
7015 (elf64_alpha_relax_with_lituse): Use it.
7016 (elf64_alpha_relax_without_lituse): Likewise.
7017 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
7018 (get_got_entry): New.
7019 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
7020 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
7021 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
7022 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
7023 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
7024 (elf64_alpha_calc_got_offsets): Likewise.
7025 (alpha_dynamic_entries_for_reloc): New.
7026 (elf64_alpha_calc_dynrel_sizes): Use it.
7027 (elf64_alpha_size_dynamic_sections): Likewise.
7028 (elf64_alpha_relocate_section): Handle TLS relocations.
7029 * reloc.c: Add Alpha TLS relocations.
7030 * bfd-in2.h, libbfd.h: Rebuild.
7032 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
7034 * peXXigen.c (pe_print_idata): Remove double printed
7035 import table lines; add Bound-To comment.
7037 2002-05-29 Matt Thomas <matt@3am-software.com>
7039 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
7040 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
7041 (elf32-vax.lo): New rule.
7042 * Makefile.in: Regenerate.
7043 * configure.in (bfd_elf32_vax_vec)
7044 (vaxnetbsd_vec): New vectors.
7045 * configure: Regenerate.
7046 * config.bfd (vax-*-netbsdelf*)
7048 (vax-*-netbsd*): New targets.
7049 * elf32-vax.c: New file.
7050 * reloc.c: Add VAX relocations.
7051 * bfd-in2.h: Regenerate.
7052 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
7054 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
7056 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
7057 and bfd_elf32_bigarm_vec to targ_selvecs.
7059 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
7061 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
7062 with auto-imported symbols.
7064 2002-05-29 Adam Nemet <anemet@lnxw.com>
7066 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
7067 sections only record bfd.
7068 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
7069 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
7070 * bfd-in2.h: Regenerate.
7072 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
7074 * syms.c (_bfd_stab_section_find_nearest_line): Move
7075 declaration and initialisation of saw_line and saw_func out of
7078 2002-05-29 Alan Modra <amodra@bigpond.net.au>
7080 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
7081 (bfd_elf64_get_symbol_info): Define.
7082 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
7084 2002-05-29 Andrey Volkov <avolkov@transas.com>
7086 * cpu-h8300.c: Make default h8300 machine first in machine list.
7088 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
7090 * config.bfd: Added DLX configuraton.
7091 * Makefile.am: Added DLX configuraton.
7092 * configure.in: Added DLX configuraton.
7093 * archures.c: Add DLX architecure.
7094 * reloc.c: Add DLX relocs.
7095 * targets.c: Added DLX target vector.
7096 * configure: Regenerate.
7097 * Makefile.in: Regenreate.
7098 * bfd-in2.h: Regenreate.
7099 * elf32-dlx.c: New file: Support DLX target.
7100 * cpu-dlx.c: New file: Support DLX target.
7102 2002-05-25 Alan Modra <amodra@bigpond.net.au>
7104 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
7106 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
7107 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
7108 strings to point inside function code sym string.
7109 (func_desc_adjust): Likewise.
7110 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
7112 2002-05-24 Michal Ludvig <mludvig@suse.cz>
7114 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
7115 (elf64_x86_64_grok_psinfo): Added.
7117 2002-05-24 TAMURA Kent <kent@netbsd.org>
7119 * config.bfd: Add a target for i386-netbsdpe.
7121 2002-05-24 Alan Modra <amodra@bigpond.net.au>
7123 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
7124 and is_func_descriptor.
7125 (func_desc_adjust): Hide function code sym in shared libs unless
7126 there is a matching exported function descriptor sym.
7128 2002-05-23 Jakub Jelinek <jakub@redhat.com>
7130 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
7131 for symbols from SHF_TLS section.
7132 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
7133 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
7134 (map_sections_to_segments): Build PT_TLS segment if necessary.
7135 (assign_file_positions_for_segments): Likewise.
7136 (get_program_header_size): Account for PT_TLS segment.
7137 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
7138 SEC_THREAD_LOCAL sections to STT_TLS.
7139 * reloc.c: Add 386 and IA-64 TLS relocs.
7140 * section.c (SEC_THREAD_LOCAL): Define.
7141 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
7143 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
7144 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
7146 (struct elf_final_link_info): Add first_tls_sec.
7147 (elf_bfd_final_link): Set first_tls_sec.
7148 Compute elf_hash_table (info)->tls_segment.
7149 (elf_link_output_extsym): Handle STT_TLS symbols.
7150 (elf_link_input_bfd): Likewise.
7151 * syms.c (BSF_THREAD_LOCAL): Define.
7152 * bfd-in2.h: Rebuilt.
7153 * libbfd.h: Rebuilt.
7154 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
7155 elf_i386_mkobject, elf_i386_object_p): New functions.
7156 (elf_howto_table): Add TLS relocs.
7157 (elf_i386_reloc_type_lookup): Support TLS relocs.
7158 (elf_i386_info_to_howto_rel): Likewise.
7159 (struct elf_i386_link_hash_entry): Add tls_type.
7160 (struct elf_i386_obj_tdata): New.
7161 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
7163 (struct elf_i386_link_hash_table): Add tls_ldm_got.
7164 (link_hash_newfunc): Clear tls_type.
7165 (elf_i386_check_relocs): Support TLS relocs.
7166 (elf_i386_gc_sweep_hook): Likewise.
7167 (allocate_dynrelocs): Likewise.
7168 (elf_i386_size_dynamic_sections): Likewise.
7169 (elf_i386_relocate_section): Likewise.
7170 (elf_i386_finish_dynamic_symbol): Likewise.
7171 (bfd_elf32_mkobject, elf_backend_object_p): Define.
7172 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
7173 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
7174 want_tprel, want_dtpmod, want_dtprel.
7175 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
7176 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
7177 R_IA64_LTOFF_TPREL22.
7178 (elf_code_to_howto_index): Add TLS relocs.
7179 (elfNN_ia64_check_relocs): Support TLS relocs.
7180 (allocate_global_data_got): Account for TLS .got data.
7181 (allocate_dynrel_entries): Account for TLS dynamic relocations.
7182 (elfNN_ia64_install_value): Supprt TLS relocs.
7183 (set_got_entry): Support TLS relocs.
7184 (elfNN_ia64_relocate_section): Likewise.
7186 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
7188 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
7189 BLX reloc round the relocation up rather than down.
7190 * coff-arm.c (coff_arm_relocate_section): Likewise.
7192 2002-05-21 H.J. Lu (hjl@gnu.org)
7194 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
7197 2002-05-22 Alan Modra <amodra@bigpond.net.au>
7199 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
7200 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
7202 2002-05-22 Alan Modra <amodra@bigpond.net.au>
7204 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
7206 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
7208 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7210 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
7213 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7215 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
7217 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
7218 return with false on error.
7219 (elf_link_input_bfd): Check reloc_emitter return value.
7221 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
7223 * config.bfd (armeb-*-netbsdelf*): New target.
7225 2002-05-20 Alan Modra <amodra@bigpond.net.au>
7227 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
7228 at the plt call stub.
7230 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7232 * cpu-mips.c (mips_compatible): Don't try to check machine
7235 2002-05-18 Tom Rix <trix@redhat.com>
7237 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
7239 2002-05-17 Alan Modra <amodra@bigpond.net.au>
7241 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
7242 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
7243 we've already warned about an undefined symbol. Report more
7244 detail on reloc errors.
7246 2002-05-17 Alan Modra <amodra@bigpond.net.au>
7248 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
7249 * configure.in: Invoke AM_INSTALL_LIBBFD.
7250 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
7251 (install_libbfd): .. New target.
7252 (uninstall_libbfd): Likewise.
7253 (install-bfdlibLTLIBRARIES): Likewise.
7254 (uninstall-bfdlibLTLIBRARIES): Likewise.
7256 (bfdincludedir): New.
7257 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
7258 * aclocal.m4: Regenerate.
7259 * configure: Regenerate.
7260 * Makefile.in: Regenerate.
7262 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
7264 * hash.c (bfd_hash_lookup): Remove computation of len from inside
7267 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
7269 * config.bfd: Add targets for sh64-linux (little endian and
7272 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
7274 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
7275 is located in the same section as the import table. Instead
7276 check, and if necessary load the section containing the thunk.
7278 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
7280 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
7282 (xcoff64_core_file_matches_executable_p): Replace bfd_read
7285 2002-05-15 Alan Modra <amodra@bigpond.net.au>
7287 * aix5ppc-core.c: Warning fixes.
7288 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
7289 * aout-target.h (MY_bfd_link_just_syms): Define.
7290 * aout-tic30.c (MY_bfd_link_just_syms): Define.
7291 * bfd.c (bfd_link_just_syms): Define.
7292 * binary.c (binary_bfd_link_just_syms): Define.
7293 * bout.c (b_out_bfd_link_just_syms): Define.
7294 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
7295 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
7296 * coffcode.h (coff_bfd_link_just_syms): Define.
7297 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
7298 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
7299 (_bfd_elf_link_just_syms): Declare.
7300 * elf.c (_bfd_elf_link_just_syms): New function.
7301 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
7302 sections haven't already been discarded by the linker.
7303 * elflink.h (elf_link_add_object_symbols): Likewise for stab
7304 sections and SEC_MERGE sections.
7305 (elf_bfd_discard_info): Similarly here.
7306 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
7307 * i386msdos.c (msdos_bfd_link_just_syms): Define.
7308 * i386os9k.c (os9k_bfd_link_just_syms): Define.
7309 * ieee.c (ieee_bfd_link_just_syms): Define.
7310 * ihex.c (ihex_bfd_link_just_syms): Define.
7311 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
7312 (_bfd_generic_link_just_syms): Declare.
7313 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
7314 * linker.c (_bfd_generic_link_just_syms): New function.
7315 * mmo.c (mmo_bfd_link_just_syms): Define.
7316 * nlm-target.h (nlm_bfd_link_just_syms): Define.
7317 * oasys.c (oasys_bfd_link_just_syms): Define.
7318 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
7319 * som.c (som_bfd_link_just_syms): Define.
7320 * srec.c (srec_bfd_link_just_syms): Define.
7321 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
7322 (BFD_JUMP_TABLE_LINK): And here.
7323 * tekhex.c (tekhex_bfd_link_just_syms): Define.
7324 * versados.c (versados_bfd_link_just_syms): Define.
7325 * vms.c (vms_bfd_link_just_syms): Define.
7326 * libbfd.h: Regenerate.
7327 * bfd-in2.h: Regenerate.
7329 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7331 * elf32-mips.c: Remove superfluous definitions copied from
7333 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
7334 SGIish vectors to check the special case.
7335 (mips_elf_hi16_reloc): Fix comment.
7336 (mips_elf_got16_reloc): Likewise.
7337 (_bfd_mips_elf32_gprel16_reloc): Likewise.
7338 (elf_reloc_map): Code cleanup.
7339 (mips_reloc_map): Add comment.
7340 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
7341 (mips_elf32_rtype_to_howto): Likewise.
7342 (mips_elf32_discard_info): Likewise.
7343 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
7344 lead to IRIX compatibility now.
7346 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7348 * elfxx-mips.c: Call it IRIX, not Irix in comments.
7350 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
7352 * config.bfd (shle-*-netbsdelf*): Add target which includes
7355 2002-05-13 David Edelsohn <edelsohn@gnu.org>
7357 * configure.in: Revert 2002-04-07. Instead, auto-configure
7359 * configure: Regenerate.
7360 * config.in: Regenerate.
7361 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
7364 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
7366 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
7368 * configure: Regenerate.
7370 2002-05-13 Alan Modra <amodra@bigpond.net.au>
7372 * Makefile.am (install-data-local): Install headers to
7373 $(exec_prefix)/include.
7374 * Makefile.in: Regenerate.
7376 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
7377 Daniel Jacobowitz <drow@mvista.com>
7379 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
7382 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
7384 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
7385 hppa*-*-openbsd*): New targets.
7386 * configure.in (alpha*-*-openbsd*): Set COREFILE.
7387 * configure: Regenerate.
7389 2002-05-10 Tom Rix <trix@redhat.com>
7391 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
7392 xcoff64_ppc_relocate_section.
7393 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
7394 * libxcoff.h: Common xcoff_reloc_type function declaration.
7396 2002-05-10 Alan Modra <amodra@bigpond.net.au>
7398 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
7399 added in 2002-05-09 commit.
7401 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
7402 don't look for stubs on all undefined syms.
7404 2002-05-09 Alan Modra <amodra@bigpond.net.au>
7406 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
7407 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
7410 * elf32-i386.c (elf_howto_table): Comments.
7411 (elf_i386_relocate_section): Handle more relocs for relocatable
7412 linking and against SEC_MERGE sections.
7414 2002-05-08 Alan Modra <amodra@bigpond.net.au>
7416 * elf32-ppc.c (ppc_elf_create_got): New function.
7417 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
7418 _bfd_elf_create_dynamic_sections. Correct .plt flags.
7419 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
7420 _bfd_elf_create_got_section.
7422 2002-05-07 Alan Modra <amodra@bigpond.net.au>
7424 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
7425 * elfxx-target.h (elf_backend_rela_normal): Define.
7426 (elfNN_bed): Init rela_normal.
7427 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
7428 for section symbols here if rela_normal. Simplify abs section test.
7429 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
7430 return immediately. Remove code handling relocatable linking.
7431 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
7432 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
7433 * elf32-i370.c (i370_elf_relocate_section): Likewise.
7434 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7435 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
7436 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
7437 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7438 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
7439 * elf32-s390.c (elf_s390_relocate_section): Likewise.
7440 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7441 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
7442 * elf64-s390.c (elf_s390_relocate_section): Likewise.
7443 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7444 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
7445 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
7446 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7447 * elf-m10200.c (elf_backend_rela_normal): Define.
7448 * elf-m10300.c (elf_backend_rela_normal): Define.
7449 * elf32-fr30.c (elf_backend_rela_normal): Define.
7450 * elf32-i370.c (elf_backend_rela_normal): Define.
7451 * elf32-i860.c (elf_backend_rela_normal): Define.
7452 * elf32-m68k.c (elf_backend_rela_normal): Define.
7453 * elf32-mcore.c (elf_backend_rela_normal): Define.
7454 * elf32-openrisc.c (elf_backend_rela_normal): Define.
7455 * elf32-ppc.c (elf_backend_rela_normal): Define.
7456 * elf32-s390.c (elf_backend_rela_normal): Define.
7457 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
7458 * elf64-ppc.c (elf_backend_rela_normal): Define.
7459 * elf64-s390.c (elf_backend_rela_normal): Define.
7460 * elf64-x86-64.c (elf_backend_rela_normal): Define.
7461 * elfxx-ia64.c (elf_backend_rela_normal): Define.
7462 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
7463 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
7465 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
7467 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
7468 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
7470 2002-05-06 Alan Modra <amodra@bigpond.net.au>
7472 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
7473 when not relocatable. Fix reloc_emitter call for K&R.
7475 2002-05-04 Alan Modra <amodra@bigpond.net.au>
7477 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
7478 reloading local sym addend mistakenly removed in 2002-05-01 change.
7480 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
7481 (read_abbrevs): Change "offset" param to bfd_vma.
7482 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
7483 Change "abbrev_offset" to bfd_vma.
7484 (read_indirect_string): Use correct conversion chars in error
7485 message format string, cast bfd_vma's to unsigned long.
7486 (read_abbrevs): Likewise.
7487 (read_attribute_value): Likewise.
7488 (decode_line_info): Likewise.
7489 (scan_unit_for_functions): Likewise.
7490 (parse_comp_unit): Likewise.
7492 2002-05-04 Tom Rix <trix@redhat.com>
7494 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
7495 (coff_swap_reloc_out): Same.
7496 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
7497 (xcoff_swap_reloc_out): Same.
7498 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
7499 case some 16 bit relocs. Add reloc value to output.
7500 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
7501 R_RBR. Improve names.
7502 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
7503 (bfd_xcoff_backend_data): Update with new reloc swap names.
7504 (bfd_pmac_xcoff_backend_data) : Same.
7505 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
7506 (xcoff64_swap_reloc_out): Same.
7507 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
7508 R_POS. Add reloc value to output.
7509 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
7510 bit R_RBR. Improve names, masks.
7511 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
7512 (bfd_xcoff_backend_data): Update with new reloc swap names.
7513 (bfd_xcoff_aix5_backend_data) : Same.
7515 2002-05-04 Alan Modra <amodra@bigpond.net.au>
7517 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
7518 bfd_count top_index, input_list, all_local_syms.
7519 (elf32_hppa_setup_section_lists): New function, split from
7520 elf32_hppa_size_stubs.
7521 (elf32_hppa_next_input_section): Likewise.
7522 (group_sections): Likewise.
7523 (get_local_syms): Likewise.
7524 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
7525 stubs on undefined syms too.
7526 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
7527 Only access htab elf fields when we have an elf hash table.
7528 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
7529 (elf32_hppa_next_input_section): Declare.
7531 2002-05-04 Bob Byrnes <byrnes@curl.com>
7533 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
7536 2002-05-03 H.J. Lu (hjl@gnu.org)
7538 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
7539 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
7540 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
7541 to hide a global symbol.
7542 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
7543 forced_local to true.
7545 2002-05-02 Richard Henderson <rth@redhat.com>
7547 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
7548 vs SHN_UNDEF to zero.
7550 2002-05-02 Alan Modra <amodra@bigpond.net.au>
7552 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
7554 <R_PPC64_SECTOFF_DS>: Likewise.
7555 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
7557 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
7558 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
7561 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
7562 (ppc64_elf_ha_reloc): New function.
7563 (ppc64_elf_brtaken_reloc): New function.
7564 (ppc64_elf_sectoff_reloc): New function.
7565 (ppc64_elf_sectoff_ha_reloc): New function.
7566 (ppc64_elf_toc_reloc): New function.
7567 (ppc64_elf_toc_ha_reloc): New function.
7568 (ppc64_elf_toc64_reloc): New function.
7569 (ppc64_elf_unhandled_reloc): New function.
7570 (ppc64_elf_howto_raw): Use the above.
7571 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
7572 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
7573 <R_PPC64_SECTOFF_DS>: Likewise.
7574 (IS_ABSOLUTE_RELOC): Update.
7575 (struct ppc_link_hash_table): Add have_undefweak.
7576 (ppc64_elf_link_hash_table_create): Init.
7577 (func_desc_adjust): Set have_undefweak.
7578 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
7579 add the .sfpr blr when have_undefweak.
7580 (ppc64_elf_setup_section_lists): Check hash table flavour.
7581 (ppc64_elf_next_input_section): Move output_section->owner test to
7583 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
7584 and relocatable test. Return TOCstart and don't set elf_gp.
7585 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
7586 offset calculation. Add assert on weak sym branch tweaks.
7587 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
7588 (ppc64_elf_toc): Declare.
7589 (ppc64_elf_next_input_section): Update.
7591 2002-05-01 Alan Modra <amodra@bigpond.net.au>
7593 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
7596 2002-05-01 Alan Modra <amodra@bigpond.net.au>
7598 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
7599 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
7600 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
7601 call branches. Correct undefined weak destination.
7602 (ppc64_elf_func_desc_adjust): Always create at least one blr in
7603 .sfpr, and correct case where either only savef* or restf* is
7606 Long branch stubs, multiple stub sections.
7607 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
7608 (ppc64_elf_next_input_section): Declare.
7609 * elf64-ppc.c: Move linker-only prototypes.
7610 (STUB_SUFFIX): Define.
7611 (enum ppc_stub_type): New.
7612 (struct ppc_stub_hash_entry): New.
7613 (struct ppc_branch_hash_entry): New.
7614 (struct ppc_link_hash_entry): Add stub_cache, oh.
7615 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
7616 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
7617 Rename plt_overflow to stub_error.
7618 (ppc_stub_hash_lookup): Define.
7619 (ppc_branch_hash_lookup): Define.
7620 (stub_hash_newfunc): New function.
7621 (branch_hash_newfunc): New function.
7622 (link_hash_newfunc): Init new fields.
7623 (ppc64_elf_link_hash_table_create): Likewise.
7624 (ppc64_elf_link_hash_table_free): New function.
7625 (ppc_stub_name): New function.
7626 (ppc_get_stub_entry): New function.
7627 (ppc_add_stub): New function.
7628 (create_linkage_sections): Use bfd_make_section_anyway. Create
7629 .branch_lt and .rela.branch_lt sections. Don't create .stub.
7630 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
7631 and set up for plt call stubs. Link func and func desc syms.
7632 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
7633 (func_desc_adjust): Avoid hash lookup when func desc sym available
7634 via shortcut, and set links when processing.
7635 (ppc64_elf_hide_symbol): Likewise.
7636 (allocate_dynrelocs): Don't allocate stub section here.
7637 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
7639 (ppc_type_of_stub): New function.
7640 (build_one_stub): Delete.
7641 (ppc_build_one_stub): New function.
7642 (ppc_size_one_stub): New function.
7643 (ppc64_elf_setup_section_lists): New function.
7644 (ppc64_elf_next_input_section): New function.
7645 (group_sections): New function.
7646 (get_local_syms): New function.
7647 (ppc64_elf_size_stubs): Rewrite.
7648 (ppc64_elf_build_stubs): Rewrite.
7649 (ppc64_elf_relocate_section): Look up stub entry for REL24
7650 relocs. Don't propagate REL14* to dynamic objects. Look for long
7651 branch stubs if REL14* or REL24 relocs won't reach.
7652 (bfd_elf64_bfd_link_hash_table_free): Define.
7654 2002-04-30 Mark Mitchell <mark@codesourcery.com>
7656 * config.bfd: Add support for powerpc-*-windiss.
7658 2002-04-30 Tom Rix <trix@redhat.com>
7660 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
7661 symbol names into the hash table.
7663 2002-04-28 Tom Rix <trix@redhat.com>
7665 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
7666 calulating relocations.
7667 (xcoff_complain_overflow) : Function table for relocation errors.
7668 (xcoff_ppc_relocate_section): Use relocation and complain function
7670 (xcoff_complain_overflow_unsigned_func): New complain function.
7671 (xcoff_complain_overflow_signed_func): Same.
7672 (xcoff_complain_overflow_bitfield_func): Same.
7673 (xcoff_complain_overflow_dont_func): Same.
7674 (xcoff_reloc_type_crel): New recot function.
7675 (xcoff_reloc_type_br): Same.
7676 (xcoff_reloc_type_ba): Same.
7677 (xcoff_reloc_type_toc): Same.
7678 (xcoff_reloc_type_rel): Same.
7679 (xcoff_reloc_type_neg): Same.
7680 (xcoff_reloc_type_pos): Same.
7681 (xcoff_reloc_type_fail): Same.
7682 (xcoff_reloc_type_noop): Same.
7683 * libxcoff.h : Declare common parts for xcoff64.
7684 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
7685 and complain function tables.
7687 2002-04-28 Alan Modra <amodra@bigpond.net.au>
7689 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
7690 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
7692 2002-04-26 Alan Modra <amodra@bigpond.net.au>
7694 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
7695 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
7697 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
7698 same as the output before calling elf_link_input_bfd.
7700 * coffcode.h (coff_compute_section_file_positions): Set
7701 section_tail after shuffling section list.
7703 2002-04-24 Christian Groessler <chris@groessler.org>
7705 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
7706 addresses are 23bit with a special layout, not plain 32bit
7707 values. Prevent relocation of immediate values.
7709 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
7711 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
7712 MIPS-16 ASE flags are set, print something to indicate that.
7714 2002-04-23 Alan Modra <amodra@bigpond.net.au>
7716 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
7717 under which a plt call stub is used.
7718 (final_link_relocate): Similarly.
7719 (allocate_plt_static): Clear h-plabel except when plt entry is
7720 exclusively used for a plabel.
7721 (allocate_dynrelocs): Use the above to simplify plt sizing.
7722 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
7723 (elf32_hppa_link_hash_table_create): Init.
7725 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
7726 (elf32_hppa_check_relocs): Set has_22bit_branch.
7728 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
7729 (final_link_relocate): Likewise.
7731 2002-04-22 Jakub Jelinek <jakub@redhat.com>
7733 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
7734 search table if some FDE is DW_EH_PE_aligned encoded either.
7735 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
7737 2002-04-22 Richard Smith <richard@ex-parrot.com>
7738 Jakub Jelinek <jakub@redhat.com>
7740 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
7741 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
7742 encoded personality.
7743 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
7744 for CIE/FDE removal.
7746 2002-04-20 Tom Rix <trix@redhat.com>
7748 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
7750 2002-04-20 Alan Modra <amodra@bigpond.net.au>
7752 * archures.c (bfd_lookup_arch): Move the list order comment..
7753 (struct bfd_arch_info): ..to where it belongs.
7754 * bfd-in2.h: Regenerate.
7756 * archures.c (bfd_lookup_arch): Add comment on list order.
7757 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
7758 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
7759 is always at head of list.
7761 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
7763 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
7764 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
7765 definition of these functions for ARM_WINCE builds as they are
7767 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
7768 for ARM_WINCE builds.
7770 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
7772 * coff-arm.c (bfd_arm_process_before_allocation):
7774 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
7776 * cpu-sh.c (scan_mach): Delete.
7777 (arch_info_struct): Replace scan_mach with bfd_default_scan.
7778 (bfd_sh_arch): Likewise.
7780 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
7782 * ihex.c (ihex_write_object_contents): Fix check for records
7783 crossing 64K boundaries.
7785 2002-04-16 Alan Modra <amodra@bigpond.net.au>
7787 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
7788 type rather than just assuming entries are ELF.
7789 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
7790 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
7791 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
7792 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
7793 rather than elf_link_hash_entry.
7795 2002-04-15 Richard Henderson <rth@redhat.com>
7797 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
7800 2002-04-15 Michael Snyder <msnyder@redhat.com>
7802 * opncls.c (bfd_close): Write contents if writeable.
7803 Minor formatting tidy-ups.
7805 2002-04-15 Alan Modra <amodra@bigpond.net.au>
7807 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
7809 2002-04-12 Michael Snyder <msnyder@redhat.com>
7811 * bfd-in.h (bfd_get_section_lma): New access macro.
7812 Minor white-space fix-up.
7814 2002-04-12 Alan Modra <amodra@bigpond.net.au>
7816 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
7819 2002-04-09 DJ Delorie <dj@redhat.com>
7821 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
7823 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
7825 * coffcode.h (coff_read_word): New.
7826 (coff_compute_checksum): New.
7827 (coff_apply_checksum): New.
7828 (coff_write_object_contents): Call coff_apply_checksum () to
7829 apply checksum to PE image.
7831 2002-04-08 Randolph Chung <tausq@debian.org>
7833 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
7834 (elf32_hppa_final_link): Split out sorting logic to..
7835 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
7836 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
7838 2002-04-07 Andrew Cagney <ac131313@redhat.com>
7840 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
7842 * configure: Re-generate.
7844 2002-04-07 Andrew Cagney <ac131313@redhat.com>
7846 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
7847 is greater or equal to 4.3.3.
7848 * configure: Regenerate.
7851 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
7853 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
7854 R_CRIS_32_PCREL>: Fix typo in name.
7855 (cris_elf_check_relocs): Always create .rela.got here when
7856 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
7857 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
7858 assume it's created.
7860 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
7862 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
7863 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
7865 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
7866 * bfd.c (bfd_link_hash_table_free): Define.
7867 * binary.c (binary_bfd_link_hash_table_free): Define.
7868 * bout.c (b_out_bfd_link_hash_table_free): Define.
7869 * coff-rs6000.c (rs6000coff_vec): Include
7870 _bfd_generic_link_hash_table_free.
7871 (pmac_xcoff_vec): Likewise.
7872 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
7873 (aix5coff64_vec): Likewise.
7874 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
7875 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
7876 (bfd_elf32_bfd_link_hash_table_free): Define.
7877 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
7878 (bfd_elf32_bfd_link_hash_table_free): Define.
7879 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
7881 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
7882 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
7883 * ieee.c (ieee_bfd_link_hash_table_free): Define.
7884 * ihex.c (ihex_bfd_link_hash_table_free): Define.
7885 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
7886 (_bfd_generic_link_hash_table_free): Add prototype.
7887 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
7888 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
7889 * linker.c (_bfd_generic_link_hash_table_free): New function.
7890 * mmo.c (mmo_bfd_link_hash_table_free): Define.
7891 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
7892 * oasys.c (oasys_bfd_link_hash_table_free): Define.
7893 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
7894 * som.c (som_bfd_link_hash_table_free): Define.
7895 * srec.c (srec_bfd_link_hash_table_free): Define.
7896 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
7897 * versados.c (versados_bfd_link_hash_table_free): Define.
7898 * vms.c (vms_bfd_link_hash_table_free): New function.
7899 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
7901 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
7902 instead of bfd_alloc.
7903 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
7904 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
7905 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
7906 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
7907 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
7908 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
7909 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
7910 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
7911 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
7912 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
7913 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
7914 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
7915 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
7916 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
7917 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
7918 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
7919 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
7920 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
7921 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
7922 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
7923 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
7924 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
7925 * m68klinux.c (linux_link_hash_table_create): Likewise.
7926 * sparclinux.c (linux_link_hash_table_create): Likewise.
7927 * sunos.c (sunos_link_hash_table_create): Likewise.
7928 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
7930 * targets.c: Add _bfd_link_hash_table_free to xvec.
7932 * bfd-in2.h: Regenerate.
7933 * libbfd.h: Regenerate.
7934 * libcoff.h: Regenerate.
7936 2002-04-04 Alan Modra <amodra@bigpond.net.au>
7938 * dep-in.sed: Cope with absolute paths.
7939 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
7941 * Makefile.in: Regenerate.
7942 * coff-arm.c: Fix copyright date.
7943 * cpu-h8300.c: Likewise.
7944 * cpu-i370.c: Likewise.
7945 * cpu-s390.c: Likewise.
7946 * cpu-mips.c: Likewise.
7947 * po/SRC-POTFILES.in: Regenerate.
7949 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7951 * Makefile.am: Add elfxx-mips.c to the known backends.
7952 (elf32-mips.lo): remove dependency to coff/external.h.
7953 * Makefile.in: Regenerate.
7954 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
7955 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
7957 * configure: Regenerate.
7958 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
7959 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
7960 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
7961 MIPS specific backend functions.
7962 * elf32-mips.c: Moved most code to elfxx-mips.c.
7963 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
7965 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
7966 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
7967 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
7968 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
7969 interface to allow selection of the right REL or RELA howto table.
7970 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
7971 static. Let it refuse n32 objects.
7972 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
7973 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
7974 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
7975 (elf32_mips_ignore_discarded_relocs): Rename from
7976 _bfd_elf32_mips_ignore_discarded_relocs.
7977 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
7978 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
7979 (elf_mips_howto_table_rela): Remove.
7980 * elf64-mips.c: Moved most code to elfxx-mips.c.
7981 (bfd_elf64_bfd_reloc_type_lookup): Make static.
7982 (mips_elf64_rtype_to_howto): New function.
7983 (mips_elf64_object_p): Likewise.
7984 (elf64_mips_irix_compat): Likewise.
7985 * elfxx-mips.c: New file containing common code merged together from
7986 elf32-mips.c and elf64-mips.c.
7987 * elfxx-mips.h: New file containing MIPS specific prototypes from
7989 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
7990 elf_backend_mips_rtype_to_howto.
7992 2002-04-04 Alan Modra <amodra@bigpond.net.au>
7994 * srec.c (MAXCHUNK, Chunk): Revise comments.
7995 (srec_write_record): Correct buffer size.
7996 (srec_write_header): Do without intermediate buffer.
7997 (srec_write_section): Validate Chunk.
7998 (srec_write_terminator): Pass NULL instead of dummy buffer.
7999 (srec_write_symbols): Pass file and symbol names directly to
8000 bfd_bwrite so sprintf won't overflow buffer.
8002 2002-04-03 Jakub Jelinek <jakub@redhat.com>
8004 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
8005 PC relative relocs against hidden symbols.
8006 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8008 2002-04-03 Alan Modra <amodra@bigpond.net.au>
8010 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
8011 LMAs, loop over segments until p_vaddr and p_memsz specify an
8012 extent enclosing the section.
8014 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
8016 * ihex.c (ihex_write_object_contents): Do not allow records to
8017 cross a 64K boundary - wrap if necessary.
8019 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
8021 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
8022 which caused the returned LWP ID to always be 0.
8024 2002-04-01 Richard Henderson <rth@redhat.com>
8026 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
8027 (elf32_sparc_relocate_section): Use it to figure out when to
8028 initialize .got entries.
8029 * elf64-sparc.c: Similarly.
8031 2002-03-28 Alan Modra <amodra@bigpond.net.au>
8033 * linker.c (link_action): Ignore duplicate warning syms.
8034 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
8035 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
8036 (elf_adjust_dynamic_symbol): Likewise.
8037 (elf_export_symbol): Likewise.
8038 (elf_link_find_version_dependencies): Likewise.
8039 (elf_link_assign_sym_version): Likewise.
8040 (elf_link_sec_merge_syms): Likewise.
8041 (elf_link_output_extsym): Likewise.
8042 (elf_gc_sweep_symbol): Likewise.
8043 (elf_gc_propagate_vtable_entries_used): Likewise.
8044 (elf_gc_smash_unused_vtentry_relocs): Likewise.
8045 (elf_gc_allocate_got_offsets): Likewise.
8046 (elf_collect_hash_codes): Likewise.
8047 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
8048 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
8049 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
8050 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
8051 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
8052 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
8053 (elf_cris_discard_excess_dso_dynamics): Likewise.
8054 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
8055 (mark_PIC_calls): Likewise.
8056 (allocate_plt_static): Likewise.
8057 (allocate_dynrelocs): Likewise.
8058 (readonly_dynrelocs): Likewise.
8059 * elf32-i386.c (allocate_dynrelocs): Likewise.
8060 (readonly_dynrelocs): Likewise.
8061 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
8062 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
8063 * elf32-mips.c (mips_elf_output_extsym): Likewise.
8064 (mips_elf_sort_hash_table_f): Likewise.
8065 (mips_elf_check_mips16_stubs): Likewise.
8066 * elf32-s390.c (allocate_dynrelocs): Likewise.
8067 (readonly_dynrelocs): Likewise.
8068 * elf32-sh.c (sh_elf_discard_copies): Likewise.
8069 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
8070 (xstormy16_relax_plt_realloc): Likewise.
8071 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
8072 (elf64_alpha_output_extsym): Likewise.
8073 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
8074 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
8075 (mips_elf64_check_mips16_stubs): Likewise.
8076 (mips_elf64_output_extsym): Likewise.
8077 * elf64-ppc.c (func_desc_adjust): Likewise.
8078 (allocate_dynrelocs): Likewise.
8079 (readonly_dynrelocs): Likewise.
8080 * elf64-s390.c (allocate_dynrelocs): Likewise.
8081 (readonly_dynrelocs): Likewise.
8082 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
8083 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
8084 (readonly_dynrelocs): Likewise.
8085 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
8086 * aoutx.h (aout_link_write_other_symbol): Likewise.
8087 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
8088 (_bfd_coff_write_global_sym): Likewise.
8089 * i386linux.c (linux_tally_symbols): Likewise.
8090 * m68klinux.c (linux_tally_symbols): Likewise.
8091 * sparclinux.c (linux_tally_symbols): Likewise.
8092 * pdp11.c (aout_link_write_other_symbol): Likewise.
8093 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
8094 * xcofflink.c (xcoff_build_ldsyms): Likewise.
8095 (xcoff_write_global_symbol): Likewise.
8097 * cofflink.c (_bfd_coff_final_link): Formatting.
8098 * cpu-mips.c (mips_compatible): Make static, prototype.
8099 * elf32-i386.c (elf_i386_check_relocs): Formatting.
8100 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
8101 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
8102 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
8103 (mips_elf64_final_link): Likewise.
8104 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
8107 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
8109 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
8110 (SWAP_OUT_RELOC_OFFSET): Define.
8112 2002-03-27 Gregory Steuck <greg@nest.cx>
8114 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
8115 terminating NULL if empty symbol table.
8116 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
8118 2002-03-26 H.J. Lu (hjl@gnu.org)
8120 * elflink.h (elf_link_input_bfd): Revert the last change since
8121 the gcc exception handling isn't fixed yet.
8123 2002-03-26 H.J. Lu (hjl@gnu.org)
8125 * elflink.h (elf_link_input_bfd): Complain about relocations
8126 against local symbols in discarded sections.
8128 2002-03-26 Alan Modra <amodra@bigpond.net.au>
8130 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
8132 2002-03-23 Alan Modra <amodra@bigpond.net.au>
8134 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
8135 section file offset for !SEC_LOAD sections.
8137 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
8139 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
8140 <case R_ARM_GOT>): Handle relocations to Thumb functions.
8142 2002-03-21 Alan Modra <amodra@bigpond.net.au>
8144 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
8146 * archive.c: Update copyright date.
8147 * bfd-in2.h: Regenerate.
8148 * libbfd.h: Regenerate.
8149 * Makefile.am: Run "make dep-am"
8150 * Makefile.in: Regenerate.
8151 * po/SRC-POTFILES.in: Regenerate.
8153 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
8155 * dwarf2.c (struct funcinfo): Move up.
8156 (lookup_address_in_function_table): New argument function_ptr.
8158 (lookup_address_in_line_table): New argument function. If function
8159 is non-NULL, use it to handle ``addr'' before the first line note of
8161 (comp_unit_find_nearest_line): Update and swap calls to
8162 lookup_address_in_function_table and lookup_address_in_line_table.
8163 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
8164 N_SLINE encountered if we see an N_FUN before any N_SLINE.
8166 2002-03-20 Tom Rix <trix@redhat.com>
8168 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
8169 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
8170 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
8172 2002-03-19 Tom Rix <trix@redhat.com>
8174 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
8175 dynamic objects in archives.
8177 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
8179 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
8180 STT_NOTYPE symbols to STT_OBJECT.
8182 2002-03-18 Jan Hubicka <jh@suse.cz>
8184 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
8186 2002-03-18 Tom Rix <trix@redhat.com>
8188 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
8189 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
8190 * coff-rs6000 (do_pad) : New function for archive padding.
8191 (do_copy) : New function for object file copying in archives.
8192 (do_shared_object_padding) : New function for padding shared
8193 objects to their text section alignment in archives.
8194 (bfd_xcoff_ar_achive_set_magic) : Stub.
8195 (xcoff_write_armap_big) : Use do_copy and do_pad.
8196 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
8198 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
8199 bfd_xcoff_magic_number.
8200 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
8202 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
8203 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
8204 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
8205 * rs6000-core.c : Update copyright date.
8206 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
8208 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
8209 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
8210 (coff_set_flags) : Use bfd_xcoff_magic_number.
8211 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
8212 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
8213 * Makefile.am : Same.
8214 * config.bfd : Same.
8216 * configure : Regnerate.
8217 * Makefile.in : Same.
8220 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
8222 * po/fr.po: Updated version.
8224 2002-03-18 Alan Modra <amodra@bigpond.net.au>
8226 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
8227 * libbfd.h: Regenerate.
8228 * archive.c (coff_write_armap): Pass on failures from
8229 bfd_write_bigendian_4byte_int.
8231 2002-03-14 H.J. Lu <hjl@gnu.org>
8233 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
8234 error to bfd_error_nonrepresentable_section for reinit_array
8237 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
8239 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
8240 OR it in rather than replacing previously selected flags.
8242 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
8243 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
8245 2002-03-14 Alan Modra <amodra@bigpond.net.au>
8247 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
8249 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
8250 ensure reloc size matches before calling elf_link_input_bfd.
8251 Add an assert to check reloc size when counting output relocs.
8253 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
8255 * mmo.c (mmo_get_loc): Return NULL rather than false.
8257 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
8259 * po/fr.po: Updated version.
8261 2002-03-13 Alan Modra <amodra@bigpond.net.au>
8263 * archures.c (bfd_default_compatible): Test bits_per_word.
8264 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
8265 bfd_default_compatible.
8266 * cpu-i370.c (i370_compatible): Likewise.
8267 * cpu-sparc.c (sparc_compatible): Likewise.
8268 * cpu-h8300.c (compatible): Test in->arch == out->arch.
8270 * elflink.h: Formatting fixes.
8271 (elf_link_output_extsym): Merge undefined and undef weak cases.
8273 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
8274 when word size of input matches output word size.
8276 2002-03-12 Andreas Jaeger <aj@suse.de>
8278 * cpu-i386.c (i386_compatible): New. Use it instead of
8279 bfd_default_compatible.
8281 2002-03-07 H.J. Lu (hjl@gnu.org)
8283 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
8284 as the type for bfd_reloc_val.
8286 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
8288 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
8289 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
8290 (elf_hppa_final_link_relocate): Correct relocations for indirect
8291 references to local data through the DLT. Fix .opd creation for
8292 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
8293 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
8294 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
8295 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
8296 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
8297 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
8298 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
8300 2002-03-05 Jakub Jelinek <jakub@redhat.com>
8302 * merge.c (_bfd_merge_sections): Don't segfault if there
8303 is nothing to merge due to GC.
8305 2002-03-05 Alan Modra <amodra@bigpond.net.au>
8307 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
8308 symbols that have been forced local.
8310 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
8311 to output forced local syms for non-shared link.
8312 (elf_link_output_extsym): Tweak condition for calling backend
8313 adjust_dynamic_symbol so that previous behaviour is kept.
8314 Whitespace changes throughout file.
8316 2002-03-04 H.J. Lu <hjl@gnu.org>
8318 * elf.c (bfd_section_from_shdr): Handle special sections,
8319 .init_array, .fini_array and .preinit_array.
8320 (elf_fake_sections): Likewise.
8322 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
8323 DT entry only if the section is in output for .init_array,
8324 .fini_array and .preinit_array. Complain about .preinit_array
8326 (elf_bfd_final_link): Warn zero size for .init_array,
8327 .fini_array and .preinit_array sections.
8329 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
8330 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
8331 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
8334 2002-03-04 Alan Modra <amodra@bigpond.net.au>
8336 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
8337 * configure: Regenerate.
8339 2002-03-02 Tom Rix <trix@redhat.com>
8341 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
8343 * coff-rs6000.c (xcoff_howto_table): Same.
8345 2002-03-01 David Mosberger <davidm@hpl.hp.com>
8347 * elflink.h (size_dynamic_sections): If section named
8348 ".preinit_array" exists, create DT_PREINIT_ARRAY and
8349 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
8350 ".init_array" and ".fini_array".
8351 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
8352 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
8355 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
8357 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
8360 2002-02-25 Alan Modra <amodra@bigpond.net.au>
8362 * elf64-hppa.h: Update copyright date.
8364 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
8365 (ppc64_elf_relocate_section): Don't generate power4 style branch
8366 hints for *_BRTAKEN and *_BRNTAKEN relocs.
8368 2002-02-22 Jakub Jelinek <jakub@redhat.com>
8370 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
8372 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8374 2002-02-21 Andreas Jaeger <aj@suse.de>
8376 * elf64-x86-64.c: Major rework that introduces all recent changes
8377 to the x86-64 backend. Get a closer match to elf32-i386.
8378 (struct elf64_x86_64_dyn_relocs): Rename from
8379 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
8381 (struct elf64_x86_64_link_hash_table): Add short cuts to some
8383 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
8384 remove casts, initialize new hash members.
8385 (create_got_section): New.
8386 (elf64_x86_64_create_dynamic_sections): New.
8387 (elf64_x86_64_copy_indirect_symbol): New.
8388 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
8389 relocs, .got or .relgot here but do it in allocate_dynrelocs.
8390 Reference count possible .plt and .got entries. Don't test input
8391 section SEC_READONLY here to try to avoid copy relocs, and keep
8392 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
8393 DF_TEXTREL here. Delay setting of variables until needed. Cache
8394 pointer to "sreloc" section in elf_section_data. Tweak condition
8395 under which .got created. Report files with bad relocation
8397 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
8398 Reference count possible .plt entries. Don't deallocate .got and
8400 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
8401 do copy reloc processing for weakdefs. Remove redundant casts and
8402 aborts. Delay setting of vars until needed. Move creation of
8403 dynamic symbols and allocation of .plt and .rela.plt to
8404 allocate_dynrelocs. Replace BFD_ASSERT with abort.
8405 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
8406 (allocate_dynrelocs): New.
8407 (readonly_dynrelocs): New.
8408 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
8409 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
8410 Zero out the dynamic allocated content space.
8411 (elf64_x86_64_discard_copies): Removed.
8412 (elf64_x86_64_relocate_section): Make use of dynamic section
8413 short-cuts. Localise vars, and delay setting. Better error
8414 reporting, replace BFD_ASSERT with abort. Check
8415 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
8416 regular object file and tread the weak definition as the normal
8417 one. Don't discard relocs for undefweak or undefined symbols and
8418 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
8420 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
8421 symbols that have been forced local. Use same test to decide if
8422 we can use a relative reloc for got as relocate_section. Expand
8423 SHN_UNDEF comment. Move expressions out of function calls.
8424 Replace BFD_ASSERT with abort.
8425 (bfd_elf64_bfd_final_link): Removed.
8426 (elf_backend_copy_indirect_symbol): Define.
8428 2002-02-20 Tom Rix <trix@redhat.com>
8430 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
8431 (_bfd_xcoff_reloc_type_lookup): Use it.
8432 * coff64-rs6000.c (xcoff64_howto_table): Same.
8433 (xcoff64_reloc_type_lookup): Same.
8435 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
8437 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
8440 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
8442 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
8443 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
8444 * bfd-in2.h: Regenerate.
8445 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
8446 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
8448 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
8449 (elf_s390_reloc_type_lookup): Likewise.
8450 (elf_s390_check_relocs): Likewise.
8451 (elf_s390_gc_sweep_hook): Likewise.
8452 (elf_s390_relocate_section): Likewise.
8453 (elf_s390_object_p): Use renamed architecture define.
8454 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
8456 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
8458 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
8460 2002-02-19 Jakub Jelinek <jakub@redhat.com>
8462 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
8463 absptr -> pcrel optimization for shared libs.
8464 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
8465 library cannot be converted to pcrel.
8466 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
8468 * elf32-i386.c (elf_i386_relocate_section): If
8469 _bfd_elf_section_offset returned -2, skip, but make sure the
8470 relocation is installed.
8471 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
8472 * elf32-cris.c (cris_elf_relocate_section): Likewise.
8473 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
8474 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8475 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8476 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8477 * elf32-s390.c (elf_s390_relocate_section): Likewise.
8478 * elf32-sh.c (sh_elf_relocate_section): Likewise.
8479 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
8480 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8481 * elf64-s390.c (elf_s390_relocate_section): Likewise.
8482 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
8483 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8484 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8485 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
8486 _bfd_elf_section_offset returning -2 the same way as -1.
8487 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
8488 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
8490 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
8492 2002-02-18 Tom Rix <trix@redhat.com>
8494 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
8495 (bfd_xcoff_size_dynamic_sections): Same.
8496 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
8497 (bfd_xcoff_size_dynamic_sections): Same.
8498 * coff-rs6000.c (xcoff_generate_rtinit): Same.
8499 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
8500 * libxcoff.h (struct xcoff_backend_data_rec): Same.
8501 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
8502 * bfd-in2.h: Regenerate.
8504 2002-02-18 Alan Modra <amodra@bigpond.net.au>
8506 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
8507 (struct ppc_link_hash_table): Add sfpr.
8508 (ppc64_elf_link_hash_table_create): Init it.
8509 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
8511 (create_linkage_sections): ..here. Make .sfpr too.
8512 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
8514 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
8515 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
8516 ._restf* functions, and create as needed.
8517 (func_desc_adjust): Only force_local for shared libs.
8519 2002-02-18 David O'Brien <obrien@FreeBSD.org>
8521 * configure.in: Bump version number post 2.12 branching.
8522 * configure: Regenerate.
8524 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
8526 * mmo.c: Correct and improve comments.
8527 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
8528 zero-pad. Use input to fill up non-empty bfd buffer.
8529 (mmo_flush_chunk): New function.
8530 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
8531 changed. Don't emit location specifier if VMA is same as
8532 *LAST_VMAP after omitting leading zero contents. Call
8533 mmo_flush_chunk before emitting location specifier.
8534 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
8535 with mmo_write_loc_chunk calls.
8536 (mmo_internal_write_section): Call mmo_flush_chunk after
8538 (mmo_write_symbols_and_terminator): Move :Main to first position
8539 in symbol array. Add faked one if it does not exist if there are
8540 other symbols. Don't add it if there are no symbols at all. Move
8541 out test for value of :Main from symbol loop. Rename table
8542 fakemain to maintable and variable mainsym to fakemain.
8544 2002-02-15 Richard Henderson <rth@redhat.com>
8546 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
8547 section with no got matches any got. Simplify error generaion.
8549 2002-02-15 Alan Modra <amodra@bigpond.net.au>
8551 Support arbitrary length fill patterns.
8552 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
8553 (_bfd_default_link_order): Remove bfd_fill_link_order code.
8554 Call default_data_link_order.
8555 (default_fill_link_order): Delete.
8556 (default_data_link_order): New function.
8557 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
8558 of bfd_fill_link_order with bfd_data_link_order.
8559 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
8560 * elf64-mips.c (mips_elf64_final_link): Likewise.
8562 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
8563 Correct value returned in "end" for "0x<non-hex>".
8565 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
8567 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
8568 (scan): Test against 'mach' field in info structure.
8570 2002-02-14 Alan Modra <amodra@bigpond.net.au>
8572 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
8574 2002-02-14 Matt Fredette <fredette@netbsd.org>
8576 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
8579 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
8581 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
8582 non-zero physical addresses when adjusting the LMAs of new
8585 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
8587 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
8588 from _bfd_elf_hppa_gen_reloc_type.
8589 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
8590 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
8591 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
8592 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
8594 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
8596 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
8597 loading its contents if there's nothing to do in it.
8599 2002-02-12 Alan Modra <amodra@bigpond.net.au>
8601 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
8604 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
8605 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
8606 (ppc64_elf_finish_dynamic_sections): Set values for them.
8608 2002-02-11 Michael Snyder <msnyder@redhat.com>
8610 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
8611 * elf.c (elfcore_grok_pstatus): Add prototype.
8612 (elfcore_grok_lwpstatus): Add prototype.
8613 (elfcore_write_lwpstatus): New function.
8614 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
8616 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
8618 * elf32-sh.c: Added missing prototypes.
8619 * elf32-sh64.c: Likewise.
8620 (sh_elf_align_loads): Mark unused args as such.
8621 * elf64-sh64.c: Added missing prototypes.
8622 (struct elf_sh64_link_hash_entry): Fix typo.
8623 (sh_elf64_relocate_section): Fix info argument passed to
8624 _bfd_elf_section_offset.
8626 2002-02-11 Alan Modra <amodra@bigpond.net.au>
8628 * Makefile.am: "make dep-am".
8629 * Makefile.in: Regenerate.
8630 * aclocal.m4: Regenerate.
8631 * config.in: Regenerate.
8632 * configure: Regenerate.
8634 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
8636 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
8638 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
8640 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
8641 cast warnings for the common case.
8643 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
8645 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
8647 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
8650 2002-02-09 Richard Henderson <rth@redhat.com>
8652 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
8653 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
8654 (elf64_alpha_relocate_section): Likewise.
8655 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
8656 * bfd-in2.h, libbfd.h: Rebuild.
8658 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
8660 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
8661 that base-plus-offset reloc accounting is consistent.
8662 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
8663 up to date for undefined symbols.
8665 2002-02-08 Eric Christopher <echristo@redhat.com>
8667 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
8669 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
8670 sections for the O32 ABI.
8672 2002-02-08 Chris Demetriou <cgd@broadcom.com>
8674 * elf32-arm.h: Fix formatting of _("...").
8675 * elf32-d10v.c: Likewise.
8676 * elf32-m68k.c: Likewise.
8677 * elf32-mips.c: Likewise.
8679 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
8681 * coff-or32.c: Fix compile time warning messages.
8683 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
8685 Contribute sh64-elf.
8686 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
8687 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
8688 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
8689 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
8690 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
8691 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
8692 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
8693 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
8694 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
8695 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
8697 * libbfd.h, bfd-in2.h: Rebuilt.
8698 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
8699 (sh_reloc_map): Map them.
8700 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
8701 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
8702 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
8703 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
8704 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
8705 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
8706 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
8707 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
8708 datalabel_got_offset.
8709 (sh_elf_link_hash_newfunc): Initialize it.
8710 (sh_elf_relocate_section): Augment the scope of
8711 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
8712 GOT and GOTOFF handling to new SHmedia relocation types. Support
8714 (sh_elf_check_relocs): Likewise.
8715 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
8716 PLT entries using movi_shori_putval. Support GOT_BIAS.
8717 (sh_elf_finish_dynamic_sections): Likewise.
8718 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
8719 relocation, it's now done by the caller.
8721 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
8722 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
8723 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
8724 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
8725 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
8726 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
8727 sh64_elf64_hash_table): New.
8728 (sh_elf64_howto_table): Introduce new relocs.
8729 (sh_elf64_info_to_howto): Accept new PIC relocs.
8730 (sh_elf64_relocate_section): Augment the scope of
8731 seen_stt_datalabel. Support new PIC relocs.
8732 (sh_elf64_check_relocs): Support new PIC relocs.
8733 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
8734 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
8735 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
8736 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
8737 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
8738 movi_shori_putval, movi_3shori_putval,
8739 sh64_elf64_create_dynamic_sections,
8740 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
8741 sh64_elf64_size_dynamic_sections,
8742 sh64_elf64_finish_dynamic_symbol,
8743 sh64_elf64_finish_dynamic_sections): New.
8744 (elf_backend_create_dynamic-sections,
8745 bfd_elf64_bfd_link_hash_table_create,
8746 elf_backend_adjust_dynamic_symbol,
8747 elf_backend_size_dynamic_sections,
8748 elf_backend_finish_dynamic_symbol,
8749 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
8750 elf_backend_plt_readonly, elf_backend_want_plt_sym,
8751 elf_backend_got_header_size, elf_backend_plt_header_size):
8753 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
8754 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
8755 match official numbers and names; moved unmaching ones to the
8757 * elf32-sh64.c, elf64-sh64.c: Likewise.
8758 2001-03-12 DJ Delorie <dj@redhat.com>
8759 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
8761 2001-03-12 DJ Delorie <dj@redhat.com>
8762 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
8764 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
8765 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
8766 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
8767 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
8768 .cranges section with SEC_SORT_ENTRIES set.
8769 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
8770 incoming sorted .cranges section.
8771 (sh64_bfd_elf_copy_private_section_data): New.
8772 (sh64_elf_final_write_processing): Only sort .cranges and modify
8773 start address if called by linker.
8774 2001-01-08 Ben Elliston <bje@redhat.com>
8775 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
8776 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
8777 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
8778 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
8779 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
8780 line. Add comments before all entries.
8781 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
8783 (sh_elf64_reloc): Correct head comment.
8784 (sh_elf64_relocate_section): Correct spacing.
8785 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
8786 instead call reloc_dangerous callback.
8787 <case R_SH_SHMEDIA_CODE>: New case.
8788 (sh_elf64_gc_mark_hook): Correct spacing.
8789 (sh_elf64_check_relocs): Ditto.
8790 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
8792 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
8794 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
8795 clarify describing comment. Add comments before all entries.
8796 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
8797 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
8798 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
8799 Sort .cranges section in final link. Prepare to set bit 0 on
8801 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
8802 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
8803 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
8805 (sh64_backend_section_from_shdr): New, to recognize
8806 SHT_SH5_CR_SORTED on incoming .cranges section.
8807 (elf_backend_section_from_shdr): Define.
8808 (sh64_elf_final_write_processing): Sort outgoing .cranges
8809 section. (New, temporarily disabled:) Set bit 0 on entry address
8810 according to ISA type.
8811 (sh64_find_section_for_address): New.
8812 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
8813 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
8814 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
8815 bfd_malloc, not xmalloc.
8816 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
8818 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
8819 temporarily disabled) setting bit 0 on entry address.
8820 (elf_backend_final_write_processing): Define.
8821 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
8822 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
8823 be a proper relocation for PTA and PTB rather than a marker.
8824 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
8825 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
8826 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
8827 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
8828 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
8830 * elf64-sh64.c: Ditto.
8831 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
8832 * elf32-sh64.c: Include opcodes/sh64-opc.h
8833 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
8834 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
8835 parameters. No unused parameters. Caller changed.
8836 <case R_SH_PT_16>: New case.
8837 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
8838 * Makefile.in: Regenerate.
8839 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
8840 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
8842 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
8843 (sh64_elf_merge_private_data): Ditto.
8844 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
8845 to access stored section flags.
8846 (sh64_elf_final_write_processing): Return immediately unless
8847 called by linker. Use sh64_elf_section_data (cranges) to get size
8848 of linker-generated cranges entries.
8849 (sh64_elf_copy_private_data): Add missing "return true".
8850 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
8851 (sh_elf64_merge_private_data): Ditto.
8852 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
8853 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
8854 elf64-sh64.c:sh64_elf_fake_sections.
8855 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
8856 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
8857 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
8858 (sh64_elf_final_write_processing): New.
8859 (elf_backend_final_write_processing): Define.
8860 (sh64_elf_fake_sections): Get header flags from tdata field.
8861 (sh64_elf_copy_private_data): Do not call
8862 sh64_elf_copy_private_data_internal, just copy e_flags field.
8863 (sh64_elf_merge_private_data): Do not call
8864 sh64_elf_copy_private_data_internal.
8865 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
8866 Remove EF_SH64_ABI64, let ELF size make difference.
8867 Remove SH64-specific BFD section flag.
8868 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
8869 containing SHmedia through elf_section_data (asect)->tdata
8870 non-zero, not using a BFD section flag.
8871 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
8872 (sh64_elf_merge_private_data): Similar.
8873 (elf_backend_section_flags): Don't define.
8874 (sh64_elf_backend_section_flags): Delete.
8875 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
8877 (sh_elf64_merge_private_data): Similar.
8878 * section.c (Section flags definitions): Don't define
8880 (bfd-in2.h): Regenerate.
8881 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
8882 Make DataLabel references work with partial linking.
8883 * elf32-sh64.c: Fix formatting.
8884 (sh64_elf_link_output_symbol_hook): New.
8885 (elf_backend_link_output_symbol_hook): Define to
8886 sh64_elf_link_output_symbol_hook.
8887 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
8888 undefined if partial linking. Adjust sanity check.
8889 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
8890 (elf_backend_link_output_symbol_hook): Define to
8891 sh64_elf64_link_output_symbol_hook.
8892 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
8893 undefined if partial linking. Adjust sanity check.
8894 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
8895 Implement semantics for inter-file DataLabel references.
8896 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
8897 (sh64_elf64_add_symbol_hook): New.
8898 (sh_elf64_relocate_section): If passing an indirect symbol with
8899 st_type STT_DATALABEL on the way to a symbol with st_other
8900 STO_SH5_ISA32, do not bitor 1 to the relocation.
8901 (elf_backend_add_symbol_hook): Define to
8902 sh64_elf64_add_symbol_hook.
8903 * elf64-sh32.c: Tweak comments.
8904 (DATALABEL_SUFFIX): Define.
8905 (sh64_elf_add_symbol_hook): New.
8906 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
8907 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
8908 symbol with st_type STT_DATALABEL on the way to a symbol with
8909 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
8910 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
8911 Pass through STT_DATALABEL.
8912 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
8913 (elf_backend_get_symbol_type): Define.
8914 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
8915 (elf_backend_get_symbol_type): Define.
8916 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
8917 * elf32-sh64.c: Tweak comments.
8918 (sh64_elf_copy_private_data_internal): Add prototype.
8919 (bfd_elf32_bfd_set_private_flags): Define.
8920 (sh64_elf_copy_private_data_internal): Compare machine name, not
8921 textual BFD target name, to check whether to copy section flag
8923 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
8924 Tweak section-contents-type-mismatch message.
8925 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
8926 Validize reloc-types.
8927 * elf64-sh64.c: New file.
8928 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
8929 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
8930 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
8931 Regenerate dependencies.
8932 * Makefile.in: Regenerate.
8933 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
8934 bfd_elf64_sh64l_vec.
8935 * configure.in: Handle bfd_elf64_sh64_vec and
8936 bfd_elf64_sh64l_vec.
8937 * configure: Regenerate.
8938 * po/POTFILES.in: Regenerate.
8939 * po/bfd.pot: Regenerate.
8940 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
8941 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
8942 anything else but EF_SH64 and EF_SH64_ABI64.
8943 (sh64_elf_merge_private_data): Emit error for anything else but
8944 EF_SH64 and EF_SH64_ABI64.
8945 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
8947 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
8948 bfd_elf32_sh64l_vec as a temporary measure.
8949 * configure: Regenerate.
8950 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
8951 * cpu-sh.c (arch_info_struct): Include sh5 item
8953 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
8954 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
8955 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
8956 * elf32-sh64.c: Tweak comments.
8957 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
8958 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
8959 (sh64_elf_copy_private_data_internal): Wrap long line.
8960 (sh64_elf_merge_private_data): Rewrite to allow objects from
8961 SH64 subsets to be linked together.
8962 (INCLUDE_SHMEDIA): Define.
8963 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
8964 Parenthesize plus-expression inside or-expression.
8965 <global symbol>: Ditto.
8966 (sh_elf_set_mach_from_flags): Remove code refusing
8967 deleted EF_SH64_32BIT_ABI flag.
8968 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
8969 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
8970 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
8971 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
8972 (sh_elf_relocate_section) <local symbol>: Or 1 in
8973 calculation of relocation if sym->st_other & STO_SH5_ISA32.
8974 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
8975 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
8977 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
8978 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
8979 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
8980 Regenerate dependencies.
8981 * Makefile.in: Regenerate.
8982 * archures.c: Add bfd_mach_sh5.
8983 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
8984 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
8985 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
8986 * configure: Regenerate.
8987 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
8988 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
8989 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
8990 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
8991 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
8992 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
8993 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
8994 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
8995 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
8996 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
8998 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
9000 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
9001 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
9002 shmedia_prepare_reloc, goto final_link_relocate if it returns
9003 non-zero, else fail as before.
9004 (sh_elf_set_mach_from_flags): Provide function only if not defined
9005 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
9006 (sh_elf_set_private_flags): Provide function only if not defined
9008 (sh_elf_copy_private_data): Similar.
9009 (sh_elf_merge_private_data): Similar.
9010 * section.c (SEC_SH_ISA_SHMEDIA): New.
9011 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
9012 * elf32-sh64.c: New file.
9013 * libbfd.h: Regenerate.
9014 * bfd-in2.h: Regenerate.
9015 * po/POTFILES.in: Regenerate.
9016 * po/bfd.pot: Regenerate.
9017 * bfd-in2.h: Regenerate.
9018 * libbfd.h: Regenerate.
9020 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
9022 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
9023 been included, not drag it in.
9024 * bfd-in2.h: Regenerate.
9026 2002-02-06 H.J. Lu (hjl@gnu.org)
9028 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
9029 the mach and ISA fields if necessary.
9031 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
9033 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
9034 ARM architecture when an F_ARM_5 flag is detected, since we cannot
9035 be sure exactly which architecture this represents.
9037 2002-02-05 Nick Clifton <nickc@redhat.com>
9039 * po/tr.po: Updated translation.
9041 2002-02-05 Alan Modra <amodra@bigpond.net.au>
9043 From Jimi X <jimix@watson.ibm.com>
9044 * archures (bfd_mach_ppc64): Define.
9045 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
9046 (bfd_powerpc_arch): Define.
9047 * bfd-in2.h: Regenerate.
9048 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
9049 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
9050 (bfd_powerpc_archs): Add default powerpc64 arch.
9052 2002-02-05 Alan Modra <amodra@bigpond.net.au>
9054 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
9055 against section syms in readonly sections. Don't do the global
9056 sym check if we find one.
9057 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
9058 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
9059 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
9060 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
9061 (elf_s390_grok_prstatus): Add missing prototype.
9063 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
9065 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
9066 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
9067 Call bfd_get_section_by_name only once. Initialize
9068 bpodata->n_bpo_relocs_this_section.
9069 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
9071 (bpo_reloc_request_sort_fn): Don't use difference of values as
9074 2002-02-02 David O'Brien <obrien@FreeBSD>
9076 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
9077 version 4.5 and later the same as 5-CURRENT.
9078 * configure: Re-generate.
9080 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
9082 * config.bfd (hppa*-*-netbsd*): New target.
9084 2002-01-31 Philipp Thomas <pthomas@suse.de>
9086 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
9087 to front of message. Unify messages with elf32-arm.h. Use
9088 commas where neccessary.
9089 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
9090 ERROR in messages. Unify messages with coff-arm.c. Correct
9091 VFP/FPA error message.
9092 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
9093 APCS-32 for translation.
9095 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
9097 Perform on-demand global register allocation from
9098 R_MMIX_BASE_PLUS_OFFSET relocs.
9099 * elf64-mmix.c (struct bpo_reloc_section_info, struct
9100 bpo_reloc_request, struct bpo_greg_section_info): New.
9101 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
9102 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
9103 _bfd_mmix_check_all_relocs,
9104 _bfd_mmix_prepare_linker_allocated_gregs,
9105 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
9106 (elf_mmix_howto_table): Correct src_mask for most relocs.
9107 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
9109 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
9110 case. Fix typo in comment. New label do_mmix_reloc.
9111 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
9112 store first object file with a base-plus-offset reloc. Call
9113 mmix_elf_check_common_relocs for the part common with mmo.
9114 (mmix_elf_final_link): Write out linker-allocated register
9116 (elf_backend_gc_sweep_hook): Define.
9117 (bfd_elf64_bfd_relax_section): Define.
9119 * mmo.c: Don't include <ctype.h>
9120 (mmo_init): Correct init-once logic.
9122 2002-02-01 Tom Rix <trix@redhat.com>
9124 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
9126 2002-02-01 Alan Modra <amodra@bigpond.net.au>
9128 * Makefile.am: Run "make dep-am"
9129 * Makefile.in: Regenerate.
9131 2002-01-31 David O'Brien <obrien@FreeBSD>
9133 * configure.in: Recognize the differences in core files from FreeBSD
9134 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
9136 * configure: Regenerate.
9138 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
9140 * coff-or32.c: New file.
9141 * cpu-or32.c: New file.
9142 * elf32-or32.c: New file.
9143 * archures.c: Add support for or32.
9144 * targets.c: Add support for or32.
9145 * bfd-in2.h: Regenerate.
9146 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
9147 coff_write_object_contents): Add support for or32.
9148 * config.bfd: Add target.
9149 * configure.in: Add support for or32.
9150 * configure: Regenerate.
9151 * Makefile.am: Add support for or32.
9152 * Makefile.in: Regenerate.
9153 * po/SRC-POTFILES.in: Add or32 files.
9154 * po/bfd.pot: Regenerate.
9156 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
9157 Don Lindsay <lindsayd@cisco.com>
9159 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
9160 false' with a return of a bfd_reloc_ error code.
9162 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
9164 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
9165 unexport unreferenced symbols when --export-dynamic. Call
9166 _bfd_elf_strtab_delref when unexporting.
9168 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
9170 * bfd-in.h: Include <stdbool.h> if it is available.
9171 * bfd-in2.h: Regenerated.
9173 2002-01-31 Alan Modra <amodra@bigpond.net.au>
9175 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
9178 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
9180 * archures.c: Tidy up formatting of embedded comments.
9181 * bfd.c: Tidy up formatting of embedded comments.
9182 * bfd-in.h: Fix formatting of comments.
9183 * reloc.c: Tidy up formatting of ordinary & embedded comments.
9184 * section.c: Tidy up formatting of embedded comments.
9185 * syms.c: Tidy up formatting of embedded comments.
9186 * targets.c: Tidy up formatting of embedded comments.
9188 * bfd-in2.h: Regenerate.
9190 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
9192 * vms-tir.c (cmd_name): New function.
9193 (tir_cmd_name): New function.
9194 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
9195 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
9198 * peXXigen.c (pe_print_idata): Rearrange message to aid in
9200 (pe_print_pdata): Rearrange message to aid in translation.
9202 * libbfd.c (warn_deprecated): Rearrange error message to aid in
9205 * ihex.c (ihex_write_object_contents): Fix spelling typo.
9207 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
9209 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
9210 message to aid in translation.
9212 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
9213 to aid in translation.
9215 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
9217 2002-01-30 Philipp Thomas <pthomas@suse.de>
9219 * coff-arm.c, elf32-elf.h: Unify messages.
9221 2002-01-30 Nick Clifton <nickc@redhat.com>
9223 * po/sv.po: Updated translation.
9225 2002-01-30 Philipp Thomas <pthomas@suse.de>
9227 * dwarf2.c (read_abbrev): Use full section name in error message.
9228 (decode_line_info): Likewise.
9230 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
9233 2002-01-30 Alan Modra <amodra@bigpond.net.au>
9235 * elf64-ppc.c (func_desc_adjust): Only provide missing function
9236 descriptor symbols for undefined function code syms. Clear
9237 ELF_LINK_NON_ELF so that they can stay weak.
9239 2002-01-29 Chris Demetriou <cgd@broadcom.com>
9240 Mitch Lichtenberg <mpl@broadcom.com>
9242 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
9243 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
9244 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
9246 * bfd-in2.h: Regenerate.
9248 2002-01-29 Chris Demetriou <cgd@broadcom.com>
9250 * elf32-mips.c: Add additional comments about HI16 relocation
9252 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
9253 pc-relative relocations. (Reverts change made on 2001-10-31.)
9254 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
9255 for pc-relative relocations.
9256 (mips_elf_calculate_relocation): Add a comment about a kludge
9257 in the R_MIPS_GNU_REL_HI16 handling.
9258 (_bfd_mips_elf_relocate_section): Implement that kludge;
9259 adjust pc-relative HI16 relocation for difference in HI16 and
9260 LO16 addresses, since it can't easily be done in
9261 mips_elf_calculate_relocation.
9263 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
9265 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
9266 relocations with PC32 relocations for undefined or weak symbols.
9267 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
9268 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
9270 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
9272 * elfcore.h (elf_core_file_p): Improve comment for last change.
9274 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
9276 * configure: Regenerated.
9278 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
9280 * elfcore.h (elf_core_file_p): Set the machine architecture
9281 before processing the program headers.
9283 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
9285 * configure.in <64-bit configuration>: If using gcc, check and
9286 emit error for egcs-1.1.2.
9287 * configure: Regenerate.
9289 2002-01-26 Egor Duda <deo@logos-m.ru>
9291 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
9292 as possible to avoid stack corruption.
9294 2002-01-26 Richard Henderson <rth@redhat.com>
9296 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
9297 for non-allocated sections.
9299 2002-01-25 Mark Kettenis <kettenis@gnu.org>
9301 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
9302 prstat.pr_reg even if it is a struct.
9304 2002-01-25 Steve Ellcey <sje@cup.hp.com>
9306 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
9308 2002-01-25 Philipp Thomas <pthomas@suse.de>
9310 * coffgen.c (coff_print_symbol): Don't mark info message
9313 2002-01-25 Nick Clifton <nickc@redhat.com>
9315 * po/fr.po: Updated translation.
9316 * po/es.po: Updated translation.
9318 2002-01-25 Philipp Thomas <pthomas@suse.de>
9320 * coff-alpha.c (alpha_relocate_section): Unify warning message
9321 for GP relative relocations without GP defined.
9322 * coff-mips.c (mips_relocate_section): Likewise.
9324 2002-01-25 Alan Modra <amodra@bigpond.net.au>
9326 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
9327 unsigned overflow when new_offset < old_offset.
9329 2002-01-24 Philipp Thomas <pthomas@suse.de>
9331 * bfd.c (_bfd_abort): Fix typo.
9333 2002-01-23 Richard Henderson <rth@redhat.com>
9335 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
9336 plt entries for undefweak symbols.
9338 2002-01-23 Steve Ellcey <sje@cup.hp.com>
9340 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
9341 (bfd_elf64_ia64_hpux_big_vec): Ditto.
9342 (bfd_elf32_h8300_vec): Ditto.
9344 2002-01-23 Alan Modra <amodra@bigpond.net.au>
9346 * elf64-ppc.c: Remove stale part of ABI comment.
9347 (NO_OPD_RELOCS): Define.
9348 (ppc64_elf_check_relocs): Use it.
9349 (ppc64_elf_relocate_section): Here too.
9350 (build_one_stub): Don't point function syms at the stub. Instead,
9352 (ppc64_elf_relocate_section): Check whether REL24 relocs should
9353 really go to the stub. Make all dynamic relocs in opd against
9355 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
9358 2002-01-22 Richard Henderson <rth@redhat.com>
9360 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
9362 2002-01-22 Alan Modra <amodra@bigpond.net.au>
9364 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
9365 TOC_BASE_OFF adjustment.
9367 * Makefile.am: Run "make dep-am".
9368 * Makefile.in: Regenerate.
9369 * po/SRC-POTFILES.in: Regenerate.
9371 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
9373 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
9376 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
9378 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
9379 Check for and emit error if sgot is NULL at this point.
9381 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
9383 * config.bfd (ia64*-*-netbsd*): New target.
9385 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
9387 * som.c (som_write_space_strings): Comment typo fix.
9389 2002-01-21 Alan Modra <amodra@bigpond.net.au>
9391 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
9392 is_func_descriptor fields.
9393 (link_hash_newfunc): Init them.
9394 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
9395 dot are candidates for plt entries. When processing .opd relocs,
9396 set function descriptor strings to point inside function code
9397 string, and set new ppc_link_hash_entry fields.
9398 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
9399 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
9400 function descriptors. It's now done in..
9401 (func_desc_adjust): New.
9402 (ppc64_elf_func_desc_adjust): New.
9403 (define elf_backend_always_size_sections): Define.
9404 (ppc64_elf_hide_symbol): New.
9405 (define elf_backend_hide_symbol): Define.
9406 (allocate_dynrelocs): Remove code looking up function descriptors
9407 as that has been done earlier.
9408 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
9410 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
9411 up function descriptor.
9412 (build_one_stub): Look up the function code sym. Check for
9413 invalid plt offsets.
9414 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
9415 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
9417 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
9419 (_bfd_elf_link_hash_hide_symbol): Likewise.
9420 * elflink.h (elf_link_add_object_symbols): Adjust call to
9421 elf_backend_hide_symbol.
9422 (elf_fix_symbol_flags): Likewise.
9423 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
9425 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
9426 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
9427 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
9428 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
9429 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
9431 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
9432 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
9433 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
9435 2002-01-18 Alan Modra <amodra@bigpond.net.au>
9437 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
9438 dynamic function descriptor symbol, not the associated function
9441 2002-01-17 Eric Christopher <echristo@redhat.com>
9443 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
9445 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
9447 * po/bfd.pot: Regenerate.
9448 * po/fr.po: Regenerate.
9450 2002-01-17 Alan Modra <amodra@bigpond.net.au>
9452 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
9453 Remove "Elf_Internal_Shdr *" param.
9454 (_bfd_mips_elf_section_from_bfd_section): Ditto.
9455 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
9456 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
9457 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
9458 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
9459 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
9460 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
9461 function to override special sections. Remove hdr arg from
9462 backend call, and don't loop.
9464 2002-01-16 Eric Christopher <echristo@redhat.com>
9466 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
9467 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
9468 relocations requiring gp0 and gp.
9470 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
9472 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
9474 (elf32_arm_print_private_bfd_data): Likewise.
9476 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
9478 * po/tr.po: Import new version.
9480 2002-01-16 Alan Modra <amodra@bigpond.net.au>
9482 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
9483 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
9484 (ORI_R0_R0_0): Correct.
9486 2002-01-16 Alan Modra <amodra@bigpond.net.au>
9488 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
9489 when plt_not_loaded.
9490 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
9491 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
9492 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
9493 (ppc64_elf_glink_code): Delete.
9494 (PPC64_ELF_GLINK_SIZE): Delete.
9495 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
9496 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
9497 ORI_R0_R0_0): Define.
9498 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
9499 (struct ppc_link_hash_table): Add sstub and plt_overflow.
9500 (ppc64_elf_link_hash_table_create): Init them.
9501 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
9502 Don't copy to shared lib.
9503 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
9504 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
9505 (allocate_dynrelocs <plt>): Don't change function sym here. Make
9506 room for .stub and .glink code.
9507 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
9509 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
9510 bfd_elf64_bfd_final_link.
9511 (bfd_elf64_bfd_final_link): Don't define.
9512 (ppc64_elf_size_stubs): New.
9513 (build_plt_stub): New.
9514 (build_one_stub): New.
9515 (ppc64_elf_build_stubs): New.
9516 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
9517 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
9518 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
9519 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
9520 case output sections not separate. Adjust DT_RELASZ to not
9521 include plt relocs. Set reserved got entry. Set got and plt
9523 (elf_backend_got_header_size): Set to 8.
9524 * elf64-ppc.h: New file.
9526 2002-01-16 Alan Modra <amodra@bigpond.net.au>
9528 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
9529 sections, use bfd_section_list_remove.
9530 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
9531 * elflink.h (elf_link_add_object_symbols): When removing all
9532 sections, use bfd_section_list_clear.
9534 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
9536 * po/sv.po: New file: Swedish translation.
9537 * configure.in (ALL_LINGUAS): Add sv.
9538 * configure: Regenerate.
9540 2002-01-15 Jakub Jelinek <jakub@redhat.com>
9542 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
9543 * elf.c (merge_sections_remove_hook): New function.
9544 (_bfd_elf_merge_sections): Pass it as 3rd argument to
9545 _bfd_merge_sections.
9546 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
9547 * libbfd.h: Rebuilt.
9548 * merge.c (_bfd_merge_sections): Add remove_hook argument.
9549 Call remove_hook if a SEC_EXCLUDE section is encountered.
9551 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
9553 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
9554 (xstormy16_reloc_map): Initialise new field with correct howto
9556 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
9559 2002-01-10 Michael Snyder <msnyder@redhat.com>
9561 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
9562 (elfcore_write_pstatus): Use long instead of pid_t;
9563 * elf-bfd.h: Change prototypes to use long instead of pid_t;
9565 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
9567 * elf.c: Update copyright years.
9568 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
9569 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
9571 2002-01-08 Michael Snyder <msnyder@redhat.com>
9573 Add capability to write corefile note sections, for gdb.
9574 * elf.c (elfcore_write_note): New function.
9575 (elfcore_write_prpsinfo): New function.
9576 (elfcore_write_prstatus): New function.
9577 (elfcore_write_pstatus): New function.
9578 (elfcore_write_prfpreg): New function.
9579 (elfcore_write_prxfpreg): New function.
9580 * elf-bfd.h: Add prototypes for above functions.
9582 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
9584 * elf.c (elf_fake_sections): Propagate errors from
9585 elf_backend_fake_section.
9587 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
9589 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
9590 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
9591 (elf32-sh-nbsd.lo): New rule.
9592 * Makefile.in: Regenerate.
9593 * config.bfd (sh*le-*-netbsdelf*): New target.
9594 (sh*-*-netbsdelf*): New target.
9595 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
9596 (bfd_elf32_shnbsd_vec): New vector.
9597 (bfd_elf32_shlnbsd_vec): New vector.
9598 * configure: Regenerate.
9599 * elf32-sh-nbsd.c: New file.
9600 * targets.c: Update copyright years.
9601 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
9602 bfd_elf32_shnbsd_vec.
9604 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
9606 * coff-rs6000.c (READ20): Use bfd_scan_vma.
9608 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
9610 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
9611 of a symbol in a section that will be deleted.
9613 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
9615 * po/es.po: New file: Spanish translation.
9616 * configure.in (ALL_LINGUAS): Add es.
9617 * configure: Regenerate.
9619 2002-01-06 Steve Ellcey <sje@cup.hp.com>
9621 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
9622 argument so we can handle HP-UX specially.
9623 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
9624 (elfNN_hpux_backend_section_from_bfd_section): New for support
9625 of SHN_IA_64_ANSI_COMMON.
9626 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
9627 (is_unwind_section_name): Add special HP-UX support.
9628 (elfNN_ia64_section_from_shdr): Add support for more sections.
9629 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
9630 add support for more sections.
9631 (elfNN_ia64_additional_program_headers): Modify
9632 is_unwind_section_name call.
9633 (elfNN_ia64_modify_segment_map): Remove assumption that there is
9634 only one unwind section in segment.
9636 2002-01-06 Alan Modra <amodra@bigpond.net.au>
9638 * syms.c (_bfd_generic_make_empty_symbol): New function.
9639 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
9640 _bfd_generic_make_empty_symbol.
9641 * libbfd.h: Regenerate.
9642 * bfd-in2.h: Regenerate.
9643 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
9644 (hppabsd_core_get_symtab_upper_bound): Don't define.
9645 (hppabsd_core_get_symtab): Likewise.
9646 (hppabsd_core_print_symbol): Likewise.
9647 (hppabsd_core_get_symbol_info): Likewise.
9648 (hppabsd_core_bfd_is_local_label_name): Likewise.
9649 (hppabsd_core_get_lineno): Likewise.
9650 (hppabsd_core_find_nearest_line): Likewise.
9651 (hppabsd_core_bfd_make_debug_symbol): Likewise.
9652 (hppabsd_core_read_minisymbols): Likewise.
9653 (hppabsd_core_minisymbol_to_symbol): Likewise.
9654 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
9656 * hpux-core.c: Similarly.
9657 * irix-core.c: Similarly.
9658 * osf-core.c: Similarly.
9659 * sco5-core.c: Similarly.
9660 * binary.c (binary_make_empty_symbol): Remove function, define as
9661 _bfd_generic_make_empty_symbol.
9662 * ihex.c (ihex_make_empty_symbol): Likewise.
9663 * mmo.c (mmo_make_empty_symbol): Likewise.
9664 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
9665 * srec.c (srec_make_empty_symbol): Likewise.
9666 * versados.c (versados_make_empty_symbol): Likewise.
9667 * vms.c (_bfd_vms_make_empty_symbol): Remove.
9668 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
9669 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
9670 rather than _bfd_vms_make_empty_symbol.
9671 * vms-misc.c (new_symbol): Likewise.
9673 2002-01-05 Alan Modra <amodra@bigpond.net.au>
9675 * section.c (bfd_section_init): Remove unnecessary initialisations.
9676 (bfd_section_list_clear): New function.
9677 (bfd_section_list_remove, bfd_section_list_insert): New macros.
9678 (_bfd_strip_section_from_output): Use them.
9679 * coffcode.h (coff_set_alignment_hook): Likewise.
9680 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
9681 * elf64-mips.c (mips_elf64_final_link): Likewise.
9682 * elf64-mmix.c (mmix_elf_final_link): Likewise.
9683 * sunos.c (sunos_add_dynamic_symbols): Likewise.
9684 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
9685 * bfd-in2.h: Regenerate.
9687 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
9688 rather than doing our own section handling. Clean up after errors
9689 with bfd_release and bfd_section_list_clear. Handle unexpected
9691 * aoutf1.h (sunos4_core_file_p): Likewise.
9692 * aix386-core.c (aix386_core_file_p): Likewise.
9693 * cisco-core.c (cisco_core_file_validate): Likewise.
9694 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
9695 * trad-core.c (trad_unix_core_file_p): Likewise.
9697 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
9698 with bfd_release and bfd_section_list_clear.
9699 * hpux-core.c (hpux_core_core_file_p): Likewise.
9700 * irix-core.c (irix_core_core_file_p): Likewise.
9701 * lynx-core.c (lynx_core_file_p): Likewise.
9702 * osf-core.c (osf_core_core_file_p): Likewise.
9703 * rs6000-core.c (rs6000coff_core_p): Likewise.
9704 * sco5-core.c (sco5_core_file_p): Likewise.
9706 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
9707 sign extension adjustments without conditionals.
9709 2002-01-04 Jakub Jelinek <jakub@redhat.com>
9711 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
9712 CIE at .eh_frame start is removed due to no FDEs referencing it.
9714 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
9716 * config.bfd (x86_64-*-netbsd*): New target.
9717 * configure.in (x86_64-*-netbsd*): Set COREFILE
9719 * configure: Regenerated.
9721 2002-01-03 Tom Rix <trix@redhat.com>
9723 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
9724 for recent bfd_make_section_anyway change.
9726 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
9728 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
9729 R_ARM_THM_PC11 reloc.
9731 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
9733 * configure.in (LINGUAS): Add ja.
9734 * configure: Regenerate.
9735 * po/ja.po: Import from translation project's web site.
9737 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
9739 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
9740 messages to ease translation into other languages.
9742 For older changes see ChangeLog-0001
9748 version-control: never