1 2003-09-10 H.J. Lu <hongjiu.lu@intel.com>
3 * elfxx-ia64.c (elfNN_ia64_special_sections): Mark all sections
4 started with ".sbss" or "".sdata" as SHF_IA_64_SHORT.
6 2003-09-10 John David Anglin <dave.anglin@nrc-cnrc.nrc.ca>
7 Randolph Chung <randolph@tausq.org>
9 * elf32-hppa.c (struct elf32_hppa_link_hash_entry,
10 hppa_link_hash_newfunc, hppa_build_one_stub,
11 elf32_hppa_adjust_dynamic_symbol, mark_PIC_calls, allocate_plt_static,
12 allocate_dynrelocs, elf32_hppa_size_dynamic_sections,
13 elf32_hppa_finish_dynamic_symbol): Remove pic_call field and all code
14 for generating import stubs for calls to statically linked PIC
16 (hppa_type_of_stub): Don't generate an import stub for calls to
17 statically linked pic functions. Generate import stubs for calls
18 in a shared object, to functions not in a regular file, and to
19 defined weak functions. Add new argument INFO.
20 (hppa_build_one_stub): Don't undef ADDIL_DP.
21 (elf32_hppa_check_relocs): Don't set SEC_HAS_GOT_REF flag.
22 (elf32_hppa_size_stubs): Pass info to hppa_type_of_stub.
23 (final_link_relocate): Change all DLTIND relocs to DPREL relocs in a
24 non-shared link. Convert instructions that use the the linkage table
25 pointer, or a facsimile thereof, to use the global data pointer when
26 the reloc has been changed.
28 2003-09-08 Joel Brobecker <brobecker@gnat.com>
30 * archures.c: Add new machine names for hppa.
31 * bfd-in2.h: Regenerate.
32 * cpu-hppa.c: Use the new machine names.
34 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
36 * elf32-m68hc1x.h (struct m68hc11_elf_link_hash_table): Remove
37 all_local_syms member.
38 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Use bfd_elf_get_elf_syms
39 to get the local symbols.
41 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
43 * elf32-m68hc12.c (elf32_m68hc12_special_sections): New for hc11.
44 (elf_backend_special_sections): Define.a
47 * elf32-m68hc11.c (elf32_m68hc11_special_sections): The .vectors
50 2003-09-04 Nick Clifton <nickc@redhat.com>
52 * archures.c (bfd_mach_v850e1): Define.
53 * bfd-in2.h: Regenerate.
54 * cpu-v850.h (scan): Accept bfd_mach_v850e1.
55 (arch_info_struct): Include an entry for bfd_mach_v850e1.
56 * elf32-v850.c (v850_elf_object_p): Accept E_V850E1_ARCH flag.
57 (v850_elf_final_write_processing): Accept bfd_mach_v850e1.
58 (v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
59 (v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
60 linked with v850e binaries. Mark the output as v850e.
62 2003-09-03 Nick Clifton <nickc@redhat.com>
64 * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
65 symbols that are used in relocs.
67 2003-08-30 Robert Millan <robertmh@gnu.org>
69 * configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
70 * config.bfd: Likewise.
71 * configure: Regenerate.
73 2003-08-31 Christian Groessler <chris@groessler.org>
75 * elf32-i860.c (i860_howto_pc26_reloc): Finish relocation here
76 instead of returning bfd_reloc_continue.
78 2003-08-31 Andreas Jaeger <aj@suse.de>
80 * merge.c: Update to ISO C90.
82 2003-08-27 Ian Lance Taylor <ian@airs.com>
84 * configure.in: Check for strtoull.
85 * bfd.c (bfd_scan_vma): Use strtoull when available.
86 * configure, config.in: Regenerate.
88 * configure.in: Define and substitute BFD_HOST_LONG_LONG.
89 * bfd-in.h: Define BFD_HOST_LONG_LONG. Test it rather than
90 __GNUC__ when deciding whether to use long long for
92 * configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate.
94 2003-08-27 Christian Groessler <chris@groessler.org>
96 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
97 i860_howto_splitn_reloc, i860_howto_highadj_reloc): New
99 (elf32_i860_howto_table): Insert the new functions as
100 'special_function's in the proper reloc type entries.
102 2003-08-27 Richard Sandiford <rsandifo@redhat.com>
104 * elf32-frv.c (elf32_frv_relocate_section): Use
105 _bfd_elf_rela_local_sym.
107 2003-08-26 Michael Snyder <msnyder@redhat.com>
109 * cpu-frv.c: Remove unused enum.
111 2003-08-25 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
113 * reloc.c: Fix documentation for MIPS ELF relocations.
114 libbfd.h: Regenerate.
115 bfd-in2.h: Regenerate.
117 2003-08-24 Jason Eckhardt <jle@rice.edu>
119 * coff-i860.c (CALC_ADDEND): Define to be a no-op.
121 2003-08-24 Jason Eckhardt <jle@rice.edu>
123 * elf32-i860.c (elf32_i860_relocate_pc16): Subtract 4 and
124 shift by 2 before storing the relocated value.
126 2003-08-23 Jason Eckhardt <jle@rice.edu>
128 * coff-i860.c (coff_i860_reloc_nyi): New function.
129 (howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
130 LOWn, SPLITn, and BRADDR.
131 (RTYPE2HOWTO): Check that the r_type is within the howto_table
132 before trying to access the entry.
133 (coff_i860_rtype_to_howto): Likewise.
134 (coff_i860_reloc_type_lookup): New function.
135 (i860_reloc_processing): New function.
136 (coff_bfd_reloc_type_lookup): Define macro.
137 (RELOC_PROCESSING): Define macro.
138 Minor formatting adjustments.
140 2003-08-23 Alan Modra <amodra@bigpond.net.au>
142 * elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner.
144 2003-08-22 H.J. Lu <hongjiu.lu@intel.com>
146 * elfxx-ia64.c (elfNN_ia64_create_dynamic_sections): Align the
147 .got section at 8 bytes.
149 2003-08-21 Nick Clifton <nickc@redhat.com>
151 * cofflink.c: Update to ISO C90 and tidy up formatting.
153 2003-08-21 Randolph Chung <tausq@debian.org>
155 * elf32-hppa.c (elf32_hppa_object_p): For elf32-hppa-linux, objects
156 can have OSABI=Linux or OSABI=SysV. Check for both.
157 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
159 2003-08-21 Nick Clifton <nickc@redhat.com>
161 * po/sv.po: Updated Swedish translation.
163 2003-08-20 Richard Sandiford <rsandifo@redhat.com>
165 * elf64-mips.c (elf_backend_copy_indirect_symbol): Define.
167 2003-08-20 Nick Clifton <nickc@redhat.com>
169 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): New macro used to
170 replace some duplicated code in most elfxx-xxxx.c files. This
171 version uses the new fields in bfd_link_info.
173 * elf-m10300.c (mn10300_elf_relocate_section): Use new macro.
174 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
175 * elf32-cris.c (cris_elf_relocate_section): Likewise.
176 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
177 * elf32-i386.c (elf_i386_relocate_section): Likewise.
178 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
179 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
180 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
181 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
182 * elf32-s390.c (elf_s390_relocate_section): Likewise.
183 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
184 * elf32-vax.c (elf_vax_relocate_section): Likewise.
185 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
186 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
187 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
188 * elf64-s390.c (elf_s390_relocate_section): Likewise.
189 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
190 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
191 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
193 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols,
194 elf_hppa_remark_useless_dynamic_symbols,
195 elf_hppa_relocate_section): Use the new fields in
196 bfd_link_info structure.
197 * elf32-sh.c (sh_elf_relocate_section): Likewise.
198 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
199 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
200 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
201 * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
202 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
204 * elflink.h (elf_link_output_extsym): Fix test for reporting
205 undefined symbols in shared libraries. Remove redundant test
206 of shlib_undefined when reporting references to forced local
209 2003-08-18 Andreas Schwab <schwab@suse.de>
211 * libpei.h (bfd_pe_executable_p): Also recognize efi-app
214 2003-08-17 Hans-Peter Nilsson <hp@bitrange.com>
216 * simple.c (bfd_simple_get_relocated_section_contents): Move
217 reloc_done hack to before first bfd_section_size call. Change all
218 returns to use new wrapper macro RETURN, restoring sec->reloc_done.
220 2003-08-16 Alan Modra <amodra@bigpond.net.au>
222 * elf64-ppc.c: Don't include elf/ppc.h.
224 2003-08-14 Richard Sandiford <rsandifo@redhat.com>
226 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
227 code to work with 64-bit bfds.
229 2003-08-14 Alan Modra <amodra@bigpond.net.au>
231 * dep-in.sed: Remove libintl.h.
232 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Unset LC_COLLATE.
233 (POTFILES.in): Remove target.
234 * Makefile.in: Regenerate.
236 2003-08-12 Alan Modra <amodra@bigpond.net.au>
238 * elf64-ppc.c (ppc64_elf_next_input_section): Update comment.
239 (ppc64_elf_relocate_section): For zero sym R_PPC64_TOC relocs,
240 use the function sym from the previous reloc.
242 2003-08-11 Jakub Jelinek <jakub@redhat.com>
244 * elf32-i386.c (elf_i386_relocate_section): Make undefined symbols
246 * elf32-s390.c (elf_s390_relocate_section): Likewise.
247 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
248 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
249 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
250 * elf64-s390.c (elf_s390_relocate_section): Likewise.
251 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
252 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
253 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
254 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
255 (ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
256 on undefined symbols if -pie.
257 * elf32-sh.c (sh_elf_relocate_section): Likewise.
259 2003-08-11 Alan Modra <amodra@bigpond.net.au>
261 * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
262 branch to __libc_start_main.
264 2003-08-08 Dmitry Diky <diwil@mail.ru>
266 * archures.c: Add xW42 and xE42 parts. Sort MPU list according to
268 * cpu-msp430.c: Likewise.
269 * elf32-msp430.c: Likewise.
270 * bfd-in2.h: Regenerate.
272 2003-08-07 Alan Modra <amodra@bigpond.net.au>
274 * elfxx-target.h: Remove PTR cast.
275 * targets.c (bfd_target): Make backend_data const void *.
276 * elf-bfd.h: Constify all occurrences of struct elf_backend_data.
277 * elf-m10300.c: Likewise.
279 * elf32-hppa.c: Likewise.
280 * elf32-i386.c: Likewise.
281 * elf32-m68hc1x.c: Likewise.
282 * elf32-ppc.c: Likewise.
283 * elf32-s390.c: Likewise.
284 * elf32-sh.c: Likewise.
285 * elf32-sh64.c: Likewise.
286 * elf32-sparc.c: Likewise.
287 * elf32-xtensa.c: Likewise.
288 * elf64-mips.c: Likewise.
289 * elf64-ppc.c: Likewise.
290 * elf64-s390.c: Likewise.
291 * elf64-sh64.c: Likewise.
292 * elf64-sparc.c: Likewise.
293 * elf64-x86-64.c: Likewise.
294 * elfcode.h: Likewise.
295 * elfcore.h: Likewise.
296 * elflink.c: Likewise.
297 * elflink.h: Likewise.
298 * elfxx-ia64.c: Likewise.
299 * elfxx-mips.c: Likewise.
300 * elfxx-mips.h: Likewise.
301 * elf.c (prep_headers): Remove useless check for null backend_data.
302 * bfd-in2.h: Regenerate.
304 * elf-bfd.h: Remove PARAMS macro. Replace PTR with void *.
305 (NAME): Use ## rather than CONCAT4 macro.
306 * elfcode.h: Remove one remaining PARAMS macro.
307 * elf-eh-frame.c: Convert to C90, remove unneeded casts and prototypes.
308 * elf-strtab.c: Likewise.
309 * elf-hppa.h: Likewise.
310 * elf32-hppa.h: Likewise.
311 * elf32-hppa.c: Likewise.
312 (elf32_hppa_add_symbol_hook): Delete.
313 (elf_backend_add_symbol_hook): Don't define.
314 * libhppa.h: Convert to C90. Replace INLINE with inline.
316 2003-08-06 Alan Modra <amodra@bigpond.net.au>
318 * elf64-ppc.c (ppc_stub_name): Tweak names for better readability.
319 (ppc64_elf_adjust_dynamic_symbol): Allow copy relocs against
320 function descriptors, but warn.
321 (ppc_build_one_stub): Remove a couple of vars. Move code creating
322 stub syms so that we can avoid a stub sym if we already have a
323 plt sym. Do not redefine an existing symbol.
324 (ppc64_elf_build_stubs): When --emit-stub-syms, print a symbol for
327 2003-08-06 Nick Clifton <nickc@redhat.com>
329 * po/fr.po: Updated French translation.
331 2003-08-06 Alan Modra <amodra@bigpond.net.au>
333 * elflink.c (_bfd_elf_create_dynamic_sections): Mark .dynbss with
336 2003-08-05 Daniel Jacobowitz <drow@mvista.com>
338 * elf32-arm.h (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
339 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Use it.
341 2003-08-03 Jeff Muizelaar <muizelaar@rogers.com>
343 * coffcode.h (coff_slurp_line_table): Return with a warning
344 message if the line number table could not be read.
346 2003-08-04 Nick Clifton <nickc@redhat.com>
348 * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
349 to messages produced for .gnu.warning.SYMBOL sections.
351 2003-08-04 Alan Modra <amodra@bigpond.net.au>
353 * elfcode.h: Convert to C90, remove unneeded casts and prototypes.
354 * elfcore.h: Likewise.
355 * elflink.c: Likewise.
356 * elflink.h: Likewise.
357 * elf.c (sym_is_global): Remove INLINE.
358 (align_file_position): Replace INLINE with inline.
359 * elfcode.h (elf_swap_dyn_in, elf_swap_dyn_out): Remove INLINE.
360 (elf_file_p): Replace INLINE with inline.
362 2003-08-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
364 * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
366 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
368 * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
370 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
372 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
373 ElfNN_External_Rela instead of Elf64_External_Rela.
375 2003-08-01 Nick Clifton <nickc@redhat.com>
377 * config.bfd: Add code to catch obsolete configurations and warn
378 about them unless --enable-obsolete is used. Use this to mark
379 vax-vms port as obsolete.
381 2003-07-30 Alan Modra <amodra@bigpond.net.au>
383 * elf32-ppc.c (ppc_elf_install_value): Tidy.
384 (ppc_elf_relax_section): Remove dead code. Remove unnecessary casts.
386 * elfxx-target.h: Remove PARAMS macro. Formatting.
388 2003-07-30 Alan Modra <amodra@bigpond.net.au>
390 * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
391 * elf64-ppc.c (get_fdh): New function, split out from
393 (ppc64_elf_check_relocs): Use get_fdh.
394 (func_desc_adjust): Likewise. Tidy.
395 (ppc64_elf_edit_opd): Tighten reloc checks. Free local_syms on error
396 exit. Use get_fdh. Account for superfluous dynamic relocs.
397 (ppc64_elf_relocate_section): Warning fix.
399 2003-07-30 Jason Eckhardt <jle@rice.edu>
401 * coff-i860.c: Convert to ISO C90. Remove superflous prototypes.
403 2003-07-30 Jason Eckhardt <jle@rice.edu>
405 * elf32-i860.c: Convert to ISO C90. Remove superflous prototypes.
407 2003-07-30 Randolph Chung <tausq@debian.org>
409 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
410 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
412 2003-07-30 Alan Modra <amodra@bigpond.net.au>
414 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
415 Replace PTR with void *. Formatting.
416 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
417 (make_mapping): Likewise.
419 2003-07-29 Alan Modra <amodra@bigpond.net.au>
421 * elf64-ppc.c (func_desc_adjust): Give linker created function
422 descriptor symbols a size and type.
423 (ppc64_elf_relocate_section): Correct lq insn test.
425 2003-07-28 Eric Christopher <echristo@redhat.com>
427 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
428 (ppc_elf_install_value): New function.
429 (ppc_elf_sort_rela): Remove.
430 (ppc_elf_relax_section): Rewrite. Remove old relaxation
431 and replace with out of range branch stubs.
432 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
434 2003-07-29 Alexandre Oliva <aoliva@redhat.com>
436 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
439 2003-07-28 Alan Modra <amodra@bigpond.net.au>
441 * elf.c (special_sections): Set attributes for .got and .plt.
443 2003-07-27 Alan Modra <amodra@bigpond.net.au>
445 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
446 on function descriptors.
447 (ELIMINATE_COPY_RELOCS): Expand comment.
448 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
451 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
453 * elf.c (_bfd_elf_new_section_hook): Set the default section
455 (elf_fake_sections): Set the section type based on asect->flags
456 if it is SHT_NULL. Don't abort on processor specific section
459 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
461 * bfd-in2.h: Regenerated.
463 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
465 * elf-bfd.h (bfd_elf_special_section): New.
466 (elf_backend_data): Add special_sections, a pointer to
467 bfd_elf_special_section.
468 (elf_section_type). New.
469 (elf_section_flags): New.
470 (_bfd_elf_get_sec_type_attr): New.
472 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
473 real section type/flags.
474 (special_sections): New.
475 (get_special_section): New.
476 (_bfd_elf_get_sec_type_attr): New.
477 (_bfd_elf_new_section_hook): Check special_section to set
478 elf_section_type and elf_section_flags.
479 (elf_fake_sections): Don't use section name to set ELF section
482 * elf32-m32r.c (m32r_elf_special_sections): New.
483 (elf_backend_special_sections): Defined.
485 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
486 (elf_backend_special_sections): Defined.
488 * elf32-mcore.c (mcore_elf_special_sections): New.
489 (elf_backend_special_sections): Defined.
491 * elf32-ppc.c (ppc_elf_special_sections): New.
492 (elf_backend_special_sections): Defined.
494 * elf32-sh64.c (sh64_elf_special_sections): New.
495 (elf_backend_special_sections): Defined.
497 * elf32-v850.c (v850_elf_special_sections): New.
498 (elf_backend_special_sections): Defined.
500 * elf32-xtensa.c (elf_xtensa_special_sections): New.
501 (elf_backend_special_sections): Defined.
503 * elf64-alpha.c (elf64_alpha_special_sections): New.
504 (elf_backend_special_sections): Defined.
506 * elf64-hppa.c (elf64_hppa_special_sections): New.
507 (elf_backend_special_sections): Defined.
509 * elf64-ppc.c (ppc64_elf_special_sections): New.
510 (elf_backend_special_sections): Defined.
512 * elf64-sh64.c (sh64_elf64_special_sections): New.
513 (elf_backend_special_sections): Defined.
515 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
516 (elf_backend_special_sections): Defined.
518 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
520 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
521 (elf_backend_special_sections): Defined.
523 * elfxx-target.h (elf_backend_special_sections): New. Default
525 (elfNN_bed): Initialize special_sections.
527 * section.c (bfd_abs_section): Remove const.
528 (bfd_und_section): Likewise.
529 (bfd_com_section): Likewise.
530 (bfd_ind_section): Likewise.
532 2003-07-24 Nick Clifton <nickc@redhat.com>
534 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
535 sections are assigned the LOAD attribute.
537 2003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
539 * elf32-sh.c: Convert to C90. Replace PTR with void *.
540 * elf32-sh64-com.c: Likewise.
541 * elf32-sh64.c: Likewise.
542 * elf32-sh64.h: Likewise.
543 * elf64-sh64.c: Likewise.
545 2003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
547 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
548 (allocate_dynrelocs): Likewise.
549 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
550 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
552 2003-07-24 Nick Clifton <nickc@redhat.com>
554 * po/fr.po: Updated French translation.
556 2003-07-23 Bob Wilson <bob.wilson@acm.org>
558 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
559 near the beginning of the file. Swap order of arguments. Call
560 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
561 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
562 (elf_xtensa_relocate_section): Likewise.
563 (shrink_dynamic_reloc_sections): Likewise.
565 2003-07-23 Bob Wilson <bob.wilson@acm.org>
567 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
568 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
569 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
570 first printing an error message.
571 (elf_xtensa_finish_dynamic_sections): Likewise.
572 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
573 discarding literal table entries.
574 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
575 (elf_xtensa_do_asm_simplify): Likewise.
577 2003-07-23 Stephane Carrez <stcarrez@nerim.fr>
579 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
580 we have a local symbol in common section.
582 2003-07-22 H.J. Lu <hongjiu.lu@intel.com>
584 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
587 2003-07-22 Nick Clifton <nickc@redhat.com>
589 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
590 expected RS6000 storage classes.
592 2003-07-21 H.J. Lu <hongjiu.lu@intel.com>
594 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
595 output_bfd unused to silence gcc.
597 2003-07-21 Nick Clifton <nickc@redhat.com>
599 * po/sv.po: Updated Swedish translation.
601 2003-07-21 Alan Modra <amodra@bigpond.net.au>
603 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
604 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
605 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
606 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
607 now done in _bfd_elf_symbol_refs_local_p.
608 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
609 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
610 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
612 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
614 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
616 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
618 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
619 (SYMBOL_CALLS_LOCAL): Likewise.
621 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
622 immediately if symbol isn't defined locally.
624 2003-07-18 Richard Henderson <rth@redhat.com>
626 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
627 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
628 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
629 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
630 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
631 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
632 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
633 Update all callers to provide the relocation being resolved.
635 2003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
637 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
640 2003-07-17 Nick Clifton <nickc@redhat.com>
642 * po/es.po: New Spanish translation.
643 * po/sv.po: New Swedish translation.
644 * po/opcodes.pot: Regenerate.
646 2003-07-16 Richard Henderson <rth@redhat.com>
648 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
649 * elfxx-ia64.c, targets.c: Likewise.
651 2003-07-16 Richard Henderson <rth@redhat.com>
653 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
654 for symbols defined locally plus -Bsymbolic. Tidy logic.
656 2003-07-15 Richard Sandiford <rsandifo@redhat.com>
658 * archures.c (bfd_mach_mips7000): New.
659 * bfd-in2.h: Regenerated.
660 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
661 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
662 (mips_mach_extensions): Add an entry for it.
664 2003-07-14 Nick Clifton <nickc@redhat.com>
666 * po/tr.po: Update with latest version.
667 * po/SRC-POTFILES.in: Regenerate.
668 * po/bfd.pot: Regenerate.
669 * Makfile.in: Regenerate.
670 * configure: Regenerate.
672 2003-07-12 Jeff Baker <jbaker@qnx.com>
674 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
675 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
676 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
677 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
679 2003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
681 * coffcode.h (coff_set_section_contents): Set the
682 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
684 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
686 * bfd-in.h (bfd_h8300_pad_address): Declare.
687 * bfd-in2.h: Regenerate.
688 * cpu-h8300.c (bfd_h8300_pad_address): New function.
689 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
690 addresses before checking whether they can be relaxed.
691 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
692 Don't complain about overflows in general 8-bit relocations.
693 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
694 Fix handling of R_H8_DIR24A8.
696 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
698 * elf32-h8300.c: Convert function prototypes and definitions
700 * coff-h8300.c: Likewise.
701 * cpu-h8300.c: Likewise.
703 2003-07-11 Alan Modra <amodra@bigpond.net.au>
705 * po/SRC-POTFILES.in: Regenerate.
706 * po/bfd.pot: Likewise.
708 2003-07-10 Bob Wilson <bob.wilson@acm.org>
710 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
711 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
713 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
714 and allocate memory for it.
715 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
716 section to the .got.loc section.
717 (elf_xtensa_finish_dynamic_sections): Fix up call to
718 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
719 the address of .got.loc.
720 (relax_property_section): Shrink .got.loc to match changes in any
721 literal table section.
722 (xtensa_is_property_section): Change to match
723 xtensa_get_property_section_name.
724 (xtensa_is_littable_section): New.
726 2003-07-10 H.J. Lu <hongjiu.lu@intel.com>
728 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
731 2003-07-10 Alan Modra <amodra@bigpond.net.au>
733 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
734 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
736 * Makefile.in: Regenerate.
738 2003-07-10 Alexandre Oliva <aoliva@redhat.com>
740 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
741 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
742 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
743 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
744 * elf32-am33lin.c: Rename global functions.
745 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
746 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
747 * configure.in (bfd_elf32_am33lin_vec): Added.
748 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
749 (elf32-am33lin.lo): List dependencies.
750 * aclocal.m4, configure, Makefile.in: Rebuilt.
751 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
752 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
753 ELF_ARCH was not defined before.
754 (elf_symbol_leading_char): Define if not defined.
755 * elf32-am33lin.c: Override the definitions above.
756 * targets.c (bfd_elf32_am33lin_vec): New.
758 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
760 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
761 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
763 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
764 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
765 ld-linux.so.2 to ld.so.1.
766 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
767 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
768 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
769 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
770 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
771 .rela.* section contents with bfd_zalloc.
772 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
773 * elf-m10300.c: Added declarations for functions missing them.
774 Merge some shared-library changes from the i386 back-end. Use
775 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
776 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
777 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
778 members of elf_link_hash_entry. Adjusted references.
779 (mn10300_elf_final_link_relocate): dynobj was already loaded
780 into a local variable, use it.
781 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
782 * elf-m10300.c: Add missing function prototypes.
783 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
784 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
785 relocation for dynamic relocations.
786 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
787 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
788 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
789 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
790 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
791 (_bfd_mn10300_elf_create_got_section): ... here, so that its
792 adress is already known at the time we compute relaxations.
793 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
794 and PLT32 to narrower relocations.
795 * libbfd.h, bfd-in2.h: Rebuilt.
796 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
797 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
798 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
799 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
800 BFD_RELOC_MN10300_RELATIVE): New relocs.
801 * libbfd.h, bfd-in2.h: Rebuilt.
802 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
803 (struct elf32_mn10300_link_hash_entry): Added DSO-related
805 (elf_mn10300_howto): Defined new relocation types.
806 (mn10300_reloc_map): Map them.
807 (_bfd_mn10300_elf_create_got_section): New fn.
808 (mn10300_elf_check_relocs): Handle PIC relocs.
809 (mn10300_elf_final_link_relocate): Likewise.
810 (mn10300_elf_relocate_section): Handle DSOs.
811 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
812 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
813 elf_mn10300_pic_plt_entry): New.
814 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
815 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
816 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
817 elf_mn10300_plt_reloc_offset: New macros.
818 (ELF_DYNAMIC_INTERPRETER): Likewise.
819 (_bfd_mn10300_elf_create_dynamic_sections): New function.
820 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
821 (_bfd_mn10300_elf_discard_copies): Likewise.
822 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
823 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
824 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
825 (elf_backend_can_gc_sections,
826 elf_backend_create_dynamic_sections,
827 elf_backend_adjust_dynamic_sections,
828 elf_backend_size_dynamic_sections,
829 elf_backend_finish_dynamic_symbol,
830 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
831 elf_backend_plt_readonly, elf_backend_want_plt_sym,
832 elf_backend_got_header_size, elf_backend_plt_header_size): New
835 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
837 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
838 * elf-m10300.c (compute_function_info): Account for AM33
839 registers in `movm' when computing stack space for `call' when
840 linking for AM33/2.0 link.
841 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
842 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
843 * bfd-in2.h: Rebuilt.
844 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
845 * elf-m10300.c: Updated.
846 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
847 * archures.c (bfd_mach_am332): Defined.
848 * bfd-in2.h: Rebuilt.
849 * cpu-m10300.c (bfd_am332_arch): Defined.
850 (bfd_am33_arch): Chained with am33-2.
851 * elf-m10300.c (elf_mn10300_mach): Handle am332.
852 (_bfd_mn10300_elf_final_write_processing): Likewise.
854 2003-07-09 H.J. Lu <hongjiu.lu@intel.com>
856 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
858 2003-07-10 Alan Modra <amodra@bigpond.net.au>
860 * elf64-ppc.c (bfd_elf64_mkobject): Define.
861 (struct ppc64_elf_obj_tdata): New.
862 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
863 (ppc64_elf_mkobject): New function.
864 (struct got_entry): Add "owner". Move "tls_type".
865 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
866 (ppc64_elf_init_stub_bfd): New function.
867 (create_got_section): Create header .got in dynobj. Create .got
868 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
869 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
870 Look for dynobj .got, and test it.
871 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
872 (update_local_sym_info): Likewise.
873 (ppc64_elf_check_relocs): Likewise.
874 (ppc64_elf_gc_sweep_hook): Likewise.
875 (ppc64_elf_tls_optimize): Likewise.
876 (allocate_dynrelocs): Likewise.
877 (ppc64_elf_size_dynamic_sections): Likewise.
878 (ppc64_elf_relocate_section): Likewise.
879 (ppc64_elf_next_toc_section): Update comment.
880 (toc_adjusting_stub_needed): Remove unneeded cast.
881 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
882 testing section flags.
883 (ppc64_elf_build_stubs): Likewise.
884 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
885 (ppc64_elf_finish_dynamic_sections): Write out got sections.
886 (func_desc_adjust): Copy over dynamic info for undef weaks.
887 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
888 (ppc64_elf_size_stubs): Update prototype.
889 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
890 input sections rather than scanning dynobj.
892 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
894 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
895 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
896 (mips_elf_create_msym_section): Delete.
897 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
898 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
899 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
900 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
901 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
902 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
903 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
905 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
907 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
910 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
912 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
913 of relocations whose offset is -2.
915 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
917 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
918 forced-local symbols like other locals. Don't create relocations
919 against STN_UNDEF in irix objects.
921 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
923 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
924 compatible objects, add the values of defined external symbols
927 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
929 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
930 initialize a GOT entry to the symbol's st_value.
932 2003-07-08 Alan Modra <amodra@bigpond.net.au>
934 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
935 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
936 (ppc_elf_tdata): Define.
937 (elf_local_ptr_offsets): Adjust.
938 (ppc_elf_mkobject): New function.
939 (bfd_elf32_mkobject): Define.
941 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
942 * elfcore.h (elf_core_file_p): Likewise.
943 * section.c (bfd_section_init): Remove prototype.
945 2003-07-08 Alan Modra <amodra@bigpond.net.au>
947 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
949 (enum elf_linker_section_enum): Delete.
950 (struct elf_linker_section): Delete.
951 (struct elf_linker_section_pointers): Delete.
952 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
953 Make linker_section_pointers a void**.
954 (elf_local_ptr_offsets, elf_linker_section): Don't define.
955 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
956 of old item in elf-bfd.h.
957 (struct elf_linker_section): Likewise.
958 (struct elf_linker_section_pointers): Likewise.
959 (elf_local_ptr_offsets): Define.
960 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
961 (ppc_elf_link_hash_newfunc): Init it.
962 (struct ppc_elf_link_hash_table): Add sbss.
963 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
965 (elf_create_linker_section): Fold into..
966 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
967 Make rela section here if shared.
968 (elf_find_pointer_linker_section): Pass lsect rather than enum.
969 (elf_create_pointer_linker_section): Adjust. zalloc rather than
971 (elf_finish_pointer_linker_section): Adjust. Don't make rela
973 (ppc_elf_check_relocs): Adjust.
974 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
975 creating .sbss by hand.
976 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
978 2003-07-04 Jakub Jelinek <jakub@redhat.com>
980 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
981 complain_overflow_bitfield.
982 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
983 complain_overflow_bitfield.
985 2003-07-04 Jakub Jelinek <jakub@redhat.com>
987 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
990 2003-07-04 Jakub Jelinek <jakub@redhat.com>
992 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
993 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
995 (get_fptr): For -pie create .opd as writable section and create
997 (elfNN_ia64_check_relocs): Change info->shared into
999 (allocate_fptr): Likewise.
1000 (allocate_dynrel_entries): Account for a relative reloc for -pie
1001 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
1002 for undefweak symbol. Account for an IPLT reloc in .rela.opd
1004 (set_got_entry): Don't create a relative reloc if -pie
1005 want_ltoff_fptr for undefweak symbol.
1006 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
1007 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
1010 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
1012 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1013 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1014 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1015 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1016 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1017 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1018 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1019 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1020 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1022 2003-07-04 Paul Clarke <paulc@senet.com.au>
1024 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
1025 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
1026 <R_H8_DIR32A16>: Fix type of relocation.
1028 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1030 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
1031 sections were created already. Remove unnecessary tests of
1032 the previous change.
1034 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1036 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
1037 bfd_make_section for existing sections.
1039 2003-07-04 Alan Modra <amodra@bigpond.net.au>
1041 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
1042 create_got_section if we already have done so.
1043 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
1044 (sh_elf_check_relocs): Likewise.
1045 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
1046 htab->root.dynobj instead.
1047 (sh_elf_check_relocs): Likewise.
1048 (sh_elf_finish_dynamic_sections): Likewise.
1050 * section.c (bfd_make_section): Return NULL for existing section.
1052 2003-07-04 Alan Modra <amodra@bigpond.net.au>
1054 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
1055 ppc_elf_create_got if we've already done so.
1057 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
1058 (_bfd_elf_find_pointer_linker_section): Likewise.
1059 (bfd_elf32_create_pointer_linker_section): Likewise.
1060 (bfd_elf32_finish_pointer_linker_section): Likewise.
1061 (bfd_elf64_create_pointer_linker_section): Likewise.
1062 (bfd_elf64_finish_pointer_linker_section): Likewise.
1063 (_bfd_elf_make_linker_section_rela): Likewise.
1064 * elfcode.h (elf_create_pointer_linker_section): Don't define.
1065 (elf_finish_pointer_linker_section): Likewise.
1066 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
1067 (_bfd_elf_create_linker_section): Move this function..
1068 (_bfd_elf_find_pointer_linker_section): ..and this..
1069 * elflink.h (elf_create_pointer_linker_section): ..and this..
1070 (elf_finish_pointer_linker_section): ..and this..
1071 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
1073 (elf_create_linker_section): Convert to C90, tidy.
1074 (elf_find_pointer_linker_section): Likewise.
1075 (elf_create_pointer_linker_section): Likewise.
1076 (elf_finish_pointer_linker_section): Likewise.
1077 * elf32-i370.c: Delete #if 0 code.
1079 2003-07-02 Alan Modra <amodra@bigpond.net.au>
1081 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
1082 _restf* to be satisfied by shared libs, and always force them local.
1083 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
1084 Correct test for "bl".
1085 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
1088 2003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
1090 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
1091 (s390_tls_reloc): New function.
1092 (elf_howto_table): Add long displacement relocations R_390_20,
1093 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
1094 (elf_s390_reloc_type_lookup): Likewise.
1095 (elf_s390_check_relocs): Likewise.
1096 (elf_s390_gc_sweep_hook): Likewise.
1097 (elf_s390_relocate_section): Likewise.
1098 * elf64-s390.c: Same changes as for elf32-s390.c.
1099 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
1100 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
1101 BFD_RELOC_390_TLS_GOTIE20.
1102 * bfd-in2.h: Regenerate.
1103 * libbfd.h: Likewise.
1105 2003-06-30 Alan Modra <amodra@bigpond.net.au>
1107 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
1108 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
1110 2003-06-29 Alan Modra <amodra@bigpond.net.au>
1112 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
1113 Replace PTR with void *. Formatting.
1114 * archive64.c: Likewise.
1115 * archures.c: Likewise.
1116 * bfd-in.h: Likewise.
1118 * bfdio.c: Likewise.
1119 * bfdwin.c: Likewise.
1120 * cache.c: Likewise.
1121 * corefile.c: Likewise.
1122 * format.c: Likewise.
1124 * libbfd-in.h: Likewise.
1125 * libbfd.c: Likewise.
1126 * linker.c: Likewise.
1127 * opncls.c: Likewise.
1128 * reloc.c: Likewise.
1129 * section.c: Likewise.
1130 * simple.c: Likewise.
1132 * targets.c: Likewise.
1133 * bfd-in2.h: Regenerate.
1134 * libbfd.h: Regenerate.
1136 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
1137 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
1138 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
1139 (bfd_getb64): Rewrite without parens.
1140 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
1141 * cache.c (insert, snip): Remove INLINE.
1142 * linker.c (bfd_link_add_undef): Likewise.
1144 2003-06-29 Andreas Jaeger <aj@suse.de>
1146 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
1147 unnecessary prototypes. Replace PTR with void *.
1148 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
1149 trim plt entries. Move undefweak non-default visibility test ...
1150 (allocate_dynrelocs): ... from here.
1151 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
1153 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
1154 SYMBOL_REFERENCES_LOCAL for dynreloc check.
1155 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
1156 dynreloc and .got relocs.
1157 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
1160 2003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1162 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
1164 2003-06-27 Nick Clifton <nickc@redhat.com>
1166 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
1167 bfd_add_gnu_debuglink_section and only create the section, do not
1168 fill in its contents.
1169 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
1170 contents of a .gnu-debuglink section.
1171 * bfd-in2.h: Regenerate.
1173 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1175 * elfxx-mips.c: Revert .got alignment to 2**4.
1177 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1179 * elf32-mips.c: Fix addend for _gp_disp special symbol.
1181 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1183 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
1184 relocation header setup.
1186 2003-06-25 Alan Modra <amodra@bigpond.net.au>
1188 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
1189 (ppc_elf_reloc_type_lookup): Modify comment.
1190 (ppc_elf_info_to_howto): Ditto.
1191 (ppc_elf_relocate_section): Ditto.
1192 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
1194 2003-06-25 Alan Modra <amodra@bigpond.net.au>
1196 * aout-ns32k.c: Correct spelling of "relocatable".
1197 * aoutx.h: Likewise.
1198 * bfd-in.h: Likewise.
1201 * coff-a29k.c: Likewise.
1202 * coff-alpha.c: Likewise.
1203 * coff-arm.c: Likewise.
1204 * coff-i386.c: Likewise.
1205 * coff-i860.c: Likewise.
1206 * coff-i960.c: Likewise.
1207 * coff-m68k.c: Likewise.
1208 * coff-m88k.c: Likewise.
1209 * coff-mcore.c: Likewise.
1210 * coff-mips.c: Likewise.
1211 * coff-or32.c: Likewise.
1212 * coff-ppc.c: Likewise.
1213 * coff-rs6000.c: Likewise.
1214 * coff-sh.c: Likewise.
1215 * coff-tic80.c: Likewise.
1216 * coff64-rs6000.c: Likewise.
1217 * cofflink.c: Likewise.
1218 * cpu-ns32k.c: Likewise.
1219 * ecoff.c: Likewise.
1220 * ecofflink.c: Likewise.
1221 * elf-bfd.h: Likewise.
1222 * elf-eh-frame.c: Likewise.
1223 * elf-hppa.h: Likewise.
1224 * elf-m10200.c: Likewise.
1225 * elf-m10300.c: Likewise.
1227 * elf32-arm.h: Likewise.
1228 * elf32-avr.c: Likewise.
1229 * elf32-cris.c: Likewise.
1230 * elf32-d10v.c: Likewise.
1231 * elf32-dlx.c: Likewise.
1232 * elf32-fr30.c: Likewise.
1233 * elf32-frv.c: Likewise.
1234 * elf32-h8300.c: Likewise.
1235 * elf32-hppa.c: Likewise.
1236 * elf32-i370.c: Likewise.
1237 * elf32-i386.c: Likewise.
1238 * elf32-i860.c: Likewise.
1239 * elf32-i960.c: Likewise.
1240 * elf32-ip2k.c: Likewise.
1241 * elf32-iq2000.c: Likewise.
1242 * elf32-m32r.c: Likewise.
1243 * elf32-m68hc11.c: Likewise.
1244 * elf32-m68hc1x.c: Likewise.
1245 * elf32-m68k.c: Likewise.
1246 * elf32-mcore.c: Likewise.
1247 * elf32-mips.c: Likewise.
1248 * elf32-msp430.c: Likewise.
1249 * elf32-openrisc.c: Likewise.
1250 * elf32-ppc.c: Likewise.
1251 * elf32-s390.c: Likewise.
1252 * elf32-sh.c: Likewise.
1253 * elf32-sh64.c: Likewise.
1254 * elf32-sparc.c: Likewise.
1255 * elf32-v850.c: Likewise.
1256 * elf32-vax.c: Likewise.
1257 * elf32-xstormy16.c: Likewise.
1258 * elf32-xtensa.c: Likewise.
1259 * elf64-alpha.c: Likewise.
1260 * elf64-hppa.c: Likewise.
1261 * elf64-mips.c: Likewise.
1262 * elf64-mmix.c: Likewise.
1263 * elf64-ppc.c: Likewise.
1264 * elf64-s390.c: Likewise.
1265 * elf64-sh64.c: Likewise.
1266 * elf64-sparc.c: Likewise.
1267 * elf64-x86-64.c: Likewise.
1268 * elfcode.h: Likewise.
1269 * elflink.h: Likewise.
1270 * elfn32-mips.c: Likewise.
1271 * elfxx-ia64.c: Likewise.
1272 * elfxx-mips.c: Likewise.
1273 * i386linux.c: Likewise.
1275 * libcoff-in.h: Likewise.
1276 * linker.c: Likewise.
1277 * m68klinux.c: Likewise.
1278 * pdp11.c: Likewise.
1279 * pe-mips.c: Likewise.
1280 * peXXigen.c: Likewise.
1281 * reloc.c: Likewise.
1282 * reloc16.c: Likewise.
1283 * sparclinux.c: Likewise.
1284 * sunos.c: Likewise.
1286 * versados.c: Likewise.
1288 * xcofflink.c: Likewise.
1289 * bfd-in2.h: Regenerate.
1290 * libcoff.h: Regenerate.
1291 * libbfd.h: Regenerate.
1293 2003-06-24 Alan Modra <amodra@bigpond.net.au>
1295 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
1298 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
1299 prototypes and casts. Replace PTR with void *. Formatting.
1300 * elf32-ppc.c: Likewise. Break long strings too.
1301 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
1302 (ppc_elf_unhandled_reloc): Internationalize error message.
1303 * elf32-ppc.h: Remove PARAMS.
1305 2003-06-23 Mark Mitchell <mark@codesourcery.com>
1307 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
1309 (ppc_elf_final_write_processing): Likewise.
1311 2003-06-23 H.J. Lu <hongjiu.lu@intel.com>
1313 * elflink.h (elf_link_input_bfd): Check raw size when using
1314 kept_section to preserve debug information discarded by
1317 2003-06-20 Alan Modra <amodra@bigpond.net.au>
1319 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
1320 (ppc64_elf_setup_section_lists): Set it.
1321 (ppc64_elf_relocate_section): Check sym section id against top_id.
1322 (ppc_build_one_stub): Comment on top_id.
1324 2003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1326 * config.bfd: Add tic4x-*-rtems*.
1328 2003-06-20 Alan Modra <amodra@bigpond.net.au>
1330 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
1331 prototypes and casts. Replace PTR with void *. Format copyright.
1333 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
1334 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
1335 (ppc_type_of_stub): Make r_type an enum.
1336 (ppc64_elf_size_stubs): Likewise.
1337 * elf64-ppc.h: Remove PARAMS macro.
1339 2003-06-19 Alan Modra <amodra@bigpond.net.au>
1341 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
1342 elf hash tab fields.
1344 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
1345 (ppc64_elf_info_to_howto): Likewise.
1346 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
1347 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
1349 2003-06-19 Alan Modra <amodra@bigpond.net.au>
1351 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
1352 reloc overflow on discarded eh_frame entries.
1354 2003-06-19 Alan Modra <amodra@bigpond.net.au>
1356 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
1357 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
1358 Return error condition.
1359 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
1360 that have has_gp_reloc set.
1361 (struct ppc_link_hash_table): Add stub_count.
1362 (ppc_build_one_stub): Increment it.
1363 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
1365 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
1367 2003-06-18 Alan Modra <amodra@bigpond.net.au>
1369 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
1370 size calculation from addend. Round size up.
1372 2003-06-18 Hans-Peter Nilsson <hp@axis.com>
1374 * elf32-cris.c (cris_elf_relocate_section) <case
1375 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
1376 symbol from a normal object or an undefined weak symbol.
1378 2003-06-18 Alan Modra <amodra@bigpond.net.au>
1380 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
1383 2003-06-17 H.J. Lu <hongjiu.lu@intel.com>
1385 * section.c (struct sec): Put back kept_section.
1386 (STD_SECTION): Put back kept_section initialization.
1387 * bfd-in2.h: Regenerate.
1389 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
1390 sections for relocateable output. Use kept_section to preserve
1391 debug information discarded by linkonce.
1393 2003-06-17 Roland McGrath <roland@redhat.com>
1395 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
1396 segment-relative relocation between different segments.
1398 2003-06-17 Alan Modra <amodra@bigpond.net.au>
1400 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
1401 optimizations earlier.
1403 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
1404 Restore previous input_list type.
1405 (ppc64_elf_link_hash_table_create): Undo last change.
1406 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
1407 per output section, but don't bother with bfd_abs_section marker.
1408 (ppc64_elf_next_input_section): Adjust for multiple input section
1410 (group_sections): Likewise.
1412 2003-06-17 Jakub Jelinek <jakub@redhat.com>
1414 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
1415 *r_offset == r_addend for RELATIVE relocs against .got.
1417 2003-06-17 Alan Modra <amodra@bigpond.net.au>
1419 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
1421 2003-06-17 Nick Clifton <nickc@redhat.com>
1423 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
1424 in the vtable_entries_used array to allow for the accessing
1425 the largest element.
1427 2003-06-17 Alan Modra <amodra@bigpond.net.au>
1429 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
1431 (ppc64_elf_link_hash_table_create): Init input_list here.
1432 (ppc64_elf_setup_section_lists): Remove code setting up input lists
1433 per output section. Set toc_off for abs and other standard sections.
1434 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
1435 (ppc64_elf_next_input_section): Adjust for single input section list.
1436 Don't set toc_curr from input bfds that haven't set elf_gp.
1437 (group_sections): Adjust for single input section list.
1439 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
1441 2003-06-16 Alan Modra <amodra@bigpond.net.au>
1443 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
1444 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
1445 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
1446 got section for RELATIVE relocs. Fix wrong comment. Change condition
1447 under which dynamic relocs update the section contents.
1449 2003-06-13 Robert Millan <zeratul2@wanadoo.es>
1451 * config.bfd: Add i386-netbsd-gnu target.
1453 2003-06-12 Nick Clifton <nickc@redhat.com>
1455 * opncls.c (calc_crc32): Rename to
1456 bfd_calc_gnu_debuglink_crc32 and export.
1457 (GNU_DEBUGLINK): Define and use to replace occurrences of
1458 hard-coded ".gnu_debuglink" in the code.
1459 (get_debug_link_info): Prevent aborts by replacing call to
1460 xmalloc with a call to malloc.
1461 (find_separate_debug_file): Prevent aborts by replacing calls
1462 to xmalloc and xstrdup with calls to malloc and strdup.
1463 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
1465 * bfd-in2.h: Regenerate.
1467 2003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
1469 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
1470 New target (was i[3-7]86-*-openbsd* before).
1471 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
1472 (vax-*-openbsd*): New target.
1474 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1476 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
1478 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
1479 (mips_elf_rel_dyn_section): Use appropriate section alignment.
1480 (mips_elf_create_got_section): Likewise.
1481 (_bfd_mips_elf_create_dynamic_sections): Likewise.
1483 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1485 * elf32-mips.c (mips_elf_generic_reloc): New Function.
1486 (elf_mips_howto_table_rel): Use it.
1487 (gprel32_with_gp): Move prototype.
1488 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
1489 Use mips_elf_generic_reloc.
1490 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
1492 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
1494 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
1495 as in the other *_gprel*_reloc functions.
1496 (gprel32_with_gp): Handle partial_inplace properly.
1497 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
1498 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
1499 Do addend handling directly instead of calling
1500 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
1501 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
1502 of zero addend. Handle partial_inplace properly.
1503 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
1505 (mips_elf64_gprel16_reloc): Likewise.
1506 (mips_elf64_literal_reloc): Likewise.
1507 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
1508 logic as in the other *_gprel*_reloc functions. Handle
1509 partial_inplace properly.
1510 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
1511 addend. Handle partial_inplace properly.
1512 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
1513 of calling _bfd_mips_elf_gprel16_with_gp.
1514 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
1515 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
1517 (mips_elf_shift6_reloc): Handle partial_inplace properly.
1518 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
1519 of calling _bfd_mips_elf_gprel16_with_gp.
1520 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
1521 partial_inplace properly. Fix wrong addend handling. Fix overflow
1523 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
1525 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
1526 (_bfd_mips_elf_relocate_section): Likewise.
1527 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
1528 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
1529 (_bfd_mips_elf_sign_extend): New prototype.
1531 2003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
1533 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
1534 New target (was sparc-*-openbsd* before).
1535 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
1537 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
1538 * configure: Regenerate.
1540 2003-06-11 H.J. Lu <hongjiu.lu@intel.com>
1542 * po/Make-in (DESTDIR): New.
1543 (install-data-yes): Support $(DESTDIR).
1544 (uninstall): Likewise.
1546 2003-06-11 Alan Modra <amodra@bigpond.net.au>
1548 * Makefile.am (config.status): Depend on version.h.
1550 * Makefile.in: Regenerate.
1551 * po/SRC-POTFILES.in: Regenerate.
1553 2003-06-10 Alan Modra <amodra@bigpond.net.au>
1554 Gary Hade <garyhade@us.ibm.com>
1556 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
1558 2003-06-10 Richard Sandiford <rsandifo@redhat.com>
1560 * archures.c (bfd_mach_h8300sxn): New architecture.
1561 * bfd-in2.h: Regenerate.
1562 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
1563 (h8300sxn_info_struct): New.
1564 (h8300sx_info_struct): Link to it.
1565 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
1566 (elf32_h8_final_write_processing): Likewise.
1568 2003-06-08 Alan Modra <amodra@bigpond.net.au>
1570 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
1571 elfxx-target.h so that we can use elf_backend_got_header_size.
1572 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
1573 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
1575 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
1577 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
1578 ppc_stub_plt_branch_r2off.
1579 (struct ppc_stub_hash_entry): Reorganize.
1580 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
1581 toc_curr, toc_off and emit_stub_syms.
1582 (ppc64_elf_link_hash_table_create): Init them.
1583 (ppc_stub_name): Correct string size.
1584 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
1585 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
1587 (ppc_type_of_stub): Tweak root.type test.
1588 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
1589 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
1590 ppc_stub_plt_branch_r2off.
1591 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
1592 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
1593 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
1594 Initialize elf_gp and toc_curr.
1595 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
1596 (ppc64_elf_next_input_section): Set toc_off.
1597 (group_sections): Ensure groups have the same TOC.
1598 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
1599 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
1600 Build new glink stub.
1601 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
1602 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
1603 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
1604 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
1605 * section.c (struct sec): Rename flag12 to has_gp_reloc.
1606 (STD_SECTION): Update.
1607 * ecoff.c (bfd_debug_section): Update comment.
1608 * bfd-in2.h: Regenerate.
1610 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
1612 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
1613 NULL function pointers.
1615 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
1617 * simple.c (bfd_simple_get_relocated_section_contents): Call
1618 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
1620 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
1622 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
1623 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
1625 * coff-tic4x.c: Ditto
1626 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
1627 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
1628 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
1629 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
1631 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
1632 * coff-a29k.c: Append COFF_SWAP_TABLE argument
1633 * coff-apollo.c: Ditto
1635 * coff-h8300.c: Ditto
1636 * coff-h8500.c: Ditto
1637 * coff-i960.c: Ditto
1638 * coff-m68k.c: Ditto
1639 * coff-m88k.c: Ditto
1640 * coff-mcore.c: Ditto
1642 * coff-sparc.c: Ditto
1643 * coff-tic80.c: Ditto
1644 * coff-we32k.c: Ditto
1648 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
1650 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
1653 2003-06-03 Jakub Jelinek <jakub@redhat.com>
1655 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
1656 (bfd_section_from_phdr): Likewise.
1657 (map_sections_to_segments): Create PT_GNU_STACK segment header.
1658 (get_program_header_size): Count with PT_GNU_STACK.
1659 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
1660 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
1662 2003-06-03 H.J. Lu <hongjiu.lu@intel.com>
1664 * elflink.h (elf_link_input_bfd): Call linker error_handler
1665 for discarded definitions.
1667 2003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
1669 * syms.c (decode_section_type): Return 'n' if section flags are
1670 SEC_HAS_CONTENTS && SEC_READONLY.
1672 2003-06-03 Nick Clifton <nickc@redhat.com>
1674 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
1675 R_V850_ABS32. Add entry for R_V850_REL32.
1676 (v850_elf_reloc_map): Likewise.
1677 (v850_elf_check_relocs): Likewise.
1678 (v850_elf_perform_relocation): Likewise.
1679 (v850_elf_final_link_relocate): Likewise. Include computation
1680 to make R_V850_REl32 pc-relative.
1682 2003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1684 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
1685 and DT_DEBUG dynamic tag even for position independent executables.
1686 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
1688 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
1690 * config.bfd: Move obsolete entries out of the range of the
1691 targmatch sed script.
1693 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
1695 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
1697 2003-05-31 Jakub Jelinek <jakub@redhat.com>
1699 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
1700 plt entries, not just 8191.
1702 2003-05-30 Daniel Jacobowitz <drow@mvista.com>
1704 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
1705 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
1707 2003-05-30 Ulrich Drepper <drepper@redhat.com>
1708 Jakub Jelinek <jakub@redhat.com>
1710 * elflink.h (elf_link_add_object_symbols): Use !info->executable
1711 instead of info->shared where appropriate.
1712 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
1713 * elflink.c (_bfd_elf_create_got_section): Likewise.
1714 (_bfd_elf_link_create_dynamic_sections): Likewise.
1715 (_bfd_elf_link_assign_sym_version): Likewise.
1716 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
1717 and DT_DEBUG dynamic tag even for position independent executables.
1718 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
1719 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
1720 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
1721 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
1722 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
1723 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
1724 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
1725 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
1726 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
1728 2003-05-30 Kris Warkentin <kewarken@qnx.com>
1730 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
1732 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
1734 2003-05-29 Nick Clifton <nickc@redhat.com>
1736 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
1738 * Makefile.am: Add dependency on safe-ctype.h.
1739 * Makefile.in: Regenerate.
1741 2003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1743 * elfxx-mips.c: Don't force symbols local unconditionally.
1745 2003-05-28 Alan Modra <amodra@bigpond.net.au>
1747 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
1748 undefined_symbol call.
1750 2003-05-27 Richard Sandiford <rsandifo@redhat.com>
1752 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
1753 (mips_elf_link_hash_table): Likewise.
1755 2003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1757 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
1758 R_MIPS_GNU_REL16_S2 support.
1759 (bfd_elf64_bfd_reloc_type_lookup): Use it.
1760 (mips_elf64_rtype_to_howto): Use it.
1761 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
1762 R_MIPS_GNU_REL16_S2 support.
1763 (bfd_elf32_bfd_reloc_type_lookup): Use it.
1764 (mips_elf_n32_rtype_to_howto): Use it.
1766 2003-05-21 Stuart F. Downing <sdowning@fame.com>
1768 * som.h: Define PA_2_0 before including a.out.h
1770 2003-05-07 Eric Christopher <echristo@redhat.com>
1771 Alexandre Oliva <aoliva@redhat.com>
1773 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
1774 pic tests, change to warning.
1775 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
1777 2003-05-21 Marcus Comstedt <marcus@mc.pp.se>
1779 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
1780 well as shle-...-netbsdelf. Remove duplicate entry.
1782 2003-05-21 Nick Clifton <nickc@redhat.com>
1784 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
1785 for X_STORMY16_REL_12 reloc.
1787 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
1788 the type of the hash table in the bfd_link_info structure.
1789 (bfd_elf_get_runpath_list): Likewise.
1791 2003-05-19 Roland McGrath <roland@redhat.com>
1793 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
1794 * bfd-in.h: Declare it.
1795 * bfd-in2.h: Regenerated.
1796 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
1797 * elf-bfd.h (struct elf_backend_data): New function pointer member
1798 elf_backend_bfd_from_remote_memory.
1799 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
1801 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
1802 (elfNN_bed): Add that to the initializer.
1804 2003-05-15 Roland McGrath <roland@redhat.com>
1806 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
1808 2003-05-20 Jakub Jelinek <jakub@redhat.com>
1810 * elflink.h (elf_link_output_extsym): Only issue error about !=
1811 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
1813 2003-05-20 H.J. Lu <hongjiu.lu@intel.com>
1815 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
1816 when removing the old definition for symbols with non-default
1819 2003-05-18 Jason Eckhardt <jle@rice.edu>
1821 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
1823 2003-05-17 Andreas Schwab <schwab@suse.de>
1825 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
1826 elf_section_data during processing of pc-relative and absolute
1828 (elf_m68k_relocate_section): Use the cached reloc section instead
1829 of computing it again. Fix handling of visibility. Don't modify
1830 addend when copying over a relocation into the output.
1832 2003-05-17 Alan Modra <amodra@bigpond.net.au>
1834 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
1835 to trim plt entries. Move undefweak non-default visibility test..
1836 (allocate_dynrelocs): ..from here.
1837 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
1838 dynamic_sections_created here. Update comment. Move undefweak
1839 non-default visibility test..
1840 (allocate_dynrelocs): ..from here. Fix comment.
1841 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
1842 to trim plt entries. Move undefweak non-default visibility test..
1843 (allocate_dynrelocs): ..from here. Fix comment.
1844 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
1845 STV_DEFAULT rather than comparing with zero.
1846 * elflink.c (_bfd_elf_merge_symbol): Likewise.
1847 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
1849 2003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1851 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
1853 (_bfd_set_gp_value): Likewise.
1855 2003-05-16 Michael Snyder <msnyder@redhat.com>
1856 From Bernd Schmidt <bernds@redhat.com>
1857 * archures.c (bfd_mach_h8300sx): New.
1858 * bfd-in2.h: Regenerate.
1859 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
1860 (h8300sx_info_struct): New.
1861 (h8300s_info_struct): Link to it.
1862 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
1863 (elf32_h8_final_write_processing): Likewise.
1864 (elf32_h8_relax_section): Likewise.
1866 2003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
1868 * config.bfd: Accept i[3-7]86 variants.
1869 * configure.host: Likewise.
1870 * configure.in: Likewise.
1871 * configure: Regenerate.
1873 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
1875 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
1878 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
1880 * elflink.h (elf_link_check_versioned_symbol): Also allow
1883 2003-05-15 Alan Modra <amodra@bigpond.net.au>
1884 H.J. Lu <hongjiu.lu@intel.com>
1886 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
1887 (elf_i386_relocate_section): Likewise.
1888 * elf32-ppc.c (allocate_dynrelocs): Likewise.
1889 (ppc_elf_relocate_section): Likewise.
1890 * elf64-ppc.c (allocate_dynrelocs): Likewise.
1891 (ppc64_elf_relocate_section): Likewise.
1893 2003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1895 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
1897 2003-05-13 Stephane Carrez <stcarrez@nerim.fr>
1899 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
1900 processor capability, allow merge of HC12 and HCS12 in some cases.
1901 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
1902 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
1903 (bfd_m68hc12_arch): Link it.
1904 (scan_mach): New function.
1906 2003-05-13 Andrew Haley <aph@redhat.com>
1908 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
1910 2003-05-13 Alan Modra <amodra@bigpond.net.au>
1911 H.J. Lu <hongjiu.lu@intel.com>
1913 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
1914 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
1915 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
1916 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
1917 (ppc_elf_relocate_section): Likewise.
1918 * elf64-ppc.c (allocate_dynrelocs): Likewise.
1919 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
1920 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
1921 relocs need no other types.
1922 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
1924 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
1925 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
1928 2003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1930 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
1931 copy ELF_LINK_NON_GOT_REF from weakdef.
1932 (allocate_dynrelocs): For undef weak syms with non-default
1933 visibility, a) don't allocate plt entries, b) don't allocate
1934 .got relocs, c) discard dyn rel space
1935 (sh_elf_relocate_section): d) don't generate .got relocs, e)
1936 don't generate dynamic relocs.
1937 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
1938 for weakdefs when symbol already adjusted.
1940 2003-05-12 Nick Clifton <nickc@redhat.com>
1942 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
1943 overflow detection for R_XSTORMY16_16 reloc.
1945 2003-05-12 Paul Clarke <paulc@senet.com.au>
1947 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
1949 2003-05-11 Jason Eckhardt <jle@rice.edu>
1951 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
1953 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
1955 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
1958 2003-05-11 Andreas Schwab <schwab@suse.de>
1960 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
1961 complicated tests for unresolvable relocs with a simple direct
1962 scheme using "unresolved_reloc" var. Report some detail on
1963 bfd_reloc_outofrange and similar errors.
1965 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1967 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
1968 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
1969 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
1970 * elf64-s390.c: Likewise.
1972 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1974 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
1975 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
1976 ELF_LINK_NON_GOT_REF from weakdef.
1977 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
1978 already been adjusted before treating it specially.
1979 * el64-s390.c: Likwise.
1981 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1983 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
1984 non-default visibility, a) don't make them dynamic, b) discard
1985 space for dynamic relocs.
1986 (elf_s390_relocate_section): Initialize the GOT entries and skip
1987 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
1988 symbols with non-default visibility.
1989 * elf64-s390.c: Likewise.
1991 2003-05-09 Alan Modra <amodra@bigpond.net.au>
1993 * cpu-arm.c (arm_check_note): Warning fix.
1994 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
1995 to keep relocs if edited.
1996 (iq2000_elf_print_private_bfd_data): Return TRUE.
1997 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
1999 (elfNN_ia64_relax_ldxmov): Warning fix.
2000 * xtensa-isa.c (xtensa_add_isa): Warning fix.
2001 * xtensa-modules.c (get_num_opcodes): Warning fix.
2003 2003-05-09 Andrey Petrov <petrov@netbsd.org>
2005 * elf.c (elf_fake_sections): Use correct cast for sh_name.
2007 2003-05-09 Alan Modra <amodra@bigpond.net.au>
2009 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
2010 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
2011 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
2012 (bfd_elf_record_link_assignment): Move from elflink.h.
2013 (_bfd_elf_merge_symbol): Likewise.
2014 (_bfd_elf_add_default_symbol): Likewise.
2015 (_bfd_elf_export_symbol): Likewise.
2016 (_bfd_elf_link_find_version_dependencies): Likewise.
2017 (_bfd_elf_link_assign_sym_version): Likewise.
2018 (_bfd_elf_link_read_relocs): Likewise.
2019 (_bfd_elf_link_size_reloc_section): Likewise.
2020 (_bfd_elf_fix_symbol_flags): Likewise.
2021 (_bfd_elf_adjust_dynamic_symbol): Likewise.
2022 (_bfd_elf_link_sec_merge_syms): Likewise.
2023 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
2024 and bed->s->sizeof_rela.
2025 (_bfd_elf_link_output_relocs): Likewise.
2026 * elf-bfd.h (struct elf_size_info): Rename file_align to
2028 (struct elf_info_failed): Move from elflink.h.
2029 (struct elf_assign_sym_version_info): Likewise.
2030 (struct elf_find_verdep_info): Likewise.
2031 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
2032 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
2033 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
2034 _bfd_elf_link_assign_sym_version,
2035 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
2036 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
2037 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
2038 _bfd_elf_link_sec_merge_syms): Declare.
2039 (bfd_elf32_link_create_dynamic_sections): Don't declare.
2040 (_bfd_elf32_link_read_relocs): Likewise.
2041 (bfd_elf64_link_create_dynamic_sections): Likewise.
2042 (_bfd_elf64_link_read_relocs): Likewise.
2043 * elflink.h: Move lots o' stuff elsewhere.
2044 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
2045 (bfd_elf64_record_link_assignment): Likewise.
2046 (bfd_elf_record_link_assignment): Declare.
2047 * bfd-in2.h: Regenerate.
2048 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
2049 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
2050 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
2051 (assign_file_positions_for_segments): Likewise.
2052 (assign_file_positions_except_relocs): Likewise.
2053 (swap_out_syms, elfcore_write_note): Likewise.
2054 * elf-m10200.c: Adjust for changed function names.
2055 * elf-m10300.c: Likewise.
2056 * elf32-arm.h: Likewise.
2057 * elf32-h8300.c: Likewise.
2058 * elf32-hppa.c: Likewise.
2059 * elf32-ip2k.c: Likewise.
2060 * elf32-m32r.c: Likewise.
2061 * elf32-m68hc11.c: Likewise.
2062 * elf32-m68hc1x.c: Likewise.
2063 * elf32-m68k.c: Likewise.
2064 * elf32-mips.c: Likewise.
2065 * elf32-ppc.c: Likewise.
2066 * elf32-sh.c: Likewise.
2067 * elf32-v850.c: Likewise.
2068 * elf32-xtensa.c: Likewise.
2069 * elf64-alpha.c: Likewise.
2070 * elf64-hppa.c: Likewise.
2071 * elf64-mmix.c: Likewise.
2072 * elf64-ppc.c: Likewise.
2073 * elf64-sh64.c: Likewise.
2074 * elfxx-ia64.c: Likewise.
2075 * elfxx-mips.c: Likewise.
2076 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
2077 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
2078 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
2079 * elf64-mips.c (mips_elf64_size_info): Likewise.
2080 * elf64-s390.c (s390_elf64_size_info): Likewise.
2081 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
2083 2003-05-08 H.J. Lu <hongjiu.lu@intel.com>
2085 * elflink.h (elf_add_default_symbol): After skipping the
2086 unversioned symbol, go to non-default one.
2088 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
2090 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
2092 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
2093 for symbols with non-default visibility.
2095 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
2097 * elflink.h (elf_link_check_versioned_symbol): Also handle the
2098 case that a DSO references a hidden symbol which may be
2099 satisfied by a versioned symbol in another DSO.
2100 (elf_link_output_extsym): Check versioned definition for hidden
2101 symbol referenced by a DSO.
2103 2003-05-07 Nick Clifton <nickc@redhat.com>
2105 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
2106 R_XSTORMY16_16 reloc to ignore overflows.
2108 2003-05-06 Alexandre Oliva <aoliva@redhat.com>
2110 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
2111 error message for mixing different-endian files. Check for ABI
2112 compatibility of input files with the selected emulation.
2114 2003-05-05 Alan Modra <amodra@bigpond.net.au>
2116 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
2117 non-default visibility, a) don't make them dynamic, b) discard
2118 space for dynamic relocs.
2119 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
2121 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
2122 non-default visibility, a) don't allocate plt entries, b) don't
2123 allocate .got relocs, c) discard dyn rel space,
2124 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
2125 don't generate dynamic relocs.
2126 * elf64-ppc.c (allocate_dynrelocs): As above.
2127 (ppc64_elf_relocate_section): As above.
2129 2003-05-05 Andreas Jaeger <aj@suse.de>
2131 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
2132 relocation entries for weak undefined symbols with non-default
2134 (elf64_x86_64_relocate_section): Initialize the GOT entries and
2135 skip R_386_32/R_386_PC32 for weak undefined symbols with
2136 non-default visibility.
2138 2003-05-04 H.J. Lu <hjl@gnu.org>
2140 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
2141 relocation entries for weak undefined symbols with non-default
2143 (elf_i386_relocate_section): Initialize the GOT entries and
2144 skip R_386_32/R_386_PC32 for weak undefined symbols with
2145 non-default visibility.
2147 * elfxx-ia64.c (allocate_fptr): Don't allocate function
2148 descriptors for weak undefined symbols with non-default
2150 (allocate_dynrel_entries): Don't allocate relocation entries
2151 for symbols resolved to 0.
2152 (set_got_entry): Don't install dynamic relocation for weak
2153 undefined symbols with non-default visibility.
2154 (set_pltoff_entry): Likewise.
2156 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
2157 with non-default visibility.
2158 (elf_link_output_extsym): Don't make weak undefined symbols
2159 with non-default visibility dynamic.
2161 2003-05-04 H.J. Lu <hjl@gnu.org>
2163 * elflink.h (elf_merge_symbol): Correctly handle weak definiton.
2165 2003-05-04 H.J. Lu <hjl@gnu.org>
2167 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
2168 symbol dynamic. Check indirection when removing the old
2169 definition for symbols with non-default visibility.
2170 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
2172 2003-05-02 Nick Clifton <nickc@redhat.com>
2174 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
2175 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
2178 2003-05-02 Andreas Jaeger <aj@suse.de>
2180 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
2181 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
2182 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
2183 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
2184 ELF_LINK_NON_GOT_REF from weakdef.
2186 2003-05-02 Charles Lepple <clepple@ghz.cc>
2187 Nick Clifton <nickc@redhat.com>
2189 * acinclude.m4: Fix name of --enable-install-libbfd switch.
2190 * aclocal.m4: Regenerate.
2191 * configure: Regenerate.
2192 * Makefile.in: Regenerate.
2194 2003-05-01 Alan Modra <amodra@bigpond.net.au>
2196 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
2197 weakdef sym has already been adjusted before treating it specially.
2198 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
2199 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
2200 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
2201 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
2203 2003-04-28 H.J. Lu <hjl@gnu.org>
2205 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
2206 the relax finalize pass.
2208 * section.c (struct sec): Add need_finalize_relax and remove
2210 (STD_SECTION): Update struct sec initializer.
2211 * bfd-in2.h: Regenerated.
2213 2003-04-28 H.J. Lu <hjl@gnu.org>
2215 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
2216 to copy any information related to dynamic linking when we flip
2219 2003-04-27 H.J. Lu <hjl@gnu.org>
2221 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
2222 (ELF_LINK_DYNAMIC_WEAK): New.
2224 * elflink.h (elf_merge_symbol): Add one argument to indicate if
2225 a symbol should be skipped. Ignore definitions in dynamic
2226 objects for symbols with non-default visibility.
2227 (elf_add_default_symbol): Adjusted.
2228 (elf_link_add_object_symbols): Check if a symbol should be
2229 skipped. Don't merge the visibility field with the one from
2231 (elf_link_check_versioned_symbol): Use undef_bfd.
2232 (elf_link_output_extsym): Warn if a forced local symbol is
2233 referenced from dynamic objects. Make non-weak undefined symbol
2234 with non-default visibility a fatal error.
2236 2003-04-27 Daniel Jacobowitz <drow@mvista.com>
2238 * configure.in: Bump version on HEAD to 2.14.90.
2239 * configure: Regenerated.
2241 2003-04-26 Stephane Carrez <stcarrez@nerim.fr>
2244 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
2245 when we couldn't relax something.
2247 2003-04-25 Alan Modra <amodra@bigpond.net.au>
2249 * elflink.h (elf_merge_symbol): When we find a regular definition
2250 for an indirect symbol, flip the indirection so that the old
2251 direct symbol now points to the new definition.
2253 2003-04-24 Roland McGrath <roland@redhat.com>
2255 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
2257 2003-04-24 Alan Modra <amodra@bigpond.net.au>
2259 * elf32-ppc.c: Formatting and comment fixes.
2260 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
2261 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
2263 2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
2265 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
2266 * bfd-in2.h: Rebuilt.
2267 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
2268 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
2270 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
2271 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
2272 (h8300sn_info_struct, h8300hn_info_struct): New.
2273 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
2274 (elf32_h8_final_write_processing): Likewise.
2276 2003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2278 * elf32-sh.c (tpoff): New.
2279 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
2280 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2281 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
2282 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
2283 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
2284 (dtpoff_base): Fix wrong indentation.
2285 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
2286 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
2287 R_SH_TLS_TPOFF32 relocations.
2289 2003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
2291 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
2292 * cpu-sh.c: Likewise.
2293 * elf32-sh.c: Likewise.
2294 * reloc.c (bfd_reloc_code_real): Likewise.
2295 * elf32-sh64-com.c: Change comment to refer to SuperH.
2296 * elf32-sh64.c: Likewise.
2297 * elf64-sh64.c: Likewise.
2298 * bfd-in2.h (enum bfd_architecture): Regenerate.
2300 2003-04-23 Alan Modra <amodra@bigpond.net.au>
2302 From Julien LEMOINE <speedblue@debian.org>
2303 * elf32-i386.c (elf_i386_info_to_howto): Delete.
2304 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
2306 2003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2308 * archures.c: Replace references to Mitsubishi M32R with references
2310 * relocs.c: Likewise.
2311 * bfd-in2.h: Regenerate.
2313 2003-04-21 Richard Henderson <rth@redhat.com>
2315 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
2316 executable when a symbol is defined both regular and dynamic.
2318 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
2320 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
2321 (elf32-m68hc1x.lo): Update dependencies
2322 * configure.in: Add elf32-m68hc1x.lo.
2323 * configure: Rebuild.
2324 * Makefile.in: Rebuild.
2326 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
2328 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
2329 (m68hc11_elf_hash_table_create): New function.
2330 (elf32_m68hc11_link_hash_table_free): New function.
2331 (stub_hash_newfunc): New function.
2332 (m68hc11_add_stub): New function.
2333 (elf32_m68hc11_add_symbol_hook): New function.
2334 (elf32_m68hc11_setup_section_lists): New function.
2335 (elf32_m68hc11_next_input_section): New function.
2336 (elf32_m68hc11_size_stubs): New function.
2337 (elf32_m68hc11_build_stubs): New function.
2338 (m68hc11_get_relocation_value): New function.
2339 (elf32_m68hc11_relocate_section): Call the above to redirect
2340 some relocations to the trampoline code.
2341 (m68hc11_elf_export_one_stub): New function.
2342 (m68hc11_elf_set_symbol): New function.
2343 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
2344 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
2345 is not yet initialized.
2347 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
2348 (elf32_m68hc11_stub_hash_entry): New struct.
2349 (m68hc11_page_info): Add trampoline handler address.
2350 (m68hc11_elf_link_hash_table): Add stubs generation members.
2351 (elf32_m68hc11_add_symbol_hook): Declare.
2352 (elf32_m68hc11_setup_section_lists): Declare.
2353 (elf32_m68hc11_size_stubs): Declare.
2354 (elf32_m68hc11_build_stubs): Declare.
2356 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
2357 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
2358 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
2359 (_bfd_m68hc11_elf_set_private_flags): Ditto.
2360 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
2361 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
2362 (bfd_elf32_bfd_link_hash_table_create): Define.
2363 (elf_backend_add_symbol_hook): Define.
2364 (m68hc11_elf_bfd_link_hash_table_create): New function.
2365 (m68hc11_elf_build_one_stub): New function.
2366 (m68hc11_elf_size_one_stub): New function.
2367 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
2368 (bfd_elf32_bfd_link_hash_table_create): Define.
2370 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
2371 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
2372 (m68hc12_phys_addr): Ditto.
2373 (m68hc12_phys_page): Ditto.
2374 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
2375 (elf32_m68hc11_gc_mark_hook): Likewise.
2376 (elf32_m68hc11_gc_sweep_hook): Likewise.
2377 (elf32_m68hc11_check_relocs): Likewise.
2378 (elf32_m68hc11_relocate_section): Likewise.
2379 (_bfd_m68hc12_elf_set_private_flags): Likewise.
2380 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
2381 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
2382 (m68hc12_elf_build_one_stub): New function.
2383 (m68hc12_elf_size_one_stub): New function.
2384 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
2385 (elf_backend_add_symbol_hook): Define.
2386 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2388 2003-04-18 Nick Clifton <nickc@redhat.com>
2390 * format.c (bfd_check_format_matches): Only check associated
2391 vector if the matching_vector has been created.
2393 2003-04-15 Alexandre Oliva <aoliva@redhat.com>
2395 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
2396 2003-04-09's change.
2398 2003-04-15 Brian Ford <ford@vss.fsi.com>
2400 * peicode.h (coff_swap_scnhdr_in): If a section holds
2401 uninitialized data and is from an object file or from an
2402 executable image that has not initialized the s_size field, or if
2403 the physical size is padded, use the virtual size (stored in
2406 2003-04-15 H.J. Lu <hjl@gnu.org>
2408 * elflink.h (elf_link_add_object_symbols): Properly report
2409 filename for alignment reduction.
2411 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
2413 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
2414 * reloc.c: Likewise.
2415 * coff-h8300.c: Likewise.
2416 * coff-h8500.c: Likewise.
2417 * coff-sh.c: Likewise.
2418 * cpu-h8300.c: Likewise.
2419 * cpu-sh.c: Likewise.
2420 * elf32-h8300.c: Likewise.
2421 * elf32-sh.c: Likewise.
2422 * elf32-sh64-com.c: Likewise.
2423 * elf32-sh64.c: Likewise.
2424 * elf64-sh64.c: Likewise.
2425 * bfd-in2.h: Regenerate.
2427 2003-04-14 H.J. Lu <hjl@gnu.org>
2429 * elflink.h (elf_link_add_object_symbols): Maintain maximum
2430 alignment for common symbols. Warn reducing alignment for
2431 common symbols. Report old filename when symbol size changes.
2433 2003-04-12 Alexandre Oliva <aoliva@redhat.com>
2435 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
2436 occurrences of the same test changed in the previous patch.
2439 2003-04-11 Alexandre Oliva <aoliva@redhat.com>
2441 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
2442 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
2443 GOT_DISP/addend only if the symbol got a global GOT entry.
2445 2003-04-10 Alexandre Oliva <aoliva@redhat.com>
2447 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
2448 GOT_PAGE/GOT_OFST referencing overridable symbol to
2450 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
2451 global symbol as GOT_DISP.
2453 2003-04-10 Bob Wilson <bob.wilson@acm.org>
2455 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
2456 next relocation on an undefined symbol.
2458 2003-04-09 Richard Henderson <rth@redhat.com>
2460 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
2461 Ignore relocations against r_symndx == 0.
2463 2003-04-09 H.J. Lu <hjl@gnu.org>
2465 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
2466 FALSE for undefined symbols.
2467 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2469 2003-04-09 Alexandre Oliva <aoliva@redhat.com>
2471 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
2472 and IRIX-specific shift-to-64-bit 4-byte lengths before following
2475 2003-04-08 Alexandre Oliva <aoliva@redhat.com>
2477 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
2478 pointer size from ABI, not arch_bits_per_address.
2480 2003-04-07 Kevin Buettner <kevinb@redhat.com>
2482 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
2483 constants for n32 ABI.
2485 2003-04-06 Andrew Cagney <cagney@redhat.com>
2487 * simple.c (bfd_simple_get_relocated_section_contents): Disable
2488 free that leads to GDB vs BFD memory corruption.
2490 2003-04-04 Stephane Carrez <stcarrez@nerim.fr>
2492 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
2493 symbols that mark the end of the section.
2494 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
2495 converting to a relative branch so that the offset is computed after
2496 the relaxation; also relocate a jsr into a bsr if possible but don't
2497 relax them if they are to a far symbol as we need to call the
2499 (elf_m68hc11_howto_table): Set pcrel_offset to true.
2501 2003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2503 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
2504 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
2505 * bfd-in2.h: Regenerate
2506 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
2507 * cpu-tic4x.c: Ditto
2509 2003-04-03 Nick Clifton <nickc@redhat.com>
2511 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
2512 differently for object files and executables.
2513 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
2514 for object files or for executables who have not already
2515 initialised the field.
2516 * libpei.h (bfd_pe_executable_p): New macro. Return true if
2517 the PE format bfd is an executable.
2519 2003-04-03 Alan Modra <amodra@bigpond.net.au>
2521 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
2522 here as it's too early to reliably determine locality.
2523 (ppc_elf_gc_sweep_hook): Likewise.
2524 (SYMBOL_REFERENCES_LOCAL): Expand comment.
2526 2003-04-02 Bob Wilson <bob.wilson@acm.org>
2528 * xtensa-modules.c: Remove comment indicating that this is a
2531 2003-04-02 Alan Modra <amodra@bigpond.net.au>
2533 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
2535 2003-04-01 Bob Wilson <bob.wilson@acm.org>
2537 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
2538 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
2539 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
2541 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
2543 (cpu-xtensa.lo): New target.
2544 (elf32-xtensa.lo): Likewise.
2545 (xtensa-isa.lo): Likewise.
2546 (xtensa-modules.lo): Likewise.
2547 * Makefile.in: Regenerate.
2548 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
2549 (bfd_archures_list): Add bfd_xtensa_arch.
2550 * config.bfd: Handle xtensa-*-*.
2551 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
2552 * configure: Regenerate.
2553 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
2554 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
2555 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
2556 (bfd_elf32_xtensa_le_vec): Likewise.
2557 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
2558 * cpu-xtensa.c: New file.
2559 * elf32-xtensa.c: Likewise.
2560 * xtensa-isa.c: Likewise.
2561 * xtensa-modules.c: Likewise.
2562 * libbfd.h: Regenerate.
2563 * bfd-in2.h: Likewise.
2565 2003-04-01 Nick Clifton <nickc@redhat.com>
2567 * archures.c (bfd_mach_arm_unknown): Define.
2568 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
2569 bfd_arm_get_mach_from_notes): Prototype.
2570 * bfd-in2.h: Regenerate.
2571 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
2572 bfd_arm_merge_machines.
2573 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
2574 * coffcode.h (coff_set_arch_mach_hook): Call
2575 bfd_arm_get_mach_from_notes.
2576 * coffgen.c (coff_real_object_p): Revert previous delta.
2577 * cpu_arm.c (arm_check_note): New function. Examine a note in a
2579 (bfd_arm_merge_machines): New function: Handle the merging of ARM
2580 binaries compiled for different architectures..
2581 (bfd_arm_update_notes): New function: Update an ARM note section.
2582 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
2583 number from an ARM note section.
2584 * elf32-arm.h (elf32_arm_object_p): Use
2585 bfd_arm_get_mach_from_notes.
2586 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
2587 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
2589 2003-04-01 Ben Elliston <bje@wasabisystems.com>
2591 * dwarf2.c (read_attribute_value): Correct typo in comment.
2593 2003-04-01 Nick Clifton <nickc@redhat.com>
2595 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
2596 instead of concat().
2597 (decode_line_info): Only free filename if it is not NULL.
2598 (add_line_info): Make a copy of the filename when storing it into
2601 2003-03-31 Andreas Schwab <schwab@suse.de>
2602 Daniel Jacobowitz <drow@mvista.com>
2604 * simple.c (bfd_simple_get_relocated_section_contents): Add
2605 parameter symbol_table. Optionally use it instead of the symbol
2606 table from the bfd. Save and restore output offsets and output
2607 sections around bfd_get_relocated_section_contents. Fix a memory
2609 (simple_save_output_info, simple_restore_output_info): New
2611 * bfd-in2.h: Regenerate.
2612 * dwarf2.c (read_abbrevs): Use
2613 bfd_simple_get_relocated_section_contents instead of
2614 bfd_get_section_contents.
2615 (decode_line_info): Likewise.
2616 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
2618 (find_rela_addend): Remove.
2619 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
2621 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
2624 2003-03-31 David Heine <dlheine@suif.stanford.edu>
2626 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
2628 * dwarf2.c (concat_filename): Always allocate space for the
2630 (decode_line_info): Free the allocated filename returned by
2632 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
2633 * elf.c (copy_private_bfd_data): Likewise.
2634 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
2635 * elflink.h (elf_link_sort_relocs): Fix memory leak.
2636 * format.c (bfd_check_format_matches): Likewise.
2637 * linker.c (bfd_generic_final_link): Likewise.
2638 * opncls.c (find_separate_debug_info): Likewise.
2639 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
2641 2003-03-28 H.J. Lu <hjl@gnu.org>
2643 * elflink.h (elf_link_add_object_symbols): Correctly combine
2646 2003-03-27 Jakub Jelinek <jakub@redhat.com>
2648 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
2649 to -1 before recomputing got offsets.
2651 2003-03-26 Andreas Schwab <schwab@suse.de>
2653 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
2654 (elf_m68k_relocate_section): Use it to correctly handle symbols
2656 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
2657 entries for symbols that are forced to be local.
2659 2003-03-25 Alexandre Oliva <aoliva@redhat.com>
2661 * elfxx-mips.c (_bfd_mips_relax_section): New function.
2662 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
2663 * elfn32-mips.c, elf64-mips.c: Use it.
2665 2003-03-25 Stan Cox <scox@redhat.com>
2666 Nick Clifton <nickc@redhat.com>
2668 Contribute support for Intel's iWMMXt chip - an ARM variant:
2670 * archures.c: Add bfd_mach_arm_iWMMXt.
2671 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
2672 * bfd-in2.h: Regenerate.
2673 * libbfd.h: Regenerate.
2674 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
2675 object files to be linked with XScale ones.
2676 (coff_arm_final_link_postscript): Update note section.
2677 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
2678 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
2679 after identifying a coff binary.
2680 * cpu-arm.c (processors): Add iWMMXt.
2681 (arch_inf): Likewise.
2682 * elf32-arm.h (arm_object_p): Handle note section.
2683 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
2684 be linked with XScale ones.
2685 (elf32_arm_section_flags): New function: Set flags on note section.
2686 (elf32_arm_final_write_processing): Handle note section.
2688 2003-03-21 DJ Delorie <dj@redhat.com>
2690 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
2691 _bfd_elf_rela_local_sym.
2693 2003-03-20 H.J. Lu <hjl@gnu.org>
2695 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
2698 2003-03-20 Nick Clifton <nickc@redhat.com>
2700 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
2701 $idata5 in case bfd_coff_final_link is not called.
2703 2003-03-19 Jakub Jelinek <jakub@redhat.com>
2705 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
2707 (canon_reloc_count): Define.
2708 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
2709 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
2711 (sparc64_elf_canonicalize_reloc): New routine.
2712 (bfd_elf64_canonicalize_reloc): Define.
2714 2003-03-18 Jakub Jelinek <jakub@redhat.com>
2716 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
2717 againt mergeable sections. Take r_addend into account when caching
2720 2003-03-18 Richard Henderson <rth@redhat.com>
2722 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
2723 local symbols that have no dyninfo.
2725 2003-03-14 Gene Smith <gene.smith@siemens.com>
2727 * ieee.c (ieee_write_expression): Handle the case where symbol is
2729 General formatting improvements.
2731 2003-03-13 Nick Clifton <nickc@redhat.com>
2733 * configure.in (LINGUAS): Add zh_CN.
2734 * configure: Regenerate.
2735 * po/zh_CN.po: New file.
2737 2003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
2739 * aout-cris.c (BYTES_IN_WORD): Don't define.
2740 aout-encap.c: Likewise.
2741 aout-ns32k.c: Likewise.
2742 aout-tic30.c: Likewise.
2743 hp300bsd.c: Likewise.
2744 i386aout.c: Likewise.
2745 i386dynix.c: Likewise.
2746 i386linux.c: Likewise.
2747 i386lynx.c: Likewise.
2748 i386mach3.c: Likewise.
2749 m68k4knetbsd.c: Likewise.
2750 m68klinux.c: Likewise.
2751 m68klynx.c: Likewise.
2752 m68knetbsd.c: Likewise.
2753 m88kmach3.c: Likewise.
2754 mipsbsd.c: Likewise.
2755 newsos3.c: Likewise.
2756 sparclinux.c: Likewise.
2757 sparclynx.c: Likewise.
2758 sparcnetbsd.c: Likewise.
2759 vaxbsd.c: Likewise. Fix comment formatting.
2761 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
2763 * Reverted 2003-03-02's patch.
2765 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
2767 * elf64-mips.c (mips_elf64_canonicalize_reloc,
2768 mips_elf64_get_dynamic_reloc_upper_bound,
2769 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
2770 (bfd_elf64_get_canonicalize_reloc,
2771 bfd_elf64_get_dynamic_reloc_upper_bound,
2772 bfd_elf64_canonicalize_dynamic_reloc): Define.
2773 (mips_elf64_slurp_reloc_table): Support dynamic.
2774 (mips_elf64_slurp_one_reloc_table): Adjust.
2776 2003-03-12 Nick Clifton <nickc@redhat.com>
2778 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
2779 'index' to 'offset' in test for zero value.
2781 2003-03-11 Alexandre Oliva <aoliva@redhat.com>
2783 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
2784 dynamic relocations pointing to local or section symbols, use the
2785 NULL symbol instead. Document the choice to not emit an
2786 additional R_MIPS_64 relocation.
2788 2003-03-11 Alan Modra <amodra@bigpond.net.au>
2790 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
2791 zero index dynamic tls relocs generated for the GOT. Tidy code.
2792 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
2793 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2795 2003-03-07 Alan Modra <amodra@bigpond.net.au>
2797 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
2798 a tls_get_addr call.
2800 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
2801 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
2802 ELF_LINK_NON_GOT_REF from weakdef.
2803 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
2804 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
2805 ELF_LINK_NON_GOT_REF from weakdef.
2806 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
2807 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
2808 ELF_LINK_NON_GOT_REF from weakdef.
2810 2003-03-06 Jakub Jelinek <jakub@redhat.com>
2811 Andrew Haley <aph@redhat.com>
2813 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
2814 output is relocateable.
2816 2003-03-06 Steven Konopa <skonopa@kgo.csc.com>
2818 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
2821 2003-03-06 Alan Modra <amodra@bigpond.net.au>
2823 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
2825 (ELIMINATE_COPY_RELOCS): Define to zero.
2826 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
2827 TLSLD relocs. Report reloc types on a number of errors. Optimize
2828 LOCAL24PC check for non-local syms. Don't capitalize error messages.
2829 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
2830 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
2831 calculating TLSLD relocs. Report reloc types on a number of errors.
2832 Don't capitalize error messages.
2834 2003-03-03 H.J. Lu <hjl@gnu.org>
2836 * elfxx-ia64.c (USE_BRL): Removed.
2839 2003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
2841 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
2842 relocation (no special function), and make it non-partial_inplace.
2843 (sh_elf_relax_section): When creating a bsr, use a consistent value
2844 no matter if the symbol is extern or not; set addend to -4.
2845 Don't swap load / non-load instructions for SH4.
2846 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
2847 rather than if the symbol is external to determine if adjusting the
2848 offset makes sense. Adjust the addend too if appropriate.
2849 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
2852 2003-03-03 Nick Clifton <nickc@redhat.com>
2854 * po/da.po: Installed latest translation.
2856 2003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2858 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
2859 R_MIPS_PC16 to rightshift 2.
2860 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
2861 (bfd_elf32_bfd_reloc_type_lookup): Support
2862 BFD_RELOC_MIPSEMB_16_PCREL_S2.
2863 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
2864 R_MIPS_PC16 to rightshift 2.
2865 (mips_elf64_howto_table_rela): Likewise.
2866 (mips_reloc_map): Map to rightshifted BFD reloc.
2867 * elfn32-mips.c: The same as in elf64-mips.c.
2868 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
2869 (mips_elf_calculate_relocation): Handle rightshifted addends for
2871 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
2872 MIPS Embedded PIC. Remove superfluous empty COMMENT.
2873 * libbfd.h: Regenerate.
2874 * bfd-in2.h: Regenerate.
2876 2003-02-28 Richard Henderson <rth@redhat.com>
2878 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
2879 for ltoff22x relaxation.
2881 2003-03-01 Alan Modra <amodra@bigpond.net.au>
2883 * bfd-in.h (_bfd): Don't define.
2884 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
2886 * bfd-in2.h: Regenerate.
2888 2003-02-27 Richard Henderson <rth@redhat.com>
2890 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
2891 (elfNN_ia64_check_relocs): Set it.
2892 (allocate_global_data_got): Check it.
2893 (allocate_local_got): Likewise.
2894 (allocate_dynrel_entries): Likewise.
2895 (elfNN_ia64_relax_ldxmov): New.
2896 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
2897 (elfNN_ia64_choose_gp): Split out from ...
2898 (elfNN_ia64_final_link): ... here.
2900 2003-02-27 Andrew Cagney <cagney@redhat.com>
2902 * bfd.c (struct bfd): Rename "struct _bfd".
2903 * bfd-in.h: Update copyright.
2904 (struct bfd): Rename "struct _bfd".
2905 (_bfd): Define for backward compatibility.
2906 * bfd-in2.h: Regenerate.
2908 2003-02-25 Alan Modra <amodra@bigpond.net.au>
2910 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
2911 and rel_hdr2 when initially counting input relocs rather than after
2912 creating output reloc sections.
2913 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
2916 * Makefile.am: Run "make dep-am".
2917 * Makefile.in: Regenerate.
2919 2003-02-24 Kris Warkentin <kewarken@qnx.com>
2921 * elf.c (elfcore_read_notes): Add check for QNX style core file.
2922 (elfcore_grog_nto_note): New function.
2923 (elfcore_grog_nto_gregs): New function.
2924 (elfcore_grog_nto_status): New function.
2926 2003-02-24 Alan Modra <amodra@bigpond.net.au>
2928 * elflink.c (_bfd_elf_create_got_section): Check existing .got
2929 section flags before concluding that we've already been called.
2930 Don't use register keyword.
2931 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
2932 (_bfd_elf_create_linker_section): Formatting.
2934 2003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
2936 * coff-h8300.c: Fix typo: intial -> initial.
2937 * coff-ppc.c: Likewise.
2939 2003-02-20 Alan Modra <amodra@bigpond.net.au>
2941 * elf32-ppc.c: Formatting.
2942 (allocate_dynrelocs): LD and GD relocs against the same sym need
2943 separate GOT entries.
2944 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
2947 2003-02-19 Alan Modra <amodra@bigpond.net.au>
2949 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
2950 removal. Localize vars. Remove unnecessary dynobj test.
2951 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
2953 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
2955 (elf_i386_relocate_section): Likewise.
2956 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
2957 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
2958 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
2959 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
2960 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
2961 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
2962 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
2963 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
2966 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
2967 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
2969 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
2970 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2971 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
2972 and optimize. Use ELIMINATE_COPY_RELOCS.
2973 (ppc64_elf_relocate_section): Likewise.
2975 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
2976 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
2977 (ELIMINATE_COPY_RELOCS): Define.
2978 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
2979 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2980 (MUST_BE_DYN_RELOC): Define.
2981 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
2982 and optimize. Trim dyn_relocs.
2983 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
2984 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
2985 track of pc_rel dyn relocs.
2986 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
2987 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
2988 allocate_dynrelocs. Don't recalculate "sec".
2990 2003-02-18 Alan Modra <amodra@bigpond.net.au>
2992 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
2993 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
2994 on invalid LD relocs.
2995 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
2996 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
2997 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
2999 * elf32-ppc.h: New file.
3000 * elf32-ppc.c: Include elf32-ppc.h.
3001 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
3002 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
3003 Add "tls_mask" field.
3004 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
3005 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
3006 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
3007 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
3008 Make use of htab shortcuts throughout file.
3009 (ppc_elf_link_hash_newfunc): Init tls_mask field.
3010 (ppc_elf_link_hash_table_create): Init new fields.
3011 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
3012 (ppc_elf_howto_raw): Add tls relocs.
3013 (ppc_elf_reloc_type_lookup): Handle them.
3014 (ppc_elf_unhandled_reloc): New function.
3015 (ppc_elf_create_got): Stash got section pointer in hash table,
3016 return status. Make .rela.got too.
3017 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
3018 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
3019 NON_GOT_REF set. Don't allocate space in .plt here..
3020 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
3021 not allocating plt entries unnecessarily. Allocate got entries here.
3022 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3023 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
3024 "info" during allocate_dynrelocs hash traversal. Use htab section
3025 shortcuts rather than searching for named sections. Get rid of
3026 "plt" and "strip" booleans.
3027 (update_local_sym_info, bad_shared_reloc): New functions.
3028 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
3029 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
3030 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
3031 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
3032 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
3033 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
3034 relocs that might use a plt entry. Set NON_GOT_REF too.
3035 Enumerate all do-nothing relocs.
3036 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
3037 tls relocs and all plt relocs.
3038 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
3039 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
3040 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
3042 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
3043 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
3044 entries and got relocs here. Warn on non-zero got reloc addend.
3045 Split out branch taken/not taken reloc code into a separate switch
3046 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
3047 Split out HA reloc adjustments to separate switch statement. Don't
3048 warn on reloc overflow if we've already warned about undefined.
3049 Don't rebuild sym name when reporting errors. Report all possible
3050 errors from _bfd_final_link_relocate.
3051 (bfd_elf32_bfd_final_link): Don't define.
3053 2003-02-18 Alan Modra <amodra@bigpond.net.au>
3055 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
3056 rebuild sym name when reporting errors.
3058 2003-02-17 Nick Clifton <nickc@redhat.com>
3060 * elflink.h (elf_link_output_extsym): Only check
3061 allow_shlib_undefined for shared libraries.
3062 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
3063 of allow_shlib_undefined.
3064 * elf32-cris.c (cris_elf_relocate_section): Likewise.
3065 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3066 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3067 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3068 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3069 * elf32-sh.c (sh_elf_relocate_section): Likewise.
3070 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3071 * elf32-vax.c (elf_vax_relocate_section): Likewise.
3072 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
3073 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
3074 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3075 * elf64-s390.c (elf_s390_relocate_section): Likewise.
3076 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3077 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3078 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3079 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
3081 2003-02-17 Nick Clifton <nickc@redhat.com>
3083 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
3084 address field to use in the comparison.
3085 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
3087 2003-02-14 Bob Wilson <bob.wilson@acm.org>
3089 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
3090 backends when checking if the generic ELF target should be used.
3092 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
3093 outside of functions, treat values as absolute addresses.
3095 * bfd.c: Change embedded documentation to use consistent indentation
3096 and to split up long lines. Change informal style of description
3097 for functions lacking real documentation.
3098 * coffcode.h: Break up long lines in embedded documentation.
3099 * format.c: Likewise.
3100 * targets.c: Likewise.
3101 * libcoff.h: Regenerate.
3102 * bfd-in2.h: Regenerate.
3104 2003-02-14 Alan Modra <amodra@bigpond.net.au>
3106 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
3107 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
3108 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
3109 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
3110 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
3111 (group_sections): Don't share a stub section if stubs are for a large
3112 section. Adjust comment.
3113 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
3114 !stubs_always_before_branch.
3115 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
3116 treat undefined and undefweak specially when processing dyn relocs.
3118 2003-02-13 Jakub Jelinek <jakub@redhat.com>
3120 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
3122 2003-02-13 Nick Clifton <nickc@redhat.com>
3124 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
3125 in computation of offset to insert into BL instruction.
3127 2003-02-11 Uwe Stieber <uwe@wwws.de>
3129 * config.bfd: Add support for kaOS as cross build target system.
3131 2003-02-11 Alan Modra <amodra@bigpond.net.au>
3133 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
3134 .__tls_get_addr too.
3135 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
3137 2003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
3139 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
3140 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
3141 (sh_elf_link_hash_newfunc): Remove the initialization of
3143 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
3144 for which tls_tpoff32 flag is set.
3145 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
3146 of the symbol includes the entry matched with the input_section
3147 and having tls_tpoff32 flag on. When linking statically, set
3148 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
3149 is defined in this executable.
3150 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
3152 2003-02-10 Jakub Jelinek <jakub@redhat.com>
3154 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
3155 even if there is just non-empty .rela.plt.
3157 2003-02-10 Nick Clifton <nickc@redhat.com>
3159 * archures.c (bfd_mach_arm_ep9312): Define.
3160 * bfd-in2.h: Regenerate.
3161 * cpu-arm.c (processors[]): Add ep9312.
3162 (bfd_arm_arch): Add ep9312.
3163 * elf32-arm.h (elf32_arm_merge_private_data): Update error
3164 messages and add test for Maverick floating point support.
3165 (elf32_arm_print_private_bfd_data): Handle
3166 EF_ARM_MAVERICK_FLOAT flag.
3167 (elf32_arm_object_p): New function.
3168 (elf_backend_object_p): Define.
3170 2003-02-10 Alan Modra <amodra@bigpond.net.au>
3172 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
3173 variables, structure fields or function params to tls_mask or
3174 similar to better reflect usage.
3175 (struct got_entry): Comment.
3176 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
3177 (get_tls_mask): Rename from get_tls_type.
3179 2003-02-09 Alan Modra <amodra@bigpond.net.au>
3181 * elf64-ppc.c (TLS_GD_LD): Don't define..
3182 (TLS_GD): ..define this instead and update all uses.
3183 (TLS_TPRELGD): Define.
3184 (ppc64_elf_link_hash_table_create): Tweak initialization of
3185 init_refcount and init_offset.
3186 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
3187 Mark second slot of GD or LD toc entries.
3188 (get_tls_type): Return an int. Distinguish toc GD and LD entries
3189 from other tls types.
3190 (ppc64_elf_tls_setup): New function, split out from..
3191 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
3192 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
3193 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
3194 return value to properly decide whether toc GD and LD entries can
3195 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
3196 to determine GD or LD rather than looking at TLS_LD flag. Don't
3197 attempt to adjust got entry tls_type here..
3198 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
3199 look for possible merges.
3200 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
3202 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
3203 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
3204 Make use of return value from get_tls_type to properly detect GD and
3205 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
3206 handle tls_get_addr removal when looking at REL24 relocs, do it when
3207 looking at the previous reloc. Check reloc after DTPMOD64 to determine
3209 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
3211 2003-02-08 Alan Modra <amodra@bigpond.net.au>
3213 * elf32-hppa.c (group_sections): Don't share a stub section if
3214 stubs are for a large section.
3216 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
3217 stubs if !stubs_always_before_branch.
3219 2003-02-07 Nick Clifton <nickc@redhat.com>
3221 * elf.c (swap_out_syms): Generate an error message if an
3222 equivalent output section cannot be found for a symbol.
3224 2003-02-07 Jakub Jelinek <jakub@redhat.com>
3226 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
3227 local_got_entries is NULL.
3229 2003-02-06 Andreas Schwab <schwab@suse.de>
3231 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
3232 (read_value): Add parameter is_signed, use signed extraction if
3233 the value is signed.
3234 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
3235 encoding to read_value.
3237 2003-02-06 Alan Modra <amodra@bigpond.net.au>
3239 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
3240 plt info when called to transfer weak sym info.
3242 2003-02-05 Alan Modra <amodra@bigpond.net.au>
3244 * reloc.c: Add PPC and PPC64 TLS relocs.
3245 * libbfd.h: Regenerate.
3246 * bfd-in2.h: Regenerate.
3247 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
3248 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
3249 against a 32 bit field.
3250 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
3251 (_ppc64_elf_section_data): Add t_symndx and comments.
3252 (ppc64_elf_section_data): Use elf_section_data macro.
3253 (ppc64_elf_new_section_hook): American spelling.
3254 (struct got_entry, struct plt_entry): New.
3255 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
3256 (struct ppc_stub_hash_entry): Add "addend" field.
3257 (struct ppc_link_hash_entry): Add "tls_type".
3258 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
3259 TLS_EXPLICIT): Define.
3260 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
3261 (link_hash_newfunc): Init new fields.
3262 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
3263 init_offset to NULL.
3264 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
3265 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
3267 (update_local_sym_info, update_plt_info): New functions.
3268 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
3269 handling to use got.glist rather than got.refcount. Likewise for PLT.
3270 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
3271 (func_desc_adjust): Adjust for new PLT list.
3272 (ppc64_elf_adjust_dynamic_symbol): Likewise.
3273 (get_sym_h, get_tls_type): New functions.
3274 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
3275 (ppc64_elf_tls_optimize): New function.
3276 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
3278 (ppc64_elf_size_dynamic_sections): Likewise.
3279 (ppc_type_of_stub): Adjust for new PLT list.
3280 (ppc_build_one_stub): Likewise.
3281 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
3283 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
3284 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
3285 init GOT entries that have a reloc. Generate GOT relocs here..
3286 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
3287 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
3289 2003-02-04 Andreas Schwab <schwab@suse.de>
3291 * elf32-m68k.c (elf_m68k_hash_entry): Define.
3292 (elf_m68k_link_hash_traverse): Remove.
3293 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
3294 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
3296 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
3298 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
3299 instead of elf_m68k_link_hash_traverse.
3300 (elf_m68k_discard_copies): Change first parameter to pointer to
3301 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
3302 elf_m68k_link_hash_entry is needed.
3304 2003-02-04 Alan Modra <amodra@bigpond.net.au>
3306 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
3307 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
3308 "got" union, and declare as gotplt_union. Use gotplt_uinion for
3310 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
3311 Add "init_offset" field.
3312 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
3313 (elf_local_got_ents): Declare.
3314 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
3316 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
3317 (_bfd_elf_link_hash_table_init): Set "init_offset".
3318 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
3320 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
3322 * elf.c (bfd_elf_local_sym_name): Split out from..
3323 (group_signature): ..here.
3324 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
3326 2003-02-04 Alan Modra <amodra@bigpond.net.au>
3328 * elf-bfd.h (enum elf_link_info_type): Remove.
3329 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
3330 to struct sec. Remove linkonce_p field.
3331 (elf_linkonce_p): Delete.
3332 (elf_discarded_section): Update for sec_info_type change.
3333 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
3334 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
3335 (ELF_INFO_TYPE_NONE): Define.
3336 (ELF_INFO_TYPE_STABS): Define.
3337 (ELF_INFO_TYPE_MERGE): Define.
3338 (ELF_INFO_TYPE_EH_FRAME): Define.
3339 (ELF_INFO_TYPE_JUST_SYMS): Define.
3340 (STD_SECTION): Update struct sec initializer.
3341 * ecoff.c (bfd_debug_section): Likewise.
3342 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
3343 * elflink.h: Likewise.
3344 * elf-eh-frame.c: Likewise.
3345 * elf64-alpha.c: Likewise.
3346 * elfxx-ia64.c: Likewise.
3347 * elfxx-mips.c: Likewise.
3348 * bfd-in2.h: Regenerate.
3350 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
3351 referring to used_by_bfd.
3352 * elf64-sparc.c (sec_do_relax): Likewise.
3353 * elf64-mmix.c (mmix_elf_section_data): Likewise.
3354 * elfxx-mips.c (mips_elf_section_data): Likewise.
3355 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
3356 (ieee_get_section_contents): Likewise.
3357 (ieee_new_section_hook): Formatting.
3358 (ieee_canonicalize_reloc): Remove commented out code.
3359 * mmo.c (mmo_section_data): Define. Use throughout file.
3360 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
3362 2003-01-31 Graydon Hoare <graydon@redhat.com>
3364 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
3365 * Makefile.in: Regenerate.
3366 * opncls.c (calc_crc32, get_debug_link_info,
3367 seperate_debug_file_exists, find_seperate_debug_file): New
3369 (bfd_follow_gnu_debuglink): New function. Follow the pointer
3370 contained inside a .gnu_debuglink section.
3371 * bfd-in2.h: Regenerate.
3373 2003-01-29 Alexandre Oliva <aoliva@redhat.com>
3375 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
3376 entry->abfd when it's NULL.
3378 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
3380 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
3381 _bfd_elf_section_offset returning -2 the same way as -1.
3383 * elfxx-mips.c (mips_elf_multi_got): New function.
3384 (struct mips_got_entry): Make symndx and gotidx signed. Moved
3385 addend into union along with address and link hash entry.
3386 (struct mips_got_info): Added bfd2got and next.
3387 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
3388 (mips_elf_got_section, mips_elf_create_got_section): Use
3389 SEC_EXCLUDE bit to tell whether we really need the got
3390 section. Take boolean arguments to disregard an excluded
3391 section, or to create it as excluded. Adjust all callers.
3392 Use mips_elf_got_section all over.
3393 (mips_elf_local_got_index, mips_elf_got_page,
3394 mips_elf_got16_entry): Take input bfd as argument, and pass it
3395 on to mips_elf_create_local_got_entry.
3396 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
3397 Take input bfd as argument, and manage entries in the
3399 (mips_elf_got_offset_from_index): Take input bfd as argument,
3400 and use it to adjust the GP offset of the bfd.
3401 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
3402 unreferenced GOT entries of global symbols to the end.
3403 (mips_elf_record_global_got_symbol): Take input bfd as
3404 argument. Add entries to the master GOT hash table.
3405 (struct mips_elf_bfd2got_hash): New.
3406 (struct mips_elf_got_per_bfd_arg): New.
3407 (struct mips_elf_set_global_got_offset_arg): New.
3408 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
3409 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
3410 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
3411 mips_elf_merge_gots, mips_elf_set_global_got_offset,
3412 mips_elf_resolve_final_got_entry,
3413 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
3414 mips_elf_got_for_ibfd): New functions.
3415 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
3416 (MIPS_ELF_GOT_MAX_SIZE): New macro.
3417 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
3418 (mips_elf_got_entry_hash): Take new fields into account. Use
3419 mips_elf_hash_bfd_vma.
3420 (mips_elf_got_entry_eq): Take new fields into account.
3421 (mips_elf_create_got_section): Initialize new fields.
3422 (mips_elf_calculate_relocation): Pass input_bfd to functions
3423 that now take it. Adjust gp for the input_bfd.
3424 (mips_elf_allocate_dynamic_relocation,
3425 mips_elf_create_dynamic_relocation,
3426 _bfd_mips_elf_create_dynamic_sections): Use...
3427 (mips_elf_rel_dyn_section): New function. Borrow code from...
3428 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
3429 now take it. Create the got section if needed, even if
3430 excluded, before recording a global got symbol. Move some
3432 (mips_elf_record_local_got_symbol): New fn.
3433 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
3434 Compute multi-got global entries offsets. Move GOT code to...
3435 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
3436 if the GOT is too big.
3437 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
3438 undefweak symbol to zero. Generate dynamic relocations for
3439 non-primary GOT entries for global symbols.
3440 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
3441 case. Generate dynamic relocations for local got entries.
3442 Sort dynamic relocations on N64 too, using...
3443 (sort_dynamic_relocs_64): New fns.
3444 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
3445 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
3447 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
3449 * bfd.c (struct _bfd): Added id field.
3450 * opncls.c (_bfd_id_counter): New static variable.
3451 (_bfd_new_bfd): Use it.
3452 * bfd-in2.h: Rebuilt.
3454 2003-01-25 Alan Modra <amodra@bigpond.net.au>
3456 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
3458 2003-01-25 Jakub Jelinek <jakub@redhat.com>
3460 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
3461 (elf32_sparc_rev32_howto): New variable.
3462 (sparc_reloc_map): Add TLS relocs.
3463 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
3465 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
3467 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
3468 struct elf32_sparc_link_hash_table):
3470 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
3471 elf32_sparc_hash_table): Define.
3472 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
3473 create_got_section, elf32_sparc_create_dynamic_sections,
3474 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
3476 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
3478 (elf32_sparc_gc_sweep_hook): Likewise.
3479 (elf32_sparc_adjust_dynamic_symbol): Likewise.
3480 (elf32_sparc_size_dynamic_sections): Likewise.
3481 (elf32_sparc_relocate_section): Likewise.
3482 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
3484 (elf32_sparc_object_p): Allocate backend private object data.
3485 (bfd_elf32_bfd_link_hash_table_create,
3486 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
3487 elf_backend_can_refcount): Define.
3488 (elf_backend_create_dynamic_sections): Define to
3489 elf32_sparc_create_dynamic_sections.
3490 * reloc.c: Add SPARC TLS relocs.
3491 * bfd-in2.h, libbfd.h: Rebuilt.
3492 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
3493 (sparc_reloc_map): Likewise.
3495 2003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
3497 * bfd-in2.h: Regenerate.
3498 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
3499 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
3500 (elf_howto_table): Add TLS relocs.
3501 (elf_s390_reloc_type_lookup): Likewise.
3502 (elf_s390_link_hash_entry): Add tls_type.
3503 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
3505 (elf_s390_link_hash_table): Add tls_ldm_got.
3506 (link_hash_newfunc): Initialize tls_type.
3507 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
3508 (elf_s390_copy_indirect_symbol): Copy tls_type information.
3509 (elf_s390_check_relocs): Support TLS relocs.
3510 (elf_s390_gc_sweep_hook): Likewise.
3511 (allocate_dynrelocs): Likewise.
3512 (elf_s390_size_dynamic_sections): Likewise.
3513 (elf_s390_relocate_section): Likewise.
3514 (elf_s390_finish_dynamic_symbol): Likewise.
3515 (bfd_elf32_mkobject): Define for TLS.
3516 * elf64-s390.c: Same changes as for elf32-s390.c.
3517 * libbfd.h: Regenerate.
3518 * reloc.c: Add s390 TLS relocations.
3520 2003-01-24 Charles Lepple <clepple@ghz.cc>
3522 * aclocal.m4: Fix name of --enable-install-libbfd switch.
3524 2003-01-23 Nick Clifton <nickc@redhat.com>
3527 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
3528 * archures.c (bfd_mach_sh2e): Added.
3529 * bfd-in2.h: Rebuilt.
3530 * cpu-sh.c (arch_info_struct): Added SH2e.
3531 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
3533 2003-01-23 Alan Modra <amodra@bigpond.net.au>
3535 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
3536 dynindx to an int. Rearrange for better packing.
3537 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
3538 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
3539 * elf32-sh64.h: New. Split out from include/elf/sh.h.
3540 (struct _sh64_elf_section_data): New struct.
3541 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
3542 * elf32-sh64-com.c: Include elf32-sh64.h.
3543 * elf32-sh64.c: Likewise.
3544 (sh64_elf_new_section_hook): New function.
3545 (bfd_elf32_new_section_hook): Define.
3546 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
3547 (sh64_bfd_elf_copy_private_section_data): Likewise.
3548 (sh64_elf_final_write_processing): Likewise.
3549 * elf32-sparc.c (struct elf32_sparc_section_data): New.
3550 (elf32_sparc_new_section_hook): New function.
3551 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
3552 (sec_do_relax): Define.
3553 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
3554 (elf32_sparc_relocate_section): Likewise.
3555 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
3556 * elf64-mmix.c (struct _mmix_elf_section_data): New.
3557 (mmix_elf_section_data): Define. Use throughout file.
3558 (mmix_elf_new_section_hook): New function.
3559 (bfd_elf64_new_section_hook): Define.
3560 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
3561 (ppc64_elf_section_data): Define. Use throughout.
3562 (ppc64_elf_new_section_hook): New function.
3563 (bfd_elf64_new_section_hook): Define.
3564 * elf64-sparc.c (struct sparc64_elf_section_data): New.
3565 (sparc64_elf_new_section_hook): New function.
3566 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
3567 (sec_do_relax): Define.
3568 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
3569 (sparc64_elf_relocate_section): Likewise.
3570 (bfd_elf64_new_section_hook): Define.
3571 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
3572 * elfxx-mips.c (struct _mips_elf_section_data): New.
3573 (mips_elf_section_data): Define. Use throughout.
3574 (_bfd_mips_elf_new_section_hook): New function.
3575 (mips_elf_create_got_section): Don't alloc used_by_bfd.
3576 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
3577 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
3578 * Makefile.am: Run "make dep-am".
3579 * Makefile.in: Regenerate.
3581 2003-01-21 Richard Henderson <rth@redhat.com>
3583 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
3584 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
3585 (elf64_alpha_adjust_dynamic_symbol): Set them.
3586 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
3587 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
3588 symbol index when relaxing LDM to TPREL.
3589 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
3590 relocs, even if the target isn't locally defined.
3591 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
3592 (elf64_alpha_relocate_section): Likewise. Force TP-relative
3593 relocs vs symndx 0 to the tp base.
3595 2003-01-21 Fabio Alemagna <falemagn@aros.org>
3597 * config.bfd: Handle i[3456]86-*-aros*.
3599 2003-01-21 Andreas Schwab <schwab@suse.de>
3601 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
3602 (struct ppc_elf_link_hash_entry): Define.
3603 (ppc_elf_hash_entry): New function.
3604 (struct ppc_elf_link_hash_table): Define.
3605 (ppc_elf_hash_table): New function.
3606 (ppc_elf_link_hash_newfunc): New function.
3607 (ppc_elf_link_hash_table_create): New function.
3608 (ppc_elf_copy_indirect_symbol): New function.
3609 (allocate_dynrelocs): New function.
3610 (readonly_dynrelocs): New function.
3611 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
3612 relocs and determine DT_TEXTREL.
3613 (ppc_elf_check_relocs): Don't do that here, just count the
3615 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
3617 (bfd_elf32_bfd_link_hash_table_create): Define.
3618 (elf_backend_copy_indirect_symbol): Define.
3620 2003-01-21 Richard Henderson <rth@redhat.com>
3622 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
3623 TPREL also get a reloc if shared. Remove SREL support.
3624 (elf64_alpha_emit_dynrel): New.
3625 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
3626 and GOTTPREL relocs to local symbols against the tp base.
3627 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
3629 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
3630 use count before clobbering r_type.
3631 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
3632 ordering would mean dataflow inspection is necessary.
3634 2003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
3636 * coffcode.h (coff_set_flags): Added get/set arch hooks.
3638 2003-01-20 Fabio Alemagna <falemagn@aros.org>
3640 * elf32-sh.c: Treat elfNN_bed like other macros defined in
3641 elfxx-target.h and #undef it before #define'ing it.
3642 * elf32-i386.c: Likewise.
3643 * elf32-sh64.c: Likewise.
3644 * elf64-alpha.c: Likewise.
3645 * elf64-sh64.c: Likewise.
3647 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
3649 * bfd-in2.h: Regenerate.
3650 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
3651 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
3652 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
3653 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
3654 R_390_PLTOFF32 and R_390_PLTOFF64.
3655 (elf_s390_reloc_type_lookup): Likewise.
3656 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
3657 of GOTPLT references to a function.
3658 (link_hash_newfunc): Initialize gotplt_refcount.
3659 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
3660 and creation of the got section out of the main switch. Add support
3661 for the gotoff, gotplt and pltoff relocations.
3662 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
3664 (elf_s390_adjust_gotplt): New function.
3665 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
3667 (allocate_dynrelocs): Add comment.
3668 (elf_s390_relocate_section): Change r_type to unsigned. Add support
3669 for gotoff, gotplt and pltoff relocations.
3670 * elf64-s390.c: Same changes as for elf32-s390.c.
3671 * libbfd.h: Regenerate.
3672 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
3673 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
3674 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
3675 and BFD_RELOC_390_PLTOFF64.
3677 2003-01-18 Jakub Jelinek <jakub@redhat.com>
3679 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
3680 R_IA64_TPREL64[LM]SB against non-global symbol properly.
3682 2003-01-16 Jakub Jelinek <jakub@redhat.com>
3684 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
3685 self_dtpmod_done and self_dtpmod_offset.
3686 (allocate_global_data_got): Only use one got entry for all
3687 dtpmod relocs against local symbols.
3688 (allocate_dynrel_entries): Only need .rela.got entry for
3689 dtpmod against global symbol.
3690 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
3691 Reserve space in .rela.got for the local dtpmod entry.
3692 (set_got_entry): Initialize the common local dtpmod .got entry.
3693 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
3694 and R_IA_64_DTPREL64MSB.
3696 2003-01-16 Alan Modra <amodra@bigpond.net.au>
3698 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
3699 (R_PPC_*): Rename all occurrences to R_PPC64_*.
3700 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
3701 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
3702 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
3703 relative relocs, not with absolute ones.
3704 * Makefile.am: Run "make dep-am".
3705 * Makefile.in: Regenerate.
3706 * po/SRC-POTFILES.in: Regenerate.
3708 2003-01-15 Andreas Schwab <schwab@suse.de>
3710 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
3711 relocation against a non-allocated readonly section.
3713 2003-01-10 Alan Modra <amodra@bigpond.net.au>
3715 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
3716 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
3718 2002-01-08 Klee Dienes <kdienes@apple.com>
3720 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
3721 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
3722 * Makefile.in: Regenerate.
3724 2003-01-08 Alexandre Oliva <aoliva@redhat.com>
3726 * elfn32-mips.c (prev_reloc_section): New.
3727 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
3728 (SET_RELOC_ADDEND): Parenthesize macro argument.
3730 2003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
3732 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
3733 adjust addil instructions if the symbol has no section.
3735 2003-01-07 DJ Delorie <dj@redhat.com>
3737 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
3740 2003-01-07 Andreas Schwab <schwab@suse.de>
3742 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
3743 PC relative relocations.
3744 (elf_m68k_discard_copies): Set it here instead.
3746 2002-01-02 Ben Elliston <bje@redhat.com>
3747 Jeff Johnston <jjohnstn@redhat.com>
3749 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
3750 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
3751 (BFD32_BACKENDS): Add elf32-iq2000.lo.
3752 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
3753 (cpu-iq2000.lo): New target.
3754 * Makefile.in: Regenerate.
3755 * config.bfd: Handle iq2000-*-elf.
3756 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
3757 (bfd_archures_list): Add bfd_iq2000_arch.
3758 * configure.in: Handle bfd_elf32_iq2000_vec.
3759 * configure: Regenerate.
3760 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
3761 and BFD_RELOC_IQ2000_UHI16.
3762 * targets.c (bfd_elf32_iq2000_vec): Declare.
3763 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
3764 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
3765 * cpu-iq2000.c: New file.
3766 * elf32-iq2000.c: Likewise.
3767 * libbfd.h: Regenerate.
3768 * bfd-in2.h: Likewise.
3770 2003-01-02 Richard Sandiford <rsandifo@redhat.com>
3772 * elfxx-mips.c: Include libiberty.h.
3773 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
3774 (mips_set_isa_flags): New function, split out from...
3775 (_bfd_mips_elf_final_write_processing): ...here. Only call
3776 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
3777 (mips_mach_extensions): New array.
3778 (mips_32bit_flags_p): New function.
3779 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
3780 Use mips_32bit_flags_p to check if one binary is 32-bit and the
3781 other is 64-bit. When adopting IBFD's architecture, adopt the
3782 bfd_mach as well as the flags.
3784 2003-01-02 Nick Kelsey <nickk@ubicom.com>
3786 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
3787 fix internal errors, fix bad code generation, fix incorrect stabs
3788 information, and improve ability to eliminate redundant page
3789 instructions. Added code to ip2k_final_link_relocate to self-verify
3790 the linker relaxation. Fix formatting problems.
3792 2002-12-30 Chris Demetriou <cgd@broadcom.com>
3794 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
3795 * archures.c (bfd_mach_mipsisa32r2): New define.
3796 * bfd-in2.h: Regenerate.
3797 * cpu-mips.c (I_mipsisa32r2): New enum value.
3798 (arch_info_struct): Add entry for I_mipsisa32r2.
3799 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
3800 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
3801 (_bfd_mips_elf_final_write_processing): Add
3802 bfd_mach_mipsisa32r2 case.
3803 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
3804 binaries marked as using MIPS32 Release 2.
3806 2002-12-30 Dmitry Diky <diwil@mail.ru>
3808 * Makefile.am: Add msp430 target.
3809 * configure.in: Likewise.
3810 * Makefile.in: Regenerate.
3811 * configure: Regenerate.
3812 * archures.c: Add msp430 architecture vector.
3813 * config.bfd: Likewise.
3814 * reloc.c: Add msp430 relocs.
3815 * targets.c: Add msp320 target.
3816 * cpu-msp430.c: New file: msp430 cpu detection.
3817 * elf32-msp430.c: New file: msp430 reloc processing.
3818 * bfd-in2.h: Regenerate.
3819 * libbfd.h: Regenerate.
3821 2002-12-28 Jakub Jelinek <jakub@redhat.com>
3823 * elf.c (elf_sort_sections): Don't reorder .tbss.
3824 (assign_file_positions_for_segments): Only adjust off/voff
3825 for increased alignment in PT_LOAD or PT_NOTE segment,
3826 but adjust p_filesz for .tbss too. in PT_LOAD consider
3827 .tbss to have zero memory size.
3828 (copy_private_bfd_data) [SECTION_SIZE]: Define.
3829 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
3830 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
3831 into PT_TLS segment. Never put SHF_TLS sections in
3832 segments other than PT_TLS or PT_LOAD.
3834 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
3837 2002-12-23 DJ Delorie <dj@redhat.com>
3839 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
3841 2002-12-23 Alan Modra <amodra@bigpond.net.au>
3843 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
3845 2002-12-23 Nick Clifton <nickc@redhat.com>
3847 * archures.c (bfd_arch_get_compatible): Add third parameter
3848 'accept_unknowns'. Only accept unknown format BFDs if
3849 accept_unknowns is true, or if the format is "binary".
3850 * bfd-in2.h: Regenerate.
3852 2002-12-21 Nick Clifton <nickc@redhat.com>
3854 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
3855 that subtracted 8 from pc relative relocations.
3857 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
3859 * coff-h8300.c: Fix comment typos.
3860 * coffcode.h: Likewise.
3861 * cpu-cris.c: Likewise.
3862 * elf32-vax.c: Likewise.
3863 * genlink.h: Likewise.
3864 * linker.c: Likewise.
3866 * tekhex.c: Likewise.
3867 * vms-misc.c: Likewise.
3869 2002-12-20 DJ Delorie <dj@redhat.com>
3871 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
3872 * libbfd.h: Regenerate.
3873 * bfd-in2.h: Regenerate.
3874 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
3875 (xstormy16_reloc_map): Add R_XSTORMY16_12.
3877 2002-12-19 Kazu Hirata <kazu@cs.umass.edu>
3879 * doc/bfdint.texi: Fix typos.
3881 2002-12-20 Paul Eggert <eggert@twinsun.com>
3883 Port to POSIX 1003.1-2001.
3884 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
3885 * configure.in (build-warnings): Likewise.
3886 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
3887 * aclocal.m4: Regenerate.
3888 * config.in: Regenerate.
3889 * configure: Regenerate.
3891 2002-12-19 Alan Modra <amodra@bigpond.net.au>
3893 * coff-h8300.c: Include libiberty.h.
3894 (h8300_reloc16_extra_cases): Check the hash table creator before
3895 referencing h8300 specific fields. Stash the hash table pointer
3896 in a local var. Comment typo fixes.
3897 (h8300_bfd_link_add_symbols): Likewise.
3899 * reloc.c (struct reloc_howto_struct): Revise src_mask and
3901 * bfd-in2.h: Regenerate.
3903 2002-12-18 Alan Modra <amodra@bigpond.net.au>
3905 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
3906 code a little. Comment on dynamic relocs against section symbols.
3908 2002-12-17 Roger Sayle <roger@eyesopen.com>
3910 * configure.host (ia64-*-hpux*): Support 64 bit targets using
3911 the HP compiler's "long long".
3913 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
3915 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
3916 and R_XSTORMY16_HI16) howto entries.
3917 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
3918 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
3919 determine the start of the second reloc table.
3921 2002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
3923 * ecofflink.c: Fix the reading of the debugging information
3924 of Tru64/Alpha binaries that are produced by recent Compaq
3926 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
3928 (lookup_line): Because of the strange information sometimes
3929 generated by Compaq's recent compilers, change how the FDR
3930 table is searched so that PDRs (procedure descriptors) are
3931 correctly found. Note that this change is really more of a hack;
3932 however, I have included extensive documentation as to why
3933 this is the best solution short of an extensive rewrite or
3935 (fdrtab_lookup): Add comments to explain the algorithm.
3937 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
3939 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
3940 initializers to match struct declaration.
3942 2002-12-12 Alan Modra <amodra@bigpond.net.au>
3944 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
3945 * elf.c (get_program_header_size): Likewise.
3946 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
3947 (m32r_elf_generic_reloc): Likewise.
3948 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
3949 * elflink.h (elf_bfd_discard_info): Likewise.
3951 2002-12-12 Alan Modra <amodra@bigpond.net.au>
3953 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
3954 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
3955 DT_RELSZ adjustment, not output section. Avoid writing tags when
3956 unchanged. Don't assume linker script is sane, adjust DT_REL too.
3957 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
3958 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
3959 DT_RELASZ adjustment, not output section. Avoid writing tags when
3960 unchanged. Adjust DT_RELA.
3961 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
3962 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
3964 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
3966 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
3969 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
3971 * elfxx-mips.c (struct mips_got_entry): New.
3972 (struct mips_got_info): Added got_entries field.
3973 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
3974 (mips_elf_local_got_index, mips_elf_got_page,
3975 mips_elf_got16_entry): Re-implement in terms of new...
3976 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
3978 (mips_elf_highest): Warning clean-up.
3979 (mips_elf_create_got_section): Initialize got_entries.
3980 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
3982 (_bfd_mips_elf_size_dynamic_sections): Do not account for
3983 GOT_PAGE entries, since we now reuse GOT16 entries.
3985 2002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
3987 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
3988 read-only section that lies after .text and before .data to be
3989 written into the output file and included in a_text.
3990 (translate_to_native_sym_flags): If an otherwise unrepresentable
3991 section was merged with .text, convert its symbols to N_TEXT
3993 * libaout.h (aout_section_merge_with_text_p): New macro.
3995 2002-12-08 Alan Modra <amodra@bigpond.net.au>
3997 * bfd-in.h: Comment typo fix. Formatting.
3998 * bfd-in2.h: Regenerate.
3999 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
4000 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
4001 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
4003 2002-12-05 Richard Henderson <rth@redhat.com>
4005 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
4006 Only send PCREL21B though the plt. Fix installed reloc type.
4007 (elfNN_ia64_relocate_section): Give error for dynamic reloc
4008 against PCREL22 or PCREL64I; clean up error messages for
4011 2002-12-04 Kevin Buettner <kevinb@redhat.com>
4013 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
4015 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
4017 2002-12-04 David Mosberger <davidm@hpl.hp.com>
4019 * cpu-ia64-opc.c: Add operand constant "ar.csd".
4021 2002-12-04 H.J. Lu <hjl@gnu.org>
4023 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
4024 BFD address when constructing local name.
4026 2002-12-04 Andreas Schwab <schwab@suse.de>
4028 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
4030 (elf_m68k_link_hash_table_create): Initialize it.
4031 (elf_m68k_check_relocs): Handle symbols that are forced to be
4032 local due to visibility changes.
4033 (elf_m68k_adjust_dynamic_symbol): Likewise.
4034 (elf_m68k_size_dynamic_sections): Likewise.
4035 (elf_m68k_discard_copies): Likewise.
4036 (elf_m68k_relocate_section): Likewise.
4038 2002-12-04 Alan Modra <amodra@bigpond.net.au>
4040 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
4042 2002-12-04 Alan Modra <amodra@bigpond.net.au>
4044 * srec.c (srec_write_symbols): Restore '$' prefix to address
4045 accidentally removed in 2002-04-04 change.
4046 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
4048 2002-12-03 Nick Clifton <nickc@redhat.com>
4050 * elf32-ppc.c (apuinfo_list_init): New function.
4051 (apuinfo_list_add): New function: Add a value to the list.
4052 (apuinfo_list_length): New function: Return the number of
4054 (apuinfo_list_element): New function: Return a value on the
4056 (apuinfo_list_finish): New function: Free the resources used
4058 (ppc_elf_begin_write_processing): New function. Scan the
4059 input bfds for apuinfo sections.
4060 (ppc_elf_write_section): New function: Delay the creation of
4061 the contents of an apuinfo section in an output bfd.
4062 (ppc_elf_final_write_processing): New function. Create the
4063 contents of an apuinfo section in an output bfd.
4064 (elf_backend_begin_write_processing): Define.
4065 (elf_backend_final_write_processing): Define.
4066 (elf_backend_write_section): Define.
4068 2002-12-03 Richard Henderson <rth@redhat.com>
4070 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
4072 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
4074 Fix PR savannah/1417:
4075 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
4076 branch if it goes to the start of the deleted region.
4078 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
4080 * bfd-in2.h (bfd_mach_m6812): Rebuild.
4081 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
4082 bfd_mach_m6812s): Declare.
4084 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
4085 (_bfd_m68hc12_elf_set_private_flags): Call it.
4086 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
4087 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
4088 report microcontroller incompatibilities (HC12 vs HCS12).
4089 (elf_backend_object_p): Update.
4091 2002-11-30 Alan Modra <amodra@bigpond.net.au>
4093 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
4094 (enum bfd_boolean, boolean): Delete.
4095 (bfd_boolean): Typedef to an int.
4096 (FALSE, TRUE): Define.
4097 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
4098 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
4099 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
4100 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
4101 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
4102 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
4103 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
4104 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
4105 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
4106 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
4107 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
4108 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
4109 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
4110 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
4111 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
4112 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
4113 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
4114 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
4115 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
4116 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
4117 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
4118 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
4119 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
4120 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
4121 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
4122 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
4123 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
4124 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
4125 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
4126 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
4127 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
4128 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
4129 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
4130 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
4131 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
4132 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
4133 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
4134 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
4135 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
4136 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
4137 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
4138 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
4139 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
4140 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
4141 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
4142 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
4143 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
4144 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
4145 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
4146 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
4147 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
4148 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
4149 of bfd_boolean vars with TRUE/FALSE. Formatting.
4150 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
4152 2002-11-28 Alan Modra <amodra@bigpond.net.au>
4154 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
4155 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
4156 with Elf_Internal_Rela.
4157 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
4158 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
4159 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
4160 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
4161 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
4162 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
4163 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
4164 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
4165 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
4166 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
4167 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
4168 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
4170 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
4171 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
4172 Remove INLINE keyword.
4173 (elf_swap_reloc_in): Likewise. Also clear r_addend.
4174 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
4176 (elf_write_relocs): Consolidate REL and RELA code.
4177 (elf_slurp_reloc_table_from_section): Simplify REL code.
4178 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
4179 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
4180 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
4182 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
4183 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
4184 (elf_link_output_relocs): Likewise.
4185 (elf_reloc_link_order): Likewise.
4186 (elf_finish_pointer_linker_section): Likewise.
4187 (struct elf_link_sort_rela): Remove union.
4188 (elf_link_sort_cmp1): Update to suit.
4189 (elf_link_sort_cmp2): Here too.
4190 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
4191 over-allocation for int_rels_per_ext_rel != 1 case.
4192 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
4193 * elf32-i386.c: Likewise.
4194 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
4195 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
4196 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
4197 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
4198 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
4199 elf64-sparc.c, elf64-x86-64.c: Likewise.
4200 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
4201 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
4202 bfd_elf32_swap_reloc_in.
4204 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
4205 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
4206 (mips_elf64_swap_reloc_in): Zero r_addend.
4207 (mips_elf64_be_swap_reloc_in): Likewise.
4208 (mips_elf64_slurp_one_reloc_table): Simplify.
4210 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
4211 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
4212 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
4214 2002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4216 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
4217 unresolved debugging relocs in dynamic applications.
4218 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
4220 2002-11-26 Alan Modra <amodra@bigpond.net.au>
4222 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
4223 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
4224 on a relocatable link. Comment typos.
4225 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
4226 in the order they are declared. Clear elf_hash_value too.
4227 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
4228 eh_info and tls_segment.
4229 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
4230 sorted when discarding relocs by turning them into R_*_NONE.
4232 * libbfd.c (warn_deprecated): Comment spelling.
4233 * po/SRC-POTFILES.in: Regenerate.
4235 2002-11-21 Richard Henderson <rth@redhat.com>
4237 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
4238 arch's st_other bits when merging visibilities.
4239 (elf_link_output_extsym): Tidy clearing of visibility field.
4241 2002-11-21 Alan Modra <amodra@bigpond.net.au>
4243 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
4244 (SWAP_OUT_RELOC_OFFSET): Define.
4246 2002-11-20 Alexandre Oliva <aoliva@redhat.com>
4248 * elf.c (_bfd_elf_link_hash_table_init): Make sure
4249 can_refcount is properly extended to the type of
4252 2002-11-19 Alexandre Oliva <aoliva@redhat.com>
4254 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
4255 (_bfd_mips_elf_relocate_section): Use it.
4257 * elfxx-mips.c (MNAME): New macro.
4258 (_bfd_mips_elf_check_relocs): Use it.
4259 (_bfd_mips_elf_discard_info): Likewise.
4260 (_bfd_mips_elf_final_link): Likewise.
4262 2002-11-19 Alan Modra <amodra@bigpond.net.au>
4264 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
4265 rel_hdr.sh_size too.
4267 2002-11-18 Klee Dienes <kdienes@apple.com>
4269 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
4270 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
4271 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
4272 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
4273 Add dependencies for bfdwin.c, bfdio.c.
4274 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
4275 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
4276 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
4277 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
4278 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
4279 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
4280 bfd_get_size (moved from libbfd.c and bfd.c).
4281 * bfdwin.c New file. Contains _bfd_window_internal,
4282 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
4283 libbfd.c and bfd.c).
4284 * po/SRC-POTFILES.in: Regenerate.
4285 * po/bfd.pot: Regenerate.
4286 * libbfd.h: Regenerate.
4287 * bfd-in2.h: Regenerate.
4288 * aclocal.m4: Regenerate.
4289 * Makefile.in: Regenerate.
4290 * configure: Regenerate.
4292 2002-11-18 Klee Dienes <kdienes@apple.com>
4294 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
4296 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
4298 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
4299 jsr after a short jump.
4300 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
4302 2002-11-15 Klee Dienes <kdienes@apple.com>
4304 * pef.c (bfd_pef_convert_architecture): Move declaration of
4305 ARCH_POWERPC and ARCH_M68K to the start of the function.
4307 2002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
4309 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
4311 2002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
4313 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
4314 For bpo_gregs_section->contents, allocate _raw_size, not
4317 2002-11-13 Klee Dienes <kdienes@apple.com>
4319 * config.bfd: Add entries for powerpc-*-darwin and cousins.
4321 2002-11-13 H.J. Lu <hjl@gnu.org>
4323 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
4325 2002-11-13 Klee Dienes <kdienes@apple.com>
4326 Alan Modra <amodra@bigpond.net.au>
4328 * bfd.c (struct bfd_preserve): New.
4329 (bfd_preserve_save): New function.
4330 (bfd_preserve_restore): Ditto.
4331 (bfd_preserve_finish): Ditto.
4332 * bfd-in2.h: Regenerate.
4333 * mach-o.c: Formatting.
4334 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
4335 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
4336 (bfd_mach_o_core_p): Ditto.
4337 (bfd_mach_o_scan): Pass in mdata.
4338 * mach-o.h (bfd_mach_o_scan): Update prototype.
4339 * pef.c: Formatting.
4340 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
4341 (bfd_pef_xlib_object_p): Ditto.
4342 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
4343 * pef.h (bfd_pef_scan): Update prototype.
4344 * xsym.c: Formatting, K&R fixes.
4345 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
4346 (bfd_sym_scan): New function split out from bfd_sym_object_p.
4347 * xsym.h (bfd_sym_scan): Declare.
4348 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
4349 * elfcore.h (elf_core_file_p): Likewise.
4350 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
4352 2002-11-12 Nick Clifton <nickc@redhat.com>
4354 * po/da.po: Updated Danish translation.
4356 2002-11-12 Alan Modra <amodra@bigpond.net.au>
4358 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
4359 relocatable link too.
4360 (elf_link_input_bfd): When emitting relocs, adjust offsets for
4361 eh_frame and stab sections. Zap deleted relocs.
4362 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
4363 (elf_bfd_discard_info): Run for relocatable link too.
4364 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
4366 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
4367 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
4369 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
4370 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
4371 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
4372 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
4373 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
4374 (struct elf_link_hash_table): Add eh_info.
4375 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
4376 (_bfd_elf_discard_section_eh_frame): Update prototype.
4377 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
4378 (_bfd_elf_write_section_eh_frame): Likewise.
4379 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
4380 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
4381 param. Get "hdr_info" from link hash table.
4382 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
4383 header section from link hash table. Save header section to elf_tdata.
4384 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
4385 header section from link hash table. Don't alloc hdr_info. Clear
4386 hdr_sec instead of setting "strip".
4387 (_bfd_elf_eh_frame_section_offset): Formatting.
4388 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
4389 Get header section from link hash table.
4390 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
4391 Get header section from link hash table.
4392 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
4393 (get_program_header_size): Likewise.
4394 (_bfd_elf_section_offset): Formatting.
4395 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
4396 section pointer in link hash table.
4397 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
4398 and _bfd_elf_write_section_eh_frame calls. Update comment about
4400 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
4401 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
4403 * po/SRC-POTFILES.in: Regenerate.
4405 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
4406 relocs for discarded FDEs. Remove dead code.
4407 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
4408 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
4409 Tidy conditions under which stabs are edited. Formatting.
4410 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
4411 from discarded relocs.
4412 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
4413 section adjustments after testing magic values.
4415 2002-11-12 Thomas Moestl <tmm@FreeBSD.org>
4417 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
4418 references to large plt symbols.
4420 2002-11-12 Klee Dienes <kdienes@apple.com>
4422 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
4423 looking for an unused section name.
4425 2002-11-11 Kazu Hirata <kazu@cs.umass.edu>
4427 * coff-h8300.c: Fix formatting.
4428 * elf32-h8300.c: Likewise.
4429 * reloc16.c: Likewise.
4431 2002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
4433 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
4434 section when dynamic section unused; _bfd_strip_section_from_output
4437 2002-11-08 Alan Modra <amodra@bigpond.net.au>
4439 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
4442 * dwarf2.c: Revert last change.
4444 2002-11-07 Michal Ludvig <mludvig@suse.cz>
4446 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
4447 _bfd_dwarf2_find_nearest_line): Use
4448 bfd_simple_get_relocated_section_contents() instead of
4449 bfd_get_section_contents().
4450 * reloc.c (bfd_perform_relocation): Add sanity check.
4451 * simple.c (simple_get_relocated_section_contents): If the section
4452 does not have any relocs associated with it, just return the
4453 unadjusted contents.
4455 2002-11-07 Hans-Peter Nilsson <hp@axis.com>
4457 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
4458 case R_CRIS_32_GOT>: Correct test for filling in constant .got
4459 contents, enabling for a non-DSO, for symbols defined in the
4460 program with --export-dynamic.
4462 2002-11-07 Alan Modra <amodra@bigpond.net.au>
4464 * elf64-ppc.c: Comment typo fixes.
4465 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
4467 2002-11-07 Nick Clifton <nickc@redhat.com>
4469 * po/da.po: Updated Danish translation.
4471 2002-11-06 Alexandre Oliva <aoliva@redhat.com>
4473 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
4474 exactly three internal relocs per external reloc. Set reloc_count
4475 to the external reloc count.
4477 2002-11-06 Klee Dienes <kdienes@apple.com>
4479 * coff-stgo32.c (stub_bytes): Mark as const.
4480 Fix comment formatting.
4482 2002-11-06 Klee Dienes <kdienes@apple.com>
4484 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
4486 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
4487 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
4488 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
4489 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
4490 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
4492 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
4493 * Makefile.in: Regenerate.
4494 * doc/Makefile.in: Regenerate.
4495 * bfd-in2.h: Regenerate.
4496 * xsym.c: New file. Contains support for the Apple/Metrowerks
4497 xSYM debugging format.
4499 * pef.c: New file. Contains support for the Apple Code Fragment
4500 Manager Preferred Executable Format
4502 * pef-traceback.h: New file. Contains support for parsing PowerPC
4503 traceback tables as used by PEF executables (and perhaps other
4505 * mach-o.c: New file. Contains support for the Mach-O object file
4507 * mach-o.h: New file.
4508 * mach-o-target.c: New file. Declares the mach-o targets
4509 themselves. Included three times by mach-o.c; each time with a
4510 different set of macros set.
4512 2002-11-06 Graeme Peterson <gp@qnx.com>
4514 * Makefile.am: Remove entries for elf32-qnx.[ch].
4515 * Makefile.in: Regenerate.
4516 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
4517 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
4518 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
4519 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
4520 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
4521 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
4522 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
4523 * configure: Regenerate.
4524 * elf32-qnx.c: Remove.
4525 * elf32-qnx.h: Remove.
4526 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
4527 is_contained_by_filepos, and copy_private_bfd_data_p.
4528 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
4529 is_contained_by_filepos, and copy_private_bfd_data_p.
4530 * elf32-i386.c: Remove QNX extended bfd support.
4531 * elf32-ppc.c: Remove QNX extended bfd support.
4532 * elf32-sh.c: Remove QNX extended bfd support.
4533 * elfarm-nabi.c: Remove QNX extended bfd support.
4534 * targets.c: Remove qnx vectors.
4535 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
4536 (elf_backend_is_contained_by_filepos): Remove.
4537 (elf_backend_copy_private_bfd_data_p): Remove.
4538 * po/SRC-POTFILES.in: Regenerate.
4540 2002-11-06 David O'Brien <obrien@FreeBSD.org>
4541 Alan Modra <amodra@bigpond.net.au>
4543 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
4544 dynamic relocs against section symbols for the output section vma.
4546 2002-11-05 Alan Modra <amodra@bigpond.net.au>
4548 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
4549 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
4551 2002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4552 Alan Modra <amodra@bigpond.net.au>
4554 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
4555 vectors in target_selvecs.
4556 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
4558 (sh-*-netbsdelf*): Likewise.
4559 * configure.in (assocvecs): New variable. Handle assocvecs like
4561 * configure: Regenerate.
4562 * format.c (bfd_check_format_matches): Store bfd_target pointers
4563 in matching_vector instead of target names. Select first target
4564 from bfd_associated_vector that matches a list of ambiguous targets.
4565 * targets.c (_bfd_associated_vector): New array.
4566 (bfd_associated_vector): New variable.
4567 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
4568 * libbfd-in.h (bfd_associated_vector): Declare.
4569 * libbfd.h: Regenerate.
4571 2002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
4573 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
4574 non-NULL before dereferencing.
4576 2002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4578 * vms.c (vms_object_p): Restore the start address when returning
4581 2002-11-04 Alan Modra <amodra@bigpond.net.au>
4582 Hans-Peter Nilsson <hp@axis.com>
4584 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
4585 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
4586 Set up a larger symshndxbuf, and write it out. Free it on
4587 exit rather than freeing symbuf twice. Correct section index
4588 on output section symbol loop.
4589 (elf_link_output_sym): Accumulate symbol extension section
4590 indices, reallocating symshndxbuf rather than writing it out.
4591 (elf_link_flush_output_syms): Don't flush symshndxbuf.
4592 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
4593 Use bfd_zalloc to clear i_shdrp[0] too.
4595 2002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
4597 * elf32-sh64-com.c (sh64_address_in_cranges): Use
4598 _raw_size of cranges section if _cooked_size not yet set.
4600 2002-11-03 Hans-Peter Nilsson <hp@axis.com>
4602 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
4603 for bfd_elf32_swap_symbol_out.
4605 2002-10-31 David O'Brien <obrien@FreeBSD.org>
4607 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
4608 signed and unsigned in comparison.
4610 2002-10-30 Daniel Jacobowitz <drow@mvista.com>
4612 * coffcode.h: Remove extraneous '\'.
4614 2002-10-28 H.J. Lu <hjl@gnu.org>
4616 * Makefile.am (targets.lo): Depend on Makefile instead of
4618 (archures.lo): Likewise.
4619 * Makefile.in: Regenerated.
4621 2002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
4623 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
4624 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
4627 2002-10-25 Jim Wilson <wilson@redhat.com>
4629 * elf64-sh64.c (sh_elf64_relocate_section): Call
4630 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
4631 of SHF_MERGE section.
4633 2002-10-25 Hans-Peter Nilsson <hp@axis.com>
4635 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
4637 2002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
4639 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
4640 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
4642 (NAME(aout,final_link)): Cast enum used in assignment.
4643 (aout_link_write_symbols): Cast enums in comparisons, int values to
4644 boolean, enums in assignments to int.
4645 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
4646 (aout_link_input_section_ext): Likewise. Cast enums used in
4647 comparisons with unsigned ints.
4648 (aout_link_reloc_link_order): Cast enum to int in assignment.
4649 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
4651 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
4653 * bfd-in2.h (bfd_set_section_vma): Likewise.
4654 * bfd.c (bfd_record_phdr): Cast enums in assignments.
4655 * binary.c (bfd_alloc): Cast enum to long.
4656 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
4657 * dwarf2.c (read_abbrevs): Add casts to enum types.
4658 (read_attribute_value): Likewise.
4659 (arange_add): Cast result of bfd_zalloc call.
4660 (comp_unit_contains_address): Return true and false.
4661 (comp_unit_find_nearest_line): Cast return to boolean.
4662 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
4663 * gen-aout.c: define macro '_' if not defined.
4664 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
4665 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
4666 (bfd_write_bigendian_4byte_int): Cast return to boolean.
4667 (bfd_seek): Cast bfd_realloc to bfd_byte *.
4668 (bfd_generic_is_local_label_name): Cast return to boolean.
4669 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
4670 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
4671 struct bfd_hash_entry *.
4672 (_bfd_generic_link_hash_newfunc): likewise.
4673 (_bfd_generic_final_link): Cast enum to unsigned int.
4674 * merge.c (sec_merge_emit): Cast return to boolean.
4675 (merge_strings): Add casts to const unsigned char *.
4676 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
4677 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
4678 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
4679 to struct bfd_hash_entry *.
4680 (bfd_set_section_content): Add cast to PTR in comparison.
4681 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
4682 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
4683 simple_dummy_unattached_reloc,
4684 bfd_simple_get_relocated_section_contents): Add K&R declarations and
4685 function definitions.
4686 * srec.c (S3Forced): Initialize to false.
4687 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
4688 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
4689 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
4690 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
4691 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
4694 2002-10-23 Jakub Jelinek <jakub@redhat.com>
4696 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
4697 relocs into shared lib non-allocated reloc sections.
4699 2002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
4701 * dwarf2.c (add_line_info): Ensure that the line_info_table is
4702 sorted even when given an out-of-order line sequence.
4703 (lookup_address_in_line_info_table): When an exact VMA match is
4704 not found, return line information with the closest VMA.
4706 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
4708 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
4709 HPUX 11.00 patch PHSS_26559.
4711 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
4713 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
4714 the options section into a separate section unless IRIX 6
4715 compatibility is enabled.
4717 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
4719 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
4721 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
4722 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
4724 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
4725 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
4727 2002-10-21 Graeme Peterson <gp@qnx.com>
4729 * targets.c (_bfd_target_vector): Add missing qnx vectors.
4731 2002-10-21 Alan Modra <amodra@bigpond.net.au>
4733 * targets.c (bfd_target_list): Don't return the default target twice.
4735 2002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
4737 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
4738 perror with bfd_perror.
4740 2002-10-19 H.J. Lu <hjl@gnu.org>
4742 * elflink.h (elf_link_add_object_symbols): Correctly handle
4743 DT_RPATH and DT_RUNPATH.
4745 2002-10-19 Mark Kettenis <kettenis@gnu.org>
4747 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
4749 2002-10-17 Denis Chertykov <denisc@overta.ru>
4751 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
4754 2002-10-17 Alan Modra <amodra@bigpond.net.au>
4756 * elfxx-target.h (USE_REL): Don't define as 1.
4757 * elf32-arm.h (USE_REL): Provide a default define of 0.
4758 Use #if rather than #ifdef when testing USE_REL.
4759 * elf32-m32r.c: Likewise.
4761 * elf32-arc.c (USE_REL): Define as 1.
4762 * elf32-d10v.c (USE_REL): Likewise.
4763 * elf32-m32r.c (USE_REL): Likewise.
4764 * elf32-m68hc11.c (USE_REL): Likewise.
4765 * elf32-m68hc12.c (USE_REL): Likewise.
4766 * elf32-or32.c (USE_REL): Likewise.
4767 * elfarm-nabi.c (USE_REL): Likewise.
4769 2002-10-16 Jakub Jelinek <jakub@redhat.com>
4771 * config.bfd (s390-*-linux*): Add targ64_selvecs.
4772 (s390x-*-linux*): Add targ_selvecs.
4774 2002-10-16 Alan Modra <amodra@bigpond.net.au>
4776 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
4777 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
4778 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
4779 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
4780 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
4781 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
4782 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
4783 (SOURCE_HFILES): Add elf32-qnx.h.
4784 (BUILD_HFILES): Add bfdver.h.
4786 * Makefile.in: Regenerate.
4787 * configure.in Update bfd vector dependencies.
4788 * configure: Regenerate.
4789 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
4790 * elf32-i386qnx.c: Likewise.
4791 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
4792 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
4793 * elf32-sh-lin.c: Likewise.
4794 * elf32-shqnx.c: Likewise.
4795 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
4796 * elf32-sh64-nbsd.c: Likewise.
4797 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
4798 * elf64-sh64-nbsd.c: Likewise.
4799 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
4800 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
4801 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
4802 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
4803 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
4804 (elf_backend_is_contained_by_filepos): Likewise.
4805 (elf_backend_copy_private_bfd_data_p): Likewise.
4806 Globalize and move functions to..
4807 * elf32-qnx.c: ..here. New file.
4808 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
4809 emit target vectors when INCLUDE_SHMEDIA.
4810 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
4812 * elf64-sh64.c: Remove ELF_ARCH test.
4813 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
4814 * po/BLD-POTFILES.in: Regenerate.
4815 * po/SRC-POTFILES.in: Regenerate.
4817 2002-10-16 Alan Modra <amodra@bigpond.net.au>
4819 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
4820 loaded with --just-symbols.
4822 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
4823 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
4824 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
4825 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
4827 2002-10-15 Richard Henderson <rth@redhat.com>
4829 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
4830 (BFD64_BACKENDS_CFILES): Likewise.
4831 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
4832 * elf64-alpha-fbsd.c: Remove file, move code ...
4833 * elf64-alpha.c: ... here.
4834 * Makefile.in, configure: Rebuild.
4836 2002-10-14 Richard Henderson <rth@redhat.com>
4838 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
4841 2002-10-14 Stephen Clarke <stephen.clarke@superh.com>
4843 * elf32-sh.c (elf_sh_link_hash_entry): Replace
4844 datalabel_got_offset with union of datalabel_got
4845 offset and refcount.
4846 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
4847 (allocate_dynrelocs): Delete unnecessary code for
4848 STT_DATALABEL type. Create entry in got for
4849 datalabel version of symbol if datalabel_got.refcount > 0.
4850 (sh_elf_relocate_section): Use datalabel_got union.
4851 (sh_elf_gc_sweep_hook): Pull common code to initialize
4852 h and eh out of switch statement. Declare seen_stt_datalabel.
4853 Initialize it. Decrement datalabel_got.refcount for
4854 got relocs when seen_stt_datalabel is true.
4855 Decrement local_got_refcounts entry for datalabel got relocs
4857 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
4858 (sh_elf_check_relocs): Declare seen_stt_datalabel.
4859 Initialize it. When seen_stt_datalabel is true, increment
4860 datalabel_got refcount rather than got.refcount.
4861 (sh_elf_finish_dynamic_symbol): Create relocs to
4862 initialize got entry for datalabel version of symbol.
4864 2002-10-14 Alan Modra <amodra@bigpond.net.au>
4866 * Makefile.am: Run "make dep-am".
4867 (BFD_H_FILES): Remove version.h.
4868 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
4869 * version.h: ..to here.
4870 * configure.in (bfd_version_date): Remove.
4871 (AC_OUTPUT): Make bfdver.h from version.h.
4872 * bfd.c: #include "bfdver.h".
4873 * vms-hdr.c: Likewise.
4874 * Makefile.in: Regenerate.
4875 * bfd-in2.h: Regenerate.
4876 * configure: Regenerate.
4877 * po/SRC-POTFILES.in: Regenerate.
4879 2002-10-14 Alan Modra <amodra@bigpond.net.au>
4881 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
4882 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
4883 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
4884 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
4885 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
4886 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
4887 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
4888 bfd_mach_ip2022, bfd_mach_ip2022ext,
4889 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
4890 * bfd-in2.h: Regenerate.
4892 2002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4894 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
4895 endian vector to targ_selvecs.
4897 2002-10-13 Alexandre Oliva <aoliva@redhat.com>
4899 * elfxx-mips.c (mips_elf_calculate_relocation): Take
4900 save_addend argument. Don't apply the 32-bit mask to a
4901 GPREL32 value if it's to be used in another relocation. Don't
4902 use forced-check computation of local_p to decide whether to
4903 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
4904 of the addend of a non-in-place GPREL16 relocation.
4905 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
4906 mips_elf_calculate_relocation().
4908 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
4910 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
4911 with symbols in other sections if we relaxed something; the sections
4912 output offsets must be re-computed before.
4914 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
4916 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
4917 handling to use Elf_Internal_Sym.
4918 (m68hc11_elf_relax_delete_bytes): Likewise.
4920 2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4922 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
4923 sh_elf_object_p, dtpoff_base): New functions.
4924 (sh_elf_howto_table): Add TLS relocs.
4925 (sh_reloc_map): Likewise.
4926 (sh_elf_info_to_howto): Support TLS relocs.
4927 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
4928 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
4930 (sh_elf_obj_tdata): New.
4931 (elf_sh_link_hash_table): Add tls_ldm_got.
4932 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
4933 (allocate_dynrelocs): Support TLS relocs.
4934 (sh_elf_size_dynamic_sections): Likewise.
4935 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
4936 .rela.got section when found already. Return false after printing
4937 error about unresolvable relocation.
4938 (sh_elf_gc_sweep_hook): Support TLS relocs.
4939 (sh_elf_check_relocs): Likewise.
4940 (sh_elf_finish_dynamic_symbol): Likewise.
4941 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
4942 * reloc.c: Add SH TLS relocs.
4943 * bfd-in2.h, libbfd.h: Regenerate.
4945 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
4947 * Makefile.in: Regenerated.
4949 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
4951 * Makefile.am: Run dep-am.
4952 (BFD_H_DEP): Add simple.c and linker.c.
4953 (BFD32_LIBS): Add simple.lo.
4954 (BFD32_LIBS_CFILES): Add simple.c.
4955 * Makefile.in: Regenerated.
4956 * bfd-in2.h: Regenerated.
4957 * simple.c: New file.
4959 2002-10-11 Alan Modra <amodra@bigpond.net.au>
4961 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
4962 (record_thumb_to_arm_glue): Likewise.
4963 * ecoff.c (ecoff_link_add_externals): Likewise.
4964 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
4965 (record_thumb_to_arm_glue): Likewise.
4966 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
4967 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
4968 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
4969 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
4970 * elf64-ppc.c (func_desc_adjust): Likewise.
4971 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
4972 (sh64_elf64_create_dynamic_sections): Likewise.
4973 * elflink.c (_bfd_elf_create_got_section): Likewise.
4974 (_bfd_elf_create_dynamic_sections): Likewise.
4975 (_bfd_elf_create_linker_section): Likewise.
4976 * elflink.h (elf_add_default_symbol): Likewise.
4977 (elf_link_create_dynamic_sections): Likewise.
4978 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
4979 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
4980 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
4981 (_bfd_mips_elf_add_symbol_hook): Likewise.
4982 (_bfd_mips_elf_create_dynamic_sections): Likewise.
4983 * linker.c (generic_link_add_symbol_list): Likewise.
4984 * xcofflink.c (xcoff_link_add_symbols): Likewise.
4986 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
4988 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
4989 completely removed. Correct local sym adjustment.
4991 2002-10-10 Stephen Clarke <stephen.clarke@superh.com>
4993 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
4994 Correct mistake in calculation of address of .got.
4995 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
4996 elf_sh64_pic_plt_entry_le): Likewise.
4998 2002-10-09 Richard Shann <richard.shann@superh.com>
4999 Stephen Clarke <stephen.clarke@superh.com>
5001 * Makefile.am: Add entries for elf32-sh64-lin.c and
5002 elf64-sh64-lin.c. Regenerate.
5003 * Makefile.in: Regenerate.
5004 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
5005 to use sh64 vectors rather than sh vectors.
5006 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5007 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5008 * configure: Regenerate.
5009 * elf32-sh64-lin.c: New file.
5010 * elf64-sh64-lin.c: New file.
5011 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5012 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5014 2002-10-08 H.J. Lu <hjl@gnu.org>
5016 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
5017 IE->LE transition for R_386_TLS_IE.
5019 2002-10-08 Alan Modra <amodra@bigpond.net.au>
5021 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
5023 2002-10-07 Mark Elbrecht <snowball3@softhome.net>
5025 * cofflink.c (mark_relocs): Don't mark relocations in excluded
5028 2002-10-07 Alan Modra <amodra@bigpond.net.au>
5030 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
5033 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
5035 2002-10-06 Alan Modra <amodra@bigpond.net.au>
5037 * opncls.c: Formatting.
5038 (_bfd_new_bfd): Use a smaller section hash table.
5040 2002-10-05 Alexandre Oliva <aoliva@redhat.com>
5042 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
5043 of the other two relocations packed with a REL32 to NONE.
5045 2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
5047 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
5048 (sh_elf_link_hash_newfunc): Initialize it.
5049 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
5050 to got.refcount for symbols that are forced local or when
5051 we have direct got refs.
5052 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
5053 to correctly adjust got.refcount and plt.refcount.
5054 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
5055 (sh_elf_check_relocs): Increment gotplt_refcount.
5057 2002-10-01 Jakub Jelinek <jakub@redhat.com>
5059 * elf32-i386.c (elf_i386_relocate_section): Fix
5060 movl foo@indntpoff, %eax IE->LE transition.
5062 2002-10-01 Jakub Jelinek <jakub@redhat.com>
5064 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
5065 sequence and its transitions.
5067 2002-10-01 Jakub Jelinek <jakub@redhat.com>
5069 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
5070 to st_value + addend in non-code sections.
5071 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
5072 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
5074 2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
5075 Ken Raeburn <raeburn@cygnus.com>
5076 Aldy Hernandez <aldyh@redhat.com>
5077 Eric Christopher <echristo@redhat.com>
5078 Richard Sandiford <rsandifo@redhat.com>
5080 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
5081 (bfd_mach_mips5500): New.
5082 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
5083 (arch_info_struct): Add corresponding entries here.
5084 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
5085 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
5086 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
5087 bfd_mach_mips5400 and bfd_mach_mips5500.
5088 (_bfd_mips_elf_mach_extends_p): New function.
5089 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
5090 the EF_MIPS_MACH flags.
5091 * bfd-in2.h: Regenerate.
5093 2002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
5095 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
5098 2002-09-28 Alan Modra <amodra@bigpond.net.au>
5100 * elf.c (map_sections_to_segments): Correct test for start of
5101 writable section in the same page as end of read-only section.
5103 2002-09-27 Matt Thomas <matt@3am-software.com>
5105 * elf32-vax.c (elf_vax_check_relocs): Remove unused
5106 local_got_refcounts usage. Remove allocation of got slot.
5107 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
5108 Remove de-allocation of got slot.
5109 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
5110 traversal for elf_vax_instantiate_got_entries. Allow empty .got
5111 sections to be GC'ed.
5112 (elf_vax_instantiate_got_entries): New function.
5113 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
5114 tests that are now handled by elf_vax_instantiate_got_entries.
5115 Assert GOT entry falls within .got section size. Remove redundant
5116 comparisions. Fix comments.
5118 2002-09-27 Jakub Jelinek <jakub@redhat.com>
5120 * reloc.c: Add x86-64 TLS relocs.
5121 * bfd-in2.h, libbfd.h: Rebuilt.
5122 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
5123 relocs. Add TLS relocs.
5124 (x86_64_reloc_map): Add TLS relocs.
5125 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
5126 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
5127 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
5128 (elf64_x86_64_hash_entry): Define.
5129 (struct elf64_x86_64_obj_tdata): New.
5130 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
5131 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
5132 (link_hash_newfunc): Initialize tls_type.
5133 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
5134 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
5135 (elf64_x86_64_mkobject): New.
5136 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
5137 (elf64_x86_64_tls_transition): New.
5138 (elf64_x86_64_check_relocs): Add r_type variable and use it.
5140 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
5141 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
5142 (elf64_x86_64_size_dynamic_sections): Likewise.
5143 (dtpoff_base, tpoff): New.
5144 (elf64_x86_64_relocate_section): Handle TLS relocs.
5145 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
5147 (bfd_elf64_mkobject): Define.
5149 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
5150 DF_STATIC_TLS if shared.
5152 2002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5154 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
5155 empty relocation sections.
5157 2002-09-26 Alan Modra <amodra@bigpond.net.au>
5159 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
5160 (ppc64_elf_build_stubs): Build them here instead.
5162 2002-09-24 Jakub Jelinek <jakub@redhat.com>
5164 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
5165 addend into r_addend, not *r_offset.
5166 (elf32_sparc_finish_dynamic_symbol): Likewise.
5167 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
5168 R_SPARC_RELATIVE's r_offset.
5170 2002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5172 * dwarf2.c (decode_line_info): Update to correctly decode
5173 the (non-standard DWARF2) out-of-order address sequences
5174 generated by the Intel C++ 6.0 compiler for ia64-Linux.
5176 2002-09-23 Mark Elbrecht <snowball3@softhome.net>
5178 * config.bfd: For DJGPP targets, match with any cpu and any machine.
5180 2002-09-23 Alan Modra <amodra@bigpond.net.au>
5182 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
5183 for discarded FDEs. Remove redundant assignment.
5184 * elflink.h (elf_bfd_discard_info): Save edited relocs.
5186 2002-09-22 H.J. Lu <hjl@gnu.org>
5188 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
5189 the relocation count between different .reloc sections.
5191 2002-09-21 Alan Modra <amodra@bigpond.net.au>
5193 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
5194 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
5195 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
5198 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
5199 unsigned. Move "symcount" assignment out of loop.
5200 * Makefile.am: Run "make dep-am".
5201 * Makefile.in: Regenerate.
5202 * configure: Regenerate.
5203 * po/SRC-POTFILES.in: Regnerate.
5205 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
5207 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
5208 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
5211 2002-09-19 Jakub Jelinek <jakub@redhat.com>
5213 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
5214 even if generating R_PPC_RELATIVE reloc.
5215 (ppc_elf_relocate_section): Make sure relocation is performed
5216 if skip == -2. Clear memory at r_offset when creating dynamic
5219 2002-09-19 Jakub Jelinek <jakub@redhat.com>
5221 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
5222 BFD_RELOC_386_TLS_GOTIE): Add.
5223 * bfd-in2.h, libbfd.h: Rebuilt.
5224 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
5225 and R_386_TLS_GOTIE.
5226 (elf_i386_reloc_type_lookup): Handle it.
5227 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
5228 char instead of enum, change GOT_* into defines.
5229 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
5230 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5231 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
5232 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
5233 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
5234 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5235 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5236 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5237 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
5238 tls_type is GOT_TLS_IE_BOTH.
5239 (elf_i386_size_dynamic_sections): Likewise.
5240 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5241 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5242 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
5243 all 4 GOT_TLS_* TLS types.
5245 2002-09-19 Nick Clifton <nickc@redhat.com>
5247 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
5248 follow indirect links.
5250 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
5252 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
5253 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
5255 (ecoff_swap_sym_in) <iss>: Likewise.
5256 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
5257 ECOFF information: 'ioptMax' refers to the actual *size*
5258 of the optimization symtab, not the number of entries.
5260 2002-09-19 Daniel Jacobowitz <drow@mvista.com>
5262 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
5263 ELF_LINK_HASH_NEEDS_PLT logic.
5265 2002-09-18 Daniel Jacobowitz <drow@mvista.com>
5267 * elfcode.h (elf_slurp_reloc_table_from_section): Check
5268 correct relocation count.
5270 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
5272 * bfd-in.h (bfd_get_dynamic_symcount): Define.
5273 * bfd.c (struct _bfd): Add dynsymcount.
5274 * bfd-in2.h: Regenerated.
5275 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
5277 * elfcode.h (elf_slurp_reloc_table_from_section): Check
5280 2002-09-17 Stan Cox <scox@redhat.com>
5282 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
5283 (mips_elf64_final_gp): Don't make up gp value.
5284 * elfn32-mips.c (mips_elf_final_gp): Likewise.
5285 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
5286 .MIPS.options/.options section.
5288 2002-09-17 David O'Brien <obrien@FreeBSD.org>
5290 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
5291 It is benign for FreeBSD < 4.1. Minor reformatting.
5292 * elf64-alpha-fbsd.c: Likewise.
5294 2002-09-17 Jakub Jelinek <jakub@redhat.com>
5296 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
5299 2002-09-17 Alan Modra <amodra@bigpond.net.au>
5301 * elf64-alpha.c (alpha_elf_size_info): Make static.
5303 2002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
5305 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
5306 * cpu-tic4x.c: Ditto.
5308 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5310 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
5313 2002-09-16 Bruno Haible <bruno@clisp.org>
5315 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
5316 by a target variant implementation.
5317 * elf64-alpha.c: Likewise.
5318 * elf32-i386-fbsd.c: New file.
5319 * elf64-alpha-fbsd.c: New file.
5320 * targets.c: Support bfd_elf32_i386_freebsd_vec and
5321 bfd_elf64_alpha_freebsd_vec.
5322 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
5323 bfd_elf64_alpha_freebsd_vec.
5324 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
5325 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
5326 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
5327 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
5328 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
5329 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
5330 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
5332 2002-09-12 Jakub Jelinek <jakub@redhat.com>
5334 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
5336 (elf_i386_relocate_section): Return false after printing error about
5337 unresolvable relocation.
5339 2002-09-12 Nick Clifton <nickc@redhat.com>
5341 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
5344 2002-09-11 Jeffrey Law <law@redhat.com>
5346 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
5348 2002-09-11 Andrew Haley <aph@cambridge.redhat.com>
5350 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
5351 line_ptr before deciding we've found a symbol.
5353 2002-09-11 Nick Clifton <nickc@redhat.com>
5355 * po/da.po: New Danish translation file.
5356 * configure.in (LINGUAS): Add 'da'.
5357 * configure: Regenerate.
5359 2002-09-10 Michael Snyder <msnyder@redhat.com>
5361 * irix-core.c (do_sections, do_sections64): New functions.
5362 (irix_core_core_file_p): Call new functions do_sections,
5363 do_sections64, depending on corefile (32-bit or 64-bit).
5365 2002-09-09 Richard Henderson <rth@redhat.com>
5367 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
5368 and PCREL21F like PCREL21B.
5370 2002-09-04 Kevin Buettner <kevinb@redhat.com>
5372 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
5375 2002-09-02 Nick Clifton <nickc@redhat.com>
5377 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
5378 names instead of cryptically overloaded bfd_reloc error
5380 (v850_elf_relocate_section): Likewise.
5381 (v850_elf_relax_section): Replace caching of external symbols
5382 with caching of internal symbols obtained from calling
5383 bfd_elf_get_elf_syms().
5384 Fixup problems with freeing cached allocated memory blocks.
5386 2002-09-02 Alan Modra <amodra@bigpond.net.au>
5388 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
5389 (bfd_pj_arch): Use bfd_default_scan.
5390 * cpu-v850.c (scan): Remove.
5391 (N): Use bfd_default_scan.
5392 * cpu-z8k.c (scan_mach): Remove.
5393 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
5394 first. Use bfd_default_scan.
5396 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
5398 (ecoff_get_magic): Likewise.
5399 * elf32-v850.c (v850_elf_object_p): Likewise.
5400 (v850_elf_final_write_processing): Likewise.
5401 * mipsbsd.c (MY(set_arch_mach)): Likewise.
5402 (MY(write_object_contents)): Likewise.
5403 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
5404 * coffcode.h (coff_write_object_contents): Likewise.
5405 (coff_set_arch_mach_hook): Add comment describing machine == 0.
5406 Remove unnecessary "machine" assignments.
5407 (coff_write_relocs): Test for the absolute section sym by testing
5410 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
5411 and bfd_mach_i386_i386_intel_syntax.
5412 * pdp11.c (NAME(aout,machine_type)): Likewise.
5414 2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
5416 * bfd-in.h (align_power): Cast constants to bfd_vma type.
5417 * bfd-in2.h (align_power): Likewise.
5419 2002-08-30 Alan Modra <amodra@bigpond.net.au>
5421 * Makefile.am: Run "make dep-am".
5422 * Makefile.in: Regenerate.
5424 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
5425 * cpu-powerpc.c (powerpc_compatible): Likewise.
5426 * cpu-rs6000.c (rs6000_compatible): Likewise.
5428 2002-08-28 Catherine Moore <clm@redhat.com>
5430 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
5431 (v850-elf-reloc): Don't resolve pc relative relocs.
5432 (v850_elf_ignore_reloc): New routine.
5433 (v850_elf_final_link_relocate): Handle new relocs.
5434 (v850_elf_relax_delete_bytes ): New routine.
5435 (v850_elf_relax_section): New routine.
5436 (bfd_elf32_bfd_relax_section): Define.
5437 (HOWTO): New entries for new relocs.
5438 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
5439 (BFD_RELOC_V850_LONGJUMP): New reloc.
5440 (BFD_RELOC_V850_ALIGN): New reloc.
5441 * archures.c: Remove redundant v850ea architecture.
5442 * cpu-v850.c: Remove redundant v850ea support.
5443 * libbfd.h: Regenerate.
5444 * bfd-in2.h: Regenerated.
5446 2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
5448 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
5449 * configure.in: Add tic4x_coff vector files.
5450 * configure: Regenerate.
5451 * Makefile.am: Add tic4x target.
5452 * Makefile.in: Regenerate.
5454 2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
5456 * archures.c: Add the BFD arch type tic4x.
5457 * bfd-in.h: Add BFD_IN_MEMORY flag.
5458 * coff-tic4x.c: New file.
5459 * coffswap.h (coff_swap_sym_out): Add preadjuster.
5460 * cpu-tic4x.c: New file.
5461 * targets.c: Added tic4x- in list of xvecs.
5462 * ticoff.h: New file.
5463 * bfd-in2.h: Regenerate.
5465 2002-08-27 Adam Nemet <anemet@lnxw.com>
5467 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
5468 bit of DT_INIT and DT_FINI for Thumb functions.
5470 2002-08-26 Alan Modra <amodra@bigpond.net.au>
5472 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
5474 2002-08-26 Alan Modra <amodra@bigpond.net.au>
5476 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
5478 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5480 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
5481 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
5483 (struct elf_sh_pcrel_relocs_copied): Removed.
5484 (struct elf_sh_dyn_relocs): New.
5485 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
5486 field with dyn_relocs.
5487 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
5488 sections and sym_sec.
5489 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
5490 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
5491 (sh_elf_create_dynamic_sections): Use create_got_section instead
5492 of _bfd_elf_create_got_section.
5493 (sh_elf_check_relocs): Likewise.
5494 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
5496 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
5497 sh_elf_relocate_section, sh_elf_check_relocs,
5498 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
5500 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
5501 dynamic relocations and avoiding the copy relocation when we
5502 didn't find any dynamic relocations in the section which has
5503 contents or is read-only.
5504 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
5505 (sh_elf_size_dynamic_sections): Don't reset the size of
5506 .rela.got section even if dynamic_sections_created flag is off.
5507 Don't use sh_elf_discard_copies. Scan all input bfd and use
5508 allocate_dynrelocs. Call readonly_dynrelocs to determine
5509 whether we need DT_TEXTREL.
5510 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
5511 whether the symbol was never referred to.
5512 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
5513 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
5514 (sh_elf_check_relocs): Call create_got_section if the short-cut
5515 to .got is null. Increment reference counters only instead of
5516 allocating space on dynamic sections here. Don't conditionalize
5517 uninitialized got.offset value when marking the symbol as a
5518 global offset table entry. Keep relocations for symbols satisfied
5519 by a dynamic library to avoid copy relocations for the symbol.
5520 Set dynobj field of an elf hash table if needed.
5521 (sh_elf_finish_dynamic_sections): Handle null section pointer
5523 (elf_backend_copy_indirect_symbol): Defined.
5524 (elf_backend_can_refcount): Defined.
5526 2002-08-23 Nick Clifton <nickc@redhat.com>
5528 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
5529 previous change. Add comment explaining why.
5531 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
5533 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
5534 contents of .got.plt[2] to tr0, not address of .got.plt.
5535 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
5536 patching absolute plt entry. For shmedia plt entry, set bottom bit
5537 of branch to plt0 as this is a branch to an shmedia instruction.
5538 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
5539 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
5540 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
5542 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
5543 patching absolute plt entry. For shmedia plt entry, branch to
5544 plt0 is now ptrel, so use relative offset. Set bottom bit of
5545 branch target as it is a branch to an shmedia instruction.
5547 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
5548 Richard Shann <richard.shann@superh.com>
5550 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
5551 value if .init is an SHmedia function. Similarly for DT_FINI.
5552 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
5554 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
5556 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
5558 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
5560 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5562 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
5563 byte read when reading the return address register column.
5565 2002-08-22 Nick Clifton <nickc@redhat.com>
5567 * config.bfd: Add powepc64-*-*bsd* target.
5569 2002-08-22 Graeme Peterson <gp@qnx.com>
5571 * Makefile.am: Add entries for elf32-shqnx.c
5572 * Makefile.in: Regenerate.
5573 * config.bfd: Add support sh-*-nto* target.
5574 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
5575 * configure: Regenerate.
5576 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
5577 * elf32-sh.c: Do not include elf32-target.h if
5578 ELF32_SH_C_INCLUDED is defined.
5579 * elf32-shqnx.c: New file: Support for QNX.
5580 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
5582 2002-08-22 Nick Clifton <nickc@redhat.com>
5584 * po/tr.po: Updated Turkish translation.
5586 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
5587 symbols are not read.
5589 2002-08-22 Alan Modra <amodra@bigpond.net.au>
5591 * elf32-m68hc11.c: Formatting fixes.
5592 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
5593 * elf32-m68hc12.c: Formatting fixes.
5594 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
5596 2002-08-22 Alan Modra <amodra@bigpond.net.au>
5598 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
5600 (pmac_xcoff_vec): Likewise.
5601 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
5602 (aix5coff64_vec): Likewise.
5604 2002-08-22 Alan Modra <amodra@bigpond.net.au>
5606 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
5607 param to elf_backend_copy_indirect_symbol.
5608 (_bfd_elf_link_hash_copy_indirect): Likewise.
5609 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
5610 calls to copy_indirect_symbol.
5611 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
5612 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
5613 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
5614 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
5615 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
5616 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
5617 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
5618 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
5619 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
5620 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
5621 test refcounts for "used" values.
5623 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
5625 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
5626 argument declaration.
5628 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
5630 * archures.c (bfd_mach_ppc_e500): Added.
5631 * bfd-in2.h: Rebuilt.
5632 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
5634 2002-08-19 Alan Modra <amodra@bigpond.net.au>
5636 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
5638 2002-08-17 Andrew Cagney <ac131313@redhat.com>
5640 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
5643 2002-08-17 Stan Cox <scox@redhat.com>
5645 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
5646 IRIX 6 segment layout for NEWABI.
5648 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
5650 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
5651 symbols when looking for section referred to by a relocation.
5652 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
5654 2002-08-15 Alan Modra <amodra@bigpond.net.au>
5656 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
5658 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
5660 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
5661 missing check for whether the symbol is referenced by DSO before
5662 unexporting it as an unneeded dynamic symbol.
5664 2002-08-14 H.J. Lu <hjl@gnu.org>
5666 * libbfd.h: Regenerate.
5668 2002-08-14 H.J. Lu <hjl@gnu.org>
5670 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
5672 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
5674 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
5676 (m68hc11_direct_relax): New to define table of relaxable instructions.
5677 (find_relaxable_insn): New, find a relaxable insn.
5678 (compare_reloc): New to compare two relocs.
5679 (m68hc11_elf_relax_section): New, relax text sections.
5680 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
5681 (elf32_m68hc11_check_relocs): New function for GC support.
5682 (elf32_m68hc11_relocate_section): New function for GC support.
5683 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
5684 (elf_backend_check_relocs): Likewise.
5685 (elf_backend_relocate_section): Likewise.
5687 2002-08-13 H.J. Lu <hjl@gnu.org>
5689 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
5690 definitions in shared objects when checking symbol with
5693 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5695 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
5696 (elf32_m68hc11_gc_sweep_hook): Likewise.
5697 (elf_backend_gc_mark_hook): Define for GC section support.
5698 (elf_backend_gc_sweep_hook): Likewise.
5699 (elf_backend_can_gc_sections): Likewise.
5701 * elf32-m68hc12.c: Likewise.
5703 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5705 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
5706 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
5707 (_bfd_m68hc11_elf_set_private_flags): New function.
5708 Use them to set/check/print ELF flags specific to 68HC11.
5710 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
5711 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
5712 (_bfd_m68hc12_elf_set_private_flags): New function.
5713 Use them to set/check/print ELF flags specific to 68HC12.
5715 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5717 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
5718 fix masks for PC-rel relocs.
5719 (m68hc11_elf_ignore_reloc): New function.
5721 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
5722 68HC12 banked addressing relocs.
5723 (m68hc12_phys_addr): New to compute physical address of banked memory.
5724 (m68hc12_phys_page): Likewise for page.
5725 (m68hc12_addr_is_banked): New to see if address is in banked area.
5726 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
5728 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5730 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
5731 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
5732 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
5733 * bfd-in2.h: Regenerate.
5735 2002-08-12 H.J. Lu <hjl@gnu.org>
5737 * elflink.h (elf_add_default_symbol): Preserve section across
5740 2002-08-09 Graeme Peterson <gp@qnx.com>
5742 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
5743 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
5744 * Makefile.in: Regenerate.
5745 * config.bfd: Add support for powerpc{le}-*-nto targets.
5746 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
5747 * configure: Regenerate.
5748 * elf32-i386qnx.c: Moved backend functions into a QNX specific
5749 common file "elf32-qnx.h", and now include that file.
5750 * elf32-qnx.h: New file: QNX specific common elf backend.
5751 * elf32-ppc.c: Do not include elf32-target.h if
5752 ELF32_PPC_C_INCLUDED is defined.
5753 * elf32-ppcqnx.c: New file: Support for QNX.
5754 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
5755 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
5757 2002-08-09 Nick Clifton <nickc@redhat.com>
5759 * po/sv.po: Updated Swedish translation.
5761 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5763 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
5764 g->global_gotsym is NULL.
5766 2002-08-08 H.J. Lu <hjl@gnu.org>
5768 * elflink.h (elf_add_default_symbol): Don't warn if a definition
5769 overrides an indirect versioned symbol.
5771 2002-08-08 Jakub Jelinek <jakub@redhat.com>
5773 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
5774 for R_386_TLS_TPOFF32 relocs against symndx 0.
5776 2002-08-07 H.J. Lu <hjl@gnu.org>
5778 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
5779 with undefined version if needed.
5780 (elf_link_assign_sym_version): Match a default symbol with a
5781 version without definition. No need to hide the default
5782 definition separately.
5784 2002-08-08 Alan Modra <amodra@bigpond.net.au>
5786 * elflink.h (elf_link_output_extsym): Don't output symbols from
5787 SEC_EXCLUDE sections.
5789 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
5791 2002-08-07 Alan Modra <amodra@bigpond.net.au>
5793 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
5796 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5798 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
5801 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5803 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
5805 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5807 * elf32-mips.c (mips_reloc_map): Fix typo.
5809 2002-08-06 Alan Modra <amodra@bigpond.net.au>
5811 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
5813 2002-08-06 Alan Modra <amodra@bigpond.net.au>
5815 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
5817 2002-08-06 Alan Modra <amodra@bigpond.net.au>
5819 * libxcoff.h: Use PARAMS on function declarations.
5820 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
5821 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
5823 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
5825 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
5827 2002-08-06 Alan Modra <amodra@bigpond.net.au>
5829 * coff-rs6000.c: Formatting fixes.
5830 (xcoff_calculate_relocation): Use PARAMS in declaration.
5831 (xcoff_complain_overflow): Likewise.
5832 (xcoff_ppc_relocate_section): Use old-style function pointer call.
5833 (bfd_xcoff_backend_data): Remove useless comments.
5834 (rs6000coff_vec): Likewise.
5835 (bfd_pmac_xcoff_backend_data): Likewise.
5836 (pmac_xcoff_vec): Likewise.
5838 * coff64-rs6000.c: Formatting fixes.
5839 (xcoff64_calculate_relocation): Use PARAMS in declaration.
5840 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
5841 (bfd_xcoff_backend_data): Remove useless comments.
5842 (rs6000coff64_vec): Likewise.
5843 (bfd_xcoff_aix5_backend_data): Likewise.
5844 (aix5coff64_vec): Likewise.
5846 2002-08-06 Alan Modra <amodra@bigpond.net.au>
5848 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
5849 mask entries. Use complain_overflow_dont for R_REF.
5850 (xcoff_reloc_type_ba): Revert last change.
5851 (xcoff_reloc_type_br): Likewise.
5852 (xcoff_reloc_type_crel): Likewise.
5853 (xcoff_ppc_relocate_section): Likewise.
5854 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
5855 (xcoff64_ppc_relocate_section): Likewise.
5856 (xcoff64_howto_table): Revert some of last change to mask entries.
5857 Use complain_overflow_dont for R_REF.
5859 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
5860 relocs with bitsize == 16 have size = 1.
5861 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
5862 (xcoff_reloc_type_br): Likewise.
5863 (xcoff_reloc_type_crel): Likewise.
5864 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
5865 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
5866 dst_mask adjustment.
5867 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
5868 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
5869 bitsize == 16 have size = 1.
5871 2002-08-01 Denis Chertykov <denisc@overta.ru>
5873 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
5874 (struct misc): New field isymbuf. All free_* fields removed.
5875 (symbol_value): Pass in internal syms. No need to swap syms in.
5876 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
5877 possibly cached info.
5878 (tidyup_after_error): Removed.
5879 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
5880 misc. Use new field.
5881 (adjust_all_relocations): Use internal syms. No need to swap syms
5883 (add_page_insn): Don't use removed fields of struct misc.
5885 2002-08-01 Nick Clifton <nickc@redhat.com>
5887 * elf32-arm.h: Revert previous delta.
5889 2002-08-01 Nick Clifton <nickc@redhat.com>
5891 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
5892 * configure: Regenerate.
5894 2002-07-31 H.J. Lu <hjl@gnu.org>
5896 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
5899 2002-07-31 H.J. Lu <hjl@gnu.org>
5901 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
5904 2002-07-31 Jakub Jelinek <jakub@redhat.com>
5906 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
5907 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
5909 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
5911 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
5912 There is no 8 byte relocation type for this architecture.
5913 (do_ns32k_reloc): Use bfd_vma instead of native types.
5914 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
5916 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
5917 rely on generic code to do that.
5918 * aout-ns32k.c (howto_table): Add appropriate overflow detection
5919 to all table entries.
5920 (_bfd_ns32k_relocate_contents): put_data returns void.
5921 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
5922 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
5925 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
5927 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
5928 archive object is target dependant.
5930 2002-07-31 Adam Nemet <anemet@lnxw.com>
5932 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
5933 (THUMB_PLT_ENTRY_SIZE): New macro.
5934 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
5935 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
5937 (elf32_arm_plt_entry): Likewise.
5938 (elf_backend_plt_header_size): Likewise.
5939 (elf32_thumb_plt0_entry): New global.
5940 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
5942 (elf32_thumb_plt_entry): New global.
5943 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
5944 Thumb entries. Set the bottom bit of the corresponding GOT entry
5945 for a Thumb PLT entry.
5946 (struct elf32_arm_plt_entry_info): New structure.
5947 (struct elf32_arm_link_hash_entry, plt_info): New member of this
5949 (elf32_arm_link_hash_newfunc): Initialize new member.
5950 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
5951 relocations against the PLT.
5952 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
5953 first_rel_type if this is the first time we encounter the symbol.
5954 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
5955 Determine if relocation needs a PLT entry. Set first_rel_type if
5956 this is the first time we encounter the symbol
5957 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
5959 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
5960 (elf32_arm_create_dynamic_sections): New function. Create the
5962 (elf_backend_create_dynamic_sections): Call it.
5964 2002-07-31 Nick Clifton <nickc@redhat.com>
5966 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
5967 'alternative' in order to avoid shadowing global symbol of the
5969 * bfd-in2.h: Regenerate.
5970 * libbfd.h: Regenerate.
5971 * libcoff.h: Regenerate.
5973 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5975 * Makefile.am: Add n32 ABI support.
5976 * Makefile.in: Regenerate.
5977 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
5978 bit vectors for mips*-*-linux targets as optional.
5979 * configure.in: Add n32 ABI vectors.
5980 * configure: Regenerate.
5981 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
5982 * elfn32-mips.c: New file, n32 ABI support.
5983 * targets.c: Add n32 ABI vectors.
5985 2002-07-30 Graeme Peterson <gp@qnx.com>
5987 * elfarmqnx-nabi.c: New file: Support for QNX.
5988 * config.bfd: Add support for arm-*-nto target.
5989 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
5990 * configure: Regenerate.
5991 * Makefile.am: Add entries for elfarmqnx-nabi.c.
5992 * Makefile.in: Regenerate.
5993 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
5994 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
5995 * elfarm-nabi.c: Do not include elf32-arm.h if
5996 ELFARM_NABI_C_INCLUDED is defined.
5997 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
5999 2002-07-30 Nick Clifton <nickc@redhat.com>
6001 * po/sv.po: Updated Swedish translation.
6003 2002-07-30 Jakub Jelinek <jakub@redhat.com>
6005 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
6007 2002-07-30 Alan Modra <amodra@bigpond.net.au>
6009 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
6010 * archive.c (bfd_generic_archive_p): Likewise.
6011 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
6012 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
6013 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
6014 (xcoff64_archive_p): Likewise.
6015 (xcoff64_openr_next_archived_file): Likewise.
6016 (xcoff64_archive_p): Clean up tdata properly on error.
6017 * coffgen.c (coff_real_object_p): Likewise.
6018 (coff_object_p): Release filehdr and opthdr.
6019 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
6020 * ieee.c (ieee_archive_p): Likewise.
6021 * ihex.c (ihex_object_p): Likewise.
6022 (ihex_mkobject): Always allocate tdata.
6023 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
6024 * srec.c (srec_mkobject): Always allocate tdata.
6025 (srec_object_p): Clean up tdata properly on error.
6026 (symbolsrec_object_p): Likewise.
6027 * versados.c (versados_object_p): Likewise.
6028 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
6029 and bfd_realloc instead of realloc.
6030 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
6031 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
6032 place of bfd_malloc, simplifying error freeing. Free hash table too.
6033 (vms_object_p): Clean up tdata on error.
6034 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
6035 (vms_close_and_cleanup): Adjust for bfd_alloc use.
6037 2002-07-30 Alan Modra <amodra@bigpond.net.au>
6039 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
6041 2002-07-26 Chris Demetriou <cgd@broadcom.com>
6043 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
6044 flags into resulting BFD.
6046 2002-07-26 Alan Modra <amodra@bigpond.net.au>
6048 From John Reiser <jreiser@BitWagon.com>
6049 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
6050 tls_ldm_got.refcount.
6052 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6054 * elf64-mips.c: Update TODO comment.
6055 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
6056 mips_elf64_gprel16_reloca): Remove prototypes.
6057 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
6058 (UNUSED_RELOC): Replace by EMPTY_RELOC.
6059 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
6060 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
6062 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
6063 R_MIPS_GOT16. Remove wrong comments.
6064 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
6065 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
6067 (mips_elf64_hi16_reloc): Fix formatting.
6068 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
6069 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
6070 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
6071 (mips_elf64_gprel16_reloc): Make static. Add check for
6073 (mips_elf64_gprel16_reloca): Remove.
6074 (mips_elf64_literal_reloc): New function.
6075 (mips_elf64_gprel32_reloc): Fix formatting.
6076 (mips_elf64_shift6_reloc): Fix comment. Make static.
6077 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
6079 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
6081 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
6082 specific relocations.
6083 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
6084 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
6085 (ELF_MAXPAGESIZE): Add comment.
6087 2002-07-25 Nick Clifton <nickc@redhat.com>
6089 * po/sv.po: Updated Swedish translation.
6090 * po/es.po: Updated Spanish translation.
6091 * po/fr.po: Updated French translation.
6093 2002-07-25 Alan Modra <amodra@bigpond.net.au>
6095 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
6096 as elf_link_record_local_dynamic_symbol.
6097 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
6098 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
6099 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
6100 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
6101 attempt is made to record a symbol in a discarded section, and
6102 return `2' in that case.
6104 2002-07-24 Nick Clifton <nickc@redhat.com>
6106 * po/sv.po: Updated Swedish translation.
6107 * po/es.po: Updated Spanish translation.
6109 2002-07-23 Alan Modra <amodra@bigpond.net.au>
6111 * po/SRC-POTFILES.in: Regenerate.
6113 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
6114 immediately. Remove code handling relocatable linking.
6115 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
6116 * elf32-cris.c (cris_elf_relocate_section): Likewise.
6117 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
6118 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
6119 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
6120 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
6121 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
6122 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6123 * elf32-v850.c (v850_elf_relocate_section): Likewise.
6124 * elf32-vax.c (elf_vax_relocate_section): Likewise.
6125 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6126 * elf32-avr.c (elf_backend_rela_normal): Define.
6127 * elf32-cris.c: Likewise.
6128 * elf32-fr30.c: Likewise.
6129 * elf32-frv.c: Likewise.
6130 * elf32-h8300.c: Likewise.
6131 * elf32-hppa.c: Likewise.
6132 * elf32-ip2k.c: Likewise.
6133 * elf32-sparc.c: Likewise.
6134 * elf32-v850.c: Likewise.
6135 * elf32-vax.c: Likewise.
6136 * elf64-hppa.c: Likewise.
6137 * elf64-sparc.c: Likewise.
6138 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
6139 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
6140 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
6141 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
6142 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
6143 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
6144 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
6145 * elf-m10200.c (USE_RELA): Don't define.
6146 * elf-m10300.c: Likewise.
6147 * elfarm-oabi.c: Likewise.
6148 * elf32-i370.c: Likewise.
6149 * elf32-ip2k.c: Likewise.
6150 * elf32-m68k.c: Likewise.
6151 * elf32-mcore.c: Likewise.
6152 * elf32-ppc.c: Likewise.
6153 * elf32-s390.c: Likewise.
6154 * elf32-vax.c: Likewise.
6155 * elf64-ppc.c: Likewise.
6156 * elf64-s390.c: Likewise.
6157 * elf64-x86-64.c: Likewise.
6158 * elfxx-ia64.c: Likewise.
6159 * elf32-avr.c (USE_REL): Don't undef.
6160 * elf32-ip2k.c: Likewise.
6162 2002-07-23 Nick Clifton <nickc@redhat.com>
6164 * elf-bfd.h (struct elf_backend_data): Add new bitfield
6165 'want_p_paddr_set_to_zero'.
6166 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
6168 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
6169 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
6171 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
6173 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
6174 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
6175 show the Copyright string.
6176 Minor formatting tidy ups.
6178 2002-07-23 Nick Clifton <nickc@redhat.com>
6180 * po/fr.po: Updated French translation.
6181 * po/sv.po: Updated Swedish translation.
6183 2002-07-23 Alan Modra <amodra@bigpond.net.au>
6185 * elflink.h (elf_link_input_bfd): Don't change internal symbols
6186 when outputting relocs.
6188 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
6190 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
6191 DT_PLTGOT into the dynamic section if there is a PLT.
6193 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6195 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
6197 (_bfd_mips_elf_write_section): Likewise.
6198 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
6199 (_bfd_mips_elf_write_section): Likewise.
6200 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
6201 (elf32_mips_write_section): Likewise.
6202 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
6203 (_bfd_mips_elf_write_section): Likewise.
6205 2002-07-19 Alan Modra <amodra@bigpond.net.au>
6207 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
6208 PT_IA_64_UNWIND segments for a given section.
6210 2002-07-17 H.J. Lu <hjl@gnu.org>
6212 * Makefile.am: Fix a typo.
6213 * Makefile.in: Regenerate.
6215 2002-07-15 Denis Chertykov <denisc@overta.ru>
6216 Frank Ch. Eigler <fche@redhat.com>
6217 Ben Elliston <bje@redhat.com>
6218 Alan Lehotsky <alehotsky@cygnus.com>
6219 John Healy <jhealy@redhat.com>
6220 Graham Stott <grahams@redhat.com>
6221 Jeff Johnston <jjohnstn@redhat.com>
6223 * Makefile.am: Add support for ip2k.
6224 * Makefile.in: Regenerate.
6225 * doc/Makefile.in: Regenerate.
6226 * archures.c: Add support for ip2k.
6227 * config.bfd: Add support for ip2k.
6228 * configure.in: Add support for ip2k.
6229 * configure: Regenerate.
6230 * reloc.c: Add support for ip2k.
6231 * targets.c: Add support for ip2k.
6232 * bfd-in2.h: Regenerate.
6233 * libbfd.h: Regenerate.
6234 * cpu-ip2k.c: New file.
6235 * elf32-ip2k.c: New file.
6237 2002-07-17 Ian Rickards <irickard@arm.com>
6239 * dwarf2.c (concat_filename): If we can't establish the directory
6240 just return the filename.
6242 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
6244 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
6246 2002-07-16 Alan Modra <amodra@bigpond.net.au>
6248 * elflink.h: Formatting fixes, tidy prototypes.
6249 (elf_link_assign_sym_version): Move common code out of loop.
6251 2002-07-16 Alan Modra <amodra@bigpond.net.au>
6253 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
6254 reloc section size is zero. Correct reloc output location.
6256 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
6258 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
6259 the final type for the e_fsel selector when generating PA2.0W code.
6260 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
6263 2002-07-14 H.J. Lu <hjl@gnu.org>
6265 * elflink.h (elf_link_assign_sym_version): Hide the default
6266 definition if there is a hidden versioned definition.
6268 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
6270 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
6271 dynamic reference test in assertion when initializing GOT with
6272 static contents. Just assert that there are either no dynamic
6273 sections, the symbol is defined in the regular objects or that the
6274 symbol is undef weak. Tweak comment.
6275 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
6276 only if the symbol isn't defined in the program and isn't undef
6278 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
6279 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
6280 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
6281 (elf_cris_discard_excess_program_dynamics): Don't consider
6282 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
6284 2002-07-11 Alan Modra <amodra@bigpond.net.au>
6286 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
6287 unresolved debugging relocs in dynamic applications.
6288 * elf32-s390.c (elf_s390_relocate_section): Likewise.
6289 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6290 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
6291 * elf64-s390.c (elf_s390_relocate_section): Likewise.
6292 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6293 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
6295 2002-07-10 Alan Modra <amodra@bigpond.net.au>
6297 * elf64-ppc.c (ONES): Define.
6298 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
6299 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
6300 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
6302 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
6303 (ppc64_elf_set_private_flags): Delete.
6304 (ppc64_elf_section_from_shdr): Delete.
6305 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
6306 (ppc64_elf_fake_sections): Delete.
6307 (bfd_elf64_bfd_set_private_flags): Don't define.
6308 (bfd_elf64_get_symbol_info): Likewise.
6309 (elf_backend_section_from_shdr): Likewise.
6310 (elf_backend_fake_sections): Likewise.
6312 2002-07-10 Marco Walther <Marco.Walther@sun.com>
6314 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
6315 when not already set.
6316 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
6317 (elf_backend_fake_sections): Define.
6319 2002-07-10 Alan Modra <amodra@bigpond.net.au>
6321 * merge.c (_bfd_merge_section): Remove redundant output_section check.
6323 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
6325 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
6327 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
6328 NULL sym_hashes to just before use.
6329 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
6330 symbol with non-default visibility.
6331 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
6332 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
6334 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
6335 symbol with non-default visibility.
6336 (cris_elf_check_relocs): At tests for local symbol before
6337 increasing h->plt.refcount, also check for non-default
6338 visibility. Ditto when checking for local symbol to eliminate
6339 pc-relative runtime relocs.
6341 2002-07-08 Alan Modra <amodra@bigpond.net.au>
6343 * elf.c: Formatting.
6344 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
6345 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
6346 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
6349 2002-07-07 Mark Mitchell <mark@codesourcery.com>
6350 Alan Modra <amodra@bigpond.net.au>
6352 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
6353 account the impact of relocation count overflow when computing
6355 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
6356 or not to apply the PE COFF reloc overflow handling. Fix a
6357 fencepost error in deciding whether or not to use that technique.
6359 2002-07-07 Alan Modra <amodra@bigpond.net.au>
6361 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
6362 change type of locsyms.
6363 (bfd_elf_get_elf_syms): Declare.
6364 * elf.c (bfd_elf_get_elf_syms): New function.
6365 (group_signature): Use bfd_elf_get_elf_syms.
6366 (bfd_section_from_r_symndx): Likewise.
6367 * elfcode.h (elf_slurp_symbol_table): Likewise.
6368 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
6369 (elf_link_add_object_symbols): Likewise. Reorganise to increase
6370 locality of various data structures. Properly free internal relocs.
6371 (elf_bfd_final_link): Properly free internal relocs.
6372 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
6373 (elf_link_input_bfd): Likewise.
6374 (elf_gc_mark): Likewise. Properly free internal relocs.
6375 (elf_gc_sweep): Properly free internal relocs.
6376 (elf_reloc_symbol_deleted_p): No need to swap syms in.
6377 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
6379 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
6380 Properly free possibly cached info.
6381 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
6382 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
6383 symbol swapping code.
6384 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
6385 Properly free possibly cached info.
6386 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
6387 (mn10300_elf_relax_delete_bytes): Likewise.
6388 (mn10300_elf_symbol_address_p): Likewise.
6389 (mn10300_elf_get_relocated_section_contents): Likewise.
6390 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
6391 (elf32_h8_relax_delete_bytes): Likewise.
6392 (elf32_h8_symbol_address_p): Likewise.
6393 (elf32_h8_get_relocated_section_contents): Likewise.
6394 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
6395 (m32r_elf_relax_delete_bytes): Likewise.
6396 (m32r_elf_get_relocated_section_contents): Likewise.
6397 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
6398 elf_section_data to determine whether cached.
6399 (sh_elf_relax_section): As above for elf-m10200.c.
6400 (sh_elf_relax_delete_bytes): Likewise.
6401 (sh_elf_get_relocated_section_contents): Likewise.
6402 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
6403 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
6404 reading of local syms.
6405 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
6406 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
6407 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
6408 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
6410 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
6411 free internal relocs and section contents. Don't read symbols.
6412 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
6413 (elf32_hppa_size_stubs): Don't free local syms.
6414 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
6415 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
6416 possibly cached info.
6417 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
6418 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
6419 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
6421 (get_local_syms): Delete function.
6422 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
6424 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
6426 2002-07-05 Jim Wilson <wilson@redhat.com>
6428 * syms.c (decode_section_type): New.
6429 (bfd_decode_symclass): Call decode_section_type.
6431 2002-07-04 Jakub Jelinek <jakub@redhat.com>
6433 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
6434 section content start.
6435 Reported by Michael Schumacher <mike@hightec-rt.com>.
6437 2002-07-04 Alan Modra <amodra@bigpond.net.au>
6439 * section.c (_bfd_strip_section_from_output): Remove unnecessary
6440 link order code. Don't actually remove the output section here;
6441 Just set a flag for the linker to do so.
6442 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
6443 sections when setting up output section dynsyms.
6445 2002-07-04 Alan Modra <amodra@bigpond.net.au>
6447 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
6449 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
6452 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
6454 * elf64-s390.c (create_got_section): Set .got section alignment to
6456 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
6458 2002-07-02 Alan Modra <amodra@bigpond.net.au>
6460 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
6462 2002-07-01 Matt Thomas <matt@3am-software.com>
6464 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
6467 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6469 * elfxx-mips.c (ABI_64_P): Fix comment.
6470 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
6471 new section names for N64 ABI.
6472 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
6473 (mips_elf_calculate_relocation): Code formatting.
6474 (mips_elf_create_dynamic_relocation): Likewise.
6475 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
6476 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
6477 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
6479 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
6481 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
6482 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
6485 2002-07-01 Andreas Schwab <schwab@suse.de>
6487 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
6488 R_X86_64_64 to R_X86_64_RELATIVE.
6490 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
6492 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
6493 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
6495 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
6497 * configure.in (vaxbsd_vec): Add.
6498 * targets.c (vaxbsd_vec): Add.
6499 * Makefile.in: Rebuild.
6500 * configure: Rebuild.
6501 * po/SRC-POTFILES.in: Rebuild.
6503 2002-07-01 Alan Modra <amodra@bigpond.net.au>
6505 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
6506 examining to gc_mark_hook, rather than the bfd.
6507 (elf_gc_sections): Adjust.
6508 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
6509 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
6510 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
6511 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
6512 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
6513 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
6514 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
6515 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
6516 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
6517 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
6518 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
6519 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
6520 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
6521 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
6522 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
6523 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
6524 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
6525 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
6526 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
6527 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
6528 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
6529 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
6530 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
6531 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
6532 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
6533 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
6534 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
6535 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
6536 redundant local sym tests.
6537 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
6538 (link_hash_newfunc): Init is_entry.
6539 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
6540 (ppc64_elf_link_hash_table_create): Init all_local_syms.
6541 (create_linkage_sections): Use bfd_make_section_anyway rather than
6543 (ppc64_elf_mark_entry_syms): New function.
6544 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
6545 up opd entry to function section map.
6546 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
6547 relocs that reference the opd section.
6548 (edit_opd): New function.
6549 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
6550 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
6551 (get_local_syms): Do so here. Exit if we already have local syms.
6552 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
6553 read local syms on non-ELF input.
6554 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
6555 than duplicating it's function here. Adjust free of internal
6557 (ppc64_elf_relocate_section): Adjust local syms in opd section.
6558 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
6559 * elf32-hppa.c (elf32_hppa_size_stubs): Call
6560 _bfd_elf32_link_read_relocs rather than duplicating it's function
6561 here. Adjust free of internal relocs to suit.
6563 2002-07-01 Andreas Jaeger <aj@suse.de>
6565 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
6566 are not allowed in shared libs code, enforce -fPIC.
6568 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
6570 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
6571 trailing zero-sequences when there's previous left-over data.
6573 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
6575 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
6576 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
6577 and opd_rel_sec in order for starting rela section. Check _raw_size.
6578 (elf_backend_reloc_type_class): Define.
6580 2002-06-27 Kevin Buettner <kevinb@redhat.com>
6582 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
6585 2002-06-27 Alan Modra <amodra@bigpond.net.au>
6587 * cpu-powerpc.c: Comment on ordering of arch_info.
6588 * elf32-ppc.c (ppc_elf_object_p): New function.
6589 (elf_backend_object_p): Define.
6590 * elf64-ppc.c (ppc64_elf_object_p): New function.
6591 (elf_backend_object_p): Define.
6593 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
6595 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
6596 * configure: Regenerate.
6598 2002-06-25 Jason Eckhardt <jle@rice.edu>
6600 * dwarf2.c (decode_line_info): Check unit->addr_size
6601 to read in the proper number of prologue bytes.
6603 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
6605 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
6606 aix5coff64_vec if 64-bit bfd support has been enabled.
6607 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
6610 * targets.c (_bfd_target_vector[]): Only include
6611 aix5coff64_vec if 64-bit bfd support has been enabled.
6613 2002-06-25 Alan Modra <amodra@bigpond.net.au>
6615 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
6616 * elf32-hppa.c (hppa_add_stub): Likewise.
6617 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
6618 * elflink.h (elf_add_default_symbol): Fix comment typo.
6619 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
6620 (elf_link_add_object_symbols): Likewise.
6621 (elf_link_assign_sym_version): Likewise.
6622 * hash.c (bfd_hash_lookup): Likewise.
6623 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
6624 * section.c (bfd_get_unique_section_name): Likewise.
6625 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
6626 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
6627 (assign_section_numbers): Likewise.
6628 (_bfd_elfcore_make_pseudosection): Likewise.
6629 (elfcore_grok_lwpstatus): Likewise.
6630 (elfcore_grok_win32pstatus): Likewise.
6631 (elfcore_write_note): Constify input params. Use PTR instead of
6632 void *. Include terminating NUL in namesz. Correct padding.
6633 Support NULL "name" param. Use memcpy instead of strcpy.
6634 (elfcore_write_prpsinfo): Constify input params.
6635 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
6636 (elfcore_write_lwpstatus): Likewise.
6637 (elfcore_write_pstatus): Likewise.
6638 (elfcore_write_prfpreg): Likewise.
6639 (elfcore_write_prxfpreg): Likewise.
6640 * elf-bfd.h (elfcore_write_note): Update declaration.
6641 (elfcore_write_prpsinfo): Likewise.
6642 (elfcore_write_prstatus): Likewise.
6643 (elfcore_write_pstatus): Likewise.
6644 (elfcore_write_prfpreg): Likewise.
6645 (elfcore_write_prxfpreg): Likewise.
6646 (elfcore_write_lwpstatus): Likewise.
6648 2002-06-25 Jason Eckhardt <jle@rice.edu>
6650 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
6651 symbols of type stProc and stStaticProc.
6653 2002-06-25 Nick Clifton <nickc@redhat.com>
6655 * ecoff.c: VArious formatting fixes.
6657 2002-06-25 Alan Modra <amodra@bigpond.net.au>
6659 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
6661 2002-06-25 Alan Modra <amodra@bigpond.net.au>
6663 * aout-adobe.c: Don't compare against "true" or "false.
6664 * aout-target.h: Likewise.
6665 * aoutx.h: Likewise.
6666 * archive.c: Likewise.
6668 * cache.c: Likewise.
6669 * coff-a29k.c: Likewise.
6670 * coff-alpha.c: Likewise.
6671 * coff-i386.c: Likewise.
6672 * coff-mips.c: Likewise.
6673 * coff-or32.c: Likewise.
6674 * coff64-rs6000.c: Likewise.
6675 * coffcode.h: Likewise.
6676 * coffgen.c: Likewise.
6677 * cpu-ns32k.c: Likewise.
6678 * ecoff.c: Likewise.
6679 * ecofflink.c: Likewise.
6681 * elf32-arm.h: Likewise.
6682 * elf32-cris.c: Likewise.
6683 * elf32-d30v.c: Likewise.
6684 * elf32-i386.c: Likewise.
6685 * elf32-mcore.c: Likewise.
6686 * elf32-ppc.c: Likewise.
6687 * elf32-sh.c: Likewise.
6688 * elf32-sh64.c: Likewise.
6689 * elf32-v850.c: Likewise.
6690 * elf64-alpha.c: Likewise.
6691 * elf64-sh64.c: Likewise.
6692 * elfcode.h: Likewise.
6693 * elfcore.h: Likewise.
6694 * elflink.h: Likewise.
6695 * elfxx-mips.c: Likewise.
6696 * i386os9k.c: Likewise.
6698 * libbfd.c: Likewise.
6699 * linker.c: Likewise.
6701 * nlm32-alpha.c: Likewise.
6702 * nlm32-i386.c: Likewise.
6703 * nlm32-ppc.c: Likewise.
6704 * nlm32-sparc.c: Likewise.
6705 * nlmcode.h: Likewise.
6706 * oasys.c: Likewise.
6707 * pdp11.c: Likewise.
6708 * peicode.h: Likewise.
6709 * reloc.c: Likewise.
6712 * tekhex.c: Likewise.
6714 * xcofflink.c: Likewise.
6715 * elf64-sparc.c: Edit comment to not use "== false".
6717 * aoutf1.h: Don't use "? true : false".
6718 * ecoff.c: Likewise.
6719 * format.c: Likewise.
6721 * linker.c: Likewise.
6723 * oasys.c: Likewise.
6725 2002-06-23 H.J. Lu <hjl@gnu.org>
6727 * elflink.h (elf_link_add_archive_symbols): For the default
6728 version, check references with only one `@' first.
6730 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
6732 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
6734 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
6736 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
6737 (elf64_hppa_size_dynamic_sections): Revise to use
6738 elf64_hppa_mark_milli_and_exported_functions.
6739 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
6740 symbols out of dynamic symbol table.
6742 2002-06-23 Alan Modra <amodra@bigpond.net.au>
6744 * Makefile.in: Regenerate.
6745 * libbfd.h: Regenerate.
6746 * bfd-in2.h: Regenerate.
6747 * configure: Regenerate.
6748 * po/SRC-POTFILES.in: Regenerate.
6750 * elflink.h: Comment typo fixes.
6752 2002-06-23 H.J. Lu <hjl@gnu.org>
6754 * elf-bfd.h (elf_link_loaded_list): New structure.
6755 (elf_link_hash_table): Add "loaded".
6756 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
6757 * elflink.h (elf_link_check_versioned_symbol): New function.
6758 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
6760 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
6762 * elflink.h (size_dynamic_sections): If the target does not
6763 support an ELF style hash table, return true, indicating that
6764 nothing needed to be done, rather than false, indicating that the
6765 section's size could not be computed.
6767 2002-06-18 Dave Brolley <brolley@redhat.com>
6769 From Catherine Moore, Michael Meissner, Dave Brolley:
6770 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
6771 * targets.c: Support bfd_elf32_frv_vec.
6772 * reloc.c: Add FRV relocs.
6773 * configure.in: Add support for bfd-elf32-frv-vec.
6774 * config.bfd (targ_cpu): Add support for frv-*-elf.
6775 * archures.c: Add frv arch and machines.
6776 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
6777 (ALL_MACHINES_CFILES): Add cpu-frv.c.
6778 (BFD32_BACKENDS): Add elf32-frv.lo.
6779 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
6780 (cpu-frv.lo): New target.
6781 (elf32-frv.lo): New target.
6782 * cpu-frv.c: New file.
6783 * elf32-frv.c: New file.
6785 2002-06-18 Jakub Jelinek <jakub@redhat.com>
6787 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
6789 Only read the first section header if e_shoff is non-zero.
6790 Don't consider e_shstrndx if there are no sections.
6792 2002-06-17 Tom Rix <trix@redhat.com>
6794 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
6795 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
6796 complain_overflow_bitfield.
6798 2002-06-17 Alan Modra <amodra@bigpond.net.au>
6800 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
6801 (bfd_fdopenr): Likewise.
6802 (bfd_openstreamr): Likewise.
6803 (bfd_openw): Likewise.
6805 * targets.c: Sort target vecs.
6806 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
6807 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
6808 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
6809 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
6810 * configure.in: Sort target vecs. Add m88kmach3_vec.
6811 * configure: Regenerate.
6813 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
6815 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
6816 bpo_reloc_no to break sort order ties, not address of items.
6818 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
6820 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
6821 Skip excluded sections in determing __gp value.
6822 (elf_hppa_final_link_relocate): Use the symbol's address in
6823 R_PARISC_FPTR64 relocations that don't need an opd entry.
6824 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
6825 (elf64_hppa_finalize_dynreloc): Likewise.
6826 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
6827 (elf64_hppa_finish_dynamic_symbol): Break up assert.
6829 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
6831 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
6832 alignment for .bss, .data and .text sections so that sse and sse2
6834 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
6836 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
6838 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
6841 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
6843 * elflink.h (elf_bfd_final_link): Improve error handling for missing
6846 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
6847 for a symbol that has no output section.
6848 (allocate_dynrel_entries): Correct comment.
6849 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
6851 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
6852 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
6853 with no section. Remove unnecessary parentheses.
6855 2002-06-11 Tom Rix <trix@redhat.com>
6857 * coffcode.h (coff_compute_section_file_positions): Add data
6858 section to AIX loader alignment check.
6860 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
6861 alignment to 4 bytes.
6862 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
6863 power accessor macro.
6864 (do_shared_object_padding): Remove invalid assertion.
6866 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
6868 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
6869 for removed output sections.
6871 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
6873 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
6875 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
6877 2002-06-08 H.J. Lu <hjl@gnu.org>
6879 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
6880 work around a long long bug in gcc 2.96 on mips.
6882 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
6884 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
6885 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
6886 Regenerate dependency lists.
6887 * Makefile.in: Regenerate.
6888 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
6889 vax1knetbsd_vec to targ_selvecs.
6890 * configure.in: Add vax1knetbsd_vec.
6891 * configure: Regenerate.
6892 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
6893 * vax1knetbsd.c: New file.
6894 * vaxnetbsd.c: Update copyright years.
6895 (TARGET_PAGE_SIZE): Set to 0x1000.
6896 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
6898 2002-06-08 Matt Thomas <matt@3am-software.com>
6900 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
6902 2002-06-08 Alan Modra <amodra@bigpond.net.au>
6904 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
6906 2002-06-08 Alan Modra <amodra@bigpond.net.au>
6908 * Makefile.am: Run "make dep-am".
6909 * Makefile.in: Regenerate.
6911 * armnetbsd.c: Replace CONST with const.
6912 * corefile.c: Likewise.
6913 * elf32-dlx.c: Likewise.
6914 * elf64-mips.c: Likewise.
6916 * ns32knetbsd.c: Likewise.
6918 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
6919 table is elf64-sparc.
6921 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6923 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
6924 Fix RELA addends to get not shifted in the result. Don't do special
6925 handling of R_MIPS_64 for NewABI.
6927 2002-06-07 Alan Modra <amodra@bigpond.net.au>
6929 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
6930 (NAME(aout,slurp_reloc_table)): Likewise.
6931 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
6932 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
6933 (xcoff_write_archive_contents_big): Likewise.
6934 (xcoff_generate_rtinit): Likewise.
6935 (xcoff_generate_rtinit): Likewise, and check error return.
6936 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6937 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
6938 (coff_get_normalized_symtab): Likewise.
6939 (coff_make_empty_symbol): Likewise.
6940 (bfd_coff_set_symbol_class): Likewise.
6941 * cofflink.c (coff_link_add_symbols): Likewise.
6942 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
6943 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
6944 (bfd_ecoff_write_accumulated_debug): Likewise.
6945 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
6946 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
6947 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
6948 * ieee.c (do_with_relocs): Use bfd_zalloc.
6949 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
6950 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
6951 (NAME(aout,slurp_reloc_table)): Likewise.
6952 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
6953 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
6954 * som.c (som_build_and_write_symbol_table): Likewise.
6955 (som_slurp_string_table): Likewise.
6956 (som_slurp_symbol_table): Likewise.
6957 (som_bfd_ar_write_symbol_stuff): Likewise.
6958 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
6959 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
6960 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
6961 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
6962 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
6964 2002-06-07 Alan Modra <amodra@bigpond.net.au>
6966 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
6968 (elf_group_name): Update.
6969 (elf_group_id): Define.
6970 (bfd_elf_set_group_contents): Declare.
6971 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
6972 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
6973 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
6974 that sym for the signature.
6975 (_bfd_elf_compute_section_file_positions): Don't call
6976 set_group_contents for "ld -r" case.
6977 (swap_out_syms): Use bfd_zalloc.
6978 * elflink.h (elf_link_add_archive_symbols): Likewise.
6979 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
6980 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
6982 2002-06-07 Alan Modra <amodra@bigpond.net.au>
6984 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
6985 relocs in opd for non-shared too.
6987 2002-06-06 Jeffrey Law <law@redhat.com>
6989 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
6992 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
6994 * merge.c: Include libiberty.h.
6995 * elf-strtab.c: Include libiberty.h.
6997 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
6999 * peXXigen.c (pe_print_idata): Remove unused variable.
7001 2002-06-06 David Heine <dlheine@tensilica.com>
7003 * elf.c (assign_file_positions_for_segments): Remove unallocated
7004 sections from the section to segment mapping for PT_LOAD segments.
7005 Update comment about empty loadable segments.
7007 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
7009 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
7010 is within the .stabstr section.
7012 2002-06-06 Alan Modra <amodra@bigpond.net.au>
7014 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
7015 are "const PTR", not "const PTR *".
7016 (bfd_elf32_swap_symbol_in): Likewise.
7017 (bfd_elf64_swap_symbol_in): Likewise.
7018 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
7019 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
7020 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7021 (elf_link_add_object_symbols): Likewise.
7022 (elf_link_record_local_dynamic_symbol): Likewise.
7023 (elf_link_input_bfd): Likewise.
7024 (elf_gc_mark): Likewise.
7025 (elf_reloc_symbol_deleted_p): Likewise.
7026 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
7027 (mn10200_elf_relax_delete_bytes): Likewise.
7028 (mn10200_elf_symbol_address_p): Likewise.
7029 (mn10200_elf_get_relocated_section_contents): Likewise.
7030 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
7031 (mn10300_elf_relax_section): Likewise.
7032 (mn10300_elf_relax_delete_bytes): Likewise.
7033 (mn10300_elf_symbol_address_p): Likewise.
7034 (mn10300_elf_get_relocated_section_contents): Likewise.
7035 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
7036 (elf32_h8_relax_delete_bytes): Likewise.
7037 (elf32_h8_symbol_address_p): Likewise.
7038 (elf32_h8_get_relocated_section_contents): Likewise.
7039 * elf32-hppa.c (get_local_syms): Likewise.
7040 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
7041 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7042 * elf32-sh.c (sh_elf_relax_section): Likewise.
7043 (sh_elf_relax_delete_bytes): Likewise.
7044 (sh_elf_get_relocated_section_contents): Likewise.
7045 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
7046 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
7047 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
7048 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7049 * elf64-ppc.c (get_local_syms): Likewise.
7050 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
7051 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7053 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
7055 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
7057 2002-06-05 Alan Modra <amodra@bigpond.net.au>
7059 * elf.c (group_signature): Swap in the whole symbol, and handle
7060 extracting section symbol names.
7061 (setup_group): Add comment.
7062 (set_group_contents): When called from objcopy or ld, arrange for
7063 section contents to be written. Write group member output section
7064 indices to allow objcopy to reorganize sections.
7065 (_bfd_elf_copy_private_section_data): Copy group info.
7067 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
7068 (bfd_elf32_swap_symbol_in): Update prototype.
7069 (bfd_elf64_swap_symbol_in): Likewise.
7070 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
7071 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
7072 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7073 (elf_link_add_object_symbols): Likewise.
7074 (elf_link_record_local_dynamic_symbol): Likewise.
7075 (elf_link_input_bfd): Likewise.
7076 (elf_gc_mark): Likewise.
7077 (elf_reloc_symbol_deleted_p): Likewise.
7078 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
7079 (mn10200_elf_relax_delete_bytes): Likewise.
7080 (mn10200_elf_symbol_address_p): Likewise.
7081 (mn10200_elf_get_relocated_section_contents): Likewise.
7082 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
7083 (mn10300_elf_relax_section): Likewise.
7084 (mn10300_elf_relax_delete_bytes): Likewise.
7085 (mn10300_elf_symbol_address_p): Likewise.
7086 (mn10300_elf_get_relocated_section_contents): Likewise.
7087 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
7088 (elf32_h8_relax_delete_bytes): Likewise.
7089 (elf32_h8_symbol_address_p): Likewise.
7090 (elf32_h8_get_relocated_section_contents): Likewise.
7091 * elf32-hppa.c (get_local_syms): Likewise.
7092 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
7093 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7094 * elf32-sh.c (sh_elf_relax_section): Likewise.
7095 (sh_elf_relax_delete_bytes): Likewise.
7096 (sh_elf_get_relocated_section_contents): Likewise.
7097 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
7098 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
7099 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
7100 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7101 * elf64-ppc.c (get_local_syms): Likewise.
7102 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
7103 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7104 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
7105 * elf64-alpha.c (alpha_elf_size_info): Likewise.
7106 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
7107 * elf64-mips.c (mips_elf64_size_info): Likewise.
7108 * elf64-s390.c (s390_elf64_size_info): Likewise.
7109 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
7111 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7113 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
7114 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
7115 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
7116 _bfd_mips_elf_ignore_discarded_relocs.
7117 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
7119 2002-06-05 H.J. Lu <hjl@gnu.org>
7121 * elfxx-mips.c (mips_elf_calculate_relocation): Call
7122 _bfd_elf_rel_local_sym for STT_SECTION relocations against
7123 the SEC_MERGE section.
7125 2002-06-05 Alan Modra <amodra@bigpond.net.au>
7127 * coff-alpha.c: Update copyright date.
7128 * coff-mips.c: Likewise.
7129 * xcoff-target.h: Likewise.
7131 * bfd-in.h: Remove "taken from the source" comment.
7132 * libbfd-in.h: Likewise.
7133 * libcoff-in.h: Likewise.
7134 * bfd-in2.h: Regenerate.
7135 * libbfd.h: Regenerate.
7136 * libcoff.h: Regenerate.
7138 * elf.c (bfd_elf_discard_group): Return true.
7139 * elf-bfd.h (bfd_elf_discard_group): Declare.
7140 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
7141 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
7142 * bfd.c (bfd_discard_group): Define.
7143 * targets.c (struct bfd_target): Add _bfd_discard_group.
7144 (BFD_JUMP_TABLE_LINK): Here too.
7145 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
7146 * aout-adobe.c (aout_32_bfd_discard_group): Define.
7147 * aout-target.h (MY_bfd_discard_group): Define.
7148 * aout-tic30.c (MY_bfd_discard_group): Define.
7149 * binary.c (binary_bfd_discard_group): Define.
7150 * bout.c (b_out_bfd_discard_group): Define.
7151 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
7152 * coffcode.h (coff_bfd_discard_group): Define.
7153 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
7154 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
7155 * i386msdos.c (msdos_bfd_discard_group): Define.
7156 * i386os9k.c (os9k_bfd_discard_group): Define.
7157 * ieee.c (ieee_bfd_discard_group): Define.
7158 * ihex.c (ihex_bfd_discard_group): Define.
7159 * mmo.c (mmo_bfd_discard_group): Define.
7160 * nlm-target.h (nlm_bfd_discard_group): Define.
7161 * oasys.c (oasys_bfd_discard_group): Define.
7162 * ppcboot.c (ppcboot_bfd_discard_group): Define.
7163 * som.c (som_bfd_discard_group): Define.
7164 * srec.c (srec_bfd_discard_group): Define.
7165 * tekhex.c (tekhex_bfd_discard_group): Define.
7166 * versados.c (versados_bfd_discard_group): Define.
7167 * vms.c (vms_bfd_discard_group): Define.
7168 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
7169 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
7170 (aix5coff64_vec): Likewise.
7171 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
7173 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
7175 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
7176 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
7177 (elf32-sh64-com.lo): New dependency list.
7178 * Makefile.in: Regenerate.
7179 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
7180 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
7182 * configure: Regenerate.
7183 * elf32-sh64.c (sh64_address_in_cranges)
7184 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
7185 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
7186 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
7187 * elf32-sh64-com.c: ...here. New file.
7189 2002-06-04 Alan Modra <amodra@bigpond.net.au>
7191 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
7192 ATTRIBUTE_UNUSED on used params.
7193 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
7194 before calling bfd_section_from_elf_index on local syms.
7195 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7197 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
7199 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
7200 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
7201 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
7202 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
7203 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
7204 * Makefile.in: Regenerate.
7205 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
7206 (sh64-*-netbsd*): New targets.
7207 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
7208 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
7209 * configure: Regenerate.
7210 * elf32-sh64-nbsd.c: New file.
7211 * elf64-sh64-nbsd.c: New file.
7212 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
7213 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
7214 bfd_elf64_sh64lnbsd_vec.
7216 2002-06-04 Alan Modra <amodra@bigpond.net.au>
7218 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
7219 (bfd_section_from_shdr): Likewise. Set section name of group
7220 sections from signature.
7221 (group_signature): Split out from setup_group. Ensure symbol table
7223 (bfd_elf_discard_group): New function.
7224 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
7225 .gnu.linkonce* sections if they are members of a group.
7226 (set_group_contents): Set GRP_COMDAT flag.
7227 * section.c (bfd_discard_group): New function.
7228 * bfd-in.h (bfd_elf_discard_group): Declare.
7229 * bfd-in2.h: Regenerate.
7230 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
7231 (elf_linkonce_p): Define.
7233 2002-06-04 Alan Modra <amodra@bigpond.net.au>
7235 * elf.c (bfd_section_from_shdr): Make "name" const.
7236 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
7237 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
7238 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
7239 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
7240 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
7241 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
7242 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
7243 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
7244 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
7245 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
7246 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
7248 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7250 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
7253 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
7255 * elf32-arc.c: Fix formatting.
7256 * elf32-arm.h: Likewise.
7257 * elf32-cris.c: Likewise.
7258 * elf32-dlx.c: Likewise.
7259 * elf32-hppa.c: Likewise.
7260 * elf32-i386.c: Likewise.
7261 * elf32-i386qnx.c: Likewise.
7262 * elf32-or32.c: Likewise.
7263 * elf32-s390.c: Likewise.
7264 * elf32-sh64.c: Likewise.
7265 * elf32-vax.c: Likewise.
7266 * elf32-xstormy16.c: Likewise.
7267 * elf64-alpha.c: Likewise.
7268 * elf64-mmix.c: Likewise.
7269 * elf64-ppc.c: Likewise.
7270 * elf64-s390.c: Likewise.
7271 * elf64-sh64.c: Likewise.
7272 * elf64-x86-64.c: Likewise.
7274 2002-06-02 Richard Henderson <rth@redhat.com>
7276 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
7277 null when there are no got entries for a symbol.
7278 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
7279 uninitialized variable warning.
7281 2002-06-01 Richard Henderson <rth@redhat.com>
7283 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
7284 undefined symbols here.
7285 (elf64_alpha_relax_section): Do it here. Also test for not
7286 defined in the current module.
7287 (elf64_alpha_relocate_section_r): Split out of ...
7288 (elf64_alpha_relocate_section): ... here. Don't dereference
7289 NULL when looking up local got entries.
7291 2002-06-01 Richard Henderson <rth@redhat.com>
7293 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
7294 symbols from JSR relaxation.
7295 (elf64_alpha_size_plt_section_1): New.
7296 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
7297 (elf64_alpha_size_rela_got_1): ... here.
7298 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
7299 (elf64_alpha_size_rela_got_section): ... here.
7300 (elf64_alpha_size_plt_section): New.
7301 (elf64_alpha_relax_section): Call them.
7302 (elf64_alpha_size_got_sections): Remove output_bfd arg.
7303 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
7305 2002-06-01 Richard Henderson <rth@redhat.com>
7307 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
7308 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
7309 in shared libraries. Fix DTPRELHI and TPRELHI value.
7310 (INSN_ADDQ, INSN_RDUNIQ): New.
7311 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
7312 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
7313 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
7314 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
7315 Handle GOTDTPREL and GOTTPREL relocations.
7316 (elf64_alpha_relax_gprelhilo): New.
7317 (elf64_alpha_relax_tls_get_addr): New.
7318 (elf64_alpha_relax_find_tls_segment): New.
7319 (elf64_alpha_relax_section): Handle TLS relocations.
7320 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
7321 (elf64_alpha_check_relocs): Set it.
7323 2002-06-01 Richard Henderson <rth@redhat.com>
7325 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
7327 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
7328 check; don't suppress dynamic relocs for non-allocated sections.
7330 * elf64-alpha.c: Remove dead code.
7332 2002-05-31 Alan Modra <amodra@bigpond.net.au>
7334 * bfd-in2.h: Regenerate.
7335 * libbfd.h: Regenerate.
7336 * po/SRC-POTFILES.in: Regenerate.
7338 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
7341 2002-05-31 Graeme Peterson <gp@qnx.com>
7343 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
7344 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
7346 * Makefile.in: Regenerate.
7347 * config.bfd: Add i[3456]86-*-nto-qnx* support.
7348 * configure.in: Add bfd_elf32_i386qnx_vec support.
7349 * configure: Regenerate.
7350 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
7351 is_contained_by_filepos, and copy_private_bfd_data_p.
7352 * elf.c (assign_file_positions_for_segments): Call backend
7353 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
7354 (IS_CONTAINED_BY_FILEPOS): Define.
7355 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
7356 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
7357 Fix non-K&R call to _bfd_error_handler.
7358 (_bfd_elf_copy_private_section_data): Use backend
7359 copy_private_bfd_data_p.
7360 * elf32-i386.c: Don't include elfxx-target.h when
7361 ELF32_I386_C_INCLUDED is defined.
7362 * elf32-i386qnx.c: New QNX elf backend file.
7363 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
7364 elf_backend_is_contained_by_filepos, and
7365 elf_backend_do_copy_private_bfd_data.
7366 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
7368 2002-05-31 Alan Modra <amodra@bigpond.net.au>
7370 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
7371 Move other similar defines to start of file.
7373 2002-05-30 Tom Rix <trix@redhat.com>
7375 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
7376 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
7378 2002-05-30 Richard Henderson <rth@redhat.com>
7380 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
7381 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
7382 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
7383 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
7384 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
7385 (struct alpha_elf_obj_tdata): Rename total_got_entries and
7386 n_local_got_entries to total_got_size and local_got_size.
7387 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
7388 (alpha_got_entry_size): New.
7389 (elf64_alpha_relax_with_lituse): Use it.
7390 (elf64_alpha_relax_without_lituse): Likewise.
7391 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
7392 (get_got_entry): New.
7393 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
7394 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
7395 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
7396 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
7397 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
7398 (elf64_alpha_calc_got_offsets): Likewise.
7399 (alpha_dynamic_entries_for_reloc): New.
7400 (elf64_alpha_calc_dynrel_sizes): Use it.
7401 (elf64_alpha_size_dynamic_sections): Likewise.
7402 (elf64_alpha_relocate_section): Handle TLS relocations.
7403 * reloc.c: Add Alpha TLS relocations.
7404 * bfd-in2.h, libbfd.h: Rebuild.
7406 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
7408 * peXXigen.c (pe_print_idata): Remove double printed
7409 import table lines; add Bound-To comment.
7411 2002-05-29 Matt Thomas <matt@3am-software.com>
7413 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
7414 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
7415 (elf32-vax.lo): New rule.
7416 * Makefile.in: Regenerate.
7417 * configure.in (bfd_elf32_vax_vec)
7418 (vaxnetbsd_vec): New vectors.
7419 * configure: Regenerate.
7420 * config.bfd (vax-*-netbsdelf*)
7422 (vax-*-netbsd*): New targets.
7423 * elf32-vax.c: New file.
7424 * reloc.c: Add VAX relocations.
7425 * bfd-in2.h: Regenerate.
7426 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
7428 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
7430 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
7431 and bfd_elf32_bigarm_vec to targ_selvecs.
7433 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
7435 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
7436 with auto-imported symbols.
7438 2002-05-29 Adam Nemet <anemet@lnxw.com>
7440 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
7441 sections only record bfd.
7442 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
7443 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
7444 * bfd-in2.h: Regenerate.
7446 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
7448 * syms.c (_bfd_stab_section_find_nearest_line): Move
7449 declaration and initialisation of saw_line and saw_func out of
7452 2002-05-29 Alan Modra <amodra@bigpond.net.au>
7454 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
7455 (bfd_elf64_get_symbol_info): Define.
7456 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
7458 2002-05-29 Andrey Volkov <avolkov@transas.com>
7460 * cpu-h8300.c: Make default h8300 machine first in machine list.
7462 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
7464 * config.bfd: Added DLX configuraton.
7465 * Makefile.am: Added DLX configuraton.
7466 * configure.in: Added DLX configuraton.
7467 * archures.c: Add DLX architecure.
7468 * reloc.c: Add DLX relocs.
7469 * targets.c: Added DLX target vector.
7470 * configure: Regenerate.
7471 * Makefile.in: Regenreate.
7472 * bfd-in2.h: Regenreate.
7473 * elf32-dlx.c: New file: Support DLX target.
7474 * cpu-dlx.c: New file: Support DLX target.
7476 2002-05-25 Alan Modra <amodra@bigpond.net.au>
7478 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
7480 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
7481 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
7482 strings to point inside function code sym string.
7483 (func_desc_adjust): Likewise.
7484 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
7486 2002-05-24 Michal Ludvig <mludvig@suse.cz>
7488 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
7489 (elf64_x86_64_grok_psinfo): Added.
7491 2002-05-24 TAMURA Kent <kent@netbsd.org>
7493 * config.bfd: Add a target for i386-netbsdpe.
7495 2002-05-24 Alan Modra <amodra@bigpond.net.au>
7497 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
7498 and is_func_descriptor.
7499 (func_desc_adjust): Hide function code sym in shared libs unless
7500 there is a matching exported function descriptor sym.
7502 2002-05-23 Jakub Jelinek <jakub@redhat.com>
7504 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
7505 for symbols from SHF_TLS section.
7506 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
7507 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
7508 (map_sections_to_segments): Build PT_TLS segment if necessary.
7509 (assign_file_positions_for_segments): Likewise.
7510 (get_program_header_size): Account for PT_TLS segment.
7511 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
7512 SEC_THREAD_LOCAL sections to STT_TLS.
7513 * reloc.c: Add 386 and IA-64 TLS relocs.
7514 * section.c (SEC_THREAD_LOCAL): Define.
7515 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
7517 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
7518 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
7520 (struct elf_final_link_info): Add first_tls_sec.
7521 (elf_bfd_final_link): Set first_tls_sec.
7522 Compute elf_hash_table (info)->tls_segment.
7523 (elf_link_output_extsym): Handle STT_TLS symbols.
7524 (elf_link_input_bfd): Likewise.
7525 * syms.c (BSF_THREAD_LOCAL): Define.
7526 * bfd-in2.h: Rebuilt.
7527 * libbfd.h: Rebuilt.
7528 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
7529 elf_i386_mkobject, elf_i386_object_p): New functions.
7530 (elf_howto_table): Add TLS relocs.
7531 (elf_i386_reloc_type_lookup): Support TLS relocs.
7532 (elf_i386_info_to_howto_rel): Likewise.
7533 (struct elf_i386_link_hash_entry): Add tls_type.
7534 (struct elf_i386_obj_tdata): New.
7535 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
7537 (struct elf_i386_link_hash_table): Add tls_ldm_got.
7538 (link_hash_newfunc): Clear tls_type.
7539 (elf_i386_check_relocs): Support TLS relocs.
7540 (elf_i386_gc_sweep_hook): Likewise.
7541 (allocate_dynrelocs): Likewise.
7542 (elf_i386_size_dynamic_sections): Likewise.
7543 (elf_i386_relocate_section): Likewise.
7544 (elf_i386_finish_dynamic_symbol): Likewise.
7545 (bfd_elf32_mkobject, elf_backend_object_p): Define.
7546 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
7547 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
7548 want_tprel, want_dtpmod, want_dtprel.
7549 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
7550 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
7551 R_IA64_LTOFF_TPREL22.
7552 (elf_code_to_howto_index): Add TLS relocs.
7553 (elfNN_ia64_check_relocs): Support TLS relocs.
7554 (allocate_global_data_got): Account for TLS .got data.
7555 (allocate_dynrel_entries): Account for TLS dynamic relocations.
7556 (elfNN_ia64_install_value): Supprt TLS relocs.
7557 (set_got_entry): Support TLS relocs.
7558 (elfNN_ia64_relocate_section): Likewise.
7560 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
7562 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
7563 BLX reloc round the relocation up rather than down.
7564 * coff-arm.c (coff_arm_relocate_section): Likewise.
7566 2002-05-21 H.J. Lu (hjl@gnu.org)
7568 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
7571 2002-05-22 Alan Modra <amodra@bigpond.net.au>
7573 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
7574 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
7576 2002-05-22 Alan Modra <amodra@bigpond.net.au>
7578 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
7580 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
7582 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7584 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
7587 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7589 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
7591 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
7592 return with false on error.
7593 (elf_link_input_bfd): Check reloc_emitter return value.
7595 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
7597 * config.bfd (armeb-*-netbsdelf*): New target.
7599 2002-05-20 Alan Modra <amodra@bigpond.net.au>
7601 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
7602 at the plt call stub.
7604 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7606 * cpu-mips.c (mips_compatible): Don't try to check machine
7609 2002-05-18 Tom Rix <trix@redhat.com>
7611 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
7613 2002-05-17 Alan Modra <amodra@bigpond.net.au>
7615 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
7616 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
7617 we've already warned about an undefined symbol. Report more
7618 detail on reloc errors.
7620 2002-05-17 Alan Modra <amodra@bigpond.net.au>
7622 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
7623 * configure.in: Invoke AM_INSTALL_LIBBFD.
7624 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
7625 (install_libbfd): .. New target.
7626 (uninstall_libbfd): Likewise.
7627 (install-bfdlibLTLIBRARIES): Likewise.
7628 (uninstall-bfdlibLTLIBRARIES): Likewise.
7630 (bfdincludedir): New.
7631 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
7632 * aclocal.m4: Regenerate.
7633 * configure: Regenerate.
7634 * Makefile.in: Regenerate.
7636 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
7638 * hash.c (bfd_hash_lookup): Remove computation of len from inside
7641 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
7643 * config.bfd: Add targets for sh64-linux (little endian and
7646 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
7648 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
7649 is located in the same section as the import table. Instead
7650 check, and if necessary load the section containing the thunk.
7652 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
7654 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
7656 (xcoff64_core_file_matches_executable_p): Replace bfd_read
7659 2002-05-15 Alan Modra <amodra@bigpond.net.au>
7661 * aix5ppc-core.c: Warning fixes.
7662 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
7663 * aout-target.h (MY_bfd_link_just_syms): Define.
7664 * aout-tic30.c (MY_bfd_link_just_syms): Define.
7665 * bfd.c (bfd_link_just_syms): Define.
7666 * binary.c (binary_bfd_link_just_syms): Define.
7667 * bout.c (b_out_bfd_link_just_syms): Define.
7668 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
7669 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
7670 * coffcode.h (coff_bfd_link_just_syms): Define.
7671 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
7672 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
7673 (_bfd_elf_link_just_syms): Declare.
7674 * elf.c (_bfd_elf_link_just_syms): New function.
7675 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
7676 sections haven't already been discarded by the linker.
7677 * elflink.h (elf_link_add_object_symbols): Likewise for stab
7678 sections and SEC_MERGE sections.
7679 (elf_bfd_discard_info): Similarly here.
7680 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
7681 * i386msdos.c (msdos_bfd_link_just_syms): Define.
7682 * i386os9k.c (os9k_bfd_link_just_syms): Define.
7683 * ieee.c (ieee_bfd_link_just_syms): Define.
7684 * ihex.c (ihex_bfd_link_just_syms): Define.
7685 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
7686 (_bfd_generic_link_just_syms): Declare.
7687 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
7688 * linker.c (_bfd_generic_link_just_syms): New function.
7689 * mmo.c (mmo_bfd_link_just_syms): Define.
7690 * nlm-target.h (nlm_bfd_link_just_syms): Define.
7691 * oasys.c (oasys_bfd_link_just_syms): Define.
7692 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
7693 * som.c (som_bfd_link_just_syms): Define.
7694 * srec.c (srec_bfd_link_just_syms): Define.
7695 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
7696 (BFD_JUMP_TABLE_LINK): And here.
7697 * tekhex.c (tekhex_bfd_link_just_syms): Define.
7698 * versados.c (versados_bfd_link_just_syms): Define.
7699 * vms.c (vms_bfd_link_just_syms): Define.
7700 * libbfd.h: Regenerate.
7701 * bfd-in2.h: Regenerate.
7703 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7705 * elf32-mips.c: Remove superfluous definitions copied from
7707 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
7708 SGIish vectors to check the special case.
7709 (mips_elf_hi16_reloc): Fix comment.
7710 (mips_elf_got16_reloc): Likewise.
7711 (_bfd_mips_elf32_gprel16_reloc): Likewise.
7712 (elf_reloc_map): Code cleanup.
7713 (mips_reloc_map): Add comment.
7714 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
7715 (mips_elf32_rtype_to_howto): Likewise.
7716 (mips_elf32_discard_info): Likewise.
7717 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
7718 lead to IRIX compatibility now.
7720 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7722 * elfxx-mips.c: Call it IRIX, not Irix in comments.
7724 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
7726 * config.bfd (shle-*-netbsdelf*): Add target which includes
7729 2002-05-13 David Edelsohn <edelsohn@gnu.org>
7731 * configure.in: Revert 2002-04-07. Instead, auto-configure
7733 * configure: Regenerate.
7734 * config.in: Regenerate.
7735 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
7738 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
7740 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
7742 * configure: Regenerate.
7744 2002-05-13 Alan Modra <amodra@bigpond.net.au>
7746 * Makefile.am (install-data-local): Install headers to
7747 $(exec_prefix)/include.
7748 * Makefile.in: Regenerate.
7750 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
7751 Daniel Jacobowitz <drow@mvista.com>
7753 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
7756 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
7758 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
7759 hppa*-*-openbsd*): New targets.
7760 * configure.in (alpha*-*-openbsd*): Set COREFILE.
7761 * configure: Regenerate.
7763 2002-05-10 Tom Rix <trix@redhat.com>
7765 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
7766 xcoff64_ppc_relocate_section.
7767 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
7768 * libxcoff.h: Common xcoff_reloc_type function declaration.
7770 2002-05-10 Alan Modra <amodra@bigpond.net.au>
7772 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
7773 added in 2002-05-09 commit.
7775 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
7776 don't look for stubs on all undefined syms.
7778 2002-05-09 Alan Modra <amodra@bigpond.net.au>
7780 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
7781 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
7784 * elf32-i386.c (elf_howto_table): Comments.
7785 (elf_i386_relocate_section): Handle more relocs for relocatable
7786 linking and against SEC_MERGE sections.
7788 2002-05-08 Alan Modra <amodra@bigpond.net.au>
7790 * elf32-ppc.c (ppc_elf_create_got): New function.
7791 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
7792 _bfd_elf_create_dynamic_sections. Correct .plt flags.
7793 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
7794 _bfd_elf_create_got_section.
7796 2002-05-07 Alan Modra <amodra@bigpond.net.au>
7798 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
7799 * elfxx-target.h (elf_backend_rela_normal): Define.
7800 (elfNN_bed): Init rela_normal.
7801 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
7802 for section symbols here if rela_normal. Simplify abs section test.
7803 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
7804 return immediately. Remove code handling relocatable linking.
7805 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
7806 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
7807 * elf32-i370.c (i370_elf_relocate_section): Likewise.
7808 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7809 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
7810 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
7811 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7812 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
7813 * elf32-s390.c (elf_s390_relocate_section): Likewise.
7814 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7815 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
7816 * elf64-s390.c (elf_s390_relocate_section): Likewise.
7817 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7818 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
7819 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
7820 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7821 * elf-m10200.c (elf_backend_rela_normal): Define.
7822 * elf-m10300.c (elf_backend_rela_normal): Define.
7823 * elf32-fr30.c (elf_backend_rela_normal): Define.
7824 * elf32-i370.c (elf_backend_rela_normal): Define.
7825 * elf32-i860.c (elf_backend_rela_normal): Define.
7826 * elf32-m68k.c (elf_backend_rela_normal): Define.
7827 * elf32-mcore.c (elf_backend_rela_normal): Define.
7828 * elf32-openrisc.c (elf_backend_rela_normal): Define.
7829 * elf32-ppc.c (elf_backend_rela_normal): Define.
7830 * elf32-s390.c (elf_backend_rela_normal): Define.
7831 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
7832 * elf64-ppc.c (elf_backend_rela_normal): Define.
7833 * elf64-s390.c (elf_backend_rela_normal): Define.
7834 * elf64-x86-64.c (elf_backend_rela_normal): Define.
7835 * elfxx-ia64.c (elf_backend_rela_normal): Define.
7836 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
7837 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
7839 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
7841 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
7842 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
7844 2002-05-06 Alan Modra <amodra@bigpond.net.au>
7846 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
7847 when not relocatable. Fix reloc_emitter call for K&R.
7849 2002-05-04 Alan Modra <amodra@bigpond.net.au>
7851 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
7852 reloading local sym addend mistakenly removed in 2002-05-01 change.
7854 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
7855 (read_abbrevs): Change "offset" param to bfd_vma.
7856 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
7857 Change "abbrev_offset" to bfd_vma.
7858 (read_indirect_string): Use correct conversion chars in error
7859 message format string, cast bfd_vma's to unsigned long.
7860 (read_abbrevs): Likewise.
7861 (read_attribute_value): Likewise.
7862 (decode_line_info): Likewise.
7863 (scan_unit_for_functions): Likewise.
7864 (parse_comp_unit): Likewise.
7866 2002-05-04 Tom Rix <trix@redhat.com>
7868 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
7869 (coff_swap_reloc_out): Same.
7870 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
7871 (xcoff_swap_reloc_out): Same.
7872 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
7873 case some 16 bit relocs. Add reloc value to output.
7874 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
7875 R_RBR. Improve names.
7876 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
7877 (bfd_xcoff_backend_data): Update with new reloc swap names.
7878 (bfd_pmac_xcoff_backend_data) : Same.
7879 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
7880 (xcoff64_swap_reloc_out): Same.
7881 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
7882 R_POS. Add reloc value to output.
7883 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
7884 bit R_RBR. Improve names, masks.
7885 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
7886 (bfd_xcoff_backend_data): Update with new reloc swap names.
7887 (bfd_xcoff_aix5_backend_data) : Same.
7889 2002-05-04 Alan Modra <amodra@bigpond.net.au>
7891 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
7892 bfd_count top_index, input_list, all_local_syms.
7893 (elf32_hppa_setup_section_lists): New function, split from
7894 elf32_hppa_size_stubs.
7895 (elf32_hppa_next_input_section): Likewise.
7896 (group_sections): Likewise.
7897 (get_local_syms): Likewise.
7898 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
7899 stubs on undefined syms too.
7900 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
7901 Only access htab elf fields when we have an elf hash table.
7902 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
7903 (elf32_hppa_next_input_section): Declare.
7905 2002-05-04 Bob Byrnes <byrnes@curl.com>
7907 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
7910 2002-05-03 H.J. Lu (hjl@gnu.org)
7912 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
7913 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
7914 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
7915 to hide a global symbol.
7916 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
7917 forced_local to true.
7919 2002-05-02 Richard Henderson <rth@redhat.com>
7921 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
7922 vs SHN_UNDEF to zero.
7924 2002-05-02 Alan Modra <amodra@bigpond.net.au>
7926 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
7928 <R_PPC64_SECTOFF_DS>: Likewise.
7929 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
7931 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
7932 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
7935 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
7936 (ppc64_elf_ha_reloc): New function.
7937 (ppc64_elf_brtaken_reloc): New function.
7938 (ppc64_elf_sectoff_reloc): New function.
7939 (ppc64_elf_sectoff_ha_reloc): New function.
7940 (ppc64_elf_toc_reloc): New function.
7941 (ppc64_elf_toc_ha_reloc): New function.
7942 (ppc64_elf_toc64_reloc): New function.
7943 (ppc64_elf_unhandled_reloc): New function.
7944 (ppc64_elf_howto_raw): Use the above.
7945 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
7946 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
7947 <R_PPC64_SECTOFF_DS>: Likewise.
7948 (IS_ABSOLUTE_RELOC): Update.
7949 (struct ppc_link_hash_table): Add have_undefweak.
7950 (ppc64_elf_link_hash_table_create): Init.
7951 (func_desc_adjust): Set have_undefweak.
7952 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
7953 add the .sfpr blr when have_undefweak.
7954 (ppc64_elf_setup_section_lists): Check hash table flavour.
7955 (ppc64_elf_next_input_section): Move output_section->owner test to
7957 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
7958 and relocatable test. Return TOCstart and don't set elf_gp.
7959 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
7960 offset calculation. Add assert on weak sym branch tweaks.
7961 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
7962 (ppc64_elf_toc): Declare.
7963 (ppc64_elf_next_input_section): Update.
7965 2002-05-01 Alan Modra <amodra@bigpond.net.au>
7967 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
7970 2002-05-01 Alan Modra <amodra@bigpond.net.au>
7972 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
7973 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
7974 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
7975 call branches. Correct undefined weak destination.
7976 (ppc64_elf_func_desc_adjust): Always create at least one blr in
7977 .sfpr, and correct case where either only savef* or restf* is
7980 Long branch stubs, multiple stub sections.
7981 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
7982 (ppc64_elf_next_input_section): Declare.
7983 * elf64-ppc.c: Move linker-only prototypes.
7984 (STUB_SUFFIX): Define.
7985 (enum ppc_stub_type): New.
7986 (struct ppc_stub_hash_entry): New.
7987 (struct ppc_branch_hash_entry): New.
7988 (struct ppc_link_hash_entry): Add stub_cache, oh.
7989 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
7990 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
7991 Rename plt_overflow to stub_error.
7992 (ppc_stub_hash_lookup): Define.
7993 (ppc_branch_hash_lookup): Define.
7994 (stub_hash_newfunc): New function.
7995 (branch_hash_newfunc): New function.
7996 (link_hash_newfunc): Init new fields.
7997 (ppc64_elf_link_hash_table_create): Likewise.
7998 (ppc64_elf_link_hash_table_free): New function.
7999 (ppc_stub_name): New function.
8000 (ppc_get_stub_entry): New function.
8001 (ppc_add_stub): New function.
8002 (create_linkage_sections): Use bfd_make_section_anyway. Create
8003 .branch_lt and .rela.branch_lt sections. Don't create .stub.
8004 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
8005 and set up for plt call stubs. Link func and func desc syms.
8006 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
8007 (func_desc_adjust): Avoid hash lookup when func desc sym available
8008 via shortcut, and set links when processing.
8009 (ppc64_elf_hide_symbol): Likewise.
8010 (allocate_dynrelocs): Don't allocate stub section here.
8011 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
8013 (ppc_type_of_stub): New function.
8014 (build_one_stub): Delete.
8015 (ppc_build_one_stub): New function.
8016 (ppc_size_one_stub): New function.
8017 (ppc64_elf_setup_section_lists): New function.
8018 (ppc64_elf_next_input_section): New function.
8019 (group_sections): New function.
8020 (get_local_syms): New function.
8021 (ppc64_elf_size_stubs): Rewrite.
8022 (ppc64_elf_build_stubs): Rewrite.
8023 (ppc64_elf_relocate_section): Look up stub entry for REL24
8024 relocs. Don't propagate REL14* to dynamic objects. Look for long
8025 branch stubs if REL14* or REL24 relocs won't reach.
8026 (bfd_elf64_bfd_link_hash_table_free): Define.
8028 2002-04-30 Mark Mitchell <mark@codesourcery.com>
8030 * config.bfd: Add support for powerpc-*-windiss.
8032 2002-04-30 Tom Rix <trix@redhat.com>
8034 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
8035 symbol names into the hash table.
8037 2002-04-28 Tom Rix <trix@redhat.com>
8039 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
8040 calulating relocations.
8041 (xcoff_complain_overflow) : Function table for relocation errors.
8042 (xcoff_ppc_relocate_section): Use relocation and complain function
8044 (xcoff_complain_overflow_unsigned_func): New complain function.
8045 (xcoff_complain_overflow_signed_func): Same.
8046 (xcoff_complain_overflow_bitfield_func): Same.
8047 (xcoff_complain_overflow_dont_func): Same.
8048 (xcoff_reloc_type_crel): New recot function.
8049 (xcoff_reloc_type_br): Same.
8050 (xcoff_reloc_type_ba): Same.
8051 (xcoff_reloc_type_toc): Same.
8052 (xcoff_reloc_type_rel): Same.
8053 (xcoff_reloc_type_neg): Same.
8054 (xcoff_reloc_type_pos): Same.
8055 (xcoff_reloc_type_fail): Same.
8056 (xcoff_reloc_type_noop): Same.
8057 * libxcoff.h : Declare common parts for xcoff64.
8058 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
8059 and complain function tables.
8061 2002-04-28 Alan Modra <amodra@bigpond.net.au>
8063 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
8064 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
8066 2002-04-26 Alan Modra <amodra@bigpond.net.au>
8068 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
8069 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
8071 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
8072 same as the output before calling elf_link_input_bfd.
8074 * coffcode.h (coff_compute_section_file_positions): Set
8075 section_tail after shuffling section list.
8077 2002-04-24 Christian Groessler <chris@groessler.org>
8079 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
8080 addresses are 23bit with a special layout, not plain 32bit
8081 values. Prevent relocation of immediate values.
8083 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
8085 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
8086 MIPS-16 ASE flags are set, print something to indicate that.
8088 2002-04-23 Alan Modra <amodra@bigpond.net.au>
8090 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
8091 under which a plt call stub is used.
8092 (final_link_relocate): Similarly.
8093 (allocate_plt_static): Clear h-plabel except when plt entry is
8094 exclusively used for a plabel.
8095 (allocate_dynrelocs): Use the above to simplify plt sizing.
8096 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
8097 (elf32_hppa_link_hash_table_create): Init.
8099 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
8100 (elf32_hppa_check_relocs): Set has_22bit_branch.
8102 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
8103 (final_link_relocate): Likewise.
8105 2002-04-22 Jakub Jelinek <jakub@redhat.com>
8107 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
8108 search table if some FDE is DW_EH_PE_aligned encoded either.
8109 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
8111 2002-04-22 Richard Smith <richard@ex-parrot.com>
8112 Jakub Jelinek <jakub@redhat.com>
8114 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
8115 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
8116 encoded personality.
8117 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
8118 for CIE/FDE removal.
8120 2002-04-20 Tom Rix <trix@redhat.com>
8122 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
8124 2002-04-20 Alan Modra <amodra@bigpond.net.au>
8126 * archures.c (bfd_lookup_arch): Move the list order comment..
8127 (struct bfd_arch_info): ..to where it belongs.
8128 * bfd-in2.h: Regenerate.
8130 * archures.c (bfd_lookup_arch): Add comment on list order.
8131 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
8132 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
8133 is always at head of list.
8135 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
8137 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
8138 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
8139 definition of these functions for ARM_WINCE builds as they are
8141 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
8142 for ARM_WINCE builds.
8144 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
8146 * coff-arm.c (bfd_arm_process_before_allocation):
8148 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
8150 * cpu-sh.c (scan_mach): Delete.
8151 (arch_info_struct): Replace scan_mach with bfd_default_scan.
8152 (bfd_sh_arch): Likewise.
8154 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
8156 * ihex.c (ihex_write_object_contents): Fix check for records
8157 crossing 64K boundaries.
8159 2002-04-16 Alan Modra <amodra@bigpond.net.au>
8161 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
8162 type rather than just assuming entries are ELF.
8163 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
8164 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
8165 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
8166 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
8167 rather than elf_link_hash_entry.
8169 2002-04-15 Richard Henderson <rth@redhat.com>
8171 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
8174 2002-04-15 Michael Snyder <msnyder@redhat.com>
8176 * opncls.c (bfd_close): Write contents if writeable.
8177 Minor formatting tidy-ups.
8179 2002-04-15 Alan Modra <amodra@bigpond.net.au>
8181 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
8183 2002-04-12 Michael Snyder <msnyder@redhat.com>
8185 * bfd-in.h (bfd_get_section_lma): New access macro.
8186 Minor white-space fix-up.
8188 2002-04-12 Alan Modra <amodra@bigpond.net.au>
8190 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
8193 2002-04-09 DJ Delorie <dj@redhat.com>
8195 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
8197 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
8199 * coffcode.h (coff_read_word): New.
8200 (coff_compute_checksum): New.
8201 (coff_apply_checksum): New.
8202 (coff_write_object_contents): Call coff_apply_checksum () to
8203 apply checksum to PE image.
8205 2002-04-08 Randolph Chung <tausq@debian.org>
8207 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
8208 (elf32_hppa_final_link): Split out sorting logic to..
8209 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
8210 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
8212 2002-04-07 Andrew Cagney <ac131313@redhat.com>
8214 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
8216 * configure: Re-generate.
8218 2002-04-07 Andrew Cagney <ac131313@redhat.com>
8220 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
8221 is greater or equal to 4.3.3.
8222 * configure: Regenerate.
8225 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
8227 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
8228 R_CRIS_32_PCREL>: Fix typo in name.
8229 (cris_elf_check_relocs): Always create .rela.got here when
8230 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
8231 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
8232 assume it's created.
8234 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
8236 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
8237 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
8239 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
8240 * bfd.c (bfd_link_hash_table_free): Define.
8241 * binary.c (binary_bfd_link_hash_table_free): Define.
8242 * bout.c (b_out_bfd_link_hash_table_free): Define.
8243 * coff-rs6000.c (rs6000coff_vec): Include
8244 _bfd_generic_link_hash_table_free.
8245 (pmac_xcoff_vec): Likewise.
8246 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
8247 (aix5coff64_vec): Likewise.
8248 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
8249 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
8250 (bfd_elf32_bfd_link_hash_table_free): Define.
8251 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
8252 (bfd_elf32_bfd_link_hash_table_free): Define.
8253 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
8255 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
8256 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
8257 * ieee.c (ieee_bfd_link_hash_table_free): Define.
8258 * ihex.c (ihex_bfd_link_hash_table_free): Define.
8259 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
8260 (_bfd_generic_link_hash_table_free): Add prototype.
8261 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
8262 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
8263 * linker.c (_bfd_generic_link_hash_table_free): New function.
8264 * mmo.c (mmo_bfd_link_hash_table_free): Define.
8265 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
8266 * oasys.c (oasys_bfd_link_hash_table_free): Define.
8267 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
8268 * som.c (som_bfd_link_hash_table_free): Define.
8269 * srec.c (srec_bfd_link_hash_table_free): Define.
8270 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
8271 * versados.c (versados_bfd_link_hash_table_free): Define.
8272 * vms.c (vms_bfd_link_hash_table_free): New function.
8273 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
8275 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
8276 instead of bfd_alloc.
8277 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
8278 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
8279 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
8280 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
8281 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
8282 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
8283 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
8284 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
8285 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
8286 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
8287 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
8288 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
8289 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
8290 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
8291 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
8292 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
8293 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
8294 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
8295 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
8296 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
8297 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
8298 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
8299 * m68klinux.c (linux_link_hash_table_create): Likewise.
8300 * sparclinux.c (linux_link_hash_table_create): Likewise.
8301 * sunos.c (sunos_link_hash_table_create): Likewise.
8302 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
8304 * targets.c: Add _bfd_link_hash_table_free to xvec.
8306 * bfd-in2.h: Regenerate.
8307 * libbfd.h: Regenerate.
8308 * libcoff.h: Regenerate.
8310 2002-04-04 Alan Modra <amodra@bigpond.net.au>
8312 * dep-in.sed: Cope with absolute paths.
8313 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
8315 * Makefile.in: Regenerate.
8316 * coff-arm.c: Fix copyright date.
8317 * cpu-h8300.c: Likewise.
8318 * cpu-i370.c: Likewise.
8319 * cpu-s390.c: Likewise.
8320 * cpu-mips.c: Likewise.
8321 * po/SRC-POTFILES.in: Regenerate.
8323 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8325 * Makefile.am: Add elfxx-mips.c to the known backends.
8326 (elf32-mips.lo): remove dependency to coff/external.h.
8327 * Makefile.in: Regenerate.
8328 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
8329 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
8331 * configure: Regenerate.
8332 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
8333 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
8334 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
8335 MIPS specific backend functions.
8336 * elf32-mips.c: Moved most code to elfxx-mips.c.
8337 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
8339 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
8340 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
8341 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
8342 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
8343 interface to allow selection of the right REL or RELA howto table.
8344 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
8345 static. Let it refuse n32 objects.
8346 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
8347 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
8348 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
8349 (elf32_mips_ignore_discarded_relocs): Rename from
8350 _bfd_elf32_mips_ignore_discarded_relocs.
8351 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
8352 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
8353 (elf_mips_howto_table_rela): Remove.
8354 * elf64-mips.c: Moved most code to elfxx-mips.c.
8355 (bfd_elf64_bfd_reloc_type_lookup): Make static.
8356 (mips_elf64_rtype_to_howto): New function.
8357 (mips_elf64_object_p): Likewise.
8358 (elf64_mips_irix_compat): Likewise.
8359 * elfxx-mips.c: New file containing common code merged together from
8360 elf32-mips.c and elf64-mips.c.
8361 * elfxx-mips.h: New file containing MIPS specific prototypes from
8363 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
8364 elf_backend_mips_rtype_to_howto.
8366 2002-04-04 Alan Modra <amodra@bigpond.net.au>
8368 * srec.c (MAXCHUNK, Chunk): Revise comments.
8369 (srec_write_record): Correct buffer size.
8370 (srec_write_header): Do without intermediate buffer.
8371 (srec_write_section): Validate Chunk.
8372 (srec_write_terminator): Pass NULL instead of dummy buffer.
8373 (srec_write_symbols): Pass file and symbol names directly to
8374 bfd_bwrite so sprintf won't overflow buffer.
8376 2002-04-03 Jakub Jelinek <jakub@redhat.com>
8378 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
8379 PC relative relocs against hidden symbols.
8380 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8382 2002-04-03 Alan Modra <amodra@bigpond.net.au>
8384 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
8385 LMAs, loop over segments until p_vaddr and p_memsz specify an
8386 extent enclosing the section.
8388 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
8390 * ihex.c (ihex_write_object_contents): Do not allow records to
8391 cross a 64K boundary - wrap if necessary.
8393 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
8395 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
8396 which caused the returned LWP ID to always be 0.
8398 2002-04-01 Richard Henderson <rth@redhat.com>
8400 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
8401 (elf32_sparc_relocate_section): Use it to figure out when to
8402 initialize .got entries.
8403 * elf64-sparc.c: Similarly.
8405 2002-03-28 Alan Modra <amodra@bigpond.net.au>
8407 * linker.c (link_action): Ignore duplicate warning syms.
8408 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
8409 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
8410 (elf_adjust_dynamic_symbol): Likewise.
8411 (elf_export_symbol): Likewise.
8412 (elf_link_find_version_dependencies): Likewise.
8413 (elf_link_assign_sym_version): Likewise.
8414 (elf_link_sec_merge_syms): Likewise.
8415 (elf_link_output_extsym): Likewise.
8416 (elf_gc_sweep_symbol): Likewise.
8417 (elf_gc_propagate_vtable_entries_used): Likewise.
8418 (elf_gc_smash_unused_vtentry_relocs): Likewise.
8419 (elf_gc_allocate_got_offsets): Likewise.
8420 (elf_collect_hash_codes): Likewise.
8421 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
8422 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
8423 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
8424 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
8425 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
8426 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
8427 (elf_cris_discard_excess_dso_dynamics): Likewise.
8428 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
8429 (mark_PIC_calls): Likewise.
8430 (allocate_plt_static): Likewise.
8431 (allocate_dynrelocs): Likewise.
8432 (readonly_dynrelocs): Likewise.
8433 * elf32-i386.c (allocate_dynrelocs): Likewise.
8434 (readonly_dynrelocs): Likewise.
8435 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
8436 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
8437 * elf32-mips.c (mips_elf_output_extsym): Likewise.
8438 (mips_elf_sort_hash_table_f): Likewise.
8439 (mips_elf_check_mips16_stubs): Likewise.
8440 * elf32-s390.c (allocate_dynrelocs): Likewise.
8441 (readonly_dynrelocs): Likewise.
8442 * elf32-sh.c (sh_elf_discard_copies): Likewise.
8443 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
8444 (xstormy16_relax_plt_realloc): Likewise.
8445 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
8446 (elf64_alpha_output_extsym): Likewise.
8447 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
8448 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
8449 (mips_elf64_check_mips16_stubs): Likewise.
8450 (mips_elf64_output_extsym): Likewise.
8451 * elf64-ppc.c (func_desc_adjust): Likewise.
8452 (allocate_dynrelocs): Likewise.
8453 (readonly_dynrelocs): Likewise.
8454 * elf64-s390.c (allocate_dynrelocs): Likewise.
8455 (readonly_dynrelocs): Likewise.
8456 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
8457 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
8458 (readonly_dynrelocs): Likewise.
8459 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
8460 * aoutx.h (aout_link_write_other_symbol): Likewise.
8461 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
8462 (_bfd_coff_write_global_sym): Likewise.
8463 * i386linux.c (linux_tally_symbols): Likewise.
8464 * m68klinux.c (linux_tally_symbols): Likewise.
8465 * sparclinux.c (linux_tally_symbols): Likewise.
8466 * pdp11.c (aout_link_write_other_symbol): Likewise.
8467 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
8468 * xcofflink.c (xcoff_build_ldsyms): Likewise.
8469 (xcoff_write_global_symbol): Likewise.
8471 * cofflink.c (_bfd_coff_final_link): Formatting.
8472 * cpu-mips.c (mips_compatible): Make static, prototype.
8473 * elf32-i386.c (elf_i386_check_relocs): Formatting.
8474 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
8475 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
8476 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
8477 (mips_elf64_final_link): Likewise.
8478 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
8481 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
8483 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
8484 (SWAP_OUT_RELOC_OFFSET): Define.
8486 2002-03-27 Gregory Steuck <greg@nest.cx>
8488 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
8489 terminating NULL if empty symbol table.
8490 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
8492 2002-03-26 H.J. Lu (hjl@gnu.org)
8494 * elflink.h (elf_link_input_bfd): Revert the last change since
8495 the gcc exception handling isn't fixed yet.
8497 2002-03-26 H.J. Lu (hjl@gnu.org)
8499 * elflink.h (elf_link_input_bfd): Complain about relocations
8500 against local symbols in discarded sections.
8502 2002-03-26 Alan Modra <amodra@bigpond.net.au>
8504 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
8506 2002-03-23 Alan Modra <amodra@bigpond.net.au>
8508 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
8509 section file offset for !SEC_LOAD sections.
8511 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
8513 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
8514 <case R_ARM_GOT>): Handle relocations to Thumb functions.
8516 2002-03-21 Alan Modra <amodra@bigpond.net.au>
8518 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
8520 * archive.c: Update copyright date.
8521 * bfd-in2.h: Regenerate.
8522 * libbfd.h: Regenerate.
8523 * Makefile.am: Run "make dep-am"
8524 * Makefile.in: Regenerate.
8525 * po/SRC-POTFILES.in: Regenerate.
8527 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
8529 * dwarf2.c (struct funcinfo): Move up.
8530 (lookup_address_in_function_table): New argument function_ptr.
8532 (lookup_address_in_line_table): New argument function. If function
8533 is non-NULL, use it to handle ``addr'' before the first line note of
8535 (comp_unit_find_nearest_line): Update and swap calls to
8536 lookup_address_in_function_table and lookup_address_in_line_table.
8537 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
8538 N_SLINE encountered if we see an N_FUN before any N_SLINE.
8540 2002-03-20 Tom Rix <trix@redhat.com>
8542 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
8543 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
8544 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
8546 2002-03-19 Tom Rix <trix@redhat.com>
8548 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
8549 dynamic objects in archives.
8551 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
8553 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
8554 STT_NOTYPE symbols to STT_OBJECT.
8556 2002-03-18 Jan Hubicka <jh@suse.cz>
8558 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
8560 2002-03-18 Tom Rix <trix@redhat.com>
8562 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
8563 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
8564 * coff-rs6000 (do_pad) : New function for archive padding.
8565 (do_copy) : New function for object file copying in archives.
8566 (do_shared_object_padding) : New function for padding shared
8567 objects to their text section alignment in archives.
8568 (bfd_xcoff_ar_achive_set_magic) : Stub.
8569 (xcoff_write_armap_big) : Use do_copy and do_pad.
8570 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
8572 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
8573 bfd_xcoff_magic_number.
8574 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
8576 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
8577 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
8578 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
8579 * rs6000-core.c : Update copyright date.
8580 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
8582 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
8583 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
8584 (coff_set_flags) : Use bfd_xcoff_magic_number.
8585 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
8586 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
8587 * Makefile.am : Same.
8588 * config.bfd : Same.
8590 * configure : Regnerate.
8591 * Makefile.in : Same.
8594 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
8596 * po/fr.po: Updated version.
8598 2002-03-18 Alan Modra <amodra@bigpond.net.au>
8600 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
8601 * libbfd.h: Regenerate.
8602 * archive.c (coff_write_armap): Pass on failures from
8603 bfd_write_bigendian_4byte_int.
8605 2002-03-14 H.J. Lu <hjl@gnu.org>
8607 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
8608 error to bfd_error_nonrepresentable_section for reinit_array
8611 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
8613 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
8614 OR it in rather than replacing previously selected flags.
8616 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
8617 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
8619 2002-03-14 Alan Modra <amodra@bigpond.net.au>
8621 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
8623 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
8624 ensure reloc size matches before calling elf_link_input_bfd.
8625 Add an assert to check reloc size when counting output relocs.
8627 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
8629 * mmo.c (mmo_get_loc): Return NULL rather than false.
8631 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
8633 * po/fr.po: Updated version.
8635 2002-03-13 Alan Modra <amodra@bigpond.net.au>
8637 * archures.c (bfd_default_compatible): Test bits_per_word.
8638 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
8639 bfd_default_compatible.
8640 * cpu-i370.c (i370_compatible): Likewise.
8641 * cpu-sparc.c (sparc_compatible): Likewise.
8642 * cpu-h8300.c (compatible): Test in->arch == out->arch.
8644 * elflink.h: Formatting fixes.
8645 (elf_link_output_extsym): Merge undefined and undef weak cases.
8647 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
8648 when word size of input matches output word size.
8650 2002-03-12 Andreas Jaeger <aj@suse.de>
8652 * cpu-i386.c (i386_compatible): New. Use it instead of
8653 bfd_default_compatible.
8655 2002-03-07 H.J. Lu (hjl@gnu.org)
8657 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
8658 as the type for bfd_reloc_val.
8660 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
8662 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
8663 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
8664 (elf_hppa_final_link_relocate): Correct relocations for indirect
8665 references to local data through the DLT. Fix .opd creation for
8666 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
8667 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
8668 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
8669 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
8670 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
8671 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
8672 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
8674 2002-03-05 Jakub Jelinek <jakub@redhat.com>
8676 * merge.c (_bfd_merge_sections): Don't segfault if there
8677 is nothing to merge due to GC.
8679 2002-03-05 Alan Modra <amodra@bigpond.net.au>
8681 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
8682 symbols that have been forced local.
8684 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
8685 to output forced local syms for non-shared link.
8686 (elf_link_output_extsym): Tweak condition for calling backend
8687 adjust_dynamic_symbol so that previous behaviour is kept.
8688 Whitespace changes throughout file.
8690 2002-03-04 H.J. Lu <hjl@gnu.org>
8692 * elf.c (bfd_section_from_shdr): Handle special sections,
8693 .init_array, .fini_array and .preinit_array.
8694 (elf_fake_sections): Likewise.
8696 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
8697 DT entry only if the section is in output for .init_array,
8698 .fini_array and .preinit_array. Complain about .preinit_array
8700 (elf_bfd_final_link): Warn zero size for .init_array,
8701 .fini_array and .preinit_array sections.
8703 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
8704 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
8705 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
8708 2002-03-04 Alan Modra <amodra@bigpond.net.au>
8710 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
8711 * configure: Regenerate.
8713 2002-03-02 Tom Rix <trix@redhat.com>
8715 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
8717 * coff-rs6000.c (xcoff_howto_table): Same.
8719 2002-03-01 David Mosberger <davidm@hpl.hp.com>
8721 * elflink.h (size_dynamic_sections): If section named
8722 ".preinit_array" exists, create DT_PREINIT_ARRAY and
8723 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
8724 ".init_array" and ".fini_array".
8725 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
8726 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
8729 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
8731 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
8734 2002-02-25 Alan Modra <amodra@bigpond.net.au>
8736 * elf64-hppa.h: Update copyright date.
8738 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
8739 (ppc64_elf_relocate_section): Don't generate power4 style branch
8740 hints for *_BRTAKEN and *_BRNTAKEN relocs.
8742 2002-02-22 Jakub Jelinek <jakub@redhat.com>
8744 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
8746 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8748 2002-02-21 Andreas Jaeger <aj@suse.de>
8750 * elf64-x86-64.c: Major rework that introduces all recent changes
8751 to the x86-64 backend. Get a closer match to elf32-i386.
8752 (struct elf64_x86_64_dyn_relocs): Rename from
8753 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
8755 (struct elf64_x86_64_link_hash_table): Add short cuts to some
8757 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
8758 remove casts, initialize new hash members.
8759 (create_got_section): New.
8760 (elf64_x86_64_create_dynamic_sections): New.
8761 (elf64_x86_64_copy_indirect_symbol): New.
8762 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
8763 relocs, .got or .relgot here but do it in allocate_dynrelocs.
8764 Reference count possible .plt and .got entries. Don't test input
8765 section SEC_READONLY here to try to avoid copy relocs, and keep
8766 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
8767 DF_TEXTREL here. Delay setting of variables until needed. Cache
8768 pointer to "sreloc" section in elf_section_data. Tweak condition
8769 under which .got created. Report files with bad relocation
8771 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
8772 Reference count possible .plt entries. Don't deallocate .got and
8774 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
8775 do copy reloc processing for weakdefs. Remove redundant casts and
8776 aborts. Delay setting of vars until needed. Move creation of
8777 dynamic symbols and allocation of .plt and .rela.plt to
8778 allocate_dynrelocs. Replace BFD_ASSERT with abort.
8779 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
8780 (allocate_dynrelocs): New.
8781 (readonly_dynrelocs): New.
8782 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
8783 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
8784 Zero out the dynamic allocated content space.
8785 (elf64_x86_64_discard_copies): Removed.
8786 (elf64_x86_64_relocate_section): Make use of dynamic section
8787 short-cuts. Localise vars, and delay setting. Better error
8788 reporting, replace BFD_ASSERT with abort. Check
8789 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
8790 regular object file and tread the weak definition as the normal
8791 one. Don't discard relocs for undefweak or undefined symbols and
8792 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
8794 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
8795 symbols that have been forced local. Use same test to decide if
8796 we can use a relative reloc for got as relocate_section. Expand
8797 SHN_UNDEF comment. Move expressions out of function calls.
8798 Replace BFD_ASSERT with abort.
8799 (bfd_elf64_bfd_final_link): Removed.
8800 (elf_backend_copy_indirect_symbol): Define.
8802 2002-02-20 Tom Rix <trix@redhat.com>
8804 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
8805 (_bfd_xcoff_reloc_type_lookup): Use it.
8806 * coff64-rs6000.c (xcoff64_howto_table): Same.
8807 (xcoff64_reloc_type_lookup): Same.
8809 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
8811 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
8814 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
8816 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
8817 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
8818 * bfd-in2.h: Regenerate.
8819 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
8820 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
8822 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
8823 (elf_s390_reloc_type_lookup): Likewise.
8824 (elf_s390_check_relocs): Likewise.
8825 (elf_s390_gc_sweep_hook): Likewise.
8826 (elf_s390_relocate_section): Likewise.
8827 (elf_s390_object_p): Use renamed architecture define.
8828 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
8830 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
8832 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
8834 2002-02-19 Jakub Jelinek <jakub@redhat.com>
8836 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
8837 absptr -> pcrel optimization for shared libs.
8838 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
8839 library cannot be converted to pcrel.
8840 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
8842 * elf32-i386.c (elf_i386_relocate_section): If
8843 _bfd_elf_section_offset returned -2, skip, but make sure the
8844 relocation is installed.
8845 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
8846 * elf32-cris.c (cris_elf_relocate_section): Likewise.
8847 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
8848 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8849 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8850 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8851 * elf32-s390.c (elf_s390_relocate_section): Likewise.
8852 * elf32-sh.c (sh_elf_relocate_section): Likewise.
8853 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
8854 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8855 * elf64-s390.c (elf_s390_relocate_section): Likewise.
8856 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
8857 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8858 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8859 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
8860 _bfd_elf_section_offset returning -2 the same way as -1.
8861 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
8862 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
8864 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
8866 2002-02-18 Tom Rix <trix@redhat.com>
8868 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
8869 (bfd_xcoff_size_dynamic_sections): Same.
8870 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
8871 (bfd_xcoff_size_dynamic_sections): Same.
8872 * coff-rs6000.c (xcoff_generate_rtinit): Same.
8873 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
8874 * libxcoff.h (struct xcoff_backend_data_rec): Same.
8875 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
8876 * bfd-in2.h: Regenerate.
8878 2002-02-18 Alan Modra <amodra@bigpond.net.au>
8880 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
8881 (struct ppc_link_hash_table): Add sfpr.
8882 (ppc64_elf_link_hash_table_create): Init it.
8883 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
8885 (create_linkage_sections): ..here. Make .sfpr too.
8886 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
8888 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
8889 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
8890 ._restf* functions, and create as needed.
8891 (func_desc_adjust): Only force_local for shared libs.
8893 2002-02-18 David O'Brien <obrien@FreeBSD.org>
8895 * configure.in: Bump version number post 2.12 branching.
8896 * configure: Regenerate.
8898 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
8900 * mmo.c: Correct and improve comments.
8901 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
8902 zero-pad. Use input to fill up non-empty bfd buffer.
8903 (mmo_flush_chunk): New function.
8904 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
8905 changed. Don't emit location specifier if VMA is same as
8906 *LAST_VMAP after omitting leading zero contents. Call
8907 mmo_flush_chunk before emitting location specifier.
8908 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
8909 with mmo_write_loc_chunk calls.
8910 (mmo_internal_write_section): Call mmo_flush_chunk after
8912 (mmo_write_symbols_and_terminator): Move :Main to first position
8913 in symbol array. Add faked one if it does not exist if there are
8914 other symbols. Don't add it if there are no symbols at all. Move
8915 out test for value of :Main from symbol loop. Rename table
8916 fakemain to maintable and variable mainsym to fakemain.
8918 2002-02-15 Richard Henderson <rth@redhat.com>
8920 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
8921 section with no got matches any got. Simplify error generaion.
8923 2002-02-15 Alan Modra <amodra@bigpond.net.au>
8925 Support arbitrary length fill patterns.
8926 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
8927 (_bfd_default_link_order): Remove bfd_fill_link_order code.
8928 Call default_data_link_order.
8929 (default_fill_link_order): Delete.
8930 (default_data_link_order): New function.
8931 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
8932 of bfd_fill_link_order with bfd_data_link_order.
8933 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
8934 * elf64-mips.c (mips_elf64_final_link): Likewise.
8936 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
8937 Correct value returned in "end" for "0x<non-hex>".
8939 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
8941 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
8942 (scan): Test against 'mach' field in info structure.
8944 2002-02-14 Alan Modra <amodra@bigpond.net.au>
8946 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
8948 2002-02-14 Matt Fredette <fredette@netbsd.org>
8950 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
8953 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
8955 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
8956 non-zero physical addresses when adjusting the LMAs of new
8959 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
8961 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
8962 from _bfd_elf_hppa_gen_reloc_type.
8963 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
8964 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
8965 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
8966 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
8968 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
8970 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
8971 loading its contents if there's nothing to do in it.
8973 2002-02-12 Alan Modra <amodra@bigpond.net.au>
8975 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
8978 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
8979 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
8980 (ppc64_elf_finish_dynamic_sections): Set values for them.
8982 2002-02-11 Michael Snyder <msnyder@redhat.com>
8984 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
8985 * elf.c (elfcore_grok_pstatus): Add prototype.
8986 (elfcore_grok_lwpstatus): Add prototype.
8987 (elfcore_write_lwpstatus): New function.
8988 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
8990 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
8992 * elf32-sh.c: Added missing prototypes.
8993 * elf32-sh64.c: Likewise.
8994 (sh_elf_align_loads): Mark unused args as such.
8995 * elf64-sh64.c: Added missing prototypes.
8996 (struct elf_sh64_link_hash_entry): Fix typo.
8997 (sh_elf64_relocate_section): Fix info argument passed to
8998 _bfd_elf_section_offset.
9000 2002-02-11 Alan Modra <amodra@bigpond.net.au>
9002 * Makefile.am: "make dep-am".
9003 * Makefile.in: Regenerate.
9004 * aclocal.m4: Regenerate.
9005 * config.in: Regenerate.
9006 * configure: Regenerate.
9008 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
9010 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
9012 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
9014 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
9015 cast warnings for the common case.
9017 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
9019 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
9021 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
9024 2002-02-09 Richard Henderson <rth@redhat.com>
9026 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
9027 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
9028 (elf64_alpha_relocate_section): Likewise.
9029 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
9030 * bfd-in2.h, libbfd.h: Rebuild.
9032 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
9034 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
9035 that base-plus-offset reloc accounting is consistent.
9036 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
9037 up to date for undefined symbols.
9039 2002-02-08 Eric Christopher <echristo@redhat.com>
9041 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9043 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
9044 sections for the O32 ABI.
9046 2002-02-08 Chris Demetriou <cgd@broadcom.com>
9048 * elf32-arm.h: Fix formatting of _("...").
9049 * elf32-d10v.c: Likewise.
9050 * elf32-m68k.c: Likewise.
9051 * elf32-mips.c: Likewise.
9053 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
9055 * coff-or32.c: Fix compile time warning messages.
9057 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
9059 Contribute sh64-elf.
9060 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
9061 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
9062 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
9063 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
9064 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
9065 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
9066 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
9067 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
9068 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
9069 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
9071 * libbfd.h, bfd-in2.h: Rebuilt.
9072 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
9073 (sh_reloc_map): Map them.
9074 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
9075 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
9076 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
9077 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
9078 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
9079 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
9080 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
9081 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
9082 datalabel_got_offset.
9083 (sh_elf_link_hash_newfunc): Initialize it.
9084 (sh_elf_relocate_section): Augment the scope of
9085 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
9086 GOT and GOTOFF handling to new SHmedia relocation types. Support
9088 (sh_elf_check_relocs): Likewise.
9089 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
9090 PLT entries using movi_shori_putval. Support GOT_BIAS.
9091 (sh_elf_finish_dynamic_sections): Likewise.
9092 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
9093 relocation, it's now done by the caller.
9095 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
9096 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
9097 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
9098 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
9099 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
9100 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
9101 sh64_elf64_hash_table): New.
9102 (sh_elf64_howto_table): Introduce new relocs.
9103 (sh_elf64_info_to_howto): Accept new PIC relocs.
9104 (sh_elf64_relocate_section): Augment the scope of
9105 seen_stt_datalabel. Support new PIC relocs.
9106 (sh_elf64_check_relocs): Support new PIC relocs.
9107 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
9108 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
9109 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
9110 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
9111 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
9112 movi_shori_putval, movi_3shori_putval,
9113 sh64_elf64_create_dynamic_sections,
9114 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
9115 sh64_elf64_size_dynamic_sections,
9116 sh64_elf64_finish_dynamic_symbol,
9117 sh64_elf64_finish_dynamic_sections): New.
9118 (elf_backend_create_dynamic-sections,
9119 bfd_elf64_bfd_link_hash_table_create,
9120 elf_backend_adjust_dynamic_symbol,
9121 elf_backend_size_dynamic_sections,
9122 elf_backend_finish_dynamic_symbol,
9123 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
9124 elf_backend_plt_readonly, elf_backend_want_plt_sym,
9125 elf_backend_got_header_size, elf_backend_plt_header_size):
9127 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
9128 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
9129 match official numbers and names; moved unmaching ones to the
9131 * elf32-sh64.c, elf64-sh64.c: Likewise.
9132 2001-03-12 DJ Delorie <dj@redhat.com>
9133 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
9135 2001-03-12 DJ Delorie <dj@redhat.com>
9136 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
9138 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
9139 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
9140 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
9141 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
9142 .cranges section with SEC_SORT_ENTRIES set.
9143 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
9144 incoming sorted .cranges section.
9145 (sh64_bfd_elf_copy_private_section_data): New.
9146 (sh64_elf_final_write_processing): Only sort .cranges and modify
9147 start address if called by linker.
9148 2001-01-08 Ben Elliston <bje@redhat.com>
9149 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
9150 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
9151 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
9152 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
9153 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
9154 line. Add comments before all entries.
9155 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
9157 (sh_elf64_reloc): Correct head comment.
9158 (sh_elf64_relocate_section): Correct spacing.
9159 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
9160 instead call reloc_dangerous callback.
9161 <case R_SH_SHMEDIA_CODE>: New case.
9162 (sh_elf64_gc_mark_hook): Correct spacing.
9163 (sh_elf64_check_relocs): Ditto.
9164 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
9166 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
9168 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
9169 clarify describing comment. Add comments before all entries.
9170 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
9171 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
9172 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
9173 Sort .cranges section in final link. Prepare to set bit 0 on
9175 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
9176 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
9177 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
9179 (sh64_backend_section_from_shdr): New, to recognize
9180 SHT_SH5_CR_SORTED on incoming .cranges section.
9181 (elf_backend_section_from_shdr): Define.
9182 (sh64_elf_final_write_processing): Sort outgoing .cranges
9183 section. (New, temporarily disabled:) Set bit 0 on entry address
9184 according to ISA type.
9185 (sh64_find_section_for_address): New.
9186 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
9187 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
9188 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
9189 bfd_malloc, not xmalloc.
9190 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
9192 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
9193 temporarily disabled) setting bit 0 on entry address.
9194 (elf_backend_final_write_processing): Define.
9195 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
9196 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
9197 be a proper relocation for PTA and PTB rather than a marker.
9198 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
9199 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
9200 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
9201 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
9202 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
9204 * elf64-sh64.c: Ditto.
9205 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
9206 * elf32-sh64.c: Include opcodes/sh64-opc.h
9207 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
9208 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
9209 parameters. No unused parameters. Caller changed.
9210 <case R_SH_PT_16>: New case.
9211 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
9212 * Makefile.in: Regenerate.
9213 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
9214 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
9216 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
9217 (sh64_elf_merge_private_data): Ditto.
9218 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
9219 to access stored section flags.
9220 (sh64_elf_final_write_processing): Return immediately unless
9221 called by linker. Use sh64_elf_section_data (cranges) to get size
9222 of linker-generated cranges entries.
9223 (sh64_elf_copy_private_data): Add missing "return true".
9224 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
9225 (sh_elf64_merge_private_data): Ditto.
9226 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
9227 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
9228 elf64-sh64.c:sh64_elf_fake_sections.
9229 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
9230 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
9231 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
9232 (sh64_elf_final_write_processing): New.
9233 (elf_backend_final_write_processing): Define.
9234 (sh64_elf_fake_sections): Get header flags from tdata field.
9235 (sh64_elf_copy_private_data): Do not call
9236 sh64_elf_copy_private_data_internal, just copy e_flags field.
9237 (sh64_elf_merge_private_data): Do not call
9238 sh64_elf_copy_private_data_internal.
9239 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
9240 Remove EF_SH64_ABI64, let ELF size make difference.
9241 Remove SH64-specific BFD section flag.
9242 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
9243 containing SHmedia through elf_section_data (asect)->tdata
9244 non-zero, not using a BFD section flag.
9245 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
9246 (sh64_elf_merge_private_data): Similar.
9247 (elf_backend_section_flags): Don't define.
9248 (sh64_elf_backend_section_flags): Delete.
9249 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
9251 (sh_elf64_merge_private_data): Similar.
9252 * section.c (Section flags definitions): Don't define
9254 (bfd-in2.h): Regenerate.
9255 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
9256 Make DataLabel references work with partial linking.
9257 * elf32-sh64.c: Fix formatting.
9258 (sh64_elf_link_output_symbol_hook): New.
9259 (elf_backend_link_output_symbol_hook): Define to
9260 sh64_elf_link_output_symbol_hook.
9261 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
9262 undefined if partial linking. Adjust sanity check.
9263 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
9264 (elf_backend_link_output_symbol_hook): Define to
9265 sh64_elf64_link_output_symbol_hook.
9266 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
9267 undefined if partial linking. Adjust sanity check.
9268 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
9269 Implement semantics for inter-file DataLabel references.
9270 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
9271 (sh64_elf64_add_symbol_hook): New.
9272 (sh_elf64_relocate_section): If passing an indirect symbol with
9273 st_type STT_DATALABEL on the way to a symbol with st_other
9274 STO_SH5_ISA32, do not bitor 1 to the relocation.
9275 (elf_backend_add_symbol_hook): Define to
9276 sh64_elf64_add_symbol_hook.
9277 * elf64-sh32.c: Tweak comments.
9278 (DATALABEL_SUFFIX): Define.
9279 (sh64_elf_add_symbol_hook): New.
9280 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
9281 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
9282 symbol with st_type STT_DATALABEL on the way to a symbol with
9283 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
9284 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
9285 Pass through STT_DATALABEL.
9286 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
9287 (elf_backend_get_symbol_type): Define.
9288 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
9289 (elf_backend_get_symbol_type): Define.
9290 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
9291 * elf32-sh64.c: Tweak comments.
9292 (sh64_elf_copy_private_data_internal): Add prototype.
9293 (bfd_elf32_bfd_set_private_flags): Define.
9294 (sh64_elf_copy_private_data_internal): Compare machine name, not
9295 textual BFD target name, to check whether to copy section flag
9297 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
9298 Tweak section-contents-type-mismatch message.
9299 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
9300 Validize reloc-types.
9301 * elf64-sh64.c: New file.
9302 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
9303 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
9304 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
9305 Regenerate dependencies.
9306 * Makefile.in: Regenerate.
9307 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
9308 bfd_elf64_sh64l_vec.
9309 * configure.in: Handle bfd_elf64_sh64_vec and
9310 bfd_elf64_sh64l_vec.
9311 * configure: Regenerate.
9312 * po/POTFILES.in: Regenerate.
9313 * po/bfd.pot: Regenerate.
9314 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
9315 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
9316 anything else but EF_SH64 and EF_SH64_ABI64.
9317 (sh64_elf_merge_private_data): Emit error for anything else but
9318 EF_SH64 and EF_SH64_ABI64.
9319 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
9321 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
9322 bfd_elf32_sh64l_vec as a temporary measure.
9323 * configure: Regenerate.
9324 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
9325 * cpu-sh.c (arch_info_struct): Include sh5 item
9327 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
9328 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
9329 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
9330 * elf32-sh64.c: Tweak comments.
9331 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
9332 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
9333 (sh64_elf_copy_private_data_internal): Wrap long line.
9334 (sh64_elf_merge_private_data): Rewrite to allow objects from
9335 SH64 subsets to be linked together.
9336 (INCLUDE_SHMEDIA): Define.
9337 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
9338 Parenthesize plus-expression inside or-expression.
9339 <global symbol>: Ditto.
9340 (sh_elf_set_mach_from_flags): Remove code refusing
9341 deleted EF_SH64_32BIT_ABI flag.
9342 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
9343 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
9344 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
9345 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
9346 (sh_elf_relocate_section) <local symbol>: Or 1 in
9347 calculation of relocation if sym->st_other & STO_SH5_ISA32.
9348 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
9349 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
9351 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
9352 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
9353 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
9354 Regenerate dependencies.
9355 * Makefile.in: Regenerate.
9356 * archures.c: Add bfd_mach_sh5.
9357 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
9358 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
9359 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
9360 * configure: Regenerate.
9361 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
9362 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
9363 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
9364 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
9365 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
9366 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
9367 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
9368 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
9369 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
9370 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
9372 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
9374 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
9375 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
9376 shmedia_prepare_reloc, goto final_link_relocate if it returns
9377 non-zero, else fail as before.
9378 (sh_elf_set_mach_from_flags): Provide function only if not defined
9379 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
9380 (sh_elf_set_private_flags): Provide function only if not defined
9382 (sh_elf_copy_private_data): Similar.
9383 (sh_elf_merge_private_data): Similar.
9384 * section.c (SEC_SH_ISA_SHMEDIA): New.
9385 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
9386 * elf32-sh64.c: New file.
9387 * libbfd.h: Regenerate.
9388 * bfd-in2.h: Regenerate.
9389 * po/POTFILES.in: Regenerate.
9390 * po/bfd.pot: Regenerate.
9391 * bfd-in2.h: Regenerate.
9392 * libbfd.h: Regenerate.
9394 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
9396 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
9397 been included, not drag it in.
9398 * bfd-in2.h: Regenerate.
9400 2002-02-06 H.J. Lu (hjl@gnu.org)
9402 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
9403 the mach and ISA fields if necessary.
9405 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
9407 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
9408 ARM architecture when an F_ARM_5 flag is detected, since we cannot
9409 be sure exactly which architecture this represents.
9411 2002-02-05 Nick Clifton <nickc@redhat.com>
9413 * po/tr.po: Updated translation.
9415 2002-02-05 Alan Modra <amodra@bigpond.net.au>
9417 From Jimi X <jimix@watson.ibm.com>
9418 * archures (bfd_mach_ppc64): Define.
9419 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
9420 (bfd_powerpc_arch): Define.
9421 * bfd-in2.h: Regenerate.
9422 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
9423 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
9424 (bfd_powerpc_archs): Add default powerpc64 arch.
9426 2002-02-05 Alan Modra <amodra@bigpond.net.au>
9428 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
9429 against section syms in readonly sections. Don't do the global
9430 sym check if we find one.
9431 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
9432 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
9433 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
9434 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
9435 (elf_s390_grok_prstatus): Add missing prototype.
9437 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
9439 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
9440 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
9441 Call bfd_get_section_by_name only once. Initialize
9442 bpodata->n_bpo_relocs_this_section.
9443 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
9445 (bpo_reloc_request_sort_fn): Don't use difference of values as
9448 2002-02-02 David O'Brien <obrien@FreeBSD>
9450 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
9451 version 4.5 and later the same as 5-CURRENT.
9452 * configure: Re-generate.
9454 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
9456 * config.bfd (hppa*-*-netbsd*): New target.
9458 2002-01-31 Philipp Thomas <pthomas@suse.de>
9460 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
9461 to front of message. Unify messages with elf32-arm.h. Use
9462 commas where neccessary.
9463 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
9464 ERROR in messages. Unify messages with coff-arm.c. Correct
9465 VFP/FPA error message.
9466 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
9467 APCS-32 for translation.
9469 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
9471 Perform on-demand global register allocation from
9472 R_MMIX_BASE_PLUS_OFFSET relocs.
9473 * elf64-mmix.c (struct bpo_reloc_section_info, struct
9474 bpo_reloc_request, struct bpo_greg_section_info): New.
9475 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
9476 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
9477 _bfd_mmix_check_all_relocs,
9478 _bfd_mmix_prepare_linker_allocated_gregs,
9479 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
9480 (elf_mmix_howto_table): Correct src_mask for most relocs.
9481 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
9483 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
9484 case. Fix typo in comment. New label do_mmix_reloc.
9485 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
9486 store first object file with a base-plus-offset reloc. Call
9487 mmix_elf_check_common_relocs for the part common with mmo.
9488 (mmix_elf_final_link): Write out linker-allocated register
9490 (elf_backend_gc_sweep_hook): Define.
9491 (bfd_elf64_bfd_relax_section): Define.
9493 * mmo.c: Don't include <ctype.h>
9494 (mmo_init): Correct init-once logic.
9496 2002-02-01 Tom Rix <trix@redhat.com>
9498 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
9500 2002-02-01 Alan Modra <amodra@bigpond.net.au>
9502 * Makefile.am: Run "make dep-am"
9503 * Makefile.in: Regenerate.
9505 2002-01-31 David O'Brien <obrien@FreeBSD>
9507 * configure.in: Recognize the differences in core files from FreeBSD
9508 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
9510 * configure: Regenerate.
9512 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
9514 * coff-or32.c: New file.
9515 * cpu-or32.c: New file.
9516 * elf32-or32.c: New file.
9517 * archures.c: Add support for or32.
9518 * targets.c: Add support for or32.
9519 * bfd-in2.h: Regenerate.
9520 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
9521 coff_write_object_contents): Add support for or32.
9522 * config.bfd: Add target.
9523 * configure.in: Add support for or32.
9524 * configure: Regenerate.
9525 * Makefile.am: Add support for or32.
9526 * Makefile.in: Regenerate.
9527 * po/SRC-POTFILES.in: Add or32 files.
9528 * po/bfd.pot: Regenerate.
9530 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
9531 Don Lindsay <lindsayd@cisco.com>
9533 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
9534 false' with a return of a bfd_reloc_ error code.
9536 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
9538 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
9539 unexport unreferenced symbols when --export-dynamic. Call
9540 _bfd_elf_strtab_delref when unexporting.
9542 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
9544 * bfd-in.h: Include <stdbool.h> if it is available.
9545 * bfd-in2.h: Regenerated.
9547 2002-01-31 Alan Modra <amodra@bigpond.net.au>
9549 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
9552 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
9554 * archures.c: Tidy up formatting of embedded comments.
9555 * bfd.c: Tidy up formatting of embedded comments.
9556 * bfd-in.h: Fix formatting of comments.
9557 * reloc.c: Tidy up formatting of ordinary & embedded comments.
9558 * section.c: Tidy up formatting of embedded comments.
9559 * syms.c: Tidy up formatting of embedded comments.
9560 * targets.c: Tidy up formatting of embedded comments.
9562 * bfd-in2.h: Regenerate.
9564 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
9566 * vms-tir.c (cmd_name): New function.
9567 (tir_cmd_name): New function.
9568 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
9569 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
9572 * peXXigen.c (pe_print_idata): Rearrange message to aid in
9574 (pe_print_pdata): Rearrange message to aid in translation.
9576 * libbfd.c (warn_deprecated): Rearrange error message to aid in
9579 * ihex.c (ihex_write_object_contents): Fix spelling typo.
9581 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
9583 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
9584 message to aid in translation.
9586 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
9587 to aid in translation.
9589 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
9591 2002-01-30 Philipp Thomas <pthomas@suse.de>
9593 * coff-arm.c, elf32-elf.h: Unify messages.
9595 2002-01-30 Nick Clifton <nickc@redhat.com>
9597 * po/sv.po: Updated translation.
9599 2002-01-30 Philipp Thomas <pthomas@suse.de>
9601 * dwarf2.c (read_abbrev): Use full section name in error message.
9602 (decode_line_info): Likewise.
9604 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
9607 2002-01-30 Alan Modra <amodra@bigpond.net.au>
9609 * elf64-ppc.c (func_desc_adjust): Only provide missing function
9610 descriptor symbols for undefined function code syms. Clear
9611 ELF_LINK_NON_ELF so that they can stay weak.
9613 2002-01-29 Chris Demetriou <cgd@broadcom.com>
9614 Mitch Lichtenberg <mpl@broadcom.com>
9616 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
9617 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
9618 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
9620 * bfd-in2.h: Regenerate.
9622 2002-01-29 Chris Demetriou <cgd@broadcom.com>
9624 * elf32-mips.c: Add additional comments about HI16 relocation
9626 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
9627 pc-relative relocations. (Reverts change made on 2001-10-31.)
9628 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
9629 for pc-relative relocations.
9630 (mips_elf_calculate_relocation): Add a comment about a kludge
9631 in the R_MIPS_GNU_REL_HI16 handling.
9632 (_bfd_mips_elf_relocate_section): Implement that kludge;
9633 adjust pc-relative HI16 relocation for difference in HI16 and
9634 LO16 addresses, since it can't easily be done in
9635 mips_elf_calculate_relocation.
9637 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
9639 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
9640 relocations with PC32 relocations for undefined or weak symbols.
9641 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
9642 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
9644 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
9646 * elfcore.h (elf_core_file_p): Improve comment for last change.
9648 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
9650 * configure: Regenerated.
9652 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
9654 * elfcore.h (elf_core_file_p): Set the machine architecture
9655 before processing the program headers.
9657 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
9659 * configure.in <64-bit configuration>: If using gcc, check and
9660 emit error for egcs-1.1.2.
9661 * configure: Regenerate.
9663 2002-01-26 Egor Duda <deo@logos-m.ru>
9665 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
9666 as possible to avoid stack corruption.
9668 2002-01-26 Richard Henderson <rth@redhat.com>
9670 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
9671 for non-allocated sections.
9673 2002-01-25 Mark Kettenis <kettenis@gnu.org>
9675 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
9676 prstat.pr_reg even if it is a struct.
9678 2002-01-25 Steve Ellcey <sje@cup.hp.com>
9680 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
9682 2002-01-25 Philipp Thomas <pthomas@suse.de>
9684 * coffgen.c (coff_print_symbol): Don't mark info message
9687 2002-01-25 Nick Clifton <nickc@redhat.com>
9689 * po/fr.po: Updated translation.
9690 * po/es.po: Updated translation.
9692 2002-01-25 Philipp Thomas <pthomas@suse.de>
9694 * coff-alpha.c (alpha_relocate_section): Unify warning message
9695 for GP relative relocations without GP defined.
9696 * coff-mips.c (mips_relocate_section): Likewise.
9698 2002-01-25 Alan Modra <amodra@bigpond.net.au>
9700 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
9701 unsigned overflow when new_offset < old_offset.
9703 2002-01-24 Philipp Thomas <pthomas@suse.de>
9705 * bfd.c (_bfd_abort): Fix typo.
9707 2002-01-23 Richard Henderson <rth@redhat.com>
9709 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
9710 plt entries for undefweak symbols.
9712 2002-01-23 Steve Ellcey <sje@cup.hp.com>
9714 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
9715 (bfd_elf64_ia64_hpux_big_vec): Ditto.
9716 (bfd_elf32_h8300_vec): Ditto.
9718 2002-01-23 Alan Modra <amodra@bigpond.net.au>
9720 * elf64-ppc.c: Remove stale part of ABI comment.
9721 (NO_OPD_RELOCS): Define.
9722 (ppc64_elf_check_relocs): Use it.
9723 (ppc64_elf_relocate_section): Here too.
9724 (build_one_stub): Don't point function syms at the stub. Instead,
9726 (ppc64_elf_relocate_section): Check whether REL24 relocs should
9727 really go to the stub. Make all dynamic relocs in opd against
9729 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
9732 2002-01-22 Richard Henderson <rth@redhat.com>
9734 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
9736 2002-01-22 Alan Modra <amodra@bigpond.net.au>
9738 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
9739 TOC_BASE_OFF adjustment.
9741 * Makefile.am: Run "make dep-am".
9742 * Makefile.in: Regenerate.
9743 * po/SRC-POTFILES.in: Regenerate.
9745 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
9747 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
9750 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
9752 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
9753 Check for and emit error if sgot is NULL at this point.
9755 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
9757 * config.bfd (ia64*-*-netbsd*): New target.
9759 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
9761 * som.c (som_write_space_strings): Comment typo fix.
9763 2002-01-21 Alan Modra <amodra@bigpond.net.au>
9765 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
9766 is_func_descriptor fields.
9767 (link_hash_newfunc): Init them.
9768 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
9769 dot are candidates for plt entries. When processing .opd relocs,
9770 set function descriptor strings to point inside function code
9771 string, and set new ppc_link_hash_entry fields.
9772 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
9773 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
9774 function descriptors. It's now done in..
9775 (func_desc_adjust): New.
9776 (ppc64_elf_func_desc_adjust): New.
9777 (define elf_backend_always_size_sections): Define.
9778 (ppc64_elf_hide_symbol): New.
9779 (define elf_backend_hide_symbol): Define.
9780 (allocate_dynrelocs): Remove code looking up function descriptors
9781 as that has been done earlier.
9782 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
9784 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
9785 up function descriptor.
9786 (build_one_stub): Look up the function code sym. Check for
9787 invalid plt offsets.
9788 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
9789 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
9791 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
9793 (_bfd_elf_link_hash_hide_symbol): Likewise.
9794 * elflink.h (elf_link_add_object_symbols): Adjust call to
9795 elf_backend_hide_symbol.
9796 (elf_fix_symbol_flags): Likewise.
9797 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
9799 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
9800 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
9801 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
9802 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
9803 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
9805 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
9806 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
9807 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
9809 2002-01-18 Alan Modra <amodra@bigpond.net.au>
9811 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
9812 dynamic function descriptor symbol, not the associated function
9815 2002-01-17 Eric Christopher <echristo@redhat.com>
9817 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
9819 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
9821 * po/bfd.pot: Regenerate.
9822 * po/fr.po: Regenerate.
9824 2002-01-17 Alan Modra <amodra@bigpond.net.au>
9826 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
9827 Remove "Elf_Internal_Shdr *" param.
9828 (_bfd_mips_elf_section_from_bfd_section): Ditto.
9829 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
9830 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
9831 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
9832 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
9833 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
9834 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
9835 function to override special sections. Remove hdr arg from
9836 backend call, and don't loop.
9838 2002-01-16 Eric Christopher <echristo@redhat.com>
9840 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
9841 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
9842 relocations requiring gp0 and gp.
9844 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
9846 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
9848 (elf32_arm_print_private_bfd_data): Likewise.
9850 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
9852 * po/tr.po: Import new version.
9854 2002-01-16 Alan Modra <amodra@bigpond.net.au>
9856 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
9857 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
9858 (ORI_R0_R0_0): Correct.
9860 2002-01-16 Alan Modra <amodra@bigpond.net.au>
9862 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
9863 when plt_not_loaded.
9864 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
9865 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
9866 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
9867 (ppc64_elf_glink_code): Delete.
9868 (PPC64_ELF_GLINK_SIZE): Delete.
9869 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
9870 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
9871 ORI_R0_R0_0): Define.
9872 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
9873 (struct ppc_link_hash_table): Add sstub and plt_overflow.
9874 (ppc64_elf_link_hash_table_create): Init them.
9875 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
9876 Don't copy to shared lib.
9877 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
9878 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
9879 (allocate_dynrelocs <plt>): Don't change function sym here. Make
9880 room for .stub and .glink code.
9881 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
9883 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
9884 bfd_elf64_bfd_final_link.
9885 (bfd_elf64_bfd_final_link): Don't define.
9886 (ppc64_elf_size_stubs): New.
9887 (build_plt_stub): New.
9888 (build_one_stub): New.
9889 (ppc64_elf_build_stubs): New.
9890 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
9891 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
9892 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
9893 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
9894 case output sections not separate. Adjust DT_RELASZ to not
9895 include plt relocs. Set reserved got entry. Set got and plt
9897 (elf_backend_got_header_size): Set to 8.
9898 * elf64-ppc.h: New file.
9900 2002-01-16 Alan Modra <amodra@bigpond.net.au>
9902 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
9903 sections, use bfd_section_list_remove.
9904 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
9905 * elflink.h (elf_link_add_object_symbols): When removing all
9906 sections, use bfd_section_list_clear.
9908 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
9910 * po/sv.po: New file: Swedish translation.
9911 * configure.in (ALL_LINGUAS): Add sv.
9912 * configure: Regenerate.
9914 2002-01-15 Jakub Jelinek <jakub@redhat.com>
9916 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
9917 * elf.c (merge_sections_remove_hook): New function.
9918 (_bfd_elf_merge_sections): Pass it as 3rd argument to
9919 _bfd_merge_sections.
9920 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
9921 * libbfd.h: Rebuilt.
9922 * merge.c (_bfd_merge_sections): Add remove_hook argument.
9923 Call remove_hook if a SEC_EXCLUDE section is encountered.
9925 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
9927 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
9928 (xstormy16_reloc_map): Initialise new field with correct howto
9930 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
9933 2002-01-10 Michael Snyder <msnyder@redhat.com>
9935 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
9936 (elfcore_write_pstatus): Use long instead of pid_t;
9937 * elf-bfd.h: Change prototypes to use long instead of pid_t;
9939 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
9941 * elf.c: Update copyright years.
9942 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
9943 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
9945 2002-01-08 Michael Snyder <msnyder@redhat.com>
9947 Add capability to write corefile note sections, for gdb.
9948 * elf.c (elfcore_write_note): New function.
9949 (elfcore_write_prpsinfo): New function.
9950 (elfcore_write_prstatus): New function.
9951 (elfcore_write_pstatus): New function.
9952 (elfcore_write_prfpreg): New function.
9953 (elfcore_write_prxfpreg): New function.
9954 * elf-bfd.h: Add prototypes for above functions.
9956 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
9958 * elf.c (elf_fake_sections): Propagate errors from
9959 elf_backend_fake_section.
9961 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
9963 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
9964 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
9965 (elf32-sh-nbsd.lo): New rule.
9966 * Makefile.in: Regenerate.
9967 * config.bfd (sh*le-*-netbsdelf*): New target.
9968 (sh*-*-netbsdelf*): New target.
9969 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
9970 (bfd_elf32_shnbsd_vec): New vector.
9971 (bfd_elf32_shlnbsd_vec): New vector.
9972 * configure: Regenerate.
9973 * elf32-sh-nbsd.c: New file.
9974 * targets.c: Update copyright years.
9975 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
9976 bfd_elf32_shnbsd_vec.
9978 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
9980 * coff-rs6000.c (READ20): Use bfd_scan_vma.
9982 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
9984 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
9985 of a symbol in a section that will be deleted.
9987 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
9989 * po/es.po: New file: Spanish translation.
9990 * configure.in (ALL_LINGUAS): Add es.
9991 * configure: Regenerate.
9993 2002-01-06 Steve Ellcey <sje@cup.hp.com>
9995 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
9996 argument so we can handle HP-UX specially.
9997 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
9998 (elfNN_hpux_backend_section_from_bfd_section): New for support
9999 of SHN_IA_64_ANSI_COMMON.
10000 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
10001 (is_unwind_section_name): Add special HP-UX support.
10002 (elfNN_ia64_section_from_shdr): Add support for more sections.
10003 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
10004 add support for more sections.
10005 (elfNN_ia64_additional_program_headers): Modify
10006 is_unwind_section_name call.
10007 (elfNN_ia64_modify_segment_map): Remove assumption that there is
10008 only one unwind section in segment.
10010 2002-01-06 Alan Modra <amodra@bigpond.net.au>
10012 * syms.c (_bfd_generic_make_empty_symbol): New function.
10013 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
10014 _bfd_generic_make_empty_symbol.
10015 * libbfd.h: Regenerate.
10016 * bfd-in2.h: Regenerate.
10017 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
10018 (hppabsd_core_get_symtab_upper_bound): Don't define.
10019 (hppabsd_core_get_symtab): Likewise.
10020 (hppabsd_core_print_symbol): Likewise.
10021 (hppabsd_core_get_symbol_info): Likewise.
10022 (hppabsd_core_bfd_is_local_label_name): Likewise.
10023 (hppabsd_core_get_lineno): Likewise.
10024 (hppabsd_core_find_nearest_line): Likewise.
10025 (hppabsd_core_bfd_make_debug_symbol): Likewise.
10026 (hppabsd_core_read_minisymbols): Likewise.
10027 (hppabsd_core_minisymbol_to_symbol): Likewise.
10028 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
10030 * hpux-core.c: Similarly.
10031 * irix-core.c: Similarly.
10032 * osf-core.c: Similarly.
10033 * sco5-core.c: Similarly.
10034 * binary.c (binary_make_empty_symbol): Remove function, define as
10035 _bfd_generic_make_empty_symbol.
10036 * ihex.c (ihex_make_empty_symbol): Likewise.
10037 * mmo.c (mmo_make_empty_symbol): Likewise.
10038 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
10039 * srec.c (srec_make_empty_symbol): Likewise.
10040 * versados.c (versados_make_empty_symbol): Likewise.
10041 * vms.c (_bfd_vms_make_empty_symbol): Remove.
10042 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
10043 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
10044 rather than _bfd_vms_make_empty_symbol.
10045 * vms-misc.c (new_symbol): Likewise.
10047 2002-01-05 Alan Modra <amodra@bigpond.net.au>
10049 * section.c (bfd_section_init): Remove unnecessary initialisations.
10050 (bfd_section_list_clear): New function.
10051 (bfd_section_list_remove, bfd_section_list_insert): New macros.
10052 (_bfd_strip_section_from_output): Use them.
10053 * coffcode.h (coff_set_alignment_hook): Likewise.
10054 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
10055 * elf64-mips.c (mips_elf64_final_link): Likewise.
10056 * elf64-mmix.c (mmix_elf_final_link): Likewise.
10057 * sunos.c (sunos_add_dynamic_symbols): Likewise.
10058 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
10059 * bfd-in2.h: Regenerate.
10061 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
10062 rather than doing our own section handling. Clean up after errors
10063 with bfd_release and bfd_section_list_clear. Handle unexpected
10065 * aoutf1.h (sunos4_core_file_p): Likewise.
10066 * aix386-core.c (aix386_core_file_p): Likewise.
10067 * cisco-core.c (cisco_core_file_validate): Likewise.
10068 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
10069 * trad-core.c (trad_unix_core_file_p): Likewise.
10071 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
10072 with bfd_release and bfd_section_list_clear.
10073 * hpux-core.c (hpux_core_core_file_p): Likewise.
10074 * irix-core.c (irix_core_core_file_p): Likewise.
10075 * lynx-core.c (lynx_core_file_p): Likewise.
10076 * osf-core.c (osf_core_core_file_p): Likewise.
10077 * rs6000-core.c (rs6000coff_core_p): Likewise.
10078 * sco5-core.c (sco5_core_file_p): Likewise.
10080 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
10081 sign extension adjustments without conditionals.
10083 2002-01-04 Jakub Jelinek <jakub@redhat.com>
10085 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
10086 CIE at .eh_frame start is removed due to no FDEs referencing it.
10088 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
10090 * config.bfd (x86_64-*-netbsd*): New target.
10091 * configure.in (x86_64-*-netbsd*): Set COREFILE
10093 * configure: Regenerated.
10095 2002-01-03 Tom Rix <trix@redhat.com>
10097 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
10098 for recent bfd_make_section_anyway change.
10100 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
10102 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
10103 R_ARM_THM_PC11 reloc.
10105 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
10107 * configure.in (LINGUAS): Add ja.
10108 * configure: Regenerate.
10109 * po/ja.po: Import from translation project's web site.
10111 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
10113 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
10114 messages to ease translation into other languages.
10116 For older changes see ChangeLog-0001
10122 version-control: never