(elf32_arm_adjust_dynamic_symbol): Update ELF_LINK_HASH_NEEDS_PLT logic.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2002-09-19 Daniel Jacobowitz <drow@mvista.com>
2
3 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
4 ELF_LINK_HASH_NEEDS_PLT logic.
5
6 2002-09-18 Daniel Jacobowitz <drow@mvista.com>
7
8 * elfcode.h (elf_slurp_reloc_table_from_section): Check
9 correct relocation count.
10
11 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
12
13 * bfd-in.h (bfd_get_dynamic_symcount): Define.
14 * bfd.c (struct _bfd): Add dynsymcount.
15 * bfd-in2.h: Regenerated.
16 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
17 abfd->dynsymcount.
18 * elfcode.h (elf_slurp_reloc_table_from_section): Check
19 for overflow.
20
21 2002-09-17 Stan Cox <scox@redhat.com>
22
23 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
24 (mips_elf64_final_gp): Don't make up gp value.
25 * elfn32-mips.c (mips_elf_final_gp): Likewise.
26 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
27 .MIPS.options/.options section.
28
29 2002-09-17 David O'Brien <obrien@FreeBSD.org>
30
31 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
32 It is benign for FreeBSD < 4.1. Minor reformatting.
33 * elf64-alpha-fbsd.c: Likewise.
34
35 2002-09-17 Jakub Jelinek <jakub@redhat.com>
36
37 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
38 addend.
39
40 2002-09-17 Alan Modra <amodra@bigpond.net.au>
41
42 * elf64-alpha.c (alpha_elf_size_info): Make static.
43
44 2002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
45
46 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
47 * cpu-tic4x.c: Ditto.
48
49 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
50
51 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
52 duplicate define.
53
54 2002-09-16 Bruno Haible <bruno@clisp.org>
55
56 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
57 by a target variant implementation.
58 * elf64-alpha.c: Likewise.
59 * elf32-i386-fbsd.c: New file.
60 * elf64-alpha-fbsd.c: New file.
61 * targets.c: Support bfd_elf32_i386_freebsd_vec and
62 bfd_elf64_alpha_freebsd_vec.
63 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
64 bfd_elf64_alpha_freebsd_vec.
65 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
66 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
67 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
68 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
69 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
70 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
71 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
72
73 2002-09-12 Jakub Jelinek <jakub@redhat.com>
74
75 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
76 NULL.
77 (elf_i386_relocate_section): Return false after printing error about
78 unresolvable relocation.
79
80 2002-09-12 Nick Clifton <nickc@redhat.com>
81
82 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
83 R_ARM_THM_PC11.
84
85 2002-09-11 Andrew Haley <aph@cambridge.redhat.com>
86
87 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
88 line_ptr before deciding we've found a symbol.
89
90 2002-09-11 Nick Clifton <nickc@redhat.com>
91
92 * po/da.po: New Danish translation file.
93 * configure.in (LINGUAS): Add 'da'.
94 * configure: Regenerate.
95
96 2002-09-10 Michael Snyder <msnyder@redhat.com>
97
98 * irix-core.c (do_sections, do_sections64): New functions.
99 (irix_core_core_file_p): Call new functions do_sections,
100 do_sections64, depending on corefile (32-bit or 64-bit).
101
102 2002-09-09 Richard Henderson <rth@redhat.com>
103
104 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
105 and PCREL21F like PCREL21B.
106
107 2002-09-04 Kevin Buettner <kevinb@redhat.com>
108
109 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
110 vector.
111
112 2002-09-02 Nick Clifton <nickc@redhat.com>
113
114 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
115 names instead of cryptically overloaded bfd_reloc error
116 codes.
117 (v850_elf_relocate_section): Likewise.
118 (v850_elf_relax_section): Replace caching of external symbols
119 with caching of internal symbols obtained from calling
120 bfd_elf_get_elf_syms().
121 Fixup problems with freeing cached allocated memory blocks.
122
123 2002-09-02 Alan Modra <amodra@bigpond.net.au>
124
125 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
126 (bfd_pj_arch): Use bfd_default_scan.
127 * cpu-v850.c (scan): Remove.
128 (N): Use bfd_default_scan.
129 * cpu-z8k.c (scan_mach): Remove.
130 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
131 first. Use bfd_default_scan.
132
133 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
134 bfd_mach constants.
135 (ecoff_get_magic): Likewise.
136 * elf32-v850.c (v850_elf_object_p): Likewise.
137 (v850_elf_final_write_processing): Likewise.
138 * mipsbsd.c (MY(set_arch_mach)): Likewise.
139 (MY(write_object_contents)): Likewise.
140 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
141 * coffcode.h (coff_write_object_contents): Likewise.
142 (coff_set_arch_mach_hook): Add comment describing machine == 0.
143 Remove unnecessary "machine" assignments.
144 (coff_write_relocs): Test for the absolute section sym by testing
145 section and flags.
146
147 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
148 and bfd_mach_i386_i386_intel_syntax.
149 * pdp11.c (NAME(aout,machine_type)): Likewise.
150
151 2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
152
153 * bfd-in.h (align_power): Cast constants to bfd_vma type.
154 * bfd-in2.h (align_power): Likewise.
155
156 2002-08-30 Alan Modra <amodra@bigpond.net.au>
157
158 * Makefile.am: Run "make dep-am".
159 * Makefile.in: Regenerate.
160
161 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
162 * cpu-powerpc.c (powerpc_compatible): Likewise.
163 * cpu-rs6000.c (rs6000_compatible): Likewise.
164
165 2002-08-28 Catherine Moore <clm@redhat.com>
166
167 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
168 (v850-elf-reloc): Don't resolve pc relative relocs.
169 (v850_elf_ignore_reloc): New routine.
170 (v850_elf_final_link_relocate): Handle new relocs.
171 (v850_elf_relax_delete_bytes ): New routine.
172 (v850_elf_relax_section): New routine.
173 (bfd_elf32_bfd_relax_section): Define.
174 (HOWTO): New entries for new relocs.
175 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
176 (BFD_RELOC_V850_LONGJUMP): New reloc.
177 (BFD_RELOC_V850_ALIGN): New reloc.
178 * archures.c: Remove redundant v850ea architecture.
179 * cpu-v850.c: Remove redundant v850ea support.
180 * libbfd.h: Regenerate.
181 * bfd-in2.h: Regenerated.
182
183 2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
184
185 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
186 * configure.in: Add tic4x_coff vector files.
187 * configure: Regenerate.
188 * Makefile.am: Add tic4x target.
189 * Makefile.in: Regenerate.
190
191 2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
192
193 * archures.c: Add the BFD arch type tic4x.
194 * bfd-in.h: Add BFD_IN_MEMORY flag.
195 * coff-tic4x.c: New file.
196 * coffswap.h (coff_swap_sym_out): Add preadjuster.
197 * cpu-tic4x.c: New file.
198 * targets.c: Added tic4x- in list of xvecs.
199 * ticoff.h: New file.
200 * bfd-in2.h: Regenerate.
201
202 2002-08-27 Adam Nemet <anemet@lnxw.com>
203
204 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
205 bit of DT_INIT and DT_FINI for Thumb functions.
206
207 2002-08-26 Alan Modra <amodra@bigpond.net.au>
208
209 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
210
211 2002-08-26 Alan Modra <amodra@bigpond.net.au>
212
213 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
214
215 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
216
217 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
218 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
219 Likewise.
220 (struct elf_sh_pcrel_relocs_copied): Removed.
221 (struct elf_sh_dyn_relocs): New.
222 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
223 field with dyn_relocs.
224 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
225 sections and sym_sec.
226 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
227 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
228 (sh_elf_create_dynamic_sections): Use create_got_section instead
229 of _bfd_elf_create_got_section.
230 (sh_elf_check_relocs): Likewise.
231 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
232 sections.
233 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
234 sh_elf_relocate_section, sh_elf_check_relocs,
235 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
236 Likewise.
237 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
238 dynamic relocations and avoiding the copy relocation when we
239 didn't find any dynamic relocations in the section which has
240 contents or is read-only.
241 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
242 (sh_elf_size_dynamic_sections): Don't reset the size of
243 .rela.got section even if dynamic_sections_created flag is off.
244 Don't use sh_elf_discard_copies. Scan all input bfd and use
245 allocate_dynrelocs. Call readonly_dynrelocs to determine
246 whether we need DT_TEXTREL.
247 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
248 whether the symbol was never referred to.
249 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
250 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
251 (sh_elf_check_relocs): Call create_got_section if the short-cut
252 to .got is null. Increment reference counters only instead of
253 allocating space on dynamic sections here. Don't conditionalize
254 uninitialized got.offset value when marking the symbol as a
255 global offset table entry. Keep relocations for symbols satisfied
256 by a dynamic library to avoid copy relocations for the symbol.
257 Set dynobj field of an elf hash table if needed.
258 (sh_elf_finish_dynamic_sections): Handle null section pointer
259 correctly.
260 (elf_backend_copy_indirect_symbol): Defined.
261 (elf_backend_can_refcount): Defined.
262
263 2002-08-23 Nick Clifton <nickc@redhat.com>
264
265 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
266 previous change. Add comment explaining why.
267
268 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
269
270 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
271 contents of .got.plt[2] to tr0, not address of .got.plt.
272 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
273 patching absolute plt entry. For shmedia plt entry, set bottom bit
274 of branch to plt0 as this is a branch to an shmedia instruction.
275 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
276 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
277 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
278 branch to plt0.
279 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
280 patching absolute plt entry. For shmedia plt entry, branch to
281 plt0 is now ptrel, so use relative offset. Set bottom bit of
282 branch target as it is a branch to an shmedia instruction.
283
284 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
285 Richard Shann <richard.shann@superh.com>
286
287 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
288 value if .init is an SHmedia function. Similarly for DT_FINI.
289 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
290
291 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
292
293 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
294 dynamic section.
295 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
296
297 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
298
299 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
300 byte read when reading the return address register column.
301
302 2002-08-22 Nick Clifton <nickc@redhat.com>
303
304 * config.bfd: Add powepc64-*-*bsd* target.
305
306 2002-08-22 Graeme Peterson <gp@qnx.com>
307
308 * Makefile.am: Add entries for elf32-shqnx.c
309 * Makefile.in: Regenerate.
310 * config.bfd: Add support sh-*-nto* target.
311 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
312 * configure: Regenerate.
313 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
314 * elf32-sh.c: Do not include elf32-target.h if
315 ELF32_SH_C_INCLUDED is defined.
316 * elf32-shqnx.c: New file: Support for QNX.
317 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
318
319 2002-08-22 Nick Clifton <nickc@redhat.com>
320
321 * po/tr.po: Updated Turkish translation.
322
323 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
324 symbols are not read.
325
326 2002-08-22 Alan Modra <amodra@bigpond.net.au>
327
328 * elf32-m68hc11.c: Formatting fixes.
329 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
330 * elf32-m68hc12.c: Formatting fixes.
331 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
332
333 2002-08-22 Alan Modra <amodra@bigpond.net.au>
334
335 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
336 SEC_DATA.
337 (pmac_xcoff_vec): Likewise.
338 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
339 (aix5coff64_vec): Likewise.
340
341 2002-08-22 Alan Modra <amodra@bigpond.net.au>
342
343 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
344 param to elf_backend_copy_indirect_symbol.
345 (_bfd_elf_link_hash_copy_indirect): Likewise.
346 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
347 calls to copy_indirect_symbol.
348 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
349 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
350 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
351 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
352 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
353 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
354 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
355 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
356 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
357 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
358 test refcounts for "used" values.
359
360 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
361
362 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
363 argument declaration.
364
365 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
366
367 * archures.c (bfd_mach_ppc_e500): Added.
368 * bfd-in2.h: Rebuilt.
369 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
370
371 2002-08-19 Alan Modra <amodra@bigpond.net.au>
372
373 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
374
375 2002-08-17 Andrew Cagney <ac131313@redhat.com>
376
377 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
378 `bfd_byte'.
379
380 2002-08-17 Stan Cox <scox@redhat.com>
381
382 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
383 IRIX 6 segment layout for NEWABI.
384
385 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
386
387 * bfd/elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
388 symbols when looking for section referred to by a relocation.
389 * bfd/elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
390
391 2002-08-15 Alan Modra <amodra@bigpond.net.au>
392
393 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
394
395 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
396
397 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
398 missing check for whether the symbol is referenced by DSO before
399 unexporting it as an unneeded dynamic symbol.
400
401 2002-08-14 H.J. Lu <hjl@gnu.org>
402
403 * libbfd.h: Regenerate.
404
405 2002-08-14 H.J. Lu <hjl@gnu.org>
406
407 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
408
409 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
410
411 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
412 instructions.
413 (m68hc11_direct_relax): New to define table of relaxable instructions.
414 (find_relaxable_insn): New, find a relaxable insn.
415 (compare_reloc): New to compare two relocs.
416 (m68hc11_elf_relax_section): New, relax text sections.
417 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
418 (elf32_m68hc11_check_relocs): New function for GC support.
419 (elf32_m68hc11_relocate_section): New function for GC support.
420 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
421 (elf_backend_check_relocs): Likewise.
422 (elf_backend_relocate_section): Likewise.
423
424 2002-08-13 H.J. Lu <hjl@gnu.org>
425
426 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
427 definitions in shared objects when checking symbol with
428 undefined version.
429
430 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
431
432 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
433 (elf32_m68hc11_gc_sweep_hook): Likewise.
434 (elf_backend_gc_mark_hook): Define for GC section support.
435 (elf_backend_gc_sweep_hook): Likewise.
436 (elf_backend_can_gc_sections): Likewise.
437
438 * elf32-m68hc12.c: Likewise.
439
440 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
441
442 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
443 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
444 (_bfd_m68hc11_elf_set_private_flags): New function.
445 Use them to set/check/print ELF flags specific to 68HC11.
446
447 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
448 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
449 (_bfd_m68hc12_elf_set_private_flags): New function.
450 Use them to set/check/print ELF flags specific to 68HC12.
451
452 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
453
454 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
455 fix masks for PC-rel relocs.
456 (m68hc11_elf_ignore_reloc): New function.
457
458 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
459 68HC12 banked addressing relocs.
460 (m68hc12_phys_addr): New to compute physical address of banked memory.
461 (m68hc12_phys_page): Likewise for page.
462 (m68hc12_addr_is_banked): New to see if address is in banked area.
463 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
464
465 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
466
467 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
468 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
469 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
470 * bfd-in2.h: Regenerate.
471
472 2002-08-12 H.J. Lu <hjl@gnu.org>
473
474 * elflink.h (elf_add_default_symbol): Preserve section across
475 elf_merge_symbol.
476
477 2002-08-09 Graeme Peterson <gp@qnx.com>
478
479 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
480 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
481 * Makefile.in: Regenerate.
482 * config.bfd: Add support for powerpc{le}-*-nto targets.
483 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
484 * configure: Regenerate.
485 * elf32-i386qnx.c: Moved backend functions into a QNX specific
486 common file "elf32-qnx.h", and now include that file.
487 * elf32-qnx.h: New file: QNX specific common elf backend.
488 * elf32-ppc.c: Do not include elf32-target.h if
489 ELF32_PPC_C_INCLUDED is defined.
490 * elf32-ppcqnx.c: New file: Support for QNX.
491 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
492 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
493
494 2002-08-09 Nick Clifton <nickc@redhat.com>
495
496 * po/sv.po: Updated Swedish translation.
497
498 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
499
500 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
501 g->global_gotsym is NULL.
502
503 2002-08-08 H.J. Lu <hjl@gnu.org>
504
505 * elflink.h (elf_add_default_symbol): Don't warn if a definition
506 overrides an indirect versioned symbol.
507
508 2002-08-08 Jakub Jelinek <jakub@redhat.com>
509
510 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
511 for R_386_TLS_TPOFF32 relocs against symndx 0.
512
513 2002-08-07 H.J. Lu <hjl@gnu.org>
514
515 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
516 with undefined version if needed.
517 (elf_link_assign_sym_version): Match a default symbol with a
518 version without definition. No need to hide the default
519 definition separately.
520
521 2002-08-08 Alan Modra <amodra@bigpond.net.au>
522
523 * elflink.h (elf_link_output_extsym): Don't output symbols from
524 SEC_EXCLUDE sections.
525
526 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
527
528 2002-08-07 Alan Modra <amodra@bigpond.net.au>
529
530 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
531 entries.
532
533 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
534
535 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
536 mismatch.
537
538 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
539
540 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
541
542 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
543
544 * elf32-mips.c (mips_reloc_map): Fix typo.
545
546 2002-08-06 Alan Modra <amodra@bigpond.net.au>
547
548 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
549
550 2002-08-06 Alan Modra <amodra@bigpond.net.au>
551
552 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
553
554 2002-08-06 Alan Modra <amodra@bigpond.net.au>
555
556 * libxcoff.h: Use PARAMS on function declarations.
557 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
558 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
559
560 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
561 addend.
562 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
563
564 2002-08-06 Alan Modra <amodra@bigpond.net.au>
565
566 * coff-rs6000.c: Formatting fixes.
567 (xcoff_calculate_relocation): Use PARAMS in declaration.
568 (xcoff_complain_overflow): Likewise.
569 (xcoff_ppc_relocate_section): Use old-style function pointer call.
570 (bfd_xcoff_backend_data): Remove useless comments.
571 (rs6000coff_vec): Likewise.
572 (bfd_pmac_xcoff_backend_data): Likewise.
573 (pmac_xcoff_vec): Likewise.
574
575 * coff64-rs6000.c: Formatting fixes.
576 (xcoff64_calculate_relocation): Use PARAMS in declaration.
577 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
578 (bfd_xcoff_backend_data): Remove useless comments.
579 (rs6000coff64_vec): Likewise.
580 (bfd_xcoff_aix5_backend_data): Likewise.
581 (aix5coff64_vec): Likewise.
582
583 2002-08-06 Alan Modra <amodra@bigpond.net.au>
584
585 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
586 mask entries. Use complain_overflow_dont for R_REF.
587 (xcoff_reloc_type_ba): Revert last change.
588 (xcoff_reloc_type_br): Likewise.
589 (xcoff_reloc_type_crel): Likewise.
590 (xcoff_ppc_relocate_section): Likewise.
591 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
592 (xcoff64_ppc_relocate_section): Likewise.
593 (xcoff64_howto_table): Revert some of last change to mask entries.
594 Use complain_overflow_dont for R_REF.
595
596 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
597 relocs with bitsize == 16 have size = 1.
598 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
599 (xcoff_reloc_type_br): Likewise.
600 (xcoff_reloc_type_crel): Likewise.
601 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
602 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
603 dst_mask adjustment.
604 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
605 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
606 bitsize == 16 have size = 1.
607
608 2002-08-01 Denis Chertykov <denisc@overta.ru>
609
610 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
611 (struct misc): New field isymbuf. All free_* fields removed.
612 (symbol_value): Pass in internal syms. No need to swap syms in.
613 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
614 possibly cached info.
615 (tidyup_after_error): Removed.
616 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
617 misc. Use new field.
618 (adjust_all_relocations): Use internal syms. No need to swap syms
619 in and out.
620 (add_page_insn): Don't use removed fields of struct misc.
621
622 2002-08-01 Nick Clifton <nickc@redhat.com>
623
624 * elf32-arm.h: Revert previous delta.
625
626 2002-08-01 Nick Clifton <nickc@redhat.com>
627
628 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
629 * configure: Regenerate.
630
631 2002-07-31 H.J. Lu <hjl@gnu.org>
632
633 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
634 selected.
635
636 2002-07-31 H.J. Lu <hjl@gnu.org>
637
638 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
639 is selected.
640
641 2002-07-31 Jakub Jelinek <jakub@redhat.com>
642
643 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
644 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
645
646 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
647
648 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
649 There is no 8 byte relocation type for this architecture.
650 (do_ns32k_reloc): Use bfd_vma instead of native types.
651 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
652 returns void.
653 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
654 rely on generic code to do that.
655 * aout-ns32k.c (howto_table): Add appropriate overflow detection
656 to all table entries.
657 (_bfd_ns32k_relocate_contents): put_data returns void.
658 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
659 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
660 return void.
661
662 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
663
664 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
665 archive object is target dependant.
666
667 2002-07-31 Adam Nemet <anemet@lnxw.com>
668
669 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
670 (THUMB_PLT_ENTRY_SIZE): New macro.
671 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
672 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
673 ARM_PLT_ENTRY_SIZE.
674 (elf32_arm_plt_entry): Likewise.
675 (elf_backend_plt_header_size): Likewise.
676 (elf32_thumb_plt0_entry): New global.
677 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
678 into .plt.thumb.
679 (elf32_thumb_plt_entry): New global.
680 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
681 Thumb entries. Set the bottom bit of the corresponding GOT entry
682 for a Thumb PLT entry.
683 (struct elf32_arm_plt_entry_info): New structure.
684 (struct elf32_arm_link_hash_entry, plt_info): New member of this
685 type.
686 (elf32_arm_link_hash_newfunc): Initialize new member.
687 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
688 relocations against the PLT.
689 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
690 first_rel_type if this is the first time we encounter the symbol.
691 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
692 Determine if relocation needs a PLT entry. Set first_rel_type if
693 this is the first time we encounter the symbol
694 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
695 functions as well.
696 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
697 (elf32_arm_create_dynamic_sections): New function. Create the
698 .plt.thumb section.
699 (elf_backend_create_dynamic_sections): Call it.
700
701 2002-07-31 Nick Clifton <nickc@redhat.com>
702
703 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
704 'alternative' in order to avoid shadowing global symbol of the
705 same name.
706 * bfd-in2.h: Regenerate.
707 * libbfd.h: Regenerate.
708 * libcoff.h: Regenerate.
709
710 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
711
712 * Makefile.am: Add n32 ABI support.
713 * Makefile.in: Regenerate.
714 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
715 bit vectors for mips*-*-linux targets as optional.
716 * configure.in: Add n32 ABI vectors.
717 * configure: Regenerate.
718 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
719 * elfn32-mips.c: New file, n32 ABI support.
720 * targets.c: Add n32 ABI vectors.
721
722 2002-07-30 Graeme Peterson <gp@qnx.com>
723
724 * elfarmqnx-nabi.c: New file: Support for QNX.
725 * config.bfd: Add support for arm-*-nto target.
726 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
727 * configure: Regenerate.
728 * Makefile.am: Add entries for elfarmqnx-nabi.c.
729 * Makefile.in: Regenerate.
730 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
731 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
732 * elfarm-nabi.c: Do not include elf32-arm.h if
733 ELFARM_NABI_C_INCLUDED is defined.
734 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
735
736 2002-07-30 Nick Clifton <nickc@redhat.com>
737
738 * po/sv.po: Updated Swedish translation.
739
740 2002-07-30 Jakub Jelinek <jakub@redhat.com>
741
742 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
743
744 2002-07-30 Alan Modra <amodra@bigpond.net.au>
745
746 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
747 * archive.c (bfd_generic_archive_p): Likewise.
748 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
749 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
750 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
751 (xcoff64_archive_p): Likewise.
752 (xcoff64_openr_next_archived_file): Likewise.
753 (xcoff64_archive_p): Clean up tdata properly on error.
754 * coffgen.c (coff_real_object_p): Likewise.
755 (coff_object_p): Release filehdr and opthdr.
756 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
757 * ieee.c (ieee_archive_p): Likewise.
758 * ihex.c (ihex_object_p): Likewise.
759 (ihex_mkobject): Always allocate tdata.
760 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
761 * srec.c (srec_mkobject): Always allocate tdata.
762 (srec_object_p): Clean up tdata properly on error.
763 (symbolsrec_object_p): Likewise.
764 * versados.c (versados_object_p): Likewise.
765 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
766 and bfd_realloc instead of realloc.
767 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
768 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
769 place of bfd_malloc, simplifying error freeing. Free hash table too.
770 (vms_object_p): Clean up tdata on error.
771 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
772 (vms_close_and_cleanup): Adjust for bfd_alloc use.
773
774 2002-07-30 Alan Modra <amodra@bigpond.net.au>
775
776 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
777
778 2002-07-26 Chris Demetriou <cgd@broadcom.com>
779
780 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
781 flags into resulting BFD.
782
783 2002-07-26 Alan Modra <amodra@bigpond.net.au>
784
785 From John Reiser <jreiser@BitWagon.com>
786 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
787 tls_ldm_got.refcount.
788
789 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
790
791 * elf64-mips.c: Update TODO comment.
792 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
793 mips_elf64_gprel16_reloca): Remove prototypes.
794 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
795 (UNUSED_RELOC): Replace by EMPTY_RELOC.
796 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
797 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
798 R_MIPS_HIGHEST.
799 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
800 R_MIPS_GOT16. Remove wrong comments.
801 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
802 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
803 from elf32-mips.c.
804 (mips_elf64_hi16_reloc): Fix formatting.
805 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
806 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
807 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
808 (mips_elf64_gprel16_reloc): Make static. Add check for
809 partial_inplace.
810 (mips_elf64_gprel16_reloca): Remove.
811 (mips_elf64_literal_reloc): New function.
812 (mips_elf64_gprel32_reloc): Fix formatting.
813 (mips_elf64_shift6_reloc): Fix comment. Make static.
814 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
815 elf32-mips.c.
816 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
817 elf32-mips.c
818 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
819 specific relocations.
820 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
821 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
822 (ELF_MAXPAGESIZE): Add comment.
823
824 2002-07-25 Nick Clifton <nickc@redhat.com>
825
826 * po/sv.po: Updated Swedish translation.
827 * po/es.po: Updated Spanish translation.
828 * po/fr.po: Updated French translation.
829
830 2002-07-25 Alan Modra <amodra@bigpond.net.au>
831
832 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
833 as elf_link_record_local_dynamic_symbol.
834 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
835 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
836 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
837 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
838 attempt is made to record a symbol in a discarded section, and
839 return `2' in that case.
840
841 2002-07-24 Nick Clifton <nickc@redhat.com>
842
843 * po/sv.po: Updated Swedish translation.
844 * po/es.po: Updated Spanish translation.
845
846 2002-07-23 Alan Modra <amodra@bigpond.net.au>
847
848 * po/SRC-POTFILES.in: Regenerate.
849
850 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
851 immediately. Remove code handling relocatable linking.
852 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
853 * elf32-cris.c (cris_elf_relocate_section): Likewise.
854 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
855 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
856 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
857 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
858 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
859 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
860 * elf32-v850.c (v850_elf_relocate_section): Likewise.
861 * elf32-vax.c (elf_vax_relocate_section): Likewise.
862 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
863 * elf32-avr.c (elf_backend_rela_normal): Define.
864 * elf32-cris.c: Likewise.
865 * elf32-fr30.c: Likewise.
866 * elf32-frv.c: Likewise.
867 * elf32-h8300.c: Likewise.
868 * elf32-hppa.c: Likewise.
869 * elf32-ip2k.c: Likewise.
870 * elf32-sparc.c: Likewise.
871 * elf32-v850.c: Likewise.
872 * elf32-vax.c: Likewise.
873 * elf64-hppa.c: Likewise.
874 * elf64-sparc.c: Likewise.
875 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
876 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
877 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
878 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
879 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
880 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
881 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
882 * elf-m10200.c (USE_RELA): Don't define.
883 * elf-m10300.c: Likewise.
884 * elfarm-oabi.c: Likewise.
885 * elf32-i370.c: Likewise.
886 * elf32-ip2k.c: Likewise.
887 * elf32-m68k.c: Likewise.
888 * elf32-mcore.c: Likewise.
889 * elf32-ppc.c: Likewise.
890 * elf32-s390.c: Likewise.
891 * elf32-vax.c: Likewise.
892 * elf64-ppc.c: Likewise.
893 * elf64-s390.c: Likewise.
894 * elf64-x86-64.c: Likewise.
895 * elfxx-ia64.c: Likewise.
896 * elf32-avr.c (USE_REL): Don't undef.
897 * elf32-ip2k.c: Likewise.
898
899 2002-07-23 Nick Clifton <nickc@redhat.com>
900
901 * elf-bfd.h (struct elf_backend_data): Add new bitfield
902 'want_p_paddr_set_to_zero'.
903 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
904 to false;
905 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
906 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
907
908 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
909
910 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
911 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
912 show the Copyright string.
913 Minor formatting tidy ups.
914
915 2002-07-23 Nick Clifton <nickc@redhat.com>
916
917 * po/fr.po: Updated French translation.
918 * po/sv.po: Updated Swedish translation.
919
920 2002-07-23 Alan Modra <amodra@bigpond.net.au>
921
922 * elflink.h (elf_link_input_bfd): Don't change internal symbols
923 when outputting relocs.
924
925 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
926
927 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
928 DT_PLTGOT into the dynamic section if there is a PLT.
929
930 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
931
932 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
933 elf32-mips.c.
934 (_bfd_mips_elf_write_section): Likewise.
935 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
936 (_bfd_mips_elf_write_section): Likewise.
937 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
938 (elf32_mips_write_section): Likewise.
939 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
940 (_bfd_mips_elf_write_section): Likewise.
941
942 2002-07-19 Alan Modra <amodra@bigpond.net.au>
943
944 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
945 PT_IA_64_UNWIND segments for a given section.
946
947 2002-07-17 H.J. Lu <hjl@gnu.org>
948
949 * Makefile.am: Fix a typo.
950 * Makefile.in: Regenerate.
951
952 2002-07-15 Denis Chertykov <denisc@overta.ru>
953 Frank Ch. Eigler <fche@redhat.com>
954 Ben Elliston <bje@redhat.com>
955 Alan Lehotsky <alehotsky@cygnus.com>
956 John Healy <jhealy@redhat.com>
957 Graham Stott <grahams@redhat.com>
958 Jeff Johnston <jjohnstn@redhat.com>
959
960 * Makefile.am: Add support for ip2k.
961 * Makefile.in: Regenerate.
962 * doc/Makefile.in: Regenerate.
963 * archures.c: Add support for ip2k.
964 * config.bfd: Add support for ip2k.
965 * configure.in: Add support for ip2k.
966 * configure: Regenerate.
967 * reloc.c: Add support for ip2k.
968 * targets.c: Add support for ip2k.
969 * bfd-in2.h: Regenerate.
970 * libbfd.h: Regenerate.
971 * cpu-ip2k.c: New file.
972 * elf32-ip2k.c: New file.
973
974 2002-07-17 Ian Rickards <irickard@arm.com>
975
976 * dwarf2.c (concat_filename): If we can't establish the directory
977 just return the filename.
978
979 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
980
981 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
982
983 2002-07-16 Alan Modra <amodra@bigpond.net.au>
984
985 * elflink.h: Formatting fixes, tidy prototypes.
986 (elf_link_assign_sym_version): Move common code out of loop.
987
988 2002-07-16 Alan Modra <amodra@bigpond.net.au>
989
990 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
991 reloc section size is zero. Correct reloc output location.
992
993 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
994
995 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
996 the final type for the e_fsel selector when generating PA2.0W code.
997 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
998 relocations.
999
1000 2002-07-14 H.J. Lu <hjl@gnu.org>
1001
1002 * elflink.h (elf_link_assign_sym_version): Hide the default
1003 definition if there is a hidden versioned definition.
1004
1005 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
1006
1007 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
1008 dynamic reference test in assertion when initializing GOT with
1009 static contents. Just assert that there are either no dynamic
1010 sections, the symbol is defined in the regular objects or that the
1011 symbol is undef weak. Tweak comment.
1012 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
1013 only if the symbol isn't defined in the program and isn't undef
1014 weak.
1015 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
1016 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
1017 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
1018 (elf_cris_discard_excess_program_dynamics): Don't consider
1019 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
1020
1021 2002-07-11 Alan Modra <amodra@bigpond.net.au>
1022
1023 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
1024 unresolved debugging relocs in dynamic applications.
1025 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1026 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1027 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1028 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1029 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1030 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1031
1032 2002-07-10 Alan Modra <amodra@bigpond.net.au>
1033
1034 * elf64-ppc.c (ONES): Define.
1035 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
1036 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
1037 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
1038
1039 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
1040 (ppc64_elf_set_private_flags): Delete.
1041 (ppc64_elf_section_from_shdr): Delete.
1042 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
1043 (ppc64_elf_fake_sections): Delete.
1044 (bfd_elf64_bfd_set_private_flags): Don't define.
1045 (bfd_elf64_get_symbol_info): Likewise.
1046 (elf_backend_section_from_shdr): Likewise.
1047 (elf_backend_fake_sections): Likewise.
1048
1049 2002-07-10 Marco Walther <Marco.Walther@sun.com>
1050
1051 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
1052 when not already set.
1053 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
1054 (elf_backend_fake_sections): Define.
1055
1056 2002-07-10 Alan Modra <amodra@bigpond.net.au>
1057
1058 * merge.c (_bfd_merge_section): Remove redundant output_section check.
1059 Formatting.
1060 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
1061
1062 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
1063
1064 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
1065 NULL sym_hashes to just before use.
1066 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
1067 symbol with non-default visibility.
1068 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
1069 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
1070 Ditto.
1071 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
1072 symbol with non-default visibility.
1073 (cris_elf_check_relocs): At tests for local symbol before
1074 increasing h->plt.refcount, also check for non-default
1075 visibility. Ditto when checking for local symbol to eliminate
1076 pc-relative runtime relocs.
1077
1078 2002-07-08 Alan Modra <amodra@bigpond.net.au>
1079
1080 * elf.c: Formatting.
1081 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
1082 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
1083 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
1084 segments.
1085
1086 2002-07-07 Mark Mitchell <mark@codesourcery.com>
1087 Alan Modra <amodra@bigpond.net.au>
1088
1089 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
1090 account the impact of relocation count overflow when computing
1091 section offsets.
1092 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
1093 or not to apply the PE COFF reloc overflow handling. Fix a
1094 fencepost error in deciding whether or not to use that technique.
1095
1096 2002-07-07 Alan Modra <amodra@bigpond.net.au>
1097
1098 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
1099 change type of locsyms.
1100 (bfd_elf_get_elf_syms): Declare.
1101 * elf.c (bfd_elf_get_elf_syms): New function.
1102 (group_signature): Use bfd_elf_get_elf_syms.
1103 (bfd_section_from_r_symndx): Likewise.
1104 * elfcode.h (elf_slurp_symbol_table): Likewise.
1105 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
1106 (elf_link_add_object_symbols): Likewise. Reorganise to increase
1107 locality of various data structures. Properly free internal relocs.
1108 (elf_bfd_final_link): Properly free internal relocs.
1109 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
1110 (elf_link_input_bfd): Likewise.
1111 (elf_gc_mark): Likewise. Properly free internal relocs.
1112 (elf_gc_sweep): Properly free internal relocs.
1113 (elf_reloc_symbol_deleted_p): No need to swap syms in.
1114 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
1115 internal relocs.
1116 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
1117 Properly free possibly cached info.
1118 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
1119 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
1120 symbol swapping code.
1121 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
1122 Properly free possibly cached info.
1123 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
1124 (mn10300_elf_relax_delete_bytes): Likewise.
1125 (mn10300_elf_symbol_address_p): Likewise.
1126 (mn10300_elf_get_relocated_section_contents): Likewise.
1127 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
1128 (elf32_h8_relax_delete_bytes): Likewise.
1129 (elf32_h8_symbol_address_p): Likewise.
1130 (elf32_h8_get_relocated_section_contents): Likewise.
1131 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
1132 (m32r_elf_relax_delete_bytes): Likewise.
1133 (m32r_elf_get_relocated_section_contents): Likewise.
1134 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
1135 elf_section_data to determine whether cached.
1136 (sh_elf_relax_section): As above for elf-m10200.c.
1137 (sh_elf_relax_delete_bytes): Likewise.
1138 (sh_elf_get_relocated_section_contents): Likewise.
1139 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
1140 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
1141 reading of local syms.
1142 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
1143 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
1144 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
1145 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
1146 relocs.
1147 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
1148 free internal relocs and section contents. Don't read symbols.
1149 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
1150 (elf32_hppa_size_stubs): Don't free local syms.
1151 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
1152 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
1153 possibly cached info.
1154 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
1155 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
1156 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
1157 all_local_syms.
1158 (get_local_syms): Delete function.
1159 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
1160 on exit.
1161 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
1162
1163 2002-07-05 Jim Wilson <wilson@redhat.com>
1164
1165 * syms.c (decode_section_type): New.
1166 (bfd_decode_symclass): Call decode_section_type.
1167
1168 2002-07-04 Jakub Jelinek <jakub@redhat.com>
1169
1170 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
1171 section content start.
1172 Reported by Michael Schumacher <mike@hightec-rt.com>.
1173
1174 2002-07-04 Alan Modra <amodra@bigpond.net.au>
1175
1176 * section.c (_bfd_strip_section_from_output): Remove unnecessary
1177 link order code. Don't actually remove the output section here;
1178 Just set a flag for the linker to do so.
1179 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
1180 sections when setting up output section dynsyms.
1181
1182 2002-07-04 Alan Modra <amodra@bigpond.net.au>
1183
1184 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
1185 fudge.
1186 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
1187 libs here instead.
1188
1189 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
1190
1191 * elf64-s390.c (create_got_section): Set .got section alignment to
1192 8 bytes.
1193 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
1194
1195 2002-07-02 Alan Modra <amodra@bigpond.net.au>
1196
1197 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
1198
1199 2002-07-01 Matt Thomas <matt@3am-software.com>
1200
1201 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
1202 to EF_VAX_*.
1203
1204 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1205
1206 * elfxx-mips.c (ABI_64_P): Fix comment.
1207 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
1208 new section names for N64 ABI.
1209 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
1210 (mips_elf_calculate_relocation): Code formatting.
1211 (mips_elf_create_dynamic_relocation): Likewise.
1212 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
1213 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
1214 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
1215 in any NewABI.
1216 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
1217 for NewABI.
1218 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
1219 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
1220 here, too.
1221
1222 2002-07-01 Andreas Schwab <schwab@suse.de>
1223
1224 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
1225 R_X86_64_64 to R_X86_64_RELATIVE.
1226
1227 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
1228
1229 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
1230 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
1231 Run "make dep-am".
1232 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
1233 host_aout_vec.
1234 * configure.in (vaxbsd_vec): Add.
1235 * targets.c (vaxbsd_vec): Add.
1236 * Makefile.in: Rebuild.
1237 * configure: Rebuild.
1238 * po/SRC-POTFILES.in: Rebuild.
1239
1240 2002-07-01 Alan Modra <amodra@bigpond.net.au>
1241
1242 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
1243 examining to gc_mark_hook, rather than the bfd.
1244 (elf_gc_sections): Adjust.
1245 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
1246 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
1247 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
1248 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
1249 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
1250 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
1251 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
1252 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
1253 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
1254 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
1255 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
1256 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
1257 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
1258 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
1259 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
1260 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
1261 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
1262 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
1263 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
1264 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
1265 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
1266 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
1267 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
1268 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
1269 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
1270 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
1271 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
1272 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
1273 redundant local sym tests.
1274 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
1275 (link_hash_newfunc): Init is_entry.
1276 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
1277 (ppc64_elf_link_hash_table_create): Init all_local_syms.
1278 (create_linkage_sections): Use bfd_make_section_anyway rather than
1279 bfd_make_section.
1280 (ppc64_elf_mark_entry_syms): New function.
1281 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
1282 up opd entry to function section map.
1283 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
1284 relocs that reference the opd section.
1285 (edit_opd): New function.
1286 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
1287 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
1288 (get_local_syms): Do so here. Exit if we already have local syms.
1289 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
1290 read local syms on non-ELF input.
1291 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
1292 than duplicating it's function here. Adjust free of internal
1293 relocs to suit.
1294 (ppc64_elf_relocate_section): Adjust local syms in opd section.
1295 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
1296 * elf32-hppa.c (elf32_hppa_size_stubs): Call
1297 _bfd_elf32_link_read_relocs rather than duplicating it's function
1298 here. Adjust free of internal relocs to suit.
1299
1300 2002-07-01 Andreas Jaeger <aj@suse.de>
1301
1302 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
1303 are not allowed in shared libs code, enforce -fPIC.
1304
1305 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
1306
1307 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
1308 trailing zero-sequences when there's previous left-over data.
1309
1310 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
1311
1312 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
1313 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
1314 and opd_rel_sec in order for starting rela section. Check _raw_size.
1315 (elf_backend_reloc_type_class): Define.
1316
1317 2002-06-27 Kevin Buettner <kevinb@redhat.com>
1318
1319 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
1320 DWARF2 formats.
1321
1322 2002-06-27 Alan Modra <amodra@bigpond.net.au>
1323
1324 * cpu-powerpc.c: Comment on ordering of arch_info.
1325 * elf32-ppc.c (ppc_elf_object_p): New function.
1326 (elf_backend_object_p): Define.
1327 * elf64-ppc.c (ppc64_elf_object_p): New function.
1328 (elf_backend_object_p): Define.
1329
1330 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
1331
1332 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
1333 * configure: Regenerate.
1334
1335 2002-06-25 Jason Eckhardt <jle@rice.edu>
1336
1337 * dwarf2.c (decode_line_info): Check unit->addr_size
1338 to read in the proper number of prologue bytes.
1339
1340 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
1341
1342 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
1343 aix5coff64_vec if 64-bit bfd support has been enabled.
1344 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
1345 been enabled.
1346
1347 * targets.c (_bfd_target_vector[]): Only include
1348 aix5coff64_vec if 64-bit bfd support has been enabled.
1349
1350 2002-06-25 Alan Modra <amodra@bigpond.net.au>
1351
1352 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
1353 * elf32-hppa.c (hppa_add_stub): Likewise.
1354 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
1355 * elflink.h (elf_add_default_symbol): Fix comment typo.
1356 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
1357 (elf_link_add_object_symbols): Likewise.
1358 (elf_link_assign_sym_version): Likewise.
1359 * hash.c (bfd_hash_lookup): Likewise.
1360 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
1361 * section.c (bfd_get_unique_section_name): Likewise.
1362 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
1363 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
1364 (assign_section_numbers): Likewise.
1365 (_bfd_elfcore_make_pseudosection): Likewise.
1366 (elfcore_grok_lwpstatus): Likewise.
1367 (elfcore_grok_win32pstatus): Likewise.
1368 (elfcore_write_note): Constify input params. Use PTR instead of
1369 void *. Include terminating NUL in namesz. Correct padding.
1370 Support NULL "name" param. Use memcpy instead of strcpy.
1371 (elfcore_write_prpsinfo): Constify input params.
1372 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
1373 (elfcore_write_lwpstatus): Likewise.
1374 (elfcore_write_pstatus): Likewise.
1375 (elfcore_write_prfpreg): Likewise.
1376 (elfcore_write_prxfpreg): Likewise.
1377 * elf-bfd.h (elfcore_write_note): Update declaration.
1378 (elfcore_write_prpsinfo): Likewise.
1379 (elfcore_write_prstatus): Likewise.
1380 (elfcore_write_pstatus): Likewise.
1381 (elfcore_write_prfpreg): Likewise.
1382 (elfcore_write_prxfpreg): Likewise.
1383 (elfcore_write_lwpstatus): Likewise.
1384
1385 2002-06-25 Jason Eckhardt <jle@rice.edu>
1386
1387 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
1388 symbols of type stProc and stStaticProc.
1389
1390 2002-06-25 Nick Clifton <nickc@redhat.com>
1391
1392 * ecoff.c: VArious formatting fixes.
1393
1394 2002-06-25 Alan Modra <amodra@bigpond.net.au>
1395
1396 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
1397
1398 2002-06-25 Alan Modra <amodra@bigpond.net.au>
1399
1400 * aout-adobe.c: Don't compare against "true" or "false.
1401 * aout-target.h: Likewise.
1402 * aoutx.h: Likewise.
1403 * archive.c: Likewise.
1404 * bout.c: Likewise.
1405 * cache.c: Likewise.
1406 * coff-a29k.c: Likewise.
1407 * coff-alpha.c: Likewise.
1408 * coff-i386.c: Likewise.
1409 * coff-mips.c: Likewise.
1410 * coff-or32.c: Likewise.
1411 * coff64-rs6000.c: Likewise.
1412 * coffcode.h: Likewise.
1413 * coffgen.c: Likewise.
1414 * cpu-ns32k.c: Likewise.
1415 * ecoff.c: Likewise.
1416 * ecofflink.c: Likewise.
1417 * elf.c: Likewise.
1418 * elf32-arm.h: Likewise.
1419 * elf32-cris.c: Likewise.
1420 * elf32-d30v.c: Likewise.
1421 * elf32-i386.c: Likewise.
1422 * elf32-mcore.c: Likewise.
1423 * elf32-ppc.c: Likewise.
1424 * elf32-sh.c: Likewise.
1425 * elf32-sh64.c: Likewise.
1426 * elf32-v850.c: Likewise.
1427 * elf64-alpha.c: Likewise.
1428 * elf64-sh64.c: Likewise.
1429 * elfcode.h: Likewise.
1430 * elfcore.h: Likewise.
1431 * elflink.h: Likewise.
1432 * elfxx-mips.c: Likewise.
1433 * i386os9k.c: Likewise.
1434 * ieee.c: Likewise.
1435 * libbfd.c: Likewise.
1436 * linker.c: Likewise.
1437 * mmo.c: Likewise.
1438 * nlm32-alpha.c: Likewise.
1439 * nlm32-i386.c: Likewise.
1440 * nlm32-ppc.c: Likewise.
1441 * nlm32-sparc.c: Likewise.
1442 * nlmcode.h: Likewise.
1443 * oasys.c: Likewise.
1444 * pdp11.c: Likewise.
1445 * peicode.h: Likewise.
1446 * reloc.c: Likewise.
1447 * som.c: Likewise.
1448 * srec.c: Likewise.
1449 * tekhex.c: Likewise.
1450 * vms.c: Likewise.
1451 * xcofflink.c: Likewise.
1452 * elf64-sparc.c: Edit comment to not use "== false".
1453
1454 * aoutf1.h: Don't use "? true : false".
1455 * ecoff.c: Likewise.
1456 * format.c: Likewise.
1457 * ieee.c: Likewise.
1458 * linker.c: Likewise.
1459 * mmo.c: Likewise.
1460 * oasys.c: Likewise.
1461
1462 2002-06-23 H.J. Lu <hjl@gnu.org>
1463
1464 * elflink.h (elf_link_add_archive_symbols): For the default
1465 version, check references with only one `@' first.
1466
1467 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
1468
1469 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
1470 function.
1471 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
1472 symbol table.
1473 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
1474 (elf64_hppa_size_dynamic_sections): Revise to use
1475 elf64_hppa_mark_milli_and_exported_functions.
1476 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
1477 symbols out of dynamic symbol table.
1478
1479 2002-06-23 Alan Modra <amodra@bigpond.net.au>
1480
1481 * Makefile.in: Regenerate.
1482 * libbfd.h: Regenerate.
1483 * bfd-in2.h: Regenerate.
1484 * configure: Regenerate.
1485 * po/SRC-POTFILES.in: Regenerate.
1486
1487 * elflink.h: Comment typo fixes.
1488
1489 2002-06-23 H.J. Lu <hjl@gnu.org>
1490
1491 * elf-bfd.h (elf_link_loaded_list): New structure.
1492 (elf_link_hash_table): Add "loaded".
1493 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
1494 * elflink.h (elf_link_check_versioned_symbol): New function.
1495 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
1496
1497 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
1498
1499 * elflink.h (size_dynamic_sections): If the target does not
1500 support an ELF style hash table, return true, indicating that
1501 nothing needed to be done, rather than false, indicating that the
1502 section's size could not be computed.
1503
1504 2002-06-18 Dave Brolley <brolley@redhat.com>
1505
1506 From Catherine Moore, Michael Meissner, Dave Brolley:
1507 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
1508 * targets.c: Support bfd_elf32_frv_vec.
1509 * reloc.c: Add FRV relocs.
1510 * configure.in: Add support for bfd-elf32-frv-vec.
1511 * config.bfd (targ_cpu): Add support for frv-*-elf.
1512 * archures.c: Add frv arch and machines.
1513 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
1514 (ALL_MACHINES_CFILES): Add cpu-frv.c.
1515 (BFD32_BACKENDS): Add elf32-frv.lo.
1516 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
1517 (cpu-frv.lo): New target.
1518 (elf32-frv.lo): New target.
1519 * cpu-frv.c: New file.
1520 * elf32-frv.c: New file.
1521
1522 2002-06-18 Jakub Jelinek <jakub@redhat.com>
1523
1524 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
1525 e_shnum == 0.
1526 Only read the first section header if e_shoff is non-zero.
1527 Don't consider e_shstrndx if there are no sections.
1528
1529 2002-06-17 Tom Rix <trix@redhat.com>
1530
1531 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
1532 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
1533 complain_overflow_bitfield.
1534
1535 2002-06-17 Alan Modra <amodra@bigpond.net.au>
1536
1537 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
1538 (bfd_fdopenr): Likewise.
1539 (bfd_openstreamr): Likewise.
1540 (bfd_openw): Likewise.
1541
1542 * targets.c: Sort target vecs.
1543 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
1544 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
1545 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
1546 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
1547 * configure.in: Sort target vecs. Add m88kmach3_vec.
1548 * configure: Regenerate.
1549
1550 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
1551
1552 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
1553 bpo_reloc_no to break sort order ties, not address of items.
1554
1555 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
1556
1557 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
1558 Skip excluded sections in determing __gp value.
1559 (elf_hppa_final_link_relocate): Use the symbol's address in
1560 R_PARISC_FPTR64 relocations that don't need an opd entry.
1561 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
1562 (elf64_hppa_finalize_dynreloc): Likewise.
1563 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
1564 (elf64_hppa_finish_dynamic_symbol): Break up assert.
1565
1566 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
1567
1568 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
1569 alignment for .bss, .data and .text sections so that sse and sse2
1570 code will work.
1571 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
1572
1573 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
1574
1575 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
1576 sh[1234]*-elf*.
1577
1578 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
1579
1580 * elflink.h (elf_bfd_final_link): Improve error handling for missing
1581 dynamic sections.
1582
1583 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
1584 for a symbol that has no output section.
1585 (allocate_dynrel_entries): Correct comment.
1586 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
1587 unless we want one.
1588 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
1589 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
1590 with no section. Remove unnecessary parentheses.
1591
1592 2002-06-11 Tom Rix <trix@redhat.com>
1593
1594 * coffcode.h (coff_compute_section_file_positions): Add data
1595 section to AIX loader alignment check.
1596
1597 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
1598 alignment to 4 bytes.
1599 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
1600 power accessor macro.
1601 (do_shared_object_padding): Remove invalid assertion.
1602
1603 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
1604
1605 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
1606 for removed output sections.
1607
1608 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
1609
1610 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
1611 htab_alloc.
1612 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
1613
1614 2002-06-08 H.J. Lu <hjl@gnu.org>
1615
1616 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
1617 work around a long long bug in gcc 2.96 on mips.
1618
1619 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
1620
1621 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
1622 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
1623 Regenerate dependency lists.
1624 * Makefile.in: Regenerate.
1625 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
1626 vax1knetbsd_vec to targ_selvecs.
1627 * configure.in: Add vax1knetbsd_vec.
1628 * configure: Regenerate.
1629 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
1630 * vax1knetbsd.c: New file.
1631 * vaxnetbsd.c: Update copyright years.
1632 (TARGET_PAGE_SIZE): Set to 0x1000.
1633 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
1634
1635 2002-06-08 Matt Thomas <matt@3am-software.com>
1636
1637 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
1638
1639 2002-06-08 Alan Modra <amodra@bigpond.net.au>
1640
1641 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
1642
1643 2002-06-08 Alan Modra <amodra@bigpond.net.au>
1644
1645 * Makefile.am: Run "make dep-am".
1646 * Makefile.in: Regenerate.
1647
1648 * armnetbsd.c: Replace CONST with const.
1649 * corefile.c: Likewise.
1650 * elf32-dlx.c: Likewise.
1651 * elf64-mips.c: Likewise.
1652 * mmo.c: Likewise.
1653 * ns32knetbsd.c: Likewise.
1654
1655 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
1656 table is elf64-sparc.
1657
1658 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1659
1660 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
1661 Fix RELA addends to get not shifted in the result. Don't do special
1662 handling of R_MIPS_64 for NewABI.
1663
1664 2002-06-07 Alan Modra <amodra@bigpond.net.au>
1665
1666 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
1667 (NAME(aout,slurp_reloc_table)): Likewise.
1668 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
1669 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
1670 (xcoff_write_archive_contents_big): Likewise.
1671 (xcoff_generate_rtinit): Likewise.
1672 (xcoff_generate_rtinit): Likewise, and check error return.
1673 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
1674 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
1675 (coff_get_normalized_symtab): Likewise.
1676 (coff_make_empty_symbol): Likewise.
1677 (bfd_coff_set_symbol_class): Likewise.
1678 * cofflink.c (coff_link_add_symbols): Likewise.
1679 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
1680 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
1681 (bfd_ecoff_write_accumulated_debug): Likewise.
1682 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
1683 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
1684 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
1685 * ieee.c (do_with_relocs): Use bfd_zalloc.
1686 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
1687 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
1688 (NAME(aout,slurp_reloc_table)): Likewise.
1689 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
1690 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
1691 * som.c (som_build_and_write_symbol_table): Likewise.
1692 (som_slurp_string_table): Likewise.
1693 (som_slurp_symbol_table): Likewise.
1694 (som_bfd_ar_write_symbol_stuff): Likewise.
1695 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
1696 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
1697 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
1698 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
1699 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
1700
1701 2002-06-07 Alan Modra <amodra@bigpond.net.au>
1702
1703 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
1704 "group" union.
1705 (elf_group_name): Update.
1706 (elf_group_id): Define.
1707 (bfd_elf_set_group_contents): Declare.
1708 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
1709 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
1710 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
1711 that sym for the signature.
1712 (_bfd_elf_compute_section_file_positions): Don't call
1713 set_group_contents for "ld -r" case.
1714 (swap_out_syms): Use bfd_zalloc.
1715 * elflink.h (elf_link_add_archive_symbols): Likewise.
1716 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
1717 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
1718
1719 2002-06-07 Alan Modra <amodra@bigpond.net.au>
1720
1721 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
1722 relocs in opd for non-shared too.
1723
1724 2002-06-06 Jeffrey Law <law@redhat.com
1725
1726 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
1727 relocations.
1728
1729 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
1730
1731 * merge.c: Include libiberty.h.
1732 * elf-strtab.c: Include libiberty.h.
1733
1734 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
1735
1736 * peXXigen.c (pe_print_idata): Remove unused variable.
1737
1738 2002-06-06 David Heine <dlheine@tensilica.com>
1739
1740 * elf.c (assign_file_positions_for_segments): Remove unallocated
1741 sections from the section to segment mapping for PT_LOAD segments.
1742 Update comment about empty loadable segments.
1743
1744 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
1745
1746 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
1747 is within the .stabstr section.
1748
1749 2002-06-06 Alan Modra <amodra@bigpond.net.au>
1750
1751 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
1752 are "const PTR", not "const PTR *".
1753 (bfd_elf32_swap_symbol_in): Likewise.
1754 (bfd_elf64_swap_symbol_in): Likewise.
1755 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
1756 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
1757 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
1758 (elf_link_add_object_symbols): Likewise.
1759 (elf_link_record_local_dynamic_symbol): Likewise.
1760 (elf_link_input_bfd): Likewise.
1761 (elf_gc_mark): Likewise.
1762 (elf_reloc_symbol_deleted_p): Likewise.
1763 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
1764 (mn10200_elf_relax_delete_bytes): Likewise.
1765 (mn10200_elf_symbol_address_p): Likewise.
1766 (mn10200_elf_get_relocated_section_contents): Likewise.
1767 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
1768 (mn10300_elf_relax_section): Likewise.
1769 (mn10300_elf_relax_delete_bytes): Likewise.
1770 (mn10300_elf_symbol_address_p): Likewise.
1771 (mn10300_elf_get_relocated_section_contents): Likewise.
1772 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
1773 (elf32_h8_relax_delete_bytes): Likewise.
1774 (elf32_h8_symbol_address_p): Likewise.
1775 (elf32_h8_get_relocated_section_contents): Likewise.
1776 * elf32-hppa.c (get_local_syms): Likewise.
1777 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
1778 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
1779 * elf32-sh.c (sh_elf_relax_section): Likewise.
1780 (sh_elf_relax_delete_bytes): Likewise.
1781 (sh_elf_get_relocated_section_contents): Likewise.
1782 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
1783 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
1784 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
1785 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
1786 * elf64-ppc.c (get_local_syms): Likewise.
1787 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
1788 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
1789
1790 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
1791
1792 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
1793
1794 2002-06-05 Alan Modra <amodra@bigpond.net.au>
1795
1796 * elf.c (group_signature): Swap in the whole symbol, and handle
1797 extracting section symbol names.
1798 (setup_group): Add comment.
1799 (set_group_contents): When called from objcopy or ld, arrange for
1800 section contents to be written. Write group member output section
1801 indices to allow objcopy to reorganize sections.
1802 (_bfd_elf_copy_private_section_data): Copy group info.
1803
1804 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
1805 (bfd_elf32_swap_symbol_in): Update prototype.
1806 (bfd_elf64_swap_symbol_in): Likewise.
1807 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
1808 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
1809 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
1810 (elf_link_add_object_symbols): Likewise.
1811 (elf_link_record_local_dynamic_symbol): Likewise.
1812 (elf_link_input_bfd): Likewise.
1813 (elf_gc_mark): Likewise.
1814 (elf_reloc_symbol_deleted_p): Likewise.
1815 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
1816 (mn10200_elf_relax_delete_bytes): Likewise.
1817 (mn10200_elf_symbol_address_p): Likewise.
1818 (mn10200_elf_get_relocated_section_contents): Likewise.
1819 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
1820 (mn10300_elf_relax_section): Likewise.
1821 (mn10300_elf_relax_delete_bytes): Likewise.
1822 (mn10300_elf_symbol_address_p): Likewise.
1823 (mn10300_elf_get_relocated_section_contents): Likewise.
1824 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
1825 (elf32_h8_relax_delete_bytes): Likewise.
1826 (elf32_h8_symbol_address_p): Likewise.
1827 (elf32_h8_get_relocated_section_contents): Likewise.
1828 * elf32-hppa.c (get_local_syms): Likewise.
1829 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
1830 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
1831 * elf32-sh.c (sh_elf_relax_section): Likewise.
1832 (sh_elf_relax_delete_bytes): Likewise.
1833 (sh_elf_get_relocated_section_contents): Likewise.
1834 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
1835 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
1836 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
1837 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
1838 * elf64-ppc.c (get_local_syms): Likewise.
1839 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
1840 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
1841 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
1842 * elf64-alpha.c (alpha_elf_size_info): Likewise.
1843 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
1844 * elf64-mips.c (mips_elf64_size_info): Likewise.
1845 * elf64-s390.c (s390_elf64_size_info): Likewise.
1846 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
1847
1848 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1849
1850 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
1851 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
1852 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
1853 _bfd_mips_elf_ignore_discarded_relocs.
1854 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
1855
1856 2002-06-05 H.J. Lu <hjl@gnu.org>
1857
1858 * elfxx-mips.c (mips_elf_calculate_relocation): Call
1859 _bfd_elf_rel_local_sym for STT_SECTION relocations against
1860 the SEC_MERGE section.
1861
1862 2002-06-05 Alan Modra <amodra@bigpond.net.au>
1863
1864 * coff-alpha.c: Update copyright date.
1865 * coff-mips.c: Likewise.
1866 * xcoff-target.h: Likewise.
1867
1868 * bfd-in.h: Remove "taken from the source" comment.
1869 * libbfd-in.h: Likewise.
1870 * libcoff-in.h: Likewise.
1871 * bfd-in2.h: Regenerate.
1872 * libbfd.h: Regenerate.
1873 * libcoff.h: Regenerate.
1874
1875 * elf.c (bfd_elf_discard_group): Return true.
1876 * elf-bfd.h (bfd_elf_discard_group): Declare.
1877 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
1878 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
1879 * bfd.c (bfd_discard_group): Define.
1880 * targets.c (struct bfd_target): Add _bfd_discard_group.
1881 (BFD_JUMP_TABLE_LINK): Here too.
1882 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
1883 * aout-adobe.c (aout_32_bfd_discard_group): Define.
1884 * aout-target.h (MY_bfd_discard_group): Define.
1885 * aout-tic30.c (MY_bfd_discard_group): Define.
1886 * binary.c (binary_bfd_discard_group): Define.
1887 * bout.c (b_out_bfd_discard_group): Define.
1888 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
1889 * coffcode.h (coff_bfd_discard_group): Define.
1890 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
1891 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
1892 * i386msdos.c (msdos_bfd_discard_group): Define.
1893 * i386os9k.c (os9k_bfd_discard_group): Define.
1894 * ieee.c (ieee_bfd_discard_group): Define.
1895 * ihex.c (ihex_bfd_discard_group): Define.
1896 * mmo.c (mmo_bfd_discard_group): Define.
1897 * nlm-target.h (nlm_bfd_discard_group): Define.
1898 * oasys.c (oasys_bfd_discard_group): Define.
1899 * ppcboot.c (ppcboot_bfd_discard_group): Define.
1900 * som.c (som_bfd_discard_group): Define.
1901 * srec.c (srec_bfd_discard_group): Define.
1902 * tekhex.c (tekhex_bfd_discard_group): Define.
1903 * versados.c (versados_bfd_discard_group): Define.
1904 * vms.c (vms_bfd_discard_group): Define.
1905 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
1906 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
1907 (aix5coff64_vec): Likewise.
1908 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
1909
1910 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
1911
1912 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
1913 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
1914 (elf32-sh64-com.lo): New dependency list.
1915 * Makefile.in: Regenerate.
1916 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
1917 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
1918 elf32-sh64-com.lo.
1919 * configure: Regenerate.
1920 * elf32-sh64.c (sh64_address_in_cranges)
1921 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
1922 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
1923 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
1924 * elf32-sh64-com.c: ...here. New file.
1925
1926 2002-06-04 Alan Modra <amodra@bigpond.net.au>
1927
1928 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
1929 ATTRIBUTE_UNUSED on used params.
1930 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
1931 before calling bfd_section_from_elf_index on local syms.
1932 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
1933
1934 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
1935
1936 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
1937 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
1938 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
1939 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
1940 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
1941 * Makefile.in: Regenerate.
1942 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
1943 (sh64-*-netbsd*): New targets.
1944 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
1945 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
1946 * configure: Regenerate.
1947 * elf32-sh64-nbsd.c: New file.
1948 * elf64-sh64-nbsd.c: New file.
1949 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
1950 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
1951 bfd_elf64_sh64lnbsd_vec.
1952
1953 2002-06-04 Alan Modra <amodra@bigpond.net.au>
1954
1955 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
1956 (bfd_section_from_shdr): Likewise. Set section name of group
1957 sections from signature.
1958 (group_signature): Split out from setup_group. Ensure symbol table
1959 is available.
1960 (bfd_elf_discard_group): New function.
1961 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
1962 .gnu.linkonce* sections if they are members of a group.
1963 (set_group_contents): Set GRP_COMDAT flag.
1964 * section.c (bfd_discard_group): New function.
1965 * bfd-in.h (bfd_elf_discard_group): Declare.
1966 * bfd-in2.h: Regenerate.
1967 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
1968 (elf_linkonce_p): Define.
1969
1970 2002-06-04 Alan Modra <amodra@bigpond.net.au>
1971
1972 * elf.c (bfd_section_from_shdr): Make "name" const.
1973 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
1974 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
1975 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
1976 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
1977 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
1978 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
1979 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
1980 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
1981 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
1982 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
1983 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
1984
1985 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1986
1987 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
1988 ABI.
1989
1990 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
1991
1992 * elf32-arc.c: Fix formatting.
1993 * elf32-arm.h: Likewise.
1994 * elf32-cris.c: Likewise.
1995 * elf32-dlx.c: Likewise.
1996 * elf32-hppa.c: Likewise.
1997 * elf32-i386.c: Likewise.
1998 * elf32-i386qnx.c: Likewise.
1999 * elf32-or32.c: Likewise.
2000 * elf32-s390.c: Likewise.
2001 * elf32-sh64.c: Likewise.
2002 * elf32-vax.c: Likewise.
2003 * elf32-xstormy16.c: Likewise.
2004 * elf64-alpha.c: Likewise.
2005 * elf64-mmix.c: Likewise.
2006 * elf64-ppc.c: Likewise.
2007 * elf64-s390.c: Likewise.
2008 * elf64-sh64.c: Likewise.
2009 * elf64-x86-64.c: Likewise.
2010
2011 2002-06-02 Richard Henderson <rth@redhat.com>
2012
2013 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
2014 null when there are no got entries for a symbol.
2015 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
2016 uninitialized variable warning.
2017
2018 2002-06-01 Richard Henderson <rth@redhat.com>
2019
2020 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
2021 undefined symbols here.
2022 (elf64_alpha_relax_section): Do it here. Also test for not
2023 defined in the current module.
2024 (elf64_alpha_relocate_section_r): Split out of ...
2025 (elf64_alpha_relocate_section): ... here. Don't dereference
2026 NULL when looking up local got entries.
2027
2028 2002-06-01 Richard Henderson <rth@redhat.com>
2029
2030 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
2031 symbols from JSR relaxation.
2032 (elf64_alpha_size_plt_section_1): New.
2033 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
2034 (elf64_alpha_size_rela_got_1): ... here.
2035 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
2036 (elf64_alpha_size_rela_got_section): ... here.
2037 (elf64_alpha_size_plt_section): New.
2038 (elf64_alpha_relax_section): Call them.
2039 (elf64_alpha_size_got_sections): Remove output_bfd arg.
2040 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
2041
2042 2002-06-01 Richard Henderson <rth@redhat.com>
2043
2044 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
2045 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
2046 in shared libraries. Fix DTPRELHI and TPRELHI value.
2047 (INSN_ADDQ, INSN_RDUNIQ): New.
2048 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
2049 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
2050 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
2051 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
2052 Handle GOTDTPREL and GOTTPREL relocations.
2053 (elf64_alpha_relax_gprelhilo): New.
2054 (elf64_alpha_relax_tls_get_addr): New.
2055 (elf64_alpha_relax_find_tls_segment): New.
2056 (elf64_alpha_relax_section): Handle TLS relocations.
2057 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
2058 (elf64_alpha_check_relocs): Set it.
2059
2060 2002-06-01 Richard Henderson <rth@redhat.com>
2061
2062 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
2063
2064 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
2065 check; don't suppress dynamic relocs for non-allocated sections.
2066
2067 * elf64-alpha.c: Remove dead code.
2068
2069 2002-05-31 Alan Modra <amodra@bigpond.net.au>
2070
2071 * bfd-in2.h: Regenerate.
2072 * libbfd.h: Regenerate.
2073 * po/SRC-POTFILES.in: Regenerate.
2074
2075 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
2076 space for bss .plt.
2077
2078 2002-05-31 Graeme Peterson <gp@qnx.com>
2079
2080 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
2081 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
2082 Run "make dep-am".
2083 * Makefile.in: Regenerate.
2084 * config.bfd: Add i[3456]86-*-nto-qnx* support.
2085 * configure.in: Add bfd_elf32_i386qnx_vec support.
2086 * configure: Regenerate.
2087 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
2088 is_contained_by_filepos, and copy_private_bfd_data_p.
2089 * elf.c (assign_file_positions_for_segments): Call backend
2090 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
2091 (IS_CONTAINED_BY_FILEPOS): Define.
2092 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
2093 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
2094 Fix non-K&R call to _bfd_error_handler.
2095 (_bfd_elf_copy_private_section_data): Use backend
2096 copy_private_bfd_data_p.
2097 * elf32-i386.c: Don't include elfxx-target.h when
2098 ELF32_I386_C_INCLUDED is defined.
2099 * elf32-i386qnx.c: New QNX elf backend file.
2100 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
2101 elf_backend_is_contained_by_filepos, and
2102 elf_backend_do_copy_private_bfd_data.
2103 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
2104
2105 2002-05-31 Alan Modra <amodra@bigpond.net.au>
2106
2107 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
2108 Move other similar defines to start of file.
2109
2110 2002-05-30 Tom Rix <trix@redhat.com>
2111
2112 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
2113 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
2114
2115 2002-05-30 Richard Henderson <rth@redhat.com>
2116
2117 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
2118 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
2119 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
2120 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
2121 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
2122 (struct alpha_elf_obj_tdata): Rename total_got_entries and
2123 n_local_got_entries to total_got_size and local_got_size.
2124 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
2125 (alpha_got_entry_size): New.
2126 (elf64_alpha_relax_with_lituse): Use it.
2127 (elf64_alpha_relax_without_lituse): Likewise.
2128 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
2129 (get_got_entry): New.
2130 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
2131 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
2132 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
2133 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
2134 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
2135 (elf64_alpha_calc_got_offsets): Likewise.
2136 (alpha_dynamic_entries_for_reloc): New.
2137 (elf64_alpha_calc_dynrel_sizes): Use it.
2138 (elf64_alpha_size_dynamic_sections): Likewise.
2139 (elf64_alpha_relocate_section): Handle TLS relocations.
2140 * reloc.c: Add Alpha TLS relocations.
2141 * bfd-in2.h, libbfd.h: Rebuild.
2142
2143 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
2144
2145 * peXXigen.c (pe_print_idata): Remove double printed
2146 import table lines; add Bound-To comment.
2147
2148 2002-05-29 Matt Thomas <matt@3am-software.com>
2149
2150 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
2151 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
2152 (elf32-vax.lo): New rule.
2153 * Makefile.in: Regenerate.
2154 * configure.in (bfd_elf32_vax_vec)
2155 (vaxnetbsd_vec): New vectors.
2156 * configure: Regenerate.
2157 * config.bfd (vax-*-netbsdelf*)
2158 (vax-*-netbsdaout*)
2159 (vax-*-netbsd*): New targets.
2160 * elf32-vax.c: New file.
2161 * reloc.c: Add VAX relocations.
2162 * bfd-in2.h: Regenerate.
2163 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
2164
2165 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
2166
2167 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
2168 and bfd_elf32_bigarm_vec to targ_selvecs.
2169
2170 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
2171
2172 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
2173 with auto-imported symbols.
2174
2175 2002-05-29 Adam Nemet <anemet@lnxw.com>
2176
2177 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
2178 sections only record bfd.
2179 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
2180 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
2181 * bfd-in2.h: Regenerate.
2182
2183 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
2184
2185 * syms.c (_bfd_stab_section_find_nearest_line): Move
2186 declaration and initialisation of saw_line and saw_func out of
2187 for loop.
2188
2189 2002-05-29 Alan Modra <amodra@bigpond.net.au>
2190
2191 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
2192 (bfd_elf64_get_symbol_info): Define.
2193 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
2194
2195 2002-05-29 Andrey Volkov <avolkov@transas.com>
2196
2197 * cpu-h8300.c: Make default h8300 machine first in machine list.
2198
2199 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
2200
2201 * config.bfd: Added DLX configuraton.
2202 * Makefile.am: Added DLX configuraton.
2203 * configure.in: Added DLX configuraton.
2204 * archures.c: Add DLX architecure.
2205 * reloc.c: Add DLX relocs.
2206 * targets.c: Added DLX target vector.
2207 * configure: Regenerate.
2208 * Makefile.in: Regenreate.
2209 * bfd-in2.h: Regenreate.
2210 * elf32-dlx.c: New file: Support DLX target.
2211 * cpu-dlx.c: New file: Support DLX target.
2212
2213 2002-05-25 Alan Modra <amodra@bigpond.net.au>
2214
2215 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
2216
2217 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
2218 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
2219 strings to point inside function code sym string.
2220 (func_desc_adjust): Likewise.
2221 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
2222
2223 2002-05-24 Michal Ludvig <mludvig@suse.cz>
2224
2225 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
2226 (elf64_x86_64_grok_psinfo): Added.
2227
2228 2002-05-24 TAMURA Kent <kent@netbsd.org>
2229
2230 * config.bfd: Add a target for i386-netbsdpe.
2231
2232 2002-05-24 Alan Modra <amodra@bigpond.net.au>
2233
2234 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
2235 and is_func_descriptor.
2236 (func_desc_adjust): Hide function code sym in shared libs unless
2237 there is a matching exported function descriptor sym.
2238
2239 2002-05-23 Jakub Jelinek <jakub@redhat.com>
2240
2241 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
2242 for symbols from SHF_TLS section.
2243 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
2244 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
2245 (map_sections_to_segments): Build PT_TLS segment if necessary.
2246 (assign_file_positions_for_segments): Likewise.
2247 (get_program_header_size): Account for PT_TLS segment.
2248 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
2249 SEC_THREAD_LOCAL sections to STT_TLS.
2250 * reloc.c: Add 386 and IA-64 TLS relocs.
2251 * section.c (SEC_THREAD_LOCAL): Define.
2252 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
2253 Remove.
2254 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
2255 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
2256 unconditionally.
2257 (struct elf_final_link_info): Add first_tls_sec.
2258 (elf_bfd_final_link): Set first_tls_sec.
2259 Compute elf_hash_table (info)->tls_segment.
2260 (elf_link_output_extsym): Handle STT_TLS symbols.
2261 (elf_link_input_bfd): Likewise.
2262 * syms.c (BSF_THREAD_LOCAL): Define.
2263 * bfd-in2.h: Rebuilt.
2264 * libbfd.h: Rebuilt.
2265 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
2266 elf_i386_mkobject, elf_i386_object_p): New functions.
2267 (elf_howto_table): Add TLS relocs.
2268 (elf_i386_reloc_type_lookup): Support TLS relocs.
2269 (elf_i386_info_to_howto_rel): Likewise.
2270 (struct elf_i386_link_hash_entry): Add tls_type.
2271 (struct elf_i386_obj_tdata): New.
2272 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
2273 New macros.
2274 (struct elf_i386_link_hash_table): Add tls_ldm_got.
2275 (link_hash_newfunc): Clear tls_type.
2276 (elf_i386_check_relocs): Support TLS relocs.
2277 (elf_i386_gc_sweep_hook): Likewise.
2278 (allocate_dynrelocs): Likewise.
2279 (elf_i386_size_dynamic_sections): Likewise.
2280 (elf_i386_relocate_section): Likewise.
2281 (elf_i386_finish_dynamic_symbol): Likewise.
2282 (bfd_elf32_mkobject, elf_backend_object_p): Define.
2283 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
2284 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
2285 want_tprel, want_dtpmod, want_dtprel.
2286 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
2287 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
2288 R_IA64_LTOFF_TPREL22.
2289 (elf_code_to_howto_index): Add TLS relocs.
2290 (elfNN_ia64_check_relocs): Support TLS relocs.
2291 (allocate_global_data_got): Account for TLS .got data.
2292 (allocate_dynrel_entries): Account for TLS dynamic relocations.
2293 (elfNN_ia64_install_value): Supprt TLS relocs.
2294 (set_got_entry): Support TLS relocs.
2295 (elfNN_ia64_relocate_section): Likewise.
2296
2297 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
2298
2299 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
2300 BLX reloc round the relocation up rather than down.
2301 * coff-arm.c (coff_arm_relocate_section): Likewise.
2302
2303 2002-05-21 H.J. Lu (hjl@gnu.org)
2304
2305 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
2306 definition.
2307
2308 2002-05-22 Alan Modra <amodra@bigpond.net.au>
2309
2310 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
2311 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
2312
2313 2002-05-22 Alan Modra <amodra@bigpond.net.au>
2314
2315 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
2316 unresolved relocs.
2317 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
2318
2319 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2320
2321 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
2322 non-ELF targets.
2323
2324 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2325
2326 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
2327 an error value.
2328 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
2329 return with false on error.
2330 (elf_link_input_bfd): Check reloc_emitter return value.
2331
2332 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
2333
2334 * config.bfd (armeb-*-netbsdelf*): New target.
2335
2336 2002-05-20 Alan Modra <amodra@bigpond.net.au>
2337
2338 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
2339 at the plt call stub.
2340
2341 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2342
2343 * cpu-mips.c (mips_compatible): Don't try to check machine
2344 compatibility.
2345
2346 2002-05-18 Tom Rix <trix@redhat.com>
2347
2348 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
2349
2350 2002-05-17 Alan Modra <amodra@bigpond.net.au>
2351
2352 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
2353 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
2354 we've already warned about an undefined symbol. Report more
2355 detail on reloc errors.
2356
2357 2002-05-17 Alan Modra <amodra@bigpond.net.au>
2358
2359 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
2360 * configure.in: Invoke AM_INSTALL_LIBBFD.
2361 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
2362 (install_libbfd): .. New target.
2363 (uninstall_libbfd): Likewise.
2364 (install-bfdlibLTLIBRARIES): Likewise.
2365 (uninstall-bfdlibLTLIBRARIES): Likewise.
2366 (bfdlibdir): New.
2367 (bfdincludedir): New.
2368 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
2369 * aclocal.m4: Regenerate.
2370 * configure: Regenerate.
2371 * Makefile.in: Regenerate.
2372
2373 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
2374
2375 * hash.c (bfd_hash_lookup): Remove computation of len from inside
2376 hash loop.
2377
2378 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
2379
2380 * config.bfd: Add targets for sh64-linux (little endian and
2381 big endian).
2382
2383 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
2384
2385 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
2386 is located in the same section as the import table. Instead
2387 check, and if necessary load the section containing the thunk.
2388
2389 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
2390
2391 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
2392 bfd_bread.
2393 (xcoff64_core_file_matches_executable_p): Replace bfd_read
2394 with bfd_bread.
2395
2396 2002-05-15 Alan Modra <amodra@bigpond.net.au>
2397
2398 * aix5ppc-core.c: Warning fixes.
2399 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
2400 * aout-target.h (MY_bfd_link_just_syms): Define.
2401 * aout-tic30.c (MY_bfd_link_just_syms): Define.
2402 * bfd.c (bfd_link_just_syms): Define.
2403 * binary.c (binary_bfd_link_just_syms): Define.
2404 * bout.c (b_out_bfd_link_just_syms): Define.
2405 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
2406 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
2407 * coffcode.h (coff_bfd_link_just_syms): Define.
2408 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
2409 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
2410 (_bfd_elf_link_just_syms): Declare.
2411 * elf.c (_bfd_elf_link_just_syms): New function.
2412 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
2413 sections haven't already been discarded by the linker.
2414 * elflink.h (elf_link_add_object_symbols): Likewise for stab
2415 sections and SEC_MERGE sections.
2416 (elf_bfd_discard_info): Similarly here.
2417 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
2418 * i386msdos.c (msdos_bfd_link_just_syms): Define.
2419 * i386os9k.c (os9k_bfd_link_just_syms): Define.
2420 * ieee.c (ieee_bfd_link_just_syms): Define.
2421 * ihex.c (ihex_bfd_link_just_syms): Define.
2422 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
2423 (_bfd_generic_link_just_syms): Declare.
2424 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
2425 * linker.c (_bfd_generic_link_just_syms): New function.
2426 * mmo.c (mmo_bfd_link_just_syms): Define.
2427 * nlm-target.h (nlm_bfd_link_just_syms): Define.
2428 * oasys.c (oasys_bfd_link_just_syms): Define.
2429 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
2430 * som.c (som_bfd_link_just_syms): Define.
2431 * srec.c (srec_bfd_link_just_syms): Define.
2432 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
2433 (BFD_JUMP_TABLE_LINK): And here.
2434 * tekhex.c (tekhex_bfd_link_just_syms): Define.
2435 * versados.c (versados_bfd_link_just_syms): Define.
2436 * vms.c (vms_bfd_link_just_syms): Define.
2437 * libbfd.h: Regenerate.
2438 * bfd-in2.h: Regenerate.
2439
2440 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2441
2442 * elf32-mips.c: Remove superfluous definitions copied from
2443 elfxx-mips.c.
2444 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
2445 SGIish vectors to check the special case.
2446 (mips_elf_hi16_reloc): Fix comment.
2447 (mips_elf_got16_reloc): Likewise.
2448 (_bfd_mips_elf32_gprel16_reloc): Likewise.
2449 (elf_reloc_map): Code cleanup.
2450 (mips_reloc_map): Add comment.
2451 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
2452 (mips_elf32_rtype_to_howto): Likewise.
2453 (mips_elf32_discard_info): Likewise.
2454 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
2455 lead to IRIX compatibility now.
2456
2457 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2458
2459 * elfxx-mips.c: Call it IRIX, not Irix in comments.
2460
2461 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
2462
2463 * config.bfd (shle-*-netbsdelf*): Add target which includes
2464 sh64 support.
2465
2466 2002-05-13 David Edelsohn <edelsohn@gnu.org>
2467
2468 * configure.in: Revert 2002-04-07. Instead, auto-configure
2469 HAVE_ST_C_IMPL.
2470 * configure: Regenerate.
2471 * config.in: Regenerate.
2472 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
2473 or AIX_5_CORE.
2474
2475 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
2476
2477 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
2478 corefiles as well.2
2479 * configure: Regenerate.
2480
2481 2002-05-13 Alan Modra <amodra@bigpond.net.au>
2482
2483 * Makefile.am (install-data-local): Install headers to
2484 $(exec_prefix)/include.
2485 * Makefile.in: Regenerate.
2486
2487 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
2488 Daniel Jacobowitz <drow@mvista.com>
2489
2490 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
2491 map BFD_RELOC_RVA.
2492
2493 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
2494
2495 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
2496 hppa*-*-openbsd*): New targets.
2497 * configure.in (alpha*-*-openbsd*): Set COREFILE.
2498 * configure: Regenerate.
2499
2500 2002-05-10 Tom Rix <trix@redhat.com>
2501
2502 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
2503 xcoff64_ppc_relocate_section.
2504 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
2505 * libxcoff.h: Common xcoff_reloc_type function declaration.
2506
2507 2002-05-10 Alan Modra <amodra@bigpond.net.au>
2508
2509 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
2510 added in 2002-05-09 commit.
2511
2512 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
2513 don't look for stubs on all undefined syms.
2514
2515 2002-05-09 Alan Modra <amodra@bigpond.net.au>
2516
2517 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
2518 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
2519 pcrel_offset.
2520
2521 * elf32-i386.c (elf_howto_table): Comments.
2522 (elf_i386_relocate_section): Handle more relocs for relocatable
2523 linking and against SEC_MERGE sections.
2524
2525 2002-05-08 Alan Modra <amodra@bigpond.net.au>
2526
2527 * elf32-ppc.c (ppc_elf_create_got): New function.
2528 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
2529 _bfd_elf_create_dynamic_sections. Correct .plt flags.
2530 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
2531 _bfd_elf_create_got_section.
2532
2533 2002-05-07 Alan Modra <amodra@bigpond.net.au>
2534
2535 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
2536 * elfxx-target.h (elf_backend_rela_normal): Define.
2537 (elfNN_bed): Init rela_normal.
2538 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
2539 for section symbols here if rela_normal. Simplify abs section test.
2540 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
2541 return immediately. Remove code handling relocatable linking.
2542 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2543 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
2544 * elf32-i370.c (i370_elf_relocate_section): Likewise.
2545 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
2546 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2547 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2548 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
2549 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2550 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2551 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
2552 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2553 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2554 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2555 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2556 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
2557 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2558 * elf-m10200.c (elf_backend_rela_normal): Define.
2559 * elf-m10300.c (elf_backend_rela_normal): Define.
2560 * elf32-fr30.c (elf_backend_rela_normal): Define.
2561 * elf32-i370.c (elf_backend_rela_normal): Define.
2562 * elf32-i860.c (elf_backend_rela_normal): Define.
2563 * elf32-m68k.c (elf_backend_rela_normal): Define.
2564 * elf32-mcore.c (elf_backend_rela_normal): Define.
2565 * elf32-openrisc.c (elf_backend_rela_normal): Define.
2566 * elf32-ppc.c (elf_backend_rela_normal): Define.
2567 * elf32-s390.c (elf_backend_rela_normal): Define.
2568 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
2569 * elf64-ppc.c (elf_backend_rela_normal): Define.
2570 * elf64-s390.c (elf_backend_rela_normal): Define.
2571 * elf64-x86-64.c (elf_backend_rela_normal): Define.
2572 * elfxx-ia64.c (elf_backend_rela_normal): Define.
2573 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
2574 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
2575
2576 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
2577
2578 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
2579 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
2580
2581 2002-05-06 Alan Modra <amodra@bigpond.net.au>
2582
2583 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
2584 when not relocatable. Fix reloc_emitter call for K&R.
2585
2586 2002-05-04 Alan Modra <amodra@bigpond.net.au>
2587
2588 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
2589 reloading local sym addend mistakenly removed in 2002-05-01 change.
2590
2591 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
2592 (read_abbrevs): Change "offset" param to bfd_vma.
2593 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
2594 Change "abbrev_offset" to bfd_vma.
2595 (read_indirect_string): Use correct conversion chars in error
2596 message format string, cast bfd_vma's to unsigned long.
2597 (read_abbrevs): Likewise.
2598 (read_attribute_value): Likewise.
2599 (decode_line_info): Likewise.
2600 (scan_unit_for_functions): Likewise.
2601 (parse_comp_unit): Likewise.
2602
2603 2002-05-04 Tom Rix <trix@redhat.com>
2604
2605 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
2606 (coff_swap_reloc_out): Same.
2607 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
2608 (xcoff_swap_reloc_out): Same.
2609 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
2610 case some 16 bit relocs. Add reloc value to output.
2611 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
2612 R_RBR. Improve names.
2613 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
2614 (bfd_xcoff_backend_data): Update with new reloc swap names.
2615 (bfd_pmac_xcoff_backend_data) : Same.
2616 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
2617 (xcoff64_swap_reloc_out): Same.
2618 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
2619 R_POS. Add reloc value to output.
2620 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
2621 bit R_RBR. Improve names, masks.
2622 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
2623 (bfd_xcoff_backend_data): Update with new reloc swap names.
2624 (bfd_xcoff_aix5_backend_data) : Same.
2625
2626 2002-05-04 Alan Modra <amodra@bigpond.net.au>
2627
2628 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
2629 bfd_count top_index, input_list, all_local_syms.
2630 (elf32_hppa_setup_section_lists): New function, split from
2631 elf32_hppa_size_stubs.
2632 (elf32_hppa_next_input_section): Likewise.
2633 (group_sections): Likewise.
2634 (get_local_syms): Likewise.
2635 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
2636 stubs on undefined syms too.
2637 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
2638 Only access htab elf fields when we have an elf hash table.
2639 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
2640 (elf32_hppa_next_input_section): Declare.
2641
2642 2002-05-04 Bob Byrnes <byrnes@curl.com>
2643
2644 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
2645 _bfd_new_bfd.
2646
2647 2002-05-03 H.J. Lu (hjl@gnu.org)
2648
2649 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
2650 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
2651 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
2652 to hide a global symbol.
2653 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
2654 forced_local to true.
2655
2656 2002-05-02 Richard Henderson <rth@redhat.com>
2657
2658 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
2659 vs SHN_UNDEF to zero.
2660
2661 2002-05-02 Alan Modra <amodra@bigpond.net.au>
2662
2663 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
2664 16 bit reloc.
2665 <R_PPC64_SECTOFF_DS>: Likewise.
2666 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
2667 SECTOFF reloc.
2668 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
2669 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
2670 SECTOFF reloc.
2671
2672 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
2673 (ppc64_elf_ha_reloc): New function.
2674 (ppc64_elf_brtaken_reloc): New function.
2675 (ppc64_elf_sectoff_reloc): New function.
2676 (ppc64_elf_sectoff_ha_reloc): New function.
2677 (ppc64_elf_toc_reloc): New function.
2678 (ppc64_elf_toc_ha_reloc): New function.
2679 (ppc64_elf_toc64_reloc): New function.
2680 (ppc64_elf_unhandled_reloc): New function.
2681 (ppc64_elf_howto_raw): Use the above.
2682 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
2683 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
2684 <R_PPC64_SECTOFF_DS>: Likewise.
2685 (IS_ABSOLUTE_RELOC): Update.
2686 (struct ppc_link_hash_table): Add have_undefweak.
2687 (ppc64_elf_link_hash_table_create): Init.
2688 (func_desc_adjust): Set have_undefweak.
2689 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
2690 add the .sfpr blr when have_undefweak.
2691 (ppc64_elf_setup_section_lists): Check hash table flavour.
2692 (ppc64_elf_next_input_section): Move output_section->owner test to
2693 ppc64elf.em.
2694 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
2695 and relocatable test. Return TOCstart and don't set elf_gp.
2696 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
2697 offset calculation. Add assert on weak sym branch tweaks.
2698 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
2699 (ppc64_elf_toc): Declare.
2700 (ppc64_elf_next_input_section): Update.
2701
2702 2002-05-01 Alan Modra <amodra@bigpond.net.au>
2703
2704 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
2705 file_name.
2706
2707 2002-05-01 Alan Modra <amodra@bigpond.net.au>
2708
2709 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
2710 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
2711 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
2712 call branches. Correct undefined weak destination.
2713 (ppc64_elf_func_desc_adjust): Always create at least one blr in
2714 .sfpr, and correct case where either only savef* or restf* is
2715 needed.
2716
2717 Long branch stubs, multiple stub sections.
2718 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
2719 (ppc64_elf_next_input_section): Declare.
2720 * elf64-ppc.c: Move linker-only prototypes.
2721 (STUB_SUFFIX): Define.
2722 (enum ppc_stub_type): New.
2723 (struct ppc_stub_hash_entry): New.
2724 (struct ppc_branch_hash_entry): New.
2725 (struct ppc_link_hash_entry): Add stub_cache, oh.
2726 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
2727 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
2728 Rename plt_overflow to stub_error.
2729 (ppc_stub_hash_lookup): Define.
2730 (ppc_branch_hash_lookup): Define.
2731 (stub_hash_newfunc): New function.
2732 (branch_hash_newfunc): New function.
2733 (link_hash_newfunc): Init new fields.
2734 (ppc64_elf_link_hash_table_create): Likewise.
2735 (ppc64_elf_link_hash_table_free): New function.
2736 (ppc_stub_name): New function.
2737 (ppc_get_stub_entry): New function.
2738 (ppc_add_stub): New function.
2739 (create_linkage_sections): Use bfd_make_section_anyway. Create
2740 .branch_lt and .rela.branch_lt sections. Don't create .stub.
2741 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
2742 and set up for plt call stubs. Link func and func desc syms.
2743 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
2744 (func_desc_adjust): Avoid hash lookup when func desc sym available
2745 via shortcut, and set links when processing.
2746 (ppc64_elf_hide_symbol): Likewise.
2747 (allocate_dynrelocs): Don't allocate stub section here.
2748 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
2749 Remove sstub code.
2750 (ppc_type_of_stub): New function.
2751 (build_one_stub): Delete.
2752 (ppc_build_one_stub): New function.
2753 (ppc_size_one_stub): New function.
2754 (ppc64_elf_setup_section_lists): New function.
2755 (ppc64_elf_next_input_section): New function.
2756 (group_sections): New function.
2757 (get_local_syms): New function.
2758 (ppc64_elf_size_stubs): Rewrite.
2759 (ppc64_elf_build_stubs): Rewrite.
2760 (ppc64_elf_relocate_section): Look up stub entry for REL24
2761 relocs. Don't propagate REL14* to dynamic objects. Look for long
2762 branch stubs if REL14* or REL24 relocs won't reach.
2763 (bfd_elf64_bfd_link_hash_table_free): Define.
2764
2765 2002-04-30 Mark Mitchell <mark@codesourcery.com>
2766
2767 * config.bfd: Add support for powerpc-*-windiss.
2768
2769 2002-04-30 Tom Rix <trix@redhat.com>
2770
2771 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
2772 symbol names into the hash table.
2773
2774 2002-04-28 Tom Rix <trix@redhat.com>
2775
2776 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
2777 calulating relocations.
2778 (xcoff_complain_overflow) : Function table for relocation errors.
2779 (xcoff_ppc_relocate_section): Use relocation and complain function
2780 tables.
2781 (xcoff_complain_overflow_unsigned_func): New complain function.
2782 (xcoff_complain_overflow_signed_func): Same.
2783 (xcoff_complain_overflow_bitfield_func): Same.
2784 (xcoff_complain_overflow_dont_func): Same.
2785 (xcoff_reloc_type_crel): New recot function.
2786 (xcoff_reloc_type_br): Same.
2787 (xcoff_reloc_type_ba): Same.
2788 (xcoff_reloc_type_toc): Same.
2789 (xcoff_reloc_type_rel): Same.
2790 (xcoff_reloc_type_neg): Same.
2791 (xcoff_reloc_type_pos): Same.
2792 (xcoff_reloc_type_fail): Same.
2793 (xcoff_reloc_type_noop): Same.
2794 * libxcoff.h : Declare common parts for xcoff64.
2795 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
2796 and complain function tables.
2797
2798 2002-04-28 Alan Modra <amodra@bigpond.net.au>
2799
2800 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
2801 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
2802
2803 2002-04-26 Alan Modra <amodra@bigpond.net.au>
2804
2805 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
2806 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
2807
2808 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
2809 same as the output before calling elf_link_input_bfd.
2810
2811 * coffcode.h (coff_compute_section_file_positions): Set
2812 section_tail after shuffling section list.
2813
2814 2002-04-24 Christian Groessler <chris@groessler.org>
2815
2816 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
2817 addresses are 23bit with a special layout, not plain 32bit
2818 values. Prevent relocation of immediate values.
2819
2820 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
2821
2822 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
2823 MIPS-16 ASE flags are set, print something to indicate that.
2824
2825 2002-04-23 Alan Modra <amodra@bigpond.net.au>
2826
2827 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
2828 under which a plt call stub is used.
2829 (final_link_relocate): Similarly.
2830 (allocate_plt_static): Clear h-plabel except when plt entry is
2831 exclusively used for a plabel.
2832 (allocate_dynrelocs): Use the above to simplify plt sizing.
2833 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
2834 (elf32_hppa_link_hash_table_create): Init.
2835 (BL22_RP): Define.
2836 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
2837 (elf32_hppa_check_relocs): Set has_22bit_branch.
2838
2839 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
2840 (final_link_relocate): Likewise.
2841
2842 2002-04-22 Jakub Jelinek <jakub@redhat.com>
2843
2844 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
2845 search table if some FDE is DW_EH_PE_aligned encoded either.
2846 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
2847
2848 2002-04-22 Richard Smith <richard@ex-parrot.com>
2849 Jakub Jelinek <jakub@redhat.com>
2850
2851 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
2852 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
2853 encoded personality.
2854 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
2855 for CIE/FDE removal.
2856
2857 2002-04-20 Tom Rix <trix@redhat.com>
2858
2859 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
2860
2861 2002-04-20 Alan Modra <amodra@bigpond.net.au>
2862
2863 * archures.c (bfd_lookup_arch): Move the list order comment..
2864 (struct bfd_arch_info): ..to where it belongs.
2865 * bfd-in2.h: Regenerate.
2866
2867 * archures.c (bfd_lookup_arch): Add comment on list order.
2868 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
2869 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
2870 is always at head of list.
2871
2872 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
2873
2874 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
2875 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
2876 definition of these functions for ARM_WINCE builds as they are
2877 not used.
2878 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
2879 for ARM_WINCE builds.
2880
2881 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
2882
2883 * coff-arm.c (bfd_arm_process_before_allocation):
2884
2885 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
2886
2887 * cpu-sh.c (scan_mach): Delete.
2888 (arch_info_struct): Replace scan_mach with bfd_default_scan.
2889 (bfd_sh_arch): Likewise.
2890
2891 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
2892
2893 * ihex.c (ihex_write_object_contents): Fix check for records
2894 crossing 64K boundaries.
2895
2896 2002-04-16 Alan Modra <amodra@bigpond.net.au>
2897
2898 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
2899 type rather than just assuming entries are ELF.
2900 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
2901 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
2902 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
2903 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
2904 rather than elf_link_hash_entry.
2905
2906 2002-04-15 Richard Henderson <rth@redhat.com>
2907
2908 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
2909 n32 binaries.
2910
2911 2002-04-15 Michael Snyder <msnyder@redhat.com>
2912
2913 * opncls.c (bfd_close): Write contents if writeable.
2914 Minor formatting tidy-ups.
2915
2916 2002-04-15 Alan Modra <amodra@bigpond.net.au>
2917
2918 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
2919
2920 2002-04-12 Michael Snyder <msnyder@redhat.com>
2921
2922 * bfd-in.h (bfd_get_section_lma): New access macro.
2923 Minor white-space fix-up.
2924
2925 2002-04-12 Alan Modra <amodra@bigpond.net.au>
2926
2927 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
2928 header pad.
2929
2930 2002-04-09 DJ Delorie <dj@redhat.com>
2931
2932 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
2933
2934 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
2935
2936 * coffcode.h (coff_read_word): New.
2937 (coff_compute_checksum): New.
2938 (coff_apply_checksum): New.
2939 (coff_write_object_contents): Call coff_apply_checksum () to
2940 apply checksum to PE image.
2941
2942 2002-04-08 Randolph Chung <tausq@debian.org>
2943
2944 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
2945 (elf32_hppa_final_link): Split out sorting logic to..
2946 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
2947 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
2948
2949 2002-04-07 Andrew Cagney <ac131313@redhat.com>
2950
2951 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
2952 pattern.
2953 * configure: Re-generate.
2954
2955 2002-04-07 Andrew Cagney <ac131313@redhat.com>
2956
2957 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
2958 is greater or equal to 4.3.3.
2959 * configure: Regenerate.
2960 Fix PR gdb/344.
2961
2962 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
2963
2964 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
2965 R_CRIS_32_PCREL>: Fix typo in name.
2966 (cris_elf_check_relocs): Always create .rela.got here when
2967 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
2968 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
2969 assume it's created.
2970
2971 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
2972
2973 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
2974 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
2975 define.
2976 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
2977 * bfd.c (bfd_link_hash_table_free): Define.
2978 * binary.c (binary_bfd_link_hash_table_free): Define.
2979 * bout.c (b_out_bfd_link_hash_table_free): Define.
2980 * coff-rs6000.c (rs6000coff_vec): Include
2981 _bfd_generic_link_hash_table_free.
2982 (pmac_xcoff_vec): Likewise.
2983 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
2984 (aix5coff64_vec): Likewise.
2985 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
2986 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
2987 (bfd_elf32_bfd_link_hash_table_free): Define.
2988 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
2989 (bfd_elf32_bfd_link_hash_table_free): Define.
2990 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
2991 define.
2992 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
2993 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
2994 * ieee.c (ieee_bfd_link_hash_table_free): Define.
2995 * ihex.c (ihex_bfd_link_hash_table_free): Define.
2996 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
2997 (_bfd_generic_link_hash_table_free): Add prototype.
2998 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
2999 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
3000 * linker.c (_bfd_generic_link_hash_table_free): New function.
3001 * mmo.c (mmo_bfd_link_hash_table_free): Define.
3002 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
3003 * oasys.c (oasys_bfd_link_hash_table_free): Define.
3004 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
3005 * som.c (som_bfd_link_hash_table_free): Define.
3006 * srec.c (srec_bfd_link_hash_table_free): Define.
3007 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
3008 * versados.c (versados_bfd_link_hash_table_free): Define.
3009 * vms.c (vms_bfd_link_hash_table_free): New function.
3010 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
3011
3012 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
3013 instead of bfd_alloc.
3014 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
3015 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
3016 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
3017 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
3018 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
3019 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
3020 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
3021 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
3022 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
3023 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
3024 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
3025 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
3026 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
3027 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
3028 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
3029 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
3030 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
3031 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
3032 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
3033 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
3034 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
3035 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
3036 * m68klinux.c (linux_link_hash_table_create): Likewise.
3037 * sparclinux.c (linux_link_hash_table_create): Likewise.
3038 * sunos.c (sunos_link_hash_table_create): Likewise.
3039 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
3040
3041 * targets.c: Add _bfd_link_hash_table_free to xvec.
3042
3043 * bfd-in2.h: Regenerate.
3044 * libbfd.h: Regenerate.
3045 * libcoff.h: Regenerate.
3046
3047 2002-04-04 Alan Modra <amodra@bigpond.net.au>
3048
3049 * dep-in.sed: Cope with absolute paths.
3050 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
3051 Run "make dep-am".
3052 * Makefile.in: Regenerate.
3053 * coff-arm.c: Fix copyright date.
3054 * cpu-h8300.c: Likewise.
3055 * cpu-i370.c: Likewise.
3056 * cpu-s390.c: Likewise.
3057 * cpu-mips.c: Likewise.
3058 * po/SRC-POTFILES.in: Regenerate.
3059
3060 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3061
3062 * Makefile.am: Add elfxx-mips.c to the known backends.
3063 (elf32-mips.lo): remove dependency to coff/external.h.
3064 * Makefile.in: Regenerate.
3065 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
3066 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
3067 accordingly.
3068 * configure: Regenerate.
3069 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
3070 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
3071 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
3072 MIPS specific backend functions.
3073 * elf32-mips.c: Moved most code to elfxx-mips.c.
3074 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
3075 static.
3076 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
3077 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
3078 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
3079 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
3080 interface to allow selection of the right REL or RELA howto table.
3081 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
3082 static. Let it refuse n32 objects.
3083 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
3084 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
3085 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
3086 (elf32_mips_ignore_discarded_relocs): Rename from
3087 _bfd_elf32_mips_ignore_discarded_relocs.
3088 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
3089 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
3090 (elf_mips_howto_table_rela): Remove.
3091 * elf64-mips.c: Moved most code to elfxx-mips.c.
3092 (bfd_elf64_bfd_reloc_type_lookup): Make static.
3093 (mips_elf64_rtype_to_howto): New function.
3094 (mips_elf64_object_p): Likewise.
3095 (elf64_mips_irix_compat): Likewise.
3096 * elfxx-mips.c: New file containing common code merged together from
3097 elf32-mips.c and elf64-mips.c.
3098 * elfxx-mips.h: New file containing MIPS specific prototypes from
3099 elf-bfd.h.
3100 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
3101 elf_backend_mips_rtype_to_howto.
3102
3103 2002-04-04 Alan Modra <amodra@bigpond.net.au>
3104
3105 * srec.c (MAXCHUNK, Chunk): Revise comments.
3106 (srec_write_record): Correct buffer size.
3107 (srec_write_header): Do without intermediate buffer.
3108 (srec_write_section): Validate Chunk.
3109 (srec_write_terminator): Pass NULL instead of dummy buffer.
3110 (srec_write_symbols): Pass file and symbol names directly to
3111 bfd_bwrite so sprintf won't overflow buffer.
3112
3113 2002-04-03 Jakub Jelinek <jakub@redhat.com>
3114
3115 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
3116 PC relative relocs against hidden symbols.
3117 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3118
3119 2002-04-03 Alan Modra <amodra@bigpond.net.au>
3120
3121 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
3122 LMAs, loop over segments until p_vaddr and p_memsz specify an
3123 extent enclosing the section.
3124
3125 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
3126
3127 * ihex.c (ihex_write_object_contents): Do not allow records to
3128 cross a 64K boundary - wrap if necessary.
3129
3130 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
3131
3132 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
3133 which caused the returned LWP ID to always be 0.
3134
3135 2002-04-01 Richard Henderson <rth@redhat.com>
3136
3137 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
3138 (elf32_sparc_relocate_section): Use it to figure out when to
3139 initialize .got entries.
3140 * elf64-sparc.c: Similarly.
3141
3142 2002-03-28 Alan Modra <amodra@bigpond.net.au>
3143
3144 * linker.c (link_action): Ignore duplicate warning syms.
3145 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
3146 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
3147 (elf_adjust_dynamic_symbol): Likewise.
3148 (elf_export_symbol): Likewise.
3149 (elf_link_find_version_dependencies): Likewise.
3150 (elf_link_assign_sym_version): Likewise.
3151 (elf_link_sec_merge_syms): Likewise.
3152 (elf_link_output_extsym): Likewise.
3153 (elf_gc_sweep_symbol): Likewise.
3154 (elf_gc_propagate_vtable_entries_used): Likewise.
3155 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3156 (elf_gc_allocate_got_offsets): Likewise.
3157 (elf_collect_hash_codes): Likewise.
3158 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
3159 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
3160 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
3161 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
3162 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
3163 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
3164 (elf_cris_discard_excess_dso_dynamics): Likewise.
3165 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
3166 (mark_PIC_calls): Likewise.
3167 (allocate_plt_static): Likewise.
3168 (allocate_dynrelocs): Likewise.
3169 (readonly_dynrelocs): Likewise.
3170 * elf32-i386.c (allocate_dynrelocs): Likewise.
3171 (readonly_dynrelocs): Likewise.
3172 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
3173 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
3174 * elf32-mips.c (mips_elf_output_extsym): Likewise.
3175 (mips_elf_sort_hash_table_f): Likewise.
3176 (mips_elf_check_mips16_stubs): Likewise.
3177 * elf32-s390.c (allocate_dynrelocs): Likewise.
3178 (readonly_dynrelocs): Likewise.
3179 * elf32-sh.c (sh_elf_discard_copies): Likewise.
3180 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
3181 (xstormy16_relax_plt_realloc): Likewise.
3182 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
3183 (elf64_alpha_output_extsym): Likewise.
3184 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
3185 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
3186 (mips_elf64_check_mips16_stubs): Likewise.
3187 (mips_elf64_output_extsym): Likewise.
3188 * elf64-ppc.c (func_desc_adjust): Likewise.
3189 (allocate_dynrelocs): Likewise.
3190 (readonly_dynrelocs): Likewise.
3191 * elf64-s390.c (allocate_dynrelocs): Likewise.
3192 (readonly_dynrelocs): Likewise.
3193 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
3194 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
3195 (readonly_dynrelocs): Likewise.
3196 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
3197 * aoutx.h (aout_link_write_other_symbol): Likewise.
3198 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
3199 (_bfd_coff_write_global_sym): Likewise.
3200 * i386linux.c (linux_tally_symbols): Likewise.
3201 * m68klinux.c (linux_tally_symbols): Likewise.
3202 * sparclinux.c (linux_tally_symbols): Likewise.
3203 * pdp11.c (aout_link_write_other_symbol): Likewise.
3204 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
3205 * xcofflink.c (xcoff_build_ldsyms): Likewise.
3206 (xcoff_write_global_symbol): Likewise.
3207
3208 * cofflink.c (_bfd_coff_final_link): Formatting.
3209 * cpu-mips.c (mips_compatible): Make static, prototype.
3210 * elf32-i386.c (elf_i386_check_relocs): Formatting.
3211 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
3212 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
3213 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
3214 (mips_elf64_final_link): Likewise.
3215 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
3216 prototype.
3217
3218 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
3219
3220 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
3221 (SWAP_OUT_RELOC_OFFSET): Define.
3222
3223 2002-03-27 Gregory Steuck <greg@nest.cx>
3224
3225 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
3226 terminating NULL if empty symbol table.
3227 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
3228
3229 2002-03-26 H.J. Lu (hjl@gnu.org)
3230
3231 * elflink.h (elf_link_input_bfd): Revert the last change since
3232 the gcc exception handling isn't fixed yet.
3233
3234 2002-03-26 H.J. Lu (hjl@gnu.org)
3235
3236 * elflink.h (elf_link_input_bfd): Complain about relocations
3237 against local symbols in discarded sections.
3238
3239 2002-03-26 Alan Modra <amodra@bigpond.net.au>
3240
3241 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
3242
3243 2002-03-23 Alan Modra <amodra@bigpond.net.au>
3244
3245 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
3246 section file offset for !SEC_LOAD sections.
3247
3248 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
3249
3250 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
3251 <case R_ARM_GOT>): Handle relocations to Thumb functions.
3252
3253 2002-03-21 Alan Modra <amodra@bigpond.net.au>
3254
3255 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
3256 Whitespace changes.
3257 * archive.c: Update copyright date.
3258 * bfd-in2.h: Regenerate.
3259 * libbfd.h: Regenerate.
3260 * Makefile.am: Run "make dep-am"
3261 * Makefile.in: Regenerate.
3262 * po/SRC-POTFILES.in: Regenerate.
3263
3264 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
3265
3266 * dwarf2.c (struct funcinfo): Move up.
3267 (lookup_address_in_function_table): New argument function_ptr.
3268 Set it.
3269 (lookup_address_in_line_table): New argument function. If function
3270 is non-NULL, use it to handle ``addr'' before the first line note of
3271 the function.
3272 (comp_unit_find_nearest_line): Update and swap calls to
3273 lookup_address_in_function_table and lookup_address_in_line_table.
3274 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
3275 N_SLINE encountered if we see an N_FUN before any N_SLINE.
3276
3277 2002-03-20 Tom Rix <trix@redhat.com>
3278
3279 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
3280 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
3281 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
3282
3283 2002-03-19 Tom Rix <trix@redhat.com>
3284
3285 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
3286 dynamic objects in archives.
3287
3288 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
3289
3290 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
3291 STT_NOTYPE symbols to STT_OBJECT.
3292
3293 2002-03-18 Jan Hubicka <jh@suse.cz>
3294
3295 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
3296
3297 2002-03-18 Tom Rix <trix@redhat.com>
3298
3299 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
3300 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
3301 * coff-rs6000 (do_pad) : New function for archive padding.
3302 (do_copy) : New function for object file copying in archives.
3303 (do_shared_object_padding) : New function for padding shared
3304 objects to their text section alignment in archives.
3305 (bfd_xcoff_ar_achive_set_magic) : Stub.
3306 (xcoff_write_armap_big) : Use do_copy and do_pad.
3307 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
3308 do_copy and do_pad.
3309 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
3310 bfd_xcoff_magic_number.
3311 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
3312 fop.
3313 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
3314 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
3315 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
3316 * rs6000-core.c : Update copyright date.
3317 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
3318 csectpp.
3319 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
3320 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
3321 (coff_set_flags) : Use bfd_xcoff_magic_number.
3322 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
3323 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
3324 * Makefile.am : Same.
3325 * config.bfd : Same.
3326 * targets.c : Same.
3327 * configure : Regnerate.
3328 * Makefile.in : Same.
3329 * bfd-in2.h : Same.
3330
3331 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
3332
3333 * po/fr.po: Updated version.
3334
3335 2002-03-18 Alan Modra <amodra@bigpond.net.au>
3336
3337 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
3338 * libbfd.h: Regenerate.
3339 * archive.c (coff_write_armap): Pass on failures from
3340 bfd_write_bigendian_4byte_int.
3341
3342 2002-03-14 H.J. Lu <hjl@gnu.org>
3343
3344 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
3345 error to bfd_error_nonrepresentable_section for reinit_array
3346 section in DSO.
3347
3348 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
3349
3350 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
3351 OR it in rather than replacing previously selected flags.
3352
3353 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
3354 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
3355
3356 2002-03-14 Alan Modra <amodra@bigpond.net.au>
3357
3358 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
3359 (N): Use the above.
3360 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
3361 ensure reloc size matches before calling elf_link_input_bfd.
3362 Add an assert to check reloc size when counting output relocs.
3363
3364 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
3365
3366 * mmo.c (mmo_get_loc): Return NULL rather than false.
3367
3368 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
3369
3370 * po/fr.po: Updated version.
3371
3372 2002-03-13 Alan Modra <amodra@bigpond.net.au>
3373
3374 * archures.c (bfd_default_compatible): Test bits_per_word.
3375 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
3376 bfd_default_compatible.
3377 * cpu-i370.c (i370_compatible): Likewise.
3378 * cpu-sparc.c (sparc_compatible): Likewise.
3379 * cpu-h8300.c (compatible): Test in->arch == out->arch.
3380
3381 * elflink.h: Formatting fixes.
3382 (elf_link_output_extsym): Merge undefined and undef weak cases.
3383
3384 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
3385 when word size of input matches output word size.
3386
3387 2002-03-12 Andreas Jaeger <aj@suse.de>
3388
3389 * cpu-i386.c (i386_compatible): New. Use it instead of
3390 bfd_default_compatible.
3391
3392 2002-03-07 H.J. Lu (hjl@gnu.org)
3393
3394 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
3395 as the type for bfd_reloc_val.
3396
3397 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
3398
3399 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
3400 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
3401 (elf_hppa_final_link_relocate): Correct relocations for indirect
3402 references to local data through the DLT. Fix .opd creation for
3403 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
3404 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
3405 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
3406 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
3407 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
3408 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
3409 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
3410
3411 2002-03-05 Jakub Jelinek <jakub@redhat.com>
3412
3413 * merge.c (_bfd_merge_sections): Don't segfault if there
3414 is nothing to merge due to GC.
3415
3416 2002-03-05 Alan Modra <amodra@bigpond.net.au>
3417
3418 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
3419 symbols that have been forced local.
3420
3421 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
3422 to output forced local syms for non-shared link.
3423 (elf_link_output_extsym): Tweak condition for calling backend
3424 adjust_dynamic_symbol so that previous behaviour is kept.
3425 Whitespace changes throughout file.
3426
3427 2002-03-04 H.J. Lu <hjl@gnu.org>
3428
3429 * elf.c (bfd_section_from_shdr): Handle special sections,
3430 .init_array, .fini_array and .preinit_array.
3431 (elf_fake_sections): Likewise.
3432
3433 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
3434 DT entry only if the section is in output for .init_array,
3435 .fini_array and .preinit_array. Complain about .preinit_array
3436 section in DSO.
3437 (elf_bfd_final_link): Warn zero size for .init_array,
3438 .fini_array and .preinit_array sections.
3439
3440 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
3441 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
3442 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
3443 .preinit_array.
3444
3445 2002-03-04 Alan Modra <amodra@bigpond.net.au>
3446
3447 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
3448 * configure: Regenerate.
3449
3450 2002-03-02 Tom Rix <trix@redhat.com>
3451
3452 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
3453 symbolic equiv.
3454 * coff-rs6000.c (xcoff_howto_table): Same.
3455
3456 2002-03-01 David Mosberger <davidm@hpl.hp.com>
3457
3458 * elflink.h (size_dynamic_sections): If section named
3459 ".preinit_array" exists, create DT_PREINIT_ARRAY and
3460 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
3461 ".init_array" and ".fini_array".
3462 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
3463 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
3464 DT_FINI_ARRAY.
3465
3466 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
3467
3468 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
3469 dynsyms.
3470
3471 2002-02-25 Alan Modra <amodra@bigpond.net.au>
3472
3473 * elf64-hppa.h: Update copyright date.
3474
3475 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
3476 (ppc64_elf_relocate_section): Don't generate power4 style branch
3477 hints for *_BRTAKEN and *_BRNTAKEN relocs.
3478
3479 2002-02-22 Jakub Jelinek <jakub@redhat.com>
3480
3481 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
3482 last patch.
3483 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3484
3485 2002-02-21 Andreas Jaeger <aj@suse.de>
3486
3487 * elf64-x86-64.c: Major rework that introduces all recent changes
3488 to the x86-64 backend. Get a closer match to elf32-i386.
3489 (struct elf64_x86_64_dyn_relocs): Rename from
3490 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
3491 all users.
3492 (struct elf64_x86_64_link_hash_table): Add short cuts to some
3493 sections.
3494 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
3495 remove casts, initialize new hash members.
3496 (create_got_section): New.
3497 (elf64_x86_64_create_dynamic_sections): New.
3498 (elf64_x86_64_copy_indirect_symbol): New.
3499 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
3500 relocs, .got or .relgot here but do it in allocate_dynrelocs.
3501 Reference count possible .plt and .got entries. Don't test input
3502 section SEC_READONLY here to try to avoid copy relocs, and keep
3503 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
3504 DF_TEXTREL here. Delay setting of variables until needed. Cache
3505 pointer to "sreloc" section in elf_section_data. Tweak condition
3506 under which .got created. Report files with bad relocation
3507 section names.
3508 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
3509 Reference count possible .plt entries. Don't deallocate .got and
3510 .relgot space here.
3511 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
3512 do copy reloc processing for weakdefs. Remove redundant casts and
3513 aborts. Delay setting of vars until needed. Move creation of
3514 dynamic symbols and allocation of .plt and .rela.plt to
3515 allocate_dynrelocs. Replace BFD_ASSERT with abort.
3516 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
3517 (allocate_dynrelocs): New.
3518 (readonly_dynrelocs): New.
3519 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
3520 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
3521 Zero out the dynamic allocated content space.
3522 (elf64_x86_64_discard_copies): Removed.
3523 (elf64_x86_64_relocate_section): Make use of dynamic section
3524 short-cuts. Localise vars, and delay setting. Better error
3525 reporting, replace BFD_ASSERT with abort. Check
3526 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
3527 regular object file and tread the weak definition as the normal
3528 one. Don't discard relocs for undefweak or undefined symbols and
3529 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
3530 relocs.
3531 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
3532 symbols that have been forced local. Use same test to decide if
3533 we can use a relative reloc for got as relocate_section. Expand
3534 SHN_UNDEF comment. Move expressions out of function calls.
3535 Replace BFD_ASSERT with abort.
3536 (bfd_elf64_bfd_final_link): Removed.
3537 (elf_backend_copy_indirect_symbol): Define.
3538
3539 2002-02-20 Tom Rix <trix@redhat.com>
3540
3541 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
3542 (_bfd_xcoff_reloc_type_lookup): Use it.
3543 * coff64-rs6000.c (xcoff64_howto_table): Same.
3544 (xcoff64_reloc_type_lookup): Same.
3545
3546 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
3547
3548 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
3549 little endian.
3550
3551 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
3552
3553 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
3554 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
3555 * bfd-in2.h: Regenerate.
3556 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
3557 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
3558 with "s390:64-bit".
3559 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
3560 (elf_s390_reloc_type_lookup): Likewise.
3561 (elf_s390_check_relocs): Likewise.
3562 (elf_s390_gc_sweep_hook): Likewise.
3563 (elf_s390_relocate_section): Likewise.
3564 (elf_s390_object_p): Use renamed architecture define.
3565 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
3566
3567 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
3568
3569 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
3570
3571 2002-02-19 Jakub Jelinek <jakub@redhat.com>
3572
3573 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
3574 absptr -> pcrel optimization for shared libs.
3575 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
3576 library cannot be converted to pcrel.
3577 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
3578 relative.
3579 * elf32-i386.c (elf_i386_relocate_section): If
3580 _bfd_elf_section_offset returned -2, skip, but make sure the
3581 relocation is installed.
3582 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
3583 * elf32-cris.c (cris_elf_relocate_section): Likewise.
3584 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3585 * elf32-i370.c (i370_elf_relocate_section): Likewise.
3586 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3587 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3588 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3589 * elf32-sh.c (sh_elf_relocate_section): Likewise.
3590 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3591 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3592 * elf64-s390.c (elf_s390_relocate_section): Likewise.
3593 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
3594 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3595 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3596 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
3597 _bfd_elf_section_offset returning -2 the same way as -1.
3598 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
3599 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
3600 and BFD_ASSERT.
3601 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
3602
3603 2002-02-18 Tom Rix <trix@redhat.com>
3604
3605 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
3606 (bfd_xcoff_size_dynamic_sections): Same.
3607 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
3608 (bfd_xcoff_size_dynamic_sections): Same.
3609 * coff-rs6000.c (xcoff_generate_rtinit): Same.
3610 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
3611 * libxcoff.h (struct xcoff_backend_data_rec): Same.
3612 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
3613 * bfd-in2.h: Regenerate.
3614
3615 2002-02-18 Alan Modra <amodra@bigpond.net.au>
3616
3617 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
3618 (struct ppc_link_hash_table): Add sfpr.
3619 (ppc64_elf_link_hash_table_create): Init it.
3620 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
3621 .glink out to..
3622 (create_linkage_sections): ..here. Make .sfpr too.
3623 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
3624 dynobj early.
3625 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
3626 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
3627 ._restf* functions, and create as needed.
3628 (func_desc_adjust): Only force_local for shared libs.
3629
3630 2002-02-18 David O'Brien <obrien@FreeBSD.org>
3631
3632 * configure.in: Bump version number post 2.12 branching.
3633 * configure: Regenerate.
3634
3635 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
3636
3637 * mmo.c: Correct and improve comments.
3638 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
3639 zero-pad. Use input to fill up non-empty bfd buffer.
3640 (mmo_flush_chunk): New function.
3641 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
3642 changed. Don't emit location specifier if VMA is same as
3643 *LAST_VMAP after omitting leading zero contents. Call
3644 mmo_flush_chunk before emitting location specifier.
3645 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
3646 with mmo_write_loc_chunk calls.
3647 (mmo_internal_write_section): Call mmo_flush_chunk after
3648 mmo_write_chunk.
3649 (mmo_write_symbols_and_terminator): Move :Main to first position
3650 in symbol array. Add faked one if it does not exist if there are
3651 other symbols. Don't add it if there are no symbols at all. Move
3652 out test for value of :Main from symbol loop. Rename table
3653 fakemain to maintable and variable mainsym to fakemain.
3654
3655 2002-02-15 Richard Henderson <rth@redhat.com>
3656
3657 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
3658 section with no got matches any got. Simplify error generaion.
3659
3660 2002-02-15 Alan Modra <amodra@bigpond.net.au>
3661
3662 Support arbitrary length fill patterns.
3663 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
3664 (_bfd_default_link_order): Remove bfd_fill_link_order code.
3665 Call default_data_link_order.
3666 (default_fill_link_order): Delete.
3667 (default_data_link_order): New function.
3668 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
3669 of bfd_fill_link_order with bfd_data_link_order.
3670 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
3671 * elf64-mips.c (mips_elf64_final_link): Likewise.
3672
3673 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
3674 Correct value returned in "end" for "0x<non-hex>".
3675
3676 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
3677
3678 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
3679 (scan): Test against 'mach' field in info structure.
3680
3681 2002-02-14 Alan Modra <amodra@bigpond.net.au>
3682
3683 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
3684
3685 2002-02-14 Matt Fredette <fredette@netbsd.org>
3686
3687 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
3688 EF_M68000.
3689
3690 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
3691
3692 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
3693 non-zero physical addresses when adjusting the LMAs of new
3694 sections.
3695
3696 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
3697
3698 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
3699 from _bfd_elf_hppa_gen_reloc_type.
3700 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
3701 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
3702 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
3703 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
3704
3705 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
3706
3707 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
3708 loading its contents if there's nothing to do in it.
3709
3710 2002-02-12 Alan Modra <amodra@bigpond.net.au>
3711
3712 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
3713 64k boundary.
3714
3715 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
3716 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
3717 (ppc64_elf_finish_dynamic_sections): Set values for them.
3718
3719 2002-02-11 Michael Snyder <msnyder@redhat.com>
3720
3721 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
3722 * elf.c (elfcore_grok_pstatus): Add prototype.
3723 (elfcore_grok_lwpstatus): Add prototype.
3724 (elfcore_write_lwpstatus): New function.
3725 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
3726
3727 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
3728
3729 * elf32-sh.c: Added missing prototypes.
3730 * elf32-sh64.c: Likewise.
3731 (sh_elf_align_loads): Mark unused args as such.
3732 * elf64-sh64.c: Added missing prototypes.
3733 (struct elf_sh64_link_hash_entry): Fix typo.
3734 (sh_elf64_relocate_section): Fix info argument passed to
3735 _bfd_elf_section_offset.
3736
3737 2002-02-11 Alan Modra <amodra@bigpond.net.au>
3738
3739 * Makefile.am: "make dep-am".
3740 * Makefile.in: Regenerate.
3741 * aclocal.m4: Regenerate.
3742 * config.in: Regenerate.
3743 * configure: Regenerate.
3744
3745 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
3746
3747 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
3748 variable warnings.
3749 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
3750 comparison warning.
3751 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
3752 cast warnings for the common case.
3753
3754 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
3755
3756 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
3757 vectors.
3758 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
3759 vectors.
3760
3761 2002-02-09 Richard Henderson <rth@redhat.com>
3762
3763 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
3764 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
3765 (elf64_alpha_relocate_section): Likewise.
3766 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
3767 * bfd-in2.h, libbfd.h: Rebuild.
3768
3769 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
3770
3771 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
3772 that base-plus-offset reloc accounting is consistent.
3773 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
3774 up to date for undefined symbols.
3775
3776 2002-02-08 Eric Christopher <echristo@redhat.com>
3777
3778 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3779
3780 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
3781 sections for the O32 ABI.
3782
3783 2002-02-08 Chris Demetriou <cgd@broadcom.com>
3784
3785 * elf32-arm.h: Fix formatting of _("...").
3786 * elf32-d10v.c: Likewise.
3787 * elf32-m68k.c: Likewise.
3788 * elf32-mips.c: Likewise.
3789
3790 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
3791
3792 * coff-or32.c: Fix compile time warning messages.
3793
3794 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
3795
3796 Contribute sh64-elf.
3797 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
3798 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
3799 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
3800 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
3801 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
3802 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
3803 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
3804 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
3805 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
3806 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
3807 New relocs.
3808 * libbfd.h, bfd-in2.h: Rebuilt.
3809 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
3810 (sh_reloc_map): Map them.
3811 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
3812 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
3813 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
3814 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
3815 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
3816 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
3817 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
3818 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
3819 datalabel_got_offset.
3820 (sh_elf_link_hash_newfunc): Initialize it.
3821 (sh_elf_relocate_section): Augment the scope of
3822 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
3823 GOT and GOTOFF handling to new SHmedia relocation types. Support
3824 GOT_BIAS.
3825 (sh_elf_check_relocs): Likewise.
3826 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
3827 PLT entries using movi_shori_putval. Support GOT_BIAS.
3828 (sh_elf_finish_dynamic_sections): Likewise.
3829 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
3830 relocation, it's now done by the caller.
3831 (GOT_BIAS): New.
3832 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
3833 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
3834 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
3835 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
3836 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
3837 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
3838 sh64_elf64_hash_table): New.
3839 (sh_elf64_howto_table): Introduce new relocs.
3840 (sh_elf64_info_to_howto): Accept new PIC relocs.
3841 (sh_elf64_relocate_section): Augment the scope of
3842 seen_stt_datalabel. Support new PIC relocs.
3843 (sh_elf64_check_relocs): Support new PIC relocs.
3844 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
3845 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
3846 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
3847 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
3848 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
3849 movi_shori_putval, movi_3shori_putval,
3850 sh64_elf64_create_dynamic_sections,
3851 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
3852 sh64_elf64_size_dynamic_sections,
3853 sh64_elf64_finish_dynamic_symbol,
3854 sh64_elf64_finish_dynamic_sections): New.
3855 (elf_backend_create_dynamic-sections,
3856 bfd_elf64_bfd_link_hash_table_create,
3857 elf_backend_adjust_dynamic_symbol,
3858 elf_backend_size_dynamic_sections,
3859 elf_backend_finish_dynamic_symbol,
3860 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
3861 elf_backend_plt_readonly, elf_backend_want_plt_sym,
3862 elf_backend_got_header_size, elf_backend_plt_header_size):
3863 Define.
3864 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
3865 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
3866 match official numbers and names; moved unmaching ones to the
3867 range 0xf2-0xff.
3868 * elf32-sh64.c, elf64-sh64.c: Likewise.
3869 2001-03-12 DJ Delorie <dj@redhat.com>
3870 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
3871 sections.
3872 2001-03-12 DJ Delorie <dj@redhat.com>
3873 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
3874 be aligned.
3875 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
3876 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
3877 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
3878 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
3879 .cranges section with SEC_SORT_ENTRIES set.
3880 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
3881 incoming sorted .cranges section.
3882 (sh64_bfd_elf_copy_private_section_data): New.
3883 (sh64_elf_final_write_processing): Only sort .cranges and modify
3884 start address if called by linker.
3885 2001-01-08 Ben Elliston <bje@redhat.com>
3886 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
3887 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
3888 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
3889 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
3890 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
3891 line. Add comments before all entries.
3892 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
3893 comment.
3894 (sh_elf64_reloc): Correct head comment.
3895 (sh_elf64_relocate_section): Correct spacing.
3896 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
3897 instead call reloc_dangerous callback.
3898 <case R_SH_SHMEDIA_CODE>: New case.
3899 (sh_elf64_gc_mark_hook): Correct spacing.
3900 (sh_elf64_check_relocs): Ditto.
3901 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
3902 New case.
3903 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
3904 functions.
3905 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
3906 clarify describing comment. Add comments before all entries.
3907 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
3908 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
3909 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
3910 Sort .cranges section in final link. Prepare to set bit 0 on
3911 entry address.
3912 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
3913 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
3914 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
3915 .cranges section.
3916 (sh64_backend_section_from_shdr): New, to recognize
3917 SHT_SH5_CR_SORTED on incoming .cranges section.
3918 (elf_backend_section_from_shdr): Define.
3919 (sh64_elf_final_write_processing): Sort outgoing .cranges
3920 section. (New, temporarily disabled:) Set bit 0 on entry address
3921 according to ISA type.
3922 (sh64_find_section_for_address): New.
3923 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
3924 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
3925 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
3926 bfd_malloc, not xmalloc.
3927 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
3928 global.
3929 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
3930 temporarily disabled) setting bit 0 on entry address.
3931 (elf_backend_final_write_processing): Define.
3932 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
3933 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
3934 be a proper relocation for PTA and PTB rather than a marker.
3935 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
3936 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
3937 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
3938 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
3939 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
3940 Zero src_mask.
3941 * elf64-sh64.c: Ditto.
3942 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
3943 * elf32-sh64.c: Include opcodes/sh64-opc.h
3944 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
3945 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
3946 parameters. No unused parameters. Caller changed.
3947 <case R_SH_PT_16>: New case.
3948 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
3949 * Makefile.in: Regenerate.
3950 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
3951 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
3952 all code sections.
3953 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
3954 (sh64_elf_merge_private_data): Ditto.
3955 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
3956 to access stored section flags.
3957 (sh64_elf_final_write_processing): Return immediately unless
3958 called by linker. Use sh64_elf_section_data (cranges) to get size
3959 of linker-generated cranges entries.
3960 (sh64_elf_copy_private_data): Add missing "return true".
3961 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
3962 (sh_elf64_merge_private_data): Ditto.
3963 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
3964 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
3965 elf64-sh64.c:sh64_elf_fake_sections.
3966 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
3967 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
3968 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
3969 (sh64_elf_final_write_processing): New.
3970 (elf_backend_final_write_processing): Define.
3971 (sh64_elf_fake_sections): Get header flags from tdata field.
3972 (sh64_elf_copy_private_data): Do not call
3973 sh64_elf_copy_private_data_internal, just copy e_flags field.
3974 (sh64_elf_merge_private_data): Do not call
3975 sh64_elf_copy_private_data_internal.
3976 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
3977 Remove EF_SH64_ABI64, let ELF size make difference.
3978 Remove SH64-specific BFD section flag.
3979 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
3980 containing SHmedia through elf_section_data (asect)->tdata
3981 non-zero, not using a BFD section flag.
3982 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
3983 (sh64_elf_merge_private_data): Similar.
3984 (elf_backend_section_flags): Don't define.
3985 (sh64_elf_backend_section_flags): Delete.
3986 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
3987 not EF_SH64_ABI64.
3988 (sh_elf64_merge_private_data): Similar.
3989 * section.c (Section flags definitions): Don't define
3990 SEC_SH_ISA_SHMEDIA.
3991 (bfd-in2.h): Regenerate.
3992 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
3993 Make DataLabel references work with partial linking.
3994 * elf32-sh64.c: Fix formatting.
3995 (sh64_elf_link_output_symbol_hook): New.
3996 (elf_backend_link_output_symbol_hook): Define to
3997 sh64_elf_link_output_symbol_hook.
3998 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
3999 undefined if partial linking. Adjust sanity check.
4000 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
4001 (elf_backend_link_output_symbol_hook): Define to
4002 sh64_elf64_link_output_symbol_hook.
4003 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
4004 undefined if partial linking. Adjust sanity check.
4005 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
4006 Implement semantics for inter-file DataLabel references.
4007 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
4008 (sh64_elf64_add_symbol_hook): New.
4009 (sh_elf64_relocate_section): If passing an indirect symbol with
4010 st_type STT_DATALABEL on the way to a symbol with st_other
4011 STO_SH5_ISA32, do not bitor 1 to the relocation.
4012 (elf_backend_add_symbol_hook): Define to
4013 sh64_elf64_add_symbol_hook.
4014 * elf64-sh32.c: Tweak comments.
4015 (DATALABEL_SUFFIX): Define.
4016 (sh64_elf_add_symbol_hook): New.
4017 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
4018 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
4019 symbol with st_type STT_DATALABEL on the way to a symbol with
4020 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
4021 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
4022 Pass through STT_DATALABEL.
4023 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
4024 (elf_backend_get_symbol_type): Define.
4025 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
4026 (elf_backend_get_symbol_type): Define.
4027 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
4028 * elf32-sh64.c: Tweak comments.
4029 (sh64_elf_copy_private_data_internal): Add prototype.
4030 (bfd_elf32_bfd_set_private_flags): Define.
4031 (sh64_elf_copy_private_data_internal): Compare machine name, not
4032 textual BFD target name, to check whether to copy section flag
4033 SHF_SH5_ISA32.
4034 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
4035 Tweak section-contents-type-mismatch message.
4036 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
4037 Validize reloc-types.
4038 * elf64-sh64.c: New file.
4039 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
4040 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
4041 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
4042 Regenerate dependencies.
4043 * Makefile.in: Regenerate.
4044 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
4045 bfd_elf64_sh64l_vec.
4046 * configure.in: Handle bfd_elf64_sh64_vec and
4047 bfd_elf64_sh64l_vec.
4048 * configure: Regenerate.
4049 * po/POTFILES.in: Regenerate.
4050 * po/bfd.pot: Regenerate.
4051 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
4052 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
4053 anything else but EF_SH64 and EF_SH64_ABI64.
4054 (sh64_elf_merge_private_data): Emit error for anything else but
4055 EF_SH64 and EF_SH64_ABI64.
4056 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
4057 from targ_selvecs.
4058 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
4059 bfd_elf32_sh64l_vec as a temporary measure.
4060 * configure: Regenerate.
4061 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
4062 * cpu-sh.c (arch_info_struct): Include sh5 item
4063 unconditionalized.
4064 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
4065 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
4066 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
4067 * elf32-sh64.c: Tweak comments.
4068 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
4069 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
4070 (sh64_elf_copy_private_data_internal): Wrap long line.
4071 (sh64_elf_merge_private_data): Rewrite to allow objects from
4072 SH64 subsets to be linked together.
4073 (INCLUDE_SHMEDIA): Define.
4074 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
4075 Parenthesize plus-expression inside or-expression.
4076 <global symbol>: Ditto.
4077 (sh_elf_set_mach_from_flags): Remove code refusing
4078 deleted EF_SH64_32BIT_ABI flag.
4079 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
4080 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
4081 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
4082 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
4083 (sh_elf_relocate_section) <local symbol>: Or 1 in
4084 calculation of relocation if sym->st_other & STO_SH5_ISA32.
4085 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
4086 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
4087 relocation.
4088 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
4089 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
4090 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
4091 Regenerate dependencies.
4092 * Makefile.in: Regenerate.
4093 * archures.c: Add bfd_mach_sh5.
4094 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
4095 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
4096 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
4097 * configure: Regenerate.
4098 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
4099 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
4100 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
4101 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
4102 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
4103 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
4104 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
4105 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
4106 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
4107 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
4108 in item for SH5.
4109 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
4110 for SHmedia relocs.
4111 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
4112 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
4113 shmedia_prepare_reloc, goto final_link_relocate if it returns
4114 non-zero, else fail as before.
4115 (sh_elf_set_mach_from_flags): Provide function only if not defined
4116 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
4117 (sh_elf_set_private_flags): Provide function only if not defined
4118 as a macro.
4119 (sh_elf_copy_private_data): Similar.
4120 (sh_elf_merge_private_data): Similar.
4121 * section.c (SEC_SH_ISA_SHMEDIA): New.
4122 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
4123 * elf32-sh64.c: New file.
4124 * libbfd.h: Regenerate.
4125 * bfd-in2.h: Regenerate.
4126 * po/POTFILES.in: Regenerate.
4127 * po/bfd.pot: Regenerate.
4128 * bfd-in2.h: Regenerate.
4129 * libbfd.h: Regenerate.
4130
4131 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
4132
4133 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
4134 been included, not drag it in.
4135 * bfd-in2.h: Regenerate.
4136
4137 2002-02-06 H.J. Lu (hjl@gnu.org)
4138
4139 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
4140 the mach and ISA fields if necessary.
4141
4142 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
4143
4144 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
4145 ARM architecture when an F_ARM_5 flag is detected, since we cannot
4146 be sure exactly which architecture this represents.
4147
4148 2002-02-05 Nick Clifton <nickc@redhat.com>
4149
4150 * po/tr.po: Updated translation.
4151
4152 2002-02-05 Alan Modra <amodra@bigpond.net.au>
4153
4154 From Jimi X <jimix@watson.ibm.com>
4155 * archures (bfd_mach_ppc64): Define.
4156 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
4157 (bfd_powerpc_arch): Define.
4158 * bfd-in2.h: Regenerate.
4159 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
4160 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
4161 (bfd_powerpc_archs): Add default powerpc64 arch.
4162
4163 2002-02-05 Alan Modra <amodra@bigpond.net.au>
4164
4165 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
4166 against section syms in readonly sections. Don't do the global
4167 sym check if we find one.
4168 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
4169 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
4170 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
4171 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
4172 (elf_s390_grok_prstatus): Add missing prototype.
4173
4174 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
4175
4176 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
4177 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
4178 Call bfd_get_section_by_name only once. Initialize
4179 bpodata->n_bpo_relocs_this_section.
4180 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
4181 referring to DSOs.
4182 (bpo_reloc_request_sort_fn): Don't use difference of values as
4183 return-value.
4184
4185 2002-02-02 David O'Brien <obrien@FreeBSD>
4186
4187 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
4188 version 4.5 and later the same as 5-CURRENT.
4189 * configure: Re-generate.
4190
4191 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
4192
4193 * config.bfd (hppa*-*-netbsd*): New target.
4194
4195 2002-01-31 Philipp Thomas <pthomas@suse.de>
4196
4197 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
4198 to front of message. Unify messages with elf32-arm.h. Use
4199 commas where neccessary.
4200 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
4201 ERROR in messages. Unify messages with coff-arm.c. Correct
4202 VFP/FPA error message.
4203 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
4204 APCS-32 for translation.
4205
4206 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
4207
4208 Perform on-demand global register allocation from
4209 R_MMIX_BASE_PLUS_OFFSET relocs.
4210 * elf64-mmix.c (struct bpo_reloc_section_info, struct
4211 bpo_reloc_request, struct bpo_greg_section_info): New.
4212 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
4213 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
4214 _bfd_mmix_check_all_relocs,
4215 _bfd_mmix_prepare_linker_allocated_gregs,
4216 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
4217 (elf_mmix_howto_table): Correct src_mask for most relocs.
4218 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
4219 case.
4220 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
4221 case. Fix typo in comment. New label do_mmix_reloc.
4222 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
4223 store first object file with a base-plus-offset reloc. Call
4224 mmix_elf_check_common_relocs for the part common with mmo.
4225 (mmix_elf_final_link): Write out linker-allocated register
4226 contents section.
4227 (elf_backend_gc_sweep_hook): Define.
4228 (bfd_elf64_bfd_relax_section): Define.
4229
4230 * mmo.c: Don't include <ctype.h>
4231 (mmo_init): Correct init-once logic.
4232
4233 2002-02-01 Tom Rix <trix@redhat.com>
4234
4235 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
4236
4237 2002-02-01 Alan Modra <amodra@bigpond.net.au>
4238
4239 * Makefile.am: Run "make dep-am"
4240 * Makefile.in: Regenerate.
4241
4242 2002-01-31 David O'Brien <obrien@FreeBSD>
4243
4244 * configure.in: Recognize the differences in core files from FreeBSD
4245 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
4246 5-CURRENT.
4247 * configure: Regenerate.
4248
4249 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
4250
4251 * coff-or32.c: New file.
4252 * cpu-or32.c: New file.
4253 * elf32-or32.c: New file.
4254 * archures.c: Add support for or32.
4255 * targets.c: Add support for or32.
4256 * bfd-in2.h: Regenerate.
4257 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
4258 coff_write_object_contents): Add support for or32.
4259 * config.bfd: Add target.
4260 * configure.in: Add support for or32.
4261 * configure: Regenerate.
4262 * Makefile.am: Add support for or32.
4263 * Makefile.in: Regenerate.
4264 * po/SRC-POTFILES.in: Add or32 files.
4265 * po/bfd.pot: Regenerate.
4266
4267 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
4268 Don Lindsay <lindsayd@cisco.com>
4269
4270 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
4271 false' with a return of a bfd_reloc_ error code.
4272
4273 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
4274
4275 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
4276 unexport unreferenced symbols when --export-dynamic. Call
4277 _bfd_elf_strtab_delref when unexporting.
4278
4279 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
4280
4281 * bfd-in.h: Include <stdbool.h> if it is available.
4282 * bfd-in2.h: Regenerated.
4283
4284 2002-01-31 Alan Modra <amodra@bigpond.net.au>
4285
4286 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
4287 not go via the plt.
4288
4289 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
4290
4291 * archures.c: Tidy up formatting of embedded comments.
4292 * bfd.c: Tidy up formatting of embedded comments.
4293 * bfd-in.h: Fix formatting of comments.
4294 * reloc.c: Tidy up formatting of ordinary & embedded comments.
4295 * section.c: Tidy up formatting of embedded comments.
4296 * syms.c: Tidy up formatting of embedded comments.
4297 * targets.c: Tidy up formatting of embedded comments.
4298
4299 * bfd-in2.h: Regenerate.
4300
4301 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
4302
4303 * vms-tir.c (cmd_name): New function.
4304 (tir_cmd_name): New function.
4305 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
4306 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
4307 Fix formatting.
4308
4309 * peXXigen.c (pe_print_idata): Rearrange message to aid in
4310 translation.
4311 (pe_print_pdata): Rearrange message to aid in translation.
4312
4313 * libbfd.c (warn_deprecated): Rearrange error message to aid in
4314 translation.
4315
4316 * ihex.c (ihex_write_object_contents): Fix spelling typo.
4317
4318 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
4319
4320 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
4321 message to aid in translation.
4322
4323 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
4324 to aid in translation.
4325
4326 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
4327
4328 2002-01-30 Philipp Thomas <pthomas@suse.de>
4329
4330 * coff-arm.c, elf32-elf.h: Unify messages.
4331
4332 2002-01-30 Nick Clifton <nickc@redhat.com>
4333
4334 * po/sv.po: Updated translation.
4335
4336 2002-01-30 Philipp Thomas <pthomas@suse.de>
4337
4338 * dwarf2.c (read_abbrev): Use full section name in error message.
4339 (decode_line_info): Likewise.
4340
4341 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
4342 message.
4343
4344 2002-01-30 Alan Modra <amodra@bigpond.net.au>
4345
4346 * elf64-ppc.c (func_desc_adjust): Only provide missing function
4347 descriptor symbols for undefined function code syms. Clear
4348 ELF_LINK_NON_ELF so that they can stay weak.
4349
4350 2002-01-29 Chris Demetriou <cgd@broadcom.com>
4351 Mitch Lichtenberg <mpl@broadcom.com>
4352
4353 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
4354 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
4355 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
4356 generation.
4357 * bfd-in2.h: Regenerate.
4358
4359 2002-01-29 Chris Demetriou <cgd@broadcom.com>
4360
4361 * elf32-mips.c: Add additional comments about HI16 relocation
4362 processing.
4363 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
4364 pc-relative relocations. (Reverts change made on 2001-10-31.)
4365 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
4366 for pc-relative relocations.
4367 (mips_elf_calculate_relocation): Add a comment about a kludge
4368 in the R_MIPS_GNU_REL_HI16 handling.
4369 (_bfd_mips_elf_relocate_section): Implement that kludge;
4370 adjust pc-relative HI16 relocation for difference in HI16 and
4371 LO16 addresses, since it can't easily be done in
4372 mips_elf_calculate_relocation.
4373
4374 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
4375
4376 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
4377 relocations with PC32 relocations for undefined or weak symbols.
4378 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
4379 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
4380
4381 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
4382
4383 * elfcore.h (elf_core_file_p): Improve comment for last change.
4384
4385 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
4386
4387 * configure: Regenerated.
4388
4389 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
4390
4391 * elfcore.h (elf_core_file_p): Set the machine architecture
4392 before processing the program headers.
4393
4394 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
4395
4396 * configure.in <64-bit configuration>: If using gcc, check and
4397 emit error for egcs-1.1.2.
4398 * configure: Regenerate.
4399
4400 2002-01-26 Egor Duda <deo@logos-m.ru>
4401
4402 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
4403 as possible to avoid stack corruption.
4404
4405 2002-01-26 Richard Henderson <rth@redhat.com>
4406
4407 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
4408 for non-allocated sections.
4409
4410 2002-01-25 Mark Kettenis <kettenis@gnu.org>
4411
4412 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
4413 prstat.pr_reg even if it is a struct.
4414
4415 2002-01-25 Steve Ellcey <sje@cup.hp.com>
4416
4417 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
4418
4419 2002-01-25 Philipp Thomas <pthomas@suse.de>
4420
4421 * coffgen.c (coff_print_symbol): Don't mark info message
4422 for translation.
4423
4424 2002-01-25 Nick Clifton <nickc@redhat.com>
4425
4426 * po/fr.po: Updated translation.
4427 * po/es.po: Updated translation.
4428
4429 2002-01-25 Philipp Thomas <pthomas@suse.de>
4430
4431 * coff-alpha.c (alpha_relocate_section): Unify warning message
4432 for GP relative relocations without GP defined.
4433 * coff-mips.c (mips_relocate_section): Likewise.
4434
4435 2002-01-25 Alan Modra <amodra@bigpond.net.au>
4436
4437 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
4438 unsigned overflow when new_offset < old_offset.
4439
4440 2002-01-24 Philipp Thomas <pthomas@suse.de>
4441
4442 * bfd.c (_bfd_abort): Fix typo.
4443
4444 2002-01-23 Richard Henderson <rth@redhat.com>
4445
4446 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
4447 plt entries for undefweak symbols.
4448
4449 2002-01-23 Steve Ellcey <sje@cup.hp.com>
4450
4451 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
4452 (bfd_elf64_ia64_hpux_big_vec): Ditto.
4453 (bfd_elf32_h8300_vec): Ditto.
4454
4455 2002-01-23 Alan Modra <amodra@bigpond.net.au>
4456
4457 * elf64-ppc.c: Remove stale part of ABI comment.
4458 (NO_OPD_RELOCS): Define.
4459 (ppc64_elf_check_relocs): Use it.
4460 (ppc64_elf_relocate_section): Here too.
4461 (build_one_stub): Don't point function syms at the stub. Instead,
4462 hijack plt.offset.
4463 (ppc64_elf_relocate_section): Check whether REL24 relocs should
4464 really go to the stub. Make all dynamic relocs in opd against
4465 locals.
4466 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
4467 plt.offset.
4468
4469 2002-01-22 Richard Henderson <rth@redhat.com>
4470
4471 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
4472
4473 2002-01-22 Alan Modra <amodra@bigpond.net.au>
4474
4475 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
4476 TOC_BASE_OFF adjustment.
4477
4478 * Makefile.am: Run "make dep-am".
4479 * Makefile.in: Regenerate.
4480 * po/SRC-POTFILES.in: Regenerate.
4481
4482 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
4483
4484 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
4485 host defines.
4486
4487 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
4488
4489 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
4490 Check for and emit error if sgot is NULL at this point.
4491
4492 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
4493
4494 * config.bfd (ia64*-*-netbsd*): New target.
4495
4496 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
4497
4498 * som.c (som_write_space_strings): Comment typo fix.
4499
4500 2002-01-21 Alan Modra <amodra@bigpond.net.au>
4501
4502 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
4503 is_func_descriptor fields.
4504 (link_hash_newfunc): Init them.
4505 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
4506 dot are candidates for plt entries. When processing .opd relocs,
4507 set function descriptor strings to point inside function code
4508 string, and set new ppc_link_hash_entry fields.
4509 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
4510 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
4511 function descriptors. It's now done in..
4512 (func_desc_adjust): New.
4513 (ppc64_elf_func_desc_adjust): New.
4514 (define elf_backend_always_size_sections): Define.
4515 (ppc64_elf_hide_symbol): New.
4516 (define elf_backend_hide_symbol): Define.
4517 (allocate_dynrelocs): Remove code looking up function descriptors
4518 as that has been done earlier.
4519 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
4520 table.
4521 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
4522 up function descriptor.
4523 (build_one_stub): Look up the function code sym. Check for
4524 invalid plt offsets.
4525 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
4526 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
4527
4528 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
4529 boolean param.
4530 (_bfd_elf_link_hash_hide_symbol): Likewise.
4531 * elflink.h (elf_link_add_object_symbols): Adjust call to
4532 elf_backend_hide_symbol.
4533 (elf_fix_symbol_flags): Likewise.
4534 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
4535 than bfd_alloc.
4536 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
4537 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
4538 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
4539 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
4540 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
4541 and adjust to suit.
4542 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
4543 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
4544 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
4545
4546 2002-01-18 Alan Modra <amodra@bigpond.net.au>
4547
4548 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
4549 dynamic function descriptor symbol, not the associated function
4550 symbol.
4551
4552 2002-01-17 Eric Christopher <echristo@redhat.com>
4553
4554 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
4555
4556 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
4557
4558 * po/bfd.pot: Regenerate.
4559 * po/fr.po: Regenerate.
4560
4561 2002-01-17 Alan Modra <amodra@bigpond.net.au>
4562
4563 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
4564 Remove "Elf_Internal_Shdr *" param.
4565 (_bfd_mips_elf_section_from_bfd_section): Ditto.
4566 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
4567 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
4568 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
4569 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
4570 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
4571 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
4572 function to override special sections. Remove hdr arg from
4573 backend call, and don't loop.
4574
4575 2002-01-16 Eric Christopher <echristo@redhat.com>
4576
4577 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
4578 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
4579 relocations requiring gp0 and gp.
4580
4581 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
4582
4583 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
4584 EF_ARM_VFP_FLOAT.
4585 (elf32_arm_print_private_bfd_data): Likewise.
4586
4587 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
4588
4589 * po/tr.po: Import new version.
4590
4591 2002-01-16 Alan Modra <amodra@bigpond.net.au>
4592
4593 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
4594 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
4595 (ORI_R0_R0_0): Correct.
4596
4597 2002-01-16 Alan Modra <amodra@bigpond.net.au>
4598
4599 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
4600 when plt_not_loaded.
4601 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
4602 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
4603 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
4604 (ppc64_elf_glink_code): Delete.
4605 (PPC64_ELF_GLINK_SIZE): Delete.
4606 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
4607 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
4608 ORI_R0_R0_0): Define.
4609 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
4610 (struct ppc_link_hash_table): Add sstub and plt_overflow.
4611 (ppc64_elf_link_hash_table_create): Init them.
4612 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
4613 Don't copy to shared lib.
4614 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
4615 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
4616 (allocate_dynrelocs <plt>): Don't change function sym here. Make
4617 room for .stub and .glink code.
4618 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
4619 DT_PPC64_GLINK.
4620 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
4621 bfd_elf64_bfd_final_link.
4622 (bfd_elf64_bfd_final_link): Don't define.
4623 (ppc64_elf_size_stubs): New.
4624 (build_plt_stub): New.
4625 (build_one_stub): New.
4626 (ppc64_elf_build_stubs): New.
4627 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
4628 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
4629 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
4630 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
4631 case output sections not separate. Adjust DT_RELASZ to not
4632 include plt relocs. Set reserved got entry. Set got and plt
4633 entry size.
4634 (elf_backend_got_header_size): Set to 8.
4635 * elf64-ppc.h: New file.
4636
4637 2002-01-16 Alan Modra <amodra@bigpond.net.au>
4638
4639 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
4640 sections, use bfd_section_list_remove.
4641 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
4642 * elflink.h (elf_link_add_object_symbols): When removing all
4643 sections, use bfd_section_list_clear.
4644
4645 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
4646
4647 * po/sv.po: New file: Swedish translation.
4648 * configure.in (ALL_LINGUAS): Add sv.
4649 * configure: Regenerate.
4650
4651 2002-01-15 Jakub Jelinek <jakub@redhat.com>
4652
4653 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
4654 * elf.c (merge_sections_remove_hook): New function.
4655 (_bfd_elf_merge_sections): Pass it as 3rd argument to
4656 _bfd_merge_sections.
4657 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
4658 * libbfd.h: Rebuilt.
4659 * merge.c (_bfd_merge_sections): Add remove_hook argument.
4660 Call remove_hook if a SEC_EXCLUDE section is encountered.
4661
4662 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
4663
4664 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
4665 (xstormy16_reloc_map): Initialise new field with correct howto
4666 table.
4667 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
4668 howto entry.
4669
4670 2002-01-10 Michael Snyder <msnyder@redhat.com>
4671
4672 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
4673 (elfcore_write_pstatus): Use long instead of pid_t;
4674 * elf-bfd.h: Change prototypes to use long instead of pid_t;
4675
4676 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
4677
4678 * elf.c: Update copyright years.
4679 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
4680 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
4681
4682 2002-01-08 Michael Snyder <msnyder@redhat.com>
4683
4684 Add capability to write corefile note sections, for gdb.
4685 * elf.c (elfcore_write_note): New function.
4686 (elfcore_write_prpsinfo): New function.
4687 (elfcore_write_prstatus): New function.
4688 (elfcore_write_pstatus): New function.
4689 (elfcore_write_prfpreg): New function.
4690 (elfcore_write_prxfpreg): New function.
4691 * elf-bfd.h: Add prototypes for above functions.
4692
4693 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
4694
4695 * elf.c (elf_fake_sections): Propagate errors from
4696 elf_backend_fake_section.
4697
4698 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
4699
4700 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
4701 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
4702 (elf32-sh-nbsd.lo): New rule.
4703 * Makefile.in: Regenerate.
4704 * config.bfd (sh*le-*-netbsdelf*): New target.
4705 (sh*-*-netbsdelf*): New target.
4706 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
4707 (bfd_elf32_shnbsd_vec): New vector.
4708 (bfd_elf32_shlnbsd_vec): New vector.
4709 * configure: Regenerate.
4710 * elf32-sh-nbsd.c: New file.
4711 * targets.c: Update copyright years.
4712 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
4713 bfd_elf32_shnbsd_vec.
4714
4715 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
4716
4717 * coff-rs6000.c (READ20): Use bfd_scan_vma.
4718
4719 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
4720
4721 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
4722 of a symbol in a section that will be deleted.
4723
4724 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
4725
4726 * po/es.po: New file: Spanish translation.
4727 * configure.in (ALL_LINGUAS): Add es.
4728 * configure: Regenerate.
4729
4730 2002-01-06 Steve Ellcey <sje@cup.hp.com>
4731
4732 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
4733 argument so we can handle HP-UX specially.
4734 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
4735 (elfNN_hpux_backend_section_from_bfd_section): New for support
4736 of SHN_IA_64_ANSI_COMMON.
4737 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
4738 (is_unwind_section_name): Add special HP-UX support.
4739 (elfNN_ia64_section_from_shdr): Add support for more sections.
4740 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
4741 add support for more sections.
4742 (elfNN_ia64_additional_program_headers): Modify
4743 is_unwind_section_name call.
4744 (elfNN_ia64_modify_segment_map): Remove assumption that there is
4745 only one unwind section in segment.
4746
4747 2002-01-06 Alan Modra <amodra@bigpond.net.au>
4748
4749 * syms.c (_bfd_generic_make_empty_symbol): New function.
4750 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
4751 _bfd_generic_make_empty_symbol.
4752 * libbfd.h: Regenerate.
4753 * bfd-in2.h: Regenerate.
4754 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
4755 (hppabsd_core_get_symtab_upper_bound): Don't define.
4756 (hppabsd_core_get_symtab): Likewise.
4757 (hppabsd_core_print_symbol): Likewise.
4758 (hppabsd_core_get_symbol_info): Likewise.
4759 (hppabsd_core_bfd_is_local_label_name): Likewise.
4760 (hppabsd_core_get_lineno): Likewise.
4761 (hppabsd_core_find_nearest_line): Likewise.
4762 (hppabsd_core_bfd_make_debug_symbol): Likewise.
4763 (hppabsd_core_read_minisymbols): Likewise.
4764 (hppabsd_core_minisymbol_to_symbol): Likewise.
4765 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
4766 Formatting fixes.
4767 * hpux-core.c: Similarly.
4768 * irix-core.c: Similarly.
4769 * osf-core.c: Similarly.
4770 * sco5-core.c: Similarly.
4771 * binary.c (binary_make_empty_symbol): Remove function, define as
4772 _bfd_generic_make_empty_symbol.
4773 * ihex.c (ihex_make_empty_symbol): Likewise.
4774 * mmo.c (mmo_make_empty_symbol): Likewise.
4775 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
4776 * srec.c (srec_make_empty_symbol): Likewise.
4777 * versados.c (versados_make_empty_symbol): Likewise.
4778 * vms.c (_bfd_vms_make_empty_symbol): Remove.
4779 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
4780 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
4781 rather than _bfd_vms_make_empty_symbol.
4782 * vms-misc.c (new_symbol): Likewise.
4783
4784 2002-01-05 Alan Modra <amodra@bigpond.net.au>
4785
4786 * section.c (bfd_section_init): Remove unnecessary initialisations.
4787 (bfd_section_list_clear): New function.
4788 (bfd_section_list_remove, bfd_section_list_insert): New macros.
4789 (_bfd_strip_section_from_output): Use them.
4790 * coffcode.h (coff_set_alignment_hook): Likewise.
4791 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
4792 * elf64-mips.c (mips_elf64_final_link): Likewise.
4793 * elf64-mmix.c (mmix_elf_final_link): Likewise.
4794 * sunos.c (sunos_add_dynamic_symbols): Likewise.
4795 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
4796 * bfd-in2.h: Regenerate.
4797
4798 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
4799 rather than doing our own section handling. Clean up after errors
4800 with bfd_release and bfd_section_list_clear. Handle unexpected
4801 flags.
4802 * aoutf1.h (sunos4_core_file_p): Likewise.
4803 * aix386-core.c (aix386_core_file_p): Likewise.
4804 * cisco-core.c (cisco_core_file_validate): Likewise.
4805 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
4806 * trad-core.c (trad_unix_core_file_p): Likewise.
4807
4808 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
4809 with bfd_release and bfd_section_list_clear.
4810 * hpux-core.c (hpux_core_core_file_p): Likewise.
4811 * irix-core.c (irix_core_core_file_p): Likewise.
4812 * lynx-core.c (lynx_core_file_p): Likewise.
4813 * osf-core.c (osf_core_core_file_p): Likewise.
4814 * rs6000-core.c (rs6000coff_core_p): Likewise.
4815 * sco5-core.c (sco5_core_file_p): Likewise.
4816
4817 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
4818 sign extension adjustments without conditionals.
4819
4820 2002-01-04 Jakub Jelinek <jakub@redhat.com>
4821
4822 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
4823 CIE at .eh_frame start is removed due to no FDEs referencing it.
4824
4825 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
4826
4827 * config.bfd (x86_64-*-netbsd*): New target.
4828 * configure.in (x86_64-*-netbsd*): Set COREFILE
4829 to netbsd-core.lo.
4830 * configure: Regenerated.
4831
4832 2002-01-03 Tom Rix <trix@redhat.com>
4833
4834 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
4835 for recent bfd_make_section_anyway change.
4836
4837 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
4838
4839 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
4840 R_ARM_THM_PC11 reloc.
4841
4842 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
4843
4844 * configure.in (LINGUAS): Add ja.
4845 * configure: Regenerate.
4846 * po/ja.po: Import from translation project's web site.
4847
4848 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
4849
4850 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
4851 messages to ease translation into other languages.
4852
4853 For older changes see ChangeLog-0001
4854 \f
4855 Local Variables:
4856 mode: change-log
4857 left-margin: 8
4858 fill-column: 74
4859 version-control: never
4860 End:
This page took 0.133919 seconds and 4 git commands to generate.