1 2003-08-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3 * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
5 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
7 * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
9 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
11 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
12 ElfNN_External_Rela instead of Elf64_External_Rela.
14 2003-08-01 Nick Clifton <nickc@redhat.com>
16 * config.bfd: Add code to catch obsolete configurations and warn
17 about them unless --enable-obsolete is used. Use this to mark
18 vax-vms port as obsolete.
20 2003-07-30 Alan Modra <amodra@bigpond.net.au>
22 * elf32-ppc.c (ppc_elf_install_value): Tidy.
23 (ppc_elf_relax_section): Remove dead code. Remove unnecessary casts.
25 * elfxx-target.h: Remove PARAMS macro. Formatting.
27 2003-07-30 Alan Modra <amodra@bigpond.net.au>
29 * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
30 * elf64-ppc.c (get_fdh): New function, split out from
32 (ppc64_elf_check_relocs): Use get_fdh.
33 (func_desc_adjust): Likewise. Tidy.
34 (ppc64_elf_edit_opd): Tighten reloc checks. Free local_syms on error
35 exit. Use get_fdh. Account for superfluous dynamic relocs.
36 (ppc64_elf_relocate_section): Warning fix.
38 2003-07-30 Jason Eckhardt <jle@rice.edu>
40 * coff-i860.c: Convert to ISO C90. Remove superflous prototypes.
42 2003-07-30 Jason Eckhardt <jle@rice.edu>
44 * elf32-i860.c: Convert to ISO C90. Remove superflous prototypes.
46 2003-07-30 Randolph Chung <tausq@debian.org>
48 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
49 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
51 2003-07-30 Alan Modra <amodra@bigpond.net.au>
53 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
54 Replace PTR with void *. Formatting.
55 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
56 (make_mapping): Likewise.
58 2003-07-29 Alan Modra <amodra@bigpond.net.au>
60 * elf64-ppc.c (func_desc_adjust): Give linker created function
61 descriptor symbols a size and type.
62 (ppc64_elf_relocate_section): Correct lq insn test.
64 2003-07-28 Eric Christopher <echristo@redhat.com>
66 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
67 (ppc_elf_install_value): New function.
68 (ppc_elf_sort_rela): Remove.
69 (ppc_elf_relax_section): Rewrite. Remove old relaxation
70 and replace with out of range branch stubs.
71 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
73 2003-07-29 Alexandre Oliva <aoliva@redhat.com>
75 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
78 2003-07-28 Alan Modra <amodra@bigpond.net.au>
80 * elf.c (special_sections): Set attributes for .got and .plt.
82 2003-07-27 Alan Modra <amodra@bigpond.net.au>
84 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
85 on function descriptors.
86 (ELIMINATE_COPY_RELOCS): Expand comment.
87 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
90 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
92 * elf.c (_bfd_elf_new_section_hook): Set the default section
94 (elf_fake_sections): Set the section type based on asect->flags
95 if it is SHT_NULL. Don't abort on processor specific section
98 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
100 * bfd-in2.h: Regenerated.
102 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
104 * elf-bfd.h (bfd_elf_special_section): New.
105 (elf_backend_data): Add special_sections, a pointer to
106 bfd_elf_special_section.
107 (elf_section_type). New.
108 (elf_section_flags): New.
109 (_bfd_elf_get_sec_type_attr): New.
111 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
112 real section type/flags.
113 (special_sections): New.
114 (get_special_section): New.
115 (_bfd_elf_get_sec_type_attr): New.
116 (_bfd_elf_new_section_hook): Check special_section to set
117 elf_section_type and elf_section_flags.
118 (elf_fake_sections): Don't use section name to set ELF section
121 * elf32-m32r.c (m32r_elf_special_sections): New.
122 (elf_backend_special_sections): Defined.
124 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
125 (elf_backend_special_sections): Defined.
127 * elf32-mcore.c (mcore_elf_special_sections): New.
128 (elf_backend_special_sections): Defined.
130 * elf32-ppc.c (ppc_elf_special_sections): New.
131 (elf_backend_special_sections): Defined.
133 * elf32-sh64.c (sh64_elf_special_sections): New.
134 (elf_backend_special_sections): Defined.
136 * elf32-v850.c (v850_elf_special_sections): New.
137 (elf_backend_special_sections): Defined.
139 * elf32-xtensa.c (elf_xtensa_special_sections): New.
140 (elf_backend_special_sections): Defined.
142 * elf64-alpha.c (elf64_alpha_special_sections): New.
143 (elf_backend_special_sections): Defined.
145 * elf64-hppa.c (elf64_hppa_special_sections): New.
146 (elf_backend_special_sections): Defined.
148 * elf64-ppc.c (ppc64_elf_special_sections): New.
149 (elf_backend_special_sections): Defined.
151 * elf64-sh64.c (sh64_elf64_special_sections): New.
152 (elf_backend_special_sections): Defined.
154 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
155 (elf_backend_special_sections): Defined.
157 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
159 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
160 (elf_backend_special_sections): Defined.
162 * elfxx-target.h (elf_backend_special_sections): New. Default
164 (elfNN_bed): Initialize special_sections.
166 * section.c (bfd_abs_section): Remove const.
167 (bfd_und_section): Likewise.
168 (bfd_com_section): Likewise.
169 (bfd_ind_section): Likewise.
171 2003-07-24 Nick Clifton <nickc@redhat.com>
173 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
174 sections are assigned the LOAD attribute.
176 2003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
178 * elf32-sh.c: Convert to C90. Replace PTR with void *.
179 * elf32-sh64-com.c: Likewise.
180 * elf32-sh64.c: Likewise.
181 * elf32-sh64.h: Likewise.
182 * elf64-sh64.c: Likewise.
184 2003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
186 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
187 (allocate_dynrelocs): Likewise.
188 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
189 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
191 2003-07-24 Nick Clifton <nickc@redhat.com>
193 * po/fr.po: Updated French translation.
195 2003-07-23 Bob Wilson <bob.wilson@acm.org>
197 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
198 near the beginning of the file. Swap order of arguments. Call
199 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
200 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
201 (elf_xtensa_relocate_section): Likewise.
202 (shrink_dynamic_reloc_sections): Likewise.
204 2003-07-23 Bob Wilson <bob.wilson@acm.org>
206 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
207 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
208 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
209 first printing an error message.
210 (elf_xtensa_finish_dynamic_sections): Likewise.
211 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
212 discarding literal table entries.
213 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
214 (elf_xtensa_do_asm_simplify): Likewise.
216 2003-07-23 Stephane Carrez <stcarrez@nerim.fr>
218 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
219 we have a local symbol in common section.
221 2003-07-22 H.J. Lu <hongjiu.lu@intel.com>
223 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
226 2003-07-22 Nick Clifton <nickc@redhat.com>
228 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
229 expected RS6000 storage classes.
231 2003-07-21 H.J. Lu <hongjiu.lu@intel.com>
233 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
234 output_bfd unused to silence gcc.
236 2003-07-21 Nick Clifton <nickc@redhat.com>
238 * po/sv.po: Updated Swedish translation.
240 2003-07-21 Alan Modra <amodra@bigpond.net.au>
242 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
243 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
244 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
245 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
246 now done in _bfd_elf_symbol_refs_local_p.
247 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
248 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
249 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
251 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
253 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
255 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
257 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
258 (SYMBOL_CALLS_LOCAL): Likewise.
260 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
261 immediately if symbol isn't defined locally.
263 2003-07-18 Richard Henderson <rth@redhat.com>
265 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
266 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
267 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
268 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
269 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
270 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
271 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
272 Update all callers to provide the relocation being resolved.
274 2003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
276 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
279 2003-07-17 Nick Clifton <nickc@redhat.com>
281 * po/es.po: New Spanish translation.
282 * po/sv.po: New Swedish translation.
283 * po/opcodes.pot: Regenerate.
285 2003-07-16 Richard Henderson <rth@redhat.com>
287 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
288 * elfxx-ia64.c, targets.c: Likewise.
290 2003-07-16 Richard Henderson <rth@redhat.com>
292 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
293 for symbols defined locally plus -Bsymbolic. Tidy logic.
295 2003-07-15 Richard Sandiford <rsandifo@redhat.com>
297 * archures.c (bfd_mach_mips7000): New.
298 * bfd-in2.h: Regenerated.
299 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
300 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
301 (mips_mach_extensions): Add an entry for it.
303 2003-07-14 Nick Clifton <nickc@redhat.com>
305 * po/tr.po: Update with latest version.
306 * po/SRC-POTFILES.in: Regenerate.
307 * po/bfd.pot: Regenerate.
308 * Makfile.in: Regenerate.
309 * configure: Regenerate.
311 2003-07-12 Jeff Baker <jbaker@qnx.com>
313 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
314 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
315 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
316 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
318 2003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
320 * coffcode.h (coff_set_section_contents): Set the
321 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
323 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
325 * bfd-in.h (bfd_h8300_pad_address): Declare.
326 * bfd-in2.h: Regenerate.
327 * cpu-h8300.c (bfd_h8300_pad_address): New function.
328 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
329 addresses before checking whether they can be relaxed.
330 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
331 Don't complain about overflows in general 8-bit relocations.
332 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
333 Fix handling of R_H8_DIR24A8.
335 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
337 * elf32-h8300.c: Convert function prototypes and definitions
339 * coff-h8300.c: Likewise.
340 * cpu-h8300.c: Likewise.
342 2003-07-11 Alan Modra <amodra@bigpond.net.au>
344 * po/SRC-POTFILES.in: Regenerate.
345 * po/bfd.pot: Likewise.
347 2003-07-10 Bob Wilson <bob.wilson@acm.org>
349 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
350 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
352 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
353 and allocate memory for it.
354 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
355 section to the .got.loc section.
356 (elf_xtensa_finish_dynamic_sections): Fix up call to
357 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
358 the address of .got.loc.
359 (relax_property_section): Shrink .got.loc to match changes in any
360 literal table section.
361 (xtensa_is_property_section): Change to match
362 xtensa_get_property_section_name.
363 (xtensa_is_littable_section): New.
365 2003-07-10 H.J. Lu <hongjiu.lu@intel.com>
367 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
370 2003-07-10 Alan Modra <amodra@bigpond.net.au>
372 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
373 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
375 * Makefile.in: Regenerate.
377 2003-07-10 Alexandre Oliva <aoliva@redhat.com>
379 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
380 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
381 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
382 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
383 * elf32-am33lin.c: Rename global functions.
384 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
385 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
386 * configure.in (bfd_elf32_am33lin_vec): Added.
387 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
388 (elf32-am33lin.lo): List dependencies.
389 * aclocal.m4, configure, Makefile.in: Rebuilt.
390 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
391 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
392 ELF_ARCH was not defined before.
393 (elf_symbol_leading_char): Define if not defined.
394 * elf32-am33lin.c: Override the definitions above.
395 * targets.c (bfd_elf32_am33lin_vec): New.
397 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
399 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
400 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
402 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
403 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
404 ld-linux.so.2 to ld.so.1.
405 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
406 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
407 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
408 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
409 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
410 .rela.* section contents with bfd_zalloc.
411 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
412 * elf-m10300.c: Added declarations for functions missing them.
413 Merge some shared-library changes from the i386 back-end. Use
414 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
415 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
416 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
417 members of elf_link_hash_entry. Adjusted references.
418 (mn10300_elf_final_link_relocate): dynobj was already loaded
419 into a local variable, use it.
420 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
421 * elf-m10300.c: Add missing function prototypes.
422 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
423 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
424 relocation for dynamic relocations.
425 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
426 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
427 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
428 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
429 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
430 (_bfd_mn10300_elf_create_got_section): ... here, so that its
431 adress is already known at the time we compute relaxations.
432 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
433 and PLT32 to narrower relocations.
434 * libbfd.h, bfd-in2.h: Rebuilt.
435 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
436 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
437 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
438 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
439 BFD_RELOC_MN10300_RELATIVE): New relocs.
440 * libbfd.h, bfd-in2.h: Rebuilt.
441 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
442 (struct elf32_mn10300_link_hash_entry): Added DSO-related
444 (elf_mn10300_howto): Defined new relocation types.
445 (mn10300_reloc_map): Map them.
446 (_bfd_mn10300_elf_create_got_section): New fn.
447 (mn10300_elf_check_relocs): Handle PIC relocs.
448 (mn10300_elf_final_link_relocate): Likewise.
449 (mn10300_elf_relocate_section): Handle DSOs.
450 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
451 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
452 elf_mn10300_pic_plt_entry): New.
453 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
454 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
455 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
456 elf_mn10300_plt_reloc_offset: New macros.
457 (ELF_DYNAMIC_INTERPRETER): Likewise.
458 (_bfd_mn10300_elf_create_dynamic_sections): New function.
459 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
460 (_bfd_mn10300_elf_discard_copies): Likewise.
461 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
462 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
463 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
464 (elf_backend_can_gc_sections,
465 elf_backend_create_dynamic_sections,
466 elf_backend_adjust_dynamic_sections,
467 elf_backend_size_dynamic_sections,
468 elf_backend_finish_dynamic_symbol,
469 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
470 elf_backend_plt_readonly, elf_backend_want_plt_sym,
471 elf_backend_got_header_size, elf_backend_plt_header_size): New
474 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
476 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
477 * elf-m10300.c (compute_function_info): Account for AM33
478 registers in `movm' when computing stack space for `call' when
479 linking for AM33/2.0 link.
480 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
481 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
482 * bfd-in2.h: Rebuilt.
483 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
484 * elf-m10300.c: Updated.
485 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
486 * archures.c (bfd_mach_am332): Defined.
487 * bfd-in2.h: Rebuilt.
488 * cpu-m10300.c (bfd_am332_arch): Defined.
489 (bfd_am33_arch): Chained with am33-2.
490 * elf-m10300.c (elf_mn10300_mach): Handle am332.
491 (_bfd_mn10300_elf_final_write_processing): Likewise.
493 2003-07-09 H.J. Lu <hongjiu.lu@intel.com>
495 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
497 2003-07-10 Alan Modra <amodra@bigpond.net.au>
499 * elf64-ppc.c (bfd_elf64_mkobject): Define.
500 (struct ppc64_elf_obj_tdata): New.
501 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
502 (ppc64_elf_mkobject): New function.
503 (struct got_entry): Add "owner". Move "tls_type".
504 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
505 (ppc64_elf_init_stub_bfd): New function.
506 (create_got_section): Create header .got in dynobj. Create .got
507 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
508 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
509 Look for dynobj .got, and test it.
510 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
511 (update_local_sym_info): Likewise.
512 (ppc64_elf_check_relocs): Likewise.
513 (ppc64_elf_gc_sweep_hook): Likewise.
514 (ppc64_elf_tls_optimize): Likewise.
515 (allocate_dynrelocs): Likewise.
516 (ppc64_elf_size_dynamic_sections): Likewise.
517 (ppc64_elf_relocate_section): Likewise.
518 (ppc64_elf_next_toc_section): Update comment.
519 (toc_adjusting_stub_needed): Remove unneeded cast.
520 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
521 testing section flags.
522 (ppc64_elf_build_stubs): Likewise.
523 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
524 (ppc64_elf_finish_dynamic_sections): Write out got sections.
525 (func_desc_adjust): Copy over dynamic info for undef weaks.
526 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
527 (ppc64_elf_size_stubs): Update prototype.
528 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
529 input sections rather than scanning dynobj.
531 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
533 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
534 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
535 (mips_elf_create_msym_section): Delete.
536 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
537 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
538 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
539 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
540 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
541 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
542 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
544 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
546 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
549 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
551 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
552 of relocations whose offset is -2.
554 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
556 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
557 forced-local symbols like other locals. Don't create relocations
558 against STN_UNDEF in irix objects.
560 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
562 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
563 compatible objects, add the values of defined external symbols
566 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
568 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
569 initialize a GOT entry to the symbol's st_value.
571 2003-07-08 Alan Modra <amodra@bigpond.net.au>
573 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
574 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
575 (ppc_elf_tdata): Define.
576 (elf_local_ptr_offsets): Adjust.
577 (ppc_elf_mkobject): New function.
578 (bfd_elf32_mkobject): Define.
580 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
581 * elfcore.h (elf_core_file_p): Likewise.
582 * section.c (bfd_section_init): Remove prototype.
584 2003-07-08 Alan Modra <amodra@bigpond.net.au>
586 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
588 (enum elf_linker_section_enum): Delete.
589 (struct elf_linker_section): Delete.
590 (struct elf_linker_section_pointers): Delete.
591 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
592 Make linker_section_pointers a void**.
593 (elf_local_ptr_offsets, elf_linker_section): Don't define.
594 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
595 of old item in elf-bfd.h.
596 (struct elf_linker_section): Likewise.
597 (struct elf_linker_section_pointers): Likewise.
598 (elf_local_ptr_offsets): Define.
599 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
600 (ppc_elf_link_hash_newfunc): Init it.
601 (struct ppc_elf_link_hash_table): Add sbss.
602 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
604 (elf_create_linker_section): Fold into..
605 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
606 Make rela section here if shared.
607 (elf_find_pointer_linker_section): Pass lsect rather than enum.
608 (elf_create_pointer_linker_section): Adjust. zalloc rather than
610 (elf_finish_pointer_linker_section): Adjust. Don't make rela
612 (ppc_elf_check_relocs): Adjust.
613 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
614 creating .sbss by hand.
615 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
617 2003-07-04 Jakub Jelinek <jakub@redhat.com>
619 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
620 complain_overflow_bitfield.
621 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
622 complain_overflow_bitfield.
624 2003-07-04 Jakub Jelinek <jakub@redhat.com>
626 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
629 2003-07-04 Jakub Jelinek <jakub@redhat.com>
631 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
632 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
634 (get_fptr): For -pie create .opd as writable section and create
636 (elfNN_ia64_check_relocs): Change info->shared into
638 (allocate_fptr): Likewise.
639 (allocate_dynrel_entries): Account for a relative reloc for -pie
640 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
641 for undefweak symbol. Account for an IPLT reloc in .rela.opd
643 (set_got_entry): Don't create a relative reloc if -pie
644 want_ltoff_fptr for undefweak symbol.
645 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
646 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
649 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
651 * elf32-i386.c (elf_i386_relocate_section): Likewise.
652 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
653 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
654 * elf64-s390.c (elf_s390_relocate_section): Likewise.
655 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
656 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
657 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
658 * elf32-s390.c (elf_s390_relocate_section): Likewise.
659 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
661 2003-07-04 Paul Clarke <paulc@senet.com.au>
663 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
664 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
665 <R_H8_DIR32A16>: Fix type of relocation.
667 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
669 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
670 sections were created already. Remove unnecessary tests of
673 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
675 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
676 bfd_make_section for existing sections.
678 2003-07-04 Alan Modra <amodra@bigpond.net.au>
680 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
681 create_got_section if we already have done so.
682 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
683 (sh_elf_check_relocs): Likewise.
684 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
685 htab->root.dynobj instead.
686 (sh_elf_check_relocs): Likewise.
687 (sh_elf_finish_dynamic_sections): Likewise.
689 * section.c (bfd_make_section): Return NULL for existing section.
691 2003-07-04 Alan Modra <amodra@bigpond.net.au>
693 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
694 ppc_elf_create_got if we've already done so.
696 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
697 (_bfd_elf_find_pointer_linker_section): Likewise.
698 (bfd_elf32_create_pointer_linker_section): Likewise.
699 (bfd_elf32_finish_pointer_linker_section): Likewise.
700 (bfd_elf64_create_pointer_linker_section): Likewise.
701 (bfd_elf64_finish_pointer_linker_section): Likewise.
702 (_bfd_elf_make_linker_section_rela): Likewise.
703 * elfcode.h (elf_create_pointer_linker_section): Don't define.
704 (elf_finish_pointer_linker_section): Likewise.
705 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
706 (_bfd_elf_create_linker_section): Move this function..
707 (_bfd_elf_find_pointer_linker_section): ..and this..
708 * elflink.h (elf_create_pointer_linker_section): ..and this..
709 (elf_finish_pointer_linker_section): ..and this..
710 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
712 (elf_create_linker_section): Convert to C90, tidy.
713 (elf_find_pointer_linker_section): Likewise.
714 (elf_create_pointer_linker_section): Likewise.
715 (elf_finish_pointer_linker_section): Likewise.
716 * elf32-i370.c: Delete #if 0 code.
718 2003-07-02 Alan Modra <amodra@bigpond.net.au>
720 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
721 _restf* to be satisfied by shared libs, and always force them local.
722 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
723 Correct test for "bl".
724 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
727 2003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
729 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
730 (s390_tls_reloc): New function.
731 (elf_howto_table): Add long displacement relocations R_390_20,
732 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
733 (elf_s390_reloc_type_lookup): Likewise.
734 (elf_s390_check_relocs): Likewise.
735 (elf_s390_gc_sweep_hook): Likewise.
736 (elf_s390_relocate_section): Likewise.
737 * elf64-s390.c: Same changes as for elf32-s390.c.
738 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
739 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
740 BFD_RELOC_390_TLS_GOTIE20.
741 * bfd-in2.h: Regenerate.
742 * libbfd.h: Likewise.
744 2003-06-30 Alan Modra <amodra@bigpond.net.au>
746 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
747 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
749 2003-06-29 Alan Modra <amodra@bigpond.net.au>
751 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
752 Replace PTR with void *. Formatting.
753 * archive64.c: Likewise.
754 * archures.c: Likewise.
755 * bfd-in.h: Likewise.
758 * bfdwin.c: Likewise.
760 * corefile.c: Likewise.
761 * format.c: Likewise.
763 * libbfd-in.h: Likewise.
764 * libbfd.c: Likewise.
765 * linker.c: Likewise.
766 * opncls.c: Likewise.
768 * section.c: Likewise.
769 * simple.c: Likewise.
771 * targets.c: Likewise.
772 * bfd-in2.h: Regenerate.
773 * libbfd.h: Regenerate.
775 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
776 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
777 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
778 (bfd_getb64): Rewrite without parens.
779 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
780 * cache.c (insert, snip): Remove INLINE.
781 * linker.c (bfd_link_add_undef): Likewise.
783 2003-06-29 Andreas Jaeger <aj@suse.de>
785 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
786 unnecessary prototypes. Replace PTR with void *.
787 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
788 trim plt entries. Move undefweak non-default visibility test ...
789 (allocate_dynrelocs): ... from here.
790 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
792 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
793 SYMBOL_REFERENCES_LOCAL for dynreloc check.
794 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
795 dynreloc and .got relocs.
796 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
799 2003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
801 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
803 2003-06-27 Nick Clifton <nickc@redhat.com>
805 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
806 bfd_add_gnu_debuglink_section and only create the section, do not
807 fill in its contents.
808 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
809 contents of a .gnu-debuglink section.
810 * bfd-in2.h: Regenerate.
812 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
814 * elfxx-mips.c: Revert .got alignment to 2**4.
816 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
818 * elf32-mips.c: Fix addend for _gp_disp special symbol.
820 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
822 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
823 relocation header setup.
825 2003-06-25 Alan Modra <amodra@bigpond.net.au>
827 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
828 (ppc_elf_reloc_type_lookup): Modify comment.
829 (ppc_elf_info_to_howto): Ditto.
830 (ppc_elf_relocate_section): Ditto.
831 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
833 2003-06-25 Alan Modra <amodra@bigpond.net.au>
835 * aout-ns32k.c: Correct spelling of "relocatable".
837 * bfd-in.h: Likewise.
840 * coff-a29k.c: Likewise.
841 * coff-alpha.c: Likewise.
842 * coff-arm.c: Likewise.
843 * coff-i386.c: Likewise.
844 * coff-i860.c: Likewise.
845 * coff-i960.c: Likewise.
846 * coff-m68k.c: Likewise.
847 * coff-m88k.c: Likewise.
848 * coff-mcore.c: Likewise.
849 * coff-mips.c: Likewise.
850 * coff-or32.c: Likewise.
851 * coff-ppc.c: Likewise.
852 * coff-rs6000.c: Likewise.
853 * coff-sh.c: Likewise.
854 * coff-tic80.c: Likewise.
855 * coff64-rs6000.c: Likewise.
856 * cofflink.c: Likewise.
857 * cpu-ns32k.c: Likewise.
859 * ecofflink.c: Likewise.
860 * elf-bfd.h: Likewise.
861 * elf-eh-frame.c: Likewise.
862 * elf-hppa.h: Likewise.
863 * elf-m10200.c: Likewise.
864 * elf-m10300.c: Likewise.
866 * elf32-arm.h: Likewise.
867 * elf32-avr.c: Likewise.
868 * elf32-cris.c: Likewise.
869 * elf32-d10v.c: Likewise.
870 * elf32-dlx.c: Likewise.
871 * elf32-fr30.c: Likewise.
872 * elf32-frv.c: Likewise.
873 * elf32-h8300.c: Likewise.
874 * elf32-hppa.c: Likewise.
875 * elf32-i370.c: Likewise.
876 * elf32-i386.c: Likewise.
877 * elf32-i860.c: Likewise.
878 * elf32-i960.c: Likewise.
879 * elf32-ip2k.c: Likewise.
880 * elf32-iq2000.c: Likewise.
881 * elf32-m32r.c: Likewise.
882 * elf32-m68hc11.c: Likewise.
883 * elf32-m68hc1x.c: Likewise.
884 * elf32-m68k.c: Likewise.
885 * elf32-mcore.c: Likewise.
886 * elf32-mips.c: Likewise.
887 * elf32-msp430.c: Likewise.
888 * elf32-openrisc.c: Likewise.
889 * elf32-ppc.c: Likewise.
890 * elf32-s390.c: Likewise.
891 * elf32-sh.c: Likewise.
892 * elf32-sh64.c: Likewise.
893 * elf32-sparc.c: Likewise.
894 * elf32-v850.c: Likewise.
895 * elf32-vax.c: Likewise.
896 * elf32-xstormy16.c: Likewise.
897 * elf32-xtensa.c: Likewise.
898 * elf64-alpha.c: Likewise.
899 * elf64-hppa.c: Likewise.
900 * elf64-mips.c: Likewise.
901 * elf64-mmix.c: Likewise.
902 * elf64-ppc.c: Likewise.
903 * elf64-s390.c: Likewise.
904 * elf64-sh64.c: Likewise.
905 * elf64-sparc.c: Likewise.
906 * elf64-x86-64.c: Likewise.
907 * elfcode.h: Likewise.
908 * elflink.h: Likewise.
909 * elfn32-mips.c: Likewise.
910 * elfxx-ia64.c: Likewise.
911 * elfxx-mips.c: Likewise.
912 * i386linux.c: Likewise.
914 * libcoff-in.h: Likewise.
915 * linker.c: Likewise.
916 * m68klinux.c: Likewise.
918 * pe-mips.c: Likewise.
919 * peXXigen.c: Likewise.
921 * reloc16.c: Likewise.
922 * sparclinux.c: Likewise.
925 * versados.c: Likewise.
927 * xcofflink.c: Likewise.
928 * bfd-in2.h: Regenerate.
929 * libcoff.h: Regenerate.
930 * libbfd.h: Regenerate.
932 2003-06-24 Alan Modra <amodra@bigpond.net.au>
934 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
937 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
938 prototypes and casts. Replace PTR with void *. Formatting.
939 * elf32-ppc.c: Likewise. Break long strings too.
940 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
941 (ppc_elf_unhandled_reloc): Internationalize error message.
942 * elf32-ppc.h: Remove PARAMS.
944 2003-06-23 Mark Mitchell <mark@codesourcery.com>
946 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
948 (ppc_elf_final_write_processing): Likewise.
950 2003-06-23 H.J. Lu <hongjiu.lu@intel.com>
952 * elflink.h (elf_link_input_bfd): Check raw size when using
953 kept_section to preserve debug information discarded by
956 2003-06-20 Alan Modra <amodra@bigpond.net.au>
958 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
959 (ppc64_elf_setup_section_lists): Set it.
960 (ppc64_elf_relocate_section): Check sym section id against top_id.
961 (ppc_build_one_stub): Comment on top_id.
963 2003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
965 * config.bfd: Add tic4x-*-rtems*.
967 2003-06-20 Alan Modra <amodra@bigpond.net.au>
969 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
970 prototypes and casts. Replace PTR with void *. Format copyright.
972 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
973 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
974 (ppc_type_of_stub): Make r_type an enum.
975 (ppc64_elf_size_stubs): Likewise.
976 * elf64-ppc.h: Remove PARAMS macro.
978 2003-06-19 Alan Modra <amodra@bigpond.net.au>
980 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
983 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
984 (ppc64_elf_info_to_howto): Likewise.
985 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
986 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
988 2003-06-19 Alan Modra <amodra@bigpond.net.au>
990 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
991 reloc overflow on discarded eh_frame entries.
993 2003-06-19 Alan Modra <amodra@bigpond.net.au>
995 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
996 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
997 Return error condition.
998 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
999 that have has_gp_reloc set.
1000 (struct ppc_link_hash_table): Add stub_count.
1001 (ppc_build_one_stub): Increment it.
1002 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
1004 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
1006 2003-06-18 Alan Modra <amodra@bigpond.net.au>
1008 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
1009 size calculation from addend. Round size up.
1011 2003-06-18 Hans-Peter Nilsson <hp@axis.com>
1013 * elf32-cris.c (cris_elf_relocate_section) <case
1014 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
1015 symbol from a normal object or an undefined weak symbol.
1017 2003-06-18 Alan Modra <amodra@bigpond.net.au>
1019 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
1022 2003-06-17 H.J. Lu <hongjiu.lu@intel.com>
1024 * section.c (struct sec): Put back kept_section.
1025 (STD_SECTION): Put back kept_section initialization.
1026 * bfd-in2.h: Regenerate.
1028 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
1029 sections for relocateable output. Use kept_section to preserve
1030 debug information discarded by linkonce.
1032 2003-06-17 Roland McGrath <roland@redhat.com>
1034 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
1035 segment-relative relocation between different segments.
1037 2003-06-17 Alan Modra <amodra@bigpond.net.au>
1039 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
1040 optimizations earlier.
1042 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
1043 Restore previous input_list type.
1044 (ppc64_elf_link_hash_table_create): Undo last change.
1045 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
1046 per output section, but don't bother with bfd_abs_section marker.
1047 (ppc64_elf_next_input_section): Adjust for multiple input section
1049 (group_sections): Likewise.
1051 2003-06-17 Jakub Jelinek <jakub@redhat.com>
1053 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
1054 *r_offset == r_addend for RELATIVE relocs against .got.
1056 2003-06-17 Alan Modra <amodra@bigpond.net.au>
1058 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
1060 2003-06-17 Nick Clifton <nickc@redhat.com>
1062 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
1063 in the vtable_entries_used array to allow for the accessing
1064 the largest element.
1066 2003-06-17 Alan Modra <amodra@bigpond.net.au>
1068 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
1070 (ppc64_elf_link_hash_table_create): Init input_list here.
1071 (ppc64_elf_setup_section_lists): Remove code setting up input lists
1072 per output section. Set toc_off for abs and other standard sections.
1073 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
1074 (ppc64_elf_next_input_section): Adjust for single input section list.
1075 Don't set toc_curr from input bfds that haven't set elf_gp.
1076 (group_sections): Adjust for single input section list.
1078 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
1080 2003-06-16 Alan Modra <amodra@bigpond.net.au>
1082 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
1083 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
1084 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
1085 got section for RELATIVE relocs. Fix wrong comment. Change condition
1086 under which dynamic relocs update the section contents.
1088 2003-06-13 Robert Millan <zeratul2@wanadoo.es>
1090 * config.bfd: Add i386-netbsd-gnu target.
1092 2003-06-12 Nick Clifton <nickc@redhat.com>
1094 * opncls.c (calc_crc32): Rename to
1095 bfd_calc_gnu_debuglink_crc32 and export.
1096 (GNU_DEBUGLINK): Define and use to replace occurrences of
1097 hard-coded ".gnu_debuglink" in the code.
1098 (get_debug_link_info): Prevent aborts by replacing call to
1099 xmalloc with a call to malloc.
1100 (find_separate_debug_file): Prevent aborts by replacing calls
1101 to xmalloc and xstrdup with calls to malloc and strdup.
1102 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
1104 * bfd-in2.h: Regenerate.
1106 2003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
1108 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
1109 New target (was i[3-7]86-*-openbsd* before).
1110 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
1111 (vax-*-openbsd*): New target.
1113 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1115 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
1117 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
1118 (mips_elf_rel_dyn_section): Use appropriate section alignment.
1119 (mips_elf_create_got_section): Likewise.
1120 (_bfd_mips_elf_create_dynamic_sections): Likewise.
1122 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1124 * elf32-mips.c (mips_elf_generic_reloc): New Function.
1125 (elf_mips_howto_table_rel): Use it.
1126 (gprel32_with_gp): Move prototype.
1127 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
1128 Use mips_elf_generic_reloc.
1129 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
1131 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
1133 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
1134 as in the other *_gprel*_reloc functions.
1135 (gprel32_with_gp): Handle partial_inplace properly.
1136 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
1137 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
1138 Do addend handling directly instead of calling
1139 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
1140 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
1141 of zero addend. Handle partial_inplace properly.
1142 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
1144 (mips_elf64_gprel16_reloc): Likewise.
1145 (mips_elf64_literal_reloc): Likewise.
1146 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
1147 logic as in the other *_gprel*_reloc functions. Handle
1148 partial_inplace properly.
1149 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
1150 addend. Handle partial_inplace properly.
1151 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
1152 of calling _bfd_mips_elf_gprel16_with_gp.
1153 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
1154 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
1156 (mips_elf_shift6_reloc): Handle partial_inplace properly.
1157 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
1158 of calling _bfd_mips_elf_gprel16_with_gp.
1159 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
1160 partial_inplace properly. Fix wrong addend handling. Fix overflow
1162 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
1164 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
1165 (_bfd_mips_elf_relocate_section): Likewise.
1166 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
1167 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
1168 (_bfd_mips_elf_sign_extend): New prototype.
1170 2003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
1172 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
1173 New target (was sparc-*-openbsd* before).
1174 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
1176 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
1177 * configure: Regenerate.
1179 2003-06-11 H.J. Lu <hongjiu.lu@intel.com>
1181 * po/Make-in (DESTDIR): New.
1182 (install-data-yes): Support $(DESTDIR).
1183 (uninstall): Likewise.
1185 2003-06-11 Alan Modra <amodra@bigpond.net.au>
1187 * Makefile.am (config.status): Depend on version.h.
1189 * Makefile.in: Regenerate.
1190 * po/SRC-POTFILES.in: Regenerate.
1192 2003-06-10 Alan Modra <amodra@bigpond.net.au>
1193 Gary Hade <garyhade@us.ibm.com>
1195 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
1197 2003-06-10 Richard Sandiford <rsandifo@redhat.com>
1199 * archures.c (bfd_mach_h8300sxn): New architecture.
1200 * bfd-in2.h: Regenerate.
1201 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
1202 (h8300sxn_info_struct): New.
1203 (h8300sx_info_struct): Link to it.
1204 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
1205 (elf32_h8_final_write_processing): Likewise.
1207 2003-06-08 Alan Modra <amodra@bigpond.net.au>
1209 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
1210 elfxx-target.h so that we can use elf_backend_got_header_size.
1211 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
1212 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
1214 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
1216 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
1217 ppc_stub_plt_branch_r2off.
1218 (struct ppc_stub_hash_entry): Reorganize.
1219 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
1220 toc_curr, toc_off and emit_stub_syms.
1221 (ppc64_elf_link_hash_table_create): Init them.
1222 (ppc_stub_name): Correct string size.
1223 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
1224 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
1226 (ppc_type_of_stub): Tweak root.type test.
1227 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
1228 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
1229 ppc_stub_plt_branch_r2off.
1230 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
1231 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
1232 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
1233 Initialize elf_gp and toc_curr.
1234 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
1235 (ppc64_elf_next_input_section): Set toc_off.
1236 (group_sections): Ensure groups have the same TOC.
1237 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
1238 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
1239 Build new glink stub.
1240 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
1241 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
1242 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
1243 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
1244 * section.c (struct sec): Rename flag12 to has_gp_reloc.
1245 (STD_SECTION): Update.
1246 * ecoff.c (bfd_debug_section): Update comment.
1247 * bfd-in2.h: Regenerate.
1249 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
1251 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
1252 NULL function pointers.
1254 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
1256 * simple.c (bfd_simple_get_relocated_section_contents): Call
1257 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
1259 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
1261 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
1262 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
1264 * coff-tic4x.c: Ditto
1265 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
1266 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
1267 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
1268 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
1270 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
1271 * coff-a29k.c: Append COFF_SWAP_TABLE argument
1272 * coff-apollo.c: Ditto
1274 * coff-h8300.c: Ditto
1275 * coff-h8500.c: Ditto
1276 * coff-i960.c: Ditto
1277 * coff-m68k.c: Ditto
1278 * coff-m88k.c: Ditto
1279 * coff-mcore.c: Ditto
1281 * coff-sparc.c: Ditto
1282 * coff-tic80.c: Ditto
1283 * coff-we32k.c: Ditto
1287 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
1289 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
1292 2003-06-03 Jakub Jelinek <jakub@redhat.com>
1294 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
1295 (bfd_section_from_phdr): Likewise.
1296 (map_sections_to_segments): Create PT_GNU_STACK segment header.
1297 (get_program_header_size): Count with PT_GNU_STACK.
1298 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
1299 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
1301 2003-06-03 H.J. Lu <hongjiu.lu@intel.com>
1303 * elflink.h (elf_link_input_bfd): Call linker error_handler
1304 for discarded definitions.
1306 2003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
1308 * syms.c (decode_section_type): Return 'n' if section flags are
1309 SEC_HAS_CONTENTS && SEC_READONLY.
1311 2003-06-03 Nick Clifton <nickc@redhat.com>
1313 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
1314 R_V850_ABS32. Add entry for R_V850_REL32.
1315 (v850_elf_reloc_map): Likewise.
1316 (v850_elf_check_relocs): Likewise.
1317 (v850_elf_perform_relocation): Likewise.
1318 (v850_elf_final_link_relocate): Likewise. Include computation
1319 to make R_V850_REl32 pc-relative.
1321 2003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1323 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
1324 and DT_DEBUG dynamic tag even for position independent executables.
1325 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
1327 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
1329 * config.bfd: Move obsolete entries out of the range of the
1330 targmatch sed script.
1332 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
1334 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
1336 2003-05-31 Jakub Jelinek <jakub@redhat.com>
1338 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
1339 plt entries, not just 8191.
1341 2003-05-30 Daniel Jacobowitz <drow@mvista.com>
1343 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
1344 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
1346 2003-05-30 Ulrich Drepper <drepper@redhat.com>
1347 Jakub Jelinek <jakub@redhat.com>
1349 * elflink.h (elf_link_add_object_symbols): Use !info->executable
1350 instead of info->shared where appropriate.
1351 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
1352 * elflink.c (_bfd_elf_create_got_section): Likewise.
1353 (_bfd_elf_link_create_dynamic_sections): Likewise.
1354 (_bfd_elf_link_assign_sym_version): Likewise.
1355 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
1356 and DT_DEBUG dynamic tag even for position independent executables.
1357 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
1358 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
1359 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
1360 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
1361 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
1362 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
1363 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
1364 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
1365 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
1367 2003-05-30 Kris Warkentin <kewarken@qnx.com>
1369 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
1371 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
1373 2003-05-29 Nick Clifton <nickc@redhat.com>
1375 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
1377 * Makefile.am: Add dependency on safe-ctype.h.
1378 * Makefile.in: Regenerate.
1380 2003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1382 * elfxx-mips.c: Don't force symbols local unconditionally.
1384 2003-05-28 Alan Modra <amodra@bigpond.net.au>
1386 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
1387 undefined_symbol call.
1389 2003-05-27 Richard Sandiford <rsandifo@redhat.com>
1391 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
1392 (mips_elf_link_hash_table): Likewise.
1394 2003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1396 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
1397 R_MIPS_GNU_REL16_S2 support.
1398 (bfd_elf64_bfd_reloc_type_lookup): Use it.
1399 (mips_elf64_rtype_to_howto): Use it.
1400 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
1401 R_MIPS_GNU_REL16_S2 support.
1402 (bfd_elf32_bfd_reloc_type_lookup): Use it.
1403 (mips_elf_n32_rtype_to_howto): Use it.
1405 2003-05-21 Stuart F. Downing <sdowning@fame.com>
1407 * som.h: Define PA_2_0 before including a.out.h
1409 2003-05-07 Eric Christopher <echristo@redhat.com>
1410 Alexandre Oliva <aoliva@redhat.com>
1412 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
1413 pic tests, change to warning.
1414 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
1416 2003-05-21 Marcus Comstedt <marcus@mc.pp.se>
1418 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
1419 well as shle-...-netbsdelf. Remove duplicate entry.
1421 2003-05-21 Nick Clifton <nickc@redhat.com>
1423 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
1424 for X_STORMY16_REL_12 reloc.
1426 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
1427 the type of the hash table in the bfd_link_info structure.
1428 (bfd_elf_get_runpath_list): Likewise.
1430 2003-05-19 Roland McGrath <roland@redhat.com>
1432 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
1433 * bfd-in.h: Declare it.
1434 * bfd-in2.h: Regenerated.
1435 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
1436 * elf-bfd.h (struct elf_backend_data): New function pointer member
1437 elf_backend_bfd_from_remote_memory.
1438 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
1440 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
1441 (elfNN_bed): Add that to the initializer.
1443 2003-05-15 Roland McGrath <roland@redhat.com>
1445 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
1447 2003-05-20 Jakub Jelinek <jakub@redhat.com>
1449 * elflink.h (elf_link_output_extsym): Only issue error about !=
1450 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
1452 2003-05-20 H.J. Lu <hongjiu.lu@intel.com>
1454 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
1455 when removing the old definition for symbols with non-default
1458 2003-05-18 Jason Eckhardt <jle@rice.edu>
1460 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
1462 2003-05-17 Andreas Schwab <schwab@suse.de>
1464 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
1465 elf_section_data during processing of pc-relative and absolute
1467 (elf_m68k_relocate_section): Use the cached reloc section instead
1468 of computing it again. Fix handling of visibility. Don't modify
1469 addend when copying over a relocation into the output.
1471 2003-05-17 Alan Modra <amodra@bigpond.net.au>
1473 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
1474 to trim plt entries. Move undefweak non-default visibility test..
1475 (allocate_dynrelocs): ..from here.
1476 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
1477 dynamic_sections_created here. Update comment. Move undefweak
1478 non-default visibility test..
1479 (allocate_dynrelocs): ..from here. Fix comment.
1480 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
1481 to trim plt entries. Move undefweak non-default visibility test..
1482 (allocate_dynrelocs): ..from here. Fix comment.
1483 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
1484 STV_DEFAULT rather than comparing with zero.
1485 * elflink.c (_bfd_elf_merge_symbol): Likewise.
1486 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
1488 2003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1490 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
1492 (_bfd_set_gp_value): Likewise.
1494 2003-05-16 Michael Snyder <msnyder@redhat.com>
1495 From Bernd Schmidt <bernds@redhat.com>
1496 * archures.c (bfd_mach_h8300sx): New.
1497 * bfd-in2.h: Regenerate.
1498 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
1499 (h8300sx_info_struct): New.
1500 (h8300s_info_struct): Link to it.
1501 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
1502 (elf32_h8_final_write_processing): Likewise.
1503 (elf32_h8_relax_section): Likewise.
1505 2003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
1507 * config.bfd: Accept i[3-7]86 variants.
1508 * configure.host: Likewise.
1509 * configure.in: Likewise.
1510 * configure: Regenerate.
1512 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
1514 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
1517 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
1519 * elflink.h (elf_link_check_versioned_symbol): Also allow
1522 2003-05-15 Alan Modra <amodra@bigpond.net.au>
1523 H.J. Lu <hongjiu.lu@intel.com>
1525 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
1526 (elf_i386_relocate_section): Likewise.
1527 * elf32-ppc.c (allocate_dynrelocs): Likewise.
1528 (ppc_elf_relocate_section): Likewise.
1529 * elf64-ppc.c (allocate_dynrelocs): Likewise.
1530 (ppc64_elf_relocate_section): Likewise.
1532 2003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1534 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
1536 2003-05-13 Stephane Carrez <stcarrez@nerim.fr>
1538 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
1539 processor capability, allow merge of HC12 and HCS12 in some cases.
1540 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
1541 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
1542 (bfd_m68hc12_arch): Link it.
1543 (scan_mach): New function.
1545 2003-05-13 Andrew Haley <aph@redhat.com>
1547 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
1549 2003-05-13 Alan Modra <amodra@bigpond.net.au>
1550 H.J. Lu <hongjiu.lu@intel.com>
1552 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
1553 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
1554 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
1555 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
1556 (ppc_elf_relocate_section): Likewise.
1557 * elf64-ppc.c (allocate_dynrelocs): Likewise.
1558 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
1559 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
1560 relocs need no other types.
1561 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
1563 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
1564 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
1567 2003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1569 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
1570 copy ELF_LINK_NON_GOT_REF from weakdef.
1571 (allocate_dynrelocs): For undef weak syms with non-default
1572 visibility, a) don't allocate plt entries, b) don't allocate
1573 .got relocs, c) discard dyn rel space
1574 (sh_elf_relocate_section): d) don't generate .got relocs, e)
1575 don't generate dynamic relocs.
1576 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
1577 for weakdefs when symbol already adjusted.
1579 2003-05-12 Nick Clifton <nickc@redhat.com>
1581 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
1582 overflow detection for R_XSTORMY16_16 reloc.
1584 2003-05-12 Paul Clarke <paulc@senet.com.au>
1586 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
1588 2003-05-11 Jason Eckhardt <jle@rice.edu>
1590 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
1592 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
1594 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
1597 2003-05-11 Andreas Schwab <schwab@suse.de>
1599 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
1600 complicated tests for unresolvable relocs with a simple direct
1601 scheme using "unresolved_reloc" var. Report some detail on
1602 bfd_reloc_outofrange and similar errors.
1604 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1606 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
1607 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
1608 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
1609 * elf64-s390.c: Likewise.
1611 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1613 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
1614 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
1615 ELF_LINK_NON_GOT_REF from weakdef.
1616 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
1617 already been adjusted before treating it specially.
1618 * el64-s390.c: Likwise.
1620 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1622 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
1623 non-default visibility, a) don't make them dynamic, b) discard
1624 space for dynamic relocs.
1625 (elf_s390_relocate_section): Initialize the GOT entries and skip
1626 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
1627 symbols with non-default visibility.
1628 * elf64-s390.c: Likewise.
1630 2003-05-09 Alan Modra <amodra@bigpond.net.au>
1632 * cpu-arm.c (arm_check_note): Warning fix.
1633 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
1634 to keep relocs if edited.
1635 (iq2000_elf_print_private_bfd_data): Return TRUE.
1636 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
1638 (elfNN_ia64_relax_ldxmov): Warning fix.
1639 * xtensa-isa.c (xtensa_add_isa): Warning fix.
1640 * xtensa-modules.c (get_num_opcodes): Warning fix.
1642 2003-05-09 Andrey Petrov <petrov@netbsd.org>
1644 * elf.c (elf_fake_sections): Use correct cast for sh_name.
1646 2003-05-09 Alan Modra <amodra@bigpond.net.au>
1648 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
1649 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
1650 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
1651 (bfd_elf_record_link_assignment): Move from elflink.h.
1652 (_bfd_elf_merge_symbol): Likewise.
1653 (_bfd_elf_add_default_symbol): Likewise.
1654 (_bfd_elf_export_symbol): Likewise.
1655 (_bfd_elf_link_find_version_dependencies): Likewise.
1656 (_bfd_elf_link_assign_sym_version): Likewise.
1657 (_bfd_elf_link_read_relocs): Likewise.
1658 (_bfd_elf_link_size_reloc_section): Likewise.
1659 (_bfd_elf_fix_symbol_flags): Likewise.
1660 (_bfd_elf_adjust_dynamic_symbol): Likewise.
1661 (_bfd_elf_link_sec_merge_syms): Likewise.
1662 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
1663 and bed->s->sizeof_rela.
1664 (_bfd_elf_link_output_relocs): Likewise.
1665 * elf-bfd.h (struct elf_size_info): Rename file_align to
1667 (struct elf_info_failed): Move from elflink.h.
1668 (struct elf_assign_sym_version_info): Likewise.
1669 (struct elf_find_verdep_info): Likewise.
1670 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
1671 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
1672 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
1673 _bfd_elf_link_assign_sym_version,
1674 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
1675 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
1676 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
1677 _bfd_elf_link_sec_merge_syms): Declare.
1678 (bfd_elf32_link_create_dynamic_sections): Don't declare.
1679 (_bfd_elf32_link_read_relocs): Likewise.
1680 (bfd_elf64_link_create_dynamic_sections): Likewise.
1681 (_bfd_elf64_link_read_relocs): Likewise.
1682 * elflink.h: Move lots o' stuff elsewhere.
1683 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
1684 (bfd_elf64_record_link_assignment): Likewise.
1685 (bfd_elf_record_link_assignment): Declare.
1686 * bfd-in2.h: Regenerate.
1687 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
1688 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
1689 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
1690 (assign_file_positions_for_segments): Likewise.
1691 (assign_file_positions_except_relocs): Likewise.
1692 (swap_out_syms, elfcore_write_note): Likewise.
1693 * elf-m10200.c: Adjust for changed function names.
1694 * elf-m10300.c: Likewise.
1695 * elf32-arm.h: Likewise.
1696 * elf32-h8300.c: Likewise.
1697 * elf32-hppa.c: Likewise.
1698 * elf32-ip2k.c: Likewise.
1699 * elf32-m32r.c: Likewise.
1700 * elf32-m68hc11.c: Likewise.
1701 * elf32-m68hc1x.c: Likewise.
1702 * elf32-m68k.c: Likewise.
1703 * elf32-mips.c: Likewise.
1704 * elf32-ppc.c: Likewise.
1705 * elf32-sh.c: Likewise.
1706 * elf32-v850.c: Likewise.
1707 * elf32-xtensa.c: Likewise.
1708 * elf64-alpha.c: Likewise.
1709 * elf64-hppa.c: Likewise.
1710 * elf64-mmix.c: Likewise.
1711 * elf64-ppc.c: Likewise.
1712 * elf64-sh64.c: Likewise.
1713 * elfxx-ia64.c: Likewise.
1714 * elfxx-mips.c: Likewise.
1715 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
1716 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
1717 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
1718 * elf64-mips.c (mips_elf64_size_info): Likewise.
1719 * elf64-s390.c (s390_elf64_size_info): Likewise.
1720 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
1722 2003-05-08 H.J. Lu <hongjiu.lu@intel.com>
1724 * elflink.h (elf_add_default_symbol): After skipping the
1725 unversioned symbol, go to non-default one.
1727 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
1729 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
1731 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
1732 for symbols with non-default visibility.
1734 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
1736 * elflink.h (elf_link_check_versioned_symbol): Also handle the
1737 case that a DSO references a hidden symbol which may be
1738 satisfied by a versioned symbol in another DSO.
1739 (elf_link_output_extsym): Check versioned definition for hidden
1740 symbol referenced by a DSO.
1742 2003-05-07 Nick Clifton <nickc@redhat.com>
1744 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
1745 R_XSTORMY16_16 reloc to ignore overflows.
1747 2003-05-06 Alexandre Oliva <aoliva@redhat.com>
1749 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
1750 error message for mixing different-endian files. Check for ABI
1751 compatibility of input files with the selected emulation.
1753 2003-05-05 Alan Modra <amodra@bigpond.net.au>
1755 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
1756 non-default visibility, a) don't make them dynamic, b) discard
1757 space for dynamic relocs.
1758 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
1760 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
1761 non-default visibility, a) don't allocate plt entries, b) don't
1762 allocate .got relocs, c) discard dyn rel space,
1763 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
1764 don't generate dynamic relocs.
1765 * elf64-ppc.c (allocate_dynrelocs): As above.
1766 (ppc64_elf_relocate_section): As above.
1768 2003-05-05 Andreas Jaeger <aj@suse.de>
1770 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
1771 relocation entries for weak undefined symbols with non-default
1773 (elf64_x86_64_relocate_section): Initialize the GOT entries and
1774 skip R_386_32/R_386_PC32 for weak undefined symbols with
1775 non-default visibility.
1777 2003-05-04 H.J. Lu <hjl@gnu.org>
1779 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
1780 relocation entries for weak undefined symbols with non-default
1782 (elf_i386_relocate_section): Initialize the GOT entries and
1783 skip R_386_32/R_386_PC32 for weak undefined symbols with
1784 non-default visibility.
1786 * elfxx-ia64.c (allocate_fptr): Don't allocate function
1787 descriptors for weak undefined symbols with non-default
1789 (allocate_dynrel_entries): Don't allocate relocation entries
1790 for symbols resolved to 0.
1791 (set_got_entry): Don't install dynamic relocation for weak
1792 undefined symbols with non-default visibility.
1793 (set_pltoff_entry): Likewise.
1795 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
1796 with non-default visibility.
1797 (elf_link_output_extsym): Don't make weak undefined symbols
1798 with non-default visibility dynamic.
1800 2003-05-04 H.J. Lu <hjl@gnu.org>
1802 * elflink.h (elf_merge_symbol): Correctly handle weak definiton.
1804 2003-05-04 H.J. Lu <hjl@gnu.org>
1806 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
1807 symbol dynamic. Check indirection when removing the old
1808 definition for symbols with non-default visibility.
1809 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
1811 2003-05-02 Nick Clifton <nickc@redhat.com>
1813 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
1814 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
1817 2003-05-02 Andreas Jaeger <aj@suse.de>
1819 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
1820 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
1821 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
1822 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
1823 ELF_LINK_NON_GOT_REF from weakdef.
1825 2003-05-02 Charles Lepple <clepple@ghz.cc>
1826 Nick Clifton <nickc@redhat.com>
1828 * acinclude.m4: Fix name of --enable-install-libbfd switch.
1829 * aclocal.m4: Regenerate.
1830 * configure: Regenerate.
1831 * Makefile.in: Regenerate.
1833 2003-05-01 Alan Modra <amodra@bigpond.net.au>
1835 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
1836 weakdef sym has already been adjusted before treating it specially.
1837 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
1838 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
1839 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
1840 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
1842 2003-04-28 H.J. Lu <hjl@gnu.org>
1844 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
1845 the relax finalize pass.
1847 * section.c (struct sec): Add need_finalize_relax and remove
1849 (STD_SECTION): Update struct sec initializer.
1850 * bfd-in2.h: Regenerated.
1852 2003-04-28 H.J. Lu <hjl@gnu.org>
1854 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
1855 to copy any information related to dynamic linking when we flip
1858 2003-04-27 H.J. Lu <hjl@gnu.org>
1860 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
1861 (ELF_LINK_DYNAMIC_WEAK): New.
1863 * elflink.h (elf_merge_symbol): Add one argument to indicate if
1864 a symbol should be skipped. Ignore definitions in dynamic
1865 objects for symbols with non-default visibility.
1866 (elf_add_default_symbol): Adjusted.
1867 (elf_link_add_object_symbols): Check if a symbol should be
1868 skipped. Don't merge the visibility field with the one from
1870 (elf_link_check_versioned_symbol): Use undef_bfd.
1871 (elf_link_output_extsym): Warn if a forced local symbol is
1872 referenced from dynamic objects. Make non-weak undefined symbol
1873 with non-default visibility a fatal error.
1875 2003-04-27 Daniel Jacobowitz <drow@mvista.com>
1877 * configure.in: Bump version on HEAD to 2.14.90.
1878 * configure: Regenerated.
1880 2003-04-26 Stephane Carrez <stcarrez@nerim.fr>
1883 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
1884 when we couldn't relax something.
1886 2003-04-25 Alan Modra <amodra@bigpond.net.au>
1888 * elflink.h (elf_merge_symbol): When we find a regular definition
1889 for an indirect symbol, flip the indirection so that the old
1890 direct symbol now points to the new definition.
1892 2003-04-24 Roland McGrath <roland@redhat.com>
1894 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
1896 2003-04-24 Alan Modra <amodra@bigpond.net.au>
1898 * elf32-ppc.c: Formatting and comment fixes.
1899 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
1900 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
1902 2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
1904 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
1905 * bfd-in2.h: Rebuilt.
1906 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
1907 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
1909 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
1910 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
1911 (h8300sn_info_struct, h8300hn_info_struct): New.
1912 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
1913 (elf32_h8_final_write_processing): Likewise.
1915 2003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1917 * elf32-sh.c (tpoff): New.
1918 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
1919 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
1920 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
1921 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
1922 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
1923 (dtpoff_base): Fix wrong indentation.
1924 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
1925 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
1926 R_SH_TLS_TPOFF32 relocations.
1928 2003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
1930 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
1931 * cpu-sh.c: Likewise.
1932 * elf32-sh.c: Likewise.
1933 * reloc.c (bfd_reloc_code_real): Likewise.
1934 * elf32-sh64-com.c: Change comment to refer to SuperH.
1935 * elf32-sh64.c: Likewise.
1936 * elf64-sh64.c: Likewise.
1937 * bfd-in2.h (enum bfd_architecture): Regenerate.
1939 2003-04-23 Alan Modra <amodra@bigpond.net.au>
1941 From Julien LEMOINE <speedblue@debian.org>
1942 * elf32-i386.c (elf_i386_info_to_howto): Delete.
1943 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
1945 2003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1947 * archures.c: Replace references to Mitsubishi M32R with references
1949 * relocs.c: Likewise.
1950 * bfd-in2.h: Regenerate.
1952 2003-04-21 Richard Henderson <rth@redhat.com>
1954 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
1955 executable when a symbol is defined both regular and dynamic.
1957 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
1959 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
1960 (elf32-m68hc1x.lo): Update dependencies
1961 * configure.in: Add elf32-m68hc1x.lo.
1962 * configure: Rebuild.
1963 * Makefile.in: Rebuild.
1965 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
1967 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
1968 (m68hc11_elf_hash_table_create): New function.
1969 (elf32_m68hc11_link_hash_table_free): New function.
1970 (stub_hash_newfunc): New function.
1971 (m68hc11_add_stub): New function.
1972 (elf32_m68hc11_add_symbol_hook): New function.
1973 (elf32_m68hc11_setup_section_lists): New function.
1974 (elf32_m68hc11_next_input_section): New function.
1975 (elf32_m68hc11_size_stubs): New function.
1976 (elf32_m68hc11_build_stubs): New function.
1977 (m68hc11_get_relocation_value): New function.
1978 (elf32_m68hc11_relocate_section): Call the above to redirect
1979 some relocations to the trampoline code.
1980 (m68hc11_elf_export_one_stub): New function.
1981 (m68hc11_elf_set_symbol): New function.
1982 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
1983 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
1984 is not yet initialized.
1986 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
1987 (elf32_m68hc11_stub_hash_entry): New struct.
1988 (m68hc11_page_info): Add trampoline handler address.
1989 (m68hc11_elf_link_hash_table): Add stubs generation members.
1990 (elf32_m68hc11_add_symbol_hook): Declare.
1991 (elf32_m68hc11_setup_section_lists): Declare.
1992 (elf32_m68hc11_size_stubs): Declare.
1993 (elf32_m68hc11_build_stubs): Declare.
1995 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
1996 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
1997 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
1998 (_bfd_m68hc11_elf_set_private_flags): Ditto.
1999 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
2000 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
2001 (bfd_elf32_bfd_link_hash_table_create): Define.
2002 (elf_backend_add_symbol_hook): Define.
2003 (m68hc11_elf_bfd_link_hash_table_create): New function.
2004 (m68hc11_elf_build_one_stub): New function.
2005 (m68hc11_elf_size_one_stub): New function.
2006 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
2007 (bfd_elf32_bfd_link_hash_table_create): Define.
2009 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
2010 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
2011 (m68hc12_phys_addr): Ditto.
2012 (m68hc12_phys_page): Ditto.
2013 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
2014 (elf32_m68hc11_gc_mark_hook): Likewise.
2015 (elf32_m68hc11_gc_sweep_hook): Likewise.
2016 (elf32_m68hc11_check_relocs): Likewise.
2017 (elf32_m68hc11_relocate_section): Likewise.
2018 (_bfd_m68hc12_elf_set_private_flags): Likewise.
2019 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
2020 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
2021 (m68hc12_elf_build_one_stub): New function.
2022 (m68hc12_elf_size_one_stub): New function.
2023 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
2024 (elf_backend_add_symbol_hook): Define.
2025 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2027 2003-04-18 Nick Clifton <nickc@redhat.com>
2029 * format.c (bfd_check_format_matches): Only check associated
2030 vector if the matching_vector has been created.
2032 2003-04-15 Alexandre Oliva <aoliva@redhat.com>
2034 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
2035 2003-04-09's change.
2037 2003-04-15 Brian Ford <ford@vss.fsi.com>
2039 * peicode.h (coff_swap_scnhdr_in): If a section holds
2040 uninitialized data and is from an object file or from an
2041 executable image that has not initialized the s_size field, or if
2042 the physical size is padded, use the virtual size (stored in
2045 2003-04-15 H.J. Lu <hjl@gnu.org>
2047 * elflink.h (elf_link_add_object_symbols): Properly report
2048 filename for alignment reduction.
2050 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
2052 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
2053 * reloc.c: Likewise.
2054 * coff-h8300.c: Likewise.
2055 * coff-h8500.c: Likewise.
2056 * coff-sh.c: Likewise.
2057 * cpu-h8300.c: Likewise.
2058 * cpu-sh.c: Likewise.
2059 * elf32-h8300.c: Likewise.
2060 * elf32-sh.c: Likewise.
2061 * elf32-sh64-com.c: Likewise.
2062 * elf32-sh64.c: Likewise.
2063 * elf64-sh64.c: Likewise.
2064 * bfd-in2.h: Regenerate.
2066 2003-04-14 H.J. Lu <hjl@gnu.org>
2068 * elflink.h (elf_link_add_object_symbols): Maintain maximum
2069 alignment for common symbols. Warn reducing alignment for
2070 common symbols. Report old filename when symbol size changes.
2072 2003-04-12 Alexandre Oliva <aoliva@redhat.com>
2074 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
2075 occurrences of the same test changed in the previous patch.
2078 2003-04-11 Alexandre Oliva <aoliva@redhat.com>
2080 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
2081 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
2082 GOT_DISP/addend only if the symbol got a global GOT entry.
2084 2003-04-10 Alexandre Oliva <aoliva@redhat.com>
2086 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
2087 GOT_PAGE/GOT_OFST referencing overridable symbol to
2089 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
2090 global symbol as GOT_DISP.
2092 2003-04-10 Bob Wilson <bob.wilson@acm.org>
2094 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
2095 next relocation on an undefined symbol.
2097 2003-04-09 Richard Henderson <rth@redhat.com>
2099 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
2100 Ignore relocations against r_symndx == 0.
2102 2003-04-09 H.J. Lu <hjl@gnu.org>
2104 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
2105 FALSE for undefined symbols.
2106 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2108 2003-04-09 Alexandre Oliva <aoliva@redhat.com>
2110 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
2111 and IRIX-specific shift-to-64-bit 4-byte lengths before following
2114 2003-04-08 Alexandre Oliva <aoliva@redhat.com>
2116 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
2117 pointer size from ABI, not arch_bits_per_address.
2119 2003-04-07 Kevin Buettner <kevinb@redhat.com>
2121 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
2122 constants for n32 ABI.
2124 2003-04-06 Andrew Cagney <cagney@redhat.com>
2126 * simple.c (bfd_simple_get_relocated_section_contents): Disable
2127 free that leads to GDB vs BFD memory corruption.
2129 2003-04-04 Stephane Carrez <stcarrez@nerim.fr>
2131 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
2132 symbols that mark the end of the section.
2133 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
2134 converting to a relative branch so that the offset is computed after
2135 the relaxation; also relocate a jsr into a bsr if possible but don't
2136 relax them if they are to a far symbol as we need to call the
2138 (elf_m68hc11_howto_table): Set pcrel_offset to true.
2140 2003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2142 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
2143 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
2144 * bfd-in2.h: Regenerate
2145 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
2146 * cpu-tic4x.c: Ditto
2148 2003-04-03 Nick Clifton <nickc@redhat.com>
2150 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
2151 differently for object files and executables.
2152 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
2153 for object files or for executables who have not already
2154 initialised the field.
2155 * libpei.h (bfd_pe_executable_p): New macro. Return true if
2156 the PE format bfd is an executable.
2158 2003-04-03 Alan Modra <amodra@bigpond.net.au>
2160 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
2161 here as it's too early to reliably determine locality.
2162 (ppc_elf_gc_sweep_hook): Likewise.
2163 (SYMBOL_REFERENCES_LOCAL): Expand comment.
2165 2003-04-02 Bob Wilson <bob.wilson@acm.org>
2167 * xtensa-modules.c: Remove comment indicating that this is a
2170 2003-04-02 Alan Modra <amodra@bigpond.net.au>
2172 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
2174 2003-04-01 Bob Wilson <bob.wilson@acm.org>
2176 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
2177 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
2178 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
2180 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
2182 (cpu-xtensa.lo): New target.
2183 (elf32-xtensa.lo): Likewise.
2184 (xtensa-isa.lo): Likewise.
2185 (xtensa-modules.lo): Likewise.
2186 * Makefile.in: Regenerate.
2187 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
2188 (bfd_archures_list): Add bfd_xtensa_arch.
2189 * config.bfd: Handle xtensa-*-*.
2190 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
2191 * configure: Regenerate.
2192 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
2193 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
2194 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
2195 (bfd_elf32_xtensa_le_vec): Likewise.
2196 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
2197 * cpu-xtensa.c: New file.
2198 * elf32-xtensa.c: Likewise.
2199 * xtensa-isa.c: Likewise.
2200 * xtensa-modules.c: Likewise.
2201 * libbfd.h: Regenerate.
2202 * bfd-in2.h: Likewise.
2204 2003-04-01 Nick Clifton <nickc@redhat.com>
2206 * archures.c (bfd_mach_arm_unknown): Define.
2207 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
2208 bfd_arm_get_mach_from_notes): Prototype.
2209 * bfd-in2.h: Regenerate.
2210 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
2211 bfd_arm_merge_machines.
2212 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
2213 * coffcode.h (coff_set_arch_mach_hook): Call
2214 bfd_arm_get_mach_from_notes.
2215 * coffgen.c (coff_real_object_p): Revert previous delta.
2216 * cpu_arm.c (arm_check_note): New function. Examine a note in a
2218 (bfd_arm_merge_machines): New function: Handle the merging of ARM
2219 binaries compiled for different architectures..
2220 (bfd_arm_update_notes): New function: Update an ARM note section.
2221 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
2222 number from an ARM note section.
2223 * elf32-arm.h (elf32_arm_object_p): Use
2224 bfd_arm_get_mach_from_notes.
2225 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
2226 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
2228 2003-04-01 Ben Elliston <bje@wasabisystems.com>
2230 * dwarf2.c (read_attribute_value): Correct typo in comment.
2232 2003-04-01 Nick Clifton <nickc@redhat.com>
2234 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
2235 instead of concat().
2236 (decode_line_info): Only free filename if it is not NULL.
2237 (add_line_info): Make a copy of the filename when storing it into
2240 2003-03-31 Andreas Schwab <schwab@suse.de>
2241 Daniel Jacobowitz <drow@mvista.com>
2243 * simple.c (bfd_simple_get_relocated_section_contents): Add
2244 parameter symbol_table. Optionally use it instead of the symbol
2245 table from the bfd. Save and restore output offsets and output
2246 sections around bfd_get_relocated_section_contents. Fix a memory
2248 (simple_save_output_info, simple_restore_output_info): New
2250 * bfd-in2.h: Regenerate.
2251 * dwarf2.c (read_abbrevs): Use
2252 bfd_simple_get_relocated_section_contents instead of
2253 bfd_get_section_contents.
2254 (decode_line_info): Likewise.
2255 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
2257 (find_rela_addend): Remove.
2258 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
2260 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
2263 2003-03-31 David Heine <dlheine@suif.stanford.edu>
2265 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
2267 * dwarf2.c (concat_filename): Always allocate space for the
2269 (decode_line_info): Free the allocated filename returned by
2271 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
2272 * elf.c (copy_private_bfd_data): Likewise.
2273 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
2274 * elflink.h (elf_link_sort_relocs): Fix memory leak.
2275 * format.c (bfd_check_format_matches): Likewise.
2276 * linker.c (bfd_generic_final_link): Likewise.
2277 * opncls.c (find_separate_debug_info): Likewise.
2278 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
2280 2003-03-28 H.J. Lu <hjl@gnu.org>
2282 * elflink.h (elf_link_add_object_symbols): Correctly combine
2285 2003-03-27 Jakub Jelinek <jakub@redhat.com>
2287 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
2288 to -1 before recomputing got offsets.
2290 2003-03-26 Andreas Schwab <schwab@suse.de>
2292 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
2293 (elf_m68k_relocate_section): Use it to correctly handle symbols
2295 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
2296 entries for symbols that are forced to be local.
2298 2003-03-25 Alexandre Oliva <aoliva@redhat.com>
2300 * elfxx-mips.c (_bfd_mips_relax_section): New function.
2301 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
2302 * elfn32-mips.c, elf64-mips.c: Use it.
2304 2003-03-25 Stan Cox <scox@redhat.com>
2305 Nick Clifton <nickc@redhat.com>
2307 Contribute support for Intel's iWMMXt chip - an ARM variant:
2309 * archures.c: Add bfd_mach_arm_iWMMXt.
2310 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
2311 * bfd-in2.h: Regenerate.
2312 * libbfd.h: Regenerate.
2313 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
2314 object files to be linked with XScale ones.
2315 (coff_arm_final_link_postscript): Update note section.
2316 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
2317 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
2318 after identifying a coff binary.
2319 * cpu-arm.c (processors): Add iWMMXt.
2320 (arch_inf): Likewise.
2321 * elf32-arm.h (arm_object_p): Handle note section.
2322 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
2323 be linked with XScale ones.
2324 (elf32_arm_section_flags): New function: Set flags on note section.
2325 (elf32_arm_final_write_processing): Handle note section.
2327 2003-03-21 DJ Delorie <dj@redhat.com>
2329 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
2330 _bfd_elf_rela_local_sym.
2332 2003-03-20 H.J. Lu <hjl@gnu.org>
2334 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
2337 2003-03-20 Nick Clifton <nickc@redhat.com>
2339 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
2340 $idata5 in case bfd_coff_final_link is not called.
2342 2003-03-19 Jakub Jelinek <jakub@redhat.com>
2344 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
2346 (canon_reloc_count): Define.
2347 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
2348 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
2350 (sparc64_elf_canonicalize_reloc): New routine.
2351 (bfd_elf64_canonicalize_reloc): Define.
2353 2003-03-18 Jakub Jelinek <jakub@redhat.com>
2355 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
2356 againt mergeable sections. Take r_addend into account when caching
2359 2003-03-18 Richard Henderson <rth@redhat.com>
2361 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
2362 local symbols that have no dyninfo.
2364 2003-03-14 Gene Smith <gene.smith@siemens.com>
2366 * ieee.c (ieee_write_expression): Handle the case where symbol is
2368 General formatting improvements.
2370 2003-03-13 Nick Clifton <nickc@redhat.com>
2372 * configure.in (LINGUAS): Add zh_CN.
2373 * configure: Regenerate.
2374 * po/zh_CN.po: New file.
2376 2003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
2378 * aout-cris.c (BYTES_IN_WORD): Don't define.
2379 aout-encap.c: Likewise.
2380 aout-ns32k.c: Likewise.
2381 aout-tic30.c: Likewise.
2382 hp300bsd.c: Likewise.
2383 i386aout.c: Likewise.
2384 i386dynix.c: Likewise.
2385 i386linux.c: Likewise.
2386 i386lynx.c: Likewise.
2387 i386mach3.c: Likewise.
2388 m68k4knetbsd.c: Likewise.
2389 m68klinux.c: Likewise.
2390 m68klynx.c: Likewise.
2391 m68knetbsd.c: Likewise.
2392 m88kmach3.c: Likewise.
2393 mipsbsd.c: Likewise.
2394 newsos3.c: Likewise.
2395 sparclinux.c: Likewise.
2396 sparclynx.c: Likewise.
2397 sparcnetbsd.c: Likewise.
2398 vaxbsd.c: Likewise. Fix comment formatting.
2400 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
2402 * Reverted 2003-03-02's patch.
2404 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
2406 * elf64-mips.c (mips_elf64_canonicalize_reloc,
2407 mips_elf64_get_dynamic_reloc_upper_bound,
2408 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
2409 (bfd_elf64_get_canonicalize_reloc,
2410 bfd_elf64_get_dynamic_reloc_upper_bound,
2411 bfd_elf64_canonicalize_dynamic_reloc): Define.
2412 (mips_elf64_slurp_reloc_table): Support dynamic.
2413 (mips_elf64_slurp_one_reloc_table): Adjust.
2415 2003-03-12 Nick Clifton <nickc@redhat.com>
2417 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
2418 'index' to 'offset' in test for zero value.
2420 2003-03-11 Alexandre Oliva <aoliva@redhat.com>
2422 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
2423 dynamic relocations pointing to local or section symbols, use the
2424 NULL symbol instead. Document the choice to not emit an
2425 additional R_MIPS_64 relocation.
2427 2003-03-11 Alan Modra <amodra@bigpond.net.au>
2429 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
2430 zero index dynamic tls relocs generated for the GOT. Tidy code.
2431 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
2432 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2434 2003-03-07 Alan Modra <amodra@bigpond.net.au>
2436 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
2437 a tls_get_addr call.
2439 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
2440 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
2441 ELF_LINK_NON_GOT_REF from weakdef.
2442 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
2443 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
2444 ELF_LINK_NON_GOT_REF from weakdef.
2445 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
2446 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
2447 ELF_LINK_NON_GOT_REF from weakdef.
2449 2003-03-06 Jakub Jelinek <jakub@redhat.com>
2450 Andrew Haley <aph@redhat.com>
2452 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
2453 output is relocateable.
2455 2003-03-06 Steven Konopa <skonopa@kgo.csc.com>
2457 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
2460 2003-03-06 Alan Modra <amodra@bigpond.net.au>
2462 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
2464 (ELIMINATE_COPY_RELOCS): Define to zero.
2465 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
2466 TLSLD relocs. Report reloc types on a number of errors. Optimize
2467 LOCAL24PC check for non-local syms. Don't capitalize error messages.
2468 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
2469 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
2470 calculating TLSLD relocs. Report reloc types on a number of errors.
2471 Don't capitalize error messages.
2473 2003-03-03 H.J. Lu <hjl@gnu.org>
2475 * elfxx-ia64.c (USE_BRL): Removed.
2478 2003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
2480 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
2481 relocation (no special function), and make it non-partial_inplace.
2482 (sh_elf_relax_section): When creating a bsr, use a consistent value
2483 no matter if the symbol is extern or not; set addend to -4.
2484 Don't swap load / non-load instructions for SH4.
2485 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
2486 rather than if the symbol is external to determine if adjusting the
2487 offset makes sense. Adjust the addend too if appropriate.
2488 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
2491 2003-03-03 Nick Clifton <nickc@redhat.com>
2493 * po/da.po: Installed latest translation.
2495 2003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2497 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
2498 R_MIPS_PC16 to rightshift 2.
2499 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
2500 (bfd_elf32_bfd_reloc_type_lookup): Support
2501 BFD_RELOC_MIPSEMB_16_PCREL_S2.
2502 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
2503 R_MIPS_PC16 to rightshift 2.
2504 (mips_elf64_howto_table_rela): Likewise.
2505 (mips_reloc_map): Map to rightshifted BFD reloc.
2506 * elfn32-mips.c: The same as in elf64-mips.c.
2507 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
2508 (mips_elf_calculate_relocation): Handle rightshifted addends for
2510 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
2511 MIPS Embedded PIC. Remove superfluous empty COMMENT.
2512 * libbfd.h: Regenerate.
2513 * bfd-in2.h: Regenerate.
2515 2003-02-28 Richard Henderson <rth@redhat.com>
2517 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
2518 for ltoff22x relaxation.
2520 2003-03-01 Alan Modra <amodra@bigpond.net.au>
2522 * bfd-in.h (_bfd): Don't define.
2523 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
2525 * bfd-in2.h: Regenerate.
2527 2003-02-27 Richard Henderson <rth@redhat.com>
2529 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
2530 (elfNN_ia64_check_relocs): Set it.
2531 (allocate_global_data_got): Check it.
2532 (allocate_local_got): Likewise.
2533 (allocate_dynrel_entries): Likewise.
2534 (elfNN_ia64_relax_ldxmov): New.
2535 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
2536 (elfNN_ia64_choose_gp): Split out from ...
2537 (elfNN_ia64_final_link): ... here.
2539 2003-02-27 Andrew Cagney <cagney@redhat.com>
2541 * bfd.c (struct bfd): Rename "struct _bfd".
2542 * bfd-in.h: Update copyright.
2543 (struct bfd): Rename "struct _bfd".
2544 (_bfd): Define for backward compatibility.
2545 * bfd-in2.h: Regenerate.
2547 2003-02-25 Alan Modra <amodra@bigpond.net.au>
2549 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
2550 and rel_hdr2 when initially counting input relocs rather than after
2551 creating output reloc sections.
2552 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
2555 * Makefile.am: Run "make dep-am".
2556 * Makefile.in: Regenerate.
2558 2003-02-24 Kris Warkentin <kewarken@qnx.com>
2560 * elf.c (elfcore_read_notes): Add check for QNX style core file.
2561 (elfcore_grog_nto_note): New function.
2562 (elfcore_grog_nto_gregs): New function.
2563 (elfcore_grog_nto_status): New function.
2565 2003-02-24 Alan Modra <amodra@bigpond.net.au>
2567 * elflink.c (_bfd_elf_create_got_section): Check existing .got
2568 section flags before concluding that we've already been called.
2569 Don't use register keyword.
2570 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
2571 (_bfd_elf_create_linker_section): Formatting.
2573 2003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
2575 * coff-h8300.c: Fix typo: intial -> initial.
2576 * coff-ppc.c: Likewise.
2578 2003-02-20 Alan Modra <amodra@bigpond.net.au>
2580 * elf32-ppc.c: Formatting.
2581 (allocate_dynrelocs): LD and GD relocs against the same sym need
2582 separate GOT entries.
2583 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
2586 2003-02-19 Alan Modra <amodra@bigpond.net.au>
2588 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
2589 removal. Localize vars. Remove unnecessary dynobj test.
2590 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
2592 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
2594 (elf_i386_relocate_section): Likewise.
2595 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
2596 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
2597 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
2598 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
2599 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
2600 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
2601 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
2602 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
2605 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
2606 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
2608 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
2609 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2610 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
2611 and optimize. Use ELIMINATE_COPY_RELOCS.
2612 (ppc64_elf_relocate_section): Likewise.
2614 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
2615 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
2616 (ELIMINATE_COPY_RELOCS): Define.
2617 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
2618 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2619 (MUST_BE_DYN_RELOC): Define.
2620 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
2621 and optimize. Trim dyn_relocs.
2622 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
2623 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
2624 track of pc_rel dyn relocs.
2625 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
2626 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
2627 allocate_dynrelocs. Don't recalculate "sec".
2629 2003-02-18 Alan Modra <amodra@bigpond.net.au>
2631 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
2632 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
2633 on invalid LD relocs.
2634 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
2635 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
2636 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
2638 * elf32-ppc.h: New file.
2639 * elf32-ppc.c: Include elf32-ppc.h.
2640 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
2641 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
2642 Add "tls_mask" field.
2643 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
2644 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
2645 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
2646 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
2647 Make use of htab shortcuts throughout file.
2648 (ppc_elf_link_hash_newfunc): Init tls_mask field.
2649 (ppc_elf_link_hash_table_create): Init new fields.
2650 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
2651 (ppc_elf_howto_raw): Add tls relocs.
2652 (ppc_elf_reloc_type_lookup): Handle them.
2653 (ppc_elf_unhandled_reloc): New function.
2654 (ppc_elf_create_got): Stash got section pointer in hash table,
2655 return status. Make .rela.got too.
2656 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
2657 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
2658 NON_GOT_REF set. Don't allocate space in .plt here..
2659 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
2660 not allocating plt entries unnecessarily. Allocate got entries here.
2661 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
2662 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
2663 "info" during allocate_dynrelocs hash traversal. Use htab section
2664 shortcuts rather than searching for named sections. Get rid of
2665 "plt" and "strip" booleans.
2666 (update_local_sym_info, bad_shared_reloc): New functions.
2667 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
2668 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
2669 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
2670 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
2671 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
2672 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
2673 relocs that might use a plt entry. Set NON_GOT_REF too.
2674 Enumerate all do-nothing relocs.
2675 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
2676 tls relocs and all plt relocs.
2677 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
2678 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
2679 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
2681 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
2682 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
2683 entries and got relocs here. Warn on non-zero got reloc addend.
2684 Split out branch taken/not taken reloc code into a separate switch
2685 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
2686 Split out HA reloc adjustments to separate switch statement. Don't
2687 warn on reloc overflow if we've already warned about undefined.
2688 Don't rebuild sym name when reporting errors. Report all possible
2689 errors from _bfd_final_link_relocate.
2690 (bfd_elf32_bfd_final_link): Don't define.
2692 2003-02-18 Alan Modra <amodra@bigpond.net.au>
2694 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
2695 rebuild sym name when reporting errors.
2697 2003-02-17 Nick Clifton <nickc@redhat.com>
2699 * elflink.h (elf_link_output_extsym): Only check
2700 allow_shlib_undefined for shared libraries.
2701 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
2702 of allow_shlib_undefined.
2703 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2704 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
2705 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2706 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2707 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2708 * elf32-sh.c (sh_elf_relocate_section): Likewise.
2709 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2710 * elf32-vax.c (elf_vax_relocate_section): Likewise.
2711 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2712 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
2713 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2714 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2715 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2716 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2717 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2718 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
2720 2003-02-17 Nick Clifton <nickc@redhat.com>
2722 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
2723 address field to use in the comparison.
2724 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
2726 2003-02-14 Bob Wilson <bob.wilson@acm.org>
2728 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
2729 backends when checking if the generic ELF target should be used.
2731 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
2732 outside of functions, treat values as absolute addresses.
2734 * bfd.c: Change embedded documentation to use consistent indentation
2735 and to split up long lines. Change informal style of description
2736 for functions lacking real documentation.
2737 * coffcode.h: Break up long lines in embedded documentation.
2738 * format.c: Likewise.
2739 * targets.c: Likewise.
2740 * libcoff.h: Regenerate.
2741 * bfd-in2.h: Regenerate.
2743 2003-02-14 Alan Modra <amodra@bigpond.net.au>
2745 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
2746 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
2747 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
2748 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
2749 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
2750 (group_sections): Don't share a stub section if stubs are for a large
2751 section. Adjust comment.
2752 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
2753 !stubs_always_before_branch.
2754 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
2755 treat undefined and undefweak specially when processing dyn relocs.
2757 2003-02-13 Jakub Jelinek <jakub@redhat.com>
2759 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
2761 2003-02-13 Nick Clifton <nickc@redhat.com>
2763 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
2764 in computation of offset to insert into BL instruction.
2766 2003-02-11 Uwe Stieber <uwe@wwws.de>
2768 * config.bfd: Add support for kaOS as cross build target system.
2770 2003-02-11 Alan Modra <amodra@bigpond.net.au>
2772 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
2773 .__tls_get_addr too.
2774 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
2776 2003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
2778 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
2779 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
2780 (sh_elf_link_hash_newfunc): Remove the initialization of
2782 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
2783 for which tls_tpoff32 flag is set.
2784 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
2785 of the symbol includes the entry matched with the input_section
2786 and having tls_tpoff32 flag on. When linking statically, set
2787 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
2788 is defined in this executable.
2789 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
2791 2003-02-10 Jakub Jelinek <jakub@redhat.com>
2793 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
2794 even if there is just non-empty .rela.plt.
2796 2003-02-10 Nick Clifton <nickc@redhat.com>
2798 * archures.c (bfd_mach_arm_ep9312): Define.
2799 * bfd-in2.h: Regenerate.
2800 * cpu-arm.c (processors[]): Add ep9312.
2801 (bfd_arm_arch): Add ep9312.
2802 * elf32-arm.h (elf32_arm_merge_private_data): Update error
2803 messages and add test for Maverick floating point support.
2804 (elf32_arm_print_private_bfd_data): Handle
2805 EF_ARM_MAVERICK_FLOAT flag.
2806 (elf32_arm_object_p): New function.
2807 (elf_backend_object_p): Define.
2809 2003-02-10 Alan Modra <amodra@bigpond.net.au>
2811 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
2812 variables, structure fields or function params to tls_mask or
2813 similar to better reflect usage.
2814 (struct got_entry): Comment.
2815 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
2816 (get_tls_mask): Rename from get_tls_type.
2818 2003-02-09 Alan Modra <amodra@bigpond.net.au>
2820 * elf64-ppc.c (TLS_GD_LD): Don't define..
2821 (TLS_GD): ..define this instead and update all uses.
2822 (TLS_TPRELGD): Define.
2823 (ppc64_elf_link_hash_table_create): Tweak initialization of
2824 init_refcount and init_offset.
2825 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
2826 Mark second slot of GD or LD toc entries.
2827 (get_tls_type): Return an int. Distinguish toc GD and LD entries
2828 from other tls types.
2829 (ppc64_elf_tls_setup): New function, split out from..
2830 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
2831 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
2832 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
2833 return value to properly decide whether toc GD and LD entries can
2834 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
2835 to determine GD or LD rather than looking at TLS_LD flag. Don't
2836 attempt to adjust got entry tls_type here..
2837 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
2838 look for possible merges.
2839 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
2841 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
2842 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
2843 Make use of return value from get_tls_type to properly detect GD and
2844 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
2845 handle tls_get_addr removal when looking at REL24 relocs, do it when
2846 looking at the previous reloc. Check reloc after DTPMOD64 to determine
2848 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
2850 2003-02-08 Alan Modra <amodra@bigpond.net.au>
2852 * elf32-hppa.c (group_sections): Don't share a stub section if
2853 stubs are for a large section.
2855 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
2856 stubs if !stubs_always_before_branch.
2858 2003-02-07 Nick Clifton <nickc@redhat.com>
2860 * elf.c (swap_out_syms): Generate an error message if an
2861 equivalent output section cannot be found for a symbol.
2863 2003-02-07 Jakub Jelinek <jakub@redhat.com>
2865 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
2866 local_got_entries is NULL.
2868 2003-02-06 Andreas Schwab <schwab@suse.de>
2870 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
2871 (read_value): Add parameter is_signed, use signed extraction if
2872 the value is signed.
2873 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
2874 encoding to read_value.
2876 2003-02-06 Alan Modra <amodra@bigpond.net.au>
2878 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
2879 plt info when called to transfer weak sym info.
2881 2003-02-05 Alan Modra <amodra@bigpond.net.au>
2883 * reloc.c: Add PPC and PPC64 TLS relocs.
2884 * libbfd.h: Regenerate.
2885 * bfd-in2.h: Regenerate.
2886 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
2887 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
2888 against a 32 bit field.
2889 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
2890 (_ppc64_elf_section_data): Add t_symndx and comments.
2891 (ppc64_elf_section_data): Use elf_section_data macro.
2892 (ppc64_elf_new_section_hook): American spelling.
2893 (struct got_entry, struct plt_entry): New.
2894 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
2895 (struct ppc_stub_hash_entry): Add "addend" field.
2896 (struct ppc_link_hash_entry): Add "tls_type".
2897 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
2898 TLS_EXPLICIT): Define.
2899 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
2900 (link_hash_newfunc): Init new fields.
2901 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
2902 init_offset to NULL.
2903 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
2904 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
2906 (update_local_sym_info, update_plt_info): New functions.
2907 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
2908 handling to use got.glist rather than got.refcount. Likewise for PLT.
2909 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
2910 (func_desc_adjust): Adjust for new PLT list.
2911 (ppc64_elf_adjust_dynamic_symbol): Likewise.
2912 (get_sym_h, get_tls_type): New functions.
2913 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
2914 (ppc64_elf_tls_optimize): New function.
2915 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
2917 (ppc64_elf_size_dynamic_sections): Likewise.
2918 (ppc_type_of_stub): Adjust for new PLT list.
2919 (ppc_build_one_stub): Likewise.
2920 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
2922 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
2923 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
2924 init GOT entries that have a reloc. Generate GOT relocs here..
2925 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
2926 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
2928 2003-02-04 Andreas Schwab <schwab@suse.de>
2930 * elf32-m68k.c (elf_m68k_hash_entry): Define.
2931 (elf_m68k_link_hash_traverse): Remove.
2932 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
2933 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
2935 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
2937 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
2938 instead of elf_m68k_link_hash_traverse.
2939 (elf_m68k_discard_copies): Change first parameter to pointer to
2940 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
2941 elf_m68k_link_hash_entry is needed.
2943 2003-02-04 Alan Modra <amodra@bigpond.net.au>
2945 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
2946 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
2947 "got" union, and declare as gotplt_union. Use gotplt_uinion for
2949 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
2950 Add "init_offset" field.
2951 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
2952 (elf_local_got_ents): Declare.
2953 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
2955 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
2956 (_bfd_elf_link_hash_table_init): Set "init_offset".
2957 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
2959 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
2961 * elf.c (bfd_elf_local_sym_name): Split out from..
2962 (group_signature): ..here.
2963 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
2965 2003-02-04 Alan Modra <amodra@bigpond.net.au>
2967 * elf-bfd.h (enum elf_link_info_type): Remove.
2968 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
2969 to struct sec. Remove linkonce_p field.
2970 (elf_linkonce_p): Delete.
2971 (elf_discarded_section): Update for sec_info_type change.
2972 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
2973 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
2974 (ELF_INFO_TYPE_NONE): Define.
2975 (ELF_INFO_TYPE_STABS): Define.
2976 (ELF_INFO_TYPE_MERGE): Define.
2977 (ELF_INFO_TYPE_EH_FRAME): Define.
2978 (ELF_INFO_TYPE_JUST_SYMS): Define.
2979 (STD_SECTION): Update struct sec initializer.
2980 * ecoff.c (bfd_debug_section): Likewise.
2981 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
2982 * elflink.h: Likewise.
2983 * elf-eh-frame.c: Likewise.
2984 * elf64-alpha.c: Likewise.
2985 * elfxx-ia64.c: Likewise.
2986 * elfxx-mips.c: Likewise.
2987 * bfd-in2.h: Regenerate.
2989 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
2990 referring to used_by_bfd.
2991 * elf64-sparc.c (sec_do_relax): Likewise.
2992 * elf64-mmix.c (mmix_elf_section_data): Likewise.
2993 * elfxx-mips.c (mips_elf_section_data): Likewise.
2994 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
2995 (ieee_get_section_contents): Likewise.
2996 (ieee_new_section_hook): Formatting.
2997 (ieee_canonicalize_reloc): Remove commented out code.
2998 * mmo.c (mmo_section_data): Define. Use throughout file.
2999 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
3001 2003-01-31 Graydon Hoare <graydon@redhat.com>
3003 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
3004 * Makefile.in: Regenerate.
3005 * opncls.c (calc_crc32, get_debug_link_info,
3006 seperate_debug_file_exists, find_seperate_debug_file): New
3008 (bfd_follow_gnu_debuglink): New function. Follow the pointer
3009 contained inside a .gnu_debuglink section.
3010 * bfd-in2.h: Regenerate.
3012 2003-01-29 Alexandre Oliva <aoliva@redhat.com>
3014 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
3015 entry->abfd when it's NULL.
3017 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
3019 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
3020 _bfd_elf_section_offset returning -2 the same way as -1.
3022 * elfxx-mips.c (mips_elf_multi_got): New function.
3023 (struct mips_got_entry): Make symndx and gotidx signed. Moved
3024 addend into union along with address and link hash entry.
3025 (struct mips_got_info): Added bfd2got and next.
3026 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
3027 (mips_elf_got_section, mips_elf_create_got_section): Use
3028 SEC_EXCLUDE bit to tell whether we really need the got
3029 section. Take boolean arguments to disregard an excluded
3030 section, or to create it as excluded. Adjust all callers.
3031 Use mips_elf_got_section all over.
3032 (mips_elf_local_got_index, mips_elf_got_page,
3033 mips_elf_got16_entry): Take input bfd as argument, and pass it
3034 on to mips_elf_create_local_got_entry.
3035 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
3036 Take input bfd as argument, and manage entries in the
3038 (mips_elf_got_offset_from_index): Take input bfd as argument,
3039 and use it to adjust the GP offset of the bfd.
3040 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
3041 unreferenced GOT entries of global symbols to the end.
3042 (mips_elf_record_global_got_symbol): Take input bfd as
3043 argument. Add entries to the master GOT hash table.
3044 (struct mips_elf_bfd2got_hash): New.
3045 (struct mips_elf_got_per_bfd_arg): New.
3046 (struct mips_elf_set_global_got_offset_arg): New.
3047 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
3048 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
3049 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
3050 mips_elf_merge_gots, mips_elf_set_global_got_offset,
3051 mips_elf_resolve_final_got_entry,
3052 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
3053 mips_elf_got_for_ibfd): New functions.
3054 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
3055 (MIPS_ELF_GOT_MAX_SIZE): New macro.
3056 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
3057 (mips_elf_got_entry_hash): Take new fields into account. Use
3058 mips_elf_hash_bfd_vma.
3059 (mips_elf_got_entry_eq): Take new fields into account.
3060 (mips_elf_create_got_section): Initialize new fields.
3061 (mips_elf_calculate_relocation): Pass input_bfd to functions
3062 that now take it. Adjust gp for the input_bfd.
3063 (mips_elf_allocate_dynamic_relocation,
3064 mips_elf_create_dynamic_relocation,
3065 _bfd_mips_elf_create_dynamic_sections): Use...
3066 (mips_elf_rel_dyn_section): New function. Borrow code from...
3067 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
3068 now take it. Create the got section if needed, even if
3069 excluded, before recording a global got symbol. Move some
3071 (mips_elf_record_local_got_symbol): New fn.
3072 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
3073 Compute multi-got global entries offsets. Move GOT code to...
3074 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
3075 if the GOT is too big.
3076 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
3077 undefweak symbol to zero. Generate dynamic relocations for
3078 non-primary GOT entries for global symbols.
3079 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
3080 case. Generate dynamic relocations for local got entries.
3081 Sort dynamic relocations on N64 too, using...
3082 (sort_dynamic_relocs_64): New fns.
3083 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
3084 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
3086 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
3088 * bfd.c (struct _bfd): Added id field.
3089 * opncls.c (_bfd_id_counter): New static variable.
3090 (_bfd_new_bfd): Use it.
3091 * bfd-in2.h: Rebuilt.
3093 2003-01-25 Alan Modra <amodra@bigpond.net.au>
3095 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
3097 2003-01-25 Jakub Jelinek <jakub@redhat.com>
3099 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
3100 (elf32_sparc_rev32_howto): New variable.
3101 (sparc_reloc_map): Add TLS relocs.
3102 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
3104 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
3106 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
3107 struct elf32_sparc_link_hash_table):
3109 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
3110 elf32_sparc_hash_table): Define.
3111 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
3112 create_got_section, elf32_sparc_create_dynamic_sections,
3113 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
3115 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
3117 (elf32_sparc_gc_sweep_hook): Likewise.
3118 (elf32_sparc_adjust_dynamic_symbol): Likewise.
3119 (elf32_sparc_size_dynamic_sections): Likewise.
3120 (elf32_sparc_relocate_section): Likewise.
3121 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
3123 (elf32_sparc_object_p): Allocate backend private object data.
3124 (bfd_elf32_bfd_link_hash_table_create,
3125 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
3126 elf_backend_can_refcount): Define.
3127 (elf_backend_create_dynamic_sections): Define to
3128 elf32_sparc_create_dynamic_sections.
3129 * reloc.c: Add SPARC TLS relocs.
3130 * bfd-in2.h, libbfd.h: Rebuilt.
3131 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
3132 (sparc_reloc_map): Likewise.
3134 2003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
3136 * bfd-in2.h: Regenerate.
3137 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
3138 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
3139 (elf_howto_table): Add TLS relocs.
3140 (elf_s390_reloc_type_lookup): Likewise.
3141 (elf_s390_link_hash_entry): Add tls_type.
3142 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
3144 (elf_s390_link_hash_table): Add tls_ldm_got.
3145 (link_hash_newfunc): Initialize tls_type.
3146 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
3147 (elf_s390_copy_indirect_symbol): Copy tls_type information.
3148 (elf_s390_check_relocs): Support TLS relocs.
3149 (elf_s390_gc_sweep_hook): Likewise.
3150 (allocate_dynrelocs): Likewise.
3151 (elf_s390_size_dynamic_sections): Likewise.
3152 (elf_s390_relocate_section): Likewise.
3153 (elf_s390_finish_dynamic_symbol): Likewise.
3154 (bfd_elf32_mkobject): Define for TLS.
3155 * elf64-s390.c: Same changes as for elf32-s390.c.
3156 * libbfd.h: Regenerate.
3157 * reloc.c: Add s390 TLS relocations.
3159 2003-01-24 Charles Lepple <clepple@ghz.cc>
3161 * aclocal.m4: Fix name of --enable-install-libbfd switch.
3163 2003-01-23 Nick Clifton <nickc@redhat.com>
3166 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
3167 * archures.c (bfd_mach_sh2e): Added.
3168 * bfd-in2.h: Rebuilt.
3169 * cpu-sh.c (arch_info_struct): Added SH2e.
3170 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
3172 2003-01-23 Alan Modra <amodra@bigpond.net.au>
3174 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
3175 dynindx to an int. Rearrange for better packing.
3176 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
3177 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
3178 * elf32-sh64.h: New. Split out from include/elf/sh.h.
3179 (struct _sh64_elf_section_data): New struct.
3180 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
3181 * elf32-sh64-com.c: Include elf32-sh64.h.
3182 * elf32-sh64.c: Likewise.
3183 (sh64_elf_new_section_hook): New function.
3184 (bfd_elf32_new_section_hook): Define.
3185 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
3186 (sh64_bfd_elf_copy_private_section_data): Likewise.
3187 (sh64_elf_final_write_processing): Likewise.
3188 * elf32-sparc.c (struct elf32_sparc_section_data): New.
3189 (elf32_sparc_new_section_hook): New function.
3190 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
3191 (sec_do_relax): Define.
3192 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
3193 (elf32_sparc_relocate_section): Likewise.
3194 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
3195 * elf64-mmix.c (struct _mmix_elf_section_data): New.
3196 (mmix_elf_section_data): Define. Use throughout file.
3197 (mmix_elf_new_section_hook): New function.
3198 (bfd_elf64_new_section_hook): Define.
3199 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
3200 (ppc64_elf_section_data): Define. Use throughout.
3201 (ppc64_elf_new_section_hook): New function.
3202 (bfd_elf64_new_section_hook): Define.
3203 * elf64-sparc.c (struct sparc64_elf_section_data): New.
3204 (sparc64_elf_new_section_hook): New function.
3205 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
3206 (sec_do_relax): Define.
3207 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
3208 (sparc64_elf_relocate_section): Likewise.
3209 (bfd_elf64_new_section_hook): Define.
3210 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
3211 * elfxx-mips.c (struct _mips_elf_section_data): New.
3212 (mips_elf_section_data): Define. Use throughout.
3213 (_bfd_mips_elf_new_section_hook): New function.
3214 (mips_elf_create_got_section): Don't alloc used_by_bfd.
3215 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
3216 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
3217 * Makefile.am: Run "make dep-am".
3218 * Makefile.in: Regenerate.
3220 2003-01-21 Richard Henderson <rth@redhat.com>
3222 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
3223 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
3224 (elf64_alpha_adjust_dynamic_symbol): Set them.
3225 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
3226 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
3227 symbol index when relaxing LDM to TPREL.
3228 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
3229 relocs, even if the target isn't locally defined.
3230 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
3231 (elf64_alpha_relocate_section): Likewise. Force TP-relative
3232 relocs vs symndx 0 to the tp base.
3234 2003-01-21 Fabio Alemagna <falemagn@aros.org>
3236 * config.bfd: Handle i[3456]86-*-aros*.
3238 2003-01-21 Andreas Schwab <schwab@suse.de>
3240 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
3241 (struct ppc_elf_link_hash_entry): Define.
3242 (ppc_elf_hash_entry): New function.
3243 (struct ppc_elf_link_hash_table): Define.
3244 (ppc_elf_hash_table): New function.
3245 (ppc_elf_link_hash_newfunc): New function.
3246 (ppc_elf_link_hash_table_create): New function.
3247 (ppc_elf_copy_indirect_symbol): New function.
3248 (allocate_dynrelocs): New function.
3249 (readonly_dynrelocs): New function.
3250 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
3251 relocs and determine DT_TEXTREL.
3252 (ppc_elf_check_relocs): Don't do that here, just count the
3254 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
3256 (bfd_elf32_bfd_link_hash_table_create): Define.
3257 (elf_backend_copy_indirect_symbol): Define.
3259 2003-01-21 Richard Henderson <rth@redhat.com>
3261 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
3262 TPREL also get a reloc if shared. Remove SREL support.
3263 (elf64_alpha_emit_dynrel): New.
3264 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
3265 and GOTTPREL relocs to local symbols against the tp base.
3266 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
3268 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
3269 use count before clobbering r_type.
3270 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
3271 ordering would mean dataflow inspection is necessary.
3273 2003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
3275 * coffcode.h (coff_set_flags): Added get/set arch hooks.
3277 2003-01-20 Fabio Alemagna <falemagn@aros.org>
3279 * elf32-sh.c: Treat elfNN_bed like other macros defined in
3280 elfxx-target.h and #undef it before #define'ing it.
3281 * elf32-i386.c: Likewise.
3282 * elf32-sh64.c: Likewise.
3283 * elf64-alpha.c: Likewise.
3284 * elf64-sh64.c: Likewise.
3286 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
3288 * bfd-in2.h: Regenerate.
3289 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
3290 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
3291 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
3292 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
3293 R_390_PLTOFF32 and R_390_PLTOFF64.
3294 (elf_s390_reloc_type_lookup): Likewise.
3295 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
3296 of GOTPLT references to a function.
3297 (link_hash_newfunc): Initialize gotplt_refcount.
3298 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
3299 and creation of the got section out of the main switch. Add support
3300 for the gotoff, gotplt and pltoff relocations.
3301 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
3303 (elf_s390_adjust_gotplt): New function.
3304 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
3306 (allocate_dynrelocs): Add comment.
3307 (elf_s390_relocate_section): Change r_type to unsigned. Add support
3308 for gotoff, gotplt and pltoff relocations.
3309 * elf64-s390.c: Same changes as for elf32-s390.c.
3310 * libbfd.h: Regenerate.
3311 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
3312 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
3313 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
3314 and BFD_RELOC_390_PLTOFF64.
3316 2003-01-18 Jakub Jelinek <jakub@redhat.com>
3318 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
3319 R_IA64_TPREL64[LM]SB against non-global symbol properly.
3321 2003-01-16 Jakub Jelinek <jakub@redhat.com>
3323 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
3324 self_dtpmod_done and self_dtpmod_offset.
3325 (allocate_global_data_got): Only use one got entry for all
3326 dtpmod relocs against local symbols.
3327 (allocate_dynrel_entries): Only need .rela.got entry for
3328 dtpmod against global symbol.
3329 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
3330 Reserve space in .rela.got for the local dtpmod entry.
3331 (set_got_entry): Initialize the common local dtpmod .got entry.
3332 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
3333 and R_IA_64_DTPREL64MSB.
3335 2003-01-16 Alan Modra <amodra@bigpond.net.au>
3337 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
3338 (R_PPC_*): Rename all occurrences to R_PPC64_*.
3339 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
3340 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
3341 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
3342 relative relocs, not with absolute ones.
3343 * Makefile.am: Run "make dep-am".
3344 * Makefile.in: Regenerate.
3345 * po/SRC-POTFILES.in: Regenerate.
3347 2003-01-15 Andreas Schwab <schwab@suse.de>
3349 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
3350 relocation against a non-allocated readonly section.
3352 2003-01-10 Alan Modra <amodra@bigpond.net.au>
3354 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
3355 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
3357 2002-01-08 Klee Dienes <kdienes@apple.com>
3359 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
3360 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
3361 * Makefile.in: Regenerate.
3363 2003-01-08 Alexandre Oliva <aoliva@redhat.com>
3365 * elfn32-mips.c (prev_reloc_section): New.
3366 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
3367 (SET_RELOC_ADDEND): Parenthesize macro argument.
3369 2003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
3371 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
3372 adjust addil instructions if the symbol has no section.
3374 2003-01-07 DJ Delorie <dj@redhat.com>
3376 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
3379 2003-01-07 Andreas Schwab <schwab@suse.de>
3381 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
3382 PC relative relocations.
3383 (elf_m68k_discard_copies): Set it here instead.
3385 2002-01-02 Ben Elliston <bje@redhat.com>
3386 Jeff Johnston <jjohnstn@redhat.com>
3388 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
3389 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
3390 (BFD32_BACKENDS): Add elf32-iq2000.lo.
3391 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
3392 (cpu-iq2000.lo): New target.
3393 * Makefile.in: Regenerate.
3394 * config.bfd: Handle iq2000-*-elf.
3395 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
3396 (bfd_archures_list): Add bfd_iq2000_arch.
3397 * configure.in: Handle bfd_elf32_iq2000_vec.
3398 * configure: Regenerate.
3399 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
3400 and BFD_RELOC_IQ2000_UHI16.
3401 * targets.c (bfd_elf32_iq2000_vec): Declare.
3402 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
3403 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
3404 * cpu-iq2000.c: New file.
3405 * elf32-iq2000.c: Likewise.
3406 * libbfd.h: Regenerate.
3407 * bfd-in2.h: Likewise.
3409 2003-01-02 Richard Sandiford <rsandifo@redhat.com>
3411 * elfxx-mips.c: Include libiberty.h.
3412 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
3413 (mips_set_isa_flags): New function, split out from...
3414 (_bfd_mips_elf_final_write_processing): ...here. Only call
3415 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
3416 (mips_mach_extensions): New array.
3417 (mips_32bit_flags_p): New function.
3418 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
3419 Use mips_32bit_flags_p to check if one binary is 32-bit and the
3420 other is 64-bit. When adopting IBFD's architecture, adopt the
3421 bfd_mach as well as the flags.
3423 2003-01-02 Nick Kelsey <nickk@ubicom.com>
3425 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
3426 fix internal errors, fix bad code generation, fix incorrect stabs
3427 information, and improve ability to eliminate redundant page
3428 instructions. Added code to ip2k_final_link_relocate to self-verify
3429 the linker relaxation. Fix formatting problems.
3431 2002-12-30 Chris Demetriou <cgd@broadcom.com>
3433 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
3434 * archures.c (bfd_mach_mipsisa32r2): New define.
3435 * bfd-in2.h: Regenerate.
3436 * cpu-mips.c (I_mipsisa32r2): New enum value.
3437 (arch_info_struct): Add entry for I_mipsisa32r2.
3438 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
3439 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
3440 (_bfd_mips_elf_final_write_processing): Add
3441 bfd_mach_mipsisa32r2 case.
3442 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
3443 binaries marked as using MIPS32 Release 2.
3445 2002-12-30 Dmitry Diky <diwil@mail.ru>
3447 * Makefile.am: Add msp430 target.
3448 * configure.in: Likewise.
3449 * Makefile.in: Regenerate.
3450 * configure: Regenerate.
3451 * archures.c: Add msp430 architecture vector.
3452 * config.bfd: Likewise.
3453 * reloc.c: Add msp430 relocs.
3454 * targets.c: Add msp320 target.
3455 * cpu-msp430.c: New file: msp430 cpu detection.
3456 * elf32-msp430.c: New file: msp430 reloc processing.
3457 * bfd-in2.h: Regenerate.
3458 * libbfd.h: Regenerate.
3460 2002-12-28 Jakub Jelinek <jakub@redhat.com>
3462 * elf.c (elf_sort_sections): Don't reorder .tbss.
3463 (assign_file_positions_for_segments): Only adjust off/voff
3464 for increased alignment in PT_LOAD or PT_NOTE segment,
3465 but adjust p_filesz for .tbss too. in PT_LOAD consider
3466 .tbss to have zero memory size.
3467 (copy_private_bfd_data) [SECTION_SIZE]: Define.
3468 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
3469 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
3470 into PT_TLS segment. Never put SHF_TLS sections in
3471 segments other than PT_TLS or PT_LOAD.
3473 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
3476 2002-12-23 DJ Delorie <dj@redhat.com>
3478 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
3480 2002-12-23 Alan Modra <amodra@bigpond.net.au>
3482 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
3484 2002-12-23 Nick Clifton <nickc@redhat.com>
3486 * archures.c (bfd_arch_get_compatible): Add third parameter
3487 'accept_unknowns'. Only accept unknown format BFDs if
3488 accept_unknowns is true, or if the format is "binary".
3489 * bfd-in2.h: Regenerate.
3491 2002-12-21 Nick Clifton <nickc@redhat.com>
3493 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
3494 that subtracted 8 from pc relative relocations.
3496 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
3498 * coff-h8300.c: Fix comment typos.
3499 * coffcode.h: Likewise.
3500 * cpu-cris.c: Likewise.
3501 * elf32-vax.c: Likewise.
3502 * genlink.h: Likewise.
3503 * linker.c: Likewise.
3505 * tekhex.c: Likewise.
3506 * vms-misc.c: Likewise.
3508 2002-12-20 DJ Delorie <dj@redhat.com>
3510 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
3511 * libbfd.h: Regenerate.
3512 * bfd-in2.h: Regenerate.
3513 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
3514 (xstormy16_reloc_map): Add R_XSTORMY16_12.
3516 2002-12-19 Kazu Hirata <kazu@cs.umass.edu>
3518 * doc/bfdint.texi: Fix typos.
3520 2002-12-20 Paul Eggert <eggert@twinsun.com>
3522 Port to POSIX 1003.1-2001.
3523 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
3524 * configure.in (build-warnings): Likewise.
3525 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
3526 * aclocal.m4: Regenerate.
3527 * config.in: Regenerate.
3528 * configure: Regenerate.
3530 2002-12-19 Alan Modra <amodra@bigpond.net.au>
3532 * coff-h8300.c: Include libiberty.h.
3533 (h8300_reloc16_extra_cases): Check the hash table creator before
3534 referencing h8300 specific fields. Stash the hash table pointer
3535 in a local var. Comment typo fixes.
3536 (h8300_bfd_link_add_symbols): Likewise.
3538 * reloc.c (struct reloc_howto_struct): Revise src_mask and
3540 * bfd-in2.h: Regenerate.
3542 2002-12-18 Alan Modra <amodra@bigpond.net.au>
3544 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
3545 code a little. Comment on dynamic relocs against section symbols.
3547 2002-12-17 Roger Sayle <roger@eyesopen.com>
3549 * configure.host (ia64-*-hpux*): Support 64 bit targets using
3550 the HP compiler's "long long".
3552 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
3554 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
3555 and R_XSTORMY16_HI16) howto entries.
3556 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
3557 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
3558 determine the start of the second reloc table.
3560 2002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
3562 * ecofflink.c: Fix the reading of the debugging information
3563 of Tru64/Alpha binaries that are produced by recent Compaq
3565 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
3567 (lookup_line): Because of the strange information sometimes
3568 generated by Compaq's recent compilers, change how the FDR
3569 table is searched so that PDRs (procedure descriptors) are
3570 correctly found. Note that this change is really more of a hack;
3571 however, I have included extensive documentation as to why
3572 this is the best solution short of an extensive rewrite or
3574 (fdrtab_lookup): Add comments to explain the algorithm.
3576 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
3578 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
3579 initializers to match struct declaration.
3581 2002-12-12 Alan Modra <amodra@bigpond.net.au>
3583 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
3584 * elf.c (get_program_header_size): Likewise.
3585 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
3586 (m32r_elf_generic_reloc): Likewise.
3587 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
3588 * elflink.h (elf_bfd_discard_info): Likewise.
3590 2002-12-12 Alan Modra <amodra@bigpond.net.au>
3592 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
3593 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
3594 DT_RELSZ adjustment, not output section. Avoid writing tags when
3595 unchanged. Don't assume linker script is sane, adjust DT_REL too.
3596 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
3597 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
3598 DT_RELASZ adjustment, not output section. Avoid writing tags when
3599 unchanged. Adjust DT_RELA.
3600 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
3601 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
3603 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
3605 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
3608 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
3610 * elfxx-mips.c (struct mips_got_entry): New.
3611 (struct mips_got_info): Added got_entries field.
3612 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
3613 (mips_elf_local_got_index, mips_elf_got_page,
3614 mips_elf_got16_entry): Re-implement in terms of new...
3615 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
3617 (mips_elf_highest): Warning clean-up.
3618 (mips_elf_create_got_section): Initialize got_entries.
3619 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
3621 (_bfd_mips_elf_size_dynamic_sections): Do not account for
3622 GOT_PAGE entries, since we now reuse GOT16 entries.
3624 2002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
3626 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
3627 read-only section that lies after .text and before .data to be
3628 written into the output file and included in a_text.
3629 (translate_to_native_sym_flags): If an otherwise unrepresentable
3630 section was merged with .text, convert its symbols to N_TEXT
3632 * libaout.h (aout_section_merge_with_text_p): New macro.
3634 2002-12-08 Alan Modra <amodra@bigpond.net.au>
3636 * bfd-in.h: Comment typo fix. Formatting.
3637 * bfd-in2.h: Regenerate.
3638 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
3639 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
3640 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
3642 2002-12-05 Richard Henderson <rth@redhat.com>
3644 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
3645 Only send PCREL21B though the plt. Fix installed reloc type.
3646 (elfNN_ia64_relocate_section): Give error for dynamic reloc
3647 against PCREL22 or PCREL64I; clean up error messages for
3650 2002-12-04 Kevin Buettner <kevinb@redhat.com>
3652 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
3654 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
3656 2002-12-04 David Mosberger <davidm@hpl.hp.com>
3658 * cpu-ia64-opc.c: Add operand constant "ar.csd".
3660 2002-12-04 H.J. Lu <hjl@gnu.org>
3662 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
3663 BFD address when constructing local name.
3665 2002-12-04 Andreas Schwab <schwab@suse.de>
3667 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
3669 (elf_m68k_link_hash_table_create): Initialize it.
3670 (elf_m68k_check_relocs): Handle symbols that are forced to be
3671 local due to visibility changes.
3672 (elf_m68k_adjust_dynamic_symbol): Likewise.
3673 (elf_m68k_size_dynamic_sections): Likewise.
3674 (elf_m68k_discard_copies): Likewise.
3675 (elf_m68k_relocate_section): Likewise.
3677 2002-12-04 Alan Modra <amodra@bigpond.net.au>
3679 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
3681 2002-12-04 Alan Modra <amodra@bigpond.net.au>
3683 * srec.c (srec_write_symbols): Restore '$' prefix to address
3684 accidentally removed in 2002-04-04 change.
3685 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
3687 2002-12-03 Nick Clifton <nickc@redhat.com>
3689 * elf32-ppc.c (apuinfo_list_init): New function.
3690 (apuinfo_list_add): New function: Add a value to the list.
3691 (apuinfo_list_length): New function: Return the number of
3693 (apuinfo_list_element): New function: Return a value on the
3695 (apuinfo_list_finish): New function: Free the resources used
3697 (ppc_elf_begin_write_processing): New function. Scan the
3698 input bfds for apuinfo sections.
3699 (ppc_elf_write_section): New function: Delay the creation of
3700 the contents of an apuinfo section in an output bfd.
3701 (ppc_elf_final_write_processing): New function. Create the
3702 contents of an apuinfo section in an output bfd.
3703 (elf_backend_begin_write_processing): Define.
3704 (elf_backend_final_write_processing): Define.
3705 (elf_backend_write_section): Define.
3707 2002-12-03 Richard Henderson <rth@redhat.com>
3709 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
3711 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
3713 Fix PR savannah/1417:
3714 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
3715 branch if it goes to the start of the deleted region.
3717 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
3719 * bfd-in2.h (bfd_mach_m6812): Rebuild.
3720 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
3721 bfd_mach_m6812s): Declare.
3723 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
3724 (_bfd_m68hc12_elf_set_private_flags): Call it.
3725 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
3726 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
3727 report microcontroller incompatibilities (HC12 vs HCS12).
3728 (elf_backend_object_p): Update.
3730 2002-11-30 Alan Modra <amodra@bigpond.net.au>
3732 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
3733 (enum bfd_boolean, boolean): Delete.
3734 (bfd_boolean): Typedef to an int.
3735 (FALSE, TRUE): Define.
3736 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
3737 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
3738 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
3739 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
3740 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
3741 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
3742 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
3743 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
3744 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
3745 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
3746 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
3747 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
3748 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
3749 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
3750 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
3751 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
3752 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
3753 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
3754 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
3755 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
3756 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
3757 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
3758 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
3759 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
3760 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
3761 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
3762 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
3763 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
3764 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
3765 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
3766 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
3767 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
3768 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
3769 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
3770 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
3771 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
3772 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
3773 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
3774 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
3775 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
3776 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
3777 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
3778 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
3779 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
3780 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
3781 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
3782 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
3783 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
3784 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
3785 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
3786 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
3787 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
3788 of bfd_boolean vars with TRUE/FALSE. Formatting.
3789 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
3791 2002-11-28 Alan Modra <amodra@bigpond.net.au>
3793 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
3794 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
3795 with Elf_Internal_Rela.
3796 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
3797 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
3798 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
3799 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
3800 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
3801 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
3802 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
3803 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
3804 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
3805 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
3806 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
3807 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
3809 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
3810 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
3811 Remove INLINE keyword.
3812 (elf_swap_reloc_in): Likewise. Also clear r_addend.
3813 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
3815 (elf_write_relocs): Consolidate REL and RELA code.
3816 (elf_slurp_reloc_table_from_section): Simplify REL code.
3817 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
3818 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
3819 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
3821 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
3822 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
3823 (elf_link_output_relocs): Likewise.
3824 (elf_reloc_link_order): Likewise.
3825 (elf_finish_pointer_linker_section): Likewise.
3826 (struct elf_link_sort_rela): Remove union.
3827 (elf_link_sort_cmp1): Update to suit.
3828 (elf_link_sort_cmp2): Here too.
3829 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
3830 over-allocation for int_rels_per_ext_rel != 1 case.
3831 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
3832 * elf32-i386.c: Likewise.
3833 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
3834 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
3835 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
3836 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
3837 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
3838 elf64-sparc.c, elf64-x86-64.c: Likewise.
3839 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
3840 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
3841 bfd_elf32_swap_reloc_in.
3843 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
3844 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
3845 (mips_elf64_swap_reloc_in): Zero r_addend.
3846 (mips_elf64_be_swap_reloc_in): Likewise.
3847 (mips_elf64_slurp_one_reloc_table): Simplify.
3849 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
3850 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
3851 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
3853 2002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3855 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
3856 unresolved debugging relocs in dynamic applications.
3857 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
3859 2002-11-26 Alan Modra <amodra@bigpond.net.au>
3861 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
3862 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
3863 on a relocatable link. Comment typos.
3864 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
3865 in the order they are declared. Clear elf_hash_value too.
3866 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
3867 eh_info and tls_segment.
3868 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
3869 sorted when discarding relocs by turning them into R_*_NONE.
3871 * libbfd.c (warn_deprecated): Comment spelling.
3872 * po/SRC-POTFILES.in: Regenerate.
3874 2002-11-21 Richard Henderson <rth@redhat.com>
3876 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
3877 arch's st_other bits when merging visibilities.
3878 (elf_link_output_extsym): Tidy clearing of visibility field.
3880 2002-11-21 Alan Modra <amodra@bigpond.net.au>
3882 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
3883 (SWAP_OUT_RELOC_OFFSET): Define.
3885 2002-11-20 Alexandre Oliva <aoliva@redhat.com>
3887 * elf.c (_bfd_elf_link_hash_table_init): Make sure
3888 can_refcount is properly extended to the type of
3891 2002-11-19 Alexandre Oliva <aoliva@redhat.com>
3893 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
3894 (_bfd_mips_elf_relocate_section): Use it.
3896 * elfxx-mips.c (MNAME): New macro.
3897 (_bfd_mips_elf_check_relocs): Use it.
3898 (_bfd_mips_elf_discard_info): Likewise.
3899 (_bfd_mips_elf_final_link): Likewise.
3901 2002-11-19 Alan Modra <amodra@bigpond.net.au>
3903 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
3904 rel_hdr.sh_size too.
3906 2002-11-18 Klee Dienes <kdienes@apple.com>
3908 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
3909 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
3910 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
3911 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
3912 Add dependencies for bfdwin.c, bfdio.c.
3913 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
3914 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
3915 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
3916 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
3917 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
3918 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
3919 bfd_get_size (moved from libbfd.c and bfd.c).
3920 * bfdwin.c New file. Contains _bfd_window_internal,
3921 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
3922 libbfd.c and bfd.c).
3923 * po/SRC-POTFILES.in: Regenerate.
3924 * po/bfd.pot: Regenerate.
3925 * libbfd.h: Regenerate.
3926 * bfd-in2.h: Regenerate.
3927 * aclocal.m4: Regenerate.
3928 * Makefile.in: Regenerate.
3929 * configure: Regenerate.
3931 2002-11-18 Klee Dienes <kdienes@apple.com>
3933 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
3935 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
3937 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
3938 jsr after a short jump.
3939 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
3941 2002-11-15 Klee Dienes <kdienes@apple.com>
3943 * pef.c (bfd_pef_convert_architecture): Move declaration of
3944 ARCH_POWERPC and ARCH_M68K to the start of the function.
3946 2002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
3948 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
3950 2002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
3952 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
3953 For bpo_gregs_section->contents, allocate _raw_size, not
3956 2002-11-13 Klee Dienes <kdienes@apple.com>
3958 * config.bfd: Add entries for powerpc-*-darwin and cousins.
3960 2002-11-13 H.J. Lu <hjl@gnu.org>
3962 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
3964 2002-11-13 Klee Dienes <kdienes@apple.com>
3965 Alan Modra <amodra@bigpond.net.au>
3967 * bfd.c (struct bfd_preserve): New.
3968 (bfd_preserve_save): New function.
3969 (bfd_preserve_restore): Ditto.
3970 (bfd_preserve_finish): Ditto.
3971 * bfd-in2.h: Regenerate.
3972 * mach-o.c: Formatting.
3973 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
3974 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
3975 (bfd_mach_o_core_p): Ditto.
3976 (bfd_mach_o_scan): Pass in mdata.
3977 * mach-o.h (bfd_mach_o_scan): Update prototype.
3978 * pef.c: Formatting.
3979 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
3980 (bfd_pef_xlib_object_p): Ditto.
3981 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
3982 * pef.h (bfd_pef_scan): Update prototype.
3983 * xsym.c: Formatting, K&R fixes.
3984 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
3985 (bfd_sym_scan): New function split out from bfd_sym_object_p.
3986 * xsym.h (bfd_sym_scan): Declare.
3987 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
3988 * elfcore.h (elf_core_file_p): Likewise.
3989 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
3991 2002-11-12 Nick Clifton <nickc@redhat.com>
3993 * po/da.po: Updated Danish translation.
3995 2002-11-12 Alan Modra <amodra@bigpond.net.au>
3997 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
3998 relocatable link too.
3999 (elf_link_input_bfd): When emitting relocs, adjust offsets for
4000 eh_frame and stab sections. Zap deleted relocs.
4001 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
4002 (elf_bfd_discard_info): Run for relocatable link too.
4003 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
4005 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
4006 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
4008 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
4009 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
4010 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
4011 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
4012 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
4013 (struct elf_link_hash_table): Add eh_info.
4014 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
4015 (_bfd_elf_discard_section_eh_frame): Update prototype.
4016 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
4017 (_bfd_elf_write_section_eh_frame): Likewise.
4018 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
4019 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
4020 param. Get "hdr_info" from link hash table.
4021 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
4022 header section from link hash table. Save header section to elf_tdata.
4023 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
4024 header section from link hash table. Don't alloc hdr_info. Clear
4025 hdr_sec instead of setting "strip".
4026 (_bfd_elf_eh_frame_section_offset): Formatting.
4027 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
4028 Get header section from link hash table.
4029 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
4030 Get header section from link hash table.
4031 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
4032 (get_program_header_size): Likewise.
4033 (_bfd_elf_section_offset): Formatting.
4034 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
4035 section pointer in link hash table.
4036 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
4037 and _bfd_elf_write_section_eh_frame calls. Update comment about
4039 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
4040 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
4042 * po/SRC-POTFILES.in: Regenerate.
4044 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
4045 relocs for discarded FDEs. Remove dead code.
4046 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
4047 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
4048 Tidy conditions under which stabs are edited. Formatting.
4049 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
4050 from discarded relocs.
4051 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
4052 section adjustments after testing magic values.
4054 2002-11-12 Thomas Moestl <tmm@FreeBSD.org>
4056 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
4057 references to large plt symbols.
4059 2002-11-12 Klee Dienes <kdienes@apple.com>
4061 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
4062 looking for an unused section name.
4064 2002-11-11 Kazu Hirata <kazu@cs.umass.edu>
4066 * coff-h8300.c: Fix formatting.
4067 * elf32-h8300.c: Likewise.
4068 * reloc16.c: Likewise.
4070 2002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
4072 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
4073 section when dynamic section unused; _bfd_strip_section_from_output
4076 2002-11-08 Alan Modra <amodra@bigpond.net.au>
4078 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
4081 * dwarf2.c: Revert last change.
4083 2002-11-07 Michal Ludvig <mludvig@suse.cz>
4085 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
4086 _bfd_dwarf2_find_nearest_line): Use
4087 bfd_simple_get_relocated_section_contents() instead of
4088 bfd_get_section_contents().
4089 * reloc.c (bfd_perform_relocation): Add sanity check.
4090 * simple.c (simple_get_relocated_section_contents): If the section
4091 does not have any relocs associated with it, just return the
4092 unadjusted contents.
4094 2002-11-07 Hans-Peter Nilsson <hp@axis.com>
4096 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
4097 case R_CRIS_32_GOT>: Correct test for filling in constant .got
4098 contents, enabling for a non-DSO, for symbols defined in the
4099 program with --export-dynamic.
4101 2002-11-07 Alan Modra <amodra@bigpond.net.au>
4103 * elf64-ppc.c: Comment typo fixes.
4104 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
4106 2002-11-07 Nick Clifton <nickc@redhat.com>
4108 * po/da.po: Updated Danish translation.
4110 2002-11-06 Alexandre Oliva <aoliva@redhat.com>
4112 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
4113 exactly three internal relocs per external reloc. Set reloc_count
4114 to the external reloc count.
4116 2002-11-06 Klee Dienes <kdienes@apple.com>
4118 * coff-stgo32.c (stub_bytes): Mark as const.
4119 Fix comment formatting.
4121 2002-11-06 Klee Dienes <kdienes@apple.com>
4123 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
4125 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
4126 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
4127 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
4128 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
4129 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
4131 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
4132 * Makefile.in: Regenerate.
4133 * doc/Makefile.in: Regenerate.
4134 * bfd-in2.h: Regenerate.
4135 * xsym.c: New file. Contains support for the Apple/Metrowerks
4136 xSYM debugging format.
4138 * pef.c: New file. Contains support for the Apple Code Fragment
4139 Manager Preferred Executable Format
4141 * pef-traceback.h: New file. Contains support for parsing PowerPC
4142 traceback tables as used by PEF executables (and perhaps other
4144 * mach-o.c: New file. Contains support for the Mach-O object file
4146 * mach-o.h: New file.
4147 * mach-o-target.c: New file. Declares the mach-o targets
4148 themselves. Included three times by mach-o.c; each time with a
4149 different set of macros set.
4151 2002-11-06 Graeme Peterson <gp@qnx.com>
4153 * Makefile.am: Remove entries for elf32-qnx.[ch].
4154 * Makefile.in: Regenerate.
4155 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
4156 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
4157 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
4158 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
4159 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
4160 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
4161 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
4162 * configure: Regenerate.
4163 * elf32-qnx.c: Remove.
4164 * elf32-qnx.h: Remove.
4165 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
4166 is_contained_by_filepos, and copy_private_bfd_data_p.
4167 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
4168 is_contained_by_filepos, and copy_private_bfd_data_p.
4169 * elf32-i386.c: Remove QNX extended bfd support.
4170 * elf32-ppc.c: Remove QNX extended bfd support.
4171 * elf32-sh.c: Remove QNX extended bfd support.
4172 * elfarm-nabi.c: Remove QNX extended bfd support.
4173 * targets.c: Remove qnx vectors.
4174 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
4175 (elf_backend_is_contained_by_filepos): Remove.
4176 (elf_backend_copy_private_bfd_data_p): Remove.
4177 * po/SRC-POTFILES.in: Regenerate.
4179 2002-11-06 David O'Brien <obrien@FreeBSD.org>
4180 Alan Modra <amodra@bigpond.net.au>
4182 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
4183 dynamic relocs against section symbols for the output section vma.
4185 2002-11-05 Alan Modra <amodra@bigpond.net.au>
4187 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
4188 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
4190 2002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4191 Alan Modra <amodra@bigpond.net.au>
4193 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
4194 vectors in target_selvecs.
4195 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
4197 (sh-*-netbsdelf*): Likewise.
4198 * configure.in (assocvecs): New variable. Handle assocvecs like
4200 * configure: Regenerate.
4201 * format.c (bfd_check_format_matches): Store bfd_target pointers
4202 in matching_vector instead of target names. Select first target
4203 from bfd_associated_vector that matches a list of ambiguous targets.
4204 * targets.c (_bfd_associated_vector): New array.
4205 (bfd_associated_vector): New variable.
4206 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
4207 * libbfd-in.h (bfd_associated_vector): Declare.
4208 * libbfd.h: Regenerate.
4210 2002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
4212 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
4213 non-NULL before dereferencing.
4215 2002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4217 * vms.c (vms_object_p): Restore the start address when returning
4220 2002-11-04 Alan Modra <amodra@bigpond.net.au>
4221 Hans-Peter Nilsson <hp@axis.com>
4223 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
4224 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
4225 Set up a larger symshndxbuf, and write it out. Free it on
4226 exit rather than freeing symbuf twice. Correct section index
4227 on output section symbol loop.
4228 (elf_link_output_sym): Accumulate symbol extension section
4229 indices, reallocating symshndxbuf rather than writing it out.
4230 (elf_link_flush_output_syms): Don't flush symshndxbuf.
4231 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
4232 Use bfd_zalloc to clear i_shdrp[0] too.
4234 2002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
4236 * elf32-sh64-com.c (sh64_address_in_cranges): Use
4237 _raw_size of cranges section if _cooked_size not yet set.
4239 2002-11-03 Hans-Peter Nilsson <hp@axis.com>
4241 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
4242 for bfd_elf32_swap_symbol_out.
4244 2002-10-31 David O'Brien <obrien@FreeBSD.org>
4246 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
4247 signed and unsigned in comparison.
4249 2002-10-30 Daniel Jacobowitz <drow@mvista.com>
4251 * coffcode.h: Remove extraneous '\'.
4253 2002-10-28 H.J. Lu <hjl@gnu.org>
4255 * Makefile.am (targets.lo): Depend on Makefile instead of
4257 (archures.lo): Likewise.
4258 * Makefile.in: Regenerated.
4260 2002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
4262 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
4263 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
4266 2002-10-25 Jim Wilson <wilson@redhat.com>
4268 * elf64-sh64.c (sh_elf64_relocate_section): Call
4269 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
4270 of SHF_MERGE section.
4272 2002-10-25 Hans-Peter Nilsson <hp@axis.com>
4274 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
4276 2002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
4278 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
4279 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
4281 (NAME(aout,final_link)): Cast enum used in assignment.
4282 (aout_link_write_symbols): Cast enums in comparisons, int values to
4283 boolean, enums in assignments to int.
4284 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
4285 (aout_link_input_section_ext): Likewise. Cast enums used in
4286 comparisons with unsigned ints.
4287 (aout_link_reloc_link_order): Cast enum to int in assignment.
4288 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
4290 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
4292 * bfd-in2.h (bfd_set_section_vma): Likewise.
4293 * bfd.c (bfd_record_phdr): Cast enums in assignments.
4294 * binary.c (bfd_alloc): Cast enum to long.
4295 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
4296 * dwarf2.c (read_abbrevs): Add casts to enum types.
4297 (read_attribute_value): Likewise.
4298 (arange_add): Cast result of bfd_zalloc call.
4299 (comp_unit_contains_address): Return true and false.
4300 (comp_unit_find_nearest_line): Cast return to boolean.
4301 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
4302 * gen-aout.c: define macro '_' if not defined.
4303 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
4304 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
4305 (bfd_write_bigendian_4byte_int): Cast return to boolean.
4306 (bfd_seek): Cast bfd_realloc to bfd_byte *.
4307 (bfd_generic_is_local_label_name): Cast return to boolean.
4308 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
4309 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
4310 struct bfd_hash_entry *.
4311 (_bfd_generic_link_hash_newfunc): likewise.
4312 (_bfd_generic_final_link): Cast enum to unsigned int.
4313 * merge.c (sec_merge_emit): Cast return to boolean.
4314 (merge_strings): Add casts to const unsigned char *.
4315 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
4316 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
4317 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
4318 to struct bfd_hash_entry *.
4319 (bfd_set_section_content): Add cast to PTR in comparison.
4320 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
4321 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
4322 simple_dummy_unattached_reloc,
4323 bfd_simple_get_relocated_section_contents): Add K&R declarations and
4324 function definitions.
4325 * srec.c (S3Forced): Initialize to false.
4326 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
4327 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
4328 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
4329 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
4330 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
4333 2002-10-23 Jakub Jelinek <jakub@redhat.com>
4335 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
4336 relocs into shared lib non-allocated reloc sections.
4338 2002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
4340 * dwarf2.c (add_line_info): Ensure that the line_info_table is
4341 sorted even when given an out-of-order line sequence.
4342 (lookup_address_in_line_info_table): When an exact VMA match is
4343 not found, return line information with the closest VMA.
4345 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
4347 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
4348 HPUX 11.00 patch PHSS_26559.
4350 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
4352 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
4353 the options section into a separate section unless IRIX 6
4354 compatibility is enabled.
4356 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
4358 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
4360 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
4361 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
4363 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
4364 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
4366 2002-10-21 Graeme Peterson <gp@qnx.com>
4368 * targets.c (_bfd_target_vector): Add missing qnx vectors.
4370 2002-10-21 Alan Modra <amodra@bigpond.net.au>
4372 * targets.c (bfd_target_list): Don't return the default target twice.
4374 2002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
4376 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
4377 perror with bfd_perror.
4379 2002-10-19 H.J. Lu <hjl@gnu.org>
4381 * elflink.h (elf_link_add_object_symbols): Correctly handle
4382 DT_RPATH and DT_RUNPATH.
4384 2002-10-19 Mark Kettenis <kettenis@gnu.org>
4386 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
4388 2002-10-17 Denis Chertykov <denisc@overta.ru>
4390 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
4393 2002-10-17 Alan Modra <amodra@bigpond.net.au>
4395 * elfxx-target.h (USE_REL): Don't define as 1.
4396 * elf32-arm.h (USE_REL): Provide a default define of 0.
4397 Use #if rather than #ifdef when testing USE_REL.
4398 * elf32-m32r.c: Likewise.
4400 * elf32-arc.c (USE_REL): Define as 1.
4401 * elf32-d10v.c (USE_REL): Likewise.
4402 * elf32-m32r.c (USE_REL): Likewise.
4403 * elf32-m68hc11.c (USE_REL): Likewise.
4404 * elf32-m68hc12.c (USE_REL): Likewise.
4405 * elf32-or32.c (USE_REL): Likewise.
4406 * elfarm-nabi.c (USE_REL): Likewise.
4408 2002-10-16 Jakub Jelinek <jakub@redhat.com>
4410 * config.bfd (s390-*-linux*): Add targ64_selvecs.
4411 (s390x-*-linux*): Add targ_selvecs.
4413 2002-10-16 Alan Modra <amodra@bigpond.net.au>
4415 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
4416 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
4417 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
4418 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
4419 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
4420 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
4421 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
4422 (SOURCE_HFILES): Add elf32-qnx.h.
4423 (BUILD_HFILES): Add bfdver.h.
4425 * Makefile.in: Regenerate.
4426 * configure.in Update bfd vector dependencies.
4427 * configure: Regenerate.
4428 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
4429 * elf32-i386qnx.c: Likewise.
4430 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
4431 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
4432 * elf32-sh-lin.c: Likewise.
4433 * elf32-shqnx.c: Likewise.
4434 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
4435 * elf32-sh64-nbsd.c: Likewise.
4436 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
4437 * elf64-sh64-nbsd.c: Likewise.
4438 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
4439 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
4440 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
4441 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
4442 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
4443 (elf_backend_is_contained_by_filepos): Likewise.
4444 (elf_backend_copy_private_bfd_data_p): Likewise.
4445 Globalize and move functions to..
4446 * elf32-qnx.c: ..here. New file.
4447 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
4448 emit target vectors when INCLUDE_SHMEDIA.
4449 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
4451 * elf64-sh64.c: Remove ELF_ARCH test.
4452 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
4453 * po/BLD-POTFILES.in: Regenerate.
4454 * po/SRC-POTFILES.in: Regenerate.
4456 2002-10-16 Alan Modra <amodra@bigpond.net.au>
4458 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
4459 loaded with --just-symbols.
4461 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
4462 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
4463 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
4464 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
4466 2002-10-15 Richard Henderson <rth@redhat.com>
4468 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
4469 (BFD64_BACKENDS_CFILES): Likewise.
4470 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
4471 * elf64-alpha-fbsd.c: Remove file, move code ...
4472 * elf64-alpha.c: ... here.
4473 * Makefile.in, configure: Rebuild.
4475 2002-10-14 Richard Henderson <rth@redhat.com>
4477 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
4480 2002-10-14 Stephen Clarke <stephen.clarke@superh.com>
4482 * elf32-sh.c (elf_sh_link_hash_entry): Replace
4483 datalabel_got_offset with union of datalabel_got
4484 offset and refcount.
4485 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
4486 (allocate_dynrelocs): Delete unnecessary code for
4487 STT_DATALABEL type. Create entry in got for
4488 datalabel version of symbol if datalabel_got.refcount > 0.
4489 (sh_elf_relocate_section): Use datalabel_got union.
4490 (sh_elf_gc_sweep_hook): Pull common code to initialize
4491 h and eh out of switch statement. Declare seen_stt_datalabel.
4492 Initialize it. Decrement datalabel_got.refcount for
4493 got relocs when seen_stt_datalabel is true.
4494 Decrement local_got_refcounts entry for datalabel got relocs
4496 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
4497 (sh_elf_check_relocs): Declare seen_stt_datalabel.
4498 Initialize it. When seen_stt_datalabel is true, increment
4499 datalabel_got refcount rather than got.refcount.
4500 (sh_elf_finish_dynamic_symbol): Create relocs to
4501 initialize got entry for datalabel version of symbol.
4503 2002-10-14 Alan Modra <amodra@bigpond.net.au>
4505 * Makefile.am: Run "make dep-am".
4506 (BFD_H_FILES): Remove version.h.
4507 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
4508 * version.h: ..to here.
4509 * configure.in (bfd_version_date): Remove.
4510 (AC_OUTPUT): Make bfdver.h from version.h.
4511 * bfd.c: #include "bfdver.h".
4512 * vms-hdr.c: Likewise.
4513 * Makefile.in: Regenerate.
4514 * bfd-in2.h: Regenerate.
4515 * configure: Regenerate.
4516 * po/SRC-POTFILES.in: Regenerate.
4518 2002-10-14 Alan Modra <amodra@bigpond.net.au>
4520 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
4521 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
4522 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
4523 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
4524 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
4525 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
4526 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
4527 bfd_mach_ip2022, bfd_mach_ip2022ext,
4528 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
4529 * bfd-in2.h: Regenerate.
4531 2002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4533 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
4534 endian vector to targ_selvecs.
4536 2002-10-13 Alexandre Oliva <aoliva@redhat.com>
4538 * elfxx-mips.c (mips_elf_calculate_relocation): Take
4539 save_addend argument. Don't apply the 32-bit mask to a
4540 GPREL32 value if it's to be used in another relocation. Don't
4541 use forced-check computation of local_p to decide whether to
4542 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
4543 of the addend of a non-in-place GPREL16 relocation.
4544 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
4545 mips_elf_calculate_relocation().
4547 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
4549 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
4550 with symbols in other sections if we relaxed something; the sections
4551 output offsets must be re-computed before.
4553 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
4555 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
4556 handling to use Elf_Internal_Sym.
4557 (m68hc11_elf_relax_delete_bytes): Likewise.
4559 2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4561 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
4562 sh_elf_object_p, dtpoff_base): New functions.
4563 (sh_elf_howto_table): Add TLS relocs.
4564 (sh_reloc_map): Likewise.
4565 (sh_elf_info_to_howto): Support TLS relocs.
4566 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
4567 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
4569 (sh_elf_obj_tdata): New.
4570 (elf_sh_link_hash_table): Add tls_ldm_got.
4571 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
4572 (allocate_dynrelocs): Support TLS relocs.
4573 (sh_elf_size_dynamic_sections): Likewise.
4574 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
4575 .rela.got section when found already. Return false after printing
4576 error about unresolvable relocation.
4577 (sh_elf_gc_sweep_hook): Support TLS relocs.
4578 (sh_elf_check_relocs): Likewise.
4579 (sh_elf_finish_dynamic_symbol): Likewise.
4580 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
4581 * reloc.c: Add SH TLS relocs.
4582 * bfd-in2.h, libbfd.h: Regenerate.
4584 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
4586 * Makefile.in: Regenerated.
4588 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
4590 * Makefile.am: Run dep-am.
4591 (BFD_H_DEP): Add simple.c and linker.c.
4592 (BFD32_LIBS): Add simple.lo.
4593 (BFD32_LIBS_CFILES): Add simple.c.
4594 * Makefile.in: Regenerated.
4595 * bfd-in2.h: Regenerated.
4596 * simple.c: New file.
4598 2002-10-11 Alan Modra <amodra@bigpond.net.au>
4600 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
4601 (record_thumb_to_arm_glue): Likewise.
4602 * ecoff.c (ecoff_link_add_externals): Likewise.
4603 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
4604 (record_thumb_to_arm_glue): Likewise.
4605 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
4606 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
4607 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
4608 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
4609 * elf64-ppc.c (func_desc_adjust): Likewise.
4610 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
4611 (sh64_elf64_create_dynamic_sections): Likewise.
4612 * elflink.c (_bfd_elf_create_got_section): Likewise.
4613 (_bfd_elf_create_dynamic_sections): Likewise.
4614 (_bfd_elf_create_linker_section): Likewise.
4615 * elflink.h (elf_add_default_symbol): Likewise.
4616 (elf_link_create_dynamic_sections): Likewise.
4617 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
4618 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
4619 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
4620 (_bfd_mips_elf_add_symbol_hook): Likewise.
4621 (_bfd_mips_elf_create_dynamic_sections): Likewise.
4622 * linker.c (generic_link_add_symbol_list): Likewise.
4623 * xcofflink.c (xcoff_link_add_symbols): Likewise.
4625 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
4627 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
4628 completely removed. Correct local sym adjustment.
4630 2002-10-10 Stephen Clarke <stephen.clarke@superh.com>
4632 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
4633 Correct mistake in calculation of address of .got.
4634 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
4635 elf_sh64_pic_plt_entry_le): Likewise.
4637 2002-10-09 Richard Shann <richard.shann@superh.com>
4638 Stephen Clarke <stephen.clarke@superh.com>
4640 * Makefile.am: Add entries for elf32-sh64-lin.c and
4641 elf64-sh64-lin.c. Regenerate.
4642 * Makefile.in: Regenerate.
4643 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
4644 to use sh64 vectors rather than sh vectors.
4645 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
4646 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
4647 * configure: Regenerate.
4648 * elf32-sh64-lin.c: New file.
4649 * elf64-sh64-lin.c: New file.
4650 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
4651 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
4653 2002-10-08 H.J. Lu <hjl@gnu.org>
4655 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
4656 IE->LE transition for R_386_TLS_IE.
4658 2002-10-08 Alan Modra <amodra@bigpond.net.au>
4660 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
4662 2002-10-07 Mark Elbrecht <snowball3@softhome.net>
4664 * cofflink.c (mark_relocs): Don't mark relocations in excluded
4667 2002-10-07 Alan Modra <amodra@bigpond.net.au>
4669 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
4672 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
4674 2002-10-06 Alan Modra <amodra@bigpond.net.au>
4676 * opncls.c: Formatting.
4677 (_bfd_new_bfd): Use a smaller section hash table.
4679 2002-10-05 Alexandre Oliva <aoliva@redhat.com>
4681 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
4682 of the other two relocations packed with a REL32 to NONE.
4684 2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
4686 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
4687 (sh_elf_link_hash_newfunc): Initialize it.
4688 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
4689 to got.refcount for symbols that are forced local or when
4690 we have direct got refs.
4691 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
4692 to correctly adjust got.refcount and plt.refcount.
4693 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
4694 (sh_elf_check_relocs): Increment gotplt_refcount.
4696 2002-10-01 Jakub Jelinek <jakub@redhat.com>
4698 * elf32-i386.c (elf_i386_relocate_section): Fix
4699 movl foo@indntpoff, %eax IE->LE transition.
4701 2002-10-01 Jakub Jelinek <jakub@redhat.com>
4703 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
4704 sequence and its transitions.
4706 2002-10-01 Jakub Jelinek <jakub@redhat.com>
4708 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
4709 to st_value + addend in non-code sections.
4710 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
4711 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
4713 2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
4714 Ken Raeburn <raeburn@cygnus.com>
4715 Aldy Hernandez <aldyh@redhat.com>
4716 Eric Christopher <echristo@redhat.com>
4717 Richard Sandiford <rsandifo@redhat.com>
4719 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
4720 (bfd_mach_mips5500): New.
4721 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
4722 (arch_info_struct): Add corresponding entries here.
4723 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
4724 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
4725 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
4726 bfd_mach_mips5400 and bfd_mach_mips5500.
4727 (_bfd_mips_elf_mach_extends_p): New function.
4728 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
4729 the EF_MIPS_MACH flags.
4730 * bfd-in2.h: Regenerate.
4732 2002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
4734 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
4737 2002-09-28 Alan Modra <amodra@bigpond.net.au>
4739 * elf.c (map_sections_to_segments): Correct test for start of
4740 writable section in the same page as end of read-only section.
4742 2002-09-27 Matt Thomas <matt@3am-software.com>
4744 * elf32-vax.c (elf_vax_check_relocs): Remove unused
4745 local_got_refcounts usage. Remove allocation of got slot.
4746 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
4747 Remove de-allocation of got slot.
4748 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
4749 traversal for elf_vax_instantiate_got_entries. Allow empty .got
4750 sections to be GC'ed.
4751 (elf_vax_instantiate_got_entries): New function.
4752 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
4753 tests that are now handled by elf_vax_instantiate_got_entries.
4754 Assert GOT entry falls within .got section size. Remove redundant
4755 comparisions. Fix comments.
4757 2002-09-27 Jakub Jelinek <jakub@redhat.com>
4759 * reloc.c: Add x86-64 TLS relocs.
4760 * bfd-in2.h, libbfd.h: Rebuilt.
4761 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
4762 relocs. Add TLS relocs.
4763 (x86_64_reloc_map): Add TLS relocs.
4764 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
4765 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
4766 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
4767 (elf64_x86_64_hash_entry): Define.
4768 (struct elf64_x86_64_obj_tdata): New.
4769 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
4770 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
4771 (link_hash_newfunc): Initialize tls_type.
4772 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
4773 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
4774 (elf64_x86_64_mkobject): New.
4775 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
4776 (elf64_x86_64_tls_transition): New.
4777 (elf64_x86_64_check_relocs): Add r_type variable and use it.
4779 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
4780 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
4781 (elf64_x86_64_size_dynamic_sections): Likewise.
4782 (dtpoff_base, tpoff): New.
4783 (elf64_x86_64_relocate_section): Handle TLS relocs.
4784 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
4786 (bfd_elf64_mkobject): Define.
4788 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
4789 DF_STATIC_TLS if shared.
4791 2002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4793 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
4794 empty relocation sections.
4796 2002-09-26 Alan Modra <amodra@bigpond.net.au>
4798 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
4799 (ppc64_elf_build_stubs): Build them here instead.
4801 2002-09-24 Jakub Jelinek <jakub@redhat.com>
4803 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
4804 addend into r_addend, not *r_offset.
4805 (elf32_sparc_finish_dynamic_symbol): Likewise.
4806 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
4807 R_SPARC_RELATIVE's r_offset.
4809 2002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
4811 * dwarf2.c (decode_line_info): Update to correctly decode
4812 the (non-standard DWARF2) out-of-order address sequences
4813 generated by the Intel C++ 6.0 compiler for ia64-Linux.
4815 2002-09-23 Mark Elbrecht <snowball3@softhome.net>
4817 * config.bfd: For DJGPP targets, match with any cpu and any machine.
4819 2002-09-23 Alan Modra <amodra@bigpond.net.au>
4821 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
4822 for discarded FDEs. Remove redundant assignment.
4823 * elflink.h (elf_bfd_discard_info): Save edited relocs.
4825 2002-09-22 H.J. Lu <hjl@gnu.org>
4827 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
4828 the relocation count between different .reloc sections.
4830 2002-09-21 Alan Modra <amodra@bigpond.net.au>
4832 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
4833 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
4834 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
4837 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
4838 unsigned. Move "symcount" assignment out of loop.
4839 * Makefile.am: Run "make dep-am".
4840 * Makefile.in: Regenerate.
4841 * configure: Regenerate.
4842 * po/SRC-POTFILES.in: Regnerate.
4844 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
4846 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
4847 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
4850 2002-09-19 Jakub Jelinek <jakub@redhat.com>
4852 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
4853 even if generating R_PPC_RELATIVE reloc.
4854 (ppc_elf_relocate_section): Make sure relocation is performed
4855 if skip == -2. Clear memory at r_offset when creating dynamic
4858 2002-09-19 Jakub Jelinek <jakub@redhat.com>
4860 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
4861 BFD_RELOC_386_TLS_GOTIE): Add.
4862 * bfd-in2.h, libbfd.h: Rebuilt.
4863 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
4864 and R_386_TLS_GOTIE.
4865 (elf_i386_reloc_type_lookup): Handle it.
4866 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
4867 char instead of enum, change GOT_* into defines.
4868 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
4869 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
4870 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
4871 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
4872 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
4873 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
4874 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
4875 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
4876 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
4877 tls_type is GOT_TLS_IE_BOTH.
4878 (elf_i386_size_dynamic_sections): Likewise.
4879 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
4880 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
4881 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
4882 all 4 GOT_TLS_* TLS types.
4884 2002-09-19 Nick Clifton <nickc@redhat.com>
4886 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
4887 follow indirect links.
4889 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
4891 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
4892 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
4894 (ecoff_swap_sym_in) <iss>: Likewise.
4895 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
4896 ECOFF information: 'ioptMax' refers to the actual *size*
4897 of the optimization symtab, not the number of entries.
4899 2002-09-19 Daniel Jacobowitz <drow@mvista.com>
4901 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
4902 ELF_LINK_HASH_NEEDS_PLT logic.
4904 2002-09-18 Daniel Jacobowitz <drow@mvista.com>
4906 * elfcode.h (elf_slurp_reloc_table_from_section): Check
4907 correct relocation count.
4909 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
4911 * bfd-in.h (bfd_get_dynamic_symcount): Define.
4912 * bfd.c (struct _bfd): Add dynsymcount.
4913 * bfd-in2.h: Regenerated.
4914 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
4916 * elfcode.h (elf_slurp_reloc_table_from_section): Check
4919 2002-09-17 Stan Cox <scox@redhat.com>
4921 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
4922 (mips_elf64_final_gp): Don't make up gp value.
4923 * elfn32-mips.c (mips_elf_final_gp): Likewise.
4924 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
4925 .MIPS.options/.options section.
4927 2002-09-17 David O'Brien <obrien@FreeBSD.org>
4929 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
4930 It is benign for FreeBSD < 4.1. Minor reformatting.
4931 * elf64-alpha-fbsd.c: Likewise.
4933 2002-09-17 Jakub Jelinek <jakub@redhat.com>
4935 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
4938 2002-09-17 Alan Modra <amodra@bigpond.net.au>
4940 * elf64-alpha.c (alpha_elf_size_info): Make static.
4942 2002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
4944 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
4945 * cpu-tic4x.c: Ditto.
4947 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4949 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
4952 2002-09-16 Bruno Haible <bruno@clisp.org>
4954 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
4955 by a target variant implementation.
4956 * elf64-alpha.c: Likewise.
4957 * elf32-i386-fbsd.c: New file.
4958 * elf64-alpha-fbsd.c: New file.
4959 * targets.c: Support bfd_elf32_i386_freebsd_vec and
4960 bfd_elf64_alpha_freebsd_vec.
4961 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
4962 bfd_elf64_alpha_freebsd_vec.
4963 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
4964 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
4965 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
4966 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
4967 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
4968 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
4969 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
4971 2002-09-12 Jakub Jelinek <jakub@redhat.com>
4973 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
4975 (elf_i386_relocate_section): Return false after printing error about
4976 unresolvable relocation.
4978 2002-09-12 Nick Clifton <nickc@redhat.com>
4980 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
4983 2002-09-11 Jeffrey Law <law@redhat.com>
4985 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
4987 2002-09-11 Andrew Haley <aph@cambridge.redhat.com>
4989 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
4990 line_ptr before deciding we've found a symbol.
4992 2002-09-11 Nick Clifton <nickc@redhat.com>
4994 * po/da.po: New Danish translation file.
4995 * configure.in (LINGUAS): Add 'da'.
4996 * configure: Regenerate.
4998 2002-09-10 Michael Snyder <msnyder@redhat.com>
5000 * irix-core.c (do_sections, do_sections64): New functions.
5001 (irix_core_core_file_p): Call new functions do_sections,
5002 do_sections64, depending on corefile (32-bit or 64-bit).
5004 2002-09-09 Richard Henderson <rth@redhat.com>
5006 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
5007 and PCREL21F like PCREL21B.
5009 2002-09-04 Kevin Buettner <kevinb@redhat.com>
5011 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
5014 2002-09-02 Nick Clifton <nickc@redhat.com>
5016 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
5017 names instead of cryptically overloaded bfd_reloc error
5019 (v850_elf_relocate_section): Likewise.
5020 (v850_elf_relax_section): Replace caching of external symbols
5021 with caching of internal symbols obtained from calling
5022 bfd_elf_get_elf_syms().
5023 Fixup problems with freeing cached allocated memory blocks.
5025 2002-09-02 Alan Modra <amodra@bigpond.net.au>
5027 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
5028 (bfd_pj_arch): Use bfd_default_scan.
5029 * cpu-v850.c (scan): Remove.
5030 (N): Use bfd_default_scan.
5031 * cpu-z8k.c (scan_mach): Remove.
5032 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
5033 first. Use bfd_default_scan.
5035 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
5037 (ecoff_get_magic): Likewise.
5038 * elf32-v850.c (v850_elf_object_p): Likewise.
5039 (v850_elf_final_write_processing): Likewise.
5040 * mipsbsd.c (MY(set_arch_mach)): Likewise.
5041 (MY(write_object_contents)): Likewise.
5042 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
5043 * coffcode.h (coff_write_object_contents): Likewise.
5044 (coff_set_arch_mach_hook): Add comment describing machine == 0.
5045 Remove unnecessary "machine" assignments.
5046 (coff_write_relocs): Test for the absolute section sym by testing
5049 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
5050 and bfd_mach_i386_i386_intel_syntax.
5051 * pdp11.c (NAME(aout,machine_type)): Likewise.
5053 2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
5055 * bfd-in.h (align_power): Cast constants to bfd_vma type.
5056 * bfd-in2.h (align_power): Likewise.
5058 2002-08-30 Alan Modra <amodra@bigpond.net.au>
5060 * Makefile.am: Run "make dep-am".
5061 * Makefile.in: Regenerate.
5063 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
5064 * cpu-powerpc.c (powerpc_compatible): Likewise.
5065 * cpu-rs6000.c (rs6000_compatible): Likewise.
5067 2002-08-28 Catherine Moore <clm@redhat.com>
5069 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
5070 (v850-elf-reloc): Don't resolve pc relative relocs.
5071 (v850_elf_ignore_reloc): New routine.
5072 (v850_elf_final_link_relocate): Handle new relocs.
5073 (v850_elf_relax_delete_bytes ): New routine.
5074 (v850_elf_relax_section): New routine.
5075 (bfd_elf32_bfd_relax_section): Define.
5076 (HOWTO): New entries for new relocs.
5077 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
5078 (BFD_RELOC_V850_LONGJUMP): New reloc.
5079 (BFD_RELOC_V850_ALIGN): New reloc.
5080 * archures.c: Remove redundant v850ea architecture.
5081 * cpu-v850.c: Remove redundant v850ea support.
5082 * libbfd.h: Regenerate.
5083 * bfd-in2.h: Regenerated.
5085 2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
5087 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
5088 * configure.in: Add tic4x_coff vector files.
5089 * configure: Regenerate.
5090 * Makefile.am: Add tic4x target.
5091 * Makefile.in: Regenerate.
5093 2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
5095 * archures.c: Add the BFD arch type tic4x.
5096 * bfd-in.h: Add BFD_IN_MEMORY flag.
5097 * coff-tic4x.c: New file.
5098 * coffswap.h (coff_swap_sym_out): Add preadjuster.
5099 * cpu-tic4x.c: New file.
5100 * targets.c: Added tic4x- in list of xvecs.
5101 * ticoff.h: New file.
5102 * bfd-in2.h: Regenerate.
5104 2002-08-27 Adam Nemet <anemet@lnxw.com>
5106 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
5107 bit of DT_INIT and DT_FINI for Thumb functions.
5109 2002-08-26 Alan Modra <amodra@bigpond.net.au>
5111 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
5113 2002-08-26 Alan Modra <amodra@bigpond.net.au>
5115 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
5117 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5119 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
5120 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
5122 (struct elf_sh_pcrel_relocs_copied): Removed.
5123 (struct elf_sh_dyn_relocs): New.
5124 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
5125 field with dyn_relocs.
5126 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
5127 sections and sym_sec.
5128 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
5129 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
5130 (sh_elf_create_dynamic_sections): Use create_got_section instead
5131 of _bfd_elf_create_got_section.
5132 (sh_elf_check_relocs): Likewise.
5133 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
5135 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
5136 sh_elf_relocate_section, sh_elf_check_relocs,
5137 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
5139 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
5140 dynamic relocations and avoiding the copy relocation when we
5141 didn't find any dynamic relocations in the section which has
5142 contents or is read-only.
5143 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
5144 (sh_elf_size_dynamic_sections): Don't reset the size of
5145 .rela.got section even if dynamic_sections_created flag is off.
5146 Don't use sh_elf_discard_copies. Scan all input bfd and use
5147 allocate_dynrelocs. Call readonly_dynrelocs to determine
5148 whether we need DT_TEXTREL.
5149 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
5150 whether the symbol was never referred to.
5151 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
5152 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
5153 (sh_elf_check_relocs): Call create_got_section if the short-cut
5154 to .got is null. Increment reference counters only instead of
5155 allocating space on dynamic sections here. Don't conditionalize
5156 uninitialized got.offset value when marking the symbol as a
5157 global offset table entry. Keep relocations for symbols satisfied
5158 by a dynamic library to avoid copy relocations for the symbol.
5159 Set dynobj field of an elf hash table if needed.
5160 (sh_elf_finish_dynamic_sections): Handle null section pointer
5162 (elf_backend_copy_indirect_symbol): Defined.
5163 (elf_backend_can_refcount): Defined.
5165 2002-08-23 Nick Clifton <nickc@redhat.com>
5167 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
5168 previous change. Add comment explaining why.
5170 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
5172 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
5173 contents of .got.plt[2] to tr0, not address of .got.plt.
5174 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
5175 patching absolute plt entry. For shmedia plt entry, set bottom bit
5176 of branch to plt0 as this is a branch to an shmedia instruction.
5177 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
5178 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
5179 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
5181 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
5182 patching absolute plt entry. For shmedia plt entry, branch to
5183 plt0 is now ptrel, so use relative offset. Set bottom bit of
5184 branch target as it is a branch to an shmedia instruction.
5186 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
5187 Richard Shann <richard.shann@superh.com>
5189 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
5190 value if .init is an SHmedia function. Similarly for DT_FINI.
5191 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
5193 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
5195 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
5197 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
5199 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5201 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
5202 byte read when reading the return address register column.
5204 2002-08-22 Nick Clifton <nickc@redhat.com>
5206 * config.bfd: Add powepc64-*-*bsd* target.
5208 2002-08-22 Graeme Peterson <gp@qnx.com>
5210 * Makefile.am: Add entries for elf32-shqnx.c
5211 * Makefile.in: Regenerate.
5212 * config.bfd: Add support sh-*-nto* target.
5213 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
5214 * configure: Regenerate.
5215 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
5216 * elf32-sh.c: Do not include elf32-target.h if
5217 ELF32_SH_C_INCLUDED is defined.
5218 * elf32-shqnx.c: New file: Support for QNX.
5219 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
5221 2002-08-22 Nick Clifton <nickc@redhat.com>
5223 * po/tr.po: Updated Turkish translation.
5225 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
5226 symbols are not read.
5228 2002-08-22 Alan Modra <amodra@bigpond.net.au>
5230 * elf32-m68hc11.c: Formatting fixes.
5231 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
5232 * elf32-m68hc12.c: Formatting fixes.
5233 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
5235 2002-08-22 Alan Modra <amodra@bigpond.net.au>
5237 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
5239 (pmac_xcoff_vec): Likewise.
5240 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
5241 (aix5coff64_vec): Likewise.
5243 2002-08-22 Alan Modra <amodra@bigpond.net.au>
5245 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
5246 param to elf_backend_copy_indirect_symbol.
5247 (_bfd_elf_link_hash_copy_indirect): Likewise.
5248 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
5249 calls to copy_indirect_symbol.
5250 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
5251 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
5252 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
5253 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
5254 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
5255 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
5256 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
5257 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
5258 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
5259 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
5260 test refcounts for "used" values.
5262 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
5264 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
5265 argument declaration.
5267 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
5269 * archures.c (bfd_mach_ppc_e500): Added.
5270 * bfd-in2.h: Rebuilt.
5271 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
5273 2002-08-19 Alan Modra <amodra@bigpond.net.au>
5275 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
5277 2002-08-17 Andrew Cagney <ac131313@redhat.com>
5279 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
5282 2002-08-17 Stan Cox <scox@redhat.com>
5284 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
5285 IRIX 6 segment layout for NEWABI.
5287 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
5289 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
5290 symbols when looking for section referred to by a relocation.
5291 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
5293 2002-08-15 Alan Modra <amodra@bigpond.net.au>
5295 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
5297 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
5299 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
5300 missing check for whether the symbol is referenced by DSO before
5301 unexporting it as an unneeded dynamic symbol.
5303 2002-08-14 H.J. Lu <hjl@gnu.org>
5305 * libbfd.h: Regenerate.
5307 2002-08-14 H.J. Lu <hjl@gnu.org>
5309 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
5311 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
5313 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
5315 (m68hc11_direct_relax): New to define table of relaxable instructions.
5316 (find_relaxable_insn): New, find a relaxable insn.
5317 (compare_reloc): New to compare two relocs.
5318 (m68hc11_elf_relax_section): New, relax text sections.
5319 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
5320 (elf32_m68hc11_check_relocs): New function for GC support.
5321 (elf32_m68hc11_relocate_section): New function for GC support.
5322 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
5323 (elf_backend_check_relocs): Likewise.
5324 (elf_backend_relocate_section): Likewise.
5326 2002-08-13 H.J. Lu <hjl@gnu.org>
5328 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
5329 definitions in shared objects when checking symbol with
5332 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5334 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
5335 (elf32_m68hc11_gc_sweep_hook): Likewise.
5336 (elf_backend_gc_mark_hook): Define for GC section support.
5337 (elf_backend_gc_sweep_hook): Likewise.
5338 (elf_backend_can_gc_sections): Likewise.
5340 * elf32-m68hc12.c: Likewise.
5342 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5344 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
5345 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
5346 (_bfd_m68hc11_elf_set_private_flags): New function.
5347 Use them to set/check/print ELF flags specific to 68HC11.
5349 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
5350 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
5351 (_bfd_m68hc12_elf_set_private_flags): New function.
5352 Use them to set/check/print ELF flags specific to 68HC12.
5354 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5356 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
5357 fix masks for PC-rel relocs.
5358 (m68hc11_elf_ignore_reloc): New function.
5360 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
5361 68HC12 banked addressing relocs.
5362 (m68hc12_phys_addr): New to compute physical address of banked memory.
5363 (m68hc12_phys_page): Likewise for page.
5364 (m68hc12_addr_is_banked): New to see if address is in banked area.
5365 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
5367 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5369 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
5370 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
5371 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
5372 * bfd-in2.h: Regenerate.
5374 2002-08-12 H.J. Lu <hjl@gnu.org>
5376 * elflink.h (elf_add_default_symbol): Preserve section across
5379 2002-08-09 Graeme Peterson <gp@qnx.com>
5381 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
5382 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
5383 * Makefile.in: Regenerate.
5384 * config.bfd: Add support for powerpc{le}-*-nto targets.
5385 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
5386 * configure: Regenerate.
5387 * elf32-i386qnx.c: Moved backend functions into a QNX specific
5388 common file "elf32-qnx.h", and now include that file.
5389 * elf32-qnx.h: New file: QNX specific common elf backend.
5390 * elf32-ppc.c: Do not include elf32-target.h if
5391 ELF32_PPC_C_INCLUDED is defined.
5392 * elf32-ppcqnx.c: New file: Support for QNX.
5393 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
5394 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
5396 2002-08-09 Nick Clifton <nickc@redhat.com>
5398 * po/sv.po: Updated Swedish translation.
5400 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5402 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
5403 g->global_gotsym is NULL.
5405 2002-08-08 H.J. Lu <hjl@gnu.org>
5407 * elflink.h (elf_add_default_symbol): Don't warn if a definition
5408 overrides an indirect versioned symbol.
5410 2002-08-08 Jakub Jelinek <jakub@redhat.com>
5412 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
5413 for R_386_TLS_TPOFF32 relocs against symndx 0.
5415 2002-08-07 H.J. Lu <hjl@gnu.org>
5417 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
5418 with undefined version if needed.
5419 (elf_link_assign_sym_version): Match a default symbol with a
5420 version without definition. No need to hide the default
5421 definition separately.
5423 2002-08-08 Alan Modra <amodra@bigpond.net.au>
5425 * elflink.h (elf_link_output_extsym): Don't output symbols from
5426 SEC_EXCLUDE sections.
5428 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
5430 2002-08-07 Alan Modra <amodra@bigpond.net.au>
5432 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
5435 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5437 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
5440 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5442 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
5444 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5446 * elf32-mips.c (mips_reloc_map): Fix typo.
5448 2002-08-06 Alan Modra <amodra@bigpond.net.au>
5450 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
5452 2002-08-06 Alan Modra <amodra@bigpond.net.au>
5454 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
5456 2002-08-06 Alan Modra <amodra@bigpond.net.au>
5458 * libxcoff.h: Use PARAMS on function declarations.
5459 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
5460 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
5462 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
5464 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
5466 2002-08-06 Alan Modra <amodra@bigpond.net.au>
5468 * coff-rs6000.c: Formatting fixes.
5469 (xcoff_calculate_relocation): Use PARAMS in declaration.
5470 (xcoff_complain_overflow): Likewise.
5471 (xcoff_ppc_relocate_section): Use old-style function pointer call.
5472 (bfd_xcoff_backend_data): Remove useless comments.
5473 (rs6000coff_vec): Likewise.
5474 (bfd_pmac_xcoff_backend_data): Likewise.
5475 (pmac_xcoff_vec): Likewise.
5477 * coff64-rs6000.c: Formatting fixes.
5478 (xcoff64_calculate_relocation): Use PARAMS in declaration.
5479 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
5480 (bfd_xcoff_backend_data): Remove useless comments.
5481 (rs6000coff64_vec): Likewise.
5482 (bfd_xcoff_aix5_backend_data): Likewise.
5483 (aix5coff64_vec): Likewise.
5485 2002-08-06 Alan Modra <amodra@bigpond.net.au>
5487 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
5488 mask entries. Use complain_overflow_dont for R_REF.
5489 (xcoff_reloc_type_ba): Revert last change.
5490 (xcoff_reloc_type_br): Likewise.
5491 (xcoff_reloc_type_crel): Likewise.
5492 (xcoff_ppc_relocate_section): Likewise.
5493 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
5494 (xcoff64_ppc_relocate_section): Likewise.
5495 (xcoff64_howto_table): Revert some of last change to mask entries.
5496 Use complain_overflow_dont for R_REF.
5498 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
5499 relocs with bitsize == 16 have size = 1.
5500 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
5501 (xcoff_reloc_type_br): Likewise.
5502 (xcoff_reloc_type_crel): Likewise.
5503 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
5504 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
5505 dst_mask adjustment.
5506 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
5507 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
5508 bitsize == 16 have size = 1.
5510 2002-08-01 Denis Chertykov <denisc@overta.ru>
5512 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
5513 (struct misc): New field isymbuf. All free_* fields removed.
5514 (symbol_value): Pass in internal syms. No need to swap syms in.
5515 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
5516 possibly cached info.
5517 (tidyup_after_error): Removed.
5518 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
5519 misc. Use new field.
5520 (adjust_all_relocations): Use internal syms. No need to swap syms
5522 (add_page_insn): Don't use removed fields of struct misc.
5524 2002-08-01 Nick Clifton <nickc@redhat.com>
5526 * elf32-arm.h: Revert previous delta.
5528 2002-08-01 Nick Clifton <nickc@redhat.com>
5530 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
5531 * configure: Regenerate.
5533 2002-07-31 H.J. Lu <hjl@gnu.org>
5535 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
5538 2002-07-31 H.J. Lu <hjl@gnu.org>
5540 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
5543 2002-07-31 Jakub Jelinek <jakub@redhat.com>
5545 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
5546 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
5548 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
5550 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
5551 There is no 8 byte relocation type for this architecture.
5552 (do_ns32k_reloc): Use bfd_vma instead of native types.
5553 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
5555 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
5556 rely on generic code to do that.
5557 * aout-ns32k.c (howto_table): Add appropriate overflow detection
5558 to all table entries.
5559 (_bfd_ns32k_relocate_contents): put_data returns void.
5560 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
5561 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
5564 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
5566 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
5567 archive object is target dependant.
5569 2002-07-31 Adam Nemet <anemet@lnxw.com>
5571 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
5572 (THUMB_PLT_ENTRY_SIZE): New macro.
5573 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
5574 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
5576 (elf32_arm_plt_entry): Likewise.
5577 (elf_backend_plt_header_size): Likewise.
5578 (elf32_thumb_plt0_entry): New global.
5579 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
5581 (elf32_thumb_plt_entry): New global.
5582 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
5583 Thumb entries. Set the bottom bit of the corresponding GOT entry
5584 for a Thumb PLT entry.
5585 (struct elf32_arm_plt_entry_info): New structure.
5586 (struct elf32_arm_link_hash_entry, plt_info): New member of this
5588 (elf32_arm_link_hash_newfunc): Initialize new member.
5589 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
5590 relocations against the PLT.
5591 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
5592 first_rel_type if this is the first time we encounter the symbol.
5593 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
5594 Determine if relocation needs a PLT entry. Set first_rel_type if
5595 this is the first time we encounter the symbol
5596 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
5598 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
5599 (elf32_arm_create_dynamic_sections): New function. Create the
5601 (elf_backend_create_dynamic_sections): Call it.
5603 2002-07-31 Nick Clifton <nickc@redhat.com>
5605 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
5606 'alternative' in order to avoid shadowing global symbol of the
5608 * bfd-in2.h: Regenerate.
5609 * libbfd.h: Regenerate.
5610 * libcoff.h: Regenerate.
5612 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5614 * Makefile.am: Add n32 ABI support.
5615 * Makefile.in: Regenerate.
5616 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
5617 bit vectors for mips*-*-linux targets as optional.
5618 * configure.in: Add n32 ABI vectors.
5619 * configure: Regenerate.
5620 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
5621 * elfn32-mips.c: New file, n32 ABI support.
5622 * targets.c: Add n32 ABI vectors.
5624 2002-07-30 Graeme Peterson <gp@qnx.com>
5626 * elfarmqnx-nabi.c: New file: Support for QNX.
5627 * config.bfd: Add support for arm-*-nto target.
5628 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
5629 * configure: Regenerate.
5630 * Makefile.am: Add entries for elfarmqnx-nabi.c.
5631 * Makefile.in: Regenerate.
5632 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
5633 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
5634 * elfarm-nabi.c: Do not include elf32-arm.h if
5635 ELFARM_NABI_C_INCLUDED is defined.
5636 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
5638 2002-07-30 Nick Clifton <nickc@redhat.com>
5640 * po/sv.po: Updated Swedish translation.
5642 2002-07-30 Jakub Jelinek <jakub@redhat.com>
5644 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
5646 2002-07-30 Alan Modra <amodra@bigpond.net.au>
5648 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
5649 * archive.c (bfd_generic_archive_p): Likewise.
5650 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
5651 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
5652 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
5653 (xcoff64_archive_p): Likewise.
5654 (xcoff64_openr_next_archived_file): Likewise.
5655 (xcoff64_archive_p): Clean up tdata properly on error.
5656 * coffgen.c (coff_real_object_p): Likewise.
5657 (coff_object_p): Release filehdr and opthdr.
5658 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
5659 * ieee.c (ieee_archive_p): Likewise.
5660 * ihex.c (ihex_object_p): Likewise.
5661 (ihex_mkobject): Always allocate tdata.
5662 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
5663 * srec.c (srec_mkobject): Always allocate tdata.
5664 (srec_object_p): Clean up tdata properly on error.
5665 (symbolsrec_object_p): Likewise.
5666 * versados.c (versados_object_p): Likewise.
5667 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
5668 and bfd_realloc instead of realloc.
5669 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
5670 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
5671 place of bfd_malloc, simplifying error freeing. Free hash table too.
5672 (vms_object_p): Clean up tdata on error.
5673 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
5674 (vms_close_and_cleanup): Adjust for bfd_alloc use.
5676 2002-07-30 Alan Modra <amodra@bigpond.net.au>
5678 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
5680 2002-07-26 Chris Demetriou <cgd@broadcom.com>
5682 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
5683 flags into resulting BFD.
5685 2002-07-26 Alan Modra <amodra@bigpond.net.au>
5687 From John Reiser <jreiser@BitWagon.com>
5688 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
5689 tls_ldm_got.refcount.
5691 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5693 * elf64-mips.c: Update TODO comment.
5694 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
5695 mips_elf64_gprel16_reloca): Remove prototypes.
5696 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
5697 (UNUSED_RELOC): Replace by EMPTY_RELOC.
5698 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
5699 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
5701 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
5702 R_MIPS_GOT16. Remove wrong comments.
5703 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
5704 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
5706 (mips_elf64_hi16_reloc): Fix formatting.
5707 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
5708 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
5709 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
5710 (mips_elf64_gprel16_reloc): Make static. Add check for
5712 (mips_elf64_gprel16_reloca): Remove.
5713 (mips_elf64_literal_reloc): New function.
5714 (mips_elf64_gprel32_reloc): Fix formatting.
5715 (mips_elf64_shift6_reloc): Fix comment. Make static.
5716 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
5718 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
5720 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
5721 specific relocations.
5722 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
5723 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
5724 (ELF_MAXPAGESIZE): Add comment.
5726 2002-07-25 Nick Clifton <nickc@redhat.com>
5728 * po/sv.po: Updated Swedish translation.
5729 * po/es.po: Updated Spanish translation.
5730 * po/fr.po: Updated French translation.
5732 2002-07-25 Alan Modra <amodra@bigpond.net.au>
5734 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
5735 as elf_link_record_local_dynamic_symbol.
5736 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
5737 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
5738 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
5739 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
5740 attempt is made to record a symbol in a discarded section, and
5741 return `2' in that case.
5743 2002-07-24 Nick Clifton <nickc@redhat.com>
5745 * po/sv.po: Updated Swedish translation.
5746 * po/es.po: Updated Spanish translation.
5748 2002-07-23 Alan Modra <amodra@bigpond.net.au>
5750 * po/SRC-POTFILES.in: Regenerate.
5752 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
5753 immediately. Remove code handling relocatable linking.
5754 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
5755 * elf32-cris.c (cris_elf_relocate_section): Likewise.
5756 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
5757 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
5758 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
5759 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
5760 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
5761 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5762 * elf32-v850.c (v850_elf_relocate_section): Likewise.
5763 * elf32-vax.c (elf_vax_relocate_section): Likewise.
5764 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5765 * elf32-avr.c (elf_backend_rela_normal): Define.
5766 * elf32-cris.c: Likewise.
5767 * elf32-fr30.c: Likewise.
5768 * elf32-frv.c: Likewise.
5769 * elf32-h8300.c: Likewise.
5770 * elf32-hppa.c: Likewise.
5771 * elf32-ip2k.c: Likewise.
5772 * elf32-sparc.c: Likewise.
5773 * elf32-v850.c: Likewise.
5774 * elf32-vax.c: Likewise.
5775 * elf64-hppa.c: Likewise.
5776 * elf64-sparc.c: Likewise.
5777 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
5778 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
5779 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
5780 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
5781 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
5782 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
5783 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
5784 * elf-m10200.c (USE_RELA): Don't define.
5785 * elf-m10300.c: Likewise.
5786 * elfarm-oabi.c: Likewise.
5787 * elf32-i370.c: Likewise.
5788 * elf32-ip2k.c: Likewise.
5789 * elf32-m68k.c: Likewise.
5790 * elf32-mcore.c: Likewise.
5791 * elf32-ppc.c: Likewise.
5792 * elf32-s390.c: Likewise.
5793 * elf32-vax.c: Likewise.
5794 * elf64-ppc.c: Likewise.
5795 * elf64-s390.c: Likewise.
5796 * elf64-x86-64.c: Likewise.
5797 * elfxx-ia64.c: Likewise.
5798 * elf32-avr.c (USE_REL): Don't undef.
5799 * elf32-ip2k.c: Likewise.
5801 2002-07-23 Nick Clifton <nickc@redhat.com>
5803 * elf-bfd.h (struct elf_backend_data): Add new bitfield
5804 'want_p_paddr_set_to_zero'.
5805 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
5807 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
5808 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
5810 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
5812 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
5813 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
5814 show the Copyright string.
5815 Minor formatting tidy ups.
5817 2002-07-23 Nick Clifton <nickc@redhat.com>
5819 * po/fr.po: Updated French translation.
5820 * po/sv.po: Updated Swedish translation.
5822 2002-07-23 Alan Modra <amodra@bigpond.net.au>
5824 * elflink.h (elf_link_input_bfd): Don't change internal symbols
5825 when outputting relocs.
5827 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
5829 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
5830 DT_PLTGOT into the dynamic section if there is a PLT.
5832 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5834 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
5836 (_bfd_mips_elf_write_section): Likewise.
5837 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
5838 (_bfd_mips_elf_write_section): Likewise.
5839 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
5840 (elf32_mips_write_section): Likewise.
5841 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
5842 (_bfd_mips_elf_write_section): Likewise.
5844 2002-07-19 Alan Modra <amodra@bigpond.net.au>
5846 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
5847 PT_IA_64_UNWIND segments for a given section.
5849 2002-07-17 H.J. Lu <hjl@gnu.org>
5851 * Makefile.am: Fix a typo.
5852 * Makefile.in: Regenerate.
5854 2002-07-15 Denis Chertykov <denisc@overta.ru>
5855 Frank Ch. Eigler <fche@redhat.com>
5856 Ben Elliston <bje@redhat.com>
5857 Alan Lehotsky <alehotsky@cygnus.com>
5858 John Healy <jhealy@redhat.com>
5859 Graham Stott <grahams@redhat.com>
5860 Jeff Johnston <jjohnstn@redhat.com>
5862 * Makefile.am: Add support for ip2k.
5863 * Makefile.in: Regenerate.
5864 * doc/Makefile.in: Regenerate.
5865 * archures.c: Add support for ip2k.
5866 * config.bfd: Add support for ip2k.
5867 * configure.in: Add support for ip2k.
5868 * configure: Regenerate.
5869 * reloc.c: Add support for ip2k.
5870 * targets.c: Add support for ip2k.
5871 * bfd-in2.h: Regenerate.
5872 * libbfd.h: Regenerate.
5873 * cpu-ip2k.c: New file.
5874 * elf32-ip2k.c: New file.
5876 2002-07-17 Ian Rickards <irickard@arm.com>
5878 * dwarf2.c (concat_filename): If we can't establish the directory
5879 just return the filename.
5881 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
5883 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
5885 2002-07-16 Alan Modra <amodra@bigpond.net.au>
5887 * elflink.h: Formatting fixes, tidy prototypes.
5888 (elf_link_assign_sym_version): Move common code out of loop.
5890 2002-07-16 Alan Modra <amodra@bigpond.net.au>
5892 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
5893 reloc section size is zero. Correct reloc output location.
5895 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
5897 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
5898 the final type for the e_fsel selector when generating PA2.0W code.
5899 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
5902 2002-07-14 H.J. Lu <hjl@gnu.org>
5904 * elflink.h (elf_link_assign_sym_version): Hide the default
5905 definition if there is a hidden versioned definition.
5907 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
5909 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
5910 dynamic reference test in assertion when initializing GOT with
5911 static contents. Just assert that there are either no dynamic
5912 sections, the symbol is defined in the regular objects or that the
5913 symbol is undef weak. Tweak comment.
5914 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
5915 only if the symbol isn't defined in the program and isn't undef
5917 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
5918 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
5919 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
5920 (elf_cris_discard_excess_program_dynamics): Don't consider
5921 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
5923 2002-07-11 Alan Modra <amodra@bigpond.net.au>
5925 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
5926 unresolved debugging relocs in dynamic applications.
5927 * elf32-s390.c (elf_s390_relocate_section): Likewise.
5928 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5929 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
5930 * elf64-s390.c (elf_s390_relocate_section): Likewise.
5931 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5932 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
5934 2002-07-10 Alan Modra <amodra@bigpond.net.au>
5936 * elf64-ppc.c (ONES): Define.
5937 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
5938 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
5939 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
5941 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
5942 (ppc64_elf_set_private_flags): Delete.
5943 (ppc64_elf_section_from_shdr): Delete.
5944 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
5945 (ppc64_elf_fake_sections): Delete.
5946 (bfd_elf64_bfd_set_private_flags): Don't define.
5947 (bfd_elf64_get_symbol_info): Likewise.
5948 (elf_backend_section_from_shdr): Likewise.
5949 (elf_backend_fake_sections): Likewise.
5951 2002-07-10 Marco Walther <Marco.Walther@sun.com>
5953 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
5954 when not already set.
5955 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
5956 (elf_backend_fake_sections): Define.
5958 2002-07-10 Alan Modra <amodra@bigpond.net.au>
5960 * merge.c (_bfd_merge_section): Remove redundant output_section check.
5962 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
5964 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
5966 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
5967 NULL sym_hashes to just before use.
5968 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
5969 symbol with non-default visibility.
5970 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
5971 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
5973 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
5974 symbol with non-default visibility.
5975 (cris_elf_check_relocs): At tests for local symbol before
5976 increasing h->plt.refcount, also check for non-default
5977 visibility. Ditto when checking for local symbol to eliminate
5978 pc-relative runtime relocs.
5980 2002-07-08 Alan Modra <amodra@bigpond.net.au>
5982 * elf.c: Formatting.
5983 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
5984 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
5985 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
5988 2002-07-07 Mark Mitchell <mark@codesourcery.com>
5989 Alan Modra <amodra@bigpond.net.au>
5991 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
5992 account the impact of relocation count overflow when computing
5994 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
5995 or not to apply the PE COFF reloc overflow handling. Fix a
5996 fencepost error in deciding whether or not to use that technique.
5998 2002-07-07 Alan Modra <amodra@bigpond.net.au>
6000 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
6001 change type of locsyms.
6002 (bfd_elf_get_elf_syms): Declare.
6003 * elf.c (bfd_elf_get_elf_syms): New function.
6004 (group_signature): Use bfd_elf_get_elf_syms.
6005 (bfd_section_from_r_symndx): Likewise.
6006 * elfcode.h (elf_slurp_symbol_table): Likewise.
6007 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
6008 (elf_link_add_object_symbols): Likewise. Reorganise to increase
6009 locality of various data structures. Properly free internal relocs.
6010 (elf_bfd_final_link): Properly free internal relocs.
6011 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
6012 (elf_link_input_bfd): Likewise.
6013 (elf_gc_mark): Likewise. Properly free internal relocs.
6014 (elf_gc_sweep): Properly free internal relocs.
6015 (elf_reloc_symbol_deleted_p): No need to swap syms in.
6016 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
6018 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
6019 Properly free possibly cached info.
6020 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
6021 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
6022 symbol swapping code.
6023 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
6024 Properly free possibly cached info.
6025 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
6026 (mn10300_elf_relax_delete_bytes): Likewise.
6027 (mn10300_elf_symbol_address_p): Likewise.
6028 (mn10300_elf_get_relocated_section_contents): Likewise.
6029 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
6030 (elf32_h8_relax_delete_bytes): Likewise.
6031 (elf32_h8_symbol_address_p): Likewise.
6032 (elf32_h8_get_relocated_section_contents): Likewise.
6033 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
6034 (m32r_elf_relax_delete_bytes): Likewise.
6035 (m32r_elf_get_relocated_section_contents): Likewise.
6036 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
6037 elf_section_data to determine whether cached.
6038 (sh_elf_relax_section): As above for elf-m10200.c.
6039 (sh_elf_relax_delete_bytes): Likewise.
6040 (sh_elf_get_relocated_section_contents): Likewise.
6041 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
6042 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
6043 reading of local syms.
6044 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
6045 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
6046 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
6047 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
6049 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
6050 free internal relocs and section contents. Don't read symbols.
6051 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
6052 (elf32_hppa_size_stubs): Don't free local syms.
6053 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
6054 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
6055 possibly cached info.
6056 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
6057 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
6058 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
6060 (get_local_syms): Delete function.
6061 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
6063 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
6065 2002-07-05 Jim Wilson <wilson@redhat.com>
6067 * syms.c (decode_section_type): New.
6068 (bfd_decode_symclass): Call decode_section_type.
6070 2002-07-04 Jakub Jelinek <jakub@redhat.com>
6072 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
6073 section content start.
6074 Reported by Michael Schumacher <mike@hightec-rt.com>.
6076 2002-07-04 Alan Modra <amodra@bigpond.net.au>
6078 * section.c (_bfd_strip_section_from_output): Remove unnecessary
6079 link order code. Don't actually remove the output section here;
6080 Just set a flag for the linker to do so.
6081 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
6082 sections when setting up output section dynsyms.
6084 2002-07-04 Alan Modra <amodra@bigpond.net.au>
6086 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
6088 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
6091 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
6093 * elf64-s390.c (create_got_section): Set .got section alignment to
6095 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
6097 2002-07-02 Alan Modra <amodra@bigpond.net.au>
6099 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
6101 2002-07-01 Matt Thomas <matt@3am-software.com>
6103 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
6106 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6108 * elfxx-mips.c (ABI_64_P): Fix comment.
6109 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
6110 new section names for N64 ABI.
6111 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
6112 (mips_elf_calculate_relocation): Code formatting.
6113 (mips_elf_create_dynamic_relocation): Likewise.
6114 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
6115 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
6116 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
6118 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
6120 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
6121 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
6124 2002-07-01 Andreas Schwab <schwab@suse.de>
6126 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
6127 R_X86_64_64 to R_X86_64_RELATIVE.
6129 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
6131 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
6132 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
6134 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
6136 * configure.in (vaxbsd_vec): Add.
6137 * targets.c (vaxbsd_vec): Add.
6138 * Makefile.in: Rebuild.
6139 * configure: Rebuild.
6140 * po/SRC-POTFILES.in: Rebuild.
6142 2002-07-01 Alan Modra <amodra@bigpond.net.au>
6144 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
6145 examining to gc_mark_hook, rather than the bfd.
6146 (elf_gc_sections): Adjust.
6147 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
6148 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
6149 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
6150 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
6151 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
6152 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
6153 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
6154 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
6155 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
6156 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
6157 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
6158 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
6159 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
6160 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
6161 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
6162 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
6163 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
6164 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
6165 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
6166 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
6167 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
6168 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
6169 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
6170 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
6171 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
6172 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
6173 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
6174 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
6175 redundant local sym tests.
6176 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
6177 (link_hash_newfunc): Init is_entry.
6178 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
6179 (ppc64_elf_link_hash_table_create): Init all_local_syms.
6180 (create_linkage_sections): Use bfd_make_section_anyway rather than
6182 (ppc64_elf_mark_entry_syms): New function.
6183 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
6184 up opd entry to function section map.
6185 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
6186 relocs that reference the opd section.
6187 (edit_opd): New function.
6188 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
6189 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
6190 (get_local_syms): Do so here. Exit if we already have local syms.
6191 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
6192 read local syms on non-ELF input.
6193 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
6194 than duplicating it's function here. Adjust free of internal
6196 (ppc64_elf_relocate_section): Adjust local syms in opd section.
6197 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
6198 * elf32-hppa.c (elf32_hppa_size_stubs): Call
6199 _bfd_elf32_link_read_relocs rather than duplicating it's function
6200 here. Adjust free of internal relocs to suit.
6202 2002-07-01 Andreas Jaeger <aj@suse.de>
6204 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
6205 are not allowed in shared libs code, enforce -fPIC.
6207 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
6209 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
6210 trailing zero-sequences when there's previous left-over data.
6212 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
6214 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
6215 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
6216 and opd_rel_sec in order for starting rela section. Check _raw_size.
6217 (elf_backend_reloc_type_class): Define.
6219 2002-06-27 Kevin Buettner <kevinb@redhat.com>
6221 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
6224 2002-06-27 Alan Modra <amodra@bigpond.net.au>
6226 * cpu-powerpc.c: Comment on ordering of arch_info.
6227 * elf32-ppc.c (ppc_elf_object_p): New function.
6228 (elf_backend_object_p): Define.
6229 * elf64-ppc.c (ppc64_elf_object_p): New function.
6230 (elf_backend_object_p): Define.
6232 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
6234 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
6235 * configure: Regenerate.
6237 2002-06-25 Jason Eckhardt <jle@rice.edu>
6239 * dwarf2.c (decode_line_info): Check unit->addr_size
6240 to read in the proper number of prologue bytes.
6242 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
6244 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
6245 aix5coff64_vec if 64-bit bfd support has been enabled.
6246 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
6249 * targets.c (_bfd_target_vector[]): Only include
6250 aix5coff64_vec if 64-bit bfd support has been enabled.
6252 2002-06-25 Alan Modra <amodra@bigpond.net.au>
6254 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
6255 * elf32-hppa.c (hppa_add_stub): Likewise.
6256 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
6257 * elflink.h (elf_add_default_symbol): Fix comment typo.
6258 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
6259 (elf_link_add_object_symbols): Likewise.
6260 (elf_link_assign_sym_version): Likewise.
6261 * hash.c (bfd_hash_lookup): Likewise.
6262 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
6263 * section.c (bfd_get_unique_section_name): Likewise.
6264 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
6265 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
6266 (assign_section_numbers): Likewise.
6267 (_bfd_elfcore_make_pseudosection): Likewise.
6268 (elfcore_grok_lwpstatus): Likewise.
6269 (elfcore_grok_win32pstatus): Likewise.
6270 (elfcore_write_note): Constify input params. Use PTR instead of
6271 void *. Include terminating NUL in namesz. Correct padding.
6272 Support NULL "name" param. Use memcpy instead of strcpy.
6273 (elfcore_write_prpsinfo): Constify input params.
6274 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
6275 (elfcore_write_lwpstatus): Likewise.
6276 (elfcore_write_pstatus): Likewise.
6277 (elfcore_write_prfpreg): Likewise.
6278 (elfcore_write_prxfpreg): Likewise.
6279 * elf-bfd.h (elfcore_write_note): Update declaration.
6280 (elfcore_write_prpsinfo): Likewise.
6281 (elfcore_write_prstatus): Likewise.
6282 (elfcore_write_pstatus): Likewise.
6283 (elfcore_write_prfpreg): Likewise.
6284 (elfcore_write_prxfpreg): Likewise.
6285 (elfcore_write_lwpstatus): Likewise.
6287 2002-06-25 Jason Eckhardt <jle@rice.edu>
6289 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
6290 symbols of type stProc and stStaticProc.
6292 2002-06-25 Nick Clifton <nickc@redhat.com>
6294 * ecoff.c: VArious formatting fixes.
6296 2002-06-25 Alan Modra <amodra@bigpond.net.au>
6298 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
6300 2002-06-25 Alan Modra <amodra@bigpond.net.au>
6302 * aout-adobe.c: Don't compare against "true" or "false.
6303 * aout-target.h: Likewise.
6304 * aoutx.h: Likewise.
6305 * archive.c: Likewise.
6307 * cache.c: Likewise.
6308 * coff-a29k.c: Likewise.
6309 * coff-alpha.c: Likewise.
6310 * coff-i386.c: Likewise.
6311 * coff-mips.c: Likewise.
6312 * coff-or32.c: Likewise.
6313 * coff64-rs6000.c: Likewise.
6314 * coffcode.h: Likewise.
6315 * coffgen.c: Likewise.
6316 * cpu-ns32k.c: Likewise.
6317 * ecoff.c: Likewise.
6318 * ecofflink.c: Likewise.
6320 * elf32-arm.h: Likewise.
6321 * elf32-cris.c: Likewise.
6322 * elf32-d30v.c: Likewise.
6323 * elf32-i386.c: Likewise.
6324 * elf32-mcore.c: Likewise.
6325 * elf32-ppc.c: Likewise.
6326 * elf32-sh.c: Likewise.
6327 * elf32-sh64.c: Likewise.
6328 * elf32-v850.c: Likewise.
6329 * elf64-alpha.c: Likewise.
6330 * elf64-sh64.c: Likewise.
6331 * elfcode.h: Likewise.
6332 * elfcore.h: Likewise.
6333 * elflink.h: Likewise.
6334 * elfxx-mips.c: Likewise.
6335 * i386os9k.c: Likewise.
6337 * libbfd.c: Likewise.
6338 * linker.c: Likewise.
6340 * nlm32-alpha.c: Likewise.
6341 * nlm32-i386.c: Likewise.
6342 * nlm32-ppc.c: Likewise.
6343 * nlm32-sparc.c: Likewise.
6344 * nlmcode.h: Likewise.
6345 * oasys.c: Likewise.
6346 * pdp11.c: Likewise.
6347 * peicode.h: Likewise.
6348 * reloc.c: Likewise.
6351 * tekhex.c: Likewise.
6353 * xcofflink.c: Likewise.
6354 * elf64-sparc.c: Edit comment to not use "== false".
6356 * aoutf1.h: Don't use "? true : false".
6357 * ecoff.c: Likewise.
6358 * format.c: Likewise.
6360 * linker.c: Likewise.
6362 * oasys.c: Likewise.
6364 2002-06-23 H.J. Lu <hjl@gnu.org>
6366 * elflink.h (elf_link_add_archive_symbols): For the default
6367 version, check references with only one `@' first.
6369 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
6371 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
6373 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
6375 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
6376 (elf64_hppa_size_dynamic_sections): Revise to use
6377 elf64_hppa_mark_milli_and_exported_functions.
6378 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
6379 symbols out of dynamic symbol table.
6381 2002-06-23 Alan Modra <amodra@bigpond.net.au>
6383 * Makefile.in: Regenerate.
6384 * libbfd.h: Regenerate.
6385 * bfd-in2.h: Regenerate.
6386 * configure: Regenerate.
6387 * po/SRC-POTFILES.in: Regenerate.
6389 * elflink.h: Comment typo fixes.
6391 2002-06-23 H.J. Lu <hjl@gnu.org>
6393 * elf-bfd.h (elf_link_loaded_list): New structure.
6394 (elf_link_hash_table): Add "loaded".
6395 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
6396 * elflink.h (elf_link_check_versioned_symbol): New function.
6397 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
6399 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
6401 * elflink.h (size_dynamic_sections): If the target does not
6402 support an ELF style hash table, return true, indicating that
6403 nothing needed to be done, rather than false, indicating that the
6404 section's size could not be computed.
6406 2002-06-18 Dave Brolley <brolley@redhat.com>
6408 From Catherine Moore, Michael Meissner, Dave Brolley:
6409 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
6410 * targets.c: Support bfd_elf32_frv_vec.
6411 * reloc.c: Add FRV relocs.
6412 * configure.in: Add support for bfd-elf32-frv-vec.
6413 * config.bfd (targ_cpu): Add support for frv-*-elf.
6414 * archures.c: Add frv arch and machines.
6415 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
6416 (ALL_MACHINES_CFILES): Add cpu-frv.c.
6417 (BFD32_BACKENDS): Add elf32-frv.lo.
6418 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
6419 (cpu-frv.lo): New target.
6420 (elf32-frv.lo): New target.
6421 * cpu-frv.c: New file.
6422 * elf32-frv.c: New file.
6424 2002-06-18 Jakub Jelinek <jakub@redhat.com>
6426 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
6428 Only read the first section header if e_shoff is non-zero.
6429 Don't consider e_shstrndx if there are no sections.
6431 2002-06-17 Tom Rix <trix@redhat.com>
6433 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
6434 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
6435 complain_overflow_bitfield.
6437 2002-06-17 Alan Modra <amodra@bigpond.net.au>
6439 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
6440 (bfd_fdopenr): Likewise.
6441 (bfd_openstreamr): Likewise.
6442 (bfd_openw): Likewise.
6444 * targets.c: Sort target vecs.
6445 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
6446 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
6447 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
6448 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
6449 * configure.in: Sort target vecs. Add m88kmach3_vec.
6450 * configure: Regenerate.
6452 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
6454 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
6455 bpo_reloc_no to break sort order ties, not address of items.
6457 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
6459 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
6460 Skip excluded sections in determing __gp value.
6461 (elf_hppa_final_link_relocate): Use the symbol's address in
6462 R_PARISC_FPTR64 relocations that don't need an opd entry.
6463 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
6464 (elf64_hppa_finalize_dynreloc): Likewise.
6465 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
6466 (elf64_hppa_finish_dynamic_symbol): Break up assert.
6468 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
6470 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
6471 alignment for .bss, .data and .text sections so that sse and sse2
6473 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
6475 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
6477 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
6480 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
6482 * elflink.h (elf_bfd_final_link): Improve error handling for missing
6485 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
6486 for a symbol that has no output section.
6487 (allocate_dynrel_entries): Correct comment.
6488 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
6490 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
6491 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
6492 with no section. Remove unnecessary parentheses.
6494 2002-06-11 Tom Rix <trix@redhat.com>
6496 * coffcode.h (coff_compute_section_file_positions): Add data
6497 section to AIX loader alignment check.
6499 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
6500 alignment to 4 bytes.
6501 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
6502 power accessor macro.
6503 (do_shared_object_padding): Remove invalid assertion.
6505 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
6507 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
6508 for removed output sections.
6510 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
6512 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
6514 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
6516 2002-06-08 H.J. Lu <hjl@gnu.org>
6518 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
6519 work around a long long bug in gcc 2.96 on mips.
6521 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
6523 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
6524 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
6525 Regenerate dependency lists.
6526 * Makefile.in: Regenerate.
6527 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
6528 vax1knetbsd_vec to targ_selvecs.
6529 * configure.in: Add vax1knetbsd_vec.
6530 * configure: Regenerate.
6531 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
6532 * vax1knetbsd.c: New file.
6533 * vaxnetbsd.c: Update copyright years.
6534 (TARGET_PAGE_SIZE): Set to 0x1000.
6535 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
6537 2002-06-08 Matt Thomas <matt@3am-software.com>
6539 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
6541 2002-06-08 Alan Modra <amodra@bigpond.net.au>
6543 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
6545 2002-06-08 Alan Modra <amodra@bigpond.net.au>
6547 * Makefile.am: Run "make dep-am".
6548 * Makefile.in: Regenerate.
6550 * armnetbsd.c: Replace CONST with const.
6551 * corefile.c: Likewise.
6552 * elf32-dlx.c: Likewise.
6553 * elf64-mips.c: Likewise.
6555 * ns32knetbsd.c: Likewise.
6557 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
6558 table is elf64-sparc.
6560 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6562 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
6563 Fix RELA addends to get not shifted in the result. Don't do special
6564 handling of R_MIPS_64 for NewABI.
6566 2002-06-07 Alan Modra <amodra@bigpond.net.au>
6568 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
6569 (NAME(aout,slurp_reloc_table)): Likewise.
6570 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
6571 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
6572 (xcoff_write_archive_contents_big): Likewise.
6573 (xcoff_generate_rtinit): Likewise.
6574 (xcoff_generate_rtinit): Likewise, and check error return.
6575 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6576 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
6577 (coff_get_normalized_symtab): Likewise.
6578 (coff_make_empty_symbol): Likewise.
6579 (bfd_coff_set_symbol_class): Likewise.
6580 * cofflink.c (coff_link_add_symbols): Likewise.
6581 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
6582 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
6583 (bfd_ecoff_write_accumulated_debug): Likewise.
6584 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
6585 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
6586 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
6587 * ieee.c (do_with_relocs): Use bfd_zalloc.
6588 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
6589 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
6590 (NAME(aout,slurp_reloc_table)): Likewise.
6591 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
6592 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
6593 * som.c (som_build_and_write_symbol_table): Likewise.
6594 (som_slurp_string_table): Likewise.
6595 (som_slurp_symbol_table): Likewise.
6596 (som_bfd_ar_write_symbol_stuff): Likewise.
6597 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
6598 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
6599 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
6600 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
6601 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
6603 2002-06-07 Alan Modra <amodra@bigpond.net.au>
6605 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
6607 (elf_group_name): Update.
6608 (elf_group_id): Define.
6609 (bfd_elf_set_group_contents): Declare.
6610 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
6611 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
6612 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
6613 that sym for the signature.
6614 (_bfd_elf_compute_section_file_positions): Don't call
6615 set_group_contents for "ld -r" case.
6616 (swap_out_syms): Use bfd_zalloc.
6617 * elflink.h (elf_link_add_archive_symbols): Likewise.
6618 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
6619 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
6621 2002-06-07 Alan Modra <amodra@bigpond.net.au>
6623 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
6624 relocs in opd for non-shared too.
6626 2002-06-06 Jeffrey Law <law@redhat.com>
6628 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
6631 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
6633 * merge.c: Include libiberty.h.
6634 * elf-strtab.c: Include libiberty.h.
6636 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
6638 * peXXigen.c (pe_print_idata): Remove unused variable.
6640 2002-06-06 David Heine <dlheine@tensilica.com>
6642 * elf.c (assign_file_positions_for_segments): Remove unallocated
6643 sections from the section to segment mapping for PT_LOAD segments.
6644 Update comment about empty loadable segments.
6646 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
6648 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
6649 is within the .stabstr section.
6651 2002-06-06 Alan Modra <amodra@bigpond.net.au>
6653 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
6654 are "const PTR", not "const PTR *".
6655 (bfd_elf32_swap_symbol_in): Likewise.
6656 (bfd_elf64_swap_symbol_in): Likewise.
6657 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
6658 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
6659 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
6660 (elf_link_add_object_symbols): Likewise.
6661 (elf_link_record_local_dynamic_symbol): Likewise.
6662 (elf_link_input_bfd): Likewise.
6663 (elf_gc_mark): Likewise.
6664 (elf_reloc_symbol_deleted_p): Likewise.
6665 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
6666 (mn10200_elf_relax_delete_bytes): Likewise.
6667 (mn10200_elf_symbol_address_p): Likewise.
6668 (mn10200_elf_get_relocated_section_contents): Likewise.
6669 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
6670 (mn10300_elf_relax_section): Likewise.
6671 (mn10300_elf_relax_delete_bytes): Likewise.
6672 (mn10300_elf_symbol_address_p): Likewise.
6673 (mn10300_elf_get_relocated_section_contents): Likewise.
6674 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
6675 (elf32_h8_relax_delete_bytes): Likewise.
6676 (elf32_h8_symbol_address_p): Likewise.
6677 (elf32_h8_get_relocated_section_contents): Likewise.
6678 * elf32-hppa.c (get_local_syms): Likewise.
6679 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
6680 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
6681 * elf32-sh.c (sh_elf_relax_section): Likewise.
6682 (sh_elf_relax_delete_bytes): Likewise.
6683 (sh_elf_get_relocated_section_contents): Likewise.
6684 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
6685 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
6686 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
6687 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
6688 * elf64-ppc.c (get_local_syms): Likewise.
6689 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
6690 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
6692 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
6694 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
6696 2002-06-05 Alan Modra <amodra@bigpond.net.au>
6698 * elf.c (group_signature): Swap in the whole symbol, and handle
6699 extracting section symbol names.
6700 (setup_group): Add comment.
6701 (set_group_contents): When called from objcopy or ld, arrange for
6702 section contents to be written. Write group member output section
6703 indices to allow objcopy to reorganize sections.
6704 (_bfd_elf_copy_private_section_data): Copy group info.
6706 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
6707 (bfd_elf32_swap_symbol_in): Update prototype.
6708 (bfd_elf64_swap_symbol_in): Likewise.
6709 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
6710 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
6711 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
6712 (elf_link_add_object_symbols): Likewise.
6713 (elf_link_record_local_dynamic_symbol): Likewise.
6714 (elf_link_input_bfd): Likewise.
6715 (elf_gc_mark): Likewise.
6716 (elf_reloc_symbol_deleted_p): Likewise.
6717 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
6718 (mn10200_elf_relax_delete_bytes): Likewise.
6719 (mn10200_elf_symbol_address_p): Likewise.
6720 (mn10200_elf_get_relocated_section_contents): Likewise.
6721 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
6722 (mn10300_elf_relax_section): Likewise.
6723 (mn10300_elf_relax_delete_bytes): Likewise.
6724 (mn10300_elf_symbol_address_p): Likewise.
6725 (mn10300_elf_get_relocated_section_contents): Likewise.
6726 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
6727 (elf32_h8_relax_delete_bytes): Likewise.
6728 (elf32_h8_symbol_address_p): Likewise.
6729 (elf32_h8_get_relocated_section_contents): Likewise.
6730 * elf32-hppa.c (get_local_syms): Likewise.
6731 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
6732 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
6733 * elf32-sh.c (sh_elf_relax_section): Likewise.
6734 (sh_elf_relax_delete_bytes): Likewise.
6735 (sh_elf_get_relocated_section_contents): Likewise.
6736 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
6737 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
6738 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
6739 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
6740 * elf64-ppc.c (get_local_syms): Likewise.
6741 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
6742 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
6743 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
6744 * elf64-alpha.c (alpha_elf_size_info): Likewise.
6745 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
6746 * elf64-mips.c (mips_elf64_size_info): Likewise.
6747 * elf64-s390.c (s390_elf64_size_info): Likewise.
6748 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
6750 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6752 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
6753 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
6754 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
6755 _bfd_mips_elf_ignore_discarded_relocs.
6756 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
6758 2002-06-05 H.J. Lu <hjl@gnu.org>
6760 * elfxx-mips.c (mips_elf_calculate_relocation): Call
6761 _bfd_elf_rel_local_sym for STT_SECTION relocations against
6762 the SEC_MERGE section.
6764 2002-06-05 Alan Modra <amodra@bigpond.net.au>
6766 * coff-alpha.c: Update copyright date.
6767 * coff-mips.c: Likewise.
6768 * xcoff-target.h: Likewise.
6770 * bfd-in.h: Remove "taken from the source" comment.
6771 * libbfd-in.h: Likewise.
6772 * libcoff-in.h: Likewise.
6773 * bfd-in2.h: Regenerate.
6774 * libbfd.h: Regenerate.
6775 * libcoff.h: Regenerate.
6777 * elf.c (bfd_elf_discard_group): Return true.
6778 * elf-bfd.h (bfd_elf_discard_group): Declare.
6779 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
6780 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
6781 * bfd.c (bfd_discard_group): Define.
6782 * targets.c (struct bfd_target): Add _bfd_discard_group.
6783 (BFD_JUMP_TABLE_LINK): Here too.
6784 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
6785 * aout-adobe.c (aout_32_bfd_discard_group): Define.
6786 * aout-target.h (MY_bfd_discard_group): Define.
6787 * aout-tic30.c (MY_bfd_discard_group): Define.
6788 * binary.c (binary_bfd_discard_group): Define.
6789 * bout.c (b_out_bfd_discard_group): Define.
6790 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
6791 * coffcode.h (coff_bfd_discard_group): Define.
6792 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
6793 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
6794 * i386msdos.c (msdos_bfd_discard_group): Define.
6795 * i386os9k.c (os9k_bfd_discard_group): Define.
6796 * ieee.c (ieee_bfd_discard_group): Define.
6797 * ihex.c (ihex_bfd_discard_group): Define.
6798 * mmo.c (mmo_bfd_discard_group): Define.
6799 * nlm-target.h (nlm_bfd_discard_group): Define.
6800 * oasys.c (oasys_bfd_discard_group): Define.
6801 * ppcboot.c (ppcboot_bfd_discard_group): Define.
6802 * som.c (som_bfd_discard_group): Define.
6803 * srec.c (srec_bfd_discard_group): Define.
6804 * tekhex.c (tekhex_bfd_discard_group): Define.
6805 * versados.c (versados_bfd_discard_group): Define.
6806 * vms.c (vms_bfd_discard_group): Define.
6807 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
6808 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
6809 (aix5coff64_vec): Likewise.
6810 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
6812 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
6814 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
6815 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
6816 (elf32-sh64-com.lo): New dependency list.
6817 * Makefile.in: Regenerate.
6818 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
6819 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
6821 * configure: Regenerate.
6822 * elf32-sh64.c (sh64_address_in_cranges)
6823 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
6824 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
6825 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
6826 * elf32-sh64-com.c: ...here. New file.
6828 2002-06-04 Alan Modra <amodra@bigpond.net.au>
6830 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
6831 ATTRIBUTE_UNUSED on used params.
6832 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
6833 before calling bfd_section_from_elf_index on local syms.
6834 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
6836 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
6838 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
6839 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
6840 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
6841 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
6842 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
6843 * Makefile.in: Regenerate.
6844 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
6845 (sh64-*-netbsd*): New targets.
6846 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
6847 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
6848 * configure: Regenerate.
6849 * elf32-sh64-nbsd.c: New file.
6850 * elf64-sh64-nbsd.c: New file.
6851 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
6852 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
6853 bfd_elf64_sh64lnbsd_vec.
6855 2002-06-04 Alan Modra <amodra@bigpond.net.au>
6857 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
6858 (bfd_section_from_shdr): Likewise. Set section name of group
6859 sections from signature.
6860 (group_signature): Split out from setup_group. Ensure symbol table
6862 (bfd_elf_discard_group): New function.
6863 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
6864 .gnu.linkonce* sections if they are members of a group.
6865 (set_group_contents): Set GRP_COMDAT flag.
6866 * section.c (bfd_discard_group): New function.
6867 * bfd-in.h (bfd_elf_discard_group): Declare.
6868 * bfd-in2.h: Regenerate.
6869 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
6870 (elf_linkonce_p): Define.
6872 2002-06-04 Alan Modra <amodra@bigpond.net.au>
6874 * elf.c (bfd_section_from_shdr): Make "name" const.
6875 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
6876 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
6877 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
6878 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
6879 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
6880 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
6881 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
6882 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
6883 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
6884 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
6885 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
6887 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6889 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
6892 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
6894 * elf32-arc.c: Fix formatting.
6895 * elf32-arm.h: Likewise.
6896 * elf32-cris.c: Likewise.
6897 * elf32-dlx.c: Likewise.
6898 * elf32-hppa.c: Likewise.
6899 * elf32-i386.c: Likewise.
6900 * elf32-i386qnx.c: Likewise.
6901 * elf32-or32.c: Likewise.
6902 * elf32-s390.c: Likewise.
6903 * elf32-sh64.c: Likewise.
6904 * elf32-vax.c: Likewise.
6905 * elf32-xstormy16.c: Likewise.
6906 * elf64-alpha.c: Likewise.
6907 * elf64-mmix.c: Likewise.
6908 * elf64-ppc.c: Likewise.
6909 * elf64-s390.c: Likewise.
6910 * elf64-sh64.c: Likewise.
6911 * elf64-x86-64.c: Likewise.
6913 2002-06-02 Richard Henderson <rth@redhat.com>
6915 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
6916 null when there are no got entries for a symbol.
6917 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
6918 uninitialized variable warning.
6920 2002-06-01 Richard Henderson <rth@redhat.com>
6922 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
6923 undefined symbols here.
6924 (elf64_alpha_relax_section): Do it here. Also test for not
6925 defined in the current module.
6926 (elf64_alpha_relocate_section_r): Split out of ...
6927 (elf64_alpha_relocate_section): ... here. Don't dereference
6928 NULL when looking up local got entries.
6930 2002-06-01 Richard Henderson <rth@redhat.com>
6932 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
6933 symbols from JSR relaxation.
6934 (elf64_alpha_size_plt_section_1): New.
6935 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
6936 (elf64_alpha_size_rela_got_1): ... here.
6937 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
6938 (elf64_alpha_size_rela_got_section): ... here.
6939 (elf64_alpha_size_plt_section): New.
6940 (elf64_alpha_relax_section): Call them.
6941 (elf64_alpha_size_got_sections): Remove output_bfd arg.
6942 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
6944 2002-06-01 Richard Henderson <rth@redhat.com>
6946 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
6947 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
6948 in shared libraries. Fix DTPRELHI and TPRELHI value.
6949 (INSN_ADDQ, INSN_RDUNIQ): New.
6950 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
6951 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
6952 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
6953 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
6954 Handle GOTDTPREL and GOTTPREL relocations.
6955 (elf64_alpha_relax_gprelhilo): New.
6956 (elf64_alpha_relax_tls_get_addr): New.
6957 (elf64_alpha_relax_find_tls_segment): New.
6958 (elf64_alpha_relax_section): Handle TLS relocations.
6959 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
6960 (elf64_alpha_check_relocs): Set it.
6962 2002-06-01 Richard Henderson <rth@redhat.com>
6964 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
6966 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
6967 check; don't suppress dynamic relocs for non-allocated sections.
6969 * elf64-alpha.c: Remove dead code.
6971 2002-05-31 Alan Modra <amodra@bigpond.net.au>
6973 * bfd-in2.h: Regenerate.
6974 * libbfd.h: Regenerate.
6975 * po/SRC-POTFILES.in: Regenerate.
6977 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
6980 2002-05-31 Graeme Peterson <gp@qnx.com>
6982 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
6983 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
6985 * Makefile.in: Regenerate.
6986 * config.bfd: Add i[3456]86-*-nto-qnx* support.
6987 * configure.in: Add bfd_elf32_i386qnx_vec support.
6988 * configure: Regenerate.
6989 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
6990 is_contained_by_filepos, and copy_private_bfd_data_p.
6991 * elf.c (assign_file_positions_for_segments): Call backend
6992 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
6993 (IS_CONTAINED_BY_FILEPOS): Define.
6994 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
6995 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
6996 Fix non-K&R call to _bfd_error_handler.
6997 (_bfd_elf_copy_private_section_data): Use backend
6998 copy_private_bfd_data_p.
6999 * elf32-i386.c: Don't include elfxx-target.h when
7000 ELF32_I386_C_INCLUDED is defined.
7001 * elf32-i386qnx.c: New QNX elf backend file.
7002 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
7003 elf_backend_is_contained_by_filepos, and
7004 elf_backend_do_copy_private_bfd_data.
7005 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
7007 2002-05-31 Alan Modra <amodra@bigpond.net.au>
7009 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
7010 Move other similar defines to start of file.
7012 2002-05-30 Tom Rix <trix@redhat.com>
7014 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
7015 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
7017 2002-05-30 Richard Henderson <rth@redhat.com>
7019 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
7020 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
7021 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
7022 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
7023 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
7024 (struct alpha_elf_obj_tdata): Rename total_got_entries and
7025 n_local_got_entries to total_got_size and local_got_size.
7026 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
7027 (alpha_got_entry_size): New.
7028 (elf64_alpha_relax_with_lituse): Use it.
7029 (elf64_alpha_relax_without_lituse): Likewise.
7030 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
7031 (get_got_entry): New.
7032 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
7033 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
7034 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
7035 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
7036 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
7037 (elf64_alpha_calc_got_offsets): Likewise.
7038 (alpha_dynamic_entries_for_reloc): New.
7039 (elf64_alpha_calc_dynrel_sizes): Use it.
7040 (elf64_alpha_size_dynamic_sections): Likewise.
7041 (elf64_alpha_relocate_section): Handle TLS relocations.
7042 * reloc.c: Add Alpha TLS relocations.
7043 * bfd-in2.h, libbfd.h: Rebuild.
7045 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
7047 * peXXigen.c (pe_print_idata): Remove double printed
7048 import table lines; add Bound-To comment.
7050 2002-05-29 Matt Thomas <matt@3am-software.com>
7052 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
7053 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
7054 (elf32-vax.lo): New rule.
7055 * Makefile.in: Regenerate.
7056 * configure.in (bfd_elf32_vax_vec)
7057 (vaxnetbsd_vec): New vectors.
7058 * configure: Regenerate.
7059 * config.bfd (vax-*-netbsdelf*)
7061 (vax-*-netbsd*): New targets.
7062 * elf32-vax.c: New file.
7063 * reloc.c: Add VAX relocations.
7064 * bfd-in2.h: Regenerate.
7065 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
7067 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
7069 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
7070 and bfd_elf32_bigarm_vec to targ_selvecs.
7072 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
7074 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
7075 with auto-imported symbols.
7077 2002-05-29 Adam Nemet <anemet@lnxw.com>
7079 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
7080 sections only record bfd.
7081 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
7082 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
7083 * bfd-in2.h: Regenerate.
7085 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
7087 * syms.c (_bfd_stab_section_find_nearest_line): Move
7088 declaration and initialisation of saw_line and saw_func out of
7091 2002-05-29 Alan Modra <amodra@bigpond.net.au>
7093 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
7094 (bfd_elf64_get_symbol_info): Define.
7095 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
7097 2002-05-29 Andrey Volkov <avolkov@transas.com>
7099 * cpu-h8300.c: Make default h8300 machine first in machine list.
7101 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
7103 * config.bfd: Added DLX configuraton.
7104 * Makefile.am: Added DLX configuraton.
7105 * configure.in: Added DLX configuraton.
7106 * archures.c: Add DLX architecure.
7107 * reloc.c: Add DLX relocs.
7108 * targets.c: Added DLX target vector.
7109 * configure: Regenerate.
7110 * Makefile.in: Regenreate.
7111 * bfd-in2.h: Regenreate.
7112 * elf32-dlx.c: New file: Support DLX target.
7113 * cpu-dlx.c: New file: Support DLX target.
7115 2002-05-25 Alan Modra <amodra@bigpond.net.au>
7117 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
7119 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
7120 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
7121 strings to point inside function code sym string.
7122 (func_desc_adjust): Likewise.
7123 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
7125 2002-05-24 Michal Ludvig <mludvig@suse.cz>
7127 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
7128 (elf64_x86_64_grok_psinfo): Added.
7130 2002-05-24 TAMURA Kent <kent@netbsd.org>
7132 * config.bfd: Add a target for i386-netbsdpe.
7134 2002-05-24 Alan Modra <amodra@bigpond.net.au>
7136 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
7137 and is_func_descriptor.
7138 (func_desc_adjust): Hide function code sym in shared libs unless
7139 there is a matching exported function descriptor sym.
7141 2002-05-23 Jakub Jelinek <jakub@redhat.com>
7143 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
7144 for symbols from SHF_TLS section.
7145 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
7146 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
7147 (map_sections_to_segments): Build PT_TLS segment if necessary.
7148 (assign_file_positions_for_segments): Likewise.
7149 (get_program_header_size): Account for PT_TLS segment.
7150 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
7151 SEC_THREAD_LOCAL sections to STT_TLS.
7152 * reloc.c: Add 386 and IA-64 TLS relocs.
7153 * section.c (SEC_THREAD_LOCAL): Define.
7154 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
7156 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
7157 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
7159 (struct elf_final_link_info): Add first_tls_sec.
7160 (elf_bfd_final_link): Set first_tls_sec.
7161 Compute elf_hash_table (info)->tls_segment.
7162 (elf_link_output_extsym): Handle STT_TLS symbols.
7163 (elf_link_input_bfd): Likewise.
7164 * syms.c (BSF_THREAD_LOCAL): Define.
7165 * bfd-in2.h: Rebuilt.
7166 * libbfd.h: Rebuilt.
7167 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
7168 elf_i386_mkobject, elf_i386_object_p): New functions.
7169 (elf_howto_table): Add TLS relocs.
7170 (elf_i386_reloc_type_lookup): Support TLS relocs.
7171 (elf_i386_info_to_howto_rel): Likewise.
7172 (struct elf_i386_link_hash_entry): Add tls_type.
7173 (struct elf_i386_obj_tdata): New.
7174 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
7176 (struct elf_i386_link_hash_table): Add tls_ldm_got.
7177 (link_hash_newfunc): Clear tls_type.
7178 (elf_i386_check_relocs): Support TLS relocs.
7179 (elf_i386_gc_sweep_hook): Likewise.
7180 (allocate_dynrelocs): Likewise.
7181 (elf_i386_size_dynamic_sections): Likewise.
7182 (elf_i386_relocate_section): Likewise.
7183 (elf_i386_finish_dynamic_symbol): Likewise.
7184 (bfd_elf32_mkobject, elf_backend_object_p): Define.
7185 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
7186 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
7187 want_tprel, want_dtpmod, want_dtprel.
7188 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
7189 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
7190 R_IA64_LTOFF_TPREL22.
7191 (elf_code_to_howto_index): Add TLS relocs.
7192 (elfNN_ia64_check_relocs): Support TLS relocs.
7193 (allocate_global_data_got): Account for TLS .got data.
7194 (allocate_dynrel_entries): Account for TLS dynamic relocations.
7195 (elfNN_ia64_install_value): Supprt TLS relocs.
7196 (set_got_entry): Support TLS relocs.
7197 (elfNN_ia64_relocate_section): Likewise.
7199 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
7201 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
7202 BLX reloc round the relocation up rather than down.
7203 * coff-arm.c (coff_arm_relocate_section): Likewise.
7205 2002-05-21 H.J. Lu (hjl@gnu.org)
7207 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
7210 2002-05-22 Alan Modra <amodra@bigpond.net.au>
7212 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
7213 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
7215 2002-05-22 Alan Modra <amodra@bigpond.net.au>
7217 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
7219 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
7221 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7223 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
7226 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7228 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
7230 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
7231 return with false on error.
7232 (elf_link_input_bfd): Check reloc_emitter return value.
7234 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
7236 * config.bfd (armeb-*-netbsdelf*): New target.
7238 2002-05-20 Alan Modra <amodra@bigpond.net.au>
7240 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
7241 at the plt call stub.
7243 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7245 * cpu-mips.c (mips_compatible): Don't try to check machine
7248 2002-05-18 Tom Rix <trix@redhat.com>
7250 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
7252 2002-05-17 Alan Modra <amodra@bigpond.net.au>
7254 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
7255 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
7256 we've already warned about an undefined symbol. Report more
7257 detail on reloc errors.
7259 2002-05-17 Alan Modra <amodra@bigpond.net.au>
7261 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
7262 * configure.in: Invoke AM_INSTALL_LIBBFD.
7263 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
7264 (install_libbfd): .. New target.
7265 (uninstall_libbfd): Likewise.
7266 (install-bfdlibLTLIBRARIES): Likewise.
7267 (uninstall-bfdlibLTLIBRARIES): Likewise.
7269 (bfdincludedir): New.
7270 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
7271 * aclocal.m4: Regenerate.
7272 * configure: Regenerate.
7273 * Makefile.in: Regenerate.
7275 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
7277 * hash.c (bfd_hash_lookup): Remove computation of len from inside
7280 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
7282 * config.bfd: Add targets for sh64-linux (little endian and
7285 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
7287 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
7288 is located in the same section as the import table. Instead
7289 check, and if necessary load the section containing the thunk.
7291 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
7293 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
7295 (xcoff64_core_file_matches_executable_p): Replace bfd_read
7298 2002-05-15 Alan Modra <amodra@bigpond.net.au>
7300 * aix5ppc-core.c: Warning fixes.
7301 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
7302 * aout-target.h (MY_bfd_link_just_syms): Define.
7303 * aout-tic30.c (MY_bfd_link_just_syms): Define.
7304 * bfd.c (bfd_link_just_syms): Define.
7305 * binary.c (binary_bfd_link_just_syms): Define.
7306 * bout.c (b_out_bfd_link_just_syms): Define.
7307 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
7308 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
7309 * coffcode.h (coff_bfd_link_just_syms): Define.
7310 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
7311 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
7312 (_bfd_elf_link_just_syms): Declare.
7313 * elf.c (_bfd_elf_link_just_syms): New function.
7314 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
7315 sections haven't already been discarded by the linker.
7316 * elflink.h (elf_link_add_object_symbols): Likewise for stab
7317 sections and SEC_MERGE sections.
7318 (elf_bfd_discard_info): Similarly here.
7319 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
7320 * i386msdos.c (msdos_bfd_link_just_syms): Define.
7321 * i386os9k.c (os9k_bfd_link_just_syms): Define.
7322 * ieee.c (ieee_bfd_link_just_syms): Define.
7323 * ihex.c (ihex_bfd_link_just_syms): Define.
7324 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
7325 (_bfd_generic_link_just_syms): Declare.
7326 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
7327 * linker.c (_bfd_generic_link_just_syms): New function.
7328 * mmo.c (mmo_bfd_link_just_syms): Define.
7329 * nlm-target.h (nlm_bfd_link_just_syms): Define.
7330 * oasys.c (oasys_bfd_link_just_syms): Define.
7331 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
7332 * som.c (som_bfd_link_just_syms): Define.
7333 * srec.c (srec_bfd_link_just_syms): Define.
7334 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
7335 (BFD_JUMP_TABLE_LINK): And here.
7336 * tekhex.c (tekhex_bfd_link_just_syms): Define.
7337 * versados.c (versados_bfd_link_just_syms): Define.
7338 * vms.c (vms_bfd_link_just_syms): Define.
7339 * libbfd.h: Regenerate.
7340 * bfd-in2.h: Regenerate.
7342 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7344 * elf32-mips.c: Remove superfluous definitions copied from
7346 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
7347 SGIish vectors to check the special case.
7348 (mips_elf_hi16_reloc): Fix comment.
7349 (mips_elf_got16_reloc): Likewise.
7350 (_bfd_mips_elf32_gprel16_reloc): Likewise.
7351 (elf_reloc_map): Code cleanup.
7352 (mips_reloc_map): Add comment.
7353 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
7354 (mips_elf32_rtype_to_howto): Likewise.
7355 (mips_elf32_discard_info): Likewise.
7356 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
7357 lead to IRIX compatibility now.
7359 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7361 * elfxx-mips.c: Call it IRIX, not Irix in comments.
7363 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
7365 * config.bfd (shle-*-netbsdelf*): Add target which includes
7368 2002-05-13 David Edelsohn <edelsohn@gnu.org>
7370 * configure.in: Revert 2002-04-07. Instead, auto-configure
7372 * configure: Regenerate.
7373 * config.in: Regenerate.
7374 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
7377 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
7379 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
7381 * configure: Regenerate.
7383 2002-05-13 Alan Modra <amodra@bigpond.net.au>
7385 * Makefile.am (install-data-local): Install headers to
7386 $(exec_prefix)/include.
7387 * Makefile.in: Regenerate.
7389 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
7390 Daniel Jacobowitz <drow@mvista.com>
7392 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
7395 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
7397 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
7398 hppa*-*-openbsd*): New targets.
7399 * configure.in (alpha*-*-openbsd*): Set COREFILE.
7400 * configure: Regenerate.
7402 2002-05-10 Tom Rix <trix@redhat.com>
7404 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
7405 xcoff64_ppc_relocate_section.
7406 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
7407 * libxcoff.h: Common xcoff_reloc_type function declaration.
7409 2002-05-10 Alan Modra <amodra@bigpond.net.au>
7411 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
7412 added in 2002-05-09 commit.
7414 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
7415 don't look for stubs on all undefined syms.
7417 2002-05-09 Alan Modra <amodra@bigpond.net.au>
7419 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
7420 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
7423 * elf32-i386.c (elf_howto_table): Comments.
7424 (elf_i386_relocate_section): Handle more relocs for relocatable
7425 linking and against SEC_MERGE sections.
7427 2002-05-08 Alan Modra <amodra@bigpond.net.au>
7429 * elf32-ppc.c (ppc_elf_create_got): New function.
7430 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
7431 _bfd_elf_create_dynamic_sections. Correct .plt flags.
7432 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
7433 _bfd_elf_create_got_section.
7435 2002-05-07 Alan Modra <amodra@bigpond.net.au>
7437 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
7438 * elfxx-target.h (elf_backend_rela_normal): Define.
7439 (elfNN_bed): Init rela_normal.
7440 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
7441 for section symbols here if rela_normal. Simplify abs section test.
7442 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
7443 return immediately. Remove code handling relocatable linking.
7444 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
7445 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
7446 * elf32-i370.c (i370_elf_relocate_section): Likewise.
7447 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7448 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
7449 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
7450 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7451 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
7452 * elf32-s390.c (elf_s390_relocate_section): Likewise.
7453 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7454 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
7455 * elf64-s390.c (elf_s390_relocate_section): Likewise.
7456 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7457 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
7458 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
7459 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7460 * elf-m10200.c (elf_backend_rela_normal): Define.
7461 * elf-m10300.c (elf_backend_rela_normal): Define.
7462 * elf32-fr30.c (elf_backend_rela_normal): Define.
7463 * elf32-i370.c (elf_backend_rela_normal): Define.
7464 * elf32-i860.c (elf_backend_rela_normal): Define.
7465 * elf32-m68k.c (elf_backend_rela_normal): Define.
7466 * elf32-mcore.c (elf_backend_rela_normal): Define.
7467 * elf32-openrisc.c (elf_backend_rela_normal): Define.
7468 * elf32-ppc.c (elf_backend_rela_normal): Define.
7469 * elf32-s390.c (elf_backend_rela_normal): Define.
7470 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
7471 * elf64-ppc.c (elf_backend_rela_normal): Define.
7472 * elf64-s390.c (elf_backend_rela_normal): Define.
7473 * elf64-x86-64.c (elf_backend_rela_normal): Define.
7474 * elfxx-ia64.c (elf_backend_rela_normal): Define.
7475 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
7476 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
7478 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
7480 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
7481 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
7483 2002-05-06 Alan Modra <amodra@bigpond.net.au>
7485 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
7486 when not relocatable. Fix reloc_emitter call for K&R.
7488 2002-05-04 Alan Modra <amodra@bigpond.net.au>
7490 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
7491 reloading local sym addend mistakenly removed in 2002-05-01 change.
7493 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
7494 (read_abbrevs): Change "offset" param to bfd_vma.
7495 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
7496 Change "abbrev_offset" to bfd_vma.
7497 (read_indirect_string): Use correct conversion chars in error
7498 message format string, cast bfd_vma's to unsigned long.
7499 (read_abbrevs): Likewise.
7500 (read_attribute_value): Likewise.
7501 (decode_line_info): Likewise.
7502 (scan_unit_for_functions): Likewise.
7503 (parse_comp_unit): Likewise.
7505 2002-05-04 Tom Rix <trix@redhat.com>
7507 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
7508 (coff_swap_reloc_out): Same.
7509 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
7510 (xcoff_swap_reloc_out): Same.
7511 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
7512 case some 16 bit relocs. Add reloc value to output.
7513 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
7514 R_RBR. Improve names.
7515 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
7516 (bfd_xcoff_backend_data): Update with new reloc swap names.
7517 (bfd_pmac_xcoff_backend_data) : Same.
7518 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
7519 (xcoff64_swap_reloc_out): Same.
7520 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
7521 R_POS. Add reloc value to output.
7522 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
7523 bit R_RBR. Improve names, masks.
7524 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
7525 (bfd_xcoff_backend_data): Update with new reloc swap names.
7526 (bfd_xcoff_aix5_backend_data) : Same.
7528 2002-05-04 Alan Modra <amodra@bigpond.net.au>
7530 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
7531 bfd_count top_index, input_list, all_local_syms.
7532 (elf32_hppa_setup_section_lists): New function, split from
7533 elf32_hppa_size_stubs.
7534 (elf32_hppa_next_input_section): Likewise.
7535 (group_sections): Likewise.
7536 (get_local_syms): Likewise.
7537 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
7538 stubs on undefined syms too.
7539 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
7540 Only access htab elf fields when we have an elf hash table.
7541 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
7542 (elf32_hppa_next_input_section): Declare.
7544 2002-05-04 Bob Byrnes <byrnes@curl.com>
7546 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
7549 2002-05-03 H.J. Lu (hjl@gnu.org)
7551 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
7552 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
7553 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
7554 to hide a global symbol.
7555 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
7556 forced_local to true.
7558 2002-05-02 Richard Henderson <rth@redhat.com>
7560 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
7561 vs SHN_UNDEF to zero.
7563 2002-05-02 Alan Modra <amodra@bigpond.net.au>
7565 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
7567 <R_PPC64_SECTOFF_DS>: Likewise.
7568 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
7570 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
7571 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
7574 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
7575 (ppc64_elf_ha_reloc): New function.
7576 (ppc64_elf_brtaken_reloc): New function.
7577 (ppc64_elf_sectoff_reloc): New function.
7578 (ppc64_elf_sectoff_ha_reloc): New function.
7579 (ppc64_elf_toc_reloc): New function.
7580 (ppc64_elf_toc_ha_reloc): New function.
7581 (ppc64_elf_toc64_reloc): New function.
7582 (ppc64_elf_unhandled_reloc): New function.
7583 (ppc64_elf_howto_raw): Use the above.
7584 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
7585 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
7586 <R_PPC64_SECTOFF_DS>: Likewise.
7587 (IS_ABSOLUTE_RELOC): Update.
7588 (struct ppc_link_hash_table): Add have_undefweak.
7589 (ppc64_elf_link_hash_table_create): Init.
7590 (func_desc_adjust): Set have_undefweak.
7591 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
7592 add the .sfpr blr when have_undefweak.
7593 (ppc64_elf_setup_section_lists): Check hash table flavour.
7594 (ppc64_elf_next_input_section): Move output_section->owner test to
7596 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
7597 and relocatable test. Return TOCstart and don't set elf_gp.
7598 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
7599 offset calculation. Add assert on weak sym branch tweaks.
7600 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
7601 (ppc64_elf_toc): Declare.
7602 (ppc64_elf_next_input_section): Update.
7604 2002-05-01 Alan Modra <amodra@bigpond.net.au>
7606 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
7609 2002-05-01 Alan Modra <amodra@bigpond.net.au>
7611 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
7612 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
7613 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
7614 call branches. Correct undefined weak destination.
7615 (ppc64_elf_func_desc_adjust): Always create at least one blr in
7616 .sfpr, and correct case where either only savef* or restf* is
7619 Long branch stubs, multiple stub sections.
7620 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
7621 (ppc64_elf_next_input_section): Declare.
7622 * elf64-ppc.c: Move linker-only prototypes.
7623 (STUB_SUFFIX): Define.
7624 (enum ppc_stub_type): New.
7625 (struct ppc_stub_hash_entry): New.
7626 (struct ppc_branch_hash_entry): New.
7627 (struct ppc_link_hash_entry): Add stub_cache, oh.
7628 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
7629 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
7630 Rename plt_overflow to stub_error.
7631 (ppc_stub_hash_lookup): Define.
7632 (ppc_branch_hash_lookup): Define.
7633 (stub_hash_newfunc): New function.
7634 (branch_hash_newfunc): New function.
7635 (link_hash_newfunc): Init new fields.
7636 (ppc64_elf_link_hash_table_create): Likewise.
7637 (ppc64_elf_link_hash_table_free): New function.
7638 (ppc_stub_name): New function.
7639 (ppc_get_stub_entry): New function.
7640 (ppc_add_stub): New function.
7641 (create_linkage_sections): Use bfd_make_section_anyway. Create
7642 .branch_lt and .rela.branch_lt sections. Don't create .stub.
7643 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
7644 and set up for plt call stubs. Link func and func desc syms.
7645 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
7646 (func_desc_adjust): Avoid hash lookup when func desc sym available
7647 via shortcut, and set links when processing.
7648 (ppc64_elf_hide_symbol): Likewise.
7649 (allocate_dynrelocs): Don't allocate stub section here.
7650 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
7652 (ppc_type_of_stub): New function.
7653 (build_one_stub): Delete.
7654 (ppc_build_one_stub): New function.
7655 (ppc_size_one_stub): New function.
7656 (ppc64_elf_setup_section_lists): New function.
7657 (ppc64_elf_next_input_section): New function.
7658 (group_sections): New function.
7659 (get_local_syms): New function.
7660 (ppc64_elf_size_stubs): Rewrite.
7661 (ppc64_elf_build_stubs): Rewrite.
7662 (ppc64_elf_relocate_section): Look up stub entry for REL24
7663 relocs. Don't propagate REL14* to dynamic objects. Look for long
7664 branch stubs if REL14* or REL24 relocs won't reach.
7665 (bfd_elf64_bfd_link_hash_table_free): Define.
7667 2002-04-30 Mark Mitchell <mark@codesourcery.com>
7669 * config.bfd: Add support for powerpc-*-windiss.
7671 2002-04-30 Tom Rix <trix@redhat.com>
7673 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
7674 symbol names into the hash table.
7676 2002-04-28 Tom Rix <trix@redhat.com>
7678 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
7679 calulating relocations.
7680 (xcoff_complain_overflow) : Function table for relocation errors.
7681 (xcoff_ppc_relocate_section): Use relocation and complain function
7683 (xcoff_complain_overflow_unsigned_func): New complain function.
7684 (xcoff_complain_overflow_signed_func): Same.
7685 (xcoff_complain_overflow_bitfield_func): Same.
7686 (xcoff_complain_overflow_dont_func): Same.
7687 (xcoff_reloc_type_crel): New recot function.
7688 (xcoff_reloc_type_br): Same.
7689 (xcoff_reloc_type_ba): Same.
7690 (xcoff_reloc_type_toc): Same.
7691 (xcoff_reloc_type_rel): Same.
7692 (xcoff_reloc_type_neg): Same.
7693 (xcoff_reloc_type_pos): Same.
7694 (xcoff_reloc_type_fail): Same.
7695 (xcoff_reloc_type_noop): Same.
7696 * libxcoff.h : Declare common parts for xcoff64.
7697 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
7698 and complain function tables.
7700 2002-04-28 Alan Modra <amodra@bigpond.net.au>
7702 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
7703 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
7705 2002-04-26 Alan Modra <amodra@bigpond.net.au>
7707 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
7708 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
7710 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
7711 same as the output before calling elf_link_input_bfd.
7713 * coffcode.h (coff_compute_section_file_positions): Set
7714 section_tail after shuffling section list.
7716 2002-04-24 Christian Groessler <chris@groessler.org>
7718 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
7719 addresses are 23bit with a special layout, not plain 32bit
7720 values. Prevent relocation of immediate values.
7722 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
7724 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
7725 MIPS-16 ASE flags are set, print something to indicate that.
7727 2002-04-23 Alan Modra <amodra@bigpond.net.au>
7729 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
7730 under which a plt call stub is used.
7731 (final_link_relocate): Similarly.
7732 (allocate_plt_static): Clear h-plabel except when plt entry is
7733 exclusively used for a plabel.
7734 (allocate_dynrelocs): Use the above to simplify plt sizing.
7735 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
7736 (elf32_hppa_link_hash_table_create): Init.
7738 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
7739 (elf32_hppa_check_relocs): Set has_22bit_branch.
7741 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
7742 (final_link_relocate): Likewise.
7744 2002-04-22 Jakub Jelinek <jakub@redhat.com>
7746 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
7747 search table if some FDE is DW_EH_PE_aligned encoded either.
7748 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
7750 2002-04-22 Richard Smith <richard@ex-parrot.com>
7751 Jakub Jelinek <jakub@redhat.com>
7753 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
7754 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
7755 encoded personality.
7756 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
7757 for CIE/FDE removal.
7759 2002-04-20 Tom Rix <trix@redhat.com>
7761 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
7763 2002-04-20 Alan Modra <amodra@bigpond.net.au>
7765 * archures.c (bfd_lookup_arch): Move the list order comment..
7766 (struct bfd_arch_info): ..to where it belongs.
7767 * bfd-in2.h: Regenerate.
7769 * archures.c (bfd_lookup_arch): Add comment on list order.
7770 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
7771 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
7772 is always at head of list.
7774 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
7776 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
7777 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
7778 definition of these functions for ARM_WINCE builds as they are
7780 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
7781 for ARM_WINCE builds.
7783 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
7785 * coff-arm.c (bfd_arm_process_before_allocation):
7787 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
7789 * cpu-sh.c (scan_mach): Delete.
7790 (arch_info_struct): Replace scan_mach with bfd_default_scan.
7791 (bfd_sh_arch): Likewise.
7793 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
7795 * ihex.c (ihex_write_object_contents): Fix check for records
7796 crossing 64K boundaries.
7798 2002-04-16 Alan Modra <amodra@bigpond.net.au>
7800 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
7801 type rather than just assuming entries are ELF.
7802 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
7803 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
7804 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
7805 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
7806 rather than elf_link_hash_entry.
7808 2002-04-15 Richard Henderson <rth@redhat.com>
7810 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
7813 2002-04-15 Michael Snyder <msnyder@redhat.com>
7815 * opncls.c (bfd_close): Write contents if writeable.
7816 Minor formatting tidy-ups.
7818 2002-04-15 Alan Modra <amodra@bigpond.net.au>
7820 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
7822 2002-04-12 Michael Snyder <msnyder@redhat.com>
7824 * bfd-in.h (bfd_get_section_lma): New access macro.
7825 Minor white-space fix-up.
7827 2002-04-12 Alan Modra <amodra@bigpond.net.au>
7829 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
7832 2002-04-09 DJ Delorie <dj@redhat.com>
7834 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
7836 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
7838 * coffcode.h (coff_read_word): New.
7839 (coff_compute_checksum): New.
7840 (coff_apply_checksum): New.
7841 (coff_write_object_contents): Call coff_apply_checksum () to
7842 apply checksum to PE image.
7844 2002-04-08 Randolph Chung <tausq@debian.org>
7846 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
7847 (elf32_hppa_final_link): Split out sorting logic to..
7848 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
7849 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
7851 2002-04-07 Andrew Cagney <ac131313@redhat.com>
7853 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
7855 * configure: Re-generate.
7857 2002-04-07 Andrew Cagney <ac131313@redhat.com>
7859 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
7860 is greater or equal to 4.3.3.
7861 * configure: Regenerate.
7864 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
7866 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
7867 R_CRIS_32_PCREL>: Fix typo in name.
7868 (cris_elf_check_relocs): Always create .rela.got here when
7869 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
7870 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
7871 assume it's created.
7873 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
7875 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
7876 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
7878 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
7879 * bfd.c (bfd_link_hash_table_free): Define.
7880 * binary.c (binary_bfd_link_hash_table_free): Define.
7881 * bout.c (b_out_bfd_link_hash_table_free): Define.
7882 * coff-rs6000.c (rs6000coff_vec): Include
7883 _bfd_generic_link_hash_table_free.
7884 (pmac_xcoff_vec): Likewise.
7885 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
7886 (aix5coff64_vec): Likewise.
7887 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
7888 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
7889 (bfd_elf32_bfd_link_hash_table_free): Define.
7890 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
7891 (bfd_elf32_bfd_link_hash_table_free): Define.
7892 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
7894 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
7895 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
7896 * ieee.c (ieee_bfd_link_hash_table_free): Define.
7897 * ihex.c (ihex_bfd_link_hash_table_free): Define.
7898 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
7899 (_bfd_generic_link_hash_table_free): Add prototype.
7900 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
7901 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
7902 * linker.c (_bfd_generic_link_hash_table_free): New function.
7903 * mmo.c (mmo_bfd_link_hash_table_free): Define.
7904 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
7905 * oasys.c (oasys_bfd_link_hash_table_free): Define.
7906 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
7907 * som.c (som_bfd_link_hash_table_free): Define.
7908 * srec.c (srec_bfd_link_hash_table_free): Define.
7909 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
7910 * versados.c (versados_bfd_link_hash_table_free): Define.
7911 * vms.c (vms_bfd_link_hash_table_free): New function.
7912 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
7914 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
7915 instead of bfd_alloc.
7916 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
7917 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
7918 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
7919 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
7920 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
7921 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
7922 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
7923 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
7924 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
7925 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
7926 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
7927 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
7928 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
7929 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
7930 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
7931 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
7932 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
7933 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
7934 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
7935 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
7936 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
7937 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
7938 * m68klinux.c (linux_link_hash_table_create): Likewise.
7939 * sparclinux.c (linux_link_hash_table_create): Likewise.
7940 * sunos.c (sunos_link_hash_table_create): Likewise.
7941 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
7943 * targets.c: Add _bfd_link_hash_table_free to xvec.
7945 * bfd-in2.h: Regenerate.
7946 * libbfd.h: Regenerate.
7947 * libcoff.h: Regenerate.
7949 2002-04-04 Alan Modra <amodra@bigpond.net.au>
7951 * dep-in.sed: Cope with absolute paths.
7952 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
7954 * Makefile.in: Regenerate.
7955 * coff-arm.c: Fix copyright date.
7956 * cpu-h8300.c: Likewise.
7957 * cpu-i370.c: Likewise.
7958 * cpu-s390.c: Likewise.
7959 * cpu-mips.c: Likewise.
7960 * po/SRC-POTFILES.in: Regenerate.
7962 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7964 * Makefile.am: Add elfxx-mips.c to the known backends.
7965 (elf32-mips.lo): remove dependency to coff/external.h.
7966 * Makefile.in: Regenerate.
7967 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
7968 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
7970 * configure: Regenerate.
7971 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
7972 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
7973 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
7974 MIPS specific backend functions.
7975 * elf32-mips.c: Moved most code to elfxx-mips.c.
7976 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
7978 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
7979 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
7980 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
7981 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
7982 interface to allow selection of the right REL or RELA howto table.
7983 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
7984 static. Let it refuse n32 objects.
7985 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
7986 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
7987 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
7988 (elf32_mips_ignore_discarded_relocs): Rename from
7989 _bfd_elf32_mips_ignore_discarded_relocs.
7990 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
7991 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
7992 (elf_mips_howto_table_rela): Remove.
7993 * elf64-mips.c: Moved most code to elfxx-mips.c.
7994 (bfd_elf64_bfd_reloc_type_lookup): Make static.
7995 (mips_elf64_rtype_to_howto): New function.
7996 (mips_elf64_object_p): Likewise.
7997 (elf64_mips_irix_compat): Likewise.
7998 * elfxx-mips.c: New file containing common code merged together from
7999 elf32-mips.c and elf64-mips.c.
8000 * elfxx-mips.h: New file containing MIPS specific prototypes from
8002 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
8003 elf_backend_mips_rtype_to_howto.
8005 2002-04-04 Alan Modra <amodra@bigpond.net.au>
8007 * srec.c (MAXCHUNK, Chunk): Revise comments.
8008 (srec_write_record): Correct buffer size.
8009 (srec_write_header): Do without intermediate buffer.
8010 (srec_write_section): Validate Chunk.
8011 (srec_write_terminator): Pass NULL instead of dummy buffer.
8012 (srec_write_symbols): Pass file and symbol names directly to
8013 bfd_bwrite so sprintf won't overflow buffer.
8015 2002-04-03 Jakub Jelinek <jakub@redhat.com>
8017 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
8018 PC relative relocs against hidden symbols.
8019 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8021 2002-04-03 Alan Modra <amodra@bigpond.net.au>
8023 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
8024 LMAs, loop over segments until p_vaddr and p_memsz specify an
8025 extent enclosing the section.
8027 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
8029 * ihex.c (ihex_write_object_contents): Do not allow records to
8030 cross a 64K boundary - wrap if necessary.
8032 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
8034 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
8035 which caused the returned LWP ID to always be 0.
8037 2002-04-01 Richard Henderson <rth@redhat.com>
8039 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
8040 (elf32_sparc_relocate_section): Use it to figure out when to
8041 initialize .got entries.
8042 * elf64-sparc.c: Similarly.
8044 2002-03-28 Alan Modra <amodra@bigpond.net.au>
8046 * linker.c (link_action): Ignore duplicate warning syms.
8047 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
8048 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
8049 (elf_adjust_dynamic_symbol): Likewise.
8050 (elf_export_symbol): Likewise.
8051 (elf_link_find_version_dependencies): Likewise.
8052 (elf_link_assign_sym_version): Likewise.
8053 (elf_link_sec_merge_syms): Likewise.
8054 (elf_link_output_extsym): Likewise.
8055 (elf_gc_sweep_symbol): Likewise.
8056 (elf_gc_propagate_vtable_entries_used): Likewise.
8057 (elf_gc_smash_unused_vtentry_relocs): Likewise.
8058 (elf_gc_allocate_got_offsets): Likewise.
8059 (elf_collect_hash_codes): Likewise.
8060 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
8061 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
8062 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
8063 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
8064 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
8065 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
8066 (elf_cris_discard_excess_dso_dynamics): Likewise.
8067 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
8068 (mark_PIC_calls): Likewise.
8069 (allocate_plt_static): Likewise.
8070 (allocate_dynrelocs): Likewise.
8071 (readonly_dynrelocs): Likewise.
8072 * elf32-i386.c (allocate_dynrelocs): Likewise.
8073 (readonly_dynrelocs): Likewise.
8074 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
8075 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
8076 * elf32-mips.c (mips_elf_output_extsym): Likewise.
8077 (mips_elf_sort_hash_table_f): Likewise.
8078 (mips_elf_check_mips16_stubs): Likewise.
8079 * elf32-s390.c (allocate_dynrelocs): Likewise.
8080 (readonly_dynrelocs): Likewise.
8081 * elf32-sh.c (sh_elf_discard_copies): Likewise.
8082 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
8083 (xstormy16_relax_plt_realloc): Likewise.
8084 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
8085 (elf64_alpha_output_extsym): Likewise.
8086 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
8087 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
8088 (mips_elf64_check_mips16_stubs): Likewise.
8089 (mips_elf64_output_extsym): Likewise.
8090 * elf64-ppc.c (func_desc_adjust): Likewise.
8091 (allocate_dynrelocs): Likewise.
8092 (readonly_dynrelocs): Likewise.
8093 * elf64-s390.c (allocate_dynrelocs): Likewise.
8094 (readonly_dynrelocs): Likewise.
8095 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
8096 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
8097 (readonly_dynrelocs): Likewise.
8098 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
8099 * aoutx.h (aout_link_write_other_symbol): Likewise.
8100 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
8101 (_bfd_coff_write_global_sym): Likewise.
8102 * i386linux.c (linux_tally_symbols): Likewise.
8103 * m68klinux.c (linux_tally_symbols): Likewise.
8104 * sparclinux.c (linux_tally_symbols): Likewise.
8105 * pdp11.c (aout_link_write_other_symbol): Likewise.
8106 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
8107 * xcofflink.c (xcoff_build_ldsyms): Likewise.
8108 (xcoff_write_global_symbol): Likewise.
8110 * cofflink.c (_bfd_coff_final_link): Formatting.
8111 * cpu-mips.c (mips_compatible): Make static, prototype.
8112 * elf32-i386.c (elf_i386_check_relocs): Formatting.
8113 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
8114 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
8115 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
8116 (mips_elf64_final_link): Likewise.
8117 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
8120 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
8122 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
8123 (SWAP_OUT_RELOC_OFFSET): Define.
8125 2002-03-27 Gregory Steuck <greg@nest.cx>
8127 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
8128 terminating NULL if empty symbol table.
8129 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
8131 2002-03-26 H.J. Lu (hjl@gnu.org)
8133 * elflink.h (elf_link_input_bfd): Revert the last change since
8134 the gcc exception handling isn't fixed yet.
8136 2002-03-26 H.J. Lu (hjl@gnu.org)
8138 * elflink.h (elf_link_input_bfd): Complain about relocations
8139 against local symbols in discarded sections.
8141 2002-03-26 Alan Modra <amodra@bigpond.net.au>
8143 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
8145 2002-03-23 Alan Modra <amodra@bigpond.net.au>
8147 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
8148 section file offset for !SEC_LOAD sections.
8150 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
8152 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
8153 <case R_ARM_GOT>): Handle relocations to Thumb functions.
8155 2002-03-21 Alan Modra <amodra@bigpond.net.au>
8157 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
8159 * archive.c: Update copyright date.
8160 * bfd-in2.h: Regenerate.
8161 * libbfd.h: Regenerate.
8162 * Makefile.am: Run "make dep-am"
8163 * Makefile.in: Regenerate.
8164 * po/SRC-POTFILES.in: Regenerate.
8166 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
8168 * dwarf2.c (struct funcinfo): Move up.
8169 (lookup_address_in_function_table): New argument function_ptr.
8171 (lookup_address_in_line_table): New argument function. If function
8172 is non-NULL, use it to handle ``addr'' before the first line note of
8174 (comp_unit_find_nearest_line): Update and swap calls to
8175 lookup_address_in_function_table and lookup_address_in_line_table.
8176 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
8177 N_SLINE encountered if we see an N_FUN before any N_SLINE.
8179 2002-03-20 Tom Rix <trix@redhat.com>
8181 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
8182 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
8183 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
8185 2002-03-19 Tom Rix <trix@redhat.com>
8187 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
8188 dynamic objects in archives.
8190 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
8192 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
8193 STT_NOTYPE symbols to STT_OBJECT.
8195 2002-03-18 Jan Hubicka <jh@suse.cz>
8197 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
8199 2002-03-18 Tom Rix <trix@redhat.com>
8201 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
8202 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
8203 * coff-rs6000 (do_pad) : New function for archive padding.
8204 (do_copy) : New function for object file copying in archives.
8205 (do_shared_object_padding) : New function for padding shared
8206 objects to their text section alignment in archives.
8207 (bfd_xcoff_ar_achive_set_magic) : Stub.
8208 (xcoff_write_armap_big) : Use do_copy and do_pad.
8209 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
8211 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
8212 bfd_xcoff_magic_number.
8213 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
8215 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
8216 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
8217 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
8218 * rs6000-core.c : Update copyright date.
8219 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
8221 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
8222 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
8223 (coff_set_flags) : Use bfd_xcoff_magic_number.
8224 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
8225 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
8226 * Makefile.am : Same.
8227 * config.bfd : Same.
8229 * configure : Regnerate.
8230 * Makefile.in : Same.
8233 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
8235 * po/fr.po: Updated version.
8237 2002-03-18 Alan Modra <amodra@bigpond.net.au>
8239 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
8240 * libbfd.h: Regenerate.
8241 * archive.c (coff_write_armap): Pass on failures from
8242 bfd_write_bigendian_4byte_int.
8244 2002-03-14 H.J. Lu <hjl@gnu.org>
8246 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
8247 error to bfd_error_nonrepresentable_section for reinit_array
8250 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
8252 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
8253 OR it in rather than replacing previously selected flags.
8255 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
8256 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
8258 2002-03-14 Alan Modra <amodra@bigpond.net.au>
8260 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
8262 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
8263 ensure reloc size matches before calling elf_link_input_bfd.
8264 Add an assert to check reloc size when counting output relocs.
8266 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
8268 * mmo.c (mmo_get_loc): Return NULL rather than false.
8270 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
8272 * po/fr.po: Updated version.
8274 2002-03-13 Alan Modra <amodra@bigpond.net.au>
8276 * archures.c (bfd_default_compatible): Test bits_per_word.
8277 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
8278 bfd_default_compatible.
8279 * cpu-i370.c (i370_compatible): Likewise.
8280 * cpu-sparc.c (sparc_compatible): Likewise.
8281 * cpu-h8300.c (compatible): Test in->arch == out->arch.
8283 * elflink.h: Formatting fixes.
8284 (elf_link_output_extsym): Merge undefined and undef weak cases.
8286 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
8287 when word size of input matches output word size.
8289 2002-03-12 Andreas Jaeger <aj@suse.de>
8291 * cpu-i386.c (i386_compatible): New. Use it instead of
8292 bfd_default_compatible.
8294 2002-03-07 H.J. Lu (hjl@gnu.org)
8296 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
8297 as the type for bfd_reloc_val.
8299 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
8301 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
8302 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
8303 (elf_hppa_final_link_relocate): Correct relocations for indirect
8304 references to local data through the DLT. Fix .opd creation for
8305 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
8306 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
8307 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
8308 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
8309 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
8310 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
8311 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
8313 2002-03-05 Jakub Jelinek <jakub@redhat.com>
8315 * merge.c (_bfd_merge_sections): Don't segfault if there
8316 is nothing to merge due to GC.
8318 2002-03-05 Alan Modra <amodra@bigpond.net.au>
8320 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
8321 symbols that have been forced local.
8323 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
8324 to output forced local syms for non-shared link.
8325 (elf_link_output_extsym): Tweak condition for calling backend
8326 adjust_dynamic_symbol so that previous behaviour is kept.
8327 Whitespace changes throughout file.
8329 2002-03-04 H.J. Lu <hjl@gnu.org>
8331 * elf.c (bfd_section_from_shdr): Handle special sections,
8332 .init_array, .fini_array and .preinit_array.
8333 (elf_fake_sections): Likewise.
8335 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
8336 DT entry only if the section is in output for .init_array,
8337 .fini_array and .preinit_array. Complain about .preinit_array
8339 (elf_bfd_final_link): Warn zero size for .init_array,
8340 .fini_array and .preinit_array sections.
8342 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
8343 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
8344 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
8347 2002-03-04 Alan Modra <amodra@bigpond.net.au>
8349 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
8350 * configure: Regenerate.
8352 2002-03-02 Tom Rix <trix@redhat.com>
8354 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
8356 * coff-rs6000.c (xcoff_howto_table): Same.
8358 2002-03-01 David Mosberger <davidm@hpl.hp.com>
8360 * elflink.h (size_dynamic_sections): If section named
8361 ".preinit_array" exists, create DT_PREINIT_ARRAY and
8362 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
8363 ".init_array" and ".fini_array".
8364 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
8365 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
8368 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
8370 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
8373 2002-02-25 Alan Modra <amodra@bigpond.net.au>
8375 * elf64-hppa.h: Update copyright date.
8377 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
8378 (ppc64_elf_relocate_section): Don't generate power4 style branch
8379 hints for *_BRTAKEN and *_BRNTAKEN relocs.
8381 2002-02-22 Jakub Jelinek <jakub@redhat.com>
8383 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
8385 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8387 2002-02-21 Andreas Jaeger <aj@suse.de>
8389 * elf64-x86-64.c: Major rework that introduces all recent changes
8390 to the x86-64 backend. Get a closer match to elf32-i386.
8391 (struct elf64_x86_64_dyn_relocs): Rename from
8392 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
8394 (struct elf64_x86_64_link_hash_table): Add short cuts to some
8396 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
8397 remove casts, initialize new hash members.
8398 (create_got_section): New.
8399 (elf64_x86_64_create_dynamic_sections): New.
8400 (elf64_x86_64_copy_indirect_symbol): New.
8401 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
8402 relocs, .got or .relgot here but do it in allocate_dynrelocs.
8403 Reference count possible .plt and .got entries. Don't test input
8404 section SEC_READONLY here to try to avoid copy relocs, and keep
8405 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
8406 DF_TEXTREL here. Delay setting of variables until needed. Cache
8407 pointer to "sreloc" section in elf_section_data. Tweak condition
8408 under which .got created. Report files with bad relocation
8410 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
8411 Reference count possible .plt entries. Don't deallocate .got and
8413 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
8414 do copy reloc processing for weakdefs. Remove redundant casts and
8415 aborts. Delay setting of vars until needed. Move creation of
8416 dynamic symbols and allocation of .plt and .rela.plt to
8417 allocate_dynrelocs. Replace BFD_ASSERT with abort.
8418 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
8419 (allocate_dynrelocs): New.
8420 (readonly_dynrelocs): New.
8421 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
8422 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
8423 Zero out the dynamic allocated content space.
8424 (elf64_x86_64_discard_copies): Removed.
8425 (elf64_x86_64_relocate_section): Make use of dynamic section
8426 short-cuts. Localise vars, and delay setting. Better error
8427 reporting, replace BFD_ASSERT with abort. Check
8428 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
8429 regular object file and tread the weak definition as the normal
8430 one. Don't discard relocs for undefweak or undefined symbols and
8431 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
8433 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
8434 symbols that have been forced local. Use same test to decide if
8435 we can use a relative reloc for got as relocate_section. Expand
8436 SHN_UNDEF comment. Move expressions out of function calls.
8437 Replace BFD_ASSERT with abort.
8438 (bfd_elf64_bfd_final_link): Removed.
8439 (elf_backend_copy_indirect_symbol): Define.
8441 2002-02-20 Tom Rix <trix@redhat.com>
8443 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
8444 (_bfd_xcoff_reloc_type_lookup): Use it.
8445 * coff64-rs6000.c (xcoff64_howto_table): Same.
8446 (xcoff64_reloc_type_lookup): Same.
8448 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
8450 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
8453 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
8455 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
8456 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
8457 * bfd-in2.h: Regenerate.
8458 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
8459 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
8461 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
8462 (elf_s390_reloc_type_lookup): Likewise.
8463 (elf_s390_check_relocs): Likewise.
8464 (elf_s390_gc_sweep_hook): Likewise.
8465 (elf_s390_relocate_section): Likewise.
8466 (elf_s390_object_p): Use renamed architecture define.
8467 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
8469 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
8471 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
8473 2002-02-19 Jakub Jelinek <jakub@redhat.com>
8475 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
8476 absptr -> pcrel optimization for shared libs.
8477 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
8478 library cannot be converted to pcrel.
8479 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
8481 * elf32-i386.c (elf_i386_relocate_section): If
8482 _bfd_elf_section_offset returned -2, skip, but make sure the
8483 relocation is installed.
8484 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
8485 * elf32-cris.c (cris_elf_relocate_section): Likewise.
8486 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
8487 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8488 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8489 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8490 * elf32-s390.c (elf_s390_relocate_section): Likewise.
8491 * elf32-sh.c (sh_elf_relocate_section): Likewise.
8492 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
8493 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8494 * elf64-s390.c (elf_s390_relocate_section): Likewise.
8495 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
8496 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8497 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8498 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
8499 _bfd_elf_section_offset returning -2 the same way as -1.
8500 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
8501 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
8503 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
8505 2002-02-18 Tom Rix <trix@redhat.com>
8507 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
8508 (bfd_xcoff_size_dynamic_sections): Same.
8509 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
8510 (bfd_xcoff_size_dynamic_sections): Same.
8511 * coff-rs6000.c (xcoff_generate_rtinit): Same.
8512 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
8513 * libxcoff.h (struct xcoff_backend_data_rec): Same.
8514 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
8515 * bfd-in2.h: Regenerate.
8517 2002-02-18 Alan Modra <amodra@bigpond.net.au>
8519 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
8520 (struct ppc_link_hash_table): Add sfpr.
8521 (ppc64_elf_link_hash_table_create): Init it.
8522 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
8524 (create_linkage_sections): ..here. Make .sfpr too.
8525 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
8527 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
8528 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
8529 ._restf* functions, and create as needed.
8530 (func_desc_adjust): Only force_local for shared libs.
8532 2002-02-18 David O'Brien <obrien@FreeBSD.org>
8534 * configure.in: Bump version number post 2.12 branching.
8535 * configure: Regenerate.
8537 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
8539 * mmo.c: Correct and improve comments.
8540 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
8541 zero-pad. Use input to fill up non-empty bfd buffer.
8542 (mmo_flush_chunk): New function.
8543 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
8544 changed. Don't emit location specifier if VMA is same as
8545 *LAST_VMAP after omitting leading zero contents. Call
8546 mmo_flush_chunk before emitting location specifier.
8547 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
8548 with mmo_write_loc_chunk calls.
8549 (mmo_internal_write_section): Call mmo_flush_chunk after
8551 (mmo_write_symbols_and_terminator): Move :Main to first position
8552 in symbol array. Add faked one if it does not exist if there are
8553 other symbols. Don't add it if there are no symbols at all. Move
8554 out test for value of :Main from symbol loop. Rename table
8555 fakemain to maintable and variable mainsym to fakemain.
8557 2002-02-15 Richard Henderson <rth@redhat.com>
8559 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
8560 section with no got matches any got. Simplify error generaion.
8562 2002-02-15 Alan Modra <amodra@bigpond.net.au>
8564 Support arbitrary length fill patterns.
8565 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
8566 (_bfd_default_link_order): Remove bfd_fill_link_order code.
8567 Call default_data_link_order.
8568 (default_fill_link_order): Delete.
8569 (default_data_link_order): New function.
8570 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
8571 of bfd_fill_link_order with bfd_data_link_order.
8572 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
8573 * elf64-mips.c (mips_elf64_final_link): Likewise.
8575 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
8576 Correct value returned in "end" for "0x<non-hex>".
8578 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
8580 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
8581 (scan): Test against 'mach' field in info structure.
8583 2002-02-14 Alan Modra <amodra@bigpond.net.au>
8585 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
8587 2002-02-14 Matt Fredette <fredette@netbsd.org>
8589 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
8592 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
8594 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
8595 non-zero physical addresses when adjusting the LMAs of new
8598 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
8600 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
8601 from _bfd_elf_hppa_gen_reloc_type.
8602 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
8603 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
8604 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
8605 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
8607 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
8609 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
8610 loading its contents if there's nothing to do in it.
8612 2002-02-12 Alan Modra <amodra@bigpond.net.au>
8614 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
8617 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
8618 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
8619 (ppc64_elf_finish_dynamic_sections): Set values for them.
8621 2002-02-11 Michael Snyder <msnyder@redhat.com>
8623 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
8624 * elf.c (elfcore_grok_pstatus): Add prototype.
8625 (elfcore_grok_lwpstatus): Add prototype.
8626 (elfcore_write_lwpstatus): New function.
8627 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
8629 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
8631 * elf32-sh.c: Added missing prototypes.
8632 * elf32-sh64.c: Likewise.
8633 (sh_elf_align_loads): Mark unused args as such.
8634 * elf64-sh64.c: Added missing prototypes.
8635 (struct elf_sh64_link_hash_entry): Fix typo.
8636 (sh_elf64_relocate_section): Fix info argument passed to
8637 _bfd_elf_section_offset.
8639 2002-02-11 Alan Modra <amodra@bigpond.net.au>
8641 * Makefile.am: "make dep-am".
8642 * Makefile.in: Regenerate.
8643 * aclocal.m4: Regenerate.
8644 * config.in: Regenerate.
8645 * configure: Regenerate.
8647 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
8649 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
8651 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
8653 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
8654 cast warnings for the common case.
8656 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
8658 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
8660 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
8663 2002-02-09 Richard Henderson <rth@redhat.com>
8665 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
8666 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
8667 (elf64_alpha_relocate_section): Likewise.
8668 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
8669 * bfd-in2.h, libbfd.h: Rebuild.
8671 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
8673 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
8674 that base-plus-offset reloc accounting is consistent.
8675 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
8676 up to date for undefined symbols.
8678 2002-02-08 Eric Christopher <echristo@redhat.com>
8680 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
8682 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
8683 sections for the O32 ABI.
8685 2002-02-08 Chris Demetriou <cgd@broadcom.com>
8687 * elf32-arm.h: Fix formatting of _("...").
8688 * elf32-d10v.c: Likewise.
8689 * elf32-m68k.c: Likewise.
8690 * elf32-mips.c: Likewise.
8692 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
8694 * coff-or32.c: Fix compile time warning messages.
8696 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
8698 Contribute sh64-elf.
8699 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
8700 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
8701 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
8702 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
8703 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
8704 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
8705 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
8706 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
8707 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
8708 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
8710 * libbfd.h, bfd-in2.h: Rebuilt.
8711 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
8712 (sh_reloc_map): Map them.
8713 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
8714 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
8715 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
8716 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
8717 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
8718 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
8719 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
8720 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
8721 datalabel_got_offset.
8722 (sh_elf_link_hash_newfunc): Initialize it.
8723 (sh_elf_relocate_section): Augment the scope of
8724 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
8725 GOT and GOTOFF handling to new SHmedia relocation types. Support
8727 (sh_elf_check_relocs): Likewise.
8728 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
8729 PLT entries using movi_shori_putval. Support GOT_BIAS.
8730 (sh_elf_finish_dynamic_sections): Likewise.
8731 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
8732 relocation, it's now done by the caller.
8734 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
8735 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
8736 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
8737 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
8738 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
8739 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
8740 sh64_elf64_hash_table): New.
8741 (sh_elf64_howto_table): Introduce new relocs.
8742 (sh_elf64_info_to_howto): Accept new PIC relocs.
8743 (sh_elf64_relocate_section): Augment the scope of
8744 seen_stt_datalabel. Support new PIC relocs.
8745 (sh_elf64_check_relocs): Support new PIC relocs.
8746 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
8747 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
8748 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
8749 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
8750 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
8751 movi_shori_putval, movi_3shori_putval,
8752 sh64_elf64_create_dynamic_sections,
8753 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
8754 sh64_elf64_size_dynamic_sections,
8755 sh64_elf64_finish_dynamic_symbol,
8756 sh64_elf64_finish_dynamic_sections): New.
8757 (elf_backend_create_dynamic-sections,
8758 bfd_elf64_bfd_link_hash_table_create,
8759 elf_backend_adjust_dynamic_symbol,
8760 elf_backend_size_dynamic_sections,
8761 elf_backend_finish_dynamic_symbol,
8762 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
8763 elf_backend_plt_readonly, elf_backend_want_plt_sym,
8764 elf_backend_got_header_size, elf_backend_plt_header_size):
8766 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
8767 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
8768 match official numbers and names; moved unmaching ones to the
8770 * elf32-sh64.c, elf64-sh64.c: Likewise.
8771 2001-03-12 DJ Delorie <dj@redhat.com>
8772 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
8774 2001-03-12 DJ Delorie <dj@redhat.com>
8775 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
8777 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
8778 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
8779 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
8780 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
8781 .cranges section with SEC_SORT_ENTRIES set.
8782 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
8783 incoming sorted .cranges section.
8784 (sh64_bfd_elf_copy_private_section_data): New.
8785 (sh64_elf_final_write_processing): Only sort .cranges and modify
8786 start address if called by linker.
8787 2001-01-08 Ben Elliston <bje@redhat.com>
8788 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
8789 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
8790 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
8791 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
8792 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
8793 line. Add comments before all entries.
8794 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
8796 (sh_elf64_reloc): Correct head comment.
8797 (sh_elf64_relocate_section): Correct spacing.
8798 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
8799 instead call reloc_dangerous callback.
8800 <case R_SH_SHMEDIA_CODE>: New case.
8801 (sh_elf64_gc_mark_hook): Correct spacing.
8802 (sh_elf64_check_relocs): Ditto.
8803 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
8805 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
8807 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
8808 clarify describing comment. Add comments before all entries.
8809 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
8810 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
8811 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
8812 Sort .cranges section in final link. Prepare to set bit 0 on
8814 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
8815 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
8816 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
8818 (sh64_backend_section_from_shdr): New, to recognize
8819 SHT_SH5_CR_SORTED on incoming .cranges section.
8820 (elf_backend_section_from_shdr): Define.
8821 (sh64_elf_final_write_processing): Sort outgoing .cranges
8822 section. (New, temporarily disabled:) Set bit 0 on entry address
8823 according to ISA type.
8824 (sh64_find_section_for_address): New.
8825 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
8826 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
8827 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
8828 bfd_malloc, not xmalloc.
8829 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
8831 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
8832 temporarily disabled) setting bit 0 on entry address.
8833 (elf_backend_final_write_processing): Define.
8834 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
8835 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
8836 be a proper relocation for PTA and PTB rather than a marker.
8837 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
8838 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
8839 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
8840 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
8841 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
8843 * elf64-sh64.c: Ditto.
8844 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
8845 * elf32-sh64.c: Include opcodes/sh64-opc.h
8846 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
8847 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
8848 parameters. No unused parameters. Caller changed.
8849 <case R_SH_PT_16>: New case.
8850 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
8851 * Makefile.in: Regenerate.
8852 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
8853 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
8855 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
8856 (sh64_elf_merge_private_data): Ditto.
8857 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
8858 to access stored section flags.
8859 (sh64_elf_final_write_processing): Return immediately unless
8860 called by linker. Use sh64_elf_section_data (cranges) to get size
8861 of linker-generated cranges entries.
8862 (sh64_elf_copy_private_data): Add missing "return true".
8863 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
8864 (sh_elf64_merge_private_data): Ditto.
8865 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
8866 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
8867 elf64-sh64.c:sh64_elf_fake_sections.
8868 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
8869 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
8870 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
8871 (sh64_elf_final_write_processing): New.
8872 (elf_backend_final_write_processing): Define.
8873 (sh64_elf_fake_sections): Get header flags from tdata field.
8874 (sh64_elf_copy_private_data): Do not call
8875 sh64_elf_copy_private_data_internal, just copy e_flags field.
8876 (sh64_elf_merge_private_data): Do not call
8877 sh64_elf_copy_private_data_internal.
8878 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
8879 Remove EF_SH64_ABI64, let ELF size make difference.
8880 Remove SH64-specific BFD section flag.
8881 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
8882 containing SHmedia through elf_section_data (asect)->tdata
8883 non-zero, not using a BFD section flag.
8884 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
8885 (sh64_elf_merge_private_data): Similar.
8886 (elf_backend_section_flags): Don't define.
8887 (sh64_elf_backend_section_flags): Delete.
8888 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
8890 (sh_elf64_merge_private_data): Similar.
8891 * section.c (Section flags definitions): Don't define
8893 (bfd-in2.h): Regenerate.
8894 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
8895 Make DataLabel references work with partial linking.
8896 * elf32-sh64.c: Fix formatting.
8897 (sh64_elf_link_output_symbol_hook): New.
8898 (elf_backend_link_output_symbol_hook): Define to
8899 sh64_elf_link_output_symbol_hook.
8900 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
8901 undefined if partial linking. Adjust sanity check.
8902 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
8903 (elf_backend_link_output_symbol_hook): Define to
8904 sh64_elf64_link_output_symbol_hook.
8905 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
8906 undefined if partial linking. Adjust sanity check.
8907 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
8908 Implement semantics for inter-file DataLabel references.
8909 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
8910 (sh64_elf64_add_symbol_hook): New.
8911 (sh_elf64_relocate_section): If passing an indirect symbol with
8912 st_type STT_DATALABEL on the way to a symbol with st_other
8913 STO_SH5_ISA32, do not bitor 1 to the relocation.
8914 (elf_backend_add_symbol_hook): Define to
8915 sh64_elf64_add_symbol_hook.
8916 * elf64-sh32.c: Tweak comments.
8917 (DATALABEL_SUFFIX): Define.
8918 (sh64_elf_add_symbol_hook): New.
8919 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
8920 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
8921 symbol with st_type STT_DATALABEL on the way to a symbol with
8922 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
8923 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
8924 Pass through STT_DATALABEL.
8925 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
8926 (elf_backend_get_symbol_type): Define.
8927 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
8928 (elf_backend_get_symbol_type): Define.
8929 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
8930 * elf32-sh64.c: Tweak comments.
8931 (sh64_elf_copy_private_data_internal): Add prototype.
8932 (bfd_elf32_bfd_set_private_flags): Define.
8933 (sh64_elf_copy_private_data_internal): Compare machine name, not
8934 textual BFD target name, to check whether to copy section flag
8936 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
8937 Tweak section-contents-type-mismatch message.
8938 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
8939 Validize reloc-types.
8940 * elf64-sh64.c: New file.
8941 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
8942 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
8943 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
8944 Regenerate dependencies.
8945 * Makefile.in: Regenerate.
8946 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
8947 bfd_elf64_sh64l_vec.
8948 * configure.in: Handle bfd_elf64_sh64_vec and
8949 bfd_elf64_sh64l_vec.
8950 * configure: Regenerate.
8951 * po/POTFILES.in: Regenerate.
8952 * po/bfd.pot: Regenerate.
8953 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
8954 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
8955 anything else but EF_SH64 and EF_SH64_ABI64.
8956 (sh64_elf_merge_private_data): Emit error for anything else but
8957 EF_SH64 and EF_SH64_ABI64.
8958 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
8960 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
8961 bfd_elf32_sh64l_vec as a temporary measure.
8962 * configure: Regenerate.
8963 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
8964 * cpu-sh.c (arch_info_struct): Include sh5 item
8966 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
8967 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
8968 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
8969 * elf32-sh64.c: Tweak comments.
8970 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
8971 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
8972 (sh64_elf_copy_private_data_internal): Wrap long line.
8973 (sh64_elf_merge_private_data): Rewrite to allow objects from
8974 SH64 subsets to be linked together.
8975 (INCLUDE_SHMEDIA): Define.
8976 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
8977 Parenthesize plus-expression inside or-expression.
8978 <global symbol>: Ditto.
8979 (sh_elf_set_mach_from_flags): Remove code refusing
8980 deleted EF_SH64_32BIT_ABI flag.
8981 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
8982 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
8983 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
8984 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
8985 (sh_elf_relocate_section) <local symbol>: Or 1 in
8986 calculation of relocation if sym->st_other & STO_SH5_ISA32.
8987 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
8988 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
8990 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
8991 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
8992 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
8993 Regenerate dependencies.
8994 * Makefile.in: Regenerate.
8995 * archures.c: Add bfd_mach_sh5.
8996 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
8997 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
8998 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
8999 * configure: Regenerate.
9000 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
9001 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
9002 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
9003 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
9004 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
9005 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
9006 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
9007 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
9008 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
9009 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
9011 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
9013 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
9014 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
9015 shmedia_prepare_reloc, goto final_link_relocate if it returns
9016 non-zero, else fail as before.
9017 (sh_elf_set_mach_from_flags): Provide function only if not defined
9018 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
9019 (sh_elf_set_private_flags): Provide function only if not defined
9021 (sh_elf_copy_private_data): Similar.
9022 (sh_elf_merge_private_data): Similar.
9023 * section.c (SEC_SH_ISA_SHMEDIA): New.
9024 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
9025 * elf32-sh64.c: New file.
9026 * libbfd.h: Regenerate.
9027 * bfd-in2.h: Regenerate.
9028 * po/POTFILES.in: Regenerate.
9029 * po/bfd.pot: Regenerate.
9030 * bfd-in2.h: Regenerate.
9031 * libbfd.h: Regenerate.
9033 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
9035 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
9036 been included, not drag it in.
9037 * bfd-in2.h: Regenerate.
9039 2002-02-06 H.J. Lu (hjl@gnu.org)
9041 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
9042 the mach and ISA fields if necessary.
9044 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
9046 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
9047 ARM architecture when an F_ARM_5 flag is detected, since we cannot
9048 be sure exactly which architecture this represents.
9050 2002-02-05 Nick Clifton <nickc@redhat.com>
9052 * po/tr.po: Updated translation.
9054 2002-02-05 Alan Modra <amodra@bigpond.net.au>
9056 From Jimi X <jimix@watson.ibm.com>
9057 * archures (bfd_mach_ppc64): Define.
9058 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
9059 (bfd_powerpc_arch): Define.
9060 * bfd-in2.h: Regenerate.
9061 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
9062 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
9063 (bfd_powerpc_archs): Add default powerpc64 arch.
9065 2002-02-05 Alan Modra <amodra@bigpond.net.au>
9067 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
9068 against section syms in readonly sections. Don't do the global
9069 sym check if we find one.
9070 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
9071 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
9072 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
9073 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
9074 (elf_s390_grok_prstatus): Add missing prototype.
9076 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
9078 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
9079 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
9080 Call bfd_get_section_by_name only once. Initialize
9081 bpodata->n_bpo_relocs_this_section.
9082 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
9084 (bpo_reloc_request_sort_fn): Don't use difference of values as
9087 2002-02-02 David O'Brien <obrien@FreeBSD>
9089 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
9090 version 4.5 and later the same as 5-CURRENT.
9091 * configure: Re-generate.
9093 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
9095 * config.bfd (hppa*-*-netbsd*): New target.
9097 2002-01-31 Philipp Thomas <pthomas@suse.de>
9099 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
9100 to front of message. Unify messages with elf32-arm.h. Use
9101 commas where neccessary.
9102 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
9103 ERROR in messages. Unify messages with coff-arm.c. Correct
9104 VFP/FPA error message.
9105 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
9106 APCS-32 for translation.
9108 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
9110 Perform on-demand global register allocation from
9111 R_MMIX_BASE_PLUS_OFFSET relocs.
9112 * elf64-mmix.c (struct bpo_reloc_section_info, struct
9113 bpo_reloc_request, struct bpo_greg_section_info): New.
9114 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
9115 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
9116 _bfd_mmix_check_all_relocs,
9117 _bfd_mmix_prepare_linker_allocated_gregs,
9118 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
9119 (elf_mmix_howto_table): Correct src_mask for most relocs.
9120 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
9122 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
9123 case. Fix typo in comment. New label do_mmix_reloc.
9124 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
9125 store first object file with a base-plus-offset reloc. Call
9126 mmix_elf_check_common_relocs for the part common with mmo.
9127 (mmix_elf_final_link): Write out linker-allocated register
9129 (elf_backend_gc_sweep_hook): Define.
9130 (bfd_elf64_bfd_relax_section): Define.
9132 * mmo.c: Don't include <ctype.h>
9133 (mmo_init): Correct init-once logic.
9135 2002-02-01 Tom Rix <trix@redhat.com>
9137 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
9139 2002-02-01 Alan Modra <amodra@bigpond.net.au>
9141 * Makefile.am: Run "make dep-am"
9142 * Makefile.in: Regenerate.
9144 2002-01-31 David O'Brien <obrien@FreeBSD>
9146 * configure.in: Recognize the differences in core files from FreeBSD
9147 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
9149 * configure: Regenerate.
9151 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
9153 * coff-or32.c: New file.
9154 * cpu-or32.c: New file.
9155 * elf32-or32.c: New file.
9156 * archures.c: Add support for or32.
9157 * targets.c: Add support for or32.
9158 * bfd-in2.h: Regenerate.
9159 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
9160 coff_write_object_contents): Add support for or32.
9161 * config.bfd: Add target.
9162 * configure.in: Add support for or32.
9163 * configure: Regenerate.
9164 * Makefile.am: Add support for or32.
9165 * Makefile.in: Regenerate.
9166 * po/SRC-POTFILES.in: Add or32 files.
9167 * po/bfd.pot: Regenerate.
9169 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
9170 Don Lindsay <lindsayd@cisco.com>
9172 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
9173 false' with a return of a bfd_reloc_ error code.
9175 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
9177 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
9178 unexport unreferenced symbols when --export-dynamic. Call
9179 _bfd_elf_strtab_delref when unexporting.
9181 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
9183 * bfd-in.h: Include <stdbool.h> if it is available.
9184 * bfd-in2.h: Regenerated.
9186 2002-01-31 Alan Modra <amodra@bigpond.net.au>
9188 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
9191 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
9193 * archures.c: Tidy up formatting of embedded comments.
9194 * bfd.c: Tidy up formatting of embedded comments.
9195 * bfd-in.h: Fix formatting of comments.
9196 * reloc.c: Tidy up formatting of ordinary & embedded comments.
9197 * section.c: Tidy up formatting of embedded comments.
9198 * syms.c: Tidy up formatting of embedded comments.
9199 * targets.c: Tidy up formatting of embedded comments.
9201 * bfd-in2.h: Regenerate.
9203 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
9205 * vms-tir.c (cmd_name): New function.
9206 (tir_cmd_name): New function.
9207 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
9208 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
9211 * peXXigen.c (pe_print_idata): Rearrange message to aid in
9213 (pe_print_pdata): Rearrange message to aid in translation.
9215 * libbfd.c (warn_deprecated): Rearrange error message to aid in
9218 * ihex.c (ihex_write_object_contents): Fix spelling typo.
9220 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
9222 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
9223 message to aid in translation.
9225 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
9226 to aid in translation.
9228 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
9230 2002-01-30 Philipp Thomas <pthomas@suse.de>
9232 * coff-arm.c, elf32-elf.h: Unify messages.
9234 2002-01-30 Nick Clifton <nickc@redhat.com>
9236 * po/sv.po: Updated translation.
9238 2002-01-30 Philipp Thomas <pthomas@suse.de>
9240 * dwarf2.c (read_abbrev): Use full section name in error message.
9241 (decode_line_info): Likewise.
9243 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
9246 2002-01-30 Alan Modra <amodra@bigpond.net.au>
9248 * elf64-ppc.c (func_desc_adjust): Only provide missing function
9249 descriptor symbols for undefined function code syms. Clear
9250 ELF_LINK_NON_ELF so that they can stay weak.
9252 2002-01-29 Chris Demetriou <cgd@broadcom.com>
9253 Mitch Lichtenberg <mpl@broadcom.com>
9255 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
9256 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
9257 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
9259 * bfd-in2.h: Regenerate.
9261 2002-01-29 Chris Demetriou <cgd@broadcom.com>
9263 * elf32-mips.c: Add additional comments about HI16 relocation
9265 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
9266 pc-relative relocations. (Reverts change made on 2001-10-31.)
9267 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
9268 for pc-relative relocations.
9269 (mips_elf_calculate_relocation): Add a comment about a kludge
9270 in the R_MIPS_GNU_REL_HI16 handling.
9271 (_bfd_mips_elf_relocate_section): Implement that kludge;
9272 adjust pc-relative HI16 relocation for difference in HI16 and
9273 LO16 addresses, since it can't easily be done in
9274 mips_elf_calculate_relocation.
9276 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
9278 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
9279 relocations with PC32 relocations for undefined or weak symbols.
9280 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
9281 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
9283 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
9285 * elfcore.h (elf_core_file_p): Improve comment for last change.
9287 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
9289 * configure: Regenerated.
9291 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
9293 * elfcore.h (elf_core_file_p): Set the machine architecture
9294 before processing the program headers.
9296 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
9298 * configure.in <64-bit configuration>: If using gcc, check and
9299 emit error for egcs-1.1.2.
9300 * configure: Regenerate.
9302 2002-01-26 Egor Duda <deo@logos-m.ru>
9304 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
9305 as possible to avoid stack corruption.
9307 2002-01-26 Richard Henderson <rth@redhat.com>
9309 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
9310 for non-allocated sections.
9312 2002-01-25 Mark Kettenis <kettenis@gnu.org>
9314 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
9315 prstat.pr_reg even if it is a struct.
9317 2002-01-25 Steve Ellcey <sje@cup.hp.com>
9319 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
9321 2002-01-25 Philipp Thomas <pthomas@suse.de>
9323 * coffgen.c (coff_print_symbol): Don't mark info message
9326 2002-01-25 Nick Clifton <nickc@redhat.com>
9328 * po/fr.po: Updated translation.
9329 * po/es.po: Updated translation.
9331 2002-01-25 Philipp Thomas <pthomas@suse.de>
9333 * coff-alpha.c (alpha_relocate_section): Unify warning message
9334 for GP relative relocations without GP defined.
9335 * coff-mips.c (mips_relocate_section): Likewise.
9337 2002-01-25 Alan Modra <amodra@bigpond.net.au>
9339 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
9340 unsigned overflow when new_offset < old_offset.
9342 2002-01-24 Philipp Thomas <pthomas@suse.de>
9344 * bfd.c (_bfd_abort): Fix typo.
9346 2002-01-23 Richard Henderson <rth@redhat.com>
9348 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
9349 plt entries for undefweak symbols.
9351 2002-01-23 Steve Ellcey <sje@cup.hp.com>
9353 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
9354 (bfd_elf64_ia64_hpux_big_vec): Ditto.
9355 (bfd_elf32_h8300_vec): Ditto.
9357 2002-01-23 Alan Modra <amodra@bigpond.net.au>
9359 * elf64-ppc.c: Remove stale part of ABI comment.
9360 (NO_OPD_RELOCS): Define.
9361 (ppc64_elf_check_relocs): Use it.
9362 (ppc64_elf_relocate_section): Here too.
9363 (build_one_stub): Don't point function syms at the stub. Instead,
9365 (ppc64_elf_relocate_section): Check whether REL24 relocs should
9366 really go to the stub. Make all dynamic relocs in opd against
9368 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
9371 2002-01-22 Richard Henderson <rth@redhat.com>
9373 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
9375 2002-01-22 Alan Modra <amodra@bigpond.net.au>
9377 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
9378 TOC_BASE_OFF adjustment.
9380 * Makefile.am: Run "make dep-am".
9381 * Makefile.in: Regenerate.
9382 * po/SRC-POTFILES.in: Regenerate.
9384 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
9386 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
9389 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
9391 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
9392 Check for and emit error if sgot is NULL at this point.
9394 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
9396 * config.bfd (ia64*-*-netbsd*): New target.
9398 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
9400 * som.c (som_write_space_strings): Comment typo fix.
9402 2002-01-21 Alan Modra <amodra@bigpond.net.au>
9404 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
9405 is_func_descriptor fields.
9406 (link_hash_newfunc): Init them.
9407 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
9408 dot are candidates for plt entries. When processing .opd relocs,
9409 set function descriptor strings to point inside function code
9410 string, and set new ppc_link_hash_entry fields.
9411 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
9412 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
9413 function descriptors. It's now done in..
9414 (func_desc_adjust): New.
9415 (ppc64_elf_func_desc_adjust): New.
9416 (define elf_backend_always_size_sections): Define.
9417 (ppc64_elf_hide_symbol): New.
9418 (define elf_backend_hide_symbol): Define.
9419 (allocate_dynrelocs): Remove code looking up function descriptors
9420 as that has been done earlier.
9421 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
9423 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
9424 up function descriptor.
9425 (build_one_stub): Look up the function code sym. Check for
9426 invalid plt offsets.
9427 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
9428 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
9430 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
9432 (_bfd_elf_link_hash_hide_symbol): Likewise.
9433 * elflink.h (elf_link_add_object_symbols): Adjust call to
9434 elf_backend_hide_symbol.
9435 (elf_fix_symbol_flags): Likewise.
9436 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
9438 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
9439 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
9440 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
9441 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
9442 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
9444 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
9445 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
9446 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
9448 2002-01-18 Alan Modra <amodra@bigpond.net.au>
9450 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
9451 dynamic function descriptor symbol, not the associated function
9454 2002-01-17 Eric Christopher <echristo@redhat.com>
9456 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
9458 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
9460 * po/bfd.pot: Regenerate.
9461 * po/fr.po: Regenerate.
9463 2002-01-17 Alan Modra <amodra@bigpond.net.au>
9465 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
9466 Remove "Elf_Internal_Shdr *" param.
9467 (_bfd_mips_elf_section_from_bfd_section): Ditto.
9468 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
9469 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
9470 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
9471 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
9472 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
9473 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
9474 function to override special sections. Remove hdr arg from
9475 backend call, and don't loop.
9477 2002-01-16 Eric Christopher <echristo@redhat.com>
9479 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
9480 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
9481 relocations requiring gp0 and gp.
9483 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
9485 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
9487 (elf32_arm_print_private_bfd_data): Likewise.
9489 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
9491 * po/tr.po: Import new version.
9493 2002-01-16 Alan Modra <amodra@bigpond.net.au>
9495 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
9496 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
9497 (ORI_R0_R0_0): Correct.
9499 2002-01-16 Alan Modra <amodra@bigpond.net.au>
9501 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
9502 when plt_not_loaded.
9503 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
9504 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
9505 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
9506 (ppc64_elf_glink_code): Delete.
9507 (PPC64_ELF_GLINK_SIZE): Delete.
9508 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
9509 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
9510 ORI_R0_R0_0): Define.
9511 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
9512 (struct ppc_link_hash_table): Add sstub and plt_overflow.
9513 (ppc64_elf_link_hash_table_create): Init them.
9514 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
9515 Don't copy to shared lib.
9516 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
9517 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
9518 (allocate_dynrelocs <plt>): Don't change function sym here. Make
9519 room for .stub and .glink code.
9520 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
9522 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
9523 bfd_elf64_bfd_final_link.
9524 (bfd_elf64_bfd_final_link): Don't define.
9525 (ppc64_elf_size_stubs): New.
9526 (build_plt_stub): New.
9527 (build_one_stub): New.
9528 (ppc64_elf_build_stubs): New.
9529 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
9530 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
9531 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
9532 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
9533 case output sections not separate. Adjust DT_RELASZ to not
9534 include plt relocs. Set reserved got entry. Set got and plt
9536 (elf_backend_got_header_size): Set to 8.
9537 * elf64-ppc.h: New file.
9539 2002-01-16 Alan Modra <amodra@bigpond.net.au>
9541 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
9542 sections, use bfd_section_list_remove.
9543 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
9544 * elflink.h (elf_link_add_object_symbols): When removing all
9545 sections, use bfd_section_list_clear.
9547 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
9549 * po/sv.po: New file: Swedish translation.
9550 * configure.in (ALL_LINGUAS): Add sv.
9551 * configure: Regenerate.
9553 2002-01-15 Jakub Jelinek <jakub@redhat.com>
9555 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
9556 * elf.c (merge_sections_remove_hook): New function.
9557 (_bfd_elf_merge_sections): Pass it as 3rd argument to
9558 _bfd_merge_sections.
9559 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
9560 * libbfd.h: Rebuilt.
9561 * merge.c (_bfd_merge_sections): Add remove_hook argument.
9562 Call remove_hook if a SEC_EXCLUDE section is encountered.
9564 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
9566 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
9567 (xstormy16_reloc_map): Initialise new field with correct howto
9569 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
9572 2002-01-10 Michael Snyder <msnyder@redhat.com>
9574 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
9575 (elfcore_write_pstatus): Use long instead of pid_t;
9576 * elf-bfd.h: Change prototypes to use long instead of pid_t;
9578 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
9580 * elf.c: Update copyright years.
9581 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
9582 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
9584 2002-01-08 Michael Snyder <msnyder@redhat.com>
9586 Add capability to write corefile note sections, for gdb.
9587 * elf.c (elfcore_write_note): New function.
9588 (elfcore_write_prpsinfo): New function.
9589 (elfcore_write_prstatus): New function.
9590 (elfcore_write_pstatus): New function.
9591 (elfcore_write_prfpreg): New function.
9592 (elfcore_write_prxfpreg): New function.
9593 * elf-bfd.h: Add prototypes for above functions.
9595 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
9597 * elf.c (elf_fake_sections): Propagate errors from
9598 elf_backend_fake_section.
9600 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
9602 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
9603 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
9604 (elf32-sh-nbsd.lo): New rule.
9605 * Makefile.in: Regenerate.
9606 * config.bfd (sh*le-*-netbsdelf*): New target.
9607 (sh*-*-netbsdelf*): New target.
9608 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
9609 (bfd_elf32_shnbsd_vec): New vector.
9610 (bfd_elf32_shlnbsd_vec): New vector.
9611 * configure: Regenerate.
9612 * elf32-sh-nbsd.c: New file.
9613 * targets.c: Update copyright years.
9614 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
9615 bfd_elf32_shnbsd_vec.
9617 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
9619 * coff-rs6000.c (READ20): Use bfd_scan_vma.
9621 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
9623 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
9624 of a symbol in a section that will be deleted.
9626 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
9628 * po/es.po: New file: Spanish translation.
9629 * configure.in (ALL_LINGUAS): Add es.
9630 * configure: Regenerate.
9632 2002-01-06 Steve Ellcey <sje@cup.hp.com>
9634 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
9635 argument so we can handle HP-UX specially.
9636 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
9637 (elfNN_hpux_backend_section_from_bfd_section): New for support
9638 of SHN_IA_64_ANSI_COMMON.
9639 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
9640 (is_unwind_section_name): Add special HP-UX support.
9641 (elfNN_ia64_section_from_shdr): Add support for more sections.
9642 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
9643 add support for more sections.
9644 (elfNN_ia64_additional_program_headers): Modify
9645 is_unwind_section_name call.
9646 (elfNN_ia64_modify_segment_map): Remove assumption that there is
9647 only one unwind section in segment.
9649 2002-01-06 Alan Modra <amodra@bigpond.net.au>
9651 * syms.c (_bfd_generic_make_empty_symbol): New function.
9652 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
9653 _bfd_generic_make_empty_symbol.
9654 * libbfd.h: Regenerate.
9655 * bfd-in2.h: Regenerate.
9656 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
9657 (hppabsd_core_get_symtab_upper_bound): Don't define.
9658 (hppabsd_core_get_symtab): Likewise.
9659 (hppabsd_core_print_symbol): Likewise.
9660 (hppabsd_core_get_symbol_info): Likewise.
9661 (hppabsd_core_bfd_is_local_label_name): Likewise.
9662 (hppabsd_core_get_lineno): Likewise.
9663 (hppabsd_core_find_nearest_line): Likewise.
9664 (hppabsd_core_bfd_make_debug_symbol): Likewise.
9665 (hppabsd_core_read_minisymbols): Likewise.
9666 (hppabsd_core_minisymbol_to_symbol): Likewise.
9667 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
9669 * hpux-core.c: Similarly.
9670 * irix-core.c: Similarly.
9671 * osf-core.c: Similarly.
9672 * sco5-core.c: Similarly.
9673 * binary.c (binary_make_empty_symbol): Remove function, define as
9674 _bfd_generic_make_empty_symbol.
9675 * ihex.c (ihex_make_empty_symbol): Likewise.
9676 * mmo.c (mmo_make_empty_symbol): Likewise.
9677 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
9678 * srec.c (srec_make_empty_symbol): Likewise.
9679 * versados.c (versados_make_empty_symbol): Likewise.
9680 * vms.c (_bfd_vms_make_empty_symbol): Remove.
9681 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
9682 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
9683 rather than _bfd_vms_make_empty_symbol.
9684 * vms-misc.c (new_symbol): Likewise.
9686 2002-01-05 Alan Modra <amodra@bigpond.net.au>
9688 * section.c (bfd_section_init): Remove unnecessary initialisations.
9689 (bfd_section_list_clear): New function.
9690 (bfd_section_list_remove, bfd_section_list_insert): New macros.
9691 (_bfd_strip_section_from_output): Use them.
9692 * coffcode.h (coff_set_alignment_hook): Likewise.
9693 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
9694 * elf64-mips.c (mips_elf64_final_link): Likewise.
9695 * elf64-mmix.c (mmix_elf_final_link): Likewise.
9696 * sunos.c (sunos_add_dynamic_symbols): Likewise.
9697 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
9698 * bfd-in2.h: Regenerate.
9700 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
9701 rather than doing our own section handling. Clean up after errors
9702 with bfd_release and bfd_section_list_clear. Handle unexpected
9704 * aoutf1.h (sunos4_core_file_p): Likewise.
9705 * aix386-core.c (aix386_core_file_p): Likewise.
9706 * cisco-core.c (cisco_core_file_validate): Likewise.
9707 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
9708 * trad-core.c (trad_unix_core_file_p): Likewise.
9710 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
9711 with bfd_release and bfd_section_list_clear.
9712 * hpux-core.c (hpux_core_core_file_p): Likewise.
9713 * irix-core.c (irix_core_core_file_p): Likewise.
9714 * lynx-core.c (lynx_core_file_p): Likewise.
9715 * osf-core.c (osf_core_core_file_p): Likewise.
9716 * rs6000-core.c (rs6000coff_core_p): Likewise.
9717 * sco5-core.c (sco5_core_file_p): Likewise.
9719 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
9720 sign extension adjustments without conditionals.
9722 2002-01-04 Jakub Jelinek <jakub@redhat.com>
9724 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
9725 CIE at .eh_frame start is removed due to no FDEs referencing it.
9727 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
9729 * config.bfd (x86_64-*-netbsd*): New target.
9730 * configure.in (x86_64-*-netbsd*): Set COREFILE
9732 * configure: Regenerated.
9734 2002-01-03 Tom Rix <trix@redhat.com>
9736 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
9737 for recent bfd_make_section_anyway change.
9739 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
9741 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
9742 R_ARM_THM_PC11 reloc.
9744 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
9746 * configure.in (LINGUAS): Add ja.
9747 * configure: Regenerate.
9748 * po/ja.po: Import from translation project's web site.
9750 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
9752 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
9753 messages to ease translation into other languages.
9755 For older changes see ChangeLog-0001
9761 version-control: never